decord/source/__polyfill/00xxx/module_283.js
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

349 lines
13 KiB
JavaScript

// Module ID: 283
// Function ID: 284
// Dependencies: [284, 136, 71, 285, 134, 141]
// Exports: processResponderEvent, rethrowCaughtError
// Module 283
import _mod71 from "module_71" /* 71 */;
import COMPOSED_PATH_KEY from "COMPOSED_PATH_KEY" /* 134 */;
import _mod136 from "module_136" /* 136 */;
import _modDef141 from "module_141" /* 141 */;
import _modDef285 from "module_285" /* 285 */;
import recordTouchStart from "recordTouchStart" /* 284 */;
require = arg1;
function getHandler(arg0, arg1) {
const tmp = _mod136.getCurrentProps(arg0)[arg1];
return typeof tmp === "function" ? tmp : undefined;
}
function dispatchResponderEvent(c5, responderEnd, responderIgnoreScroll, self) {
const registrationName = tmp.registrationName;
if (null != registrationName) {
const tmp4 = getHandler(c5, registrationName);
if (null != tmp4) {
const tmp14 = new _modDef285(responderEnd, { bubbles: false, cancelable: true }, responderIgnoreScroll, tmp, recordTouchStart.touchHistory);
obj = COMPOSED_PATH_KEY;
let tmp16 = null;
if (null != self) {
tmp16 = self;
}
obj.setTarget(tmp14, tmp16);
COMPOSED_PATH_KEY.setCurrentTarget(tmp14, c5);
try {
const tmp4Result = tmp4(tmp14);
tmp15(134).setCurrentTarget(tmp14, null);
return tmp4Result;
} catch (tmp21) {
if (!c9) {
c9 = true;
c8 = tmp21;
}
}
const tmp15Result = COMPOSED_PATH_KEY;
}
}
}
let c5 = null;
let closure_6 = 0;
let items = ["topTouchStart"];
const items1 = ["topTouchMove"];
const items2 = ["topTouchCancel", "topTouchEnd"];
let obj = { startShouldSetResponder: { phasedRegistrationNames: { bubbled: "onStartShouldSetResponder", captured: "onStartShouldSetResponderCapture" }, dependencies: items }, scrollShouldSetResponder: { phasedRegistrationNames: { bubbled: "onScrollShouldSetResponder", captured: "onScrollShouldSetResponderCapture" }, dependencies: ["topScroll"] }, selectionChangeShouldSetResponder: { phasedRegistrationNames: { bubbled: "onSelectionChangeShouldSetResponder", captured: "onSelectionChangeShouldSetResponderCapture" }, dependencies: ["topSelectionChange"] }, moveShouldSetResponder: { phasedRegistrationNames: { bubbled: "onMoveShouldSetResponder", captured: "onMoveShouldSetResponderCapture" }, dependencies: items1 }, responderStart: { registrationName: "onResponderStart", dependencies: items }, responderMove: { registrationName: "onResponderMove", dependencies: items1 }, responderEnd: { registrationName: "onResponderEnd", dependencies: items2 }, responderRelease: { registrationName: "onResponderRelease", dependencies: items2 }, responderTerminationRequest: { registrationName: "onResponderTerminationRequest", dependencies: [] }, responderGrant: { registrationName: "onResponderGrant", dependencies: [] }, responderReject: { registrationName: "onResponderReject", dependencies: [] }, responderTerminate: { registrationName: "onResponderTerminate", dependencies: [] } };
let c8 = null;
let c9 = false;
export const rethrowCaughtError = function rethrowCaughtError() {
if (c9) {
c9 = false;
c8 = null;
throw c8;
}
};
export const processResponderEvent = function processResponderEvent(arg0, self, responderIgnoreScroll) {
let tmp41;
let tmp42;
let tmp49;
let tmp50;
if ("topTouchStart" === arg0) {
closure_6 = closure_6 + 1;
} else {
let tmp2 = "topTouchEnd" === arg0;
if (!tmp2) {
tmp2 = "topTouchCancel" === arg0;
}
if (tmp2) {
if (closure_6 >= 0) {
closure_6 = tmp3 - 1;
}
}
}
if ("topTouchStart" !== arg0) {
if ("topTouchMove" !== arg0) {
let tmp5 = "topTouchEnd" === arg0;
if (!tmp5) {
tmp5 = "topTouchCancel" === arg0;
}
}
let tmp11 = null;
if (self instanceof _modDef141) {
tmp11 = self;
}
let tmp12 = null != tmp11;
if (tmp12) {
let tmp13 = "topScroll" === arg0;
if (tmp13) {
tmp13 = true !== responderIgnoreScroll.responderIgnoreScroll;
}
if (!tmp13) {
let tmp15 = closure_6 > 0;
if (tmp15) {
tmp15 = "topSelectionChange" === arg0;
}
tmp13 = tmp15;
}
if (!tmp13) {
tmp13 = tmp;
}
if (!tmp13) {
tmp13 = "topTouchMove" === arg0;
}
tmp12 = tmp13;
}
if (tmp12) {
if (null != tmp11) {
let str13 = "startShouldSetResponder";
if (!tmp) {
let str9 = "moveShouldSetResponder";
if ("topTouchMove" !== arg0) {
let str11 = "scrollShouldSetResponder";
if ("topSelectionChange" === arg0) {
str11 = "selectionChangeShouldSetResponder";
}
str9 = str11;
}
str13 = str9;
}
let flag3 = false;
let tmp17 = tmp11;
if (null == _null) {
let parentElement3 = tmp17;
if (flag3) {
parentElement3 = tmp17.parentElement;
}
let tmp21 = null;
if (null != parentElement3) {
const items = [];
if (null != parentElement3) {
do {
let arr = items.unshift(parentElement3);
parentElement3 = parentElement3.parentElement;
} while (null != parentElement3);
}
const tmp34 = new _modDef285(str13, { bubbles: true, cancelable: true }, responderIgnoreScroll, obj[str13], recordTouchStart.touchHistory);
obj = COMPOSED_PATH_KEY;
obj.setTarget(tmp34, tmp11);
const phasedRegistrationNames = tmp25.phasedRegistrationNames;
tmp21 = null;
if (null != phasedRegistrationNames) {
let num7 = 0;
let tmp40 = tmp36;
if (0 < items.length) {
while (true) {
tmp41 = items[num7];
tmp42 = require;
let obj2 = _mod136;
let tmp44 = obj2.getCurrentProps(tmp41)[tmp39];
let tmp46;
if (typeof tmp44 === "function") {
tmp46 = tmp44;
}
if (null != tmp46) {
let tmp42Result = tmp42(134);
let setCurrentTargetResult = tmp42Result.setCurrentTarget(tmp34, tmp41);
if (true === tmp46(tmp34)) {
break;
}
}
num7 = num7 + 1;
tmp40 = tmp42;
}
tmp42(134).setCurrentTarget(tmp34, null);
tmp21 = tmp41;
const tmp42Result2 = tmp42(134);
}
let diff = items.length - 1;
if (0 <= diff) {
while (true) {
tmp49 = items[diff];
tmp50 = require;
let obj4 = _mod136;
let tmp52 = obj4.getCurrentProps(tmp49)[tmp38];
let tmp54;
if (typeof tmp52 === "function") {
tmp54 = tmp52;
}
if (null != tmp54) {
let tmp50Result = tmp50(134);
let setCurrentTargetResult2 = tmp50Result.setCurrentTarget(tmp34, tmp49);
if (true === tmp54(tmp34)) {
break;
}
}
diff = diff - 1;
tmp40 = tmp50;
}
tmp50(134).setCurrentTarget(tmp34, null);
tmp21 = tmp49;
const tmp50Result2 = tmp50(134);
}
tmp40(134).setCurrentTarget(tmp34, null);
tmp21 = null;
const tmp40Result = tmp40(134);
}
tmp36 = require;
}
} else {
let tmp19 = _null;
if (!_null.contains(tmp11)) {
tmp19 = tmp11;
if (!tmp11.contains(tmp18)) {
let parentElement = tmp18.parentElement;
tmp19 = null;
if (null != parentElement) {
tmp19 = parentElement;
while (!parentElement.contains(tmp11)) {
let parentElement2 = parentElement.parentElement;
parentElement = parentElement2;
tmp19 = null;
if (null == parentElement2) {
break;
}
}
}
}
}
tmp21 = null;
if (null != tmp19) {
flag3 = false;
tmp17 = tmp19;
if (tmp19 === _null) {
flag3 = true;
tmp17 = tmp19;
}
}
}
if (null != tmp21) {
if (tmp21 !== _null) {
const tmp119 = true === dispatchResponderEvent(tmp21, "responderGrant", responderIgnoreScroll, tmp11);
if (null != _null) {
if (false !== tmp115(_null, "responderTerminationRequest", responderIgnoreScroll, tmp11)) {
tmp115(tmp61, "responderTerminate", responderIgnoreScroll, tmp11);
_null = tmp21;
const fabricUIManager = _mod71.getFabricUIManager();
if (null != _null) {
const nativeElementReference = tmp74(136).getNativeElementReference(tmp73);
if (null != nativeElementReference) {
if (fabricUIManager != null) {
fabricUIManager.setIsJSResponder(nativeElementReference, false, tmp119);
}
}
const tmp74Result = tmp74(136);
}
if (null != tmp21) {
const nativeElementReference1 = tmp74(136).getNativeElementReference(tmp21);
if (null != nativeElementReference1) {
if (fabricUIManager != null) {
fabricUIManager.setIsJSResponder(nativeElementReference1, true, tmp119);
}
}
const tmp74Result2 = tmp74(136);
}
tmp73 = _null;
} else {
tmp115(tmp21, "responderReject", responderIgnoreScroll, tmp11);
}
} else {
_null = tmp21;
const fabricUIManager1 = _mod71.getFabricUIManager();
if (null != _null) {
const nativeElementReference2 = tmp122(136).getNativeElementReference(tmp121);
if (null != nativeElementReference2) {
if (fabricUIManager1 != null) {
fabricUIManager1.setIsJSResponder(nativeElementReference2, false, tmp119);
}
}
const tmp122Result = tmp122(136);
}
if (null != tmp21) {
const nativeElementReference3 = tmp122(136).getNativeElementReference(tmp21);
if (null != nativeElementReference3) {
if (fabricUIManager1 != null) {
fabricUIManager1.setIsJSResponder(nativeElementReference3, true, tmp119);
}
}
const tmp122Result2 = tmp122(136);
}
tmp121 = _null;
}
}
}
}
}
if (null != _null) {
if (tmp) {
dispatchResponderEvent(tmp126, "responderStart", responderIgnoreScroll, tmp11);
} else if ("topTouchMove" === arg0) {
dispatchResponderEvent(tmp126, "responderMove", responderIgnoreScroll, tmp11);
} else {
let tmp81 = "topTouchEnd" === arg0;
if (!tmp81) {
tmp81 = "topTouchCancel" === arg0;
}
if (tmp81) {
dispatchResponderEvent(tmp126, "responderEnd", responderIgnoreScroll, tmp11);
if ("topTouchCancel" === arg0) {
tmp82(tmp126, "responderTerminate", responderIgnoreScroll, tmp11);
_null = null;
const fabricUIManager2 = _mod71.getFabricUIManager();
if (null != _null) {
const nativeElementReference4 = tmp100(136).getNativeElementReference(tmp99);
if (null != nativeElementReference4) {
if (fabricUIManager2 != null) {
fabricUIManager2.setIsJSResponder(nativeElementReference4, false, false);
}
}
const tmp100Result = tmp100(136);
}
tmp100 = require;
tmp99 = _null;
} else {
const touches = responderIgnoreScroll.touches;
const _Array = Array;
const isArray = Array.isArray(touches);
let tmp87 = !isArray;
if (isArray) {
tmp87 = 0 === touches.length;
}
if (tmp87) {
tmp82(tmp126, "responderRelease", responderIgnoreScroll, tmp11);
_null = null;
const fabricUIManager3 = _mod71.getFabricUIManager();
if (null != _null) {
const nativeElementReference5 = tmp93(136).getNativeElementReference(tmp92);
if (null != nativeElementReference5) {
if (fabricUIManager3 != null) {
fabricUIManager3.setIsJSResponder(nativeElementReference5, false, false);
}
}
const tmp93Result = tmp93(136);
}
tmp92 = _null;
tmp93 = require;
}
}
}
}
}
}
recordTouchStart.recordTouchTrack(arg0, responderIgnoreScroll);
};