






#import "TooCloudSun.h"
#import "NSString+DrumVowel.h"
#import "UIImageView+WebCache.h"
#import "SenderInfo.h"
#import "UIColor+PubColor.h"
#import "UIImage+HasImage.h"
#import "Masonry.h"

#import "CyclingHisConfig.h"
#import "StringManager.h"
#import "UtteranceProductsPublishFilenameRollback.h"


@interface XXGCapsuleButton : UIButton
@end

@implementation XXGCapsuleButton
- (void)layoutSubviews {
    [super layoutSubviews];
    self.layer.cornerRadius = CGRectGetHeight(self.bounds) / 2.0;
}
@end

static SeekTenWayPing *_methodCaseItem = nil;
static StorageEnd *_seeFocusSlab = nil;

@implementation TooCloudSun

+ (SeekTenWayPing *)methodCaseItem {
    if (!_methodCaseItem) {
        _methodCaseItem = [UtteranceProductsPublishFilenameRollback hitElementsAcceptingLexiconWhoQuotation:[SeekTenWayPing class]];
    }
    return _methodCaseItem;
}

+ (StorageEnd *)seeFocusSlab {
    if (!_seeFocusSlab) {
        _seeFocusSlab = [UtteranceProductsPublishFilenameRollback desktopArrayKinIcelandicMapUpside:[StorageEnd class]];
    }
    return _seeFocusSlab;
}

+ (NSString *)lineHusbandSafariHelpLazyName {
    return [StringManager provinceRejectTwistAloneMaltese].swimmingName;
}

+ (NSString *)catalanKelvinBackupUnitReturnToken {
    return [StringManager provinceRejectTwistAloneMaltese].butLargeToken;
}

+ (CGFloat)serifDrawingLemmaItalicDaughters {
    return CyclingHisConfig.shared.panExitsLanguagesLatencySun.enclosingWeeklyStaticKerningWrite.fillGreek?:self.seeFocusSlab.bendPhasePath;
}

+ (NSString *)bitWrestlingHowChapterAuxiliary {
    return CyclingHisConfig.shared.panExitsLanguagesLatencySun.hitBuddhist.introValue;
}

+ (NSString *)signExtensionLaterNotifyCompressUnlikely {
    return CyclingHisConfig.shared.panExitsLanguagesLatencySun.enclosingWeeklyStaticKerningWrite.highestEscapesShowersProjectsFilter;
}

+ (CGFloat)jobAttitudeExtendNothingAny {
    return CyclingHisConfig.shared.panExitsLanguagesLatencySun.enclosingWeeklyStaticKerningWrite.relationSchemesMidTorchStay;
}
+ (BOOL)relationSchemesMidTorchStay {
    return CyclingHisConfig.shared.panExitsLanguagesLatencySun.enclosingWeeklyStaticKerningWrite.relationSchemesMidTorchStay;
}

+ (NSString *)wakeDescribeEngineMoireButterfly {
    return CyclingHisConfig.shared.panExitsLanguagesLatencySun.barsDogInfer.anyAxesAutoBag;
}
+ (NSString *)tintCollectorMisplacedStillRet {
    return CyclingHisConfig.shared.panExitsLanguagesLatencySun.barsDogInfer.tenPullRoman;
}

+ (BOOL)treeMaskRatioChainPlate {
    return CyclingHisConfig.shared.panExitsLanguagesLatencySun.producedWebpageArrowDigitPrepareDividerSlash;
}

+ (BOOL)jobHasStar {
    return CyclingHisConfig.shared.panExitsLanguagesLatencySun.barsDogInfer.jobHasStar;
}

+ (BOOL)caretRestoreFinalizeTowerSmallerRest {
    return [CyclingHisConfig shared].caretRestoreFinalizeTowerSmallerRest;
}

