Repository: responsively-org/responsively-app Branch: main Commit: 826f22f5b343 Files: 492 Total size: 1.4 MB Directory structure: gitextract_p5en9k53/ ├── .all-contributorsrc ├── .gitattributes ├── .github/ │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE/ │ │ ├── 01-bug-report.md │ │ └── 02-feature-request.md │ ├── PULL_REQUEST_TEMPLATE.md │ ├── dependabot.yml │ ├── opencollective.yml │ ├── stale.yml │ └── workflows/ │ ├── codeql-analysis.yml │ ├── publish.yml │ └── test.yml ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── MAINTAINERS.md ├── README.md ├── SECURITY.md ├── browser-extension/ │ ├── .gitignore │ ├── .vscode/ │ │ └── settings.json │ ├── package.json │ ├── public/ │ │ ├── manifest.json │ │ └── popup.html │ ├── src/ │ │ ├── background.js │ │ └── popup.js │ └── webpack.config.js ├── desktop-app/ │ ├── . prettierignore │ ├── .editorconfig │ ├── .erb/ │ │ ├── configs/ │ │ │ ├── .eslintrc │ │ │ ├── webpack.config.base.ts │ │ │ ├── webpack.config.eslint.ts │ │ │ ├── webpack.config.main.prod.ts │ │ │ ├── webpack.config.preload-webview.dev.ts │ │ │ ├── webpack.config.preload.dev.ts │ │ │ ├── webpack.config.renderer.dev.dll.ts │ │ │ ├── webpack.config.renderer.dev.ts │ │ │ ├── webpack.config.renderer.prod.ts │ │ │ └── webpack.paths.ts │ │ ├── mocks/ │ │ │ └── fileMock.js │ │ └── scripts/ │ │ ├── .eslintrc │ │ ├── check-build-exists.ts │ │ ├── check-native-dep.js │ │ ├── check-node-env.js │ │ ├── check-port-in-use.js │ │ ├── clean.js │ │ ├── delete-source-maps.js │ │ ├── electron-rebuild.js │ │ ├── link-modules.ts │ │ └── notarize.js │ ├── .eslintignore │ ├── .eslintrc.js │ ├── .gitattributes │ ├── .gitignore │ ├── .husky/ │ │ └── pre-commit │ ├── .prettierrc │ ├── .vscode/ │ │ └── settings.json │ ├── CHANGELOG.md │ ├── CODE_OF_CONDUCT.md │ ├── LICENSE │ ├── README.md │ ├── assets/ │ │ ├── assets.d.ts │ │ └── entitlements.mac.plist │ ├── declarations.d.ts │ ├── package.json │ ├── postcss.config.js │ ├── postinstall.ts │ ├── release/ │ │ └── app/ │ │ └── package.json │ ├── setupTests.ts │ ├── src/ │ │ ├── __tests__/ │ │ │ └── App.test.tsx │ │ ├── common/ │ │ │ ├── constants.ts │ │ │ ├── deviceList.ts │ │ │ └── webViewUtils.ts │ │ ├── main/ │ │ │ ├── app-meta/ │ │ │ │ └── index.ts │ │ │ ├── app-updater.ts │ │ │ ├── browser-sync.ts │ │ │ ├── cli.ts │ │ │ ├── dev-entry.cjs │ │ │ ├── devtools/ │ │ │ │ └── index.ts │ │ │ ├── http-basic-auth/ │ │ │ │ └── index.ts │ │ │ ├── main.ts │ │ │ ├── menu/ │ │ │ │ ├── help.ts │ │ │ │ ├── index.ts │ │ │ │ └── view.ts │ │ │ ├── native-functions/ │ │ │ │ └── index.ts │ │ │ ├── preload-webview.ts │ │ │ ├── preload.ts │ │ │ ├── protocol-handler/ │ │ │ │ └── index.ts │ │ │ ├── screenshot/ │ │ │ │ ├── index.ts │ │ │ │ └── webpage.ts │ │ │ ├── util.ts │ │ │ ├── web-permissions/ │ │ │ │ ├── PermissionsManager.ts │ │ │ │ └── index.ts │ │ │ ├── webview-context-menu/ │ │ │ │ ├── common.ts │ │ │ │ └── register.ts │ │ │ └── webview-storage-manager/ │ │ │ └── index.ts │ │ ├── renderer/ │ │ │ ├── App.css │ │ │ ├── AppContent.tsx │ │ │ ├── components/ │ │ │ │ ├── AboutDialog/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── Accordion/ │ │ │ │ │ ├── Accordion.tsx │ │ │ │ │ ├── AccordionItem.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── Button/ │ │ │ │ │ ├── Button.test.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── ButtonGroup/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── ConfirmDialog/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── DeviceManager/ │ │ │ │ │ ├── DeviceDetailsModal.tsx │ │ │ │ │ ├── DeviceLabel.tsx │ │ │ │ │ ├── PreviewSuites/ │ │ │ │ │ │ ├── CreateSuiteButton/ │ │ │ │ │ │ │ ├── CreateSuiteModal.tsx │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ ├── ManageSuitesTool/ │ │ │ │ │ │ │ ├── ManageSuitesTool.test.tsx │ │ │ │ │ │ │ ├── ManageSuitesTool.tsx │ │ │ │ │ │ │ ├── ManageSuitesToolError.test.tsx │ │ │ │ │ │ │ ├── ManageSuitesToolError.tsx │ │ │ │ │ │ │ ├── helpers.test.tsx │ │ │ │ │ │ │ ├── helpers.ts │ │ │ │ │ │ │ ├── test.json │ │ │ │ │ │ │ ├── utils.test.ts │ │ │ │ │ │ │ └── utils.ts │ │ │ │ │ │ ├── Suite.tsx │ │ │ │ │ │ └── index.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── Divider/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── DropDown/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── FileUploader/ │ │ │ │ │ ├── FileUploader.test.tsx │ │ │ │ │ ├── FileUploader.tsx │ │ │ │ │ ├── hooks/ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── useFileUpload.test.tsx │ │ │ │ │ │ └── useFileUpload.tsx │ │ │ │ │ └── index.ts │ │ │ │ ├── InfoPopups/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── Input/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── KeyboardShortcutsManager/ │ │ │ │ │ ├── constants.ts │ │ │ │ │ ├── index.tsx │ │ │ │ │ ├── useKeyboardShortcut.ts │ │ │ │ │ └── useMousetrapEmitter.ts │ │ │ │ ├── Modal/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── ModalLoader/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── Notifications/ │ │ │ │ │ ├── Notification.tsx │ │ │ │ │ ├── NotificationEmptyStatus.tsx │ │ │ │ │ ├── Notifications.tsx │ │ │ │ │ └── NotificationsBubble.tsx │ │ │ │ ├── Previewer/ │ │ │ │ │ ├── Device/ │ │ │ │ │ │ ├── ColorBlindnessTools/ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ ├── DesignOverlay/ │ │ │ │ │ │ │ ├── index.test.tsx │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ ├── DesignOverlayControls/ │ │ │ │ │ │ │ ├── index.test.tsx │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ ├── Toolbar.tsx │ │ │ │ │ │ ├── assets.ts │ │ │ │ │ │ ├── common.ts │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ └── utils.ts │ │ │ │ │ ├── DevtoolsResizer/ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── Guides/ │ │ │ │ │ │ ├── guide.css │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── IndividualLayoutToolBar/ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ └── styles.css │ │ │ │ │ └── index.tsx │ │ │ │ ├── ReleaseNotes/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── Select/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── Spinner/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── Sponsorship/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── Toggle/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── ToolBar/ │ │ │ │ │ ├── AddressBar/ │ │ │ │ │ │ ├── AuthModal.tsx │ │ │ │ │ │ ├── BookmarkButton.tsx │ │ │ │ │ │ ├── SitePermissions/ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ ├── SuggestionList.tsx │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── ColorBlindnessControls/ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── ColorSchemeToggle/ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── Menu/ │ │ │ │ │ │ ├── Flyout/ │ │ │ │ │ │ │ ├── AllowInSecureSSL/ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ ├── Bookmark/ │ │ │ │ │ │ │ │ ├── ViewAllBookmarks/ │ │ │ │ │ │ │ │ │ ├── BookmarkFlyout.tsx │ │ │ │ │ │ │ │ │ ├── BookmarkListButton.tsx │ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ ├── ClearHistory/ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ ├── Devtools/ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ ├── PreviewLayout/ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ ├── Settings/ │ │ │ │ │ │ │ │ ├── SettingsContent.test.tsx │ │ │ │ │ │ │ │ ├── SettingsContent.tsx │ │ │ │ │ │ │ │ ├── SettingsContentHeaders.tsx │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ ├── UITheme/ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ ├── Zoom.tsx │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── NavigationControls.tsx │ │ │ │ │ ├── PreviewSuiteSelector/ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── Shortcuts/ │ │ │ │ │ │ ├── ShortcutsModal/ │ │ │ │ │ │ │ ├── ShortcutButton.tsx │ │ │ │ │ │ │ ├── ShortcutName.tsx │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ └── index.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── VisionSimulationDropDown/ │ │ │ │ │ └── index.tsx │ │ │ │ └── useLocalStorage/ │ │ │ │ └── useLocalStorage.tsx │ │ │ ├── context/ │ │ │ │ └── ThemeProvider/ │ │ │ │ └── index.tsx │ │ │ ├── index.ejs │ │ │ ├── index.tsx │ │ │ ├── lib/ │ │ │ │ └── pubsub/ │ │ │ │ ├── index.test.ts │ │ │ │ └── index.ts │ │ │ ├── preload.d.ts │ │ │ └── store/ │ │ │ ├── features/ │ │ │ │ ├── bookmarks/ │ │ │ │ │ └── index.ts │ │ │ │ ├── design-overlay/ │ │ │ │ │ ├── index.test.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── device-manager/ │ │ │ │ │ ├── index.ts │ │ │ │ │ └── utils.ts │ │ │ │ ├── devtools/ │ │ │ │ │ └── index.ts │ │ │ │ ├── renderer/ │ │ │ │ │ └── index.ts │ │ │ │ ├── ruler/ │ │ │ │ │ └── index.ts │ │ │ │ └── ui/ │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ └── store/ │ │ ├── index.ts │ │ └── migrations.ts │ ├── tailwind.config.js │ ├── tsconfig.json │ └── vitest.config.ts ├── desktop-app-legacy/ │ ├── .dockerignore │ ├── .editorconfig │ ├── .eslintignore │ ├── .eslintrc │ ├── .flowconfig │ ├── .gitattributes │ ├── .github/ │ │ ├── ISSUE_TEMPLATE.md │ │ └── stale.yml │ ├── .gitignore │ ├── .nvmrc │ ├── .prettierignore │ ├── .prettierrc │ ├── .stylelintrc │ ├── .testcafe-electron-rc │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── LICENSE │ ├── add-osx-cert.sh │ ├── app/ │ │ ├── AppContent.js │ │ ├── actions/ │ │ │ ├── bookmarks.js │ │ │ ├── browser.js │ │ │ ├── networkConfig.js │ │ │ └── statusBar.js │ │ ├── app-updater.js │ │ ├── app.global.css │ │ ├── app.html │ │ ├── app.icns │ │ ├── components/ │ │ │ ├── AddressInput.js │ │ │ ├── AppNotification/ │ │ │ │ ├── AppNotification.js │ │ │ │ └── styles.module.css │ │ │ ├── BookmarksBar/ │ │ │ │ ├── BookmarkEditDialog.js │ │ │ │ └── index.js │ │ │ ├── ClearNetworkCache/ │ │ │ │ └── index.js │ │ │ ├── CreateIssue/ │ │ │ │ └── index.js │ │ │ ├── DevToolsResizer/ │ │ │ │ ├── index.js │ │ │ │ └── style.module.css │ │ │ ├── DeviceDrawer/ │ │ │ │ ├── index.js │ │ │ │ └── styles.css │ │ │ ├── DeviceManager/ │ │ │ │ ├── AddDevice/ │ │ │ │ │ └── index.js │ │ │ │ ├── DeviceItem.js │ │ │ │ ├── DeviceList.js │ │ │ │ ├── OSIcon.js │ │ │ │ ├── index.js │ │ │ │ └── styles.css │ │ │ ├── DevicesOverview/ │ │ │ │ └── index.js │ │ │ ├── DevicesPreviewer/ │ │ │ │ ├── index.js │ │ │ │ ├── index.test.js │ │ │ │ └── useStyles.js │ │ │ ├── Drawer.js │ │ │ ├── ErrorBoundary/ │ │ │ │ └── index.js │ │ │ ├── ExtensionsManager/ │ │ │ │ ├── index.js │ │ │ │ └── styles.css │ │ │ ├── Header/ │ │ │ │ ├── index.js │ │ │ │ └── index.test.js │ │ │ ├── Headway.js │ │ │ ├── HorizontalSpacer/ │ │ │ │ └── index.js │ │ │ ├── HttpAuthDialog/ │ │ │ │ └── index.js │ │ │ ├── KebabMenu.js │ │ │ ├── LeftIconsPane/ │ │ │ │ ├── index.js │ │ │ │ └── styles.css │ │ │ ├── LinkHoverDisplay/ │ │ │ │ └── index.js │ │ │ ├── LiveCssEditor/ │ │ │ │ ├── index.js │ │ │ │ └── useStyles.js │ │ │ ├── NavigationControls/ │ │ │ │ ├── index.js │ │ │ │ └── index.test.js │ │ │ ├── NetworkConfiguration/ │ │ │ │ ├── index.js │ │ │ │ └── styles.css │ │ │ ├── NetworkProxy/ │ │ │ │ ├── ProxyManager/ │ │ │ │ │ └── index.js │ │ │ │ └── index.js │ │ │ ├── NetworkThrottling/ │ │ │ │ ├── ProfileManager/ │ │ │ │ │ ├── index.js │ │ │ │ │ └── styles.css │ │ │ │ ├── index.js │ │ │ │ └── styles.css │ │ │ ├── NotificationMessage/ │ │ │ │ └── index.js │ │ │ ├── PageNavigator/ │ │ │ │ └── index.js │ │ │ ├── PermissionPopup/ │ │ │ │ ├── index.js │ │ │ │ └── styles.module.css │ │ │ ├── PrefersColorSchemeSwitch/ │ │ │ │ └── index.js │ │ │ ├── PreviewerLayoutSelector/ │ │ │ │ └── index.js │ │ │ ├── QuickFilterDevices/ │ │ │ │ └── index.js │ │ │ ├── Renderer/ │ │ │ │ ├── index.js │ │ │ │ └── index.test.js │ │ │ ├── ScreenShotSavePreference/ │ │ │ │ └── index.js │ │ │ ├── ScreenshotManager/ │ │ │ │ └── index.js │ │ │ ├── ScrollControls/ │ │ │ │ ├── index.js │ │ │ │ └── index.test.js │ │ │ ├── Select.js │ │ │ ├── Spinner/ │ │ │ │ └── index.js │ │ │ ├── StatusBar/ │ │ │ │ ├── Announcement.js │ │ │ │ ├── index.js │ │ │ │ └── useStyles.js │ │ │ ├── ToggleTouch/ │ │ │ │ └── index.js │ │ │ ├── UrlSearchResults/ │ │ │ │ ├── index.js │ │ │ │ └── useStyles.js │ │ │ ├── UserPreferences/ │ │ │ │ ├── index.js │ │ │ │ └── useStyles.js │ │ │ ├── WebView/ │ │ │ │ ├── index.js │ │ │ │ ├── index.test.js │ │ │ │ ├── screenshotUtil.js │ │ │ │ └── style.module.css │ │ │ ├── ZenButton/ │ │ │ │ └── index.js │ │ │ ├── ZoomInput/ │ │ │ │ ├── index.js │ │ │ │ ├── index.test.js │ │ │ │ ├── otherStyles.css │ │ │ │ └── styles.module.css │ │ │ ├── icons/ │ │ │ │ ├── Apple.js │ │ │ │ ├── ArrowLeft.js │ │ │ │ ├── ArrowRight.js │ │ │ │ ├── Bug.js │ │ │ │ ├── CSSEditor.js │ │ │ │ ├── Chevron.js │ │ │ │ ├── Cross.js │ │ │ │ ├── CrossChrome.js │ │ │ │ ├── CrossThin.js │ │ │ │ ├── DarkColorScheme.js │ │ │ │ ├── DeleteCookie.js │ │ │ │ ├── DeleteStorage.js │ │ │ │ ├── DesignMode.js │ │ │ │ ├── DeviceRotate.js │ │ │ │ ├── Devices.js │ │ │ │ ├── DockBottom.js │ │ │ │ ├── DockRight.js │ │ │ │ ├── DoubleLeftArrow.js │ │ │ │ ├── Filter.js │ │ │ │ ├── Focus.js │ │ │ │ ├── FullScreenshot.js │ │ │ │ ├── Gift.js │ │ │ │ ├── Github.js │ │ │ │ ├── Globe.js │ │ │ │ ├── GoArrow.js │ │ │ │ ├── Home.js │ │ │ │ ├── HomePlus.js │ │ │ │ ├── InspectElement.js │ │ │ │ ├── InspectElementChrome.js │ │ │ │ ├── Kebab.js │ │ │ │ ├── Layout.js │ │ │ │ ├── LightBulb.js │ │ │ │ ├── LightColorScheme.js │ │ │ │ ├── Logo.js │ │ │ │ ├── Maximize.js │ │ │ │ ├── Minimize.js │ │ │ │ ├── Muted.js │ │ │ │ ├── Network.js │ │ │ │ ├── PageNavigator.js │ │ │ │ ├── Pictures.js │ │ │ │ ├── Proxy.js │ │ │ │ ├── Reload.js │ │ │ │ ├── RoadMap.js │ │ │ │ ├── Screenshot.js │ │ │ │ ├── ScrollDown.js │ │ │ │ ├── ScrollUp.js │ │ │ │ ├── Start.js │ │ │ │ ├── TickAnimation/ │ │ │ │ │ ├── index.js │ │ │ │ │ └── styles.css │ │ │ │ ├── ToggleTouch.js │ │ │ │ ├── Twitter.js │ │ │ │ ├── UnDock.js │ │ │ │ ├── Unfocus.js │ │ │ │ ├── Unmuted.js │ │ │ │ ├── Unplug.js │ │ │ │ ├── Windows.js │ │ │ │ ├── Zoom.js │ │ │ │ └── styles.module.css │ │ │ ├── useCommonStyles.js │ │ │ ├── useCreateTheme.js │ │ │ └── useIsDarkTheme.js │ │ ├── constants/ │ │ │ ├── DrawerContents.js │ │ │ ├── browserSync.js │ │ │ ├── chromeEmulatedDevices.js │ │ │ ├── devices.js │ │ │ ├── index.js │ │ │ ├── license.js │ │ │ ├── permissionsManagement.js │ │ │ ├── previewerLayouts.js │ │ │ ├── pubsubEvents.js │ │ │ ├── routes.js │ │ │ ├── searchResultSettings.js │ │ │ ├── settingKeys.js │ │ │ ├── theme.js │ │ │ └── values.js │ │ ├── containers/ │ │ │ ├── AddDeviceContainer/ │ │ │ │ └── index.js │ │ │ ├── AddressBar/ │ │ │ │ └── index.js │ │ │ ├── BookmarksBarContainer/ │ │ │ │ └── index.js │ │ │ ├── Browser/ │ │ │ │ └── index.js │ │ │ ├── DevToolResizerContainer/ │ │ │ │ └── index.js │ │ │ ├── DeviceDrawerContainer/ │ │ │ │ └── index.js │ │ │ ├── DeviceManagerContainer/ │ │ │ │ └── index.js │ │ │ ├── DevicePreviewerContainer/ │ │ │ │ └── index.js │ │ │ ├── DevicesOverviewContainer/ │ │ │ │ └── index.js │ │ │ ├── DrawerContainer/ │ │ │ │ └── index.js │ │ │ ├── ExtensionsManagerContainer/ │ │ │ │ └── index.js │ │ │ ├── HeaderContainer/ │ │ │ │ └── index.js │ │ │ ├── HomePage.js │ │ │ ├── LeftIconsPaneContainer/ │ │ │ │ └── index.js │ │ │ ├── LinkHoverDisplayContainer/ │ │ │ │ └── index.js │ │ │ ├── NavigationControlsContainer/ │ │ │ │ └── index.js │ │ │ ├── NetworkConfigurationContainer/ │ │ │ │ └── index.js │ │ │ ├── PageNavigatorContainer/ │ │ │ │ └── index.js │ │ │ ├── QuickFilterDevicesContainer/ │ │ │ │ └── index.js │ │ │ ├── Root.js │ │ │ ├── ScrollControlsContainer/ │ │ │ │ └── index.js │ │ │ ├── StatusBarContainer/ │ │ │ │ └── index.js │ │ │ ├── UserPreferencesContainer/ │ │ │ │ └── index.js │ │ │ ├── WebViewContainer/ │ │ │ │ └── index.js │ │ │ └── ZoomContainer/ │ │ │ └── index.js │ │ ├── imageWorker.js │ │ ├── index.js │ │ ├── main.dev.js │ │ ├── menu.js │ │ ├── move-to-applications.js │ │ ├── preload.js │ │ ├── reducers/ │ │ │ ├── bookmarks.js │ │ │ ├── browser.js │ │ │ ├── index.js │ │ │ ├── statusBar.js │ │ │ └── types.js │ │ ├── services/ │ │ │ ├── browserSync/ │ │ │ │ └── index.js │ │ │ ├── db/ │ │ │ │ ├── appMetadata.js │ │ │ │ └── index.js │ │ │ └── searchUrlSuggestions/ │ │ │ └── index.js │ │ ├── settings/ │ │ │ ├── migration.js │ │ │ ├── statusBarSettings.js │ │ │ └── userPreferenceSettings.js │ │ ├── shortcut-manager/ │ │ │ ├── main-shortcut-manager.js │ │ │ ├── renderer-shortcut-manager.js │ │ │ └── shared.js │ │ ├── shortcuts.html │ │ ├── store/ │ │ │ ├── configureStore.dev.js │ │ │ ├── configureStore.js │ │ │ └── configureStore.prod.js │ │ └── utils/ │ │ ├── .gitkeep │ │ ├── TextAreaWithCopyButton.js │ │ ├── analytics.js │ │ ├── browserSync.js │ │ ├── browserUtils.js │ │ ├── deviceManagerUtils.js │ │ ├── filterUtils.js │ │ ├── generalUtils.js │ │ ├── iconUtils.js │ │ ├── logUtils.js │ │ ├── navigatorUtils.js │ │ ├── permissionUtils.js │ │ ├── proxyUtils.js │ │ ├── stringUtils.js │ │ └── urlUtils.js │ ├── appveyor.yml │ ├── babel.config.js │ ├── build/ │ │ └── entitlements.mac.plist │ ├── configs/ │ │ ├── webpack.config.base.js │ │ ├── webpack.config.eslint.js │ │ ├── webpack.config.main.prod.babel.js │ │ ├── webpack.config.renderer.dev.babel.js │ │ ├── webpack.config.renderer.dev.dll.babel.js │ │ └── webpack.config.renderer.prod.babel.js │ ├── flow-typed/ │ │ ├── electron.js │ │ └── module_vx.x.x.js │ ├── internals/ │ │ ├── flow/ │ │ │ ├── CSSModule.js.flow │ │ │ └── WebpackAsset.js.flow │ │ ├── mocks/ │ │ │ └── fileMock.js │ │ └── scripts/ │ │ ├── CheckBuiltsExist.js │ │ ├── CheckNodeEnv.js │ │ └── CheckPortInUse.js │ ├── package.json │ ├── renovate.json │ ├── resources/ │ │ ├── icon.gvdesign │ │ ├── icon.icns │ │ └── icon.old.icns │ └── scripts/ │ ├── chocolatey/ │ │ ├── generateChocoPkg.js │ │ └── responsively/ │ │ ├── responsively.nuspec │ │ └── tools/ │ │ ├── LICENSE.txt │ │ ├── VERIFICATION.txt │ │ ├── chocolateyinstall.ps1 │ │ └── chocolateyuninstall.ps1 │ ├── extraPublishFiles.js │ ├── generate-checksums.js │ └── notarize.js └── dev.code-workspace ================================================ FILE CONTENTS ================================================ ================================================ FILE: .all-contributorsrc ================================================ { "files": [ "README.md" ], "imageSize": 100, "commit": false, "contributors": [ { "login": "manojVivek", "name": "Manoj Vivek", "avatar_url": "https://avatars1.githubusercontent.com/u/1283424?v=4", "profile": "http://x.com/vivek_jonam", "contributions": [ "code", "test", "projectManagement" ] }, { "login": "esprush", "name": "Suresh P", "avatar_url": "https://avatars0.githubusercontent.com/u/26249498?v=4", "profile": "https://github.com/esprush", "contributions": [ "code", "test", "projectManagement" ] }, { "login": "sprabowo", "name": "Sigit Prabowo", "avatar_url": "https://avatars2.githubusercontent.com/u/11748183?v=4", "profile": "https://github.com/sprabowo", "contributions": [ "code" ] }, { "login": "leon0707", "name": "Leon Feng", "avatar_url": "https://avatars1.githubusercontent.com/u/523684?v=4", "profile": "https://github.com/leon0707", "contributions": [ "doc" ] }, { "login": "kishoreio", "name": "Kishore S", "avatar_url": "https://avatars2.githubusercontent.com/u/30261988?v=4", "profile": "https://github.com/kishoreio", "contributions": [ "code" ] }, { "login": "jjavierdguezas", "name": "José Javier Rodríguez Zas", "avatar_url": "https://avatars2.githubusercontent.com/u/13673443?v=4", "profile": "https://jjavierdguezas.github.io", "contributions": [ "code", "test" ] }, { "login": "romanakash", "name": "Roman Akash", "avatar_url": "https://avatars1.githubusercontent.com/u/40427975?v=4", "profile": "https://github.com/romanakash", "contributions": [ "code" ] }, { "login": "RomainFrancony", "name": "Romain Francony", "avatar_url": "https://avatars3.githubusercontent.com/u/22396965?v=4", "profile": "https://github.com/RomainFrancony", "contributions": [ "code" ] }, { "login": "AARYAN-MAHENDRA", "name": "AARYAN-MAHENDRA", "avatar_url": "https://avatars1.githubusercontent.com/u/64866670?v=4", "profile": "https://github.com/AARYAN-MAHENDRA", "contributions": [ "code" ] }, { "login": "Nothing-Works", "name": "Andy", "avatar_url": "https://avatars3.githubusercontent.com/u/18606648?v=4", "profile": "https://github.com/Nothing-Works", "contributions": [ "code" ] }, { "login": "Kidcredo", "name": "Ryan Pais", "avatar_url": "https://avatars0.githubusercontent.com/u/15522605?v=4", "profile": "https://github.com/Kidcredo", "contributions": [ "code", "test" ] }, { "login": "Grafikart", "name": "Jonathan", "avatar_url": "https://avatars1.githubusercontent.com/u/395137?v=4", "profile": "https://grafikart.fr", "contributions": [ "code" ] }, { "login": "heygema", "name": "Gema Anggada ✌︎", "avatar_url": "https://avatars1.githubusercontent.com/u/10743728?v=4", "profile": "https://github.com/heygema", "contributions": [ "code" ] }, { "login": "jonathanurias96", "name": "jonathanurias96", "avatar_url": "https://avatars2.githubusercontent.com/u/57416786?v=4", "profile": "https://github.com/jonathanurias96", "contributions": [ "code" ] }, { "login": "falecci", "name": "Federico Alecci", "avatar_url": "https://avatars2.githubusercontent.com/u/17703824?v=4", "profile": "https://falecci.dev", "contributions": [ "code" ] }, { "login": "MuminjonGuru", "name": "Abduraimov Muminjon", "avatar_url": "https://avatars1.githubusercontent.com/u/24930020?v=4", "profile": "https://linkedin.com/in/muminjon-abduraimov/", "contributions": [ "doc" ] }, { "login": "vlazaroes", "name": "Víctor Lázaro", "avatar_url": "https://avatars1.githubusercontent.com/u/38981659?v=4", "profile": "https://www.vlazaro.es/", "contributions": [ "code" ] }, { "login": "kvnam", "name": "Kavita Nambissan", "avatar_url": "https://avatars0.githubusercontent.com/u/3608742?v=4", "profile": "https://github.com/kvnam", "contributions": [ "code" ] }, { "login": "prashantpalikhe", "name": "Prashant Palikhe", "avatar_url": "https://avatars0.githubusercontent.com/u/2657709?v=4", "profile": "https://x.com/PrashantPalikhe", "contributions": [ "code" ] }, { "login": "jaunesarmiento", "name": "Jaune Sarmiento", "avatar_url": "https://avatars1.githubusercontent.com/u/1166928?v=4", "profile": "https://github.com/jaunesarmiento", "contributions": [ "content" ] }, { "login": "diego-vieira", "name": "Diego Vieira", "avatar_url": "https://avatars2.githubusercontent.com/u/930792?v=4", "profile": "https://github.com/diego-vieira", "contributions": [ "code" ] }, { "login": "pajaydev", "name": "Ajaykumar", "avatar_url": "https://avatars0.githubusercontent.com/u/21375014?v=4", "profile": "https://github.com/pajaydev", "contributions": [ "code" ] }, { "login": "kirubakarthikeyan", "name": "Kiruba Karan", "avatar_url": "https://avatars0.githubusercontent.com/u/38885946?v=4", "profile": "https://github.com/kirubakarthikeyan", "contributions": [ "code" ] }, { "login": "sebasrodriguez", "name": "Sebastián Rodríguez", "avatar_url": "https://avatars1.githubusercontent.com/u/1605931?v=4", "profile": "https://github.com/sebasrodriguez", "contributions": [ "code" ] }, { "login": "karthick3018", "name": "Karthick Raja", "avatar_url": "https://avatars1.githubusercontent.com/u/47154512?v=4", "profile": "https://github.com/karthick3018", "contributions": [ "code" ] }, { "login": "jzabala", "name": "Johnny Zabala", "avatar_url": "https://avatars0.githubusercontent.com/u/1315054?v=4", "profile": "https://github.com/jzabala", "contributions": [ "code" ] }, { "login": "rossmoody", "name": "Ross Moody", "avatar_url": "https://avatars0.githubusercontent.com/u/29072694?v=4", "profile": "http://rossmoody.com", "contributions": [ "design" ] }, { "login": "mehrdad-shokri", "name": "Mehrdad Shokri", "avatar_url": "https://avatars1.githubusercontent.com/u/13661520?v=4", "profile": "https://shokri.me", "contributions": [ "infra" ] }, { "login": "abakermi", "name": "Abdelhak Akermi", "avatar_url": "https://avatars1.githubusercontent.com/u/60294727?v=4", "profile": "https://github.com/abakermi", "contributions": [ "code" ] }, { "login": "crperezt", "name": "Carlos Perez", "avatar_url": "https://avatars0.githubusercontent.com/u/20329014?v=4", "profile": "https://github.com/crperezt", "contributions": [ "code" ] }, { "login": "JayArya", "name": "Jayant Arya", "avatar_url": "https://avatars0.githubusercontent.com/u/42388314?v=4", "profile": "https://github.com/JayArya", "contributions": [ "code" ] }, { "login": "JohnRawlins", "name": "John Rawlins", "avatar_url": "https://avatars3.githubusercontent.com/u/42707277?v=4", "profile": "https://github.com/JohnRawlins", "contributions": [ "code" ] }, { "login": "lepasq", "name": "lepasq", "avatar_url": "https://avatars3.githubusercontent.com/u/53230128?v=4", "profile": "https://github.com/lepasq", "contributions": [ "code" ] }, { "login": "mrfelfel", "name": "mrfelfel", "avatar_url": "https://avatars0.githubusercontent.com/u/19575588?v=4", "profile": "https://github.com/mrfelfel", "contributions": [ "code" ] }, { "login": "gorogoroumaru", "name": "gorogoroumaru", "avatar_url": "https://avatars3.githubusercontent.com/u/30716350?v=4", "profile": "https://x.com/gorogoroumaru", "contributions": [ "code" ] }, { "login": "ruisaraiva19", "name": "Rui Saraiva", "avatar_url": "https://avatars2.githubusercontent.com/u/7356098?v=4", "profile": "http://ruisaraiva.dev", "contributions": [ "code" ] }, { "login": "MBakirci", "name": "Mehmet Bakirci", "avatar_url": "https://avatars2.githubusercontent.com/u/9880089?v=4", "profile": "http://www.bakirci.nl", "contributions": [ "code" ] }, { "login": "JLambertazzo", "name": "Julien Bertazzo Lambert", "avatar_url": "https://avatars0.githubusercontent.com/u/42924425?v=4", "profile": "https://github.com/JLambertazzo", "contributions": [ "code" ] }, { "login": "sidthesloth92", "name": "Dinesh Balaji", "avatar_url": "https://avatars3.githubusercontent.com/u/4656109?v=4", "profile": "http://dbwriteups.wordpress.com", "contributions": [ "code" ] }, { "login": "med1001", "name": "MedBMoussa", "avatar_url": "https://avatars3.githubusercontent.com/u/26111211?v=4", "profile": "https://github.com/med1001", "contributions": [ "code" ] }, { "login": "lucievr", "name": "Lucie Vrsovska", "avatar_url": "https://avatars.githubusercontent.com/u/46979603?v=4", "profile": "http://www.lucie.dev", "contributions": [ "code" ] }, { "login": "jcabak", "name": "Jakub Cabak", "avatar_url": "https://avatars.githubusercontent.com/u/1818155?v=4", "profile": "https://github.com/jcabak", "contributions": [ "code" ] }, { "login": "durgakiran", "name": "Palakurthi Durga Kiran Kumar", "avatar_url": "https://avatars.githubusercontent.com/u/17452039?v=4", "profile": "https://github.com/durgakiran", "contributions": [ "code" ] }, { "login": "karllabrador", "name": "Karl Labrador", "avatar_url": "https://avatars.githubusercontent.com/u/58193703?v=4", "profile": "https://github.com/karllabrador", "contributions": [ "code" ] }, { "login": "rishichawda", "name": "Rishi Kumar Chawda", "avatar_url": "https://avatars.githubusercontent.com/u/26366288?v=4", "profile": "http://rishikc.com", "contributions": [ "code" ] }, { "login": "crocarneiro", "name": "Carlos Rafael de Oliveira Carneiro", "avatar_url": "https://avatars.githubusercontent.com/u/10589421?v=4", "profile": "https://github.com/crocarneiro", "contributions": [ "code" ] }, { "login": "zachOS-tech", "name": "Zach Hoskins", "avatar_url": "https://avatars.githubusercontent.com/u/50255197?v=4", "profile": "http://zachos.tech", "contributions": [ "code" ] }, { "login": "kiwan97", "name": "KIWAN KIM", "avatar_url": "https://avatars.githubusercontent.com/u/25267859?v=4", "profile": "https://github.com/kiwan97", "contributions": [ "code" ] }, { "login": "agaertner", "name": "Andreas", "avatar_url": "https://avatars.githubusercontent.com/u/13819164?v=4", "profile": "https://github.com/agaertner", "contributions": [ "code" ] }, { "login": "p4nu", "name": "Panu Valtanen", "avatar_url": "https://avatars.githubusercontent.com/u/28947061?v=4", "profile": "https://www.linkedin.com/in/panu-valtanen-446ba9108/", "contributions": [ "code" ] }, { "login": "d19dotca", "name": "Dustin Dauncey", "avatar_url": "https://avatars.githubusercontent.com/u/8153796?v=4", "profile": "http://www.d19.ca", "contributions": [ "code" ] }, { "login": "heagan01", "name": "heagan01", "avatar_url": "https://avatars.githubusercontent.com/u/54394590?v=4", "profile": "https://github.com/heagan01", "contributions": [ "code" ] }, { "login": "Th0masCat", "name": "Sahil Jangra", "avatar_url": "https://avatars.githubusercontent.com/u/74812563?v=4", "profile": "https://github.com/Th0masCat", "contributions": [ "code" ] }, { "login": "nopdotcom", "name": "Jay Carlson", "avatar_url": "https://avatars.githubusercontent.com/u/1357866?v=4", "profile": "https://github.com/nopdotcom", "contributions": [ "code" ] }, { "login": "Mikadifo", "name": "Michael Padilla", "avatar_url": "https://avatars.githubusercontent.com/u/51935560?v=4", "profile": "http://mikadifo.com", "contributions": [ "code" ] }, { "login": "NarrowCode", "name": "Andreas Steinkellner", "avatar_url": "https://avatars.githubusercontent.com/u/6213380?v=4", "profile": "https://narrowcode.xyz", "contributions": [ "code" ] }, { "login": "aniknia", "name": "aniknia", "avatar_url": "https://avatars.githubusercontent.com/u/40159649?v=4", "profile": "http://niknia.dev", "contributions": [ "code" ] }, { "login": "WayneRocha", "name": "Wayne Rocha", "avatar_url": "https://avatars.githubusercontent.com/u/62760711?v=4", "profile": "https://github.com/WayneRocha", "contributions": [ "code" ] }, { "login": "crbon", "name": "crbon", "avatar_url": "https://avatars.githubusercontent.com/u/2604330?v=4", "profile": "https://github.com/crbon", "contributions": [ "code" ] }, { "login": "themohammadsa", "name": "Mohammad S", "avatar_url": "https://avatars.githubusercontent.com/u/59393936?v=4", "profile": "https://linktr.ee/themohammadsa", "contributions": [ "code" ] }, { "login": "ReshadSadik", "name": "Reshad Sadik", "avatar_url": "https://avatars.githubusercontent.com/u/66641469?v=4", "profile": "https://github.com/ReshadSadik", "contributions": [ "code" ] }, { "login": "PeterKwesiAnsah", "name": "Kwesi Ansah", "avatar_url": "https://avatars.githubusercontent.com/u/31078314?v=4", "profile": "https://github.com/PeterKwesiAnsah", "contributions": [ "code" ] }, { "login": "monalisamsteccentric", "name": "Monalisa Sahoo", "avatar_url": "https://avatars.githubusercontent.com/u/65477771?v=4", "profile": "https://github.com/monalisamsteccentric", "contributions": [ "code" ] }, { "login": "codewithmitesh", "name": "Mitesh Tank", "avatar_url": "https://avatars.githubusercontent.com/u/85953650?v=4", "profile": "https://github.com/codewithmitesh", "contributions": [ "code" ] }, { "login": "Ryan0204", "name": "Ryan", "avatar_url": "https://avatars.githubusercontent.com/u/82715592?v=4", "profile": "https://github.com/Ryan0204", "contributions": [ "code" ] }, { "login": "jibranabsarulislam", "name": "jayway", "avatar_url": "https://avatars.githubusercontent.com/u/70596906?v=4", "profile": "https://www.jibran.me", "contributions": [ "code" ] }, { "login": "afermon", "name": "Alex Fernandez", "avatar_url": "https://avatars.githubusercontent.com/u/3981106?v=4", "profile": "https://www.xicre.com", "contributions": [ "code" ] }, { "login": "Danial-Gharib", "name": "Danial Gharib", "avatar_url": "https://avatars.githubusercontent.com/u/90343552?v=4", "profile": "https://github.com/Danial-Gharib", "contributions": [ "code" ] }, { "login": "amenk", "name": "Alexander Menk", "avatar_url": "https://avatars.githubusercontent.com/u/1087128?v=4", "profile": "http://www.x.com/s3lf", "contributions": [ "doc" ] }, { "login": "tunahangediz", "name": "Tunahan Gediz", "avatar_url": "https://avatars.githubusercontent.com/u/75015671?v=4", "profile": "http://tunahangediz.com", "contributions": [ "doc" ] }, { "login": "jeffbowen", "name": "Jeff Bowen", "avatar_url": "https://avatars.githubusercontent.com/u/272795?v=4", "profile": "https://refer.codes/jeff", "contributions": [ "code" ] }, { "login": "ParamBirje", "name": "Param Birje", "avatar_url": "https://avatars.githubusercontent.com/u/87022870?v=4", "profile": "https://github.com/ParamBirje", "contributions": [ "code" ] }, { "login": "prajjwalyd", "name": "Prajjwal Yadav", "avatar_url": "https://avatars.githubusercontent.com/u/111794524?v=4", "profile": "https://github.com/prajjwalyd", "contributions": [ "doc" ] }, { "login": "lyncasterc", "name": "Steven Cabrera", "avatar_url": "https://avatars.githubusercontent.com/u/49458912?v=4", "profile": "https://github.com/lyncasterc", "contributions": [ "code" ] }, { "login": "negar-75", "name": "negar nasiri", "avatar_url": "https://avatars.githubusercontent.com/u/113235504?v=4", "profile": "https://github.com/negar-75", "contributions": [ "code" ] }, { "login": "gauravsingh94", "name": "Gaurav Singh", "avatar_url": "https://avatars.githubusercontent.com/u/99260988?v=4", "profile": "https://github.com/gauravsingh94", "contributions": [ "code" ] }, { "login": "NishidhJain", "name": "Nishidh Jain", "avatar_url": "https://avatars.githubusercontent.com/u/61869195?v=4", "profile": "https://github.com/NishidhJain", "contributions": [ "code" ] }, { "login": "mishrasamiksha", "name": "Samiksha Mishra", "avatar_url": "https://avatars.githubusercontent.com/u/38784342?v=4", "profile": "https://github.com/mishrasamiksha", "contributions": [ "doc" ] }, { "login": "astuanax", "name": "Len Dierickx", "avatar_url": "https://avatars.githubusercontent.com/u/1730624?v=4", "profile": "http://www.astuanax.com", "contributions": [ "code" ] }, { "login": "surajbobade", "name": "Suraj Bobade", "avatar_url": "https://avatars.githubusercontent.com/u/102910293?v=4", "profile": "https://github.com/surajbobade", "contributions": [ "code" ] }, { "login": "sagarhedaoo", "name": "Sagar Hedaoo", "avatar_url": "https://avatars.githubusercontent.com/u/10000167?v=4", "profile": "https://sagarhedaoo.com/", "contributions": [ "code" ] }, { "login": "violetadev", "name": "V", "avatar_url": "https://avatars.githubusercontent.com/u/36138541?v=4", "profile": "http://www.violeta.dev", "contributions": [ "code", "test" ] }, { "login": "minowau", "name": "Prabhas Jupalli", "avatar_url": "https://avatars.githubusercontent.com/u/139740712?v=4", "profile": "https://github.com/minowau", "contributions": [ "code" ] }, { "login": "Pulkitxm", "name": "Pulkit", "avatar_url": "https://avatars.githubusercontent.com/u/65671483?v=4", "profile": "http://devpulkit.in", "contributions": [ "code" ] }, { "login": "brandonyee-cs", "name": "Brandon Yee", "avatar_url": "https://avatars.githubusercontent.com/u/139765638?v=4", "profile": "https://github.com/brandonyee-cs", "contributions": [ "content" ] }, { "login": "wp043", "name": "Wendy Pan", "avatar_url": "https://avatars.githubusercontent.com/u/110360465?v=4", "profile": "https://github.com/wp043", "contributions": [ "code" ] }, { "login": "pranavithape", "name": "Pranav Ithape", "avatar_url": "https://avatars.githubusercontent.com/u/170559714?v=4", "profile": "https://github.com/pranavithape", "contributions": [ "code" ] }, { "login": "Sukrit-Prakash", "name": "SUKRIT PRAKASH SINGH", "avatar_url": "https://avatars.githubusercontent.com/u/136228545?v=4", "profile": "https://github.com/Sukrit-Prakash", "contributions": [ "code" ] }, { "login": "aryan262", "name": "Aryan Panchal", "avatar_url": "https://avatars.githubusercontent.com/u/97938438?v=4", "profile": "https://github.com/aryan262", "contributions": [ "code" ] }, { "login": "samranahm", "name": "Samran Ahmed", "avatar_url": "https://avatars.githubusercontent.com/u/149153498?v=4", "profile": "https://github.com/samranahm", "contributions": [ "code" ] }, { "login": "asatyam", "name": "SatyamAgrawal", "avatar_url": "https://avatars.githubusercontent.com/u/95954551?v=4", "profile": "https://github.com/Asatyam", "contributions": [ "code" ] }, { "login": "saiTharunDusa", "name": "Sai Tharun Dusa", "avatar_url": "https://avatars.githubusercontent.com/u/169873642?v=4", "profile": "https://github.com/saiTharunDusa", "contributions": [ "code" ] }, { "login": "happymvp", "name": "Pavlo", "avatar_url": "https://avatars.githubusercontent.com/u/179954458?v=4", "profile": "http://happymvp.com", "contributions": [ "code", "test" ] }, { "login": "AnalyticalDataArtisan", "name": "AnalyticalDataArtisan", "avatar_url": "https://avatars.githubusercontent.com/u/183036785?v=4", "profile": "https://github.com/AnalyticalDataArtisan", "contributions": [ "code" ] }, { "login": "Kieren-Foenander", "name": "Kieren-Foenander", "avatar_url": "https://avatars.githubusercontent.com/u/68266113?v=4", "profile": "https://github.com/Kieren-Foenander", "contributions": [ "code" ] }, { "login": "Trishix", "name": "Trishit Swarnakar", "avatar_url": "https://avatars.githubusercontent.com/u/170200412?v=4", "profile": "https://github.com/Trishix", "contributions": [ "code" ] }, { "login": "cseas", "name": "Abhijeet Singh", "avatar_url": "https://avatars.githubusercontent.com/u/29686866?v=4", "profile": "https://blog.absingh.com/", "contributions": [ "doc" ] }, { "login": "meezumi", "name": "aaryan", "avatar_url": "https://avatars.githubusercontent.com/u/93996658?v=4", "profile": "http://aaryancreates.framer.media", "contributions": [ "code" ] }, { "login": "mklikushin", "name": "Michael Klikushin", "avatar_url": "https://avatars.githubusercontent.com/u/135151016?v=4", "profile": "https://github.com/mklikushin", "contributions": [ "code" ] }, { "login": "bhnprksh222", "name": "Bhanu Prakash", "avatar_url": "https://avatars.githubusercontent.com/u/48930756?v=4", "profile": "https://github.com/bhnprksh222", "contributions": [ "code" ] }, { "login": "sayagodev", "name": "Saúl Sáyago", "avatar_url": "https://avatars.githubusercontent.com/u/67727553?v=4", "profile": "http://sayago.dev", "contributions": [ "code" ] } ], "contributorsPerLine": 5, "projectName": "responsively-app", "projectOwner": "responsively-org", "repoType": "github", "repoHost": "https://github.com", "skipCi": true, "commitConvention": "none", "commitType": "docs" } ================================================ FILE: .gitattributes ================================================ /desktop-app-legacy/* export-ignore ================================================ FILE: .github/FUNDING.yml ================================================ # These are supported funding model platforms github: responsively-org # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] patreon: # Replace with a single Patreon username open_collective: responsively ko_fi: # Replace with a single Ko-fi username tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] ================================================ FILE: .github/ISSUE_TEMPLATE/01-bug-report.md ================================================ --- name: "\U0001F41E Bug report" about: Report a bug in Responsively --- # 🐞 bug report ### ✍️ Description ### 🕵🏼‍♂️ Is this a regression? ### 🔬 Minimal Reproduction ### 🌍 Your Environment


### 🔥 Exception or Error or Screenshot


================================================ FILE: .github/ISSUE_TEMPLATE/02-feature-request.md ================================================ --- name: "\U0001F680 Feature request" about: Suggest a feature for Responsively. --- # 🚀 Feature Request ### 📝 Description ### ✨ Describe the solution you'd like ### ✍️ Describe alternatives you've considered ================================================ FILE: .github/PULL_REQUEST_TEMPLATE.md ================================================ # ✨ Pull Request ### 📓 Referenced Issue ### ℹ️ About the PR ### 🖼️ Testing Scenarios / Screenshots ================================================ FILE: .github/dependabot.yml ================================================ # To get started with Dependabot version updates, you'll need to specify which # package ecosystems to update and where the package manifests are located. # Please see the documentation for all configuration options: # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates version: 2 updates: - package-ecosystem: "npm" # See documentation for possible values directory: "/desktop-app" # Location of package manifests schedule: interval: "daily" ================================================ FILE: .github/opencollective.yml ================================================ collective: responsively ================================================ FILE: .github/stale.yml ================================================ # Number of days of inactivity before an issue becomes stale daysUntilStale: 60 # Number of days of inactivity before a stale issue is closed daysUntilClose: 7 # Issues with these labels will never be considered stale exemptLabels: - discussion - security # Label to use when marking an issue as stale staleLabel: wontfix # Comment to post when marking an issue as stale. Set to `false` to disable markComment: > This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. # Comment to post when closing a stale issue. Set to `false` to disable closeComment: false ================================================ FILE: .github/workflows/codeql-analysis.yml ================================================ # For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # # You may wish to alter this file to override the set of languages analyzed, # or to provide custom queries or build logic. # # ******** NOTE ******** # We have attempted to detect the languages in your repository. Please check # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # name: "CodeQL" on: push: branches: [ "main" ] pull_request: # The branches below must be a subset of the branches above branches: [ "main" ] schedule: - cron: '44 16 * * 4' jobs: analyze: name: Analyze runs-on: ubuntu-latest permissions: actions: read contents: read security-events: write defaults: run: working-directory: ./desktop-app strategy: fail-fast: false matrix: language: [ 'javascript' ] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support steps: - name: Checkout repository uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild uses: github/codeql-action/autobuild@v3 # ℹ️ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun # If the Autobuild fails above, remove it and uncomment the following three lines. # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. # - run: | # echo "Run, Build Application using script" # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 ================================================ FILE: .github/workflows/publish.yml ================================================ name: Publish on: workflow_dispatch: jobs: publish: runs-on: ${{ matrix.os }} defaults: run: working-directory: ./desktop-app strategy: matrix: os: [macos-13] steps: - name: Checkout git repo uses: actions/checkout@v4 - name: Install Node and NPM uses: actions/setup-node@v4 with: node-version: 24 cache: ${{ !env.ACT && 'npm' || '' }} # Disable cache for nektos/act cache-dependency-path: ./desktop-app/yarn.lock - name: Install and build run: | yarn install yarn run postinstall yarn run build - name: Bump version run: | cd release/app yarn version --preid beta --prerelease git push - name: Publish releases env: # These values are used for auto updates signing APPLE_ID: ${{ secrets.APPLEID }} APPLE_ID_PASS: ${{ secrets.APPLEIDPASS }} CSC_LINK: ${{ secrets.CSC_LINK }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} # This is used for uploading release assets to github GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | yarn exec electron-builder -- --publish always --win --mac --linux --arm64 --x64 ================================================ FILE: .github/workflows/test.yml ================================================ name: Test on: [push, pull_request] jobs: test: runs-on: ${{ matrix.os }} defaults: run: working-directory: ./desktop-app strategy: matrix: os: [macos-latest] fail-fast: false steps: - name: Check out Git repository uses: actions/checkout@v4 - name: Install Node.js and NPM uses: actions/setup-node@v4 with: node-version: 24 cache: ${{ !env.ACT && 'npm' || '' }} # Disable cache for nektos/act cache-dependency-path: ./desktop-app/yarn.lock - name: yarn install run: | yarn install --network-timeout 120000 - name: yarn test env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | yarn run package yarn run lint yarn exec tsc yarn test ================================================ FILE: .gitignore ================================================ .DS_Store .idea ================================================ FILE: CONTRIBUTING.md ================================================ ## Contributing Contributions are welcome and always appreciated! To begin working on an issue, simply leave a comment indicating that you're taking it on. There's no need to be officially assigned to the issue before you start. ### Before Starting Do keep in mind before you start working on an issue / posting a PR: - Search existing PRs related to that issue which might close them - Confirm if other contributors are working on the same issue ### Tips & Things to Consider - We are active in Discord and can help out if you get stuck, [join us!](https://responsively.app/join-discord) - PRs with tests are highly appreciated - Avoid adding third party libraries, whenever possible - Unless you are helping out by updating dependencies, you should not be uploading your yarn.lock or updating any dependencies in your PR - If you are unsure where to start, contact us and we will point you to a first good issue ## Run Locally Ensure you have the following dependencies installed: - Install `node` and `yarn` - Configure your IDE to support ESLint and Prettier extensions. After having above installed, proceed through the following steps to setup the codebase locally. - Fork the project & [clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) it locally. ![fork-project](https://github.com/responsively-org/responsively-app/assets/87022870/2cae8b2a-850c-4f80-8ede-32eba622a854) - Create a new separate branch. ```bash git checkout -b BRANCH_NAME ``` - Go to the desktop-app directory. ```bash cd desktop-app ``` - Run the following command to install dependencies inside the desktop-app directory. ```bash yarn ``` - This will start the app for local development with live reloading. ```bash yarn dev ``` ## Running Tests It is crucial to test your code before submitting a pull request. Please ensure that you can make a complete production build before you submit your code for merging. - Build the project ```bash yarn build ``` - Now test your code using the following command ```bash yarn test ``` Make sure the tests have successfully passed. ## Pull Request 🎉 Now that you're ready to submit your code for merging, there are some points to keep in mind. - Fill your PR description template accordingly. - Have an appropriate title and description. - Include relevant screenshots/gifs. - If your PR fixes some issue, be sure to add this line with the issue **in the body** of the Pull Request description. ```text Fixes #00000 ``` - If your PR is referencing an issue ```text Refs #00000 ``` - Ensure that "Allow edits from maintainers" option is checked. ## Community Need help on a solution from fellow contributors or want to discuss about a feature/issue? Join our [Discord](https://responsively.app/join-discord)! ================================================ FILE: LICENSE ================================================ GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see . ================================================ FILE: MAINTAINERS.md ================================================ # Project Maintainer ## How to become a maintainer The following are the criteria to get considered becoming a maintainer: - Implemented two or more features to the project. - Being active and sticking around on GitHub and Discord, engaging with other user's on their problems and providing useful solutions. Contributors who match the above criteria would be evaluated by the existing maintainers and invited as maintainers if they see fit. ## Responsibilities As a project maintainer for Responsively App, your responsibilities include: #### Code/Tech: - Do issue triage on user reported bugs. - Review and merge contributions. - Advise new contributors on better practices in their code. - Automate any manual process in the project/CI workflow. - Constantly strive to improve the DX of the project #### Community - Be nice to everyone on Discord and GitHub. - Try and provide sensible solution to user reported problems. Always feel free to reach out to `p.manoj.vivek@gmail.com` or `manojVivek` on Discord if you have any questions. ================================================ FILE: README.md ================================================
Responsively Logo

Responsively App GitHub release

A must-have dev tool for web developers for quicker responsive web development. 🚀
Save time by becoming 5x faster!

Twitter contributors Discord XS:Code PRs Welcome Open Collective backers and sponsors

ProductHunt

Download Now (free!): responsively.app


## Responsively App > A modified browser built using [Electron](https://www.electronjs.org/) that helps in responsive web development. >
![Quick Demo](https://responsively.app/assets/img/responsively-app.gif) ## Features 1. Mirrored User-interactions across all devices. 2. Customizable preview layout to suit all your needs. 3. One handy elements inspector for all devices in preview. 4. 30+ built-in device profiles with the option to add custom devices. 5. One-click screenshots on all your devices. 6. Hot reloading is supported for developers. Please visit the website to learn more about the application - https://responsively.app ## Download The application is available for Mac, Windows and Linux platforms. Please download it from responsively.app Alternatively, MacOS users can use [`brew`](https://formulae.brew.sh/cask/responsively) Homebrew installs ```bash brew install --cask responsively ``` Also, Windows users can use [`chocolatey`](https://chocolatey.org/packages/responsively/) Chocolatey installs ```bash choco install responsively ``` or [`winget`](https://github.com/microsoft/winget-cli): ```bash winget install ResponsivelyApp ``` Linux users using an RPM Package Manager can use `rpm` ```bash sudo rpm -i https://github.com/responsively-org/responsively-app/releases/download/v[VERSION]/Responsively-App-[VERSION].x86_64.rpm ``` otherwise, download an AppImage from [the releases page](https://github.com/responsively-org/responsively-app/releases) Follow us on Twitter for future updates - [![Twitter Follow](https://img.shields.io/twitter/follow/ResponsivelyApp?style=social)](https://x.com/ResponsivelyApp) ## Browser Extension Install the handy browser extension to easily send links from your browser to the app and preview instantly. - [Download for Chrome](https://chrome.google.com/webstore/detail/responsively-helper/jhphiidjkooiaollfiknkokgodbaddcj) Chrome Web Store - [Download for Firefox](https://addons.mozilla.org/en-US/firefox/addon/responsively-helper/) Mozilla Add-on - [Download for Edge](https://microsoftedge.microsoft.com/addons/detail/responsively-helper/ooiejjgflcgkbbehheengalibfehaojn) Edge Add-on ## Issues If you face any problems while using the application, please open an issue here - https://github.com/responsively-org/responsively-app/issues ## Roadmap Here is the roadmap of the desktop app - https://github.com/responsively-org/responsively-app/projects/ ## Gold sponsors 🥇
Sponsor to add your company logo here
[Become a sponsor and have your company logo here](https://opencollective.com/responsively) ## Contribute To get started with contributing your awesome ideas to Responsively, follow the [comprehensive guide here](https://github.com/responsively-org/responsively-app/blob/main/CONTRIBUTING.md)! ## Get in touch Come say hi to us on [Discord](https://responsively.app/join-discord)! :wave: ## Contributors ✨ Thanks go to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Manoj Vivek
Manoj Vivek

💻 ⚠️ 📆
Suresh P
Suresh P

💻 ⚠️ 📆
Sigit Prabowo
Sigit Prabowo

💻
Leon Feng
Leon Feng

📖
Kishore S
Kishore S

💻
José Javier Rodríguez Zas
José Javier Rodríguez Zas

💻 ⚠️
Roman Akash
Roman Akash

💻
Romain Francony
Romain Francony

💻
AARYAN-MAHENDRA
AARYAN-MAHENDRA

💻
Andy
Andy

💻
Ryan Pais
Ryan Pais

💻 ⚠️
Jonathan
Jonathan

💻
Gema Anggada ✌︎
Gema Anggada ✌︎

💻
jonathanurias96
jonathanurias96

💻
Federico Alecci
Federico Alecci

💻
Abduraimov Muminjon
Abduraimov Muminjon

📖
Víctor Lázaro
Víctor Lázaro

💻
Kavita Nambissan
Kavita Nambissan

💻
Prashant Palikhe
Prashant Palikhe

💻
Jaune Sarmiento
Jaune Sarmiento

🖋
Diego Vieira
Diego Vieira

💻
Ajaykumar
Ajaykumar

💻
Kiruba Karan
Kiruba Karan

💻
Sebastián Rodríguez
Sebastián Rodríguez

💻
Karthick Raja
Karthick Raja

💻
Johnny Zabala
Johnny Zabala

💻
Ross Moody
Ross Moody

🎨
Mehrdad Shokri
Mehrdad Shokri

🚇
Abdelhak Akermi
Abdelhak Akermi

💻
Carlos Perez
Carlos Perez

💻
Jayant Arya
Jayant Arya

💻
John Rawlins
John Rawlins

💻
lepasq
lepasq

💻
mrfelfel
mrfelfel

💻
gorogoroumaru
gorogoroumaru

💻
Rui Saraiva
Rui Saraiva

💻
Mehmet Bakirci
Mehmet Bakirci

💻
Julien Bertazzo Lambert
Julien Bertazzo Lambert

💻
Dinesh Balaji
Dinesh Balaji

💻
MedBMoussa
MedBMoussa

💻
Lucie Vrsovska
Lucie Vrsovska

💻
Jakub Cabak
Jakub Cabak

💻
Palakurthi Durga Kiran Kumar
Palakurthi Durga Kiran Kumar

💻
Karl Labrador
Karl Labrador

💻
Rishi Kumar Chawda
Rishi Kumar Chawda

💻
Carlos Rafael de Oliveira Carneiro
Carlos Rafael de Oliveira Carneiro

💻
Zach Hoskins
Zach Hoskins

💻
KIWAN KIM
KIWAN KIM

💻
Andreas
Andreas

💻
Panu Valtanen
Panu Valtanen

💻
Dustin Dauncey
Dustin Dauncey

💻
heagan01
heagan01

💻
Sahil Jangra
Sahil Jangra

💻
Jay Carlson
Jay Carlson

💻
Michael Padilla
Michael Padilla

💻
Andreas Steinkellner
Andreas Steinkellner

💻
aniknia
aniknia

💻
Wayne Rocha
Wayne Rocha

💻
crbon
crbon

💻
Mohammad S
Mohammad S

💻
Reshad Sadik
Reshad Sadik

💻
Kwesi Ansah
Kwesi Ansah

💻
Monalisa Sahoo
Monalisa Sahoo

💻
Mitesh Tank
Mitesh Tank

💻
Ryan
Ryan

💻
jayway
jayway

💻
Alex Fernandez
Alex Fernandez

💻
Danial Gharib
Danial Gharib

💻
Alexander Menk
Alexander Menk

📖
Tunahan Gediz
Tunahan Gediz

📖
Jeff Bowen
Jeff Bowen

💻
Param Birje
Param Birje

💻
Prajjwal Yadav
Prajjwal Yadav

📖
Steven Cabrera
Steven Cabrera

💻
negar nasiri
negar nasiri

💻
Gaurav Singh
Gaurav Singh

💻
Nishidh Jain
Nishidh Jain

💻
Samiksha Mishra
Samiksha Mishra

📖
Len Dierickx
Len Dierickx

💻
Suraj Bobade
Suraj Bobade

💻
Sagar Hedaoo
Sagar Hedaoo

💻
V
V

💻 ⚠️
Prabhas Jupalli
Prabhas Jupalli

💻
Pulkit
Pulkit

💻
Brandon Yee
Brandon Yee

🖋
Wendy Pan
Wendy Pan

💻
Pranav Ithape
Pranav Ithape

💻
SUKRIT PRAKASH SINGH
SUKRIT PRAKASH SINGH

💻
Aryan Panchal
Aryan Panchal

💻
Samran Ahmed
Samran Ahmed

💻
SatyamAgrawal
SatyamAgrawal

💻
Sai Tharun Dusa
Sai Tharun Dusa

💻
Pavlo
Pavlo

💻 ⚠️
AnalyticalDataArtisan
AnalyticalDataArtisan

💻
Kieren-Foenander
Kieren-Foenander

💻
Trishit Swarnakar
Trishit Swarnakar

💻
Abhijeet Singh
Abhijeet Singh

📖
aaryan
aaryan

💻
Michael Klikushin
Michael Klikushin

💻
Bhanu Prakash
Bhanu Prakash

💻
Saúl Sáyago
Saúl Sáyago

💻
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome! ================================================ FILE: SECURITY.md ================================================ # Security Policy ## Supported Versions Below are the versions that are currently being supported with security updates. | Version | Supported | | ------- | ------------------ | | 1.x.x | :white_check_mark: | | < 1.0 | :x: | ## Reporting a Vulnerability Vulnerabilities can be reported in the following ways: 1. Create an issue required details (here)[https://github.com/responsively-org/responsively-app/issues]. 2. Send an email to `p.manoj.vivek` at `gmail.com` with details. ================================================ FILE: browser-extension/.gitignore ================================================ node_modules yarn.lock dist setCreds.sh web-ext-artifacts ================================================ FILE: browser-extension/.vscode/settings.json ================================================ { "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode" } ================================================ FILE: browser-extension/package.json ================================================ { "name": "Responsively-Helper", "version": "0.0.1", "description": "An extension to open current browser page in Responsively app", "private": true, "scripts": { "lint": "run-p lint:*", "lint:js": "xo", "lint:css": "stylelint source/**/*.css", "lint-fix": "run-p 'lint:* -- --fix'", "test": "run-s lint:* build", "start": "webpack serve --mode=development --hot --open", "build": "webpack --mode=production", "release:cws": "webstore upload --source=dist --auto-publish", "release:amo": "web-ext-submit --source-dir dist", "release": "run-s build release:*" }, "devDependencies": { "@babel/core": "^7.10.1", "@babel/plugin-proposal-class-properties": "^7.10.1", "@babel/plugin-proposal-object-rest-spread": "^7.10.1", "@babel/plugin-transform-react-constant-elements": "^7.10.1", "@babel/plugin-transform-runtime": "^7.10.1", "@babel/preset-env": "^7.10.1", "@babel/preset-react": "^7.10.1", "@ianwalter/web-ext-webpack-plugin": "^0.1.0", "babel-loader": "^8.1.0", "chrome-webstore-upload-cli": "^1.2.0", "copy-webpack-plugin": "^5.0.3", "daily-version": "^0.12.0", "dot-json": "^1.1.0", "eslint": "^6.1.0", "eslint-config-xo": "^0.26.0", "npm-run-all": "^4.1.5", "size-plugin": "^1.2.0", "stylelint": "^10.1.0", "stylelint-config-xo": "^0.15.0", "terser-webpack-plugin": "^1.3.0", "web-ext": "^4.2.0", "web-ext-submit": "^4.2.0", "webpack": "^4.36.1", "webpack-cli": "^3.3.6", "xo": "^0.24.0" }, "dependencies": { "custom-protocol-check": "^1.1.0", "react": "^16.13.1", "react-dom": "^16.13.1", "url-loader": "^4.1.0", "webextension-polyfill": "^0.4.0" }, "xo": { "envs": [ "browser" ], "ignores": [ "dist" ], "globals": [ "browser" ] }, "stylelint": { "extends": "stylelint-config-xo" } } ================================================ FILE: browser-extension/public/manifest.json ================================================ { "name": "Responsively Helper", "version": "0.0.2", "description": "An extension to open current browser page in Responsively app", "homepage_url": "https://responsively.app", "manifest_version": 2, "icons": { "128": "logo_128.png", "48": "logo_48.png", "16": "logo_16.png" }, "background": { "persistent": false, "scripts": [ "browser-polyfill.min.js", "background.js" ] }, "browser_action": { "default_icon": "logo_128.png", "default_title": "Open page in Responsively app", "default_popup": "popup.html" }, "permissions": [ "activeTab" ] } ================================================ FILE: browser-extension/public/popup.html ================================================
================================================ FILE: browser-extension/src/background.js ================================================ browser.browserAction.onClicked.addListener((tab) => { browser.tabs.executeScript({ file: './openURL.js' }); }); ================================================ FILE: browser-extension/src/popup.js ================================================ import openCustomProtocolURI from "custom-protocol-check"; import React, { useEffect, useState, useCallback } from "react"; import ReactDOM from "react-dom"; import spinner from "./spinner.svg"; const isChrome = () => { // IE11 returns undefined for window.chrome // and new Opera 30 outputs true for window.chrome // but needs to check if window.opr is not undefined // and new IE Edge outputs to true for window.chrome // and if not iOS Chrome check const isChromium = window.chrome; const winNav = window.navigator; const vendorName = winNav.vendor; const isOpera = typeof window.opr !== "undefined"; const isIEedge = winNav.userAgent.indexOf("Edge") > -1; const isIOSChrome = winNav.userAgent.match("CriOS"); return ( (isChromium !== null && typeof isChromium !== "undefined" && vendorName === "Google Inc." && isOpera === false && isIEedge === false) || isIOSChrome ); }; const URLOpenerNonChrome = () => { const [status, setStatus] = useState("loading"); const checkProtocolAndUpdateStatus = useCallback(async () => { const [tab] = await window.browser.tabs.query({ currentWindow: true, active: true }); if (!tab || !tab.url) { setStatus("false"); return; } openCustomProtocolURI( `responsively://${tab.url}`, () => setStatus("false"), () => setStatus("true") ); }, []); useEffect(() => { checkProtocolAndUpdateStatus(); }, [checkProtocolAndUpdateStatus]); if (status === "loading") { return (
); } if (status === "false") { return (
It looks like you dont have Responsively App installed to preview the page in responsive mode.



Please install the app and open it once to continue using the extension.
); } return null; }; const URLOpenerChrome = () => { const updateTabURL = useCallback(async () => { const [tab] = await window.browser.tabs.query({ currentWindow: true, active: true }); if (!tab || !tab.url) { return; } window.browser.tabs.update({ url: `responsively://${tab.url}` }); }, []); useEffect(() => { updateTabURL(); setTimeout(() => { window.close(); }, 5000); }, [updateTabURL]); return (
If you have any issues seeing the responsive preview, please make sure Responsively app is installed.




); }; ReactDOM.render( isChrome() ? : , document.getElementById("app") ); // HMR integration if (module.hot) { module.hot.accept('./popup', () => { const NextPopup = require('./popup').default; ReactDOM.render(, document.getElementById('app')); }); } ================================================ FILE: browser-extension/webpack.config.js ================================================ const webpack = require('webpack'); const path = require('path'); const SizePlugin = require('size-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const WebExtWebpackPlugin = require('@ianwalter/web-ext-webpack-plugin'); const TerserPlugin = require('terser-webpack-plugin'); module.exports = { devtool: 'source-map', stats: 'errors-only', entry: { background: './src/background', popup: './src/popup', // Add HMR client main: [ 'webpack-hot-middleware/client?reload=true', // Use 'reload=true' for CSS './src/index.js', // Adjust to your main file ], }, output: { path: path.join(__dirname, 'dist'), filename: '[name].js', publicPath: '/', // Required for HMR }, module: { rules: [ { test: /\.js$/, include: [ path.resolve(__dirname, "src") ], use: { loader: 'babel-loader', options: { presets: [ ["@babel/preset-env", { modules: false }], "@babel/preset-react" ], plugins: [ "@babel/plugin-transform-react-constant-elements", "@babel/plugin-proposal-object-rest-spread", "@babel/plugin-proposal-class-properties", "@babel/plugin-transform-runtime", 'react-refresh/babel', // Add React Refresh for HMR ], }, }, }, { test: /\.(svg|gif|png|jpg)$/, use: 'url-loader', } ], }, plugins: [ new webpack.HotModuleReplacementPlugin(), // Enable HMR new SizePlugin(), new CopyWebpackPlugin({ patterns: [ { from: '**/*', context: 'public', }, { from: 'node_modules/webextension-polyfill/dist/browser-polyfill.min.js' } ], }), new WebExtWebpackPlugin({ sourceDir: path.join(__dirname, 'dist'), verbose: true }), ], optimization: { minimizer: [ new TerserPlugin({ terserOptions: { mangle: false, compress: false, output: { beautify: true, indent_level: 2 } } }) ] } }; ================================================ FILE: desktop-app/. prettierignore ================================================ .erb/* ================================================ FILE: desktop-app/.editorconfig ================================================ root = true [*] indent_style = space indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [*.md] trim_trailing_whitespace = false ================================================ FILE: desktop-app/.erb/configs/.eslintrc ================================================ { "rules": { "no-console": "off", "global-require": "off", "import/no-dynamic-require": "off" } } ================================================ FILE: desktop-app/.erb/configs/webpack.config.base.ts ================================================ /** * Base webpack config used across other specific configs */ import webpack from 'webpack'; import TsconfigPathsPlugins from 'tsconfig-paths-webpack-plugin'; import webpackPaths from './webpack.paths'; import { dependencies as externals } from '../../release/app/package.json'; const configuration: webpack.Configuration = { externals: [...Object.keys(externals || {})], stats: 'errors-only', module: { rules: [ { test: /\.[jt]sx?$/, exclude: /node_modules/, use: { loader: 'ts-loader', options: { // Remove this line to enable type checking in webpack builds transpileOnly: true, compilerOptions: { module: 'esnext', }, }, }, }, ], }, output: { path: webpackPaths.srcPath, // https://github.com/webpack/webpack/issues/1114 library: { type: 'commonjs2', }, }, /** * Determine the array of extensions that should be used to resolve modules. */ resolve: { extensions: ['.js', '.jsx', '.json', '.ts', '.tsx'], modules: [webpackPaths.srcPath, 'node_modules'], // There is no need to add aliases here, the paths in tsconfig get mirrored plugins: [new TsconfigPathsPlugins()], }, plugins: [ new webpack.EnvironmentPlugin({ NODE_ENV: 'production', }), ], }; export default configuration; ================================================ FILE: desktop-app/.erb/configs/webpack.config.eslint.ts ================================================ /* eslint import/no-unresolved: off, import/no-self-import: off */ module.exports = require('./webpack.config.renderer.dev').default; ================================================ FILE: desktop-app/.erb/configs/webpack.config.main.prod.ts ================================================ /** * Webpack config for production electron main process */ import path from 'path'; import webpack from 'webpack'; import { merge } from 'webpack-merge'; import TerserPlugin from 'terser-webpack-plugin'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import baseConfig from './webpack.config.base'; import webpackPaths from './webpack.paths'; import checkNodeEnv from '../scripts/check-node-env'; import deleteSourceMaps from '../scripts/delete-source-maps'; checkNodeEnv('production'); deleteSourceMaps(); const devtoolsConfig = process.env.DEBUG_PROD === 'true' ? { devtool: 'source-map', } : {}; const configuration: webpack.Configuration = { ...devtoolsConfig, mode: 'production', target: 'electron-main', entry: { main: path.join(webpackPaths.srcMainPath, 'main.ts'), preload: path.join(webpackPaths.srcMainPath, 'preload.ts'), 'preload-webview': path.join( webpackPaths.srcMainPath, 'preload-webview.ts' ), }, externals: ['fsevents'], output: { path: webpackPaths.distMainPath, filename: '[name].js', library: { type: 'umd', }, }, optimization: { minimizer: [ new TerserPlugin({ parallel: true, }), ], }, plugins: [ new BundleAnalyzerPlugin({ analyzerMode: process.env.ANALYZE === 'true' ? 'server' : 'disabled', }), /** * Create global constants which can be configured at compile time. * * Useful for allowing different behaviour between development builds and * release builds * * NODE_ENV should be production so that modules do not perform certain * development checks */ new webpack.EnvironmentPlugin({ NODE_ENV: 'production', DEBUG_PROD: false, START_MINIMIZED: false, }), new webpack.DefinePlugin({ 'process.type': '"browser"', }), ], /** * Disables webpack processing of __dirname and __filename. * If you run the bundle in node.js it falls back to these values of node.js. * https://github.com/webpack/webpack/issues/2010 */ node: { __dirname: false, __filename: false, }, }; export default merge(baseConfig, configuration); ================================================ FILE: desktop-app/.erb/configs/webpack.config.preload-webview.dev.ts ================================================ import path from 'path'; import webpack from 'webpack'; import { merge } from 'webpack-merge'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import baseConfig from './webpack.config.base'; import webpackPaths from './webpack.paths'; import checkNodeEnv from '../scripts/check-node-env'; // When an ESLint server is running, we can't set the NODE_ENV so we'll check if it's // at the dev webpack config is not accidentally run in a production environment if (process.env.NODE_ENV === 'production') { checkNodeEnv('development'); } const configuration: webpack.Configuration = { devtool: 'inline-source-map', mode: 'development', target: 'electron-preload', entry: path.join(webpackPaths.srcMainPath, 'preload-webview.ts'), output: { path: webpackPaths.dllPath, filename: 'preload-webview.js', library: { type: 'umd', }, }, plugins: [ new BundleAnalyzerPlugin({ analyzerMode: process.env.ANALYZE === 'true' ? 'server' : 'disabled', }), /** * Create global constants which can be configured at compile time. * * Useful for allowing different behaviour between development builds and * release builds * * NODE_ENV should be production so that modules do not perform certain * development checks * * By default, use 'development' as NODE_ENV. This can be overriden with * 'staging', for example, by changing the ENV variables in the npm scripts */ new webpack.EnvironmentPlugin({ NODE_ENV: 'development', }), new webpack.LoaderOptionsPlugin({ debug: true, }), ], /** * Disables webpack processing of __dirname and __filename. * If you run the bundle in node.js it falls back to these values of node.js. * https://github.com/webpack/webpack/issues/2010 */ node: { __dirname: false, __filename: false, }, watch: true, }; export default merge(baseConfig, configuration); ================================================ FILE: desktop-app/.erb/configs/webpack.config.preload.dev.ts ================================================ import path from 'path'; import webpack from 'webpack'; import { merge } from 'webpack-merge'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import baseConfig from './webpack.config.base'; import webpackPaths from './webpack.paths'; import checkNodeEnv from '../scripts/check-node-env'; // When an ESLint server is running, we can't set the NODE_ENV so we'll check if it's // at the dev webpack config is not accidentally run in a production environment if (process.env.NODE_ENV === 'production') { checkNodeEnv('development'); } const configuration: webpack.Configuration = { devtool: 'inline-source-map', mode: 'development', target: 'electron-preload', entry: path.join(webpackPaths.srcMainPath, 'preload.ts'), output: { path: webpackPaths.dllPath, filename: 'preload.js', library: { type: 'umd', }, }, plugins: [ new BundleAnalyzerPlugin({ analyzerMode: process.env.ANALYZE === 'true' ? 'server' : 'disabled', }), /** * Create global constants which can be configured at compile time. * * Useful for allowing different behaviour between development builds and * release builds * * NODE_ENV should be production so that modules do not perform certain * development checks * * By default, use 'development' as NODE_ENV. This can be overriden with * 'staging', for example, by changing the ENV variables in the npm scripts */ new webpack.EnvironmentPlugin({ NODE_ENV: 'development', }), new webpack.LoaderOptionsPlugin({ debug: true, }), ], /** * Disables webpack processing of __dirname and __filename. * If you run the bundle in node.js it falls back to these values of node.js. * https://github.com/webpack/webpack/issues/2010 */ node: { __dirname: false, __filename: false, }, watch: true, }; export default merge(baseConfig, configuration); ================================================ FILE: desktop-app/.erb/configs/webpack.config.renderer.dev.dll.ts ================================================ /** * Builds the DLL for development electron renderer process */ import webpack from 'webpack'; import path from 'path'; import { merge } from 'webpack-merge'; import baseConfig from './webpack.config.base'; import webpackPaths from './webpack.paths'; import { dependencies } from '../../package.json'; import checkNodeEnv from '../scripts/check-node-env'; checkNodeEnv('development'); const dist = webpackPaths.dllPath; const configuration: webpack.Configuration = { context: webpackPaths.rootPath, devtool: 'eval', mode: 'development', target: 'electron-renderer', externals: ['fsevents', 'crypto-browserify'], /** * Use `module` from `webpack.config.renderer.dev.js` */ module: require('./webpack.config.renderer.dev').default.module, entry: { renderer: Object.keys(dependencies || {}), }, output: { path: dist, filename: '[name].dev.dll.js', library: { name: 'renderer', type: 'var', }, }, plugins: [ new webpack.DllPlugin({ path: path.join(dist, '[name].json'), name: '[name]', }), /** * Create global constants which can be configured at compile time. * * Useful for allowing different behaviour between development builds and * release builds * * NODE_ENV should be production so that modules do not perform certain * development checks */ new webpack.EnvironmentPlugin({ NODE_ENV: 'development', }), new webpack.LoaderOptionsPlugin({ debug: true, options: { context: webpackPaths.srcPath, output: { path: webpackPaths.dllPath, }, }, }), ], }; export default merge(baseConfig, configuration); ================================================ FILE: desktop-app/.erb/configs/webpack.config.renderer.dev.ts ================================================ import 'webpack-dev-server'; import path from 'path'; import fs from 'fs'; import webpack from 'webpack'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import chalk from 'chalk'; import { merge } from 'webpack-merge'; import { execSync, spawn } from 'child_process'; import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin'; import baseConfig from './webpack.config.base'; import webpackPaths from './webpack.paths'; import checkNodeEnv from '../scripts/check-node-env'; // When an ESLint server is running, we can't set the NODE_ENV so we'll check if it's // at the dev webpack config is not accidentally run in a production environment if (process.env.NODE_ENV === 'production') { checkNodeEnv('development'); } const port = process.env.PORT || 1212; const manifest = path.resolve(webpackPaths.dllPath, 'renderer.json'); const skipDLLs = module.parent?.filename.includes('webpack.config.renderer.dev.dll') || module.parent?.filename.includes('webpack.config.eslint'); /** * Warn if the DLL is not built */ if ( !skipDLLs && !(fs.existsSync(webpackPaths.dllPath) && fs.existsSync(manifest)) ) { console.log( chalk.black.bgYellow.bold( 'The DLL files are missing. Sit back while we build them for you with "npm run build-dll"' ) ); execSync('npm run postinstall'); } const configuration: webpack.Configuration = { devtool: 'inline-source-map', mode: 'development', target: ['web', 'electron-renderer'], entry: [ `webpack-dev-server/client?http://localhost:${port}/dist`, 'webpack/hot/only-dev-server', path.join(webpackPaths.srcRendererPath, 'index.tsx'), ], output: { path: webpackPaths.distRendererPath, publicPath: '/', filename: 'renderer.dev.js', library: { type: 'umd', }, }, module: { rules: [ { test: /\.s?css$/, use: [ 'style-loader', { loader: 'css-loader', options: { modules: true, sourceMap: true, importLoaders: 1, }, }, { loader: 'sass-loader', options: { api: 'modern', }, }, ], include: /\.module\.s?(c|a)ss$/, }, { test: /\.s?css$/, use: [ 'style-loader', 'css-loader', { loader: 'sass-loader', options: { api: 'modern', }, }, { loader: 'postcss-loader', options: { postcssOptions: { plugins: [require('tailwindcss'), require('autoprefixer')], }, }, }, ], exclude: /\.module\.s?(c|a)ss$/, }, // Fonts { test: /\.(woff|woff2|eot|ttf|otf)$/i, type: 'asset/resource', }, // Images { test: /\.(png|jpg|jpeg|gif)$/i, type: 'asset/resource', }, // SVG { test: /\.svg$/, use: [ { loader: '@svgr/webpack', options: { prettier: false, svgo: false, svgoConfig: { plugins: [{ removeViewBox: false }], }, titleProp: true, ref: true, }, }, 'file-loader', ], }, { test: /\.(mp3)$/i, use: [ { loader: 'file-loader', }, ], }, ], }, plugins: [ ...(skipDLLs ? [] : [ new webpack.DllReferencePlugin({ context: webpackPaths.dllPath, manifest: require(manifest), sourceType: 'var', }), ]), new webpack.NoEmitOnErrorsPlugin(), /** * Create global constants which can be configured at compile time. * * Useful for allowing different behaviour between development builds and * release builds * * NODE_ENV should be production so that modules do not perform certain * development checks * * By default, use 'development' as NODE_ENV. This can be overriden with * 'staging', for example, by changing the ENV variables in the npm scripts */ new webpack.EnvironmentPlugin({ NODE_ENV: 'development', }), new webpack.LoaderOptionsPlugin({ debug: true, }), new ReactRefreshWebpackPlugin(), new HtmlWebpackPlugin({ filename: path.join('index.html'), template: path.join(webpackPaths.srcRendererPath, 'index.ejs'), minify: { collapseWhitespace: true, removeAttributeQuotes: true, removeComments: true, }, isBrowser: false, env: process.env.NODE_ENV, isDevelopment: process.env.NODE_ENV !== 'production', nodeModules: webpackPaths.appNodeModulesPath, }), ], node: { __dirname: false, __filename: false, }, devServer: { port, compress: true, hot: true, headers: { 'Access-Control-Allow-Origin': '*' }, static: { publicPath: '/', }, historyApiFallback: { verbose: true, }, setupMiddlewares(middlewares) { console.log('Starting preload.js builder...'); const preloadProcess = spawn('npm', ['run', 'start:preload'], { shell: true, stdio: 'inherit', }) .on('close', (code: number) => process.exit(code!)) .on('error', (spawnError) => console.error(spawnError)); console.log('Starting preload-webview.js builder...'); const preloadWebviewProcess = spawn( 'npm', ['run', 'start:preloadWebview'], { shell: true, stdio: 'inherit', } ) .on('close', (code: number) => process.exit(code!)) .on('error', (spawnError) => console.error(spawnError)); console.log('Starting Main Process...'); let args = ['run', 'start:main']; if (process.env.MAIN_ARGS) { args = args.concat( ['--', ...process.env.MAIN_ARGS.matchAll(/"[^"]+"|[^\s"]+/g)].flat() ); } spawn('npm', args, { shell: true, stdio: 'inherit', }) .on('close', (code: number) => { preloadProcess.kill(); preloadWebviewProcess.kill(); process.exit(code!); }) .on('error', (spawnError) => console.error(spawnError)); return middlewares; }, }, }; export default merge(baseConfig, configuration); ================================================ FILE: desktop-app/.erb/configs/webpack.config.renderer.prod.ts ================================================ /** * Build config for electron renderer process */ import path from 'path'; import webpack from 'webpack'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import MiniCssExtractPlugin from 'mini-css-extract-plugin'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import CssMinimizerPlugin from 'css-minimizer-webpack-plugin'; import { merge } from 'webpack-merge'; import TerserPlugin from 'terser-webpack-plugin'; import baseConfig from './webpack.config.base'; import webpackPaths from './webpack.paths'; import checkNodeEnv from '../scripts/check-node-env'; import deleteSourceMaps from '../scripts/delete-source-maps'; checkNodeEnv('production'); deleteSourceMaps(); const devtoolsConfig = process.env.DEBUG_PROD === 'true' ? { devtool: 'source-map', } : {}; const configuration: webpack.Configuration = { ...devtoolsConfig, mode: 'production', target: ['web', 'electron-renderer'], entry: [path.join(webpackPaths.srcRendererPath, 'index.tsx')], externals: ['fsevents'], output: { path: webpackPaths.distRendererPath, publicPath: './', filename: 'renderer.js', library: { type: 'umd', }, }, module: { rules: [ { test: /\.s?(a|c)ss$/, use: [ MiniCssExtractPlugin.loader, { loader: 'css-loader', options: { modules: true, sourceMap: true, importLoaders: 1, }, }, { loader: 'sass-loader', options: { api: 'modern', }, }, ], include: /\.module\.s?(c|a)ss$/, }, { test: /\.s?(a|c)ss$/, use: [ MiniCssExtractPlugin.loader, 'css-loader', { loader: 'sass-loader', options: { api: 'modern', }, }, { loader: 'postcss-loader', options: { postcssOptions: { plugins: [require('tailwindcss'), require('autoprefixer')], }, }, }, ], exclude: /\.module\.s?(c|a)ss$/, }, // Fonts { test: /\.(woff|woff2|eot|ttf|otf)$/i, type: 'asset/resource', }, // Images { test: /\.(png|svg|jpg|jpeg|gif)$/i, type: 'asset/resource', }, // SVG { test: /\.svg$/, use: [ { loader: '@svgr/webpack', options: { prettier: false, svgo: false, svgoConfig: { plugins: [{ removeViewBox: false }], }, titleProp: true, ref: true, }, }, 'file-loader', ], }, { test: /\.(mp3)$/i, use: [ { loader: 'file-loader', }, ], }, ], }, optimization: { minimize: true, minimizer: [ new TerserPlugin({ parallel: true, }), new CssMinimizerPlugin(), ], }, plugins: [ /** * Create global constants which can be configured at compile time. * * Useful for allowing different behaviour between development builds and * release builds * * NODE_ENV should be production so that modules do not perform certain * development checks */ new webpack.EnvironmentPlugin({ NODE_ENV: 'production', DEBUG_PROD: false, }), new MiniCssExtractPlugin({ filename: 'style.css', }), new BundleAnalyzerPlugin({ analyzerMode: process.env.ANALYZE === 'true' ? 'server' : 'disabled', }), new HtmlWebpackPlugin({ filename: 'index.html', template: path.join(webpackPaths.srcRendererPath, 'index.ejs'), minify: { collapseWhitespace: true, removeAttributeQuotes: true, removeComments: true, }, isBrowser: false, isDevelopment: process.env.NODE_ENV !== 'production', }), new webpack.DefinePlugin({ 'process.type': '"browser"', }), ], }; export default merge(baseConfig, configuration); ================================================ FILE: desktop-app/.erb/configs/webpack.paths.ts ================================================ const path = require('path'); const rootPath = path.join(__dirname, '../..'); const dllPath = path.join(__dirname, '../dll'); const srcPath = path.join(rootPath, 'src'); const srcMainPath = path.join(srcPath, 'main'); const srcRendererPath = path.join(srcPath, 'renderer'); const releasePath = path.join(rootPath, 'release'); const appPath = path.join(releasePath, 'app'); const appPackagePath = path.join(appPath, 'package.json'); const appNodeModulesPath = path.join(appPath, 'node_modules'); const srcNodeModulesPath = path.join(srcPath, 'node_modules'); const distPath = path.join(appPath, 'dist'); const distMainPath = path.join(distPath, 'main'); const distRendererPath = path.join(distPath, 'renderer'); const buildPath = path.join(releasePath, 'build'); export default { rootPath, dllPath, srcPath, srcMainPath, srcRendererPath, releasePath, appPath, appPackagePath, appNodeModulesPath, srcNodeModulesPath, distPath, distMainPath, distRendererPath, buildPath, }; ================================================ FILE: desktop-app/.erb/mocks/fileMock.js ================================================ export default 'test-file-stub'; ================================================ FILE: desktop-app/.erb/scripts/.eslintrc ================================================ { "rules": { "no-console": "off", "global-require": "off", "import/no-dynamic-require": "off", "import/no-extraneous-dependencies": "off" } } ================================================ FILE: desktop-app/.erb/scripts/check-build-exists.ts ================================================ // Check if the renderer and main bundles are built import path from 'path'; import chalk from 'chalk'; import fs from 'fs'; import webpackPaths from '../configs/webpack.paths'; const mainPath = path.join(webpackPaths.distMainPath, 'main.js'); const rendererPath = path.join(webpackPaths.distRendererPath, 'renderer.js'); if (!fs.existsSync(mainPath)) { throw new Error( chalk.whiteBright.bgRed.bold( 'The main process is not built yet. Build it by running "yarn run build:main"' ) ); } if (!fs.existsSync(rendererPath)) { throw new Error( chalk.whiteBright.bgRed.bold( 'The renderer process is not built yet. Build it by running "yarn run build:renderer"' ) ); } ================================================ FILE: desktop-app/.erb/scripts/check-native-dep.js ================================================ import fs from 'fs'; import chalk from 'chalk'; import {execSync} from 'child_process'; import {dependencies} from '../../package.json'; if (dependencies) { const dependenciesKeys = Object.keys(dependencies); const nativeDeps = fs .readdirSync('node_modules') .filter((folder) => fs.existsSync(`node_modules/${folder}/binding.gyp`)); if (nativeDeps.length === 0) { process.exit(0); } try { // Find the reason for why the dependency is installed. If it is installed // because of a devDependency then that is okay. Warn when it is installed // because of a dependency const {dependencies: dependenciesObject} = JSON.parse( execSync(`npm ls ${nativeDeps.join(' ')} --json`).toString() ); const rootDependencies = Object.keys(dependenciesObject); const filteredRootDependencies = rootDependencies.filter((rootDependency) => dependenciesKeys.includes(rootDependency) ); if (filteredRootDependencies.length > 0) { const plural = filteredRootDependencies.length > 1; console.log(` ${chalk.whiteBright.bgYellow.bold('Webpack does not work with native dependencies.')} ${chalk.bold(filteredRootDependencies.join(', '))} ${ plural ? 'are native dependencies' : 'is a native dependency' } and should be installed inside of the "./release/app" folder. First, uninstall the packages from "./package.json": ${chalk.whiteBright.bgGreen.bold('npm uninstall your-package')} ${chalk.bold('Then, instead of installing the package to the root "./package.json":')} ${chalk.whiteBright.bgRed.bold('npm install your-package')} ${chalk.bold('Install the package to "./release/app/package.json"')} ${chalk.whiteBright.bgGreen.bold('cd ./release/app && npm install your-package')} Read more about native dependencies at: ${chalk.bold( 'https://electron-react-boilerplate.js.org/docs/adding-dependencies/#module-structure' )} `); process.exit(1); } } catch (e) { console.log('Native dependencies could not be checked'); } } ================================================ FILE: desktop-app/.erb/scripts/check-node-env.js ================================================ import chalk from 'chalk'; export default function checkNodeEnv(expectedEnv) { if (!expectedEnv) { throw new Error('"expectedEnv" not set'); } if (process.env.NODE_ENV !== expectedEnv) { console.log( chalk.whiteBright.bgRed.bold( `"process.env.NODE_ENV" must be "${expectedEnv}" to use this webpack config` ) ); process.exit(2); } } ================================================ FILE: desktop-app/.erb/scripts/check-port-in-use.js ================================================ import chalk from 'chalk'; import detectPort from 'detect-port'; const port = process.env.PORT || '1212'; detectPort(port, (err, availablePort) => { if (port !== String(availablePort)) { throw new Error( chalk.whiteBright.bgRed.bold( `Port "${port}" on "localhost" is already in use. Please use another port. ex: PORT=4343 yarn start` ) ); } else { process.exit(0); } }); ================================================ FILE: desktop-app/.erb/scripts/clean.js ================================================ import rimraf from 'rimraf'; import webpackPaths from '../configs/webpack.paths'; const foldersToRemove = [webpackPaths.distPath, webpackPaths.buildPath, webpackPaths.dllPath]; foldersToRemove.forEach((folder) => { rimraf.sync(folder); }); ================================================ FILE: desktop-app/.erb/scripts/delete-source-maps.js ================================================ import path from 'path'; import rimraf from 'rimraf'; import webpackPaths from '../configs/webpack.paths'; export default function deleteSourceMaps() { rimraf.sync(path.join(webpackPaths.distMainPath, '*.js.map')); rimraf.sync(path.join(webpackPaths.distRendererPath, '*.js.map')); } ================================================ FILE: desktop-app/.erb/scripts/electron-rebuild.js ================================================ import {execSync} from 'child_process'; import fs from 'fs'; import {dependencies} from '../../release/app/package.json'; import webpackPaths from '../configs/webpack.paths'; if (Object.keys(dependencies || {}).length > 0 && fs.existsSync(webpackPaths.appNodeModulesPath)) { const electronRebuildCmd = '../../node_modules/.bin/electron-rebuild --force --types prod,dev,optional --module-dir .'; const cmd = process.platform === 'win32' ? electronRebuildCmd.replace(/\//g, '\\') : electronRebuildCmd; execSync(cmd, { cwd: webpackPaths.appPath, stdio: 'inherit', }); } ================================================ FILE: desktop-app/.erb/scripts/link-modules.ts ================================================ import fs from 'fs'; import webpackPaths from '../configs/webpack.paths'; const {srcNodeModulesPath} = webpackPaths; const {appNodeModulesPath} = webpackPaths; if (!fs.existsSync(srcNodeModulesPath) && fs.existsSync(appNodeModulesPath)) { fs.symlinkSync(appNodeModulesPath, srcNodeModulesPath, 'junction'); } ================================================ FILE: desktop-app/.erb/scripts/notarize.js ================================================ const {notarize} = require('@electron/notarize'); exports.default = async function notarizeMacos(context) { const {electronPlatformName, appOutDir} = context; if (electronPlatformName !== 'darwin') { return; } if (process.env.CI !== 'true') { console.warn('Skipping notarizing step. Packaging is not running in CI'); return; } if ( !('APPLE_ID' in process.env && 'APPLE_ID_PASS' in process.env && 'APPLE_TEAM_ID' in process.env) ) { console.warn( 'Skipping notarizing step. APPLE_ID, APPLE_ID_PASS, and APPLE_TEAM_ID env variables must be set' ); return; } const appName = context.packager.appInfo.productFilename; await notarize({ appPath: `${appOutDir}/${appName}.app`, appleId: process.env.APPLE_ID, appleIdPassword: process.env.APPLE_ID_PASS, teamId: process.env.APPLE_TEAM_ID, }); }; ================================================ FILE: desktop-app/.eslintignore ================================================ # Logs logs *.log # Runtime data pids *.pid *.seed # Coverage directory used by tools like istanbul coverage .eslintcache # Dependency directory # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git node_modules # OSX .DS_Store release/app/dist release/build .erb/dll .idea npm-debug.log.* *.css.d.ts *.sass.d.ts *.scss.d.ts # eslint ignores hidden directories by default: # https://github.com/eslint/eslint/issues/8429 !.erb .erb/configs/ ================================================ FILE: desktop-app/.eslintrc.js ================================================ module.exports = { env: { browser: true, node: true, es2021: true, }, parser: '@typescript-eslint/parser', extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react/recommended', 'plugin:react-hooks/recommended', 'plugin:import/recommended', 'plugin:import/typescript', 'plugin:jsx-a11y/recommended', 'plugin:promise/recommended', 'plugin:prettier/recommended', // must be last — disables conflicting rules ], rules: { 'import/no-extraneous-dependencies': 'off', 'import/no-unresolved': 'error', 'import/prefer-default-export': 'off', 'import/extensions': [ 'error', 'ignorePackages', {ts: 'never', tsx: 'never', js: 'never', jsx: 'never'}, ], // Since React 17 and typescript 4.1 you can safely disable the rule 'react/react-in-jsx-scope': 'off', 'react/require-default-props': 'off', // Relax rules that are too noisy for this codebase '@typescript-eslint/no-var-requires': 'off', '@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/no-empty-function': 'warn', }, parserOptions: { ecmaVersion: 2020, sourceType: 'module', project: './tsconfig.json', tsconfigRootDir: __dirname, createDefaultProgram: true, }, settings: { react: { version: 'detect', }, 'import/resolver': { // See https://github.com/benmosher/eslint-plugin-import/issues/1396#issuecomment-575727774 for line below node: {}, webpack: { config: require.resolve('./.erb/configs/webpack.config.eslint.ts'), }, typescript: {}, }, 'import/parsers': { '@typescript-eslint/parser': ['.ts', '.tsx'], }, }, }; ================================================ FILE: desktop-app/.gitattributes ================================================ * text eol=lf *.exe binary *.png binary *.jpg binary *.jpeg binary *.ico binary *.icns binary *.eot binary *.otf binary *.ttf binary *.woff binary *.woff2 binary ================================================ FILE: desktop-app/.gitignore ================================================ # Logs logs *.log # Runtime data pids *.pid *.seed # Coverage directory used by tools like istanbul coverage .eslintcache # Dependency directory # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git node_modules # OSX .DS_Store release/app/dist release/build .erb/dll .idea npm-debug.log.* *.css.d.ts *.sass.d.ts *.scss.d.ts ================================================ FILE: desktop-app/.husky/pre-commit ================================================ #!/bin/sh . "$(dirname "$0")/_/husky.sh" npx lint-staged ================================================ FILE: desktop-app/.prettierrc ================================================ { "overrides": [ { "files": [".prettierrc", ".babelrc", ".eslintrc", ".stylelintrc"], "options": { "parser": "json" } } ], "arrowParens": "always", "singleQuote": true, "bracketSpacing": false, "printWidth": 100, "tailwindConfig": "./tailwind.config.js", "trailingComma": "es5" } ================================================ FILE: desktop-app/.vscode/settings.json ================================================ { "files.associations": { ".eslintrc": "jsonc", ".prettierrc": "jsonc", ".eslintignore": "ignore" }, "eslint.validate": [ "javascript", "javascriptreact", "html", "typescriptreact" ], "javascript.validate.enable": false, "javascript.format.enable": false, "typescript.format.enable": false, "search.exclude": { ".git": true, ".eslintcache": true, ".erb/dll": true, "release/{build,app/dist}": true, "node_modules": true, "npm-debug.log.*": true, "test/**/__snapshots__": true, "package-lock.json": true, "*.{css,sass,scss}.d.ts": true } } ================================================ FILE: desktop-app/CHANGELOG.md ================================================ # 2.1.0 - Migrate to `css-minifier-webpack-plugin` # 2.0.1 ## Fixes - Fix broken css linking in production build # 2.0.0 ## Breaking Changes - drop redux - remove counter example app - simplify directory structure - move `dll` dir to `.erb` dir - fix icon/font import paths - migrate to `react-refresh` from `react-hot-loader` - migrate to webpack@5 - migrate to electron@11 - remove e2e tests and testcafe integration - rename `app` dir to more conventional `src` dir - rename `resources` dir to `assets` - simplify npm scripts - drop stylelint - simplify styling of boilerplate app - remove `START_HOT` env variable - notarize support - landing page boilerplate - docs updates - restore removed debugging support # 1.4.0 - Migrate to `eslint-config-erb@2` - Rename `dev` npm script to `start` - GitHub Actions: only publish GitHub releases when on master branch # 1.3.1 - Fix sass building bug ([#2540](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/2540)) - Fix CI bug related to E2E tests and network timeouts - Move automated dependency PRs to `next` ([#2554](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/2554)) - Bump dependencies to patch semver # 1.3.0 - Fixes E2E tests ([#2516](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/2516)) - Fixes preload entrypoint ([#2503](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/2503)) - Downgrade to `electron@8` - Bump dependencies to latest semver # 1.2.0 - Migrate to redux toolkit - Lazy load routes with react suspense - Drop support for azure-pipelines and use only github actions - Bump all deps to latest semver - Remove `test-e2e` script from tests (blocked on release of https://github.com/DevExpress/testcafe-browser-provider-electron/pull/65) - Swap `typed-css-modules-webpack-plugin` for `typings-for-css-modules-loader` - Use latest version of `eslint-config-erb` - Remove unnecessary file extensions from ts exclude - Add experimental support for vscode debugging - Revert https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/2365 as default for users, provide as opt in option # 1.1.0 - Fix #2402 - Simplify configs (https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/2406) # 1.0.0 - Migrate to TypeScript from Flow ([#2363](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/2363)) - Use browserslist for `@babel/preset-env` targets ([#2368](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/2368)) - Use preload script, disable `nodeIntegration` in renderer process for [improved security](https://www.electronjs.org/docs/tutorial/security#2-do-not-enable-nodejs-integration-for-remote-content) ([#2365](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/2365)) - Add support for azure pipelines ([#2369](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/2369)) - Disable sourcemaps in production # 0.18.1 (2019.12.12) - Fix HMR env bug ([#2343](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/2343)) - Bump all deps to latest semver - Bump to `electron@7` # 0.18.0 (2019.11.19) - Bump electron to `electron@6` (`electron@7` introduces breaking changes to testcafe end to end tests) - Revert back to [two `package.json` structure](https://www.electron.build/tutorials/two-package-structure) - Bump all deps to latest semver # 0.17.1 (2018.11.20) - Fix `yarn test-e2e` and testcafe for single package.json structure - Fixes incorrect path in `yarn start` script - Bumped deps - Bump g++ in travis - Change clone arguments to clone only master - Change babel config to target current electron version For full change list, see https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/2021 # 0.17.0 (2018.10.30) - upgraded to `babel@7` (thanks to @vikr01 🎉🎉🎉) - migrated from [two `package.json` structure](https://www.electron.build/tutorials/two-package-structure) (thanks to @HyperSprite!) - initial auto update support (experimental) - migrate from greenkeeper to [renovate](https://renovatebot.com) - added issue template - use `babel-preset-env` to target current electron version - add [opencollective](https://opencollective.com/electron-react-boilerplate-594) banner message display in postinstall script (help support ERB 🙏) - fix failing ci issues # 0.16.0 (2018.10.3) - removed unused dependencies - migrate from `react-redux-router` to `connect-react-router` - move webpack configs to `./webpack` dir - use `g++` on travis when testing linux - migrate from `spectron` to `testcafe` for e2e tests - add linting support for config styles - changed stylelint config - temporarily disabled flow in appveyor to make ci pass - added necessary infra to publish releases from ci # 0.15.0 (2018.8.25) - Performance: cache webpack uglify results - Feature: add start minimized feature - Feature: lint and fix styles with prettier and stylelint - Feature: add greenkeeper support # 0.14.0 (2018.5.24) - Improved CI timings - Migrated README commands to yarn from npm - Improved vscode config - Updated all dependencies to latest semver - Fix `electron-rebuild` script bug - Migrated to `mini-css-extract-plugin` from `extract-text-plugin` - Added `optimize-css-assets-webpack-plugin` - Run `prettier` on json, css, scss, and more filetypes # 0.13.3 (2018.5.24) - Add git precommit hook, when git commit will use `prettier` to format git add code - Add format code function in `lint-fix` npm script which can use `prettier` to format project js code # 0.13.2 (2018.1.31) - Hot Module Reload (HMR) fixes - Bumped all dependencies to latest semver - Prevent error propagation of `CheckNativeDeps` script # 0.13.1 (2018.1.13) - Hot Module Reload (HMR) fixes - Bumped all dependencies to latest semver - Fixed electron-rebuild script - Fixed tests scripts to run on all platforms - Skip redux logs in console in test ENV # 0.13.0 (2018.1.6) #### Additions - Add native dependencies check on postinstall - Updated all dependencies to latest semver # 0.12.0 (2017.7.8) #### Misc - Removed `babel-polyfill` - Renamed and alphabetized npm scripts #### Breaking - Changed node dev `__dirname` and `__filename` to node built in fn's (https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/1035) - Renamed `src/bundle.js` to `src/renderer.prod.js` for consistency - Renamed `dll/vendor.js` to `dll/renderer.dev.dll.js` for consistency #### Additions - Enable node_modules cache on CI # 0.11.2 (2017.5.1) Yay! Another patch release. This release mostly includes refactorings and router bug fixes. Huge thanks to @anthonyraymond! ⚠️ Windows electron builds are failing because of [this issue](https://github.com/electron/electron/issues/9321). This is not an issue with the boilerplate ⚠️ #### Breaking - **Renamed `./src/main.development.js` => `./src/main.{dev,prod}.js`:** [#963](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/963) #### Fixes - **Fixed reloading when not on `/` path:** [#958](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/958) [#949](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/949) #### Additions - **Added support for stylefmt:** [#960](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/960) # 0.11.1 (2017.4.23) You can now debug the production build with devtools like so: ``` DEBUG_PROD=true npm run package ``` 🎉🎉🎉 #### Additions - **Added support for debugging production build:** [#fab245a](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/941/commits/fab245a077d02a09630f74270806c0c534a4ff95) #### Bug Fixes - **Fixed bug related to importing native dependencies:** [#933](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/933) #### Improvements - **Updated all deps to latest semver** # 0.11.0 (2017.4.19) Here's the most notable changes since `v0.10.0`. Its been about a year since a release has been pushed. Expect a new release to be published every 3-4 weeks. #### Breaking Changes - **Dropped support for node < 6** - **Refactored webpack config files** - **Migrate to two-package.json project structure** - **Updated all devDeps to latest semver** - **Migrated to Jest:** [#768](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/768) - **Migrated to `react-router@4`** - **Migrated to `electron-builder@4`** - **Migrated to `webpack@2`** - **Migrated to `react-hot-loader@3`** - **Changed default live reload server PORT to `1212` from `3000`** #### Additions - **Added support for Yarn:** [#451](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/451) - **Added support for Flow:** [#425](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/425) - **Added support for stylelint:** [#911](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/911) - **Added support for electron-builder:** [#876](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/876) - **Added optional support for SASS:** [#880](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/880) - **Added support for eslint-plugin-flowtype:** [#911](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/911) - **Added support for appveyor:** [#280](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/280) - **Added support for webpack dlls:** [#860](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/860) - **Route based code splitting:** [#884](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/884) - **Added support for Webpack Bundle Analyzer:** [#922](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/922) #### Improvements - **Parallelize renderer and main build processes when running `npm run build`** - **Dynamically generate electron app menu** - **Improved vscode integration:** [#856](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/856) #### Bug Fixes - **Fixed hot module replacement race condition bug:** [#917](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/917) [#920](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/920) # 0.10.0 (2016.4.18) #### Improvements - **Use Babel in main process with Webpack build:** [#201](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/201) - **Change targets to built-in support by webpack:** [#197](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/197) - **use es2015 syntax for webpack configs:** [#195](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/195) - **Open application when webcontent is loaded:** [#192](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/192) - **Upgraded dependencies** #### Bug fixed - **Fix `npm list electron-prebuilt` in package.js:** [#188](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/188) # 0.9.0 (2016.3.23) #### Improvements - **Added [redux-logger](https://github.com/fcomb/redux-logger)** - **Upgraded [react-router-redux](https://github.com/reactjs/react-router-redux) to v4** - **Upgraded dependencies** - **Added `npm run dev` command:** [#162](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/162) - **electron to v0.37.2** #### Breaking Changes - **css module as default:** [#154](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/154). - **set default NODE_ENV to production:** [#140](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/140) # 0.8.0 (2016.2.17) #### Bug fixed - **Fix lint errors** - **Fix Webpack publicPath for production builds**: [#119](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/119). - **package script now chooses correct OS icon extension** #### Improvements - **babel 6** - **Upgrade Dependencies** - **Enable CSS source maps** - **Add json-loader**: [#128](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/128). - **react-router 2.0 and react-router-redux 3.0** # 0.7.1 (2015.12.27) #### Bug fixed - **Fixed npm script on windows 10:** [#103](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/103). - **history and react-router version bump**: [#109](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/109), [#110](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/110). #### Improvements - **electron 0.36** # 0.7.0 (2015.12.16) #### Bug fixed - **Fixed process.env.NODE_ENV variable in webpack:** [#74](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/74). - **add missing object-assign**: [#76](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/76). - **packaging in npm@3:** [#77](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/77). - **compatibility in windows:** [#100](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/100). - **disable chrome debugger in production env:** [#102](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/102). #### Improvements - **redux** - **css-modules** - **upgrade to react-router 1.x** - **unit tests** - **e2e tests** - **travis-ci** - **upgrade to electron 0.35.x** - **use es2015** - **check dev engine for node and npm** # 0.6.5 (2015.11.7) #### Improvements - **Bump style-loader to 0.13** - **Bump css-loader to 0.22** # 0.6.4 (2015.10.27) #### Improvements - **Bump electron-debug to 0.3** # 0.6.3 (2015.10.26) #### Improvements - **Initialize ExtractTextPlugin once:** [#64](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/64). # 0.6.2 (2015.10.18) #### Bug fixed - **Babel plugins production env not be set properly:** [#57](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/57). # 0.6.1 (2015.10.17) #### Improvements - **Bump electron to v0.34.0** # 0.6.0 (2015.10.16) #### Breaking Changes - **From react-hot-loader to react-transform** # 0.5.2 (2015.10.15) #### Improvements - **Run tests with babel-register:** [#29](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/29). # 0.5.1 (2015.10.12) #### Bug fixed - **Fix #51:** use `path.join(__dirname` instead of `./`. # 0.5.0 (2015.10.11) #### Improvements - **Simplify webpack config** see [#50](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/50). #### Breaking Changes - **webpack configs** - **port changed:** changed default port from 2992 to 3000. - **npm scripts:** remove `start-dev` and `dev-server`. rename `hot-dev-server` to `hot-server`. # 0.4.3 (2015.9.22) #### Bug fixed - **Fix #45 zeromq crash:** bump version of `electron-prebuilt`. # 0.4.2 (2015.9.15) #### Bug fixed - **run start-hot breaks chrome refresh(CTRL+R) (#42)**: bump `electron-debug` to `0.2.1` # 0.4.1 (2015.9.11) #### Improvements - **use electron-prebuilt version for packaging (#33)** # 0.4.0 (2015.9.5) #### Improvements - **update dependencies** # 0.3.0 (2015.8.31) #### Improvements - **eslint-config-airbnb** # 0.2.10 (2015.8.27) #### Features - **custom placeholder icon** #### Improvements - **electron-renderer as target:** via [webpack-target-electron-renderer](https://github.com/chentsulin/webpack-target-electron-renderer) # 0.2.9 (2015.8.18) #### Bug fixed - **Fix hot-reload** # 0.2.8 (2015.8.13) #### Improvements - **bump electron-debug** - **babelrc** - **organize webpack scripts** # 0.2.7 (2015.7.9) #### Bug fixed - **defaultProps:** fix typos. # 0.2.6 (2015.7.3) #### Features - **menu** #### Bug fixed - **package.js:** include webpack build. # 0.2.5 (2015.7.1) #### Features - **NPM Script:** support multi-platform - **package:** `--all` option # 0.2.4 (2015.6.9) #### Bug fixed - **Eslint:** typo, [#17](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/17) and improve `.eslintrc` # 0.2.3 (2015.6.3) #### Features - **Package Version:** use latest release electron version as default - **Ignore Large peerDependencies** #### Bug fixed - **Npm Script:** typo, [#6](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/6) - **Missing css:** [#7](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/7) # 0.2.2 (2015.6.2) #### Features - **electron-debug** #### Bug fixed - **Webpack:** add `.json` and `.node` to extensions for imitating node require. - **Webpack:** set `node_modules` to externals for native module support. # 0.2.1 (2015.5.30) #### Bug fixed - **Webpack:** #1, change build target to `atom`. # 0.2.0 (2015.5.30) #### Features - **Ignore:** `test`, `tools`, `release` folder and devDependencies in `package.json`. - **Support asar** - **Support icon** # 0.1.0 (2015.5.27) #### Features - **Webpack:** babel, react-hot, ... - **Flux:** actions, api, components, containers, stores.. - **Package:** darwin (osx), linux and win32 (windows) platform. ================================================ FILE: desktop-app/CODE_OF_CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at electronreactboilerplate@gmail.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq ================================================ FILE: desktop-app/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2015-present Electron React Boilerplate 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: desktop-app/README.md ================================================

Electron React Boilerplate uses Electron, React, React Router, Webpack and React Fast Refresh.


[![Build Status][github-actions-status]][github-actions-url] [![Github Tag][github-tag-image]][github-tag-url] [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/Fjy3vfgy5q) [![OpenCollective](https://opencollective.com/electron-react-boilerplate-594/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/electron-react-boilerplate-594/sponsors/badge.svg)](#sponsors) [![StackOverflow][stackoverflow-img]][stackoverflow-url]
## Install Clone the repo and install dependencies: ```bash git clone --depth 1 --branch main https://github.com/electron-react-boilerplate/electron-react-boilerplate.git your-project-name cd your-project-name npm install ``` **Having issues installing? See our [debugging guide](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/400)** ## Starting Development Start the app in the `dev` environment: ```bash npm start ``` ## Packaging for Production To package apps for the local platform: ```bash npm run package ``` ## Docs See our [docs and guides here](https://electron-react-boilerplate.js.org/docs/installation) ## Community Join our Discord: https://discord.gg/Fjy3vfgy5q ## Donations **Donations will ensure the following:** - 🔨 Long term maintenance of the project - 🛣 Progress on the [roadmap](https://electron-react-boilerplate.js.org/docs/roadmap) - 🐛 Quick responses to bug reports and help requests ## Backers Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/electron-react-boilerplate-594#backer)] ## Sponsors Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/electron-react-boilerplate-594-594#sponsor)] ## Maintainers - [Amila Welihinda](https://github.com/amilajack) - [John Tran](https://github.com/jooohhn) - [C. T. Lin](https://github.com/chentsulin) - [Jhen-Jie Hong](https://github.com/jhen0409) ## License MIT © [Electron React Boilerplate](https://github.com/electron-react-boilerplate) [github-actions-status]: https://github.com/electron-react-boilerplate/electron-react-boilerplate/workflows/Test/badge.svg [github-actions-url]: https://github.com/electron-react-boilerplate/electron-react-boilerplate/actions [github-tag-image]: https://img.shields.io/github/tag/electron-react-boilerplate/electron-react-boilerplate.svg?label=version [github-tag-url]: https://github.com/electron-react-boilerplate/electron-react-boilerplate/releases/latest [stackoverflow-img]: https://img.shields.io/badge/stackoverflow-electron_react_boilerplate-blue.svg [stackoverflow-url]: https://stackoverflow.com/questions/tagged/electron-react-boilerplate ================================================ FILE: desktop-app/assets/assets.d.ts ================================================ type Styles = Record; declare module '*.svg' { export const ReactComponent: React.FC>; const content: string; export default content; } declare module '*.png' { const content: string; export default content; } declare module '*.jpg' { const content: string; export default content; } declare module '*.scss' { const content: Styles; export default content; } declare module '*.sass' { const content: Styles; export default content; } declare module '*.css' { const content: Styles; export default content; } ================================================ FILE: desktop-app/assets/entitlements.mac.plist ================================================ com.apple.security.cs.allow-unsigned-executable-memory com.apple.security.cs.allow-jit ================================================ FILE: desktop-app/declarations.d.ts ================================================ declare module '*.mp3'; declare module 'electron-args'; ================================================ FILE: desktop-app/package.json ================================================ { "name": "Responsively-App", "productName": "ResponsivelyApp", "version": "1.18.0", "description": "A developer-friendly browser for developing responsive web apps", "keywords": [ "developer-tools", "devtools", "browser", "web-dev" ], "homepage": "https://responsively.app", "bugs": { "url": "https://github.com/responsively-org/responsively-app/issues" }, "repository": { "type": "git", "url": "https://github.com/responsively-org/responsively-app.git" }, "author": { "name": "Responsively", "email": "p.manoj.vivek@gmail.com" }, "license": "MIT", "main": "./src/main/main.ts", "scripts": { "build": "concurrently \"yarn run build:main\" \"yarn run build:renderer\"", "build:main": "cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.main.prod.ts", "build:renderer": "cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.renderer.prod.ts", "postinstall": "yarn rimraf --glob node_modules/browser-sync/dist/**/*.map && ts-node .erb/scripts/check-native-dep.js && ts-node postinstall.ts && electron-builder install-app-deps && cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.renderer.dev.dll.ts", "lint": "cross-env NODE_ENV=development eslint . --ext .js,.jsx,.ts,.tsx", "package": "ts-node ./.erb/scripts/clean.js dist && yarn run build && electron-builder build --publish never", "prepare": "cd .. && husky install desktop-app/.husky && chmod a+x desktop-app/.husky/pre-commit", "rebuild": "electron-rebuild --parallel --types prod,dev,optional --module-dir release/app", "dev": "yarn start", "start": "ts-node ./.erb/scripts/check-port-in-use.js && yarn run start:renderer", "start:main": "cross-env NODE_ENV=development electronmon ./src/main/dev-entry.cjs", "start:preload": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.preload.dev.ts", "start:preloadWebview": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.preload-webview.dev.ts", "start:renderer": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./.erb/configs/webpack.config.renderer.dev.ts", "test": "vitest run", "test:watch": "vitest", "test:coverage": "vitest run --coverage", "typecheck": "tsc --noEmit" }, "lint-staged": { "*.{js,jsx,ts,tsx}": [ "cross-env NODE_ENV=development eslint --cache --fix" ], "*.json,.{eslintrc,prettierrc}": [ "prettier --ignore-path .eslintignore --parser json --write" ], "*.{css,scss}": [ "prettier --ignore-path .eslintignore --single-quote --write" ], "*.{html,md,yml}": [ "prettier --ignore-path .eslintignore --single-quote --write" ] }, "browserslist": [], "dependencies": { "@fontsource/lato": "^5.0.17", "@headlessui-float/react": "^0.12.0", "@headlessui/react": "^1.7.4", "@iconify/react": "^3.2.2", "@reduxjs/toolkit": "^1.9.5", "@scena/react-guides": "^0.28.2", "autoprefixer": "^10.4.16", "bluebird": "^3.7.2", "browser-sync": "^2.29.3", "classnames": "^2.3.1", "electron-args": "^0.1.0", "electron-debug": "^3.2.0", "electron-log": "^4.4.8", "electron-store": "^8.0.2", "electron-updater": "^6.7.3", "emitter": "^0.0.5", "javascript-time-ago": "^2.5.10", "mousetrap": "^1.6.5", "os": "^0.1.2", "postcss": "^8.4.31", "re-resizable": "^6.9.9", "react": "^18.2.0", "react-detect-click-outside": "^1.1.7", "react-dnd": "^16.0.1", "react-dnd-html5-backend": "^16.0.1", "react-dom": "^18.2.0", "react-markdown": "^8.0.7", "react-masonry-component": "^6.3.0", "react-redux": "^8.0.5", "react-router-dom": "^6.3.0", "react-tabs": "^6.0.2", "redux": "^4.0.4", "redux-thunk": "^2.4.2", "replace": "^1.2.1", "tailwindcss": "^3.1.4", "use-sound": "^4.0.1", "uuid": "^9.0.0" }, "devDependencies": { "@electron/notarize": "^3.1.1", "@electron/rebuild": "^4.0.3", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10", "@svgr/webpack": "^7.0.0", "@tailwindcss/typography": "^0.5.9", "@teamsupercell/typings-for-css-modules-loader": "^2.5.2", "@testing-library/jest-dom": "^6.1.2", "@testing-library/react": "^14.0.0", "@types/bluebird": "^3.5.36", "@types/browser-sync": "^2.27.3", "@types/howler": "^2.2.7", "@types/mousetrap": "^1.6.10", "@types/node": "^20.14.0", "@types/react": "^18.3.0", "@types/react-dom": "^18.3.0", "@types/react-test-renderer": "^18.0.7", "@types/terser-webpack-plugin": "^5.0.4", "@types/uuid": "^9.0.2", "@types/webpack-bundle-analyzer": "^4.4.2", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.60.1", "browserslist-config-erb": "^0.0.3", "chalk": "^4.1.2", "concurrently": "^8.2.1", "core-js": "^3.33.2", "cross-env": "^7.0.3", "css-loader": "^6.7.3", "css-minimizer-webpack-plugin": "^5.0.1", "detect-port": "^1.3.0", "electron": "40.6.1", "electron-builder": "^26.0.12", "electron-devtools-installer": "^4.0.0", "electronmon": "^2.0.2", "eslint": "^8.36.0", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.4.1", "eslint-import-resolver-webpack": "^0.13.2", "eslint-plugin-compat": "^4.1.2", "eslint-plugin-import": "^2.27.5", "eslint-plugin-jsx-a11y": "^6.6.1", "eslint-plugin-prettier": "^5.5.5", "eslint-plugin-promise": "^6.0.0", "eslint-plugin-react": "^7.30.1", "eslint-plugin-react-hooks": "^4.6.0", "file-loader": "^6.2.0", "html-webpack-plugin": "^5.5.0", "husky": "^8.0.3", "identity-obj-proxy": "^3.0.0", "jsdom": "^25.0.1", "lint-staged": "^13.2.2", "mini-css-extract-plugin": "^2.6.1", "postcss-loader": "^7.0.0", "prettier": "^2.7.1", "prettier-plugin-tailwindcss": "^0.2.3", "react-refresh": "^0.14.0", "react-test-renderer": "^18.2.0", "replace-in-file": "^7.0.1", "rimraf": "^4.2.0", "sass": "^1.54.4", "sass-loader": "^13.3.2", "style-loader": "^3.3.1", "terser-webpack-plugin": "^5.3.9", "vitest": "^3.0.5", "ts-loader": "^9.4.2", "ts-node": "^10.9.1", "tsconfig-paths-webpack-plugin": "^4.0.1", "tsx": "^4.21.0", "typescript": "^5.0.4", "url-loader": "^4.1.1", "webpack": "^5.76.0", "webpack-bundle-analyzer": "^4.5.0", "webpack-cli": "^5.1.4", "webpack-dev-server": "^4.15.1", "webpack-merge": "^5.9.0" }, "build": { "productName": "ResponsivelyApp", "appId": "app.responsively", "asar": true, "asarUnpack": "**\\*.{node,dll}", "files": [ "dist", "node_modules", "package.json" ], "afterSign": ".erb/scripts/notarize.js", "mac": { "target": { "target": "default", "arch": [ "arm64", "x64" ] }, "type": "distribution", "hardenedRuntime": true, "entitlements": "assets/entitlements.mac.plist", "entitlementsInherit": "assets/entitlements.mac.plist", "gatekeeperAssess": false }, "dmg": { "contents": [ { "x": 130, "y": 220 }, { "x": 410, "y": 220, "type": "link", "path": "/Applications" } ] }, "win": { "target": [ "nsis" ] }, "linux": { "target": [ "AppImage" ], "category": "Development" }, "directories": { "app": "release/app", "buildResources": "assets", "output": "release/build" }, "extraResources": [ "./assets/**" ], "publish": { "provider": "github" } }, "collective": { "url": "https://opencollective.com/responsively" }, "resolutions": { "@types/react": "^18.3.0", "@types/react-dom": "^18.3.0" }, "engines": { "node": ">=24.x", "npm": ">=7.x" }, "electronmon": { "patterns": [ "!**/**", "src/main/**/*", "src/store/**/*", "src/common/**/*" ], "logLevel": "quiet" } } ================================================ FILE: desktop-app/postcss.config.js ================================================ /* eslint global-require: off, import/no-extraneous-dependencies: off */ module.exports = { plugins: [require('tailwindcss'), require('autoprefixer')], }; ================================================ FILE: desktop-app/postinstall.ts ================================================ import {replaceInFile} from 'replace-in-file'; async function performReplacements() { const replaceOptions = { files: 'node_modules/browser-sync-ui/lib/UI.js', from: /"network-throttle".*/, to: '', }; const howlerOptions = { files: 'node_modules/use-sound/dist/types.d.ts', from: '/// ', to: 'import { Howl } from "howler";', }; try { await replaceInFile(replaceOptions); console.log('Replacement in UI.js completed successfully.'); await replaceInFile(howlerOptions); console.log('Replacement in types.d.ts completed successfully.'); } catch (error) { console.error('Error occurred during replacements:', error); } } async function performPostInstall() { await performReplacements(); } performPostInstall(); ================================================ FILE: desktop-app/release/app/package.json ================================================ { "name": "ResponsivelyApp", "version": "1.18.0", "description": "A developer-friendly browser for developing responsive web apps", "license": "MIT", "author": { "name": "Responsively", "email": "p.manoj.vivek@gmail.com" }, "main": "./dist/main/main.js", "scripts": { "electron-rebuild": "node -r ts-node/register ../../.erb/scripts/electron-rebuild.js", "postinstall": "yarn run electron-rebuild && yarn run link-modules", "link-modules": "node -r ts-node/register ../../.erb/scripts/link-modules.ts" }, "dependencies": { "browser-sync": "^2.27.12" } } ================================================ FILE: desktop-app/setupTests.ts ================================================ import '@testing-library/jest-dom/vitest'; window.electron = { ipcRenderer: { sendMessage: vi.fn(), on: vi.fn(), once: vi.fn(), invoke: vi.fn(), removeListener: vi.fn(), removeAllListeners: vi.fn(), }, store: { set: vi.fn(), get: vi.fn(), }, }; global.IntersectionObserver = vi.fn(() => ({ root: null, rootMargin: '', thresholds: [], observe: vi.fn(), unobserve: vi.fn(), disconnect: vi.fn(), takeRecords: vi.fn(), })); global.ResizeObserver = vi.fn(() => ({ observe: vi.fn(), unobserve: vi.fn(), disconnect: vi.fn(), })); ================================================ FILE: desktop-app/src/__tests__/App.test.tsx ================================================ // import { render } from '@testing-library/react'; // import App from '../renderer/AppContent'; describe('App', () => { it('should render', () => { // TODO Fix this // expect(render()).toBeTruthy(); }); }); ================================================ FILE: desktop-app/src/common/constants.ts ================================================ /* eslint-disable import/prefer-default-export */ export const DOCK_POSITION = { BOTTOM: 'BOTTOM', RIGHT: 'RIGHT', UNDOCKED: 'UNDOCKED', } as const; export const PREVIEW_LAYOUTS = { COLUMN: 'COLUMN', FLEX: 'FLEX', INDIVIDUAL: 'INDIVIDUAL', MASONRY: 'MASONRY', } as const; export type PreviewLayout = (typeof PREVIEW_LAYOUTS)[keyof typeof PREVIEW_LAYOUTS]; export type Notification = { id: string; link?: string; linkText?: string; text: string; }; export interface OpenUrlArgs { url: string; } export const IPC_MAIN_CHANNELS = { APP_META: 'app-meta', PERMISSION_REQUEST: 'permission-request', PERMISSION_RESPONSE: 'permission-response', AUTH_REQUEST: 'auth-request', AUTH_RESPONSE: 'auth-response', OPEN_EXTERNAL: 'open-external', OPEN_URL: 'open-url', START_WATCHING_FILE: 'start-watching-file', STOP_WATCHER: 'stop-watcher', OPEN_ABOUT_DIALOG: 'open-about-dialog', GET_SITE_PERMISSIONS: 'get-site-permissions', UPDATE_SITE_PERMISSION: 'update-site-permission', CLEAR_SITE_PERMISSIONS: 'clear-site-permissions', PERMISSION_UPDATED: 'permission-updated', } as const; export type Channels = (typeof IPC_MAIN_CHANNELS)[keyof typeof IPC_MAIN_CHANNELS]; export const PROTOCOL = 'responsively'; export const PERMISSION_TYPES = { CAMERA: 'camera', MICROPHONE: 'microphone', LOCATION: 'geolocation', NOTIFICATIONS: 'notifications', CLIPBOARD: 'clipboard-read', FULLSCREEN: 'fullscreen', MIDI: 'midi', POINTER_LOCK: 'pointerLock', } as const; export type PermissionType = (typeof PERMISSION_TYPES)[keyof typeof PERMISSION_TYPES]; export interface SitePermission { type: string; state: 'GRANTED' | 'DENIED' | 'PROMPT' | 'UNKNOWN'; displayName: string; icon: string; } ================================================ FILE: desktop-app/src/common/deviceList.ts ================================================ export interface Device { id: string; height: number; width: number; name: string; userAgent: string; type: string; dpr: number; isTouchCapable: boolean; isMobileCapable: boolean; capabilities: string[]; isCustom?: boolean; } /* Ids range: 10000 - 19999: Apple devices 20000 - 29999: Google devices 30000 - 39999: Samsung devices 40000 - 49999: Microsoft devices 50000 - 59999: Other mobile devices 90000 - 99999: Other desktop devices And `uuid` as id for custom devices */ export const defaultDevices: Device[] = [ { id: '10001', name: 'iPhone 4', width: 320, height: 480, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10002', name: 'iPhone 5/SE', width: 320, height: 568, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10003', name: 'iPhone SE', width: 375, height: 667, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10004', name: 'iPhone 6/7/8', width: 375, height: 667, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10005', name: 'iPhone 6/7/8 Plus', width: 414, height: 736, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10006', name: 'iPhone X', width: 375, height: 812, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10007', name: 'iPhone XR', width: 414, height: 896, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10008', name: 'iPhone 12 Pro', width: 390, height: 844, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10009', name: 'iPhone 13 Pro Max', width: 428, height: 926, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10010', name: 'iPhone 14 Pro Max', width: 430, height: 932, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10011', name: 'iPad Air', width: 820, height: 1180, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPad; CPU OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '10012', name: 'iPad Mini', width: 768, height: 1024, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPad; CPU OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '10013', name: 'iPad', width: 768, height: 1024, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '10014', name: 'iPad Pro', width: 1024, height: 1366, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '10015', name: 'MacBook Pro', width: 1440, height: 900, dpr: 2, capabilities: [], userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 13_0_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36', type: 'notebook', isTouchCapable: false, isMobileCapable: false, }, { id: '10016', name: 'iPhone 14', dpr: 3, width: 390, height: 844, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10017', name: 'iPhone 14 Plus', width: 428, height: 926, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10018', name: 'iPhone 14 Pro', width: 393, height: 852, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10019', name: 'iPhone 15', width: 393, height: 852, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10020', name: 'iPhone 15 Plus', width: 430, height: 932, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10021', name: 'iPhone 15 Pro', width: 393, height: 852, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10022', name: 'iPhone 16', width: 393, height: 852, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10023', name: 'iPhone 16 Plus', width: 430, height: 932, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10024', name: 'iPhone 16 Pro', width: 393, height: 852, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10025', name: 'iPhone 17', width: 393, height: 852, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10026', name: 'iPhone 17 Pro', width: 393, height: 852, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10027', name: 'iPhone 17 Pro Max', width: 430, height: 932, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10028', name: 'iPhone 17 Air', width: 428, height: 926, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10029', name: 'iPhone 15 Pro Max', width: 430, height: 932, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10030', name: 'iPhone 16 Pro Max', width: 430, height: 932, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '10031', name: 'iPad Pro M4', width: 1152, height: 1536, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPad; CPU OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '10032', name: 'iPad Air M2', width: 820, height: 1180, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPad; CPU OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '10033', name: 'MacBook Air M3', width: 1440, height: 900, dpr: 2, capabilities: [], userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', type: 'notebook', isTouchCapable: false, isMobileCapable: false, }, { id: '20001', name: 'Nexus 4', width: 384, height: 640, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20002', name: 'Nexus 5', width: 360, height: 640, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20003', name: 'Nexus 5X', width: 412, height: 732, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20004', name: 'Nexus 6', width: 412, height: 732, dpr: 3.5, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20005', name: 'Nexus 6P', width: 412, height: 732, dpr: 3.5, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20006', name: 'Nexus 7', width: 600, height: 960, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '20007', name: 'Nexus 10', width: 800, height: 1280, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '20008', name: 'Pixel 2', width: 411, height: 731, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20009', name: 'Pixel 2 XL', width: 411, height: 823, dpr: 3.5, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20010', name: 'Pixel 3', width: 393, height: 786, dpr: 2.75, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.158 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20011', name: 'Pixel 3 XL', width: 393, height: 786, dpr: 2.75, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 11; Pixel 3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.181 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20012', name: 'Pixel 4', width: 353, height: 745, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20013', name: 'Pixel 5', width: 393, height: 851, dpr: 2.75, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20014', name: 'Nest Hub Max', width: 1280, height: 800, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.188 Safari/537.36 CrKey/1.54.250320', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '20015', name: 'Nest Hub', width: 1024, height: 600, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.109 Safari/537.36 CrKey/1.54.248666', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '20016', name: 'Pixel 7', width: 412, height: 915, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.120 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20017', name: 'Pixel 7a', width: 412, height: 915, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; Pixel 7a) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20018', name: 'Pixel 7 Pro', width: 412, height: 915, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; Pixel 7 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20019', name: 'Pixel 8', width: 412, height: 915, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20020', name: 'Pixel 8 Pro', width: 430, height: 932, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 14; Pixel 8 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20021', name: 'Pixel 8a', width: 412, height: 915, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 14; Pixel 8a) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20022', name: 'Pixel Fold', width: 734, height: 1014, dpr: 2.8, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; Pixel Fold) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20023', name: 'Pixel Tablet', width: 1600, height: 2560, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; Pixel Tablet) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '20031', name: 'Pixel 9', width: 412, height: 915, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 15; Pixel 9) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20032', name: 'Pixel 9 Pro', width: 430, height: 932, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 15; Pixel 9 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20033', name: 'Pixel 9 Pro Fold', width: 734, height: 1014, dpr: 2.8, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 15; Pixel 9 Pro Fold) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20034', name: 'Pixel 9a', width: 412, height: 915, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 15; Pixel 9a) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20035', name: 'Pixel 10', width: 412, height: 915, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 16; Pixel 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '20036', name: 'Pixel 10 Pro', width: 430, height: 932, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 16; Pixel 10 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30001', name: 'Samsung Galaxy S8+', width: 360, height: 740, dpr: 4, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 8.0.0; SM-G955U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30002', name: 'Samsung Galaxy S20 Ultra', width: 412, height: 915, dpr: 3.5, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 10; SM-G981B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30003', name: 'Galaxy Fold', width: 280, height: 653, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 9.0; SAMSUNG SM-F900U Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30004', name: 'Galaxy S21', width: 360, height: 800, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 9.0; SAMSUNG SM-G991 Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30005', name: 'Galaxy S21 Plus', width: 384, height: 854, dpr: 2.8125, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 9.0; SAMSUNG SM-G996 Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30006', name: 'Galaxy S21 Ultra', width: 412, height: 915, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 9.0; SAMSUNG SM-G998 Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30007', name: 'Galaxy S20', width: 360, height: 800, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 9.0; SAMSUNG SM-G981 Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30008', name: 'Galaxy S20 Plus', width: 384, height: 854, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 9.0; SAMSUNG SM-G986 Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30009', name: 'Samsung Galaxy A51/71', width: 412, height: 914, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 8.0.0; SM-G955U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30010', name: 'Galaxy S III', width: 360, height: 640, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30011', name: 'Galaxy S5', width: 360, height: 640, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30012', name: 'Galaxy S8', width: 360, height: 740, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30013', name: 'Galaxy S9+', width: 320, height: 658, dpr: 4.5, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30014', name: 'Galaxy Tab S4', width: 712, height: 1138, dpr: 2.25, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30015', name: 'Galaxy Note II', width: 360, height: 640, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30016', name: 'Galaxy Note 3', width: 360, height: 640, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30017', name: 'Samsung S21 FE', width: 360, height: 800, dpr: 420, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; SAMSUNG SM-G990B) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/20.0 Chrome/106.0.5249.126 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30018', name: 'Galaxy Z Fold 5', width: 344, height: 882, dpr: 1, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; SM-F946B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.131 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30019', name: 'Galaxy Fold3 (Folded - Portrait)', width: 320, height: 872, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; SM-F926U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.131 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30020', name: 'Galaxy Fold3 (Folded - Landscape)', width: 872, height: 320, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; SM-F926U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.131 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30021', name: 'Galaxy Fold3 (Unfolded - Portrait)', width: 590, height: 736, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; SM-F926U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.131 Mobile Safari/537.36', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '30022', name: 'Galaxy Fold3 (Unfolded - Landscape)', width: 736, height: 590, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; SM-F926U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.131 Mobile Safari/537.36', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '30023', name: 'Galaxy S22', width: 360, height: 800, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; SM-S901B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30024', name: 'Galaxy S22 Plus', width: 384, height: 854, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; SM-S906B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30025', name: 'Galaxy S22 Ultra', width: 412, height: 915, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; SM-S908B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30026', name: 'Galaxy S23', width: 360, height: 800, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 14; SM-S911B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30027', name: 'Galaxy S23 Plus', width: 384, height: 854, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 14; SM-S916B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30028', name: 'Galaxy S23 Ultra', width: 412, height: 915, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 14; SM-S918B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30029', name: 'Galaxy S24', width: 360, height: 800, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 14; SM-S921B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30030', name: 'Galaxy S24 Plus', width: 384, height: 854, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 14; SM-S926B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30031', name: 'Galaxy S24 Ultra', width: 412, height: 915, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 14; SM-S928B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30032', name: 'Galaxy Z Flip 5', width: 264, height: 844, dpr: 2.8, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; SM-F731B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.131 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30033', name: 'Galaxy Z Fold 4', width: 344, height: 882, dpr: 2.8, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; SM-F936B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.131 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '30034', name: 'Galaxy Tab S9', width: 1120, height: 1600, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; SM-X710) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '40001', name: 'Nokia Lumia 520', width: 320, height: 533, dpr: 1.5, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '40002', name: 'Microsoft Lumia 550', width: 640, height: 360, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '40003', name: 'Microsoft Lumia 950', width: 360, height: 640, dpr: 4, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '40004', name: 'Surface Pro 7', width: 912, height: 1368, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (iPad; CPU OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '40005', name: 'Surface Duo', width: 540, height: 720, dpr: 2.5, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 11.0; Surface Duo) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '40006', name: 'Surface Pro 9', width: 1200, height: 1800, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '40007', name: 'Surface Pro 10', width: 1200, height: 1800, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '50001', name: 'BlackBerry Z30', width: 360, height: 640, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '50002', name: 'LG Optimus L70', width: 384, height: 640, dpr: 1.25, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/%s Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '50003', name: 'Nokia N9', width: 480, height: 854, dpr: 1, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '50004', name: 'JioPhone 2', width: 240, height: 320, dpr: 1, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:48.0) Gecko/48.0 Firefox/48.0 KAIOS/2.5', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '50005', name: 'Kindle Fire HDX', width: 800, height: 1280, dpr: 2, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '50006', name: 'Blackberry PlayBook', width: 600, height: 1024, dpr: 1, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+', type: 'tablet', isTouchCapable: true, isMobileCapable: true, }, { id: '50007', name: 'Moto G4', width: 360, height: 640, dpr: 3, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 6.0.1; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '50008', name: 'OnePlus 12', width: 412, height: 915, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 14; CPH2581) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '50009', name: 'Nothing Phone 2', width: 412, height: 915, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; A065) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '50010', name: 'Xiaomi 14', width: 412, height: 915, dpr: 2.625, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 14; 23127PN0CC) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '50011', name: 'Motorola Razr+', width: 264, height: 844, dpr: 2.8, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; XT2321-1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.131 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '50012', name: 'OnePlus Open', width: 734, height: 1014, dpr: 2.8, capabilities: ['touch', 'mobile'], userAgent: 'Mozilla/5.0 (Linux; Android 13; CPH2551) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.131 Mobile Safari/537.36', type: 'phone', isTouchCapable: true, isMobileCapable: true, }, { id: '90001', name: 'laptopWithTouch', width: 950, height: 1280, dpr: 1, capabilities: ['touch'], userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 13_0_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36', type: 'notebook', isTouchCapable: true, isMobileCapable: false, }, { id: '90002', name: 'laptopWithHiDPIScreen', width: 900, height: 1440, dpr: 2, capabilities: [], userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 13_0_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36', type: 'notebook', isTouchCapable: false, isMobileCapable: false, }, { id: '90003', name: 'laptopWithMDPIScreen', width: 800, height: 1280, dpr: 1, capabilities: [], userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 13_0_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36', type: 'notebook', isTouchCapable: false, isMobileCapable: false, }, { id: '90004', name: 'Asus Zenbook Fold', width: 853, height: 1280, dpr: 2, capabilities: ['touch', 'tablet'], userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36', type: 'tablet', isTouchCapable: true, isMobileCapable: false, }, { id: '90005', name: 'Surface Laptop Studio 2', width: 1600, height: 2400, dpr: 2, capabilities: ['touch'], userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', type: 'notebook', isTouchCapable: true, isMobileCapable: false, }, ]; const customDevices: () => Device[] = () => { return typeof window !== 'undefined' ? window.electron.store.get('deviceManager.customDevices') : []; }; type DeviceMap = {[key: string]: Device}; export const getDevicesMap = (): DeviceMap => { return [...defaultDevices, ...customDevices()].reduce((map: DeviceMap, device) => { map[device.id] = device; return map; }, {}); }; ================================================ FILE: desktop-app/src/common/webViewUtils.ts ================================================ export function updateWebViewHeightAndScale( webView: HTMLElement | Electron.WebviewTag, pageHeight: number ) { webView.style.height = `${pageHeight}px`; webView.style.transform = `scale(0.1)`; } ================================================ FILE: desktop-app/src/main/app-meta/index.ts ================================================ import {app, ipcMain, shell} from 'electron'; import path from 'path'; import {IPC_MAIN_CHANNELS} from '../../common/constants'; import store from '../../store'; export interface AppMetaResponse { appVersion: string; webviewPreloadPath: string; } export const initAppMetaHandlers = () => { ipcMain.handle(IPC_MAIN_CHANNELS.APP_META, async (): Promise => { return { webviewPreloadPath: app.isPackaged ? path.join(__dirname, 'preload-webview.js') : path.join(__dirname, '../../../.erb/dll/preload-webview.js'), appVersion: app.getVersion(), }; }); ipcMain.on('electron-store-get', async (event, val) => { event.returnValue = store.get(val); }); ipcMain.on('electron-store-set', async (_, key, val) => { store.set(key, val); }); ipcMain.on(IPC_MAIN_CHANNELS.OPEN_EXTERNAL, async (_, {url}) => { console.log('Opening external url', url); shell.openExternal(url); }); }; ================================================ FILE: desktop-app/src/main/app-updater.ts ================================================ import {autoUpdater} from 'electron-updater'; export interface AppUpdaterStatus { status: string; version?: string; lastChecked?: number; progress?: number; size?: number; error?: Error; } export class AppUpdater { status = 'IDLE'; version?: string; lastChecked?: number; progress?: number; size?: number; error?: Error; constructor() { autoUpdater.logger = console; autoUpdater.checkForUpdatesAndNotify(); autoUpdater.on('checking-for-update', () => { this.status = 'CHECKING'; this.lastChecked = Date.now(); }); autoUpdater.on('update-available', (info) => { this.status = 'AVAILABLE'; this.version = info.version; this.lastChecked = Date.now(); }); autoUpdater.on('update-not-available', (info) => { this.status = 'UP_TO_DATE'; this.lastChecked = Date.now(); }); autoUpdater.on('error', (err) => { this.status = 'ERROR'; this.error = err; this.lastChecked = Date.now(); }); autoUpdater.on('download-progress', (progressObj) => { const logMessage = `Download speed: ${progressObj.bytesPerSecond} - Downloaded ${progressObj.percent}% (${progressObj.transferred}/${progressObj.total})`; // eslint-disable-next-line no-console console.log(logMessage); this.status = `DOWNLOADING - ${progressObj.percent}%`; this.progress = progressObj.percent; this.size = progressObj.total; this.lastChecked = Date.now(); }); autoUpdater.on('update-downloaded', (info) => { this.status = 'DOWNLOADED (Restart to apply update)'; this.lastChecked = Date.now(); }); } getStatus(): AppUpdaterStatus { return { status: this.status, version: this.version, lastChecked: this.lastChecked, progress: this.progress, size: this.size, error: this.error, }; } } ================================================ FILE: desktop-app/src/main/browser-sync.ts ================================================ /* eslint-disable @typescript-eslint/ban-ts-comment */ import BrowserSync, {BrowserSyncInstance} from 'browser-sync'; import fs from 'fs-extra'; export const BROWSER_SYNC_PORT = 12719; export const BROWSER_SYNC_HOST = `localhost:${BROWSER_SYNC_PORT}`; export const BROWSER_SYNC_URL = `https://${BROWSER_SYNC_HOST}/browser-sync/browser-sync-client.js?v=2.27.10`; const browserSyncEmbed: BrowserSyncInstance = BrowserSync.create('embed'); let created = false; let filesWatcher: ReturnType | null = null; let cssWatcher: ReturnType | null = null; export async function initInstance(): Promise { if (created) { return browserSyncEmbed; } created = true; return new Promise((resolve, reject) => { browserSyncEmbed.init( { open: false, localOnly: true, https: true, notify: false, ui: false, port: BROWSER_SYNC_PORT, }, (err: Error, bs: BrowserSyncInstance) => { if (err) { return reject(err); } return resolve(bs); } ); }); } export function watchFiles(filePath: string) { if (filePath && fs.existsSync(filePath)) { const fileDir = filePath.substring(0, filePath.lastIndexOf('/')); filesWatcher = browserSyncEmbed // @ts-expect-error .watch([filePath, `${fileDir}/**/**.js`]) .on('change', browserSyncEmbed.reload); cssWatcher = browserSyncEmbed.watch( `${fileDir}/**/**.css`, // @ts-expect-error (event: string, file: string) => { if (event === 'change') { browserSyncEmbed.reload(file); } } ); } } export async function stopWatchFiles() { if (filesWatcher) { // @ts-expect-error await filesWatcher.close(); } if (cssWatcher) { // @ts-expect-error await cssWatcher.close(); } } ================================================ FILE: desktop-app/src/main/cli.ts ================================================ import parseArgs from 'electron-args'; let binaryName = 'ResponsivelyApp'; if (process.platform === 'darwin') { binaryName = '/Applications/ResponsivelyApp.app/Contents/MacOS/ResponsivelyApp'; } if (process.platform === 'win32') { binaryName = 'ResponsivelyApp.exe'; } const cli = parseArgs( ` ResponsivelyApp Usage $ ${binaryName} [path] Options --help show help --version show version Examples $ ${binaryName} https://example.com $ ${binaryName} /path/to/index.html `, { alias: { h: 'help', }, } ); export default cli; ================================================ FILE: desktop-app/src/main/dev-entry.cjs ================================================ // Dev-mode bootstrap: registers tsx before loading the TypeScript entry point. // Node 24 (Electron 40) handles .ts natively via ESM, bypassing CJS hooks. // Using a .cjs entry ensures tsx's CJS hook intercepts all .ts imports. require('tsx/cjs'); require('./main.ts'); ================================================ FILE: desktop-app/src/main/devtools/index.ts ================================================ import {BrowserWindow, ipcMain, webContents, WebContentsView} from 'electron'; import {DOCK_POSITION} from '../../common/constants'; import {DockPosition} from '../../renderer/store/features/devtools'; let devtoolsView: WebContentsView | undefined; let devtoolsWebview: Electron.WebContents; let mainWindow: BrowserWindow | undefined; export interface OpenDevtoolsArgs { webviewId: number; dockPosition: DockPosition; bounds?: Electron.Rectangle; } export interface ResizeDevtoolsArgs { bounds: Electron.Rectangle; } export interface OpenDevtoolsResult { status: boolean; } export interface ToggleInspectorArgs { webviewId: number; } export interface ToggleInspectorResult { status: boolean; } export interface InspectElementArgs { coords: {x: number; y: number}; webviewId: number; } const onInspectNodeRequested = async ( backendNodeId: number, dbg: Electron.Debugger, webviewId: number ) => { const [ { model: { content: [x, y], }, }, ] = await Promise.all([ dbg.sendCommand('DOM.getBoxModel', { backendNodeId, }), dbg.sendCommand('Overlay.setInspectMode', { mode: 'none', highlightConfig: {}, }), ]); const args: InspectElementArgs = { coords: {x, y}, webviewId, }; mainWindow?.webContents.send('inspect-element', args); }; const onDebuggerEvent = async ( _: any, method: string, params: any, dbg: Electron.Debugger, webviewId: number ) => { switch (method) { case 'Overlay.inspectNodeRequested': await onInspectNodeRequested(params.backendNodeId, dbg, webviewId); break; default: break; } }; const enableInspector = async ( _: any, args: ToggleInspectorArgs ): Promise => { const {webviewId} = args; const webViewContents = webContents.fromId(webviewId); if (webViewContents === undefined) { return {status: false}; } const dbg = webViewContents.debugger; if (!dbg.isAttached()) { dbg.attach(); dbg.on('message', (__: any, method: string, params: any) => { onDebuggerEvent(__, method, params, dbg, webviewId); }); } await dbg.sendCommand('DOM.enable'); await dbg.sendCommand('Overlay.enable'); await dbg.sendCommand('Overlay.setInspectMode', { mode: 'searchForNode', highlightConfig: { showInfo: true, showStyles: true, contentColor: {r: 111, g: 168, b: 220, a: 0.66}, paddingColor: {r: 147, g: 196, b: 125, a: 0.66}, borderColor: {r: 255, g: 229, b: 153, a: 0.66}, marginColor: {r: 246, g: 178, b: 107, a: 0.66}, }, }); return {status: true}; }; const disableInspector = async ( _: any, args: ToggleInspectorArgs ): Promise => { const {webviewId} = args; const webViewContents = webContents.fromId(webviewId); if (webViewContents === undefined) { return {status: false}; } const dbg = webViewContents.debugger; try { await dbg.sendCommand('Overlay.setInspectMode', { mode: 'none', highlightConfig: {}, }); dbg.removeAllListeners().detach(); } catch (err) { // eslint-disable-next-line no-console console.log('Error detaching debugger', err); } return {status: true}; }; const openDevtools = async (_: any, arg: OpenDevtoolsArgs): Promise => { const {webviewId, dockPosition} = arg; const optionalWebview = webContents.fromId(webviewId); if (mainWindow == null || optionalWebview === undefined) { return {status: false}; } devtoolsWebview = optionalWebview; if (dockPosition === DOCK_POSITION.UNDOCKED) { devtoolsWebview.openDevTools({mode: 'detach'}); return {status: true}; } devtoolsView = new WebContentsView(); devtoolsWebview.setDevToolsWebContents(devtoolsView.webContents); devtoolsWebview.openDevTools(); devtoolsView.webContents .executeJavaScript( ` (async function () { const sleep = ms => (new Promise(resolve => setTimeout(resolve, ms))); var retryCount = 0; var done = false; while(retryCount < 10 && !done) { try { retryCount++; document.querySelectorAll('div[slot="insertion-point-main"]')[0].shadowRoot.querySelectorAll('.tabbed-pane-left-toolbar.toolbar')[0].style.display = 'none' done = true } catch(err){ await sleep(100); } } })() ` ) .catch((err) => { // eslint-disable-next-line no-console console.error('Error removing the native inspect button', err); }); return {status: true}; }; const resizeDevtools = async (_: any, arg: ResizeDevtoolsArgs) => { if (devtoolsView == null || mainWindow == null) { return; } try { if (!mainWindow.contentView.children.includes(devtoolsView)) { mainWindow.contentView.addChildView(devtoolsView); } devtoolsView.setBounds(arg.bounds); } catch (err) { // eslint-disable-next-line no-console console.error('Error resizing devtools', err); } }; const closeDevTools = async () => { if (devtoolsWebview == null) { return; } devtoolsWebview.closeDevTools(); if (devtoolsView == null) { return; } mainWindow?.contentView.removeChildView(devtoolsView); devtoolsView.webContents.close(); devtoolsView = undefined; }; export const initDevtoolsHandlers = (_mainWindow: BrowserWindow | undefined) => { mainWindow = _mainWindow; ipcMain.removeHandler('open-devtools'); ipcMain.handle('open-devtools', openDevtools); ipcMain.removeHandler('resize-devtools'); ipcMain.handle('resize-devtools', resizeDevtools); ipcMain.removeHandler('close-devtools'); ipcMain.handle('close-devtools', closeDevTools); ipcMain.removeHandler('enable-inspector-overlay'); ipcMain.handle('enable-inspector-overlay', enableInspector); ipcMain.removeHandler('disable-inspector-overlay'); ipcMain.handle('disable-inspector-overlay', disableInspector); }; ================================================ FILE: desktop-app/src/main/http-basic-auth/index.ts ================================================ import {AuthInfo, app, BrowserWindow, ipcMain} from 'electron'; import {IPC_MAIN_CHANNELS} from '../../common/constants'; export type AuthRequestArgs = AuthInfo; export interface AuthResponseArgs { username: string; password: string; authInfo: AuthInfo; } type Callback = (username: string, password: string) => void; const inProgressAuthentications: {[key: string]: Callback[]} = {}; const handleLogin = async ( authInfo: AuthInfo, mainWindow: BrowserWindow, callback: (username: string, password: string) => void ) => { if (inProgressAuthentications[authInfo.host]) { inProgressAuthentications[authInfo.host].push(callback); return; } inProgressAuthentications[authInfo.host] = [callback]; mainWindow.webContents.send(IPC_MAIN_CHANNELS.AUTH_REQUEST, authInfo); ipcMain.once( IPC_MAIN_CHANNELS.AUTH_RESPONSE, (_, {authInfo: respAuthInfo, username, password}: AuthResponseArgs) => { inProgressAuthentications[respAuthInfo.host].forEach((cb) => cb(username, password)); delete inProgressAuthentications[respAuthInfo.host]; } ); }; export const initHttpBasicAuthHandlers = (mainWindow: BrowserWindow) => { app.on('login', (event, _webContents, _request, authInfo, callback) => { event.preventDefault(); handleLogin(authInfo, mainWindow, callback); }); }; ================================================ FILE: desktop-app/src/main/main.ts ================================================ /* eslint global-require: off, no-console: off, promise/always-return: off */ /** * This module executes inside of electron's main process. You can start * electron renderer process from here and communicate with the other processes * through IPC. * * When running `yarn run build` or `yarn run build:main`, this file is compiled to * `./src/main.js` using webpack. This gives us some performance wins. */ import path from 'path'; import {app, BrowserWindow, shell, screen, ipcMain} from 'electron'; import cli from './cli'; import {PROTOCOL} from '../common/constants'; import MenuBuilder from './menu'; import {resolveHtmlPath} from './util'; import {BROWSER_SYNC_HOST, initInstance, stopWatchFiles, watchFiles} from './browser-sync'; import store from '../store'; import {initWebviewContextMenu} from './webview-context-menu/register'; import {initScreenshotHandlers} from './screenshot'; import {initDevtoolsHandlers} from './devtools'; import {initWebviewStorageManagerHandlers} from './webview-storage-manager'; import {initNativeFunctionHandlers} from './native-functions'; import {WebPermissionHandlers} from './web-permissions'; import {initHttpBasicAuthHandlers} from './http-basic-auth'; import {initAppMetaHandlers} from './app-meta'; import {openUrl} from './protocol-handler'; import {AppUpdater} from './app-updater'; let windowShownOnOpen = false; if (process.defaultApp) { if (process.argv.length >= 2) { app.setAsDefaultProtocolClient(PROTOCOL, process.execPath, [path.resolve(process.argv[1])]); } } else { app.setAsDefaultProtocolClient(PROTOCOL); } let urlToOpen: string | undefined = cli.input[0]?.includes('electronmon') ? undefined : cli.input[0]; let mainWindow: BrowserWindow | null = null; initAppMetaHandlers(); initWebviewContextMenu(); initScreenshotHandlers(); initWebviewStorageManagerHandlers(); initNativeFunctionHandlers(); if (process.env.NODE_ENV === 'production') { const sourceMapSupport = require('source-map-support'); sourceMapSupport.install(); } const isDebug = process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true'; if (isDebug) { require('electron-debug')(); } const installExtensions = async () => { const installer = require('electron-devtools-installer'); const { REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS, EMBER_INSPECTOR, VUEJS_DEVTOOLS, APOLLO_DEVELOPER_TOOLS, } = installer; const forceDownload = !!process.env.UPGRADE_EXTENSIONS; const extensions = [ REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS, EMBER_INSPECTOR, VUEJS_DEVTOOLS, APOLLO_DEVELOPER_TOOLS, ]; return installer.default(extensions, forceDownload).catch(console.log); }; const createWindow = async () => { windowShownOnOpen = false; let isAppInitiated = false; await installExtensions(); const setIsAppInitiated = () => { isAppInitiated = true; }; const RESOURCES_PATH = app.isPackaged ? path.join(process.resourcesPath, 'assets') : path.join(__dirname, '../../assets'); const getAssetPath = (...paths: string[]): string => { return path.join(RESOURCES_PATH, ...paths); }; const {width, height} = screen.getPrimaryDisplay().workAreaSize; mainWindow = new BrowserWindow({ show: false, width, height, icon: getAssetPath('icon.png'), titleBarStyle: 'default', webPreferences: { preload: app.isPackaged ? path.join(__dirname, 'preload.js') : path.join(__dirname, '../../.erb/dll/preload.js'), webviewTag: true, }, }); initDevtoolsHandlers(mainWindow); initHttpBasicAuthHandlers(mainWindow); const webPermissionHandlers = WebPermissionHandlers(mainWindow); // Add BROWSER_SYNC_HOST to the allowed Content-Security-Policy origins mainWindow.webContents.session.webRequest.onHeadersReceived(async (details, callback) => { if (details.responseHeaders?.['content-security-policy']) { let cspHeader = details.responseHeaders['content-security-policy'][0]; cspHeader = cspHeader.replace('default-src', `default-src ${BROWSER_SYNC_HOST}`); cspHeader = cspHeader.replace('script-src', `script-src ${BROWSER_SYNC_HOST}`); cspHeader = cspHeader.replace('script-src-elem', `script-src-elem ${BROWSER_SYNC_HOST}`); cspHeader = cspHeader.replace( 'connect-src', `connect-src ${BROWSER_SYNC_HOST} wss://${BROWSER_SYNC_HOST} ws://${BROWSER_SYNC_HOST}` ); cspHeader = cspHeader.replace('child-src', `child-src ${BROWSER_SYNC_HOST}`); cspHeader = cspHeader.replace('worker-src', `worker-src ${BROWSER_SYNC_HOST}`); // Required when/if the browser-sync script is eventually relocated to a web worker details.responseHeaders['content-security-policy'][0] = cspHeader; } callback({responseHeaders: details.responseHeaders}); }); mainWindow.loadURL( `${resolveHtmlPath('index.html')}?urlToOpen=${encodeURI(urlToOpen ?? 'undefined')}` ); const isWindows = process.platform === 'win32'; let needsFocusFix = false; let triggeringProgrammaticBlur = false; mainWindow.on('blur', () => { if (!triggeringProgrammaticBlur) { needsFocusFix = true; } }); mainWindow.on('focus', () => { if (isWindows && needsFocusFix) { needsFocusFix = false; triggeringProgrammaticBlur = true; setTimeout(function () { mainWindow!.blur(); mainWindow!.focus(); setTimeout(function () { triggeringProgrammaticBlur = false; }, 100); }, 100); } }); mainWindow.on('ready-to-show', async () => { if (!isAppInitiated) { await initInstance(); setIsAppInitiated(); if (!mainWindow) { throw new Error('"mainWindow" is not defined'); } webPermissionHandlers.init(); if (process.env.START_MINIMIZED) { mainWindow.minimize(); } else { mainWindow.showInactive(); if (!windowShownOnOpen) { windowShownOnOpen = true; mainWindow.show(); } else { mainWindow.showInactive(); } } } }); mainWindow.webContents.setWindowOpenHandler(({url}) => { console.log('window open handler', url); return {action: 'deny'}; }); mainWindow.on('closed', () => { mainWindow = null; }); const appUpdater = new AppUpdater(); const menuBuilder = new MenuBuilder(mainWindow, appUpdater); menuBuilder.buildMenu(); // Open urls in the user's browser mainWindow.webContents.setWindowOpenHandler((edata) => { shell.openExternal(edata.url); return {action: 'deny'}; }); ipcMain.on('start-watching-file', async (event, fileInfo) => { let filePath = fileInfo.path.replace('file://', ''); if (process.platform === 'win32') { filePath = filePath.replace(/^\//, ''); } app.addRecentDocument(filePath); await stopWatchFiles(); watchFiles(filePath); }); ipcMain.on('stop-watcher', async () => { await stopWatchFiles(); }); }; app.on('open-url', async (event, url) => { let actualURL = url.replace(`${PROTOCOL}://`, ''); if (actualURL.indexOf('//') !== -1 && actualURL.indexOf('://') === -1) { // This hack is needed because the URL from the extension is missing the colon for some reason. actualURL = actualURL.replace('//', '://'); } if (mainWindow == null) { // Will be handled by opened window urlToOpen = actualURL; await createWindow(); return; } windowShownOnOpen = false; openUrl(actualURL, mainWindow); }); /** * Add event listeners... */ app.on('window-all-closed', () => { // Respect the OSX convention of having the application in memory even // after all windows have been closed if (process.platform !== 'darwin') { app.quit(); } }); app.on('certificate-error', (event, _, url, __, ___, callback) => { if (url.indexOf(BROWSER_SYNC_HOST) !== -1) { event.preventDefault(); return callback(true); } console.log('certificate-error event', url, BROWSER_SYNC_HOST); return callback(store.get('userPreferences.allowInsecureSSLConnections')); }); app .whenReady() .then(() => { createWindow(); app.on('activate', () => { // On macOS it's common to re-create a window in the app when the // dock icon is clicked and there are no other windows open. if (mainWindow === null) createWindow(); }); }) .catch(console.log); ================================================ FILE: desktop-app/src/main/menu/help.ts ================================================ import {BrowserWindow, MenuItemConstructorOptions, ipcMain, shell} from 'electron'; import {EnvironmentInfo, getEnvironmentInfo} from '../util'; import {IPC_MAIN_CHANNELS} from '../../common/constants'; import {AppUpdater, AppUpdaterStatus} from '../app-updater'; export interface AboutDialogArgs { environmentInfo: EnvironmentInfo; updaterStatus: AppUpdaterStatus; } export const subMenuHelp = ( mainWindow: BrowserWindow, appUpdater: AppUpdater ): MenuItemConstructorOptions => { const environmentInfo = getEnvironmentInfo(); ipcMain.handle('get-about-info', async (_): Promise => { return { environmentInfo, updaterStatus: appUpdater.getStatus(), }; }); return { label: 'Help', submenu: [ { label: 'Learn More', click() { shell.openExternal('https://responsively.app'); }, }, { label: 'Open Source', click() { shell.openExternal('https://github.com/responsively-org/responsively-app'); }, }, { label: 'Join Discord', click() { shell.openExternal('https://responsively.app/join-discord/'); }, }, { label: 'Search Issues', click() { shell.openExternal('https://github.com/responsively-org/responsively-app/issues'); }, }, { label: 'Sponsor Responsively', click() { shell.openExternal( 'https://responsively.app/sponsor?utm_source=app&utm_medium=menu&utm_campaign=sponsor' ); }, }, { type: 'separator', }, { label: 'About', accelerator: 'F1', click: () => { mainWindow.webContents.send(IPC_MAIN_CHANNELS.OPEN_ABOUT_DIALOG, { environmentInfo, updaterStatus: appUpdater.getStatus(), }); }, }, ], }; }; ================================================ FILE: desktop-app/src/main/menu/index.ts ================================================ import {app, Menu, BrowserWindow, MenuItemConstructorOptions} from 'electron'; import {subMenuHelp} from './help'; import {getViewMenu} from './view'; import {AppUpdater} from '../app-updater'; interface DarwinMenuItemConstructorOptions extends MenuItemConstructorOptions { selector?: string; submenu?: DarwinMenuItemConstructorOptions[] | Menu; } export interface ReloadArgs { ignoreCache?: boolean; } export default class MenuBuilder { mainWindow: BrowserWindow; appUpdater: AppUpdater; constructor(mainWindow: BrowserWindow, appUpdater: AppUpdater) { this.mainWindow = mainWindow; this.appUpdater = appUpdater; } buildMenu(): Menu { if (process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true') { this.setupDevelopmentEnvironment(); } const template = process.platform === 'darwin' ? this.buildDarwinTemplate() : this.buildDefaultTemplate(); const menu = Menu.buildFromTemplate(template); Menu.setApplicationMenu(menu); return menu; } setupDevelopmentEnvironment(): void { this.mainWindow.webContents.on('context-menu', (_, props) => { const {x, y} = props; Menu.buildFromTemplate([ { label: 'Inspect element', click: () => { this.mainWindow.webContents.inspectElement(x, y); }, }, ]).popup({window: this.mainWindow}); }); } buildDarwinTemplate(): MenuItemConstructorOptions[] { const subMenuAbout: DarwinMenuItemConstructorOptions = { label: 'ResponsivelyApp', submenu: [ { label: 'About ResponsivelyApp', selector: 'orderFrontStandardAboutPanel:', }, {type: 'separator'}, { label: 'Hide ResponsivelyApp', accelerator: 'Command+H', selector: 'hide:', }, { label: 'Hide Others', accelerator: 'Command+Shift+H', selector: 'hideOtherApplications:', }, {label: 'Show All', selector: 'unhideAllApplications:'}, {type: 'separator'}, { label: 'Quit', accelerator: 'Command+Q', click: () => { app.quit(); }, }, ], }; const subMenuEdit: DarwinMenuItemConstructorOptions = { label: 'Edit', submenu: [ {label: 'Undo', accelerator: 'Command+Z', selector: 'undo:'}, {label: 'Redo', accelerator: 'Shift+Command+Z', selector: 'redo:'}, {type: 'separator'}, {label: 'Cut', accelerator: 'Command+X', selector: 'cut:'}, {label: 'Copy', accelerator: 'Command+C', selector: 'copy:'}, {label: 'Paste', accelerator: 'Command+V', selector: 'paste:'}, { label: 'Select All', accelerator: 'Command+A', selector: 'selectAll:', }, ], }; const subMenuWindow: DarwinMenuItemConstructorOptions = { label: 'Window', submenu: [ { label: 'Minimize', accelerator: 'Command+M', selector: 'performMiniaturize:', }, {label: 'Close', accelerator: 'Command+W', selector: 'performClose:'}, {type: 'separator'}, {label: 'Bring All to Front', selector: 'arrangeInFront:'}, ], }; return [ subMenuAbout, subMenuEdit, getViewMenu(this.mainWindow), subMenuWindow, subMenuHelp(this.mainWindow, this.appUpdater), ]; } buildDefaultTemplate(): MenuItemConstructorOptions[] { return [ { label: '&File', submenu: [ { label: '&Open', accelerator: 'Ctrl+O', }, { label: '&Close', accelerator: 'Ctrl+W', click: () => { this.mainWindow.close(); }, }, ], }, getViewMenu(this.mainWindow), subMenuHelp(this.mainWindow, this.appUpdater), ]; } } ================================================ FILE: desktop-app/src/main/menu/view.ts ================================================ import {BrowserWindow, MenuItemConstructorOptions} from 'electron'; const isMac = process.platform === 'darwin'; const isDev = process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true'; const getToggleFullScreen = (mainWindow: BrowserWindow): MenuItemConstructorOptions => ({ label: 'Toggle &Full Screen', accelerator: isMac ? 'Ctrl+CommandOrControl+F' : 'F11', click: () => { mainWindow.setFullScreen(!mainWindow.isFullScreen()); }, }); const getToggleDevTools = (mainWindow: BrowserWindow): MenuItemConstructorOptions => ({ label: 'Toggle &Developer Tools', accelerator: isMac ? 'Alt+CommandOrControl+I' : 'Alt+Ctrl+I', click: () => { mainWindow.webContents.toggleDevTools(); }, }); const getReloadMenu = (mainWindow: BrowserWindow): MenuItemConstructorOptions => ({ label: '&Reload', accelerator: 'CommandOrControl+R', click: () => { if (isDev) { mainWindow.webContents.reload(); return; } mainWindow.webContents.send('reload', {}); }, }); const getReloadIgnoringCacheMenu = (mainWindow: BrowserWindow): MenuItemConstructorOptions => ({ label: 'Reload Ignoring Cache', accelerator: 'CommandOrControl+Shift+R', click: () => { mainWindow.webContents.send('reload', {ignoreCache: true}); }, }); const getViewMenuProd = (mainWindow: BrowserWindow): MenuItemConstructorOptions => ({ label: '&View', submenu: [ getReloadMenu(mainWindow), getReloadIgnoringCacheMenu(mainWindow), getToggleFullScreen(mainWindow), ], }); const getViewMenuDev = (mainWindow: BrowserWindow): MenuItemConstructorOptions => ({ label: '&View', submenu: [ getReloadMenu(mainWindow), getToggleDevTools(mainWindow), getToggleFullScreen(mainWindow), ], }); export const getViewMenu = isDev ? getViewMenuDev : getViewMenuProd; ================================================ FILE: desktop-app/src/main/native-functions/index.ts ================================================ import {clipboard, ipcMain, nativeTheme, webContents} from 'electron'; export interface DisableDefaultWindowOpenHandlerArgs { webContentsId: number; } export interface DisableDefaultWindowOpenHandlerResult { done: boolean; } export interface SetNativeThemeArgs { theme: 'dark' | 'light'; } export interface SetNativeThemeResult { done: boolean; } export const initNativeFunctionHandlers = () => { ipcMain.handle( 'disable-default-window-open-handler', async ( _, arg: DisableDefaultWindowOpenHandlerArgs ): Promise => { webContents.fromId(arg.webContentsId)?.setWindowOpenHandler(() => { return {action: 'deny'}; }); return {done: true}; } ); ipcMain.handle( 'set-native-theme', async (_, arg: SetNativeThemeArgs): Promise => { const {theme} = arg; nativeTheme.themeSource = theme; return {done: true}; } ); ipcMain.handle('copy-to-clipboard', async (_, arg: string): Promise => { clipboard.writeText(arg); }); }; ================================================ FILE: desktop-app/src/main/preload-webview.ts ================================================ import {ipcRenderer} from 'electron'; const documentBodyInit = () => { // Browser Sync const bsScript = window.document.createElement('script'); bsScript.src = 'https://localhost:12719/browser-sync/browser-sync-client.js?v=2.27.10'; bsScript.async = true; window.document.body.appendChild(bsScript); // Context Menu window.addEventListener('contextmenu', (e) => { e.preventDefault(); ipcRenderer.send('show-context-menu', { contextMenuMeta: {x: e.x, y: e.y}, }); }); window.addEventListener('wheel', (e) => { ipcRenderer.sendToHost('pass-scroll-data', { coordinates: { x: e.deltaX, y: e.deltaY, scrollX: window.scrollX, scrollY: window.scrollY, }, innerHeight: document.body.scrollHeight, innerWidth: window.innerWidth, }); }); window.addEventListener('scroll', () => { ipcRenderer.sendToHost('pass-scroll-data', { coordinates: { x: 0, y: 0, scrollX: window.scrollX, scrollY: window.scrollY, }, innerHeight: document.body.scrollHeight, innerWidth: window.innerWidth, }); }); // To detect if user is typing in an input field const isUserTyping = () => { const el = document.activeElement; if (!el) return false; return ( el.tagName === 'INPUT' || el.tagName === 'TEXTAREA' || (el as HTMLElement).isContentEditable ); }; // Handle F key for fullscreen toggle window.addEventListener('keydown', (e) => { // Prevent fullscreen if user is typing if (isUserTyping()) return; if (e.key === 'f' || e.key === 'F') { e.preventDefault(); // Check if already in fullscreen if (document.fullscreenElement) { // Exit fullscreen document.exitFullscreen().catch((err) => { // eslint-disable-next-line no-console console.error('Error exiting fullscreen:', err); }); } else { // Request fullscreen document.documentElement.requestFullscreen().catch((err) => { // eslint-disable-next-line no-console console.error('Error requesting fullscreen:', err); }); } } }); window.addEventListener('dom-ready', () => { const {body} = document; const html = document.documentElement; const height = Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight ); ipcRenderer.sendToHost('pass-scroll-data', { coordinates: {x: 0, y: 0}, innerHeight: height, innerWidth: window.innerWidth, }); }); }; ipcRenderer.on('context-menu-command', (_, command) => { ipcRenderer.sendToHost('context-menu-command', command); }); const documentBodyWaitHandle = setInterval(() => { window.onerror = function logError(errorMsg, url, lineNumber) { // eslint-disable-next-line no-console console.log(`Unhandled error: ${errorMsg} ${url} ${lineNumber}`); // Code to run when an error has occurred on the page }; if (window?.document?.body) { clearInterval(documentBodyWaitHandle); try { documentBodyInit(); } catch (err) { // eslint-disable-next-line no-console console.log('Error in documentBodyInit:', err); } return; } // eslint-disable-next-line no-console console.log('document.body not ready'); }, 300); ================================================ FILE: desktop-app/src/main/preload.ts ================================================ import {Channels} from 'common/constants'; import {contextBridge, ipcRenderer, IpcRendererEvent} from 'electron'; contextBridge.exposeInMainWorld('electron', { ipcRenderer: { sendMessage(channel: Channels, args: T[]) { ipcRenderer.send(channel, args); }, on(channel: Channels, func: (...args: T[]) => void) { const subscription = (_event: IpcRendererEvent, ...args: T[]) => func(...args); ipcRenderer.on(channel, subscription); return () => ipcRenderer.removeListener(channel, subscription); }, once(channel: Channels, func: (...args: T[]) => void) { ipcRenderer.once(channel, (_event, ...args) => func(...args)); }, invoke(channel: Channels, ...args: T[]): Promise

{ return ipcRenderer.invoke(channel, ...args); }, removeListener(channel: Channels, listener: (...args: any[]) => void) { ipcRenderer.removeListener(channel, listener); }, removeAllListeners(channel: Channels) { ipcRenderer.removeAllListeners(channel); }, }, store: { get(val: any) { return ipcRenderer.sendSync('electron-store-get', val); }, set(property: string, val: any) { ipcRenderer.send('electron-store-set', property, val); }, // Other method you want to add like has(), reset(), etc. }, }); window.onerror = function (errorMsg, url, lineNumber) { // eslint-disable-next-line no-console console.log(`Unhandled error: ${errorMsg} ${url} ${lineNumber}`); // Code to run when an error has occurred on the page }; ================================================ FILE: desktop-app/src/main/protocol-handler/index.ts ================================================ import {BrowserWindow} from 'electron'; import {IPC_MAIN_CHANNELS} from '../../common/constants'; // eslint-disable-next-line import/prefer-default-export export const openUrl = (url: string, mainWindow: BrowserWindow | null) => { mainWindow?.webContents.send(IPC_MAIN_CHANNELS.OPEN_URL, { url, }); }; ================================================ FILE: desktop-app/src/main/screenshot/index.ts ================================================ /* eslint-disable promise/always-return */ import {Device} from 'common/deviceList'; import {ipcMain, shell, webContents} from 'electron'; import {writeFile, ensureDir} from 'fs-extra'; import path from 'path'; import store from '../../store'; export interface ScreenshotArgs { webContentsId: number; fullPage?: boolean; device: Device; } export interface ScreenshotAllArgs { webContentsId: number; device: Device; previousHeight: string; previousTransform: string; pageHeight: number; } export interface ScreenshotResult { done: boolean; } const captureImage = async (webContentsId: number): Promise => { const WebContents = webContents.fromId(webContentsId); const isExecuted = await WebContents?.executeJavaScript(` if (window.isExecuted) { true; } `); if (!isExecuted) { await WebContents?.executeJavaScript(` const bgColor = window.getComputedStyle(document.body).backgroundColor; if (bgColor === 'rgba(0, 0, 0, 0)') { document.body.style.backgroundColor = 'white'; } window.isExecuted = true; `); } const Image = await WebContents?.capturePage(); return Image; }; const quickScreenshot = async (arg: ScreenshotArgs): Promise => { const { webContentsId, device: {name}, } = arg; const image = await captureImage(webContentsId); if (image === undefined) { return {done: false}; } const fileName = name.replaceAll('/', '-').replaceAll(':', '-'); const dir = store.get('userPreferences.screenshot.saveLocation'); const filePath = path.join(dir, `/${fileName}-${Date.now()}.jpeg`); await ensureDir(dir); await writeFile(filePath, image.toJPEG(100)); setTimeout(() => shell.showItemInFolder(filePath), 100); return {done: true}; }; const captureAllDecies = async (args: Array): Promise => { const screenShots = args.map((arg) => { const {device, webContentsId} = arg; const screenShotArg: ScreenshotArgs = {device, webContentsId}; return quickScreenshot(screenShotArg); }); await Promise.all(screenShots); return {done: true}; }; export const initScreenshotHandlers = () => { ipcMain.handle('screenshot', async (_, arg: ScreenshotArgs): Promise => { return quickScreenshot(arg); }); ipcMain.handle('screenshot:All', async (event, args: Array) => { return captureAllDecies(args); }); }; ================================================ FILE: desktop-app/src/main/screenshot/webpage.ts ================================================ class WebPage { webview: Electron.WebContents; constructor(webview: Electron.WebContents) { this.webview = webview; } async getPageHeight() { return this.webview.executeJavaScript('document.body.scrollHeight'); } async getViewportHeight() { return this.webview.executeJavaScript('window.innerHeight'); } async scrollTo(x: number, y: number) { return this.webview.executeJavaScript(`window.scrollTo(${x}, ${y})`); } } export default WebPage; ================================================ FILE: desktop-app/src/main/util.ts ================================================ /* eslint import/prefer-default-export: off */ import {URL} from 'url'; import path from 'path'; import {app} from 'electron'; import fs from 'fs-extra'; import os from 'os'; export function resolveHtmlPath(htmlFileName: string) { if (process.env.NODE_ENV === 'development') { const port = process.env.PORT || 1212; const url = new URL(`http://localhost:${port}`); url.pathname = htmlFileName; return url.href; } return `file://${path.resolve(__dirname, '../renderer/', htmlFileName)}`; } let isCliArgResult: boolean | undefined; export function isValidCliArgURL(arg?: string): boolean { if (isCliArgResult !== undefined) { return isCliArgResult; } if (arg == null || arg === '') { isCliArgResult = false; return false; } try { const url = new URL(arg); if (url.protocol === 'http:' || url.protocol === 'https:' || url.protocol === 'file:') { isCliArgResult = true; return true; } // eslint-disable-next-line no-console console.warn('Protocol not supported', url.protocol); } catch (e) { // eslint-disable-next-line no-console console.warn('Not a valid URL', arg, e); } isCliArgResult = false; return false; } export const getPackageJson = () => { let appPath; if (process.env.NODE_ENV === 'production') appPath = app.getAppPath(); else appPath = process.cwd(); const pkgPath = path.join(appPath, 'package.json'); if (fs.existsSync(pkgPath)) { const pkgContent = fs.readFileSync(pkgPath, 'utf-8'); return JSON.parse(pkgContent); } console.error(`cant find package.json in: '${appPath}'`); return {}; }; export interface EnvironmentInfo { appVersion: string; electronVersion: string; chromeVersion: string; nodeVersion: string; v8Version: string; osInfo: string; } export const getEnvironmentInfo = (): EnvironmentInfo => { const pkg = getPackageJson(); const appVersion = pkg.version || 'Unknown'; const electronVersion = process.versions.electron || 'Unknown'; const chromeVersion = process.versions.chrome || 'Unknown'; const nodeVersion = process.versions.node || 'Unknown'; const v8Version = process.versions.v8 || 'Unknown'; const osInfo = `${os.type()} ${os.arch()} ${os.release()}`.trim() || 'Unknown'; return { appVersion, electronVersion, chromeVersion, nodeVersion, v8Version, osInfo, }; }; ================================================ FILE: desktop-app/src/main/web-permissions/PermissionsManager.ts ================================================ import {BrowserWindow, ipcMain, session} from 'electron'; import {IPC_MAIN_CHANNELS} from '../../common/constants'; import store from '../../store'; export interface PermissionRequestArg { permission: string; requestingOrigin: string; } export interface PermissionResponseArg { permissionRequest: PermissionRequestArg; allow: boolean; } export const PERMISSION_STATE = { GRANTED: 'GRANTED', DENIED: 'DENIED', PROMPT: 'PROMPT', UNKNOWN: 'UNKNOWN', } as const; type PermissionState = (typeof PERMISSION_STATE)[keyof typeof PERMISSION_STATE]; interface PersistedPermission { origin: string; permissions: { type: string; status: PermissionState; }[]; } type PermissionRecords = Record; type PermissionCallback = (permissionGranted: boolean) => void; const loadPermissions = () => { const permissions = (store.get('webPermissions') as PersistedPermission[]) .map(({origin, permissions: permissionRecords}) => { return { origin, permissions: permissionRecords.reduce((acc, {type, status}) => { acc[type] = status; return acc; }, {} as PermissionRecords), }; }) .reduce((acc, {origin, permissions: permissionRecords}) => { acc[origin] = permissionRecords; return acc; }, {} as Record); return permissions; }; const savePermissions = (permissions: Record) => { const persistedPermissions = Object.entries(permissions).map(([origin, permissionRecords]) => { return { origin, permissions: Object.entries(permissionRecords) .filter(([, status]) => { return status === PERMISSION_STATE.GRANTED || status === PERMISSION_STATE.DENIED; }) .map(([type, status]) => { return { type, status, }; }), }; }); store.set('webPermissions', persistedPermissions); }; class PermissionsManager { permissions: Record; callbacks: Record = {}; mainWindow: BrowserWindow; constructor(mainWindow: BrowserWindow) { this.mainWindow = mainWindow; this.permissions = loadPermissions(); const handler = (_event: Electron.IpcMainInvokeEvent, arg: PermissionResponseArg) => { this.setPermissionState( arg.permissionRequest.requestingOrigin, arg.permissionRequest.permission, arg.allow ? PERMISSION_STATE.GRANTED : PERMISSION_STATE.DENIED ); const key = `${arg.permissionRequest.requestingOrigin}-${arg.permissionRequest.permission}`; const callbacks = this.callbacks[key]; if (callbacks) { callbacks.forEach((callback) => callback(arg.allow)); this.callbacks[key] = []; } }; const PERMISSION_RESPONSE_CHANNEL = IPC_MAIN_CHANNELS.PERMISSION_RESPONSE; if (ipcMain.listeners(PERMISSION_RESPONSE_CHANNEL).length === 0) { try { ipcMain.handle(PERMISSION_RESPONSE_CHANNEL, handler); } catch (e) { // eslint-disable-next-line no-console // eslint-disable-next-line no-console console.error('Error adding listener for permission response channel', e); } } } getPermissionState(origin: string, type: string): PermissionState { const permissions = this.permissions[origin]; return permissions ? permissions[type] : PERMISSION_STATE.UNKNOWN; } setPermissionState(origin: string, type: string, state: PermissionState) { const permissions = this.permissions[origin]; if (permissions) { permissions[type] = state; } else { this.permissions[origin] = { [type]: state, }; } savePermissions(this.permissions); this.mainWindow.webContents.send(IPC_MAIN_CHANNELS.PERMISSION_UPDATED, { origin, type, state, }); } requestPermission(origin: string, type: string, callback: PermissionCallback): void { this.permissions[origin] = this.permissions[origin] || {}; const currentState = this.permissions[origin][type]; const key = `${origin}-${type}`; let callbacks = this.callbacks[key]; if (callbacks === undefined) { callbacks = []; this.callbacks[key] = callbacks; } // If permission is explicitly granted, allow immediately if (currentState === PERMISSION_STATE.GRANTED) { callback(true); return; } // If permission is explicitly denied, block immediately if (currentState === PERMISSION_STATE.DENIED) { callback(false); return; } // For PROMPT or UNKNOWN states, show permission dialog // Set to PROMPT state to indicate it's requesting if (currentState !== PERMISSION_STATE.PROMPT) { this.permissions[origin][type] = PERMISSION_STATE.PROMPT; } callbacks.push(callback); // Only show dialog if no other requests are pending for this permission if (callbacks.length === 1) { this.mainWindow.webContents.send(IPC_MAIN_CHANNELS.PERMISSION_REQUEST, { permission: type, requestingOrigin: origin, }); } } getSitePermissions(origin: string) { const permissions = this.permissions[origin] || {}; const commonPermissions = [ {type: 'camera', displayName: 'Camera', icon: 'mdi:camera'}, {type: 'microphone', displayName: 'Microphone', icon: 'mdi:microphone'}, {type: 'geolocation', displayName: 'Location', icon: 'mdi:map-marker'}, {type: 'notifications', displayName: 'Notifications', icon: 'mdi:bell'}, { type: 'clipboard-read', displayName: 'Clipboard', icon: 'mdi:content-paste', }, {type: 'fullscreen', displayName: 'Fullscreen', icon: 'mdi:fullscreen'}, {type: 'midi', displayName: 'MIDI Devices', icon: 'mdi:piano'}, { type: 'pointerLock', displayName: 'Pointer Lock', icon: 'mdi:cursor-move', }, ]; return commonPermissions.map((permission) => ({ ...permission, state: permissions[permission.type] || PERMISSION_STATE.UNKNOWN, })); } updateSitePermission(origin: string, type: string, state: PermissionState) { // If changing to PROMPT state, clear any cached permission decisions in the session if (state === PERMISSION_STATE.PROMPT) { // Clear storage data for this origin to ensure fresh permission requests session.defaultSession .clearStorageData({ origin, storages: [], quotas: [], }) .catch((e) => { // eslint-disable-next-line no-console console.error('Failed to clear storage data for origin:', origin, e); }); } this.setPermissionState(origin, type, state); } clearSitePermissions(origin: string) { const permissions = this.permissions[origin]; if (permissions) { // Clear storage data for this origin to ensure fresh permission requests session.defaultSession .clearStorageData({ origin, storages: [], quotas: [], }) .catch((e) => { // eslint-disable-next-line no-console console.error('Failed to clear storage data for origin:', origin, e); }); // Notify about each permission being cleared (reset to UNKNOWN) Object.keys(permissions).forEach((type) => { this.mainWindow.webContents.send(IPC_MAIN_CHANNELS.PERMISSION_UPDATED, { origin, type, state: PERMISSION_STATE.UNKNOWN, }); }); } delete this.permissions[origin]; savePermissions(this.permissions); } } export default PermissionsManager; ================================================ FILE: desktop-app/src/main/web-permissions/index.ts ================================================ import {BrowserWindow, session, ipcMain} from 'electron'; import PermissionsManager, {PERMISSION_STATE} from './PermissionsManager'; import {IPC_MAIN_CHANNELS} from '../../common/constants'; import store from '../../store'; // eslint-disable-next-line import/prefer-default-export export const WebPermissionHandlers = (mainWindow: BrowserWindow) => { const permissionsManager = new PermissionsManager(mainWindow); return { init: () => { session.defaultSession.setPermissionRequestHandler((webContents, permission, callback) => { permissionsManager.requestPermission( new URL(webContents.getURL()).origin, permission, callback ); }); session.defaultSession.setPermissionCheckHandler( (_webContents, permission, requestingOrigin) => { const status = permissionsManager.getPermissionState(requestingOrigin, permission); return status === PERMISSION_STATE.GRANTED; } ); session.defaultSession.webRequest.onBeforeSendHeaders( { urls: [''], }, (details, callback) => { const acceptLanguage = store.get('userPreferences.webRequestHeaderAcceptLanguage'); if (acceptLanguage != null && acceptLanguage !== '') { details.requestHeaders['Accept-Language'] = store.get( 'userPreferences.webRequestHeaderAcceptLanguage' ); } callback({requestHeaders: details.requestHeaders}); } ); // Add IPC handlers for site permissions management ipcMain.handle(IPC_MAIN_CHANNELS.GET_SITE_PERMISSIONS, (_event, origin: string) => { return permissionsManager.getSitePermissions(origin); }); ipcMain.handle( IPC_MAIN_CHANNELS.UPDATE_SITE_PERMISSION, (_event, {origin, type, state}: {origin: string; type: string; state: string}) => { permissionsManager.updateSitePermission( origin, type, state as (typeof PERMISSION_STATE)[keyof typeof PERMISSION_STATE] ); return true; } ); ipcMain.handle(IPC_MAIN_CHANNELS.CLEAR_SITE_PERMISSIONS, (_event, origin: string) => { permissionsManager.clearSitePermissions(origin); return true; }); }, }; }; ================================================ FILE: desktop-app/src/main/webview-context-menu/common.ts ================================================ interface ContextMenuMetadata { id: string; label: string; } export const CONTEXT_MENUS: {[key: string]: ContextMenuMetadata} = { INSPECT_ELEMENT: {id: 'INSPECT_ELEMENT', label: 'Inspect Element'}, OPEN_CONSOLE: {id: 'OPEN_CONSOLE', label: 'Open Console'}, }; ================================================ FILE: desktop-app/src/main/webview-context-menu/register.ts ================================================ import {BrowserWindow, ipcMain, Menu} from 'electron'; import {CONTEXT_MENUS} from './common'; // import { webViewPubSub } from '../../renderer/lib/pubsub'; // import { MOUSE_EVENTS } from '../ruler'; export const initWebviewContextMenu = () => { ipcMain.removeAllListeners('show-context-menu'); ipcMain.on('show-context-menu', (event, ...args) => { const template: Electron.MenuItemConstructorOptions[] = Object.values(CONTEXT_MENUS).map( (menu) => { return { label: menu.label, click: () => { event.sender.send('context-menu-command', { command: menu.id, arg: args[0], }); }, }; } ); const menu = Menu.buildFromTemplate(template); menu.popup(BrowserWindow.fromWebContents(event.sender) as Electron.PopupOptions); }); // ipcMain.on('pass-scroll-data', (event, ...args) => { // console.log(args[0].coordinates); // webViewPubSub.publish(MOUSE_EVENTS.SCROLL, [args[0].coordinates]); // }); }; export default initWebviewContextMenu; ================================================ FILE: desktop-app/src/main/webview-storage-manager/index.ts ================================================ import {ClearStorageDataOptions, ipcMain, webContents} from 'electron'; export interface DeleteStorageArgs { webContentsId: number; storages?: string[]; } export interface DeleteStorageResult { done: boolean; } const deleteStorage = async (arg: DeleteStorageArgs): Promise => { const {webContentsId, storages} = arg; if (storages?.length === 1 && storages[0] === 'network-cache') { await webContents.fromId(webContentsId)?.session.clearCache(); } else { await webContents .fromId(webContentsId) ?.session.clearStorageData({storages} as ClearStorageDataOptions); } return {done: true}; }; export const initWebviewStorageManagerHandlers = () => { ipcMain.handle( 'delete-storage', async (_, arg: DeleteStorageArgs): Promise => { return deleteStorage(arg); } ); }; ================================================ FILE: desktop-app/src/renderer/App.css ================================================ /* * @NOTE: Prepend a `~` to css file paths that are in your node_modules * See https://github.com/webpack-contrib/sass-loader#imports */ @import '~@fontsource/lato/300.css'; @import '~@fontsource/lato/400.css'; @import '~@fontsource/lato/400-italic.css'; @import '~@fontsource/lato/700.css'; @tailwind base; @tailwind components; @tailwind utilities; html { user-select: none; } ================================================ FILE: desktop-app/src/renderer/AppContent.tsx ================================================ import {Provider, useSelector} from 'react-redux'; import ToolBar from './components/ToolBar'; import Previewer from './components/Previewer'; import {store} from './store'; import './App.css'; import ThemeProvider from './context/ThemeProvider'; import type {AppView} from './store/features/ui'; import {APP_VIEWS, selectAppView} from './store/features/ui'; import DeviceManager from './components/DeviceManager'; import KeyboardShortcutsManager from './components/KeyboardShortcutsManager'; import {ReleaseNotes} from './components/ReleaseNotes'; import {Sponsorship} from './components/Sponsorship'; import {AboutDialog} from './components/AboutDialog'; const Browser = () => { return (

); }; const getView = (appView: AppView) => { switch (appView) { case APP_VIEWS.BROWSER: return ; case APP_VIEWS.DEVICE_MANAGER: return ; default: return ; } }; const ViewComponent = () => { const appView = useSelector(selectAppView); return <>{getView(appView)}; }; const AppContent = () => { return ( ); }; export default AppContent; ================================================ FILE: desktop-app/src/renderer/components/AboutDialog/index.tsx ================================================ import {useEffect, useRef, useState} from 'react'; import {IPC_MAIN_CHANNELS} from 'common/constants'; import {AboutDialogArgs} from 'main/menu/help'; import TimeAgo from 'javascript-time-ago'; import en from 'javascript-time-ago/locale/en'; import Icon from '../../assets/img/logo.png'; import Modal from '../Modal'; import Button from '../Button'; TimeAgo.addLocale(en); const timeAgo = new TimeAgo('en-US'); export const AboutDialog = () => { const [show, setShow] = useState(false); const [args, setArgs] = useState(null); const intervalRef = useRef(null); const clearIntervalIfAvailable = () => { if (intervalRef.current) { clearInterval(intervalRef.current); intervalRef.current = null; } }; useEffect(() => { const onOpenAboutDialog = (arg: AboutDialogArgs) => { setShow(true); setArgs(arg); }; window.electron.ipcRenderer.on( IPC_MAIN_CHANNELS.OPEN_ABOUT_DIALOG, onOpenAboutDialog ); return () => { window.electron.ipcRenderer.removeListener( IPC_MAIN_CHANNELS.OPEN_ABOUT_DIALOG, onOpenAboutDialog ); }; }, []); useEffect(() => { if (show) { intervalRef.current = setInterval(() => { window.electron.ipcRenderer .invoke('get-about-info') .then((arg: AboutDialogArgs) => { setArgs(arg); return arg; }) .catch((err) => { // eslint-disable-next-line no-console console.error('Error while refreshing about info', err); }); }, 1000); } else { clearIntervalIfAvailable(); } }, [show]); return ( setShow(false)} title={
Logo
Responsively App
A dev-tool that aids faster and precise responsive web development.
} >
Versions
App v{args?.environmentInfo.appVersion}
Electron v{args?.environmentInfo.electronVersion}
Chrome v{args?.environmentInfo.chromeVersion}
Node.js v{args?.environmentInfo.nodeVersion}
V8 v{args?.environmentInfo.v8Version}
OS {args?.environmentInfo.osInfo}
Update Status
Status {args?.updaterStatus.status.toLocaleLowerCase()}
{args?.updaterStatus.version != null ? (
New Version {args?.updaterStatus.version}
) : null} {args?.updaterStatus.error != null ? (
Error {args?.updaterStatus.error.message}
) : null}
Last Checked {args?.updaterStatus.lastChecked != null ? timeAgo.format(args?.updaterStatus.lastChecked) : 'NA'}
); }; ================================================ FILE: desktop-app/src/renderer/components/Accordion/Accordion.tsx ================================================ export const Accordion = ({children}: {children: JSX.Element}) => { return (
{children}
); }; ================================================ FILE: desktop-app/src/renderer/components/Accordion/AccordionItem.tsx ================================================ import {useState} from 'react'; type AccordionItemProps = { title: string; children: JSX.Element; }; export const AccordionItem = ({title, children}: AccordionItemProps) => { const [isOpen, setIsOpen] = useState(true); const toggle = () => { setIsOpen(!isOpen); }; return (

{children}
); }; ================================================ FILE: desktop-app/src/renderer/components/Accordion/index.tsx ================================================ export {Accordion} from './Accordion'; export {AccordionItem} from './AccordionItem'; ================================================ FILE: desktop-app/src/renderer/components/Button/Button.test.tsx ================================================ import {act, render, screen} from '@testing-library/react'; import Button from './index'; vi.mock('@iconify/react', () => ({ Icon: () =>
, })); describe('Button Component', () => { it('renders with default props', () => { render(); const buttonElement = screen.getByRole('button', {name: /click me/i}); expect(buttonElement).toBeInTheDocument(); }); it('applies custom class name', () => { render(); const buttonElement = screen.getByRole('button', {name: /click me/i}); expect(buttonElement).toHaveClass('custom-class'); }); it('renders loading icon when isLoading is true', () => { render(); const loadingIcon = screen.getByTestId('icon'); expect(loadingIcon).toBeInTheDocument(); }); it('renders confirmation icon when loading is done', () => { vi.useFakeTimers(); const {rerender} = render(); act(() => { rerender(); vi.runAllTimers(); // Use act to advance timers }); const confirmationIcon = screen.getByTestId('icon'); expect(confirmationIcon).toBeInTheDocument(); vi.useRealTimers(); }); it('applies primary button styles', () => { render(); const buttonElement = screen.getByRole('button', {name: /click me/i}); expect(buttonElement).toHaveClass('bg-emerald-500'); expect(buttonElement).toHaveClass('text-white'); }); it('applies action button styles', () => { render(); const buttonElement = screen.getByRole('button', {name: /click me/i}); expect(buttonElement).toHaveClass('bg-slate-200'); }); it('applies subtle hover styles', () => { render(); const buttonElement = screen.getByRole('button', {name: /click me/i}); expect(buttonElement).toHaveClass('hover:bg-slate-200'); }); it('disables hover effects when disableHoverEffects is true', () => { render( ); const buttonElement = screen.getByRole('button', {name: /click me/i}); expect(buttonElement).not.toHaveClass('hover:bg-slate-200'); }); it('renders children correctly when not loading or loading done', () => { render(); const buttonElement = screen.getByText('Click me'); expect(buttonElement).toBeInTheDocument(); }); it('does not render children when loading or loading done', () => { const {rerender} = render(); expect(screen.queryByText('Click me')).not.toBeInTheDocument(); act(() => { rerender(); }); expect(screen.queryByText('Click me')).not.toBeInTheDocument(); }); }); ================================================ FILE: desktop-app/src/renderer/components/Button/index.tsx ================================================ import React, {useEffect, useRef, useState} from 'react'; import cx from 'classnames'; import {Icon} from '@iconify/react'; interface CustomProps { className?: string; isActive?: boolean; isLoading?: boolean; isPrimary?: boolean; isTextButton?: boolean; disableHoverEffects?: boolean; isActionButton?: boolean; subtle?: boolean; disabled?: boolean; } const Button = ({ className = '', isActive = false, isLoading = false, isPrimary = false, isTextButton = false, isActionButton = false, subtle = false, disableHoverEffects = false, disabled = false, children, ...props }: CustomProps & React.DetailedHTMLProps, HTMLButtonElement>) => { const [isLoadingDone, setIsLoadingDone] = useState(false); const prevLoadingState = useRef(false); useEffect(() => { if (!isLoading && prevLoadingState.current === true) { setIsLoadingDone(true); setTimeout(() => { setIsLoadingDone(false); }, 800); } prevLoadingState.current = isLoading; }, [isLoading]); let hoverBg = 'hover:bg-slate-400'; let hoverBgDark = 'dark:hover:bg-slate-600'; if (subtle) { hoverBg = 'hover:bg-slate-200'; hoverBgDark = 'dark:hover:bg-slate-700'; } else if (isPrimary) { hoverBg = 'hover:bg-emerald-600'; hoverBgDark = 'dark:hover:bg-emerald-600'; } return ( ); }; export default Button; ================================================ FILE: desktop-app/src/renderer/components/ButtonGroup/index.tsx ================================================ import {ReactElement} from 'react'; import cx from 'classnames'; interface Props { buttons: { content: ReactElement; srContent: string; onClick: () => void; isActive: boolean; }[]; } export const ButtonGroup = ({buttons}: Props) => { return ( {buttons.map(({content, srContent, onClick, isActive}, index) => ( ))} ); }; ================================================ FILE: desktop-app/src/renderer/components/ConfirmDialog/index.tsx ================================================ import {useEffect, useState} from 'react'; import Button from '../Button'; import Modal from '../Modal'; export const ConfirmDialog = ({ onClose, onConfirm, open, confirmText, }: { onClose?: () => void; onConfirm?: () => void; open: boolean; confirmText?: string; }) => { const [isOpen, setIsOpen] = useState(open); useEffect(() => { setIsOpen(open); }, [open]); const handleClose = () => { if (onClose) { onClose(); } setIsOpen(false); }; const handleConfirm = () => { if (onConfirm) { onConfirm(); } setIsOpen(false); }; return (

{confirmText || 'Are you sure?'}

); }; ================================================ FILE: desktop-app/src/renderer/components/DeviceManager/DeviceDetailsModal.tsx ================================================ import {Device} from 'common/deviceList'; import {v4 as uuidv4} from 'uuid'; import {useEffect, useState} from 'react'; import Button from '../Button'; import Input from '../Input'; import Modal from '../Modal'; import Select from '../Select'; interface Props { device?: Device; onSaveDevice: (device: Device, isNew: boolean) => Promise; onRemoveDevice: (device: Device) => void; existingDevices: Device[]; isCustom: boolean; isOpen: boolean; onClose: () => void; } const DeviceDetailsModal = ({ onSaveDevice, onRemoveDevice, existingDevices, device, isOpen, onClose, }: Props) => { const [name, setName] = useState(device?.name ?? ''); const [width, setWidth] = useState(device?.width ?? 400); const [height, setHeight] = useState(device?.height ?? 600); const [userAgent, setUserAgent] = useState(device?.userAgent ?? ''); const [type, setType] = useState(device?.type ?? 'phone'); const [dpr, setDpr] = useState(device?.dpr ?? 1); const [isTouchCapable, setIsTouchCapable] = useState(device?.isTouchCapable ?? true); const [isMobileCapable, setIsMobileCapable] = useState(device?.isMobileCapable ?? true); useEffect(() => { if (device) { setName(device.name); setWidth(device.width); setHeight(device.height); setUserAgent(device.userAgent); setType(device.type); setDpr(device.dpr); setIsTouchCapable(device.isTouchCapable); setIsMobileCapable(device.isMobileCapable); } else { setName(''); setWidth(400); setHeight(600); setUserAgent(''); setType('phone'); setDpr(1); setIsTouchCapable(true); setIsMobileCapable(true); } }, [device]); useEffect(() => { const desktopUA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36'; const phoneUA = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'; if ((type === 'phone' || type === 'tablet') && (userAgent === desktopUA || userAgent === '')) { setUserAgent(phoneUA); setIsMobileCapable(true); setIsTouchCapable(true); } else if (type === 'notebook' && (userAgent === phoneUA || userAgent === '')) { setUserAgent(desktopUA); setIsMobileCapable(false); setIsTouchCapable(false); } }, [type, userAgent]); const isNew = !device; const isCustom = device != null ? device.isCustom ?? false : true; const handleAddDevice = async (): Promise => { const existingDevice = existingDevices.find((d) => d.name === name); const doesDeviceExist = existingDevice != null && (isNew || existingDevice.id !== device.id); if (doesDeviceExist) { // eslint-disable-next-line no-alert return alert('Device With the name already exists, try with a different name'); } const capabilities = []; if (isTouchCapable) { capabilities.push('touch'); } if (isMobileCapable) { capabilities.push('mobile'); } await onSaveDevice( { id: device?.id ?? uuidv4(), name, width, height, userAgent, type, dpr, isTouchCapable, isMobileCapable, capabilities, isCustom, }, isNew ); return onClose(); }; return ( <>
setName(e.target.value)} disabled={!isCustom} /> setWidth(parseInt(e.target.value, 10))} disabled={!isCustom} /> setHeight(parseInt(e.target.value, 10))} disabled={!isCustom} /> setDpr(parseFloat(e.target.value))} disabled={!isCustom} /> setUserAgent(e.target.value)} disabled={!isCustom} /> setIsTouchCapable(e.target.checked)} disabled={!isCustom} /> setIsMobileCapable(e.target.checked)} disabled={!isCustom} />
{isCustom ? (
{device != null ? ( ) : (
)}
) : (
)}
); }; export default DeviceDetailsModal; ================================================ FILE: desktop-app/src/renderer/components/DeviceManager/DeviceLabel.tsx ================================================ import {Icon} from '@iconify/react'; import cx from 'classnames'; import {useDrag, useDrop} from 'react-dnd'; import {useDispatch, useSelector} from 'react-redux'; import {Device, getDevicesMap} from 'common/deviceList'; import {selectActiveSuite, setSuiteDevices} from 'renderer/store/features/device-manager'; import Button from '../Button'; export const DND_TYPE = 'Device'; interface Props { device: Device; enableDnd?: boolean; moveDevice?: (device: Device, atIndex: number) => void; onShowDeviceDetails: (device: Device) => void; hideSelectionControls?: boolean; disableSelectionControls?: boolean; } const DeviceLabel = ({ device, moveDevice = () => {}, enableDnd = false, onShowDeviceDetails, hideSelectionControls = false, disableSelectionControls = false, }: Props) => { const dispatch = useDispatch(); const activeSuite = useSelector(selectActiveSuite); const devices = activeSuite.devices.map((id) => getDevicesMap()[id]); const originalIndex = devices.indexOf(device); const [{isDragging}, drag] = useDrag( () => ({ type: DND_TYPE, item: device, collect: (monitor) => ({ isDragging: monitor.isDragging(), }), end: (draggedDevice, monitor) => { const didDrop = monitor.didDrop(); if (!didDrop) { moveDevice(draggedDevice, originalIndex); } }, }), [device.name, originalIndex, moveDevice] ); const [, drop] = useDrop( () => ({ accept: DND_TYPE, hover(draggedDevice: Device) { if (draggedDevice.name !== device.name) { moveDevice(draggedDevice, devices.indexOf(device)); } }, }), [moveDevice] ); const opacity = isDragging ? 0 : 1; const isChecked = devices.find((d) => d.name === device.name) != null; return (
drag(drop(node)) : null} style={{opacity}} > {enableDnd ? : null} { if (e.target.checked) { dispatch( setSuiteDevices({ suite: activeSuite.id, devices: [...activeSuite.devices, device.id], }) ); } else { dispatch( setSuiteDevices({ suite: activeSuite.id, devices: activeSuite.devices.filter((d) => d !== device.id), }) ); } }} />
{device.name} {device.width}x{device.height}
); }; export default DeviceLabel; ================================================ FILE: desktop-app/src/renderer/components/DeviceManager/PreviewSuites/CreateSuiteButton/CreateSuiteModal.tsx ================================================ import {useEffect, useState} from 'react'; import {useDispatch} from 'react-redux'; import {v4 as uuidv4} from 'uuid'; import {addSuite} from 'renderer/store/features/device-manager'; import Button from '../../../Button'; import Input from '../../../Input'; import Modal from '../../../Modal'; interface Props { isOpen: boolean; onClose: () => void; } export const CreateSuiteModal = ({isOpen, onClose}: Props) => { const [name, setName] = useState(''); const dispatch = useDispatch(); const handleAddSuite = async (): Promise => { if (name === '') { // eslint-disable-next-line no-alert return alert('Suite name cannot be empty. Please enter a name for the suite.'); } dispatch(addSuite({id: uuidv4(), name, devices: ['10008']})); return onClose(); }; return ( <>
setName(e.target.value)} />
); }; ================================================ FILE: desktop-app/src/renderer/components/DeviceManager/PreviewSuites/CreateSuiteButton/index.tsx ================================================ import {Icon} from '@iconify/react'; import {useState} from 'react'; import Button from 'renderer/components/Button'; import {CreateSuiteModal} from './CreateSuiteModal'; export const CreateSuiteButton = () => { const [open, setOpen] = useState(false); return (
Add Suite setOpen(false)} />
); }; ================================================ FILE: desktop-app/src/renderer/components/DeviceManager/PreviewSuites/ManageSuitesTool/ManageSuitesTool.test.tsx ================================================ import {render, screen, fireEvent, waitFor} from '@testing-library/react'; import {Device} from 'common/deviceList'; import {Provider, useDispatch} from 'react-redux'; import {configureStore} from '@reduxjs/toolkit'; import {ReactNode} from 'react'; import {type Mock} from 'vitest'; import {transformFile} from './utils'; import {ManageSuitesTool} from './ManageSuitesTool'; // Import the mocked module — vi.mock is hoisted above imports, so this gets the mock import deviceManagerReducer, { addSuites, deleteAllSuites, } from 'renderer/store/features/device-manager'; vi.mock('renderer/store/features/device-manager', () => ({ addSuites: vi.fn(() => ({type: 'addSuites'})), deleteAllSuites: vi.fn(() => ({type: 'deleteAllSuites'})), default: vi.fn((state = {}) => state), // Mock the reducer as a function })); vi.mock('./utils', () => ({ transformFile: vi.fn(), })); vi.mock('renderer/components/FileUploader', () => ({ FileUploader: ({handleFileUpload}: {handleFileUpload: (file: File) => void}) => ( ), })); vi.mock('./helpers', () => ({ onFileDownload: vi.fn(), setCustomDevices: vi.fn(), })); vi.mock('react-redux', async (importOriginal) => { const actual = await importOriginal(); return { ...actual, useDispatch: vi.fn(), }; }); const renderWithRedux = ( component: string | number | boolean | Iterable | JSX.Element | null | undefined ) => { const store = configureStore({ reducer: { deviceManager: deviceManagerReducer as any, }, }); return { ...render({component}), store, }; }; describe('ManageSuitesTool', () => { let setCustomDevicesStateMock: Mock; const dispatchMock = vi.fn(); beforeEach(() => { (useDispatch as Mock).mockReturnValue(dispatchMock); setCustomDevicesStateMock = vi.fn(); renderWithRedux(); }); it('renders the component correctly', () => { expect(screen.getByTestId('download-btn')).toBeInTheDocument(); expect(screen.getByTestId('upload-btn')).toBeInTheDocument(); expect(screen.getByTestId('reset-btn')).toBeInTheDocument(); }); it('opens the modal when download button is clicked', () => { fireEvent.click(screen.getByTestId('download-btn')); expect(screen.getByText('Import your devices')).toBeInTheDocument(); }); it('opens the reset confirmation dialog when reset button is clicked', () => { fireEvent.click(screen.getByTestId('reset-btn')); expect(screen.getByText('Do you want to reset all settings?')).toBeInTheDocument(); }); it('closes the reset confirmation dialog when the close button is clicked', () => { fireEvent.click(screen.getByTestId('reset-btn')); fireEvent.click(screen.getByText('Cancel')); expect(screen.queryByText('Do you want to reset all settings?')).not.toBeInTheDocument(); }); it('dispatches deleteAllSuites and clears custom devices on reset confirmation', async () => { fireEvent.click(screen.getByTestId('reset-btn')); fireEvent.click(screen.getByText('Confirm')); await waitFor(() => { expect(deleteAllSuites).toHaveBeenCalled(); expect(setCustomDevicesStateMock).toHaveBeenCalledWith([]); }); }); it('handles successful file upload and processes custom devices and suites', async () => { const mockSuites = [ {id: '1', name: 'first suite', devices: []}, {id: '2', name: 'second suite', devices: []}, ]; (transformFile as Mock).mockResolvedValue({ customDevices: ['device1', 'device2'], suites: mockSuites, }); fireEvent.click(screen.getByTestId('download-btn')); fireEvent.click(screen.getByTestId('mock-file-uploader')); await waitFor(() => { expect(transformFile).toHaveBeenCalledWith(expect.any(File)); expect(dispatchMock).toHaveBeenCalledWith(addSuites(mockSuites)); }); }); it('handles error in file upload', async () => { (transformFile as Mock).mockRejectedValue(new Error('File upload failed')); fireEvent.click(screen.getByTestId('download-btn')); fireEvent.click(screen.getByTestId('mock-file-uploader')); await waitFor(() => { expect(transformFile).toHaveBeenCalledWith(expect.any(File)); expect(screen.getByText('There has been an error, please try again.')).toBeInTheDocument(); }); fireEvent.click(screen.getByText('Close')); expect( screen.queryByText('There has been an error, please try again.') ).not.toBeInTheDocument(); }); }); ================================================ FILE: desktop-app/src/renderer/components/DeviceManager/PreviewSuites/ManageSuitesTool/ManageSuitesTool.tsx ================================================ import {Icon} from '@iconify/react'; import Button from 'renderer/components/Button'; import {useState} from 'react'; import {FileUploader} from 'renderer/components/FileUploader'; import Modal from 'renderer/components/Modal'; import {addSuites, deleteAllSuites} from 'renderer/store/features/device-manager'; import {useDispatch} from 'react-redux'; import {ConfirmDialog} from 'renderer/components/ConfirmDialog'; import {transformFile} from './utils'; import {onFileDownload, setCustomDevices} from './helpers'; import {ManageSuitesToolError} from './ManageSuitesToolError'; export const ManageSuitesTool = ({setCustomDevicesState}: any) => { const [open, setOpen] = useState(false); const [resetConfirmation, setResetConfirmation] = useState(false); const [error, setError] = useState(false); const dispatch = useDispatch(); const onFileUpload = (fileUploaded: File) => transformFile(fileUploaded) .then((fileTransformed) => { const {customDevices, suites} = fileTransformed; if (customDevices) { const newCustomDevices = setCustomDevices(customDevices); setCustomDevicesState(newCustomDevices); } if (suites) { dispatch(addSuites(suites)); } setOpen(false); return null; }) .catch(() => setError(true)); const onErrorClose = () => { setError(false); setOpen(false); }; const clearCustomDevices = () => { window.electron.store.set('deviceManager.customDevices', []); setCustomDevicesState([]); }; const onReset = () => { dispatch(deleteAllSuites()); clearCustomDevices(); setResetConfirmation(false); }; return ( <>
setResetConfirmation(false)} open={resetConfirmation} confirmText="Do you want to reset all settings?" /> setOpen(false)} title="Import your devices"> <>

Duplicated imports will replace existing suites or custom devices.

{error && }
); }; ================================================ FILE: desktop-app/src/renderer/components/DeviceManager/PreviewSuites/ManageSuitesTool/ManageSuitesToolError.test.tsx ================================================ import {render, screen, fireEvent} from '@testing-library/react'; import {ManageSuitesToolError} from './ManageSuitesToolError'; describe('ManageSuitesToolError', () => { it('renders the error message and close button', () => { const onClose = vi.fn(); render(); expect(screen.getByText('There has been an error, please try again.')).toBeInTheDocument(); expect(screen.getByText('Close')).toBeInTheDocument(); }); it('calls onClose when the close button is clicked', () => { const onClose = vi.fn(); render(); fireEvent.click(screen.getByText('Close')); expect(onClose).toHaveBeenCalledTimes(1); }); }); ================================================ FILE: desktop-app/src/renderer/components/DeviceManager/PreviewSuites/ManageSuitesTool/ManageSuitesToolError.tsx ================================================ import Button from 'renderer/components/Button'; export const ManageSuitesToolError = ({onClose}: {onClose: () => void}) => { return (

There has been an error, please try again.

); }; ================================================ FILE: desktop-app/src/renderer/components/DeviceManager/PreviewSuites/ManageSuitesTool/helpers.test.tsx ================================================ import {Device} from 'common/deviceList'; import {fireEvent, render} from '@testing-library/react'; import Button from 'renderer/components/Button'; import {type Mock} from 'vitest'; import * as Helpers from './helpers'; const mockDefaultDevices = vi.hoisted(() => [ { name: 'Device1', width: 800, height: 600, id: '0', userAgent: '', type: '', dpr: 0, isTouchCapable: false, isMobileCapable: false, capabilities: [], }, ]); vi.mock('common/deviceList', async (importOriginal) => { const actual = await importOriginal(); return { ...actual, defaultDevices: mockDefaultDevices, }; }); describe('onFileDownload', () => { beforeAll(() => { global.URL.createObjectURL = vi.fn(() => 'mockedURL'); global.URL.revokeObjectURL = vi.fn(); // Mocking revokeObjectURL too }); afterEach(() => vi.clearAllMocks()); it('should get customDevices and suites from the store and download the file', () => { const mockCustomDevices = [{name: 'Device1', width: 800, height: 600}]; const mockSuites = [{name: 'Suite1'}]; (window.electron.store.get as Mock).mockImplementation((key: string) => { if (key === 'deviceManager.customDevices') { return mockCustomDevices; } if (key === 'deviceManager.previewSuites') { return mockSuites; } return null; }); Helpers.onFileDownload(); expect(window.electron.store.get).toHaveBeenCalledWith('deviceManager.customDevices'); expect(window.electron.store.get).toHaveBeenCalledWith('deviceManager.previewSuites'); // Verify downloadFile was called by checking its side effects // (vi.spyOn can't intercept internal ESM calls) expect(global.URL.createObjectURL).toHaveBeenCalledWith(expect.any(Blob)); }); }); describe('downloadFile', () => { it('should create and download a JSON file', () => { const mockFileData = {key: 'value'}; const mockedUrl = 'http://localhost/#'; const createObjectURLSpy = vi.spyOn(URL, 'createObjectURL').mockReturnValue(mockedUrl); const revokeObjectURLSpy = vi.spyOn(URL, 'revokeObjectURL'); const spyOnDownloadFileFn = vi.spyOn(Helpers, 'downloadFile'); const {getByTestId} = render(
); const link = getByTestId('mockDownloadBtn'); fireEvent.click(link); expect(spyOnDownloadFileFn).toHaveBeenCalled(); expect(createObjectURLSpy).toHaveBeenCalledWith(expect.any(Blob)); expect(revokeObjectURLSpy).toHaveBeenCalledWith(mockedUrl); }); }); describe('setCustomDevices', () => { it('should filter out default devices and store custom devices', () => { const mockCustomDevices: Device[] = [ { name: 'Device1', width: 800, height: 600, id: '1', userAgent: '', type: '', dpr: 0, isTouchCapable: false, isMobileCapable: false, capabilities: [], }, { name: 'Device2', width: 1024, height: 768, id: '2', userAgent: '', type: '', dpr: 0, isTouchCapable: false, isMobileCapable: false, capabilities: [], }, ]; const filteredDevices = Helpers.setCustomDevices(mockCustomDevices); expect(window.electron.store.set).not.toHaveBeenCalledWith('deviceManager.customDevices', [ mockCustomDevices[1], ]); expect(filteredDevices).toEqual(mockCustomDevices); }); }); ================================================ FILE: desktop-app/src/renderer/components/DeviceManager/PreviewSuites/ManageSuitesTool/helpers.ts ================================================ import {defaultDevices, Device} from 'common/deviceList'; export const downloadFile = >(fileData: T) => { const jsonString = JSON.stringify(fileData, null, 2); const blob = new Blob([jsonString], {type: 'application/json'}); const url = URL.createObjectURL(blob); const link = document.createElement('a'); link.href = url; link.download = `responsively_backup_${new Date().toLocaleDateString()}.json`; document.body.appendChild(link); link.click(); document.body.removeChild(link); URL.revokeObjectURL(url); }; export const setCustomDevices = (customDevices: Device[]) => { const importedCustomDevices = customDevices.filter( (item: Device) => !defaultDevices.includes(item) ); window.electron.store.set('deviceManager.customDevices', importedCustomDevices); return importedCustomDevices; }; export const onFileDownload = () => { const fileData = { customDevices: window.electron.store.get('deviceManager.customDevices'), suites: window.electron.store.get('deviceManager.previewSuites'), }; downloadFile(fileData); }; ================================================ FILE: desktop-app/src/renderer/components/DeviceManager/PreviewSuites/ManageSuitesTool/test.json ================================================ { "customDevices": [ { "id": "123", "name": "a new test", "width": 400, "height": 600, "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1", "typse": "phone", "dpxxi": 1, "isTouchCapable": true, "isMobileCapable": true, "capabilities": [ "touch", "mobile" ], "isCustom": true } ], "suites": [ { "id": "default", "name": "Default", "devices": [ "10008" ] }, { "id": "a4c142fc-debd-4eaa-beba-aef60093151c", "name": "my custom suite", "devices": [ "10008", "30014" ] } ] } ================================================ FILE: desktop-app/src/renderer/components/DeviceManager/PreviewSuites/ManageSuitesTool/utils.test.ts ================================================ import {transformFile} from './utils'; describe('transformFile', () => { it('should parse JSON content of the file', async () => { const jsonContent = {key: 'value'}; const file = new Blob([JSON.stringify(jsonContent)], { type: 'application/json', }) as File; Object.defineProperty(file, 'name', {value: 'test.json'}); const result = await transformFile(file); expect(result).toEqual(jsonContent); }); it('should throw an error for invalid JSON', async () => { const invalidJsonContent = "{ key: 'value' }"; // Invalid JSON const file = new Blob([invalidJsonContent], { type: 'application/json', }) as File; Object.defineProperty(file, 'name', {value: 'test.json'}); await expect(transformFile(file)).rejects.toThrow(); }); }); ================================================ FILE: desktop-app/src/renderer/components/DeviceManager/PreviewSuites/ManageSuitesTool/utils.ts ================================================ export const transformFile = (file: File): Promise<{[key: string]: any}> => { return new Promise((resolve, reject) => { const reader = new FileReader(); reader.onload = () => { try { const jsonContent = JSON.parse(reader.result as string); resolve(jsonContent); } catch (error) { reject(error); } }; reader.onerror = () => { reject(reader.error); }; reader.readAsText(file); }); }; ================================================ FILE: desktop-app/src/renderer/components/DeviceManager/PreviewSuites/Suite.tsx ================================================ import {Icon} from '@iconify/react'; import cx from 'classnames'; import {Device, getDevicesMap} from 'common/deviceList'; import {useDrop} from 'react-dnd'; import {useDispatch} from 'react-redux'; import Button from 'renderer/components/Button'; import { PreviewSuite, deleteSuite, setActiveSuite, setSuiteDevices, } from 'renderer/store/features/device-manager'; import DeviceLabel, {DND_TYPE} from '../DeviceLabel'; interface Props { suite: PreviewSuite; isActive: boolean; } export const Suite = ({suite: {id, name, devices}, isActive}: Props) => { const [, drop] = useDrop(() => ({accept: DND_TYPE})); const dispatch = useDispatch(); const moveDevice = (device: Device, atIndex: number) => { const newDevices = devices.filter((d) => d !== device.id); newDevices.splice(atIndex, 0, device.id); dispatch(setSuiteDevices({suite: id, devices: newDevices})); }; return (
{!isActive ? (
) : null}

{name}

{id !== 'default' ? ( ) : null}
{devices.map((deviceId) => ( {}} hideSelectionControls={!isActive} disableSelectionControls={devices.length === 1} enableDnd={isActive} key={deviceId} moveDevice={moveDevice} /> ))}
); }; ================================================ FILE: desktop-app/src/renderer/components/DeviceManager/PreviewSuites/index.tsx ================================================ import {Icon} from '@iconify/react'; import {useSelector} from 'react-redux'; import Button from 'renderer/components/Button'; import {selectActiveSuite, selectSuites} from 'renderer/store/features/device-manager'; import {useState} from 'react'; import {FileUploader} from 'renderer/components/FileUploader'; import Modal from 'renderer/components/Modal'; import {Suite} from './Suite'; import {CreateSuiteButton} from './CreateSuiteButton'; import {ManageSuitesTool} from './ManageSuitesTool/ManageSuitesTool'; export const PreviewSuites = () => { const suites = useSelector(selectSuites); const activeSuite = useSelector(selectActiveSuite); return (
{suites.map((suite) => ( ))}
); }; ================================================ FILE: desktop-app/src/renderer/components/DeviceManager/index.tsx ================================================ import {useEffect, useState} from 'react'; import {Icon} from '@iconify/react'; import {useDispatch, useSelector} from 'react-redux'; import {DndProvider} from 'react-dnd'; import {HTML5Backend} from 'react-dnd-html5-backend'; import { selectActiveSuite, setDevices, setSuiteDevices, } from 'renderer/store/features/device-manager'; import {APP_VIEWS, setAppView} from 'renderer/store/features/ui'; import {defaultDevices, Device, getDevicesMap} from 'common/deviceList'; import Button from '../Button'; import DeviceLabel from './DeviceLabel'; import DeviceDetailsModal from './DeviceDetailsModal'; import {PreviewSuites} from './PreviewSuites'; import {ManageSuitesTool} from './PreviewSuites/ManageSuitesTool/ManageSuitesTool'; import {Divider} from '../Divider'; import {AccordionItem, Accordion} from '../Accordion'; const filterDevices = (devices: Device[], filter: string) => { const sanitizedFilter = filter.trim().toLowerCase(); return devices.filter((device: Device) => `${device.name.toLowerCase()}${device.width}x${device.height}`.includes(sanitizedFilter) ); }; const DeviceManager = () => { const [isDetailsModalOpen, setIsDetailsModalOpen] = useState(false); const [selectedDevice, setSelectedDevice] = useState(undefined); const dispatch = useDispatch(); const activeSuite = useSelector(selectActiveSuite); const devices = activeSuite.devices?.map((id) => getDevicesMap()[id]); const [searchText, setSearchText] = useState(''); const [filteredDevices, setFilteredDevices] = useState(defaultDevices); const [customDevices, setCustomDevices] = useState( window.electron.store.get('deviceManager.customDevices') ); const [filteredCustomDevices, setFilteredCustomDevices] = useState(customDevices); useEffect(() => { setFilteredDevices(filterDevices(defaultDevices, searchText)); setFilteredCustomDevices(filterDevices(customDevices, searchText)); }, [customDevices, searchText]); const saveCustomDevices = (newCustomDevices: Device[]) => { setCustomDevices(newCustomDevices); window.electron.store.set('deviceManager.customDevices', newCustomDevices); setFilteredCustomDevices(filterDevices(newCustomDevices, searchText)); }; const onSaveDevice = async (device: Device, isNew: boolean) => { const newCustomDevices = isNew ? [...customDevices, device] : customDevices.map((d) => (d.id === device.id ? device : d)); saveCustomDevices(newCustomDevices); if (isNew) { dispatch( setSuiteDevices({ suite: activeSuite.id, devices: [...activeSuite.devices, device.id], }) ); } }; const onRemoveDevice = (device: Device) => { const newCustomDevices = customDevices.filter((d) => d.id !== device.id); saveCustomDevices(newCustomDevices); dispatch( setSuiteDevices({ suite: activeSuite.id, devices: activeSuite.devices.filter((d) => d !== device.id), }) ); }; const onShowDeviceDetails = (device: Device) => { setSelectedDevice(device); setIsDetailsModalOpen(true); }; return (

Device Manager

Manage Devices

setSearchText(e.target.value)} />
<>
{filteredDevices.map((device) => ( d.id === device.id) != null && devices.length === 1 } /> ))} {filteredDevices.length === 0 ? (
Sorry, no matching devices found.
) : null}
{filteredCustomDevices.map((device) => ( ))} {customDevices.length === 0 ? (
No custom devices added yet!
) : null} {customDevices.length > 0 && filteredCustomDevices.length === 0 ? (
Sorry, no matching devices found.
) : null}
{ setSelectedDevice(undefined); setIsDetailsModalOpen(false); }} device={selectedDevice} onRemoveDevice={onRemoveDevice} />
); }; const DeviceManagerWithDnd = () => ( ); export default DeviceManagerWithDnd; ================================================ FILE: desktop-app/src/renderer/components/Divider/index.tsx ================================================ export const Divider = () =>
; ================================================ FILE: desktop-app/src/renderer/components/DropDown/index.tsx ================================================ import {Menu, Transition} from '@headlessui/react'; import {Float} from '@headlessui-float/react'; import {Icon} from '@iconify/react'; import cx from 'classnames'; import {Fragment} from 'react'; interface Separator { type: 'separator'; } interface Option { type?: 'option'; label: JSX.Element | string; onClick: (() => void) | null; } type OptionOrSeparator = Option | Separator; interface Props { label: JSX.Element | string; options: OptionOrSeparator[]; className?: string | null; } export function DropDown({label, options, className}: Props) { return (
{label}
{options.map((option, idx) => { if (option.type === 'separator') { return (
); } return ( // eslint-disable-next-line react/no-array-index-key {({active}) => option.onClick !== null ? ( ) : (
{option.label}
) }
); })}
); } ================================================ FILE: desktop-app/src/renderer/components/FileUploader/FileUploader.test.tsx ================================================ import {render, fireEvent} from '@testing-library/react'; import {type Mock} from 'vitest'; import {FileUploader, FileUploaderProps} from './FileUploader'; import {useFileUpload} from './hooks'; vi.mock('./hooks'); const mockHandleFileUpload = vi.fn(); const mockHandleUpload = vi.fn(); const mockResetUploadedFile = vi.fn(); describe('FileUploader', () => { beforeEach(() => { (useFileUpload as Mock).mockReturnValue({ uploadedFile: null, handleUpload: mockHandleUpload, resetUploadedFile: mockResetUploadedFile, }); }); const renderComponent = (props?: FileUploaderProps) => render( ); it('renders the component', () => { const {getByTestId} = renderComponent(); const fileInput = getByTestId('fileUploader'); expect(fileInput).toBeInTheDocument(); }); it('calls handleUpload when file input changes', () => { const {getByTestId} = renderComponent(); const fileInput = getByTestId('fileUploader'); fireEvent.change(fileInput, { target: {files: [new File(['content'], 'file.txt')]}, }); expect(mockHandleUpload).toHaveBeenCalled(); }); it('calls handleFileUpload when uploadedFile is set', () => { const mockFile = new File(['content'], 'file.txt'); (useFileUpload as Mock).mockReturnValue({ uploadedFile: mockFile, handleUpload: mockHandleUpload, resetUploadedFile: mockResetUploadedFile, }); renderComponent(); expect(mockHandleFileUpload).toHaveBeenCalledWith(mockFile); }); it('sets the accept attribute correctly', () => { const {getByTestId} = renderComponent({ acceptedFileTypes: 'application/json', handleFileUpload: mockHandleFileUpload, }); const fileInput = getByTestId('fileUploader'); expect(fileInput).toHaveAttribute('accept', 'application/json'); }); it('allows multiple file uploads when multiple prop is true', () => { const {getByTestId} = renderComponent({ multiple: true, handleFileUpload: mockHandleFileUpload, }); const fileInput = getByTestId('fileUploader'); expect(fileInput).toHaveAttribute('multiple'); }); it('does not allow multiple file uploads when multiple prop is false', () => { const {getByTestId} = renderComponent({ multiple: false, handleFileUpload: mockHandleFileUpload, }); const fileInput = getByTestId('fileUploader'); expect(fileInput).not.toHaveAttribute('multiple'); }); }); ================================================ FILE: desktop-app/src/renderer/components/FileUploader/FileUploader.tsx ================================================ import {useEffect, useRef, useState} from 'react'; import {useFileUpload} from './hooks'; export type FileUploaderProps = { handleFileUpload: (file: File) => void; multiple?: boolean; acceptedFileTypes?: string; showFileName?: boolean; initialFileName?: string; }; export const FileUploader = ({ handleFileUpload, multiple, acceptedFileTypes, showFileName = false, initialFileName, }: FileUploaderProps) => { const {uploadedFile, handleUpload, resetUploadedFile} = useFileUpload(); const fileInputRef = useRef(null); const [displayFileName, setDisplayFileName] = useState(null); useEffect(() => { if (uploadedFile) { handleFileUpload(uploadedFile); resetUploadedFile(); if (!showFileName && fileInputRef.current) { fileInputRef.current.value = ''; } } }, [handleFileUpload, resetUploadedFile, uploadedFile, showFileName]); useEffect(() => { if (initialFileName !== undefined) { setDisplayFileName(initialFileName || null); } }, [initialFileName]); const handleButtonClick = () => { fileInputRef.current?.click(); }; const getFileName = () => { if (fileInputRef.current?.files && fileInputRef.current.files.length > 0) { return fileInputRef.current.files[0].name; } return displayFileName; }; const fileName = showFileName ? getFileName() : null; if (showFileName) { return (
{fileName || 'No file chosen'}
); } return (
); }; ================================================ FILE: desktop-app/src/renderer/components/FileUploader/hooks/index.ts ================================================ export {useFileUpload} from './useFileUpload'; ================================================ FILE: desktop-app/src/renderer/components/FileUploader/hooks/useFileUpload.test.tsx ================================================ import {act, renderHook} from '@testing-library/react'; import {useFileUpload} from './useFileUpload'; describe('useFileUpload', () => { it('should initialize with null uploadedFile', () => { const {result} = renderHook(() => useFileUpload()); expect(result.current.uploadedFile).toBeNull(); }); it('should set uploadedFile when handleUpload is called with a file', () => { const {result} = renderHook(() => useFileUpload()); const mockFile = new File(['dummy content'], 'example.png', { type: 'image/png', }); act(() => { result.current.handleUpload({ target: { files: [mockFile], }, } as unknown as React.ChangeEvent); }); expect(result.current.uploadedFile).toEqual(mockFile); }); it('should reset uploadedFile when resetUploadedFile is called', () => { const {result} = renderHook(() => useFileUpload()); const mockFile = new File(['dummy content'], 'example.png', { type: 'image/png', }); act(() => { result.current.handleUpload({ target: { files: [mockFile], }, } as unknown as React.ChangeEvent); }); expect(result.current.uploadedFile).toEqual(mockFile); act(() => { result.current.resetUploadedFile(); }); expect(result.current.uploadedFile).toBeNull(); }); }); ================================================ FILE: desktop-app/src/renderer/components/FileUploader/hooks/useFileUpload.tsx ================================================ import {useState} from 'react'; export const useFileUpload = () => { const [uploadedFile, setUploadedFile] = useState(null); const handleUpload = (event: React.ChangeEvent) => { if (event?.target?.files || event?.target?.files?.length) { setUploadedFile(event.target.files[0]); } }; const resetUploadedFile = () => { setUploadedFile(null); }; return { uploadedFile, handleUpload, resetUploadedFile, }; }; ================================================ FILE: desktop-app/src/renderer/components/FileUploader/index.ts ================================================ export {FileUploader} from './FileUploader'; export {useFileUpload} from './hooks'; ================================================ FILE: desktop-app/src/renderer/components/InfoPopups/index.tsx ================================================ import {useEffect, useState} from 'react'; import {isReleaseNotesUnseen, ReleaseNotes} from '../ReleaseNotes'; import {Sponsorship} from '../Sponsorship'; export const InfoPopups = () => { const [showReleaseNotes, setShowReleaseNotes] = useState(false); const [showSponsorship, setShowSponsorship] = useState(false); useEffect(() => { (async () => { if (await isReleaseNotesUnseen()) { setShowReleaseNotes(true); return; } setShowSponsorship(true); })(); }, []); if (showReleaseNotes) { return ; } if (showSponsorship) { return ; } return null; }; ================================================ FILE: desktop-app/src/renderer/components/Input/index.tsx ================================================ import {useId} from 'react'; import cx from 'classnames'; interface Props { label: string; } const Input = ({ label, ...props }: Props & React.DetailedHTMLProps, HTMLInputElement>) => { const id = useId(); const isCheckbox = props.type === 'checkbox'; return (
); }; export default Input; ================================================ FILE: desktop-app/src/renderer/components/KeyboardShortcutsManager/constants.ts ================================================ export const SHORTCUT_CHANNEL = { BACK: 'BACK', BOOKMARK: 'BOOKMARK', DELETE_ALL: 'DELETE_ALL', DELETE_CACHE: 'DELETE_CACHE', DELETE_COOKIES: 'DELETE_COOKIES', DELETE_STORAGE: 'DELETE_STORAGE', EDIT_URL: 'EDIT_URL', FORWARD: 'FORWARD', INSPECT_ELEMENTS: 'INSPECT_ELEMENTS', PREVIEW_LAYOUT: 'PREVIEW_LAYOUT', RELOAD: 'RELOAD', ROTATE_ALL: 'ROTATE_ALL', SCREENSHOT_ALL: 'SCREENSHOT_ALL', THEME: 'THEME', TOGGLE_RULERS: 'TOGGLE_RULERS', ZOOM_IN: 'ZOOM_IN', ZOOM_OUT: 'ZOOM_OUT', } as const; export type ShortcutChannel = (typeof SHORTCUT_CHANNEL)[keyof typeof SHORTCUT_CHANNEL]; export const SHORTCUT_KEYS: {[key in ShortcutChannel]: string[]} = { [SHORTCUT_CHANNEL.BACK]: ['alt+left'], [SHORTCUT_CHANNEL.BOOKMARK]: ['mod+d'], [SHORTCUT_CHANNEL.DELETE_ALL]: ['mod+alt+del', 'mod+alt+backspace'], [SHORTCUT_CHANNEL.DELETE_CACHE]: ['mod+alt+z'], [SHORTCUT_CHANNEL.DELETE_COOKIES]: ['mod+alt+a'], [SHORTCUT_CHANNEL.DELETE_STORAGE]: ['mod+alt+q'], [SHORTCUT_CHANNEL.EDIT_URL]: ['mod+l'], [SHORTCUT_CHANNEL.FORWARD]: ['alt+right'], [SHORTCUT_CHANNEL.INSPECT_ELEMENTS]: ['mod+i'], [SHORTCUT_CHANNEL.PREVIEW_LAYOUT]: ['mod+shift+l'], [SHORTCUT_CHANNEL.RELOAD]: ['mod+r'], [SHORTCUT_CHANNEL.ROTATE_ALL]: ['mod+alt+r'], [SHORTCUT_CHANNEL.SCREENSHOT_ALL]: ['mod+s'], [SHORTCUT_CHANNEL.THEME]: ['mod+t'], [SHORTCUT_CHANNEL.TOGGLE_RULERS]: ['alt+r'], [SHORTCUT_CHANNEL.ZOOM_IN]: ['mod+=', 'mod++', 'mod+shift+='], [SHORTCUT_CHANNEL.ZOOM_OUT]: ['mod+-'], }; ================================================ FILE: desktop-app/src/renderer/components/KeyboardShortcutsManager/index.tsx ================================================ import {SHORTCUT_KEYS, ShortcutChannel} from './constants'; import useMousetrapEmitter from './useMousetrapEmitter'; const KeyboardShortcutsManager = () => { // eslint-disable-next-line no-restricted-syntax for (const [channel, keys] of Object.entries(SHORTCUT_KEYS)) { // eslint-disable-next-line react-hooks/rules-of-hooks useMousetrapEmitter(keys, channel as ShortcutChannel); } return null; }; export default KeyboardShortcutsManager; ================================================ FILE: desktop-app/src/renderer/components/KeyboardShortcutsManager/useKeyboardShortcut.ts ================================================ import {useEffect} from 'react'; import {ShortcutChannel} from './constants'; import {keyboardShortcutsPubsub} from './useMousetrapEmitter'; const useKeyboardShortcut = (eventChannel: ShortcutChannel, callback: () => void) => { useEffect(() => { keyboardShortcutsPubsub.subscribe(eventChannel, callback); return () => { keyboardShortcutsPubsub.unsubscribe(eventChannel, callback); }; }, [eventChannel, callback]); return null; }; export default useKeyboardShortcut; export * from './constants'; ================================================ FILE: desktop-app/src/renderer/components/KeyboardShortcutsManager/useMousetrapEmitter.ts ================================================ import {useEffect} from 'react'; import Mousetrap from 'mousetrap'; import PubSub from 'renderer/lib/pubsub'; import {ShortcutChannel} from './constants'; export const keyboardShortcutsPubsub = new PubSub(); const useMousetrapEmitter = ( accelerator: string | string[], eventChannel: ShortcutChannel, action?: string | undefined ) => { useEffect(() => { const callback = (_e: Mousetrap.ExtendedKeyboardEvent, _combo: string) => { keyboardShortcutsPubsub.publish(eventChannel).catch((err) => { // eslint-disable-next-line no-console console.error('useMousetrapEmitter: callback: error: ', err); }); }; Mousetrap.bind(accelerator, callback, action); return () => { Mousetrap.unbind(accelerator, action); }; }, [accelerator, eventChannel, action]); return null; }; export default useMousetrapEmitter; ================================================ FILE: desktop-app/src/renderer/components/Modal/index.tsx ================================================ import {Dialog, Transition} from '@headlessui/react'; import {Fragment} from 'react'; interface Props { isOpen: boolean; onClose: () => void; title?: JSX.Element | string; description?: JSX.Element | string; children?: JSX.Element | string; } const Modal = ({isOpen, onClose, title, description, children}: Props) => { return ( ); }; export default Modal; ================================================ FILE: desktop-app/src/renderer/components/ModalLoader/index.tsx ================================================ import Modal from '../Modal'; interface Props { isOpen: boolean; onClose: () => void; title: JSX.Element | string; } const ModalLoader = ({isOpen, onClose, title}: Props) => { return (
Capturing screen...
); }; export default ModalLoader; ================================================ FILE: desktop-app/src/renderer/components/Notifications/Notification.tsx ================================================ import {IPC_MAIN_CHANNELS, Notification as NotificationType} from 'common/constants'; import Button from '../Button'; const Notification = ({notification}: {notification: NotificationType}) => { const handleLinkClick = (url: string) => { window.electron.ipcRenderer.sendMessage(IPC_MAIN_CHANNELS.OPEN_EXTERNAL, { url, }); }; return (

{notification.text}

{notification.link && notification.linkText && ( )}
); }; export default Notification; ================================================ FILE: desktop-app/src/renderer/components/Notifications/NotificationEmptyStatus.tsx ================================================ const NotificationEmptyStatus = () => { return (

You are all caught up! No new notifications at the moment.

); }; export default NotificationEmptyStatus; ================================================ FILE: desktop-app/src/renderer/components/Notifications/Notifications.tsx ================================================ import {useSelector} from 'react-redux'; import {selectNotifications} from 'renderer/store/features/renderer'; import {v4 as uuidv4} from 'uuid'; import {Notification as NotificationType} from 'common/constants'; import Notification from './Notification'; import NotificationEmptyStatus from './NotificationEmptyStatus'; const Notifications = () => { const notificationsState = useSelector(selectNotifications); return (
Notifications
{(!notificationsState || (notificationsState && notificationsState?.length === 0)) && ( )} {notificationsState && notificationsState?.length > 0 && notificationsState?.map((notification: NotificationType) => ( ))}
); }; export default Notifications; ================================================ FILE: desktop-app/src/renderer/components/Notifications/NotificationsBubble.tsx ================================================ const NotificationsBubble = () => { return ( ); }; export default NotificationsBubble; ================================================ FILE: desktop-app/src/renderer/components/Previewer/Device/ColorBlindnessTools/index.tsx ================================================ import {Icon} from '@iconify/react'; import cx from 'classnames'; import {useCallback, useEffect, useState} from 'react'; import {DropDown} from 'renderer/components/DropDown'; import {COLOR_BLINDNESS_CHANNEL} from 'renderer/components/ToolBar/ColorBlindnessControls'; import { BLUE_YELLOW, FULL, RED_GREEN, SIMULATIONS, SUNLIGHT, VISUAL_IMPAIRMENTS, VisionSimulationDropDown, } from 'renderer/components/VisionSimulationDropDown'; import {webViewPubSub} from 'renderer/lib/pubsub'; interface InjectedCss { key: string; css: string; js: string | null; name: string; } interface Props { webview: Electron.WebviewTag | null; } export const ColorBlindnessTools = ({webview}: Props) => { const [injectCss, setInjectCss] = useState(); const reApplyCss = useCallback(async () => { if (webview === null) { return; } if (injectCss === undefined) { return; } const key = await webview.insertCSS(injectCss.css); if (injectCss.js != null) { await webview.executeJavaScript(injectCss.js); } setInjectCss({...injectCss, key}); }, [webview, injectCss, setInjectCss]); const applyCss = useCallback( async (debugType: string, css: string, js: string | null = null) => { if (webview === null) { return; } if (css === undefined) { return; } if (injectCss !== undefined) { if (injectCss.name === debugType) { return; } if (injectCss.js !== null) { webview.reload(); } await webview.removeInsertedCSS(injectCss.key); setInjectCss(undefined); } try { const key = await webview.insertCSS(css); if (js !== null) { await webview.executeJavaScript(js); } setInjectCss({key, css, name: debugType, js}); } catch (error) { // eslint-disable-next-line no-console console.error('Error inserting css', error); // dispatch(setCss(undefined)); setInjectCss(undefined); } }, [setInjectCss, webview, injectCss] ); const clearSimulation = useCallback(async () => { if (webview === null) { return; } if (injectCss === undefined) { return; } await webview.removeInsertedCSS(injectCss.key); setInjectCss(undefined); }, [webview, injectCss, setInjectCss]); useEffect(() => { if (webview === null) { return () => {}; } const handler = async () => { reApplyCss(); }; webview.addEventListener('did-navigate', handler); return () => { webview.removeEventListener('did-navigate', handler); }; }, [webview, reApplyCss]); const applyColorDeficiency = useCallback( async (colorDeficiency: string) => { const xsltPath = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgdmVyc2lvbj0iMS4xIj4KICA8ZGVmcz4KICAgIDxmaWx0ZXIgaWQ9InByb3Rhbm9waWEiPgogICAgICA8ZmVDb2xvck1hdHJpeAogICAgICAgIGluPSJTb3VyY2VHcmFwaGljIgogICAgICAgIHR5cGU9Im1hdHJpeCIKICAgICAgICB2YWx1ZXM9IjAuNTY3LCAwLjQzMywgMCwgICAgIDAsIDAKICAgICAgICAgICAgICAgIDAuNTU4LCAwLjQ0MiwgMCwgICAgIDAsIDAKICAgICAgICAgICAgICAgIDAsICAgICAwLjI0MiwgMC43NTgsIDAsIDAKICAgICAgICAgICAgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDEsIDAiLz4KICAgIDwvZmlsdGVyPgogICAgPGZpbHRlciBpZD0icHJvdGFub21hbHkiPgogICAgICA8ZmVDb2xvck1hdHJpeAogICAgICAgIGluPSJTb3VyY2VHcmFwaGljIgogICAgICAgIHR5cGU9Im1hdHJpeCIKICAgICAgICB2YWx1ZXM9IjAuODE3LCAwLjE4MywgMCwgICAgIDAsIDAKICAgICAgICAgICAgICAgIDAuMzMzLCAwLjY2NywgMCwgICAgIDAsIDAKICAgICAgICAgICAgICAgIDAsICAgICAwLjEyNSwgMC44NzUsIDAsIDAKICAgICAgICAgICAgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDEsIDAiLz4KICAgIDwvZmlsdGVyPgogICAgPGZpbHRlciBpZD0iZGV1dGVyYW5vcGlhIj4KICAgICAgPGZlQ29sb3JNYXRyaXgKICAgICAgICBpbj0iU291cmNlR3JhcGhpYyIKICAgICAgICB0eXBlPSJtYXRyaXgiCiAgICAgICAgdmFsdWVzPSIwLjYyNSwgMC4zNzUsIDAsICAgMCwgMAogICAgICAgICAgICAgICAgMC43LCAgIDAuMywgICAwLCAgIDAsIDAKICAgICAgICAgICAgICAgIDAsICAgICAwLjMsICAgMC43LCAwLCAwCiAgICAgICAgICAgICAgICAwLCAgICAgMCwgICAgIDAsICAgMSwgMCIvPgogICAgPC9maWx0ZXI+CiAgICA8ZmlsdGVyIGlkPSJkZXV0ZXJhbm9tYWx5Ij4KICAgICAgPGZlQ29sb3JNYXRyaXgKICAgICAgICBpbj0iU291cmNlR3JhcGhpYyIKICAgICAgICB0eXBlPSJtYXRyaXgiCiAgICAgICAgdmFsdWVzPSIwLjgsICAgMC4yLCAgIDAsICAgICAwLCAwCiAgICAgICAgICAgICAgICAwLjI1OCwgMC43NDIsIDAsICAgICAwLCAwCiAgICAgICAgICAgICAgICAwLCAgICAgMC4xNDIsIDAuODU4LCAwLCAwCiAgICAgICAgICAgICAgICAwLCAgICAgMCwgICAgIDAsICAgICAxLCAwIi8+CiAgICA8L2ZpbHRlcj4KICAgIDxmaWx0ZXIgaWQ9InRyaXRhbm9waWEiPgogICAgICA8ZmVDb2xvck1hdHJpeAogICAgICAgIGluPSJTb3VyY2VHcmFwaGljIgogICAgICAgIHR5cGU9Im1hdHJpeCIKICAgICAgICB2YWx1ZXM9IjAuOTUsIDAuMDUsICAwLCAgICAgMCwgMAogICAgICAgICAgICAgICAgMCwgICAgMC40MzMsIDAuNTY3LCAwLCAwCiAgICAgICAgICAgICAgICAwLCAgICAwLjQ3NSwgMC41MjUsIDAsIDAKICAgICAgICAgICAgICAgIDAsICAgIDAsICAgICAwLCAgICAgMSwgMCIvPgogICAgPC9maWx0ZXI+CiAgICA8ZmlsdGVyIGlkPSJ0cml0YW5vbWFseSI+CiAgICAgIDxmZUNvbG9yTWF0cml4CiAgICAgICAgaW49IlNvdXJjZUdyYXBoaWMiCiAgICAgICAgdHlwZT0ibWF0cml4IgogICAgICAgIHZhbHVlcz0iMC45NjcsIDAuMDMzLCAwLCAgICAgMCwgMAogICAgICAgICAgICAgICAgMCwgICAgIDAuNzMzLCAwLjI2NywgMCwgMAogICAgICAgICAgICAgICAgMCwgICAgIDAuMTgzLCAwLjgxNywgMCwgMAogICAgICAgICAgICAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMSwgMCIvPgogICAgPC9maWx0ZXI+CiAgICA8ZmlsdGVyIGlkPSJhY2hyb21hdG9wc2lhIj4KICAgICAgPGZlQ29sb3JNYXRyaXgKICAgICAgICBpbj0iU291cmNlR3JhcGhpYyIKICAgICAgICB0eXBlPSJtYXRyaXgiCiAgICAgICAgdmFsdWVzPSIwLjI5OSwgMC41ODcsIDAuMTE0LCAwLCAwCiAgICAgICAgICAgICAgICAwLjI5OSwgMC41ODcsIDAuMTE0LCAwLCAwCiAgICAgICAgICAgICAgICAwLjI5OSwgMC41ODcsIDAuMTE0LCAwLCAwCiAgICAgICAgICAgICAgICAwLCAgICAgMCwgICAgIDAsICAgICAxLCAwIi8+CiAgICA8L2ZpbHRlcj4KICAgIDxmaWx0ZXIgaWQ9ImFjaHJvbWF0b21hbHkiPgogICAgICA8ZmVDb2xvck1hdHJpeAogICAgICAgIGluPSJTb3VyY2VHcmFwaGljIgogICAgICAgIHR5cGU9Im1hdHJpeCIKICAgICAgICB2YWx1ZXM9IjAuNjE4LCAwLjMyMCwgMC4wNjIsIDAsIDAKICAgICAgICAgICAgICAgIDAuMTYzLCAwLjc3NSwgMC4wNjIsIDAsIDAKICAgICAgICAgICAgICAgIDAuMTYzLCAwLjMyMCwgMC41MTYsIDAsIDAKICAgICAgICAgICAgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDEsIDAiLz4KICAgIDwvZmlsdGVyPgogIDwvZGVmcz4KPC9zdmc+Cg=='; const css = ` body { -webkit-filter: url('${xsltPath}#${colorDeficiency}'); filter: url('${xsltPath}#${colorDeficiency}'); } `; return applyCss(colorDeficiency, css); }, [applyCss] ); const applySunlight = useCallback( async (condition: string) => { const css = 'body {backdrop-filter: brightness(0.5) !important;}'; return applyCss(condition, css); }, [applyCss] ); const applyVisualImpairment = useCallback( async (visualImpairment: string) => { const blur = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPgo8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgICA8ZmlsdGVyIGlkPSJnYXVzc2lhbl9ibHVyIj4KICAgICAgICAgICAgPGZlR2F1c3NpYW5CbHVyIGluPSJTb3VyY2VHcmFwaGljIiBzdGREZXZpYXRpb249IjEwIiAvPgogICAgICAgIDwvZmlsdGVyPgogICAgPC9kZWZzPgo8L3N2Zz4='; const impairments: {[key: string]: string} = { [SIMULATIONS.CATARACT]: `body { -webkit-filter: url('${blur}#gaussian_blur'); filter: url('${blur}#gaussian_blur'); }`, [SIMULATIONS.GLAUCOME]: `#bigoverlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; } #spotlight { border-radius: 50%; width: 300vmax; height: 300vmax; box-shadow: 0 0 5vmax 110vmax inset black; position: absolute; z-index: -1; left: -75vmax; top: -75vmax; }`, [SIMULATIONS.FAR]: `body { filter: blur(2px); }`, [SIMULATIONS.COLOR_CONTRAST_LOSS]: `body { filter: grayscale(0.5) contrast(0.8); }`, }; const css = impairments[visualImpairment.toLowerCase()]; let js = null; if (visualImpairment.toLowerCase() === SIMULATIONS.GLAUCOME) { js = String(`var div = document.createElement('div'); div.innerHTML ='
'; var body = document.body; body.appendChild(div); function handleMouseMove(){ var eventDoc, doc, body; eventDoc = (event.target && event.target.ownerDocument) || document; doc = eventDoc.documentElement; body = eventDoc.body; event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0 ); const spotlight = document.getElementById("spotlight"); const boundingRect = spotlight.getBoundingClientRect(); spotlight.style.left = (event.pageX - boundingRect.width / 2) + "px" spotlight.style.top = (event.pageY - boundingRect.height / 2) + "px" };document.onmousemove = handleMouseMove;0`); } return applyCss(visualImpairment, css, js); }, [applyCss] ); const applySimulation = useCallback( async (simulation = '') => { if ( RED_GREEN.indexOf(simulation) !== -1 || BLUE_YELLOW.indexOf(simulation) !== -1 || FULL.indexOf(simulation) !== -1 ) { return applyColorDeficiency(simulation); } if (VISUAL_IMPAIRMENTS.indexOf(simulation) !== -1) { return applyVisualImpairment(simulation); } if (SUNLIGHT.indexOf(simulation) !== -1) { return applySunlight(simulation); } return clearSimulation(); }, [applyColorDeficiency, applyVisualImpairment, applySunlight, clearSimulation] ); useEffect(() => { const handler = ({simulationName}: {simulationName: string}) => { applySimulation(simulationName); }; webViewPubSub.subscribe(COLOR_BLINDNESS_CHANNEL, handler); return () => { webViewPubSub.unsubscribe(COLOR_BLINDNESS_CHANNEL, handler); }; }, [applySimulation]); return ; }; ================================================ FILE: desktop-app/src/renderer/components/Previewer/Device/DesignOverlay/index.test.tsx ================================================ import {render, screen, fireEvent} from '@testing-library/react'; import {Provider} from 'react-redux'; import {configureStore} from '@reduxjs/toolkit'; import designOverlayReducer from 'renderer/store/features/design-overlay'; import rulersReducer, {Coordinates} from 'renderer/store/features/ruler'; import DesignOverlay from './index'; // Mock GuideGrid component vi.mock('../../Guides', () => ({ __esModule: true, default: () =>
GuideGrid
, })); const mockCoordinates: Coordinates = { deltaX: 0, deltaY: 0, scrollX: 0, scrollY: 0, innerWidth: 390, innerHeight: 844, }; const createStore = (overlayState = {}) => configureStore({ reducer: { designOverlay: designOverlayReducer, rulers: rulersReducer, }, preloadedState: { designOverlay: overlayState, rulers: { '390x844': { isRulerEnabled: false, rulerCoordinates: mockCoordinates, }, }, }, }); const renderWithRedux = (component: React.ReactElement, overlayState = {}) => { const store = createStore(overlayState); return render({component}); }; describe('DesignOverlay', () => { const defaultProps = { resolution: '390x844', scaledWidth: 390, scaledHeight: 844, zoomFactor: 1, coordinates: mockCoordinates, position: 'overlay' as const, rulerMargin: 0, width: 390, height: 844, }; it('does not render when overlay is disabled', () => { renderWithRedux( ); expect(screen.queryByAltText('Design overlay')).not.toBeInTheDocument(); }); it('does not render when no image is set', () => { const overlayState = { '390x844': { image: '', opacity: 50, position: 'overlay' as const, enabled: true, }, }; renderWithRedux( , overlayState ); expect(screen.queryByAltText('Design overlay')).not.toBeInTheDocument(); }); it('renders image when overlay is enabled', () => { const overlayState = { '390x844': { image: 'data:image/png;base64,test', opacity: 50, position: 'overlay' as const, enabled: true, }, }; renderWithRedux( , overlayState ); const image = screen.getByAltText('Design overlay'); expect(image).toBeInTheDocument(); expect(image).toHaveStyle({opacity: '0.5'}); }); it('applies correct opacity in overlay mode', () => { const overlayState = { '390x844': { image: 'data:image/png;base64,test', opacity: 75, position: 'overlay' as const, enabled: true, }, }; renderWithRedux( , overlayState ); const image = screen.getByAltText('Design overlay'); expect(image).toHaveStyle({opacity: '0.75'}); }); it('applies 100% opacity in side mode', () => { const overlayState = { '390x844': { image: 'data:image/png;base64,test', opacity: 50, position: 'side' as const, enabled: true, }, }; renderWithRedux( , overlayState ); const image = screen.getByAltText('Design overlay'); expect(image).toHaveStyle({opacity: '1'}); }); it('shows GuideGrid only in side mode', () => { const overlayState = { '390x844': { image: 'data:image/png;base64,test', opacity: 50, position: 'side' as const, enabled: true, }, }; renderWithRedux( , overlayState ); expect(screen.getByTestId('guide-grid')).toBeInTheDocument(); }); it('does not show GuideGrid in overlay mode', () => { const overlayState = { '390x844': { image: 'data:image/png;base64,test', opacity: 50, position: 'overlay' as const, enabled: true, }, }; renderWithRedux( , overlayState ); expect(screen.queryByTestId('guide-grid')).not.toBeInTheDocument(); }); it('renders divider line in overlay mode', () => { const overlayState = { '390x844': { image: 'data:image/png;base64,test', opacity: 50, position: 'overlay' as const, enabled: true, }, }; const {container} = renderWithRedux( , overlayState ); const divider = container.querySelector('[style*="cursor: col-resize"]'); expect(divider).toBeInTheDocument(); }); it('applies clip-path based on divider position in overlay mode', () => { const overlayState = { '390x844': { image: 'data:image/png;base64,test', opacity: 50, position: 'overlay' as const, enabled: true, }, }; renderWithRedux( , overlayState ); const image = screen.getByAltText('Design overlay'); expect(image).toHaveStyle({clipPath: 'none'}); }); it('allows dragging the divider line', () => { const overlayState = { '390x844': { image: 'data:image/png;base64,test', opacity: 50, position: 'overlay' as const, enabled: true, }, }; const {container} = renderWithRedux( , overlayState ); const divider = container.querySelector('[style*="cursor: col-resize"]'); expect(divider).toBeInTheDocument(); expect(divider).not.toBeNull(); expect(divider).not.toBeNull(); fireEvent.mouseDown(divider!); expect(document.body.style.cursor).toBe('col-resize'); }); it('applies scroll synchronization with zoomFactor', () => { const overlayState = { '390x844': { image: 'data:image/png;base64,test', opacity: 50, position: 'overlay' as const, enabled: true, }, }; // Use values that allow scrolling: innerWidth/Height must be greater than the viewport // With zoomFactor 0.5: viewportWidth = 390/0.5 = 780, viewportHeight = 844/0.5 = 1688 // We need innerWidth > 780 and innerHeight > 1688 for scrolling to be available const coordinatesWithScroll: Coordinates = { deltaX: 0, deltaY: 0, scrollX: 100, scrollY: 200, innerWidth: 1000, innerHeight: 2000, }; renderWithRedux( , overlayState ); const image = screen.getByAltText('Design overlay'); // scrollX * zoomFactor = 100 * 0.5 = 50 // scrollY * zoomFactor = 200 * 0.5 = 100 const {transform} = image.style; expect(transform).toContain('-50px'); expect(transform).toContain('-100px'); }); }); ================================================ FILE: desktop-app/src/renderer/components/Previewer/Device/DesignOverlay/index.tsx ================================================ import {useEffect, useRef, useState, useCallback} from 'react'; import {useSelector} from 'react-redux'; import type {RootState} from 'renderer/store'; import {DesignOverlayPosition, selectDesignOverlay} from 'renderer/store/features/design-overlay'; import {Coordinates, selectRulerEnabled} from 'renderer/store/features/ruler'; import GuideGrid from '../../Guides'; interface Props { resolution: string; scaledWidth: number; scaledHeight: number; zoomFactor: number; coordinates: Coordinates; position: DesignOverlayPosition; rulerMargin: number; width: number; height: number; } const DesignOverlay = ({ resolution, scaledWidth, scaledHeight, zoomFactor, coordinates, position, rulerMargin, width, height, }: Props) => { const overlayRef = useRef(null); const imageRef = useRef(null); const dividerRef = useRef(null); const overlay = useSelector((state: RootState) => selectDesignOverlay(state)(resolution)); const rulerEnabled = useSelector(selectRulerEnabled); const isOverlayMode = position === 'overlay'; const [dividerPosition, setDividerPosition] = useState(0); const [isDragging, setIsDragging] = useState(false); // Handler to drag the divider line const handleMouseDown = useCallback( (e: React.MouseEvent) => { if (!isOverlayMode) return; e.preventDefault(); setIsDragging(true); }, [isOverlayMode] ); // Handler to move the mouse over the entire overlay when dragging const handleOverlayMouseMove = useCallback( (e: React.MouseEvent) => { if (!isDragging || !isOverlayMode || !overlayRef.current) return; e.preventDefault(); e.stopPropagation(); const rect = overlayRef.current.getBoundingClientRect(); const x = e.clientX - rect.left; const percentage = Math.max(0, Math.min(100, (x / rect.width) * 100)); setDividerPosition(percentage); }, [isDragging, isOverlayMode] ); const handleOverlayMouseUp = useCallback(() => { setIsDragging(false); }, []); // Add global listeners to capture events when the mouse leaves the overlay useEffect(() => { if (!isDragging) return undefined; const handleGlobalMouseMove = (e: MouseEvent) => { if (!isDragging || !isOverlayMode || !overlayRef.current) return; e.preventDefault(); e.stopPropagation(); const rect = overlayRef.current.getBoundingClientRect(); const x = e.clientX - rect.left; // Calculate percentage, limiting when outside the area let percentage: number; if (x < 0) { percentage = 0; } else if (x > rect.width) { percentage = 100; } else { percentage = (x / rect.width) * 100; percentage = Math.max(0, Math.min(100, percentage)); } setDividerPosition(percentage); }; const handleGlobalMouseUp = () => { setIsDragging(false); }; // Add global listeners for when the mouse leaves the overlay window.addEventListener('mousemove', handleGlobalMouseMove, { capture: true, passive: false, }); window.addEventListener('mouseup', handleGlobalMouseUp, {capture: true}); document.body.style.cursor = 'col-resize'; document.body.style.userSelect = 'none'; return () => { window.removeEventListener('mousemove', handleGlobalMouseMove, { capture: true, }); window.removeEventListener('mouseup', handleGlobalMouseUp, { capture: true, }); document.body.style.cursor = ''; document.body.style.userSelect = ''; }; }, [isDragging, isOverlayMode]); useEffect(() => { if (!overlay?.enabled || !overlay.image || !imageRef.current) { if (imageRef.current) { imageRef.current.style.transform = 'translate(0px, 0px)'; } return; } const scrollY = coordinates.scrollY || 0; const scrollX = coordinates.scrollX || 0; const viewportHeight = scaledHeight / zoomFactor; const viewportWidth = scaledWidth / zoomFactor; const maxScrollY = Math.max(0, coordinates.innerHeight - viewportHeight); const maxScrollX = Math.max(0, coordinates.innerWidth - viewportWidth); // Clamp scroll position to prevent scrolling beyond content const clampedScrollY = Math.max(0, Math.min(scrollY, maxScrollY)); const clampedScrollX = Math.max(0, Math.min(scrollX, maxScrollX)); // Scale scroll positions by zoomFactor to match the scaled image dimensions // The webview has (width x height) dimensions, but the image is scaled (scaledWidth x scaledHeight) if (imageRef.current) { imageRef.current.style.transform = `translate(${-clampedScrollX * zoomFactor}px, ${ -clampedScrollY * zoomFactor }px)`; // Apply clip-path to hide the right part of the image based on the divider position // Only apply clip-path when dragging or when divider has been moved from initial position if (isOverlayMode) { if (dividerPosition === 0 && !isDragging) { imageRef.current.style.clipPath = 'none'; } else { imageRef.current.style.clipPath = `inset(0 ${100 - dividerPosition}% 0 0)`; } } else { imageRef.current.style.clipPath = 'none'; } } }, [ coordinates, scaledHeight, scaledWidth, zoomFactor, overlay?.enabled, overlay?.image, isOverlayMode, dividerPosition, isDragging, ]); if (!overlay?.enabled || !overlay.image) { return null; } const isSideMode = position === 'side'; const opacity = isSideMode ? 1 : overlay.opacity / 100; const hasRuler = rulerEnabled(resolution); const marginLeft = isOverlayMode ? rulerMargin : scaledWidth + rulerMargin + 30; const marginTop = rulerMargin; const containerStyle: React.CSSProperties = isOverlayMode ? { position: 'absolute', top: marginTop, left: marginLeft, height: scaledHeight, width: scaledWidth, // When dragging, allow events on the entire overlay pointerEvents: isDragging ? 'auto' : 'none', zIndex: 10, overflow: 'hidden', cursor: isDragging ? 'col-resize' : 'default', } : { height: hasRuler ? scaledHeight + 30 : scaledHeight, width: hasRuler ? scaledWidth + 30 : scaledWidth, }; const containerClassName = isOverlayMode ? '' : 'relative origin-top-left overflow-hidden bg-white'; return ( // eslint-disable-next-line jsx-a11y/no-static-element-interactions
{isSideMode && ( )}
Design overlay
{/* Draggable divider line only in overlay mode */} {isOverlayMode && (
{/* Visual line - always visible with 60% opacity */}
)}
); }; export default DesignOverlay; ================================================ FILE: desktop-app/src/renderer/components/Previewer/Device/DesignOverlayControls/index.test.tsx ================================================ import {render, screen, fireEvent, waitFor} from '@testing-library/react'; import {Provider} from 'react-redux'; import {configureStore} from '@reduxjs/toolkit'; import designOverlayReducer from 'renderer/store/features/design-overlay'; import type {Device} from 'common/deviceList'; import {type Mock} from 'vitest'; import DesignOverlayControls from './index'; // Mock electron.store const mockStore = { get: vi.fn(), set: vi.fn(), }; beforeEach(() => { vi.clearAllMocks(); (window.electron.store.get as Mock) = mockStore.get; (window.electron.store.set as Mock) = mockStore.set; mockStore.get.mockReturnValue({}); }); // Mock FileUploader component vi.mock('renderer/components/FileUploader', () => ({ FileUploader: ({handleFileUpload}: {handleFileUpload: (file: File) => void}) => (
{ const file = (e.target as HTMLInputElement).files?.[0]; if (file) handleFileUpload(file); }} />
), })); // Mock Modal component vi.mock('renderer/components/Modal', () => ({ __esModule: true, default: ({isOpen, onClose, title, children}: any) => isOpen ? (

{title}

{children}
) : null, })); // Mock Button component vi.mock('renderer/components/Button', () => ({ __esModule: true, default: ({children, onClick, isPrimary, isTextButton}: any) => ( ), })); const mockDevice: Device = { id: '10019', type: 'phone', dpr: 3, capabilities: ['touch', 'mobile'], isTouchCapable: true, isMobileCapable: true, name: 'iPhone 13', width: 390, height: 844, userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1', }; const createStore = (initialState = {}) => configureStore({ reducer: { designOverlay: designOverlayReducer, }, preloadedState: { designOverlay: initialState, }, }); const renderWithRedux = (component: React.ReactElement, initialState = {}) => { const store = createStore(initialState); return { ...render({component}), store, }; }; describe('DesignOverlayControls', () => { const mockOnClose = vi.fn(); beforeEach(() => { mockOnClose.mockClear(); }); it('renders modal when isOpen is true', () => { renderWithRedux(); expect(screen.getByTestId('modal')).toBeInTheDocument(); expect(screen.getByText('Design Overlay Settings')).toBeInTheDocument(); }); it('does not render modal when isOpen is false', () => { renderWithRedux( ); expect(screen.queryByTestId('modal')).not.toBeInTheDocument(); }); it('calls onClose when cancel button is clicked', () => { renderWithRedux(); const cancelButton = screen.getByText('Cancel'); fireEvent.click(cancelButton); expect(mockOnClose).toHaveBeenCalledTimes(1); }); it('shows opacity slider when image is uploaded', async () => { const {store} = renderWithRedux( ); const fileInput = screen.getByTestId('file-input'); const mockFile = new File(['dummy'], 'test.png', {type: 'image/png'}); fireEvent.change(fileInput, {target: {files: [mockFile]}}); await waitFor(() => { expect(screen.getByRole('slider')).toBeInTheDocument(); }); }); it('updates opacity when slider is moved', async () => { const {store} = renderWithRedux( ); const fileInput = screen.getByTestId('file-input'); const mockFile = new File(['dummy'], 'test.png', {type: 'image/png'}); fireEvent.change(fileInput, {target: {files: [mockFile]}}); await waitFor(() => { const opacitySlider = screen.getByRole('slider'); expect(opacitySlider).toBeInTheDocument(); fireEvent.change(opacitySlider, {target: {value: '75'}}); expect(opacitySlider).toHaveValue('75'); }); }); it('saves overlay when save button is clicked', async () => { const {store} = renderWithRedux( ); const fileInput = screen.getByTestId('file-input'); const mockFile = new File(['dummy'], 'test.png', {type: 'image/png'}); fireEvent.change(fileInput, {target: {files: [mockFile]}}); await waitFor(() => { const saveButton = screen.getByText('Save'); fireEvent.click(saveButton); const state = store.getState(); const overlay = state.designOverlay['390x844']; expect(overlay).toBeDefined(); expect(overlay?.enabled).toBe(true); expect(mockOnClose).toHaveBeenCalled(); }); }); it('removes overlay when remove button is clicked', async () => { const initialState = { '390x844': { image: 'data:image/png;base64,test', opacity: 50, position: 'overlay' as const, enabled: true, }, }; const {store} = renderWithRedux( , initialState ); await waitFor(() => { const removeButton = screen.getByText('Remove'); fireEvent.click(removeButton); const state = store.getState(); expect(state.designOverlay['390x844']).toBeUndefined(); expect(mockOnClose).toHaveBeenCalled(); }); }); }); ================================================ FILE: desktop-app/src/renderer/components/Previewer/Device/DesignOverlayControls/index.tsx ================================================ import {Icon} from '@iconify/react'; import type {Device} from 'common/deviceList'; import {useEffect, useState} from 'react'; import {useDispatch, useSelector} from 'react-redux'; import Button from 'renderer/components/Button'; import {FileUploader} from 'renderer/components/FileUploader'; import Modal from 'renderer/components/Modal'; import type {RootState} from 'renderer/store'; import { DesignOverlayPosition, removeDesignOverlay, selectDesignOverlay, setDesignOverlay, } from 'renderer/store/features/design-overlay'; interface Props { device: Device; isOpen: boolean; onClose: () => void; } const DesignOverlayControls = ({device, isOpen, onClose}: Props) => { const dispatch = useDispatch(); const resolution = `${device.width}x${device.height}`; const existingOverlay = useSelector((state: RootState) => selectDesignOverlay(state)(resolution)); const [image, setImage] = useState(existingOverlay?.image || ''); const [fileName, setFileName] = useState(existingOverlay?.fileName || ''); const [opacity, setOpacity] = useState(existingOverlay?.opacity ?? 50); const [position, setPosition] = useState( existingOverlay?.position || 'overlay' ); const [enabled, setEnabled] = useState(existingOverlay?.enabled ?? false); useEffect(() => { if (existingOverlay) { setImage(existingOverlay.image); setFileName(existingOverlay.fileName || ''); setOpacity(existingOverlay.opacity); setPosition(existingOverlay.position); setEnabled(existingOverlay.enabled); } }, [existingOverlay]); const handleFileUpload = (file: File) => { if (!file.type.startsWith('image/')) { // eslint-disable-next-line no-console console.error('File is not an image'); return; } setFileName(file.name); const reader = new FileReader(); reader.onloadend = () => { const base64String = reader.result as string; setImage(base64String); }; reader.readAsDataURL(file); }; const handleSave = () => { if (!image) { return; } dispatch( setDesignOverlay({ resolution, overlayState: { image, opacity, position, enabled: true, fileName, }, }) ); onClose(); }; const handleRemove = () => { dispatch(removeDesignOverlay({resolution})); setImage(''); setFileName(''); setOpacity(50); setPosition('overlay'); setEnabled(false); onClose(); }; const handleToggleEnabled = () => { if (!image) { return; } const newEnabled = !enabled; setEnabled(newEnabled); dispatch( setDesignOverlay({ resolution, overlayState: { image, opacity, position, enabled: newEnabled, fileName, }, }) ); }; return (
{/* File Uploader */}
Upload Design Image
{image && ( <> {/* Opacity slider */}
Opacity: {opacity}
setOpacity(parseInt(e.target.value, 10))} className="h-2 w-full cursor-pointer appearance-none rounded-lg bg-slate-300 dark:bg-slate-600" />
{/* Position Selector */}
Position
{/* Enable Toggle */}
{/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}
)} {/* Action Buttons */}
{image && ( )} {image && ( )}
); }; export default DesignOverlayControls; ================================================ FILE: desktop-app/src/renderer/components/Previewer/Device/Toolbar.tsx ================================================ import {Icon} from '@iconify/react'; import {useState} from 'react'; import Button from 'renderer/components/Button'; import useSound from 'use-sound'; import {ScreenshotArgs, ScreenshotResult} from 'main/screenshot'; import {Device} from 'common/deviceList'; import WebPage from 'main/screenshot/webpage'; import screenshotSfx from 'renderer/assets/sfx/screenshot.mp3'; import {updateWebViewHeightAndScale} from 'common/webViewUtils'; import {ColorBlindnessTools} from './ColorBlindnessTools'; import DesignOverlayControls from './DesignOverlayControls'; interface Props { webview: Electron.WebviewTag | null; device: Device; setScreenshotInProgress: (value: boolean) => void; openDevTools: () => void; toggleRuler: () => void; onRotate: (state: boolean) => void; onIndividualLayoutHandler: (device: Device) => void; isIndividualLayout: boolean; isDeviceRotationEnabled: boolean; } const Toolbar = ({ webview, device, setScreenshotInProgress, openDevTools, toggleRuler, onRotate, onIndividualLayoutHandler, isIndividualLayout, isDeviceRotationEnabled, }: Props) => { const [eventMirroringOff, setEventMirroringOff] = useState(false); const [playScreenshotDone] = useSound(screenshotSfx, {volume: 0.5}); const [screenshotLoading, setScreenshotLoading] = useState(false); const [fullScreenshotLoading, setFullScreenshotLoading] = useState(false); const [rotated, setRotated] = useState(false); const [isDesignOverlayModalOpen, setIsDesignOverlayModalOpen] = useState(false); const refreshView = () => { if (webview) { webview.reload(); } }; const toggleEventMirroring = async () => { if (webview === null) { return; } try { await webview.executeJavaScript( ` if(window.___browserSync___){ window.___browserSync___.socket.${eventMirroringOff ? 'open' : 'close'}() } true ` ); setEventMirroringOff(!eventMirroringOff); } catch (error) { // eslint-disable-next-line no-console console.error('Error while toggleing event mirroring', error); } }; const quickScreenshot = async () => { if (webview === null) { return; } setScreenshotLoading(true); try { await window.electron.ipcRenderer.invoke('screenshot', { webContentsId: webview.getWebContentsId(), device, }); playScreenshotDone(); } catch (error) { // eslint-disable-next-line no-console console.error('Error while taking quick screenshot', error); } setScreenshotLoading(false); }; const fullScreenshot = async () => { if (webview === null) { return; } setFullScreenshotLoading(true); try { const webviewTag = window.document.getElementById(device.name); if (webviewTag === null) { return; } setScreenshotInProgress(true); const webPage = new WebPage(webview as unknown as Electron.WebContents); const pageHeight = await webPage.getPageHeight(); const previousHeight = webviewTag.style.height; const previousTransform = webviewTag.style.transform; updateWebViewHeightAndScale(webviewTag, pageHeight); await new Promise((resolve) => setTimeout(resolve, 1000)); await window.electron.ipcRenderer.invoke('screenshot', { webContentsId: webview.getWebContentsId(), device, }); webviewTag.style.height = previousHeight; webviewTag.style.transform = previousTransform; setScreenshotInProgress(false); playScreenshotDone(); } catch (error) { // eslint-disable-next-line no-console console.error('Error while taking full screenshot', error); } setFullScreenshotLoading(false); }; const toggleRulers = async () => { if (webview === null) { return; } toggleRuler(); }; const rotate = async () => { setRotated(!rotated); onRotate(!rotated); }; const scrollToTop = () => { if (webview) { webview.executeJavaScript('window.scrollTo({ top: 0, behavior: "smooth" })', false); } }; return (
setIsDesignOverlayModalOpen(false)} />
); }; export default Toolbar; ================================================ FILE: desktop-app/src/renderer/components/Previewer/Device/assets.ts ================================================ export const grid = (size: number) => `body:after{background-image:linear-gradient(to right,rgb(203 213 225) 1px,transparent 1px),linear-gradient(to bottom,rgb(203 213 225) 1px,transparent 1px);background-size:${size}rem ${size}rem;background-position:center center;position:absolute;top:0;bottom:0;left:0;display:block;right:0;height:400%;width:100%;z-index:1;content:"";pointer-events:none;opacity:.5}`; export const layout = `body{outline:1px solid #2980b9!important}article{outline:1px solid #3498db!important}nav{outline:1px solid #0088c3!important}aside{outline:1px solid #33a0ce!important}section{outline:1px solid #66b8da!important}header{outline:1px solid #99cfe7!important}footer{outline:1px solid #cce7f3!important}h1{outline:1px solid #162544!important}h2{outline:1px solid #314e6e!important}h3{outline:1px solid #3e5e85!important}h4{outline:1px solid #449baf!important}h5{outline:1px solid #c7d1cb!important}h6{outline:1px solid #4371d0!important}main{outline:1px solid #2f4f90!important}address{outline:1px solid #1a2c51!important}div{outline:1px solid #036cdb!important}p{outline:1px solid #ac050b!important}hr{outline:1px solid #ff063f!important}pre{outline:1px solid #850440!important}blockquote{outline:1px solid #f1b8e7!important}ol{outline:1px solid #ff050c!important}ul{outline:1px solid #d90416!important}li{outline:1px solid #d90416!important}dl{outline:1px solid #fd3427!important}dt{outline:1px solid #ff0043!important}dd{outline:1px solid #e80174!important}figure{outline:1px solid #f0b!important}figcaption{outline:1px solid #bf0032!important}table{outline:1px solid #0c9!important}caption{outline:1px solid #37ffc4!important}thead{outline:1px solid #98daca!important}tbody{outline:1px solid #64a7a0!important}tfoot{outline:1px solid #22746b!important}tr{outline:1px solid #86c0b2!important}th{outline:1px solid #a1e7d6!important}td{outline:1px solid #3f5a54!important}col{outline:1px solid #6c9a8f!important}colgroup{outline:1px solid #6c9a9d!important}button{outline:1px solid #da8301!important}datalist{outline:1px solid #c06000!important}fieldset{outline:1px solid #d95100!important}form{outline:1px solid #d23600!important}input{outline:1px solid #fca600!important}keygen{outline:1px solid #b31e00!important}label{outline:1px solid #ee8900!important}legend{outline:1px solid #de6d00!important}meter{outline:1px solid #e8630c!important}optgroup{outline:1px solid #b33600!important}option{outline:1px solid #ff8a00!important}output{outline:1px solid #ff9619!important}progress{outline:1px solid #e57c00!important}select{outline:1px solid #e26e0f!important}textarea{outline:1px solid #cc5400!important}details{outline:1px solid #33848f!important}summary{outline:1px solid #60a1a6!important}command{outline:1px solid #438da1!important}menu{outline:1px solid #449da6!important}del{outline:1px solid #bf0000!important}ins{outline:1px solid #400000!important}img{outline:1px solid #22746b!important}iframe{outline:1px solid #64a7a0!important}embed{outline:1px solid #98daca!important}object{outline:1px solid #0c9!important}param{outline:1px solid #37ffc4!important}video{outline:1px solid #6ee866!important}audio{outline:1px solid #027353!important}source{outline:1px solid #012426!important}canvas{outline:1px solid #a2f570!important}track{outline:1px solid #59a600!important}map{outline:1px solid #7be500!important}area{outline:1px solid #305900!important}a{outline:1px solid #ff62ab!important}em{outline:1px solid #800b41!important}strong{outline:1px solid #ff1583!important}i{outline:1px solid #803156!important}b{outline:1px solid #cc1169!important}u{outline:1px solid #ff0430!important}s{outline:1px solid #f805e3!important}small{outline:1px solid #d107b2!important}abbr{outline:1px solid #4a0263!important}q{outline:1px solid #240018!important}cite{outline:1px solid #64003c!important}dfn{outline:1px solid #b4005a!important}sub{outline:1px solid #dba0c8!important}sup{outline:1px solid #cc0256!important}time{outline:1px solid #d6606d!important}code{outline:1px solid #e04251!important}kbd{outline:1px solid #5e001f!important}samp{outline:1px solid #9c0033!important}var{outline:1px solid #d90047!important}mark{outline:1px solid #ff0053!important}bdi{outline:1px solid #bf3668!important}bdo{outline:1px solid #6f1400!important}ruby{outline:1px solid #ff7b93!important}rt{outline:1px solid #ff2f54!important}rp{outline:1px solid #803e49!important}span{outline:1px solid #cc2643!important}br{outline:1px solid #db687d!important}wbr{outline:1px solid #db175b!important}article:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}nav:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}aside:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}section:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}header:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}footer:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}h1:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}h2:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}h3:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}h4:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}h5:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}h6:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}main:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}address:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}div:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}p:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}hr:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}pre:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}blockquote:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}ol:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}ul:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}li:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}dl:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}dt:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}dd:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}figure:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}figcaption:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}table:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}caption:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}thead:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}tbody:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}tfoot:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}tr:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}th:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}td:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}col:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}colgroup:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}button:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}datalist:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}fieldset:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}form:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}input:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}keygen:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}label:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}legend:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}meter:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}optgroup:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}option:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}output:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}progress:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}select:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}textarea:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}details:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}summary:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}command:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}menu:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}del:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}ins:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}img:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}iframe:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}embed:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}object:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}param:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}video:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}audio:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}source:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}canvas:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}track:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}map:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}area:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}a:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}em:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}strong:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}i:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}b:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}u:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}s:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}small:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}abbr:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}q:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}cite:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}dfn:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}sub:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}sup:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}time:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}code:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}kbd:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}samp:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}var:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}mark:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}bdi:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}bdo:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}ruby:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}rt:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}rp:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}span:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}br:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);}wbr:hover{-webkit-box-shadow:0 0 1rem rgba(0,0,0,.6);box-shadow:0 0 1rem rgba(0,0,0,.6);} #debugCSSInfoBar {visibility:hidden; position: fixed; bottom: 0; width: 100%; padding: 20px 0; margin:0; background-color: #333; color: #eee; font-size: 16px; text-align: center; outline: none !important;-webkit-box-shadow:none !important;box-shadow:none !important;} #debugCSSInfoBar.show{visibility:visible;} #debugCSSInfoBar p {font-family: monospace; font-size: 16px; padding: 0; margin: 0; outline: none !important;-webkit-box-shadow:none !important;box-shadow:none !important;background-color:inherit !important;} #debugCSSInfoBar b {color:#0088C3;outline: none !important;-webkit-box-shadow:none !important;box-shadow:none !important;background-color:inherit !important}`; export const a11ycss = `:not(colgroup)>col:after,:not(dl)>dd:after,:not(dl)>dt:after,:not(dt,dd)+dd:after,:not(fieldset)>legend:after,:not(figure)>figcaption:after,:not(img,object,embed,svg,canvas)[height]:after,:not(img,object,embed,svg,canvas)[width]:after,:not(select)>optgroup:after,:not(select,optgroup)>option:after,:not(tr)>td:after,:not(tr)>th:after,:not(ul,ol)>li:after,[accesskey]:after,[aria-hidden=true]:not(:empty):after,[aria-required]+:before,[class*=NaN]:after,[class*=null]:after,[class*=search]:not([role=search]):after,[class*=undefined]:after,[class=" "]:after,[class=""]:after,[class^="--"]:after,[class^="-0"]:after,[class^="-1"]:after,[class^="-2"]:after,[class^="-3"]:after,[class^="-4"]:after,[class^="-5"]:after,[class^="-6"]:after,[class^="-7"]:after,[class^="-8"]:after,[class^="-9"]:after,[class^="0"]:after,[class^="1"]:after,[class^="2"]:after,[class^="3"]:after,[class^="4"]:after,[class^="5"]:after,[class^="6"]:after,[class^="7"]:after,[class^="8"]:after,[class^="9"]:after,[datetime]:after,[dir=rtl]:not([lang=ar],[lang=he]):after,[dir]:not([dir=rtl],[dir=ltr],[dir=auto]):after,[download]:after,[dropzone]:after,[hidden]:not(:empty):after,[href$=".apng"]:not(link):after,[href$=".doc"]:not(link):after,[href$=".docx"]:not(link):after,[href$=".gif"]:not(link):after,[href$=".ics"]:not(link):after,[href$=".jpg"]:not(link):after,[href$=".mov"]:not(link):after,[href$=".mp3"]:not(link):after,[href$=".mp4"]:not(link):after,[href$=".ogg"]:not(link):after,[href$=".pdf"]:not(link):after,[href$=".png"]:not(link):after,[href$=".rar"]:not(link):after,[href$=".svg"]:not(link):after,[href$=".svgz"]:not(link):after,[href$=".txt"]:not(link):after,[href$=".webp"]:not(link):after,[href$=".xls"]:not(link):after,[href$=".zip"]:not(link):after,[href^="http:"]:after,[href^=mailto]:after,[href^=tel]:after,[id*=" "]:after,[id*=NaN]:after,[id*=null]:after,[id*=search]:not([role=search]):after,[id*=undefined]:after,[id=" "]:after,[id=""]:after,[id^="--"]:after,[id^="-0"]:after,[id^="-1"]:after,[id^="-2"]:after,[id^="-3"]:after,[id^="-4"]:after,[id^="-5"]:after,[id^="-6"]:after,[id^="-7"]:after,[id^="-8"]:after,[id^="-9"]:after,[id^="0"]:after,[id^="1"]:after,[id^="2"]:after,[id^="3"]:after,[id^="4"]:after,[id^="5"]:after,[id^="6"]:after,[id^="7"]:after,[id^="8"]:after,[id^="9"]:after,[lang*=" "]:after,[lang=ar] [lang]:not([dir=ltr]):after,[lang=ar]:not([dir=rtl]):after,[lang=he] [lang]:not([dir=ltr]):after,[lang=he]:not([dir=rtl]):after,[onabort]:after,[onafterprint]:after,[onbeforeprint]:after,[onbeforeunload]:after,[onblur]:after,[oncanplay]:after,[oncanplaythrough]:after,[onchage]:after,[onclick]:after,[oncontextmenu]:after,[ondblclick]:after,[ondrag]:after,[ondragend]:after,[ondragenter]:after,[ondragleave]:after,[ondragover]:after,[ondragstart]:after,[ondrop]:after,[ondurationchange]:after,[onemptied]:after,[onended]:after,[onerror]:after,[onfocus]:after,[onformchange]:after,[onforminput]:after,[onhaschange]:after,[oninput]:after,[oninvalid]:after,[onkeydown]:after,[onkeypress]:after,[onkeyup]:after,[onload]:after,[onloadeddata]:after,[onloadedmetadata]:after,[onloadstart]:after,[onmessage]:after,[onmousedown]:after,[onmousemove]:after,[onmouseout]:after,[onmouseover]:after,[onmouseup]:after,[onmousewheel]:after,[onoffline]:after,[ononline]:after,[onpagehide]:after,[onpageshow]:after,[onpause]:after,[onplay]:after,[onplaying]:after,[onpopstate]:after,[onprogress]:after,[onratechange]:after,[onreadystatechange]:after,[onredo]:after,[onreset]:after,[onresize]:after,[onscroll]:after,[onseeked]:after,[onseeking]:after,[onselect]:after,[onstalled]:after,[onstorage]:after,[onsubmit]:after,[onsuspend]:after,[ontimeupdate]:after,[onundo]:after,[onunload]:after,[onvolumechange]:after,[onwaiting]:after,[placeholder]:not([title],[aria-label],[aria-labelledby])+:before,[required]+:before,[role=banner]~[role=banner]:after,[role=checkbox]:not([aria-checked]):after,[role=combobox]:not([aria-expanded]):after,[role=contentinfo]~[role=contentinfo]:after,[role=heading]:not([aria-level]):after,[role=img]:not([aria-hidden=true],[aria-label],[aria-labelledby]):after,[role=main]~[role=main]:after,[role=scrollbar]:not([aria-controls]):after,[role=scrollbar]:not([aria-orientation]):after,[role=scrollbar]:not([aria-valuemax]):after,[role=scrollbar]:not([aria-valuemin]):after,[role=scrollbar]:not([aria-valuenow]):after,[role=search]~[role=search]:after,[role=slider]:not([aria-valuemax]):after,[role=slider]:not([aria-valuemin]):after,[role=slider]:not([aria-valuenow]):after,[role=spinbutton]:not([aria-valuemax]):after,[role=spinbutton]:not([aria-valuemin]):after,[role=spinbutton]:not([aria-valuenow]):after,[src^="http:"]:after,[style]:after,[tabindex]:not([tabindex="0"],[tabindex^="-"]):after,[target$=blank]:after,[target$=blank]:not([rel*=noopener]):after,[target$=blank]:not([rel*=noreferrer]):after,[target$=blank]:not([rel]):after,[type=checkbox]:not(:only-of-type,[name])+:before,[type=radio]+:before,[type=radio]:not([name])+:before,a a[href]:after,a audio[controls]:after,a button:after,a details:after,a embed:after,a iframe:after,a img[usemap]:after,a input[type]:not([hidden]):after,a label:after,a select:after,a textarea:after,a video[controls]:after,a:empty:not([title],[aria-label],[aria-labelledby]):after,a:empty[aria-label=""]:after,a:empty[aria-labelledby=""]:after,a:empty[title=""]:after,a:not([href]):after,a[charset]:after,a[coords]:after,a[datafld]:after,a[datasrc]:after,a[href=" "]:after,a[href=""]:after,a[href="#"]:not([role=button]):after,a[href^=javascript]:not([role=button]):after,a[methods]:after,a[name]:after,a[rev]:after,a[role=button]:after,a[shape]:after,a[urn]:after,abbr div:after,abbr:not([title]):after,abbr[title=" "]:after,abbr[title=""]:after,acronym:after,address address:after,address article:after,address aside:after,address footer:after,address h1:after,address h2:after,address h3:after,address h4:after,address h5:after,address h6:after,address header:after,address nav:after,address section:after,applet:after,applet[datafld]:after,applet[datasrc]:after,area:not([alt])+:before,area:not([href])[alt=""][aria-describedby]+:before,area:not([href])[alt=""][aria-label]+:before,area:not([href])[alt=""][aria-labelledby]+:before,area:not([href])[alt=""][title]+:before,area:not([href])[alt]:not([alt=""])+:before,area[alt$=".apng"]+:before,area[alt$=".doc"]+:before,area[alt$=".docx"]+:before,area[alt$=".gif"]+:before,area[alt$=".ics"]+:before,area[alt$=".jpg"]+:before,area[alt$=".mov"]+:before,area[alt$=".mp3"]+:before,area[alt$=".mp4"]+:before,area[alt$=".ogg"]+:before,area[alt$=".pdf"]+:before,area[alt$=".png"]+:before,area[alt$=".rar"]+:before,area[alt$=".svg"]+:before,area[alt$=".svgz"]+:before,area[alt$=".txt"]+:before,area[alt$=".webp"]+:before,area[alt$=".xls"]+:before,area[alt$=".zip"]+:before,area[alt=" "]+:before,area[alt=""]+:before,area[alt][title]+:before,area[aria-hidden=true]:not(:empty)+:before,area[class*=NaN]+:before,area[class*=null]+:before,area[class*=undefined]+:before,area[class=" "]+:before,area[class=""]+:before,area[height]:not(img,object,embed,svg,canvas)+:before,area[hidden]:not(:empty)+:before,area[hreflang]+:before,area[id*=" "]+:before,area[id*=NaN]+:before,area[id*=null]+:before,area[id*=undefined]+:before,area[id=" "]+:before,area[id=""]+:before,area[lang*=" "]+:before,area[nohref]+:before,area[role=checkbox]:not([aria-checked])+:before,area[role=combobox]:not([aria-expanded])+:before,area[role=presentation]+:before,area[role=slider]:not([aria-valuemax])+:before,area[role=slider]:not([aria-valuemin])+:before,area[role=slider]:not([aria-valuenow])+:before,area[role=spinbutton]:not([aria-valuemax])+:before,area[role=spinbutton]:not([aria-valuemin])+:before,area[role=spinbutton]:not([aria-valuenow])+:before,area[style]+:before,area[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,area[type]+:before,area[width]:not(img,object,embed,svg,canvas)+:before,article main:after,article>article:first-child:after,article>aside:first-child:after,article>section:first-child:after,aside main:after,aside>article:first-child:after,aside>aside:first-child:after,aside>section:first-child:after,audio+:before,audio:not([controls])+:before,audio[aria-hidden=true]:not(:empty)+:before,audio[autoplay]+:before,audio[class*=NaN]+:before,audio[class*=null]+:before,audio[class*=undefined]+:before,audio[class=" "]+:before,audio[class=""]+:before,audio[height]:not(img,object,embed,svg,canvas)+:before,audio[hidden]:not(:empty)+:before,audio[id*=" "]+:before,audio[id*=NaN]+:before,audio[id*=null]+:before,audio[id*=undefined]+:before,audio[id=" "]+:before,audio[id=""]+:before,audio[lang*=" "]+:before,audio[role=checkbox]:not([aria-checked])+:before,audio[role=combobox]:not([aria-expanded])+:before,audio[role=slider]:not([aria-valuemax])+:before,audio[role=slider]:not([aria-valuemin])+:before,audio[role=slider]:not([aria-valuenow])+:before,audio[role=spinbutton]:not([aria-valuemax])+:before,audio[role=spinbutton]:not([aria-valuemin])+:before,audio[role=spinbutton]:not([aria-valuenow])+:before,audio[style]+:before,audio[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,audio[width]:not(img,object,embed,svg,canvas)+:before,b div:after,base[aria-hidden=true]:not(:empty)+:before,base[class*=NaN]+:before,base[class*=null]+:before,base[class*=undefined]+:before,base[class=" "]+:before,base[class=""]+:before,base[height]:not(img,object,embed,svg,canvas)+:before,base[hidden]:not(:empty)+:before,base[id*=" "]+:before,base[id*=NaN]+:before,base[id*=null]+:before,base[id*=undefined]+:before,base[id=" "]+:before,base[id=""]+:before,base[lang*=" "]+:before,base[role=checkbox]:not([aria-checked])+:before,base[role=combobox]:not([aria-expanded])+:before,base[role=slider]:not([aria-valuemax])+:before,base[role=slider]:not([aria-valuemin])+:before,base[role=slider]:not([aria-valuenow])+:before,base[role=spinbutton]:not([aria-valuemax])+:before,base[role=spinbutton]:not([aria-valuemin])+:before,base[role=spinbutton]:not([aria-valuenow])+:before,base[style]+:before,base[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,base[width]:not(img,object,embed,svg,canvas)+:before,basefont:after,bgsound:after,big:after,blink:after,body :empty:not([hidden],[aria-hidden],[src],button,a,iframe,textarea,area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr,title):after,body[alink]:after,body[background]:after,body[bgcolor]:after,body[link]:after,body[marginbottom]:after,body[marginheight]:after,body[marginleft]:after,body[marginright]:after,body[margintop]:after,body[marginwidth]:after,body[text]:after,body[vlink]:after,br[aria-hidden=true]:not(:empty)+:before,br[class*=NaN]+:before,br[class*=null]+:before,br[class*=undefined]+:before,br[class=" "]+:before,br[class=""]+:before,br[clear]+:before,br[height]:not(img,object,embed,svg,canvas)+:before,br[hidden]:not(:empty)+:before,br[id*=" "]+:before,br[id*=NaN]+:before,br[id*=null]+:before,br[id*=undefined]+:before,br[id=" "]+:before,br[id=""]+:before,br[lang*=" "]+:before,br[role=checkbox]:not([aria-checked])+:before,br[role=combobox]:not([aria-expanded])+:before,br[role=slider]:not([aria-valuemax])+:before,br[role=slider]:not([aria-valuemin])+:before,br[role=slider]:not([aria-valuenow])+:before,br[role=spinbutton]:not([aria-valuemax])+:before,br[role=spinbutton]:not([aria-valuemin])+:before,br[role=spinbutton]:not([aria-valuenow])+:before,br[style]+:before,br[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,br[width]:not(img,object,embed,svg,canvas)+:before,button a[href]:after,button audio[controls]:after,button button:after,button details:after,button embed:after,button iframe:after,button img[usemap]:after,button input[type]:not([hidden]):after,button label:after,button select:after,button textarea:after,button video[controls]:after,button:empty:not([aria-label],[aria-labelledby],[title]):after,button:not([type],[form],[formaction],[formtarget]):after,button[aria-label=""]:after,button[aria-labelledby=""]:after,button[class*=disabled]:not([disabled],[readonly]):after,button[datafld]:after,button[dataformatas]:after,button[datasrc]:after,button[title=""]:after,button[type=button][formaction]:after,button[type=button][formenctype]:after,button[type=button][formmethod]:after,button[type=button][formnovalidate]:after,button[type=button][formtarget]:after,button[type=reset][formaction]:after,button[type=reset][formenctype]:after,button[type=reset][formmethod]:after,button[type=reset][formnovalidate]:after,button[type=reset][formtarget]:after,canvas[aria-hidden=true][aria-describedby]:after,canvas[aria-hidden=true][aria-label]:after,canvas[aria-hidden=true][aria-labelledby]:after,canvas[aria-hidden=true][title]:after,canvas[role=presentation]:after,caption[align]:after,center:after,cite div:after,code div:after,col[align]:after,col[aria-hidden=true]:not(:empty)+:before,col[char]:after,col[charoff]:after,col[class*=NaN]+:before,col[class*=null]+:before,col[class*=undefined]+:before,col[class=" "]+:before,col[class=""]+:before,col[height]:not(img,object,embed,svg,canvas)+:before,col[hidden]:not(:empty)+:before,col[id*=" "]+:before,col[id*=NaN]+:before,col[id*=null]+:before,col[id*=undefined]+:before,col[id=" "]+:before,col[id=""]+:before,col[lang*=" "]+:before,col[role=checkbox]:not([aria-checked])+:before,col[role=combobox]:not([aria-expanded])+:before,col[role=slider]:not([aria-valuemax])+:before,col[role=slider]:not([aria-valuemin])+:before,col[role=slider]:not([aria-valuenow])+:before,col[role=spinbutton]:not([aria-valuemax])+:before,col[role=spinbutton]:not([aria-valuemin])+:before,col[role=spinbutton]:not([aria-valuenow])+:before,col[style]+:before,col[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,col[valign]:after,col[width]:after,col[width]:not(img,object,embed,svg,canvas)+:before,colgroup :not(col):after,command[aria-hidden=true]:not(:empty)+:before,command[class*=NaN]+:before,command[class*=null]+:before,command[class*=undefined]+:before,command[class=" "]+:before,command[class=""]+:before,command[height]:not(img,object,embed,svg,canvas)+:before,command[hidden]:not(:empty)+:before,command[id*=" "]+:before,command[id*=NaN]+:before,command[id*=null]+:before,command[id*=undefined]+:before,command[id=" "]+:before,command[id=""]+:before,command[lang*=" "]+:before,command[role=checkbox]:not([aria-checked])+:before,command[role=combobox]:not([aria-expanded])+:before,command[role=slider]:not([aria-valuemax])+:before,command[role=slider]:not([aria-valuemin])+:before,command[role=slider]:not([aria-valuenow])+:before,command[role=spinbutton]:not([aria-valuemax])+:before,command[role=spinbutton]:not([aria-valuemin])+:before,command[role=spinbutton]:not([aria-valuenow])+:before,command[style]+:before,command[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,command[width]:not(img,object,embed,svg,canvas)+:before,details>:not(summary):first-child:after,details>summary:not(:first-child):after,dir:after,div[align]:after,div[datafld]:after,div[dataformatas]:after,div[datasrc]:after,dl>:not(dt,dd,div):after,dl[compact]:after,dt+:not(dd):after,em div:after,embed[align]+:before,embed[aria-hidden=true]:not(:empty)+:before,embed[class*=NaN]+:before,embed[class*=null]+:before,embed[class*=undefined]+:before,embed[class=" "]+:before,embed[class=""]+:before,embed[height]:not(img,object,embed,svg,canvas)+:before,embed[hidden]:not(:empty)+:before,embed[hspace]+:before,embed[id*=" "]+:before,embed[id*=NaN]+:before,embed[id*=null]+:before,embed[id*=undefined]+:before,embed[id=" "]+:before,embed[id=""]+:before,embed[lang*=" "]+:before,embed[name]+:before,embed[name]:after,embed[role=checkbox]:not([aria-checked])+:before,embed[role=combobox]:not([aria-expanded])+:before,embed[role=presentation]+:before,embed[role=slider]:not([aria-valuemax])+:before,embed[role=slider]:not([aria-valuemin])+:before,embed[role=slider]:not([aria-valuenow])+:before,embed[role=spinbutton]:not([aria-valuemax])+:before,embed[role=spinbutton]:not([aria-valuemin])+:before,embed[role=spinbutton]:not([aria-valuenow])+:before,embed[style]+:before,embed[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,embed[type=image][alt$=".apng"]:after,embed[type=image][alt$=".doc"]:after,embed[type=image][alt$=".docx"]:after,embed[type=image][alt$=".gif"]:after,embed[type=image][alt$=".ics"]:after,embed[type=image][alt$=".jpg"]:after,embed[type=image][alt$=".mov"]:after,embed[type=image][alt$=".mp3"]:after,embed[type=image][alt$=".mp4"]:after,embed[type=image][alt$=".ogg"]:after,embed[type=image][alt$=".pdf"]:after,embed[type=image][alt$=".png"]:after,embed[type=image][alt$=".rar"]:after,embed[type=image][alt$=".svg"]:after,embed[type=image][alt$=".svgz"]:after,embed[type=image][alt$=".txt"]:after,embed[type=image][alt$=".webp"]:after,embed[type=image][alt$=".xls"]:after,embed[type=image][alt$=".zip"]:after,embed[type=image][alt=""]:after,embed[type=image][aria-hidden=true][aria-describedby]+:before,embed[type=image][aria-hidden=true][aria-label]+:before,embed[type=image][aria-hidden=true][aria-labelledby]+:before,embed[type=image][aria-hidden=true][title]+:before,embed[vspace]+:before,embed[width]:not(img,object,embed,svg,canvas)+:before,fieldset>:not(legend):first-child:after,fieldset>legend:not(:first-child):after,fieldset[datafld]:after,figcaption:not(:first-child,:last-child):after,figcaption:not(:first-of-type):after,figure:not([role=group]):after,font:after,footer main:after,form form:after,form:not([action]):after,form[accept]:after,form[action=" "]:after,form[action=""]:after,frame:after,frame[datafld]:after,frame[datasrc]:after,frameset:after,h1[align]:after,h2[align]:after,h3[align]:after,h4[align]:after,h5[align]:after,h6[align]:after,head :first-child:not([charset])~link:last-of-type:before,head[profile]:after,header main:after,hgroup:after,hr[align]+:before,hr[aria-hidden=true]:not(:empty)+:before,hr[class*=NaN]+:before,hr[class*=null]+:before,hr[class*=undefined]+:before,hr[class=" "]+:before,hr[class=""]+:before,hr[color]+:before,hr[height]:not(img,object,embed,svg,canvas)+:before,hr[hidden]:not(:empty)+:before,hr[id*=" "]+:before,hr[id*=NaN]+:before,hr[id*=null]+:before,hr[id*=undefined]+:before,hr[id=" "]+:before,hr[id=""]+:before,hr[lang*=" "]+:before,hr[noshade]+:before,hr[role=checkbox]:not([aria-checked])+:before,hr[role=combobox]:not([aria-expanded])+:before,hr[role=slider]:not([aria-valuemax])+:before,hr[role=slider]:not([aria-valuemin])+:before,hr[role=slider]:not([aria-valuenow])+:before,hr[role=spinbutton]:not([aria-valuemax])+:before,hr[role=spinbutton]:not([aria-valuemin])+:before,hr[role=spinbutton]:not([aria-valuenow])+:before,hr[size]+:before,hr[style]+:before,hr[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,hr[width]+:before,hr[width]:not(img,object,embed,svg,canvas)+:before,html:not([lang]):after,html[lang*=" "]:after,html[lang=""]:after,html[version]:after,i div:after,iframe:not([title])+:before,iframe[align]+:before,iframe[allowtransparency]+:before,iframe[aria-hidden=true]:not(:empty)+:before,iframe[class*=NaN]+:before,iframe[class*=null]+:before,iframe[class*=undefined]+:before,iframe[class=" "]+:before,iframe[class=""]+:before,iframe[datafld]+:before,iframe[datasrc]+:before,iframe[frameborder]+:before,iframe[framespacing]+:before,iframe[height]:not(img,object,embed,svg,canvas)+:before,iframe[hidden]:not(:empty)+:before,iframe[hspace]+:before,iframe[id*=" "]+:before,iframe[id*=NaN]+:before,iframe[id*=null]+:before,iframe[id*=undefined]+:before,iframe[id=" "]+:before,iframe[id=""]+:before,iframe[lang*=" "]+:before,iframe[longdesc]+:before,iframe[marginheight]+:before,iframe[marginwidth]+:before,iframe[role=checkbox]:not([aria-checked])+:before,iframe[role=combobox]:not([aria-expanded])+:before,iframe[role=slider]:not([aria-valuemax])+:before,iframe[role=slider]:not([aria-valuemin])+:before,iframe[role=slider]:not([aria-valuenow])+:before,iframe[role=spinbutton]:not([aria-valuemax])+:before,iframe[role=spinbutton]:not([aria-valuemin])+:before,iframe[role=spinbutton]:not([aria-valuenow])+:before,iframe[scrolling]+:before,iframe[style]+:before,iframe[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,iframe[title=" "]+:before,iframe[title=""]+:before,iframe[vspace]+:before,iframe[width]:not(img,object,embed,svg,canvas)+:before,img:not([alt])+:before,img:not([src],[srcset]):after,img[align]+:before,img[alt$=".apng"]+:before,img[alt$=".doc"]+:before,img[alt$=".docx"]+:before,img[alt$=".gif"]+:before,img[alt$=".ics"]+:before,img[alt$=".jpg"]+:before,img[alt$=".mov"]+:before,img[alt$=".mp3"]+:before,img[alt$=".mp4"]+:before,img[alt$=".ogg"]+:before,img[alt$=".pdf"]+:before,img[alt$=".png"]+:before,img[alt$=".rar"]+:before,img[alt$=".svg"]+:before,img[alt$=".svgz"]+:before,img[alt$=".txt"]+:before,img[alt$=".webp"]+:before,img[alt$=".xls"]+:before,img[alt$=".zip"]+:before,img[alt=" "]+:before,img[alt=""]+:before,img[alt=""][aria-describedby]+:before,img[alt=""][aria-label]+:before,img[alt=""][aria-labelledby]+:before,img[alt=""][title]+:before,img[alt][title]+:before,img[aria-hidden=true]:not(:empty)+:before,img[border]+:before,img[class*=NaN]+:before,img[class*=null]+:before,img[class*=undefined]+:before,img[class=" "]+:before,img[class=""]+:before,img[datafld]+:before,img[datasrc]+:before,img[height]:not(img,object,embed,svg,canvas)+:before,img[hidden]:not(:empty)+:before,img[hspace]+:before,img[id*=" "]+:before,img[id*=NaN]+:before,img[id*=null]+:before,img[id*=undefined]+:before,img[id=" "]+:before,img[id=""]+:before,img[lang*=" "]+:before,img[longdesc]+:before,img[lowsrc]+:before,img[name]+:before,img[name]:after,img[role=checkbox]:not([aria-checked])+:before,img[role=combobox]:not([aria-expanded])+:before,img[role=presentation]+:before,img[role=slider]:not([aria-valuemax])+:before,img[role=slider]:not([aria-valuemin])+:before,img[role=slider]:not([aria-valuenow])+:before,img[role=spinbutton]:not([aria-valuemax])+:before,img[role=spinbutton]:not([aria-valuemin])+:before,img[role=spinbutton]:not([aria-valuenow])+:before,img[src*="1px.gif"]:not([role=presentation])+:before,img[src*="1x1.gif"]:not([role=presentation])+:before,img[src*="clear.gif"]:not([role=presentation])+:before,img[src*="dotclear.gif"]:not([role=presentation])+:before,img[src*="pixel-1x1-clear.gif"]:not([role=presentation])+:before,img[src*="spacer.gif"]:not([role=presentation])+:before,img[src*="transparent.gif"]:not([role=presentation])+:before,img[src=" "]:after,img[src=""]:after,img[src="#"]:after,img[src="/"]:after,img[srcset=" "]:after,img[srcset=""]:after,img[srcset="#"]:after,img[srcset="/"]:after,img[style]+:before,img[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,img[vspace]+:before,img[width]:not(img,object,embed,svg,canvas)+:before,input:not([type=button],[type=submit],[type=hidden],[type=reset],[type=image],[id],[aria-label],[title],[aria-labelledby])+:before,input:not([type])+:before,input[align]+:before,input[aria-hidden=true]:not(:empty)+:before,input[aria-required]+:before,input[class*=NaN]+:before,input[class*=null]+:before,input[class*=search]:not([role=search])+:before,input[class*=undefined]+:before,input[class=" "]+:before,input[class=""]+:before,input[datafld]+:before,input[dataformatas]+:before,input[datasrc]+:before,input[height]:not(img,object,embed,svg,canvas)+:before,input[hidden]:not(:empty)+:before,input[hspace]+:before,input[id*=" "]+:before,input[id*=NaN]+:before,input[id*=null]+:before,input[id*=search]:not([role=search])+:before,input[id*=undefined]+:before,input[id=" "]+:before,input[id=""]+:before,input[inputmode]+:before,input[ismap]+:before,input[lang*=" "]+:before,input[required]+:before,input[role=checkbox]:not([aria-checked])+:before,input[role=combobox]:not([aria-expanded])+:before,input[role=slider]:not([aria-valuemax])+:before,input[role=slider]:not([aria-valuemin])+:before,input[role=slider]:not([aria-valuenow])+:before,input[role=spinbutton]:not([aria-valuemax])+:before,input[role=spinbutton]:not([aria-valuemin])+:before,input[role=spinbutton]:not([aria-valuenow])+:before,input[style]+:before,input[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,input[type=" "]+:before,input[type=""]+:before,input[type=button]:not([value],[title],[aria-label],[aria-labelledby])+:before,input[type=image]:not([alt])+:before,input[type=image]:not([src],[srcset]):after,input[type=image][alt$=".apng"]+:before,input[type=image][alt$=".doc"]+:before,input[type=image][alt$=".docx"]+:before,input[type=image][alt$=".gif"]+:before,input[type=image][alt$=".ics"]+:before,input[type=image][alt$=".jpg"]+:before,input[type=image][alt$=".mov"]+:before,input[type=image][alt$=".mp3"]+:before,input[type=image][alt$=".mp4"]+:before,input[type=image][alt$=".ogg"]+:before,input[type=image][alt$=".pdf"]+:before,input[type=image][alt$=".png"]+:before,input[type=image][alt$=".rar"]+:before,input[type=image][alt$=".svg"]+:before,input[type=image][alt$=".svgz"]+:before,input[type=image][alt$=".txt"]+:before,input[type=image][alt$=".webp"]+:before,input[type=image][alt$=".xls"]+:before,input[type=image][alt$=".zip"]+:before,input[type=image][alt=" "]+:before,input[type=image][alt=""]+:before,input[type=image][src=" "]:after,input[type=image][src=""]:after,input[type=image][src="#"]:after,input[type=image][src="/"]:after,input[type=image][srcset=" "]:after,input[type=image][srcset=""]:after,input[type=image][srcset="#"]:after,input[type=image][srcset="/"]:after,input[type=reset]:not([value],[title],[aria-label],[aria-labelledby])+:before,input[type=submit]:not([value],[title],[aria-label],[aria-labelledby])+:before,input[usemap]+:before,input[vspace]+:before,input[width]:not(img,object,embed,svg,canvas)+:before,isindex:after,keygen:after,keygen[aria-hidden=true]:not(:empty)+:before,keygen[class*=NaN]+:before,keygen[class*=null]+:before,keygen[class*=undefined]+:before,keygen[class=" "]+:before,keygen[class=""]+:before,keygen[height]:not(img,object,embed,svg,canvas)+:before,keygen[hidden]:not(:empty)+:before,keygen[id*=" "]+:before,keygen[id*=NaN]+:before,keygen[id*=null]+:before,keygen[id*=undefined]+:before,keygen[id=" "]+:before,keygen[id=""]+:before,keygen[lang*=" "]+:before,keygen[role=checkbox]:not([aria-checked])+:before,keygen[role=combobox]:not([aria-expanded])+:before,keygen[role=slider]:not([aria-valuemax])+:before,keygen[role=slider]:not([aria-valuemin])+:before,keygen[role=slider]:not([aria-valuenow])+:before,keygen[role=spinbutton]:not([aria-valuemax])+:before,keygen[role=spinbutton]:not([aria-valuemin])+:before,keygen[role=spinbutton]:not([aria-valuenow])+:before,keygen[style]+:before,keygen[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,keygen[width]:not(img,object,embed,svg,canvas)+:before,label div:after,label label:after,label:not([for]):after,label[datafld]:after,label[dataformatas]:after,label[datasrc]:after,label[for=" "]:after,label[for=""]:after,legend[align]:after,legend[datafld]:after,legend[dataformatas]:after,legend[datasrc]:after,li[type]:after,link[aria-hidden=true]:not(:empty)+:before,link[charset]:after,link[charset]~link:last-of-type:before,link[class*=NaN]+:before,link[class*=null]+:before,link[class*=undefined]+:before,link[class=" "]+:before,link[class=""]+:before,link[height]:not(img,object,embed,svg,canvas)+:before,link[hidden]:not(:empty)+:before,link[id*=" "]+:before,link[id*=NaN]+:before,link[id*=null]+:before,link[id*=undefined]+:before,link[id=" "]+:before,link[id=""]+:before,link[lang*=" "]+:before,link[methods]:after,link[methods]~link:last-of-type:before,link[rev]:after,link[rev]~link:last-of-type:before,link[role=checkbox]:not([aria-checked])+:before,link[role=combobox]:not([aria-expanded])+:before,link[role=slider]:not([aria-valuemax])+:before,link[role=slider]:not([aria-valuemin])+:before,link[role=slider]:not([aria-valuenow])+:before,link[role=spinbutton]:not([aria-valuemax])+:before,link[role=spinbutton]:not([aria-valuemin])+:before,link[role=spinbutton]:not([aria-valuenow])+:before,link[style]+:before,link[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,link[target]:after,link[target]~link:last-of-type:before,link[urn]:after,link[urn]~link:last-of-type:before,link[width]:not(img,object,embed,svg,canvas)+:before,listing:after,main~main:not([hidden]):after,map[name*=" "]:after,marquee:after,marquee[datafld]:after,marquee[dataformatas]:after,marquee[datasrc]:after,menu:after,menuitem:after,meta[aria-hidden=true]:not(:empty)+:before,meta[charset]:not([charset=utf-8],[charset=UTF-8])~link:last-of-type:before,meta[class*=NaN]+:before,meta[class*=null]+:before,meta[class*=undefined]+:before,meta[class=" "]+:before,meta[class=""]+:before,meta[height]:not(img,object,embed,svg,canvas)+:before,meta[hidden]:not(:empty)+:before,meta[http-equiv=content-language]~link:last-of-type:before,meta[http-equiv=content-type]~link:last-of-type:before,meta[http-equiv=set-cookie]~link:last-of-type:before,meta[id*=" "]+:before,meta[id*=NaN]+:before,meta[id*=null]+:before,meta[id*=undefined]+:before,meta[id=" "]+:before,meta[id=""]+:before,meta[lang*=" "]+:before,meta[name=viewport][content*="user-scalable=no"]~link:last-of-type:before,meta[name=viewport][content*=maximum-scale]~link:last-of-type:before,meta[name=viewport][content*=minimum-scale]~link:last-of-type:before,meta[role=checkbox]:not([aria-checked])+:before,meta[role=combobox]:not([aria-expanded])+:before,meta[role=slider]:not([aria-valuemax])+:before,meta[role=slider]:not([aria-valuemin])+:before,meta[role=slider]:not([aria-valuenow])+:before,meta[role=spinbutton]:not([aria-valuemax])+:before,meta[role=spinbutton]:not([aria-valuemin])+:before,meta[role=spinbutton]:not([aria-valuenow])+:before,meta[scheme]~link:last-of-type:before,meta[style]+:before,meta[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,meta[width]:not(img,object,embed,svg,canvas)+:before,meter meter:after,multicol:after,nav main:after,nextid:after,nobr:after,noembed:after,noframes:after,object[align]+:before,object[archive]+:before,object[border]+:before,object[classid]+:before,object[code]+:before,object[codebase]+:before,object[codetype]+:before,object[datafld]+:before,object[dataformatas]+:before,object[datasrc]+:before,object[declare]+:before,object[hspace]+:before,object[role=presentation]:after,object[standby]+:before,object[type=image][alt$=".apng"]:after,object[type=image][alt$=".doc"]:after,object[type=image][alt$=".docx"]:after,object[type=image][alt$=".gif"]:after,object[type=image][alt$=".ics"]:after,object[type=image][alt$=".jpg"]:after,object[type=image][alt$=".mov"]:after,object[type=image][alt$=".mp3"]:after,object[type=image][alt$=".mp4"]:after,object[type=image][alt$=".ogg"]:after,object[type=image][alt$=".pdf"]:after,object[type=image][alt$=".png"]:after,object[type=image][alt$=".rar"]:after,object[type=image][alt$=".svg"]:after,object[type=image][alt$=".svgz"]:after,object[type=image][alt$=".txt"]:after,object[type=image][alt$=".webp"]:after,object[type=image][alt$=".xls"]:after,object[type=image][alt$=".zip"]:after,object[type=image][alt=""]:after,object[type=image][aria-hidden=true][aria-describedby]:after,object[type=image][aria-hidden=true][aria-label]:after,object[type=image][aria-hidden=true][aria-labelledby]:after,object[type=image][aria-hidden=true][title]:after,object[vspace]+:before,ol>:not(li):after,ol[compact]:after,optgroup:not([label])+:before,optgroup>:not(option):after,option[dataformatas]:after,option[datasrc]:after,option[name]:after,p[align]:after,param[aria-hidden=true]:not(:empty)+:before,param[class*=NaN]+:before,param[class*=null]+:before,param[class*=undefined]+:before,param[class=" "]+:before,param[class=""]+:before,param[datafld]:after,param[height]:not(img,object,embed,svg,canvas)+:before,param[hidden]:not(:empty)+:before,param[id*=" "]+:before,param[id*=NaN]+:before,param[id*=null]+:before,param[id*=undefined]+:before,param[id=" "]+:before,param[id=""]+:before,param[lang*=" "]+:before,param[role=checkbox]:not([aria-checked])+:before,param[role=combobox]:not([aria-expanded])+:before,param[role=slider]:not([aria-valuemax])+:before,param[role=slider]:not([aria-valuemin])+:before,param[role=slider]:not([aria-valuenow])+:before,param[role=spinbutton]:not([aria-valuemax])+:before,param[role=spinbutton]:not([aria-valuemin])+:before,param[role=spinbutton]:not([aria-valuenow])+:before,param[style]+:before,param[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,param[type]:after,param[valuetype]:after,param[width]:not(img,object,embed,svg,canvas)+:before,plaintext:after,pre[width]:after,progress progress:after,q div:after,rb:after,rtc:after,script[event]:after,script[event]~link:last-of-type:before,script[for]:after,script[for]~link:last-of-type:before,script[language]:after,script[language]~link:last-of-type:before,section>section:first-child:after,select:not([id],[aria-label],[aria-labelledby])+:before,select>:not(option,optgroup):after,select[aria-hidden=true]:not(:empty)+:before,select[aria-required]+:before,select[class*=NaN]+:before,select[class*=null]+:before,select[class*=undefined]+:before,select[class=" "]+:before,select[class=""]+:before,select[datafld]+:before,select[dataformatas]+:before,select[datasrc]+:before,select[height]:not(img,object,embed,svg,canvas)+:before,select[hidden]:not(:empty)+:before,select[id*=" "]+:before,select[id*=NaN]+:before,select[id*=null]+:before,select[id*=undefined]+:before,select[id=" "]+:before,select[id=""]+:before,select[lang*=" "]+:before,select[required]+:before,select[required]:not([multiple])[size="1"]+:before,select[required]:not([multiple],[size])+:before,select[role=checkbox]:not([aria-checked])+:before,select[role=combobox]:not([aria-expanded])+:before,select[role=slider]:not([aria-valuemax])+:before,select[role=slider]:not([aria-valuemin])+:before,select[role=slider]:not([aria-valuenow])+:before,select[role=spinbutton]:not([aria-valuemax])+:before,select[role=spinbutton]:not([aria-valuemin])+:before,select[role=spinbutton]:not([aria-valuenow])+:before,select[style]+:before,select[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,select[width]:not(img,object,embed,svg,canvas)+:before,small div:after,source[aria-hidden=true]:not(:empty)+:before,source[class*=NaN]+:before,source[class*=null]+:before,source[class*=undefined]+:before,source[class=" "]+:before,source[class=""]+:before,source[height]:not(img,object,embed,svg,canvas)+:before,source[hidden]:not(:empty)+:before,source[id*=" "]+:before,source[id*=NaN]+:before,source[id*=null]+:before,source[id*=undefined]+:before,source[id=" "]+:before,source[id=""]+:before,source[lang*=" "]+:before,source[role=checkbox]:not([aria-checked])+:before,source[role=combobox]:not([aria-expanded])+:before,source[role=slider]:not([aria-valuemax])+:before,source[role=slider]:not([aria-valuemin])+:before,source[role=slider]:not([aria-valuenow])+:before,source[role=spinbutton]:not([aria-valuemax])+:before,source[role=spinbutton]:not([aria-valuemin])+:before,source[role=spinbutton]:not([aria-valuenow])+:before,source[style]+:before,source[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,source[width]:not(img,object,embed,svg,canvas)+:before,spacer:after,span div:after,span[datafld]:after,span[dataformatas]:after,span[datasrc]:after,strike:after,strong div:after,svg:not([aria-hidden=true],[role=img])+:before,svg[aria-hidden=true]:not(:empty)+:before,svg[aria-hidden=true][aria-describedby]+:before,svg[aria-hidden=true][aria-label]+:before,svg[aria-hidden=true][aria-labelledby]+:before,svg[aria-hidden=true][title]+:before,svg[aria-label][title]+:before,svg[class*=NaN]+:before,svg[class*=null]+:before,svg[class*=undefined]+:before,svg[class=" "]+:before,svg[class=""]+:before,svg[height]:not(img,object,embed,svg,canvas)+:before,svg[hidden]:not(:empty)+:before,svg[id*=" "]+:before,svg[id*=NaN]+:before,svg[id*=null]+:before,svg[id*=undefined]+:before,svg[id=" "]+:before,svg[id=""]+:before,svg[lang*=" "]+:before,svg[role=checkbox]:not([aria-checked])+:before,svg[role=combobox]:not([aria-expanded])+:before,svg[role=img]:not([aria-hidden=true],[aria-label],[aria-labelledby])+:before,svg[role=presentation]+:before,svg[role=slider]:not([aria-valuemax])+:before,svg[role=slider]:not([aria-valuemin])+:before,svg[role=slider]:not([aria-valuenow])+:before,svg[role=spinbutton]:not([aria-valuemax])+:before,svg[role=spinbutton]:not([aria-valuemin])+:before,svg[role=spinbutton]:not([aria-valuenow])+:before,svg[style]+:before,svg[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,svg[width]:not(img,object,embed,svg,canvas)+:before,table table:after,table:not([role=presentation])>:first-child:not(caption):after,table:not([role=presentation])>caption+tbody:after,table:not([role=presentation])>caption:not(:first-child):after,table:not([role=presentation])>tbody:first-child:after,table:not([role=presentation])>tbody>tr:only-child:after,table:not([role=presentation])>tr:only-child:after,table>:not(thead,tfoot,tbody,tr,colgroup,caption):after,table>tbody~colgroup:after,table>tbody~tfoot:after,table>tbody~thead:after,table>tfoot~colgroup:after,table>tfoot~thead:after,table[align]:after,table[background]:after,table[bgcolor]:after,table[cellpadding]:after,table[cellspacing]:after,table[dataformatas]:after,table[datapagesize]:after,table[datasrc]:after,table[frame]:after,table[role=presentation] [axis]:after,table[role=presentation] [headers]:after,table[role=presentation] [scope]:after,table[role=presentation] caption:after,table[role=presentation] colgroup:after,table[role=presentation] tfoot:after,table[role=presentation] th:after,table[role=presentation] thead:after,table[role=presentation]:after,table[rules]:after,table[summary]:after,table[width]:after,tbody[align]:after,tbody[background]:after,tbody[char]:after,tbody[charoff]:after,tbody[valign]:after,td[abbr]:after,td[align]:after,td[axis]:after,td[background]:after,td[bgcolor]:after,td[char]:after,td[charoff]:after,td[height]:after,td[nowrap]:after,td[scope]:after,td[valign]:after,td[width]:after,textarea:not([id],[aria-label],[aria-labelledby])+:before,textarea[aria-hidden=true]:not(:empty)+:before,textarea[aria-required]+:before,textarea[class*=NaN]+:before,textarea[class*=null]+:before,textarea[class*=undefined]+:before,textarea[class=" "]+:before,textarea[class=""]+:before,textarea[datafld]+:before,textarea[datasrc]+:before,textarea[height]:not(img,object,embed,svg,canvas)+:before,textarea[hidden]:not(:empty)+:before,textarea[id*=" "]+:before,textarea[id*=NaN]+:before,textarea[id*=null]+:before,textarea[id*=undefined]+:before,textarea[id=" "]+:before,textarea[id=""]+:before,textarea[lang*=" "]+:before,textarea[required]+:before,textarea[role=checkbox]:not([aria-checked])+:before,textarea[role=combobox]:not([aria-expanded])+:before,textarea[role=slider]:not([aria-valuemax])+:before,textarea[role=slider]:not([aria-valuemin])+:before,textarea[role=slider]:not([aria-valuenow])+:before,textarea[role=spinbutton]:not([aria-valuemax])+:before,textarea[role=spinbutton]:not([aria-valuemin])+:before,textarea[role=spinbutton]:not([aria-valuenow])+:before,textarea[style]+:before,textarea[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,textarea[width]:not(img,object,embed,svg,canvas)+:before,tfoot[align]:after,tfoot[background]:after,tfoot[char]:after,tfoot[charoff]:after,tfoot[valign]:after,th:not([scope],[id]):after,th[align]:after,th[axis]:after,th[background]:after,th[bgcolor]:after,th[char]:after,th[charoff]:after,th[height]:after,th[nowrap]:after,th[scope]:after,th[valign]:after,th[width]:after,thead[align]:after,thead[background]:after,thead[char]:after,thead[charoff]:after,thead[valign]:after,time:after,title:empty:after,tr>:not(td,th):after,tr[align]:after,tr[background]:after,tr[bgcolor]:after,tr[char]:after,tr[charoff]:after,tr[valign]:after,track[aria-hidden=true]:not(:empty)+:before,track[class*=NaN]+:before,track[class*=null]+:before,track[class*=undefined]+:before,track[class=" "]+:before,track[class=""]+:before,track[height]:not(img,object,embed,svg,canvas)+:before,track[hidden]:not(:empty)+:before,track[id*=" "]+:before,track[id*=NaN]+:before,track[id*=null]+:before,track[id*=undefined]+:before,track[id=" "]+:before,track[id=""]+:before,track[lang*=" "]+:before,track[role=checkbox]:not([aria-checked])+:before,track[role=combobox]:not([aria-expanded])+:before,track[role=slider]:not([aria-valuemax])+:before,track[role=slider]:not([aria-valuemin])+:before,track[role=slider]:not([aria-valuenow])+:before,track[role=spinbutton]:not([aria-valuemax])+:before,track[role=spinbutton]:not([aria-valuemin])+:before,track[role=spinbutton]:not([aria-valuenow])+:before,track[style]+:before,track[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,track[width]:not(img,object,embed,svg,canvas)+:before,tt:after,ul>:not(li):after,ul[compact]:after,ul[type]:after,video+:before,video:not([controls])+:before,video[aria-hidden=true]:not(:empty)+:before,video[autoplay]+:before,video[class*=NaN]+:before,video[class*=null]+:before,video[class*=undefined]+:before,video[class=" "]+:before,video[class=""]+:before,video[height]:not(img,object,embed,svg,canvas)+:before,video[hidden]:not(:empty)+:before,video[id*=" "]+:before,video[id*=NaN]+:before,video[id*=null]+:before,video[id*=undefined]+:before,video[id=" "]+:before,video[id=""]+:before,video[lang*=" "]+:before,video[role=checkbox]:not([aria-checked])+:before,video[role=combobox]:not([aria-expanded])+:before,video[role=slider]:not([aria-valuemax])+:before,video[role=slider]:not([aria-valuemin])+:before,video[role=slider]:not([aria-valuenow])+:before,video[role=spinbutton]:not([aria-valuemax])+:before,video[role=spinbutton]:not([aria-valuemin])+:before,video[role=spinbutton]:not([aria-valuenow])+:before,video[style]+:before,video[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,video[width]:not(img,object,embed,svg,canvas)+:before,wbr[aria-hidden=true]:not(:empty)+:before,wbr[class*=NaN]+:before,wbr[class*=null]+:before,wbr[class*=undefined]+:before,wbr[class=" "]+:before,wbr[class=""]+:before,wbr[height]:not(img,object,embed,svg,canvas)+:before,wbr[hidden]:not(:empty)+:before,wbr[id*=" "]+:before,wbr[id*=NaN]+:before,wbr[id*=null]+:before,wbr[id*=undefined]+:before,wbr[id=" "]+:before,wbr[id=""]+:before,wbr[lang*=" "]+:before,wbr[role=checkbox]:not([aria-checked])+:before,wbr[role=combobox]:not([aria-expanded])+:before,wbr[role=slider]:not([aria-valuemax])+:before,wbr[role=slider]:not([aria-valuemin])+:before,wbr[role=slider]:not([aria-valuenow])+:before,wbr[role=spinbutton]:not([aria-valuemax])+:before,wbr[role=spinbutton]:not([aria-valuemin])+:before,wbr[role=spinbutton]:not([aria-valuenow])+:before,wbr[style]+:before,wbr[tabindex]:not([tabindex="0"],[tabindex^="-"])+:before,wbr[width]:not(img,object,embed,svg,canvas)+:before,xmp:after{border-radius:0!important;color:#fff!important;contain:content;display:block!important;font:700 normal 14px/1.5 sans-serif!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important;height:auto!important;max-width:100vw!important;padding:4px!important;pointer-events:none!important;position:absolute!important;text-decoration:none!important;text-shadow:none!important;text-transform:none!important;-webkit-transform:none!important;transform:none!important;white-space:pre!important;width:auto!important}:not(img,object,embed,svg,canvas)[height],:not(img,object,embed,svg,canvas)[width],[accesskey],[class^="--"],[class^="-0"],[class^="-1"],[class^="-2"],[class^="-3"],[class^="-4"],[class^="-5"],[class^="-6"],[class^="-7"],[class^="-8"],[class^="-9"],[class^="0"],[class^="1"],[class^="2"],[class^="3"],[class^="4"],[class^="5"],[class^="6"],[class^="7"],[class^="8"],[class^="9"],[dir]:not([dir=rtl],[dir=ltr],[dir=auto]),[id*=" "],[id^="--"],[id^="-0"],[id^="-1"],[id^="-2"],[id^="-3"],[id^="-4"],[id^="-5"],[id^="-6"],[id^="-7"],[id^="-8"],[id^="-9"],[id^="0"],[id^="1"],[id^="2"],[id^="3"],[id^="4"],[id^="5"],[id^="6"],[id^="7"],[id^="8"],[id^="9"],[lang*=" "],[onabort],[onafterprint],[onbeforeprint],[onbeforeunload],[onblur],[oncanplay],[oncanplaythrough],[onchage],[onclick],[oncontextmenu],[ondblclick],[ondrag],[ondragend],[ondragenter],[ondragleave],[ondragover],[ondragstart],[ondrop],[ondurationchange],[onemptied],[onended],[onerror],[onfocus],[onformchange],[onforminput],[onhaschange],[oninput],[oninvalid],[onkeydown],[onkeypress],[onkeyup],[onload],[onloadeddata],[onloadedmetadata],[onloadstart],[onmessage],[onmousedown],[onmousemove],[onmouseout],[onmouseover],[onmouseup],[onmousewheel],[onoffline],[ononline],[onpagehide],[onpageshow],[onpause],[onplay],[onplaying],[onpopstate],[onprogress],[onratechange],[onreadystatechange],[onredo],[onreset],[onresize],[onscroll],[onseeked],[onseeking],[onselect],[onstalled],[onstorage],[onsubmit],[onsuspend],[ontimeupdate],[onundo],[onunload],[onvolumechange],[onwaiting],[role=checkbox]:not([aria-checked]),[role=combobox]:not([aria-expanded]),[role=img]:not([aria-hidden=true],[aria-label],[aria-labelledby]),[role=scrollbar]:not([aria-controls]),[role=scrollbar]:not([aria-orientation]),[role=scrollbar]:not([aria-valuemax]),[role=scrollbar]:not([aria-valuemin]),[role=scrollbar]:not([aria-valuenow]),[role=slider]:not([aria-valuemax]),[role=slider]:not([aria-valuemin]),[role=slider]:not([aria-valuenow]),[role=spinbutton]:not([aria-valuemax]),[role=spinbutton]:not([aria-valuemin]),[role=spinbutton]:not([aria-valuenow]),[tabindex]:not([tabindex="0"],[tabindex^="-"]),[type=checkbox]:not(:only-of-type,[name]),[type=radio],[type=radio]:not([name]),a a[href],a audio[controls],a button,a details,a embed,a iframe,a img[usemap],a input[type]:not([hidden]),a label,a select,a textarea,a video[controls],a:empty:not([title],[aria-label],[aria-labelledby]),a:empty[aria-label=""],a:empty[aria-labelledby=""],a:empty[title=""],a[href=" "],a[href=""],area:not([alt]),area[alt=" "],area[height]:not(img,object,embed,svg,canvas),area[id*=" "],area[lang*=" "],area[role=checkbox]:not([aria-checked]),area[role=combobox]:not([aria-expanded]),area[role=slider]:not([aria-valuemax]),area[role=slider]:not([aria-valuemin]),area[role=slider]:not([aria-valuenow]),area[role=spinbutton]:not([aria-valuemax]),area[role=spinbutton]:not([aria-valuemin]),area[role=spinbutton]:not([aria-valuenow]),area[tabindex]:not([tabindex="0"],[tabindex^="-"]),area[width]:not(img,object,embed,svg,canvas),audio[height]:not(img,object,embed,svg,canvas),audio[id*=" "],audio[lang*=" "],audio[role=checkbox]:not([aria-checked]),audio[role=combobox]:not([aria-expanded]),audio[role=slider]:not([aria-valuemax]),audio[role=slider]:not([aria-valuemin]),audio[role=slider]:not([aria-valuenow]),audio[role=spinbutton]:not([aria-valuemax]),audio[role=spinbutton]:not([aria-valuemin]),audio[role=spinbutton]:not([aria-valuenow]),audio[tabindex]:not([tabindex="0"],[tabindex^="-"]),audio[width]:not(img,object,embed,svg,canvas),base[height]:not(img,object,embed,svg,canvas),base[id*=" "],base[lang*=" "],base[role=checkbox]:not([aria-checked]),base[role=combobox]:not([aria-expanded]),base[role=slider]:not([aria-valuemax]),base[role=slider]:not([aria-valuemin]),base[role=slider]:not([aria-valuenow]),base[role=spinbutton]:not([aria-valuemax]),base[role=spinbutton]:not([aria-valuemin]),base[role=spinbutton]:not([aria-valuenow]),base[tabindex]:not([tabindex="0"],[tabindex^="-"]),base[width]:not(img,object,embed,svg,canvas),br[height]:not(img,object,embed,svg,canvas),br[id*=" "],br[lang*=" "],br[role=checkbox]:not([aria-checked]),br[role=combobox]:not([aria-expanded]),br[role=slider]:not([aria-valuemax]),br[role=slider]:not([aria-valuemin]),br[role=slider]:not([aria-valuenow]),br[role=spinbutton]:not([aria-valuemax]),br[role=spinbutton]:not([aria-valuemin]),br[role=spinbutton]:not([aria-valuenow]),br[tabindex]:not([tabindex="0"],[tabindex^="-"]),br[width]:not(img,object,embed,svg,canvas),button a[href],button audio[controls],button button,button details,button embed,button iframe,button img[usemap],button input[type]:not([hidden]),button label,button select,button textarea,button video[controls],button:empty:not([aria-label],[aria-labelledby],[title]),button:not([type],[form],[formaction],[formtarget]),button[aria-label=""],button[aria-labelledby=""],button[class*=disabled]:not([disabled],[readonly]),button[title=""],button[type=button][formaction],button[type=button][formenctype],button[type=button][formmethod],button[type=button][formnovalidate],button[type=button][formtarget],button[type=reset][formaction],button[type=reset][formenctype],button[type=reset][formmethod],button[type=reset][formnovalidate],button[type=reset][formtarget],col[height]:not(img,object,embed,svg,canvas),col[id*=" "],col[lang*=" "],col[role=checkbox]:not([aria-checked]),col[role=combobox]:not([aria-expanded]),col[role=slider]:not([aria-valuemax]),col[role=slider]:not([aria-valuemin]),col[role=slider]:not([aria-valuenow]),col[role=spinbutton]:not([aria-valuemax]),col[role=spinbutton]:not([aria-valuemin]),col[role=spinbutton]:not([aria-valuenow]),col[tabindex]:not([tabindex="0"],[tabindex^="-"]),col[width]:not(img,object,embed,svg,canvas),command[height]:not(img,object,embed,svg,canvas),command[id*=" "],command[lang*=" "],command[role=checkbox]:not([aria-checked]),command[role=combobox]:not([aria-expanded]),command[role=slider]:not([aria-valuemax]),command[role=slider]:not([aria-valuemin]),command[role=slider]:not([aria-valuenow]),command[role=spinbutton]:not([aria-valuemax]),command[role=spinbutton]:not([aria-valuemin]),command[role=spinbutton]:not([aria-valuenow]),command[tabindex]:not([tabindex="0"],[tabindex^="-"]),command[width]:not(img,object,embed,svg,canvas),embed[height]:not(img,object,embed,svg,canvas),embed[id*=" "],embed[lang*=" "],embed[role=checkbox]:not([aria-checked]),embed[role=combobox]:not([aria-expanded]),embed[role=slider]:not([aria-valuemax]),embed[role=slider]:not([aria-valuemin]),embed[role=slider]:not([aria-valuenow]),embed[role=spinbutton]:not([aria-valuemax]),embed[role=spinbutton]:not([aria-valuemin]),embed[role=spinbutton]:not([aria-valuenow]),embed[tabindex]:not([tabindex="0"],[tabindex^="-"]),embed[width]:not(img,object,embed,svg,canvas),form form,form:not([action]),form[action=" "],form[action=""],head :first-child:not([charset]),hr[height]:not(img,object,embed,svg,canvas),hr[id*=" "],hr[lang*=" "],hr[role=checkbox]:not([aria-checked]),hr[role=combobox]:not([aria-expanded]),hr[role=slider]:not([aria-valuemax]),hr[role=slider]:not([aria-valuemin]),hr[role=slider]:not([aria-valuenow]),hr[role=spinbutton]:not([aria-valuemax]),hr[role=spinbutton]:not([aria-valuemin]),hr[role=spinbutton]:not([aria-valuenow]),hr[tabindex]:not([tabindex="0"],[tabindex^="-"]),hr[width]:not(img,object,embed,svg,canvas),html:not([lang]),html[lang*=" "],html[lang=""],iframe:not([title]),iframe[height]:not(img,object,embed,svg,canvas),iframe[id*=" "],iframe[lang*=" "],iframe[role=checkbox]:not([aria-checked]),iframe[role=combobox]:not([aria-expanded]),iframe[role=slider]:not([aria-valuemax]),iframe[role=slider]:not([aria-valuemin]),iframe[role=slider]:not([aria-valuenow]),iframe[role=spinbutton]:not([aria-valuemax]),iframe[role=spinbutton]:not([aria-valuemin]),iframe[role=spinbutton]:not([aria-valuenow]),iframe[tabindex]:not([tabindex="0"],[tabindex^="-"]),iframe[title=" "],iframe[title=""],iframe[width]:not(img,object,embed,svg,canvas),img:not([alt]),img:not([src],[srcset]),img[alt=" "],img[height]:not(img,object,embed,svg,canvas),img[id*=" "],img[lang*=" "],img[role=checkbox]:not([aria-checked]),img[role=combobox]:not([aria-expanded]),img[role=slider]:not([aria-valuemax]),img[role=slider]:not([aria-valuemin]),img[role=slider]:not([aria-valuenow]),img[role=spinbutton]:not([aria-valuemax]),img[role=spinbutton]:not([aria-valuemin]),img[role=spinbutton]:not([aria-valuenow]),img[src=" "],img[src=""],img[src="#"],img[src="/"],img[srcset=" "],img[srcset=""],img[srcset="#"],img[srcset="/"],img[tabindex]:not([tabindex="0"],[tabindex^="-"]),img[width]:not(img,object,embed,svg,canvas),input:not([type=button],[type=submit],[type=hidden],[type=reset],[type=image],[id],[aria-label],[title],[aria-labelledby]),input:not([type]),input[height]:not(img,object,embed,svg,canvas),input[id*=" "],input[lang*=" "],input[role=checkbox]:not([aria-checked]),input[role=combobox]:not([aria-expanded]),input[role=slider]:not([aria-valuemax]),input[role=slider]:not([aria-valuemin]),input[role=slider]:not([aria-valuenow]),input[role=spinbutton]:not([aria-valuemax]),input[role=spinbutton]:not([aria-valuemin]),input[role=spinbutton]:not([aria-valuenow]),input[tabindex]:not([tabindex="0"],[tabindex^="-"]),input[type=" "],input[type=""],input[type=button]:not([value],[title],[aria-label],[aria-labelledby]),input[type=image]:not([alt]),input[type=image]:not([src],[srcset]),input[type=image][alt=" "],input[type=image][src=" "],input[type=image][src=""],input[type=image][src="#"],input[type=image][src="/"],input[type=image][srcset=" "],input[type=image][srcset=""],input[type=image][srcset="#"],input[type=image][srcset="/"],input[type=reset]:not([value],[title],[aria-label],[aria-labelledby]),input[type=submit]:not([value],[title],[aria-label],[aria-labelledby]),input[width]:not(img,object,embed,svg,canvas),keygen[height]:not(img,object,embed,svg,canvas),keygen[id*=" "],keygen[lang*=" "],keygen[role=checkbox]:not([aria-checked]),keygen[role=combobox]:not([aria-expanded]),keygen[role=slider]:not([aria-valuemax]),keygen[role=slider]:not([aria-valuemin]),keygen[role=slider]:not([aria-valuenow]),keygen[role=spinbutton]:not([aria-valuemax]),keygen[role=spinbutton]:not([aria-valuemin]),keygen[role=spinbutton]:not([aria-valuenow]),keygen[tabindex]:not([tabindex="0"],[tabindex^="-"]),keygen[width]:not(img,object,embed,svg,canvas),label label,label[for=" "],label[for=""],link[height]:not(img,object,embed,svg,canvas),link[id*=" "],link[lang*=" "],link[role=checkbox]:not([aria-checked]),link[role=combobox]:not([aria-expanded]),link[role=slider]:not([aria-valuemax]),link[role=slider]:not([aria-valuemin]),link[role=slider]:not([aria-valuenow]),link[role=spinbutton]:not([aria-valuemax]),link[role=spinbutton]:not([aria-valuemin]),link[role=spinbutton]:not([aria-valuenow]),link[tabindex]:not([tabindex="0"],[tabindex^="-"]),link[width]:not(img,object,embed,svg,canvas),map[name*=" "],meta[charset]:not([charset=utf-8],[charset=UTF-8]),meta[height]:not(img,object,embed,svg,canvas),meta[id*=" "],meta[lang*=" "],meta[name=viewport][content*="user-scalable=no"],meta[name=viewport][content*=maximum-scale],meta[name=viewport][content*=minimum-scale],meta[role=checkbox]:not([aria-checked]),meta[role=combobox]:not([aria-expanded]),meta[role=slider]:not([aria-valuemax]),meta[role=slider]:not([aria-valuemin]),meta[role=slider]:not([aria-valuenow]),meta[role=spinbutton]:not([aria-valuemax]),meta[role=spinbutton]:not([aria-valuemin]),meta[role=spinbutton]:not([aria-valuenow]),meta[tabindex]:not([tabindex="0"],[tabindex^="-"]),meta[width]:not(img,object,embed,svg,canvas),meter meter,optgroup:not([label]),param[height]:not(img,object,embed,svg,canvas),param[id*=" "],param[lang*=" "],param[role=checkbox]:not([aria-checked]),param[role=combobox]:not([aria-expanded]),param[role=slider]:not([aria-valuemax]),param[role=slider]:not([aria-valuemin]),param[role=slider]:not([aria-valuenow]),param[role=spinbutton]:not([aria-valuemax]),param[role=spinbutton]:not([aria-valuemin]),param[role=spinbutton]:not([aria-valuenow]),param[tabindex]:not([tabindex="0"],[tabindex^="-"]),param[width]:not(img,object,embed,svg,canvas),progress progress,select:not([id],[aria-label],[aria-labelledby]),select[height]:not(img,object,embed,svg,canvas),select[id*=" "],select[lang*=" "],select[role=checkbox]:not([aria-checked]),select[role=combobox]:not([aria-expanded]),select[role=slider]:not([aria-valuemax]),select[role=slider]:not([aria-valuemin]),select[role=slider]:not([aria-valuenow]),select[role=spinbutton]:not([aria-valuemax]),select[role=spinbutton]:not([aria-valuemin]),select[role=spinbutton]:not([aria-valuenow]),select[tabindex]:not([tabindex="0"],[tabindex^="-"]),select[width]:not(img,object,embed,svg,canvas),source[height]:not(img,object,embed,svg,canvas),source[id*=" "],source[lang*=" "],source[role=checkbox]:not([aria-checked]),source[role=combobox]:not([aria-expanded]),source[role=slider]:not([aria-valuemax]),source[role=slider]:not([aria-valuemin]),source[role=slider]:not([aria-valuenow]),source[role=spinbutton]:not([aria-valuemax]),source[role=spinbutton]:not([aria-valuemin]),source[role=spinbutton]:not([aria-valuenow]),source[tabindex]:not([tabindex="0"],[tabindex^="-"]),source[width]:not(img,object,embed,svg,canvas),svg[height]:not(img,object,embed,svg,canvas),svg[id*=" "],svg[lang*=" "],svg[role=checkbox]:not([aria-checked]),svg[role=combobox]:not([aria-expanded]),svg[role=img]:not([aria-hidden=true],[aria-label],[aria-labelledby]),svg[role=slider]:not([aria-valuemax]),svg[role=slider]:not([aria-valuemin]),svg[role=slider]:not([aria-valuenow]),svg[role=spinbutton]:not([aria-valuemax]),svg[role=spinbutton]:not([aria-valuemin]),svg[role=spinbutton]:not([aria-valuenow]),svg[tabindex]:not([tabindex="0"],[tabindex^="-"]),svg[width]:not(img,object,embed,svg,canvas),table[role=presentation] [axis],table[role=presentation] [headers],table[role=presentation] [scope],table[role=presentation] caption,table[role=presentation] colgroup,table[role=presentation] tfoot,table[role=presentation] th,table[role=presentation] thead,textarea:not([id],[aria-label],[aria-labelledby]),textarea[height]:not(img,object,embed,svg,canvas),textarea[id*=" "],textarea[lang*=" "],textarea[role=checkbox]:not([aria-checked]),textarea[role=combobox]:not([aria-expanded]),textarea[role=slider]:not([aria-valuemax]),textarea[role=slider]:not([aria-valuemin]),textarea[role=slider]:not([aria-valuenow]),textarea[role=spinbutton]:not([aria-valuemax]),textarea[role=spinbutton]:not([aria-valuemin]),textarea[role=spinbutton]:not([aria-valuenow]),textarea[tabindex]:not([tabindex="0"],[tabindex^="-"]),textarea[width]:not(img,object,embed,svg,canvas),title:empty,track[height]:not(img,object,embed,svg,canvas),track[id*=" "],track[lang*=" "],track[role=checkbox]:not([aria-checked]),track[role=combobox]:not([aria-expanded]),track[role=slider]:not([aria-valuemax]),track[role=slider]:not([aria-valuemin]),track[role=slider]:not([aria-valuenow]),track[role=spinbutton]:not([aria-valuemax]),track[role=spinbutton]:not([aria-valuemin]),track[role=spinbutton]:not([aria-valuenow]),track[tabindex]:not([tabindex="0"],[tabindex^="-"]),track[width]:not(img,object,embed,svg,canvas),video[height]:not(img,object,embed,svg,canvas),video[id*=" "],video[lang*=" "],video[role=checkbox]:not([aria-checked]),video[role=combobox]:not([aria-expanded]),video[role=slider]:not([aria-valuemax]),video[role=slider]:not([aria-valuemin]),video[role=slider]:not([aria-valuenow]),video[role=spinbutton]:not([aria-valuemax]),video[role=spinbutton]:not([aria-valuemin]),video[role=spinbutton]:not([aria-valuenow]),video[tabindex]:not([tabindex="0"],[tabindex^="-"]),video[width]:not(img,object,embed,svg,canvas),wbr[height]:not(img,object,embed,svg,canvas),wbr[id*=" "],wbr[lang*=" "],wbr[role=checkbox]:not([aria-checked]),wbr[role=combobox]:not([aria-expanded]),wbr[role=slider]:not([aria-valuemax]),wbr[role=slider]:not([aria-valuemin]),wbr[role=slider]:not([aria-valuenow]),wbr[role=spinbutton]:not([aria-valuemax]),wbr[role=spinbutton]:not([aria-valuemin]),wbr[role=spinbutton]:not([aria-valuenow]),wbr[tabindex]:not([tabindex="0"],[tabindex^="-"]),wbr[width]:not(img,object,embed,svg,canvas){counter-increment:error!important;outline:4px solid #d90b0b!important;outline-offset:-4px!important}:not(colgroup)>col,:not(dl)>dd,:not(dl)>dt,:not(dt,dd)+dd,:not(fieldset)>legend,:not(figure)>figcaption,:not(select)>optgroup,:not(select,optgroup)>option,:not(tr)>td,:not(tr)>th,:not(ul,ol)>li,[class*=NaN],[class*=null],[class*=undefined],[dir=rtl]:not([lang=ar],[lang=he]),[id*=NaN],[id*=null],[id*=undefined],[lang=ar] [lang]:not([dir=ltr]),[lang=ar]:not([dir=rtl]),[lang=he] [lang]:not([dir=ltr]),[lang=he]:not([dir=rtl]),[role=heading]:not([aria-level]),[style],[target$=blank]:not([rel*=noopener]),[target$=blank]:not([rel*=noreferrer]),[target$=blank]:not([rel]),a[href="#"]:not([role=button]),a[href^=javascript]:not([role=button]),abbr div,abbr:not([title]),abbr[title=" "],abbr[title=""],address address,address article,address aside,address footer,address h1,address h2,address h3,address h4,address h5,address h6,address header,address nav,address section,area:not([href])[alt=""][aria-describedby],area:not([href])[alt=""][aria-label],area:not([href])[alt=""][aria-labelledby],area:not([href])[alt=""][title],area:not([href])[alt]:not([alt=""]),area[alt$=".apng"],area[alt$=".doc"],area[alt$=".docx"],area[alt$=".gif"],area[alt$=".ics"],area[alt$=".jpg"],area[alt$=".mov"],area[alt$=".mp3"],area[alt$=".mp4"],area[alt$=".ogg"],area[alt$=".pdf"],area[alt$=".png"],area[alt$=".rar"],area[alt$=".svg"],area[alt$=".svgz"],area[alt$=".txt"],area[alt$=".webp"],area[alt$=".xls"],area[alt$=".zip"],area[alt=""],area[class*=NaN],area[class*=null],area[class*=undefined],area[id*=NaN],area[id*=null],area[id*=undefined],area[role=presentation],area[style],article main,article>article:first-child,article>aside:first-child,article>section:first-child,aside main,aside>article:first-child,aside>aside:first-child,aside>section:first-child,audio:not([controls]),audio[autoplay],audio[class*=NaN],audio[class*=null],audio[class*=undefined],audio[id*=NaN],audio[id*=null],audio[id*=undefined],audio[style],b div,base[class*=NaN],base[class*=null],base[class*=undefined],base[id*=NaN],base[id*=null],base[id*=undefined],base[style],body :empty:not([hidden],[aria-hidden],[src],button,a,iframe,textarea,area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr,title),br[class*=NaN],br[class*=null],br[class*=undefined],br[id*=NaN],br[id*=null],br[id*=undefined],br[style],canvas[aria-hidden=true][aria-describedby],canvas[aria-hidden=true][aria-label],canvas[aria-hidden=true][aria-labelledby],canvas[aria-hidden=true][title],canvas[role=presentation],cite div,code div,col[class*=NaN],col[class*=null],col[class*=undefined],col[id*=NaN],col[id*=null],col[id*=undefined],col[style],colgroup :not(col),command[class*=NaN],command[class*=null],command[class*=undefined],command[id*=NaN],command[id*=null],command[id*=undefined],command[style],details>:not(summary):first-child,details>summary:not(:first-child),dl>:not(dt,dd,div),dt+:not(dd),em div,embed[class*=NaN],embed[class*=null],embed[class*=undefined],embed[id*=NaN],embed[id*=null],embed[id*=undefined],embed[role=presentation],embed[style],embed[type=image][alt$=".apng"],embed[type=image][alt$=".doc"],embed[type=image][alt$=".docx"],embed[type=image][alt$=".gif"],embed[type=image][alt$=".ics"],embed[type=image][alt$=".jpg"],embed[type=image][alt$=".mov"],embed[type=image][alt$=".mp3"],embed[type=image][alt$=".mp4"],embed[type=image][alt$=".ogg"],embed[type=image][alt$=".pdf"],embed[type=image][alt$=".png"],embed[type=image][alt$=".rar"],embed[type=image][alt$=".svg"],embed[type=image][alt$=".svgz"],embed[type=image][alt$=".txt"],embed[type=image][alt$=".webp"],embed[type=image][alt$=".xls"],embed[type=image][alt$=".zip"],embed[type=image][alt=""],embed[type=image][aria-hidden=true][aria-describedby],embed[type=image][aria-hidden=true][aria-label],embed[type=image][aria-hidden=true][aria-labelledby],embed[type=image][aria-hidden=true][title],fieldset>:not(legend):first-child,fieldset>legend:not(:first-child),figure:not([role=group]),footer main,header main,hr[class*=NaN],hr[class*=null],hr[class*=undefined],hr[id*=NaN],hr[id*=null],hr[id*=undefined],hr[style],i div,iframe[class*=NaN],iframe[class*=null],iframe[class*=undefined],iframe[id*=NaN],iframe[id*=null],iframe[id*=undefined],iframe[style],img[alt$=".apng"],img[alt$=".doc"],img[alt$=".docx"],img[alt$=".gif"],img[alt$=".ics"],img[alt$=".jpg"],img[alt$=".mov"],img[alt$=".mp3"],img[alt$=".mp4"],img[alt$=".ogg"],img[alt$=".pdf"],img[alt$=".png"],img[alt$=".rar"],img[alt$=".svg"],img[alt$=".svgz"],img[alt$=".txt"],img[alt$=".webp"],img[alt$=".xls"],img[alt$=".zip"],img[alt=""],img[alt=""][aria-describedby],img[alt=""][aria-label],img[alt=""][aria-labelledby],img[alt=""][title],img[class*=NaN],img[class*=null],img[class*=undefined],img[id*=NaN],img[id*=null],img[id*=undefined],img[role=presentation],img[src*="1px.gif"]:not([role=presentation]),img[src*="1x1.gif"]:not([role=presentation]),img[src*="clear.gif"]:not([role=presentation]),img[src*="dotclear.gif"]:not([role=presentation]),img[src*="pixel-1x1-clear.gif"]:not([role=presentation]),img[src*="spacer.gif"]:not([role=presentation]),img[src*="transparent.gif"]:not([role=presentation]),img[style],input[class*=NaN],input[class*=null],input[class*=undefined],input[id*=NaN],input[id*=null],input[id*=undefined],input[style],input[type=image][alt$=".apng"],input[type=image][alt$=".doc"],input[type=image][alt$=".docx"],input[type=image][alt$=".gif"],input[type=image][alt$=".ics"],input[type=image][alt$=".jpg"],input[type=image][alt$=".mov"],input[type=image][alt$=".mp3"],input[type=image][alt$=".mp4"],input[type=image][alt$=".ogg"],input[type=image][alt$=".pdf"],input[type=image][alt$=".png"],input[type=image][alt$=".rar"],input[type=image][alt$=".svg"],input[type=image][alt$=".svgz"],input[type=image][alt$=".txt"],input[type=image][alt$=".webp"],input[type=image][alt$=".xls"],input[type=image][alt$=".zip"],input[type=image][alt=""],keygen[class*=NaN],keygen[class*=null],keygen[class*=undefined],keygen[id*=NaN],keygen[id*=null],keygen[id*=undefined],keygen[style],label div,label:not([for]),link[class*=NaN],link[class*=null],link[class*=undefined],link[id*=NaN],link[id*=null],link[id*=undefined],link[style],meta[class*=NaN],meta[class*=null],meta[class*=undefined],meta[id*=NaN],meta[id*=null],meta[id*=undefined],meta[style],nav main,object[role=presentation],object[type=image][alt$=".apng"],object[type=image][alt$=".doc"],object[type=image][alt$=".docx"],object[type=image][alt$=".gif"],object[type=image][alt$=".ics"],object[type=image][alt$=".jpg"],object[type=image][alt$=".mov"],object[type=image][alt$=".mp3"],object[type=image][alt$=".mp4"],object[type=image][alt$=".ogg"],object[type=image][alt$=".pdf"],object[type=image][alt$=".png"],object[type=image][alt$=".rar"],object[type=image][alt$=".svg"],object[type=image][alt$=".svgz"],object[type=image][alt$=".txt"],object[type=image][alt$=".webp"],object[type=image][alt$=".xls"],object[type=image][alt$=".zip"],object[type=image][alt=""],object[type=image][aria-hidden=true][aria-describedby],object[type=image][aria-hidden=true][aria-label],object[type=image][aria-hidden=true][aria-labelledby],object[type=image][aria-hidden=true][title],ol>:not(li),optgroup>:not(option),param[class*=NaN],param[class*=null],param[class*=undefined],param[id*=NaN],param[id*=null],param[id*=undefined],param[style],q div,section>section:first-child,select>:not(option,optgroup),select[class*=NaN],select[class*=null],select[class*=undefined],select[id*=NaN],select[id*=null],select[id*=undefined],select[style],small div,source[class*=NaN],source[class*=null],source[class*=undefined],source[id*=NaN],source[id*=null],source[id*=undefined],source[style],span div,strong div,svg:not([aria-hidden=true],[role=img]),svg[aria-hidden=true][aria-describedby],svg[aria-hidden=true][aria-label],svg[aria-hidden=true][aria-labelledby],svg[aria-hidden=true][title],svg[class*=NaN],svg[class*=null],svg[class*=undefined],svg[id*=NaN],svg[id*=null],svg[id*=undefined],svg[role=presentation],svg[style],table table,table:not([role=presentation])>:first-child:not(caption),table:not([role=presentation])>caption+tbody,table:not([role=presentation])>caption:not(:first-child),table:not([role=presentation])>tbody:first-child,table:not([role=presentation])>tbody>tr:only-child,table:not([role=presentation])>tr:only-child,table>:not(thead,tfoot,tbody,tr,colgroup,caption),table>tbody~colgroup,table>tbody~tfoot,table>tbody~thead,table>tfoot~colgroup,table>tfoot~thead,textarea[class*=NaN],textarea[class*=null],textarea[class*=undefined],textarea[id*=NaN],textarea[id*=null],textarea[id*=undefined],textarea[style],th:not([scope],[id]),tr>:not(td,th),track[class*=NaN],track[class*=null],track[class*=undefined],track[id*=NaN],track[id*=null],track[id*=undefined],track[style],ul>:not(li),video:not([controls]),video[autoplay],video[class*=NaN],video[class*=null],video[class*=undefined],video[id*=NaN],video[id*=null],video[id*=undefined],video[style],wbr[class*=NaN],wbr[class*=null],wbr[class*=undefined],wbr[id*=NaN],wbr[id*=null],wbr[id*=undefined],wbr[style]{counter-increment:warning!important;outline:4px solid #f50!important;outline-offset:-4px!important}[dropzone],a[charset],a[coords],a[datafld],a[datasrc],a[methods],a[name],a[rev],a[shape],a[urn],acronym,applet,applet[datafld],applet[datasrc],area[hreflang],area[nohref],area[type],basefont,bgsound,big,blink,body[alink],body[background],body[bgcolor],body[link],body[marginbottom],body[marginheight],body[marginleft],body[marginright],body[margintop],body[marginwidth],body[text],body[vlink],br[clear],button[datafld],button[dataformatas],button[datasrc],caption[align],center,col[align],col[char],col[charoff],col[valign],col[width],dir,div[align],div[datafld],div[dataformatas],div[datasrc],dl[compact],embed[align],embed[hspace],embed[name],embed[vspace],fieldset[datafld],font,form[accept],frame,frame[datafld],frame[datasrc],frameset,h1[align],h2[align],h3[align],h4[align],h5[align],h6[align],head[profile],hgroup,hr[align],hr[color],hr[noshade],hr[size],hr[width],html[version],iframe[align],iframe[allowtransparency],iframe[datafld],iframe[datasrc],iframe[frameborder],iframe[framespacing],iframe[hspace],iframe[longdesc],iframe[marginheight],iframe[marginwidth],iframe[scrolling],iframe[vspace],img[align],img[border],img[datafld],img[datasrc],img[hspace],img[longdesc],img[lowsrc],img[name],img[vspace],input[align],input[datafld],input[dataformatas],input[datasrc],input[hspace],input[inputmode],input[ismap],input[usemap],input[vspace],isindex,keygen,label[datafld],label[dataformatas],label[datasrc],legend[align],legend[datafld],legend[dataformatas],legend[datasrc],li[type],link[charset],link[methods],link[rev],link[target],link[urn],listing,marquee,marquee[datafld],marquee[dataformatas],marquee[datasrc],menu,menuitem,meta[http-equiv=content-language],meta[http-equiv=content-type],meta[http-equiv=set-cookie],meta[scheme],multicol,nextid,nobr,noembed,noframes,object[align],object[archive],object[border],object[classid],object[code],object[codebase],object[codetype],object[datafld],object[dataformatas],object[datasrc],object[declare],object[hspace],object[standby],object[vspace],ol[compact],option[dataformatas],option[datasrc],option[name],p[align],param[datafld],param[type],param[valuetype],plaintext,pre[width],rb,rtc,script[event],script[for],script[language],select[datafld],select[dataformatas],select[datasrc],spacer,span[datafld],span[dataformatas],span[datasrc],strike,table[align],table[background],table[bgcolor],table[cellpadding],table[cellspacing],table[dataformatas],table[datapagesize],table[datasrc],table[frame],table[rules],table[summary],table[width],tbody[align],tbody[background],tbody[char],tbody[charoff],tbody[valign],td[abbr],td[align],td[axis],td[background],td[bgcolor],td[char],td[charoff],td[height],td[nowrap],td[scope],td[valign],td[width],textarea[datafld],textarea[datasrc],tfoot[align],tfoot[background],tfoot[char],tfoot[charoff],tfoot[valign],th[align],th[axis],th[background],th[bgcolor],th[char],th[charoff],th[height],th[nowrap],th[valign],th[width],thead[align],thead[background],thead[char],thead[charoff],thead[valign],tr[align],tr[background],tr[bgcolor],tr[char],tr[charoff],tr[valign],tt,ul[compact],ul[type],xmp{counter-increment:obsolete!important;outline:4px solid #4169e1!important;outline-offset:-4px!important}[aria-hidden=true]:not(:empty),[aria-required],[class*=search]:not([role=search]),[class=" "],[class=""],[datetime],[download],[hidden]:not(:empty),[href$=".apng"]:not(link),[href$=".doc"]:not(link),[href$=".docx"]:not(link),[href$=".gif"]:not(link),[href$=".ics"]:not(link),[href$=".jpg"]:not(link),[href$=".mov"]:not(link),[href$=".mp3"]:not(link),[href$=".mp4"]:not(link),[href$=".ogg"]:not(link),[href$=".pdf"]:not(link),[href$=".png"]:not(link),[href$=".rar"]:not(link),[href$=".svg"]:not(link),[href$=".svgz"]:not(link),[href$=".txt"]:not(link),[href$=".webp"]:not(link),[href$=".xls"]:not(link),[href$=".zip"]:not(link),[href^="http:"],[href^=mailto],[href^=tel],[id*=search]:not([role=search]),[id=" "],[id=""],[placeholder]:not([title],[aria-label],[aria-labelledby]),[required],[role=banner]~[role=banner],[role=contentinfo]~[role=contentinfo],[role=main]~[role=main],[role=search]~[role=search],[src^="http:"],[target$=blank],a:not([href]),a[role=button],area[alt][title],area[aria-hidden=true]:not(:empty),area[class=" "],area[class=""],area[hidden]:not(:empty),area[id=" "],area[id=""],audio,audio[aria-hidden=true]:not(:empty),audio[class=" "],audio[class=""],audio[hidden]:not(:empty),audio[id=" "],audio[id=""],base[aria-hidden=true]:not(:empty),base[class=" "],base[class=""],base[hidden]:not(:empty),base[id=" "],base[id=""],br[aria-hidden=true]:not(:empty),br[class=" "],br[class=""],br[hidden]:not(:empty),br[id=" "],br[id=""],col[aria-hidden=true]:not(:empty),col[class=" "],col[class=""],col[hidden]:not(:empty),col[id=" "],col[id=""],command[aria-hidden=true]:not(:empty),command[class=" "],command[class=""],command[hidden]:not(:empty),command[id=" "],command[id=""],embed[aria-hidden=true]:not(:empty),embed[class=" "],embed[class=""],embed[hidden]:not(:empty),embed[id=" "],embed[id=""],figcaption:not(:first-child,:last-child),figcaption:not(:first-of-type),hr[aria-hidden=true]:not(:empty),hr[class=" "],hr[class=""],hr[hidden]:not(:empty),hr[id=" "],hr[id=""],iframe[aria-hidden=true]:not(:empty),iframe[class=" "],iframe[class=""],iframe[hidden]:not(:empty),iframe[id=" "],iframe[id=""],img[alt][title],img[aria-hidden=true]:not(:empty),img[class=" "],img[class=""],img[hidden]:not(:empty),img[id=" "],img[id=""],input[aria-hidden=true]:not(:empty),input[aria-required],input[class*=search]:not([role=search]),input[class=" "],input[class=""],input[hidden]:not(:empty),input[id*=search]:not([role=search]),input[id=" "],input[id=""],input[required],keygen[aria-hidden=true]:not(:empty),keygen[class=" "],keygen[class=""],keygen[hidden]:not(:empty),keygen[id=" "],keygen[id=""],link[aria-hidden=true]:not(:empty),link[class=" "],link[class=""],link[hidden]:not(:empty),link[id=" "],link[id=""],main~main:not([hidden]),meta[aria-hidden=true]:not(:empty),meta[class=" "],meta[class=""],meta[hidden]:not(:empty),meta[id=" "],meta[id=""],param[aria-hidden=true]:not(:empty),param[class=" "],param[class=""],param[hidden]:not(:empty),param[id=" "],param[id=""],select[aria-hidden=true]:not(:empty),select[aria-required],select[class=" "],select[class=""],select[hidden]:not(:empty),select[id=" "],select[id=""],select[required],select[required]:not([multiple])[size="1"],select[required]:not([multiple],[size]),source[aria-hidden=true]:not(:empty),source[class=" "],source[class=""],source[hidden]:not(:empty),source[id=" "],source[id=""],svg[aria-hidden=true]:not(:empty),svg[aria-label][title],svg[class=" "],svg[class=""],svg[hidden]:not(:empty),svg[id=" "],svg[id=""],table[role=presentation],textarea[aria-hidden=true]:not(:empty),textarea[aria-required],textarea[class=" "],textarea[class=""],textarea[hidden]:not(:empty),textarea[id=" "],textarea[id=""],textarea[required],th[scope],time,track[aria-hidden=true]:not(:empty),track[class=" "],track[class=""],track[hidden]:not(:empty),track[id=" "],track[id=""],video,video[aria-hidden=true]:not(:empty),video[class=" "],video[class=""],video[hidden]:not(:empty),video[id=" "],video[id=""],wbr[aria-hidden=true]:not(:empty),wbr[class=" "],wbr[class=""],wbr[hidden]:not(:empty),wbr[id=" "],wbr[id=""]{counter-increment:advice!important;outline:4px solid green!important;outline-offset:-4px!important}[role=search] [class*=search]:not([role=search]),[role=search] [id*=search]:not([role=search]),fieldset [type=radio],form button:not([type],[form],[formaction],[formtarget]),label [placeholder]:not([title],[aria-label],[aria-labelledby]),svg :empty:not(title,desc,[hidden],[aria-hidden],[src],button,a,iframe,textarea,area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr){counter-increment:none!important;outline:0!important}[role=search] [class*=search]:not([role=search])+:before,[role=search] [class*=search]:not([role=search]):after,[role=search] [id*=search]:not([role=search])+:before,[role=search] [id*=search]:not([role=search]):after,fieldset [type=radio]+:before,fieldset [type=radio]:after,form button:not([type],[form],[formaction],[formtarget])+:before,form button:not([type],[form],[formaction],[formtarget]):after,label [placeholder]:not([title],[aria-label],[aria-labelledby])+:before,label [placeholder]:not([title],[aria-label],[aria-labelledby]):after,svg :empty:not(title,desc,[hidden],[aria-hidden],[src],button,a,iframe,textarea,area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr)+:before,svg :empty:not(title,desc,[hidden],[aria-hidden],[src],button,a,iframe,textarea,area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr):after{content:""!important;display:none!important}head :first-child:not([charset]),head :first-child:not([charset])~link:last-of-type,link[charset],link[charset]~link:last-of-type,link[methods],link[methods]~link:last-of-type,link[rev],link[rev]~link:last-of-type,link[target],link[target]~link:last-of-type,link[urn],link[urn]~link:last-of-type,meta[charset]:not([charset=utf-8],[charset=UTF-8]),meta[charset]:not([charset=utf-8],[charset=UTF-8])~link:last-of-type,meta[http-equiv=content-language],meta[http-equiv=content-language]~link:last-of-type,meta[http-equiv=content-type],meta[http-equiv=content-type]~link:last-of-type,meta[http-equiv=set-cookie],meta[http-equiv=set-cookie]~link:last-of-type,meta[name=viewport][content*="user-scalable=no"],meta[name=viewport][content*="user-scalable=no"]~link:last-of-type,meta[name=viewport][content*=maximum-scale],meta[name=viewport][content*=maximum-scale]~link:last-of-type,meta[name=viewport][content*=minimum-scale],meta[name=viewport][content*=minimum-scale]~link:last-of-type,meta[scheme],meta[scheme]~link:last-of-type,script[event],script[event]~link:last-of-type,script[for],script[for]~link:last-of-type,script[language],script[language]~link:last-of-type,title:empty{display:block!important}html{counter-reset:error warning obsolete advice}body:after{background-color:#3e4b55;background-image:linear-gradient(180deg,transparent,transparent 1.4em,#d90b0b 0,#d90b0b 1.6em,transparent 0,transparent 2.9em,#f50 0,#f50 3.1em,transparent 0,transparent 4.4em,#4169e1 0,#4169e1 4.6em,transparent 0,transparent 5.9em,green 0,green 6.1em,transparent 0,transparent);background-position:.5em 0;background-repeat:no-repeat;background-size:.5em 100%;color:#fcf9e9;contain:content;content:"Errors" ": " counter(error) "\\a" "Warnings" ": " counter(warning) "\\a" "Obsoletes" ": " counter(obsolete) "\\a" "Advices" ": " counter(advice) "\\a";font:700 18px/1.5 sans-serif;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;height:auto;inset:auto auto 1em 1em;padding:.75em 1em .75em 1.5em;position:fixed;white-space:pre;width:auto;z-index:2147483647}head{display:block}head *{display:none}select[required]:not([multiple])[size="1"]+:before,select[required]:not([multiple],[size])+:before{background:green!important;content:' {props.children}
); }; export default Select; ================================================ FILE: desktop-app/src/renderer/components/Spinner/index.tsx ================================================ import {Icon} from '@iconify/react'; interface Props { spinnerHeight?: number; } const Spinner = ({spinnerHeight = undefined}: Props) => { return ( ); }; export default Spinner; ================================================ FILE: desktop-app/src/renderer/components/Sponsorship/index.tsx ================================================ import {useEffect, useMemo, useState} from 'react'; import {IPC_MAIN_CHANNELS} from 'common/constants'; import Modal from '../Modal'; import Icon from '../../assets/img/logo.png'; import Button from '../Button'; const CONTENT_COPY = [ { id: 'level-up', title: 'Level Up: Support Us as a Sponsor!', content1: `Join us on an incredible journey! By becoming a sponsor, you'll fuel Responsively App's progress, ensuring a smooth and amazing experience for all users.`, content2: `Support us today and let's embark on this exciting adventure together!`, }, { id: 'elevate-your-impact', title: 'Elevate Your Impact: Sponsor Responsively App!', content1: `Take part in an extraordinary mission! By sponsoring Responsively App, you'll empower our growth and enhance the user experience for everyone.`, content2: `Make a difference today and let's forge ahead on this thrilling journey!`, }, { id: 'unlock-the-future', title: 'Unlock the Future: Sponsor Responsively App!', content1: `Join us in unlocking limitless possibilities! By sponsoring Responsively App, you'll drive our progress and unlock an exceptional user experience.`, content2: `Support our vision now and let's embark on an exhilarating ride together!`, }, { id: 'ignite-innovation', title: 'Ignite Innovation: Become a Sponsor of Responsively App!', content1: `Be a catalyst for innovation! By sponsoring Responsively App, you'll ignite our growth and fuel an extraordinary user experience.`, content2: `Support our pursuit of excellence today and let's embark on an inspiring journey together!`, }, { id: 'power-the-revolution', title: 'Power the Revolution: Sponsor Responsively App!', content1: `Join the revolution and power our mission! By becoming a sponsor, you'll drive our progress and revolutionize the user experience.`, content2: `Support us today and let's embark on a groundbreaking adventure together!`, }, { id: 'supercharge-success', title: 'Supercharge Success: Sponsor Responsively App!', content1: `Supercharge your impact! By sponsoring Responsively App, you'll fuel our success and empower an exceptional user experience.`, content2: `Support our mission now and let's embark on an exhilarating journey together!`, }, ]; export const Sponsorship = () => { const [isOpen, setIsOpen] = useState(false); useEffect(() => { const lastShownMs = window.electron.store.get('sponsorship.lastShown'); const now = Date.now(); if (lastShownMs === undefined || now - lastShownMs > 1000 * 60 * 60 * 24 * 7) { setIsOpen(true); } }, []); const onClose = () => { window.electron.store.set('sponsorship.lastShown', Date.now()); setIsOpen(false); }; // Choose a random content copy const contentCopy = useMemo( () => CONTENT_COPY[Math.floor(Math.random() * CONTENT_COPY.length)], [] ); return (
Logo
{contentCopy.title}
} isOpen={isOpen} onClose={onClose} >

{contentCopy.content1}

{contentCopy.content2}

); }; ================================================ FILE: desktop-app/src/renderer/components/Toggle/index.tsx ================================================ interface Props { isOn: boolean; onChange?: React.ChangeEventHandler; } const Toggle = ({isOn, onChange}: Props) => { return ( // eslint-disable-next-line jsx-a11y/label-has-associated-control