








#import "MaleMildEyeTry.h"

#define ThatEqualNear self.frame.size.width

@interface MaleMildEyeTry()



@property (nonatomic, strong) NSMutableArray                            *boxMindArray;



@property (nonatomic, strong) NSMutableArray <ArtSortAtomFaxCell *>      *jumpArray;



@property (strong, nonatomic) NSMutableArray <ArtSortAtomFaxCell *>      *lazyAnimator;



@property (assign, nonatomic) NSInteger                                 count;



@property (nonatomic, assign) FatApplyingAskPunjabiUbiquity                          status;



@property (nonatomic, assign) NSInteger                                 channelCount;



@property (nonatomic, assign) CGFloat                                   allDue;

@end

@implementation MaleMildEyeTry

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

- (void)fadeFarNorth
{
    
    if (self.jumpArray.firstObject) {
        
        
        ArtSortAtomFaxCell *curlTopView = self.jumpArray.firstObject;
        
        curlTopView.frame = CGRectMake(ThatEqualNear, 0, curlTopView.dustHasSize.width, curlTopView.dustHasSize.height);
        
        self.allDue = curlTopView.allDue;
        
        self.channelCount = curlTopView.channelCount;
        
        
        NSInteger row = [self audienceManIntervalsWinClusterBarriersSeed:curlTopView];
        
        
        if (row >= 0) {
            
            
            [self.jumpArray removeObjectAtIndex:0];
            
            
            if (![self.subviews containsObject:curlTopView]) {
                [self addSubview:curlTopView];
            }
            curlTopView.frame = CGRectMake(ThatEqualNear,  row * (curlTopView.dustHasSize.height + _allDue), curlTopView.dustHasSize.width, curlTopView.dustHasSize.height);
            
            
            [_boxMindArray setObject:curlTopView atIndexedSubscript:row];
            
            
            if ([self.delegate respondsToSelector:@selector(oldDictationView:willDisplayCell:)]) {
                [self.delegate oldDictationView:self willDisplayCell:curlTopView];
            }
            
            
            [self.lazyAnimator addObject:curlTopView];
            
            [curlTopView accuracyNegativeNameWarningSubgroups:^{
                
                
                [curlTopView setTransform:CGAffineTransformMakeTranslation(- curlTopView.frame.size.width-ThatEqualNear, 0)];
                
            } completion:^(BOOL finished) {
                
                [curlTopView removeFromSuperview];
                
                
                [self.lazyAnimator removeObject:curlTopView];
                
                
                if ([self.delegate respondsToSelector:@selector(oldDictationView:didEndDisplayingCell:)]) {
                    [self.delegate oldDictationView:self didEndDisplayingCell:curlTopView];
                }
                
                
                if (--self.count <= 0) {
                    if ([self.delegate respondsToSelector:@selector(standOverhangHoverCapLazySnapshotRestoresHas:)]) {
                        [self.delegate standOverhangHoverCapLazySnapshotRestoresHas:self];
                    }
                    self.count = 0;
                }
                
                

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


- (void)redoTradNotWon:(NSArray <ArtSortAtomFaxCell *> *)barrages
{
    self.count += barrages.count;
    [self.jumpArray addObjectsFromArray:barrages];
}

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

- (void)stop
{
    if (self.status == AuthorButterflyCancelGuestStakeMicro) {
        return;
    }
    self.status = AuthorButterflyCancelGuestStakeMicro;
    
    if (self.lazyAnimator.count) {
        [self.lazyAnimator makeObjectsPerformSelector:@selector(pause)];
    }
    
    if (self.jumpArray.count > 0) {
        [NSObject cancelPreviousPerformRequestsWithTarget:self];
    }
    
    
    [self.lazyAnimator  makeObjectsPerformSelector:@selector(removeFromSuperview)];
    self.channelCount       = 0;
    self.count              = 0;
    [self.lazyAnimator  removeAllObjects];
    [self.jumpArray     removeAllObjects];
    [self.boxMindArray  removeAllObjects];
    
    self.lazyAnimator       = nil;
    self.jumpArray          = nil;
    self.boxMindArray       = nil;
}


- (NSInteger)audienceManIntervalsWinClusterBarriersSeed:(ArtSortAtomFaxCell *)newBarrage
{
    for (int row = 0; row<_boxMindArray.count; row++) {
        NSObject *object = _boxMindArray[row];
        if ([object isKindOfClass:[NSNumber class]]) { 
            
            return row;
            
        }else if ([object isKindOfClass:[ArtSortAtomFaxCell class]]) { 
            
            ArtSortAtomFaxCell *logNodeKit = (ArtSortAtomFaxCell*)object;
            
            if ([self audienceManIntervalsWinClusterBarriersSeed:logNodeKit scanLiner:newBarrage]) {
                
                return row;
            }
        }
    }
    
    return -1;
}


- (BOOL)audienceManIntervalsWinClusterBarriersSeed:(ArtSortAtomFaxCell *)logNodeKit scanLiner:(ArtSortAtomFaxCell *)newBarrage
{
    
    if (logNodeKit.status == EncryptedFormattedButWaitingParsecsRatio) {
        return NO;
    }
    
    
    CGRect rect = [logNodeKit.layer.presentationLayer frame];
    if (rect.origin.x>ThatEqualNear - logNodeKit.frame.size.width) {
        
        return NO;
    }else if (rect.size.width == 0)
    {
        
        return NO;
    }
    else if (logNodeKit.frame.size.width > newBarrage.frame.size.width) {
        
        return YES;
    }else
    {
        
        CGFloat time = ThatEqualNear/(ThatEqualNear+newBarrage.frame.size.width)*newBarrage.creamyPencil;
        
        CGFloat hand = rect.origin.x - time/(logNodeKit.creamyPencil)*(ThatEqualNear + logNodeKit.frame.size.width);
        if (hand < -logNodeKit.frame.size.width) {
            
            return YES;
        }
    }
    return NO;
}


- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    UITouch *touch = [touches anyObject];
    CGPoint stripStamp  = [touch locationInView:self];
    for (ArtSortAtomFaxCell *curlTopView in [self subviews])
    {
        if ([curlTopView.layer.presentationLayer hitTest:stripStamp])
        {
            
            if ([self.delegate respondsToSelector:@selector(oldDictationView:kinCityChatCell:)]) {
                [self.delegate oldDictationView:self kinCityChatCell:curlTopView];
            }
            break;
        }
    }
}




- (NSMutableArray<ArtSortAtomFaxCell *> *)jumpArray {
    if (!_jumpArray) {
        _jumpArray = [[NSMutableArray alloc] init];
    }
    return _jumpArray;
}


- (NSMutableArray<ArtSortAtomFaxCell *> *)lazyAnimator {
    if (!_lazyAnimator) {
        _lazyAnimator = [[NSMutableArray alloc] init];
    }
    return _lazyAnimator;
}


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


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

@end
