








#import <AppLovinSDK/AppLovinSDK.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>

@interface EraProximityHallResultPriorBeginning : NSObject<MARewardedAdDelegate,MAAdViewAdDelegate,MAAdDelegate,MAAdRevenueDelegate>

@property (nonatomic, strong) MARewardedAd *kitLeftAtomicPathRestoring;
@property (nonatomic, strong) MAInterstitialAd *exporterCreditsProcessesDecayRate;
@property (nonatomic, assign) NSInteger proteinWonAssistantSeasonRest;

@property (nonatomic, copy) NSString *bestClipMinData;

@property (nonatomic, copy) void (^frequencyMood)(BOOL result);

@property (nonatomic, copy) void (^incomingLightBrotherRadialSevenJson)(BOOL result, NSDictionary *endJson);

@property (nonatomic, copy) void (^underlineAnimateDidSmallestCycleStake)(BOOL result);

@property (nonatomic, copy) void (^certResonantBlinkMenGraphicsRetriedJson)(BOOL result, NSDictionary *endJson);

@property (nonatomic, copy) void (^unchangedIcyClusterStrokedSubmittedDescended)(NSDictionary *addInfo);

@end

@implementation EraProximityHallResultPriorBeginning

+ (instancetype)shared {
    static id shared = nil;
    static dispatch_once_t hangToken;
    dispatch_once(&hangToken, ^{
        shared = [[super allocWithZone:NULL] init];
    });
    return shared;
}

+ (NSString *)datumBadSlow {
    return ALSdk.version;
}

- (void)showMediationDebugger {
    [[ALSdk shared] showMediationDebugger];
}

- (void)retryObjectInteractWaterEjectSocial:(void(^)(NSDictionary *addInfo))callback {
    self.unchangedIcyClusterStrokedSubmittedDescended = callback;
}


- (void)chestModeEachEvaluateOriginsPeopleKey:(NSString *)xxpk_maxkey chunkOptionDominantGroupBits:(NSString *)chunkOptionDominantGroupBits longerFinalizeExternalCricketChargeCervical:(NSString *)longerFinalizeExternalCricketChargeCervical velocityDashNormalizeAllocatorSpa:(NSArray *)velocityDashNormalizeAllocatorSpa {
    
    
    
    Class cat = NSClassFromString(@"FBAdSettings");
    if (cat) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
        [cat performSelector:@selector(setDataProcessingOptions:) withObject:@[]];
        [cat performSelector:@selector(setAdvertiserTrackingEnabled:) withObject:@(YES)];
#pragma clang diagnostic pop
    }
    
    

    
    ALSdkInitializationConfiguration *waitHitLinearVersionNap = [ALSdkInitializationConfiguration configurationWithSdkKey:xxpk_maxkey builderBlock:^(ALSdkInitializationConfigurationBuilder * _Nonnull builder) {
        builder.mediationProvider = ALMediationProviderMAX;
        if (velocityDashNormalizeAllocatorSpa) {
            builder.testDeviceAdvertisingIdentifiers = velocityDashNormalizeAllocatorSpa;
        }
        if (@available(iOS 14, *)) {
            if ([ATTrackingManager trackingAuthorizationStatus] == ATTrackingManagerAuthorizationStatusAuthorized ) {
                [ALPrivacySettings setHasUserConsent: YES];
            }
        } else {
            [ALPrivacySettings setHasUserConsent: YES];
        }
    }];
    
    [[ALSdk shared] initializeWithConfiguration:waitHitLinearVersionNap completionHandler:^(ALSdkConfiguration * _Nonnull configuration) {
        [self exerciseMinIterateOutputExpensiveCroppingFocal:chunkOptionDominantGroupBits];
        if (longerFinalizeExternalCricketChargeCervical.length > 0) {
            [self lexicalDenyUnlockAssertFlightObscuredIslamicTriple:longerFinalizeExternalCricketChargeCervical];
        }
    }];
}

- (void)exerciseMinIterateOutputExpensiveCroppingFocal:(NSString *)chunkOptionDominantGroupBits
{
    self.kitLeftAtomicPathRestoring = [MARewardedAd sharedWithAdUnitIdentifier:chunkOptionDominantGroupBits];
    self.kitLeftAtomicPathRestoring.delegate = self;
    self.kitLeftAtomicPathRestoring.revenueDelegate = self;

    
    [self.kitLeftAtomicPathRestoring loadAd];
}

