Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,131 @@
/* Metro module 7974; source: design/components/Forms/native/FormCheckbox.native.tsx; dependencies: [31, 33, 4501, 697, 4017, 4580, 1357, 3875, 6810, 4577, 4581, 2] */
function _fun63460(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8152:6, offset: 0x01b80990, size: 559 bytes, params: 8, frame: 22
var object5;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object5 = {};
const object6 = {'width': null, 'height': null, 'flexGrow': 0, 'flexShrink': 0, 'alignItems': 'center',
'justifyContent': 'center'};
let CONTROL_CHECKBOX_SIZE_DEFAULT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CONTROL_CHECKBOX_SIZE_DEFAULT;
object6.width = CONTROL_CHECKBOX_SIZE_DEFAULT;
CONTROL_CHECKBOX_SIZE_DEFAULT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CONTROL_CHECKBOX_SIZE_DEFAULT;
object6.height = CONTROL_CHECKBOX_SIZE_DEFAULT;
const CONTROL_CHECKBOX_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CONTROL_CHECKBOX_BORDER_RADIUS;
object6.borderRadius = CONTROL_CHECKBOX_BORDER_RADIUS;
const CONTROL_CHECKBOX_BORDER_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CONTROL_CHECKBOX_BORDER_WIDTH;
object6.borderWidth = CONTROL_CHECKBOX_BORDER_WIDTH;
let CHECKBOX_BORDER_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CHECKBOX_BORDER_DEFAULT;
object6.borderColor = CHECKBOX_BORDER_DEFAULT;
object5.checkbox = object6;
const object7 = {};
const CHECKBOX_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CHECKBOX_BACKGROUND_DEFAULT;
object7.backgroundColor = CHECKBOX_BACKGROUND_DEFAULT;
CHECKBOX_BORDER_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CHECKBOX_BORDER_DEFAULT;
object7.borderColor = CHECKBOX_BORDER_DEFAULT;
object5.unselected = object7;
const object8 = {};
const CHECKBOX_BORDER_SELECTED_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CHECKBOX_BORDER_SELECTED_DEFAULT;
object8.borderColor = CHECKBOX_BORDER_SELECTED_DEFAULT;
const CHECKBOX_BACKGROUND_SELECTED_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CHECKBOX_BACKGROUND_SELECTED_DEFAULT;
object8.backgroundColor = CHECKBOX_BACKGROUND_SELECTED_DEFAULT;
object5.selected = object8;
const CHECKBOX_ICON_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.CHECKBOX_ICON_ACTIVE;
object5.checkmark = {tintColor: CHECKBOX_ICON_ACTIVE};
const env0_5 = Reflect.apply(createStyles, createStylesModule, [object5]);
const env0_6 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(importDefault(4580) /* metro dependency 4580: Icon */);
object5 = {code: "function FormCheckboxNativeTsx1(){const{withSpring,checked,selected,unselected,SUBTLE_SPRING}=this.__closure;const defaultAnimation={borderColor:withSpring(checked?selected.borderColor:unselected.borderColor,SUBTLE_SPRING,'animate-always'),backgroundColor:withSpring(checked?selected.backgroundColor:unselected.backgroundColor,SUBTLE_SPRING,'animate-always')};return defaultAnimation;}"};
object5 = {code: "function FormCheckboxNativeTsx2(){const{useReducedMotion,withSpring,checked,SUBTLE_SPRING}=this.__closure;const uncheckedScale=useReducedMotion?1:0.5;return{opacity:withSpring(checked?1:0,SUBTLE_SPRING,'animate-always'),transform:[{scale:withSpring(checked?1:uncheckedScale,SUBTLE_SPRING)}]};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Forms/native/FormCheckbox.native.tsx');
exports.FormCheckbox = FormCheckbox_63461;
}
function FormCheckbox_63461({checked}) { // fn#63461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8152:1704, offset: 0x01b80bbf, size: 276 bytes, params: 2, frame: 22
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('FormCheckbox');
const styles = useStyles();
let binding = env0_3;
const useContext = binding.useContext;
const AccessibilityPreferencesContext = (require(3875) /* metro dependency 3875: AccessibilityPreferencesContext */).AccessibilityPreferencesContext;
const enabled = Reflect.apply(useContext, binding, [AccessibilityPreferencesContext]).reducedMotion.enabled;
const value3 = useCheckboxStyles(checked);
const value4 = useCheckmarkStyles(enabled, checked);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.checkbox, value3];
binding = env0_6;
const object = {source: importDefault(6810) /* metro dependency 6810 */};
const Sizes = (importDefault(4580) /* metro dependency 4580: Icon */).Sizes;
object.size = value2 ? Sizes.SMALL_20 : Sizes.SMALL;
object.style = [styles.checkmark, value4];
return (
<View style={items2}>
{((Component) => <Component {...object} />)(binding)}
</View>
);
}
function useCheckboxStyles(a0) { // fn#63462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8152:1855, owner: FormCheckbox_63461.useCheckboxStyles, offset: 0x01b80cd3, size: 173 bytes, params: 2, frame: 20
const env0_0 = a0;
const {selected, unselected} = useStyles();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = useCheckboxStyles_;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.checked = a0;
object2.selected = selected;
object2.unselected = unselected;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2.SUBTLE_SPRING = SUBTLE_SPRING;
closure.__closure = object2;
closure.__workletHash = 11278373524374;
closure.__initData = env1_7;
return Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
}
function useCheckmarkStyles(a0, a1) { // fn#63464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8152:2370, owner: FormCheckbox_63461.useCheckmarkStyles, offset: 0x01b80e39, size: 147 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = useCheckmarkStylesC;
const object2 = {useReducedMotion: a0};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.checked = a1;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2.SUBTLE_SPRING = SUBTLE_SPRING;
closure.__closure = object2;
closure.__workletHash = 13939484082835;
closure.__initData = env1_8;
return Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
}
function useCheckboxStyles_() { // fn#63463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8152:1958, owner: FormCheckbox_63461.useCheckboxStyles._, offset: 0x01b80d80, size: 185 bytes, params: 1, frame: 23
const object2 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const borderColor = env0_0 ? selected.borderColor : unselected.borderColor;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2.borderColor = Reflect.apply(withSpring, springModule, [borderColor, SUBTLE_SPRING, 'animate-always']);
const moduleValue2 = springModule;
object2.backgroundColor = moduleValue2.withSpring(env0_0 ? selected.backgroundColor : unselected.backgroundColor,
SUBTLE_SPRING, 'animate-always');
return object2;
}
function useCheckmarkStylesC() { // fn#63465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8152:2438, owner: FormCheckbox_63461.useCheckmarkStyles.c, offset: 0x01b80ecc, size: 187 bytes, params: 1, frame: 24
const r6 = env0_0 ? 1 : 0.5;
const object2 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const r11 = require ? 1 : 0;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2.opacity = Reflect.apply(withSpring, springModule, [r11, SUBTLE_SPRING, 'animate-always']);
const moduleValue2 = springModule;
object2.transform = [{scale: moduleValue2.withSpring(require ? 1 : r6, SUBTLE_SPRING)}];
return object2;
}
@@ -0,0 +1,159 @@
/* Metro module 7989; source: design/components/Forms/native/FormRadio.native.tsx; dependencies: [31, 33, 4501, 697, 3875, 4017, 4577, 4581, 2] */
function _fun63538(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8167:6, offset: 0x01b8466e, size: 235 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun63539);
object = {code: "function FormRadioNativeTsx1(){const{withSpring,selectedShared,selectedStyles,unselectedStyles,SUBTLE_SPRING}=this.__closure;return withSpring(selectedShared.get()?selectedStyles.borderColor:unselectedStyles.borderColor,SUBTLE_SPRING,'animate-always');}"};
object = {code: "function FormRadioNativeTsx2(){const{withSpring,selectedShared,selectedStyles,unselectedStyles,SUBTLE_SPRING}=this.__closure;return withSpring(selectedShared.get()?selectedStyles.backgroundColor:unselectedStyles.backgroundColor,SUBTLE_SPRING,'animate-always');}"};
object = {code: 'function FormRadioNativeTsx3(){const{borderColor,backgroundColor}=this.__closure;return{borderColor:borderColor.get(),backgroundColor:backgroundColor.get()};}'};
object = {code: "function FormRadioNativeTsx4(){const{useReducedMotion,withSpring,selected,SUBTLE_SPRING}=this.__closure;const unselectedScale=useReducedMotion?1:0.5;return{opacity:withSpring(selected?1:0,SUBTLE_SPRING,'animate-always'),transform:[{scale:withSpring(selected?1:unselectedScale,SUBTLE_SPRING)}]};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Forms/native/FormRadio.native.tsx');
exports.FormRadio = FormRadio_63540;
}
function _fun63539() { // fn#63539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8167:144, offset: 0x01b84759, size: 343 bytes, params: 1, frame: 17
const CONTROL_RADIO_ICON_SIZE_DEFAULT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CONTROL_RADIO_ICON_SIZE_DEFAULT;
const CONTROL_RADIO_ICON_DOT_SIZE_DEFAULT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CONTROL_RADIO_ICON_DOT_SIZE_DEFAULT;
const object3 = {};
const object6 = {'width': null, 'height': null, 'flexGrow': 0, 'flexShrink': 0, 'alignItems': 'center',
'justifyContent': 'center'};
object6.width = CONTROL_RADIO_ICON_SIZE_DEFAULT;
object6.height = CONTROL_RADIO_ICON_SIZE_DEFAULT;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const CONTROL_RADIO_ICON_BORDER_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CONTROL_RADIO_ICON_BORDER_WIDTH;
object6.borderWidth = CONTROL_RADIO_ICON_BORDER_WIDTH;
let RADIO_BORDER_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.RADIO_BORDER_DEFAULT;
object6.borderColor = RADIO_BORDER_DEFAULT;
object3.radio = object6;
RADIO_BORDER_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.RADIO_BORDER_DEFAULT;
object3.unselected = {backgroundColor: 'transparent', borderColor: RADIO_BORDER_DEFAULT};
const object7 = {};
let REDESIGN_INPUT_CONTROL_SELECTED = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_INPUT_CONTROL_SELECTED;
object7.borderColor = REDESIGN_INPUT_CONTROL_SELECTED;
REDESIGN_INPUT_CONTROL_SELECTED = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_INPUT_CONTROL_SELECTED;
object7.backgroundColor = REDESIGN_INPUT_CONTROL_SELECTED;
object3.selected = object7;
const object8 = {width: CONTROL_RADIO_ICON_DOT_SIZE_DEFAULT, height: CONTROL_RADIO_ICON_DOT_SIZE_DEFAULT};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object8.backgroundColor = WHITE;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.dot = object8;
return object3;
}
function FormRadio_63540({selected}) { // fn#63540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8167:1960, offset: 0x01b848b0, size: 202 bytes, params: 2, frame: 21
const styles = useStyles();
const binding = env0_3;
const useContext = binding.useContext;
const AccessibilityPreferencesContext = (require(3875) /* metro dependency 3875: AccessibilityPreferencesContext */).AccessibilityPreferencesContext;
const enabled = Reflect.apply(useContext, binding, [AccessibilityPreferencesContext]).reducedMotion.enabled;
const value2 = useRadioStyles(selected);
const value3 = useRadioDotStyles(enabled, selected);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.radio, value2];
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={items2}>
<View2 style={[styles.dot, value3]} />
</View>
);
}
function useRadioStyles(a0) { // fn#63541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8167:2083, owner: FormRadio_63540.useRadioStyles, offset: 0x01b8497a, size: 417 bytes, params: 2, frame: 25
var object2;
const env0_0 = a0;
const {selected, unselected} = useStyles();
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(a0);
env1_3.useEffect(_fun63542, [a0, value2]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = useRadioStylesT;
object2 = {};
const withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.withSpring = withSpring;
object2.selectedShared = value2;
object2.selectedStyles = selected;
object2.unselectedStyles = unselected;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2.SUBTLE_SPRING = SUBTLE_SPRING;
closure.__closure = object2;
closure.__workletHash = 12275577765341;
closure.__initData = env1_6;
const value3 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const moduleValue3 = reanimatedRexportModule;
useDerivedValue = moduleValue3.useDerivedValue;
closure = useRadioStylesC;
closure.__closure = {withSpring: withSpring, selectedShared: value2, selectedStyles: selected,
unselectedStyles: unselected, SUBTLE_SPRING: SUBTLE_SPRING};
closure.__workletHash = 7732795836606;
closure.__initData = env1_7;
const value4 = Reflect.apply(useDerivedValue, moduleValue3, [closure]);
const moduleValue4 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = useRadioStylesB;
closure.__closure = {borderColor: value3, backgroundColor: value4};
closure.__workletHash = 5670342272321;
closure.__initData = env1_8;
return Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
}
function useRadioDotStyles(a0, a1) { // fn#63546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8167:3050, owner: FormRadio_63540.useRadioDotStyles, offset: 0x01b84c23, size: 147 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = useRadioDotStylesS;
const object2 = {useReducedMotion: a0};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.selected = a1;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2.SUBTLE_SPRING = SUBTLE_SPRING;
closure.__closure = object2;
closure.__workletHash = 15209729079449;
closure.__initData = env1_9;
return Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
}
function useRadioStylesT() { // fn#63543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8167:2245, owner: FormRadio_63540.useRadioStyles.T, offset: 0x01b84b1b, size: 112 bytes, params: 1, frame: 17
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const binding = env0_3;
const get = binding.get;
const borderColor = Reflect.apply(get, binding, []) ? selected.borderColor : unselected.borderColor;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
return Reflect.apply(withSpring, springModule, [borderColor, SUBTLE_SPRING, 'animate-always']);
}
function useRadioStylesC() { // fn#63544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8167:2555, owner: FormRadio_63540.useRadioStyles.C, offset: 0x01b84b8b, size: 110 bytes, params: 1, frame: 17
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const binding = env0_3;
const get = binding.get;
const backgroundColor = Reflect.apply(get, binding, []) ? selected.backgroundColor : unselected.backgroundColor;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
return Reflect.apply(withSpring, springModule, [backgroundColor, SUBTLE_SPRING, 'animate-always']);
}
function useRadioStylesB() { // fn#63545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8167:2891, owner: FormRadio_63540.useRadioStyles.b, offset: 0x01b84bf9, size: 42 bytes, params: 1, frame: 11
const object2 = {};
object2.borderColor = env0_4.get();
object2.backgroundColor = env0_5.get();
return object2;
}
function useRadioDotStylesS() { // fn#63547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8167:3117, owner: FormRadio_63540.useRadioDotStyles.s, offset: 0x01b84cb6, size: 187 bytes, params: 1, frame: 24
const r6 = env0_0 ? 1 : 0.5;
const object2 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const r11 = require ? 1 : 0;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2.opacity = Reflect.apply(withSpring, springModule, [r11, SUBTLE_SPRING, 'animate-always']);
const moduleValue2 = springModule;
object2.transform = [{scale: moduleValue2.withSpring(require ? 1 : r6, SUBTLE_SPRING)}];
return object2;
}
@@ -0,0 +1,261 @@
/* Metro module 6809; source: design/components/Forms/native/FormSwitch.native.tsx; dependencies: [57, 31, 27, 33, 4017, 4501, 697, 4580, 3875, 1357, 4577, 4581, 3860, 6810, 6811, 4081, 4082, 2] */
function _fun53566(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6987:6, offset: 0x0134f321, size: 702 bytes, params: 8, frame: 25
var object4;
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 Pressable = (require(27) /* metro dependency 27 */).Pressable;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(Pressable);
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object7 = {};
const CONTROL_SWITCH_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CONTROL_SWITCH_WIDTH;
object7.width = CONTROL_SWITCH_WIDTH;
const CONTROL_SWITCH_HEIGHT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CONTROL_SWITCH_HEIGHT;
object7.height = CONTROL_SWITCH_HEIGHT;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object7.padding = PX_4 - 1;
object7.flexGrow = 0;
object7.flexShrink = 0;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object7.borderWidth = 1;
object4.switch = object7;
const object8 = {};
const SWITCH_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.SWITCH_BACKGROUND_DEFAULT;
object8.tintColor = SWITCH_BACKGROUND_DEFAULT;
const SWITCH_BORDER_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.SWITCH_BORDER_DEFAULT;
object8.borderColor = SWITCH_BORDER_DEFAULT;
object4.unselectedBackground = object8;
const ICON_OVERLAY_DARK = (importDefault(697) /* metro dependency 697: native */).colors.ICON_OVERLAY_DARK;
object4.unselectedIcon = {tintColor: ICON_OVERLAY_DARK};
const object9 = {};
const SWITCH_BACKGROUND_SELECTED_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.SWITCH_BACKGROUND_SELECTED_DEFAULT;
object9.tintColor = SWITCH_BACKGROUND_SELECTED_DEFAULT;
const SWITCH_BORDER_SELECTED_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.SWITCH_BORDER_SELECTED_DEFAULT;
object9.borderColor = SWITCH_BORDER_SELECTED_DEFAULT;
object4.selected = object9;
const object10 = {};
let CONTROL_SWITCH_KNOB_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CONTROL_SWITCH_KNOB_SIZE;
object10.height = CONTROL_SWITCH_KNOB_SIZE;
CONTROL_SWITCH_KNOB_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CONTROL_SWITCH_KNOB_SIZE;
object10.width = CONTROL_SWITCH_KNOB_SIZE;
object10.alignItems = 'center';
object10.justifyContent = 'center';
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.knob = object10;
const env0_7 = Reflect.apply(createStyles, value, [object4]);
const env0_8 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(importDefault(4580) /* metro dependency 4580: Icon */);
object4 = {code: "function FormSwitchNativeTsx1(){const{withSpring,checked,selected,unselectedBackground,SUBTLE_SPRING}=this.__closure;return{backgroundColor:withSpring(checked?selected.tintColor:unselectedBackground.tintColor,SUBTLE_SPRING,'animate-always'),borderColor:withSpring(checked?selected.borderColor:unselectedBackground.borderColor,SUBTLE_SPRING,'animate-always')};}"};
object4 = {code: "function FormSwitchNativeTsx2(){const{withSpring,checked,knobCheckedLeft,SUBTLE_SPRING,knobSelectedBackgroundColor,knobBackgroundColor}=this.__closure;return{left:withSpring(checked?knobCheckedLeft:0,SUBTLE_SPRING,'animate-always'),backgroundColor:withSpring(checked?knobSelectedBackgroundColor:knobBackgroundColor,SUBTLE_SPRING,'animate-always')};}"};
object4 = {code: "function FormSwitchNativeTsx3(){const{useReducedMotion,checked,on,off,withSpring,SUBTLE_SPRING}=this.__closure;const scale=useReducedMotion?1:checked?on:off;return{opacity:withSpring(checked?on:off,SUBTLE_SPRING,'animate-always'),transform:[{scale:withSpring(scale,SUBTLE_SPRING)}]};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Forms/native/FormSwitch.native.tsx');
exports.FormSwitch = FormSwitch;
}
function FormSwitch(a0) { // fn#53567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6987:2098, offset: 0x0134f5df, size: 1014 bytes, params: 2, frame: 36
var object2;
var r6;
var Sizes;
const closure = useIconAnimation;
const disabled = a0.disabled;
let value = a0.value;
const env0_1 = a0.onValueChange;
const accessibilityLabel = a0.accessibilityLabel;
const accessibilityHint = a0.accessibilityHint;
const property = a0['aria-hidden'];
let binding = env0_4;
const useContext = binding.useContext;
const AccessibilityPreferencesContext = (require(3875) /* metro dependency 3875: AccessibilityPreferencesContext */).AccessibilityPreferencesContext;
const value3 = Reflect.apply(useContext, binding, [AccessibilityPreferencesContext]);
const env0_2 = value3.reducedMotion.enabled;
const switchIconsEnabled = value3.switchIconsEnabled;
var [property2, env0_4] = env0_3(binding.useState(value), 2);
binding.useEffect(_fun53570, [value]);
value = importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
value = value('FormSwitch');
const styles = useStyles();
const selected = styles.selected;
const env0_6 = selected;
const unselectedBackground = styles.unselectedBackground;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure2 = FormSwitchU;
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, checked: property2,
selected: selected, unselectedBackground: unselectedBackground};
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2.SUBTLE_SPRING = SUBTLE_SPRING;
closure2.__closure = object2;
closure2.__workletHash = 2232234503354;
closure2.__initData = env0_9;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure2]);
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const CONTROL_SWITCH_KNOB_CHECKED_OFFSET = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CONTROL_SWITCH_KNOB_CHECKED_OFFSET;
const value7 = Reflect.apply(useToken, useTokenModule, [CONTROL_SWITCH_KNOB_CHECKED_OFFSET]);
const env0_8 = value7;
const moduleValue3 = useTokenModule;
useToken = moduleValue3.useToken;
const SWITCH_THUMB_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.SWITCH_THUMB_BACKGROUND_DEFAULT;
const value8 = Reflect.apply(useToken, moduleValue3, [SWITCH_THUMB_BACKGROUND_DEFAULT]);
const moduleValue4 = useTokenModule;
useToken = moduleValue4.useToken;
const SWITCH_THUMB_BACKGROUND_SELECTED_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.SWITCH_THUMB_BACKGROUND_SELECTED_DEFAULT;
const value9 = Reflect.apply(useToken, moduleValue4, [SWITCH_THUMB_BACKGROUND_SELECTED_DEFAULT]);
const env0_10 = value9;
const moduleValue5 = reanimatedRexportModule;
useAnimatedStyle = moduleValue5.useAnimatedStyle;
const closure3 = FormSwitchF;
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, checked: property2,
knobCheckedLeft: value7};
object2.SUBTLE_SPRING = SUBTLE_SPRING;
object2.knobSelectedBackgroundColor = value9;
object2.knobBackgroundColor = value8;
closure3.__closure = object2;
closure3.__workletHash = 3687946563898;
closure3.__initData = env0_10;
const value10 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure3]);
if (value && !switchIconsEnabled) {
r6 = null;
} else {
binding = env0_8;
object2 = {};
if (property2) {
object2.source = importDefault(6810) /* metro dependency 6810 */;
Sizes = (importDefault(4580) /* metro dependency 4580: Icon */).Sizes;
object2.size = value ? Sizes.SMALL_20 : Sizes.SMALL;
object2.style = [styles.selected, closure(1, 0)];
} else {
object2.source = importDefault(6811) /* metro dependency 6811 */;
object2.size = (importDefault(4580) /* metro dependency 4580: Icon */).Sizes.SMALL;
object2.style = [styles.unselectedIcon, closure(0, 1)];
}
value = ((Component) => <Component {...object2} />)(binding);
r6 = value;
}
binding = env0_6;
object2 = {style: [styles.switch, value6], onPress: onPress_53573, disabled: disabled, accessible: true};
object2['aria-hidden'] = property;
object2.accessibilityRole = 'switch';
object2.accessibilityLabel = accessibilityLabel;
object2.accessibilityHint = accessibilityHint;
object2.accessibilityState = {disabled: disabled, checked: property2};
object2.onAccessibilityTap = onAccessibilityTap;
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return ((Component) => <Component {...object2}><View style={[styles.knob,
value10]}>{r6}</View></Component>)(binding);
}
function useIconAnimation(a0, a1) { // fn#53568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6987:3527, owner: FormSwitch.useIconAnimation, offset: 0x0134f9d5, size: 168 bytes, params: 3, frame: 20
const env0_0 = a0;
const env0_1 = a1;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = useIconAnimationN;
const object2 = {};
object2.useReducedMotion = enabled;
object2.checked = env0_3;
object2.on = a0;
object2.off = a1;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2.SUBTLE_SPRING = SUBTLE_SPRING;
closure.__closure = object2;
closure.__workletHash = 14329332652102;
closure.__initData = env1_11;
return Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
}
function FormSwitchU() { // fn#53571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6987:2511, owner: FormSwitch.U, offset: 0x0134fb4c, size: 187 bytes, params: 1, frame: 23
const object2 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const tintColor = env0_3 ? selected.tintColor : unselectedBackground.tintColor;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2.backgroundColor = Reflect.apply(withSpring, springModule, [tintColor, SUBTLE_SPRING, 'animate-always']);
const moduleValue2 = springModule;
object2.borderColor = moduleValue2.withSpring(env0_3 ? selected.borderColor : unselectedBackground.borderColor,
SUBTLE_SPRING, 'animate-always');
return object2;
}
function FormSwitchF() { // fn#53572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6987:3154, owner: FormSwitch.f, offset: 0x0134fc07, size: 158 bytes, params: 1, frame: 23
const object2 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const r10 = env0_3 ? env0_8 : 0;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2.left = Reflect.apply(withSpring, springModule, [r10, SUBTLE_SPRING, 'animate-always']);
const moduleValue2 = springModule;
object2.backgroundColor = moduleValue2.withSpring(env0_3 ? env0_10 : env0_9, SUBTLE_SPRING, 'animate-always');
return object2;
}
function FormSwitchOnPress() { // fn#53573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6987:4222, owner: FormSwitch.onPress, offset: 0x0134fca5, size: 120 bytes, params: 1, frame: 16
var valueBinding;
var value3;
var moduleValue;
var triggerHapticFeedback;
var defaultImport;
if (env0_5) {
valueBinding = value;
value3 = environment.__proto__;
moduleValue = require(4081) /* metro dependency 4081: HapticUtilsNative */;
triggerHapticFeedback = moduleValue.triggerHapticFeedback;
defaultImport = importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */;
if (valueBinding) {
Reflect.apply(triggerHapticFeedback, moduleValue, [defaultImport.TOGGLE_OFF]);
} else {
Reflect.apply(triggerHapticFeedback, moduleValue, [defaultImport.TOGGLE_ON]);
}
}
if (onValueChange != null) {
onValueChange(!value);
}
}
function FormSwitchOnAccessibilityTap() { // fn#53574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6987:4523, owner: FormSwitch.onAccessibilityTap, offset: 0x0134fd1d, size: 128 bytes, params: 1, frame: 16
var environment;
var valueBinding;
var value3;
var moduleValue;
var triggerHapticFeedback;
var defaultImport;
if (env0_5) {
valueBinding = value;
value3 = environment.__proto__;
moduleValue = require(4081) /* metro dependency 4081: HapticUtilsNative */;
triggerHapticFeedback = moduleValue.triggerHapticFeedback;
defaultImport = importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */;
if (valueBinding) {
Reflect.apply(triggerHapticFeedback, moduleValue, [defaultImport.TOGGLE_OFF]);
} else {
Reflect.apply(triggerHapticFeedback, moduleValue, [defaultImport.TOGGLE_ON]);
}
}
env0_4(!value);
global.setTimeout(function() {
if (onValueChange != null) {
onValueChange(!value);
}
});
}
function useIconAnimationN() { // fn#53569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6987:3594, owner: FormSwitch.useIconAnimation.n, offset: 0x0134fa7d, size: 187 bytes, params: 1, frame: 22
const value = environment.__proto__;
const r5 = enabled ? 1 : env1_3 ? env0_0 : require;
const object3 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const r9 = env1_3 ? env0_0 : require;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object3.opacity = Reflect.apply(withSpring, springModule, [r9, SUBTLE_SPRING, 'animate-always']);
const object4 = {};
object4.scale = springModule.withSpring(r5, SUBTLE_SPRING);
object3.transform = [object4];
return object3;
}