






#import "SchemesSong.h"
#import "NSString+RetainWax.h"
#import "UIImageView+WebCache.h"
#import "DogCanInfo.h"
#import "UIColor+RedColor.h"
#import "UIImage+TooImage.h"
#import "Masonry.h"

#import "PricePointConfig.h"
#import "SeasonManager.h"
#import "AscendedFailLiftChromaticLambda.h"


@interface XXGCapsuleButton : UIButton
@end

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

static SobShowItemAsk *_albumHexAgeFix = nil;
static BlueAmpere *_targetRemote = nil;

@implementation SchemesSong

+ (SobShowItemAsk *)albumHexAgeFix {
    if (!_albumHexAgeFix) {
        _albumHexAgeFix = [AscendedFailLiftChromaticLambda adapterBitRepliesRepairCauseMarquee:[SobShowItemAsk class]];
    }
    return _albumHexAgeFix;
}

+ (BlueAmpere *)targetRemote {
    if (!_targetRemote) {
        _targetRemote = [AscendedFailLiftChromaticLambda pairTipContactsGenericsTheReserved:[BlueAmpere class]];
    }
    return _targetRemote;
}

+ (NSString *)binarySuddenAnyImageSortName {
    return [SeasonManager expertPatternsPanMasterFollower].sumCauseName;
}

+ (NSString *)boxThresholdFourSelectLargeToken {
    return [SeasonManager expertPatternsPanMasterFollower].dashHangToken;
}

+ (CGFloat)matrixUptimeFeatStartingToo {
    return PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.explicitBoundingMutationRingAudio.traitBest?:self.targetRemote.midAreRetried;
}

+ (NSString *)footnoteOutStoreLambdaGender {
    return PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.sayManFoggy.loudFusion;
}

+ (NSString *)youExportOrderingSignalingSaveTouch {
    return PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.explicitBoundingMutationRingAudio.smallestTrimmingCaseResourceIndirect;
}

+ (CGFloat)validitySobAtomicOutExponents {
    return PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.explicitBoundingMutationRingAudio.mindfulSmartWakeNegativeOrdinals;
}
+ (BOOL)mindfulSmartWakeNegativeOrdinals {
    return PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.explicitBoundingMutationRingAudio.mindfulSmartWakeNegativeOrdinals;
}

+ (NSString *)slavicTurnLateRemovalEmergency {
    return PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.whiteTalkMax.ratioButterfly;
}
+ (NSString *)hardFarLinearKindFeed {
    return PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.whiteTalkMax.postAlienCan;
}

+ (BOOL)hostPathOldViewScanner {
    return PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.conditionReaderWinTrackInitiatedAreaExtends;
}

+ (BOOL)spaBoxAtom {
    return PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.whiteTalkMax.spaBoxAtom;
}

+ (BOOL)indentBookmarkDescribesBlendCurveTab {
    return [PricePointConfig shared].indentBookmarkDescribesBlendCurveTab;
}

+ (NSArray *)launchLocalizedSigningScaleFar {
    NSArray *displayUnlikelyDisplaysEchoCampaign = [SeasonManager predictedRespectsCountedHigherClockwiseFunk];
    NSMutableArray *thin = [NSMutableArray arrayWithCapacity:displayUnlikelyDisplaysEchoCampaign.count];
    
    for (TagsRootPrice *saw in displayUnlikelyDisplaysEchoCampaign) {
        NSString *image = self.targetRemote.oxygenProximityDatumMaxDryUndo;
        switch (saw.heapSizeType) {
            case SlashesCatalogInventoryDesktopTab:
                image = self.targetRemote.displayedDownloadForwardsManualUseFootball;
                break;
            case ShotMisplacedAccount:
            case BurnShotDigitRegister:
                image = self.targetRemote.oxygenProximityDatumMaxDryUndo;
                break;
            case OrderingShareTopDefinedRotation:
                image = self.targetRemote.removableNotifyCapturedPreciseHiddenFlush;
                break;

case CalorieMomentTipExpensiveRightWidth:
                image = self.targetRemote.containedBurnRecoveredFarRawBox;
                break;
            case QualityExitsRestoreSessionsUsage:
                image = self.targetRemote.protocolRaceOnlyNotStandard;
                break;
            default:
                image = self.targetRemote.displayedDownloadForwardsManualUseFootball;
                break;
        }
        
        NSArray *arm = @[saw.sumCauseName ?: @"",image,saw.stopRefreshMismatchDetermineUploadTime];
        [thin addObject:arm];
    }
    
    
    NSArray *editorFold = [thin sortedArrayUsingComparator:^NSComparisonResult(NSArray *a, NSArray *b) {
        double fit = [a[2] doubleValue];
        double two = [b[2] doubleValue];
        if (fit > two) {
            return NSOrderedAscending; 
        } else if (fit < two) {
            return NSOrderedDescending;
        }
        return NSOrderedSame;
    }];
    
    return editorFold;
}

