decord/source/6535__isNativeReflectConstruct.js

109 lines
3.3 KiB
JavaScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 6535
// Function ID: 6536
2026-07-31 08:44:05 +00:00
// Name: _isNativeReflectConstruct
2026-08-24 06:08:38 +00:00
// Dependencies: [41, 42, 93, 95, 96, 98, 6429]
2026-07-31 08:44:05 +00:00
2026-08-24 06:08:38 +00:00
// Module 6535 (_isNativeReflectConstruct)
import _inheritsDefault from "_inherits" /* 98 */;
import ForceTouchGesture from "_classCallCheck" /* 41 */;
import closure_1 from "_possibleConstructorReturn" /* 93 */;
import closure_2 from "_getPrototypeOf" /* 95 */;
import closure_3 from "_get" /* 96 */;
import importDefaultResult from "_createClass" /* 42 */;
2026-07-31 08:44:05 +00:00
function _isNativeReflectConstruct() {
try {
const _Boolean = Boolean;
const call = valueOf.call;
const _Reflect = Reflect;
const _Boolean2 = Boolean;
if (typeof call === "unknown") {
let callResult = valueOf();
} else {
callResult = call(constructResult);
}
2026-08-24 06:08:38 +00:00
closure_0 = !callResult;
_isNativeReflectConstruct = function _isNativeReflectConstruct() {
2026-07-31 08:44:05 +00:00
return closure_0;
2026-08-24 06:08:38 +00:00
};
2026-07-31 08:44:05 +00:00
return _isNativeReflectConstruct();
} catch (err) {
}
}
2026-08-13 07:00:46 +00:00
function changeEventCalculator(force, force2) {
if (undefined === force2) {
let obj = { forceChange: null };
obj[0] = force.force;
} else {
obj = { forceChange: null };
obj[0] = force.force - force2.force;
}
obj = {};
const merged = Object.assign(force);
const merged1 = Object.assign(obj);
return obj;
}
changeEventCalculator.__closure = {};
changeEventCalculator.__workletHash = 11365193947542;
changeEventCalculator.__initData = { code: "function changeEventCalculator_Pnpm_forceTouchGestureTs1(current,previous){let changePayload;if(previous===undefined){changePayload={forceChange:current.force};}else{changePayload={forceChange:current.force-previous.force};}return{...current,...changePayload};}" };
class ForceTouchGesture {
2026-07-31 08:44:05 +00:00
constructor() {
self = this;
2026-08-13 07:00:46 +00:00
tmp = ForceTouchGesture(this, ForceTouchGesture);
2026-08-24 06:08:38 +00:00
tmp2 = closure_2;
obj = closure_2(ForceTouchGesture);
tmp3 = closure_1;
2026-07-31 08:44:05 +00:00
if (_isNativeReflectConstruct()) {
tmp5 = globalThis;
_Reflect = Reflect;
constructResult = Reflect.construct(obj, [], tmp2(self).constructor);
} else {
constructResult = obj.apply(self, undefined);
}
tmp3Result = tmp3(self, constructResult);
tmp3Result.config = {};
2026-08-13 07:00:46 +00:00
tmp3Result.handlerName = "ForceTouchGestureHandler";
2026-07-31 08:44:05 +00:00
return tmp3Result;
}
}
2026-08-24 06:08:38 +00:00
_inheritsDefault(ForceTouchGesture, require("_isNativeReflectConstruct").ContinousBaseGesture);
2026-08-13 07:00:46 +00:00
let items = [
2026-07-31 08:44:05 +00:00
{
2026-08-13 07:00:46 +00:00
key: "minForce",
value: function minForce(minForce) {
this.config.minForce = minForce;
2026-07-31 08:44:05 +00:00
return this;
}
},
{
2026-08-13 07:00:46 +00:00
key: "maxForce",
value: function maxForce(maxForce) {
this.config.maxForce = maxForce;
2026-07-31 08:44:05 +00:00
return this;
}
2026-08-13 07:00:46 +00:00
},
{
key: "feedbackOnActivation",
value: function feedbackOnActivation(feedbackOnActivation) {
this.config.feedbackOnActivation = feedbackOnActivation;
return this;
}
},
{
key: "onChange",
value: function onChange(arg0) {
this.handlers.changeEventCalculator = changeEventCalculator;
const self = this;
let fn;
fn = callback2(callback(self.prototype), "onChange", this);
if (typeof fn === "function") {
fn = (items) => fn.apply(self, items);
}
const items = [arg0];
return fn(items);
}
2026-07-31 08:44:05 +00:00
}
];
2026-08-13 07:00:46 +00:00
export const ForceTouchGesture = importDefaultResult(ForceTouchGesture, items);