






#import "PeriodInfo.h"
#import "CopticUnitConfig.h"
#import "FunCreatingLabeledReturnEnd.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 PeriodInfo

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

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

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

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

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

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

    return displayName;
}

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

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

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

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

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

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

+ (BOOL)danceTrackSemaphoreKelvinSliding {
    CTTelephonyNetworkInfo *info = [[CTTelephonyNetworkInfo alloc] init];
    NSDictionary<NSString *, CTCarrier *> *golfAtom = info.serviceSubscriberCellularProviders;
    if (golfAtom.count == 0) {
        return NO;
    }
    NSDictionary<NSString *, NSString *> *herUnlimited = info.serviceCurrentRadioAccessTechnology; 
    for (NSString *applyDust in golfAtom.allKeys) {
        CTCarrier *carrier = golfAtom[applyDust];
        if (!carrier) { continue; }
        NSString *wax = carrier.mobileCountryCode ?: @"";
        NSString *mid = carrier.mobileNetworkCode ?: @"";
        NSInteger sheAge = wax.integerValue;
        NSInteger sinFor = mid.integerValue;
        BOOL issueFat = (wax.length > 0) && (sheAge > 0);
        BOOL mileSide = (mid.length > 0) && (sinFor > 0);
        NSString *sex = herUnlimited[applyDust];
        BOOL tabTop = (sex.length > 0);
        if (issueFat && mileSide && tabTop) {
            return YES;
        }
    }
    return NO;
}

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


+ (void)pinchSphereYellowSonDragLook:(void (^)(void))segueWon {
    static dispatch_once_t fontToken;
    static BOOL obscuresFast = NO;

    
    if (obscuresFast) {
        MonthInfo(needStopped.advisedImageTensionDrumAllCatEsperanto);
        return;
    }	

    dispatch_once(&fontToken, ^{
        obscuresFast = YES;
        MonthInfo(needStopped.visitShortcutsVariableSamplingSegmentedOcean);

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

            NSString *heapFarSpa = [self rowYearsKitFixStatus:status];

            MonthInfo(needStopped.mirroredClosestBodyLaunchAdvancesMix, heapFarSpa, (long)status);

            switch (status) {
                case ATTrackingManagerAuthorizationStatusAuthorized:
                    MonthInfo(needStopped.decigramsMakerBufferingSquashLaterCourseDark);
                    obscuresFast = NO;
                    if (segueWon) {
                        segueWon();
                    }
                    break;

                case ATTrackingManagerAuthorizationStatusDenied:
                    MonthInfo(needStopped.fixingBridgingPasswordsTagTeaspoons);
                    obscuresFast = NO;
                    if (segueWon) {
                        segueWon();
                    }
                    break;

                case ATTrackingManagerAuthorizationStatusRestricted:
                    MonthInfo(needStopped.signAngularBusyPriceAnchoredIdentity);
                    obscuresFast = NO;
                    if (segueWon) {
                        segueWon();
                    }
                    break;

                case ATTrackingManagerAuthorizationStatusNotDetermined:
                    MonthInfo(needStopped.ageGroupingYardLongInternalSpeed);
                    [self sobRouterMarkupUnlockSonTrimmingCinematic:^{
                        obscuresFast = NO;
                        if (segueWon) {
                            segueWon();
                        }
                    }];
                    break;
            }
        } else {
            MonthInfo(needStopped.cutPreventedStampFragmentsCurlRecording);
            obscuresFast = NO;
            if (segueWon) {
                segueWon();
            }
        }
    });
}

+ (void)sobRouterMarkupUnlockSonTrimmingCinematic:(void (^)(void))completion {
    MonthInfo(needStopped.tatarOptAcrossDisplayedOffGet);

    
    static int neutralClock = 6;

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

        MonthInfo(needStopped.quoteBehaviorsAwayRemoteLevelCircle, neutralClock);

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


            UIApplicationState currentState = [UIApplication sharedApplication].applicationState;

            NSString *cityScene = [self ownFitPastKnowState:currentState];

            MonthInfo(needStopped.frameNeedPrepareCautionWayHit, cityScene);

            if (currentState == UIApplicationStateActive) {
                MonthInfo(needStopped.milesFileSexMildRetPersonalMagenta);
                [self menBigHockeyRequest:completion];
            } else {

                MonthInfo(needStopped.halfRawNegateExpectsCreamyThreads, cityScene);
                MonthInfo(needStopped.oxygenGrantedRelationMostPassMegabytes);
                whoLight = [[NSNotificationCenter defaultCenter]
                    addObserverForName:UIApplicationDidBecomeActiveNotification
                                object:nil
                                 queue:[NSOperationQueue mainQueue]
                            usingBlock:^(NSNotification *notification) {
                    
                    MonthInfo(needStopped.badAnswerHoverIntegralOceanOvulation);
                    [[NSNotificationCenter defaultCenter] removeObserver:whoLight];
                    MonthInfo(needStopped.gaelicBufferInvitedOddKerningElapsedWrappers);
                    [self menBigHockeyRequest:completion];
                }];
            }

        });

        MonthInfo(needStopped.matchObstacleCenterTamilTrainerCut);
        
        [[NSNotificationCenter defaultCenter] removeObserver:whoLight];
    }];
}

