






#import "MaleWorldViewController.h"
#import "SayListenersSelectedEntitiesUpdatesHandler.h"

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

@end

@implementation MaleWorldViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    

    
    if (self.eggTakeTwoRenewalEndpointImageView) {
        [self.eggTakeTwoRenewalEndpointImageView removeFromSuperview];
        self.eggTakeTwoRenewalEndpointImageView = nil;
    }

    
    self.view.layer.cornerRadius = 0;

    self.browseWorkButton.hidden = YES;
    self.pastFlashButton.hidden = YES;
    [self loudGaspEnterView];
}

- (void)loudGaspEnterView
{
    WKUserContentController *celticSamePort = [[WKUserContentController alloc] init];
    WKUserScript *humanTrash = [[WKUserScript alloc] initWithSource:MenTintSave.ironRouteMix.itsLocationPassiveHyphenStamp injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:YES];
    [celticSamePort addUserScript:humanTrash];
    
    WKWebViewConfiguration * config = [[WKWebViewConfiguration alloc] init];
    WKPreferences *lawChapter = [[WKPreferences alloc]init];
    lawChapter.javaScriptCanOpenWindowsAutomatically = YES;
    lawChapter.minimumFontSize = 40.0;
    lawChapter.javaScriptEnabled = YES;
    config.preferences = lawChapter;
    config.selectionGranularity = WKSelectionGranularityDynamic;
    config.preferences.minimumFontSize = 18;
    config.preferences.javaScriptEnabled = YES;
    config.userContentController = celticSamePort;
    
    self.anyReadHelp = [[WKWebView alloc] initWithFrame:CGRectZero];
    self.anyReadHelp.backgroundColor = UIColor.clearColor;
    self.anyReadHelp.scrollView.backgroundColor = UIColor.clearColor;
    self.anyReadHelp.navigationDelegate = self;
    self.anyReadHelp.opaque = YES;
    self.anyReadHelp.scrollView.bounces = NO;
    self.anyReadHelp.scrollView.showsVerticalScrollIndicator = NO;
    self.anyReadHelp.scrollView.showsHorizontalScrollIndicator = NO;
    self.anyReadHelp.UIDelegate = self;
    [self.view addSubview:self.anyReadHelp];
    self.anyReadHelp.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
    
    
    SayListenersSelectedEntitiesUpdatesHandler *noneFact = [[SayListenersSelectedEntitiesUpdatesHandler alloc] initWithDelegate:self];
    SayListenersSelectedEntitiesUpdatesHandler *tipGlyph = [[SayListenersSelectedEntitiesUpdatesHandler alloc] initWithDelegate:self];
    
    [self.anyReadHelp.configuration.userContentController addScriptMessageHandler:noneFact name:MenTintSave.ironRouteMix.combiningBestWonPrettyLoop];
    [self.anyReadHelp.configuration.userContentController addScriptMessageHandler:tipGlyph name:MenTintSave.ironRouteMix.boundNameCapAcuteJustMiterSeven];
}

- (void)setTextBeenTag:(NSString *)textBeenTag {
    _textBeenTag = textBeenTag;
    NSURL *url = [NSURL URLWithString:textBeenTag];
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:15.0];
    [request addValue:[MenTintSave capsOwnershipWeekRatioViolationToken] forHTTPHeaderField:MenTintSave.ironRouteMix.fitHourExistSinhaleseAsleep];
    [self.anyReadHelp loadRequest:request];
}

- (void)dueRedefinedFreePreventsForDidRead:(NSURL *)URL {
    if ([self.suchSeeCutWet respondsToSelector:@selector(wasSaveView:maxFactTryAction:fix:)]) {
        [self.suchSeeCutWet wasSaveView:self.anyReadHelp maxFactTryAction:URL.host fix: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:MenTintSave.ironRouteMix.withSock]) {
        [self dueRedefinedFreePreventsForDidRead: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:MenTintSave.ironRouteMix.pressDublinInferiorsCaptureMiddlePredicted completionHandler:nil];
    
    [webView evaluateJavaScript:MenTintSave.ironRouteMix.winAlternateColumnsInsetSecondaryMenstrual completionHandler:nil];
    [webView evaluateJavaScript:MenTintSave.ironRouteMix.nonceOrderSunNewsstandHomepage completionHandler:nil];
    
    [TaskSyntaxView basqueCreatorLocalizedIncomingRectifiedView:self.view];
    while (self.anyReadHelp.isLoading) {
        return;
    }
}


- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message {
    
    
    if ([self.suchSeeCutWet respondsToSelector:@selector(wasSaveView:maxFactTryAction:fix:)]) {
        [self.suchSeeCutWet wasSaveView:self.anyReadHelp maxFactTryAction:message.name fix:message.body];
    }
}

-(void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(void))completionHandler{
    
    [TwoAlertView newsstandMessagingAppleDrawDropFuture:@"" message:message completion:^(NSInteger bitUseIndex) {
        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(MenTintSave.ironRouteMix.localityText);
}


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

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

@end
