2026-07-29 08:29:29 +00:00
// Module ID: 1152
// Function ID: 1153
// Name: setSpanDurationAsMeasurementOnTransactionEvent
// Dependencies: [817, 1001, 1153, 1122, 1155, 1156, 1157, 1158, 1159, 1160]
// Module 1152 (setSpanDurationAsMeasurementOnTransactionEvent)
const require = arg1 ;
const dependencyMap = arg6 ;
function setSpanDurationAsMeasurementOnTransactionEvent ( measurements , arg1 , timestamp ) {
if ( timestamp . timestamp ) {
if ( timestamp . start _timestamp ) {
measurements . measurements = measurements . measurements || { } ;
const obj = { value : null , unit : "millisecond" } ;
obj [ 0 ] = 1000 * ( timestamp . timestamp - timestamp . start _timestamp ) ;
measurements . measurements [ arg1 ] = obj ;
const tmp3 = measurements . measurements || { } ;
}
}
const debug = require ( 817 ) /* registerSpanErrorInstrumentation */ . debug ;
debug . warn ( "Span is missing start or end timestamp. Cam not set measurement on transaction event." ) ;
}
let fn = this ;
if ( this ) {
fn = this . _ _awaiter ;
}
if ( ! fn ) {
fn = ( arg0 , arg1 , arg2 , arg3 ) => {
let closure _0 = arg0 ;
let closure _1 = arg1 ;
let _Promise = arg2 ;
let closure _3 = arg3 ;
if ( ! arg2 ) {
_Promise = Promise ;
}
_Promise = new _Promise ( ( arg0 , arg1 ) => {
let closure _0 = arg0 ;
let closure _1 = arg1 ;
function fulfilled ( arg0 ) {
try {
step ( iter . next ( arg0 ) ) ;
} catch ( tmp5 ) {
callback2 ( tmp5 ) ;
}
}
function rejected ( arg0 ) {
try {
step ( iter . throw ( arg0 ) ) ;
} catch ( tmp5 ) {
callback2 ( tmp5 ) ;
}
}
let iter = rejected ;
function step ( done ) {
if ( done . done ) {
callback ( done . value ) ;
} else {
let tmp = done . value ;
callback = tmp ;
if ( ! ( tmp instanceof fulfilled ) ) {
tmp = new tmp ( ( arg0 ) => {
arg0 ( closure _0 ) ;
} ) ;
}
tmp . then ( fulfilled , iter ) ;
}
}
let items = closure _1 ;
if ( ! closure _1 ) {
items = [ ] ;
}
iter = iter . apply ( closure _0 , items ) ;
const iter2 = iter . next ( ) ;
const value = iter2 . value ;
if ( iter2 . done ) {
arg0 ( value ) ;
} else {
closure _0 = value ;
let tmp3 = value ;
if ( ! ( value instanceof fulfilled ) ) {
tmp3 = new tmp3 ( ( arg0 ) => {
arg0 ( closure _0 ) ;
} ) ;
}
tmp3 . then ( fulfilled , rejected ) ;
}
} ) ;
return _Promise ;
} ;
}
const AppStart = "AppStart" ;
let c4 ;
let c5 = false ;
let c6 ;
let c7 = false ;
function _setAppStartEndData ( arg0 ) {
if ( closure _4 ) {
const debug = require ( 817 ) /* registerSpanErrorInstrumentation */ . debug ;
debug . warn ( "Overwriting already set app start end data." ) ;
}
closure _4 = arg0 ;
}
arg5 . captureAppStart = function captureAppStart ( ) {
let c0 = true ;
return fn ( undefined , undefined , undefined , function * ( ) {
if ( c5 === 2 ) {
c5 = 3 ;
HermesBuiltin . throwTypeError ( ) ;
} else if ( tmp6 === 3 ) {
if ( arg0 === 1 ) {
throw arg1 ;
} else if ( arg0 === 2 ) {
let obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
} else {
2026-08-15 05:55:55 +00:00
return { value : "HermesInternal" , done : "HermesInternal" } ;
2026-07-29 08:29:29 +00:00
}
} else {
try {
c5 = 2 ;
if ( 0 === c4 ) {
if ( arg0 === 1 ) {
c5 = 3 ;
throw arg1 ;
} else if ( arg0 === 2 ) {
c5 = 3 ;
obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
} else {
let closure _1 = tmp3 ;
let client = tmp7 ;
client = undefined ;
closure _1 = undefined ;
let closure _2 ;
client = outer1 _0 ( outer1 _1 [ 0 ] ) . getClient ( ) ;
if ( client ) {
c5 = outer1 _0 ;
let obj2 = outer1 _0 ( outer1 _1 [ 0 ] ) ;
closure _1 = 1000 * obj2 . timestampInSeconds ( ) ;
closure _2 = null ;
if ( outer1 _0 ( outer1 _1 [ 1 ] ) . NATIVE . enableNative ) {
let c3 = 1 ;
const NATIVE = outer1 _0 ( outer1 _1 [ 1 ] ) . NATIVE ;
c4 = 2 ;
c5 = 1 ;
const obj1 = { value : null , done : false } ;
obj1 [ 0 ] = NATIVE . fetchNativeFrames ( ) ;
return obj1 ;
}
} else {
const debug3 = outer1 _0 ( outer1 _1 [ 0 ] ) . debug ;
debug3 . warn ( "[AppStart] Could not capture App Start, missing client." ) ;
c5 = 3 ;
2026-08-15 05:55:55 +00:00
return { value : "HermesInternal" , done : "HermesInternal" } ;
2026-07-29 08:29:29 +00:00
}
const obj9 = outer1 _0 ( outer1 _1 [ 0 ] ) ;
}
} else if ( 1 === tmp7 ) {
c3 = 0 ;
c3 = closure _2 ;
const debug2 = outer1 _0 ( outer1 _1 [ 0 ] ) . debug ;
debug2 . log ( "[AppStart] Failed to capture end frames for app start." , c3 ) ;
} else if ( 2 === tmp7 ) {
if ( arg0 === 1 ) {
c5 = 3 ;
throw arg1 ;
} else if ( arg0 === 2 ) {
c3 = 0 ;
c5 = 3 ;
obj2 = { value : null , done : true } ;
obj2 [ 0 ] = arg1 ;
return obj2 ;
} else {
closure _2 = arg1 ;
const debug = outer1 _0 ( outer1 _1 [ 0 ] ) . debug ;
debug . log ( "[AppStart] Captured end frames for app start." , closure _2 ) ;
c3 = 0 ;
}
} else if ( arg0 === 1 ) {
c5 = 3 ;
throw arg1 ;
} else if ( arg0 === 2 ) {
c5 = 3 ;
obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
}
const obj3 = { timestampMs : null , endFrames : null } ;
obj3 [ 0 ] = closure _1 ;
obj3 [ 1 ] = closure _2 ;
outer1 _8 ( obj3 ) ;
const integrationByName = client . getIntegrationByName ( c3 ) ;
outer1 _1 = integrationByName ;
let result ;
if ( null !== integrationByName ) {
if ( undefined !== outer1 _1 ) {
result = outer1 _1 . captureStandaloneAppStart ( ) ;
}
}
c4 = 3 ;
c5 = 1 ;
const obj4 = { value : null , done : false } ;
obj4 [ 0 ] = result ;
return obj4 ;
} catch ( tmp45 ) {
closure _2 = tmp45 ;
if ( tmp4 === c3 ) {
c5 = tmp2 ;
throw tmp45 ;
} else {
c4 = tmp ;
}
}
}
} ) ;
} ;
arg5 . _captureAppStart = function _captureAppStart ( isManual ) {
isManual = isManual . isManual ;
let c1 ;
return fn ( this , undefined , undefined , function * ( ) {
if ( c5 === 2 ) {
c5 = 3 ;
HermesBuiltin . throwTypeError ( ) ;
} else if ( tmp6 === 3 ) {
if ( arg0 === 1 ) {
throw arg1 ;
} else if ( arg0 === 2 ) {
let obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
} else {
2026-08-15 05:55:55 +00:00
return { value : "HermesInternal" , done : "HermesInternal" } ;
2026-07-29 08:29:29 +00:00
}
} else {
try {
c5 = 2 ;
if ( 0 === c4 ) {
if ( arg0 === 1 ) {
c5 = 3 ;
throw arg1 ;
} else if ( arg0 === 2 ) {
c5 = 3 ;
obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
} else {
let closure _1 = tmp3 ;
let client = tmp7 ;
client = undefined ;
closure _1 = undefined ;
let closure _2 ;
client = outer1 _0 ( outer1 _1 [ 0 ] ) . getClient ( ) ;
if ( client ) {
c5 = outer1 _0 ;
let obj2 = outer1 _0 ( outer1 _1 [ 0 ] ) ;
closure _1 = 1000 * obj2 . timestampInSeconds ( ) ;
closure _2 = null ;
if ( outer1 _0 ( outer1 _1 [ 1 ] ) . NATIVE . enableNative ) {
let c3 = 1 ;
const NATIVE = outer1 _0 ( outer1 _1 [ 1 ] ) . NATIVE ;
c4 = 2 ;
c5 = 1 ;
const obj1 = { value : null , done : false } ;
obj1 [ 0 ] = NATIVE . fetchNativeFrames ( ) ;
return obj1 ;
}
} else {
const debug3 = outer1 _0 ( outer1 _1 [ 0 ] ) . debug ;
debug3 . warn ( "[AppStart] Could not capture App Start, missing client." ) ;
c5 = 3 ;
2026-08-15 05:55:55 +00:00
return { value : "HermesInternal" , done : "HermesInternal" } ;
2026-07-29 08:29:29 +00:00
}
const obj9 = outer1 _0 ( outer1 _1 [ 0 ] ) ;
}
} else if ( 1 === tmp7 ) {
c3 = 0 ;
c3 = closure _2 ;
const debug2 = outer1 _0 ( outer1 _1 [ 0 ] ) . debug ;
debug2 . log ( "[AppStart] Failed to capture end frames for app start." , c3 ) ;
} else if ( 2 === tmp7 ) {
if ( arg0 === 1 ) {
c5 = 3 ;
throw arg1 ;
} else if ( arg0 === 2 ) {
c3 = 0 ;
c5 = 3 ;
obj2 = { value : null , done : true } ;
obj2 [ 0 ] = arg1 ;
return obj2 ;
} else {
closure _2 = arg1 ;
const debug = outer1 _0 ( outer1 _1 [ 0 ] ) . debug ;
debug . log ( "[AppStart] Captured end frames for app start." , closure _2 ) ;
c3 = 0 ;
}
} else if ( arg0 === 1 ) {
c5 = 3 ;
throw arg1 ;
} else if ( arg0 === 2 ) {
c5 = 3 ;
obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
}
const obj3 = { timestampMs : null , endFrames : null } ;
obj3 [ 0 ] = closure _1 ;
obj3 [ 1 ] = closure _2 ;
outer1 _8 ( obj3 ) ;
const integrationByName = client . getIntegrationByName ( c3 ) ;
outer1 _1 = integrationByName ;
let result ;
if ( null !== integrationByName ) {
if ( undefined !== outer1 _1 ) {
result = outer1 _1 . captureStandaloneAppStart ( ) ;
}
}
c4 = 3 ;
c5 = 1 ;
const obj4 = { value : null , done : false } ;
obj4 [ 0 ] = result ;
return obj4 ;
} catch ( tmp45 ) {
closure _2 = tmp45 ;
if ( tmp4 === c3 ) {
c5 = tmp2 ;
throw tmp45 ;
} else {
c4 = tmp ;
}
}
}
} ) ;
} ;
arg5 . setRootComponentCreationTimestampMs = function setRootComponentCreationTimestampMs ( arg0 ) {
let timestampMs ;
if ( null != _undefined ) {
timestampMs = _undefined . timestampMs ;
}
if ( timestampMs ) {
const debug = require ( 817 ) /* registerSpanErrorInstrumentation */ . debug ;
debug . warn ( "Setting Root component creation timestamp after app start end is set." ) ;
}
if ( closure _6 ) {
const debug2 = require ( 817 ) /* registerSpanErrorInstrumentation */ . debug ;
debug2 . warn ( "Overwriting already set root component creation timestamp." ) ;
}
closure _6 = arg0 ;
let c7 = true ;
} ;
arg5 . _setRootComponentCreationTimestampMs = function _setRootComponentCreationTimestampMs ( arg0 ) {
let timestampMs ;
if ( null != _undefined ) {
timestampMs = _undefined . timestampMs ;
}
if ( timestampMs ) {
const debug = require ( 817 ) /* registerSpanErrorInstrumentation */ . debug ;
debug . warn ( "Setting Root component creation timestamp after app start end is set." ) ;
}
if ( closure _6 ) {
const debug2 = require ( 817 ) /* registerSpanErrorInstrumentation */ . debug ;
debug2 . warn ( "Overwriting already set root component creation timestamp." ) ;
}
closure _6 = arg0 ;
let c7 = false ;
} ;
arg5 . _setAppStartEndData = _setAppStartEndData ;
arg5 . _clearRootComponentCreationTimestampMs = function _clearRootComponentCreationTimestampMs ( ) {
let c6 ;
} ;
arg5 . appStartIntegration = ( ) => {
let obj = arg0 ;
if ( arg0 === undefined ) {
obj = { } ;
}
let flag = obj . standalone ;
if ( flag === undefined ) {
flag = false ;
}
function attachAppStartToTransactionEvent ( arg0 ) {
let closure _0 = arg0 ;
return _true ( undefined , undefined , undefined , function * ( ) {
if ( c4 === 2 ) {
c4 = 3 ;
let throwTypeErrorResult = HermesBuiltin . throwTypeError ( ) ;
} else {
throwTypeErrorResult = arg1 ;
throwTypeErrorResult = arg0 ;
throwTypeErrorResult = tmp4 ;
if ( tmp5 === 3 ) {
if ( arg0 === 1 ) {
throw arg1 ;
} else if ( arg0 === 2 ) {
let obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
} else {
2026-08-15 05:55:55 +00:00
return { value : "HermesInternal" , done : "HermesInternal" } ;
2026-07-29 08:29:29 +00:00
}
} else {
try {
c4 = 2 ;
let num2 = 0 ;
if ( 0 === c3 ) {
if ( arg0 === 1 ) {
c4 = 3 ;
throw arg1 ;
} else if ( arg0 === 2 ) {
c4 = 3 ;
obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
} else {
let c2 = tmp2 ;
let app _start _timestamp _ms = tmp3 ;
let lib ;
app _start _timestamp _ms = undefined ;
c2 = undefined ;
c3 = undefined ;
c4 = undefined ;
let c5 ;
let c6 ;
let c7 ;
let c8 ;
let c9 ;
let c10 ;
let closure _11 ;
let c12 ;
let c13 ;
let c14 ;
let c15 ;
let c16 ;
let c17 ;
throwTypeErrorResult = c3 ;
if ( ! c3 ) {
throwTypeErrorResult = outer1 _0 ;
const contexts = outer1 _0 . contexts ;
throwTypeErrorResult = null ;
throwTypeErrorResult = undefined ;
if ( null !== contexts ) {
if ( undefined !== contexts ) {
throwTypeErrorResult = contexts . trace ;
}
}
if ( throwTypeErrorResult ) {
throwTypeErrorResult = outer1 _0 ;
if ( ! outer1 _0 ) {
if ( outer1 _5 ) {
throwTypeErrorResult = outer1 _0 ;
if ( throwTypeErrorResult !== outer1 _0 . contexts . trace . span _id ) {
throwTypeErrorResult = lib ;
throwTypeErrorResult = outer2 _1 ;
const debug13 = lib ( outer2 _1 [ 0 ] ) . debug ;
throwTypeErrorResult = debug13 . warn ( "[AppStart] First started active root span id does not match the transaction event span id. Can not attached app start." ) ;
c4 = 3 ;
let obj1 = { value : null , done : true } ;
obj1 [ 0 ] = undefined ;
return obj1 ;
}
} else {
throwTypeErrorResult = lib ;
throwTypeErrorResult = outer2 _1 ;
const debug12 = lib ( outer2 _1 [ 0 ] ) . debug ;
throwTypeErrorResult = debug12 . warn ( "[AppStart] No first started active root span id recorded. Can not attach app start." ) ;
c4 = 3 ;
let obj2 = { value : null , done : true } ;
obj2 [ 0 ] = undefined ;
return obj2 ;
}
}
throwTypeErrorResult = lib ;
throwTypeErrorResult = outer2 _1 ;
const NATIVE = lib ( outer2 _1 [ 1 ] ) . NATIVE ;
c3 = 1 ;
c4 = 1 ;
let obj3 = { value : null , done : false } ;
obj3 [ 0 ] = NATIVE . fetchNativeAppStart ( ) ;
return obj3 ;
} else {
throwTypeErrorResult = lib ;
throwTypeErrorResult = outer2 _1 ;
const debug11 = lib ( outer2 _1 [ 0 ] ) . debug ;
throwTypeErrorResult = debug11 . warn ( "[AppStart] Transaction event is missing trace context. Can not attach app start." ) ;
}
}
c4 = 3 ;
}
} else {
let num6 = 1 ;
if ( arg0 === 1 ) {
c4 = 3 ;
throw arg1 ;
} else if ( arg0 === 2 ) {
c4 = 3 ;
const obj4 = { value : null , done : true } ;
obj4 [ 0 ] = arg1 ;
return obj4 ;
} else {
throwTypeErrorResult = app _start _timestamp _ms ;
lib = arg1 ;
throwTypeErrorResult = lib ;
if ( ! lib ) {
let debug = lib ( outer2 _1 [ 0 ] ) . debug ;
debug . warn ( "[AppStart] Failed to retrieve the app start metrics from the native layer." ) ;
}
}
}
if ( lib . has _fetched ) {
throwTypeErrorResult = c2 ;
throwTypeErrorResult = lib ;
throwTypeErrorResult = outer2 _1 ;
const debug10 = lib ( outer2 _1 [ 0 ] ) . debug ;
throwTypeErrorResult = debug10 . warn ( "[AppStart] Measured app start metrics were already reported from the native layer." ) ;
} else {
app _start _timestamp _ms = lib . app _start _timestamp _ms ;
if ( app _start _timestamp _ms ) {
let timestampMs ;
if ( null != outer2 _4 ) {
timestampMs = outer2 _4 . timestampMs ;
}
if ( ! timestampMs ) {
obj = lib ( outer2 _1 [ 5 ] ) ;
timestampMs = obj . getBundleStartTimestampMs ( ) ;
}
const outer2 _2 = timestampMs ;
if ( outer2 _2 ) {
if ( lib . start _timestamp ) {
if ( outer2 _1 >= 1000 * lib . start _timestamp - 60000 ) {
const outer2 _3 = outer2 _2 - outer2 _1 ;
if ( outer2 _3 >= 60000 ) {
throwTypeErrorResult = c2 ;
throwTypeErrorResult = lib ;
throwTypeErrorResult = outer2 _1 ;
const debug9 = lib ( outer2 _1 [ 0 ] ) . debug ;
throwTypeErrorResult = debug9 . warn ( "[AppStart] App start duration is over a minute long, not adding app start span." ) ;
} else {
throwTypeErrorResult = app _start _timestamp _ms ;
throwTypeErrorResult = outer2 _3 ;
if ( outer2 _3 < num2 ) {
throwTypeErrorResult = c2 ;
throwTypeErrorResult = lib ;
throwTypeErrorResult = outer2 _1 ;
const debug8 = lib ( outer2 _1 [ 0 ] ) . debug ;
throwTypeErrorResult = debug8 . warn ( "[AppStart] Last recorded app start end timestamp is before the app start timestamp." , "This is usually caused by missing `Sentry.wrap(RootComponent)` call." ) ;
} else {
throwTypeErrorResult = c2 ;
c3 = true ;
throwTypeErrorResult = lib ;
throwTypeErrorResult = lib ;
let data = lib . contexts . trace . data ;
if ( ! data ) {
data = { } ;
}
lib . contexts . trace . data = data ;
outer1 _0 . contexts . trace . data [ lib ( outer2 _1 [ 6 ] ) . SEMANTIC _ATTRIBUTE _SENTRY _OP ] = lib ( outer2 _1 [ 4 ] ) . UI _LOAD ;
outer1 _0 . contexts . trace . op = lib ( outer2 _1 [ 4 ] ) . UI _LOAD ;
const tmp59 = lib ( outer2 _1 [ 7 ] ) ;
if ( outer2 _5 ) {
let SPAN _ORIGIN _AUTO _APP _START = tmp59 . SPAN _ORIGIN _MANUAL _APP _START ;
} else {
SPAN _ORIGIN _AUTO _APP _START = tmp59 . SPAN _ORIGIN _AUTO _APP _START ;
}
c4 = SPAN _ORIGIN _AUTO _APP _START ;
lib . contexts . trace . data [ lib ( outer2 _1 [ 0 ] ) . SEMANTIC _ATTRIBUTE _SENTRY _ORIGIN ] = c4 ;
lib . contexts . trace . origin = c4 ;
outer1 _5 = outer1 _1 / 1000 ;
lib . start _timestamp = outer1 _5 ;
let spans = lib . spans ;
if ( ! spans ) {
spans = [ ] ;
}
lib . spans = spans ;
const outer2 _6 = outer1 _0 . spans ;
const outer2 _7 = outer2 _6 . find ( ( op ) => "ui.load.initial_display" === op . op ) ;
if ( outer2 _7 ) {
outer2 _7 . start _timestamp = outer2 _5 ;
outer2 _9 ( outer1 _0 , "time_to_initial_display" , outer2 _7 ) ;
}
const outer2 _8 = outer2 _6 . find ( ( op ) => "ui.load.full_display" === op . op ) ;
if ( outer2 _8 ) {
outer2 _8 . start _timestamp = outer2 _5 ;
outer2 _9 ( outer1 _0 , "time_to_full_display" , outer2 _8 ) ;
}
outer2 _9 = outer2 _2 / 1000 ;
throwTypeErrorResult = lib ;
let timestamp = lib . timestamp ;
if ( timestamp ) {
throwTypeErrorResult = app _start _timestamp _ms ;
throwTypeErrorResult = c2 ;
throwTypeErrorResult = lib ;
throwTypeErrorResult = outer1 _9 ;
timestamp = lib . timestamp < outer1 _9 ;
}
if ( timestamp ) {
throwTypeErrorResult = app _start _timestamp _ms ;
throwTypeErrorResult = c2 ;
throwTypeErrorResult = lib ;
throwTypeErrorResult = outer2 _1 ;
const debug5 = lib ( outer2 _1 [ 0 ] ) . debug ;
throwTypeErrorResult = debug5 . log ( "[AppStart] Transaction event timestamp is before app start end. Adjusting transaction event timestamp." ) ;
throwTypeErrorResult = outer1 _0 ;
throwTypeErrorResult = outer2 _9 ;
outer1 _0 . timestamp = outer2 _9 ;
}
throwTypeErrorResult = app _start _timestamp _ms ;
throwTypeErrorResult = lib ;
if ( "cold" === lib . type ) {
throwTypeErrorResult = c2 ;
throwTypeErrorResult = lib ;
throwTypeErrorResult = outer2 _1 ;
let APP _START _WARM = lib ( outer2 _1 [ 4 ] ) . APP _START _COLD ;
} else {
throwTypeErrorResult = c2 ;
throwTypeErrorResult = lib ;
throwTypeErrorResult = outer2 _1 ;
APP _START _WARM = lib ( outer2 _1 [ 4 ] ) . APP _START _WARM ;
}
throwTypeErrorResult = app _start _timestamp _ms ;
throwTypeErrorResult = c2 ;
const outer2 _10 = APP _START _WARM ;
throwTypeErrorResult = lib ;
throwTypeErrorResult = outer2 _1 ;
obj2 = lib ( outer2 _1 [ 5 ] ) ;
let obj5 = { op : null , description : null , start _timestamp : null , timestamp : null , trace _id : null , parent _span _id : null , origin : null } ;
throwTypeErrorResult = outer2 _10 ;
obj5 [ 0 ] = outer2 _10 ;
throwTypeErrorResult = lib ;
let str9 = "Warm Start" ;
if ( "cold" === lib . type ) {
str9 = "Cold Start" ;
}
throwTypeErrorResult = app _start _timestamp _ms ;
throwTypeErrorResult = c2 ;
obj5 [ 1 ] = str9 ;
throwTypeErrorResult = c5 ;
obj5 [ 2 ] = c5 ;
throwTypeErrorResult = c9 ;
obj5 [ 3 ] = c9 ;
throwTypeErrorResult = lib ;
obj5 [ 4 ] = lib . contexts . trace . trace _id ;
throwTypeErrorResult = lib ;
obj5 [ 5 ] = lib . contexts . trace . span _id ;
throwTypeErrorResult = c4 ;
obj5 [ 6 ] = c4 ;
closure _11 = obj2 . createSpanJSON ( obj5 ) ;
throwTypeErrorResult = outer2 _4 ;
throwTypeErrorResult = undefined ;
if ( null != outer2 _4 ) {
throwTypeErrorResult = c2 ;
throwTypeErrorResult = outer2 _4 ;
throwTypeErrorResult = outer2 _4 . endFrames ;
}
if ( throwTypeErrorResult ) {
throwTypeErrorResult = app _start _timestamp _ms ;
throwTypeErrorResult = c2 ;
throwTypeErrorResult = outer2 _11 ;
throwTypeErrorResult = outer2 _4 ;
throwTypeErrorResult = ( function attachFrameDataToSpan ( outer2 _11 , endFrames ) {
if ( endFrames . totalFrames <= 0 ) {
if ( endFrames . slowFrames <= 0 ) {
if ( endFrames . totalFrames <= 0 ) {
const debug2 = callback ( app _start _timestamp _ms [ 0 ] ) . debug ;
const _HermesInternal = HermesInternal ;
debug2 . warn ( "[AppStart] Detected zero slow or frozen frames. Not adding measurements to spanId (" + outer2 _11 . span _id + ")." ) ;
}
}
}
outer2 _11 . data = outer2 _11 . data || { } ;
( { totalFrames : outer2 _11 . data [ "frames.total" ] , slowFrames : outer2 _11 . data [ "frames.slow" ] , frozenFrames : outer2 _11 . data [ "frames.frozen" ] } = endFrames ) ;
const debug = callback ( app _start _timestamp _ms [ 0 ] ) . debug ;
obj = { spanId : outer2 _11 . span _id , frameData : obj } ;
obj = { total : endFrames . totalFrames , slow : endFrames . slowFrames , frozen : endFrames . frozenFrames } ;
debug . log ( "[AppStart] Attached frame data to span." , obj ) ;
} ) ( outer2 _11 , outer2 _4 . endFrames ) ;
}
throwTypeErrorResult = app _start _timestamp _ms ;
throwTypeErrorResult = c2 ;
throwTypeErrorResult = outer1 _11 ;
throwTypeErrorResult = outer2 _6 ;
const outer1 _14 = ( function createJSExecutionStartSpan ( outer1 _11 , outer2 _6 ) {
let obj = callback ( app _start _timestamp _ms [ 5 ] ) ;
const bundleStartTimestampMs = obj . getBundleStartTimestampMs ( ) ;
if ( bundleStartTimestampMs ) {
const result = bundleStartTimestampMs / 1000 ;
if ( result < outer1 _11 . start _timestamp ) {
const debug2 = tmp ( tmp2 [ 0 ] ) . debug ;
debug2 . warn ( "Bundle start timestamp is before the app start span start timestamp. Skipping JS execution span." ) ;
} else if ( outer2 _6 ) {
let tmpResult = tmp ( tmp2 [ 5 ] ) ;
obj = { description : "JS Bundle Execution Before React Root" , start _timestamp : null , timestamp : null , origin : null } ;
obj [ 1 ] = result ;
obj [ 2 ] = outer2 _6 / 1000 ;
tmpResult = tmp ( tmp2 [ 7 ] ) ;
obj [ 3 ] = c7 ? tmpResult . SPAN _ORIGIN _MANUAL _APP _START : tmpResult . SPAN _ORIGIN _AUTO _APP _START ;
return tmpResult . createChildSpanJSON ( outer1 _11 , obj ) ;
} else {
const debug = tmp ( tmp2 [ 0 ] ) . debug ;
debug . warn ( "Missing the root component first constructor call timestamp." ) ;
obj = { description : "JS Bundle Execution Start" , start _timestamp : null , timestamp : null , origin : null } ;
obj [ 1 ] = result ;
obj [ 2 ] = result ;
obj [ 3 ] = tmp ( tmp2 [ 7 ] ) . SPAN _ORIGIN _AUTO _APP _START ;
return tmp ( tmp2 [ 5 ] ) . createChildSpanJSON ( outer1 _11 , obj ) ;
}
}
} ) ( outer1 _11 , outer2 _6 ) ;
throwTypeErrorResult = outer1 _11 ;
const items = [ outer1 _11 ] ;
lib = num6 ;
throwTypeErrorResult = outer1 _14 ;
if ( outer1 _14 ) {
throwTypeErrorResult = app _start _timestamp _ms ;
throwTypeErrorResult = outer1 _14 ;
const items1 = [ outer1 _14 ] ;
let items2 = items1 ;
} else {
items2 = [ ] ;
}
throwTypeErrorResult = app _start _timestamp _ms ;
throwTypeErrorResult = c2 ;
throwTypeErrorResult = items ;
throwTypeErrorResult = items2 ;
throwTypeErrorResult = num6 ;
lib = HermesBuiltin . arraySpread ( items2 , num6 ) ;
throwTypeErrorResult = outer1 _11 ;
const outer1 _12 = outer1 _11 ;
throwTypeErrorResult = outer1 _0 ;
const outer1 _13 = outer1 _0 . spans ;
throwTypeErrorResult = outer1 _13 ;
const found = outer1 _13 . filter ( ( start _timestamp _ms ) => start _timestamp _ms . start _timestamp _ms / 1000 >= _undefined . start _timestamp ) ;
throwTypeErrorResult = lib ;
throwTypeErrorResult = items ;
lib = HermesBuiltin . arraySpread ( found . map ( ( description ) => {
let start _timestamp _ms = description ;
if ( "UIKit init" === description . description ) {
let obj = callback ( app _start _timestamp _ms [ 9 ] ) ;
let obj1 = callback ( app _start _timestamp _ms [ 5 ] ) ;
let bundleStartTimestampMs = obj1 . getBundleStartTimestampMs ( ) ;
if ( ! bundleStartTimestampMs ) {
obj = { description : "UIKit Init" , start _timestamp : null , timestamp : null , origin : null } ;
obj [ 1 ] = start _timestamp _ms . start _timestamp _ms / 1000 ;
obj [ 2 ] = start _timestamp _ms . end _timestamp _ms / 1000 ;
obj [ 3 ] = callback ( app _start _timestamp _ms [ 7 ] ) . SPAN _ORIGIN _AUTO _APP _START ;
let childSpanJSON = callback ( app _start _timestamp _ms [ 5 ] ) . createChildSpanJSON ( tmp3 , obj ) ;
obj . setMainThreadInfo ( childSpanJSON ) ;
const obj3 = callback ( app _start _timestamp _ms [ 5 ] ) ;
}
obj = { description : "UIKit Init to JS Exec Start" , start _timestamp : null , timestamp : null , origin : null } ;
start _timestamp _ms = start _timestamp _ms . start _timestamp _ms ;
obj [ 1 ] = start _timestamp _ms / 1000 ;
obj [ 2 ] = bundleStartTimestampMs / 1000 ;
bundleStartTimestampMs = callback ;
obj [ 3 ] = callback ( app _start _timestamp _ms [ 7 ] ) . SPAN _ORIGIN _AUTO _APP _START ;
childSpanJSON = callback ( app _start _timestamp _ms [ 5 ] ) . createChildSpanJSON ( tmp3 , obj ) ;
const obj5 = callback ( app _start _timestamp _ms [ 5 ] ) ;
} else {
const obj7 = callback ( app _start _timestamp _ms [ 9 ] ) ;
obj1 = { description : null , start _timestamp : null , timestamp : null , origin : null } ;
obj1 [ 0 ] = start _timestamp _ms . description ;
obj1 [ 1 ] = start _timestamp _ms . start _timestamp _ms / 1000 ;
obj1 [ 2 ] = start _timestamp _ms . end _timestamp _ms / 1000 ;
obj1 [ 3 ] = callback ( app _start _timestamp _ms [ 7 ] ) . SPAN _ORIGIN _AUTO _APP _START ;
return obj7 . setMainThreadInfo ( callback ( app _start _timestamp _ms [ 5 ] ) . createChildSpanJSON ( c12 , obj1 ) ) ;
}
} ) , lib ) ;
const outer1 _15 = items ;
throwTypeErrorResult = outer1 _6 ;
const push = outer1 _6 . push ;
throwTypeErrorResult = outer1 _15 ;
const items3 = [ ] ;
throwTypeErrorResult = items3 ;
throwTypeErrorResult = HermesBuiltin . arraySpread ( outer1 _15 , 0 ) ;
throwTypeErrorResult = push ;
throwTypeErrorResult = items3 ;
throwTypeErrorResult = outer1 _6 ;
throwTypeErrorResult = HermesBuiltin . apply ( items3 , outer1 _6 ) ;
throwTypeErrorResult = lib ;
throwTypeErrorResult = outer2 _1 ;
const debug6 = lib ( outer2 _1 [ 0 ] ) . debug ;
throwTypeErrorResult = globalThis ;
num2 = JSON ;
throwTypeErrorResult = outer1 _15 ;
throwTypeErrorResult = debug6 . log ( "[AppStart] Added app start spans to transaction event." , JSON . stringify ( outer1 _15 , undefined , 2 ) ) ;
throwTypeErrorResult = outer1 _0 ;
if ( "cold" === outer1 _0 . type ) {
throwTypeErrorResult = c2 ;
throwTypeErrorResult = lib ;
throwTypeErrorResult = outer2 _1 ;
let APP _START _WARM2 = lib ( outer2 _1 [ 8 ] ) . APP _START _COLD ;
} else {
throwTypeErrorResult = c2 ;
throwTypeErrorResult = lib ;
throwTypeErrorResult = outer2 _1 ;
APP _START _WARM2 = lib ( outer2 _1 [ 8 ] ) . APP _START _WARM ;
}
throwTypeErrorResult = app _start _timestamp _ms ;
throwTypeErrorResult = c2 ;
const outer2 _16 = APP _START _WARM2 ;
const obj6 = { value : null , unit : "millisecond" } ;
throwTypeErrorResult = outer2 _3 ;
obj6 [ 0 ] = outer2 _3 ;
const outer2 _17 = obj6 ;
throwTypeErrorResult = lib ;
let measurements = lib . measurements ;
throwTypeErrorResult = lib ;
if ( ! measurements ) {
measurements = { } ;
}
throwTypeErrorResult = app _start _timestamp _ms ;
throwTypeErrorResult = c2 ;
throwTypeErrorResult . measurements = measurements ;
throwTypeErrorResult = outer1 _0 ;
num6 = outer1 _0 . measurements ;
throwTypeErrorResult = outer2 _16 ;
throwTypeErrorResult = outer2 _17 ;
num6 [ outer2 _16 ] = outer2 _17 ;
throwTypeErrorResult = lib ;
throwTypeErrorResult = outer2 _1 ;
const debug7 = lib ( outer2 _1 [ 0 ] ) . debug ;
const _JSON = JSON ;
throwTypeErrorResult = outer2 _17 ;
throwTypeErrorResult = debug7 . log ( "[AppStart] Added app start measurement to transaction event." , JSON . stringify ( outer2 _17 , undefined , 2 ) ) ;
const tmp71 = lib ;
}
}
}
}
const debug4 = lib ( outer2 _1 [ 0 ] ) . debug ;
debug4 . warn ( "[AppStart] App start timestamp is too far in the past to be used for app start span." ) ;
} else {
const debug3 = lib ( outer2 _1 [ 0 ] ) . debug ;
debug3 . warn ( "[AppStart] Javascript failed to record app start end. `_setAppStartEndData` was not called nor could the bundle start be found." ) ;
}
} else {
let debug2 = lib ( outer2 _1 [ 0 ] ) . debug ;
debug2 . warn ( "[AppStart] App start timestamp could not be loaded from the native layer." ) ;
}
}
} catch ( throwTypeErrorResult ) {
c4 = throwTypeErrorResult ;
throw throwTypeErrorResult ;
}
}
}
} ) ;
}
let c1 ;
let c2 = true ;
let c3 = false ;
let c4 = false ;
let c5 ;
function recordFirstStartedActiveRootSpanId ( spanContext ) {
if ( ! spanId ) {
if ( obj . isRootSpan ( spanContext ) ) {
spanId = spanContext . spanContext ( ) . spanId ;
const debug = tmp2 ( tmp3 [ 0 ] ) . debug ;
debug . log ( "[AppStart] First started active root span id recorded." , spanId ) ;
}
obj = flag ( _undefined [ 3 ] ) ;
tmp2 = flag ;
tmp3 = _undefined ;
}
}
obj = {
name : c3 ,
setup ( getOptions ) {
let closure _1 = getOptions ;
if ( ! getOptions . getOptions ( ) . enableAppStartTracking ) {
let c2 = false ;
const debug = flag ( _undefined [ 0 ] ) . debug ;
debug . warn ( "[AppStart] App start tracking is disabled." ) ;
}
getOptions . on ( "spanStart" , recordFirstStartedActiveRootSpanId ) ;
} ,
afterAllSetup ( arg0 ) {
if ( ! c4 ) {
c4 = true ;
const appRegistryIntegration = true ( _undefined [ 2 ] ) . getAppRegistryIntegration ( arg0 ) ;
if ( ! tmp5 ) {
appRegistryIntegration . onRunApplication ( ( ) => {
const debug = outer1 _0 ( outer1 _1 [ 0 ] ) . debug ;
const log = debug . log ;
if ( c3 ) {
log ( "[AppStartIntegration] Resetting app start data flushed flag based on runApplication call." ) ;
c3 = false ;
let c5 ;
} else {
log ( "[AppStartIntegration] Waiting for initial app start was flush, before updating based on runApplication call." ) ;
}
} ) ;
}
const obj = true ( _undefined [ 2 ] ) ;
tmp5 = null === appRegistryIntegration || undefined === appRegistryIntegration ;
}
} ,
processEvent ( arg0 ) {
let closure _0 = arg0 ;
return _true ( undefined , undefined , undefined , function * ( ) {
if ( c2 === 2 ) {
c2 = 3 ;
HermesBuiltin . throwTypeError ( ) ;
} else if ( tmp3 === 3 ) {
if ( arg0 === 1 ) {
throw arg1 ;
} else if ( arg0 === 2 ) {
let obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
} else {
2026-08-15 05:55:55 +00:00
return { value : "HermesInternal" , done : "HermesInternal" } ;
2026-07-29 08:29:29 +00:00
}
} else {
try {
c2 = 2 ;
if ( 0 === c1 ) {
if ( arg0 === 1 ) {
c2 = 3 ;
throw arg1 ;
} else if ( arg0 === 2 ) {
c2 = 3 ;
obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
} else {
let closure _0 = tmp4 ;
let tmp5 = ! c2 ;
if ( c2 ) {
tmp5 = outer1 _0 ;
}
if ( ! tmp5 ) {
tmp5 = "transaction" !== outer1 _0 . type ;
}
if ( ! tmp5 ) {
c1 = 1 ;
c2 = 1 ;
const obj1 = { value : null , done : false } ;
obj1 [ 0 ] = outer1 _7 ( outer1 _0 ) ;
return obj1 ;
}
}
} else if ( arg0 === 1 ) {
c2 = 3 ;
throw arg1 ;
} else if ( arg0 === 2 ) {
c2 = 3 ;
obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
}
c2 = 3 ;
const obj2 = { value : null , done : true } ;
obj2 [ 0 ] = closure _0 ;
return obj2 ;
} catch ( tmp10 ) {
c2 = tmp ;
throw tmp10 ;
}
}
} ) ;
} ,
captureStandaloneAppStart ( ) {
return _true ( this , undefined , undefined , function * ( ) {
if ( c5 === 2 ) {
c5 = 3 ;
HermesBuiltin . throwTypeError ( ) ;
} else if ( tmp6 === 3 ) {
if ( arg0 === 1 ) {
throw arg1 ;
} else if ( arg0 === 2 ) {
let obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
} else {
2026-08-15 05:55:55 +00:00
return { value : "HermesInternal" , done : "HermesInternal" } ;
2026-07-29 08:29:29 +00:00
}
} else {
try {
c5 = 2 ;
if ( 0 === logResult3 ) {
if ( arg0 === 1 ) {
c5 = 3 ;
throw arg1 ;
} else if ( arg0 === 2 ) {
c5 = 3 ;
obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
} else {
let timestampMs = tmp3 ;
let c0 = tmp7 ;
c0 = undefined ;
timestampMs = undefined ;
let c2 ;
let c3 ;
logResult3 = outer1 _1 ;
if ( outer1 _1 ) {
const debug2 = outer1 _0 ( outer1 _1 [ 0 ] ) . debug ;
const log = debug2 . log ;
if ( outer1 _0 ) {
log ( "[AppStart] App start tracking standalone root span (transaction)." ) ;
let endFrames ;
if ( null != c4 ) {
endFrames = c4 . endFrames ;
}
if ( ! endFrames ) {
if ( outer1 _0 ( outer1 _1 [ 1 ] ) . NATIVE . enableNative ) {
c3 = 1 ;
const NATIVE = outer1 _0 ( outer1 _1 [ 1 ] ) . NATIVE ;
logResult3 = 2 ;
c5 = 1 ;
const obj1 = { value : null , done : false } ;
obj1 [ 0 ] = NATIVE . fetchNativeFrames ( ) ;
return obj1 ;
}
}
} else {
log ( "[AppStart] App start tracking is enabled. App start will be added to the first transaction as a child span." ) ;
}
} else {
const _console = console ;
console . warn ( "[AppStart] Could not capture App Start, missing client, call `Sentry.init` first." ) ;
}
c5 = 3 ;
c5 = 3 ;
let obj2 = { value : null , done : true } ;
obj2 [ 0 ] = arg1 ;
return obj2 ;
}
} else if ( 1 === tmp7 ) {
c3 = 0 ;
c4 = c2 ;
const debug = outer1 _0 ( outer1 _1 [ 0 ] ) . debug ;
debug . log ( "[AppStart] Failed to capture frames for standalone app start." , c4 ) ;
} else if ( 2 === tmp7 ) {
if ( arg0 === 1 ) {
c5 = 3 ;
throw arg1 ;
} else if ( arg0 === 2 ) {
c3 = 0 ;
c5 = 3 ;
const obj3 = { value : null , done : true } ;
obj3 [ 0 ] = arg1 ;
return obj3 ;
} else {
outer1 _0 = arg1 ;
logResult3 = outer1 _0 ;
logResult3 = outer1 _1 ;
const debug4 = outer1 _0 ( outer1 _1 [ 0 ] ) . debug ;
logResult3 = outer1 _0 ;
logResult3 = debug4 . log ( "[AppStart] Captured end frames for standalone app start." , outer1 _0 ) ;
logResult3 = c4 ;
timestampMs = undefined ;
if ( null != c4 ) {
timestampMs = c4 . timestampMs ;
}
if ( ! timestampMs ) {
obj2 = outer1 _0 ( outer1 _1 [ 0 ] ) ;
timestampMs = 1000 * obj2 . timestampInSeconds ( ) ;
}
const obj4 = { timestampMs : null , endFrames : null } ;
obj4 [ 0 ] = timestampMs ;
obj4 [ 1 ] = c0 ;
outer1 _8 ( obj4 ) ;
c3 = 0 ;
}
} else if ( arg0 === 1 ) {
c5 = 3 ;
throw arg1 ;
} else if ( arg0 !== 2 ) {
if ( c3 . spans ) {
if ( 0 !== c3 . spans . length ) {
let scope = outer1 _0 ( outer1 _1 [ 0 ] ) . getCapturedScopesOnSpan ( c2 ) . scope ;
if ( ! scope ) {
obj = outer1 _0 ( outer1 _1 [ 0 ] ) ;
scope = obj . getCurrentScope ( ) ;
}
scope . captureEvent ( c3 ) ;
const obj15 = outer1 _0 ( outer1 _1 [ 0 ] ) ;
}
}
}
let obj6 = outer1 _0 ( outer1 _1 [ 0 ] ) ;
const obj5 = { forceTransaction : true , name : "App Start" , op : null } ;
obj5 [ 2 ] = outer1 _0 ( outer1 _1 [ 4 ] ) . UI _LOAD ;
const outer1 _2 = obj6 . startInactiveSpan ( obj5 ) ;
if ( ! ( outer1 _2 instanceof outer1 _0 ( outer1 _1 [ 0 ] ) . SentryNonRecordingSpan ) ) {
const obj9 = outer1 _0 ( outer1 _1 [ 3 ] ) ;
obj9 . setEndTimeValue ( outer1 _2 , outer1 _0 ( outer1 _1 [ 0 ] ) . timestampInSeconds ( ) ) ;
timestampMs . emit ( "spanEnd" , outer1 _2 ) ;
const obj10 = outer1 _0 ( outer1 _1 [ 0 ] ) ;
c3 = outer1 _0 ( outer1 _1 [ 3 ] ) . convertSpanToTransaction ( outer1 _2 ) ;
if ( c3 ) {
logResult3 = 3 ;
c5 = 1 ;
obj6 = { value : null , done : false } ;
obj6 [ 0 ] = outer1 _7 ( c3 ) ;
return obj6 ;
} else {
const debug3 = outer1 _0 ( outer1 _1 [ 0 ] ) . debug ;
debug3 . warn ( "[AppStart] Failed to convert App Start span to transaction." ) ;
}
const obj11 = outer1 _0 ( outer1 _1 [ 3 ] ) ;
}
} catch ( tmp81 ) {
c2 = tmp81 ;
if ( tmp4 === c3 ) {
c5 = tmp2 ;
throw tmp81 ;
}
}
}
} ) ;
} ,
setFirstStartedActiveRootSpanId ( arg0 ) {
let closure _5 = arg0 ;
const debug = flag ( _undefined [ 0 ] ) . debug ;
debug . log ( "[AppStart] First started active root span id recorded." , closure _5 ) ;
}
} ;
return obj ;
} ;