<commit_before>import UIKit
import Marshroute

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate
{
    var window: UIWindow?
    
    // Auxiliary window to show touch marker (even over `UIPopoverController`).
    // It should be created lazily, because `UIKit` works incorrenctly
    // if you create two `UIWindow`s at `application(_:didFinishLaunchingWithOptions:)`
    fileprivate lazy var touchCursorDrawingWindow: UIWindow? = {
        let window = UIWindow(frame: UIScreen.main.bounds)
        
        window.isUserInteractionEnabled = false
        window.windowLevel = UIWindowLevelStatusBar
        window.backgroundColor = .clear
        window.isHidden = false
        window.rootViewController = self.window?.rootViewController
        
        return window
    }()
    
    fileprivate var touchCursorDrawer: TouchCursorDrawerImpl?
    
    fileprivate var touchCursorDrawingWindowProvider: (() -> (UIWindow?)) {
        return { [weak self] in
            return self?.touchCursorDrawingWindow
        }
    }
    
    fileprivate var touchEventObserver: TouchEventObserver?

    fileprivate var rootTransitionsHandler: ContainingTransitionsHandler?
    
    fileprivate var rootTransitionsHandlerProvider: (() -> (ContainingTransitionsHandler?)) {
        return { [weak self] in
            return self?.rootTransitionsHandler
        }
    }
    
    // MARK: - UIApplicationDelegate
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool
    {
        // Init `Marshroute` stack
        MarshroutePrintManager.setUpPrintPlugin(DemoPrintPlugin())
        MarshrouteAssertionManager.setUpPrintPlugin(DemoAssertionPlugin())
        let marshrouteSetupService = MarshrouteSetupServiceImpl()
        
        let applicationModuleSeed = ApplicationModuleSeedProvider().applicationModuleSeed(
            marshrouteSetupService: marshrouteSetupService
        )
        
        // Init service factory
        let serviceFactory = ServiceFactoryImpl(
            topViewControllerFinder: applicationModuleSeed.marshrouteStack.topViewControllerFinder,
            rootTransitionsHandlerProvider: rootTransitionsHandlerProvider,
            transitionsMarker: applicationModuleSeed.marshrouteStack.transitionsMarker,
            transitionsTracker: applicationModuleSeed.marshrouteStack.transitionsTracker,
            transitionsCoordinatorDelegateHolder: applicationModuleSeed.marshrouteStack.transitionsCoordinatorDelegateHolder
        )
        
        // Init assemly factory
        let assemblyFactory = AssemblyFactoryImpl(
            serviceFactory: serviceFactory,
            marshrouteStack: applicationModuleSeed.marshrouteStack
        )
        
        let applicationModule: ApplicationModule
            <commit_msg>AI-7358: Fix assertionManager usage syntax<commit_after>import UIKit
import Marshroute

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate
{
    var window: UIWindow?
    
    // Auxiliary window to show touch marker (even over `UIPopoverController`).
    // It should be created lazily, because `UIKit` works incorrenctly
    // if you create two `UIWindow`s at `application(_:didFinishLaunchingWithOptions:)`
    fileprivate lazy var touchCursorDrawingWindow: UIWindow? = {
        let window = UIWindow(frame: UIScreen.main.bounds)
        
        window.isUserInteractionEnabled = false
        window.windowLevel = UIWindowLevelStatusBar
        window.backgroundColor = .clear
        window.isHidden = false
        window.rootViewController = self.window?.rootViewController
        
        return window
    }()
    
    fileprivate var touchCursorDrawer: TouchCursorDrawerImpl?
    
    fileprivate var touchCursorDrawingWindowProvider: (() -> (UIWindow?)) {
        return { [weak self] in
            return self?.touchCursorDrawingWindow
        }
    }
    
    fileprivate var touchEventObserver: TouchEventObserver?

    fileprivate var rootTransitionsHandler: ContainingTransitionsHandler?
    
    fileprivate var rootTransitionsHandlerProvider: (() -> (ContainingTransitionsHandler?)) {
        return { [weak self] in
            return self?.rootTransitionsHandler
        }
    }
    
    // MARK: - UIApplicationDelegate
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool
    {
        // Init `Marshroute` stack
        MarshroutePrintManager.setUpPrintPlugin(DemoPrintPlugin())
        MarshrouteAssertionManager.setUpAssertionPlugin(DemoAssertionPlugin())
        let marshrouteSetupService = MarshrouteSetupServiceImpl()
        
        let applicationModuleSeed = ApplicationModuleSeedProvider().applicationModuleSeed(
            marshrouteSetupService: marshrouteSetupService
        )
        
        // Init service factory
        let serviceFactory = ServiceFactoryImpl(
            topViewControllerFinder: applicationModuleSeed.marshrouteStack.topViewControllerFinder,
            rootTransitionsHandlerProvider: rootTransitionsHandlerProvider,
            transitionsMarker: applicationModuleSeed.marshrouteStack.transitionsMarker,
            transitionsTracker: applicationModuleSeed.marshrouteStack.transitionsTracker,
            transitionsCoordinatorDelegateHolder: applicationModuleSeed.marshrouteStack.transitionsCoordinatorDelegateHolder
        )
        
        // Init assemly factory
        let assemblyFactory = AssemblyFactoryImpl(
            serviceFactory: serviceFactory,
            marshrouteStack: applicationModuleSeed.marshrouteStack
        )
        
        let applicationModule: ApplicationModule
            
{'fraction_non_alphanumeric': 0.05980409004983674, 'fraction_numerical': 0.0006874033339061695, 'mean_word_length': 3.139402560455192, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6706094', 'n_tokens_mistral': 1408, 'n_tokens_neox': 1406, 'n_words': 292}