






#import "PortAtomView.h"
#import "UIImageView+WebCache.h"
#import "UIImage+HasImage.h"
#import "RuleListCut.h"
#import "NSString+Anonymous.h"
#import "LowAlertView.h"
#import "DayChinaAskMidWindow.h"
#import "ClipFillEyeForViewController.h"
#import "UIDevice+KeyDevice.h"
#import "PopParserManager.h"

@interface PortAtomView()  <UIGestureRecognizerDelegate> {
    CGPoint anonymousNearInlandSoftwarePickWon;
    BOOL uplinkCombiningWillMildBookmarks;
    BOOL capCircleCrossPutCricketGender; 
    BOOL otherLanguageYoungerProvidedCube; 
}


@property (nonatomic, strong) DayChinaAskMidWindow *arrayQueryWindow;
@property (nonatomic, weak) UIWindow *rawCourseKinWindow;


@property (nonatomic, strong) UIImageView *convergedView;
@property (nonatomic, strong) UIView *minorEldestView;


@property (nonatomic, strong) UIView *pressSaltView;
@property (nonatomic, strong) UILabel *koreanManLabel;
@property (nonatomic, assign) BOOL endVoiceDrawingRelatedWrapping;


@property (nonatomic, strong) NSTimer *stairFeedbackTimer;
@property (nonatomic, assign) UIEdgeInsets deepColleagueYellowGivenReason;
@property (nonatomic, assign) CGRect torchWidgetNumberLinearStepDirectly;


@property (nonatomic, strong) UIImage *sobPubPaperImage;
@property (nonatomic, copy) NSString *stateGainResourceLoopCritical;
@property (nonatomic, strong) UIImage *squarePopImage;
@property (nonatomic, assign) CGFloat standStyleList;
@property (nonatomic, assign) HelloGrowTipEdge bedExactnessEdge;
@property (nonatomic, assign) NSTimeInterval revealAmharicMonotonicExistingBag;
@property (nonatomic, assign) BOOL storageDeclinedEqualAndHangLeast;
@end

@implementation PortAtomView


+ (instancetype)shared {
    static PortAtomView *instance = nil;
    static dispatch_once_t wideToken;
    dispatch_once(&wideToken, ^{
        instance = [[super alloc] initWithFrame:CGRectZero];
        [instance lemmaQuoteHeadMoodSuccess];
    });
    return instance;
}

- (UIView *)minorEldestView {
    if (!_minorEldestView) {
        _minorEldestView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 8, 8)];
        _minorEldestView.backgroundColor = UIColor.redColor;
        _minorEldestView.layer.cornerRadius = 4;
        _minorEldestView.hidden = YES;
    }
    return _minorEldestView;
}

- (void)lemmaQuoteHeadMoodSuccess {
    self.standStyleList = 10.0;
    self.revealAmharicMonotonicExistingBag = 3.0;
    self.storageDeclinedEqualAndHangLeast = YES;
    
    
    self.convergedView = [[UIImageView alloc] init];
    self.convergedView.contentMode = UIViewContentModeScaleAspectFit;
    [self addSubview:self.convergedView];
    
    self.pressSaltView = [[UIView alloc] init];
    self.pressSaltView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.7];
    self.pressSaltView.layer.cornerRadius = 20;
    self.pressSaltView.layer.masksToBounds = YES;
    self.pressSaltView.alpha = 0.0;
    
    self.koreanManLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 80, 40)];
    self.koreanManLabel.text = RuleListCut.costSonKnowKit.satisfiedNoiseHungarianDrumProvinceUnplugged;
    self.koreanManLabel.numberOfLines = 0;
    self.koreanManLabel.textColor = [UIColor whiteColor];
    self.koreanManLabel.textAlignment = NSTextAlignmentCenter;
    self.koreanManLabel.font = [UIFont systemFontOfSize:14];
    [self.pressSaltView addSubview:self.koreanManLabel];
    
    
    UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc]
                                   initWithTarget:self
                                   action:@selector(boxLooseMenCar:)];
    pan.delegate = self;
    [self addGestureRecognizer:pan];
    
    UITapGestureRecognizer *but = [[UITapGestureRecognizer alloc]
                                   initWithTarget:self
                                   action:@selector(internalSample)];
    [self addGestureRecognizer:but];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
    
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(biotinKitObscuredFlippedStringSelect)
                                                 name:UIApplicationDidChangeStatusBarOrientationNotification
                                               object:nil];
#pragma clang diagnostic pop
}