+ (NSArray *)funDepthLossSystolicCorrupt {
    NSArray *beaconUploadQualityHitYet = [StringManager unifyInstallsMindSoftnessAlienPlace];
    NSMutableArray *flag = [NSMutableArray arrayWithCapacity:beaconUploadQualityHitYet.count];
    
    for (PriceSixOcean *era in beaconUploadQualityHitYet) {
        NSString *image = self.seeFocusSlab.nowDirectAcceptingDesignThroughArtwork;
        switch (era.magicSinType) {
            case AcceptingPostalPotassiumFragmentsWin:
                image = self.seeFocusSlab.swashesCoverBagFoldCaffeineArt;
                break;
            case CentralsOceanAccount:
            case AutoGenreHallRegister:
                image = self.seeFocusSlab.nowDirectAcceptingDesignThroughArtwork;
                break;
            case MagneticChallengePitchPrefersAnimator:
                image = self.seeFocusSlab.tabDisabledQuarterSoftLogFit;
                break;

case NowFloatDiastolicRetryAssertEditor:
                image = self.seeFocusSlab.howFirstSentinelShapeFetchClinical;
                break;
            case IcyProvidingOneIntegratePremature:
                image = self.seeFocusSlab.declinedScriptsSpecifierLeftHex;
                break;
            default:
                image = self.seeFocusSlab.swashesCoverBagFoldCaffeineArt;
                break;
        }
        
        NSArray *sun = @[era.swimmingName ?: @"",image,era.winEarFarsiDarkenMalayalamTime];
        [flag addObject:sun];
    }
    
    
    NSArray *wordMinder = [flag sortedArrayUsingComparator:^NSComparisonResult(NSArray *a, NSArray *b) {
        double did = [a[2] doubleValue];
        double how = [b[2] doubleValue];
        if (did > how) {
            return NSOrderedAscending; 
        } else if (did < how) {
            return NSOrderedDescending;
        }
        return NSOrderedSame;
    }];
    
    return wordMinder;
}

+ (CGSize)feetDeviationVerticalAttachedHisFurlongsSize {
    return CGSizeMake(self.seeFocusSlab.bookmarkUtilitiesResolvedUnlockedHaveWidth, self.seeFocusSlab.integrateDarwinScrollingLetterMarkEnabling);
}

+ (UIColor *)ouncesPopColor{
    return [UIColor roundSoloistSpectralLookupCopyrightSuggested:CyclingHisConfig.shared.panExitsLanguagesLatencySun.readerAwayMagentaPopIllContrast.ouncesPopColor?:self.seeFocusSlab.ouncesPopColor];
}

+ (UIColor *)semicolonColor{
    return [UIColor roundSoloistSpectralLookupCopyrightSuggested:CyclingHisConfig.shared.panExitsLanguagesLatencySun.readerAwayMagentaPopIllContrast.semicolonColor?:self.seeFocusSlab.semicolonColor];
}

+ (UIColor *)observerYouColor {
    NSString *hex = CyclingHisConfig.shared.panExitsLanguagesLatencySun.readerAwayMagentaPopIllContrast.observerYouColor;
    return hex.storylineKeepClickCircleLost ? [UIColor roundSoloistSpectralLookupCopyrightSuggested:hex] : UIColor.whiteColor;
}

+ (UIColor *)zipBloodDrainDisplayedBaselinesColor{
    return [UIColor roundSoloistSpectralLookupCopyrightSuggested:CyclingHisConfig.shared.panExitsLanguagesLatencySun.readerAwayMagentaPopIllContrast.zipBloodDrainDisplayedBaselinesColor?:self.seeFocusSlab.zipBloodDrainDisplayedBaselinesColor];
}

+ (NSString *)fairSolidRadiansMoodCatalystImage{
    NSString *image = CyclingHisConfig.shared.panExitsLanguagesLatencySun.readerAwayMagentaPopIllContrast.fairSolidRadiansMoodCatalystImage;
    return image.storylineKeepClickCircleLost ? image : nil;
}

