








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

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

@property (nonatomic, strong) MARewardedAd *siteEarlyYouMoleWay;
@property (nonatomic, strong) MAInterstitialAd *whitePrecisionDetachingBothYoungest;
@property (nonatomic, assign) NSInteger didExpansionInfinityPongPrepare;

@property (nonatomic, copy) NSString *pickBestRowData;

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

@property (nonatomic, copy) void (^directRealProgressTargetOptJson)(BOOL result, NSDictionary *airJson);

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

@property (nonatomic, copy) void (^highestDitherFormCrossEscapesPlayJson)(BOOL result, NSDictionary *airJson);

@property (nonatomic, copy) void (^winSignatureSemanticsAssistiveLimitedSerial)(NSDictionary *itsInfo);

@end

@implementation ExcludeDayLoseTruncatesHourlySources

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

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

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

- (void)pingLateProducerKilobitsBoxSin:(void(^)(NSDictionary *itsInfo))callback {
    self.winSignatureSemanticsAssistiveLimitedSerial = callback;
}


- (void)unfocusedRotateEmbeddedHairEncryptedInsulinKey:(NSString *)xxpk_maxkey lyricistHeavyDaughterCalciumEarly:(NSString *)lyricistHeavyDaughterCalciumEarly apertureSlideBoxIntegrityEraMusic:(NSString *)apertureSlideBoxIntegrityEraMusic previousEnableValidatesStereoItem:(NSArray *)previousEnableValidatesStereoItem {
    
    
    
    Class how = NSClassFromString(@"FBAdSettings");
    if (how) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
        [how performSelector:@selector(setDataProcessingOptions:) withObject:@[]];
        [how performSelector:@selector(setAdvertiserTrackingEnabled:) withObject:@(YES)];
#pragma clang diagnostic pop
    }
    
    

    
    ALSdkInitializationConfiguration *packetPingWebpageSocialUploaded = [ALSdkInitializationConfiguration configurationWithSdkKey:xxpk_maxkey builderBlock:^(ALSdkInitializationConfigurationBuilder * _Nonnull builder) {
        builder.mediationProvider = ALMediationProviderMAX;
        if (previousEnableValidatesStereoItem) {
            builder.testDeviceAdvertisingIdentifiers = previousEnableValidatesStereoItem;
        }
        if (@available(iOS 14, *)) {
            if ([ATTrackingManager trackingAuthorizationStatus] == ATTrackingManagerAuthorizationStatusAuthorized ) {
                [ALPrivacySettings setHasUserConsent: YES];
            }
        } else {
            [ALPrivacySettings setHasUserConsent: YES];
        }
    }];
    
    [[ALSdk shared] initializeWithConfiguration:packetPingWebpageSocialUploaded completionHandler:^(ALSdkConfiguration * _Nonnull configuration) {
        [self headsetIrishUseSawRevisionsCurveProgram:lyricistHeavyDaughterCalciumEarly];
        if (apertureSlideBoxIntegrityEraMusic.length > 0) {
            [self momentaryCautionBalticLiftBeginningSmallestTwistEllipse:apertureSlideBoxIntegrityEraMusic];
        }
    }];
}

- (void)headsetIrishUseSawRevisionsCurveProgram:(NSString *)lyricistHeavyDaughterCalciumEarly
{
    self.siteEarlyYouMoleWay = [MARewardedAd sharedWithAdUnitIdentifier:lyricistHeavyDaughterCalciumEarly];
    self.siteEarlyYouMoleWay.delegate = self;
    self.siteEarlyYouMoleWay.revenueDelegate = self;

    
    [self.siteEarlyYouMoleWay loadAd];
}

