Full Code of packagesdev/unexpectedly for AI

master 875181c29c77 cached
786 files
4.3 MB
1.2M tokens
22 symbols
1 requests
Download .txt
Showing preview only (4,696K chars total). Download the full file or copy to clipboard to get everything.
Repository: packagesdev/unexpectedly
Branch: master
Commit: 875181c29c77
Files: 786
Total size: 4.3 MB

Directory structure:
gitextract_4sdmyxfy/

├── .gitignore
├── .gitmodules
├── Configs/
│   ├── CodeSigningConfigurationSettings.xcconfig
│   └── SharedConfigurationSettings.xcconfig
├── Documents Pages/
│   ├── Unexpectedly_Acknowledgements.pages
│   └── Unexpectedly_License.pages
├── LICENSE.txt
├── README.md
├── app_unexpectedly/
│   ├── AppKit + Extensions/
│   │   ├── NSColor+LabelColor.h
│   │   ├── NSColor+LabelColor.m
│   │   ├── NSColor+String.h
│   │   ├── NSColor+String.m
│   │   ├── NSResponder+Appearance.h
│   │   ├── NSResponder+Appearance.m
│   │   ├── NSTableView+Selection.h
│   │   ├── NSTableView+Selection.m
│   │   ├── NSToolbar+Packages.h
│   │   └── NSToolbar+Packages.m
│   ├── Foundation + Extensions/
│   │   ├── NSArray+UniqueName.h
│   │   ├── NSArray+UniqueName.m
│   │   ├── NSArray+WBExtensions.h
│   │   ├── NSArray+WBExtensions.m
│   │   ├── NSDictionary+MutableDeepCopy.h
│   │   ├── NSDictionary+MutableDeepCopy.m
│   │   ├── NSDictionary+WBExtensions.h
│   │   ├── NSDictionary+WBExtensions.m
│   │   ├── NSIndexSet+Analysis.h
│   │   ├── NSIndexSet+Analysis.m
│   │   ├── NSSet+WBExtensions.h
│   │   ├── NSSet+WBExtensions.m
│   │   ├── NSString+CPU.h
│   │   └── NSString+CPU.m
│   ├── RSCore/
│   │   ├── LICENSE.txt
│   │   ├── NSMenuItem+RSCore.h
│   │   └── NSMenuItem+RSCore.m
│   ├── app_unexpectedly/
│   │   ├── AppDelegate.h
│   │   ├── AppDelegate.m
│   │   ├── CUIAATextFieldCell.h
│   │   ├── CUIAATextFieldCell.m
│   │   ├── CUIAboutBoxFooterView.h
│   │   ├── CUIAboutBoxFooterView.m
│   │   ├── CUIAboutBoxWindow.h
│   │   ├── CUIAboutBoxWindow.m
│   │   ├── CUIAboutBoxWindowController.h
│   │   ├── CUIAboutBoxWindowController.m
│   │   ├── CUIApplicationItemAttributes.h
│   │   ├── CUIApplicationItemAttributes.m
│   │   ├── CUIApplicationPreferences+Themes.h
│   │   ├── CUIApplicationPreferences+Themes.m
│   │   ├── CUIApplicationPreferences.h
│   │   ├── CUIApplicationPreferences.m
│   │   ├── CUIApplicationSpecificBacktraceRowView.h
│   │   ├── CUIApplicationSpecificBacktraceRowView.m
│   │   ├── CUIBinaryImage.h
│   │   ├── CUIBinaryImage.m
│   │   ├── CUIBinaryImageUtility.h
│   │   ├── CUIBinaryImageUtility.m
│   │   ├── CUIBinaryImagesViewController.h
│   │   ├── CUIBinaryImagesViewController.m
│   │   ├── CUICallStackBacktrace.h
│   │   ├── CUICallStackBacktrace.m
│   │   ├── CUICallTableCellView.h
│   │   ├── CUICallTableCellView.m
│   │   ├── CUICallsSelection.h
│   │   ├── CUICallsSelection.m
│   │   ├── CUICaptionView.h
│   │   ├── CUICaptionView.m
│   │   ├── CUICategoriesClipView.h
│   │   ├── CUICategoriesClipView.m
│   │   ├── CUICenteredLabelViewController.h
│   │   ├── CUICenteredLabelViewController.m
│   │   ├── CUICenteredLabelViewController.xib
│   │   ├── CUICodeSigningFlagsTableView.h
│   │   ├── CUICodeSigningFlagsTableView.m
│   │   ├── CUICodeSigningInformationViewController.h
│   │   ├── CUICodeSigningInformationViewController.m
│   │   ├── CUICodeType.h
│   │   ├── CUICollectionViewDockedThreadItem.h
│   │   ├── CUICollectionViewDockedThreadItem.m
│   │   ├── CUICollectionViewDockedThreadItem.xib
│   │   ├── CUICollectionViewDockedThreadsLayout.h
│   │   ├── CUICollectionViewDockedThreadsLayout.m
│   │   ├── CUICollectionViewRegisterItem.h
│   │   ├── CUICollectionViewRegisterItem.m
│   │   ├── CUICollectionViewThreadItem.h
│   │   ├── CUICollectionViewThreadItem.m
│   │   ├── CUICollectionViewVisibleThreadItem.h
│   │   ├── CUICollectionViewVisibleThreadItem.m
│   │   ├── CUICollectionViewVisibleThreadItem.xib
│   │   ├── CUICollectionViewVisibleThreadsLayout.h
│   │   ├── CUICollectionViewVisibleThreadsLayout.m
│   │   ├── CUIContentBox.h
│   │   ├── CUIContentBox.m
│   │   ├── CUIContentsViewController.h
│   │   ├── CUIContentsViewController.m
│   │   ├── CUIContentsViewController.xib
│   │   ├── CUICrashDataTransform.h
│   │   ├── CUICrashDataTransform.m
│   │   ├── CUICrashLog+Transform.h
│   │   ├── CUICrashLog+Transform.m
│   │   ├── CUICrashLog+UI.h
│   │   ├── CUICrashLog+UI.m
│   │   ├── CUICrashLog.h
│   │   ├── CUICrashLog.m
│   │   ├── CUICrashLogBacktraces+Utilities.h
│   │   ├── CUICrashLogBacktraces+Utilities.m
│   │   ├── CUICrashLogBacktraces.h
│   │   ├── CUICrashLogBacktraces.m
│   │   ├── CUICrashLogBinaryImages.h
│   │   ├── CUICrashLogBinaryImages.m
│   │   ├── CUICrashLogBrowsingState.h
│   │   ├── CUICrashLogBrowsingState.m
│   │   ├── CUICrashLogBrowsingStateRegistry.h
│   │   ├── CUICrashLogBrowsingStateRegistry.m
│   │   ├── CUICrashLogContentsViewController.h
│   │   ├── CUICrashLogContentsViewController.m
│   │   ├── CUICrashLogContentsViewController.xib
│   │   ├── CUICrashLogDianosticMessages.h
│   │   ├── CUICrashLogDianosticMessages.m
│   │   ├── CUICrashLogErrors.h
│   │   ├── CUICrashLogErrors.m
│   │   ├── CUICrashLogExceptionInformation+QuickHelp.h
│   │   ├── CUICrashLogExceptionInformation+QuickHelp.m
│   │   ├── CUICrashLogExceptionInformation+UI.h
│   │   ├── CUICrashLogExceptionInformation+UI.m
│   │   ├── CUICrashLogExceptionInformation.h
│   │   ├── CUICrashLogExceptionInformation.m
│   │   ├── CUICrashLogHeader.h
│   │   ├── CUICrashLogHeader.m
│   │   ├── CUICrashLogPresentationOutlineViewController.h
│   │   ├── CUICrashLogPresentationOutlineViewController.m
│   │   ├── CUICrashLogPresentationTextViewController.h
│   │   ├── CUICrashLogPresentationTextViewController.m
│   │   ├── CUICrashLogPresentationViewController.h
│   │   ├── CUICrashLogPresentationViewController.m
│   │   ├── CUICrashLogSectionsDetector.h
│   │   ├── CUICrashLogSectionsDetector.m
│   │   ├── CUICrashLogTableCellView.h
│   │   ├── CUICrashLogTableCellView.m
│   │   ├── CUICrashLogTextView.h
│   │   ├── CUICrashLogTextView.m
│   │   ├── CUICrashLogThreadState+UI.h
│   │   ├── CUICrashLogThreadState+UI.m
│   │   ├── CUICrashLogThreadState.h
│   │   ├── CUICrashLogThreadState.m
│   │   ├── CUICrashLogsListViewController.h
│   │   ├── CUICrashLogsListViewController.m
│   │   ├── CUICrashLogsMainViewController.h
│   │   ├── CUICrashLogsMainViewController.m
│   │   ├── CUICrashLogsMainViewController.xib
│   │   ├── CUICrashLogsOpenErrorPanel.h
│   │   ├── CUICrashLogsOpenErrorPanel.m
│   │   ├── CUICrashLogsOpenErrorRecord+UI.h
│   │   ├── CUICrashLogsOpenErrorRecord+UI.m
│   │   ├── CUICrashLogsOpenErrorRecord.h
│   │   ├── CUICrashLogsOpenErrorRecord.m
│   │   ├── CUICrashLogsOpenErrorWindowController.xib
│   │   ├── CUICrashLogsProvider.h
│   │   ├── CUICrashLogsProvider.m
│   │   ├── CUICrashLogsSelection.h
│   │   ├── CUICrashLogsSelection.m
│   │   ├── CUICrashLogsSource+UI.h
│   │   ├── CUICrashLogsSource+UI.m
│   │   ├── CUICrashLogsSource.h
│   │   ├── CUICrashLogsSource.m
│   │   ├── CUICrashLogsSourceAll+UI.h
│   │   ├── CUICrashLogsSourceAll+UI.m
│   │   ├── CUICrashLogsSourceAll.h
│   │   ├── CUICrashLogsSourceAll.m
│   │   ├── CUICrashLogsSourceDirectory.h
│   │   ├── CUICrashLogsSourceDirectory.m
│   │   ├── CUICrashLogsSourceFile.h
│   │   ├── CUICrashLogsSourceFile.m
│   │   ├── CUICrashLogsSourceFileSystemItem.h
│   │   ├── CUICrashLogsSourceFileSystemItem.m
│   │   ├── CUICrashLogsSourceSeparator.h
│   │   ├── CUICrashLogsSourceSeparator.m
│   │   ├── CUICrashLogsSourceSmart.h
│   │   ├── CUICrashLogsSourceSmart.m
│   │   ├── CUICrashLogsSourceSmartEditorPanel.h
│   │   ├── CUICrashLogsSourceSmartEditorPanel.m
│   │   ├── CUICrashLogsSourceStandardDirectory+UI.h
│   │   ├── CUICrashLogsSourceStandardDirectory+UI.m
│   │   ├── CUICrashLogsSourceStandardDirectory.h
│   │   ├── CUICrashLogsSourceStandardDirectory.m
│   │   ├── CUICrashLogsSourceTableCellView.h
│   │   ├── CUICrashLogsSourceTableCellView.m
│   │   ├── CUICrashLogsSourceToday+UI.h
│   │   ├── CUICrashLogsSourceToday+UI.m
│   │   ├── CUICrashLogsSourceToday.h
│   │   ├── CUICrashLogsSourceToday.m
│   │   ├── CUICrashLogsSourcesManager.h
│   │   ├── CUICrashLogsSourcesManager.m
│   │   ├── CUICrashLogsSourcesSelection.h
│   │   ├── CUICrashLogsSourcesSelection.m
│   │   ├── CUICrashLogsSourcesViewController.h
│   │   ├── CUICrashLogsSourcesViewController.m
│   │   ├── CUICrashReporterDefaults.h
│   │   ├── CUICrashReporterDefaults.m
│   │   ├── CUICrashedThreadCallRowView.h
│   │   ├── CUICrashedThreadCallRowView.m
│   │   ├── CUICrashedThreadRowView.h
│   │   ├── CUICrashedThreadRowView.m
│   │   ├── CUIDataTransform.h
│   │   ├── CUIDataTransform.m
│   │   ├── CUIExceptionTypePopUpViewController.h
│   │   ├── CUIExceptionTypePopUpViewController.m
│   │   ├── CUIExportAccessoryViewController.h
│   │   ├── CUIExportAccessoryViewController.m
│   │   ├── CUIFileDeadDropView.h
│   │   ├── CUIFileDeadDropView.m
│   │   ├── CUIFontAndColorsFramedView.h
│   │   ├── CUIFontAndColorsFramedView.m
│   │   ├── CUIFontBoxView.h
│   │   ├── CUIFontBoxView.m
│   │   ├── CUIHopperDisassemblerManager.h
│   │   ├── CUIHopperDisassemblerManager.m
│   │   ├── CUIIPSTransform.h
│   │   ├── CUIIPSTransform.m
│   │   ├── CUIInactiveButton.h
│   │   ├── CUIInactiveButton.m
│   │   ├── CUIInspectorAlternateBackgroundView.h
│   │   ├── CUIInspectorAlternateBackgroundView.m
│   │   ├── CUIInspectorExecutableViewController.h
│   │   ├── CUIInspectorExecutableViewController.m
│   │   ├── CUIInspectorGeneralViewController.h
│   │   ├── CUIInspectorGeneralViewController.m
│   │   ├── CUIInspectorProcessesViewController.h
│   │   ├── CUIInspectorProcessesViewController.m
│   │   ├── CUIInspectorStackableViewController.h
│   │   ├── CUIInspectorStackableViewController.m
│   │   ├── CUIInspectorUserViewController.h
│   │   ├── CUIInspectorUserViewController.m
│   │   ├── CUIInspectorViewController.h
│   │   ├── CUIInspectorViewController.m
│   │   ├── CUIInspectorViewController.xib
│   │   ├── CUIKeyViews.h
│   │   ├── CUILightTableDockedThreadView.h
│   │   ├── CUILightTableDockedThreadView.m
│   │   ├── CUILightTableThreadView.h
│   │   ├── CUILightTableThreadView.m
│   │   ├── CUILightTableViewController.h
│   │   ├── CUILightTableViewController.m
│   │   ├── CUILightTableViewController.xib
│   │   ├── CUILightTableVisibleInterGapView.h
│   │   ├── CUILightTableVisibleInterGapView.m
│   │   ├── CUILightTableVisibleThreadView.h
│   │   ├── CUILightTableVisibleThreadView.m
│   │   ├── CUILineJumperWindowController.h
│   │   ├── CUILineJumperWindowController.m
│   │   ├── CUIMainWindow.h
│   │   ├── CUIMainWindow.m
│   │   ├── CUIMainWindowController.h
│   │   ├── CUIMainWindowController.m
│   │   ├── CUINavigationChevronView.h
│   │   ├── CUINavigationChevronView.m
│   │   ├── CUINavigationView.h
│   │   ├── CUINavigationView.m
│   │   ├── CUIOperatingSystemVersion.h
│   │   ├── CUIOperatingSystemVersion.m
│   │   ├── CUIOutlineModeDisplaySettings.h
│   │   ├── CUIOutlineModeDisplaySettings.m
│   │   ├── CUIParsingErrors.h
│   │   ├── CUIParsingErrors.m
│   │   ├── CUIPreferencePaneAdvancedViewController.h
│   │   ├── CUIPreferencePaneAdvancedViewController.m
│   │   ├── CUIPreferencePaneCrashreporterViewController.h
│   │   ├── CUIPreferencePaneCrashreporterViewController.m
│   │   ├── CUIPreferencePaneFontscolorsViewController.h
│   │   ├── CUIPreferencePaneFontscolorsViewController.m
│   │   ├── CUIPreferencePaneGeneralViewController.h
│   │   ├── CUIPreferencePaneGeneralViewController.m
│   │   ├── CUIPreferencePanePresentationOutlineViewController.h
│   │   ├── CUIPreferencePanePresentationOutlineViewController.m
│   │   ├── CUIPreferencePanePresentationTextViewController.h
│   │   ├── CUIPreferencePanePresentationTextViewController.m
│   │   ├── CUIPreferencePanePresentationViewController.h
│   │   ├── CUIPreferencePanePresentationViewController.m
│   │   ├── CUIPreferencePaneSymbolicationViewController.h
│   │   ├── CUIPreferencePaneSymbolicationViewController.m
│   │   ├── CUIPreferencePaneViewController.h
│   │   ├── CUIPreferencePaneViewController.m
│   │   ├── CUIPreferencesTabBox.h
│   │   ├── CUIPreferencesTabBox.m
│   │   ├── CUIPreferencesTabButton.h
│   │   ├── CUIPreferencesTabButton.m
│   │   ├── CUIPreferencesTabHeaderView.h
│   │   ├── CUIPreferencesTabHeaderView.m
│   │   ├── CUIPreferencesWindow.h
│   │   ├── CUIPreferencesWindow.m
│   │   ├── CUIPreferencesWindowController+Convenience.h
│   │   ├── CUIPreferencesWindowController+Convenience.m
│   │   ├── CUIPreferencesWindowController.h
│   │   ├── CUIPreferencesWindowController.m
│   │   ├── CUIPresentationTextNavigationViewController.h
│   │   ├── CUIPresentationTextNavigationViewController.m
│   │   ├── CUIPresentationTextNavigationViewController.xib
│   │   ├── CUIQuickHelpPopUpViewController.h
│   │   ├── CUIQuickHelpPopUpViewController.m
│   │   ├── CUIQuickHelpPopUpViewController.xib
│   │   ├── CUIRawCrashLog+Path.h
│   │   ├── CUIRawCrashLog+Path.m
│   │   ├── CUIRawCrashLog+UI.h
│   │   ├── CUIRawCrashLog+UI.m
│   │   ├── CUIRawCrashLog.h
│   │   ├── CUIRawCrashLog.m
│   │   ├── CUIRegister.h
│   │   ├── CUIRegister.m
│   │   ├── CUIRegisterLabel.h
│   │   ├── CUIRegisterLabel.m
│   │   ├── CUIRegistersMainViewController.h
│   │   ├── CUIRegistersMainViewController.m
│   │   ├── CUIRegistersMainViewController.xib
│   │   ├── CUIRegistersViewController.h
│   │   ├── CUIRegistersViewController.m
│   │   ├── CUIRegistersViewController.xib
│   │   ├── CUIRegistersWindowController.h
│   │   ├── CUIRegistersWindowController.m
│   │   ├── CUIRegistersWindowController.xib
│   │   ├── CUIReportThemedTransform.h
│   │   ├── CUIReportThemedTransform.m
│   │   ├── CUIRightViewController.h
│   │   ├── CUIRightViewController.m
│   │   ├── CUIRightViewController.xib
│   │   ├── CUIRoundedRectBezelView.h
│   │   ├── CUIRoundedRectBezelView.m
│   │   ├── CUISelectedWhiteTextFieldCell.h
│   │   ├── CUISelectedWhiteTextFieldCell.m
│   │   ├── CUISidebarViewController.h
│   │   ├── CUISidebarViewController.m
│   │   ├── CUISidebarViewController.xib
│   │   ├── CUISourceFileTableCellView.h
│   │   ├── CUISourceFileTableCellView.m
│   │   ├── CUIStackFrame+UI.h
│   │   ├── CUIStackFrame+UI.m
│   │   ├── CUIStackFrame.h
│   │   ├── CUIStackFrame.m
│   │   ├── CUIStackFrameComponents.h
│   │   ├── CUISymbolicationData.h
│   │   ├── CUISymbolicationData.m
│   │   ├── CUISymbolicationDataCache.h
│   │   ├── CUISymbolicationDataCache.m
│   │   ├── CUISymbolicationDataFormatter.h
│   │   ├── CUISymbolicationDataFormatter.m
│   │   ├── CUISymbolicationManager.h
│   │   ├── CUISymbolicationManager.m
│   │   ├── CUISymbolsFilesLibraryViewController.h
│   │   ├── CUISymbolsFilesLibraryViewController.m
│   │   ├── CUITableCustomSelectionColorRowView.h
│   │   ├── CUITableCustomSelectionColorRowView.m
│   │   ├── CUITableViewNoSpace.h
│   │   ├── CUITableViewNoSpace.m
│   │   ├── CUITerminationReasonPopUpViewController.h
│   │   ├── CUITerminationReasonPopUpViewController.m
│   │   ├── CUITextModeDisplaySettings.h
│   │   ├── CUITextModeDisplaySettings.m
│   │   ├── CUITheme.h
│   │   ├── CUITheme.m
│   │   ├── CUIThemeItemAttributes.h
│   │   ├── CUIThemeItemAttributes.m
│   │   ├── CUIThemeItemsGroup+UI.h
│   │   ├── CUIThemeItemsGroup+UI.m
│   │   ├── CUIThemeItemsGroup.h
│   │   ├── CUIThemeItemsGroup.m
│   │   ├── CUIThemesManager.h
│   │   ├── CUIThemesManager.m
│   │   ├── CUIThemesTableView.h
│   │   ├── CUIThemesTableView.m
│   │   ├── CUIThread.h
│   │   ├── CUIThread.m
│   │   ├── CUIThreadImageCell.h
│   │   ├── CUIThreadImageCell.m
│   │   ├── CUIThreadImageView.h
│   │   ├── CUIThreadImageView.m
│   │   ├── CUIThreadNamedTableCellView.h
│   │   ├── CUIThreadNamedTableCellView.m
│   │   ├── CUIThreadsColumnViewController.h
│   │   ├── CUIThreadsColumnViewController.m
│   │   ├── CUIThreadsColumnViewController.xib
│   │   ├── CUIThreadsColumnViewController_RTL.xib
│   │   ├── CUIThreadsListViewController.h
│   │   ├── CUIThreadsListViewController.m
│   │   ├── CUIThreadsListViewController.xib
│   │   ├── CUIThreadsListViewController_RTL.xib
│   │   ├── CUIThreadsViewController.h
│   │   ├── CUIThreadsViewController.m
│   │   ├── CUIdSYMBundlesManager.h
│   │   ├── CUIdSYMBundlesManager.m
│   │   ├── CUIdSYMDropView.h
│   │   ├── CUIdSYMDropView.m
│   │   ├── CUIdSYMHunter.h
│   │   ├── CUIdSYMHunter.m
│   │   ├── CodeSigningFlags.plist
│   │   ├── DWARF/
│   │   │   ├── DWRFEnums.h
│   │   │   ├── DWRFFileObject.h
│   │   │   ├── DWRFFileObject.m
│   │   │   ├── DWRFObject.h
│   │   │   ├── DWRFObject.m
│   │   │   ├── DWRFSection_debug_abbrev.h
│   │   │   ├── DWRFSection_debug_abbrev.m
│   │   │   ├── DWRFSection_debug_addr.h
│   │   │   ├── DWRFSection_debug_addr.m
│   │   │   ├── DWRFSection_debug_aranges.h
│   │   │   ├── DWRFSection_debug_aranges.m
│   │   │   ├── DWRFSection_debug_info.h
│   │   │   ├── DWRFSection_debug_info.m
│   │   │   ├── DWRFSection_debug_line.h
│   │   │   ├── DWRFSection_debug_line.m
│   │   │   ├── DWRFSection_debug_str.h
│   │   │   ├── DWRFSection_debug_str.m
│   │   │   ├── DWRFSection_debug_str_offsets.h
│   │   │   ├── DWRFSection_debug_str_offsets.m
│   │   │   ├── LEB128.c
│   │   │   └── LEB128.h
│   │   ├── Demangling/
│   │   │   ├── CUICXXDemangler.h
│   │   │   ├── CUICXXDemangler.mm
│   │   │   ├── CUISwiftDemangler.h
│   │   │   └── CUISwiftDemangler.m
│   │   ├── Extemal/
│   │   │   └── Line View Test/
│   │   │       ├── Controller.h
│   │   │       ├── Controller.m
│   │   │       ├── English.lproj/
│   │   │       │   ├── InfoPlist.strings
│   │   │       │   └── MainMenu.nib/
│   │   │       │       ├── designable.nib
│   │   │       │       └── keyedobjects.nib
│   │   │       ├── Info.plist
│   │   │       ├── Line View Test.xcodeproj/
│   │   │       │   ├── TemplateIcon.icns
│   │   │       │   ├── project.pbxproj
│   │   │       │   └── project.xcworkspace/
│   │   │       │       ├── contents.xcworkspacedata
│   │   │       │       └── xcshareddata/
│   │   │       │           └── IDEWorkspaceChecks.plist
│   │   │       ├── Line View Test_Prefix.pch
│   │   │       ├── MarkerLineNumberView.h
│   │   │       ├── MarkerLineNumberView.m
│   │   │       ├── NoodleLineNumberMarker.h
│   │   │       ├── NoodleLineNumberMarker.m
│   │   │       ├── NoodleLineNumberView.h
│   │   │       ├── NoodleLineNumberView.m
│   │   │       ├── Read Me.rtf
│   │   │       └── main.m
│   │   ├── Help/
│   │   │   ├── en.lproj/
│   │   │   │   ├── ENDPOINTSECURITY_2.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGBUS.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGSEGV.html
│   │   │   │   ├── EXC_BAD_INSTRUCTION_SIGILL.html
│   │   │   │   ├── EXC_BREAKPOINT_SIGTRAP.html
│   │   │   │   ├── EXC_CRASH_Code Signature Invalid.html
│   │   │   │   ├── EXC_CRASH_SIGABRT.html
│   │   │   │   ├── EXC_CRASH_SIGKILL.html
│   │   │   │   ├── EXC_CRASH_SIGQUIT.html
│   │   │   │   ├── EXC_CRASH_SIGSEGV.html
│   │   │   │   ├── EXC_GUARD.html
│   │   │   │   ├── unknown_exception_type.html
│   │   │   │   └── unknown_termination_reason.html
│   │   │   ├── es.lproj/
│   │   │   │   ├── ENDPOINTSECURITY_2.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGBUS.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGSEGV.html
│   │   │   │   ├── EXC_BAD_INSTRUCTION_SIGILL.html
│   │   │   │   ├── EXC_BREAKPOINT_SIGTRAP.html
│   │   │   │   ├── EXC_CRASH_Code Signature Invalid.html
│   │   │   │   ├── EXC_CRASH_SIGABRT.html
│   │   │   │   ├── EXC_CRASH_SIGKILL.html
│   │   │   │   ├── EXC_CRASH_SIGQUIT.html
│   │   │   │   ├── EXC_CRASH_SIGSEGV.html
│   │   │   │   ├── EXC_GUARD.html
│   │   │   │   ├── unknown_exception_type.html
│   │   │   │   └── unknown_termination_reason.html
│   │   │   ├── fr.lproj/
│   │   │   │   ├── ENDPOINTSECURITY_2.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGBUS.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGSEGV.html
│   │   │   │   ├── EXC_BAD_INSTRUCTION_SIGILL.html
│   │   │   │   ├── EXC_BREAKPOINT_SIGTRAP.html
│   │   │   │   ├── EXC_CRASH_Code Signature Invalid.html
│   │   │   │   ├── EXC_CRASH_SIGABRT.html
│   │   │   │   ├── EXC_CRASH_SIGKILL.html
│   │   │   │   ├── EXC_CRASH_SIGQUIT.html
│   │   │   │   ├── EXC_CRASH_SIGSEGV.html
│   │   │   │   ├── EXC_GUARD.html
│   │   │   │   ├── unknown_exception_type.html
│   │   │   │   └── unknown_termination_reason.html
│   │   │   ├── he.lproj/
│   │   │   │   ├── ENDPOINTSECURITY_2.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGBUS.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGSEGV.html
│   │   │   │   ├── EXC_BAD_INSTRUCTION_SIGILL.html
│   │   │   │   ├── EXC_BREAKPOINT_SIGTRAP.html
│   │   │   │   ├── EXC_CRASH_Code Signature Invalid.html
│   │   │   │   ├── EXC_CRASH_SIGABRT.html
│   │   │   │   ├── EXC_CRASH_SIGKILL.html
│   │   │   │   ├── EXC_CRASH_SIGQUIT.html
│   │   │   │   ├── EXC_CRASH_SIGSEGV.html
│   │   │   │   ├── EXC_GUARD.html
│   │   │   │   ├── unknown_exception_type.html
│   │   │   │   └── unknown_termination_reason.html
│   │   │   ├── ja.lproj/
│   │   │   │   ├── ENDPOINTSECURITY_2.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGBUS.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGSEGV.html
│   │   │   │   ├── EXC_BAD_INSTRUCTION_SIGILL.html
│   │   │   │   ├── EXC_BREAKPOINT_SIGTRAP.html
│   │   │   │   ├── EXC_CRASH_Code Signature Invalid.html
│   │   │   │   ├── EXC_CRASH_SIGABRT.html
│   │   │   │   ├── EXC_CRASH_SIGKILL.html
│   │   │   │   ├── EXC_CRASH_SIGQUIT.html
│   │   │   │   ├── EXC_CRASH_SIGSEGV.html
│   │   │   │   ├── EXC_GUARD.html
│   │   │   │   ├── unknown_exception_type.html
│   │   │   │   └── unknown_termination_reason.html
│   │   │   ├── known_exceptions.css
│   │   │   └── known_termination_reasons.css
│   │   ├── Images.xcassets/
│   │   │   ├── AppIcon.appiconset/
│   │   │   │   └── Contents.json
│   │   │   ├── Contents.json
│   │   │   ├── FontPanelButton.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── TextMode.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── binaryImage_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── bottom_disclose_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── bottom_hide_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── bytesOffset_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-appkit.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-audiospeech.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-database.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-foundation.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-framework.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-generic.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-graphics.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-languages.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-network.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-security.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-system.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-usercode.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-webinternet.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── crashedThread_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── crashreporter.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── filter_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── left_switch_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── menuBacktraces.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── menuBinaryImage.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── menuDiagnostic.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── menuException.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── menuHeader.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── menuThread.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── menuThreadCrashed.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── menuThreadState.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── middle_switch_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── presentation_structured_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── presentation_text_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── quote_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── right_switch_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── sidebar_recents_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── smallColumn_RTL_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── smallColumn_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── smallCrashedThread_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── smallLightTable_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── symbolication_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── templateBlue.imageset/
│   │   │   │   └── Contents.json
│   │   │   └── thread_Template.imageset/
│   │   │       └── Contents.json
│   │   ├── Info.plist
│   │   ├── Mach-o/
│   │   │   ├── MCHLoadCommand.h
│   │   │   ├── MCHLoadCommand.m
│   │   │   ├── MCHMachBinary.h
│   │   │   ├── MCHMachBinary.m
│   │   │   ├── MCHMemoryBufferWrapper.h
│   │   │   ├── MCHMemoryBufferWrapper.m
│   │   │   ├── MCHObjectFile.h
│   │   │   ├── MCHObjectFile.m
│   │   │   ├── MCHSection.h
│   │   │   ├── MCHSection.m
│   │   │   ├── MCHSegment.h
│   │   │   ├── MCHSegment.m
│   │   │   ├── MCHSegmentLoadCommand.h
│   │   │   ├── MCHSegmentLoadCommand.m
│   │   │   ├── MCHUUIDLoadCommand.h
│   │   │   └── MCHUUIDLoadCommand.m
│   │   ├── NSBundle+dSYM.h
│   │   ├── NSBundle+dSYM.m
│   │   ├── NSCrashLogTextScrollView.h
│   │   ├── NSCrashLogTextScrollView.m
│   │   ├── NSFileManager+ExtendedAttributes.h
│   │   ├── NSFileManager+ExtendedAttributes.m
│   │   ├── WBRemoteVersionChecker.h
│   │   ├── WBRemoteVersionChecker.m
│   │   ├── app_unexpectedly_Prefix.pch
│   │   ├── clock/
│   │   │   ├── CUIApplicationIconView.h
│   │   │   ├── CUIApplicationIconView.m
│   │   │   ├── CUIWatchAxis.h
│   │   │   ├── CUIWatchAxis.m
│   │   │   ├── CUIWatchBridge.h
│   │   │   ├── CUIWatchBridge.m
│   │   │   ├── CUIWatchDrawablePart.h
│   │   │   ├── CUIWatchGear.h
│   │   │   ├── CUIWatchGear.m
│   │   │   ├── CUIWatchJewel.h
│   │   │   ├── CUIWatchJewel.m
│   │   │   ├── CUIWatchPart.h
│   │   │   ├── CUIWatchPart.m
│   │   │   ├── CUIWatchScrew.h
│   │   │   └── CUIWatchScrew.m
│   │   ├── dSYM/
│   │   │   ├── CUIdSYMBundle+UI.h
│   │   │   ├── CUIdSYMBundle+UI.m
│   │   │   ├── CUIdSYMBundle.h
│   │   │   └── CUIdSYMBundle.m
│   │   ├── default_themes.plist
│   │   ├── en.lproj/
│   │   │   ├── CUIAboutBoxWindowController.xib
│   │   │   ├── CUIBinaryImagesViewController.xib
│   │   │   ├── CUICodeSigningInformationViewController.xib
│   │   │   ├── CUICollectionViewRegisterItem.xib
│   │   │   ├── CUICrashLogPresentationOutlineViewController.xib
│   │   │   ├── CUICrashLogPresentationTextViewController.xib
│   │   │   ├── CUICrashLogsListViewController.xib
│   │   │   ├── CUICrashLogsSourceSmartEditorWindowController.xib
│   │   │   ├── CUICrashLogsSourcesViewController.xib
│   │   │   ├── CUIExportAccessoryViewController.xib
│   │   │   ├── CUIInspectorExecutableViewController.xib
│   │   │   ├── CUIInspectorGeneralViewController.xib
│   │   │   ├── CUIInspectorProcessesViewController.xib
│   │   │   ├── CUIInspectorUserViewController.xib
│   │   │   ├── CUILineJumperWindowController.xib
│   │   │   ├── CUIMainWindowController.xib
│   │   │   ├── CUIPreferencePaneAdvancedViewController.xib
│   │   │   ├── CUIPreferencePaneCrashreporterViewController.xib
│   │   │   ├── CUIPreferencePaneFontscolorsViewController.xib
│   │   │   ├── CUIPreferencePaneGeneralViewController.xib
│   │   │   ├── CUIPreferencePanePresentationOutlineViewController.xib
│   │   │   ├── CUIPreferencePanePresentationTextViewController.xib
│   │   │   ├── CUIPreferencePanePresentationViewController.xib
│   │   │   ├── CUIPreferencePaneSymbolicationViewController.xib
│   │   │   ├── CUIPreferencesWindowController.xib
│   │   │   ├── CUISymbolsFilesLibraryViewController.xib
│   │   │   ├── CodeSigning.strings
│   │   │   ├── InfoPlist.strings
│   │   │   ├── Localizable.strings
│   │   │   ├── MainMenu.xib
│   │   │   ├── Predicates.strings
│   │   │   └── RemoteCheck.strings
│   │   ├── es.lproj/
│   │   │   ├── CUIAboutBoxWindowController.xib
│   │   │   ├── CUIBinaryImagesViewController.xib
│   │   │   ├── CUICodeSigningInformationViewController.xib
│   │   │   ├── CUICollectionViewRegisterItem.xib
│   │   │   ├── CUICrashLogPresentationOutlineViewController.xib
│   │   │   ├── CUICrashLogPresentationTextViewController.xib
│   │   │   ├── CUICrashLogsListViewController.xib
│   │   │   ├── CUICrashLogsSourceSmartEditorWindowController.xib
│   │   │   ├── CUICrashLogsSourcesViewController.xib
│   │   │   ├── CUIExportAccessoryViewController.xib
│   │   │   ├── CUIInspectorExecutableViewController.xib
│   │   │   ├── CUIInspectorGeneralViewController.xib
│   │   │   ├── CUIInspectorProcessesViewController.xib
│   │   │   ├── CUIInspectorUserViewController.xib
│   │   │   ├── CUILineJumperWindowController.xib
│   │   │   ├── CUIMainWindowController.xib
│   │   │   ├── CUIPreferencePaneAdvancedViewController.xib
│   │   │   ├── CUIPreferencePaneCrashreporterViewController.xib
│   │   │   ├── CUIPreferencePaneFontscolorsViewController.xib
│   │   │   ├── CUIPreferencePaneGeneralViewController.xib
│   │   │   ├── CUIPreferencePanePresentationOutlineViewController.xib
│   │   │   ├── CUIPreferencePanePresentationTextViewController.xib
│   │   │   ├── CUIPreferencePanePresentationViewController.xib
│   │   │   ├── CUIPreferencePaneSymbolicationViewController.xib
│   │   │   ├── CUIPreferencesWindowController.xib
│   │   │   ├── CUISymbolsFilesLibraryViewController.xib
│   │   │   ├── CodeSigning.strings
│   │   │   ├── InfoPlist.strings
│   │   │   ├── Localizable.strings
│   │   │   ├── MainMenu.xib
│   │   │   ├── Predicates.strings
│   │   │   └── RemoteCheck.strings
│   │   ├── fr.lproj/
│   │   │   ├── CUIAboutBoxWindowController.xib
│   │   │   ├── CUIBinaryImagesViewController.xib
│   │   │   ├── CUICodeSigningInformationViewController.xib
│   │   │   ├── CUICollectionViewRegisterItem.xib
│   │   │   ├── CUICrashLogPresentationOutlineViewController.xib
│   │   │   ├── CUICrashLogPresentationTextViewController.xib
│   │   │   ├── CUICrashLogsListViewController.xib
│   │   │   ├── CUICrashLogsSourceSmartEditorWindowController.xib
│   │   │   ├── CUICrashLogsSourcesViewController.xib
│   │   │   ├── CUIExportAccessoryViewController.xib
│   │   │   ├── CUIInspectorExecutableViewController.xib
│   │   │   ├── CUIInspectorGeneralViewController.xib
│   │   │   ├── CUIInspectorProcessesViewController.xib
│   │   │   ├── CUIInspectorUserViewController.xib
│   │   │   ├── CUILineJumperWindowController.xib
│   │   │   ├── CUIMainWindowController.xib
│   │   │   ├── CUIPreferencePaneAdvancedViewController.xib
│   │   │   ├── CUIPreferencePaneCrashreporterViewController.xib
│   │   │   ├── CUIPreferencePaneFontscolorsViewController.xib
│   │   │   ├── CUIPreferencePaneGeneralViewController.xib
│   │   │   ├── CUIPreferencePanePresentationOutlineViewController.xib
│   │   │   ├── CUIPreferencePanePresentationTextViewController.xib
│   │   │   ├── CUIPreferencePanePresentationViewController.xib
│   │   │   ├── CUIPreferencePaneSymbolicationViewController.xib
│   │   │   ├── CUIPreferencesWindowController.xib
│   │   │   ├── CUISymbolsFilesLibraryViewController.xib
│   │   │   ├── CodeSigning.strings
│   │   │   ├── InfoPlist.strings
│   │   │   ├── Localizable.strings
│   │   │   ├── MainMenu.xib
│   │   │   ├── Predicates.strings
│   │   │   └── RemoteCheck.strings
│   │   ├── he.lproj/
│   │   │   ├── CUIAboutBoxWindowController.xib
│   │   │   ├── CUIBinaryImagesViewController.xib
│   │   │   ├── CUICodeSigningInformationViewController.xib
│   │   │   ├── CUICollectionViewRegisterItem.xib
│   │   │   ├── CUICrashLogPresentationOutlineViewController.xib
│   │   │   ├── CUICrashLogPresentationTextViewController.xib
│   │   │   ├── CUICrashLogsListViewController.xib
│   │   │   ├── CUICrashLogsSourceSmartEditorWindowController.xib
│   │   │   ├── CUICrashLogsSourcesViewController.xib
│   │   │   ├── CUIExportAccessoryViewController.xib
│   │   │   ├── CUIInspectorExecutableViewController.xib
│   │   │   ├── CUIInspectorGeneralViewController.xib
│   │   │   ├── CUIInspectorProcessesViewController.xib
│   │   │   ├── CUIInspectorUserViewController.xib
│   │   │   ├── CUILineJumperWindowController.xib
│   │   │   ├── CUIMainWindowController.xib
│   │   │   ├── CUIPreferencePaneAdvancedViewController.xib
│   │   │   ├── CUIPreferencePaneCrashreporterViewController.xib
│   │   │   ├── CUIPreferencePaneFontscolorsViewController.xib
│   │   │   ├── CUIPreferencePaneGeneralViewController.xib
│   │   │   ├── CUIPreferencePanePresentationOutlineViewController.xib
│   │   │   ├── CUIPreferencePanePresentationTextViewController.xib
│   │   │   ├── CUIPreferencePanePresentationViewController.xib
│   │   │   ├── CUIPreferencePaneSymbolicationViewController.xib
│   │   │   ├── CUIPreferencesWindowController.xib
│   │   │   ├── CUISymbolsFilesLibraryViewController.xib
│   │   │   ├── CodeSigning.strings
│   │   │   ├── InfoPlist.strings
│   │   │   ├── Localizable.strings
│   │   │   ├── MainMenu.xib
│   │   │   ├── Predicates.strings
│   │   │   └── RemoteCheck.strings
│   │   ├── images/
│   │   │   ├── philo_stone.psd
│   │   │   ├── recents.psd
│   │   │   ├── recents@2x.psd
│   │   │   └── symbolication@2x.psd
│   │   ├── ips + Extensions/
│   │   │   ├── IPSImage+Offset.h
│   │   │   └── IPSImage+Offset.m
│   │   ├── ja.lproj/
│   │   │   ├── CUIAboutBoxWindowController.xib
│   │   │   ├── CUIBinaryImagesViewController.xib
│   │   │   ├── CUICodeSigningInformationViewController.xib
│   │   │   ├── CUICollectionViewRegisterItem.xib
│   │   │   ├── CUICrashLogPresentationOutlineViewController.xib
│   │   │   ├── CUICrashLogPresentationTextViewController.xib
│   │   │   ├── CUICrashLogsListViewController.xib
│   │   │   ├── CUICrashLogsSourceSmartEditorWindowController.xib
│   │   │   ├── CUICrashLogsSourcesViewController.xib
│   │   │   ├── CUIExportAccessoryViewController.xib
│   │   │   ├── CUIInspectorExecutableViewController.xib
│   │   │   ├── CUIInspectorGeneralViewController.xib
│   │   │   ├── CUIInspectorProcessesViewController.xib
│   │   │   ├── CUIInspectorUserViewController.xib
│   │   │   ├── CUILineJumperWindowController.xib
│   │   │   ├── CUIMainWindowController.xib
│   │   │   ├── CUIPreferencePaneAdvancedViewController.xib
│   │   │   ├── CUIPreferencePaneCrashreporterViewController.xib
│   │   │   ├── CUIPreferencePaneFontscolorsViewController.xib
│   │   │   ├── CUIPreferencePaneGeneralViewController.xib
│   │   │   ├── CUIPreferencePanePresentationOutlineViewController.xib
│   │   │   ├── CUIPreferencePanePresentationTextViewController.xib
│   │   │   ├── CUIPreferencePanePresentationViewController.xib
│   │   │   ├── CUIPreferencePaneSymbolicationViewController.xib
│   │   │   ├── CUIPreferencesWindowController.xib
│   │   │   ├── CUISymbolsFilesLibraryViewController.xib
│   │   │   ├── CodeSigning.strings
│   │   │   ├── InfoPlist.strings
│   │   │   ├── Localizable.strings
│   │   │   ├── MainMenu.xib
│   │   │   ├── Predicates.strings
│   │   │   └── RemoteCheck.strings
│   │   ├── main.m
│   │   └── template.source
│   └── app_unexpectedly.xcodeproj/
│       ├── project.pbxproj
│       ├── project.xcworkspace/
│       │   ├── contents.xcworkspacedata
│       │   └── xcshareddata/
│       │       └── IDEWorkspaceChecks.plist
│       ├── xcshareddata/
│       │   └── xcschemes/
│       │       └── app_unexpectedly.xcscheme
│       └── xcuserdata/
│           └── stephane.xcuserdatad/
│               ├── xcdebugger/
│               │   └── Breakpoints_v2.xcbkptlist
│               └── xcschemes/
│                   └── xcschememanagement.plist
├── build.sh
├── distribution/
│   ├── Documents/
│   │   └── ReadMe.rtf
│   ├── Template/
│   │   └── Template_ro.dmg
│   ├── Unexpectedly.pkgproj
│   └── Version
└── plugin_quicklook/
    ├── crashreport/
    │   ├── GeneratePreviewForURL.m
    │   ├── GenerateThumbnailForURL.m
    │   ├── Info.plist
    │   ├── NSUserDefaults+UNXQuickLookGenerator.h
    │   ├── NSUserDefaults+UNXQuickLookGenerator.m
    │   ├── QLCUIThemesProvider.h
    │   ├── QLCUIThemesProvider.m
    │   └── main.c
    └── crashreport.xcodeproj/
        ├── project.pbxproj
        ├── project.xcworkspace/
        │   └── xcshareddata/
        │       └── IDEWorkspaceChecks.plist
        └── xcuserdata/
            └── stephane.xcuserdatad/
                └── xcschemes/
                    └── xcschememanagement.plist

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
# General
.DS_Store