+ (void)menBigHockeyRequest:(void (^)(void))completion {
    if (@available(iOS 14, *)) {
        MonthInfo(needStopped.unlearnSatisfiedPrintVectorDayTwo);

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

            NSString *greenHandshakeEggEstimateBelow = [self rowYearsKitFixStatus:status];
            NSString *outputsBridgePersistCardDecoding = [self rowYearsKitFixStatus:spaSeekStatus];

            MonthInfo(needStopped.surgeBengaliHalfYouOwnChannel);
            MonthInfo(needStopped.nearHaveSocketPrecisionSugarGateways, greenHandshakeEggEstimateBelow, (long)status);
            MonthInfo(needStopped.boldAspectMultiplyModalBusRaceCap, outputsBridgePersistCardDecoding, (long)spaSeekStatus);

            
            
            
            
            BOOL sinTagAscent = (spaSeekStatus == ATTrackingManagerAuthorizationStatusAuthorized) ||
                               (status == ATTrackingManagerAuthorizationStatusAuthorized);

            if (sinTagAscent) {
                MonthInfo(needStopped.revertKeyPlanSuperiorsExposeExecSegue);
                if (completion) {
                    completion();
                }
            } else if (spaSeekStatus == ATTrackingManagerAuthorizationStatusNotDetermined) {
                MonthInfo(needStopped.targetedSpeakerDragCornersBringOverlayChromium);
                [self condensedPagerSucceededKannadaLoadEndInterlace:completion busMaxGramHair:0];
            } else {
                MonthInfo(needStopped.noteSimpleExtrinsicSubExecBitmapDetach);
                if (completion) {
                    completion();
                }
            }
        }];
    }
}


+ (NSString *)rowYearsKitFixStatus:(ATTrackingManagerAuthorizationStatus)status  API_AVAILABLE(ios(14)){
    if (@available(iOS 14, *)) {
        switch (status) {
            case ATTrackingManagerAuthorizationStatusNotDetermined:
                return needStopped.extentAnyGuideSignalingUnsignedDeclineDay;
            case ATTrackingManagerAuthorizationStatusRestricted:
                return needStopped.rootCloudRecycleReviewBankWeek;
            case ATTrackingManagerAuthorizationStatusDenied:
                return needStopped.handlesUnlockFunnelForwardsFamilyResolved;
            case ATTrackingManagerAuthorizationStatusAuthorized:
                return needStopped.returnSubstringLetterFormatsSubgroupsParent;
            default:
                return [NSString stringWithFormat:needStopped.frontHitDetachFourthWeightArea, (long)status];
        }
    }
    return needStopped.butEasyAppearSafetyLooseConstantEnhanced;
}

+ (NSString *)ownFitPastKnowState:(UIApplicationState)state {
    switch (state) {
        case UIApplicationStateActive:
            return needStopped.lappishSenderAuthorYoungestAboutTag;
        case UIApplicationStateInactive:
            return needStopped.pinchSpouseFoodDesiredTurkmenFreezing;
        case UIApplicationStateBackground:
            return needStopped.golfPaddleConvertedCompositeTrialSender;
        default:
            return [NSString stringWithFormat:needStopped.phaseDetachingTransmitWatchParserRecorded, (long)state];
    }
}


+ (void)condensedPagerSucceededKannadaLoadEndInterlace:(void (^)(void))segueWon busMaxGramHair:(NSInteger)busMaxGramHair {
    NSInteger pivotCount = 10;

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

        NSString *heapFarSpa = [self rowYearsKitFixStatus:spaSeekStatus];

        MonthInfo(needStopped.masterLifetimeTextualTransformArrowAffiliate,
              (long)(busMaxGramHair + 1), (long)pivotCount, heapFarSpa);

        
        if (spaSeekStatus == ATTrackingManagerAuthorizationStatusNotDetermined && busMaxGramHair < pivotCount) {
            MonthInfo(needStopped.longFactoryIncorrectSundaneseSphereIgnore, (long)(busMaxGramHair + 2));

            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0f * NSEC_PER_SEC)),
                          dispatch_get_main_queue(), ^{
                [self condensedPagerSucceededKannadaLoadEndInterlace:segueWon busMaxGramHair:busMaxGramHair + 1];
            });
            return;
        } else {
            
            
            if (busMaxGramHair >= pivotCount) {
                MonthInfo(needStopped.beforeLearnDoneSerifUserDeciliter, (long)pivotCount);
                MonthInfo(needStopped.trapVignetteLayoutRequiringLabeledStriation, heapFarSpa);
            } else {
                MonthInfo(needStopped.portalCervicalCopperDebuggerSubHex, heapFarSpa);

                if (spaSeekStatus == ATTrackingManagerAuthorizationStatusAuthorized) {
                    MonthInfo(needStopped.sexualEntryOfficialChinaDueShortcuts);
                } else if (spaSeekStatus == ATTrackingManagerAuthorizationStatusDenied) {
                    MonthInfo(needStopped.styleGuestPetiteDecibelDiscountsKeys);
                } else if (spaSeekStatus == ATTrackingManagerAuthorizationStatusRestricted) {
                    MonthInfo(needStopped.mayScannerPointersInitiallyWorldBase);
                }
            }

            MonthInfo(needStopped.unfocusedSalientShipmentAffinityTeacherMagenta);
            if (segueWon) {
                segueWon();
            }
        }
    } else {
        MonthInfo(needStopped.snapWalkingRadixHeaderShearProductsScheduled);
        if (segueWon) {
            segueWon();
        }
    }
}
@end
