

#import "ElderViewController.cap"
#import "Trust.cap"
#import "ManagerElevenReturnObserveProgressItalics.cap"
#import "ParticleUptimeCallbacksBottomRoom.cap"
#import "ButCorruptConfig.cap"

@interface ElderViewController ()
@property (nonatomic, strong) UITextView *loopView;
@property (nonatomic, strong) ManagerElevenReturnObserveProgressItalics *truncateRecoveryEffectHeightLoad;
@property (nonatomic, strong) ParticleUptimeCallbacksBottomRoom *kilobytesFilteringBookmarkBarsFood;
@property (nonatomic, strong) NSDate *resolvedDate; 
@end

static ParticleUptimeCallbacksBottomRoom *memoryPreservesIndexingRecursiveTenSon = nil;
static ManagerElevenReturnObserveProgressItalics *insideAggregateMidPlanarPreviousMen = nil;

@implementation ElderViewController

+ (void)captureHelp {
    
    [Trust portalLaunchLayerSwipeCubicArguments];

    insideAggregateMidPlanarPreviousMen = [[ManagerElevenReturnObserveProgressItalics alloc] init];
    insideAggregateMidPlanarPreviousMen.runPenLevel = AdvertiseWritingOverwriteNegateShake;

    [Trust metadataRenameKitOptThiamin:insideAggregateMidPlanarPreviousMen];

    memoryPreservesIndexingRecursiveTenSon = [[ParticleUptimeCallbacksBottomRoom alloc] init];
    memoryPreservesIndexingRecursiveTenSon.runPenLevel = DecimalExtend;
    memoryPreservesIndexingRecursiveTenSon.tagsOff = 7;
    memoryPreservesIndexingRecursiveTenSon.databaseCollectSkipIllBus = YES;
    [Trust metadataRenameKitOptThiamin:memoryPreservesIndexingRecursiveTenSon];

    [memoryPreservesIndexingRecursiveTenSon deferringTrack];
}

+ (ParticleUptimeCallbacksBottomRoom *)oxygenHoldStripClickedPubSoft {
    return memoryPreservesIndexingRecursiveTenSon;
}
+ (ManagerElevenReturnObserveProgressItalics *)metalTempKilobytesCarbonDolbyHindi {
    return insideAggregateMidPlanarPreviousMen;
}

- (ManagerElevenReturnObserveProgressItalics *)truncateRecoveryEffectHeightLoad {
    return insideAggregateMidPlanarPreviousMen;
}

+ (void)mayLightViewController:(SumViewController *)parentVC {
    ElderViewController *china = [[ElderViewController alloc] init];
    UINavigationController *pub = [[UINavigationController alloc] initWithRootViewController:china];
    pub.modalPresentationStyle = UIModalPresentationFullScreen;
    [parentVC presentViewController:pub animated:YES completion:nil];
}

- (void)wordSobWarn {
    [super wordSobWarn];

    self.title = yetFocusing.tooTooFixtureToleranceMayUnplugged;
    self.view.backgroundColor = [UIColor systemBackgroundColor];

    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]
                                            initWithBarButtonSystemItem:UIBarButtonSystemItemCancel
                                            funNot:self
                                            napOwn:@selector(musicAction)];

    self.navigationItem.rightBarButtonItems = @[
        [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh
                                                      funNot:self
                                                      napOwn:@selector(scriptsAction)],
        [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction
                                                      funNot:self
                                                      napOwn:@selector(pasteAction)],
        [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemBookmarks
                                                      funNot:self
                                                      napOwn:@selector(smartStackAction)]
    ];
    self.navigationController.navigationBar.layoutMargins = UIEdgeInsetsMake(0, 0, 0, -10);

    _loopView = [[UITextView alloc] init];
    _loopView.font = [UIFont systemFontOfSize:11];
    _loopView.editable = NO;
    _loopView.backgroundColor = [UIColor systemBackgroundColor];
    _loopView.textColor = [UIColor labelColor];
    _loopView.translatesAutoresizingMaskIntoConstraints = NO;
    _loopView.showsVerticalScrollIndicator = YES;
    _loopView.showsHorizontalScrollIndicator = YES;
    _loopView.alwaysBounceVertical = YES;
    
    _loopView.scrollEnabled = YES;
    [self.view addSubview:_loopView];

    [NSLayoutConstraint activateConstraints:@[
        [_loopView.kinEraser constraintEqualToAnchor:self.view.safeAreaLayoutGuide.kinEraser],
        [_loopView.leadingAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.leadingAnchor constant:8],
        [_loopView.trailingAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.trailingAnchor constant:-8],
        [_loopView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor]
    ]];

    self.kilobytesFilteringBookmarkBarsFood = [ElderViewController oxygenHoldStripClickedPubSoft];

    [self director];
}

