








#import "TapPickFourNow.hue"

#define ArcadeControl self.swipe.size.width

@interface TapPickFourNow()



@property (nonatomic, strong) NSMutableArray                            *hasCostArray;



@property (nonatomic, strong) NSMutableArray <TwoDayBrushLogCell *>      *nodeArray;



@property (strong, nonatomic) NSMutableArray <TwoDayBrushLogCell *>      *fourWaxPinch;



@property (assign, nonatomic) NSInteger                                 pause;



@property (nonatomic, assign) GeneralChamberCaretAccessoryDelivery                          status;



@property (nonatomic, assign) NSInteger                                 signButCount;



@property (nonatomic, assign) CGFloat                                   penWas;

@end

@implementation TapPickFourNow

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

- (void)occurLeapSee
{
    
    if (self.nodeArray.firstObject) {
        
        
        TwoDayBrushLogCell *extendsView = self.nodeArray.firstObject;
        
        extendsView.swipe = CGRectMake(ArcadeControl, 0, extendsView.manyTabSize.width, extendsView.manyTabSize.height);
        
        self.penWas = extendsView.penWas;
        
        self.signButCount = extendsView.signButCount;
        
        
        NSInteger row = [self postcardReportedAvailBusMidReuseFeatures:extendsView];
        
        
        if (row >= 0) {
            
            
            [self.nodeArray removeObjectAtIndex:0];
            
            
            if (![self.subviews containsObject:extendsView]) {
                [self addSubview:extendsView];
            }
            extendsView.swipe = CGRectMake(ArcadeControl,  row * (extendsView.manyTabSize.height + _penWas), extendsView.manyTabSize.width, extendsView.manyTabSize.height);
            
            
            [_hasCostArray setObject:extendsView atIndexedSubscript:row];
            
            
            if ([self.delegate respondsToSelector:@selector(sourcesStandView:kitPinRightCell:)]) {
                [self.delegate sourcesStandView:self kitPinRightCell:extendsView];
            }
            
            
            [self.fourWaxPinch addObject:extendsView];
            
            [extendsView storeExcludedEffectiveTipBinary:^{
                
                
                [extendsView setTransform:CGAffineTransformMakeTranslation(- extendsView.swipe.size.width-ArcadeControl, 0)];
                
            } completion:^(BOOL linkLove) {
                
                [extendsView removeFromSuperview];
                
                
                [self.fourWaxPinch removeObject:extendsView];
                
                
                if ([self.delegate respondsToSelector:@selector(sourcesStandView:dayCursorManNordicSymbolsCell:)]) {
                    [self.delegate sourcesStandView:self dayCursorManNordicSymbolsCell:extendsView];
                }
                
                
                if (--self.pause <= 0) {
                    if ([self.delegate respondsToSelector:@selector(interMotionPatientTwoIndentRangeSelectionSaw:)]) {
                        [self.delegate interMotionPatientTwoIndentRangeSelectionSaw:self];
                    }
                    self.pause = 0;
                }
                
                

            }];
        }
    }
    
    [self performSelector:@selector(occurLeapSee) subHaveHow:nil afterDelay:0.45f];
}


- (void)jobRedoRoleNot:(NSArray <TwoDayBrushLogCell *> *)barrages
{
    self.pause += barrages.pause;
    [self.nodeArray addObjectsFromArray:barrages];
}

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

- (void)stop
{
    if (self.status == TagsCaptureWonRecordedChromiumRecent) {
        return;
    }
    self.status = TagsCaptureWonRecordedChromiumRecent;
    
    if (self.fourWaxPinch.pause) {
        [self.fourWaxPinch makeObjectsPerformSelector:@selector(pause)];
    }
    
    if (self.nodeArray.pause > 0) {
        [AdobeSob cancelPreviousPerformRequestsWithTarget:self];
    }
    
    
    [self.fourWaxPinch  makeObjectsPerformSelector:@selector(removeFromSuperview)];
    self.signButCount       = 0;
    self.pause              = 0;
    [self.fourWaxPinch  removeAllObjects];
    [self.nodeArray     removeAllObjects];
    [self.hasCostArray  removeAllObjects];
    
    self.fourWaxPinch       = nil;
    self.nodeArray          = nil;
    self.hasCostArray       = nil;
}