# Build

distribution/build
distribution/artifacts
distribution/Template/Template_rw.dmg

# Xcode project

project.xcworkspace/xcuserdata/

*.xcodeproj/xcuserdata/
*.xcuserdata
*.xcuserstate


================================================
FILE: .gitmodules
================================================
[submodule "submodules/ips2crash"]
	path = submodules/ips2crash
	url = https://github.com/packagesdev/ips2crash


================================================
FILE: Configs/CodeSigningConfigurationSettings.xcconfig
================================================
// Code Signing Settings

// CODE_SIGN_IDENTITY = Developer ID Application: Your Identifity (SomeValue)

================================================
FILE: Configs/SharedConfigurationSettings.xcconfig
================================================
// Shared Configuration Settings for Unexpectedly Xcode Projects

#include "CodeSigningConfigurationSettings.xcconfig"

// Universal

ARCHS = $(ARCHS_STANDARD_64_BIT)

// Use Latest OS X SDK

SDKROOT = macosx

// Deployment Target

MACOSX_DEPLOYMENT_TARGET = 10.13
MACOSX_DEPLOYMENT_TARGET[arch=arm64] = 11.0

//

COPY_PHASE_STRIP[config=Debug] = NO
COPY_PHASE_STRIP = YES

// Codesigning

OTHER_CODE_SIGN_FLAGS = --timestamp


================================================
FILE: LICENSE.txt
================================================
Copyright © 2021-2025, Stéphane Sudre. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


License for the third party code Included in this software: 

NoodleLineNumberView & NoodleLineNumberMarker

Created by Paul Kim on 9/28/08.
Copyright (c) 2008 Noodlesoft, LLC. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

================================================
FILE: README.md
================================================
## Synopsis

Unexpectedly is a macOS utility to browse and inspect crash reports of Mac applications.

## Screenshot