+ (NSString *)reminderThicknessYetInverseShutterImage{
    NSString *image = CyclingHisConfig.shared.panExitsLanguagesLatencySun.readerAwayMagentaPopIllContrast.reminderThicknessYetInverseShutterImage;
    return image.storylineKeepClickCircleLost ? image : nil;
}

+ (void)windowOvulationThatBeganFiveAction {
    if (CyclingHisConfig.shared.invertedHisStatus != PositionsLongGuideNineOperandShare) {
        CyclingHisConfig.shared.invertedHisStatus = ExtensionHundredRecoveryLoseReferentBordered;
    }
}

+ (UIView *)unlimitedView {
    if (CyclingHisConfig.shared.panExitsLanguagesLatencySun.integerPivotQueueSmoothingSubscribeHighlight.storylineKeepClickCircleLost) {
        UIImageView *view = [[UIImageView alloc] init];
        [view sd_setImageWithURL:[NSURL URLWithString:CyclingHisConfig.shared.panExitsLanguagesLatencySun.integerPivotQueueSmoothingSubscribeHighlight]];
        view.contentMode = UIViewContentModeScaleAspectFit;
        return view;
    }else {
        UILabel *label = [[UILabel alloc] init];
        label.text = [SenderInfo binLearnName];
        label.textColor = [self semicolonColor];
        label.font = [UIFont systemFontOfSize:30];
        label.textAlignment = NSTextAlignmentCenter;
        return label;
    }
}

+ (UILabel *)saveReceivedSmallestBasicTrigger:(NSString *)title {
    UILabel *label = [UILabel new];
    label.text = title;
    label.textColor = [self semicolonColor];
    label.font = [UIFont systemFontOfSize:13];
    return label;
}

+ (UIButton *)acquireMixerModifiedModeSafety:(NSString *)title {
    UIButton *button = [[UIButton alloc] init];
    [button setTitle:title forState:UIControlStateNormal];
    [button setTitleColor:[self semicolonColor] forState:UIControlStateNormal];
    [button setTitleColor:UIColor.lightGrayColor forState:UIControlStateHighlighted];
    button.titleLabel.font = [UIFont systemFontOfSize:13];
    return button;
}

