فهرست منبع

【综合】整理代码

tangchao 4 ماه پیش
والد
کامیت
c1f74e797b

+ 22 - 0
PDF Office/PDF Master/Class/Appearance/Image.xcassets/Other/KMFolderIcon.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "filename" : "suffix.pdf",
+      "idiom" : "universal"
+    },
+    {
+      "appearances" : [
+        {
+          "appearance" : "luminosity",
+          "value" : "dark"
+        }
+      ],
+      "filename" : "suffix 1.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
PDF Office/PDF Master/Class/Appearance/Image.xcassets/Other/KMFolderIcon.imageset/suffix 1.pdf


BIN
PDF Office/PDF Master/Class/Appearance/Image.xcassets/Other/KMFolderIcon.imageset/suffix.pdf


+ 123 - 214
PDF Office/PDF Master/KMClass/ImageToPDF/Controller/KMBatchOperateImageToPDFViewController.swift

@@ -14,23 +14,7 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
     @IBOutlet weak var headerBottomLine: ComponentDivider!
     
     @IBOutlet var outputTypeLabel: NSTextField!
-    @IBOutlet var createNewPDFBtn: NSButton!
-    @IBOutlet var btnMerge: NSButton!
-    @IBOutlet var appendPDFBtn: NSButton!
-    @IBOutlet var appendTextField: NSTextField!
-    @IBOutlet var appendOtherPDFBtn: NSButton!
-    @IBOutlet var appendBackView: NSView!
-    
     @IBOutlet var ocrLabel: NSTextField!
-    @IBOutlet var ocrSelectBtn: NSButton!
-    @IBOutlet var languaeBox: NSBox!
-    @IBOutlet var languageButton: NSButton!
-    @IBOutlet var saveAsButton: NSButton!
-    @IBOutlet var planButton: NSButton!
-    @IBOutlet var selectLanguageLabel: NSTextField!
-    @IBOutlet var planBox: NSBox!
-    
-    @IBOutlet var actionButton: NSButton!
     
     @IBOutlet weak var newPDFBox: NSBox!
     @IBOutlet weak var mergeAllBox: NSBox!
@@ -80,6 +64,16 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
         return view
     }()
     
+    private lazy var appendBackInput_: ComponentInput = {
+        let view = ComponentInput()
+        return view
+    }()
+    
+    private lazy var appendBackButtonInput_: ComponentInputAddon = {
+        let view = ComponentInputAddon()
+        return view
+    }()
+    
     private lazy var ocrCheckBox_: ComponentCheckBox = {
         let view = ComponentCheckBox()
         view.properties = ComponentCheckBoxProperty(size: .s, state: .normal, isDisabled: false, showhelp: false, text: NSLocalizedString("Recognize text if needed", comment: ""), checkboxType: .normal)
@@ -90,19 +84,21 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
         let view = ComponentSelect()
         
         view.properties = ComponentSelectProperties(size: .s, state: .normal, isDisabled: false, isError: false, leftIcon: false, placeholder: nil, errorText: nil, creatable: false, text: KMLocalizedString("", comment: ""))
-//        view.delegate = self
+        view.delegate = self
         return view
     }()
     
     private var ocrPlanRadio_: ComponentRadio = {
         let view = ComponentRadio()
         view.properties = ComponentCheckBoxProperty(size: .s, state: .normal, isDisabled: false, showhelp: true, text: KMLocalizedString("OCR Plan 1-Online", comment: ""), checkboxType: .normal)
+        view.toolTip = KMLocalizedString("The OCR service works via an internet connection. We would suggest you to perform OCR using a VPN connection while the service is limited.")
         return view
     }()
     
     private var ocrPlanRadio2_: ComponentRadio = {
         let view = ComponentRadio()
         view.properties = ComponentCheckBoxProperty(size: .s, state: .normal, isDisabled: false, showhelp: true, text: KMLocalizedString("OCR Plan 2-Online", comment: ""), checkboxType: .normal)
+        view.toolTip = KMLocalizedString("The OCR service works via an internet connection. We would suggest you to perform OCR using a VPN connection while the service is limited.")
         return view
     }()
     