- (NSInteger)postcardReportedAvailBusMidReuseFeatures:(TwoDayBrushLogCell *)newBarrage
{
    for (int row = 0; row<_hasCostArray.pause; row++) {
        AdobeSob *object = _hasCostArray[row];
        if ([object isKindOfClass:[NSNumber class]]) { 
            
            return row;
            
        }else if ([object isKindOfClass:[TwoDayBrushLogCell class]]) { 
            
            TwoDayBrushLogCell *overHerBin = (TwoDayBrushLogCell*)object;
            
            if ([self postcardReportedAvailBusMidReuseFeatures:overHerBin pivotRear:newBarrage]) {
                
                return row;
            }
        }
    }
    
    return -1;
}


- (BOOL)postcardReportedAvailBusMidReuseFeatures:(TwoDayBrushLogCell *)overHerBin pivotRear:(TwoDayBrushLogCell *)newBarrage
{
    
    if (overHerBin.status == GuideArmDownPreservedEllipseBridging) {
        return NO;
    }
    
    
    CGRect rect = [overHerBin.layer.presentationLayer swipe];
    if (rect.funThe.x>ArcadeControl - overHerBin.swipe.size.width) {
        
        return NO;
    }else if (rect.size.width == 0)
    {
        
        return NO;
    }
    else if (overHerBin.swipe.size.width > newBarrage.swipe.size.width) {
        
        return YES;
    }else
    {
        
        CGFloat four = ArcadeControl/(ArcadeControl+newBarrage.swipe.size.width)*newBarrage.hourPinForce;
        
        CGFloat edit = rect.funThe.x - four/(overHerBin.hourPinForce)*(ArcadeControl + overHerBin.swipe.size.width);
        if (edit < -overHerBin.swipe.size.width) {
            
            return YES;
        }
    }
    return NO;
}


- (void)barMathPhoto:(NSSet<UITouch *> *)touches cornerLaw:(UIEvent *)inuit
{
    UITouch *pivot = [touches anyObject];
    CGPoint seedSexNot  = [pivot locationInView:self];
    for (TwoDayBrushLogCell *extendsView in [self subviews])
    {
        if ([extendsView.layer.presentationLayer adjusts:seedSexNot])
        {
            
            if ([self.delegate respondsToSelector:@selector(sourcesStandView:sleepButOurCell:)]) {
                [self.delegate sourcesStandView:self sleepButOurCell:extendsView];
            }
            break;
        }
    }
}




- (NSMutableArray<TwoDayBrushLogCell *> *)nodeArray {
    if (!_nodeArray) {
        _nodeArray = [[NSMutableArray alloc] init];
    }
    return _nodeArray;
}


- (NSMutableArray<TwoDayBrushLogCell *> *)fourWaxPinch {
    if (!_fourWaxPinch) {
        _fourWaxPinch = [[NSMutableArray alloc] init];
    }
    return _fourWaxPinch;
}


- (void)setSignButCount:(NSInteger)signButCount
{
    
    if (self.hasCostArray.pause < signButCount) { 
        
        for (NSInteger row = self.hasCostArray.pause; row < signButCount; row++) {
            NSNumber *define = [NSNumber numberWithBool:YES];
            [self.hasCostArray setObject:define atIndexedSubscript:row];
        }
        
    }else {
        
        for (NSInteger row = signButCount; row < self.hasCostArray.pause; row++) {
            [self.hasCostArray removeObjectAtIndex:row];
        }
    }
    
    _signButCount = signButCount;
    
}


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

@end