- (void)lexicalDenyUnlockAssertFlightObscuredIslamicTriple:(NSString *)longerFinalizeExternalCricketChargeCervical
{
    self.exporterCreditsProcessesDecayRate = [[MAInterstitialAd alloc] initWithAdUnitIdentifier:longerFinalizeExternalCricketChargeCervical];
    self.exporterCreditsProcessesDecayRate.delegate = self;
    self.exporterCreditsProcessesDecayRate.revenueDelegate = self;

    
    [self.exporterCreditsProcessesDecayRate loadAd];
}


- (void)checkerYouLayeringPlugNarrativeSphereData:(nullable NSString *)bestClipMinData butProfileJson:(void(^)(BOOL result, NSDictionary *endJson))butProfileJson {
    self.incomingLightBrotherRadialSevenJson = butProfileJson;
    self.bestClipMinData = bestClipMinData;
    if ( [self.kitLeftAtomicPathRestoring isReady]) {
        [self.kitLeftAtomicPathRestoring showAdForPlacement:nil customData:bestClipMinData];
    }else {
        butProfileJson(NO,nil);
    }
}

- (void)checkerYouLayeringPlugNarrativeSphereData:(nullable NSString *)bestClipMinData textSolo:(void(^)(BOOL result))textSolo {
    self.frequencyMood = textSolo;
    self.bestClipMinData = bestClipMinData;
    if ( [self.kitLeftAtomicPathRestoring isReady]) {
        [self.kitLeftAtomicPathRestoring showAdForPlacement:nil customData:bestClipMinData];
    }else {
        textSolo(NO);
    }
}

- (void)procedureHeadsetSettingExpiresExpandLastAssertionData:(nullable NSString *)bestClipMinData textSolo:(void(^)(BOOL result))textSolo {
    self.underlineAnimateDidSmallestCycleStake = textSolo;
    self.bestClipMinData = bestClipMinData;
    if ([self.exporterCreditsProcessesDecayRate isReady]) {
        [self.exporterCreditsProcessesDecayRate showAd];
    } else {
        [self.exporterCreditsProcessesDecayRate loadAd];
        if (textSolo) {
            textSolo(NO);
        }
    }
}

- (void)procedureHeadsetSettingExpiresExpandLastAssertionData:(nullable NSString *)bestClipMinData butProfileJson:(void(^)(BOOL result, NSDictionary *endJson))butProfileJson {
    self.certResonantBlinkMenGraphicsRetriedJson = butProfileJson;
    self.bestClipMinData = bestClipMinData;
    if ([self.exporterCreditsProcessesDecayRate isReady]) {
        [self.exporterCreditsProcessesDecayRate showAd];
    } else {
        [self.exporterCreditsProcessesDecayRate loadAd];
        if (butProfileJson) {
            butProfileJson(NO, nil);
        }
    }
}

- (void)disposeRoleInvokeRevokedWater:(const char *)name error:(NSString *)error {
    
}

- (NSDictionary *)localityWasFullOcclusionSpherical:(MAAd *)ad {
    NSMutableDictionary *endJson = [NSMutableDictionary dictionary];
    
    endJson[@"currency"] = @"USD";
    endJson[@"revenue"] = @(ad.revenue);
    
    if (ad.format.label.length > 0) {
        endJson[@"format"] = ad.format.label;
    }
    
    return [endJson copy];
}

- (void)malteseUsabilityNextAwakeDrizzleSnow:(MAAd *)ad eventType:(NSString *)eventType {
    if (!self.unchangedIcyClusterStrokedSubmittedDescended) {
        return;
    }

    NSString *adType = @"UNKNOWN";
    if ([ad.format isEqual:MAAdFormat.rewarded]) {
        adType = @"REWARD";
    } else if ([ad.format isEqual:MAAdFormat.interstitial]) {
        adType = @"INTERSTITIAL";
    }

    NSDictionary *addInfo = @{
        @"ads_platform": @"APPLOVIN",
        @"ad_unit_id": ad.adUnitIdentifier ?: @"",
        @"event_type": eventType,  
        @"ad_type": adType,
        @"revenue": @(ad.revenue).stringValue ?: @"0"
    };

    self.unchangedIcyClusterStrokedSubmittedDescended(addInfo);
}


- (void)didLoadAd:(nonnull MAAd *)ad {
    
    [self disposeRoleInvokeRevokedWater: __PRETTY_FUNCTION__ error:nil];
    
    
    self.proteinWonAssistantSeasonRest = 0;
}

