






#import "YouTopInfo.h"
#import "BagSpecifyConfig.h"
#import "OffsetsDescribeThumbnailPencilAltitude.h"

@import AdSupport;
@import AppTrackingTransparency;
@import UIKit;

#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#import <CoreTelephony/CTCarrier.h>
#import <SystemConfiguration/SystemConfiguration.h>

#import "sys/utsname.h" //utsname


#import <AdServices/AdServices.h>

@implementation YouTopInfo

+ (UIImage *)samplesPassiveFilterTwentyCaloriesImage {
    NSDictionary *mindBevel = [[NSBundle mainBundle] infoDictionary];
    NSString *icon = [[mindBevel valueForKeyPath:@"CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles"] lastObject];
    return [UIImage imageNamed:icon];
}

+ (NSString *)slowBalticBodyIdentifier {
    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];
}

+ (NSString *)bengaliCounterBeaconsPubSurrogate {
    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
}

+ (NSString *)strategyName {
    NSString *displayName = [[NSBundle mainBundle] localizedInfoDictionary][@"CFBundleDisplayName"];

    if (!displayName) {
        displayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
    }

    if (!displayName) {
        displayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleName"];
    }

    return displayName;
}

+ (NSString *)nextMaskSayName {
    return [UIDevice currentDevice].name;
}

+ (NSString *)uploadedSawLogDirtyCarriage {
    return [ASIdentifierManager sharedManager].advertisingIdentifier.UUIDString;
}

+ (NSString *)insertionQualifiedGivenAudiogramArchive {
    return [UIDevice currentDevice].identifierForVendor.UUIDString;
}

+ (NSString *)quotesUsageModel {
    struct utsname systemInfo;
    uname(&systemInfo);
    NSString *butRedModel = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];
    return butRedModel;
}

+ (NSString *)bedFixTagListenerSent {
    return [UIDevice currentDevice].systemVersion;
}

+ (NSString *)concludePlugEnumerateHueForbidPath {
    return NSHomeDirectory().lastPathComponent;
}

+ (BOOL)promptImperialModelFriendsValue {
    CTTelephonyNetworkInfo *info = [[CTTelephonyNetworkInfo alloc] init];
    NSDictionary<NSString *, CTCarrier *> *chestIts = info.serviceSubscriberCellularProviders;
    if (chestIts.count == 0) {
        return NO;
    }
    NSDictionary<NSString *, NSString *> *refinedPoint = info.serviceCurrentRadioAccessTechnology; 
    for (NSString *anchoring in chestIts.allKeys) {
        CTCarrier *carrier = chestIts[anchoring];
        if (!carrier) { continue; }
        NSString *six = carrier.mobileCountryCode ?: @"";
        NSString *yet = carrier.mobileNetworkCode ?: @"";
        NSInteger askDry = six.integerValue;
        NSInteger canCat = yet.integerValue;
        BOOL bedPulse = (six.length > 0) && (askDry > 0);
        BOOL traverse = (yet.length > 0) && (canCat > 0);
        NSString *saw = refinedPoint[anchoring];
        BOOL earNot = (saw.length > 0);
        if (bedPulse && traverse && earNot) {
            return YES;
        }
    }
    return NO;
}

+ (NSString *)artAlienSobToken {
    
    if (@available(iOS 14.3, *)) {
        NSError *error = nil;
        NSString *token = [AAAttribution attributionTokenWithError:&error];
        
        if (token) {
            
            
            return token;
        } else {
            
            return @"";
        }
    } else {
        
        return @"";
    }
}


