








#import "BankersSucceed.h"

#define RollBarsBlink self.frame.size.width

@interface BankersSucceed()



@property (nonatomic, strong) NSMutableArray                            *illegalArray;



@property (nonatomic, strong) NSMutableArray <TreeGallonMainCell *>      *mindArray;



@property (strong, nonatomic) NSMutableArray <TreeGallonMainCell *>      *focusJobNear;



@property (assign, nonatomic) NSInteger                                 count;



@property (nonatomic, assign) FixHangProtocolsItsHandle                          status;



@property (nonatomic, assign) NSInteger                                 channelCount;



@property (nonatomic, assign) CGFloat                                   hebrew;

@end

@implementation BankersSucceed

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.status = TransientSettlingCapableHandlerLinkageFlipped;
    }
    return self;
}

- (void)smileVisitor
{
    
    if (self.mindArray.firstObject) {
        
        
        TreeGallonMainCell *hexSiteView = self.mindArray.firstObject;
        
        hexSiteView.frame = CGRectMake(RollBarsBlink, 0, hexSiteView.fetchedSize.width, hexSiteView.fetchedSize.height);
        
        self.hebrew = hexSiteView.hebrew;
        
        self.channelCount = hexSiteView.channelCount;
        
        
        NSInteger row = [self legalRingQualifierEyeFactPlanarEsperanto:hexSiteView];
        
        
        if (row >= 0) {
            
            
            [self.mindArray removeObjectAtIndex:0];
            
            
            if (![self.subviews containsObject:hexSiteView]) {
                [self addSubview:hexSiteView];
            }
            hexSiteView.frame = CGRectMake(RollBarsBlink,  row * (hexSiteView.fetchedSize.height + _hebrew), hexSiteView.fetchedSize.width, hexSiteView.fetchedSize.height);
            
            
            [_illegalArray setObject:hexSiteView atIndexedSubscript:row];
            
            
            if ([self.delegate respondsToSelector:@selector(sonSurgeBlueView:willDisplayCell:)]) {
                [self.delegate sonSurgeBlueView:self willDisplayCell:hexSiteView];
            }
            
            
            [self.focusJobNear addObject:hexSiteView];
            
            [hexSiteView lessGrammarBoldfaceSayRace:^{
                
                
                [hexSiteView setTransform:CGAffineTransformMakeTranslation(- hexSiteView.frame.size.width-RollBarsBlink, 0)];
                
            } completion:^(BOOL finished) {
                
                [hexSiteView removeFromSuperview];
                
                
                [self.focusJobNear removeObject:hexSiteView];
                
                
                if ([self.delegate respondsToSelector:@selector(sonSurgeBlueView:didEndDisplayingCell:)]) {
                    [self.delegate sonSurgeBlueView:self didEndDisplayingCell:hexSiteView];
                }
                
                
                if (--self.count <= 0) {
                    if ([self.delegate respondsToSelector:@selector(embeddedParentalResultingCornersStrongestLowRatioHandover:)]) {
                        [self.delegate embeddedParentalResultingCornersStrongestLowRatioHandover:self];
                    }
                    self.count = 0;
                }
                
                

            }];
        }
    }
    
    [self performSelector:@selector(smileVisitor) withObject:nil afterDelay:0.45f];
}


- (void)rowBedSonQuery:(NSArray <TreeGallonMainCell *> *)barrages
{
    self.count += barrages.count;
    [self.mindArray addObjectsFromArray:barrages];
}

- (void)start
{
    if (self.status == RopeLocalizesRetryEyeSongPrintable) {
        return;
    }
    self.status = RopeLocalizesRetryEyeSongPrintable;
    
    [self smileVisitor];
}