@@ -145,22 +141,8 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
     }
     
     private func _updateActionButtonEnable(_ enabled: Bool) {
-        if enabled {
-            self.actionButton.tag = 1
-            
-            applyButton.properties.isDisabled = false
-            applyButton.reloadData()
-        } else {
-            self.actionButton.tag = 0
-            
-            applyButton.properties.isDisabled = true
-            applyButton.reloadData()
-        }
-    }
-    
-    deinit {
-        NotificationCenter.default.removeObserver(self)
-        DistributedNotificationCenter.default().removeObserver(self)
+        applyButton.properties.isDisabled = !enabled
+        applyButton.reloadData()
     }
     
     override func viewDidLoad() {
@@ -171,6 +153,44 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
         createNewPDFRadio_.properties.checkboxType = .selected
         createNewPDFRadio_.reloadData()
         
+        let color = ComponentLibrary.shared.getComponentColorFromKey("comp-field/colorBorder-dis")
+        appendBackBox.borderColor = color
+        let inputWithAddonProperty = ComponentInputProperty(size: .s,
+                                                            state: .normal,
+                                                            isError: false,
+                                                            showPrefix: false,
+                                                            showSuffix: false,
+                                                            showClear: false,
+                                                            isDisabled: true,
+                                                            placeholder: KMLocalizedString("Select File..."),
+                                                            text: "",
+                                                            creatable: false)
+        appendBackInput_.properties = inputWithAddonProperty
+        appendBackInput_.properties.propertyInfo.cornerRadius_topRight = 0
+        appendBackInput_.properties.propertyInfo.cornerRadius_bottomRight = 0
+        appendBackInput_.properties.isDisabled = true
+        appendBackInput_.reloadData()
+        
+        appendBackButtonInput_.properties = ComponentInputAddonProperty(size: .s,
+                                                                state: .normal,
+                                                                addOnBefore: false,
+                                                                onlyRead: false,
+                                                                addonType: .imageWithColor,
+                                                                 iconImage: NSImage(named: "KMFolderIcon"))
+        appendBackButtonInput_.properties.isDisabled = true
+        appendBackButtonInput_.reloadData()
+        appendBackButtonInput_.setTarget(self, action: #selector(buttonItemClicked_AppendOtherPDF))
+        appendBackBox.contentView?.addSubview(appendBackInput_)
+        appendBackBox.contentView?.addSubview(appendBackButtonInput_)
+        let boxH: CGFloat = 30
+        appendBackInput_.frame = NSMakeRect(0, 0, 204, boxH)
+        appendBackButtonInput_.frame = NSMakeRect(NSMaxX(appendBackInput_.frame), 0, boxH+2, boxH)
+        let hView = NSView()
+        appendBackBox.contentView?.addSubview(hView)
+        hView.frame = NSMakeRect(NSMaxX(appendBackInput_.frame), 0, 1, 32)
+        hView.wantsLayer = true
+        hView.layer?.backgroundColor = color.cgColor
+        
         ocrLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
         ocrSelectBox.borderWidth = 0
         ocrSelectBox.contentView = ocrCheckBox_
@@ -179,6 +199,7 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
         languageView_.reloadData()
         ocrPlanRadio_.setTarget(self, action: #selector(ocrPlanAction))
         ocrPlanRadio_.properties.isDisabled = true
+        ocrPlanRadio_.properties.checkboxType = .selected
         ocrPlanRadio_.reloadData()
         ocrPlanRadio2_.setTarget(self, action: #selector(ocrPlanAction))
         ocrPlanRadio2_.properties.isDisabled = true
@@ -188,6 +209,7 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
         
         bottomBox.borderWidth = 0
         applyButton.properties = ComponentButtonProperty(type: .primary, size: .m, onlyIcon: false, buttonText: KMLocalizedString("Apply"))
+        applyButton.setTarget(self, action: #selector(buttonClicked_ImageToPDF))
         
         self.localizedLanguage()
         self.configuUI()
@@ -197,17 +219,14 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
         } else {
             self._updateActionButtonEnable(false)
         }
+    }
+    
+    override func addNotifations() {
+        super.addNotifations()
         
-        NotificationCenter.default.addObserver(self, selector: #selector(OCRSelectedLanguagesChangeNotification(notification:)), name: NSNotification.Name("KMOCRSelectedLanguagesChangeNotification"), object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(OCRSelectedPlanChangeNotification(notification:)), name: NSNotification.Name("KMOCRSelectedPlanChangeNotification"), object: nil)
-        
-//        NotificationCenter.default.addObserver(self, selector: #selector(themeChanged(notification:)), name: NSNotification.Name("AppleInterfaceThemeChangedNotification"), object: nil)
-        DistributedNotificationCenter.default().addObserver(self, selector: #selector(themeChanged(notification:)), name: NSNotification.Name("AppleInterfaceThemeChangedNotification"), object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(batchFilesCountNotification(notification:)), name: NSNotification.Name("KMBatchFilesCountNotification"), object: nil)
     }
     
-    
-    
     override func updateUILanguage() {
         super.updateUILanguage()
         
@@ -226,18 +245,13 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
             self.headerBottomLine.properties = ComponentDividerProperty()
             self.ocrLabel.textColor = titleColor
             self.bottomTopLine.properties = ComponentDividerProperty()
+            
+            self.updateViewColor()
         }
     }
     
     func localizedLanguage() {
         self.outputTypeLabel.stringValue = KMLocalizedString("Output")
-        self.btnMerge.title = KMLocalizedString("Merge All")
-        self.createNewPDFBtn.title = KMLocalizedString("New PDF Document")
-        self.appendPDFBtn.title = KMLocalizedString("Append To Existing File")
-        self.appendTextField.placeholderString = KMLocalizedString("Select a File")
-        self.selectLanguageLabel.stringValue = KMLocalizedString("Select OCR Language:")
-        self.selectLanguageLabel.isHidden = true
-        self.ocrSelectBtn.title = KMLocalizedString("OCR Plan")
         
         let languages = KMGOCRManager.languages() as NSArray
         let strings = languages.value(forKeyPath: KMGOCRLanguageStringKey) as? [String]
@@ -251,7 +265,6 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
             menuItemArr.append(itemProperty)
         }
 
-        
         languageView_.updateMenuItemsArr(menuItemArr)
         
         languageView_.selectItemAtIndex(0)
@@ -260,47 +273,22 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
         languageView_.reloadData()
         
         self.updateLanguageButton((KMGOCRManager.default().selectedLanguages?.value(forKeyPath: KMGOCRLanguageStringKey) as? [String]))
-        
-        self.actionButton.title = KMLocalizedString("Save as PDF")
-        self.saveAsButton.title = KMLocalizedString("Save as TXT")
         self.OCRSelectedPlanChangeAction()
     }
     func configuUI() {
         self.view.wantsLayer = true
         
-        appendOtherPDFBtn.wantsLayer = true
-        appendBackView.wantsLayer = true
-        appendBackView.layer?.borderWidth = 0.5
-        
-        self.appendOtherPDFBtn.layer?.backgroundColor = KMAppearance.Interactive.s0Color().withAlphaComponent(0.4).cgColor
-        
-        createNewPDFBtn.setTitleColor(KMAppearance.Layout.h0Color())
         newPDFBox.borderWidth = 0
         newPDFBox.contentView = createNewPDFRadio_
         createNewPDFRadio_.setTarget(self, action: #selector(buttonClicked_CreateNewPDF))
         
-        createNewPDFBtn.isHidden = true
-        self.btnMerge.setTitleColor(KMAppearance.Layout.h0Color())
-        self.appendPDFBtn.setTitleColor(KMAppearance.Layout.h0Color())
-        
-        appendBackBox.contentView = appendBackInput
-        
-        btnMerge.isHidden = true
         mergeAllBox.borderWidth = 0
         mergeAllBox.contentView = mergeAllCheckBox_
         
-        appendPDFBtn.isHidden = true
         appendBox.borderWidth = 0
         appendBox.contentView = appendRadio_
         appendRadio_.setTarget(self, action: #selector(buttonClicked_AppendOtherPDF))
         
-        self.ocrSelectBtn.setTitleColor(KMAppearance.Layout.h0Color())
-        self.saveAsButton.setTitleColor(KMAppearance.Layout.h0Color())
-        self.selectLanguageLabel.textColor = KMAppearance.Layout.h0Color()
-        saveAsButton.isHidden = true
-        
-        ocrSelectBtn.isHidden = true
-        
         languageBox.borderWidth = 0
         languageBox.contentView = languageView_
         
@@ -316,35 +304,17 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
         
         extractTextBox.borderWidth = 0
         extractTextBox.contentView = extractTextCheckBox_
-        
-        appendTextField.backgroundColor = KMAppearance.Layout.l1Color()
-        appendTextField.wantsLayer = true
-        appendTextField.layer?.cornerRadius = 1.0
-        languageButton.layer?.backgroundColor = NSColor.clear.cgColor
-        languaeBox.borderColor = KMAppearance.Interactive.s0Color()
-        planBox.borderColor = KMAppearance.Interactive.s0Color()
-        languaeBox.fillColor = KMAppearance.Layout.l1Color()
-        planBox.fillColor = KMAppearance.Layout.l1Color()
-        languaeBox.isHidden = true
-        
-        
-        self.updateViewColor()
     }
+    
     func updateViewColor() {
         if KMAppearance.isDarkMode() {
             self.view.layer?.backgroundColor = NSColor(red: 0.055, green: 0.067, blue: 0.078, alpha: 1).cgColor
-            appendBackView.layer?.borderColor = NSColor(red: 86/255.0, green: 88/255.0, blue: 90/255.0, alpha: 1).cgColor
-            appendBackView.layer?.backgroundColor = NSColor(red: 57/255.0, green: 60/255.0, blue: 62/255.0, alpha: 1).cgColor
         } else {
             self.view.layer?.backgroundColor = NSColor(red: 0.922, green: 0.925, blue: 0.941, alpha: 1).cgColor
-            appendBackView.layer?.borderColor = NSColor(red: 218/255.0, green: 219/255.0, blue: 222/255.0, alpha: 1).cgColor
-            appendBackView.layer?.backgroundColor = NSColor.white.cgColor;
         }
     }
     func updateLanguageButton(_ languages: [String]?) {
         if languages?.count ?? 0 < 1 {
-            self.languageButton.title = " " + KMLocalizedString("Auto Detection")
-            
             self.languageView_.properties.text = " " + KMLocalizedString("Auto Detection")
             self.languageView_.reloadData()
             return
@@ -363,10 +333,10 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
             languageName = ""
         }
         
-        self.languageButton.title = " " + languageName
         self.languageView_.properties.text = " " + languageName
         self.languageView_.reloadData()
     }
+    
     func converArrType(arr: Array<KMBatchOperateFile>, keyString: String) -> [String] {
         let newArr = NSMutableArray()
         for item in arr {
@@ -374,25 +344,14 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
         }
         return newArr as! [String]
     }
+    
     func isConnectionAvailable() -> Bool {
-        //        var isExistenceNetwork = true
-        //        let reach = Reachability(hostname: "www.apple.com")
-        //        let status: NetworkStatus = NetworkStatus(rawValue: (reach?.currentReachabilityStatus())!.rawValue)
-        //        switch status.rawValue {
-        //        case 0:
-        //            isExistenceNetwork = false
-        //        case 1:
-        //            isExistenceNetwork = true
-        //        case 2:
-        //            isExistenceNetwork = true
-        //        default:
-        //            break
-        //        }
         if Reachability.forInternetConnection().currentReachabilityStatus().rawValue == 0 {
             return false
         }
         return true
     }
+    
     func beginImageToPDF() {
         if self.files?.count ?? 0 < 1 {
             return
@@ -443,7 +402,7 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
             isCreatNewPDF = true
             
         } else {
-            let appenString = self.appendTextField.stringValue
+            let appenString = appendBackInput_.properties.text
             if appenString.isEmpty {
                 let alert = NSAlert()
                 alert.alertStyle = .critical
@@ -452,12 +411,11 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
                 return
             }
             
-            path = self.appendTextField.stringValue
+            path = appenString
             isMerge = true
             isCreatNewPDF = false
         }
         
-        self.languageButton.isEnabled = false
         ocrPlanRadio_.properties.isDisabled = true
         ocrPlanRadio_.reloadData()
         ocrPlanRadio2_.properties.isDisabled = true
@@ -468,7 +426,6 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
         self.method.saveAsTestPath = self.choosePath
         self.method.exportPDFFile(fileArray: photoArray, savePath: path, isOCR: isOCR, isCreatPDF: isCreatNewPDF, isMerge: isMerge, isSaveAsText: isSaveAs) { [weak self] savePath, errorArr, errorOCRArray in
             
-            self?.languageButton.isEnabled = true
             self?.ocrPlanRadio_.properties.isDisabled = false
             self?.ocrPlanRadio_.reloadData()
             self?.ocrPlanRadio2_.properties.isDisabled = false
@@ -522,54 +479,20 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
             if radio.isEqual(to: sender) {
                 radio.properties.checkboxType = .selected
                 radio.reloadData()
+                
+                KMGOCRManager.default().ocrType = .google
+                KMDataManager.ud_set(0, forKey: "KMOCRCurrentPlanKey")
             } else {
                 radio.properties.checkboxType = .normal
                 radio.reloadData()
+                
+                KMGOCRManager.default().ocrType = .apple
+                KMDataManager.ud_set(1, forKey: "KMOCRCurrentPlanKey")
             }
         }
-    }
-    
-    //MARK: Notification
-    @objc func OCRSelectedLanguagesChangeNotification(notification: Notification) {
-        let selectedLanguages = notification.object/* as? [KMBatchOperateFile]*/
-        self.updateLanguageButton(selectedLanguages as? [String])
-    }
-    @objc func OCRSelectedPlanChangeNotification(notification: Notification) {
+        
         self.OCRSelectedPlanChangeAction()
     }
-    @objc func themeChanged(notification: Notification) {
-        DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
-            self.updateViewColor()
-        }
-    }
-    func OCRSelectedPlanChangeAction() {
-        let plan = UserDefaults.standard.integer(forKey: "KMOCRCurrentPlanKey")
-        if plan == 0 {
-//            self.planButton.title = " " + KMLocalizedString("Plan 1 (Online)")
-            ocrPlanRadio_.properties.checkboxType = .selected
-            ocrPlanRadio_.reloadData()
-            ocrPlanRadio2_.properties.checkboxType = .normal
-            ocrPlanRadio2_.reloadData()
-        } else {
-//            self.planButton.title = " " + KMLocalizedString("Plan 2 (Offline)")
-            ocrPlanRadio_.properties.checkboxType = .normal
-            ocrPlanRadio_.reloadData()
-            ocrPlanRadio2_.properties.checkboxType = .selected
-            ocrPlanRadio2_.reloadData()
-        }
-        KMGOCRManager.default().selectedLanguages = NSMutableArray()
-        self.updateLanguageButton(KMGOCRManager.default().selectedLanguages?.value(forKeyPath: KMGOCRLanguageStringKey) as? [String])
-    }
-    @objc func batchFilesCountNotification(notification: Notification)  {
-        let files: Array? = notification.object as? [KMBatchOperateFile]
-        self.files? = files ?? []
-        let cnt = self.files?.count ?? 0
-        if cnt > 0 {
-            self._updateActionButtonEnable(true)
-        } else {
-            self._updateActionButtonEnable(false)
-        }
-    }
     
     @IBAction func buttonClicked_CreateNewPDF(_ sender: ComponentRadio) {
         if (sender.properties.checkboxType == .selected) {
@@ -578,7 +501,11 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
             
             appendRadio_.properties.checkboxType = .normal
             appendRadio_.reloadData()
-            self.appendOtherPDFBtn.isEnabled = false
+            
+            appendBackInput_.properties.isDisabled = true
+            appendBackInput_.reloadData()
+            appendBackButtonInput_.properties.isDisabled = true
+            appendBackButtonInput_.reloadData()
         }
     }
     
@@ -591,7 +518,10 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
             mergeAllCheckBox_.properties.isDisabled = true
             mergeAllCheckBox_.reloadData()
             
-            self.appendOtherPDFBtn.isEnabled = true
+            appendBackInput_.properties.isDisabled = false
+            appendBackInput_.reloadData()
+            appendBackButtonInput_.properties.isDisabled = false
+            appendBackButtonInput_.reloadData()
         }
     }
     
@@ -624,31 +554,7 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
         }
     }
     
