








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

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

@property (nonatomic, strong) MARewardedAd *measuredHandZoomSliderIssue;
@property (nonatomic, strong) MAInterstitialAd *saltHighFactorBrushKilograms;
@property (nonatomic, assign) NSInteger applierIntegrityExpireArtistChild;

@property (nonatomic, copy) NSString *encodeBlockData;

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

@property (nonatomic, copy) void (^slashedHumidityQualifiedPingTipJson)(BOOL result, NSDictionary *hitJson);

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

@property (nonatomic, copy) void (^stayWireZeroLessExhaustedBaselineJson)(BOOL result, NSDictionary *hitJson);

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

@end

@implementation EyeRemainderFlushedSemaphoreIgnoreOut

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

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

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

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


- (void)outputBirthdayGeorgianPinFriendsSlantKey:(NSString *)xxpk_maxkey monthOlympusFlatBuffersDrag:(NSString *)monthOlympusFlatBuffersDrag primeResultSlovakSummariesLooperReadable:(NSString *)primeResultSlovakSummariesLooperReadable meanSupportAlgorithmChangingScheme:(NSArray *)meanSupportAlgorithmChangingScheme {
    
    
    
    Class arm = NSClassFromString(@"FBAdSettings");
    if (arm) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
        [arm performSelector:@selector(setDataProcessingOptions:) withObject:@[]];
        [arm performSelector:@selector(setAdvertiserTrackingEnabled:) withObject:@(YES)];
#pragma clang diagnostic pop
    }
    
    

    
    ALSdkInitializationConfiguration *gatherFinalAppendedDownhillInternal = [ALSdkInitializationConfiguration configurationWithSdkKey:xxpk_maxkey builderBlock:^(ALSdkInitializationConfigurationBuilder * _Nonnull builder) {
        builder.mediationProvider = ALMediationProviderMAX;
        if (meanSupportAlgorithmChangingScheme) {
            builder.testDeviceAdvertisingIdentifiers = meanSupportAlgorithmChangingScheme;
        }
        if (@available(iOS 14, *)) {
            if ([ATTrackingManager trackingAuthorizationStatus] == ATTrackingManagerAuthorizationStatusAuthorized ) {
                [ALPrivacySettings setHasUserConsent: YES];
            }
        } else {
            [ALPrivacySettings setHasUserConsent: YES];
        }
    }];
    
    [[ALSdk shared] initializeWithConfiguration:gatherFinalAppendedDownhillInternal completionHandler:^(ALSdkConfiguration * _Nonnull configuration) {
        [self trailingBirthdayReplacedCheckoutCoalescedManIndicator:monthOlympusFlatBuffersDrag];
        if (primeResultSlovakSummariesLooperReadable.length > 0) {
            [self foldAudienceTwistMasteringSucceededHoverHaveKashmiri:primeResultSlovakSummariesLooperReadable];
        }
    }];
}

- (void)trailingBirthdayReplacedCheckoutCoalescedManIndicator:(NSString *)monthOlympusFlatBuffersDrag
{
    self.measuredHandZoomSliderIssue = [MARewardedAd sharedWithAdUnitIdentifier:monthOlympusFlatBuffersDrag];
    self.measuredHandZoomSliderIssue.delegate = self;
    self.measuredHandZoomSliderIssue.revenueDelegate = self;

    
    [self.measuredHandZoomSliderIssue loadAd];
}

- (void)foldAudienceTwistMasteringSucceededHoverHaveKashmiri:(NSString *)primeResultSlovakSummariesLooperReadable
{
    self.saltHighFactorBrushKilograms = [[MAInterstitialAd alloc] initWithAdUnitIdentifier:primeResultSlovakSummariesLooperReadable];
    self.saltHighFactorBrushKilograms.delegate = self;
    self.saltHighFactorBrushKilograms.revenueDelegate = self;

    
    [self.saltHighFactorBrushKilograms loadAd];
}


- (void)slightUnboundResizeScatteredDrumMixData:(nullable NSString *)encodeBlockData hisShuffleJson:(void(^)(BOOL result, NSDictionary *hitJson))hisShuffleJson {
    self.slashedHumidityQualifiedPingTipJson = hisShuffleJson;
    self.encodeBlockData = encodeBlockData;
    if ( [self.measuredHandZoomSliderIssue isReady]) {
        [self.measuredHandZoomSliderIssue showAdForPlacement:nil customData:encodeBlockData];
    }else {
        hisShuffleJson(NO,nil);
    }
}

- (void)slightUnboundResizeScatteredDrumMixData:(nullable NSString *)encodeBlockData forceCar:(void(^)(BOOL result))forceCar {
    self.overCollector = forceCar;
    self.encodeBlockData = encodeBlockData;
    if ( [self.measuredHandZoomSliderIssue isReady]) {
        [self.measuredHandZoomSliderIssue showAdForPlacement:nil customData:encodeBlockData];
    }else {
        forceCar(NO);
    }
}

- (void)yetMiddleArtworkStandardConvertSeekLowData:(nullable NSString *)encodeBlockData forceCar:(void(^)(BOOL result))forceCar {
    self.renewedResumedSkinSegueOfferFlip = forceCar;
    self.encodeBlockData = encodeBlockData;
    if ([self.saltHighFactorBrushKilograms isReady]) {
        [self.saltHighFactorBrushKilograms showAd];
    } else {
        [self.saltHighFactorBrushKilograms loadAd];
        if (forceCar) {
            forceCar(NO);
        }
    }
}

- (void)yetMiddleArtworkStandardConvertSeekLowData:(nullable NSString *)encodeBlockData hisShuffleJson:(void(^)(BOOL result, NSDictionary *hitJson))hisShuffleJson {
    self.stayWireZeroLessExhaustedBaselineJson = hisShuffleJson;
    self.encodeBlockData = encodeBlockData;
    if ([self.saltHighFactorBrushKilograms isReady]) {
        [self.saltHighFactorBrushKilograms showAd];
    } else {
        [self.saltHighFactorBrushKilograms loadAd];
        if (hisShuffleJson) {
            hisShuffleJson(NO, nil);
        }
    }
}

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

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

- (void)eyeProtocolCanonicalMillEvaluatedJabber:(MAAd *)ad eventType:(NSString *)eventType {
    if (!self.paragraphImperialAreSawBufferingCell) {
        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.paragraphImperialAreSawBufferingCell(addInfo);
}


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

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

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

    

    self.applierIntegrityExpireArtistChild++;
    NSInteger checkout = pow(2, MIN(6, self.applierIntegrityExpireArtistChild));

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, checkout * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
        
        if ([adUnitIdentifier isEqualToString:self.measuredHandZoomSliderIssue.adUnitIdentifier]) {
            [self.measuredHandZoomSliderIssue loadAd];
        } else if ([adUnitIdentifier isEqualToString:self.saltHighFactorBrushKilograms.adUnitIdentifier]) {
            [self.saltHighFactorBrushKilograms loadAd];
        }
    });
}

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

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

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

        if (self.stayWireZeroLessExhaustedBaselineJson) {
            NSDictionary *hitJson = [self persianSpanDogDepartureWin:ad];
            self.stayWireZeroLessExhaustedBaselineJson(YES, hitJson);
        }
    }
}

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

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

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

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

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

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

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

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

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

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

    if (self.slashedHumidityQualifiedPingTipJson) {
        NSDictionary *hitJson = [self persianSpanDogDepartureWin:ad];
        self.slashedHumidityQualifiedPingTipJson(YES, hitJson);
    }
}


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

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


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

@end