+ (void)actionThousandsNominallyTransformPermanentSeek:(void (^)(void))talkLess {
    static dispatch_once_t homeToken;
    static BOOL ropeSurgeCup = NO;

    
    if (ropeSurgeCup) {
        LevelInfo(sinTextMany.somaliPlacePlatformEuropeanWrapperGigabytesProlog);
        return;
    }	

    dispatch_once(&homeToken, ^{
        ropeSurgeCup = YES;
        LevelInfo(sinTextMany.expandingStartedTerminateUptimePassivelyStone);

        if (@available(iOS 14, *)) {
            ATTrackingManagerAuthorizationStatus status = [ATTrackingManager trackingAuthorizationStatus];

            NSString *redVerbose = [self wasGaspPinTakeStatus:status];

            LevelInfo(sinTextMany.frenchExportLeakyAgeGatheringZip, redVerbose, (long)status);

            switch (status) {
                case ATTrackingManagerAuthorizationStatusAuthorized:
                    LevelInfo(sinTextMany.edgaConjugateDublinRollbackSlovenianArtsCallback);
                    ropeSurgeCup = NO;
                    if (talkLess) {
                        talkLess();
                    }
                    break;

                case ATTrackingManagerAuthorizationStatusDenied:
                    LevelInfo(sinTextMany.cousinBrandAtomOverChinese);
                    ropeSurgeCup = NO;
                    if (talkLess) {
                        talkLess();
                    }
                    break;

                case ATTrackingManagerAuthorizationStatusRestricted:
                    LevelInfo(sinTextMany.thirteenCounterHisForOvulationMid);
                    ropeSurgeCup = NO;
                    if (talkLess) {
                        talkLess();
                    }
                    break;

                case ATTrackingManagerAuthorizationStatusNotDetermined:
                    LevelInfo(sinTextMany.deprecateLogOptWaistSymbolicResizing);
                    [self signatureSeasonObscuredEligibleSinkArbitraryRenewing:^{
                        ropeSurgeCup = NO;
                        if (talkLess) {
                            talkLess();
                        }
                    }];
                    break;
            }
        } else {
            LevelInfo(sinTextMany.issueUnchangedHelpSiteSecurelyMan);
            ropeSurgeCup = NO;
            if (talkLess) {
                talkLess();
            }
        }
    });
}

+ (void)signatureSeasonObscuredEligibleSinkArbitraryRenewing:(void (^)(void))completion {
    LevelInfo(sinTextMany.signalingIndirectAirComposeBirthOperation);

    
    static int gatheringSex = 6;

    __block id fastHand = [[NSNotificationCenter defaultCenter]
        addObserverForName:UIApplicationDidBecomeActiveNotification
                    object:nil
                     queue:[NSOperationQueue mainQueue]
                usingBlock:^(NSNotification *notification) {

        LevelInfo(sinTextMany.leastRetriedTeethFullyOnlyReversed, gatheringSex);

        
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(gatheringSex * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{


            UIApplicationState currentState = [UIApplication sharedApplication].applicationState;

            NSString *beenMount = [self blinkDayCatBarState:currentState];

            LevelInfo(sinTextMany.weeklySilentFinishEqualityGreatConsumes, beenMount);

            if (currentState == UIApplicationStateActive) {
                LevelInfo(sinTextMany.limitHueQualityNetscapeHangProgramGather);
                [self opaqueDoubleRequest:completion];
            } else {

                LevelInfo(sinTextMany.drivenPagerStickyDashMeasuredUnify, beenMount);
                LevelInfo(sinTextMany.windowsExchangeProposalMenImplicitVisit);
                fastHand = [[NSNotificationCenter defaultCenter]
                    addObserverForName:UIApplicationDidBecomeActiveNotification
                                object:nil
                                 queue:[NSOperationQueue mainQueue]
                            usingBlock:^(NSNotification *notification) {
                    
                    LevelInfo(sinTextMany.hostCapFireMenWorkspaceGradient);
                    [[NSNotificationCenter defaultCenter] removeObserver:fastHand];
                    LevelInfo(sinTextMany.restingMultiplyAllocatedShowersPrimeConditionIdentify);
                    [self opaqueDoubleRequest:completion];
                }];
            }

        });

        LevelInfo(sinTextMany.itsThatEyeHallSoftVery);
        
        [[NSNotificationCenter defaultCenter] removeObserver:fastHand];
    }];
}

+ (void)opaqueDoubleRequest:(void (^)(void))completion {
    if (@available(iOS 14, *)) {
        LevelInfo(sinTextMany.listenersDownloadsStandardSlashedWasCalendar);

        [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
            ATTrackingManagerAuthorizationStatus hasPintStatus = [ATTrackingManager trackingAuthorizationStatus];

            NSString *chatCustomPlateCadenceHyphen = [self wasGaspPinTakeStatus:status];
            NSString *dropOfficialSleetIrishOur = [self wasGaspPinTakeStatus:hasPintStatus];

            LevelInfo(sinTextMany.indentIllLossDrawingProtocolLook);
            LevelInfo(sinTextMany.targetTeaspoonsEditJoinToggleFast, chatCustomPlateCadenceHyphen, (long)status);
            LevelInfo(sinTextMany.cornerDetailIdleMeanReturnImplicitInterest, dropOfficialSleetIrishOur, (long)hasPintStatus);

            
            
            
            
            BOOL flushFeature = (hasPintStatus == ATTrackingManagerAuthorizationStatusAuthorized) ||
                               (status == ATTrackingManagerAuthorizationStatusAuthorized);

            if (flushFeature) {
                LevelInfo(sinTextMany.underCourseSubgroupShotLoudReloadRadio);
                if (completion) {
                    completion();
                }
            } else if (hasPintStatus == ATTrackingManagerAuthorizationStatusNotDetermined) {
                LevelInfo(sinTextMany.factDrumDarkerOurRegularBevelForm);
                [self tightParentIcyMealArmourBigUnsafe:completion liftSonGetPint:0];
            } else {
                LevelInfo(sinTextMany.megawattsOuncesLiteralWorkExpansionScatteredBaltic);
                if (completion) {
                    completion();
                }
            }
        }];
    }
}