-    @IBAction func buttonClicked_ChooseLanguage(_ sender: NSButton) {
-        let plan = UserDefaults.standard.integer(forKey: "KMOCRCurrentPlanKey")
-        if plan == 0 {
-            KMGOCRManager.default().ocrType = .google
-        } else {
-            KMGOCRManager.default().ocrType = .apple
-        }
-        let popover = NSPopover()
-        popover.delegate = self
-        popover.contentViewController = KMLanguageViewController(nibName: "KMLanguageViewController", bundle: Bundle.main)
-        popover.animates = true
-        popover.behavior = .transient
-        popover.show(relativeTo: sender.bounds, of: sender as NSView, preferredEdge: .minX)
-    }
-    
-    @IBAction func buttonClicked_ChoosePlan(_ sender: NSButton) {
-        let popover = NSPopover()
-        popover.delegate = self
-        popover.contentViewController = KMPlanViewController(nibName: "KMPlanViewController", bundle: Bundle.main)
-        popover.animates = true
-        popover.behavior = .transient
-        popover.show(relativeTo: sender.bounds, of: sender as NSView, preferredEdge: .minX)
-    }
-    
-    @IBAction func buttonClicked_ImageToPDF(_ sender: NSButton) {
+    @IBAction func buttonClicked_ImageToPDF(_ sender: ComponentButton) {
         //MARK: 判断是否付费用户,展示iap界面
         if self.files?.count ?? 0 < 1 {
             return
@@ -657,7 +563,7 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
             KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
             return
         }
-        if sender.tag == 1 {
+        if sender.properties.state == .pressed {
             self.choosePath = ""
             var hasTask = false
             for i in 0..<(self.files?.count ?? 0) {
@@ -698,7 +604,7 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
             }
             
             if createNewPDFRadio_.properties.checkboxType != .selected {
-                let appenString = self.appendTextField.stringValue
+                let appenString = appendBackInput_.properties.text
                 if appenString.isEmpty {
                     let alert = NSAlert()
                     alert.alertStyle = .critical
@@ -727,6 +633,11 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
     }
     
     @IBAction func buttonItemClicked_AppendOtherPDF(_ sender: NSButton) {
+        let isDisabled = appendBackButtonInput_.properties.isDisabled
+        if isDisabled {
+            return
+        }
+        
         let openPanel = NSOpenPanel()
         openPanel.allowedFileTypes = ["pdf"]
         openPanel.canChooseDirectories = false
@@ -753,57 +664,55 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController {
                     KMBaseWindowController.checkPassword(url: url, type: .owner) { [weak self] success, resultPassword in
                         if success {
                             self?.password = resultPassword
-                            self?.appendTextField.stringValue = url.path
+                            
+                            self?.appendBackInput_.properties.text = url.path
+                            self?.appendBackInput_.reloadData()
                         }
                     }
                 } else {
-                    self.appendTextField.stringValue = url.path
+                    self.appendBackInput_.properties.text = url.path
+                    self.appendBackInput_.reloadData()
                 }
             }
         }
     }
     
-    @IBAction func buttonClicked_Help(_ sender: NSButton) {
-        let helpController = NSViewController()
-        let textView = NSTextView(frame: NSRect(x: 0, y: 0, width: 300.0, height: 100.0))
-        textView.backgroundColor = NSColor.clear
-        textView.isEditable = false
-        textView.layer?.cornerRadius = 6
-        let tStrAuto = NSLocalizedString("Choose automatic language detection for better OCR results.", comment: "")
-        let tStrVPN = NSLocalizedString("The OCR service works via an internet connection. We would suggest you to perform OCR using a VPN connection while the service is limited.", comment: "")
-        let plan = UserDefaults.standard.integer(forKey: "KMOCRCurrentPlanKey")
-        if plan == 0 {
-            textView.string = "\(tStrAuto)\n\n\(tStrVPN)"
+    // "Choose automatic language detection for better OCR results."
+    //MARK: -Notification
+    
+    @objc func batchFilesCountNotification(notification: Notification)  {
+        let files: Array? = notification.object as? [KMBatchOperateFile]
+        self.files? = files ?? []
+        let cnt = self.files?.count ?? 0
+        if cnt > 0 {
+            self._updateActionButtonEnable(true)
         } else {
-            textView.frame = NSRect(x: 0, y: 0, width: 300.0, height: 40.0)
-            textView.string = tStrAuto
+            self._updateActionButtonEnable(false)
         }
-        helpController.view = textView
-        let popover = NSPopover()
-        popover.delegate = self
-        popover.contentViewController = helpController
-        popover.animates = true
-        popover.behavior = .transient
-        popover.show(relativeTo: sender.bounds, of: sender as NSView, preferredEdge: .minY)
     }
     
-    
-    
-    
-    //MARK: KMImageToPDFMethodDelegate
-    func imageToPDFMethod(_ method: KMImageToPDFMethod, progress: Float) {
-        
+    func OCRSelectedPlanChangeAction() {
+        KMGOCRManager.default().selectedLanguages = NSMutableArray()
+        self.updateLanguageButton(KMGOCRManager.default().selectedLanguages?.value(forKeyPath: KMGOCRLanguageStringKey) as? [String])
     }
 }
 
-// MAKR: - NSPopoverDelegate
+// MARK: - KMImageToPDFMethodDelegate
 
-extension KMBatchOperateImageToPDFViewController: NSPopoverDelegate {
-    
+extension KMBatchOperateImageToPDFViewController: KMImageToPDFMethodDelegate {
+    func imageToPDFMethod(_ method: KMImageToPDFMethod, progress: Float) {
+        
+    }
 }
 
-// MARK: - KMImageToPDFMethodDelegate
+// MARK: - ComponentSelectDelegate
 
-extension KMBatchOperateImageToPDFViewController: KMImageToPDFMethodDelegate {
-    
+extension KMBatchOperateImageToPDFViewController: ComponentSelectDelegate {
+    func componentSelectDidSelect(view: ComponentSelect?, menuItemProperty: ComponentMenuitemProperty?) {
+        let idx = view?.indexOfSelect() ?? 0
+        
+        let languages = KMGOCRManager.languages() as NSArray
+        let lanuage = languages[idx]
+        KMGOCRManager.default().selectedLanguages = [lanuage]
+    }
 }

+ 1 - 223
PDF Office/PDF Master/KMClass/ImageToPDF/Controller/KMBatchOperateImageToPDFViewController.xib

@@ -8,37 +8,23 @@
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="KMBatchOperateImageToPDFViewController" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
-                <outlet property="actionButton" destination="HkY-4k-ShL" id="8zS-qE-smL"/>
                 <outlet property="appendBackBox" destination="ivy-HJ-F2X" id="OyN-cN-p8x"/>
-                <outlet property="appendBackView" destination="k0c-vv-NPP" id="qiK-0Y-Nqs"/>
                 <outlet property="appendBox" destination="HpT-QS-341" id="hRt-mm-Ukm"/>
-                <outlet property="appendOtherPDFBtn" destination="H4C-li-Hhm" id="kmI-0Y-YVe"/>
-                <outlet property="appendPDFBtn" destination="lwQ-xY-nsX" id="GEN-0Q-t29"/>
-                <outlet property="appendTextField" destination="AKV-3R-iGQ" id="MmJ-ov-KsS"/>
                 <outlet property="applyButton" destination="HSI-hW-pYn" id="YQY-2l-Can"/>
                 <outlet property="bottomBox" destination="dja-8H-Uup" id="udk-GK-Wkh"/>
                 <outlet property="bottomTopLine" destination="4wO-ha-sYg" id="9wl-jh-5lh"/>
-                <outlet property="btnMerge" destination="Sf1-WE-VzB" id="n9e-oY-Rpj"/>
-                <outlet property="createNewPDFBtn" destination="cYX-Yt-gnO" id="bku-Gy-hF3"/>
                 <outlet property="extractTextBox" destination="nfj-9v-ZqH" id="ErV-XO-Hur"/>
                 <outlet property="hLine" destination="wXl-jv-vC2" id="Z4J-x2-xgU"/>
                 <outlet property="headerBottomLine" destination="7MQ-kJ-8ar" id="LD2-vq-MD6"/>
                 <outlet property="headerBox" destination="yvT-Vr-HYw" id="JJC-0R-pz6"/>
-                <outlet property="languaeBox" destination="0xe-05-6j8" id="GM8-Xz-c6p"/>
                 <outlet property="languageBox" destination="6qO-Xk-6yr" id="bW6-w0-uTt"/>
-                <outlet property="languageButton" destination="Que-YG-sCE" id="Obq-iW-LWJ"/>
                 <outlet property="mergeAllBox" destination="hCw-K3-67H" id="t5s-f5-eUc"/>
                 <outlet property="newPDFBox" destination="n89-YE-ldr" id="4dT-WC-jg5"/>
                 <outlet property="ocrLabel" destination="hyp-2H-elp" id="7wX-ia-0Rp"/>
                 <outlet property="ocrPlan2Box" destination="f7o-yZ-THg" id="AE8-1e-sun"/>
                 <outlet property="ocrPlanBox" destination="f52-b5-1Ge" id="5ZG-fZ-vaS"/>
                 <outlet property="ocrSelectBox" destination="Ivj-XV-tDI" id="fgU-5z-ksd"/>
-                <outlet property="ocrSelectBtn" destination="DvB-9f-Xgt" id="UdG-6d-27f"/>
                 <outlet property="outputTypeLabel" destination="aPB-Pb-64w" id="BBp-lK-MNk"/>
-                <outlet property="planBox" destination="xu7-RV-DKR" id="ihz-bb-VhO"/>
-                <outlet property="planButton" destination="9go-Ka-u3z" id="nxW-wW-rQJ"/>
-                <outlet property="saveAsButton" destination="mXd-Rx-c3O" id="nnV-Rw-wSx"/>
-                <outlet property="selectLanguageLabel" destination="LnK-B0-rGp" id="Lb0-iZ-L6g"/>
                 <outlet property="titleLabel" destination="N3m-4e-rSU" id="X1q-p2-qWf"/>
                 <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
             </connections>
@@ -57,83 +43,6 @@
                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                     </textFieldCell>
                 </textField>
-                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cYX-Yt-gnO">
-                    <rect key="frame" x="14" y="467" width="148" height="18"/>
-                    <buttonCell key="cell" type="radio" title="New PDF Document" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="8NR-LX-ScR">
-                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <connections>
-                        <action selector="buttonClicked_CreateNewPDF:" target="-2" id="dnc-f7-GgF"/>
-                    </connections>
-                </button>
-                <button translatesAutoresizingMaskIntoConstraints="NO" id="Sf1-WE-VzB">
-                    <rect key="frame" x="32" y="433" width="87" height="29"/>
-                    <buttonCell key="cell" type="check" title="Merge  All" bezelStyle="regularSquare" imagePosition="left" inset="2" id="Gdy-u9-gi5">
-                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                </button>
-                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lwQ-xY-nsX">
-                    <rect key="frame" x="14" y="394" width="225" height="18"/>
-                    <buttonCell key="cell" type="radio" title="Append to existing fil or portfolio" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="BMo-hm-pTQ">
-                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <connections>
-                        <action selector="buttonClicked_AppendOtherPDF:" target="-2" id="OC7-87-QhX"/>
-                    </connections>
-                </button>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="k0c-vv-NPP">
-                    <rect key="frame" x="34" y="367" width="430" height="24"/>
-                    <subviews>
-                        <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="AKV-3R-iGQ">
-                            <rect key="frame" x="-1" y="1" width="404" height="22"/>
-                            <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" state="on" alignment="left" id="V8A-qR-hoa" customClass="KMTextFieldCell" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                                <font key="font" metaFont="system"/>
-                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="H4C-li-Hhm">
-                            <rect key="frame" x="401" y="0.0" width="28" height="24"/>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="28" id="cGD-0f-Kll"/>
-                            </constraints>
-                            <buttonCell key="cell" type="bevel" title="Button" bezelStyle="rounded" image="KMImageNameOpenFile" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="T5v-RZ-nb1">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <connections>
-                                <action selector="buttonItemClicked_AppendOtherPDF:" target="-2" id="G4A-vQ-x00"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="H4C-li-Hhm" firstAttribute="leading" secondItem="AKV-3R-iGQ" secondAttribute="trailing" id="4NY-9U-sDf"/>
-                        <constraint firstItem="H4C-li-Hhm" firstAttribute="centerY" secondItem="k0c-vv-NPP" secondAttribute="centerY" id="5Mg-b9-ZY3"/>
-                        <constraint firstAttribute="height" constant="24" id="6ZG-u1-LnN"/>
-                        <constraint firstAttribute="bottom" secondItem="H4C-li-Hhm" secondAttribute="bottom" id="Kaw-wW-X51"/>
-                        <constraint firstAttribute="bottom" secondItem="AKV-3R-iGQ" secondAttribute="bottom" constant="1" id="R4a-Ex-V6B"/>
-                        <constraint firstItem="AKV-3R-iGQ" firstAttribute="top" secondItem="k0c-vv-NPP" secondAttribute="top" constant="1" id="Szo-Nb-Hlj"/>
-                        <constraint firstItem="AKV-3R-iGQ" firstAttribute="leading" secondItem="k0c-vv-NPP" secondAttribute="leading" constant="1" id="kGW-1Y-uow"/>
-                        <constraint firstItem="H4C-li-Hhm" firstAttribute="top" secondItem="k0c-vv-NPP" secondAttribute="top" id="viv-cf-9iS"/>
-                        <constraint firstAttribute="trailing" secondItem="H4C-li-Hhm" secondAttribute="trailing" constant="1" id="yPh-Rs-3eg"/>
-                    </constraints>
-                </customView>
-                <button verticalHuggingPriority="750" tag="1" translatesAutoresizingMaskIntoConstraints="NO" id="HkY-4k-ShL">
-                    <rect key="frame" x="16" y="20" width="448" height="32"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="32" id="mfI-CG-DGv"/>
-                    </constraints>
-                    <buttonCell key="cell" type="bevel" title="Button" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="aGb-jV-PpH">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <connections>
-                        <action selector="buttonClicked_ImageToPDF:" target="-2" id="yfO-U1-Svw"/>
-                    </connections>
-                </button>
                 <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hyp-2H-elp">
                     <rect key="frame" x="14" y="318" width="35" height="17"/>
                     <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="OCR" id="SLY-wg-469">
@@ -142,105 +51,6 @@
                         <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                     </textFieldCell>
                 </textField>
-                <button translatesAutoresizingMaskIntoConstraints="NO" id="mXd-Rx-c3O">
-                    <rect key="frame" x="32" y="159" width="102" height="18"/>
-                    <buttonCell key="cell" type="check" title="Save as TXT" bezelStyle="regularSquare" imagePosition="left" inset="2" id="yMl-Im-6Oy">
-                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                </button>
-                <button hidden="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gJA-ad-BvI">
-                    <rect key="frame" x="440" y="185" width="26" height="26"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="21" id="Mn0-It-ogu"/>
-                        <constraint firstAttribute="height" constant="21" id="v6b-Yx-hGX"/>
-                    </constraints>
-                    <buttonCell key="cell" type="help" bezelStyle="helpButton" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Ik9-0w-YNF">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <connections>
-                        <action selector="buttonClicked_Help:" target="-2" id="fm7-KZ-WtB"/>
-                    </connections>
-                </button>
-                <box boxType="custom" cornerRadius="1" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="0xe-05-6j8">
-                    <rect key="frame" x="34" y="187" width="404" height="24"/>
-                    <view key="contentView" id="Sfo-EK-dRW">
-                        <rect key="frame" x="1" y="1" width="402" height="22"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Que-YG-sCE">
-                                <rect key="frame" x="0.0" y="-2" width="398" height="24"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" constant="24" id="tEd-dj-ZnT"/>
-                                </constraints>
-                                <buttonCell key="cell" type="bevel" bezelStyle="rounded" image="NSDescendingSortIndicator" imagePosition="right" alignment="left" imageScaling="proportionallyDown" inset="2" id="RHP-PZ-KGD">
-                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                    <font key="font" metaFont="system"/>
-                                </buttonCell>
-                                <connections>
-                                    <action selector="buttonClicked_ChooseLanguage:" target="-2" id="S94-NT-iXo"/>
-                                </connections>
-                            </button>
-                        </subviews>
-                        <constraints>
-                            <constraint firstItem="Que-YG-sCE" firstAttribute="top" secondItem="Sfo-EK-dRW" secondAttribute="top" id="8Me-bP-4k5"/>
-                            <constraint firstAttribute="trailing" secondItem="Que-YG-sCE" secondAttribute="trailing" constant="4" id="c3q-yB-DUv"/>
-                            <constraint firstItem="Que-YG-sCE" firstAttribute="leading" secondItem="Sfo-EK-dRW" secondAttribute="leading" id="kmn-MX-fEb"/>
-                        </constraints>
-                    </view>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="24" id="W4o-2n-HHz"/>
-                    </constraints>
-                </box>
-                <button translatesAutoresizingMaskIntoConstraints="NO" id="DvB-9f-Xgt">
-                    <rect key="frame" x="14" y="283" width="84" height="18"/>
-                    <buttonCell key="cell" type="check" title="OCR Plan" bezelStyle="regularSquare" imagePosition="left" inset="2" id="nDI-6p-sba">
-                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <connections>
-                        <action selector="buttonClicked_OCRSelect:" target="-2" id="SXt-Gi-ldi"/>
-                    </connections>
-                </button>
-                <box boxType="custom" cornerRadius="1" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="xu7-RV-DKR">
-                    <rect key="frame" x="34" y="251" width="430" height="24"/>
-                    <view key="contentView" id="U53-s6-6nW">
-                        <rect key="frame" x="1" y="1" width="428" height="22"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9go-Ka-u3z">
-                                <rect key="frame" x="0.0" y="-2" width="424" height="24"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" constant="24" id="gou-up-daG"/>
-                                </constraints>
-                                <buttonCell key="cell" type="bevel" bezelStyle="rounded" image="NSDescendingSortIndicator" imagePosition="right" alignment="left" imageScaling="proportionallyDown" inset="2" id="2zY-MC-UG7">
-                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                    <font key="font" metaFont="system"/>
-                                </buttonCell>
-                                <connections>
-                                    <action selector="buttonClicked_ChoosePlan:" target="-2" id="tqP-v0-wzB"/>
-                                </connections>
-                            </button>
-                        </subviews>
-                        <constraints>
-                            <constraint firstItem="9go-Ka-u3z" firstAttribute="top" secondItem="U53-s6-6nW" secondAttribute="top" id="8MJ-ro-IHu"/>
-                            <constraint firstItem="9go-Ka-u3z" firstAttribute="leading" secondItem="U53-s6-6nW" secondAttribute="leading" id="bVd-6r-ClJ"/>
-                            <constraint firstAttribute="trailing" secondItem="9go-Ka-u3z" secondAttribute="trailing" constant="4" id="dFT-Vn-Dy4"/>
-                        </constraints>
-                    </view>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="24" id="GZN-BA-UHl"/>
-                    </constraints>
-                </box>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="LnK-B0-rGp">
-                    <rect key="frame" x="32" y="219" width="37" height="16"/>
-                    <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="Pba-1m-xRx">
-                        <font key="font" metaFont="system"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
                 <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="n89-YE-ldr">
                     <rect key="frame" x="16" y="465" width="448" height="20"/>
                     <view key="contentView" id="crJ-bx-eAh">
@@ -402,72 +212,44 @@
                 </box>
             </subviews>
             <constraints>
-                <constraint firstItem="xu7-RV-DKR" firstAttribute="top" secondItem="DvB-9f-Xgt" secondAttribute="bottom" constant="9" id="4vj-GV-hlg"/>
-                <constraint firstItem="lwQ-xY-nsX" firstAttribute="top" secondItem="Sf1-WE-VzB" secondAttribute="bottom" constant="23" id="6Ma-jA-EeT"/>
-                <constraint firstItem="HkY-4k-ShL" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="89C-67-SEc"/>
                 <constraint firstItem="f7o-yZ-THg" firstAttribute="top" secondItem="f52-b5-1Ge" secondAttribute="bottom" id="8Xt-Pa-Sgd"/>
                 <constraint firstItem="6qO-Xk-6yr" firstAttribute="top" secondItem="Ivj-XV-tDI" secondAttribute="bottom" constant="8" id="8YG-3N-WCa"/>
-                <constraint firstItem="LnK-B0-rGp" firstAttribute="leading" secondItem="xu7-RV-DKR" secondAttribute="leading" id="9x7-70-cgs"/>
                 <constraint firstAttribute="trailing" secondItem="Ivj-XV-tDI" secondAttribute="trailing" constant="16" id="AL5-lm-JS9"/>
                 <constraint firstItem="Ivj-XV-tDI" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="16" id="AZw-Ex-mSQ"/>
                 <constraint firstAttribute="trailing" secondItem="dja-8H-Uup" secondAttribute="trailing" id="DPv-In-aGx"/>
                 <constraint firstItem="f7o-yZ-THg" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="16" id="DSP-jU-5v6"/>
-                <constraint firstItem="gJA-ad-BvI" firstAttribute="leading" secondItem="0xe-05-6j8" secondAttribute="trailing" constant="5" id="F71-ii-T0z"/>
                 <constraint firstItem="wXl-jv-vC2" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="16" id="FXt-Gu-oLI"/>
-                <constraint firstItem="0xe-05-6j8" firstAttribute="leading" secondItem="Sf1-WE-VzB" secondAttribute="leading" id="Ghm-t1-ET6"/>
-                <constraint firstItem="k0c-vv-NPP" firstAttribute="leading" secondItem="Sf1-WE-VzB" secondAttribute="leading" id="INv-ai-ab9"/>
-                <constraint firstItem="0xe-05-6j8" firstAttribute="top" secondItem="LnK-B0-rGp" secondAttribute="bottom" constant="8" id="IbM-ET-fpF"/>
                 <constraint firstAttribute="trailing" secondItem="f7o-yZ-THg" secondAttribute="trailing" constant="16" id="JUv-MP-Y9l"/>
                 <constraint firstAttribute="trailing" secondItem="HpT-QS-341" secondAttribute="trailing" constant="16" id="Liv-T3-5cT"/>
-                <constraint firstItem="Sf1-WE-VzB" firstAttribute="top" secondItem="cYX-Yt-gnO" secondAttribute="bottom" constant="7" id="LkA-nk-5sh"/>
                 <constraint firstItem="nfj-9v-ZqH" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="16" id="O8F-CD-d5w"/>
                 <constraint firstItem="hCw-K3-67H" firstAttribute="top" secondItem="n89-YE-ldr" secondAttribute="bottom" constant="8" id="PSB-NV-7Vv"/>
                 <constraint firstAttribute="trailing" secondItem="ivy-HJ-F2X" secondAttribute="trailing" constant="16" id="QLZ-zy-81z"/>
                 <constraint firstItem="ivy-HJ-F2X" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="16" id="QWz-1v-vc9"/>
                 <constraint firstItem="dja-8H-Uup" firstAttribute="top" relation="greaterThanOrEqual" secondItem="nfj-9v-ZqH" secondAttribute="bottom" constant="48" id="RhM-Uu-BBI"/>
-                <constraint firstItem="cYX-Yt-gnO" firstAttribute="top" secondItem="aPB-Pb-64w" secondAttribute="bottom" constant="13" id="TeU-vK-ErS"/>
+                <constraint firstItem="nfj-9v-ZqH" firstAttribute="top" secondItem="wXl-jv-vC2" secondAttribute="bottom" constant="13" id="RzD-gh-paa"/>
                 <constraint firstItem="yvT-Vr-HYw" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" id="USs-od-fj8"/>
                 <constraint firstItem="aPB-Pb-64w" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="52" id="UbP-Fa-eTV"/>
                 <constraint firstAttribute="trailing" secondItem="yvT-Vr-HYw" secondAttribute="trailing" id="VAs-z3-Iqh"/>
                 <constraint firstAttribute="trailing" secondItem="f52-b5-1Ge" secondAttribute="trailing" constant="16" id="VLF-tB-JZU"/>
                 <constraint firstItem="HpT-QS-341" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="16" id="VU4-bS-vNC"/>
-                <constraint firstItem="DvB-9f-Xgt" firstAttribute="leading" secondItem="hyp-2H-elp" secondAttribute="leading" id="XyT-9R-eIO"/>
-                <constraint firstAttribute="bottom" secondItem="HkY-4k-ShL" secondAttribute="bottom" constant="20" id="YyJ-nz-wuP"/>
                 <constraint firstAttribute="trailing" secondItem="nfj-9v-ZqH" secondAttribute="trailing" constant="16" id="aOM-Mo-oU4"/>
                 <constraint firstAttribute="trailing" secondItem="wXl-jv-vC2" secondAttribute="trailing" constant="16" id="ajI-ou-mFa"/>
-                <constraint firstItem="gJA-ad-BvI" firstAttribute="centerY" secondItem="0xe-05-6j8" secondAttribute="centerY" id="b5C-zZ-uoa"/>
                 <constraint firstItem="dja-8H-Uup" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="b6T-F7-enh"/>
                 <constraint firstItem="n89-YE-ldr" firstAttribute="top" secondItem="aPB-Pb-64w" secondAttribute="bottom" constant="12" id="bk0-kf-ulW"/>
                 <constraint firstItem="aPB-Pb-64w" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="16" id="cm2-wz-AP3"/>
-                <constraint firstAttribute="trailing" secondItem="k0c-vv-NPP" secondAttribute="trailing" constant="16" id="dEN-Bs-9oC"/>
-                <constraint firstItem="xu7-RV-DKR" firstAttribute="trailing" secondItem="k0c-vv-NPP" secondAttribute="trailing" id="ePZ-m2-erM"/>
-                <constraint firstItem="mXd-Rx-c3O" firstAttribute="top" secondItem="0xe-05-6j8" secondAttribute="bottom" constant="11" id="evq-KN-Xwq"/>
                 <constraint firstItem="yvT-Vr-HYw" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="f5F-4S-nh2"/>
                 <constraint firstItem="HpT-QS-341" firstAttribute="top" secondItem="hCw-K3-67H" secondAttribute="bottom" constant="18" id="fkc-6M-xhx"/>
-                <constraint firstItem="xu7-RV-DKR" firstAttribute="leading" secondItem="Sf1-WE-VzB" secondAttribute="leading" id="fyS-0U-CJM"/>
-                <constraint firstItem="LnK-B0-rGp" firstAttribute="top" secondItem="xu7-RV-DKR" secondAttribute="bottom" constant="16" id="g6b-iG-T0X"/>
-                <constraint firstItem="nfj-9v-ZqH" firstAttribute="top" secondItem="mXd-Rx-c3O" secondAttribute="bottom" constant="8" id="gYa-8x-gff"/>
                 <constraint firstAttribute="trailing" secondItem="hCw-K3-67H" secondAttribute="trailing" constant="16" id="gew-aC-Sr2"/>
                 <constraint firstItem="n89-YE-ldr" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="16" id="hJr-kb-qE4"/>
                 <constraint firstItem="6qO-Xk-6yr" firstAttribute="top" secondItem="f52-b5-1Ge" secondAttribute="bottom" constant="-72" id="i1G-kk-ozl"/>
-                <constraint firstItem="HkY-4k-ShL" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="16" id="jIY-t3-U5D"/>
-                <constraint firstItem="k0c-vv-NPP" firstAttribute="top" secondItem="lwQ-xY-nsX" secondAttribute="bottom" constant="4" id="jUW-x8-4aX"/>
                 <constraint firstItem="wXl-jv-vC2" firstAttribute="top" secondItem="f7o-yZ-THg" secondAttribute="bottom" constant="8" id="jXt-VN-8sG"/>
                 <constraint firstItem="f52-b5-1Ge" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="16" id="jru-xm-jbV"/>
-                <constraint firstItem="lwQ-xY-nsX" firstAttribute="leading" secondItem="aPB-Pb-64w" secondAttribute="leading" id="kVr-oh-CY2"/>
-                <constraint firstItem="DvB-9f-Xgt" firstAttribute="top" secondItem="hyp-2H-elp" secondAttribute="bottom" constant="18" id="kxm-lu-bCL"/>
                 <constraint firstItem="hyp-2H-elp" firstAttribute="leading" secondItem="aPB-Pb-64w" secondAttribute="leading" id="mdU-8E-lPS"/>
-                <constraint firstItem="gJA-ad-BvI" firstAttribute="trailing" secondItem="k0c-vv-NPP" secondAttribute="trailing" id="nTH-mg-Z0g"/>
                 <constraint firstItem="hCw-K3-67H" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="40" id="pnQ-vB-MVe"/>
-                <constraint firstItem="hyp-2H-elp" firstAttribute="top" secondItem="k0c-vv-NPP" secondAttribute="bottom" constant="32" id="qP4-2t-rG9"/>
                 <constraint firstAttribute="bottom" secondItem="dja-8H-Uup" secondAttribute="bottom" id="rEm-pS-vKQ"/>
-                <constraint firstItem="mXd-Rx-c3O" firstAttribute="leading" secondItem="0xe-05-6j8" secondAttribute="leading" id="rJ4-0r-4NH"/>
-                <constraint firstItem="HkY-4k-ShL" firstAttribute="top" relation="greaterThanOrEqual" secondItem="mXd-Rx-c3O" secondAttribute="bottom" constant="20" id="rqm-ei-Qo0"/>
                 <constraint firstAttribute="trailing" secondItem="n89-YE-ldr" secondAttribute="trailing" constant="16" id="sNQ-CU-t7j"/>
-                <constraint firstItem="Sf1-WE-VzB" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="34" id="se3-wj-gNP"/>
                 <constraint firstItem="6qO-Xk-6yr" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="16" id="v0b-Qg-CLa"/>
                 <constraint firstAttribute="trailing" secondItem="6qO-Xk-6yr" secondAttribute="trailing" constant="16" id="xzz-Ta-7f4"/>
-                <constraint firstItem="cYX-Yt-gnO" firstAttribute="leading" secondItem="aPB-Pb-64w" secondAttribute="leading" id="yIs-gc-xSI"/>
                 <constraint firstItem="hyp-2H-elp" firstAttribute="top" secondItem="ivy-HJ-F2X" secondAttribute="bottom" constant="24" id="ygA-il-Zjf"/>
                 <constraint firstItem="ivy-HJ-F2X" firstAttribute="top" secondItem="HpT-QS-341" secondAttribute="bottom" constant="8" id="zMh-lw-EYt"/>
                 <constraint firstItem="Ivj-XV-tDI" firstAttribute="top" secondItem="hyp-2H-elp" secondAttribute="bottom" constant="12" id="zg4-S2-2eI"/>
@@ -475,8 +257,4 @@
             <point key="canvasLocation" x="-141" y="224"/>
         </customView>
     </objects>
-    <resources>
-        <image name="KMImageNameOpenFile" width="16" height="16"/>
-        <image name="NSDescendingSortIndicator" width="9" height="9"/>
-    </resources>
 </document>