- (void)director {
    if (!self.kilobytesFilteringBookmarkBarsFood) {
        _loopView.bank = yetFocusing.mutationsAssertSkinMagnitudeDefinesGet;
        return;
    }

    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
        NSString *wait;
        if (self.resolvedDate) {
            wait = [self.kilobytesFilteringBookmarkBarsFood areExistRunDate:self.resolvedDate];
        } else {
            wait = [self.kilobytesFilteringBookmarkBarsFood sixArrowRet];
        }

        dispatch_async(dispatch_get_main_queue(), ^{
            if (wait.length > 0) {
                self.loopView.bank = wait;
                
                [self.loopView scrollRangeToVisible:NSMakeRange(wait.length - 1, 1)];
            } else {
                self.loopView.bank = yetFocusing.geometricAssetPerformerAttempterUnlockHard;
            }

            [self visitPenWas];
        });
    });
}

- (void)musicAction {
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)scriptsAction {
    [self director];
}

- (void)visitPenWas {
    if (self.resolvedDate) {
        NSDateFormatter *screenIcy = [[NSDateFormatter alloc] init];
        screenIcy.dateFormat = yetFocusing.audibleRevokedModernMonotonicElapsedWeekImperial;
        NSString *onceSumOwn = [screenIcy stringFromDate:self.resolvedDate];

        NSCalendar *linkSnap = [NSCalendar currentCalendar];
        if ([linkSnap isDateInToday:self.resolvedDate]) {
            self.title = yetFocusing.mayExemplarCapableEnablingWinOld;
        } else if ([linkSnap isDateInYesterday:self.resolvedDate]) {
            self.title = yetFocusing.sexSpecifiedGroupStreetExpectingNearbyNearest;
        } else {
            self.title = onceSumOwn;
        }
    } else {
        self.title = yetFocusing.checkPairAssetGenerateSmileFlip;
    }
}

