2026-07-20 16:05:17 +00:00
// Module ID: 1596
2026-07-23 10:11:24 +00:00
// Function ID: 17783
// Dependencies: [57, 6, 7, 100, 1585, 1597, 1598, 1607, 1593, 1586]
2026-07-20 16:05:17 +00:00
// Module 1596
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray" ;
import WorkletsModule from "WorkletsModule" ;
import isWorkletFunction from "isWorkletFunction" ;
import isJest from "isJest" ;
import { mockedRequestAnimationFrame } from "mockedRequestAnimationFrame" ;
const require = arg1 ;
if ( ! isJest . isJest ( ) ) {
2026-07-20 16:05:17 +00:00
const _globalThis = globalThis ;
if ( requestAnimationFrame ) {
const _globalThis2 = globalThis ;
let mockedRequestAnimationFrame = requestAnimationFrame ;
}
let closure _6 = importDefaultResult ( "workletsModule" ) ;
2026-07-23 10:11:24 +00:00
let closure _7 = ( ( ) => {
2026-07-20 16:05:17 +00:00
class JSReanimated {
constructor ( ) {
2026-07-23 10:11:24 +00:00
self = this ;
tmp = outer1 _3 ( this , self ) ;
obj = { writable : true , value : JSReanimated ( outer1 _1 [ 6 ] ) . WorkletsModule } ;
definePropertyResult = Object . defineProperty ( this , outer1 _6 , obj ) ;
2026-07-20 16:05:17 +00:00
this . nextSensorId = 0 ;
map = new Map ( ) ;
this . sensors = map ;
this . platform = undefined ;
this . getSensorCallback = ( arg0 , arg1 , arg2 ) => {
2026-07-23 10:11:24 +00:00
let closure _0 = arg0 ;
let closure _1 = arg2 ;
if ( JSReanimated ( outer2 _1 [ 7 ] ) . SensorType . ACCELEROMETER !== arg1 ) {
if ( JSReanimated ( outer2 _1 [ 7 ] ) . SensorType . GRAVITY !== arg1 ) {
if ( JSReanimated ( outer2 _1 [ 7 ] ) . SensorType . GYROSCOPE !== arg1 ) {
if ( JSReanimated ( outer2 _1 [ 7 ] ) . SensorType . MAGNETIC _FIELD !== arg1 ) {
if ( JSReanimated ( outer2 _1 [ 7 ] ) . SensorType . ROTATION === arg1 ) {
return ( ) => {
2026-07-20 16:05:17 +00:00
let tmp6 ;
let tmp7 ;
2026-07-23 10:11:24 +00:00
const tmp = outer3 _2 ( closure _0 . quaternion , 4 ) ;
2026-07-20 16:05:17 +00:00
const first = tmp [ 0 ] ;
2026-07-23 10:11:24 +00:00
if ( closure _0 . platform === outer3 _8 . WEB _ANDROID ) {
2026-07-20 16:05:17 +00:00
const items = [ tmp5 , - tmp4 ] ;
[ tmp6 , tmp7 ] = items ;
}
const tmp8 = - Math . atan2 ( 2 * ( tmp [ 2 ] * tmp [ 3 ] + first * tmp [ 1 ] ) , first * first - tmp [ 1 ] * tmp [ 1 ] - tmp [ 2 ] * tmp [ 2 ] + tmp [ 3 ] * tmp [ 3 ] ) ;
const obj = { qw : first , qx : tmp [ 1 ] , qy : tmp [ 2 ] , qz : tmp [ 3 ] , yaw : tmp8 , pitch : Math . sin ( - 2 * ( tmp [ 1 ] * tmp [ 3 ] - first * tmp [ 2 ] ) ) , roll : - Math . atan2 ( 2 * ( tmp [ 1 ] * tmp [ 2 ] + first * tmp [ 3 ] ) , first * first + tmp [ 1 ] * tmp [ 1 ] - tmp [ 2 ] * tmp [ 2 ] - tmp [ 3 ] * tmp [ 3 ] ) , interfaceOrientation : 0 } ;
2026-07-23 10:11:24 +00:00
callback ( obj ) ;
2026-07-20 16:05:17 +00:00
} ;
}
}
}
2026-07-23 10:11:24 +00:00
return ( ) => {
callback ( { x : closure _0 . x , y : closure _0 . y , z : closure _0 . z , interfaceOrientation : 0 } ) ;
2026-07-20 16:05:17 +00:00
} ;
}
}
return ( ) => {
let x ;
let y ;
let z ;
2026-07-23 10:11:24 +00:00
( { x , y , z } = closure _0 ) ;
2026-07-20 16:05:17 +00:00
let first = x ;
let tmp2 = y ;
let tmp3 = z ;
2026-07-23 10:11:24 +00:00
if ( closure _0 . platform === outer3 _8 . WEB _ANDROID ) {
2026-07-20 16:05:17 +00:00
const items = [ - x , - y , - z ] ;
first = items [ 0 ] ;
tmp2 = items [ 1 ] ;
tmp3 = items [ 2 ] ;
}
const obj = { x : first , y : tmp2 , z : tmp3 , interfaceOrientation : 0 } ;
2026-07-23 10:11:24 +00:00
callback ( obj ) ;
2026-07-20 16:05:17 +00:00
} ;
} ;
return ;
}
}
let obj = {
key : "scheduleOnUI" ,
value : function scheduleOnUI ( arg0 ) {
2026-07-23 10:11:24 +00:00
outer1 _5 ( arg0 ) ;
2026-07-20 16:05:17 +00:00
}
} ;
2026-07-23 10:11:24 +00:00
let items = [ obj , , , , , , , , , , , , , , , , , , , , ] ;
2026-07-20 16:05:17 +00:00
obj = {
key : "createWorkletRuntime" ,
value : function createWorkletRuntime ( arg0 , arg1 ) {
2026-07-23 10:11:24 +00:00
const reanimatedError = new JSReanimated ( outer1 _1 [ 8 ] ) . ReanimatedError ( "createWorkletRuntime is not available in JSReanimated." ) ;
2026-07-20 16:05:17 +00:00
throw reanimatedError ;
}
} ;
items [ 1 ] = obj ;
obj = {
key : "scheduleOnRuntime" ,
value : function scheduleOnRuntime ( ) {
2026-07-23 10:11:24 +00:00
const reanimatedError = new JSReanimated ( outer1 _1 [ 8 ] ) . ReanimatedError ( "scheduleOnRuntime is not available in JSReanimated." ) ;
2026-07-20 16:05:17 +00:00
throw reanimatedError ;
}
} ;
items [ 2 ] = obj ;
items [ 3 ] = {
key : "registerEventHandler" ,
value : function registerEventHandler ( arg0 , arg1 , arg2 ) {
2026-07-23 10:11:24 +00:00
const reanimatedError = new JSReanimated ( outer1 _1 [ 8 ] ) . ReanimatedError ( "registerEventHandler is not available in JSReanimated." ) ;
2026-07-20 16:05:17 +00:00
throw reanimatedError ;
}
} ;
items [ 4 ] = {
key : "unregisterEventHandler" ,
value : function unregisterEventHandler ( arg0 ) {
2026-07-23 10:11:24 +00:00
const reanimatedError = new JSReanimated ( outer1 _1 [ 8 ] ) . ReanimatedError ( "unregisterEventHandler is not available in JSReanimated." ) ;
2026-07-20 16:05:17 +00:00
throw reanimatedError ;
}
} ;
items [ 5 ] = {
key : "enableLayoutAnimations" ,
value : function enableLayoutAnimations ( ) {
if ( obj . isWeb ( ) ) {
const logger3 = tmp ( tmp2 [ 9 ] ) . logger ;
logger3 . warn ( "Layout Animations are not supported on web yet." ) ;
} else {
if ( tmpResult . isJest ( ) ) {
const logger2 = tmp3 ( tmp4 [ 9 ] ) . logger ;
logger2 . warn ( "Layout Animations are no-ops when using Jest." ) ;
} else {
const tmp3Result = tmp3 ( tmp4 [ 4 ] ) ;
2026-07-23 10:11:24 +00:00
const logger = JSReanimated ( outer1 _1 [ 9 ] ) . logger ;
2026-07-20 16:05:17 +00:00
const warn = logger . warn ;
if ( isChromeDebuggerResult ) {
warn ( "Layout Animations are no-ops when using Chrome Debugger." ) ;
} else {
warn ( "Layout Animations are not supported on this configuration." ) ;
}
2026-07-23 10:11:24 +00:00
isChromeDebuggerResult = tmp3 ( tmp4 [ 4 ] ) . isChromeDebugger ( ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
tmpResult = tmp ( tmp2 [ 4 ] ) ;
2026-07-20 16:05:17 +00:00
}
}
} ;
items [ 6 ] = {
key : "configureLayoutAnimationBatch" ,
value : function configureLayoutAnimationBatch ( ) {
}
} ;
items [ 7 ] = {
key : "setShouldAnimateExitingForTag" ,
value : function setShouldAnimateExitingForTag ( ) {
}
} ;
items [ 8 ] = {
key : "registerSensor" ,
value : function registerSensor ( arg0 , arg1 , arg2 , arg3 ) {
const self = this ;
if ( obj . isWindowAvailable ( ) ) {
if ( undefined === self . platform ) {
self . detectPlatform ( ) ;
}
const _window = window ;
if ( self . getSensorName ( arg0 ) in window ) {
if ( undefined === self . platform ) {
self . detectPlatform ( ) ;
}
const initializeSensorResult = self . initializeSensor ( arg0 , arg1 ) ;
const listener = initializeSensorResult . addEventListener ( "reading" , self . getSensorCallback ( initializeSensorResult , arg0 , arg3 ) ) ;
initializeSensorResult . start ( ) ;
const sensors = self . sensors ;
const result = sensors . set ( self . nextSensorId , initializeSensorResult ) ;
self . nextSensorId = + self . nextSensorId + 1 ;
return + self . nextSensorId ;
} else {
2026-07-23 10:11:24 +00:00
const logger = JSReanimated ( outer1 _1 [ 9 ] ) . logger ;
2026-07-20 16:05:17 +00:00
let str = "" ;
let str2 = "" ;
if ( obj2 . isWeb ( ) ) {
const _location = location ;
str2 = str ;
if ( "https:" !== location . protocol ) {
str2 = " Make sure you use secure origin with `npx expo start --web --https`." ;
}
}
2026-07-23 10:11:24 +00:00
if ( self . platform === outer1 _8 . WEB _IOS ) {
2026-07-20 16:05:17 +00:00
str = " For iOS web, you will also have to also grant permission in the browser: https://dev.to/li/how-to-requestpermission-for-devicemotion-and-deviceorientation-events-in-ios-13-46g2." ;
}
logger . warn ( ` Sensor is not available. ${ str2 } ${ str } ` ) ;
return - 1 ;
}
} else {
return - 1 ;
}
2026-07-23 10:11:24 +00:00
obj = JSReanimated ( outer1 _1 [ 4 ] ) ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 9 ] = {
key : "unregisterSensor" ,
value : function unregisterSensor ( arg0 ) {
const sensors = this . sensors ;
const value = sensors . get ( arg0 ) ;
if ( undefined !== value ) {
value . stop ( ) ;
const sensors2 = this . sensors ;
sensors2 . delete ( arg0 ) ;
}
}
} ;
items [ 10 ] = {
key : "subscribeForKeyboardEvents" ,
value : function subscribeForKeyboardEvents ( arg0 ) {
if ( obj . isWeb ( ) ) {
const logger3 = tmp ( tmp2 [ 9 ] ) . logger ;
logger3 . warn ( "useAnimatedKeyboard is not available on web yet." ) ;
} else {
if ( tmpResult . isJest ( ) ) {
const logger2 = tmp3 ( tmp4 [ 9 ] ) . logger ;
logger2 . warn ( "useAnimatedKeyboard is not available when using Jest." ) ;
} else {
const tmp3Result = tmp3 ( tmp4 [ 4 ] ) ;
2026-07-23 10:11:24 +00:00
const logger = JSReanimated ( outer1 _1 [ 9 ] ) . logger ;
2026-07-20 16:05:17 +00:00
const warn = logger . warn ;
if ( isChromeDebuggerResult ) {
warn ( "useAnimatedKeyboard is not available when using Chrome Debugger." ) ;
} else {
warn ( "useAnimatedKeyboard is not available on this configuration." ) ;
}
2026-07-23 10:11:24 +00:00
isChromeDebuggerResult = tmp3 ( tmp4 [ 4 ] ) . isChromeDebugger ( ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
tmpResult = tmp ( tmp2 [ 4 ] ) ;
2026-07-20 16:05:17 +00:00
}
return - 1 ;
}
} ;
items [ 11 ] = {
key : "unsubscribeFromKeyboardEvents" ,
value : function unsubscribeFromKeyboardEvents ( arg0 ) {
}
} ;
items [ 12 ] = {
key : "initializeSensor" ,
value : function initializeSensor ( arg0 , arg1 ) {
if ( arg1 <= 0 ) {
let obj = { referenceFrame : "device" } ;
} else {
obj = { frequency : 1000 / arg1 } ;
}
2026-07-23 10:11:24 +00:00
if ( JSReanimated ( outer1 _1 [ 7 ] ) . SensorType . ACCELEROMETER === arg0 ) {
2026-07-20 16:05:17 +00:00
const _window5 = window ;
const prototype5 = Accelerometer . prototype ;
const accelerometer = new Accelerometer ( obj ) ;
return accelerometer ;
2026-07-23 10:11:24 +00:00
} else if ( JSReanimated ( outer1 _1 [ 7 ] ) . SensorType . GYROSCOPE === arg0 ) {
2026-07-20 16:05:17 +00:00
const _window4 = window ;
const prototype4 = Gyroscope . prototype ;
const gyroscope = new Gyroscope ( obj ) ;
return gyroscope ;
2026-07-23 10:11:24 +00:00
} else if ( JSReanimated ( outer1 _1 [ 7 ] ) . SensorType . GRAVITY === arg0 ) {
2026-07-20 16:05:17 +00:00
const _window3 = window ;
const prototype3 = GravitySensor . prototype ;
const gravitySensor = new GravitySensor ( obj ) ;
return gravitySensor ;
2026-07-23 10:11:24 +00:00
} else if ( JSReanimated ( outer1 _1 [ 7 ] ) . SensorType . MAGNETIC _FIELD === arg0 ) {
2026-07-20 16:05:17 +00:00
const _window2 = window ;
const prototype2 = Magnetometer . prototype ;
const magnetometer = new Magnetometer ( obj ) ;
return magnetometer ;
2026-07-23 10:11:24 +00:00
} else if ( JSReanimated ( outer1 _1 [ 7 ] ) . SensorType . ROTATION === arg0 ) {
2026-07-20 16:05:17 +00:00
const _window = window ;
const prototype = AbsoluteOrientationSensor . prototype ;
const absoluteOrientationSensor = new AbsoluteOrientationSensor ( obj ) ;
return absoluteOrientationSensor ;
}
}
} ;
items [ 13 ] = {
key : "getSensorName" ,
value : function getSensorName ( arg0 ) {
2026-07-23 10:11:24 +00:00
if ( JSReanimated ( outer1 _1 [ 7 ] ) . SensorType . ACCELEROMETER === arg0 ) {
2026-07-20 16:05:17 +00:00
return "Accelerometer" ;
2026-07-23 10:11:24 +00:00
} else if ( JSReanimated ( outer1 _1 [ 7 ] ) . SensorType . GRAVITY === arg0 ) {
2026-07-20 16:05:17 +00:00
return "GravitySensor" ;
2026-07-23 10:11:24 +00:00
} else if ( JSReanimated ( outer1 _1 [ 7 ] ) . SensorType . GYROSCOPE === arg0 ) {
2026-07-20 16:05:17 +00:00
return "Gyroscope" ;
2026-07-23 10:11:24 +00:00
} else if ( JSReanimated ( outer1 _1 [ 7 ] ) . SensorType . MAGNETIC _FIELD === arg0 ) {
2026-07-20 16:05:17 +00:00
return "Magnetometer" ;
2026-07-23 10:11:24 +00:00
} else if ( JSReanimated ( outer1 _1 [ 7 ] ) . SensorType . ROTATION === arg0 ) {
2026-07-20 16:05:17 +00:00
return "AbsoluteOrientationSensor" ;
}
}
} ;
items [ 14 ] = {
key : "getSettledUpdates" ,
value : function getSettledUpdates ( ) {
2026-07-23 10:11:24 +00:00
const reanimatedError = new JSReanimated ( outer1 _1 [ 8 ] ) . ReanimatedError ( "`getSettledUpdates` is not available in JSReanimated." ) ;
2026-07-20 16:05:17 +00:00
throw reanimatedError ;
}
} ;
items [ 15 ] = {
key : "detectPlatform" ,
value : function detectPlatform ( ) {
const self = this ;
let opera = navigator . userAgent ;
if ( ! opera ) {
const _navigator = navigator ;
opera = navigator . vendor ;
}
if ( ! opera ) {
const _window = window ;
opera = window . opera ;
}
if ( undefined === opera ) {
2026-07-23 10:11:24 +00:00
self . platform = outer1 _8 . UNKNOWN ;
2026-07-20 16:05:17 +00:00
} else {
if ( obj . test ( opera ) ) {
2026-07-23 10:11:24 +00:00
self . platform = outer1 _8 . WEB _IOS ;
2026-07-20 16:05:17 +00:00
} else {
if ( obj2 . test ( opera ) ) {
self . platform = tmp . WEB _ANDROID ;
} else {
self . platform = tmp . WEB ;
}
2026-07-23 10:11:24 +00:00
obj2 = /android/i ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
obj = /iPad|iPhone|iPod/ ;
2026-07-20 16:05:17 +00:00
}
}
} ;
items [ 16 ] = {
key : "getViewProp" ,
value : function getViewProp ( arg0 , arg1 , arg2 , arg3 ) {
2026-07-23 10:11:24 +00:00
const reanimatedError = new JSReanimated ( outer1 _1 [ 8 ] ) . ReanimatedError ( "getViewProp is not available in JSReanimated." ) ;
2026-07-20 16:05:17 +00:00
throw reanimatedError ;
}
} ;
items [ 17 ] = {
key : "configureProps" ,
value : function configureProps ( ) {
2026-07-23 10:11:24 +00:00
const reanimatedError = new JSReanimated ( outer1 _1 [ 8 ] ) . ReanimatedError ( "configureProps is not available in JSReanimated." ) ;
2026-07-20 16:05:17 +00:00
throw reanimatedError ;
}
} ;
items [ 18 ] = {
key : "executeOnUIRuntimeSync" ,
value : function executeOnUIRuntimeSync ( arg0 ) {
2026-07-23 10:11:24 +00:00
const reanimatedError = new JSReanimated ( outer1 _1 [ 8 ] ) . ReanimatedError ( "`executeOnUIRuntimeSync` is not available in JSReanimated." ) ;
2026-07-20 16:05:17 +00:00
throw reanimatedError ;
}
} ;
items [ 19 ] = {
key : "markNodeAsRemovable" ,
value : function markNodeAsRemovable ( arg0 ) {
2026-07-23 10:11:24 +00:00
const reanimatedError = new JSReanimated ( outer1 _1 [ 8 ] ) . ReanimatedError ( "markNodeAsRemovable is not available in JSReanimated." ) ;
2026-07-20 16:05:17 +00:00
throw reanimatedError ;
}
} ;
items [ 20 ] = {
key : "unmarkNodeAsRemovable" ,
value : function unmarkNodeAsRemovable ( arg0 ) {
2026-07-23 10:11:24 +00:00
const reanimatedError = new JSReanimated ( outer1 _1 [ 8 ] ) . ReanimatedError ( "unmarkNodeAsRemovable is not available in JSReanimated." ) ;
2026-07-20 16:05:17 +00:00
throw reanimatedError ;
}
} ;
return callback ( JSReanimated , items ) ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
isJest = { WEB _IOS : "web iOS" , WEB _ANDROID : "web Android" , WEB : "web" , UNKNOWN : "unknown" } ;
2026-07-20 16:05:17 +00:00
exports . createJSReanimatedModule = function createJSReanimatedModule ( ) {
return new closure _7 ( ) ;
} ;
2026-07-23 10:11:24 +00:00
exports . Platform = isJest ;
2026-07-20 16:05:17 +00:00
}