![Alt text](http://s.sudre.free.fr/Software/Unexpectedly/images/about_top.png "Unexpectedly text mode")

## Motivation

The macOS system utility Console.app is pretty limited and confusing when it comes to browsing crash reports. 

Minimum OS requirement is macOS 10.13 at this time.

## Development Environment

- macOS 10.14 or later
- Xcode 10.1 or later
- Objective-C 2.x


## License

 Copyright (c) 2020-2025, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

## Attributions

Unexpectedly uses an updated implementation of the Line View Test project

Copyright (c) 2008 Noodlesoft, LLC. All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


## Potentially Interesting Implementations In The Code

- Code to access the segments and sections of a Mach-O file is available in the app_unexpectedly project/app_unexpectedly project/Mach-o directory.

- Code to analyze DWARF files is available in the app_unexpectedly project/app_unexpectedly project/DWARF directory. Unexpectedly does not rely on LLVM.

- A solution to deal with a NSTextView when it comes to vertical scrolling when a vertical ruleview is visible is available in the CUICrashLogTextView class.

- How the project uses - forwardingTargetForSelector: , - respondsToSelector: to go downward in the responders chain might be interesting.

- Code to implement a thick NSSplitView divider with subviews as in Xcode can be found in the CUICrashLogPresentationOutlineViewController class.  


================================================
FILE: app_unexpectedly/AppKit + Extensions/NSColor+LabelColor.h
================================================
/*
 Copyright (c) 2018, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Cocoa/Cocoa.h>

@interface NSColor ()

+ (NSColor *)labelColor;
+ (NSColor *)secondaryLabelColor;
+ (NSColor *)tertiaryLabelColor;
+ (NSColor *)quaternaryLabelColor;
+ (NSColor *)containerBorderColor;

+ (NSColor *)systemBlueColor;

@end


================================================
FILE: app_unexpectedly/AppKit + Extensions/NSColor+LabelColor.m
================================================
/*
 Copyright (c) 2018, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "NSColor+LabelColor.h"

#import <objc/objc-class.h>

@interface NSColor (LabelColor_WB)

+ (NSColor *)WB_labelColor;

+ (NSColor *)WB_secondaryLabelColor;

+ (NSColor *)WB_tertiaryLabelColor;

+ (NSColor *)WB_quaternaryLabelColor;

+ (NSColor *)WB_containerBorderColor;


+ (NSColor *)WB_systemBlueColor;

@end

@implementation NSColor (LabelColor_WB)

+ (void)load
{
	Class tClass = object_getClass(self);
	
	if ([self respondsToSelector:@selector(labelColor)]==NO)
	{
		Method origMethod = class_getClassMethod(tClass, @selector(WB_labelColor));
		
		class_addMethod(tClass, @selector(labelColor), method_getImplementation(origMethod),method_getTypeEncoding(origMethod));
	}
	
	if ([self respondsToSelector:@selector(secondaryLabelColor)]==NO)
	{
		Method origMethod = class_getClassMethod(tClass, @selector(WB_secondaryLabelColor));
		
		class_addMethod(tClass, @selector(secondaryLabelColor), method_getImplementation(origMethod),method_getTypeEncoding(origMethod));
	}
	
	if ([self respondsToSelector:@selector(tertiaryLabelColor)]==NO)
	{
		Method origMethod = class_getClassMethod(tClass, @selector(WB_tertiaryLabelColor));
		
		class_addMethod(tClass, @selector(tertiaryLabelColor), method_getImplementation(origMethod),method_getTypeEncoding(origMethod));
	}
	
	if ([self respondsToSelector:@selector(quaternaryLabelColor)]==NO)
	{
		Method origMethod = class_getClassMethod(tClass, @selector(WB_quaternaryLabelColor));
		
		class_addMethod(tClass, @selector(quaternaryLabelColor), method_getImplementation(origMethod),method_getTypeEncoding(origMethod));
	}
	
	if ([self respondsToSelector:@selector(containerBorderColor)]==NO)
	{
		Method origMethod = class_getClassMethod(tClass, @selector(WB_containerBorderColor));
		
		class_addMethod(tClass, @selector(containerBorderColor), method_getImplementation(origMethod),method_getTypeEncoding(origMethod));
	}
	
	if ([self respondsToSelector:@selector(systemBlueColor)]==NO)
	{
		Method origMethod = class_getClassMethod(tClass, @selector(WB_systemBlueColor));
		
		class_addMethod(tClass, @selector(systemBlueColor), method_getImplementation(origMethod),method_getTypeEncoding(origMethod));
	}
}

#pragma mark -

+ (NSColor *)WB_labelColor
{
	return [NSColor colorWithDeviceWhite:0.0 alpha:0.85];
}

+ (NSColor *)WB_secondaryLabelColor
{
	return [NSColor colorWithDeviceWhite:0.0 alpha:0.5];
}

+ (NSColor *)WB_tertiaryLabelColor
{
	return [NSColor colorWithDeviceWhite:0.0 alpha:0.25];
}

+ (NSColor *)WB_quaternaryLabelColor
{
	return [NSColor colorWithDeviceWhite:0.0 alpha:0.10];
}

+ (NSColor *)WB_containerBorderColor
{
	if ([[NSColor class] respondsToSelector:@selector(tertiaryLabelColor)]==YES)
		return [[NSColor class] performSelector:@selector(tertiaryLabelColor) withObject:nil];
	
	return [NSColor colorWithDeviceWhite:0.0 alpha:0.25];
}

+ (NSColor *)WB_systemBlueColor
{
	return [NSColor colorWithDeviceRed:0.4 green:0.69 blue:0.94 alpha:1.0];
}

@end


================================================
FILE: app_unexpectedly/AppKit + Extensions/NSColor+String.h
================================================
/*
 Copyright (c) 2019, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Cocoa/Cocoa.h>

@interface NSColor (String)

+ (NSColor *)colorFromString:(NSString *)inString;

- (NSString *)stringValue;

@end


================================================
FILE: app_unexpectedly/AppKit + Extensions/NSColor+String.m
================================================
/*
 Copyright (c) 2019, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "NSColor+String.h"

@implementation NSColor (String)

+ (NSColor *)colorFromString:(NSString *)inString
{
    NSColor * tColor=nil;
    
    if (inString!=nil)
    {
        NSArray<NSString *> * tComponents=[inString componentsSeparatedByString:@"|"];
    
        if (tComponents.count==3)
        {
            tColor=[NSColor colorWithCalibratedRed:[tComponents[0] floatValue]
                                             green:[tComponents[1] floatValue]
                                              blue:[tComponents[2] floatValue]
                                             alpha:1.0];
        }
    }
    
    return tColor;
}

#pragma mark -

- (NSString *)stringValue
{
    NSColorSpace * tColorSpace = [NSColorSpace genericRGBColorSpace];
    NSColor * tColor = [self colorUsingColorSpace:tColorSpace];
    
    return([NSString stringWithFormat:@"%f|%f|%f",(float)[tColor redComponent],(float)[tColor greenComponent],(float)[tColor blueComponent]]);
}

@end


================================================
FILE: app_unexpectedly/AppKit + Extensions/NSResponder+Appearance.h
================================================
/*
 Copyright (c) 2018, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Cocoa/Cocoa.h>

#ifndef NSAppKitVersionNumber10_14
#define NSAppKitVersionNumber10_14 1641.10
#endif

typedef NS_ENUM(NSUInteger, WB_AppearanceMode)
{
	WB_AppearanceAqua=0,
	WB_AppearanceDarkAqua
};

extern NSString * const WB_NSAppearanceNameAqua;

extern NSString * const WB_NSAppearanceNameDarkAqua;

@interface NSResponder (WB_Appearance)

+ (WB_AppearanceMode) WB_appearanceModeForAppearanceName:(NSString *)inAppearanceName;

+ (NSString *)WB_appearanceNameForAppearanceMode:(WB_AppearanceMode)inAppearanceMode;

- (NSString *)WB_effectiveAppearanceName;

- (BOOL)WB_isEffectiveAppearanceDarkAqua;

@end

================================================
FILE: app_unexpectedly/AppKit + Extensions/NSResponder+Appearance.m
================================================
/*
 Copyright (c) 2018, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "NSResponder+Appearance.h"

NSString * const WB_NSAppearanceNameAqua=@"NSAppearanceNameAqua";

NSString * const WB_NSAppearanceNameDarkAqua=@"NSAppearanceNameDarkAqua";

@implementation NSResponder (Appearance_WB)

+ (WB_AppearanceMode)WB_appearanceModeForAppearanceName:(NSString *)inAppearanceName
{
	if ([inAppearanceName isEqualToString:WB_NSAppearanceNameDarkAqua]==YES)
		return WB_AppearanceDarkAqua;
	
	return WB_AppearanceAqua;
}

+ (NSString *)WB_appearanceNameForAppearanceMode:(WB_AppearanceMode)inAppearanceMode
{
	switch(inAppearanceMode)
	{
		case WB_AppearanceAqua:
			
			return WB_NSAppearanceNameAqua;
			
		case WB_AppearanceDarkAqua:
			
			return WB_NSAppearanceNameDarkAqua;
	}
	
	return WB_NSAppearanceNameAqua;
}

#pragma mark -

- (NSString *)WB_effectiveAppearanceName
{
	if (NSAppKitVersionNumber<NSAppKitVersionNumber10_14)
		return WB_NSAppearanceNameAqua;
	
	if ([self conformsToProtocol:@protocol(NSAppearanceCustomization)]==NO)
		return WB_NSAppearanceNameAqua;
	
	id tAppearance=[self performSelector:@selector(effectiveAppearance) withObject:nil];
	
	return (NSString *)[tAppearance performSelector:@selector(bestMatchFromAppearancesWithNames:) withObject:@[WB_NSAppearanceNameAqua,WB_NSAppearanceNameDarkAqua]];
}

- (BOOL)WB_isEffectiveAppearanceDarkAqua
{
	if (NSAppKitVersionNumber<NSAppKitVersionNumber10_14)
		return NO;
	
	if ([self conformsToProtocol:@protocol(NSAppearanceCustomization)]==NO)
		return NO;
	
	id tAppearance=[self performSelector:@selector(effectiveAppearance) withObject:nil];
	
	NSString * tBestMatch=(NSString *)[tAppearance performSelector:@selector(bestMatchFromAppearancesWithNames:) withObject:@[WB_NSAppearanceNameAqua,WB_NSAppearanceNameDarkAqua]];
	
	return [tBestMatch isEqualToString:WB_NSAppearanceNameDarkAqua];
}

@end


================================================
FILE: app_unexpectedly/AppKit + Extensions/NSTableView+Selection.h
================================================
/*
 Copyright (c) 2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Cocoa/Cocoa.h>

@interface NSTableView (Selection_WB)

	@property (readonly, copy) NSIndexSet *WB_selectedOrClickedRowIndexes;

@end


================================================
FILE: app_unexpectedly/AppKit + Extensions/NSTableView+Selection.m
================================================
/*
 Copyright (c) 2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "NSTableView+Selection.h"

@implementation NSTableView (Selection_WB)

- (NSIndexSet *)WB_selectedOrClickedRowIndexes
{
	NSIndexSet * tSelectionIndexSet=self.selectedRowIndexes;
	
	NSInteger tClickedRow=self.clickedRow;
	
	if (tClickedRow!=-1 && [tSelectionIndexSet containsIndex:tClickedRow]==NO)
		tSelectionIndexSet=[NSIndexSet indexSetWithIndex:tClickedRow];
	
	return tSelectionIndexSet;
}

@end


================================================
FILE: app_unexpectedly/AppKit + Extensions/NSToolbar+Packages.h
================================================
/*
 Copyright (c) 2016, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <AppKit/AppKit.h>

@interface NSToolbar (Packages)

- (NSToolbarItem *)PKG_toolBarItemWithIdentifier:(NSString *)inIdentifier;

@end


================================================
FILE: app_unexpectedly/AppKit + Extensions/NSToolbar+Packages.m
================================================
/*
 Copyright (c) 2016, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "NSToolbar+Packages.h"

@implementation NSToolbar (Packages)

- (NSToolbarItem *)PKG_toolBarItemWithIdentifier:(NSString *)inIdentifier
{
	if (inIdentifier==nil)
		return nil;
	
	for(NSToolbarItem * tItem in self.items)
	{
		if ([tItem.itemIdentifier isEqualToString:inIdentifier]==YES)
			return tItem;
	}
			
	return nil;
}

@end


================================================
FILE: app_unexpectedly/Foundation + Extensions/NSArray+UniqueName.h
================================================
/*
 Copyright (c) 2017, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Foundation/Foundation.h>

@interface NSArray (UniqueName)

- (NSString *)uniqueNameWithBaseName:(NSString *)inBaseName usingNameExtractor:(NSString * (^)(id,NSUInteger))nameExtractor;

- (NSString *)uniqueNameWithBaseName:(NSString *)inBaseName options:(NSStringCompareOptions)inOptions usingNameExtractor:(NSString * (^)(id,NSUInteger))nameExtractor;

- (NSString *)uniqueNameWithBaseName:(NSString *)inBaseName format:(NSString *)inFormat options:(NSStringCompareOptions)inOptions usingNameExtractor:(NSString * (^)(id,NSUInteger))nameExtractor;

@end


================================================
FILE: app_unexpectedly/Foundation + Extensions/NSArray+UniqueName.m
================================================
/*
 Copyright (c) 2017, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "NSArray+UniqueName.h"

#import "NSArray+WBExtensions.h"

#define UNIQUENAME_ATTEMPTS_MAX		65535

@implementation NSArray (UniqueName)

- (NSString *)uniqueNameWithBaseName:(NSString *)inBaseName usingNameExtractor:(NSString * (^)(id bObject,NSUInteger bIndex))nameExtractor
{
	return [self uniqueNameWithBaseName:inBaseName options:NSCaseInsensitiveSearch usingNameExtractor:nameExtractor];
}

- (NSString *)uniqueNameWithBaseName:(NSString *)inBaseName options:(NSStringCompareOptions)inOptions usingNameExtractor:(NSString * (^)(id bObject,NSUInteger bIndex))nameExtractor
{
	return [self uniqueNameWithBaseName:inBaseName format: @"%@ %lu" options:inOptions usingNameExtractor:nameExtractor];
}

- (NSString *)uniqueNameWithBaseName:(NSString *)inBaseName format:(NSString *)inFormat options:(NSStringCompareOptions)inOptions usingNameExtractor:(NSString * (^)(id bObject,NSUInteger bIndex))nameExtractor
{
	if (inBaseName==nil || nameExtractor==nil)
		return nil;
	
	if (inFormat.length==0 ||
		[inFormat rangeOfString:@"%@"].location==NSNotFound ||
		[inFormat rangeOfString:@"%lu"].location==NSNotFound)
		return nil;
	
	NSArray * tNamesArray=[self WB_arrayByMappingObjectsUsingBlock:nameExtractor];
	
	if (tNamesArray==nil)
		return nil;
	
	NSString * tFileName=inBaseName;
	NSUInteger tIndex=1;
	
	do
	{
		if ([tNamesArray indexOfObjectPassingTest:^BOOL(NSString * bName, NSUInteger bIndex, BOOL * bOutStop){
		
			return ([bName compare:tFileName options:inOptions]==NSOrderedSame);
		
		}]==NSNotFound)
			return tFileName;
		
		tFileName=[NSString stringWithFormat:inFormat,inBaseName,(unsigned long)tIndex];
		
		tIndex++;
	}
	while (tIndex<UNIQUENAME_ATTEMPTS_MAX);
	
	NSLog(@"Unable to find a unique name using the basename %@",inBaseName);
	
	return nil;
}

@end


================================================
FILE: app_unexpectedly/Foundation + Extensions/NSArray+WBExtensions.h
================================================
/*
 Copyright (c) 2016-2017, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Foundation/Foundation.h>

@interface NSArray (WBExtensions)

- (instancetype)WB_arrayByMappingObjectsUsingBlock:(id (^)(id bObject, NSUInteger bIndex))inBlock;

- (instancetype)WB_arrayByMappingObjectsLenientlyUsingBlock:(id (^)(id bObject, NSUInteger bIndex))inBlock;

- (instancetype)WB_filteredArrayUsingBlock:(BOOL (^)(id bObject, NSUInteger bIndex))inBlock;

@end

@interface NSMutableArray (WBExtensions)

- (void)WB_mergeWithArray:(NSArray *)inArray;

@end


================================================
FILE: app_unexpectedly/Foundation + Extensions/NSArray+WBExtensions.m
================================================
/*
 Copyright (c) 2016, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "NSArray+WBExtensions.h"

@implementation NSArray (WBExtensions)

- (instancetype)WB_arrayByMappingObjectsUsingBlock:(id (^)(id bObject, NSUInteger bIndex))inBlock
{
	if (inBlock==nil)
		return self;
	
	__block NSMutableArray * tMutableArray=[NSMutableArray array];
	
	[self enumerateObjectsUsingBlock:^(id bOject,NSUInteger bIndex,BOOL * bOutStop){
	
		id tObject=inBlock(bOject,bIndex);
		
		if (tObject==nil)
		{
			*bOutStop=YES;
			tMutableArray=nil;
		}
		else
		{
			[tMutableArray addObject:tObject];
		}
	
	}];
	
	if ([self isKindOfClass:NSMutableArray.class]==YES)
		return tMutableArray;
		
	return [tMutableArray copy];
}

- (instancetype)WB_arrayByMappingObjectsLenientlyUsingBlock:(id (^)(id bObject, NSUInteger bIndex))inBlock
{
	if (inBlock==nil)
		return self;
	
	NSMutableArray * tMutableArray=[NSMutableArray array];
	
	[self enumerateObjectsUsingBlock:^(id bOject,NSUInteger bIndex,__attribute__((unused))BOOL * bOutStop){
		
		id tObject=inBlock(bOject,bIndex);
		
		if (tObject!=nil)
			[tMutableArray addObject:tObject];
		
	}];
	
	if ([self isKindOfClass:NSMutableArray.class]==YES)
		return tMutableArray;
	
	return [tMutableArray copy];
}

- (instancetype)WB_filteredArrayUsingBlock:(BOOL (^)(id bObject, NSUInteger bIndex))inBlock
{
	if (inBlock==nil)
		return self;
	
	__block NSMutableArray * tMutableArray=[NSMutableArray array];
	
	[self enumerateObjectsUsingBlock:^(id bOject,NSUInteger bIndex,__attribute__((unused))BOOL * bOutStop){
		
		if (inBlock(bOject,bIndex)==YES)
			[tMutableArray addObject:bOject];
	}];
	
	if ([self isKindOfClass:NSMutableArray.class]==YES)
		return tMutableArray;
	
	return [tMutableArray copy];
}

@end

@implementation NSMutableArray (WBExtensions)

- (void)WB_mergeWithArray:(NSArray *)inArray
{
	if (inArray==nil)
		return;
	
	[inArray enumerateObjectsUsingBlock:^(id bObject,__attribute__((unused))NSUInteger bIndex,__attribute__((unused))BOOL * bOutStop){
	
		if ([self containsObject:bObject]==NO)
			[self addObject:bObject];
		
	}];
}

@end


================================================
FILE: app_unexpectedly/Foundation + Extensions/NSDictionary+MutableDeepCopy.h
================================================
/*
 Copyright (c) 2017, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Foundation/Foundation.h>

@interface NSDictionary (WBMutableDeepCopy)

- (id)mutableDeepCopy;

@end


================================================
FILE: app_unexpectedly/Foundation + Extensions/NSDictionary+MutableDeepCopy.m
================================================
/*
 Copyright (c) 2017, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "NSDictionary+MutableDeepCopy.h"

@implementation NSDictionary (WBMutableDeepCopy)

- (id)mutableDeepCopy
{
	NSError * tError=nil;
	
	NSData * tData=[NSPropertyListSerialization dataWithPropertyList:self format:NSPropertyListXMLFormat_v1_0 options:0 error:&tError];
	
	if (tData==nil)
	{
		if (tError!=nil)
			NSLog(@"[NSDictionary mutableDeepCopy] : %@",tError.localizedDescription);
		
		return nil;
	}
	
	NSPropertyListFormat tFormat;
	NSMutableDictionary * tMutableDictionary=(NSMutableDictionary *) [NSPropertyListSerialization propertyListWithData:tData options:NSPropertyListMutableContainersAndLeaves format:&tFormat error:&tError];
	
	if (tMutableDictionary==nil)
	{
		if (tError!=nil)
			NSLog(@"[NSDictionary mutableDeepCopy] : %@",tError.localizedDescription);
	}
	
	return tMutableDictionary;
}

@end


================================================
FILE: app_unexpectedly/Foundation + Extensions/NSDictionary+WBExtensions.h
================================================

#import <Foundation/Foundation.h>

@interface NSDictionary (WBExtensions)

- (instancetype)WB_dictionaryByMappingKeysUsingBlock:(id (^)(id bKey,id bObject))inBlock;

- (instancetype)WB_dictionaryByMappingObjectsUsingBlock:(id (^)(id bKey,id bObject))inBlock;

- (instancetype)WB_dictionaryByMappingObjectsLenientlyUsingBlock:(id (^)(id bKey,id bObject))inBlock;

- (instancetype)WB_filteredDictionaryUsingBlock:(BOOL (^)(id bKey,id bObject))inBlock;

@end


================================================
FILE: app_unexpectedly/Foundation + Extensions/NSDictionary+WBExtensions.m
================================================

#import "NSDictionary+WBExtensions.h"

@implementation NSDictionary (WBExtensions)

- (instancetype)WB_dictionaryByMappingKeysUsingBlock:(id (^)(id bKey,id bObject))inBlock
{
	if (inBlock==nil)
		return self;
	
	__block NSMutableDictionary * tMutableDictionary=[NSMutableDictionary dictionary];
	
	[self enumerateKeysAndObjectsUsingBlock:^(id bKey, id bObject, BOOL *bOutStop) {
		id tKey=inBlock(bKey,bObject);
		
		if (tKey==nil)
		{
			*bOutStop=YES;
			tMutableDictionary=nil;
		}
		else
		{
			tMutableDictionary[tKey]=bObject;
		}
	}];
	
	if ([self isKindOfClass:NSMutableDictionary.class]==YES)
		return tMutableDictionary;
	
	return [tMutableDictionary copy];
}

- (instancetype)WB_dictionaryByMappingObjectsUsingBlock:(id (^)(id bKey,id bObject))inBlock
{
	if (inBlock==nil)
		return self;
	
	__block NSMutableDictionary * tMutableDictionary=[NSMutableDictionary dictionary];
	
	[self enumerateKeysAndObjectsUsingBlock:^(id bKey, id bObject, BOOL *bOutStop) {
		id tObject=inBlock(bKey,bObject);
		
		if (tObject==nil)
		{
			*bOutStop=YES;
			tMutableDictionary=nil;
		}
		else
		{
			tMutableDictionary[bKey]=tObject;
		}
	}];
	
	if ([self isKindOfClass:NSMutableDictionary.class]==YES)
		return tMutableDictionary;
	
	return [tMutableDictionary copy];
}

- (instancetype)WB_dictionaryByMappingObjectsLenientlyUsingBlock:(id (^)(id bKey,id bObject))inBlock
{
	if (inBlock==nil)
		return self;
	
	NSMutableDictionary * tMutableDictionary=[NSMutableDictionary dictionary];
	
	[self enumerateKeysAndObjectsUsingBlock:^(id bKey, id bObject,__attribute__((unused))BOOL *bOutStop) {
		id tObject=inBlock(bKey,bObject);
		
		if (tObject!=nil)
			tMutableDictionary[bKey]=tObject;
	}];
	
	if ([self isKindOfClass:NSMutableDictionary.class]==YES)
		return tMutableDictionary;
	
	return [tMutableDictionary copy];
}

- (instancetype)WB_filteredDictionaryUsingBlock:(BOOL (^)(id bKey,id bObject))inBlock
{
	if (inBlock==nil)
		return self;
	
	NSMutableDictionary * tMutableDictionary=[NSMutableDictionary dictionary];
	
	[self enumerateKeysAndObjectsUsingBlock:^(id bKey, id bObject,__attribute__((unused))BOOL *bOutStop) {
		BOOL tDoNotFilter=inBlock(bKey,bObject);
		
		if (tDoNotFilter==YES)
			tMutableDictionary[bKey]=bObject;
	}];
	
	if ([self isKindOfClass:NSMutableDictionary.class]==YES)
		return tMutableDictionary;
	
	return [tMutableDictionary copy];
}

@end


================================================
FILE: app_unexpectedly/Foundation + Extensions/NSIndexSet+Analysis.h
================================================
#import <Foundation/Foundation.h>

@interface NSIndexSet (Analysis)

- (BOOL)WB_containsOnlyOneRange;

@end


================================================
FILE: app_unexpectedly/Foundation + Extensions/NSIndexSet+Analysis.m
================================================
#import "NSIndexSet+Analysis.h"

@implementation NSIndexSet (Analysis)

- (BOOL)WB_containsOnlyOneRange
{
    NSUInteger tCount=self.count;
    
    if (tCount>0)
    {
        NSUInteger tFirstIndex=self.firstIndex;
        NSUInteger tLastIndex=self.lastIndex;
        
        return ((tLastIndex-tFirstIndex+1)==tCount);
    }
    
    return NO;
}

@end


================================================
FILE: app_unexpectedly/Foundation + Extensions/NSSet+WBExtensions.h
================================================
/*
 Copyright (c) 2017, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Foundation/Foundation.h>

@interface NSSet (WBExtensions)

- (instancetype)WB_setByMappingObjectsUsingBlock:(id (^)(id bObject))inBlock;

@end


================================================
FILE: app_unexpectedly/Foundation + Extensions/NSSet+WBExtensions.m
================================================
/*
 Copyright (c) 2017, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "NSSet+WBExtensions.h"

@implementation NSSet (WBExtensions)

- (instancetype)WB_setByMappingObjectsUsingBlock:(id (^)(id bObject))inBlock
{
	if (inBlock==nil)
		return self;
	
	__block NSMutableSet * tMutableSet=[NSMutableSet set];
	
	[self enumerateObjectsUsingBlock:^(id bObject,BOOL * bOutStop){
		
		id tObject=inBlock(bObject);
		
		if (tObject==nil)
		{
			*bOutStop=YES;
			tMutableSet=nil;
		}
		else
		{
			[tMutableSet addObject:tObject];
		}
		
	}];
	
	if ([self isKindOfClass:NSMutableSet.class]==YES)
		return tMutableSet;
	
	return [tMutableSet copy];
}

@end


================================================
FILE: app_unexpectedly/Foundation + Extensions/NSString+CPU.h
================================================
/*
 Copyright (c) 2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Foundation/Foundation.h>

@interface NSString (CPU)

- (cpu_type_t)CUI_CPUType;

@end



================================================
FILE: app_unexpectedly/Foundation + Extensions/NSString+CPU.m
================================================
/*
 Copyright (c) 2021-2024, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "NSString+CPU.h"

@implementation NSString (CPU)

- (cpu_type_t)CUI_CPUType
{
    static NSDictionary * sCPUFamiliesRegistry=nil;
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        
        sCPUFamiliesRegistry=@{
                               @"X86-64":@(CPU_TYPE_X86_64),
                               @"x86_64":@(CPU_TYPE_X86_64),
                               @"ARM-64":@(CPU_TYPE_ARM64),
                               @"arm64":@(CPU_TYPE_ARM64),
                               };
        
    });
    
    NSNumber * tCPUFamily=sCPUFamiliesRegistry[self];
    
    return (tCPUFamily!=nil) ? [tCPUFamily intValue] : CPU_TYPE_X86;
}

@end


================================================
FILE: app_unexpectedly/RSCore/LICENSE.txt
================================================
MIT License

Copyright (c) 2002-2025 Brent Simmons

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: app_unexpectedly/RSCore/NSMenuItem+RSCore.h
================================================
//
//  NSMenuItem+RSCore.h
//  RSCore
//
//  Created by Brent Simmons on 1/5/26.
//

#if TARGET_OS_MAC && !TARGET_OS_IPHONE

@import AppKit;

@interface NSMenuItem (RSCore)

/// When YES, the menu item’s image will be shown (if it exists) despite icon disabling.
/// Defaults to NO.
@property (nonatomic, assign) BOOL rs_shouldShowImage;

/// Disables icons in all menu items (except where `rs_shouldShowImage == YES`)
/// and those that are likely toolbar item representations.
///
/// Call +[NSMenuItem rs_disableIcons] early (from AppDelegate init is good).
+ (void)rs_disableIcons;

@end

#endif


================================================
FILE: app_unexpectedly/RSCore/NSMenuItem+RSCore.m
================================================
//
//  NSMenuItem+RSCore.m
//  RSCore
//
//  Created by Brent Simmons on 1/7/26.
//

#if TARGET_OS_MAC && !TARGET_OS_IPHONE

#import "NSMenuItem+RSCore.h"
#import <objc/runtime.h>

static void *kShouldShowImageKey = &kShouldShowImageKey;

@implementation NSMenuItem (RSCore)

+ (void)rs_disableIcons {

	Method originalMethod = class_getInstanceMethod(self, @selector(image));
	Method swizzledMethod = class_getInstanceMethod(self, @selector(rs_swizzledImage));

	if (originalMethod && swizzledMethod) {
		method_exchangeImplementations(originalMethod, swizzledMethod);
	}
}

- (NSImage *)rs_swizzledImage {

	if (self.rs_shouldShowImage || [self rs_isToolbarItemRepresentation] || ![self rs_isMainMenuItem] || self.title.length < 1) {
		// Call the original getter (now swapped to rs_swizzledImage)
		return [self rs_swizzledImage];
	}
	return nil;
}

- (BOOL)rs_isToolbarItemRepresentation {

	// Menu items not attached to any menu are likely toolbar button representations
	return self.menu == nil;
}

- (BOOL)rs_isMainMenuItem {

	// Return true if the parent menu is the main menu.
	// This allows images to show for (for instance) the traffic light menus
	// and for menu items in submenus such as Move & Resize and Full Screen Tile.
	return self.menu.supermenu == NSApplication.sharedApplication.mainMenu;
}

- (BOOL)rs_shouldShowImage {

	NSNumber *value = objc_getAssociatedObject(self, kShouldShowImageKey);
	return value.boolValue;
}

- (void)setRs_shouldShowImage:(BOOL)shouldShowImage {

	objc_setAssociatedObject(self, kShouldShowImageKey, @(shouldShowImage), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

@end

#endif


================================================
FILE: app_unexpectedly/app_unexpectedly/AppDelegate.h
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Cocoa/Cocoa.h>

@interface AppDelegate : NSObject 

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/AppDelegate.m
================================================
/*
 Copyright (c) 2020-2024, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "AppDelegate.h"

#import "CUIBinaryImage.h"

#import "CUIMainWindowController.h"

#import "CUICrashLogsSourcesManager.h"

#import "CUICrashLogsSourceAll.h"

#import "CUICrashLogsSourceFile.h"

#import "CUICrashLogsSourcesSelection.h"

#import "CUICrashLogsSelection.h"

#import "CUICallStackBacktrace.h"

#import "CUIApplicationPreferences.h"

#import "CUIThemesManager.h"

#import "CUIPreferencesWindowController.h"
#import "CUIPreferencesWindowController+Convenience.h"

#import "CUIRegistersWindowController.h"

#import "CUIdSYMBundlesManager.h"

#import "CUIAboutBoxWindowController.h"

#import "CUICrashReporterDefaults.h"

#import "CUICrashLogsOpenErrorRecord.h"

#import "CUICrashLogsOpenErrorPanel.h"

#import "WBRemoteVersionChecker.h"

#import "NSMenuItem+RSCore.h"


NSString * const CUIApplicationShowDebugMenuKey=@"ui.menu.debug.show";

NSString * const CUIApplicationShowDebugDidChangeNotification=@"CUIApplicationShowDebugDidChangeNotification";

@interface AppDelegate () <NSApplicationDelegate,NSMenuItemValidation>
{
    IBOutlet NSMenu * _themesMenu;
    
    IBOutlet NSMenuItem * _debugMenuBarItem;
    
	CUIMainWindowController * _mainWindowController;
}

- (IBAction)showAboutBox:(id)sender;

- (IBAction)showPreferences:(id)sender;

- (IBAction)editThemes:(id)sender;

// Help Menu

- (IBAction)showUserGuide:(id)sender;

- (IBAction)sendFeedback:(id)sender;

- (IBAction)showUnexpectedlyWebSite:(id)sender;

// Notifications

- (void)themesListDidChange:(NSNotification *)inNotification;

- (void)showDebugMenuDidChange:(NSNotification *)inNotification;

@end

@implementation AppDelegate

+ (void)initialize
{
    [[NSUserDefaults standardUserDefaults] registerDefaults:@{
                                                              CUIApplicationShowDebugMenuKey:@(NO),
                                                              @"NSScrollViewShouldFlipRulerForRTL":@(NO)
                                                              }];
	
	[NSMenuItem rs_disableIcons];
}

- (void)awakeFromNib
{
    [self refreshThemesMenu];
    
    NSUserDefaults * tUserDefaults=[NSUserDefaults standardUserDefaults];
    
    if ([tUserDefaults boolForKey:CUIApplicationShowDebugMenuKey]==YES)
        _debugMenuBarItem.hidden=NO;
    
    // Register for notifications
    
    NSNotificationCenter * tNotificationCenter=NSNotificationCenter.defaultCenter;
    
    [tNotificationCenter addObserver:self selector:@selector(themesListDidChange:) name:CUIThemesManagerThemesListDidChangeNotification object:nil];
    
    [tNotificationCenter addObserver:self selector:@selector(showDebugMenuDidChange:) name:CUIApplicationShowDebugDidChangeNotification object:nil];
}

#pragma mark -

- (void)refreshThemesMenu
{
    // Cleanup menu
    
    NSUInteger tMenuItemsCount=_themesMenu.numberOfItems;
    
    if (tMenuItemsCount>2)
    {
        for(NSUInteger tIndex=tMenuItemsCount-2;tIndex>0;tIndex--)
        {
            [_themesMenu removeItemAtIndex:tIndex-1];
        }
    }
    
    // Populate menu
    
    CUIThemesManager * tThemesManager=[CUIThemesManager sharedManager];
    
    NSArray * tThemes=[tThemesManager allThemes];
    
	SEL selector=NSSelectorFromString(@"CUI_MENUACTION_switchTheme:");
	
    [tThemes enumerateObjectsWithOptions:NSEnumerationReverse  usingBlock:^(CUITheme * bTheme, NSUInteger bIndex, BOOL * bOutStop) {
        
        NSMenuItem * tMenuItem=[[NSMenuItem alloc] initWithTitle:bTheme.name action:selector keyEquivalent:@""];
        
        tMenuItem.representedObject=bTheme.UUID;
        
        [self->_themesMenu insertItem:tMenuItem atIndex:0];
        
    }];
}



#pragma mark -

- (BOOL)validateMenuItem:(NSMenuItem *)inMenuItem
{
    SEL tAction=inMenuItem.action;
    
    if (tAction==@selector(switchCrashReporterDialogType:))
    {
        CUICrashReporterDefaults * tDefaults=[CUICrashReporterDefaults standardCrashReporterDefaults];
        
        inMenuItem.state=(tDefaults.dialogType==inMenuItem.tag) ? NSControlStateValueOn : NSControlStateValueOff;
        
        return YES;
    }
    
    if (tAction==@selector(switchCrashReporterNotificationMode:))
    {
        CUICrashReporterDefaults * tDefaults=[CUICrashReporterDefaults standardCrashReporterDefaults];
        
        inMenuItem.state=(tDefaults.notificationMode==inMenuItem.tag) ? NSControlStateValueOn : NSControlStateValueOff;
        
        return YES;
    }
    
    if (tAction==@selector(switchReportUncaughtException:))
    {
        CUICrashReporterDefaults * tDefaults=[CUICrashReporterDefaults standardCrashReporterDefaults];
        
        inMenuItem.state=(tDefaults.reportUncaughtExceptions==YES) ? NSControlStateValueOn : NSControlStateValueOff;
    }
    
    return YES;
}

// Application Menu

- (IBAction)showAboutBox:(id)sender
{
    [CUIAboutBoxWindowController showAbouxBox];
}

- (IBAction)showPreferences:(id)sender
{
    CUIPreferencesWindowController * tPreferencesWindowController=[CUIPreferencesWindowController sharedPreferencesWindowController];
    
    [tPreferencesWindowController showWindow:nil];
}

- (IBAction)editThemes:(id)sender
{
    CUIPreferencesWindowController * tPreferencesWindowController=[CUIPreferencesWindowController sharedPreferencesWindowController];
    
    [tPreferencesWindowController showFontsAndColorsPrefPane];
}

// Windows Menu

// Help Menu

- (IBAction)showUserGuide:(id)sender
{
    NSURL * tURL=[NSURL URLWithString:NSLocalizedString(@"http://s.sudre.free.fr/Software/documentation/Unexpectedly/index.html",@"No comment")];
    
    if (tURL!=nil)
        [[NSWorkspace sharedWorkspace] openURL:tURL];
}

- (IBAction)sendFeedback:(id)sender
{
    NSDictionary * tDictionary=[NSBundle mainBundle].infoDictionary;
    
    NSString * tString=[NSString stringWithFormat:NSLocalizedString(@"mailto:dev.unexpectedly@gmail.com?subject=[Unexpectedly%%20%@]%%20Feedback%%20(build%%20%@)",@"No comment"),tDictionary[@"CFBundleShortVersionString"],
                        tDictionary[@"CFBundleVersion"]];
    NSURL * tURL=[NSURL URLWithString:tString];
    
    if (tURL!=nil)
        [[NSWorkspace sharedWorkspace] openURL:tURL];
}

- (IBAction)showUnexpectedlyWebSite:(id)sender
{
    NSURL * tURL=[NSURL URLWithString:NSLocalizedString(@"http://s.sudre.free.fr/Software/Unexpectedly/about.html",@"No comment")];
    
    if (tURL!=nil)
        [[NSWorkspace sharedWorkspace] openURL:tURL];
}

// Debug Menu

- (IBAction)switchCrashReporterDialogType:(NSMenuItem *)sender
{
    CUICrashReporterDefaults * tDefaults=[CUICrashReporterDefaults standardCrashReporterDefaults];
    
    tDefaults.dialogType=sender.tag;
}

- (IBAction)switchCrashReporterNotificationMode:(NSMenuItem *)sender
{
    CUICrashReporterDefaults * tDefaults=[CUICrashReporterDefaults standardCrashReporterDefaults];
    
    tDefaults.notificationMode=sender.tag;
}

- (IBAction)switchReportUncaughtException:(NSMenuItem *)sender
{
    CUICrashReporterDefaults * tDefaults=[CUICrashReporterDefaults standardCrashReporterDefaults];
    
    tDefaults.reportUncaughtExceptions=!(tDefaults.reportUncaughtExceptions);
}

#pragma mark - NSApplicationDelegate

- (void)application:(NSApplication *)sender openFiles:(NSArray<NSString *> *)inFilePaths
{
    NSMutableArray<CUICrashLogsOpenErrorRecord *> * tOpenErrorsArray=[NSMutableArray array];
    
    for(NSString * tFilePath in inFilePaths)
    {
        BOOL tIsDirectory=NO;
        
        if ([[NSFileManager defaultManager] fileExistsAtPath:tFilePath isDirectory:&tIsDirectory]==NO)
        {
            continue;
        }
        
        if (tIsDirectory==NO)
        {
            CUICrashLogsSourcesManager * tSourcesManager=[CUICrashLogsSourcesManager sharedManager];
            CUICrashLogsSourcesSelection * tSharedSourcesSelection=[CUICrashLogsSourcesSelection sharedSourcesSelection];
            
            CUICrashLogsSourceAll * tSourcesAll=[CUICrashLogsSourceAll crashLogsSourceAll];
            
            if ([tSourcesAll containsCrashLogForFileAtPath:tFilePath]==YES)
            {
                NSArray * tCrashLogSources=[tSourcesManager sourcesOfTypes:[NSSet setWithObjects:@(CUICrashLogsSourceTypeStandardDirectory),@(CUICrashLogsSourceTypeDirectory),@(CUICrashLogsSourceTypeFile),nil]];
                
                for(CUICrashLogsSource * tSource in tCrashLogSources)
                {
                    CUIRawCrashLog * tCrashLog=[tSource crashLogForFileAtPath:tFilePath];
                    
                    if (tCrashLog!=nil)
                    {
                        tSharedSourcesSelection.sources=[NSSet setWithObject:tSource];
                        
                        [[CUICrashLogsSelection sharedSelection] setSource:tSource crashLogs:@[tCrashLog]];
                        
                        break;
                    }
                }
               
                continue;
            }
            
            NSError * tError;
            
            CUICrashLogsSourceFile * tSource=[[CUICrashLogsSourceFile alloc] initWithContentsOfFileSystemItemAtPath:tFilePath error:&tError];
            
            if (tSource==nil)
            {
                if (tError!=nil)
                {
                    if ([tError.domain isEqualToString:IPSErrorDomain]==YES)
                    {
                        switch(tError.code)
                        {
                            case IPSUnsupportedBugTypeError:
                                
                                // Open file in Console.app
                                
                                if ([[NSWorkspace sharedWorkspace] openFile:tFilePath withApplication:@"/Applications/Utilities/Console.app"]==YES)
                                {
                                    return;
                                }
                                
                                break;
                        }
                    }
                }
                
                CUICrashLogsOpenErrorRecord * tRecord=[CUICrashLogsOpenErrorRecord new];
                tRecord.sourceURL=[NSURL fileURLWithPath:tFilePath];
                tRecord.openError=tError;
                
                [tOpenErrorsArray addObject:tRecord];
                
                continue;
            }
            
            [tSourcesManager addSources:@[tSource]];
            
            tSharedSourcesSelection.sources=[NSSet setWithObject:tSource];
            
            [[CUICrashLogsSelection sharedSelection] setSource:tSource crashLogs:tSource.crashLogs];
        }
        else
        {
            CUIdSYMBundle * tBundle=[[CUIdSYMBundle alloc] initWithPath:tFilePath];
        
            if (tBundle.isDSYMBundle==NO)
                continue;
            
            [[CUIdSYMBundlesManager sharedManager] addBundle:tBundle];
        }
    }
    
    if (tOpenErrorsArray.count>0)
    {
        CUICrashLogsOpenErrorPanel * tErrorPanel=[CUICrashLogsOpenErrorPanel crashLogsOpenErrorPanel];
        
        tErrorPanel.errors=tOpenErrorsArray;
        
        [tErrorPanel runModal];
    }
    
    [NSApp replyToOpenOrPrint:NSApplicationDelegateReplySuccess];
}

- (BOOL)application:(NSApplication *)sender openFile:(NSString *)inFilePath
{
    BOOL tIsDirectory=NO;
    
    if ([[NSFileManager defaultManager] fileExistsAtPath:inFilePath isDirectory:&tIsDirectory]==NO)
    {
        return NO;
    }
    
    if (tIsDirectory==NO)
    {
        CUICrashLogsSourcesManager * tSourcesManager=[CUICrashLogsSourcesManager sharedManager];
        CUICrashLogsSourcesSelection * tSharedSourcesSelection=[CUICrashLogsSourcesSelection sharedSourcesSelection];
        
        CUICrashLogsSourceAll * tSourcesAll=[CUICrashLogsSourceAll crashLogsSourceAll];
        
        if ([tSourcesAll containsCrashLogForFileAtPath:inFilePath]==YES)
        {
            NSArray * tCrashLogSources=[tSourcesManager sourcesOfTypes:[NSSet setWithObjects:@(CUICrashLogsSourceTypeStandardDirectory),@(CUICrashLogsSourceTypeDirectory),@(CUICrashLogsSourceTypeFile),nil]];
            
            for(CUICrashLogsSource * tSource in tCrashLogSources)
            {
                CUIRawCrashLog * tCrashLog=[tSource crashLogForFileAtPath:inFilePath];
                
                if (tCrashLog!=nil)
                {
                    tSharedSourcesSelection.sources=[NSSet setWithObject:tSource];
                    
                    [[CUICrashLogsSelection sharedSelection] setSource:tSource crashLogs:@[tCrashLog]];
                    
                    break;
                }
            }
            return YES;
        }
        
        NSError * tError;
        
        CUICrashLogsSourceFile * tSource=[[CUICrashLogsSourceFile alloc] initWithContentsOfFileSystemItemAtPath:inFilePath error:&tError];
        
        if (tSource==nil)
        {
            NSLog(@"Unable to create Source from file at \"%@\"",inFilePath);
            
            return NO;
        }
        
        [tSourcesManager addSources:@[tSource]];
        
        tSharedSourcesSelection.sources=[NSSet setWithObject:tSource];
        
        [[CUICrashLogsSelection sharedSelection] setSource:tSource crashLogs:tSource.crashLogs];
    }
    else
    {
        CUIdSYMBundle * tBundle=[[CUIdSYMBundle alloc] initWithPath:inFilePath];
        
        if (tBundle.isDSYMBundle==NO)
            return NO;
        
        [[CUIdSYMBundlesManager sharedManager] addBundle:tBundle];
    }
    
    return YES;
}

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
    [WBRemoteVersionChecker sharedChecker];
    
    _mainWindowController=[CUIMainWindowController new];
    
    //NSLog(@"%@",_mainWindowController.window.frameAutosaveName);
	
	[_mainWindowController showWindow:self];
}

- (void)applicationWillTerminate:(NSNotification *)aNotification
{
	// Insert code here to tear down your application
}

#pragma mark - Notifications

- (void)themesListDidChange:(NSNotification *)inNotification
{
    [self refreshThemesMenu];
}

- (void)showDebugMenuDidChange:(NSNotification *)inNotification
{
    NSUserDefaults * tUserDefaults=[NSUserDefaults standardUserDefaults];
    
    _debugMenuBarItem.hidden=([tUserDefaults boolForKey:CUIApplicationShowDebugMenuKey]==NO);
}

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIAATextFieldCell.h
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Cocoa/Cocoa.h>

@interface CUIAATextFieldCell : NSTextFieldCell

    @property BOOL selected;

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIAATextFieldCell.m
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "CUIAATextFieldCell.h"

void CGContextSetFontSmoothingBackgroundColor(CGContextRef,CGColorRef);

@implementation CUIAATextFieldCell

- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
{
    CGContextRef tContextRef=[NSGraphicsContext currentContext].CGContext;
    
    CGContextSetFontSmoothingBackgroundColor(tContextRef,self.backgroundColor.CGColor);
    
    CGContextSetShouldSmoothFonts(tContextRef,TRUE);
    CGContextSetAllowsFontSmoothing(tContextRef,TRUE);
    
    CGContextSetShouldSubpixelQuantizeFonts(tContextRef,TRUE);
    CGContextSetAllowsFontSubpixelQuantization(tContextRef,TRUE);
    
    [super drawInteriorWithFrame:cellFrame inView:controlView];
}

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIAboutBoxFooterView.h
================================================
/*
Copyright (c) 2007-2016, Stephane Sudre
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <Cocoa/Cocoa.h>

@interface CUIAboutBoxFooterView : NSView

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIAboutBoxFooterView.m
================================================
/*
Copyright (c) 2007-2018, Stephane Sudre
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import "CUIAboutBoxFooterView.h"

@implementation CUIAboutBoxFooterView

- (void)drawRect:(NSRect)inRect
{
    NSRect tRefreshRect=NSIntersectionRect(self.bounds, inRect);
    
	// Draw background
	
    BOOL tIsDarkMode=[self WB_isEffectiveAppearanceDarkAqua];
    
	if (tIsDarkMode==NO)
		[[NSColor colorWithDeviceWhite:0.898 alpha:1.0] set];
	else
		[[NSColor colorWithDeviceWhite:0.0 alpha:0.18] set];
	
	NSRectFillUsingOperation(tRefreshRect,NSCompositingOperationSourceOver);
	
	// Draw top line
	
	if (tIsDarkMode==NO)
		[[NSColor colorWithDeviceWhite:0.698 alpha:1.0] set];
	else
		[[NSColor colorWithDeviceWhite:0.42 alpha:0.35] set];
	
	NSRect tLineRect;
	
	if (tIsDarkMode==NO)
		tLineRect=NSMakeRect(NSMinX(tRefreshRect),NSMaxY(tRefreshRect)-1.0,NSWidth(tRefreshRect),1.0);
	else
		tLineRect=NSMakeRect(NSMinX(tRefreshRect)+1.0,NSMaxY(tRefreshRect)-1.0,NSWidth(tRefreshRect)-3.0,1.0);
		
	NSRectFillUsingOperation(tLineRect,NSCompositingOperationSourceOver);
}

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIAboutBoxWindow.h
================================================
//
//  CUIAboutBoxWindow.h
//  Unexpectedly
//
//  Created by stephane on 09/04/2021.
//  Copyright © 2021 Acme, Inc. All rights reserved.
//

#import <Cocoa/Cocoa.h>

extern NSString * const CUIOptionKeyStateDidChangeNotification;

extern NSString * const CUIOptionKeyState;

@interface CUIAboutBoxWindow : NSWindow

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIAboutBoxWindow.m
================================================
//
//  CUIAboutBoxWindow.m
//  Unexpectedly
//
//  Created by stephane on 09/04/2021.
//  Copyright © 2021 Acme, Inc. All rights reserved.
//

#import "CUIAboutBoxWindow.h"

NSString * const CUIOptionKeyStateDidChangeNotification=@"CUIOptionKeyStateDidChangeNotification";

NSString * const CUIOptionKeyState=@"CUIOptionKeyState";

@interface CUIAboutBoxWindow ()
{
    BOOL _optionKeyDown;
}

@end

@implementation CUIAboutBoxWindow

- (void)becomeKeyWindow
{
    NSEvent * tEvent=[NSApp currentEvent];
    
    if (tEvent!=nil)
    {
        NSUInteger tModifierFlags=tEvent.modifierFlags;
        
        BOOL isDown=((tModifierFlags & NSEventModifierFlagOption) == NSEventModifierFlagOption);
        
        if (isDown!=_optionKeyDown)
        {
            _optionKeyDown=isDown;
            
            [NSNotificationCenter.defaultCenter postNotificationName:CUIOptionKeyStateDidChangeNotification
                                                              object:self
                                                            userInfo:@{CUIOptionKeyState:@(_optionKeyDown)}];
        }
    }
    
    [super becomeKeyWindow];
}

- (void)resignKeyWindow
{
    if (_optionKeyDown==YES)
    {
        _optionKeyDown=NO;
        
        // Post Notification
        
        [NSNotificationCenter.defaultCenter postNotificationName:CUIOptionKeyStateDidChangeNotification
                                                          object:self
                                                        userInfo:@{CUIOptionKeyState:@(_optionKeyDown)}];
    }
    
    [super resignKeyWindow];
}

- (void)flagsChanged:(NSEvent *)inEvent
{
    if (inEvent==nil)
        return;
    
    NSUInteger tModifierFlags=inEvent.modifierFlags;
    
    BOOL isDown=((tModifierFlags & NSEventModifierFlagOption) == NSEventModifierFlagOption);
    
    if (isDown!=_optionKeyDown)
    {
        _optionKeyDown=isDown;
        
        // Post Notification
        
        [NSNotificationCenter.defaultCenter postNotificationName:CUIOptionKeyStateDidChangeNotification
                                                          object:self
                                                        userInfo:@{CUIOptionKeyState:@(_optionKeyDown)}];
    }
}

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIAboutBoxWindowController.h
================================================
//
//  CUIAboutBoxWindowController.h
//  Unexpectedly
//
//  Created by stephane on 15/11/2020.
//  Copyright © 2020 Stephane Sudre All rights reserved.
//

#import <Cocoa/Cocoa.h>

@interface CUIAboutBoxWindowController : NSWindowController

+ (void)showAbouxBox;

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIAboutBoxWindowController.m
================================================
//
//  CUIAboutBoxWindowController.m
//  Unexpectedly
//
//  Created by stephane on 15/11/2020.
//  Copyright © 2020 Stephane Sudre. All rights reserved.
//

#import "CUIAboutBoxWindowController.h"

#import "CUIAboutBoxWindow.h"
#import "CUIApplicationIconView.h"

@interface CUIAboutBoxWindowController ()
{
    IBOutlet CUIApplicationIconView * _applicationIconView;

    IBOutlet NSTextField * _versionLabel;
}

- (IBAction)showLicenseAgreement:(id)sender;

- (IBAction)showAcknowledgments:(id)sender;

// Notifications

- (void)optionKeyStateDidChange:(NSNotification *)inNotification;

@end

@implementation CUIAboutBoxWindowController

+ (void)showAbouxBox
{
    static dispatch_once_t onceToken;
    static CUIAboutBoxWindowController * sAbouxBoxWindowController=nil;
    
    dispatch_once(&onceToken, ^{
        
        sAbouxBoxWindowController=[CUIAboutBoxWindowController new];
    });
    
    [sAbouxBoxWindowController showWindow:nil];
}

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

#pragma mark -

- (NSString *)windowNibName
{
    return @"CUIAboutBoxWindowController";
}

#pragma mark -

- (void)windowDidLoad
{
    NSDictionary * tDictionary=[NSBundle mainBundle].infoDictionary;
    
    _versionLabel.stringValue=[NSString stringWithFormat:NSLocalizedString(@"version %@ (%@)",@""),tDictionary[@"CFBundleShortVersionString"],tDictionary[@"CFBundleVersion"]];
    
    // Register for notifications
    
    [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(optionKeyStateDidChange:) name:CUIOptionKeyStateDidChangeNotification object:self.window];
    
    [self.window center];
}

#pragma mark -

- (IBAction)showLicenseAgreement:(id)sender
{
    NSString * tPath=[[NSBundle mainBundle] pathForResource:@"Unexpectedly_License" ofType:@"pdf"];
    
    if (tPath==nil)
    {
        NSLog(@"[CUIAboutBoxWindowController showLicenseAgreement:] Missing License file");
        return;
    }
    
    [[NSWorkspace sharedWorkspace] openURL:[NSURL fileURLWithPath:tPath]];
}

- (IBAction)showAcknowledgments:(id)sender
{
    NSString * tPath=[[NSBundle mainBundle] pathForResource:@"Unexpectedly_Acknowledgements" ofType:@"pdf"];
    
    if (tPath==nil)
    {
        NSLog(@"[CUIAboutBoxWindowController showAcknowledgments:] Missing Acknowledgements file");
        return;
    }
    
    [[NSWorkspace sharedWorkspace] openURL:[NSURL fileURLWithPath:tPath]];
}

#pragma mark - Notifications

- (void)optionKeyStateDidChange:(NSNotification *)inNotification
{
    BOOL tPressed=[inNotification.userInfo[CUIOptionKeyState] boolValue];
    
    _applicationIconView.renderingMode=(tPressed==YES) ? CUIWatchRenderingModeWireframe : CUIWatchRenderingModeFull; 
}

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIApplicationItemAttributes.h
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */


#import <Cocoa/Cocoa.h>

@interface CUIApplicationItemAttributes : NSObject

    @property (readonly) NSURL * applicationURL;

    @property NSString * displayName;

    @property NSString * bundleIdentifier;

    @property NSImage * icon;

    @property NSString * version;

    @property (nonatomic,readonly) NSMenuItem * applicationMenuItem;

    @property BOOL showsVersion;

    @property BOOL duplicate;

- (instancetype)initWithURL:(NSURL *)inApplicationURL;

- (NSComparisonResult)compare:(CUIApplicationItemAttributes *)inOther;

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIApplicationItemAttributes.m
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */


#import "CUIApplicationItemAttributes.h"

@implementation CUIApplicationItemAttributes

- (instancetype)initWithURL:(NSURL *)inApplicationURL
{
    if (inApplicationURL.isFileURL==NO)
        return nil;
    
    self=[super init];
    
    if (self!=nil)
    {
        _applicationURL=inApplicationURL;
        
        _icon=[[NSWorkspace sharedWorkspace] iconForFile:inApplicationURL.path];
        
        if (_icon!=nil)
            _icon.size=NSMakeSize(16.0f,16.0f);
        
        _displayName=[[NSFileManager defaultManager] displayNameAtPath:inApplicationURL.path];
        
        // Get Version
        
        NSBundle * tBundle=[NSBundle bundleWithURL:inApplicationURL];
        NSString * tVersion=@"1.0";
        
        if (tBundle!=nil)
        {
            _bundleIdentifier=tBundle.bundleIdentifier;
            
            NSDictionary * tInfoDictionary;
            
            tInfoDictionary=[tBundle infoDictionary];
            
            if (tInfoDictionary!=nil)
            {
                tVersion=[tInfoDictionary objectForKey:@"CFBundleShortVersionString"];
                
                if (tVersion==nil)
                {
                    tVersion=@"1.0";
                }
            }
        }
        
        _version=tVersion;
    }
    
    return self;
}

#pragma mark -

- (NSMenuItem *)applicationMenuItem
{
    NSString * tTitle=(self.showsVersion==YES) ? [NSString stringWithFormat:@"%@ (%@)",self.displayName,self.version] : self.displayName;
    
    NSMenuItem * tMenuItem=[[NSMenuItem alloc] initWithTitle:tTitle
                                                      action:nil
                                               keyEquivalent:@""];
    
    tMenuItem.image=self.icon;
    tMenuItem.representedObject=self;
    
    return tMenuItem;
}

#pragma mark -

- (NSComparisonResult)compare:(CUIApplicationItemAttributes *)inOther
{
    NSComparisonResult tResult=NSOrderedSame;
    
    if ([self.bundleIdentifier isEqualToString:inOther.bundleIdentifier]==YES)
    {
        self.showsVersion=YES;
        inOther.showsVersion=YES;
    }
    else
    {
        tResult=[self.displayName caseInsensitiveCompare:inOther.displayName];
    }
    
    if (tResult!=NSOrderedSame)
        return tResult;
    
    // Compare version
    
    tResult=[self.version caseInsensitiveCompare:inOther.version];
    
    if (tResult==NSOrderedSame)
    {
        if ([self.applicationURL.path hasPrefix:@"/Volumes/"]==YES)
            self.duplicate=YES;
        else
            inOther.duplicate=YES;
    }
    
    return -tResult;
}

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIApplicationPreferences+Themes.h
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "CUIApplicationPreferences.h"

@interface CUIApplicationPreferences (Themes)

+ (NSString *)groupIdentifierForPresentationMode:(CUIPresentationMode)inPresentationMode;

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIApplicationPreferences+Themes.m
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "CUIApplicationPreferences+Themes.h"

@implementation CUIApplicationPreferences (Themes)

+ (NSString *)groupIdentifierForPresentationMode:(CUIPresentationMode)inPresentationMode
{
    switch (inPresentationMode)
    {
        case CUIPresentationModeText:
            
            return @"Text";
        
        case CUIPresentationModeOutline:
            
            return @"Outline";
        
        default:
            break;
    }
    
    return nil;
}

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIApplicationPreferences.h
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Cocoa/Cocoa.h>

#import "CUITextModeDisplaySettings.h"

#import "CUIOutlineModeDisplaySettings.h"

typedef NS_ENUM(NSInteger, CUIPresentationMode)
{
    CUIPresentationModeUnknown=-1,
    CUIPresentationModeText=0,
    CUIPresentationModeOutline,
};

typedef NS_ENUM(NSUInteger, CUICrashLogsSortType)
{
    CUICrashLogsSortDateDescending=0,
    CUICrashLogsSortProcessNameAscending
};

@interface CUIApplicationPreferences : NSObject

    // General

    @property (nonatomic) CUIPresentationMode defaultPresentationMode;

    @property (nonatomic) BOOL showsRegistersWindowAutomaticallyAtLaunch;

    @property (nonatomic) NSURL * preferedSourceCodeEditorURL;

    // Text Mode

    @property (nonatomic) BOOL showsLineNumbers;

    @property (nonatomic) BOOL lineWrapping;

    @property (nonatomic) CUITextModeDisplaySettings * defaultTextModeDisplaySettings;

    // Outline Mode

    @property (nonatomic) CUIOutlineModeDisplaySettings * defaultOutlineModeDisplaySettings;

    // Fonts and Colors


    // Symbolication

    @property (nonatomic) BOOL symbolicateAutomatically;

    @property (nonatomic) BOOL searchForSymbolsFilesAutomatically;

    // Crash Logs List

    @property (nonatomic) CUICrashLogsSortType crashLogsSortType;

    @property (nonatomic) BOOL crashLogsShowFileNames;


+ (CUIApplicationPreferences *)sharedPreferences;

+ (NSURL *)defaultSourceCodeEditorURL;

@end

extern NSString * const CUIPreferencesTextModeShowsLineNumbersDidChangeNotification;

extern NSString * const CUIPreferencesTextModeLineWrappingDidChangeNotification;

extern NSString * const CUIPreferencesSymbolicationSymbolicateAutomaticallyDidChangeNotification;

extern NSString * const CUIPreferencesCrashLogsSortTypeDidChangeNotification;

extern NSString * const CUIPreferencesCrashLogsShowFileNamesDidChangeNotification;


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIApplicationPreferences.m
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "CUIApplicationPreferences.h"

#import "NSDictionary+MutableDeepCopy.h"

#import "NSColor+String.h"

// General

NSString * const CUIPreferencesGeneralDefaultPresentationModeKey=@"general.defaultPresentationMode";

NSString * const CUIPreferencesGeneralShowsRegistersWindowAtLaunchKey=@"general.registers-window.showsAtLaunch";

NSString * const CUIPreferencesGeneralPreferedSourceCodeEditorPathKey=@"general.preferedSourceCodeEditor.path";

// Text Mode

NSString * const CUIPreferencesTextModeDefaultDisplaySettings=@"textmode.displaySettings.defaults";

NSString * const CUIPreferencesTextModeShowsLineNumbersKey=@"textmode.showsLineNumbers";

NSString * const CUIPreferencesTextModeLineWrappingKey=@"textmode.lineWrapping";


extern NSString * const CUITextModeDisplaySettingsVisibleSectionKey;

extern NSString * const CUITextModeDisplaySettingsVisibleStackFrameComponentsKey;


// Outline Mode

NSString * const CUIPreferencesOutlineModeDefaultDisplaySettings=@"outlinemode.displaySettings.defaults";

extern NSString * const CUIOutlineModeDisplaySettingsShowOnlyCrashedThreadKey;

extern NSString * const CUIOutlineModeDisplaySettingsVisibleStackFrameComponentsKey;

// Fonts & Colors


// Symbolication

NSString * const CUIPreferencesSymbolicationSearchSymbolsFilesKey=@"symbolication.searchForSymbolsFiles";

NSString * const CUIPreferencesSymbolicationSymbolicateAutomaticallyKey=@"symbolication.symbolicateAutomatically";


// Crash Logs List

NSString * const CUIPreferencesCrashLogsShowFileNamesKey=@"showFileNames";

NSString * const CUIPreferencesCrashLogsSortTypeKey=@"crashLogs.list.sort";

// Notifications



NSString * const CUIPreferencesTextModeShowsLineNumbersDidChangeNotification=@"CUIPreferencesTextModeShowsLineNumbersDidChangeNotification";

NSString * const CUIPreferencesTextModeLineWrappingDidChangeNotification=@"CUIPreferencesTextModeLineWrappingDidChangeNotification";

NSString * const CUIPreferencesSymbolicationSymbolicateAutomaticallyDidChangeNotification=@"CUIPreferencesSymbolicationSymbolicateAutomaticallyDidChangeNotification";


NSString * const CUIPreferencesCrashLogsSortTypeDidChangeNotification=@"CUIPreferencesCrashLogsSortTypeDidChangeNotification";

NSString * const CUIPreferencesCrashLogsShowFileNamesDidChangeNotification=@"CUIPreferencesCrashLogsShowFileNamesDidChangeNotification";

@interface CUIApplicationPreferences ()
{
    NSUserDefaults * _defaults;
}

@end

@implementation CUIApplicationPreferences

+ (CUIApplicationPreferences *)sharedPreferences
{
    static dispatch_once_t onceToken;
    static CUIApplicationPreferences * sPreferences=nil;
    
    dispatch_once(&onceToken, ^{
        
        sPreferences=[CUIApplicationPreferences new];
    });
    
    return sPreferences;
}

+ (NSURL *)defaultSourceCodeEditorURL
{
    return (__bridge_transfer NSURL *)LSCopyDefaultApplicationURLForContentType(CFSTR("public.c-source"),kLSRolesEditor,NULL);
}

- (instancetype)init
{
    self=[super init];
    
    if (self!=nil)
    {
        _defaults=[NSUserDefaults standardUserDefaults];
        
        [_defaults registerDefaults:@{
                                      // General
                                      
                                      CUIPreferencesGeneralDefaultPresentationModeKey:@(CUIPresentationModeText),
                                      
                                      CUIPreferencesGeneralShowsRegistersWindowAtLaunchKey:@(NO),
                                      
                                      CUIPreferencesSymbolicationSearchSymbolsFilesKey:@(YES),
                                      
                                      CUIPreferencesSymbolicationSymbolicateAutomaticallyKey:@(YES),
                                      
                                      // Text Mode
                                      
                                      CUIPreferencesTextModeShowsLineNumbersKey:@(NO),
                                      
                                      CUIPreferencesTextModeLineWrappingKey:@(YES),
                                      
                                      CUIPreferencesTextModeDefaultDisplaySettings:@{
                                              CUITextModeDisplaySettingsVisibleSectionKey:@(CUIDocumentAllSections),
                                              CUITextModeDisplaySettingsVisibleStackFrameComponentsKey:@(CUIStackFrameAllComponents)
                                              },
                                      
                                      // Outline Mode
                                      
                                      CUIPreferencesOutlineModeDefaultDisplaySettings:@{
                                              CUIOutlineModeDisplaySettingsShowOnlyCrashedThreadKey:@(NO),
                                              CUIOutlineModeDisplaySettingsVisibleStackFrameComponentsKey:@(CUIStackFrameByteOffsetComponent)
                                              },
                                      
                                      // Fonts & Colors
                                      
                                      // Crash Logs
                                      
                                      CUIPreferencesCrashLogsSortTypeKey:@(CUICrashLogsSortDateDescending),
                                      CUIPreferencesCrashLogsSortTypeKey:@(NO)
                                      
                                      }];
        
        // General
        
        _defaultPresentationMode=[_defaults integerForKey:CUIPreferencesGeneralDefaultPresentationModeKey];
        
        
        _showsRegistersWindowAutomaticallyAtLaunch=[_defaults boolForKey:CUIPreferencesGeneralShowsRegistersWindowAtLaunchKey];
        
        
        _searchForSymbolsFilesAutomatically=[_defaults boolForKey:CUIPreferencesSymbolicationSearchSymbolsFilesKey];
        
        NSString * tPath=[_defaults stringForKey:CUIPreferencesGeneralPreferedSourceCodeEditorPathKey];
        
        if (tPath==nil || [[NSFileManager defaultManager] fileExistsAtPath:tPath]==NO)
        {
            _preferedSourceCodeEditorURL=[CUIApplicationPreferences defaultSourceCodeEditorURL];
        }
        else
        {
            _preferedSourceCodeEditorURL=[NSURL fileURLWithPath:tPath];
        }
        
        _symbolicateAutomatically=[_defaults integerForKey:CUIPreferencesSymbolicationSymbolicateAutomaticallyKey];

        // Text Mode
        
        _showsLineNumbers=[_defaults boolForKey:CUIPreferencesTextModeShowsLineNumbersKey];
        
        _lineWrapping=[_defaults boolForKey:CUIPreferencesTextModeLineWrappingKey];
        
        
        
        
        _defaultTextModeDisplaySettings=[[CUITextModeDisplaySettings alloc] initWithRepresentation:[_defaults objectForKey:CUIPreferencesTextModeDefaultDisplaySettings]];
        
        // Outline Mode
        
        _defaultOutlineModeDisplaySettings=[[CUIOutlineModeDisplaySettings alloc] initWithRepresentation:[_defaults objectForKey:CUIPreferencesOutlineModeDefaultDisplaySettings]];
        
        // Fonts and Colors
        
        // Crash Logs
        
        _crashLogsSortType=[_defaults integerForKey:CUIPreferencesCrashLogsSortTypeKey];
        
        _crashLogsShowFileNames=[_defaults boolForKey:CUIPreferencesCrashLogsShowFileNamesKey];
        
    }
    
    return self;
}

#pragma mark -

- (void)setDefaultPresentationMode:(CUIPresentationMode)inMode
{
    _defaultPresentationMode=inMode;
    
    [_defaults setInteger:inMode forKey:CUIPreferencesGeneralDefaultPresentationModeKey];
}

- (void)setShowsRegistersWindowAutomaticallyAtLaunch:(BOOL)inShowsRegistersWindowAutomaticallyAtLaunch
{
    _showsRegistersWindowAutomaticallyAtLaunch=inShowsRegistersWindowAutomaticallyAtLaunch;
    
    [_defaults setBool:inShowsRegistersWindowAutomaticallyAtLaunch forKey:CUIPreferencesGeneralShowsRegistersWindowAtLaunchKey];
}

- (void)setSearchForSymbolsFilesAutomatically:(BOOL)inSearchForSymbolsFilesAutomatically
{
    _searchForSymbolsFilesAutomatically=inSearchForSymbolsFilesAutomatically;
    
    [_defaults setBool:inSearchForSymbolsFilesAutomatically forKey:CUIPreferencesSymbolicationSearchSymbolsFilesKey];
}

- (void)setSymbolicateAutomatically:(BOOL)inSymbolicateAutomatically
{
    _symbolicateAutomatically=inSymbolicateAutomatically;
    
    [_defaults setBool:inSymbolicateAutomatically forKey:CUIPreferencesSymbolicationSymbolicateAutomaticallyKey];
    
    [NSNotificationCenter.defaultCenter postNotificationName:CUIPreferencesSymbolicationSymbolicateAutomaticallyDidChangeNotification object:nil];
}

- (void)setPreferedSourceCodeEditorURL:(NSURL *)inURL
{
    if (inURL.isFileURL==NO)
        return;
    
    _preferedSourceCodeEditorURL=inURL;
    
    NSString * tPath=inURL.path;
    
    [_defaults setObject:tPath forKey:CUIPreferencesGeneralPreferedSourceCodeEditorPathKey];
}

- (void)setShowsLineNumbers:(BOOL)inShowsLineNumber
{
    _showsLineNumbers=inShowsLineNumber;
    
    [_defaults setBool:inShowsLineNumber forKey:CUIPreferencesTextModeShowsLineNumbersKey];
    
    [NSNotificationCenter.defaultCenter postNotificationName:CUIPreferencesTextModeShowsLineNumbersDidChangeNotification object:nil];
}

- (void)setLineWrapping:(BOOL)inLineWrapping
{
    _lineWrapping=inLineWrapping;
    
    [_defaults setBool:inLineWrapping forKey:CUIPreferencesTextModeLineWrappingKey];
    
    [NSNotificationCenter.defaultCenter postNotificationName:CUIPreferencesTextModeLineWrappingDidChangeNotification object:nil];
}

- (void)setDefaultTextModeDisplaySettings:(CUITextModeDisplaySettings *)inDisplaySettings
{
    _defaultTextModeDisplaySettings=[inDisplaySettings copy];
    
    [_defaults setObject:[_defaultTextModeDisplaySettings representation] forKey:CUIPreferencesTextModeDefaultDisplaySettings];
}

- (void)setDefaultOutlineModeDisplaySettings:(CUIOutlineModeDisplaySettings *)inDisplaySettings
{
    _defaultOutlineModeDisplaySettings=[inDisplaySettings copy];
    
    [_defaults setObject:[_defaultOutlineModeDisplaySettings representation] forKey:CUIPreferencesOutlineModeDefaultDisplaySettings];
}

#pragma mark -

- (void)setCrashLogsSortType:(CUICrashLogsSortType)inCrashLogsSortType
{
    if (_crashLogsSortType==inCrashLogsSortType)
        return;
    
    _crashLogsSortType=inCrashLogsSortType;
    
    [_defaults setObject:@(_crashLogsSortType) forKey:CUIPreferencesCrashLogsSortTypeKey];
    
    [NSNotificationCenter.defaultCenter postNotificationName:CUIPreferencesCrashLogsSortTypeDidChangeNotification object:nil];
}

- (void)setCrashLogsShowFileNames:(BOOL)inCrashLogsShowFileNames
{
    if (_crashLogsShowFileNames==inCrashLogsShowFileNames)
        return;
    
    _crashLogsShowFileNames=inCrashLogsShowFileNames;
    
    [_defaults setObject:@(_crashLogsShowFileNames) forKey:CUIPreferencesCrashLogsShowFileNamesKey];
    
    [NSNotificationCenter.defaultCenter postNotificationName:CUIPreferencesCrashLogsShowFileNamesDidChangeNotification object:nil];
}

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIApplicationSpecificBacktraceRowView.h
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Cocoa/Cocoa.h>

extern NSString * const CUIApplicationSpecificBacktraceRowViewIdentifier;

@interface CUIApplicationSpecificBacktraceRowView : NSTableRowView

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIApplicationSpecificBacktraceRowView.m
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "CUIApplicationSpecificBacktraceRowView.h"

NSString * const CUIApplicationSpecificBacktraceRowViewIdentifier=@"CUIApplicationSpecificBacktraceRowViewIdentifier";

@implementation CUIApplicationSpecificBacktraceRowView

- (void)drawRect:(NSRect)inRect
{
    if (self.isSelected==YES)
    {
        [super drawRect:inRect];
        
        return;
    }
    
    NSRect tBounds=self.bounds;
    
    BOOL tIsDark=[self WB_isEffectiveAppearanceDarkAqua];
    
    if (tIsDark==NO)
    {
        [[NSColor colorWithCalibratedRed:1.0 green:233.0/255.0 blue:203.0/255.0 alpha:1.0] set];
    }
    else
    {
        [[NSColor colorWithCalibratedRed:119.0/255.0 green:100.0/255.0 blue:43.0/255.0 alpha:1.0] set];
    }
    
    NSRectFill(tBounds);
    
    if (tIsDark==NO)
    {
        [[NSColor colorWithCalibratedRed:1.0 green:184.0/255.0 blue:115.0/255.0 alpha:1.0] set];
    }
    else
    {
        [[NSColor colorWithCalibratedRed:106.0/255.0 green:88.0/255.0 blue:29.0/255.0 alpha:1.0] set];
    }
    
    [NSBezierPath strokeLineFromPoint:NSMakePoint(NSMinX(tBounds),NSMinY(tBounds)+0.5) toPoint:NSMakePoint(NSMaxX(tBounds),NSMinY(tBounds)+0.5)];
    
    [NSBezierPath strokeLineFromPoint:NSMakePoint(NSMinX(tBounds),NSMaxY(tBounds)-0.5) toPoint:NSMakePoint(NSMaxX(tBounds),NSMaxY(tBounds)-0.5)];
    
}

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIBinaryImage.h
================================================
/*
 Copyright (c) 2020-2022, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Foundation/Foundation.h>

#import "IPSImage.h"

@interface CUIAddressesRange : NSObject

    @property NSUInteger loadAddress;

    @property NSUInteger length;

    @property (nonatomic,readonly) NSUInteger max;


- (NSString *)stringValue;

- (NSComparisonResult)compare:(CUIAddressesRange *)inOtherAddressesRange;

@end

@interface CUIBinaryImage : NSObject

    @property (readonly,getter=isUserCode) BOOL userCode;

	@property (readonly,copy) NSString * identifier;

    @property (readonly) cpu_type_t architecture;       // Future (iOS only)

    @property (readonly,copy) NSString * version;       // macOS only

	@property (readonly,copy) NSString * buildNumber;   // macOS only

    @property (readonly,copy) NSString * UUID;          // can be nil

	@property (readonly,copy) NSString * path;

	@property (readonly) CUIAddressesRange * addressesRange;

    @property (nonatomic,readonly) NSUInteger binaryImageOffset;

- (instancetype)initWithString:(NSString *)inString reportVersion:(NSUInteger)inReportVersion error:(NSError **)outError;

- (instancetype)initWithImage:(IPSImage *)inImage error:(NSError **)outError;

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIBinaryImage.m
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "CUIBinaryImage.h"

#import "NSString+CPU.h"

#import "IPSImage+UserCode.h"

@interface CUIAddressesRange ()

+ (CUIAddressesRange *)addressesRangeWithLocation:(NSUInteger)inLocation length:(NSUInteger)inLength;

- (instancetype)initWithLocation:(NSUInteger)inLocation length:(NSUInteger)inLength;

@end

@implementation CUIAddressesRange

+ (CUIAddressesRange *)addressesRangeWithLocation:(NSUInteger)inLocation length:(NSUInteger)inLength
{
    return [[CUIAddressesRange alloc] initWithLocation:inLocation length:inLength];
}

- (instancetype)initWithLocation:(NSUInteger)inLocation length:(NSUInteger)inLength
{
    self=[super init];
    
    if (self!=nil)
    {
        _loadAddress=inLocation;
        
        _length=inLength;
    }
    
    return self;
}

#pragma mark -

- (NSUInteger)max
{
    return self.loadAddress+self.length;
}

#pragma mark -

- (NSString *)stringValue
{
    return [NSString stringWithFormat:@"0x%012lx - 0x%012lx",self.loadAddress,self.max];
}

#pragma mark -

- (NSComparisonResult)compare:(CUIAddressesRange *)inOtherAddressesRange
{
    if (inOtherAddressesRange==nil)
        return NSOrderedDescending;
    
    if (self.loadAddress>inOtherAddressesRange.loadAddress)
        return NSOrderedDescending;
    
    if (self.loadAddress<inOtherAddressesRange.loadAddress)
        return NSOrderedAscending;
    
    if (self.length>inOtherAddressesRange.length)
        return NSOrderedDescending;
    
    if (self.length<inOtherAddressesRange.length)
        return NSOrderedAscending;
    
    return NSOrderedSame;
}

@end


@interface CUIBinaryImage ()

    @property (getter=isUserCode) BOOL userCode;

    @property (copy) NSString * identifier;

    @property (copy) NSString * version;

    @property (copy) NSString * buildNumber;

    @property (copy) NSString * UUID;

    @property (copy) NSString * path;

    @property CUIAddressesRange * addressesRange;

- (BOOL)_isUserCode;

@end

// Line example:
// 0x7fff2d259000 -     0x7fff2d259fff  com.apple.Accelerate (1.11 - Accelerate 1.11) <B2A0C739-1D41-3452-9D00-8C01ADA5DD99> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate

@implementation CUIBinaryImage

- (instancetype)initWithString:(NSString *)inString reportVersion:(NSUInteger)inReportVersion error:(NSError **)outError
{
    if ([inString isKindOfClass:NSString.class]==NO)
    {
        if (outError!=NULL)
            *outError=[NSError errorWithDomain:NSPOSIXErrorDomain code:EINVAL userInfo:@{}];
        
        return nil;
    }
    
    self=[super init];
    
    if (self!=nil)
    {
        NSCharacterSet * tWhitespaceCharacterSet=[NSCharacterSet whitespaceCharacterSet];
        NSScanner * tScanner=[NSScanner scannerWithString:inString];
        
        tScanner.charactersToBeSkipped=tWhitespaceCharacterSet;
        
        unsigned long long tAddressRangeStart=0;
        
        if ([tScanner scanHexLongLong:&tAddressRangeStart]==NO)
            return nil;
        
        if ([tScanner scanUpToString:@"0" intoString:NULL]==NO)
            return nil;
        
        unsigned long long tAddressRangeEnd=0;
        
        if ([tScanner scanHexLongLong:&tAddressRangeEnd]==NO)
            return nil;
        
        _addressesRange=[CUIAddressesRange addressesRangeWithLocation:tAddressRangeStart length:tAddressRangeEnd-tAddressRangeStart+1];
        
        NSString * tString;
        NSString * tOriginalString;
        
        BOOL tIsMissingVersion=NO;
        
        NSUInteger tSavedScannerScanLocation=tScanner.scanLocation;
        
        if ([tScanner scanUpToString:@"(" intoString:&tOriginalString]==NO)
        {
            return nil;
        }
        else
        {
            // Maybe only the version is missing
            
            if (tScanner.scanLocation==inString.length)
            {
                tScanner.scanLocation=tSavedScannerScanLocation;
                
                if ([tScanner scanUpToString:@"<" intoString:&tOriginalString]==NO)
                    return nil;
                
                tIsMissingVersion=YES;
            }
        }
        
        if (inReportVersion==6)
        {
            // Remove the version
            
            NSUInteger tLength=tOriginalString.length;
            
            NSRange tRange=[tOriginalString rangeOfCharacterFromSet:tWhitespaceCharacterSet options:NSBackwardsSearch range:NSMakeRange(0,tLength-1)];
            
            if (tRange.location==NSNotFound)
            {
                NSLog(@"Unable to find version for binary image");
                
                return nil;
            }
            
            tString=[tOriginalString substringToIndex:tRange.location];
        }
        else
        {
            tString=tOriginalString;
        }
        
        if ([tString hasPrefix:@"+"]==YES && tString.length>1)  // Cheap way to find that a binary image is user code.
        {
            _userCode=YES;
            
            tString=[tString substringFromIndex:1];
        }
        
        _identifier=[[tString stringByTrimmingCharactersInSet:tWhitespaceCharacterSet] copy];
        
        // Version
        
        if (tScanner.scanLocation>=inString.length)
            return nil;
        
        if (tIsMissingVersion==NO)
        {
        
            if (inReportVersion==6)
            {
                NSUInteger tLength=tOriginalString.length;
                
                NSRange tRange=[tOriginalString rangeOfCharacterFromSet:tWhitespaceCharacterSet options:NSBackwardsSearch range:NSMakeRange(0,tLength-1)];
                
                _version=[[tOriginalString substringFromIndex:tRange.location] stringByTrimmingCharactersInSet:tWhitespaceCharacterSet];
                
                tScanner.scanLocation+=1;
                
                if ([tScanner scanUpToString:@")" intoString:&tString]==NO)
                    return nil;
                
                _buildNumber=[tString stringByTrimmingCharactersInSet:tWhitespaceCharacterSet];
            }
            else
            {
                tScanner.scanLocation+=1;
                
                if ([tScanner scanUpToString:@")" intoString:&tString]==NO)
                    return nil;
                
                NSArray * tVersions=[tString componentsSeparatedByString:@" - "];
                
                switch(tVersions.count)
                {
                    case 2:
                        
                        _buildNumber=[tVersions[1] stringByTrimmingCharactersInSet:tWhitespaceCharacterSet];
                        
                    case 1:
                        
                        _version=[tVersions.firstObject stringByTrimmingCharactersInSet:tWhitespaceCharacterSet];
                        
                        break;
                }
            }
            
            tScanner.scanLocation+=2;
        }
        else
        {
            _version=@"???";
            _buildNumber=@"???";
        }
        
        // UUID
        
        if ([inString characterAtIndex:tScanner.scanLocation]=='<')
        {
            if ([tScanner scanUpToString:@">" intoString:&tString]==NO)
                return nil;
        
            _UUID=[tString substringFromIndex:1];
        }
        else
        {
            tScanner.scanLocation-=2;
        }
        
        if ([tScanner scanUpToString:@"/" intoString:NULL]==NO)
            return nil;
        
        _path=[[inString substringFromIndex:tScanner.scanLocation] stringByTrimmingCharactersInSet:tWhitespaceCharacterSet];
        
        // User Code
        
        _userCode = (_userCode == YES) ? YES : [self _isUserCode];
    }
    
    return self;
}

- (instancetype)initWithImage:(IPSImage *)inImage error:(NSError **)outError
{
    if ([inImage isKindOfClass:IPSImage.class]==NO)
    {
        if (outError!=NULL)
            *outError=[NSError errorWithDomain:NSPOSIXErrorDomain code:EINVAL userInfo:@{}];
        
        return nil;
    }
    
    self=[super init];
    
    if (self!=nil)
    {
        _userCode=inImage.isUserCode;

        _identifier=[((inImage.bundleIdentifier!=nil) ? inImage.bundleIdentifier : inImage.name) copy];

        _architecture=[inImage.architecture CUI_CPUType];

        _version=[inImage.bundleShortVersionString copy];

        _buildNumber=[inImage.bundleVersion copy];
        
        _UUID=[inImage.UUID.UUIDString copy];
        
        _path=[inImage.path copy];
        
        _addressesRange=[CUIAddressesRange new];
        _addressesRange.loadAddress=inImage.loadAddress;
        _addressesRange.length=inImage.size;
    }
    
    return self;
}

#pragma mark -

- (NSUInteger)binaryImageOffset
{
    NSUInteger tLoadAddress=self.addressesRange.loadAddress;
    
    if (tLoadAddress>0x7fff00000000)    // Won't happen with ARM-64.
        return tLoadAddress;
    
    if (tLoadAddress>=0x100000000)
        return (tLoadAddress-0x100000000);
    
    return tLoadAddress;    // 32-bit
}

- (BOOL)_isUserCode
{
    NSString * tIdentifier=self.identifier;
    
    if (tIdentifier!=nil)
    {
        if ([tIdentifier hasPrefix:@"com.apple."]==YES)
            return NO;
    }
    
    NSString * tPath=self.path;
    
    if (tPath!=nil)
    {
        if ([tPath hasPrefix:@"/System/"]==YES)
            return NO;
        
        if ([tPath hasPrefix:@"/usr/"]==YES)
        {
            if ([tPath hasPrefix:@"/usr/bin"]==YES)
                return NO;
            
            if ([tPath hasPrefix:@"/usr/sbin"]==YES)
                return NO;
            
            if ([tPath hasPrefix:@"/usr/lib"]==YES)
                return NO;
            
            if ([tPath hasPrefix:@"/usr/libexec"]==YES)
                return NO;
            
            if ([tPath hasPrefix:@"/usr/share"]==YES)
                return NO;
        }
        
        if ([tPath hasPrefix:@"/bin/"]==YES)
            return NO;
        
        if ([tPath hasPrefix:@"/sbin/"]==YES)
            return NO;
        
        if ([tPath hasPrefix:@"/Library/Apple"]==YES)
            return NO;
    }
    
    return YES;
}

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIBinaryImageUtility.h
================================================
/*
Copyright (c) 2020-2021, Stephane Sudre
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <Cocoa/Cocoa.h>

extern NSString * const CUIBinaryImageGroupAppKitUIKit;
extern NSString * const CUIBinaryImageGroupAudioSpeech;
extern NSString * const CUIBinaryImageGroupDatabaseStorage;
extern NSString * const CUIBinaryImageGroupFoundation;
extern NSString * const CUIBinaryImageGroupGenericUncategorized;
extern NSString * const CUIBinaryImageGroupGraphics;
extern NSString * const CUIBinaryImageGroupLanguages;
extern NSString * const CUIBinaryImageGroupNetworkIO;
extern NSString * const CUIBinaryImageGroupOtherFrameworks;
extern NSString * const CUIBinaryImageGroupSecurity;
extern NSString * const CUIBinaryImageGroupSystem;
extern NSString * const CUIBinaryImageGroupUserCode;
extern NSString * const CUIBinaryImageGroupWebInternet;

@interface CUIBinaryImageUtility : NSObject

+ (NSString *)binaryImageGroupForIdentifier:(NSString *)inIdentifier;

+ (NSImage *)iconForBinaryImageGroup:(NSString *)inBinaryImageGroup;

+ (NSColor *)colorForBinaryImageGroup:(NSString *)inBinaryImageGroup;

+ (NSImage *)iconForIdentifier:(NSString *)inIdentifier;

+ (NSImage *)iconForPath:(NSString *)inPath;

+ (NSColor *)colorForUserCode;

+ (NSColor *)colorForIdentifier:(NSString *)inIdentifier;

@end



================================================
FILE: app_unexpectedly/app_unexpectedly/CUIBinaryImageUtility.m
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "CUIBinaryImageUtility.h"

NSString * const CUIBinaryImageGroupAppKitUIKit=@"AppKit/UIKit";
NSString * const CUIBinaryImageGroupAudioSpeech=@"Audio/Speech";
NSString * const CUIBinaryImageGroupDatabaseStorage=@"Database/Storage";
NSString * const CUIBinaryImageGroupFoundation=@"Foundation";
NSString * const CUIBinaryImageGroupGenericUncategorized=@"Generic/Uncategorized";
NSString * const CUIBinaryImageGroupGraphics=@"Graphics";
NSString * const CUIBinaryImageGroupLanguages=@"Languages";
NSString * const CUIBinaryImageGroupNetworkIO=@"Network or I/O";
NSString * const CUIBinaryImageGroupOtherFrameworks=@"Other frameworks";
NSString * const CUIBinaryImageGroupSecurity=@"Security";
NSString * const CUIBinaryImageGroupSystem=@"System";
NSString * const CUIBinaryImageGroupUserCode=@"User Code";
NSString * const CUIBinaryImageGroupWebInternet=@"Web/Internet";


@implementation CUIBinaryImageUtility

+ (NSString *)binaryImageGroupForIdentifier:(NSString *)inIdentifier
{
    if (inIdentifier==nil)
        return CUIBinaryImageGroupGenericUncategorized;
    
    static NSDictionary * sGroupRegistry=nil;
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        
        sGroupRegistry=@{
                         
                         // Application UI
                         
                         @"libswiftAppKit.dylib":CUIBinaryImageGroupAppKitUIKit,
                         
                         @"com.apple.AppKit":CUIBinaryImageGroupAppKitUIKit,
                         @"com.apple.UIKit":CUIBinaryImageGroupAppKitUIKit,
                         
                         // Audio Speech
                         
                         @"libswiftCoreAudio.dylib":CUIBinaryImageGroupAudioSpeech,
                         
                         @"com.apple.audio.CoreAudio":CUIBinaryImageGroupAudioSpeech,
                         @"com.apple.audio.AppleHDAHALPlugIn":CUIBinaryImageGroupAudioSpeech,
                         @"com.apple.audio.AVFAudio":CUIBinaryImageGroupAudioSpeech,
                         @"com.apple.audio.toolbox.AudioToolbox":CUIBinaryImageGroupAudioSpeech,
                         @"com.apple.audio.units.AudioUnit":CUIBinaryImageGroupAudioSpeech,
                         
                         @"com.apple.speech.recognition.framework":CUIBinaryImageGroupAudioSpeech,
                         @"com.apple.speech.synthesis.framework":CUIBinaryImageGroupAudioSpeech,
                         @"com.apple.SpeechRecognitionCore":CUIBinaryImageGroupAudioSpeech,
                         
                         // Database
                         
                         @"libswiftCoreData.dylib":CUIBinaryImageGroupDatabaseStorage,
                         
                         @"com.apple.CoreData":CUIBinaryImageGroupDatabaseStorage,
                         @"libsqlite3.dylib":CUIBinaryImageGroupDatabaseStorage,
                         
                         // Foundation
                         
                         @"libswiftCoreFoundation.dylib":CUIBinaryImageGroupFoundation,
                         @"libswiftFoundation.dylib":CUIBinaryImageGroupFoundation,
                         
                         @"com.apple.Foundation":CUIBinaryImageGroupFoundation,
                         @"com.apple.CoreFoundation":CUIBinaryImageGroupFoundation,
                         
                         // Graphics
                         
                         @"libswiftAVFoundation.dylib":CUIBinaryImageGroupGraphics,
                         @"libswiftCoreGraphics.dylib":CUIBinaryImageGroupGraphics,
                         @"libswiftCoreImage.dylib":CUIBinaryImageGroupGraphics,
                         @"libswiftMetal.dylib":CUIBinaryImageGroupGraphics,
                         @"libswiftQuartzCore.dylib":CUIBinaryImageGroupGraphics,
                         
                         @"com.apple.ApplicationServices.ATS":CUIBinaryImageGroupGraphics,
                         
                         @"com.apple.opencl":CUIBinaryImageGroupGraphics,
                         
                         @"com.apple.IOSurface":CUIBinaryImageGroupGraphics,
                         
                         @"com.apple.avfoundation":CUIBinaryImageGroupGraphics,
                         @"com.apple.AVKit":CUIBinaryImageGroupGraphics,
                         @"com.apple.ColorSync":CUIBinaryImageGroupGraphics,
                         @"com.apple.ColorSyncLegacy":CUIBinaryImageGroupGraphics,
                         @"com.apple.CoreGraphics":CUIBinaryImageGroupGraphics,
                         @"com.apple.CoreImage":CUIBinaryImageGroupGraphics,
                         @"com.apple.ImageCapture":CUIBinaryImageGroupGraphics,
                         @"com.apple.imageCaptureCore":CUIBinaryImageGroupGraphics,
                         @"com.apple.ImageIO.framework":CUIBinaryImageGroupGraphics,
                         
                         @"com.apple.CoreMedia":CUIBinaryImageGroupGraphics,
                         @"com.apple.CoreMediaAccessibility":CUIBinaryImageGroupGraphics,
                         @"com.apple.CoreMediaAuthoring":CUIBinaryImageGroupGraphics,
                         @"com.apple.CoreMediaIO":CUIBinaryImageGroupGraphics,
                         @"com.apple.CoreMediaKit":CUIBinaryImageGroupGraphics,
                         @"com.apple.MediaPlayer":CUIBinaryImageGroupGraphics,
                         @"com.apple.MediaToolbox":CUIBinaryImageGroupGraphics,
                         @"com.apple.CoreText":CUIBinaryImageGroupGraphics,
                         @"com.apple.CoreVideo":CUIBinaryImageGroupGraphics,
                         @"com.apple.VideoToolbox":CUIBinaryImageGroupGraphics,
                         
                         @"com.apple.opengl":CUIBinaryImageGroupGraphics,
                         @"com.apple.QuartzCore":CUIBinaryImageGroupGraphics,
                         @"libGL.dylib":CUIBinaryImageGroupGraphics,
                         @"libGLImage.dylib":CUIBinaryImageGroupGraphics,
                         @"libGLU.dylib":CUIBinaryImageGroupGraphics,
                         
                         @"com.apple.QD":CUIBinaryImageGroupGraphics,
                         
                         @"libmetal_timestamp.dylib":CUIBinaryImageGroupGraphics,
                         @"com.apple.gpusw.MetalTools":CUIBinaryImageGroupGraphics,
                         
                         @"com.apple.PDFKit":CUIBinaryImageGroupGraphics,
                         @"com.apple.CorePDF":CUIBinaryImageGroupGraphics,
                         
                         @"com.apple.AppleJPEG":CUIBinaryImageGroupGraphics,
                         
                         @"libGIF.dylib":CUIBinaryImageGroupGraphics,
                         @"libJP2.dylib":CUIBinaryImageGroupGraphics,
                         @"libJPEG.dylib":CUIBinaryImageGroupGraphics,
                         @"libPng.dylib":CUIBinaryImageGroupGraphics,
                         @"libRadiance.dylib":CUIBinaryImageGroupGraphics,
                         @"libTIFF.dylib":CUIBinaryImageGroupGraphics,
                         
                         // Languages
                         
                         @"libswiftObjectiveC.dylib":CUIBinaryImageGroupLanguages,
                         
                         // Network
                         
                         @"com.apple.CFNetwork":CUIBinaryImageGroupNetworkIO,
                         @"libnetwork.dylib":CUIBinaryImageGroupNetworkIO,
                         @"libsystem_networkextension.dylib":CUIBinaryImageGroupNetworkIO,
                         @"libapple_nghttp2.dylib":CUIBinaryImageGroupNetworkIO,
                         
                         // Security
                         
                         @"com.apple.Kerberos":CUIBinaryImageGroupSecurity,
                         @"libcommonCrypto.dylib":CUIBinaryImageGroupSecurity,
                         @"libcorecrypto.dylib":CUIBinaryImageGroupSecurity,
                         
                         // System
                         
                         @"libdyld.dylib":CUIBinaryImageGroupSystem,
                         @"libdispatch.dylib":CUIBinaryImageGroupSystem,
                         
                         // Web Internet
                         
                         @"com.apple.JavaScriptCore":CUIBinaryImageGroupWebInternet,
                         @"com.apple.WebCore":CUIBinaryImageGroupWebInternet,
                         @"com.apple.WebKitLegacy":CUIBinaryImageGroupWebInternet,
                         @"com.apple.WebKit":CUIBinaryImageGroupWebInternet,
                         @"libwebrtc.dylib":CUIBinaryImageGroupWebInternet,
                         };
        
    });
    
    NSString * tBinaryImageGroup=sGroupRegistry[inIdentifier];
    
    if (tBinaryImageGroup!=nil)
        return tBinaryImageGroup;
    
    // Try to figure out differently
    
    if ([inIdentifier hasPrefix:@"libc++"]==YES ||
        [inIdentifier hasPrefix:@"libobjc"]==YES)
        return CUIBinaryImageGroupLanguages;
    
    if ([inIdentifier hasPrefix:@"com.apple.Metal"]==YES)
        return CUIBinaryImageGroupGraphics;
    
    if ([inIdentifier hasPrefix:@"com.apple.security"]==YES)
        return CUIBinaryImageGroupSecurity;
    
    if ([inIdentifier hasPrefix:@"com.apple."]==YES)
        return CUIBinaryImageGroupOtherFrameworks;
    
    if ([inIdentifier hasPrefix:@"libsystem_"]==YES)
        return CUIBinaryImageGroupSystem;
    
    return CUIBinaryImageGroupGenericUncategorized;
}

+ (NSImage *)iconForBinaryImageGroup:(NSString *)inBinaryImageGroup
{
    if (inBinaryImageGroup==nil)
        inBinaryImageGroup=CUIBinaryImageGroupGenericUncategorized;
    
    static NSDictionary * sIconsRegistry=nil;
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        
        
        sIconsRegistry=@{
                         
                         CUIBinaryImageGroupAppKitUIKit:[NSImage imageNamed:@"call-appkit"],
                         CUIBinaryImageGroupAudioSpeech:[NSImage imageNamed:@"call-audiospeech"],
                         CUIBinaryImageGroupDatabaseStorage:[NSImage imageNamed:@"call-database"],
                         CUIBinaryImageGroupFoundation:[NSImage imageNamed:@"call-foundation"],
                         CUIBinaryImageGroupGenericUncategorized:[NSImage imageNamed:@"call-generic"],
                         CUIBinaryImageGroupGraphics:[NSImage imageNamed:@"call-graphics"],
                         CUIBinaryImageGroupLanguages:[NSImage imageNamed:@"call-languages"],
                         CUIBinaryImageGroupNetworkIO:[NSImage imageNamed:@"call-network"],
                         CUIBinaryImageGroupOtherFrameworks:[NSImage imageNamed:@"call-framework"],
                         CUIBinaryImageGroupSecurity:[NSImage imageNamed:@"call-security"],
                         CUIBinaryImageGroupSystem:[NSImage imageNamed:@"call-system"],
                         CUIBinaryImageGroupUserCode:[NSImage imageNamed:@"call-usercode"],
                         CUIBinaryImageGroupWebInternet:[NSImage imageNamed:@"call-webinternet"],
                         };
        
    });
    
    NSImage * tImage=sIconsRegistry[inBinaryImageGroup];
    
    if (tImage!=nil)
        return tImage;
    
    return sIconsRegistry[CUIBinaryImageGroupGenericUncategorized];
}

+ (NSColor *)colorForBinaryImageGroup:(NSString *)inBinaryImageGroup
{
    if (inBinaryImageGroup==nil)
        inBinaryImageGroup=CUIBinaryImageGroupGenericUncategorized;
    
    static NSDictionary * sColorsRegistry=nil;
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        
        
        sColorsRegistry=@{
                          
                          CUIBinaryImageGroupAppKitUIKit:[NSColor colorWithDeviceRed:176/255.0 green:155/255.0 blue:202/255.0 alpha:1.0],
                          CUIBinaryImageGroupAudioSpeech:[NSColor colorWithDeviceRed:169/255.0 green:184/255.0 blue:192/255.0 alpha:1.0],
                          CUIBinaryImageGroupDatabaseStorage:[NSColor colorWithDeviceRed:212/255.0 green:194/255.0 blue:87/255.0 alpha:1.0],
                          CUIBinaryImageGroupFoundation:[NSColor colorWithDeviceRed:185/255.0 green:181/255.0 blue:160/255.0 alpha:1.0],
                          CUIBinaryImageGroupGenericUncategorized:[NSColor colorWithDeviceRed:167/255.0 green:146/255.0 blue:126/255.0 alpha:1.0],
                          CUIBinaryImageGroupGraphics:[NSColor colorWithDeviceRed:155/255.0 green:152/255.0 blue:210/255.0 alpha:1.0],
                          CUIBinaryImageGroupLanguages:[NSColor colorWithDeviceRed:158/255.0 green:111/255.0 blue:147/255.0 alpha:1.0],
                          CUIBinaryImageGroupNetworkIO:[NSColor colorWithDeviceRed:215/255.0 green:137/255.0 blue:101/255.0 alpha:1.0],
                          CUIBinaryImageGroupOtherFrameworks:[NSColor colorWithDeviceRed:190/255.0 green:154/255.0 blue:150/255.0 alpha:1.0],
                          CUIBinaryImageGroupSecurity:[NSColor colorWithDeviceRed:85/255.0 green:138/255.0 blue:82/255.0 alpha:1.0],
                          CUIBinaryImageGroupSystem:[NSColor colorWithDeviceRed:201/255.0 green:185/255.0 blue:156/255.0 alpha:1.0],
                          CUIBinaryImageGroupUserCode:[NSColor colorWithDeviceRed:133/255.0 green:168/255.0 blue:210/255.0 alpha:1.0],
                          CUIBinaryImageGroupWebInternet:[NSColor colorWithDeviceRed:106/255.0 green:131/255.0 blue:141/255.0 alpha:1.0],
                          };
        
    });
    
    NSColor * tColor=sColorsRegistry[inBinaryImageGroup];
    
    if (tColor!=nil)
        return tColor;
    
    return sColorsRegistry[CUIBinaryImageGroupGenericUncategorized];
}

+ (NSImage *)iconForIdentifier:(NSString *)inIdentifier
{
    NSString * tBinaryImageGroup=[CUIBinaryImageUtility binaryImageGroupForIdentifier:inIdentifier];
    
    return [CUIBinaryImageUtility iconForBinaryImageGroup:tBinaryImageGroup];
}

+ (NSImage *)iconForPath:(NSString *)inPath
{
    return nil;
}

+ (NSColor *)colorForUserCode
{
    static NSColor * sUserCodeColor=nil;
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
    
        sUserCodeColor=[NSColor colorWithDeviceRed:133/255.0 green:168/255.0 blue:210/255.0 alpha:1.0];
    });
    
    return sUserCodeColor;
}

+ (NSColor *)colorForIdentifier:(NSString *)inIdentifier
{
    NSString * tBinaryImageGroup=[CUIBinaryImageUtility binaryImageGroupForIdentifier:inIdentifier];
    
    return [CUIBinaryImageUtility colorForBinaryImageGroup:tBinaryImageGroup];
}

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIBinaryImagesViewController.h
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Cocoa/Cocoa.h>

#import "CUICrashLog.h"

@interface CUIBinaryImagesViewController : NSViewController

    @property (nonatomic) CUICrashLog * crashLog;

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUIBinaryImagesViewController.m
================================================
/*
 Copyright (c) 2020-2024, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "CUIBinaryImagesViewController.h"

#import "CUIBinaryImage.h"

#import "CUIBinaryImageUtility.h"

#import "CUICallsSelection.h"

#import "CUIApplicationItemAttributes.h"

#import "NSArray+WBExtensions.h"

#import "NSTableView+Selection.h"

#import "NSSet+WBExtensions.h"

#import "CUIRawCrashLog+Path.h"

#import "CUIHopperDisassemblerManager.h"

@interface CUIBinaryImagesViewController () <CUIHopperDisassemblerActions,NSMenuItemValidation,NSTableViewDataSource,NSTableViewDelegate>
{
    IBOutlet NSTableView * _tableView;
    
    IBOutlet NSMenuItem * _openWithMenuItem;
    
    IBOutlet NSSearchField * _filterField;
    
    NSMutableArray * _sortedAndFilteredBinaryImagesArray;
    
    NSString * _filterPattern;
    
    NSSet * _highlightedBinaryImagesSet;
}

    @property (nonatomic,copy) NSString * userCodeBinaryImageIdentifier;

    @property (nonatomic) NSArray * binaryImages;

- (void)refreshList;

- (IBAction)showInFinder:(id)sender;

- (IBAction)takeFilterPatternFrom:(id)sender;

// Notifications

- (void)callsSelectionDidChange:(NSNotification *)inNotification;

@end

@implementation CUIBinaryImagesViewController

- (instancetype)init
{
    self=[super init];
    
    if (self!=nil)
    {
        _filterPattern=@"";
    }
    
    return self;
}

#pragma mark -

- (NSString *)nibName
{
    return @"CUIBinaryImagesViewController";
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    // Table
    
    NSSortDescriptor *buildETASortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"addressesRange" ascending:YES];
    
    _tableView.sortDescriptors=@[buildETASortDescriptor];
    
    // Open With menu
    
    NSMenu * tHopperMenu=[[CUIHopperDisassemblerManager sharedManager] availableApplicationsMenuWithTarget:self];
    
    _openWithMenuItem.submenu=tHopperMenu;
    _openWithMenuItem.hidden=(tHopperMenu==nil);
    
    // Filter Field
    
    _filterField.centersPlaceholder=NO;
    
    NSSearchFieldCell * tSearchFieldCell=_filterField.cell;
    NSButtonCell * tButtonCell=tSearchFieldCell.searchButtonCell;
    
    tButtonCell.image=[NSImage imageNamed:@"filter_Template"];
    tButtonCell.alternateImage=tButtonCell.image;
    
    // Notifications
    
    [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(callsSelectionDidChange:) name:CUICallsSelectionDidChangeNotification object:[CUICallsSelection sharedCallsSelection]];
}

#pragma mark -

- (void)setCrashLog:(CUICrashLog *)inCrashLog
{
    if (_crashLog==inCrashLog)
        return;
    
    _crashLog=inCrashLog;
    
    _binaryImages=_crashLog.binaryImages.binaryImages;
    _userCodeBinaryImageIdentifier=_crashLog.header.bundleIdentifier;
    
    [_tableView sizeLastColumnToFit];
    
    [self refreshList];
}

#pragma mark -

- (void)refreshList
{
    NSIndexSet * tIndexSet=_tableView.selectedRowIndexes;
    
    NSArray * tSelectedItems=[_sortedAndFilteredBinaryImagesArray objectsAtIndexes:tIndexSet];
    
    NSArray * tSelectedPaths=[tSelectedItems WB_arrayByMappingObjectsUsingBlock:^id(CUIBinaryImage * bBinaryImage, NSUInteger bIndex) {
        
        return bBinaryImage.path;
        
    }];
    
    NSArray * tArray=_binaryImages;
    
    if (_filterPattern.length>0)
    {
        _sortedAndFilteredBinaryImagesArray=[NSMutableArray array];
        
        [tArray enumerateObjectsUsingBlock:^(CUIBinaryImage * bBinaryImage, NSUInteger bIndex, BOOL * bOutStop) {
            
            if ([bBinaryImage.identifier rangeOfString:self->_filterPattern options:NSCaseInsensitiveSearch].location!=NSNotFound ||
                [bBinaryImage.addressesRange.stringValue rangeOfString:self->_filterPattern options:NSCaseInsensitiveSearch].location!=NSNotFound ||
                [bBinaryImage.path rangeOfString:self->_filterPattern options:NSCaseInsensitiveSearch].location!=NSNotFound)
            {
                [self->_sortedAndFilteredBinaryImagesArray addObject:bBinaryImage];
            }
        }];
    }
    else
    {
        _sortedAndFilteredBinaryImagesArray=[tArray mutableCopy];
    }
    
    [_sortedAndFilteredBinaryImagesArray sortUsingDescriptors: _tableView.sortDescriptors];
    
    [_tableView reloadData];
    
    NSMutableIndexSet * tNewSelectionIndexSet=[NSMutableIndexSet indexSet];
    
    [_sortedAndFilteredBinaryImagesArray enumerateObjectsUsingBlock:^(CUIBinaryImage * bBinaryImage, NSUInteger bIndex,BOOL * bOutStop) {
        
        if ([tSelectedPaths containsObject:bBinaryImage.path]==YES)
            [tNewSelectionIndexSet addIndex:bIndex];
        
    }];
    
    if (tNewSelectionIndexSet.count>0)
        [_tableView selectRowIndexes:tNewSelectionIndexSet byExtendingSelection:NO];
    
    NSMutableIndexSet * tMutableIndexSet=[NSMutableIndexSet indexSet];
    
    [_sortedAndFilteredBinaryImagesArray enumerateObjectsUsingBlock:^(CUIBinaryImage * bBinaryImage, NSUInteger bIndex, BOOL * bOutStop) {
        
        if ([self->_highlightedBinaryImagesSet containsObject:bBinaryImage.identifier]==YES)
            [tMutableIndexSet addIndex:bIndex];
    }];
    
    if (tMutableIndexSet.count>0)
        [_tableView scrollRowToVisible:tMutableIndexSet.firstIndex];
}

#pragma mark -

- (BOOL)validateMenuItem:(NSMenuItem *)inMenuItem
{
    SEL tAction=inMenuItem.action;
    
    NSIndexSet * tSelectedRows=[_tableView WB_selectedOrClickedRowIndexes];
    
    if (tAction==@selector(showInFinder:) ||
        tAction==@selector(openWithHopperDisassembler:))
    {
        if (tSelectedRows.count==0)
            return NO;
        
        NSArray<CUIBinaryImage *> * tArray=[_sortedAndFilteredBinaryImagesArray objectsAtIndexes:tSelectedRows];
        
        NSFileManager * tFileManager=[NSFileManager defaultManager];
        
        for(CUIBinaryImage * tBinaryImage in tArray)
        {
            NSString * tPath=tBinaryImage.path;
            
            if (tPath.length==0)
                return NO;
            
            if ([tFileManager fileExistsAtPath:tPath]==NO)
                return NO;
        }
        
        return (tSelectedRows.count>0);
    }
    
    return YES;
}

- (IBAction)showInFinder:(id)sender
{
    NSIndexSet * tSelectionIndexSet=_tableView.WB_selectedOrClickedRowIndexes;
    
    NSWorkspace * tSharedWorkspace=[NSWorkspace sharedWorkspace];
    
    [_sortedAndFilteredBinaryImagesArray enumerateObjectsAtIndexes:tSelectionIndexSet options:0 usingBlock:^(CUIBinaryImage * bBinaryImage, NSUInteger bIndex, BOOL * bOutStop) {
        
        if (bBinaryImage.path.length>0)
            [tSharedWorkspace selectFile:bBinaryImage.path inFileViewerRootedAtPath:@""];
    }];
}

- (IBAction)openWithHopperDisassembler:(NSMenuItem *)sender
{
    NSIndexSet * tSelectionIndexSet=_tableView.WB_selectedOrClickedRowIndexes;
    
    CUIApplicationItemAttributes * tApplicationItemAttributes=sender.representedObject;
    
    [_sortedAndFilteredBinaryImagesArray enumerateObjectsAtIndexes:tSelectionIndexSet options:0 usingBlock:^(CUIBinaryImage * bBinaryImage, NSUInteger bIndex, BOOL * bOutStop) {
        
        if (bBinaryImage.path.length>0)
        {
            [[CUIHopperDisassemblerManager sharedManager] openBinaryImage:bBinaryImage.path
                                                withApplicationAttributes:tApplicationItemAttributes
                                                                 codeType:self.crashLog.header.codeType
                                                               fileOffSet:NULL];
        }
    }];
}

- (IBAction)takeFilterPatternFrom:(NSSearchField *)sender
{
    _filterPattern=sender.stringValue;
    
    [self refreshList];
}

#pragma mark - NSTableViewDataSource

- (NSInteger)numberOfRowsInTableView:(NSTableView *)inTableView
{
    return _sortedAndFilteredBinaryImagesArray.count;
}

#pragma mark - NSTableViewDelegate

- (NSView *)tableView:(NSTableView *)inTableView viewForTableColumn:(NSTableColumn *)inTableColumn row:(NSInteger)inRow
{
    NSString * tTableColumnIdentifier=inTableColumn.identifier;
    NSTableCellView * tTableCellView=[inTableView makeViewWithIdentifier:tTableColumnIdentifier owner:self];
    
    CUIBinaryImage * tBinaryImage=_sortedAndFilteredBinaryImagesArray[inRow];
    
    tTableCellView.textField.textColor=(_highlightedBinaryImagesSet.count>0) ? [NSColor secondaryLabelColor] : [NSColor labelColor];
    
    if ([_highlightedBinaryImagesSet containsObject:tBinaryImage.identifier]==YES)
    {
        tTableCellView.textField.textColor=[NSColor labelColor];
        
        tTableCellView.textField.font=[[NSFontManager sharedFontManager] convertFont:tTableCellView.textField.font
                                                                         toHaveTrait:NSBoldFontMask];
    }
    else
    {
        tTableCellView.textField.font=[[NSFontManager sharedFontManager] convertFont:tTableCellView.textField.font
                                                                         toHaveTrait:NSUnboldFontMask];
    }
    
    if ([tTableColumnIdentifier isEqualToString:@"identifier"]==YES)
    {
        tTableCellView.textField.stringValue=tBinaryImage.identifier;
        
        if (tBinaryImage.isUserCode==YES)
            tTableCellView.imageView.image=[NSImage imageNamed:@"call-usercode"];
        else
            tTableCellView.imageView.image=[CUIBinaryImageUtility iconForIdentifier:tBinaryImage.identifier];
    }
    else if ([tTableColumnIdentifier isEqualToString:@"version"]==YES)
    {
        if (tBinaryImage.buildNumber==nil)
            tTableCellView.textField.stringValue=(tBinaryImage.version!=nil) ? tBinaryImage.version : @"-";
        else
            tTableCellView.textField.stringValue=[NSString stringWithFormat:NSLocalizedString(@"%@ (%@)",@""),tBinaryImage.version,tBinaryImage.buildNumber];
    }
    else if ([tTableColumnIdentifier isEqualToString:@"addresses"]==YES)
    {
        //tTableCellView.textField.font=[NSFont monospacedDigitSystemFontOfSize:18.0 weight:NSFontWeightRegular];
        tTableCellView.textField.stringValue=tBinaryImage.addressesRange.stringValue;
    }
    else if ([tTableColumnIdentifier isEqualToString:@"path"]==YES)
    {
        tTableCellView.textField.stringValue=[self.crashLog stringByResolvingUSERInPath:tBinaryImage.path];
    }
    
    return tTableCellView;
}

- (void)tableView:(NSTableView *)inTableView sortDescriptorsDidChange:(NSArray *)inOldDescriptors
{
    [self refreshList];
}

#pragma mark - Notifications

- (void)callsSelectionDidChange:(NSNotification *)inNotification
{
    CUICallsSelection * tCallSelection=inNotification.object;
    
    if ([tCallSelection isKindOfClass:[CUICallsSelection class]]==NO)
        return;
    
    _highlightedBinaryImagesSet=tCallSelection.binaryImageIdentifiers;
    
    NSMutableIndexSet * tMutableIndexSet=[NSMutableIndexSet indexSet];
    
    
    [_sortedAndFilteredBinaryImagesArray enumerateObjectsUsingBlock:^(CUIBinaryImage * bBinaryImage, NSUInteger bIndex, BOOL * bOutStop) {
        
        if ([self->_highlightedBinaryImagesSet containsObject:bBinaryImage.identifier]==YES)
        {
            [tMutableIndexSet addIndex:bIndex];
        }
    }];
    
    [_tableView reloadDataForRowIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, _sortedAndFilteredBinaryImagesArray.count)]
                          columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, 4)]];
    
    if (tMutableIndexSet.count>0)
        [_tableView scrollRectToVisible:[_tableView rectOfRow:tMutableIndexSet.firstIndex]];
}

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUICallStackBacktrace.h
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Foundation/Foundation.h>

#import "CUIStackFrame.h"

#import "IPSThreadFrame.h"
#import "IPSImage.h"

@interface CUICallStackBacktrace : NSObject

	@property (readonly) NSArray<CUIStackFrame *> * stackFrames;

- (instancetype)initWithTextualRepresentation:(NSArray *)inLines error:(NSError **)outError;

- (instancetype)initWithFrames:(NSArray<IPSThreadFrame *> *)inFrames binaryImages:(NSArray<IPSImage *> *)inImages error:(NSError **)outError;

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUICallStackBacktrace.m
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "CUICallStackBacktrace.h"

#import "NSArray+WBExtensions.h"

@interface CUICallStackBacktrace ()

	@property NSArray * stackFrames;

@end

@implementation CUICallStackBacktrace

- (instancetype)initWithTextualRepresentation:(NSArray *)inLines error:(NSError **)outError
{
	if ([inLines isKindOfClass:[NSArray class]]==NO)
	{
		if (outError!=NULL)
			*outError=[NSError errorWithDomain:NSPOSIXErrorDomain code:EINVAL userInfo:@{}];
		
		return nil;
	}
	
	self=[super init];
	
	if (self!=nil)
	{
		__block NSError * tError=nil;
        
        _stackFrames=[inLines WB_arrayByMappingObjectsUsingBlock:^id(NSString * bLine, NSUInteger bLineNumber) {
			
			CUIStackFrame * tCall=[[CUIStackFrame alloc] initWithString:bLine error:&tError];
			
			if (tCall==nil)
			{
                NSLog(@"Error parsing line: %@",bLine);
                
                return nil;
			}
			
			return tCall;
		}];
		
		if (_stackFrames==nil)
        {
            if (outError!=NULL)
                *outError=tError;
            
			return nil;
        }
	}
	
	return self;
}

- (instancetype)initWithFrames:(NSArray<IPSThreadFrame *> *)inFrames binaryImages:(NSArray<IPSImage *> *)inImages error:(NSError **)outError
{
    if ([inFrames isKindOfClass:[NSArray class]]==NO)
    {
        if (outError!=NULL)
            *outError=[NSError errorWithDomain:NSPOSIXErrorDomain code:EINVAL userInfo:@{}];
        
        return nil;
    }
    
    self=[super init];
    
    if (self!=nil)
    {
        _stackFrames=[inFrames WB_arrayByMappingObjectsUsingBlock:^CUIStackFrame *(IPSThreadFrame * bFrame, NSUInteger bIndex) {
            
            CUIStackFrame * tStackFrame=[[CUIStackFrame alloc] initWithThreadFrame:bFrame
                                                                           atIndex:bIndex
                                                                             image:inImages[bFrame.imageIndex]
                                                                             error:NULL];
            
            if (tStackFrame==nil)
            {
                return nil;
            }
            
            return tStackFrame;
            
        }];
    }
    
    return self;
}

#pragma mark -

- (NSString *)description
{
	return self.stackFrames.description;
}

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUICallTableCellView.h
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Cocoa/Cocoa.h>

@interface CUICallTableCellView : NSTableCellView

    @property (assign) IBOutlet NSTextField * callIndexLabel;

    @property (assign) IBOutlet NSTextField * binaryImageLabel;

    @property (assign) IBOutlet NSTextField * addressLabel;

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUICallTableCellView.m
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "CUICallTableCellView.h"

@implementation CUICallTableCellView

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUICallsSelection.h
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Foundation/Foundation.h>

extern NSString * const CUICallsSelectionDidChangeNotification;

@interface CUICallsSelection : NSObject

    @property (nonatomic) NSSet * calls;

    @property (nonatomic,readonly) NSSet * binaryImageIdentifiers;

+ (CUICallsSelection *)sharedCallsSelection;

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUICallsSelection.m
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "CUICallsSelection.h"

#import "CUICallStackBacktrace.h"

NSString * const CUICallsSelectionDidChangeNotification=@"CUICallsSelectionDidChangeNotification";

@implementation CUICallsSelection

+ (CUICallsSelection *)sharedCallsSelection
{
    static CUICallsSelection * sSharedCallsSelection=nil;
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        
        sSharedCallsSelection=[CUICallsSelection new];
        
    });
    
    return sSharedCallsSelection;
}

#pragma mark -

- (void)setCalls:(NSSet *)inCalls
{
    _calls=inCalls;
    
    [NSNotificationCenter.defaultCenter postNotificationName:CUICallsSelectionDidChangeNotification object:self];
}

- (NSSet *)binaryImageIdentifiers
{
    NSMutableSet * tMutableSet=[NSMutableSet set];
    
    [self.calls enumerateObjectsUsingBlock:^(CUIStackFrame * bCall,BOOL * bOutStop) {
        
        NSString * tBinaryImageIdentifier=bCall.binaryImageIdentifier;
        
        if (tBinaryImageIdentifier!=nil)
            [tMutableSet addObject:tBinaryImageIdentifier];
            
    }];
    
    return [tMutableSet copy];
}

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUICaptionView.h
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Cocoa/Cocoa.h>

@interface CUICaptionView : NSTextField

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUICaptionView.m
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import "CUICaptionView.h"

#define CUICaptionMinWidth  40.0

@implementation CUICaptionView

- (NSSize)badgeSizeForString:(NSString*)string
{
    NSSize tSize = [self.attributedStringValue size];
    
    // Paddings
    
    tSize.width += 12.0;
    
    if (tSize.width<CUICaptionMinWidth)
        tSize.width=CUICaptionMinWidth;
    
    return tSize;
}

- (void)drawRect:(NSRect)inRect
{
    NSRect tFrame=self.bounds;
    
    NSSize tBadgeSize = [self badgeSizeForString:self.stringValue];
    
    tBadgeSize.height=NSHeight(tFrame);
    
    NSRect tBadgeRect;
    
    tBadgeRect.origin.x=round(NSMaxX(tFrame)-tBadgeSize.width);
    tBadgeRect.origin.y=round(NSMidY(tFrame)-tBadgeSize.height*0.5);
    tBadgeRect.size=tBadgeSize;
    
    // Draw badge
    
    NSBezierPath* path = [NSBezierPath bezierPathWithRoundedRect:tBadgeRect xRadius:4.0 yRadius:4.0];
    
    if (self.cell.backgroundStyle==NSBackgroundStyleEmphasized)
    {
        [[NSColor colorWithDeviceWhite:0.95 alpha:1.0] setFill];
    }
    else
    {
        [[NSColor tertiaryLabelColor] setFill];
    }
    
    [path fill];
    
    // Draw text
    
    NSMutableParagraphStyle* paragraphStyle = [NSMutableParagraphStyle new];
    paragraphStyle.alignment=NSTextAlignmentCenter;
    
    NSColor * tTextColor=nil;
    
    if (self.cell.backgroundStyle==NSBackgroundStyleEmphasized)
    {
        tTextColor=[NSColor colorWithDeviceWhite:0.25 alpha:1.0];
    }
    else
    {
        tTextColor=[NSColor whiteColor];
    }
    
    NSDictionary* textAttributes = @{NSForegroundColorAttributeName:tTextColor, NSParagraphStyleAttributeName:paragraphStyle};
    
    tBadgeRect.origin.y+=1;
    
    [self.stringValue drawInRect:tBadgeRect withAttributes:textAttributes];
}

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUICategoriesClipView.h
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#import <Cocoa/Cocoa.h>

@interface CUICategoriesClipView : NSClipView

    @property (nonatomic) NSColor * themeBackgroundColor;

@end


================================================
FILE: app_unexpectedly/app_unexpectedly/CUICategoriesClipView.m
================================================
/*
 Copyright (c) 2020-2021, Stephane Sudre
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 - Neither the name of the WhiteBox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
Download .txt
gitextract_4sdmyxfy/

├── .gitignore
├── .gitmodules
├── Configs/
│   ├── CodeSigningConfigurationSettings.xcconfig
│   └── SharedConfigurationSettings.xcconfig
├── Documents Pages/
│   ├── Unexpectedly_Acknowledgements.pages
│   └── Unexpectedly_License.pages
├── LICENSE.txt
├── README.md
├── app_unexpectedly/
│   ├── AppKit + Extensions/
│   │   ├── NSColor+LabelColor.h
│   │   ├── NSColor+LabelColor.m
│   │   ├── NSColor+String.h
│   │   ├── NSColor+String.m
│   │   ├── NSResponder+Appearance.h
│   │   ├── NSResponder+Appearance.m
│   │   ├── NSTableView+Selection.h
│   │   ├── NSTableView+Selection.m
│   │   ├── NSToolbar+Packages.h
│   │   └── NSToolbar+Packages.m
│   ├── Foundation + Extensions/
│   │   ├── NSArray+UniqueName.h
│   │   ├── NSArray+UniqueName.m
│   │   ├── NSArray+WBExtensions.h
│   │   ├── NSArray+WBExtensions.m
│   │   ├── NSDictionary+MutableDeepCopy.h
│   │   ├── NSDictionary+MutableDeepCopy.m
│   │   ├── NSDictionary+WBExtensions.h
│   │   ├── NSDictionary+WBExtensions.m
│   │   ├── NSIndexSet+Analysis.h
│   │   ├── NSIndexSet+Analysis.m
│   │   ├── NSSet+WBExtensions.h
│   │   ├── NSSet+WBExtensions.m
│   │   ├── NSString+CPU.h
│   │   └── NSString+CPU.m
│   ├── RSCore/
│   │   ├── LICENSE.txt
│   │   ├── NSMenuItem+RSCore.h
│   │   └── NSMenuItem+RSCore.m
│   ├── app_unexpectedly/
│   │   ├── AppDelegate.h
│   │   ├── AppDelegate.m
│   │   ├── CUIAATextFieldCell.h
│   │   ├── CUIAATextFieldCell.m
│   │   ├── CUIAboutBoxFooterView.h
│   │   ├── CUIAboutBoxFooterView.m
│   │   ├── CUIAboutBoxWindow.h
│   │   ├── CUIAboutBoxWindow.m
│   │   ├── CUIAboutBoxWindowController.h
│   │   ├── CUIAboutBoxWindowController.m
│   │   ├── CUIApplicationItemAttributes.h
│   │   ├── CUIApplicationItemAttributes.m
│   │   ├── CUIApplicationPreferences+Themes.h
│   │   ├── CUIApplicationPreferences+Themes.m
│   │   ├── CUIApplicationPreferences.h
│   │   ├── CUIApplicationPreferences.m
│   │   ├── CUIApplicationSpecificBacktraceRowView.h
│   │   ├── CUIApplicationSpecificBacktraceRowView.m
│   │   ├── CUIBinaryImage.h
│   │   ├── CUIBinaryImage.m
│   │   ├── CUIBinaryImageUtility.h
│   │   ├── CUIBinaryImageUtility.m
│   │   ├── CUIBinaryImagesViewController.h
│   │   ├── CUIBinaryImagesViewController.m
│   │   ├── CUICallStackBacktrace.h
│   │   ├── CUICallStackBacktrace.m
│   │   ├── CUICallTableCellView.h
│   │   ├── CUICallTableCellView.m
│   │   ├── CUICallsSelection.h
│   │   ├── CUICallsSelection.m
│   │   ├── CUICaptionView.h
│   │   ├── CUICaptionView.m
│   │   ├── CUICategoriesClipView.h
│   │   ├── CUICategoriesClipView.m
│   │   ├── CUICenteredLabelViewController.h
│   │   ├── CUICenteredLabelViewController.m
│   │   ├── CUICenteredLabelViewController.xib
│   │   ├── CUICodeSigningFlagsTableView.h
│   │   ├── CUICodeSigningFlagsTableView.m
│   │   ├── CUICodeSigningInformationViewController.h
│   │   ├── CUICodeSigningInformationViewController.m
│   │   ├── CUICodeType.h
│   │   ├── CUICollectionViewDockedThreadItem.h
│   │   ├── CUICollectionViewDockedThreadItem.m
│   │   ├── CUICollectionViewDockedThreadItem.xib
│   │   ├── CUICollectionViewDockedThreadsLayout.h
│   │   ├── CUICollectionViewDockedThreadsLayout.m
│   │   ├── CUICollectionViewRegisterItem.h
│   │   ├── CUICollectionViewRegisterItem.m
│   │   ├── CUICollectionViewThreadItem.h
│   │   ├── CUICollectionViewThreadItem.m
│   │   ├── CUICollectionViewVisibleThreadItem.h
│   │   ├── CUICollectionViewVisibleThreadItem.m
│   │   ├── CUICollectionViewVisibleThreadItem.xib
│   │   ├── CUICollectionViewVisibleThreadsLayout.h
│   │   ├── CUICollectionViewVisibleThreadsLayout.m
│   │   ├── CUIContentBox.h
│   │   ├── CUIContentBox.m
│   │   ├── CUIContentsViewController.h
│   │   ├── CUIContentsViewController.m
│   │   ├── CUIContentsViewController.xib
│   │   ├── CUICrashDataTransform.h
│   │   ├── CUICrashDataTransform.m
│   │   ├── CUICrashLog+Transform.h
│   │   ├── CUICrashLog+Transform.m
│   │   ├── CUICrashLog+UI.h
│   │   ├── CUICrashLog+UI.m
│   │   ├── CUICrashLog.h
│   │   ├── CUICrashLog.m
│   │   ├── CUICrashLogBacktraces+Utilities.h
│   │   ├── CUICrashLogBacktraces+Utilities.m
│   │   ├── CUICrashLogBacktraces.h
│   │   ├── CUICrashLogBacktraces.m
│   │   ├── CUICrashLogBinaryImages.h
│   │   ├── CUICrashLogBinaryImages.m
│   │   ├── CUICrashLogBrowsingState.h
│   │   ├── CUICrashLogBrowsingState.m
│   │   ├── CUICrashLogBrowsingStateRegistry.h
│   │   ├── CUICrashLogBrowsingStateRegistry.m
│   │   ├── CUICrashLogContentsViewController.h
│   │   ├── CUICrashLogContentsViewController.m
│   │   ├── CUICrashLogContentsViewController.xib
│   │   ├── CUICrashLogDianosticMessages.h
│   │   ├── CUICrashLogDianosticMessages.m
│   │   ├── CUICrashLogErrors.h
│   │   ├── CUICrashLogErrors.m
│   │   ├── CUICrashLogExceptionInformation+QuickHelp.h
│   │   ├── CUICrashLogExceptionInformation+QuickHelp.m
│   │   ├── CUICrashLogExceptionInformation+UI.h
│   │   ├── CUICrashLogExceptionInformation+UI.m
│   │   ├── CUICrashLogExceptionInformation.h
│   │   ├── CUICrashLogExceptionInformation.m
│   │   ├── CUICrashLogHeader.h
│   │   ├── CUICrashLogHeader.m
│   │   ├── CUICrashLogPresentationOutlineViewController.h
│   │   ├── CUICrashLogPresentationOutlineViewController.m
│   │   ├── CUICrashLogPresentationTextViewController.h
│   │   ├── CUICrashLogPresentationTextViewController.m
│   │   ├── CUICrashLogPresentationViewController.h
│   │   ├── CUICrashLogPresentationViewController.m
│   │   ├── CUICrashLogSectionsDetector.h
│   │   ├── CUICrashLogSectionsDetector.m
│   │   ├── CUICrashLogTableCellView.h
│   │   ├── CUICrashLogTableCellView.m
│   │   ├── CUICrashLogTextView.h
│   │   ├── CUICrashLogTextView.m
│   │   ├── CUICrashLogThreadState+UI.h
│   │   ├── CUICrashLogThreadState+UI.m
│   │   ├── CUICrashLogThreadState.h
│   │   ├── CUICrashLogThreadState.m
│   │   ├── CUICrashLogsListViewController.h
│   │   ├── CUICrashLogsListViewController.m
│   │   ├── CUICrashLogsMainViewController.h
│   │   ├── CUICrashLogsMainViewController.m
│   │   ├── CUICrashLogsMainViewController.xib
│   │   ├── CUICrashLogsOpenErrorPanel.h
│   │   ├── CUICrashLogsOpenErrorPanel.m
│   │   ├── CUICrashLogsOpenErrorRecord+UI.h
│   │   ├── CUICrashLogsOpenErrorRecord+UI.m
│   │   ├── CUICrashLogsOpenErrorRecord.h
│   │   ├── CUICrashLogsOpenErrorRecord.m
│   │   ├── CUICrashLogsOpenErrorWindowController.xib
│   │   ├── CUICrashLogsProvider.h
│   │   ├── CUICrashLogsProvider.m
│   │   ├── CUICrashLogsSelection.h
│   │   ├── CUICrashLogsSelection.m
│   │   ├── CUICrashLogsSource+UI.h
│   │   ├── CUICrashLogsSource+UI.m
│   │   ├── CUICrashLogsSource.h
│   │   ├── CUICrashLogsSource.m
│   │   ├── CUICrashLogsSourceAll+UI.h
│   │   ├── CUICrashLogsSourceAll+UI.m
│   │   ├── CUICrashLogsSourceAll.h
│   │   ├── CUICrashLogsSourceAll.m
│   │   ├── CUICrashLogsSourceDirectory.h
│   │   ├── CUICrashLogsSourceDirectory.m
│   │   ├── CUICrashLogsSourceFile.h
│   │   ├── CUICrashLogsSourceFile.m
│   │   ├── CUICrashLogsSourceFileSystemItem.h
│   │   ├── CUICrashLogsSourceFileSystemItem.m
│   │   ├── CUICrashLogsSourceSeparator.h
│   │   ├── CUICrashLogsSourceSeparator.m
│   │   ├── CUICrashLogsSourceSmart.h
│   │   ├── CUICrashLogsSourceSmart.m
│   │   ├── CUICrashLogsSourceSmartEditorPanel.h
│   │   ├── CUICrashLogsSourceSmartEditorPanel.m
│   │   ├── CUICrashLogsSourceStandardDirectory+UI.h
│   │   ├── CUICrashLogsSourceStandardDirectory+UI.m
│   │   ├── CUICrashLogsSourceStandardDirectory.h
│   │   ├── CUICrashLogsSourceStandardDirectory.m
│   │   ├── CUICrashLogsSourceTableCellView.h
│   │   ├── CUICrashLogsSourceTableCellView.m
│   │   ├── CUICrashLogsSourceToday+UI.h
│   │   ├── CUICrashLogsSourceToday+UI.m
│   │   ├── CUICrashLogsSourceToday.h
│   │   ├── CUICrashLogsSourceToday.m
│   │   ├── CUICrashLogsSourcesManager.h
│   │   ├── CUICrashLogsSourcesManager.m
│   │   ├── CUICrashLogsSourcesSelection.h
│   │   ├── CUICrashLogsSourcesSelection.m
│   │   ├── CUICrashLogsSourcesViewController.h
│   │   ├── CUICrashLogsSourcesViewController.m
│   │   ├── CUICrashReporterDefaults.h
│   │   ├── CUICrashReporterDefaults.m
│   │   ├── CUICrashedThreadCallRowView.h
│   │   ├── CUICrashedThreadCallRowView.m
│   │   ├── CUICrashedThreadRowView.h
│   │   ├── CUICrashedThreadRowView.m
│   │   ├── CUIDataTransform.h
│   │   ├── CUIDataTransform.m
│   │   ├── CUIExceptionTypePopUpViewController.h
│   │   ├── CUIExceptionTypePopUpViewController.m
│   │   ├── CUIExportAccessoryViewController.h
│   │   ├── CUIExportAccessoryViewController.m
│   │   ├── CUIFileDeadDropView.h
│   │   ├── CUIFileDeadDropView.m
│   │   ├── CUIFontAndColorsFramedView.h
│   │   ├── CUIFontAndColorsFramedView.m
│   │   ├── CUIFontBoxView.h
│   │   ├── CUIFontBoxView.m
│   │   ├── CUIHopperDisassemblerManager.h
│   │   ├── CUIHopperDisassemblerManager.m
│   │   ├── CUIIPSTransform.h
│   │   ├── CUIIPSTransform.m
│   │   ├── CUIInactiveButton.h
│   │   ├── CUIInactiveButton.m
│   │   ├── CUIInspectorAlternateBackgroundView.h
│   │   ├── CUIInspectorAlternateBackgroundView.m
│   │   ├── CUIInspectorExecutableViewController.h
│   │   ├── CUIInspectorExecutableViewController.m
│   │   ├── CUIInspectorGeneralViewController.h
│   │   ├── CUIInspectorGeneralViewController.m
│   │   ├── CUIInspectorProcessesViewController.h
│   │   ├── CUIInspectorProcessesViewController.m
│   │   ├── CUIInspectorStackableViewController.h
│   │   ├── CUIInspectorStackableViewController.m
│   │   ├── CUIInspectorUserViewController.h
│   │   ├── CUIInspectorUserViewController.m
│   │   ├── CUIInspectorViewController.h
│   │   ├── CUIInspectorViewController.m
│   │   ├── CUIInspectorViewController.xib
│   │   ├── CUIKeyViews.h
│   │   ├── CUILightTableDockedThreadView.h
│   │   ├── CUILightTableDockedThreadView.m
│   │   ├── CUILightTableThreadView.h
│   │   ├── CUILightTableThreadView.m
│   │   ├── CUILightTableViewController.h
│   │   ├── CUILightTableViewController.m
│   │   ├── CUILightTableViewController.xib
│   │   ├── CUILightTableVisibleInterGapView.h
│   │   ├── CUILightTableVisibleInterGapView.m
│   │   ├── CUILightTableVisibleThreadView.h
│   │   ├── CUILightTableVisibleThreadView.m
│   │   ├── CUILineJumperWindowController.h
│   │   ├── CUILineJumperWindowController.m
│   │   ├── CUIMainWindow.h
│   │   ├── CUIMainWindow.m
│   │   ├── CUIMainWindowController.h
│   │   ├── CUIMainWindowController.m
│   │   ├── CUINavigationChevronView.h
│   │   ├── CUINavigationChevronView.m
│   │   ├── CUINavigationView.h
│   │   ├── CUINavigationView.m
│   │   ├── CUIOperatingSystemVersion.h
│   │   ├── CUIOperatingSystemVersion.m
│   │   ├── CUIOutlineModeDisplaySettings.h
│   │   ├── CUIOutlineModeDisplaySettings.m
│   │   ├── CUIParsingErrors.h
│   │   ├── CUIParsingErrors.m
│   │   ├── CUIPreferencePaneAdvancedViewController.h
│   │   ├── CUIPreferencePaneAdvancedViewController.m
│   │   ├── CUIPreferencePaneCrashreporterViewController.h
│   │   ├── CUIPreferencePaneCrashreporterViewController.m
│   │   ├── CUIPreferencePaneFontscolorsViewController.h
│   │   ├── CUIPreferencePaneFontscolorsViewController.m
│   │   ├── CUIPreferencePaneGeneralViewController.h
│   │   ├── CUIPreferencePaneGeneralViewController.m
│   │   ├── CUIPreferencePanePresentationOutlineViewController.h
│   │   ├── CUIPreferencePanePresentationOutlineViewController.m
│   │   ├── CUIPreferencePanePresentationTextViewController.h
│   │   ├── CUIPreferencePanePresentationTextViewController.m
│   │   ├── CUIPreferencePanePresentationViewController.h
│   │   ├── CUIPreferencePanePresentationViewController.m
│   │   ├── CUIPreferencePaneSymbolicationViewController.h
│   │   ├── CUIPreferencePaneSymbolicationViewController.m
│   │   ├── CUIPreferencePaneViewController.h
│   │   ├── CUIPreferencePaneViewController.m
│   │   ├── CUIPreferencesTabBox.h
│   │   ├── CUIPreferencesTabBox.m
│   │   ├── CUIPreferencesTabButton.h
│   │   ├── CUIPreferencesTabButton.m
│   │   ├── CUIPreferencesTabHeaderView.h
│   │   ├── CUIPreferencesTabHeaderView.m
│   │   ├── CUIPreferencesWindow.h
│   │   ├── CUIPreferencesWindow.m
│   │   ├── CUIPreferencesWindowController+Convenience.h
│   │   ├── CUIPreferencesWindowController+Convenience.m
│   │   ├── CUIPreferencesWindowController.h
│   │   ├── CUIPreferencesWindowController.m
│   │   ├── CUIPresentationTextNavigationViewController.h
│   │   ├── CUIPresentationTextNavigationViewController.m
│   │   ├── CUIPresentationTextNavigationViewController.xib
│   │   ├── CUIQuickHelpPopUpViewController.h
│   │   ├── CUIQuickHelpPopUpViewController.m
│   │   ├── CUIQuickHelpPopUpViewController.xib
│   │   ├── CUIRawCrashLog+Path.h
│   │   ├── CUIRawCrashLog+Path.m
│   │   ├── CUIRawCrashLog+UI.h
│   │   ├── CUIRawCrashLog+UI.m
│   │   ├── CUIRawCrashLog.h
│   │   ├── CUIRawCrashLog.m
│   │   ├── CUIRegister.h
│   │   ├── CUIRegister.m
│   │   ├── CUIRegisterLabel.h
│   │   ├── CUIRegisterLabel.m
│   │   ├── CUIRegistersMainViewController.h
│   │   ├── CUIRegistersMainViewController.m
│   │   ├── CUIRegistersMainViewController.xib
│   │   ├── CUIRegistersViewController.h
│   │   ├── CUIRegistersViewController.m
│   │   ├── CUIRegistersViewController.xib
│   │   ├── CUIRegistersWindowController.h
│   │   ├── CUIRegistersWindowController.m
│   │   ├── CUIRegistersWindowController.xib
│   │   ├── CUIReportThemedTransform.h
│   │   ├── CUIReportThemedTransform.m
│   │   ├── CUIRightViewController.h
│   │   ├── CUIRightViewController.m
│   │   ├── CUIRightViewController.xib
│   │   ├── CUIRoundedRectBezelView.h
│   │   ├── CUIRoundedRectBezelView.m
│   │   ├── CUISelectedWhiteTextFieldCell.h
│   │   ├── CUISelectedWhiteTextFieldCell.m
│   │   ├── CUISidebarViewController.h
│   │   ├── CUISidebarViewController.m
│   │   ├── CUISidebarViewController.xib
│   │   ├── CUISourceFileTableCellView.h
│   │   ├── CUISourceFileTableCellView.m
│   │   ├── CUIStackFrame+UI.h
│   │   ├── CUIStackFrame+UI.m
│   │   ├── CUIStackFrame.h
│   │   ├── CUIStackFrame.m
│   │   ├── CUIStackFrameComponents.h
│   │   ├── CUISymbolicationData.h
│   │   ├── CUISymbolicationData.m
│   │   ├── CUISymbolicationDataCache.h
│   │   ├── CUISymbolicationDataCache.m
│   │   ├── CUISymbolicationDataFormatter.h
│   │   ├── CUISymbolicationDataFormatter.m
│   │   ├── CUISymbolicationManager.h
│   │   ├── CUISymbolicationManager.m
│   │   ├── CUISymbolsFilesLibraryViewController.h
│   │   ├── CUISymbolsFilesLibraryViewController.m
│   │   ├── CUITableCustomSelectionColorRowView.h
│   │   ├── CUITableCustomSelectionColorRowView.m
│   │   ├── CUITableViewNoSpace.h
│   │   ├── CUITableViewNoSpace.m
│   │   ├── CUITerminationReasonPopUpViewController.h
│   │   ├── CUITerminationReasonPopUpViewController.m
│   │   ├── CUITextModeDisplaySettings.h
│   │   ├── CUITextModeDisplaySettings.m
│   │   ├── CUITheme.h
│   │   ├── CUITheme.m
│   │   ├── CUIThemeItemAttributes.h
│   │   ├── CUIThemeItemAttributes.m
│   │   ├── CUIThemeItemsGroup+UI.h
│   │   ├── CUIThemeItemsGroup+UI.m
│   │   ├── CUIThemeItemsGroup.h
│   │   ├── CUIThemeItemsGroup.m
│   │   ├── CUIThemesManager.h
│   │   ├── CUIThemesManager.m
│   │   ├── CUIThemesTableView.h
│   │   ├── CUIThemesTableView.m
│   │   ├── CUIThread.h
│   │   ├── CUIThread.m
│   │   ├── CUIThreadImageCell.h
│   │   ├── CUIThreadImageCell.m
│   │   ├── CUIThreadImageView.h
│   │   ├── CUIThreadImageView.m
│   │   ├── CUIThreadNamedTableCellView.h
│   │   ├── CUIThreadNamedTableCellView.m
│   │   ├── CUIThreadsColumnViewController.h
│   │   ├── CUIThreadsColumnViewController.m
│   │   ├── CUIThreadsColumnViewController.xib
│   │   ├── CUIThreadsColumnViewController_RTL.xib
│   │   ├── CUIThreadsListViewController.h
│   │   ├── CUIThreadsListViewController.m
│   │   ├── CUIThreadsListViewController.xib
│   │   ├── CUIThreadsListViewController_RTL.xib
│   │   ├── CUIThreadsViewController.h
│   │   ├── CUIThreadsViewController.m
│   │   ├── CUIdSYMBundlesManager.h
│   │   ├── CUIdSYMBundlesManager.m
│   │   ├── CUIdSYMDropView.h
│   │   ├── CUIdSYMDropView.m
│   │   ├── CUIdSYMHunter.h
│   │   ├── CUIdSYMHunter.m
│   │   ├── CodeSigningFlags.plist
│   │   ├── DWARF/
│   │   │   ├── DWRFEnums.h
│   │   │   ├── DWRFFileObject.h
│   │   │   ├── DWRFFileObject.m
│   │   │   ├── DWRFObject.h
│   │   │   ├── DWRFObject.m
│   │   │   ├── DWRFSection_debug_abbrev.h
│   │   │   ├── DWRFSection_debug_abbrev.m
│   │   │   ├── DWRFSection_debug_addr.h
│   │   │   ├── DWRFSection_debug_addr.m
│   │   │   ├── DWRFSection_debug_aranges.h
│   │   │   ├── DWRFSection_debug_aranges.m
│   │   │   ├── DWRFSection_debug_info.h
│   │   │   ├── DWRFSection_debug_info.m
│   │   │   ├── DWRFSection_debug_line.h
│   │   │   ├── DWRFSection_debug_line.m
│   │   │   ├── DWRFSection_debug_str.h
│   │   │   ├── DWRFSection_debug_str.m
│   │   │   ├── DWRFSection_debug_str_offsets.h
│   │   │   ├── DWRFSection_debug_str_offsets.m
│   │   │   ├── LEB128.c
│   │   │   └── LEB128.h
│   │   ├── Demangling/
│   │   │   ├── CUICXXDemangler.h
│   │   │   ├── CUICXXDemangler.mm
│   │   │   ├── CUISwiftDemangler.h
│   │   │   └── CUISwiftDemangler.m
│   │   ├── Extemal/
│   │   │   └── Line View Test/
│   │   │       ├── Controller.h
│   │   │       ├── Controller.m
│   │   │       ├── English.lproj/
│   │   │       │   ├── InfoPlist.strings
│   │   │       │   └── MainMenu.nib/
│   │   │       │       ├── designable.nib
│   │   │       │       └── keyedobjects.nib
│   │   │       ├── Info.plist
│   │   │       ├── Line View Test.xcodeproj/
│   │   │       │   ├── TemplateIcon.icns
│   │   │       │   ├── project.pbxproj
│   │   │       │   └── project.xcworkspace/
│   │   │       │       ├── contents.xcworkspacedata
│   │   │       │       └── xcshareddata/
│   │   │       │           └── IDEWorkspaceChecks.plist
│   │   │       ├── Line View Test_Prefix.pch
│   │   │       ├── MarkerLineNumberView.h
│   │   │       ├── MarkerLineNumberView.m
│   │   │       ├── NoodleLineNumberMarker.h
│   │   │       ├── NoodleLineNumberMarker.m
│   │   │       ├── NoodleLineNumberView.h
│   │   │       ├── NoodleLineNumberView.m
│   │   │       ├── Read Me.rtf
│   │   │       └── main.m
│   │   ├── Help/
│   │   │   ├── en.lproj/
│   │   │   │   ├── ENDPOINTSECURITY_2.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGBUS.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGSEGV.html
│   │   │   │   ├── EXC_BAD_INSTRUCTION_SIGILL.html
│   │   │   │   ├── EXC_BREAKPOINT_SIGTRAP.html
│   │   │   │   ├── EXC_CRASH_Code Signature Invalid.html
│   │   │   │   ├── EXC_CRASH_SIGABRT.html
│   │   │   │   ├── EXC_CRASH_SIGKILL.html
│   │   │   │   ├── EXC_CRASH_SIGQUIT.html
│   │   │   │   ├── EXC_CRASH_SIGSEGV.html
│   │   │   │   ├── EXC_GUARD.html
│   │   │   │   ├── unknown_exception_type.html
│   │   │   │   └── unknown_termination_reason.html
│   │   │   ├── es.lproj/
│   │   │   │   ├── ENDPOINTSECURITY_2.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGBUS.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGSEGV.html
│   │   │   │   ├── EXC_BAD_INSTRUCTION_SIGILL.html
│   │   │   │   ├── EXC_BREAKPOINT_SIGTRAP.html
│   │   │   │   ├── EXC_CRASH_Code Signature Invalid.html
│   │   │   │   ├── EXC_CRASH_SIGABRT.html
│   │   │   │   ├── EXC_CRASH_SIGKILL.html
│   │   │   │   ├── EXC_CRASH_SIGQUIT.html
│   │   │   │   ├── EXC_CRASH_SIGSEGV.html
│   │   │   │   ├── EXC_GUARD.html
│   │   │   │   ├── unknown_exception_type.html
│   │   │   │   └── unknown_termination_reason.html
│   │   │   ├── fr.lproj/
│   │   │   │   ├── ENDPOINTSECURITY_2.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGBUS.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGSEGV.html
│   │   │   │   ├── EXC_BAD_INSTRUCTION_SIGILL.html
│   │   │   │   ├── EXC_BREAKPOINT_SIGTRAP.html
│   │   │   │   ├── EXC_CRASH_Code Signature Invalid.html
│   │   │   │   ├── EXC_CRASH_SIGABRT.html
│   │   │   │   ├── EXC_CRASH_SIGKILL.html
│   │   │   │   ├── EXC_CRASH_SIGQUIT.html
│   │   │   │   ├── EXC_CRASH_SIGSEGV.html
│   │   │   │   ├── EXC_GUARD.html
│   │   │   │   ├── unknown_exception_type.html
│   │   │   │   └── unknown_termination_reason.html
│   │   │   ├── he.lproj/
│   │   │   │   ├── ENDPOINTSECURITY_2.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGBUS.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGSEGV.html
│   │   │   │   ├── EXC_BAD_INSTRUCTION_SIGILL.html
│   │   │   │   ├── EXC_BREAKPOINT_SIGTRAP.html
│   │   │   │   ├── EXC_CRASH_Code Signature Invalid.html
│   │   │   │   ├── EXC_CRASH_SIGABRT.html
│   │   │   │   ├── EXC_CRASH_SIGKILL.html
│   │   │   │   ├── EXC_CRASH_SIGQUIT.html
│   │   │   │   ├── EXC_CRASH_SIGSEGV.html
│   │   │   │   ├── EXC_GUARD.html
│   │   │   │   ├── unknown_exception_type.html
│   │   │   │   └── unknown_termination_reason.html
│   │   │   ├── ja.lproj/
│   │   │   │   ├── ENDPOINTSECURITY_2.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGBUS.html
│   │   │   │   ├── EXC_BAD_ACCESS_SIGSEGV.html
│   │   │   │   ├── EXC_BAD_INSTRUCTION_SIGILL.html
│   │   │   │   ├── EXC_BREAKPOINT_SIGTRAP.html
│   │   │   │   ├── EXC_CRASH_Code Signature Invalid.html
│   │   │   │   ├── EXC_CRASH_SIGABRT.html
│   │   │   │   ├── EXC_CRASH_SIGKILL.html
│   │   │   │   ├── EXC_CRASH_SIGQUIT.html
│   │   │   │   ├── EXC_CRASH_SIGSEGV.html
│   │   │   │   ├── EXC_GUARD.html
│   │   │   │   ├── unknown_exception_type.html
│   │   │   │   └── unknown_termination_reason.html
│   │   │   ├── known_exceptions.css
│   │   │   └── known_termination_reasons.css
│   │   ├── Images.xcassets/
│   │   │   ├── AppIcon.appiconset/
│   │   │   │   └── Contents.json
│   │   │   ├── Contents.json
│   │   │   ├── FontPanelButton.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── TextMode.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── binaryImage_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── bottom_disclose_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── bottom_hide_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── bytesOffset_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-appkit.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-audiospeech.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-database.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-foundation.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-framework.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-generic.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-graphics.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-languages.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-network.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-security.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-system.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-usercode.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── call-webinternet.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── crashedThread_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── crashreporter.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── filter_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── left_switch_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── menuBacktraces.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── menuBinaryImage.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── menuDiagnostic.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── menuException.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── menuHeader.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── menuThread.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── menuThreadCrashed.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── menuThreadState.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── middle_switch_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── presentation_structured_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── presentation_text_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── quote_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── right_switch_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── sidebar_recents_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── smallColumn_RTL_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── smallColumn_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── smallCrashedThread_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── smallLightTable_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── symbolication_Template.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── templateBlue.imageset/
│   │   │   │   └── Contents.json
│   │   │   └── thread_Template.imageset/
│   │   │       └── Contents.json
│   │   ├── Info.plist
│   │   ├── Mach-o/
│   │   │   ├── MCHLoadCommand.h
│   │   │   ├── MCHLoadCommand.m
│   │   │   ├── MCHMachBinary.h
│   │   │   ├── MCHMachBinary.m
│   │   │   ├── MCHMemoryBufferWrapper.h
│   │   │   ├── MCHMemoryBufferWrapper.m
│   │   │   ├── MCHObjectFile.h
│   │   │   ├── MCHObjectFile.m
│   │   │   ├── MCHSection.h
│   │   │   ├── MCHSection.m
│   │   │   ├── MCHSegment.h
│   │   │   ├── MCHSegment.m
│   │   │   ├── MCHSegmentLoadCommand.h
│   │   │   ├── MCHSegmentLoadCommand.m
│   │   │   ├── MCHUUIDLoadCommand.h
│   │   │   └── MCHUUIDLoadCommand.m
│   │   ├── NSBundle+dSYM.h
│   │   ├── NSBundle+dSYM.m
│   │   ├── NSCrashLogTextScrollView.h
│   │   ├── NSCrashLogTextScrollView.m
│   │   ├── NSFileManager+ExtendedAttributes.h
│   │   ├── NSFileManager+ExtendedAttributes.m
│   │   ├── WBRemoteVersionChecker.h
│   │   ├── WBRemoteVersionChecker.m
│   │   ├── app_unexpectedly_Prefix.pch
│   │   ├── clock/
│   │   │   ├── CUIApplicationIconView.h
│   │   │   ├── CUIApplicationIconView.m
│   │   │   ├── CUIWatchAxis.h
│   │   │   ├── CUIWatchAxis.m
│   │   │   ├── CUIWatchBridge.h
│   │   │   ├── CUIWatchBridge.m
│   │   │   ├── CUIWatchDrawablePart.h
│   │   │   ├── CUIWatchGear.h
│   │   │   ├── CUIWatchGear.m
│   │   │   ├── CUIWatchJewel.h
│   │   │   ├── CUIWatchJewel.m
│   │   │   ├── CUIWatchPart.h
│   │   │   ├── CUIWatchPart.m
│   │   │   ├── CUIWatchScrew.h
│   │   │   └── CUIWatchScrew.m
│   │   ├── dSYM/
│   │   │   ├── CUIdSYMBundle+UI.h
│   │   │   ├── CUIdSYMBundle+UI.m
│   │   │   ├── CUIdSYMBundle.h
│   │   │   └── CUIdSYMBundle.m
│   │   ├── default_themes.plist
│   │   ├── en.lproj/
│   │   │   ├── CUIAboutBoxWindowController.xib
│   │   │   ├── CUIBinaryImagesViewController.xib
│   │   │   ├── CUICodeSigningInformationViewController.xib
│   │   │   ├── CUICollectionViewRegisterItem.xib
│   │   │   ├── CUICrashLogPresentationOutlineViewController.xib
│   │   │   ├── CUICrashLogPresentationTextViewController.xib
│   │   │   ├── CUICrashLogsListViewController.xib
│   │   │   ├── CUICrashLogsSourceSmartEditorWindowController.xib
│   │   │   ├── CUICrashLogsSourcesViewController.xib
│   │   │   ├── CUIExportAccessoryViewController.xib
│   │   │   ├── CUIInspectorExecutableViewController.xib
│   │   │   ├── CUIInspectorGeneralViewController.xib
│   │   │   ├── CUIInspectorProcessesViewController.xib
│   │   │   ├── CUIInspectorUserViewController.xib
│   │   │   ├── CUILineJumperWindowController.xib
│   │   │   ├── CUIMainWindowController.xib
│   │   │   ├── CUIPreferencePaneAdvancedViewController.xib
│   │   │   ├── CUIPreferencePaneCrashreporterViewController.xib
│   │   │   ├── CUIPreferencePaneFontscolorsViewController.xib
│   │   │   ├── CUIPreferencePaneGeneralViewController.xib
│   │   │   ├── CUIPreferencePanePresentationOutlineViewController.xib
│   │   │   ├── CUIPreferencePanePresentationTextViewController.xib
│   │   │   ├── CUIPreferencePanePresentationViewController.xib
│   │   │   ├── CUIPreferencePaneSymbolicationViewController.xib
│   │   │   ├── CUIPreferencesWindowController.xib
│   │   │   ├── CUISymbolsFilesLibraryViewController.xib
│   │   │   ├── CodeSigning.strings
│   │   │   ├── InfoPlist.strings
│   │   │   ├── Localizable.strings
│   │   │   ├── MainMenu.xib
│   │   │   ├── Predicates.strings
│   │   │   └── RemoteCheck.strings
│   │   ├── es.lproj/
│   │   │   ├── CUIAboutBoxWindowController.xib
│   │   │   ├── CUIBinaryImagesViewController.xib
│   │   │   ├── CUICodeSigningInformationViewController.xib
│   │   │   ├── CUICollectionViewRegisterItem.xib
│   │   │   ├── CUICrashLogPresentationOutlineViewController.xib
│   │   │   ├── CUICrashLogPresentationTextViewController.xib
│   │   │   ├── CUICrashLogsListViewController.xib
│   │   │   ├── CUICrashLogsSourceSmartEditorWindowController.xib
│   │   │   ├── CUICrashLogsSourcesViewController.xib
│   │   │   ├── CUIExportAccessoryViewController.xib
│   │   │   ├── CUIInspectorExecutableViewController.xib
│   │   │   ├── CUIInspectorGeneralViewController.xib
│   │   │   ├── CUIInspectorProcessesViewController.xib
│   │   │   ├── CUIInspectorUserViewController.xib
│   │   │   ├── CUILineJumperWindowController.xib
│   │   │   ├── CUIMainWindowController.xib
│   │   │   ├── CUIPreferencePaneAdvancedViewController.xib
│   │   │   ├── CUIPreferencePaneCrashreporterViewController.xib
│   │   │   ├── CUIPreferencePaneFontscolorsViewController.xib
│   │   │   ├── CUIPreferencePaneGeneralViewController.xib
│   │   │   ├── CUIPreferencePanePresentationOutlineViewController.xib
│   │   │   ├── CUIPreferencePanePresentationTextViewController.xib
│   │   │   ├── CUIPreferencePanePresentationViewController.xib
│   │   │   ├── CUIPreferencePaneSymbolicationViewController.xib
│   │   │   ├── CUIPreferencesWindowController.xib
│   │   │   ├── CUISymbolsFilesLibraryViewController.xib
│   │   │   ├── CodeSigning.strings
│   │   │   ├── InfoPlist.strings
│   │   │   ├── Localizable.strings
│   │   │   ├── MainMenu.xib
│   │   │   ├── Predicates.strings
│   │   │   └── RemoteCheck.strings
│   │   ├── fr.lproj/
│   │   │   ├── CUIAboutBoxWindowController.xib
│   │   │   ├── CUIBinaryImagesViewController.xib
│   │   │   ├── CUICodeSigningInformationViewController.xib
│   │   │   ├── CUICollectionViewRegisterItem.xib
│   │   │   ├── CUICrashLogPresentationOutlineViewController.xib
│   │   │   ├── CUICrashLogPresentationTextViewController.xib
│   │   │   ├── CUICrashLogsListViewController.xib
│   │   │   ├── CUICrashLogsSourceSmartEditorWindowController.xib
│   │   │   ├── CUICrashLogsSourcesViewController.xib
│   │   │   ├── CUIExportAccessoryViewController.xib
│   │   │   ├── CUIInspectorExecutableViewController.xib
│   │   │   ├── CUIInspectorGeneralViewController.xib
│   │   │   ├── CUIInspectorProcessesViewController.xib
│   │   │   ├── CUIInspectorUserViewController.xib
│   │   │   ├── CUILineJumperWindowController.xib
│   │   │   ├── CUIMainWindowController.xib
│   │   │   ├── CUIPreferencePaneAdvancedViewController.xib
│   │   │   ├── CUIPreferencePaneCrashreporterViewController.xib
│   │   │   ├── CUIPreferencePaneFontscolorsViewController.xib
│   │   │   ├── CUIPreferencePaneGeneralViewController.xib
│   │   │   ├── CUIPreferencePanePresentationOutlineViewController.xib
│   │   │   ├── CUIPreferencePanePresentationTextViewController.xib
│   │   │   ├── CUIPreferencePanePresentationViewController.xib
│   │   │   ├── CUIPreferencePaneSymbolicationViewController.xib
│   │   │   ├── CUIPreferencesWindowController.xib
│   │   │   ├── CUISymbolsFilesLibraryViewController.xib
│   │   │   ├── CodeSigning.strings
│   │   │   ├── InfoPlist.strings
│   │   │   ├── Localizable.strings
│   │   │   ├── MainMenu.xib
│   │   │   ├── Predicates.strings
│   │   │   └── RemoteCheck.strings
│   │   ├── he.lproj/
│   │   │   ├── CUIAboutBoxWindowController.xib
│   │   │   ├── CUIBinaryImagesViewController.xib
│   │   │   ├── CUICodeSigningInformationViewController.xib
│   │   │   ├── CUICollectionViewRegisterItem.xib
│   │   │   ├── CUICrashLogPresentationOutlineViewController.xib
│   │   │   ├── CUICrashLogPresentationTextViewController.xib
│   │   │   ├── CUICrashLogsListViewController.xib
│   │   │   ├── CUICrashLogsSourceSmartEditorWindowController.xib
│   │   │   ├── CUICrashLogsSourcesViewController.xib
│   │   │   ├── CUIExportAccessoryViewController.xib
│   │   │   ├── CUIInspectorExecutableViewController.xib
│   │   │   ├── CUIInspectorGeneralViewController.xib
│   │   │   ├── CUIInspectorProcessesViewController.xib
│   │   │   ├── CUIInspectorUserViewController.xib
│   │   │   ├── CUILineJumperWindowController.xib
│   │   │   ├── CUIMainWindowController.xib
│   │   │   ├── CUIPreferencePaneAdvancedViewController.xib
│   │   │   ├── CUIPreferencePaneCrashreporterViewController.xib
│   │   │   ├── CUIPreferencePaneFontscolorsViewController.xib
│   │   │   ├── CUIPreferencePaneGeneralViewController.xib
│   │   │   ├── CUIPreferencePanePresentationOutlineViewController.xib
│   │   │   ├── CUIPreferencePanePresentationTextViewController.xib
│   │   │   ├── CUIPreferencePanePresentationViewController.xib
│   │   │   ├── CUIPreferencePaneSymbolicationViewController.xib
│   │   │   ├── CUIPreferencesWindowController.xib
│   │   │   ├── CUISymbolsFilesLibraryViewController.xib
│   │   │   ├── CodeSigning.strings
│   │   │   ├── InfoPlist.strings
│   │   │   ├── Localizable.strings
│   │   │   ├── MainMenu.xib
│   │   │   ├── Predicates.strings
│   │   │   └── RemoteCheck.strings
│   │   ├── images/
│   │   │   ├── philo_stone.psd
│   │   │   ├── recents.psd
│   │   │   ├── recents@2x.psd
│   │   │   └── symbolication@2x.psd
│   │   ├── ips + Extensions/
│   │   │   ├── IPSImage+Offset.h
│   │   │   └── IPSImage+Offset.m
│   │   ├── ja.lproj/
│   │   │   ├── CUIAboutBoxWindowController.xib
│   │   │   ├── CUIBinaryImagesViewController.xib
│   │   │   ├── CUICodeSigningInformationViewController.xib
│   │   │   ├── CUICollectionViewRegisterItem.xib
│   │   │   ├── CUICrashLogPresentationOutlineViewController.xib
│   │   │   ├── CUICrashLogPresentationTextViewController.xib
│   │   │   ├── CUICrashLogsListViewController.xib
│   │   │   ├── CUICrashLogsSourceSmartEditorWindowController.xib
│   │   │   ├── CUICrashLogsSourcesViewController.xib
│   │   │   ├── CUIExportAccessoryViewController.xib
│   │   │   ├── CUIInspectorExecutableViewController.xib
│   │   │   ├── CUIInspectorGeneralViewController.xib
│   │   │   ├── CUIInspectorProcessesViewController.xib
│   │   │   ├── CUIInspectorUserViewController.xib
│   │   │   ├── CUILineJumperWindowController.xib
│   │   │   ├── CUIMainWindowController.xib
│   │   │   ├── CUIPreferencePaneAdvancedViewController.xib
│   │   │   ├── CUIPreferencePaneCrashreporterViewController.xib
│   │   │   ├── CUIPreferencePaneFontscolorsViewController.xib
│   │   │   ├── CUIPreferencePaneGeneralViewController.xib
│   │   │   ├── CUIPreferencePanePresentationOutlineViewController.xib
│   │   │   ├── CUIPreferencePanePresentationTextViewController.xib
│   │   │   ├── CUIPreferencePanePresentationViewController.xib
│   │   │   ├── CUIPreferencePaneSymbolicationViewController.xib
│   │   │   ├── CUIPreferencesWindowController.xib
│   │   │   ├── CUISymbolsFilesLibraryViewController.xib
│   │   │   ├── CodeSigning.strings
│   │   │   ├── InfoPlist.strings
│   │   │   ├── Localizable.strings
│   │   │   ├── MainMenu.xib
│   │   │   ├── Predicates.strings
│   │   │   └── RemoteCheck.strings
│   │   ├── main.m
│   │   └── template.source
│   └── app_unexpectedly.xcodeproj/
│       ├── project.pbxproj
│       ├── project.xcworkspace/
│       │   ├── contents.xcworkspacedata
│       │   └── xcshareddata/
│       │       └── IDEWorkspaceChecks.plist
│       ├── xcshareddata/
│       │   └── xcschemes/
│       │       └── app_unexpectedly.xcscheme
│       └── xcuserdata/
│           └── stephane.xcuserdatad/
│               ├── xcdebugger/
│               │   └── Breakpoints_v2.xcbkptlist
│               └── xcschemes/
│                   └── xcschememanagement.plist
├── build.sh
├── distribution/
│   ├── Documents/
│   │   └── ReadMe.rtf
│   ├── Template/
│   │   └── Template_ro.dmg
│   ├── Unexpectedly.pkgproj
│   └── Version
└── plugin_quicklook/
    ├── crashreport/
    │   ├── GeneratePreviewForURL.m
    │   ├── GenerateThumbnailForURL.m
    │   ├── Info.plist
    │   ├── NSUserDefaults+UNXQuickLookGenerator.h
    │   ├── NSUserDefaults+UNXQuickLookGenerator.m
    │   ├── QLCUIThemesProvider.h
    │   ├── QLCUIThemesProvider.m
    │   └── main.c
    └── crashreport.xcodeproj/
        ├── project.pbxproj
        ├── project.xcworkspace/
        │   └── xcshareddata/
        │       └── IDEWorkspaceChecks.plist
        └── xcuserdata/
            └── stephane.xcuserdatad/
                └── xcschemes/
                    └── xcschememanagement.plist
Download .txt
SYMBOL INDEX (22 symbols across 14 files)

FILE: app_unexpectedly/app_unexpectedly/CUICenteredLabelViewController.h
  type CUILabelSizeRegular (line 16) | typedef NS_ENUM(NSUInteger, CUILabelSize)

FILE: app_unexpectedly/app_unexpectedly/CUICrashLogErrors.h
  function NS_ERROR_ENUM (line 18) | NS_ERROR_ENUM(CUICrashLogDomain)

FILE: app_unexpectedly/app_unexpectedly/CUICrashLogPresentationViewController.h
  function interface (line 29) | interface CUICrashLogPresentationViewController : NSViewController <CUIK...

FILE: app_unexpectedly/app_unexpectedly/CUICrashLogsSource.h
  type CUICrashLogsSourceTypeUnknown (line 26) | typedef NS_ENUM(NSUInteger, CUICrashLogsSourceType)

FILE: app_unexpectedly/app_unexpectedly/CUICrashReporterDefaults.h
  type CUICrashReporterDialogTypeBasic (line 16) | typedef NS_ENUM(NSUInteger, CUICrashReporterDialogType)
  type CUICrashReporterNotificationModeDialog (line 23) | typedef NS_ENUM(NSUInteger, CUICrashReporterNotificationMode)

FILE: app_unexpectedly/app_unexpectedly/CUIDataTransform.h
  type CUIHyperlinksNone (line 33) | typedef NS_ENUM(NSUInteger, CUIHyperlinksStyle)
  type CUISymbolicationModeNone (line 40) | typedef NS_ENUM(NSUInteger, CUISymbolicationMode)

FILE: app_unexpectedly/app_unexpectedly/CUIExportAccessoryViewController.h
  type CUICrashLogExportedContentsAll (line 26) | typedef NS_ENUM(NSUInteger, CUICrashLogExportedContentsType)

FILE: app_unexpectedly/app_unexpectedly/CUIRegisterLabel.h
  type CUIRegisterViewValueAsBinary (line 17) | typedef NS_ENUM(NSUInteger, CUIRegisterViewValueAsType)

FILE: app_unexpectedly/app_unexpectedly/CUIThreadsViewController.h
  function interface (line 28) | interface CUIThreadsViewController : NSViewController <CUIHopperDisassem...

FILE: app_unexpectedly/app_unexpectedly/DWARF/DWRFObject.h
  type DWRFUnknownFormat (line 16) | typedef NS_ENUM(NSUInteger, DWRFFormat)

FILE: app_unexpectedly/app_unexpectedly/DWARF/LEB128.c
  function DWRF_readULEB128 (line 16) | uint64_t DWRF_readULEB128(uint8_t * inBufferPtr,uint8_t ** outBufferPtr)
  function DWRF_readLEB128 (line 42) | int64_t DWRF_readLEB128(uint8_t * inBufferPtr,uint8_t ** outBufferPtr)

FILE: app_unexpectedly/app_unexpectedly/Extemal/Line View Test/Controller.h
  function interface (line 34) | interface Controller : NSObject

FILE: app_unexpectedly/app_unexpectedly/Extemal/Line View Test/MarkerLineNumberView.h
  function interface (line 33) | interface MarkerLineNumberView : NoodleLineNumberView

FILE: plugin_quicklook/crashreport/main.c
  type QuickLookGeneratorPluginType (line 48) | typedef struct __QuickLookGeneratorPluginType
  function QuickLookGeneratorPluginType (line 92) | QuickLookGeneratorPluginType *AllocQuickLookGeneratorPluginType(CFUUIDRe...
  function DeallocQuickLookGeneratorPluginType (line 120) | void DeallocQuickLookGeneratorPluginType(QuickLookGeneratorPluginType *t...
  function HRESULT (line 141) | HRESULT QuickLookGeneratorQueryInterface(void *thisInstance,REFIID iid,L...
  function ULONG (line 175) | ULONG QuickLookGeneratorPluginAddRef(void *thisInstance)
  function ULONG (line 187) | ULONG QuickLookGeneratorPluginRelease(void *thisInstance)
Condensed preview — 786 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,821K chars).
[
  {
    "path": ".gitignore",
    "chars": 212,
    "preview": "# General\n.DS_Store\n\n# Build\n\ndistribution/build\ndistribution/artifacts\ndistribution/Template/Template_rw.dmg\n\n# Xcode p"
  },
  {
    "path": ".gitmodules",
    "chars": 112,
    "preview": "[submodule \"submodules/ips2crash\"]\n\tpath = submodules/ips2crash\n\turl = https://github.com/packagesdev/ips2crash\n"
  },
  {
    "path": "Configs/CodeSigningConfigurationSettings.xcconfig",
    "chars": 103,
    "preview": "// Code Signing Settings\n\n// CODE_SIGN_IDENTITY = Developer ID Application: Your Identifity (SomeValue)"
  },
  {
    "path": "Configs/SharedConfigurationSettings.xcconfig",
    "chars": 426,
    "preview": "// Shared Configuration Settings for Unexpectedly Xcode Projects\n\n#include \"CodeSigningConfigurationSettings.xcconfig\"\n\n"
  },
  {
    "path": "LICENSE.txt",
    "chars": 2696,
    "preview": "Copyright © 2021-2025, Stéphane Sudre. All rights reserved.\n\nRedistribution and use in source and binary forms, with or "
  },
  {
    "path": "README.md",
    "chars": 3977,
    "preview": "## Synopsis\n\nUnexpectedly is a macOS utility to browse and inspect crash reports of Mac applications.\n\n## Screenshot\n\n!["
  },
  {
    "path": "app_unexpectedly/AppKit + Extensions/NSColor+LabelColor.h",
    "chars": 1737,
    "preview": "/*\n Copyright (c) 2018, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/AppKit + Extensions/NSColor+LabelColor.m",
    "chars": 4425,
    "preview": "/*\n Copyright (c) 2018, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/AppKit + Extensions/NSColor+String.h",
    "chars": 1629,
    "preview": "/*\n Copyright (c) 2019, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/AppKit + Extensions/NSColor+String.m",
    "chars": 2471,
    "preview": "/*\n Copyright (c) 2019, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/AppKit + Extensions/NSResponder+Appearance.h",
    "chars": 2108,
    "preview": "/*\n Copyright (c) 2018, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/AppKit + Extensions/NSResponder+Appearance.m",
    "chars": 3293,
    "preview": "/*\n Copyright (c) 2018, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/AppKit + Extensions/NSTableView+Selection.h",
    "chars": 1632,
    "preview": "/*\n Copyright (c) 2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/AppKit + Extensions/NSTableView+Selection.m",
    "chars": 1899,
    "preview": "/*\n Copyright (c) 2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/AppKit + Extensions/NSToolbar+Packages.h",
    "chars": 1631,
    "preview": "/*\n Copyright (c) 2016, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/AppKit + Extensions/NSToolbar+Packages.m",
    "chars": 1830,
    "preview": "/*\n Copyright (c) 2016, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/Foundation + Extensions/NSArray+UniqueName.h",
    "chars": 2053,
    "preview": "/*\n Copyright (c) 2017, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/Foundation + Extensions/NSArray+UniqueName.m",
    "chars": 3277,
    "preview": "/*\n Copyright (c) 2017, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/Foundation + Extensions/NSArray+WBExtensions.h",
    "chars": 1968,
    "preview": "/*\n Copyright (c) 2016-2017, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/Foundation + Extensions/NSArray+WBExtensions.m",
    "chars": 3510,
    "preview": "/*\n Copyright (c) 2016, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/Foundation + Extensions/NSDictionary+MutableDeepCopy.h",
    "chars": 1599,
    "preview": "/*\n Copyright (c) 2017, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/Foundation + Extensions/NSDictionary+MutableDeepCopy.m",
    "chars": 2312,
    "preview": "/*\n Copyright (c) 2017, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/Foundation + Extensions/NSDictionary+WBExtensions.h",
    "chars": 457,
    "preview": "\n#import <Foundation/Foundation.h>\n\n@interface NSDictionary (WBExtensions)\n\n- (instancetype)WB_dictionaryByMappingKeysUs"
  },
  {
    "path": "app_unexpectedly/Foundation + Extensions/NSDictionary+WBExtensions.m",
    "chars": 2372,
    "preview": "\n#import \"NSDictionary+WBExtensions.h\"\n\n@implementation NSDictionary (WBExtensions)\n\n- (instancetype)WB_dictionaryByMapp"
  },
  {
    "path": "app_unexpectedly/Foundation + Extensions/NSIndexSet+Analysis.h",
    "chars": 108,
    "preview": "#import <Foundation/Foundation.h>\n\n@interface NSIndexSet (Analysis)\n\n- (BOOL)WB_containsOnlyOneRange;\n\n@end\n"
  },
  {
    "path": "app_unexpectedly/Foundation + Extensions/NSIndexSet+Analysis.m",
    "chars": 359,
    "preview": "#import \"NSIndexSet+Analysis.h\"\n\n@implementation NSIndexSet (Analysis)\n\n- (BOOL)WB_containsOnlyOneRange\n{\n    NSUInteger"
  },
  {
    "path": "app_unexpectedly/Foundation + Extensions/NSSet+WBExtensions.h",
    "chars": 1642,
    "preview": "/*\n Copyright (c) 2017, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/Foundation + Extensions/NSSet+WBExtensions.m",
    "chars": 2073,
    "preview": "/*\n Copyright (c) 2017, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/Foundation + Extensions/NSString+CPU.h",
    "chars": 1586,
    "preview": "/*\n Copyright (c) 2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/Foundation + Extensions/NSString+CPU.m",
    "chars": 2183,
    "preview": "/*\n Copyright (c) 2021-2024, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/RSCore/LICENSE.txt",
    "chars": 1075,
    "preview": "MIT License\n\nCopyright (c) 2002-2025 Brent Simmons\n\nPermission is hereby granted, free of charge, to any person obtainin"
  },
  {
    "path": "app_unexpectedly/RSCore/NSMenuItem+RSCore.h",
    "chars": 600,
    "preview": "//\n//  NSMenuItem+RSCore.h\n//  RSCore\n//\n//  Created by Brent Simmons on 1/5/26.\n//\n\n#if TARGET_OS_MAC && !TARGET_OS_IPH"
  },
  {
    "path": "app_unexpectedly/RSCore/NSMenuItem+RSCore.m",
    "chars": 1627,
    "preview": "//\n//  NSMenuItem+RSCore.m\n//  RSCore\n//\n//  Created by Brent Simmons on 1/7/26.\n//\n\n#if TARGET_OS_MAC && !TARGET_OS_IPH"
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/AppDelegate.h",
    "chars": 1561,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/AppDelegate.m",
    "chars": 15832,
    "preview": "/*\n Copyright (c) 2020-2024, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIAATextFieldCell.h",
    "chars": 1604,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIAATextFieldCell.m",
    "chars": 2207,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIAboutBoxFooterView.h",
    "chars": 1557,
    "preview": "/*\nCopyright (c) 2007-2016, Stephane Sudre\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with"
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIAboutBoxFooterView.m",
    "chars": 2463,
    "preview": "/*\nCopyright (c) 2007-2018, Stephane Sudre\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with"
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIAboutBoxWindow.h",
    "chars": 323,
    "preview": "//\n//  CUIAboutBoxWindow.h\n//  Unexpectedly\n//\n//  Created by stephane on 09/04/2021.\n//  Copyright © 2021 Acme, Inc. Al"
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIAboutBoxWindow.m",
    "chars": 2255,
    "preview": "//\n//  CUIAboutBoxWindow.m\n//  Unexpectedly\n//\n//  Created by stephane on 09/04/2021.\n//  Copyright © 2021 Acme, Inc. Al"
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIAboutBoxWindowController.h",
    "chars": 271,
    "preview": "//\n//  CUIAboutBoxWindowController.h\n//  Unexpectedly\n//\n//  Created by stephane on 15/11/2020.\n//  Copyright © 2020 Ste"
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIAboutBoxWindowController.m",
    "chars": 2747,
    "preview": "//\n//  CUIAboutBoxWindowController.m\n//  Unexpectedly\n//\n//  Created by stephane on 15/11/2020.\n//  Copyright © 2020 Ste"
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIApplicationItemAttributes.h",
    "chars": 2040,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIApplicationItemAttributes.m",
    "chars": 4103,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIApplicationPreferences+Themes.h",
    "chars": 1677,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIApplicationPreferences+Themes.m",
    "chars": 1975,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIApplicationPreferences.h",
    "chars": 3331,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIApplicationPreferences.m",
    "chars": 12591,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIApplicationSpecificBacktraceRowView.h",
    "chars": 1668,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIApplicationSpecificBacktraceRowView.m",
    "chars": 2821,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIBinaryImage.h",
    "chars": 2641,
    "preview": "/*\n Copyright (c) 2020-2022, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIBinaryImage.m",
    "chars": 11683,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIBinaryImageUtility.h",
    "chars": 2694,
    "preview": "/*\nCopyright (c) 2020-2021, Stephane Sudre\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with"
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIBinaryImageUtility.m",
    "chars": 16261,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIBinaryImagesViewController.h",
    "chars": 1662,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIBinaryImagesViewController.m",
    "chars": 13061,
    "preview": "/*\n Copyright (c) 2020-2024, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICallStackBacktrace.h",
    "chars": 1956,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICallStackBacktrace.m",
    "chars": 3799,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICallTableCellView.h",
    "chars": 1765,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICallTableCellView.m",
    "chars": 1572,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICallsSelection.h",
    "chars": 1797,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICallsSelection.m",
    "chars": 2626,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICaptionView.h",
    "chars": 1566,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICaptionView.m",
    "chars": 3256,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICategoriesClipView.h",
    "chars": 1631,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICategoriesClipView.m",
    "chars": 1827,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICenteredLabelViewController.h",
    "chars": 1833,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICenteredLabelViewController.m",
    "chars": 5190,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICenteredLabelViewController.xib",
    "chars": 2671,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion"
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICodeSigningFlagsTableView.h",
    "chars": 1623,
    "preview": "/*\n Copyright (c) 2025, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICodeSigningFlagsTableView.m",
    "chars": 1797,
    "preview": "/*\n Copyright (c) 2025, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICodeSigningInformationViewController.h",
    "chars": 1705,
    "preview": "/*\n Copyright (c) 2025, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICodeSigningInformationViewController.m",
    "chars": 6278,
    "preview": "/*\n Copyright (c) 2025, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICodeType.h",
    "chars": 383,
    "preview": "//\n//  CUICodeType.h\n//  app_unexpectedly\n//\n//  Created by stephane on 09/03/2021.\n//  Copyright © 2021 Acme, Inc. All "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICollectionViewDockedThreadItem.h",
    "chars": 1617,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICollectionViewDockedThreadItem.m",
    "chars": 3541,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICollectionViewDockedThreadItem.xib",
    "chars": 5599,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion"
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICollectionViewDockedThreadsLayout.h",
    "chars": 1599,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICollectionViewDockedThreadsLayout.m",
    "chars": 6459,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICollectionViewRegisterItem.h",
    "chars": 1664,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICollectionViewRegisterItem.m",
    "chars": 5628,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICollectionViewThreadItem.h",
    "chars": 1809,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICollectionViewThreadItem.m",
    "chars": 1801,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICollectionViewVisibleThreadItem.h",
    "chars": 1618,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICollectionViewVisibleThreadItem.m",
    "chars": 9591,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICollectionViewVisibleThreadItem.xib",
    "chars": 12661,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion"
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICollectionViewVisibleThreadsLayout.h",
    "chars": 1601,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICollectionViewVisibleThreadsLayout.m",
    "chars": 7049,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIContentBox.h",
    "chars": 1554,
    "preview": "/*\n Copyright (c) 2018, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIContentBox.m",
    "chars": 1911,
    "preview": "/*\n Copyright (c) 2018, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIContentsViewController.h",
    "chars": 1958,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIContentsViewController.m",
    "chars": 7470,
    "preview": "/*\n Copyright (c) 2020-2024, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUIContentsViewController.xib",
    "chars": 2014,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion"
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashDataTransform.h",
    "chars": 1599,
    "preview": "/*\n Copyright (c) 2020-2022, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashDataTransform.m",
    "chars": 44868,
    "preview": "/*\n Copyright (c) 2020-2022, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLog+Transform.h",
    "chars": 1662,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLog+Transform.m",
    "chars": 1997,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLog+UI.h",
    "chars": 1649,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLog+UI.m",
    "chars": 4556,
    "preview": "/*\n Copyright (c) 2020-2023, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLog.h",
    "chars": 2248,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLog.m",
    "chars": 19515,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogBacktraces+Utilities.h",
    "chars": 1623,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogBacktraces+Utilities.m",
    "chars": 2163,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogBacktraces.h",
    "chars": 2088,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogBacktraces.m",
    "chars": 8674,
    "preview": "/*\n Copyright (c) 2020-2022, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogBinaryImages.h",
    "chars": 2588,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogBinaryImages.m",
    "chars": 9908,
    "preview": "/*\n Copyright (c) 2020-2022, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogBrowsingState.h",
    "chars": 2204,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogBrowsingState.m",
    "chars": 2155,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogBrowsingStateRegistry.h",
    "chars": 2085,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogBrowsingStateRegistry.m",
    "chars": 4006,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogContentsViewController.h",
    "chars": 2178,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogContentsViewController.m",
    "chars": 15373,
    "preview": "/*\n Copyright (c) 2020-2024, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogContentsViewController.xib",
    "chars": 1278,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion"
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogDianosticMessages.h",
    "chars": 1891,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogDianosticMessages.m",
    "chars": 4943,
    "preview": "/*\n Copyright (c) 2020-2022, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogErrors.h",
    "chars": 1771,
    "preview": "/*\n Copyright (c) 2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogErrors.m",
    "chars": 1582,
    "preview": "/*\n Copyright (c) 2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogExceptionInformation+QuickHelp.h",
    "chars": 1721,
    "preview": "/*\n Copyright (c) 2022, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogExceptionInformation+QuickHelp.m",
    "chars": 5171,
    "preview": "/*\n Copyright (c) 2022, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogExceptionInformation+UI.h",
    "chars": 1637,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogExceptionInformation+UI.m",
    "chars": 2509,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogExceptionInformation.h",
    "chars": 2536,
    "preview": "/*\n Copyright (c) 2020-2022, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogExceptionInformation.m",
    "chars": 13304,
    "preview": "/*\n Copyright (c) 2020-2022, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogHeader.h",
    "chars": 2930,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogHeader.m",
    "chars": 17277,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogPresentationOutlineViewController.h",
    "chars": 1913,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogPresentationOutlineViewController.m",
    "chars": 29415,
    "preview": "/*\n Copyright (c) 2020-2024, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogPresentationTextViewController.h",
    "chars": 1757,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogPresentationTextViewController.m",
    "chars": 63927,
    "preview": "/*\n Copyright (c) 2020-2024, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogPresentationViewController.h",
    "chars": 2550,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogPresentationViewController.m",
    "chars": 4280,
    "preview": "/*\n Copyright (c) 2020-2024, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogSectionsDetector.h",
    "chars": 2310,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogSectionsDetector.m",
    "chars": 6807,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogTableCellView.h",
    "chars": 1705,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogTableCellView.m",
    "chars": 4234,
    "preview": "/*\n Copyright (c) 2020-2025, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogTextView.h",
    "chars": 1641,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogTextView.m",
    "chars": 4942,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogThreadState+UI.h",
    "chars": 1637,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogThreadState+UI.m",
    "chars": 2227,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogThreadState.h",
    "chars": 2164,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogThreadState.m",
    "chars": 15677,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsListViewController.h",
    "chars": 1677,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsListViewController.m",
    "chars": 25137,
    "preview": "/*\n Copyright (c) 2020-2024, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsMainViewController.h",
    "chars": 1639,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsMainViewController.m",
    "chars": 19945,
    "preview": "/*\n Copyright (c) 2020-2024, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsMainViewController.xib",
    "chars": 3787,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion"
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsOpenErrorPanel.h",
    "chars": 1885,
    "preview": "/*\n Copyright (c) 2021-2024, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsOpenErrorPanel.m",
    "chars": 7723,
    "preview": "/*\n Copyright (c) 2021-2024, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsOpenErrorRecord+UI.h",
    "chars": 1618,
    "preview": "/*\n Copyright (c) 2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsOpenErrorRecord+UI.m",
    "chars": 1767,
    "preview": "/*\n Copyright (c) 2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsOpenErrorRecord.h",
    "chars": 1689,
    "preview": "/*\n Copyright (c) 2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsOpenErrorRecord.m",
    "chars": 2958,
    "preview": "/*\n Copyright (c) 2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, with "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsOpenErrorWindowController.xib",
    "chars": 17259,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion"
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsProvider.h",
    "chars": 2198,
    "preview": "/*\n Copyright (c) 2020-2022, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsProvider.m",
    "chars": 8262,
    "preview": "/*\n Copyright (c) 2020-2022, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSelection.h",
    "chars": 1924,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSelection.m",
    "chars": 3074,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSource+UI.h",
    "chars": 1613,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSource+UI.m",
    "chars": 2497,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSource.h",
    "chars": 2660,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSource.m",
    "chars": 3867,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceAll+UI.h",
    "chars": 1620,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceAll+UI.m",
    "chars": 1932,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceAll.h",
    "chars": 1635,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceAll.m",
    "chars": 6147,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceDirectory.h",
    "chars": 1762,
    "preview": "/*\n Copyright (c) 2020-2022, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceDirectory.m",
    "chars": 7163,
    "preview": "/*\n Copyright (c) 2020-2025 Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, w"
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceFile.h",
    "chars": 1616,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceFile.m",
    "chars": 2774,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceFileSystemItem.h",
    "chars": 1749,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceFileSystemItem.m",
    "chars": 2960,
    "preview": "/*\n Copyright (c) 2020-2025, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceSeparator.h",
    "chars": 1638,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceSeparator.m",
    "chars": 1957,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceSmart.h",
    "chars": 1687,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceSmart.m",
    "chars": 5201,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceSmartEditorPanel.h",
    "chars": 1919,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceSmartEditorPanel.m",
    "chars": 19443,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceStandardDirectory+UI.h",
    "chars": 1647,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceStandardDirectory+UI.m",
    "chars": 2272,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceStandardDirectory.h",
    "chars": 1819,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceStandardDirectory.m",
    "chars": 2858,
    "preview": "/*\n Copyright (c) 2020-2022, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceTableCellView.h",
    "chars": 1646,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceTableCellView.m",
    "chars": 1594,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceToday+UI.h",
    "chars": 1603,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceToday+UI.m",
    "chars": 1853,
    "preview": "/*\n Copyright (c) 2020-2022, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceToday.h",
    "chars": 1599,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourceToday.m",
    "chars": 2791,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourcesManager.h",
    "chars": 2148,
    "preview": "/*\n Copyright (c) 2020-2022, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourcesManager.m",
    "chars": 10835,
    "preview": "/*\n Copyright (c) 2020-2022, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourcesSelection.h",
    "chars": 1855,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourcesSelection.m",
    "chars": 2748,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourcesViewController.h",
    "chars": 1747,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashLogsSourcesViewController.m",
    "chars": 40339,
    "preview": "/*\n Copyright (c) 2020-2024, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashReporterDefaults.h",
    "chars": 2209,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashReporterDefaults.m",
    "chars": 8407,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashedThreadCallRowView.h",
    "chars": 1696,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashedThreadCallRowView.m",
    "chars": 2681,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  },
  {
    "path": "app_unexpectedly/app_unexpectedly/CUICrashedThreadRowView.h",
    "chars": 1638,
    "preview": "/*\n Copyright (c) 2020-2021, Stephane Sudre\n All rights reserved.\n \n Redistribution and use in source and binary forms, "
  }
]

// ... and 586 more files (download for full content)

About this extraction

This page contains the full source code of the packagesdev/unexpectedly GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 786 files (4.3 MB), approximately 1.2M tokens, and a symbol index with 22 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!