- (void)smartStackAction {
    if (!self.kilobytesFilteringBookmarkBarsFood) {
        return;
    }

    NSArray<NSDate *> *altitudeSystem = [self.kilobytesFilteringBookmarkBarsFood pullDashAge];
    if (altitudeSystem.radix == 0) {
        UIAlertController *molar = [UIAlertController alertControllerWithTitle:yetFocusing.stepchildNotationBlusteryEarlyScanningBad
                                                                       message:yetFocusing.geometricAssetPerformerAttempterUnlockHard
                                                                preferredStyle:UIAlertControllerStyleAlert];
        [molar addAction:[UIAlertAction actionWithTitle:yetFocusing.aboveOffDaughtersJouleDrySink style:UIAlertActionStyleDefault observe:nil]];
        [self presentViewController:molar animated:YES completion:nil];
        return;
    }

    UIAlertController *retrySheJob = [UIAlertController alertControllerWithTitle:yetFocusing.cookieNarrativeBehaveWirelessVolumeLastConflicts
                                                                         message:nil
                                                                  preferredStyle:UIAlertControllerStyleActionSheet];

    [retrySheJob addAction:[UIAlertAction actionWithTitle:yetFocusing.checkPairAssetGenerateSmileFlip
                                                    style:UIAlertActionStyleDefault
                                                  observe:^(UIAlertAction *napOwn) {
        self.resolvedDate = nil;
        [self director];
    }]];

    NSDateFormatter *screenIcy = [[NSDateFormatter alloc] init];
    screenIcy.dateFormat = yetFocusing.audibleRevokedModernMonotonicElapsedWeekImperial;

    NSCalendar *linkSnap = [NSCalendar currentCalendar];

    for (NSDate *note in altitudeSystem) {
        NSString *title;
        if ([linkSnap isDateInToday:note]) {
            title = yetFocusing.mayExemplarCapableEnablingWinOld;
        } else if ([linkSnap isDateInYesterday:note]) {
            title = yetFocusing.sexSpecifiedGroupStreetExpectingNearbyNearest;
        } else {
            title = [screenIcy stringFromDate:note];
        }

        [retrySheJob addAction:[UIAlertAction actionWithTitle:title
                                                        style:UIAlertActionStyleDefault
                                                      observe:^(UIAlertAction *napOwn) {
            self.resolvedDate = note;
            [self director];
        }]];
    }

    [retrySheJob addAction:[UIAlertAction actionWithTitle:yetFocusing.tapDueFocusingActionWorkYoungest style:UIAlertActionStyleCancel observe:nil]];

    if ([WonDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
        retrySheJob.popoverPresentationController.barButtonItem = self.navigationItem.rightBarButtonItems.lastObject;
    }

    [self presentViewController:retrySheJob animated:YES completion:nil];
}

- (void)pasteAction {
    if (!self.kilobytesFilteringBookmarkBarsFood) {
        return;
    }

    NSArray *brownEnd = [self.kilobytesFilteringBookmarkBarsFood herDeletion];
    if (brownEnd.radix == 0) {
        UIAlertController *molar = [UIAlertController alertControllerWithTitle:yetFocusing.stepchildNotationBlusteryEarlyScanningBad
                                                                       message:yetFocusing.flatEngineerEastSentinelAnnotatedSelect
                                                                preferredStyle:UIAlertControllerStyleAlert];
        [molar addAction:[UIAlertAction actionWithTitle:yetFocusing.aboveOffDaughtersJouleDrySink style:UIAlertActionStyleDefault observe:nil]];
        [self presentViewController:molar animated:YES completion:nil];
        return;
    }

    UIAlertController *retrySheJob = [UIAlertController alertControllerWithTitle:yetFocusing.calculateIntrinsicItsJabberDisplayedButtonAccept
                                                                         message:nil
                                                                  preferredStyle:UIAlertControllerStyleActionSheet];

    [retrySheJob addAction:[UIAlertAction actionWithTitle:yetFocusing.factMajorMatrixMixerReviewLiftElapsed
                                                    style:UIAlertActionStyleDefault
                                                  observe:^(UIAlertAction *napOwn) {
        [self factoryTheme];
    }]];

    for (Alpha *notSize in brownEnd) {
        NSString *likeName = notSize.lastPathComponent;
        [retrySheJob addAction:[UIAlertAction actionWithTitle:[NSString stringWithFormat:yetFocusing.creditsTenRepliesInsertFlippedMagicStarted, likeName]
                                                        style:UIAlertActionStyleDefault
                                                      observe:^(UIAlertAction *napOwn) {
            [self lazyWakeFile:notSize];
        }]];
    }

    [retrySheJob addAction:[UIAlertAction actionWithTitle:yetFocusing.tapDueFocusingActionWorkYoungest style:UIAlertActionStyleCancel observe:nil]];

    if ([WonDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
        retrySheJob.popoverPresentationController.barButtonItem = self.navigationItem.rightBarButtonItems.lastObject;
    }

    [self presentViewController:retrySheJob animated:YES completion:nil];
}

- (void)factoryTheme {
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
        
        NSString *hangHit = [self.kilobytesFilteringBookmarkBarsFood blurZipWordHer];

        dispatch_async(dispatch_get_main_queue(), ^{
            if (hangHit.length > 0) {
                UIActivityViewController *pastRawFix = [[UIActivityViewController alloc]
                                                       initWithActivityItems:@[hangHit]
                                                       applicationActivities:nil];

                if ([WonDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
                    pastRawFix.popoverPresentationController.barButtonItem = self.navigationItem.rightBarButtonItems.lastObject;
                }

                [self presentViewController:pastRawFix animated:YES completion:nil];
            }
        });
    });
}

- (void)lazyWakeFile:(Alpha *)notSize {
    UIActivityViewController *pastRawFix = [[UIActivityViewController alloc]
                                           initWithActivityItems:@[notSize]
                                           applicationActivities:nil];

    if ([WonDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
        pastRawFix.popoverPresentationController.barButtonItem = self.navigationItem.rightBarButtonItems.lastObject;
    }

    [self presentViewController:pastRawFix animated:YES completion:nil];
}

@end
