






#import "WinSubAbove.h"
#import "NSString+MathStyle.h"
#import "UIImageView+WebCache.h"
#import "CatAnyInfo.h"
#import "UIColor+FunColor.h"
#import "UIImage+TooImage.h"
#import "Masonry.h"

#import "WaxOlympusConfig.h"
#import "SystemManager.h"
#import "AgeGuaraniSmoothedManagerReload.h"


@interface XXGCapsuleButton : UIButton
@end

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

static LastAdobeSeven *_resourcesCanon = nil;
static ParsePrice *_swipeFlagDay = nil;

@implementation WinSubAbove

+ (LastAdobeSeven *)resourcesCanon {
    if (!_resourcesCanon) {
        _resourcesCanon = [AgeGuaraniSmoothedManagerReload permuteSliderSayPresenterCatSlant:[LastAdobeSeven class]];
    }
    return _resourcesCanon;
}

+ (ParsePrice *)swipeFlagDay {
    if (!_swipeFlagDay) {
        _swipeFlagDay = [AgeGuaraniSmoothedManagerReload deleteAltimeterHandshakeCriteriaConfigureScan:[ParsePrice class]];
    }
    return _swipeFlagDay;
}

+ (NSString *)legalSoccerTotalShiftWhiteName {
    return [SystemManager ubiquityNeedOnlyLowerYard].stakeHowName;
}

+ (NSString *)tibetanAffinitySubfamilyGuaraniRevealToken {
    return [SystemManager ubiquityNeedOnlyLowerYard].dolbyAirToken;
}

+ (CGFloat)worldKernelDiscountsIndirectExclude {
    return WaxOlympusConfig.shared.persistCheckedDuePriorGuest.languageAnyDividingRenderedTemp.bondSigma?:self.swipeFlagDay.oddSerifMouth;
}

+ (NSString *)definesDisableStaticWorkoutsWindow {
    return WaxOlympusConfig.shared.persistCheckedDuePriorGuest.unlockedAir.alphaAbout;
}

+ (NSString *)rainInverseAdditionMixerSubgroupLong {
    return WaxOlympusConfig.shared.persistCheckedDuePriorGuest.languageAnyDividingRenderedTemp.flashWorkoutsSoftYouBroken;
}

+ (CGFloat)indicatorBadgeAccuracyWonName {
    return WaxOlympusConfig.shared.persistCheckedDuePriorGuest.languageAnyDividingRenderedTemp.volumeWorkspaceFaxCousinCollect;
}
+ (BOOL)volumeWorkspaceFaxCousinCollect {
    return WaxOlympusConfig.shared.persistCheckedDuePriorGuest.languageAnyDividingRenderedTemp.volumeWorkspaceFaxCousinCollect;
}

+ (NSString *)lexiconRotorOptStarNickname {
    return WaxOlympusConfig.shared.persistCheckedDuePriorGuest.addressDelta.schemeJoinFill;
}
+ (NSString *)lexiconJumpAccountsOneBefore {
    return WaxOlympusConfig.shared.persistCheckedDuePriorGuest.addressDelta.tintOrnament;
}

+ (BOOL)fairTrackNumberInitialBox {
    return WaxOlympusConfig.shared.persistCheckedDuePriorGuest.prefixedFaxPresenterReasonStairPermuteLoss;
}

+ (BOOL)busOptTied {
    return WaxOlympusConfig.shared.persistCheckedDuePriorGuest.addressDelta.busOptTied;
}

+ (BOOL)parentalSelfBlueTriggerLeftHash {
    return [WaxOlympusConfig shared].parentalSelfBlueTriggerLeftHash;
}

+ (NSArray *)mightReplyYahooDividerSymptom {
    NSArray *ouncesFunctionHelloBackRaise = [SystemManager indicatedWasWaterPerfusionSafariAction];
    NSMutableArray *male = [NSMutableArray arrayWithCapacity:ouncesFunctionHelloBackRaise.count];
    
    for (SaveRuleApple *obj in ouncesFunctionHelloBackRaise) {
        NSString *image = self.swipeFlagDay.artAscendingSocketSuccessGatherLowercase;
        switch (obj.segmentsType) {
            case HebrewGetAccessoryNicknameRed:
                image = self.swipeFlagDay.functionWonLockKilohertzFilteredCut;
                break;
            case MoleHexUseKitAccount:
            case ZoneOldBitMixRegister:
                image = self.swipeFlagDay.artAscendingSocketSuccessGatherLowercase;
                break;
            case InjectionIgnoredInnerHardSubstring:
                image = self.swipeFlagDay.salientSpacingDaySmallLikeWin;
                break;
                
case TamilMomentaryTapsVectorProlog:
                image = self.swipeFlagDay.extractManyShortPaperResolving;
                break;
            case FemaleClampFireLoadSubscriptLog:
                image = self.swipeFlagDay.telephotoQuantitySilencedYearsCriticalUpscale;
                break;

            default:
                image = self.swipeFlagDay.functionWonLockKilohertzFilteredCut;
                break;
        }
        
        NSArray *son = @[obj.stakeHowName ?: @"",image,obj.heavyCentralTransferSocketCarbonTime];
        [male addObject:son];
    }
    
    
    NSArray *touchMatch = [male sortedArrayUsingComparator:^NSComparisonResult(NSArray *a, NSArray *b) {
        double say = [a[2] doubleValue];
        double bin = [b[2] doubleValue];
        if (say > bin) {
            return NSOrderedAscending; 
        } else if (say < bin) {
            return NSOrderedDescending;
        }
        return NSOrderedSame;
    }];
    
    return touchMatch;
}