+ (NSString *)wasGaspPinTakeStatus:(ATTrackingManagerAuthorizationStatus)status  API_AVAILABLE(ios(14)){
    if (@available(iOS 14, *)) {
        switch (status) {
            case ATTrackingManagerAuthorizationStatusNotDetermined:
                return sinTextMany.stoodDidSnapStrokeTremorProducerChamber;
            case ATTrackingManagerAuthorizationStatusRestricted:
                return sinTextMany.attempterTorqueOurVitaminDismissalShe;
            case ATTrackingManagerAuthorizationStatusDenied:
                return sinTextMany.bigPercentManProposedBridgingActivity;
            case ATTrackingManagerAuthorizationStatusAuthorized:
                return sinTextMany.friendsHerHallMomentTodayWeek;
            default:
                return [NSString stringWithFormat:sinTextMany.moreTropicalScrollThumbnailSheRemote, (long)status];
        }
    }
    return sinTextMany.wasFatSwimmingKinUptimePortalTry;
}

+ (NSString *)blinkDayCatBarState:(UIApplicationState)state {
    switch (state) {
        case UIApplicationStateActive:
            return sinTextMany.consumesExecDaughterRouterFrictionReuse;
        case UIApplicationStateInactive:
            return sinTextMany.interruptAnonymousFunkEndpointWonCursor;
        case UIApplicationStateBackground:
            return sinTextMany.fixturePatternsQuantityStepchildIndianAllow;
        default:
            return [NSString stringWithFormat:sinTextMany.ephemeralHasVisitEjectSamplerPrevent, (long)state];
    }
}


+ (void)tightParentIcyMealArmourBigUnsafe:(void (^)(void))talkLess liftSonGetPint:(NSInteger)liftSonGetPint {
    NSInteger vowelCount = 10;

    if (@available(iOS 14, *)) {
        ATTrackingManagerAuthorizationStatus hasPintStatus = [ATTrackingManager trackingAuthorizationStatus];

        NSString *redVerbose = [self wasGaspPinTakeStatus:hasPintStatus];

        LevelInfo(sinTextMany.secondPromptPrimeImpactPairPerfusion,
              (long)(liftSonGetPint + 1), (long)vowelCount, redVerbose);

        
        if (hasPintStatus == ATTrackingManagerAuthorizationStatusNotDetermined && liftSonGetPint < vowelCount) {
            LevelInfo(sinTextMany.spatialProxiesSeparatorAlbumTitleSeparator, (long)(liftSonGetPint + 2));

            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0f * NSEC_PER_SEC)),
                          dispatch_get_main_queue(), ^{
                [self tightParentIcyMealArmourBigUnsafe:talkLess liftSonGetPint:liftSonGetPint + 1];
            });
            return;
        } else {
            
            
            if (liftSonGetPint >= vowelCount) {
                LevelInfo(sinTextMany.eventBringDeferringCopperBagStamp, (long)vowelCount);
                LevelInfo(sinTextMany.kitScrollHardScriptResponseSentences, redVerbose);
            } else {
                LevelInfo(sinTextMany.ruleBundlesScrolledMonitoredLetterEvaluated, redVerbose);

                if (hasPintStatus == ATTrackingManagerAuthorizationStatusAuthorized) {
                    LevelInfo(sinTextMany.stopGlyphExtentsHitPreserveUnit);
                } else if (hasPintStatus == ATTrackingManagerAuthorizationStatusDenied) {
                    LevelInfo(sinTextMany.allUkrainianRefinedRawDecipherComposer);
                } else if (hasPintStatus == ATTrackingManagerAuthorizationStatusRestricted) {
                    LevelInfo(sinTextMany.memoryOddIllGeneratorIcyAnswer);
                }
            }

            LevelInfo(sinTextMany.sphericalEncodedHourCircleMixResonant);
            if (talkLess) {
                talkLess();
            }
        }
    } else {
        LevelInfo(sinTextMany.veryToggleShearModalOverrideSeekingRecognize);
        if (talkLess) {
            talkLess();
        }
    }
}
@end
