2026-08-11 06:20:06 +00:00
// Module ID: 1822
// Function ID: 1823
2026-07-29 08:29:29 +00:00
// Name: getVal
2026-08-11 06:20:06 +00:00
// Dependencies: [1664]
2026-07-29 08:29:29 +00:00
2026-08-11 06:20:06 +00:00
// Module 1822 (getVal)
2026-07-29 08:29:29 +00:00
const require = arg1 ;
const dependencyMap = arg6 ;
let obj = { IDENTITY : "identity" , CLAMP : "clamp" , EXTEND : "extend" } ;
function getVal ( arg0 , arg1 , arg2 , arg3 , arg4 , arg5 ) {
if ( obj . IDENTITY === arg0 ) {
return arg5 ;
} else if ( tmp . CLAMP === arg0 ) {
let tmp5 = arg4 ;
if ( arg1 * arg2 < arg1 * arg3 ) {
tmp5 = arg3 ;
}
return tmp5 ;
} else {
const EXTEND = tmp . EXTEND ;
return arg2 ;
}
}
getVal . _ _closure = { Extrapolation : obj } ;
getVal . _ _workletHash = 15103214376416 ;
getVal . _ _initData = { code : "function getVal_Pnpm_interpolationTs1(type,coef,val,leftEdgeOutput,rightEdgeOutput,x){const{Extrapolation}=this.__closure;switch(type){case Extrapolation.IDENTITY:return x;case Extrapolation.CLAMP:if(coef*val<coef*leftEdgeOutput){return leftEdgeOutput;}return rightEdgeOutput;case Extrapolation.EXTEND:default:return val;}}" } ;
function isExtrapolate ( arg0 ) {
return arg0 === obj . EXTEND || arg0 === obj . CLAMP || arg0 === obj . IDENTITY ;
}
isExtrapolate . _ _closure = { Extrapolation : obj } ;
isExtrapolate . _ _workletHash = 1560831703072 ;
isExtrapolate . _ _initData = { code : "function isExtrapolate_Pnpm_interpolationTs2(value){const{Extrapolation}=this.__closure;return value===Extrapolation.EXTEND||value===Extrapolation.CLAMP||value===Extrapolation.IDENTITY;}" } ;
2026-08-04 21:03:28 +00:00
function validateType ( str ) {
2026-07-29 08:29:29 +00:00
obj = { extrapolateLeft : obj . EXTEND , extrapolateRight : obj . EXTEND } ;
2026-08-04 21:03:28 +00:00
if ( str ) {
if ( typeof str === "string" ) {
if ( typeof isExtrapolate !== "function" ) {
2026-07-29 08:29:29 +00:00
HermesBuiltin . throwTypeError ( ) ;
}
if ( tmp15 ) {
2026-08-04 21:03:28 +00:00
obj . extrapolateLeft = str ;
obj . extrapolateRight = str ;
2026-07-29 08:29:29 +00:00
return obj ;
} else {
2026-08-11 06:20:06 +00:00
const reanimatedError = new require ( 1664 ) /* t */ . ReanimatedError ( "Unsupported value for \"interpolate\" \nSupported values: [\"extend\", \"clamp\", \"identity\", Extrapolatation.CLAMP, Extrapolatation.EXTEND, Extrapolatation.IDENTITY]\n Valid example:\n interpolate(value, [inputRange], [outputRange], \"clamp\")" ) ;
2026-07-29 08:29:29 +00:00
throw reanimatedError ;
}
2026-08-04 21:03:28 +00:00
tmp15 = str === tmp . EXTEND || str === tmp . CLAMP || str === tmp . IDENTITY ;
2026-07-29 08:29:29 +00:00
} else {
2026-08-04 21:03:28 +00:00
if ( ! str . extrapolateLeft ) {
if ( str . extrapolateRight ) {
const extrapolateRight = str . extrapolateRight ;
if ( typeof isExtrapolate !== "function" ) {
2026-07-29 08:29:29 +00:00
HermesBuiltin . throwTypeError ( ) ;
}
const tmp5 = extrapolateRight === tmp . EXTEND || extrapolateRight === tmp . CLAMP || extrapolateRight === tmp . IDENTITY ;
}
const _Object = Object ;
2026-08-04 21:03:28 +00:00
const merged = Object . assign ( obj , str ) ;
2026-07-29 08:29:29 +00:00
return obj ;
} else {
2026-08-04 21:03:28 +00:00
const extrapolateLeft = str . extrapolateLeft ;
if ( typeof isExtrapolate !== "function" ) {
2026-07-29 08:29:29 +00:00
HermesBuiltin . throwTypeError ( ) ;
}
const tmp3 = extrapolateLeft === tmp . EXTEND || extrapolateLeft === tmp . CLAMP || extrapolateLeft === tmp . IDENTITY ;
}
2026-08-11 06:20:06 +00:00
const reanimatedError1 = new require ( 1664 ) /* t */ . ReanimatedError ( "Unsupported value for \"interpolate\" \nSupported values: [\"extend\", \"clamp\", \"identity\", Extrapolatation.CLAMP, Extrapolatation.EXTEND, Extrapolatation.IDENTITY]\n Valid example:\n interpolate(value, [inputRange], [outputRange], {\n extrapolateLeft: Extrapolation.CLAMP,\n extrapolateRight: Extrapolation.IDENTITY\n }})" ) ;
2026-07-29 08:29:29 +00:00
throw reanimatedError1 ;
}
} else {
return obj ;
}
}
validateType . _ _closure = { Extrapolation : obj , isExtrapolate } ;
validateType . _ _workletHash = 9722315466599 ;
validateType . _ _initData = { code : "function validateType_Pnpm_interpolationTs3(type){const{Extrapolation,isExtrapolate}=this.__closure;const extrapolationConfig={extrapolateLeft:Extrapolation.EXTEND,extrapolateRight:Extrapolation.EXTEND};if(!type){return extrapolationConfig;}if(typeof type==='string'){if(!isExtrapolate(type)){throw new ReanimatedError(\"Unsupported value for \\\"interpolate\\\" \\nSupported values: [\\\"extend\\\", \\\"clamp\\\", \\\"identity\\\", Extrapolatation.CLAMP, Extrapolatation.EXTEND, Extrapolatation.IDENTITY]\\n Valid example:\\n interpolate(value, [inputRange], [outputRange], \\\"clamp\\\")\");}extrapolationConfig.extrapolateLeft=type;extrapolationConfig.extrapolateRight=type;return extrapolationConfig;}if(type.extrapolateLeft&&!isExtrapolate(type.extrapolateLeft)||type.extrapolateRight&&!isExtrapolate(type.extrapolateRight)){throw new ReanimatedError(\"Unsupported value for \\\"interpolate\\\" \\nSupported values: [\\\"extend\\\", \\\"clamp\\\", \\\"identity\\\", Extrapolatation.CLAMP, Extrapolatation.EXTEND, Extrapolatation.IDENTITY]\\n Valid example:\\n interpolate(value, [inputRange], [outputRange], {\\n extrapolateLeft: Extrapolation.CLAMP,\\n extrapolateRight: Extrapolation.IDENTITY\\n }})\");}Object.assign(extrapolationConfig,type);return extrapolationConfig;}" } ;
function internalInterpolate ( arg0 , arg1 , extrapolateLeft ) {
let leftEdgeInput ;
let leftEdgeOutput ;
let rightEdgeInput ;
let rightEdgeOutput ;
( { leftEdgeInput , rightEdgeInput , leftEdgeOutput , rightEdgeOutput } = arg1 ) ;
if ( rightEdgeInput - leftEdgeInput == 0 ) {
return leftEdgeOutput ;
} else {
let tmp10 = arg0 ;
const sum = leftEdgeOutput + ( arg0 - leftEdgeInput ) / ( rightEdgeInput - leftEdgeInput ) * ( rightEdgeOutput - leftEdgeOutput ) ;
let num = - 1 ;
if ( rightEdgeOutput >= leftEdgeOutput ) {
num = 1 ;
}
if ( num * sum < num * leftEdgeOutput ) {
extrapolateLeft = extrapolateLeft . extrapolateLeft ;
2026-08-04 21:03:28 +00:00
if ( typeof getVal !== "function" ) {
2026-07-29 08:29:29 +00:00
HermesBuiltin . throwTypeError ( ) ;
}
if ( obj . IDENTITY !== extrapolateLeft ) {
if ( tmp9 . CLAMP !== extrapolateLeft ) {
const EXTEND2 = tmp9 . EXTEND ;
tmp10 = sum ;
}
}
const result = num * sum ;
num = num * leftEdgeOutput ;
if ( result < num ) {
rightEdgeOutput = leftEdgeOutput ;
}
tmp10 = rightEdgeOutput ;
} else if ( num * rightEdgeOutput >= num * sum ) {
return sum ;
} else {
const extrapolateRight = extrapolateLeft . extrapolateRight ;
2026-08-04 21:03:28 +00:00
if ( typeof getVal !== "function" ) {
2026-07-29 08:29:29 +00:00
HermesBuiltin . throwTypeError ( ) ;
}
let tmp5 = tmp10 ;
if ( obj . IDENTITY !== extrapolateRight ) {
if ( tmp4 . CLAMP !== extrapolateRight ) {
const EXTEND = tmp4 . EXTEND ;
tmp5 = sum ;
}
}
let tmp6 = rightEdgeOutput ;
if ( num * sum < num * leftEdgeOutput ) {
tmp6 = leftEdgeOutput ;
}
tmp5 = tmp6 ;
}
}
}
internalInterpolate . _ _closure = { getVal } ;
internalInterpolate . _ _workletHash = 16257995045856 ;
internalInterpolate . _ _initData = { code : "function internalInterpolate_Pnpm_interpolationTs4(x,narrowedInput,extrapolationConfig){const{getVal}=this.__closure;const{leftEdgeInput:leftEdgeInput,rightEdgeInput:rightEdgeInput,leftEdgeOutput:leftEdgeOutput,rightEdgeOutput:rightEdgeOutput}=narrowedInput;if(rightEdgeInput-leftEdgeInput===0){return leftEdgeOutput;}const progress=(x-leftEdgeInput)/(rightEdgeInput-leftEdgeInput);const val=leftEdgeOutput+progress*(rightEdgeOutput-leftEdgeOutput);const coef=rightEdgeOutput>=leftEdgeOutput?1:-1;if(coef*val<coef*leftEdgeOutput){return getVal(extrapolationConfig.extrapolateLeft,coef,val,leftEdgeOutput,rightEdgeOutput,x);}else if(coef*val>coef*rightEdgeOutput){return getVal(extrapolationConfig.extrapolateRight,coef,val,leftEdgeOutput,rightEdgeOutput,x);}return val;}" } ;
2026-08-04 21:03:28 +00:00
function interpolate ( arg0 , arg1 , arg2 , arg3 ) {
2026-07-29 08:29:29 +00:00
if ( arg1 . length >= 2 ) {
if ( arg2 . length >= 2 ) {
const obj = { leftEdgeInput : null , rightEdgeInput : null , leftEdgeOutput : null , rightEdgeOutput : null } ;
[ obj [ 0 ] , obj [ 1 ] ] = arg1 ;
[ obj [ 2 ] , obj [ 3 ] ] = arg2 ;
if ( arg1 . length > 2 ) {
if ( arg0 > arg1 [ length - 1 ] ) {
obj . leftEdgeInput = arg1 [ length - 2 ] ;
obj . rightEdgeInput = arg1 [ length - 1 ] ;
obj . leftEdgeOutput = arg2 [ length - 2 ] ;
obj . rightEdgeOutput = arg2 [ length - 1 ] ;
} else {
let num = 1 ;
if ( 1 < length ) {
while ( arg0 > arg1 [ num ] ) {
num = num + 1 ;
}
const diff = num - 1 ;
obj . leftEdgeInput = arg1 [ diff ] ;
obj . rightEdgeInput = arg1 [ num ] ;
obj . leftEdgeOutput = arg2 [ diff ] ;
obj . rightEdgeOutput = arg2 [ num ] ;
}
}
}
2026-08-04 21:03:28 +00:00
return internalInterpolate ( arg0 , obj , validateType ( arg3 ) ) ;
2026-07-29 08:29:29 +00:00
}
}
2026-08-11 06:20:06 +00:00
const reanimatedError = new require ( 1664 ) /* t */ . ReanimatedError ( "Interpolation input and output ranges should contain at least two values." ) ;
2026-07-29 08:29:29 +00:00
throw reanimatedError ;
}
interpolate . _ _closure = { validateType , internalInterpolate } ;
interpolate . _ _workletHash = 16263308339935 ;
interpolate . _ _initData = { code : "function interpolate_Pnpm_interpolationTs5(x,inputRange,outputRange,type){const{validateType,internalInterpolate}=this.__closure;if(inputRange.length<2||outputRange.length<2){throw new ReanimatedError('Interpolation input and output ranges should contain at least two values.');}const extrapolationConfig=validateType(type);const length=inputRange.length;const narrowedInput={leftEdgeInput:inputRange[0],rightEdgeInput:inputRange[1],leftEdgeOutput:outputRange[0],rightEdgeOutput:outputRange[1]};if(length>2){if(x>inputRange[length-1]){narrowedInput.leftEdgeInput=inputRange[length-2];narrowedInput.rightEdgeInput=inputRange[length-1];narrowedInput.leftEdgeOutput=outputRange[length-2];narrowedInput.rightEdgeOutput=outputRange[length-1];}else{for(let i=1;i<length;++i){if(x<=inputRange[i]){narrowedInput.leftEdgeInput=inputRange[i-1];narrowedInput.rightEdgeInput=inputRange[i];narrowedInput.leftEdgeOutput=outputRange[i-1];narrowedInput.rightEdgeOutput=outputRange[i];break;}}}}return internalInterpolate(x,narrowedInput,extrapolationConfig);}" } ;
function clamp ( arg0 , arg1 , arg2 ) {
return Math . min ( Math . max ( arg0 , arg1 ) , arg2 ) ;
}
clamp . _ _closure = { } ;
clamp . _ _workletHash = 13846341562950 ;
clamp . _ _initData = { code : "function clamp_Pnpm_interpolationTs6(value,min,max){return Math.min(Math.max(value,min),max);}" } ;
arg5 . Extrapolation = obj ;
arg5 . interpolate = interpolate ;
arg5 . clamp = clamp ;