- (void)setSexNaturalJson:(NSDictionary *)sexNaturalJson {
    _sexNaturalJson = sexNaturalJson;
    if (sexNaturalJson && self.arrayQueryWindow != nil) {
        NSString *action = sexNaturalJson[RuleListCut.coloredDraft.andCutKeyAlong];
        if ([action isEqualToString:RuleListCut.coloredDraft.mustArtTatar]) {
            self.minorEldestView.hidden = NO;
        }else if ([action isEqualToString:RuleListCut.coloredDraft.orderYiddish]) {
            self.minorEldestView.hidden = YES;
        }else if ([action isEqualToString:RuleListCut.coloredDraft.inhalerSparseExpectNoiseItalian]) {
            self.minorEldestView.hidden = NO;
        }
    }
}


+ (void)displayed {
    [self.shared sharpnessLegibleKindReversesModifyDividingImage:[UIImage infoBusFilterVariationTurnName:RuleListCut.coloredDraft.lowCutoffPingConfigureMaltese] raiseTag:RuleListCut.eventTallHierarchyBarWeekend ropeImage:nil];
}

+ (void)metricsStrongImage:(UIImage *)image {
    [[self shared] sharpnessLegibleKindReversesModifyDividingImage:image ropeImage:nil];
}

+ (void)downVeryNowImage:(UIImage *)normalImage ropeImage:(nullable UIImage *)ropeImage {
    PortAtomView *instance = [self shared];
    instance.sobPubPaperImage = normalImage;
    instance.stateGainResourceLoopCritical = nil;
    instance.squarePopImage = ropeImage;
    instance.convergedView.image = normalImage;
}

+ (void)tagRevert {
    [[self shared] transferPickerBypassedSlashEntitled];
}

+ (BOOL)usageHexTapMen {
    return [self shared].arrayQueryWindow != nil;
}


- (void)sharpnessLegibleKindReversesModifyDividingImage:(UIImage *)image ropeImage:(nullable UIImage *)ropeImage {
    [self sharpnessLegibleKindReversesModifyDividingImage:image raiseTag:nil ropeImage:ropeImage];
}

- (void)sharpnessLegibleKindReversesModifyDividingImage:(UIImage *)image raiseTag:(NSString *)raiseTag ropeImage:(nullable UIImage *)ropeImage {
    dispatch_async(dispatch_get_main_queue(), ^{
        self.sobPubPaperImage = image;
        self.stateGainResourceLoopCritical = raiseTag;
        self.squarePopImage = ropeImage;
        
        if (!self.arrayQueryWindow) {
            [self millSmallFragmentsRunningPreserveWindow];
            [self longerWireOlympusAlienFinishing];
            [self comparedCollectAnnotatedFeedRawWin];
            [self tooDiphthongModernAskLowCombine]; 
        }
        
        [self.arrayQueryWindow makeKeyAndVisible];
        [self.rawCourseKinWindow makeKeyWindow];
        
        [self tooFigureOrdinaryGlyphPenPanoramaAnimation:YES];
        [self abortIdenticalInviteGlucosePersonTimer];
    });
}

- (void)transferPickerBypassedSlashEntitled {
    dispatch_async(dispatch_get_main_queue(), ^{
        [self.arrayQueryWindow resignKeyWindow];
        self.arrayQueryWindow.hidden = YES;
        self.arrayQueryWindow = nil;
    });
}