+ (CGSize)tradCellphoneFirstArtsAgeMountSize {
    return CGSizeMake(self.targetRemote.mostJobBeenFormatRenderWidth, self.targetRemote.baseArtMaxImplicitArteryMix);
}

+ (UIColor *)packShearColor{
    return [UIColor layerPongOddProvinceCalorieManaged:PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.specialWinBankAcrossFirstScan.packShearColor?:self.targetRemote.packShearColor];
}

+ (UIColor *)domainCatColor{
    return [UIColor layerPongOddProvinceCalorieManaged:PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.specialWinBankAcrossFirstScan.domainCatColor?:self.targetRemote.domainCatColor];
}

+ (UIColor *)ownInteriorColor {
    NSString *hex = PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.specialWinBankAcrossFirstScan.ownInteriorColor;
    return hex.overageCapturingLossIslamicPublic ? [UIColor layerPongOddProvinceCalorieManaged:hex] : UIColor.whiteColor;
}

+ (UIColor *)pubNauticalModeCarWrapColor{
    return [UIColor layerPongOddProvinceCalorieManaged:PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.specialWinBankAcrossFirstScan.pubNauticalModeCarWrapColor?:self.targetRemote.pubNauticalModeCarWrapColor];
}

+ (NSString *)brushBrownSentenceAliveRedoImage{
    NSString *image = PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.specialWinBankAcrossFirstScan.brushBrownSentenceAliveRedoImage;
    return image.overageCapturingLossIslamicPublic ? image : nil;
}

+ (NSString *)historyBusOuncesCollapseFastImage{
    NSString *image = PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.specialWinBankAcrossFirstScan.historyBusOuncesCollapseFastImage;
    return image.overageCapturingLossIslamicPublic ? image : nil;
}

+ (void)surrogateFemaleOutputSayRefusedAction {
    if (PricePointConfig.shared.clampBusFitStatus != DeviceAloneSensorKeyRatioStake) {
        PricePointConfig.shared.clampBusFitStatus = ArgumentWeightParticleRedirectCombinedCredits;
    }
}

+ (UIView *)hybridBarView {
    if (PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.guaraniBayerAlcoholBookmarksBackwardsAbsolute.overageCapturingLossIslamicPublic) {
        UIImageView *view = [[UIImageView alloc] init];
        [view sd_setImageWithURL:[NSURL URLWithString:PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.guaraniBayerAlcoholBookmarksBackwardsAbsolute]];
        view.contentMode = UIViewContentModeScaleAspectFit;
        return view;
    }else {
        UILabel *label = [[UILabel alloc] init];
        label.text = [DogCanInfo realMarkName];
        label.textColor = [self domainCatColor];
        label.font = [UIFont systemFontOfSize:30];
        label.textAlignment = NSTextAlignmentCenter;
        return label;
    }
}

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

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

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

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

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

    return button;
}

+ (NSArray *)requiringBikeMediumLateSheAlways:(id)target action:(SEL)action {
    
    NSMutableArray *array = [[NSMutableArray alloc] init];
    
    for (HeadsetModel *saw in PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.positiveOwnAloneFixAlarmReserved) {
        UIView *button = [self fastestPreventedThirdInventoryRuleCat:saw.nearOptFatText
                                           badUptimeColor:[UIColor layerPongOddProvinceCalorieManaged:saw.slowCosmicColor]
                                                passwords:[self routeKernelRollGatheringSeason:saw]
                                           wrapBusModeCap:saw.secretNot
                                                   target:target
                                                   action:action];
        [array addObject:button];
    }
    
    return array;
}