- (void)momentaryCautionBalticLiftBeginningSmallestTwistEllipse:(NSString *)apertureSlideBoxIntegrityEraMusic
{
    self.whitePrecisionDetachingBothYoungest = [[MAInterstitialAd alloc] initWithAdUnitIdentifier:apertureSlideBoxIntegrityEraMusic];
    self.whitePrecisionDetachingBothYoungest.delegate = self;
    self.whitePrecisionDetachingBothYoungest.revenueDelegate = self;

    
    [self.whitePrecisionDetachingBothYoungest loadAd];
}


- (void)stillSuggestedOxygenExpensiveCaffeineAuditedData:(nullable NSString *)pickBestRowData timeMayKeyJson:(void(^)(BOOL result, NSDictionary *airJson))timeMayKeyJson {
    self.directRealProgressTargetOptJson = timeMayKeyJson;
    self.pickBestRowData = pickBestRowData;
    if ( [self.siteEarlyYouMoleWay isReady]) {
        [self.siteEarlyYouMoleWay showAdForPlacement:nil customData:pickBestRowData];
    }else {
        timeMayKeyJson(NO,nil);
    }
}

- (void)stillSuggestedOxygenExpensiveCaffeineAuditedData:(nullable NSString *)pickBestRowData pinPolar:(void(^)(BOOL result))pinPolar {
    self.bitTenWaxMeal = pinPolar;
    self.pickBestRowData = pickBestRowData;
    if ( [self.siteEarlyYouMoleWay isReady]) {
        [self.siteEarlyYouMoleWay showAdForPlacement:nil customData:pickBestRowData];
    }else {
        pinPolar(NO);
    }
}

- (void)hourSigningNapSameIntentsPreviousVolumesData:(nullable NSString *)pickBestRowData pinPolar:(void(^)(BOOL result))pinPolar {
    self.smartLooseSunCountryWasWorking = pinPolar;
    self.pickBestRowData = pickBestRowData;
    if ([self.whitePrecisionDetachingBothYoungest isReady]) {
        [self.whitePrecisionDetachingBothYoungest showAd];
    } else {
        [self.whitePrecisionDetachingBothYoungest loadAd];
        if (pinPolar) {
            pinPolar(NO);
        }
    }
}

- (void)hourSigningNapSameIntentsPreviousVolumesData:(nullable NSString *)pickBestRowData timeMayKeyJson:(void(^)(BOOL result, NSDictionary *airJson))timeMayKeyJson {
    self.highestDitherFormCrossEscapesPlayJson = timeMayKeyJson;
    self.pickBestRowData = pickBestRowData;
    if ([self.whitePrecisionDetachingBothYoungest isReady]) {
        [self.whitePrecisionDetachingBothYoungest showAd];
    } else {
        [self.whitePrecisionDetachingBothYoungest loadAd];
        if (timeMayKeyJson) {
            timeMayKeyJson(NO, nil);
        }
    }
}

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

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

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

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

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

    self.winSignatureSemanticsAssistiveLimitedSerial(itsInfo);
}


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

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

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

    

    self.didExpansionInfinityPongPrepare++;
    NSInteger barHours = pow(2, MIN(6, self.didExpansionInfinityPongPrepare));

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, barHours * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
        
        if ([adUnitIdentifier isEqualToString:self.siteEarlyYouMoleWay.adUnitIdentifier]) {
            [self.siteEarlyYouMoleWay loadAd];
        } else if ([adUnitIdentifier isEqualToString:self.whitePrecisionDetachingBothYoungest.adUnitIdentifier]) {
            [self.whitePrecisionDetachingBothYoungest loadAd];
        }
    });
}

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

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

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

        if (self.highestDitherFormCrossEscapesPlayJson) {
            NSDictionary *airJson = [self importantScaleFullyFlippedTwo:ad];
            self.highestDitherFormCrossEscapesPlayJson(YES, airJson);
        }
    }
}

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

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

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

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

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

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

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

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

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

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

    if (self.directRealProgressTargetOptJson) {
        NSDictionary *airJson = [self importantScaleFullyFlippedTwo:ad];
        self.directRealProgressTargetOptJson(YES, airJson);
    }
}


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

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


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

@end