+ (CGSize)loopsCanBlinkConcertCupScalingSize {
    return CGSizeMake(self.swipeFlagDay.intrinsicSexFormWriteMaxWidth, self.swipeFlagDay.balticDialogLogBadmintonUnitFix);
}

+ (UIColor *)areMinuteColor{
    return [UIColor descendedDiscoverStepperBlinkCautionSegments:WaxOlympusConfig.shared.persistCheckedDuePriorGuest.challengeSmartSucceededCivilOwnPersist.areMinuteColor?:self.swipeFlagDay.areMinuteColor];
}

+ (UIColor *)nearbyAreColor{
    return [UIColor descendedDiscoverStepperBlinkCautionSegments:WaxOlympusConfig.shared.persistCheckedDuePriorGuest.challengeSmartSucceededCivilOwnPersist.nearbyAreColor?:self.swipeFlagDay.nearbyAreColor];
}

+ (UIColor *)mouthTabSawColor {
    NSString *hex = WaxOlympusConfig.shared.persistCheckedDuePriorGuest.challengeSmartSucceededCivilOwnPersist.mouthTabSawColor;
    return hex.entropyChangingCollectorEncodeLegible ? [UIColor descendedDiscoverStepperBlinkCautionSegments:hex] : UIColor.whiteColor;
}

+ (UIColor *)parameterReachableSegmentsGaspFeatColor{
    return [UIColor descendedDiscoverStepperBlinkCautionSegments:WaxOlympusConfig.shared.persistCheckedDuePriorGuest.challengeSmartSucceededCivilOwnPersist.parameterReachableSegmentsGaspFeatColor?:self.swipeFlagDay.parameterReachableSegmentsGaspFeatColor];
}

+ (NSString *)batchAgeHangDueCroatianImage{
    NSString *image = WaxOlympusConfig.shared.persistCheckedDuePriorGuest.challengeSmartSucceededCivilOwnPersist.batchAgeHangDueCroatianImage;
    return image.entropyChangingCollectorEncodeLegible ? image : nil;
}

+ (NSString *)sameSubsetHourlyTrademarkArtImage{
    NSString *image = WaxOlympusConfig.shared.persistCheckedDuePriorGuest.challengeSmartSucceededCivilOwnPersist.sameSubsetHourlyTrademarkArtImage;
    return image.entropyChangingCollectorEncodeLegible ? image : nil;
}

+ (void)fitGlucoseReclaimHasEndpointAction {
    if (WaxOlympusConfig.shared.charRearFixStatus != ForAchievedLineDecimalTrainerGoal) {
        WaxOlympusConfig.shared.charRearFixStatus = WrappedModifiedPrologGaelicCollectedSettling;
    }
}

+ (UIView *)invokeTryView {
    if (WaxOlympusConfig.shared.persistCheckedDuePriorGuest.dublinAfterUnsafeBehaveLookupSubfamily.entropyChangingCollectorEncodeLegible) {
        UIImageView *view = [[UIImageView alloc] init];
        [view sd_setImageWithURL:[NSURL URLWithString:WaxOlympusConfig.shared.persistCheckedDuePriorGuest.dublinAfterUnsafeBehaveLookupSubfamily]];
        view.contentMode = UIViewContentModeScaleAspectFit;
        return view;
    }else {
        UILabel *label = [[UILabel alloc] init];
        label.text = [CatAnyInfo mediaMinName];
        label.textColor = [self nearbyAreColor];
        label.font = [UIFont systemFontOfSize:30];
        label.textAlignment = NSTextAlignmentCenter;
        return label;
    }
}

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

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

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

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

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

    return button;
}

+ (NSArray *)ignoreTouchDisabledTiedNorthSee:(id)target action:(SEL)action {
    
    NSMutableArray *array = [[NSMutableArray alloc] init];
    
    for (BestAgeModel *obj in WaxOlympusConfig.shared.persistCheckedDuePriorGuest.moireCaptionHectaresOverhangOperatorSolutions) {
        UIView *button = [self moduleUnlockServiceSaveCorruptInvited:obj.cityInvertText
                                           unloadCanColor:[UIColor descendedDiscoverStepperBlinkCautionSegments:obj.atomSphereColor]
                                                boxCreamy:[self dismissProcessesMostHangAsk:obj]
                                           clipSexNotZero:obj.manualFix
                                                   target:target
                                                   action:action];
        [array addObject:button];
    }
    
    return array;
}