+ (UIButton *)mouthExtentsLettishSquaresMonotonicColor:(NSString *)title {

    XXGCapsuleButton *button = [XXGCapsuleButton buttonWithType:UIButtonTypeCustom];
    [button setTitle:title forState:UIControlStateNormal];
    [button setTitleColor:[self observerYouColor] forState:UIControlStateNormal];
    button.titleLabel.font = [UIFont systemFontOfSize:16];
    
    button.layer.masksToBounds = YES;

    NSString *saltTagAllFat = [self reminderThicknessYetInverseShutterImage];
    if (saltTagAllFat) {
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:saltTagAllFat]
                                                    options:0
                                                   progress:nil
                                                  completed:^(UIImage *image, NSData *data, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
            if (image) {
                dispatch_async(dispatch_get_main_queue(), ^{
                    [button setBackgroundImage:image forState:UIControlStateNormal];
                    [button setBackgroundImage:[UIImage raiseHisIcyTheColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
                });
            }
        }];
        
        [button setBackgroundImage:[UIImage raiseHisIcyTheColor:[self semicolonColor]] forState:UIControlStateNormal];
    } else {
        
        [button setBackgroundImage:[UIImage raiseHisIcyTheColor:[self semicolonColor]] forState:UIControlStateNormal];
        [button setBackgroundImage:[UIImage raiseHisIcyTheColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
    }

    return button;
}

+ (NSArray *)personDisabledSpaApplyErrorMax:(id)target action:(SEL)action {
    
    NSMutableArray *array = [[NSMutableArray alloc] init];
    
    for (ExtractModel *era in CyclingHisConfig.shared.panExitsLanguagesLatencySun.lossPinAssertionHandRawReversed) {
        UIView *button = [self foundArgumentsWonDarkerRecycleExtends:era.pubKitHeadText
                                           useSourceColor:[UIColor roundSoloistSpectralLookupCopyrightSuggested:era.oldFaxHelpColor]
                                                negateHow:[self countSunBestUppercaseStamp:era]
                                           ourHeadBeatAir:era.builtRope
                                                   target:target
                                                   action:action];
        [array addObject:button];
    }
    
    return array;
}

+ (NSString *)countSunBestUppercaseStamp:(ExtractModel *)era {
    
    static NSDictionary<NSString *, NSString *> *map;
    static dispatch_once_t waitToken;
    dispatch_once(&waitToken, ^{
        map = @{
            
            self.seeFocusSlab.wetLessLog    : self.seeFocusSlab.swashesCoverBagFoldCaffeineArt,
            self.seeFocusSlab.retryJobMin   : self.seeFocusSlab.tabDisabledQuarterSoftLogFit,
            self.seeFocusSlab.loopSimulates : self.seeFocusSlab.nowDirectAcceptingDesignThroughArtwork,

self.seeFocusSlab.allHint       : self.seeFocusSlab.declinedScriptsSpecifierLeftHex,
            self.seeFocusSlab.desiredPoster : self.seeFocusSlab.howFirstSentinelShapeFetchClinical,
            self.seeFocusSlab.armRawSend : self.seeFocusSlab.swashesCoverBagFoldCaffeineArt
        };
    });
    if (era.introValue.voiceFooters) {
        
        era.introValue = map[era.builtRope];
    }
    return era.introValue;
}

+ (UIView *)foundArgumentsWonDarkerRecycleExtends:(NSString *)title
                      useSourceColor:(UIColor *)titleColor
                           negateHow:(NSString *)image
                      ourHeadBeatAir:(NSString *)idf
                              target:(id)target
                              action:(SEL)action {
    
    UIView *view = [[UIView alloc] init];
    view.backgroundColor = UIColor.clearColor;
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.layer.masksToBounds = YES;
    button.accessibilityIdentifier = idf;
    
    if ([self highFunCreatedAlbanianCovariant:image]) {
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:image] options:0 progress:nil completed:^(UIImage * _Nullable image2, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
            dispatch_async(dispatch_get_main_queue(), ^{
                [button setImage:image2 forState:UIControlStateNormal];
            });
        }];

    }else {
        UIImage *putImage = [[UIImage fractionsVirtualSamplingOutdoorOverName:image] imageWithRenderingMode:(UIImageRenderingModeAlwaysTemplate)];
        button.tintColor = [self semicolonColor];
        [button setImage:putImage forState:UIControlStateNormal];
    }
    
    button.contentEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 0);
    [[button imageView] setContentMode:UIViewContentModeScaleAspectFill];
    button.contentHorizontalAlignment= UIControlContentHorizontalAlignmentFill;
    button.contentVerticalAlignment = UIControlContentVerticalAlignmentFill;
    [button addTarget:target action:action forControlEvents:(UIControlEventTouchUpInside)];
    [view addSubview:button];
    
    UILabel *label = [TooCloudSun saveReceivedSmallestBasicTrigger:title];
    label.textColor = titleColor;
    label.textAlignment = NSTextAlignmentCenter;
    label.font = [UIFont systemFontOfSize:12];
    label.numberOfLines = 0;
    [view addSubview:label];
    
    [button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(view);
        make.size.equalTo(view);
    }];
    
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(view.mas_bottom).offset(8);
        make.left.right.equalTo(view);
    }];
    
    return view;
}

+ (BOOL)highFunCreatedAlbanianCovariant:(NSString *)url
{
    NSString *lemma =@"[a-zA-z]+://[^\\s]*";
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",lemma];
    return [predicate evaluateWithObject:url];
}

+ (UITextField *)cloudPanEarOperatingAnySourcesCode {
    UITextField *textField = [self deferredIcyField:self.methodCaseItem.refinedReturnsActivateUniversalWristOuncesCode isSecure:NO];
    textField.textContentType = UITextContentTypeOneTimeCode;
    return textField;
}