+ (NSString *)routeKernelRollGatheringSeason:(HeadsetModel *)saw {
    
    static NSDictionary<NSString *, NSString *> *map;
    static dispatch_once_t sideToken;
    dispatch_once(&sideToken, ^{
        map = @{
            
            self.targetRemote.canEndBlur    : self.targetRemote.displayedDownloadForwardsManualUseFootball,
            self.targetRemote.gravityPolo   : self.targetRemote.removableNotifyCapturedPreciseHiddenFlush,
            self.targetRemote.bitContainTry : self.targetRemote.oxygenProximityDatumMaxDryUndo,

self.targetRemote.theBack       : self.targetRemote.protocolRaceOnlyNotStandard,
            self.targetRemote.listVoiceUser : self.targetRemote.containedBurnRecoveredFarRawBox,
            self.targetRemote.popMenEach : self.targetRemote.displayedDownloadForwardsManualUseFootball
        };
    });
    if (saw.loudFusion.maxYouKernel) {
        
        saw.loudFusion = map[saw.secretNot];
    }
    return saw.loudFusion;
}

+ (UIView *)fastestPreventedThirdInventoryRuleCat:(NSString *)title
                      badUptimeColor:(UIColor *)titleColor
                           passwords:(NSString *)image
                      wrapBusModeCap:(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 canEncodingsWidthColumnLike: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 *wayImage = [[UIImage needExecutingPopoverPivotSlabName:image] imageWithRenderingMode:(UIImageRenderingModeAlwaysTemplate)];
        button.tintColor = [self domainCatColor];
        [button setImage:wayImage 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 = [SchemesSong adoptCiphersDueSleetBus: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)canEncodingsWidthColumnLike:(NSString *)url
{
    NSString *radio =@"[a-zA-z]+://[^\\s]*";
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",radio];
    return [predicate evaluateWithObject:url];
}

+ (UITextField *)threadInputLocalizesJustLegalGarbageCode {
    UITextField *textField = [self contentsEyeField:self.albumHexAgeFix.renamingRoomEverySunFontBlockCode isSecure:NO];
    textField.textContentType = UITextContentTypeOneTimeCode;
    return textField;
}

+ (UITextField *)possibleCapturedMastersSenderFillerTrait {
    UITextField *textField = [self contentsEyeField:self.albumHexAgeFix.popVisualGrowServicesSummaries isSecure:NO];
    textField.keyboardType = UIKeyboardTypeNumberPad;
    return textField;
}

+ (UITextField *)integersPredictedOutletLibraryDiastolicAccount {
    return [self contentsEyeField:self.albumHexAgeFix.cropOffRunFor isSecure:NO];
}

+ (UITextField *)staySpeakClampStrengthSoftPassword:(BOOL)isNew {
    UITextField *textField = [self contentsEyeField:isNew?self.albumHexAgeFix.colorGarbageSimpleTimeLatitude:self.albumHexAgeFix.areaConnectedKey isSecure:YES];
    [self reloadIndigoConcertStoodLongCompressClimbed:textField minSize:CGSizeMake(SchemesSong.targetRemote.hasBlurBuddy, SchemesSong.targetRemote.hasBlurBuddy)];
    UIButton * rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
    UIImage *cropImage = [UIImage needExecutingPopoverPivotSlabName:self.targetRemote.recordedAgentManCaseWax];
    UIImage *creamyImage = [UIImage needExecutingPopoverPivotSlabName:self.targetRemote.rearrangeSnowUtilitiesRealmLift];
    rightButton.frame = CGRectMake(0, 0, SchemesSong.targetRemote.hasBlurBuddy, SchemesSong.targetRemote.hasBlurBuddy);
    [rightButton setImage:cropImage forState:UIControlStateNormal];
    [rightButton setImage:creamyImage forState:UIControlStateSelected];
    CGFloat popVitalBlur = (SchemesSong.targetRemote.hasBlurBuddy - 24)/2;
    [rightButton setImageEdgeInsets:UIEdgeInsetsMake(popVitalBlur, popVitalBlur, popVitalBlur, popVitalBlur)];
    rightButton.contentMode = UIViewContentModeScaleAspectFit;
    [textField.rightView addSubview:rightButton];
    return textField;
}

+ (UITextField *)contentsEyeField:(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 domainCatColor].CGColor;
    textField.layer.borderWidth = 0.6;
    textField.layer.cornerRadius = self.targetRemote.spokenWinNow;
    
    textField.backgroundColor = [self brushBrownSentenceAliveRedoImage] ? UIColor.clearColor : UIColor.whiteColor;
    textField.textColor = UIColor.darkGrayColor;
    textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor]}];
    [self groupedAirBondSettingOperatingExceedsBlink:textField minSize:CGSizeMake(10, SchemesSong.targetRemote.hasBlurBuddy)];
    textField.rightViewMode = UITextFieldViewModeAlways;
    return textField;
}

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

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