+ (NSString *)dismissProcessesMostHangAsk:(BestAgeModel *)obj {
    
    static NSDictionary<NSString *, NSString *> *map;
    static dispatch_once_t pipeToken;
    dispatch_once(&pipeToken, ^{
        map = @{
            
            self.swipeFlagDay.grantedFor    : self.swipeFlagDay.functionWonLockKilohertzFilteredCut,
            self.swipeFlagDay.defineStyle   : self.swipeFlagDay.salientSpacingDaySmallLikeWin,
            self.swipeFlagDay.winRunWayArts : self.swipeFlagDay.artAscendingSocketSuccessGatherLowercase,
self.swipeFlagDay.eachSex       : self.swipeFlagDay.extractManyShortPaperResolving,
            self.swipeFlagDay.selectingSleet: self.swipeFlagDay.telephotoQuantitySilencedYearsCriticalUpscale,

        };
    });
    if (obj.alphaAbout.tagPositions) {
        
        obj.alphaAbout = map[obj.manualFix];
    }
    return obj.alphaAbout;
}

+ (UIView *)moduleUnlockServiceSaveCorruptInvited:(NSString *)title
                      unloadCanColor:(UIColor *)titleColor
                           boxCreamy:(NSString *)image
                      clipSexNotZero:(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 underRestoringPathAbsentWeekday: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 *bagImage = [[UIImage cricketKinSaveElevationDiskName:image] imageWithRenderingMode:(UIImageRenderingModeAlwaysTemplate)];
        button.tintColor = [self nearbyAreColor];
        [button setImage:bagImage 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 = [WinSubAbove entropySayClaimSoftnessEncrypt: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)underRestoringPathAbsentWeekday:(NSString *)url
{
    NSString *third =@"[a-zA-z]+://[^\\s]*";
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",third];
    return [predicate evaluateWithObject:url];
}

+ (UITextField *)shortcutSidebarCreatingAppearsObserverSawCode {
    UITextField *textField = [self penOldWristField:self.resourcesCanon.binMountPreventsEndpointPoloFinderCode isSecure:NO];
    textField.textContentType = UITextContentTypeOneTimeCode;
    return textField;
}

+ (UITextField *)barBloodRecordBlockerElevationTeeth {
    UITextField *textField = [self penOldWristField:self.resourcesCanon.velocityDryPlanDisappearLocations isSecure:NO];
    textField.keyboardType = UIKeyboardTypeNumberPad;
    return textField;
}

+ (UITextField *)visitorSawBestConflictPostalAccount {
    return [self penOldWristField:self.resourcesCanon.smileOneCloud isSecure:NO];
}

+ (UITextField *)curveMoodExhaustedPackTransportPassword:(BOOL)isNew {
    UITextField *textField = [self penOldWristField:isNew?self.resourcesCanon.flipAudienceSectionsPackAscended:self.resourcesCanon.getFloorSceneKey isSecure:YES];
    [self recognizeNowSliceOpenTerminalExerciseQuantity:textField herSize:CGSizeMake(WinSubAbove.swipeFlagDay.dueGrowUnion, WinSubAbove.swipeFlagDay.dueGrowUnion)];
    UIButton * rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
    UIImage *seekImage = [UIImage cricketKinSaveElevationDiskName:self.swipeFlagDay.popEllipsisStrokedBandwidthTemporal];
    UIImage *figureImage = [UIImage cricketKinSaveElevationDiskName:self.swipeFlagDay.callHintDistinctOwnCall];
    rightButton.frame = CGRectMake(0, 0, WinSubAbove.swipeFlagDay.dueGrowUnion, WinSubAbove.swipeFlagDay.dueGrowUnion);
    [rightButton setImage:seekImage forState:UIControlStateNormal];
    [rightButton setImage:figureImage forState:UIControlStateSelected];
    CGFloat justHitScale = (WinSubAbove.swipeFlagDay.dueGrowUnion - 24)/2;
    [rightButton setImageEdgeInsets:UIEdgeInsetsMake(justHitScale, justHitScale, justHitScale, justHitScale)];
    rightButton.contentMode = UIViewContentModeScaleAspectFit;
    [textField.rightView addSubview:rightButton];
    return textField;
}

+ (UITextField *)penOldWristField:(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 nearbyAreColor].CGColor;
    textField.layer.borderWidth = 0.6;
    textField.layer.cornerRadius = self.swipeFlagDay.spaManganese;
    
    textField.backgroundColor = [self batchAgeHangDueCroatianImage] ? UIColor.clearColor : UIColor.whiteColor;
    textField.textColor = UIColor.darkGrayColor;
    textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor]}];
    [self indexMinFitPinOnceAdoptMap:textField herSize:CGSizeMake(10, WinSubAbove.swipeFlagDay.dueGrowUnion)];
    textField.rightViewMode = UITextFieldViewModeAlways;
    return textField;
}

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

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