






#import "UnloadDryViewController.h"
#import "TraveledPresentSlidingFatThousandsHandler.h"

@interface UnloadDryViewController ()<WKNavigationDelegate,WKUIDelegate,WKScriptMessageHandler>

@end

@implementation UnloadDryViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.jobPanListButton.hidden = YES;
    self.twoPostalButton.hidden = YES;
    [self softnessExtraView];
}

- (void)softnessExtraView
{
    WKUserContentController *tapsMenShotHit = [[WKUserContentController alloc] init];
    WKUserScript *addSelfRaw = [[WKUserScript alloc] initWithSource:MakerOldest.redoneFinder.farHashBasalMindOld injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:YES];
    [tapsMenShotHit addUserScript:addSelfRaw];
    
    WKWebViewConfiguration * config = [[WKWebViewConfiguration alloc] init];
    WKPreferences *wayPatient = [[WKPreferences alloc]init];
    wayPatient.javaScriptCanOpenWindowsAutomatically = YES;
    wayPatient.minimumFontSize = 40.0;
    wayPatient.javaScriptEnabled = YES;
    config.preferences = wayPatient;
    config.selectionGranularity = WKSelectionGranularityDynamic;
    config.preferences.minimumFontSize = 18;
    config.preferences.javaScriptEnabled = YES;
    config.userContentController = tapsMenShotHit;
    
    self.settingRope = [[WKWebView alloc] initWithFrame:CGRectZero];
    self.settingRope.backgroundColor = UIColor.clearColor;
    self.settingRope.scrollView.backgroundColor = UIColor.clearColor;
    self.settingRope.navigationDelegate = self;
    self.settingRope.opaque = YES;
    self.settingRope.scrollView.bounces = NO;
    self.settingRope.scrollView.showsVerticalScrollIndicator = NO;
    self.settingRope.scrollView.showsHorizontalScrollIndicator = NO;
    self.settingRope.UIDelegate = self;
    [self.view addSubview:self.settingRope];
    self.settingRope.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
    
    
    TraveledPresentSlidingFatThousandsHandler *multiple = [[TraveledPresentSlidingFatThousandsHandler alloc] initWithDelegate:self];
    TraveledPresentSlidingFatThousandsHandler *footFlat = [[TraveledPresentSlidingFatThousandsHandler alloc] initWithDelegate:self];
    
    [self.settingRope.configuration.userContentController addScriptMessageHandler:multiple name:MakerOldest.redoneFinder.cubeEyeDisplayHitGrandaunt];
    [self.settingRope.configuration.userContentController addScriptMessageHandler:footFlat name:MakerOldest.redoneFinder.centersWatchArtOlympusDisablingStepsonDarker];
}

- (void)setPastMounted:(NSString *)pastMounted {
    _pastMounted = pastMounted;
    NSURL *url = [NSURL URLWithString:pastMounted];
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:15.0];
    [request addValue:[MakerOldest grantingGreekHerSinhaleseOccurToken] forHTTPHeaderField:MakerOldest.redoneFinder.proxyMoreLessLoopsGolf];
    [self.settingRope loadRequest:request];
}

- (void)oldestBridgedScatteredDownPopHeadTint:(NSURL *)URL {
    if ([self.sameSitePanel respondsToSelector:@selector(endsButView:loseArteryAction:see:)]) {
        [self.sameSitePanel endsButView:self.settingRope loseArteryAction:URL.host see:URL];
    }
}



- (void)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse decisionHandler:(void (^)(WKNavigationResponsePolicy))decisionHandler {
    decisionHandler(WKNavigationResponsePolicyAllow);
}


- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {
    NSURL *URL = navigationAction.request.URL;
    
    if ([URL.scheme hasPrefix:MakerOldest.redoneFinder.looseNet]) {
        [self oldestBridgedScatteredDownPopHeadTint:URL];
        decisionHandler(WKNavigationActionPolicyCancel);
        return;
    }
    decisionHandler(WKNavigationActionPolicyAllow);
}


-(void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation{

}


- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation{
    

}


-(void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
    
    [webView evaluateJavaScript:MakerOldest.redoneFinder.figureLegalCatEvictHuePresenter completionHandler:nil];
    
    [webView evaluateJavaScript:MakerOldest.redoneFinder.zoneLettishWritingEncryptSmallestSay completionHandler:nil];
    [webView evaluateJavaScript:MakerOldest.redoneFinder.keyAlongExecClearedOrder completionHandler:nil];
    
    [FetchSenseView startHandoffUsabilityHexWetView:self.view];
    while (self.settingRope.isLoading) {
        return;
    }
}


- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message {
    
    
    if ([self.sameSitePanel respondsToSelector:@selector(endsButView:loseArteryAction:see:)]) {
        [self.sameSitePanel endsButView:self.settingRope loseArteryAction:message.name see:message.body];
    }
}

-(void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(void))completionHandler{
    
    [TagAlertView seekingFontStayBeenLibrariesSlovak:@"" message:message completion:^(NSInteger subDogIndex) {
        completionHandler();
    }];
}



- (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures{
    WKFrameInfo *frameInfo = navigationAction.targetFrame;
    if (![frameInfo isMainFrame]) {
        [webView loadRequest:navigationAction.request];
    }
    return nil;
}


- (void)webView:(WKWebView *)webView runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(nullable NSString *)defaultText initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSString * __nullable result))completionHandler{
    completionHandler(MakerOldest.redoneFinder.tapsPhysical);
}


- (void)webView:(WKWebView *)webView runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(BOOL result))completionHandler{
    completionHandler(YES);
}

- (void)dealloc {
    self.settingRope.UIDelegate = nil;
    self.view = nil;
    [self.settingRope.configuration.userContentController removeAllUserScripts];
}

@end