- (void)millSmallFragmentsRunningPreserveWindow {
    
    self.rawCourseKinWindow = [self issueNotifyingDiamondThumbSongWindow];
    
    
    DayChinaAskMidWindow *window = nil;
    
    
    if (@available(iOS 13.0, *)) {
        for (UIScene *scene in [UIApplication sharedApplication].connectedScenes) {
            if (scene.activationState == UISceneActivationStateForegroundActive &&
                [scene isKindOfClass:[UIWindowScene class]]) {
                window = [[DayChinaAskMidWindow alloc] initWithWindowScene:(UIWindowScene *)scene];
                break;
            }
        }
    }
    
    
    if (!window) {
        window = [[DayChinaAskMidWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    }
    
    
    window.backgroundColor = [UIColor clearColor];
    window.clipsToBounds = YES; 
    window.windowLevel = UIWindowLevelAlert + 1000;
    window.backgroundColor = [UIColor clearColor];
    window.rootViewController = [[ClipFillEyeForViewController alloc] init];
    window.hidden = NO;
    self.arrayQueryWindow = window;
    
    
    [self.arrayQueryWindow resignKeyWindow];
    [self.rawCourseKinWindow makeKeyWindow];
    
    
    [self addSubview:self.minorEldestView];
    
    
    self.frame = CGRectMake(0, 0, 60, 60);
    if (self.stateGainResourceLoopCritical) {
        [self.convergedView sd_setImageWithURL:[NSURL URLWithString:self.stateGainResourceLoopCritical] placeholderImage
                                              :[UIImage infoBusFilterVariationTurnName:RuleListCut.coloredDraft.lowCutoffPingConfigureMaltese]
                                       options:(SDWebImageDelayPlaceholder)];
    }else {
        self.convergedView.image = self.sobPubPaperImage;
    }
    self.convergedView.frame = self.bounds;
    
    [self.arrayQueryWindow addSubview:self];
    [self.arrayQueryWindow addSubview:self.pressSaltView];
}


- (void)tooDiphthongModernAskLowCombine {
    CGRect tagEyeChoose = self.torchWidgetNumberLinearStepDirectly;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
    UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
#pragma clang diagnostic pop
    
    if (UIInterfaceOrientationIsLandscape(orientation)) {
        CGFloat focal = 180;
        self.pressSaltView.frame = CGRectMake(
         (tagEyeChoose.size.width - focal)/2,
          tagEyeChoose.size.height - focal/2,
          focal,
          focal
        );
        self.pressSaltView.layer.masksToBounds = YES;
        self.pressSaltView.layer.cornerRadius = focal/2;
        self.koreanManLabel.center = CGPointMake(focal/2, focal/4);
    }
    
    else {
        CGFloat focal = 240;
        self.pressSaltView.frame = CGRectMake(

          (tagEyeChoose.size.width - focal/2),
          tagEyeChoose.size.height - focal/2,
          focal,
          focal
        );
        self.pressSaltView.layer.masksToBounds = YES;
        self.pressSaltView.layer.cornerRadius = focal/2;
        self.koreanManLabel.center = CGPointMake(focal/3, focal/4);
    }
}


- (void)internalSample {
    if (self.sexNaturalJson) {
        !self.shortcutHandler ?: self.shortcutHandler(self.sexNaturalJson[RuleListCut.coloredDraft.dropNowSame]);
        if ([self.sexNaturalJson[RuleListCut.coloredDraft.andCutKeyAlong] isEqualToString:RuleListCut.coloredDraft.inhalerSparseExpectNoiseItalian]) {
            self.minorEldestView.hidden = YES;
            _sexNaturalJson = nil;
        }
    }else {
        !self.shortcutHandler ?: self.shortcutHandler(nil);
    }
}

- (void)boxLooseMenCar:(UIPanGestureRecognizer *)gesture {
    if (uplinkCombiningWillMildBookmarks) return;
        
    CGPoint translation = [gesture translationInView:self.superview];
    
    switch (gesture.state) {
        case UIGestureRecognizerStateBegan:
            anonymousNearInlandSoftwarePickWon = self.center;
            _convergedView.alpha = 1;
            [self supportMandarinNameForbidArm];
            capCircleCrossPutCricketGender = NO; 
            otherLanguageYoungerProvidedCube = NO; 
            
            
            [self.layer removeAllAnimations];
            [self.pressSaltView.layer removeAllAnimations];
            
            
            self.pressSaltView.alpha = 0.0;
            self.pressSaltView.transform = CGAffineTransformIdentity;
            break;
            
        case UIGestureRecognizerStateChanged:{
            
            self.center = [self renamePermuteSpringDefineObserverUsedMightCenter:
                           CGPointMake(anonymousNearInlandSoftwarePickWon.x + translation.x,
                                       anonymousNearInlandSoftwarePickWon.y + translation.y)];
            
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
            
            BOOL WithinClear = UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation);
#pragma clang diagnostic pop
            CGRect feetFrame = self.pressSaltView.frame;
            CGRect lowRedone = CGRectInset(feetFrame, -280, WithinClear?-100:-280); 
            BOOL eggCupSindhi = CGRectContainsPoint(lowRedone, self.center);
            
            
            
            
            if (eggCupSindhi != otherLanguageYoungerProvidedCube) {
                otherLanguageYoungerProvidedCube = eggCupSindhi;
                
                
                [UIView animateWithDuration:0.3
                                      delay:0
                                    options:UIViewAnimationOptionBeginFromCurrentState
                                 animations:^{
                    self.pressSaltView.alpha = eggCupSindhi ? 1.0 : 0.0;
                    self.pressSaltView.transform = eggCupSindhi ? CGAffineTransformMakeScale(1.2, 1.2) : CGAffineTransformIdentity;
                } completion:nil];
            }
            
            
            eggCupSindhi = CGRectContainsPoint(CGRectInset(feetFrame, 0, 0), self.center);
            if (eggCupSindhi && !capCircleCrossPutCricketGender) {
                UIImpactFeedbackGenerator *feedback = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleMedium];
                [feedback prepare]; 
                [feedback impactOccurred];
                capCircleCrossPutCricketGender = YES;
                
                
                [UIView animateWithDuration:0.3
                                      delay:0
                                    options:UIViewAnimationOptionBeginFromCurrentState
                                 animations:^{
                    self.pressSaltView.transform = CGAffineTransformMakeScale(1.3, 1.3);
                } completion:nil];
            } else if (!eggCupSindhi) {
                if (capCircleCrossPutCricketGender) {
                    self.pressSaltView.transform = CGAffineTransformMakeScale(1.2, 1.2);
                }
                capCircleCrossPutCricketGender = NO;
            }
            
            
            lowRedone = CGRectInset(feetFrame, 0, 0);
            _endVoiceDrawingRelatedWrapping = CGRectContainsPoint(lowRedone, self.center);
            break;
        }
            
        case UIGestureRecognizerStateEnded:
        case UIGestureRecognizerStateCancelled: {
            
            [UIView animateWithDuration:0.3 animations:^{
                self.pressSaltView.alpha = 0.0;
                self.pressSaltView.transform = CGAffineTransformIdentity;
            }];
            
            if (_endVoiceDrawingRelatedWrapping) {
                [LowAlertView artFourBarUnitSeeWill:nil message:RuleListCut.costSonKnowKit.purchasedEndRangeFairWayTornado tryGetAmount:@[RuleListCut.costSonKnowKit.mainEastBad, RuleListCut.costSonKnowKit.noteSum] completion:^(NSInteger reasonIndex) {
                    if (reasonIndex ==1) {
                        [self transferPickerBypassedSlashEntitled];
                    }else {
                        [self tooFigureOrdinaryGlyphPenPanoramaAnimation:YES];
                        [self abortIdenticalInviteGlucosePersonTimer];
                    }
                }];
            } else {
                [self tooFigureOrdinaryGlyphPenPanoramaAnimation:YES];
                [self abortIdenticalInviteGlucosePersonTimer];
            }
            capCircleCrossPutCricketGender = NO;
            otherLanguageYoungerProvidedCube = NO;
            break;
        }

        default: break;
    }
}


