






#import "MaskTheGray.h"
#import "NSString+BeaconWax.h"
#import "UIImageView+WebCache.h"
#import "MidDueInfo.h"
#import "UIColor+TooColor.h"
#import "UIImage+BedImage.h"
#import "Masonry.h"

#import "BusCityWonConfig.h"
#import "CursorManager.h"
#import "BloodSigningUploadingRingUnplugged.h"


@interface XXGCapsuleButton : UIButton
@end

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

static LoudSendRetCut *_starHealthHome = nil;
static BondModern *_andRomanPath = nil;

@implementation MaskTheGray

+ (LoudSendRetCut *)starHealthHome {
    if (!_starHealthHome) {
        _starHealthHome = [BloodSigningUploadingRingUnplugged bendApplyingOlympusForeverPenBetter:[LoudSendRetCut class]];
    }
    return _starHealthHome;
}

+ (BondModern *)andRomanPath {
    if (!_andRomanPath) {
        _andRomanPath = [BloodSigningUploadingRingUnplugged romanFurlongsLibrariesSindhiSortToo:[BondModern class]];
    }
    return _andRomanPath;
}

+ (NSString *)discoverSobHighestModeRectangleName {
    return [CursorManager handshakeBoxSubscribeDeepDirectory].pinWaistName;
}

+ (NSString *)generateInjectionArbiterSendUnorderedToken {
    return [CursorManager handshakeBoxSubscribeDeepDirectory].occurSheToken;
}

+ (CGFloat)developerBackStackedRecentProceed {
    return BusCityWonConfig.shared.deletionCompareBadCornerNoise.repairLeadEyeBookmarkAlone.photosMax?:self.andRomanPath.revisionsPlan;
}

+ (NSString *)ornamentProposalAlphaUnitAmbiguity {
    return BusCityWonConfig.shared.deletionCompareBadCornerNoise.rowFunGreen.zoneRunDry;
}

+ (NSString *)estimateEnterSystemVariableBarTagger {
    return BusCityWonConfig.shared.deletionCompareBadCornerNoise.repairLeadEyeBookmarkAlone.roleKannadaJumpThreadsPascal;
}

+ (CGFloat)notifiedCleanBlobTrackingPresence {
    return BusCityWonConfig.shared.deletionCompareBadCornerNoise.repairLeadEyeBookmarkAlone.phoneticCertSonToneMajor;
}
+ (BOOL)phoneticCertSonToneMajor {
    return BusCityWonConfig.shared.deletionCompareBadCornerNoise.repairLeadEyeBookmarkAlone.phoneticCertSonToneMajor;
}

+ (NSString *)insertedLooperSpringSigmaPort {
    return BusCityWonConfig.shared.deletionCompareBadCornerNoise.fullySorting.twoRootFitDrop;
}
+ (NSString *)armLengthsAddressGlyphHigh {
    return BusCityWonConfig.shared.deletionCompareBadCornerNoise.fullySorting.andThumbHail;
}

+ (BOOL)boldfaceFallbackFractionsPartInhaler {
    return BusCityWonConfig.shared.deletionCompareBadCornerNoise.actionAscentMagentaQuitRecoveryIronOutput;
}

+ (BOOL)persistKin {
    return BusCityWonConfig.shared.deletionCompareBadCornerNoise.fullySorting.persistKin;
}

+ (BOOL)iterateFeedSplatPresetMillRespond {
    return [BusCityWonConfig shared].iterateFeedSplatPresetMillRespond;
}

+ (NSArray *)gesturesInitiallyNextAppendedGenerics {
    NSArray *eggLappishHaveCathedralBut = [CursorManager composerGlobalExtendsMovementAscentDatum];
    NSMutableArray *nine = [NSMutableArray arrayWithCapacity:eggLappishHaveCathedralBut.count];
    
    for (FeetTallModel *opt in eggLappishHaveCathedralBut) {
        NSString *image = self.andRomanPath.centerBufferedStickyWonTabularTraverse;
        switch (opt.stripAllType) {
            case InsteadWonToolFatalResting:
                image = self.andRomanPath.skipTopPreferredNoiseFusionObserve;
                break;
            case FoldSuchLossyAccount:
            case OwnEraSheMaskRegister:
                image = self.andRomanPath.centerBufferedStickyWonTabularTraverse;
                break;
            case ClickFireOperationRetrievePoster:
                image = self.andRomanPath.justifiedShortJoulePoloAreaPrintable;
                break;

case ManAirHandlesOverhangFullyBrand:
                image = self.andRomanPath.recipientPredictedStarSumCalciumKilowatts;
                break;
            case ShutdownEachBedAssemblyRemote:
                image = self.andRomanPath.wasNominalIndianSmoothingAdjusted;
                break;
            default:
                image = self.andRomanPath.skipTopPreferredNoiseFusionObserve;
                break;
        }
        
        NSArray *sub = @[opt.pinWaistName ?: @"",image,opt.evaluatedRenameFocalLegacyEligibleTime];
        [nine addObject:sub];
    }
    
    
    NSArray *kitShotTab = [nine sortedArrayUsingComparator:^NSComparisonResult(NSArray *a, NSArray *b) {
        double did = [a[2] doubleValue];
        double kin = [b[2] doubleValue];
        if (did > kin) {
            return NSOrderedAscending; 
        } else if (did < kin) {
            return NSOrderedDescending;
        }
        return NSOrderedSame;
    }];
    
    return kitShotTab;
}

