117 lines
4.2 KiB
JavaScript
117 lines
4.2 KiB
JavaScript
// Metro module 5334 (f5335).
|
|
import _classCallCheck from "./_classCallCheck";
|
|
import _createClass from "./_createClass";
|
|
import _possibleConstructorReturn from "./_possibleConstructorReturn";
|
|
import _getPrototypeOf from "./_getPrototypeOf";
|
|
import _inherits from "./_inherits";
|
|
import { Gesture, BaseGesture } from "./Gesture";
|
|
let ComposedGesture;
|
|
let SimultaneousGesture;
|
|
let ExclusiveGesture;
|
|
let env3241 = {};
|
|
env3241[5] = function _isNativeReflectConstruct() {
|
|
let c14808_0;
|
|
try {
|
|
c14808_0 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
} catch ($e) {}
|
|
const _isNativeReflectConstruct2 = function _isNativeReflectConstruct() {
|
|
return !!c14808_0;
|
|
};
|
|
env3241[5] = _isNativeReflectConstruct2;
|
|
return _isNativeReflectConstruct2();
|
|
};
|
|
ComposedGesture = function ComposedGesture(...gestures) {
|
|
_classCallCheck(this, ComposedGesture);
|
|
const r10 = _getPrototypeOf(ComposedGesture);
|
|
const r25 = _possibleConstructorReturn(this, (0, env3241[5])() ? Reflect.construct(r10, [], _getPrototypeOf(this).constructor) : r10.apply(this, void 0));
|
|
r25.gestures = [];
|
|
r25.simultaneousGestures = [];
|
|
r25.requireGesturesToFail = [];
|
|
r25.gestures = gestures;
|
|
return r25;
|
|
};
|
|
_inherits(ComposedGesture, Gesture);
|
|
const r38 = _createClass(ComposedGesture, [{
|
|
key: "prepareSingleGesture",
|
|
value: function prepareSingleGesture(a0, a1, a2) {
|
|
if (a0 instanceof BaseGesture) {
|
|
const config = {
|
|
...a0.config
|
|
};
|
|
const simultaneousWith = config.simultaneousWith;
|
|
config.simultaneousWith = simultaneousWith === void 0 ? [...a1] : [...simultaneousWith, ...a1];
|
|
const requireToFail = config.requireToFail;
|
|
config.requireToFail = requireToFail === void 0 ? [...a2] : [...requireToFail, ...a2];
|
|
a0.config = config;
|
|
} else if (a0 instanceof ComposedGesture) {
|
|
a0.simultaneousGestures = a1;
|
|
a0.requireGesturesToFail = a2;
|
|
a0.prepare();
|
|
}
|
|
}
|
|
}, {
|
|
key: "prepare",
|
|
value: function prepare() {
|
|
for (const gesture of this.gestures) {
|
|
this.prepareSingleGesture(gesture, this.simultaneousGestures, this.requireGesturesToFail);
|
|
}
|
|
}
|
|
}, {
|
|
key: "initialize",
|
|
value: function initialize() {
|
|
for (const gesture of this.gestures) {
|
|
gesture.initialize();
|
|
}
|
|
}
|
|
}, {
|
|
key: "toGestureArray",
|
|
value: function toGestureArray() {
|
|
return this.gestures.flatMap((gesture) => gesture.toGestureArray());
|
|
}
|
|
}]);
|
|
SimultaneousGesture = function SimultaneousGesture() {
|
|
_classCallCheck(this, SimultaneousGesture);
|
|
const r8 = _getPrototypeOf(SimultaneousGesture);
|
|
return _possibleConstructorReturn(this, (0, env3241[5])() ? Reflect.construct(r8, arguments, _getPrototypeOf(this).constructor) : r8.apply(this, arguments));
|
|
};
|
|
_inherits(SimultaneousGesture, r38);
|
|
const r45 = _createClass(SimultaneousGesture, [{
|
|
key: "prepare",
|
|
value: function prepare() {
|
|
const r11 = this.gestures.map((c29496_0) => this.gestures.filter((gesture) => gesture !== c29496_0).flatMap((item) => item.toGestureArray()));
|
|
const length = this.gestures.length;
|
|
let r0 = 0;
|
|
if (0 < length) {
|
|
do {
|
|
this.prepareSingleGesture(this.gestures[r0], r11[r0], this.requireGesturesToFail);
|
|
r0 = r0 + 1;
|
|
} while (r0 < this.gestures.length);
|
|
}
|
|
}
|
|
}]);
|
|
ExclusiveGesture = function ExclusiveGesture() {
|
|
_classCallCheck(this, ExclusiveGesture);
|
|
const r8 = _getPrototypeOf(ExclusiveGesture);
|
|
return _possibleConstructorReturn(this, (0, env3241[5])() ? Reflect.construct(r8, arguments, _getPrototypeOf(this).constructor) : r8.apply(this, arguments));
|
|
};
|
|
_inherits(ExclusiveGesture, r38);
|
|
const r52 = _createClass(ExclusiveGesture, [{
|
|
key: "prepare",
|
|
value: function prepare() {
|
|
const r13 = this.gestures.map((gesture) => gesture.toGestureArray());
|
|
let r14 = [];
|
|
const length = this.gestures.length;
|
|
let r0 = 0;
|
|
if (0 < length) {
|
|
do {
|
|
this.prepareSingleGesture(this.gestures[r0], this.simultaneousGestures, this.requireGesturesToFail.concat(r14));
|
|
r14 = r14.concat(r13[r0]);
|
|
r0 = r0 + 1;
|
|
} while (r0 < this.gestures.length);
|
|
}
|
|
}
|
|
}]);
|
|
export { r38 as ComposedGesture };
|
|
export { r45 as SimultaneousGesture };
|
|
export { r52 as ExclusiveGesture };
|