- (void)tooFigureOrdinaryGlyphPenPanoramaAnimation:(BOOL)animate {
    if (!_storageDeclinedEqualAndHangLeast) return;
    
    
    if (uplinkCombiningWillMildBookmarks && animate) return;
    
    CGRect maleFrame = [self supplyCleanCanonWeightModeFrame];
    CGPoint center = self.center;
    
    CGFloat mail = maleFrame.origin.x;
    CGFloat fast = maleFrame.origin.x + maleFrame.size.width;
    CGFloat quit = maleFrame.origin.y;
    CGFloat gasp = maleFrame.origin.y + maleFrame.size.height;
    
    
    HelloGrowTipEdge moduleEdge = SparsePointPossibleRunDebuggingLifetime;
    CGFloat zeroDidFlow = CGFLOAT_MAX;
    
    
    CGFloat custom = center.x - mail;
    CGFloat nextFor = fast - center.x;
    CGFloat seven = center.y - quit;
    CGFloat totalTop = gasp - center.y;
    
    NSArray *rightBits = @[@(custom), @(nextFor), @(seven), @(totalTop)];
    NSArray *edges = @[@(DecomposeAscentStreetTheAscenderBox), @(ShakeTemporaryImperialChapterMinorPrintable),
                       @(TableFootballMagnitudePanWill), @(PassSummaryTertiaryCubeOpaqueSwipe)];
    
    for (NSInteger i = 0; i < rightBits.count; i++) {
        CGFloat distance = [rightBits[i] floatValue];
        if (distance < zeroDidFlow) {
            zeroDidFlow = distance;
            moduleEdge = [edges[i] integerValue];
        }
    }
    
    
    if (moduleEdge == self.bedExactnessEdge) {
        CGPoint longestCenter = self.center;
        CGPoint actionCenter = [self consumedDetectedBoxKindSilencedMoreEdge:moduleEdge];
        CGFloat distance = hypot(longestCenter.x - actionCenter.x, longestCenter.y - actionCenter.y);
        if (distance < 5.0) { 
            return;
        }
    }
    
    self.bedExactnessEdge = moduleEdge;
    
    
    CGPoint actionCenter = [self consumedDetectedBoxKindSilencedMoreEdge:moduleEdge];
    CGPoint basicCenter = [self ourSheBusSaltKeysItsLiteralEdge:moduleEdge];
    
    
    uplinkCombiningWillMildBookmarks = YES;
    
    
    [CATransaction begin];
    [CATransaction setCompletionBlock:^{
        self->uplinkCombiningWillMildBookmarks = NO;
    }];
    
    [UIView animateWithDuration:animate ? 0.3 : 0
                     animations:^{
        self.center = actionCenter;
        self.minorEldestView.center = basicCenter;
    }];
    
    [CATransaction commit];
}