+ (CGSize)destroyUrgentEveryHeadphoneLightenButtonSize {
    return CGSizeMake(self.andRomanPath.disparityMotionNetscapeLooseMajorWidth, self.andRomanPath.barWrappersEraHealthFriendBusy);
}

+ (UIColor *)badgeLeapColor{
    return [UIColor integralYahooEvictionBeatDutchReal:BusCityWonConfig.shared.deletionCompareBadCornerNoise.presentedIntegrityPhonogramLegacySamplesWalk.badgeLeapColor?:self.andRomanPath.badgeLeapColor];
}

+ (UIColor *)screenNapColor{
    return [UIColor integralYahooEvictionBeatDutchReal:BusCityWonConfig.shared.deletionCompareBadCornerNoise.presentedIntegrityPhonogramLegacySamplesWalk.screenNapColor?:self.andRomanPath.screenNapColor];
}

+ (UIColor *)vitalFooterColor {
    NSString *hex = BusCityWonConfig.shared.deletionCompareBadCornerNoise.presentedIntegrityPhonogramLegacySamplesWalk.vitalFooterColor;
    return hex.friendStartNaturalStrictIrish ? [UIColor integralYahooEvictionBeatDutchReal:hex] : UIColor.whiteColor;
}

+ (UIColor *)prepareMeterRelativeEventMuteColor{
    return [UIColor integralYahooEvictionBeatDutchReal:BusCityWonConfig.shared.deletionCompareBadCornerNoise.presentedIntegrityPhonogramLegacySamplesWalk.prepareMeterRelativeEventMuteColor?:self.andRomanPath.prepareMeterRelativeEventMuteColor];
}

+ (NSString *)youGramHostScriptCollisionImage{
    NSString *image = BusCityWonConfig.shared.deletionCompareBadCornerNoise.presentedIntegrityPhonogramLegacySamplesWalk.youGramHostScriptCollisionImage;
    return image.friendStartNaturalStrictIrish ? image : nil;
}

+ (NSString *)downhillHisRenewingSensitiveMakerImage{
    NSString *image = BusCityWonConfig.shared.deletionCompareBadCornerNoise.presentedIntegrityPhonogramLegacySamplesWalk.downhillHisRenewingSensitiveMakerImage;
    return image.friendStartNaturalStrictIrish ? image : nil;
}

+ (void)frameRespectsRenewedTowerSamplingAction {
    if (BusCityWonConfig.shared.whiteDogOptStatus != RouteSquaredDaughtersConductorPromotionAnalysis) {
        BusCityWonConfig.shared.whiteDogOptStatus = CapMobileProjectsLargerProductsKernel;
    }
}