- (void)didFailToLoadAdForAdUnitIdentifier:(nonnull NSString *)adUnitIdentifier withError:(nonnull MAError *)error {

    [self disposeRoleInvokeRevokedWater: __PRETTY_FUNCTION__ error:error.message];

    

    self.proteinWonAssistantSeasonRest++;
    NSInteger metalFix = pow(2, MIN(6, self.proteinWonAssistantSeasonRest));

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, metalFix * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
        
        if ([adUnitIdentifier isEqualToString:self.kitLeftAtomicPathRestoring.adUnitIdentifier]) {
            [self.kitLeftAtomicPathRestoring loadAd];
        } else if ([adUnitIdentifier isEqualToString:self.exporterCreditsProcessesDecayRate.adUnitIdentifier]) {
            [self.exporterCreditsProcessesDecayRate loadAd];
        }
    });
}

- (void)didHideAd:(MAAd *)ad {
    [self disposeRoleInvokeRevokedWater: __PRETTY_FUNCTION__ error:nil];

    
    if ([ad.format isEqual:MAAdFormat.rewarded]) {
        [self.kitLeftAtomicPathRestoring loadAd];
    } else if ([ad.format isEqual:MAAdFormat.interstitial]) {
        [self.exporterCreditsProcessesDecayRate loadAd];

        
        if (self.underlineAnimateDidSmallestCycleStake) {
            self.underlineAnimateDidSmallestCycleStake(YES);
        }

        if (self.certResonantBlinkMenGraphicsRetriedJson) {
            NSDictionary *endJson = [self localityWasFullOcclusionSpherical:ad];
            self.certResonantBlinkMenGraphicsRetriedJson(YES, endJson);
        }
    }
}

- (void)didFailToDisplayAd:(MAAd *)ad withError:(MAError *)error
{
    [self disposeRoleInvokeRevokedWater: __PRETTY_FUNCTION__ error:error.message];

    
    if ([ad.format isEqual:MAAdFormat.rewarded]) {
        [self.kitLeftAtomicPathRestoring loadAd];

        if (self.frequencyMood) {
            self.frequencyMood(NO);
        }

        if (self.incomingLightBrotherRadialSevenJson) {
            self.incomingLightBrotherRadialSevenJson(NO, nil);
        }
    } else if ([ad.format isEqual:MAAdFormat.interstitial]) {
        [self.exporterCreditsProcessesDecayRate loadAd];

        if (self.underlineAnimateDidSmallestCycleStake) {
            self.underlineAnimateDidSmallestCycleStake(NO);
        }

        if (self.certResonantBlinkMenGraphicsRetriedJson) {
            self.certResonantBlinkMenGraphicsRetriedJson(NO, nil);
        }
    }
}

- (void)didClickAd:(nonnull MAAd *)ad {
    [self disposeRoleInvokeRevokedWater: __PRETTY_FUNCTION__ error:nil];
    [self malteseUsabilityNextAwakeDrizzleSnow:ad eventType:@"1"];
}

- (void)didDisplayAd:(nonnull MAAd *)ad {
    [self disposeRoleInvokeRevokedWater: __PRETTY_FUNCTION__ error:nil];
    [self malteseUsabilityNextAwakeDrizzleSnow:ad eventType:@"2"];
}

- (void)didRewardUserForAd:(nonnull MAAd *)ad withReward:(nonnull MAReward *)reward {
    [self disposeRoleInvokeRevokedWater: __PRETTY_FUNCTION__ error:nil];

    if (self.frequencyMood) {
        self.frequencyMood(YES);
    }

    if (self.incomingLightBrotherRadialSevenJson) {
        NSDictionary *endJson = [self localityWasFullOcclusionSpherical:ad];
        self.incomingLightBrotherRadialSevenJson(YES, endJson);
    }
}


- (void)didCollapseAd:(nonnull MAAd *)ad {
    [self disposeRoleInvokeRevokedWater: __PRETTY_FUNCTION__ error:nil];
}

- (void)didExpandAd:(nonnull MAAd *)ad {
    [self disposeRoleInvokeRevokedWater: __PRETTY_FUNCTION__ error:nil];
}


- (void)didPayRevenueForAd:(MAAd *)ad {
    [self disposeRoleInvokeRevokedWater: __PRETTY_FUNCTION__ error:nil];
    [self malteseUsabilityNextAwakeDrizzleSnow:ad eventType:@"3"];
}

@end
