Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,179 @@
|
||||
/* Metro module 11743; source: modules/polls/native/useFocusHelper.tsx; dependencies: [7, 6, 31, 44, 6518, 2] */
|
||||
function _fun90009(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:6, offset: 0x020269b2, size: 184 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = value(FocusHelperState);
|
||||
const env0_6 = _fun90011();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/native/useFocusHelper.tsx');
|
||||
exports.default = useFocusHelper;
|
||||
}
|
||||
|
||||
function FocusHelperState() { // fn#90010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:131, offset: 0x02026a6a, size: 42 bytes, params: 1, frame: 13
|
||||
env0_3(this, FocusHelperState);
|
||||
this.refsByKey = {};
|
||||
this.keyOrder = [];
|
||||
}
|
||||
|
||||
function _fun90011() { // fn#90011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:224, offset: 0x02026a94, size: 113 bytes, params: 1, frame: 15
|
||||
return env0_2(FocusHelperImpl, [{key: 'restartState', value: value_90015}, {key: 'commitState', value: function() {
|
||||
var pendingState = this.pendingState;
|
||||
if (pendingState != null) {
|
||||
this.validState = pendingState;
|
||||
}
|
||||
this.pendingState = undefined;
|
||||
}}, {key: 'refWithKey', value: value_90017}]);
|
||||
}
|
||||
|
||||
function useFocusHelper() { // fn#90018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:1263, offset: 0x02026d52, size: 101 bytes, params: 1, frame: 14
|
||||
const value = a0;
|
||||
const env0_0 = (value !== undefined ? value : {}).onAddAnswer;
|
||||
const value2 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun90019);
|
||||
value2.restartState();
|
||||
env0_4.useEffect(_fun90020);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function FocusHelperImpl() { // fn#90012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:245, offset: 0x02026b05, size: 89 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
env1_3(this, FocusHelperImpl);
|
||||
this.validState = new env1_5();
|
||||
this.focusNext = focusNext;
|
||||
this.focus = focus_90014;
|
||||
}
|
||||
|
||||
function value_90015() { // fn#90015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:795, offset: 0x02026c9a, size: 40 bytes, params: 1, frame: 9
|
||||
const value = environment.__proto__;
|
||||
this.pendingState = new env1_5();
|
||||
}
|
||||
|
||||
function value_90017(a0) { // fn#90017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:972, offset: 0x02026ce1, size: 113 bytes, params: 2, frame: 17
|
||||
const pendingState = this.pendingState;
|
||||
let value = environment.__proto__;
|
||||
(importDefault(44) /* metro dependency 44 */)(pendingState != null, 'Called refWithKey without a valid state');
|
||||
pendingState.keyOrder.push(a0);
|
||||
const property = pendingState.refsByKey[a0];
|
||||
if (property != null) {
|
||||
return property;
|
||||
}
|
||||
value = env1_4.createRef();
|
||||
pendingState.refsByKey[a0] = value;
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun90019() { // fn#90019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:1322, offset: 0x02026db7, size: 29 bytes, params: 1, frame: 9
|
||||
let value = environment.__proto__;
|
||||
const binding = env1_6;
|
||||
value = Object.create(binding.prototype, {constructor: {value: binding}});
|
||||
const binding2 = new binding();
|
||||
return binding2 instanceof Object ? binding2 : value;
|
||||
}
|
||||
|
||||
function _fun90020() { // fn#90020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:1371, offset: 0x02026dd4, size: 37 bytes, params: 1, frame: 10
|
||||
env0_1.onAddAnswer = onAddAnswer;
|
||||
env0_1.commitState();
|
||||
}
|
||||
|
||||
function focusNext() { // fn#90013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:333, owner: FocusHelperImpl.focusNext, offset: 0x02026b5e, size: 249 bytes, params: 1, frame: 25
|
||||
var r11;
|
||||
var r5;
|
||||
var r6;
|
||||
var r3;
|
||||
var r4;
|
||||
var propertyName;
|
||||
var propertyName2;
|
||||
var property;
|
||||
var current;
|
||||
var isFocused2;
|
||||
var value3;
|
||||
var onAddAnswer;
|
||||
var value;
|
||||
const {refsByKey, keyOrder} = env0_0.validState;
|
||||
const value2 = undefined;
|
||||
const properties = Object.keys(refsByKey);
|
||||
const properties2 = 0;
|
||||
const properties3 = properties.length;
|
||||
if (properties === value2) {
|
||||
r6 = value2;
|
||||
} else {
|
||||
r11 = properties2;
|
||||
while (true) {
|
||||
propertyName = properties[r11];
|
||||
propertyName2 = r11 + 1;
|
||||
if (propertyName === value2) {
|
||||
r6 = value2;
|
||||
break;
|
||||
}
|
||||
property = refsByKey[propertyName];
|
||||
if (property == null) {
|
||||
r5 = value2;
|
||||
continue;
|
||||
}
|
||||
current = property.current;
|
||||
if (current == null) {
|
||||
r5 = value2;
|
||||
continue;
|
||||
}
|
||||
isFocused2 = current.isFocused();
|
||||
r5 = isFocused2;
|
||||
if (r5 !== true) {
|
||||
r11 = propertyName2;
|
||||
continue;
|
||||
}
|
||||
r6 = propertyName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (r6 != null) {
|
||||
value3 = keyOrder.indexOf(r6);
|
||||
if (value3 === -1) {
|
||||
onAddAnswer = env0_0.onAddAnswer;
|
||||
if (onAddAnswer != null) {
|
||||
onAddAnswer.call(env0_0);
|
||||
}
|
||||
} else if (value3 >= keyOrder.length - 1) {
|
||||
onAddAnswer = env0_0.onAddAnswer;
|
||||
if (onAddAnswer != null) {
|
||||
onAddAnswer.call(env0_0);
|
||||
}
|
||||
} else {
|
||||
property = refsByKey[env0_0.validState.keyOrder[value3 + 1]];
|
||||
value = property == null;
|
||||
if (value) {
|
||||
r3 = value;
|
||||
r4 = property;
|
||||
} else {
|
||||
current = property.current;
|
||||
r3 = current == null;
|
||||
r4 = current;
|
||||
}
|
||||
if (!r3) {
|
||||
r4.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function FocusHelperImplFocus(a0) { // fn#90014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:684, owner: FocusHelperImpl.focus, offset: 0x02026c57, size: 67 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
var r1;
|
||||
var current;
|
||||
const property = env0_0.validState.refsByKey[a0];
|
||||
const value = property == null;
|
||||
if (value) {
|
||||
r0 = value;
|
||||
r1 = property;
|
||||
} else {
|
||||
current = property.current;
|
||||
r0 = current == null;
|
||||
r1 = current;
|
||||
}
|
||||
if (!r0) {
|
||||
r1.focus();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user