2026-07-29 08:29:29 +00:00
// Module ID: 1105
// Function ID: 1106
2026-07-20 16:05:17 +00:00
// Name: _wrappedIsEnabled
2026-07-29 08:29:29 +00:00
// Dependencies: [817, 1072]
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
// Module 1105 (_wrappedIsEnabled)
2026-07-23 10:11:24 +00:00
import registerSpanErrorInstrumentation from "registerSpanErrorInstrumentation" ;
2026-07-20 16:05:17 +00:00
function _wrappedIsEnabled ( arg0 ) {
2026-07-23 10:11:24 +00:00
let closure _0 = arg0 ;
2026-07-20 16:05:17 +00:00
return function ( ) {
2026-07-29 08:29:29 +00:00
const items = [ ... arguments ] ;
const first = items [ 0 ] ;
const applyResult = callback . apply ( this , items ) ;
2026-08-04 21:03:28 +00:00
if ( typeof first === "string" ) {
if ( typeof applyResult === "boolean" ) {
2026-07-23 10:11:24 +00:00
const result = callback ( outer1 _1 [ 0 ] ) . _INTERNAL _insertFlagToScope ( first , applyResult ) ;
const obj = callback ( outer1 _1 [ 0 ] ) ;
const result1 = callback ( outer1 _1 [ 0 ] ) . _INTERNAL _addFeatureFlagToActiveSpan ( first , applyResult ) ;
const obj2 = callback ( outer1 _1 [ 0 ] ) ;
2026-07-20 16:05:17 +00:00
}
return applyResult ;
}
2026-07-23 10:11:24 +00:00
if ( callback ( outer1 _1 [ 1 ] ) . DEBUG _BUILD ) {
const debug = callback ( outer1 _1 [ 0 ] ) . debug ;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal ;
2026-07-29 08:29:29 +00:00
debug . error ( "[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: " + first + " (" + typeof first + "), result: " + applyResult + " (" + typeof applyResult + ")" ) ;
2026-07-20 16:05:17 +00:00
}
} ;
}
Object . defineProperty ( exports , Symbol . toStringTag , { value : "Module" } ) ;
2026-07-23 10:11:24 +00:00
export const unleashIntegration = registerSpanErrorInstrumentation . defineIntegration ( ( featureFlagClientClass ) => {
featureFlagClientClass = featureFlagClientClass . featureFlagClientClass ;
2026-07-20 16:05:17 +00:00
return {
name : "Unleash" ,
setupOnce ( ) {
2026-07-23 10:11:24 +00:00
featureFlagClientClass ( outer1 _1 [ 0 ] ) . fill ( featureFlagClientClass . prototype , "isEnabled" , outer1 _2 ) ;
2026-07-20 16:05:17 +00:00
} ,
processEvent ( contexts ) {
2026-07-29 08:29:29 +00:00
return featureFlagClientClass ( table [ 0 ] ) . _INTERNAL _copyFlagsFromScopeToEvent ( contexts ) ;
2026-07-20 16:05:17 +00:00
}
} ;
} ) ;