- (CGPoint)consumedDetectedBoxKindSilencedMoreEdge:(HelloGrowTipEdge)edge {
    CGRect maleFrame = [self supplyCleanCanonWeightModeFrame];
    CGPoint center = self.center;
    
    CGFloat mail = maleFrame.origin.x;
    CGFloat fast = maleFrame.origin.x + maleFrame.size.width;
    CGFloat quit = maleFrame.origin.y;
    CGFloat gasp = maleFrame.origin.y + maleFrame.size.height;
    
    CGPoint actionCenter = center;
    
    switch (edge) {
        case DecomposeAscentStreetTheAscenderBox:
            actionCenter.x = mail + self.bounds.size.width/2 + _standStyleList;
            break;
        case ShakeTemporaryImperialChapterMinorPrintable:
            actionCenter.x = fast - self.bounds.size.width/2 - _standStyleList;
            break;
        case TableFootballMagnitudePanWill:
            actionCenter.y = quit + self.bounds.size.height/2 + _standStyleList;
            break;
        case PassSummaryTertiaryCubeOpaqueSwipe:
            actionCenter.y = gasp - self.bounds.size.height/2 - _standStyleList;
            break;
        default:
            break;
    }
    
    
    return [self renamePermuteSpringDefineObserverUsedMightCenter:actionCenter];
}


- (CGPoint)ourSheBusSaltKeysItsLiteralEdge:(HelloGrowTipEdge)edge {
    CGPoint basicCenter = CGPointMake(0, 0);
    
    switch (edge) {
        case DecomposeAscentStreetTheAscenderBox:
            basicCenter.x = self.bounds.size.width;
            break;
        case ShakeTemporaryImperialChapterMinorPrintable:
            
            break;
        case TableFootballMagnitudePanWill:
            basicCenter.x = self.bounds.size.width;
            basicCenter.y = self.bounds.size.height;
            break;
        case PassSummaryTertiaryCubeOpaqueSwipe:
            basicCenter.x = self.bounds.size.width;
            break;
        default:
            break;
    }
    
    return basicCenter;
}


- (void)abortIdenticalInviteGlucosePersonTimer {
    if (_revealAmharicMonotonicExistingBag <= 0) return;
    
    [self supportMandarinNameForbidArm];
    _stairFeedbackTimer = [NSTimer scheduledTimerWithTimeInterval:_revealAmharicMonotonicExistingBag
                                                     target:self
                                                   selector:@selector(labelMenuArchivePickAny)
                                                   userInfo:nil
                                                    repeats:NO];
}

- (void)supportMandarinNameForbidArm {
    [_stairFeedbackTimer invalidate];
    _stairFeedbackTimer = nil;
}

- (void)labelMenuArchivePickAny {
    [UIView animateWithDuration:0.3 animations:^{
        self.convergedView.alpha = 0.5;
        
        CGRect frame = self.frame;
        switch (self.bedExactnessEdge) {
            case DecomposeAscentStreetTheAscenderBox:
                frame.origin.x -= self.standStyleList;
                break;
            case ShakeTemporaryImperialChapterMinorPrintable:
                frame.origin.x += self.standStyleList;
                break;
            case TableFootballMagnitudePanWill:
                frame.origin.y -= self.standStyleList;
                break;
            case PassSummaryTertiaryCubeOpaqueSwipe:
                frame.origin.y += self.standStyleList;
                break;
            default:
                break;
        }
        self.frame = frame;
    }];
}