- (void)stop
{
    if (self.status == TransientSettlingCapableHandlerLinkageFlipped) {
        return;
    }
    self.status = TransientSettlingCapableHandlerLinkageFlipped;
    
    if (self.focusJobNear.count) {
        [self.focusJobNear makeObjectsPerformSelector:@selector(pause)];
    }
    
    if (self.mindArray.count > 0) {
        [NSObject cancelPreviousPerformRequestsWithTarget:self];
    }
    
    
    [self.focusJobNear  makeObjectsPerformSelector:@selector(removeFromSuperview)];
    self.channelCount       = 0;
    self.count              = 0;
    [self.focusJobNear  removeAllObjects];
    [self.mindArray     removeAllObjects];
    [self.illegalArray  removeAllObjects];
    
    self.focusJobNear       = nil;
    self.mindArray          = nil;
    self.illegalArray       = nil;
}


- (NSInteger)legalRingQualifierEyeFactPlanarEsperanto:(TreeGallonMainCell *)newBarrage
{
    for (int row = 0; row<_illegalArray.count; row++) {
        NSObject *object = _illegalArray[row];
        if ([object isKindOfClass:[NSNumber class]]) { 
            
            return row;
            
        }else if ([object isKindOfClass:[TreeGallonMainCell class]]) { 
            
            TreeGallonMainCell *interFront = (TreeGallonMainCell*)object;
            
            if ([self legalRingQualifierEyeFactPlanarEsperanto:interFront armpitWas:newBarrage]) {
                
                return row;
            }
        }
    }
    
    return -1;
}


- (BOOL)legalRingQualifierEyeFactPlanarEsperanto:(TreeGallonMainCell *)interFront armpitWas:(TreeGallonMainCell *)newBarrage
{
    
    if (interFront.status == IllRenewFrequencyTabularMissingTheme) {
        return NO;
    }
    
    
    CGRect rect = [interFront.layer.presentationLayer frame];
    if (rect.origin.x>RollBarsBlink - interFront.frame.size.width) {
        
        return NO;
    }else if (rect.size.width == 0)
    {
        
        return NO;
    }
    else if (interFront.frame.size.width > newBarrage.frame.size.width) {
        
        return YES;
    }else
    {
        
        CGFloat time = RollBarsBlink/(RollBarsBlink+newBarrage.frame.size.width)*newBarrage.wasQueueOnce;
        
        CGFloat tall = rect.origin.x - time/(interFront.wasQueueOnce)*(RollBarsBlink + interFront.frame.size.width);
        if (tall < -interFront.frame.size.width) {
            
            return YES;
        }
    }
    return NO;
}


- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    UITouch *paper = [touches anyObject];
    CGPoint spaMovePan  = [paper locationInView:self];
    for (UIView *offEnds in [self subviews])
    {
        if (![offEnds isKindOfClass:[TreeGallonMainCell class]]) continue;
        TreeGallonMainCell *hexSiteView = (TreeGallonMainCell *)offEnds;
        if ([hexSiteView.layer.presentationLayer hitTest:spaMovePan])
        {
            
            if ([self.delegate respondsToSelector:@selector(sonSurgeBlueView:chamberNearCell:)]) {
                [self.delegate sonSurgeBlueView:self chamberNearCell:hexSiteView];
            }
            break;
        }
    }
}




- (NSMutableArray<TreeGallonMainCell *> *)mindArray {
    if (!_mindArray) {
        _mindArray = [[NSMutableArray alloc] init];
    }
    return _mindArray;
}


- (NSMutableArray<TreeGallonMainCell *> *)focusJobNear {
    if (!_focusJobNear) {
        _focusJobNear = [[NSMutableArray alloc] init];
    }
    return _focusJobNear;
}


- (void)setChannelCount:(NSInteger)channelCount
{
    
    if (self.illegalArray.count < channelCount) { 
        
        for (NSInteger row = self.illegalArray.count; row < channelCount; row++) {
            NSNumber *number = [NSNumber numberWithBool:YES];
            [self.illegalArray setObject:number atIndexedSubscript:row];
        }
        
    }else {
        
        for (NSInteger row = channelCount; row < self.illegalArray.count; row++) {
            [self.illegalArray removeObjectAtIndex:row];
        }
    }
    
    _channelCount = channelCount;
    
}


- (NSMutableArray *)illegalArray {
    if (!_illegalArray) {
        _illegalArray = [[NSMutableArray alloc] init];
    }
    return _illegalArray;
}

@end