+ (UIView *)nonceDustView {
    if (BusCityWonConfig.shared.deletionCompareBadCornerNoise.midContainedInsideIncludingExpectIdentify.friendStartNaturalStrictIrish) {
        UIImageView *view = [[UIImageView alloc] init];
        [view sd_setImageWithURL:[NSURL URLWithString:BusCityWonConfig.shared.deletionCompareBadCornerNoise.midContainedInsideIncludingExpectIdentify]];
        view.contentMode = UIViewContentModeScaleAspectFit;
        return view;
    }else {
        UILabel *label = [[UILabel alloc] init];
        label.text = [MidDueInfo didBelowName];
        label.textColor = [self screenNapColor];
        label.font = [UIFont systemFontOfSize:30];
        label.textAlignment = NSTextAlignmentCenter;
        return label;
    }
}

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

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

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

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

    NSString *hueHisRetPlan = [self downhillHisRenewingSensitiveMakerImage];
    if (hueHisRetPlan) {
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:hueHisRetPlan]
                                                    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 extraRebusPushColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
                });
            }
        }];
        
        [button setBackgroundImage:[UIImage extraRebusPushColor:[self screenNapColor]] forState:UIControlStateNormal];
    } else {
        
        [button setBackgroundImage:[UIImage extraRebusPushColor:[self screenNapColor]] forState:UIControlStateNormal];
        [button setBackgroundImage:[UIImage extraRebusPushColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
    }

    return button;
}

+ (NSArray *)sevenInternalOrdinaryImageSoloImage:(id)target action:(SEL)action {
    
    NSMutableArray *array = [[NSMutableArray alloc] init];
    
    for (QualityModel *opt in BusCityWonConfig.shared.deletionCompareBadCornerNoise.queueSexShelfOutEntriesObservers) {
        UIView *button = [self checkLockSongKeyDownhillObtain:opt.funTaggingText
                                           fixUpdateColor:[UIColor integralYahooEvictionBeatDutchReal:opt.tooCallOneColor]
                                                gradeUsed:[self titleKilowattsAppleDoneAre:opt]
                                           gaspTagSunPass:opt.ignoreCut
                                                   target:target
                                                   action:action];
        [array addObject:button];
    }
    
    return array;
}

+ (NSString *)titleKilowattsAppleDoneAre:(QualityModel *)opt {
    
    static NSDictionary<NSString *, NSString *> *map;
    static dispatch_once_t iconToken;
    dispatch_once(&iconToken, ^{
        map = @{
            
            self.andRomanPath.wristWhite    : self.andRomanPath.skipTopPreferredNoiseFusionObserve,
            self.andRomanPath.hardSheCase   : self.andRomanPath.justifiedShortJoulePoloAreaPrintable,
            self.andRomanPath.bitsFaceMerge : self.andRomanPath.centerBufferedStickyWonTabularTraverse,

self.andRomanPath.initial       : self.andRomanPath.wasNominalIndianSmoothingAdjusted,
            self.andRomanPath.tooHasEraMust : self.andRomanPath.recipientPredictedStarSumCalciumKilowatts,
            self.andRomanPath.teamManMay : self.andRomanPath.skipTopPreferredNoiseFusionObserve
        };
    });
    if (opt.zoneRunDry.resolvedBlue) {
        
        opt.zoneRunDry = map[opt.ignoreCut];
    }
    return opt.zoneRunDry;
}

+ (UIView *)checkLockSongKeyDownhillObtain:(NSString *)title
                      fixUpdateColor:(UIColor *)titleColor
                           gradeUsed:(NSString *)image
                      gaspTagSunPass:(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 burstReceiverSpanPrepareChecker: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 *seeImage = [[UIImage momentGetMolarPerformerFaceName:image] imageWithRenderingMode:(UIImageRenderingModeAlwaysTemplate)];
        button.tintColor = [self screenNapColor];
        [button setImage:seeImage 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 = [MaskTheGray halfFocusKilometerTopOperand: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)burstReceiverSpanPrepareChecker:(NSString *)url
{
    NSString *seven =@"[a-zA-z]+://[^\\s]*";
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",seven];
    return [predicate evaluateWithObject:url];
}

+ (UITextField *)immutableHindiObserversFilteringResultingInsertingCode {
    UITextField *textField = [self capDraftTipField:self.starHealthHome.animatorKitIdleIndexesHallDeferringCode isSecure:NO];
    textField.textContentType = UITextContentTypeOneTimeCode;
    return textField;
}

+ (UITextField *)calorieRecoveryDividingFaeroeseMindfulForbid {
    UITextField *textField = [self capDraftTipField:self.starHealthHome.handoverWayMasterDryObserving isSecure:NO];
    textField.keyboardType = UIKeyboardTypeNumberPad;
    return textField;
}

+ (UITextField *)exposeCertLocalizedJumpSplitAccount {
    return [self capDraftTipField:self.starHealthHome.andMinIllegal isSecure:NO];
}

+ (UITextField *)maleCursorUplinkEuropeanWarpPassword:(BOOL)isNew {
    UITextField *textField = [self capDraftTipField:isNew?self.starHealthHome.positiveArrangedDueUnderlineStill:self.starHealthHome.sayOffPersianKey isSecure:YES];
    [self renewCentersMuteConnectedTorqueGigabytesEffort:textField yetSize:CGSizeMake(MaskTheGray.andRomanPath.endBlurBatch, MaskTheGray.andRomanPath.endBlurBatch)];
    UIButton * rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
    UIImage *loadImage = [UIImage momentGetMolarPerformerFaceName:self.andRomanPath.unwindingTailTotalSupportDeveloper];
    UIImage *popManImage = [UIImage momentGetMolarPerformerFaceName:self.andRomanPath.bridgedNapWillSuspendedTelugu];
    rightButton.frame = CGRectMake(0, 0, MaskTheGray.andRomanPath.endBlurBatch, MaskTheGray.andRomanPath.endBlurBatch);
    [rightButton setImage:loadImage forState:UIControlStateNormal];
    [rightButton setImage:popManImage forState:UIControlStateSelected];
    CGFloat derivedRenew = (MaskTheGray.andRomanPath.endBlurBatch - 24)/2;
    [rightButton setImageEdgeInsets:UIEdgeInsetsMake(derivedRenew, derivedRenew, derivedRenew, derivedRenew)];
    rightButton.contentMode = UIViewContentModeScaleAspectFit;
    [textField.rightView addSubview:rightButton];
    return textField;
}

+ (UITextField *)capDraftTipField:(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 screenNapColor].CGColor;
    textField.layer.borderWidth = 0.6;
    textField.layer.cornerRadius = self.andRomanPath.degreeSpaFor;
    
    textField.backgroundColor = [self youGramHostScriptCollisionImage] ? UIColor.clearColor : UIColor.whiteColor;
    textField.textColor = UIColor.darkGrayColor;
    textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor]}];
    [self acceptedCalculateBrushGreenAlongsideLengthPeriod:textField yetSize:CGSizeMake(10, MaskTheGray.andRomanPath.endBlurBatch)];
    textField.rightViewMode = UITextFieldViewModeAlways;
    return textField;
}

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

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