- (void)biotinKitObscuredFlippedStringSelect {
    [self longerWireOlympusAlienFinishing];
    [self tooDiphthongModernAskLowCombine]; 
    [self tooFigureOrdinaryGlyphPenPanoramaAnimation:YES];
}


- (void)longerWireOlympusAlienFinishing {
    UIWindow *keyWindow = PopParserManager.shared.draftEarBookWindow; //self.rawCourseKinWindow;
    UIEdgeInsets safeArea = UIEdgeInsetsZero;
    if (![UIDevice dolbyOur]) {
        safeArea = UIEdgeInsetsZero;
    }else if([UIDevice tagDid]) {
        safeArea = UIEdgeInsetsMake(0, 0, 20, 0);
    }else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
        UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
#pragma clang diagnostic pop
        safeArea = keyWindow.safeAreaInsets;
        switch (orientation) {
            case UIInterfaceOrientationPortrait:
                safeArea = UIEdgeInsetsMake(safeArea.top-10, 5, 15, 5);
                break;
            case UIInterfaceOrientationPortraitUpsideDown:
                safeArea = UIEdgeInsetsMake(15, 5, safeArea.bottom-10, 5);
                break;
            case UIInterfaceOrientationLandscapeRight:
                safeArea = UIEdgeInsetsMake(5, safeArea.right-10, 15, 5);
                break;
            case UIInterfaceOrientationLandscapeLeft:
                safeArea = UIEdgeInsetsMake(5, 5, 15, safeArea.left-10);
                break;
            case UIInterfaceOrientationUnknown:
            default:
                safeArea = safeArea;
        }
    }
    
    self.deepColleagueYellowGivenReason = safeArea;
    self.torchWidgetNumberLinearStepDirectly = keyWindow.bounds;
}

- (CGRect)supplyCleanCanonWeightModeFrame {
    
    return CGRectMake(
        self.torchWidgetNumberLinearStepDirectly.origin.x + self.deepColleagueYellowGivenReason.left,
        self.torchWidgetNumberLinearStepDirectly.origin.y + self.deepColleagueYellowGivenReason.top,
        self.torchWidgetNumberLinearStepDirectly.size.width - (self.deepColleagueYellowGivenReason.left + self.deepColleagueYellowGivenReason.right),
        self.torchWidgetNumberLinearStepDirectly.size.height - (self.deepColleagueYellowGivenReason.top + self.deepColleagueYellowGivenReason.bottom)
    );
}


- (void)comparedCollectAnnotatedFeedRawWin {
    NSString *phraseSumOld = [[NSUserDefaults standardUserDefaults] valueForKey:RuleListCut.coloredDraft.midKilobytesToggleAdjustedAdjustDetails];
    if (phraseSumOld) {
        self.center = CGPointFromString(phraseSumOld);
    }else {
        
        CGRect maleFrame = [self supplyCleanCanonWeightModeFrame];
        self.center = CGPointMake(maleFrame.origin.x + maleFrame.size.width - self.bounds.size.width/2 - _standStyleList,
                                  maleFrame.origin.y + maleFrame.size.height/2);
    }
}


- (UIWindow *)issueNotifyingDiamondThumbSongWindow {
    if (@available(iOS 13.0, *)) {
        NSSet<UIScene *> *scenes = [UIApplication sharedApplication].connectedScenes;
        for (UIScene *scene in scenes) {
            if (scene.activationState == UISceneActivationStateForegroundActive &&
                [scene isKindOfClass:[UIWindowScene class]]) {
                UIWindowScene *windowScene = (UIWindowScene *)scene;
                return windowScene.windows.firstObject;
            }
        }
    }
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
    return [UIApplication sharedApplication].keyWindow;
#pragma clang diagnostic pop
}

- (CGPoint)renamePermuteSpringDefineObserverUsedMightCenter:(CGPoint)proposedCenter {
    CGRect maleFrame = [self supplyCleanCanonWeightModeFrame];
    CGSize buttonSize = self.bounds.size;
    
    CGFloat mail = maleFrame.origin.x + buttonSize.width/2;
    CGFloat fast = maleFrame.origin.x + maleFrame.size.width - buttonSize.width/2;
    CGFloat quit = maleFrame.origin.y + buttonSize.height/2;
    CGFloat gasp = maleFrame.origin.y + maleFrame.size.height - buttonSize.height/2;
    
    return CGPointMake(
        MAX(mail, MIN(proposedCenter.x, fast)),
        MAX(quit, MIN(proposedCenter.y, gasp))
    );
}

- (void)dealloc {
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}

@end
