








#import "WeekAlwaysSlow.h"

#define FastMetabolic self.frame.size.width

@interface WeekAlwaysSlow()



@property (nonatomic, strong) NSMutableArray                            *warpWasArray;



@property (nonatomic, strong) NSMutableArray <LoopsListenersCell *>      *justArray;



@property (strong, nonatomic) NSMutableArray <LoopsListenersCell *>      *lessLegalWas;



@property (assign, nonatomic) NSInteger                                 count;



@property (nonatomic, assign) HintAffineLockMovementDownloads                          status;



@property (nonatomic, assign) NSInteger                                 channelCount;



@property (nonatomic, assign) CGFloat                                   wetIts;

@end

@implementation WeekAlwaysSlow

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

- (void)alpineTapOld
{
    
    if (self.justArray.firstObject) {
        
        
        LoopsListenersCell *finnishView = self.justArray.firstObject;
        
        finnishView.frame = CGRectMake(FastMetabolic, 0, finnishView.contactSize.width, finnishView.contactSize.height);
        
        self.wetIts = finnishView.wetIts;
        
        self.channelCount = finnishView.channelCount;
        
        
        NSInteger row = [self amharicFarthestUighurForceVortexNowDid:finnishView];
        
        
        if (row >= 0) {
            
            
            [self.justArray removeObjectAtIndex:0];
            
            
            if (![self.subviews containsObject:finnishView]) {
                [self addSubview:finnishView];
            }
            finnishView.frame = CGRectMake(FastMetabolic,  row * (finnishView.contactSize.height + _wetIts), finnishView.contactSize.width, finnishView.contactSize.height);
            
            
            [_warpWasArray setObject:finnishView atIndexedSubscript:row];
            
            
            if ([self.delegate respondsToSelector:@selector(sonOxygenEndView:willDisplayCell:)]) {
                [self.delegate sonOxygenEndView:self willDisplayCell:finnishView];
            }
            
            
            [self.lessLegalWas addObject:finnishView];
            
            [finnishView atomicHeightOperationPashtoRegister:^{
                
                
                [finnishView setTransform:CGAffineTransformMakeTranslation(- finnishView.frame.size.width-FastMetabolic, 0)];
                
            } completion:^(BOOL finished) {
                
                [finnishView removeFromSuperview];
                
                
                [self.lessLegalWas removeObject:finnishView];
                
                
                if ([self.delegate respondsToSelector:@selector(sonOxygenEndView:didEndDisplayingCell:)]) {
                    [self.delegate sonOxygenEndView:self didEndDisplayingCell:finnishView];
                }
                
                
                if (--self.count <= 0) {
                    if ([self.delegate respondsToSelector:@selector(defineSeeCardEsperantoCautionOutletJumpNet:)]) {
                        [self.delegate defineSeeCardEsperantoCautionOutletJumpNet:self];
                    }
                    self.count = 0;
                }
                
                

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


- (void)burstFactEvent:(NSArray <LoopsListenersCell *> *)barrages
{
    self.count += barrages.count;
    [self.justArray addObjectsFromArray:barrages];
}

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

- (void)stop
{
    if (self.status == GlobalAttachedBlockIrishBitsChain) {
        return;
    }
    self.status = GlobalAttachedBlockIrishBitsChain;
    
    if (self.lessLegalWas.count) {
        [self.lessLegalWas makeObjectsPerformSelector:@selector(pause)];
    }
    
    if (self.justArray.count > 0) {
        [NSObject cancelPreviousPerformRequestsWithTarget:self];
    }
    
    
    [self.lessLegalWas  makeObjectsPerformSelector:@selector(removeFromSuperview)];
    self.channelCount       = 0;
    self.count              = 0;
    [self.lessLegalWas  removeAllObjects];
    [self.justArray     removeAllObjects];
    [self.warpWasArray  removeAllObjects];
    
    self.lessLegalWas       = nil;
    self.justArray          = nil;
    self.warpWasArray       = nil;
}


- (NSInteger)amharicFarthestUighurForceVortexNowDid:(LoopsListenersCell *)newBarrage
{
    for (int row = 0; row<_warpWasArray.count; row++) {
        NSObject *object = _warpWasArray[row];
        if ([object isKindOfClass:[NSNumber class]]) { 
            
            return row;
            
        }else if ([object isKindOfClass:[LoopsListenersCell class]]) { 
            
            LoopsListenersCell *eraserYear = (LoopsListenersCell*)object;
            
            if ([self amharicFarthestUighurForceVortexNowDid:eraserYear tooScroll:newBarrage]) {
                
                return row;
            }
        }
    }
    
    return -1;
}


- (BOOL)amharicFarthestUighurForceVortexNowDid:(LoopsListenersCell *)eraserYear tooScroll:(LoopsListenersCell *)newBarrage
{
    
    if (eraserYear.status == PermuteContextDeclineFactCostAuthority) {
        return NO;
    }
    
    
    CGRect rect = [eraserYear.layer.presentationLayer frame];
    if (rect.origin.x>FastMetabolic - eraserYear.frame.size.width) {
        
        return NO;
    }else if (rect.size.width == 0)
    {
        
        return NO;
    }
    else if (eraserYear.frame.size.width > newBarrage.frame.size.width) {
        
        return YES;
    }else
    {
        
        CGFloat time = FastMetabolic/(FastMetabolic+newBarrage.frame.size.width)*newBarrage.sexTwoNotify;
        
        CGFloat look = rect.origin.x - time/(eraserYear.sexTwoNotify)*(FastMetabolic + eraserYear.frame.size.width);
        if (look < -eraserYear.frame.size.width) {
            
            return YES;
        }
    }
    return NO;
}


- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    UITouch *touch = [touches anyObject];
    CGPoint flushAbove  = [touch locationInView:self];
    for (LoopsListenersCell *finnishView in [self subviews])
    {
        if ([finnishView.layer.presentationLayer hitTest:flushAbove])
        {
            
            if ([self.delegate respondsToSelector:@selector(sonOxygenEndView:sodiumPhaseCell:)]) {
                [self.delegate sonOxygenEndView:self sodiumPhaseCell:finnishView];
            }
            break;
        }
    }
}




- (NSMutableArray<LoopsListenersCell *> *)justArray {
    if (!_justArray) {
        _justArray = [[NSMutableArray alloc] init];
    }
    return _justArray;
}


- (NSMutableArray<LoopsListenersCell *> *)lessLegalWas {
    if (!_lessLegalWas) {
        _lessLegalWas = [[NSMutableArray alloc] init];
    }
    return _lessLegalWas;
}


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


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

@end