+ (UITextField *)rankGraphicsIcyDeepCousinStar {
    UITextField *textField = [self deferredIcyField:self.methodCaseItem.bannerDefineRestartDominantUnique isSecure:NO];
    textField.keyboardType = UIKeyboardTypeNumberPad;
    return textField;
}

+ (UITextField *)optionBannerHexChainDidAccount {
    return [self deferredIcyField:self.methodCaseItem.tomorrowLower isSecure:NO];
}

+ (UITextField *)sumContrastPublicPanCollapsesPassword:(BOOL)isNew {
    UITextField *textField = [self deferredIcyField:isNew?self.methodCaseItem.detailHaveScriptsClockwiseBuild:self.methodCaseItem.naturalVortexKey isSecure:YES];
    [self boundaryVignetteCounterEggExceptionSpanMirrored:textField daySize:CGSizeMake(TooCloudSun.seeFocusSlab.plugTraitTwo, TooCloudSun.seeFocusSlab.plugTraitTwo)];
    UIButton * rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
    UIImage *longImage = [UIImage fractionsVirtualSamplingOutdoorOverName:self.seeFocusSlab.sessionQuarterReplacedRadioModerate];
    UIImage *endSawImage = [UIImage fractionsVirtualSamplingOutdoorOverName:self.seeFocusSlab.signWideAmbienceSegmentedContinued];
    rightButton.frame = CGRectMake(0, 0, TooCloudSun.seeFocusSlab.plugTraitTwo, TooCloudSun.seeFocusSlab.plugTraitTwo);
    [rightButton setImage:longImage forState:UIControlStateNormal];
    [rightButton setImage:endSawImage forState:UIControlStateSelected];
    CGFloat keyUndoDaily = (TooCloudSun.seeFocusSlab.plugTraitTwo - 24)/2;
    [rightButton setImageEdgeInsets:UIEdgeInsetsMake(keyUndoDaily, keyUndoDaily, keyUndoDaily, keyUndoDaily)];
    rightButton.contentMode = UIViewContentModeScaleAspectFit;
    [textField.rightView addSubview:rightButton];
    return textField;
}

+ (UITextField *)deferredIcyField:(NSString *)placeholder isSecure:(BOOL)isSecure {
    UITextField *textField = [UITextField new];
    textField.secureTextEntry = isSecure;
    textField.clearButtonMode = UITextFieldViewModeWhileEditing;
    textField.autocorrectionType = UITextAutocorrectionTypeNo;
    textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
    textField.font = [UIFont systemFontOfSize:15];
    textField.layer.borderColor = [self semicolonColor].CGColor;
    textField.layer.borderWidth = 0.6;
    textField.layer.cornerRadius = self.seeFocusSlab.swapTotalToo;
    
    textField.backgroundColor = [self fairSolidRadiansMoodCatalystImage] ? UIColor.clearColor : UIColor.whiteColor;
    textField.textColor = UIColor.darkGrayColor;
    textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor]}];
    [self adjustedWaterGivenExternalMoleTimeSharing:textField daySize:CGSizeMake(10, TooCloudSun.seeFocusSlab.plugTraitTwo)];
    textField.rightViewMode = UITextFieldViewModeAlways;
    return textField;
}

+ (void)adjustedWaterGivenExternalMoleTimeSharing:(UITextField *)textField daySize:(CGSize)size
{
    CGRect frame = {{0,0},size};
    UIView *minorEgg = [[UIView alloc] initWithFrame:frame];
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = minorEgg;
}

+ (void)boundaryVignetteCounterEggExceptionSpanMirrored:(UITextField *)textField daySize:(CGSize)size
{
    CGRect frame = {{0,0},size};
    UIView *lingerSay = [[UIView alloc] initWithFrame:frame];
    textField.rightViewMode = UITextFieldViewModeAlways;
    textField.rightView = lingerSay;
}
@end
