114 lines
5.7 KiB
React
114 lines
5.7 KiB
React
/* Metro module 9069; source: unknown; dependencies: [31, 27, 33, 9070, 9072] */
|
|
import * as ReactNativeModule from './module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as GetNativeModule from './module-09070-getNative.js'; /* Metro dependency 9070 */
|
|
import * as UseModalModule from './module-09072-useModal.js'; /* Metro dependency 9072 */
|
|
|
|
function _fun70865(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9254:6, offset: 0x01d0b744, size: 270 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const env0_2 = value.useCallback;
|
|
const env0_3 = value.useEffect;
|
|
const env0_4 = value.useRef;
|
|
value = importDefault(31) /* metro dependency 31 */;
|
|
const env0_7 = (GetNativeModule).getNativeComponent();
|
|
const env0_8 = (GetNativeModule).getNativeModule();
|
|
value = value.memo(_fun70866);
|
|
const getStyle_70871 = function(a0) {
|
|
return [{width: a0.mode !== 'time' ? 310 : 240, height: 180}, a0.style];
|
|
};
|
|
const getTimezoneOffsetInMinutes = function(a0) {
|
|
if (a0.timeZoneOffsetInMinutes != null) {
|
|
return a0.timeZoneOffsetInMinutes;
|
|
}
|
|
};
|
|
const toIsoWithTimeZoneOffset = function(a0) {
|
|
if (a0) {
|
|
return a0.toISOString();
|
|
}
|
|
};
|
|
const fromIsoWithTimeZoneOffset = function(a0) {
|
|
var Date = global.Date;
|
|
var value = Object.create(Date.prototype, {constructor: {value: Date}});
|
|
var value2 = new Date(a0);
|
|
return value2 instanceof Object ? value2 : value;
|
|
};
|
|
exports.default = value;
|
|
exports.DatePickerAndroid = value;
|
|
function _fun70866(a0) { // fn#70866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9254:271, offset: 0x01d0b852, size: 362 bytes, params: 2, frame: 22
|
|
const env0_0 = a0;
|
|
const Math = global.Math;
|
|
const current = useRef(Math.random().toString()).current;
|
|
const value4 = useCallback(_fun70867, [a0, current]);
|
|
const value5 = useCallback(_fun70868, [a0, current]);
|
|
useEffect(_fun70869, [value4, value5]);
|
|
const Object = global.Object;
|
|
const value6 = Object.assign({}, a0, {date: toIsoWithTimeZoneOffset(a0.date), id: current,
|
|
minimumDate: toIsoWithTimeZoneOffset(a0.minimumDate), maximumDate: toIsoWithTimeZoneOffset(a0.maximumDate),
|
|
timezoneOffsetInMinutes: getTimezoneOffsetInMinutes(a0), style: getStyle_70871(a0), onChange: value4,
|
|
onStateChange: value5});
|
|
(UseModalModule).useModal({props: value6, id: current});
|
|
return (
|
|
a0.modal
|
|
? null
|
|
: ((Component) => <Component {...global.Object.assign({}, value6)} />)(env0_7)
|
|
);
|
|
function _fun70867(a0) { // fn#70867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9254:330, offset: 0x01d0b9bc, size: 127 bytes, params: 2, frame: 13
|
|
let value = a0;
|
|
const {date, id, dateString} = value.nativeEvent ?? value;
|
|
if (id === null) {
|
|
value = environment.__proto__;
|
|
value = fromIsoWithTimeZoneOffset(date);
|
|
if (env0_0.onDateChange) {
|
|
env0_0.onDateChange(value);
|
|
}
|
|
if (env0_0.onDateStringChange) {
|
|
env0_0.onDateStringChange(dateString);
|
|
}
|
|
} else if (id === current) {
|
|
value = environment.__proto__;
|
|
value = fromIsoWithTimeZoneOffset(date);
|
|
if (env0_0.onDateChange) {
|
|
env0_0.onDateChange(value);
|
|
}
|
|
if (env0_0.onDateStringChange) {
|
|
env0_0.onDateStringChange(dateString);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun70868(a0) { // fn#70868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9254:538, offset: 0x01d0ba3b, size: 87 bytes, params: 2, frame: 12
|
|
const value = a0;
|
|
const {spinnerState, id} = value.nativeEvent ?? value;
|
|
if (!(id !== null && id !== current)) {
|
|
if (env0_0.onStateChange) {
|
|
env0_0.onStateChange(spinnerState);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun70869() { // fn#70869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9254:675, offset: 0x01d0ba92, size: 93 bytes, params: 1, frame: 15
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
const nativeEventEmitter = new NativeEventEmitter(env1_8);
|
|
nativeEventEmitter.addListener('dateChange', env0_2);
|
|
nativeEventEmitter.addListener('spinnerStateChange', env0_3);
|
|
return _fun70870;
|
|
function _fun70870() { // fn#70870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9254:776, offset: 0x01d0baef, size: 45 bytes, params: 1, frame: 11
|
|
const binding = env0_0;
|
|
binding.removeAllListeners('dateChange');
|
|
binding.removeAllListeners('spinnerStateChange');
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun70865, 9069, [31, 27, 33, 9070,
|
|
9072]) /* metro module 9069, dependencies: [31, 27, 33, 9070, 9072] */;
|