@bigbinary/neeto-molecules 1.1.10 → 1.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (474) hide show
  1. package/dist/AutoSaveInput/autosaveinput.scss +15 -0
  2. package/dist/AutoSaveInput/constants.js +13 -0
  3. package/dist/AutoSaveInput/index.js +124 -0
  4. package/dist/AutoSaveInput/utils.js +10 -0
  5. package/dist/Breadcrumbs/breadcrumbs.scss +33 -0
  6. package/dist/Breadcrumbs/index.js +31 -0
  7. package/dist/BrowserSupport/Callout.js +15 -0
  8. package/dist/BrowserSupport/ContactUs.js +21 -0
  9. package/dist/BrowserSupport/DownloadLink.js +17 -0
  10. package/dist/BrowserSupport/PartialSupportedBrowserVersion.js +17 -0
  11. package/dist/BrowserSupport/UnknownBrowser.js +13 -0
  12. package/dist/BrowserSupport/UnsupportedBrowser.js +24 -0
  13. package/dist/BrowserSupport/UnsupportedBrowserMessage.js +22 -0
  14. package/dist/BrowserSupport/UnsupportedBrowserVersion.js +27 -0
  15. package/dist/BrowserSupport/UnsupportedVersionMessage.js +30 -0
  16. package/dist/BrowserSupport/browsersupport.scss +71 -0
  17. package/dist/BrowserSupport/constants.js +63 -0
  18. package/dist/BrowserSupport/index.js +58 -0
  19. package/dist/BrowserSupport/utils.js +32 -0
  20. package/dist/CalendarView/CustomDatePicker.js +87 -0
  21. package/dist/CalendarView/Header.js +53 -0
  22. package/dist/CalendarView/constants.js +19 -0
  23. package/dist/CalendarView/index.js +83 -0
  24. package/dist/CalendarView/utils.js +50 -0
  25. package/dist/Codeblock/index.js +30 -0
  26. package/dist/{Columns.js → Columns/index.js} +13 -130
  27. package/dist/Columns/utils.js +20 -0
  28. package/dist/ConfirmationModal/constants.js +3 -0
  29. package/dist/{ConfirmationModal.js → ConfirmationModal/index.js} +7 -23
  30. package/dist/ConfirmationModal/utils.js +10 -0
  31. package/dist/Container/container.scss +21 -0
  32. package/dist/Container/index.js +23 -0
  33. package/dist/CopyToClipboardButton/constants.js +13 -0
  34. package/dist/CopyToClipboardButton/copyToClipboard.scss +22 -0
  35. package/dist/CopyToClipboardButton/index.js +59 -0
  36. package/dist/CustomDomain/index.js +98 -0
  37. package/dist/CustomDomainDashboard/DeleteAlert.js +28 -0
  38. package/dist/CustomDomainDashboard/Header.js +32 -0
  39. package/dist/CustomDomainDashboard/Manage/Record.js +42 -0
  40. package/dist/CustomDomainDashboard/Manage/StatusInfo.js +21 -0
  41. package/dist/CustomDomainDashboard/Manage/TagBlock.js +36 -0
  42. package/dist/CustomDomainDashboard/Manage/constants.js +4 -0
  43. package/dist/CustomDomainDashboard/Manage/index.js +124 -0
  44. package/dist/CustomDomainDashboard/Manage/utils.js +8 -0
  45. package/dist/CustomDomainDashboard/api.js +35 -0
  46. package/dist/CustomDomainDashboard/constants.js +2 -0
  47. package/dist/CustomDomainDashboard/index.js +118 -0
  48. package/dist/CustomDomainDashboard/useCustomDomainApi.js +71 -0
  49. package/dist/CustomDomainDashboard/utils.js +84 -0
  50. package/dist/{DateFormat.js → DateFormat/index.js} +8 -25
  51. package/dist/DateRangeFilter/index.js +60 -0
  52. package/dist/DateRangeFilter/utils.js +113 -0
  53. package/dist/DynamicVariables/dynamic-variables.scss +34 -0
  54. package/dist/DynamicVariables/index.js +59 -0
  55. package/dist/DynamicVariables/utils.js +37 -0
  56. package/dist/EmailForm/EmailForm.js +97 -0
  57. package/dist/EmailForm/EmailFormProvider.js +45 -0
  58. package/dist/EmailForm/EmailPreview.js +129 -0
  59. package/dist/EmailForm/ReplyToField.js +55 -0
  60. package/dist/EmailForm/SendToField.js +27 -0
  61. package/dist/EmailForm/SubjectField.js +64 -0
  62. package/dist/EmailForm/constants.js +33 -0
  63. package/dist/EmailForm/contexts/EmailForm.js +7 -0
  64. package/dist/EmailForm/index.js +4 -0
  65. package/dist/EmailForm/utils.js +10 -0
  66. package/dist/EmailPreview/index.js +2 -0
  67. package/dist/{ErrorPage.js → ErrorPage/constants.js} +36 -175
  68. package/dist/ErrorPage/index.js +78 -0
  69. package/dist/Header/Breadcrumbs.js +31 -0
  70. package/dist/Header/Dropdown.js +12 -0
  71. package/dist/Header/constants.js +6 -0
  72. package/dist/Header/header.scss +121 -0
  73. package/dist/Header/index.js +61 -0
  74. package/dist/IconPicker/Icon.js +34 -0
  75. package/dist/IconPicker/NoResults.js +12 -0
  76. package/dist/IconPicker/constants.js +8 -0
  77. package/dist/IconPicker/icon-picker.scss +1 -0
  78. package/dist/IconPicker/index.js +164 -0
  79. package/dist/ImageWithFallback/ImagePlaceholder.js +16 -0
  80. package/dist/ImageWithFallback/index.js +31 -0
  81. package/dist/IntegrationCard/Dropdown.js +45 -0
  82. package/dist/IntegrationCard/Status.js +25 -0
  83. package/dist/IntegrationCard/index.js +128 -0
  84. package/dist/IntegrationDisconnectAlert/index.js +36 -0
  85. package/dist/{IntegrationWalkthroughModal.js → IntegrationWalkthroughModal/index.js} +6 -8
  86. package/dist/IpRestriction/AllowedIpRanges.js +72 -0
  87. package/dist/IpRestriction/CurrentIp.js +26 -0
  88. package/dist/IpRestriction/FormRow.js +77 -0
  89. package/dist/IpRestriction/Row.js +86 -0
  90. package/dist/IpRestriction/apis/allowed_ip_ranges.js +28 -0
  91. package/dist/IpRestriction/apis/current_ip.js +11 -0
  92. package/dist/IpRestriction/apis/ip_restriction.js +16 -0
  93. package/dist/IpRestriction/constants.js +11 -0
  94. package/dist/IpRestriction/hooks/reactQuery/useAllowedIpRanges.js +34 -0
  95. package/dist/IpRestriction/hooks/reactQuery/useCurrentIp.js +10 -0
  96. package/dist/IpRestriction/hooks/reactQuery/useIpRestrictions.js +18 -0
  97. package/dist/IpRestriction/index.js +102 -0
  98. package/dist/IpRestriction/utils.js +67 -0
  99. package/dist/KeyboardShortcuts/Pane/HotKey.js +44 -0
  100. package/dist/KeyboardShortcuts/Pane/HotKeyList.js +42 -0
  101. package/dist/KeyboardShortcuts/Pane/constants.js +25 -0
  102. package/dist/KeyboardShortcuts/Pane/index.js +61 -0
  103. package/dist/KeyboardShortcuts/Pane/keyboard-shortcuts.scss +5 -0
  104. package/dist/KeyboardShortcuts/Pane/utils.js +66 -0
  105. package/dist/KeyboardShortcuts/hooks/useKeyboardShortcutsPaneState.js +31 -0
  106. package/dist/KeyboardShortcuts/index.js +9 -0
  107. package/dist/LoginPage/Form.js +57 -0
  108. package/dist/LoginPage/constants.js +12 -0
  109. package/dist/LoginPage/index.js +103 -0
  110. package/dist/MenuBar/AddNew.js +25 -0
  111. package/dist/MenuBar/Block.js +60 -0
  112. package/dist/MenuBar/Item.js +32 -0
  113. package/dist/MenuBar/Search.js +39 -0
  114. package/dist/MenuBar/SubTitle.js +23 -0
  115. package/dist/MenuBar/index.js +46 -0
  116. package/dist/MenuBar/menubar.scss +154 -0
  117. package/dist/Metadata/Block.js +30 -0
  118. package/dist/Metadata/DetailsBlock.js +86 -0
  119. package/dist/Metadata/constants.js +9 -0
  120. package/dist/Metadata/index.js +29 -0
  121. package/dist/Metadata/metadata.scss +15 -0
  122. package/dist/MoreDropdown/constants.js +25 -0
  123. package/dist/{MoreDropdown.js → MoreDropdown/index.js} +9 -102
  124. package/dist/NavigationHeader/LeftBlock.js +32 -0
  125. package/dist/NavigationHeader/Navigation.js +24 -0
  126. package/dist/NavigationHeader/RightBlock.js +68 -0
  127. package/dist/NavigationHeader/constants.js +11 -0
  128. package/dist/NavigationHeader/index.js +19 -0
  129. package/dist/NavigationHeader/navigation-header.scss +3 -0
  130. package/dist/NeetoWidget/CodeBlock.js +57 -0
  131. package/dist/NeetoWidget/CodeSnippet.js +119 -0
  132. package/dist/NeetoWidget/EmbedCode.js +281 -0
  133. package/dist/NeetoWidget/Main.js +19 -0
  134. package/dist/NeetoWidget/SelectionSwitches/TooltipSwitch.js +25 -0
  135. package/dist/NeetoWidget/SelectionSwitches/index.js +44 -0
  136. package/dist/NeetoWidget/SyntaxHighlighter.js +17 -0
  137. package/dist/NeetoWidget/api.js +20 -0
  138. package/dist/NeetoWidget/constants.js +62 -0
  139. package/dist/NeetoWidget/hooks/useForceUpdate.js +14 -0
  140. package/dist/NeetoWidget/index.js +7 -0
  141. package/dist/NeetoWidget/mutations.js +9 -0
  142. package/dist/NeetoWidget/queries.js +32 -0
  143. package/dist/NeetoWidget/utils.js +83 -0
  144. package/dist/PageLoader/index.js +81 -0
  145. package/dist/PageLoader/page-loader.scss +95 -0
  146. package/dist/PhoneNumber/CountryPicker/SingleValue.js +21 -0
  147. package/dist/PhoneNumber/CountryPicker/constants.js +26 -0
  148. package/dist/PhoneNumber/CountryPicker/index.js +59 -0
  149. package/dist/PhoneNumber/FormikPhoneNumberInput.js +21 -0
  150. package/dist/PhoneNumber/PhoneNumber.js +30 -0
  151. package/dist/PhoneNumber/PhoneNumberInput.js +79 -0
  152. package/dist/PhoneNumber/index.js +5 -0
  153. package/dist/PhoneNumber/utils.js +55 -0
  154. package/dist/PublishBlock/AlertBlock.js +14 -0
  155. package/dist/PublishBlock/index.js +100 -0
  156. package/dist/PublishBlock/publish-block.scss +25 -0
  157. package/dist/Rename/DummySpan.js +21 -0
  158. package/dist/Rename/constants.js +1 -0
  159. package/dist/Rename/index.js +191 -0
  160. package/dist/Rename/rename.scss +69 -0
  161. package/dist/Rename/utils.js +10 -0
  162. package/dist/ResponsiveDevicePicker/constants.js +19 -0
  163. package/dist/ResponsiveDevicePicker/index.js +36 -0
  164. package/dist/Schedule/DisplayAvailability.js +58 -0
  165. package/dist/Schedule/Fields.js +43 -0
  166. package/dist/Schedule/Form/ScheduleRow.js +125 -0
  167. package/dist/Schedule/Form/constants.js +20 -0
  168. package/dist/Schedule/Form/index.js +144 -0
  169. package/dist/Schedule/Form/utils.js +63 -0
  170. package/dist/Schedule/Header.js +76 -0
  171. package/dist/Schedule/ScheduleContext.js +8 -0
  172. package/dist/Schedule/constants.js +8 -0
  173. package/dist/Schedule/dayjsExtended/constants.js +1 -0
  174. package/dist/Schedule/dayjsExtended/index.js +14 -0
  175. package/dist/Schedule/dayjsExtended/range.js +73 -0
  176. package/dist/Schedule/index.js +80 -0
  177. package/dist/Schedule/utils.js +152 -0
  178. package/dist/Scrollable/constants.js +8 -0
  179. package/dist/Scrollable/index.js +26 -0
  180. package/dist/Scrollable/scrollable.scss +32 -0
  181. package/dist/Security/AllowedKeywords/Add.js +38 -0
  182. package/dist/Security/AllowedKeywords/index.js +38 -0
  183. package/dist/Security/PasswordBlock.js +31 -0
  184. package/dist/Security/RadioBlock.js +38 -0
  185. package/dist/Security/api.js +12 -0
  186. package/dist/Security/constants.js +58 -0
  187. package/dist/Security/index.js +68 -0
  188. package/dist/Security/useSecurityApi.js +22 -0
  189. package/dist/Security/utils.js +31 -0
  190. package/dist/SendToFields/FilePicker.js +34 -0
  191. package/dist/SendToFields/constants.js +6 -0
  192. package/dist/SendToFields/index.js +102 -0
  193. package/dist/SendToFields/utils.js +54 -0
  194. package/dist/Settings/Category.js +30 -0
  195. package/dist/Settings/Item.js +38 -0
  196. package/dist/Settings/index.js +37 -0
  197. package/dist/Settings/utils.js +4 -0
  198. package/dist/ShareViaEmail/EmailBodyEditor.js +22 -0
  199. package/dist/ShareViaEmail/FilePicker.js +43 -0
  200. package/dist/ShareViaEmail/Form.js +101 -0
  201. package/dist/ShareViaEmail/FormikDatePicker.js +24 -0
  202. package/dist/ShareViaEmail/constants.js +14 -0
  203. package/dist/ShareViaEmail/index.js +89 -0
  204. package/dist/ShareViaEmail/utils.js +72 -0
  205. package/dist/ShareViaLink/EditURL.js +74 -0
  206. package/dist/ShareViaLink/Link.js +105 -0
  207. package/dist/ShareViaLink/QRCode.js +41 -0
  208. package/dist/ShareViaLink/RegenerateURL.js +47 -0
  209. package/dist/ShareViaLink/SocialMedia.js +52 -0
  210. package/dist/ShareViaLink/constants.js +25 -0
  211. package/dist/ShareViaLink/edit-url.scss +8 -0
  212. package/dist/ShareViaLink/index.js +46 -0
  213. package/dist/ShareViaLink/utils.js +47 -0
  214. package/dist/Sidebar/AppSwitcher/AppLink.js +45 -0
  215. package/dist/Sidebar/AppSwitcher/Backdrop.js +13 -0
  216. package/dist/Sidebar/AppSwitcher/Body.js +65 -0
  217. package/dist/Sidebar/AppSwitcher/Portal.js +27 -0
  218. package/dist/Sidebar/AppSwitcher/appswitcher.scss +164 -0
  219. package/dist/Sidebar/AppSwitcher/index.js +47 -0
  220. package/dist/Sidebar/AppSwitcher/utils.js +25 -0
  221. package/dist/Sidebar/Chevron.js +14 -0
  222. package/dist/Sidebar/FeaturedTooltip.js +19 -0
  223. package/dist/Sidebar/Footer/AppSwitcherButton.js +48 -0
  224. package/dist/Sidebar/Footer/ProfileButton.js +30 -0
  225. package/dist/Sidebar/Footer/index.js +56 -0
  226. package/dist/Sidebar/Footer/utils.js +39 -0
  227. package/dist/Sidebar/Header.js +33 -0
  228. package/dist/Sidebar/HelpSection/HelpSectionMenu.js +52 -0
  229. package/dist/Sidebar/HelpSection/index.js +32 -0
  230. package/dist/Sidebar/Links.js +112 -0
  231. package/dist/Sidebar/NavIconWrapper.js +20 -0
  232. package/dist/Sidebar/ProfileSection/LinkSection.js +36 -0
  233. package/dist/Sidebar/ProfileSection/ProfileMenu.js +48 -0
  234. package/dist/Sidebar/ProfileSection/index.js +42 -0
  235. package/dist/Sidebar/constants.js +40 -0
  236. package/dist/Sidebar/index.js +94 -0
  237. package/dist/Sidebar/sidebar.scss +379 -0
  238. package/dist/Sidebar/utils.js +18 -0
  239. package/dist/SubHeader/RightBlock/Columns.js +35 -0
  240. package/dist/SubHeader/RightBlock/Download.js +28 -0
  241. package/dist/SubHeader/RightBlock/Filter.js +31 -0
  242. package/dist/SubHeader/RightBlock/index.js +21 -0
  243. package/dist/SubHeader/RightBlock/utils.js +13 -0
  244. package/dist/SubHeader/index.js +28 -0
  245. package/dist/SubHeader/subheader.scss +78 -0
  246. package/dist/TableWrapper/index.js +18 -0
  247. package/dist/ThemeSidebar/Customize/Logo.js +39 -0
  248. package/dist/ThemeSidebar/Customize/Properties.js +170 -0
  249. package/dist/ThemeSidebar/Customize/index.js +66 -0
  250. package/dist/ThemeSidebar/Themes/ThemeCard.js +135 -0
  251. package/dist/ThemeSidebar/Themes/index.js +110 -0
  252. package/dist/ThemeSidebar/TitleBar.js +62 -0
  253. package/dist/ThemeSidebar/constants.js +127 -0
  254. package/dist/ThemeSidebar/fields/AlignmentBlock.js +50 -0
  255. package/dist/ThemeSidebar/fields/Card.js +19 -0
  256. package/dist/ThemeSidebar/fields/ColorBlock.js +19 -0
  257. package/dist/ThemeSidebar/fields/FontPickerBlock.js +35 -0
  258. package/dist/ThemeSidebar/fields/ImageBlock/ImageUploader.js +67 -0
  259. package/dist/ThemeSidebar/fields/ImageBlock/ProgressBar.js +22 -0
  260. package/dist/ThemeSidebar/fields/ImageBlock/index.js +55 -0
  261. package/dist/ThemeSidebar/fields/SelectBlock.js +24 -0
  262. package/dist/ThemeSidebar/fields/SliderBlock.js +30 -0
  263. package/dist/ThemeSidebar/fields/SwitchBlock.js +17 -0
  264. package/dist/ThemeSidebar/fields/TextBlock.js +13 -0
  265. package/dist/ThemeSidebar/fields/slider.scss +199 -0
  266. package/dist/ThemeSidebar/hooks/useDirectUploadDropzone.js +149 -0
  267. package/dist/ThemeSidebar/index.js +118 -0
  268. package/dist/ThemeSidebar/themeSidebar.scss +45 -0
  269. package/dist/ThemeSidebar/utils.js +169 -0
  270. package/dist/TimeFormat/index.js +3 -0
  271. package/dist/TimezoneMismatchModal/apis/time_zone.js +9 -0
  272. package/dist/TimezoneMismatchModal/index.js +83 -0
  273. package/dist/TimezoneMismatchModal/useTimeZoneApi.js +10 -0
  274. package/dist/TimezoneMismatchModal/utils.js +12 -0
  275. package/dist/ToggleFeatureCard/ToolTipSwitch.js +31 -0
  276. package/dist/ToggleFeatureCard/constants.js +5 -0
  277. package/dist/ToggleFeatureCard/hooks/useScrollIntoView.js +11 -0
  278. package/dist/ToggleFeatureCard/index.js +148 -0
  279. package/dist/ToggleFeatureCard/toggleFeatureCard.scss +4 -0
  280. package/package.json +27 -34
  281. package/dist/AutoSaveInput.cjs.js +0 -724
  282. package/dist/AutoSaveInput.cjs.js.map +0 -1
  283. package/dist/AutoSaveInput.js +0 -718
  284. package/dist/AutoSaveInput.js.map +0 -1
  285. package/dist/Breadcrumbs.cjs.js +0 -44
  286. package/dist/Breadcrumbs.cjs.js.map +0 -1
  287. package/dist/Breadcrumbs.js +0 -38
  288. package/dist/Breadcrumbs.js.map +0 -1
  289. package/dist/BrowserSupport.cjs.js +0 -1731
  290. package/dist/BrowserSupport.cjs.js.map +0 -1
  291. package/dist/BrowserSupport.js +0 -1725
  292. package/dist/BrowserSupport.js.map +0 -1
  293. package/dist/CalendarView.cjs.js +0 -610
  294. package/dist/CalendarView.cjs.js.map +0 -1
  295. package/dist/CalendarView.js +0 -598
  296. package/dist/CalendarView.js.map +0 -1
  297. package/dist/Codeblock.cjs.js +0 -302
  298. package/dist/Codeblock.cjs.js.map +0 -1
  299. package/dist/Codeblock.js +0 -296
  300. package/dist/Codeblock.js.map +0 -1
  301. package/dist/Columns.cjs.js +0 -248
  302. package/dist/Columns.cjs.js.map +0 -1
  303. package/dist/Columns.js.map +0 -1
  304. package/dist/ConfirmationModal.cjs.js +0 -87
  305. package/dist/ConfirmationModal.cjs.js.map +0 -1
  306. package/dist/ConfirmationModal.js.map +0 -1
  307. package/dist/Container.cjs.js +0 -1277
  308. package/dist/Container.cjs.js.map +0 -1
  309. package/dist/Container.js +0 -1271
  310. package/dist/Container.js.map +0 -1
  311. package/dist/CopyToClipboardButton.cjs.js +0 -275
  312. package/dist/CopyToClipboardButton.cjs.js.map +0 -1
  313. package/dist/CopyToClipboardButton.js +0 -269
  314. package/dist/CopyToClipboardButton.js.map +0 -1
  315. package/dist/CustomDomain.cjs.js +0 -774
  316. package/dist/CustomDomain.cjs.js.map +0 -1
  317. package/dist/CustomDomain.js +0 -747
  318. package/dist/CustomDomain.js.map +0 -1
  319. package/dist/CustomDomainDashboard.cjs.js +0 -2370
  320. package/dist/CustomDomainDashboard.cjs.js.map +0 -1
  321. package/dist/CustomDomainDashboard.js +0 -2342
  322. package/dist/CustomDomainDashboard.js.map +0 -1
  323. package/dist/DateFormat.cjs.js +0 -51
  324. package/dist/DateFormat.cjs.js.map +0 -1
  325. package/dist/DateFormat.js.map +0 -1
  326. package/dist/DateRangeFilter.cjs.js +0 -236
  327. package/dist/DateRangeFilter.cjs.js.map +0 -1
  328. package/dist/DateRangeFilter.js +0 -229
  329. package/dist/DateRangeFilter.js.map +0 -1
  330. package/dist/DynamicVariables.cjs.js +0 -189
  331. package/dist/DynamicVariables.cjs.js.map +0 -1
  332. package/dist/DynamicVariables.js +0 -183
  333. package/dist/DynamicVariables.js.map +0 -1
  334. package/dist/EmailForm.cjs.js +0 -4295
  335. package/dist/EmailForm.cjs.js.map +0 -1
  336. package/dist/EmailForm.js +0 -4265
  337. package/dist/EmailForm.js.map +0 -1
  338. package/dist/EmailPreview.cjs.js +0 -1419
  339. package/dist/EmailPreview.cjs.js.map +0 -1
  340. package/dist/EmailPreview.js +0 -1413
  341. package/dist/EmailPreview.js.map +0 -1
  342. package/dist/ErrorPage.cjs.js +0 -226
  343. package/dist/ErrorPage.cjs.js.map +0 -1
  344. package/dist/ErrorPage.js.map +0 -1
  345. package/dist/Header.cjs.js +0 -188
  346. package/dist/Header.cjs.js.map +0 -1
  347. package/dist/Header.js +0 -182
  348. package/dist/Header.js.map +0 -1
  349. package/dist/IconPicker.cjs.js +0 -1308
  350. package/dist/IconPicker.cjs.js.map +0 -1
  351. package/dist/IconPicker.js +0 -1302
  352. package/dist/IconPicker.js.map +0 -1
  353. package/dist/ImageWithFallback.cjs.js +0 -247
  354. package/dist/ImageWithFallback.cjs.js.map +0 -1
  355. package/dist/ImageWithFallback.js +0 -241
  356. package/dist/ImageWithFallback.js.map +0 -1
  357. package/dist/IntegrationCard.cjs.js +0 -409
  358. package/dist/IntegrationCard.cjs.js.map +0 -1
  359. package/dist/IntegrationCard.js +0 -403
  360. package/dist/IntegrationCard.js.map +0 -1
  361. package/dist/IntegrationDisconnectAlert.cjs.js +0 -89
  362. package/dist/IntegrationDisconnectAlert.cjs.js.map +0 -1
  363. package/dist/IntegrationDisconnectAlert.js +0 -80
  364. package/dist/IntegrationDisconnectAlert.js.map +0 -1
  365. package/dist/IntegrationWalkthroughModal.cjs.js +0 -50
  366. package/dist/IntegrationWalkthroughModal.cjs.js.map +0 -1
  367. package/dist/IntegrationWalkthroughModal.js.map +0 -1
  368. package/dist/IpRestriction.cjs.js +0 -3931
  369. package/dist/IpRestriction.cjs.js.map +0 -1
  370. package/dist/IpRestriction.js +0 -3905
  371. package/dist/IpRestriction.js.map +0 -1
  372. package/dist/KeyboardShortcuts.cjs.js +0 -2263
  373. package/dist/KeyboardShortcuts.cjs.js.map +0 -1
  374. package/dist/KeyboardShortcuts.js +0 -2256
  375. package/dist/KeyboardShortcuts.js.map +0 -1
  376. package/dist/LoginPage.cjs.js +0 -618
  377. package/dist/LoginPage.cjs.js.map +0 -1
  378. package/dist/LoginPage.js +0 -593
  379. package/dist/LoginPage.js.map +0 -1
  380. package/dist/MenuBar.cjs.js +0 -34273
  381. package/dist/MenuBar.cjs.js.map +0 -1
  382. package/dist/MenuBar.js +0 -34267
  383. package/dist/MenuBar.js.map +0 -1
  384. package/dist/Metadata.cjs.js +0 -272
  385. package/dist/Metadata.cjs.js.map +0 -1
  386. package/dist/Metadata.js +0 -266
  387. package/dist/Metadata.js.map +0 -1
  388. package/dist/MoreDropdown.cjs.js +0 -168
  389. package/dist/MoreDropdown.cjs.js.map +0 -1
  390. package/dist/MoreDropdown.js.map +0 -1
  391. package/dist/NavigationHeader.cjs.js +0 -756
  392. package/dist/NavigationHeader.cjs.js.map +0 -1
  393. package/dist/NavigationHeader.js +0 -750
  394. package/dist/NavigationHeader.js.map +0 -1
  395. package/dist/NeetoWidget.cjs.js +0 -3375
  396. package/dist/NeetoWidget.cjs.js.map +0 -1
  397. package/dist/NeetoWidget.js +0 -3348
  398. package/dist/NeetoWidget.js.map +0 -1
  399. package/dist/PageLoader.cjs.js +0 -158
  400. package/dist/PageLoader.cjs.js.map +0 -1
  401. package/dist/PageLoader.js +0 -134
  402. package/dist/PageLoader.js.map +0 -1
  403. package/dist/PhoneNumber.cjs.js +0 -7021
  404. package/dist/PhoneNumber.cjs.js.map +0 -1
  405. package/dist/PhoneNumber.js +0 -6989
  406. package/dist/PhoneNumber.js.map +0 -1
  407. package/dist/PublishBlock.cjs.js +0 -224
  408. package/dist/PublishBlock.cjs.js.map +0 -1
  409. package/dist/PublishBlock.js +0 -218
  410. package/dist/PublishBlock.js.map +0 -1
  411. package/dist/Rename.cjs.js +0 -516
  412. package/dist/Rename.cjs.js.map +0 -1
  413. package/dist/Rename.js +0 -510
  414. package/dist/Rename.js.map +0 -1
  415. package/dist/ResponsiveDevicePicker.cjs.js +0 -260
  416. package/dist/ResponsiveDevicePicker.cjs.js.map +0 -1
  417. package/dist/ResponsiveDevicePicker.js +0 -254
  418. package/dist/ResponsiveDevicePicker.js.map +0 -1
  419. package/dist/Schedule.cjs.js +0 -1077
  420. package/dist/Schedule.cjs.js.map +0 -1
  421. package/dist/Schedule.js +0 -1046
  422. package/dist/Schedule.js.map +0 -1
  423. package/dist/Scrollable.cjs.js +0 -188
  424. package/dist/Scrollable.cjs.js.map +0 -1
  425. package/dist/Scrollable.js +0 -182
  426. package/dist/Scrollable.js.map +0 -1
  427. package/dist/Security.cjs.js +0 -1921
  428. package/dist/Security.cjs.js.map +0 -1
  429. package/dist/Security.js +0 -1895
  430. package/dist/Security.js.map +0 -1
  431. package/dist/SendToFields.cjs.js +0 -2524
  432. package/dist/SendToFields.cjs.js.map +0 -1
  433. package/dist/SendToFields.js +0 -2517
  434. package/dist/SendToFields.js.map +0 -1
  435. package/dist/Settings.cjs.js +0 -501
  436. package/dist/Settings.cjs.js.map +0 -1
  437. package/dist/Settings.js +0 -495
  438. package/dist/Settings.js.map +0 -1
  439. package/dist/ShareViaEmail.cjs.js +0 -4272
  440. package/dist/ShareViaEmail.cjs.js.map +0 -1
  441. package/dist/ShareViaEmail.js +0 -4246
  442. package/dist/ShareViaEmail.js.map +0 -1
  443. package/dist/ShareViaLink.cjs.js +0 -1512
  444. package/dist/ShareViaLink.cjs.js.map +0 -1
  445. package/dist/ShareViaLink.js +0 -1486
  446. package/dist/ShareViaLink.js.map +0 -1
  447. package/dist/Sidebar.cjs.js +0 -34985
  448. package/dist/Sidebar.cjs.js.map +0 -1
  449. package/dist/Sidebar.js +0 -34959
  450. package/dist/Sidebar.js.map +0 -1
  451. package/dist/SubHeader.cjs.js +0 -283
  452. package/dist/SubHeader.cjs.js.map +0 -1
  453. package/dist/SubHeader.js +0 -276
  454. package/dist/SubHeader.js.map +0 -1
  455. package/dist/TableWrapper.cjs.js +0 -87
  456. package/dist/TableWrapper.cjs.js.map +0 -1
  457. package/dist/TableWrapper.js +0 -81
  458. package/dist/TableWrapper.js.map +0 -1
  459. package/dist/ThemeSidebar.cjs.js +0 -13705
  460. package/dist/ThemeSidebar.cjs.js.map +0 -1
  461. package/dist/ThemeSidebar.js +0 -13680
  462. package/dist/ThemeSidebar.js.map +0 -1
  463. package/dist/TimeFormat.cjs.js +0 -53
  464. package/dist/TimeFormat.cjs.js.map +0 -1
  465. package/dist/TimeFormat.js +0 -47
  466. package/dist/TimeFormat.js.map +0 -1
  467. package/dist/TimezoneMismatchModal.cjs.js +0 -176
  468. package/dist/TimezoneMismatchModal.cjs.js.map +0 -1
  469. package/dist/TimezoneMismatchModal.js +0 -168
  470. package/dist/TimezoneMismatchModal.js.map +0 -1
  471. package/dist/ToggleFeatureCard.cjs.js +0 -389
  472. package/dist/ToggleFeatureCard.cjs.js.map +0 -1
  473. package/dist/ToggleFeatureCard.js +0 -383
  474. package/dist/ToggleFeatureCard.js.map +0 -1
@@ -1,2256 +0,0 @@
1
- import { withImmutableActions, useHotKeys } from '@bigbinary/neeto-commons-frontend/react-utils';
2
- import React, { useDebugValue } from 'react';
3
- import { Close } from '@bigbinary/neeto-icons';
4
- import { Typography, Kbd, Button } from '@bigbinary/neetoui';
5
- import { manager } from '@bigbinary/neetoui/managers';
6
- import { useTranslation } from 'react-i18next';
7
- import i18next from 'i18next';
8
- import { toPairs } from 'ramda';
9
-
10
- const createStoreImpl = (createState) => {
11
- let state;
12
- const listeners = /* @__PURE__ */ new Set();
13
- const setState = (partial, replace) => {
14
- const nextState = typeof partial === "function" ? partial(state) : partial;
15
- if (!Object.is(nextState, state)) {
16
- const previousState = state;
17
- state = (replace != null ? replace : typeof nextState !== "object") ? nextState : Object.assign({}, state, nextState);
18
- listeners.forEach((listener) => listener(state, previousState));
19
- }
20
- };
21
- const getState = () => state;
22
- const subscribe = (listener) => {
23
- listeners.add(listener);
24
- return () => listeners.delete(listener);
25
- };
26
- const destroy = () => {
27
- if ((import.meta.env && import.meta.env.MODE) !== "production") {
28
- console.warn(
29
- "[DEPRECATED] The destroy method will be unsupported in the future version. You should use unsubscribe function returned by subscribe. Everything will be garbage collected if store is garbage collected."
30
- );
31
- }
32
- listeners.clear();
33
- };
34
- const api = { setState, getState, subscribe, destroy };
35
- state = createState(setState, getState, api);
36
- return api;
37
- };
38
- const createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
39
-
40
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
41
-
42
- function getDefaultExportFromCjs (x) {
43
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
44
- }
45
-
46
- var withSelector = {exports: {}};
47
-
48
- var withSelector_production_min = {};
49
-
50
- var shim = {exports: {}};
51
-
52
- var useSyncExternalStoreShim_production_min = {};
53
-
54
- /**
55
- * @license React
56
- * use-sync-external-store-shim.production.min.js
57
- *
58
- * Copyright (c) Facebook, Inc. and its affiliates.
59
- *
60
- * This source code is licensed under the MIT license found in the
61
- * LICENSE file in the root directory of this source tree.
62
- */
63
-
64
- var hasRequiredUseSyncExternalStoreShim_production_min;
65
-
66
- function requireUseSyncExternalStoreShim_production_min () {
67
- if (hasRequiredUseSyncExternalStoreShim_production_min) return useSyncExternalStoreShim_production_min;
68
- hasRequiredUseSyncExternalStoreShim_production_min = 1;
69
- var e=React;function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k="function"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c});},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c});})},[a]);p(d);return d}
70
- function r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return !k(a,d)}catch(f){return !0}}function t(a,b){return b()}var u="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?t:q;useSyncExternalStoreShim_production_min.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;
71
- return useSyncExternalStoreShim_production_min;
72
- }
73
-
74
- var useSyncExternalStoreShim_development = {};
75
-
76
- /**
77
- * @license React
78
- * use-sync-external-store-shim.development.js
79
- *
80
- * Copyright (c) Facebook, Inc. and its affiliates.
81
- *
82
- * This source code is licensed under the MIT license found in the
83
- * LICENSE file in the root directory of this source tree.
84
- */
85
-
86
- var hasRequiredUseSyncExternalStoreShim_development;
87
-
88
- function requireUseSyncExternalStoreShim_development () {
89
- if (hasRequiredUseSyncExternalStoreShim_development) return useSyncExternalStoreShim_development;
90
- hasRequiredUseSyncExternalStoreShim_development = 1;
91
-
92
- if (process.env.NODE_ENV !== "production") {
93
- (function() {
94
-
95
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
96
- if (
97
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
98
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
99
- 'function'
100
- ) {
101
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
102
- }
103
- var React$1 = React;
104
-
105
- var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
106
-
107
- function error(format) {
108
- {
109
- {
110
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
111
- args[_key2 - 1] = arguments[_key2];
112
- }
113
-
114
- printWarning('error', format, args);
115
- }
116
- }
117
- }
118
-
119
- function printWarning(level, format, args) {
120
- // When changing this logic, you might want to also
121
- // update consoleWithStackDev.www.js as well.
122
- {
123
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
124
- var stack = ReactDebugCurrentFrame.getStackAddendum();
125
-
126
- if (stack !== '') {
127
- format += '%s';
128
- args = args.concat([stack]);
129
- } // eslint-disable-next-line react-internal/safe-string-coercion
130
-
131
-
132
- var argsWithFormat = args.map(function (item) {
133
- return String(item);
134
- }); // Careful: RN currently depends on this prefix
135
-
136
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
137
- // breaks IE9: https://github.com/facebook/react/issues/13610
138
- // eslint-disable-next-line react-internal/no-production-logging
139
-
140
- Function.prototype.apply.call(console[level], console, argsWithFormat);
141
- }
142
- }
143
-
144
- /**
145
- * inlined Object.is polyfill to avoid requiring consumers ship their own
146
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
147
- */
148
- function is(x, y) {
149
- return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
150
- ;
151
- }
152
-
153
- var objectIs = typeof Object.is === 'function' ? Object.is : is;
154
-
155
- // dispatch for CommonJS interop named imports.
156
-
157
- var useState = React$1.useState,
158
- useEffect = React$1.useEffect,
159
- useLayoutEffect = React$1.useLayoutEffect,
160
- useDebugValue = React$1.useDebugValue;
161
- var didWarnOld18Alpha = false;
162
- var didWarnUncachedGetSnapshot = false; // Disclaimer: This shim breaks many of the rules of React, and only works
163
- // because of a very particular set of implementation details and assumptions
164
- // -- change any one of them and it will break. The most important assumption
165
- // is that updates are always synchronous, because concurrent rendering is
166
- // only available in versions of React that also have a built-in
167
- // useSyncExternalStore API. And we only use this shim when the built-in API
168
- // does not exist.
169
- //
170
- // Do not assume that the clever hacks used by this hook also work in general.
171
- // The point of this shim is to replace the need for hacks by other libraries.
172
-
173
- function useSyncExternalStore(subscribe, getSnapshot, // Note: The shim does not use getServerSnapshot, because pre-18 versions of
174
- // React do not expose a way to check if we're hydrating. So users of the shim
175
- // will need to track that themselves and return the correct value
176
- // from `getSnapshot`.
177
- getServerSnapshot) {
178
- {
179
- if (!didWarnOld18Alpha) {
180
- if (React$1.startTransition !== undefined) {
181
- didWarnOld18Alpha = true;
182
-
183
- error('You are using an outdated, pre-release alpha of React 18 that ' + 'does not support useSyncExternalStore. The ' + 'use-sync-external-store shim will not work correctly. Upgrade ' + 'to a newer pre-release.');
184
- }
185
- }
186
- } // Read the current snapshot from the store on every render. Again, this
187
- // breaks the rules of React, and only works here because of specific
188
- // implementation details, most importantly that updates are
189
- // always synchronous.
190
-
191
-
192
- var value = getSnapshot();
193
-
194
- {
195
- if (!didWarnUncachedGetSnapshot) {
196
- var cachedValue = getSnapshot();
197
-
198
- if (!objectIs(value, cachedValue)) {
199
- error('The result of getSnapshot should be cached to avoid an infinite loop');
200
-
201
- didWarnUncachedGetSnapshot = true;
202
- }
203
- }
204
- } // Because updates are synchronous, we don't queue them. Instead we force a
205
- // re-render whenever the subscribed state changes by updating an some
206
- // arbitrary useState hook. Then, during render, we call getSnapshot to read
207
- // the current value.
208
- //
209
- // Because we don't actually use the state returned by the useState hook, we
210
- // can save a bit of memory by storing other stuff in that slot.
211
- //
212
- // To implement the early bailout, we need to track some things on a mutable
213
- // object. Usually, we would put that in a useRef hook, but we can stash it in
214
- // our useState hook instead.
215
- //
216
- // To force a re-render, we call forceUpdate({inst}). That works because the
217
- // new object always fails an equality check.
218
-
219
-
220
- var _useState = useState({
221
- inst: {
222
- value: value,
223
- getSnapshot: getSnapshot
224
- }
225
- }),
226
- inst = _useState[0].inst,
227
- forceUpdate = _useState[1]; // Track the latest getSnapshot function with a ref. This needs to be updated
228
- // in the layout phase so we can access it during the tearing check that
229
- // happens on subscribe.
230
-
231
-
232
- useLayoutEffect(function () {
233
- inst.value = value;
234
- inst.getSnapshot = getSnapshot; // Whenever getSnapshot or subscribe changes, we need to check in the
235
- // commit phase if there was an interleaved mutation. In concurrent mode
236
- // this can happen all the time, but even in synchronous mode, an earlier
237
- // effect may have mutated the store.
238
-
239
- if (checkIfSnapshotChanged(inst)) {
240
- // Force a re-render.
241
- forceUpdate({
242
- inst: inst
243
- });
244
- }
245
- }, [subscribe, value, getSnapshot]);
246
- useEffect(function () {
247
- // Check for changes right before subscribing. Subsequent changes will be
248
- // detected in the subscription handler.
249
- if (checkIfSnapshotChanged(inst)) {
250
- // Force a re-render.
251
- forceUpdate({
252
- inst: inst
253
- });
254
- }
255
-
256
- var handleStoreChange = function () {
257
- // TODO: Because there is no cross-renderer API for batching updates, it's
258
- // up to the consumer of this library to wrap their subscription event
259
- // with unstable_batchedUpdates. Should we try to detect when this isn't
260
- // the case and print a warning in development?
261
- // The store changed. Check if the snapshot changed since the last time we
262
- // read from the store.
263
- if (checkIfSnapshotChanged(inst)) {
264
- // Force a re-render.
265
- forceUpdate({
266
- inst: inst
267
- });
268
- }
269
- }; // Subscribe to the store and return a clean-up function.
270
-
271
-
272
- return subscribe(handleStoreChange);
273
- }, [subscribe]);
274
- useDebugValue(value);
275
- return value;
276
- }
277
-
278
- function checkIfSnapshotChanged(inst) {
279
- var latestGetSnapshot = inst.getSnapshot;
280
- var prevValue = inst.value;
281
-
282
- try {
283
- var nextValue = latestGetSnapshot();
284
- return !objectIs(prevValue, nextValue);
285
- } catch (error) {
286
- return true;
287
- }
288
- }
289
-
290
- function useSyncExternalStore$1(subscribe, getSnapshot, getServerSnapshot) {
291
- // Note: The shim does not use getServerSnapshot, because pre-18 versions of
292
- // React do not expose a way to check if we're hydrating. So users of the shim
293
- // will need to track that themselves and return the correct value
294
- // from `getSnapshot`.
295
- return getSnapshot();
296
- }
297
-
298
- var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
299
-
300
- var isServerEnvironment = !canUseDOM;
301
-
302
- var shim = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore;
303
- var useSyncExternalStore$2 = React$1.useSyncExternalStore !== undefined ? React$1.useSyncExternalStore : shim;
304
-
305
- useSyncExternalStoreShim_development.useSyncExternalStore = useSyncExternalStore$2;
306
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
307
- if (
308
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
309
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
310
- 'function'
311
- ) {
312
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
313
- }
314
-
315
- })();
316
- }
317
- return useSyncExternalStoreShim_development;
318
- }
319
-
320
- var hasRequiredShim;
321
-
322
- function requireShim () {
323
- if (hasRequiredShim) return shim.exports;
324
- hasRequiredShim = 1;
325
- (function (module) {
326
-
327
- if (process.env.NODE_ENV === 'production') {
328
- module.exports = requireUseSyncExternalStoreShim_production_min();
329
- } else {
330
- module.exports = requireUseSyncExternalStoreShim_development();
331
- }
332
- } (shim));
333
- return shim.exports;
334
- }
335
-
336
- /**
337
- * @license React
338
- * use-sync-external-store-shim/with-selector.production.min.js
339
- *
340
- * Copyright (c) Facebook, Inc. and its affiliates.
341
- *
342
- * This source code is licensed under the MIT license found in the
343
- * LICENSE file in the root directory of this source tree.
344
- */
345
-
346
- var hasRequiredWithSelector_production_min;
347
-
348
- function requireWithSelector_production_min () {
349
- if (hasRequiredWithSelector_production_min) return withSelector_production_min;
350
- hasRequiredWithSelector_production_min = 1;
351
- var h=React,n=requireShim();function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q="function"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;
352
- withSelector_production_min.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f;}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return [function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);
353
- u(function(){f.hasValue=!0;f.value=d;},[d]);w(d);return d};
354
- return withSelector_production_min;
355
- }
356
-
357
- var withSelector_development = {};
358
-
359
- /**
360
- * @license React
361
- * use-sync-external-store-shim/with-selector.development.js
362
- *
363
- * Copyright (c) Facebook, Inc. and its affiliates.
364
- *
365
- * This source code is licensed under the MIT license found in the
366
- * LICENSE file in the root directory of this source tree.
367
- */
368
-
369
- var hasRequiredWithSelector_development;
370
-
371
- function requireWithSelector_development () {
372
- if (hasRequiredWithSelector_development) return withSelector_development;
373
- hasRequiredWithSelector_development = 1;
374
-
375
- if (process.env.NODE_ENV !== "production") {
376
- (function() {
377
-
378
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
379
- if (
380
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
381
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
382
- 'function'
383
- ) {
384
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
385
- }
386
- var React$1 = React;
387
- var shim = requireShim();
388
-
389
- /**
390
- * inlined Object.is polyfill to avoid requiring consumers ship their own
391
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
392
- */
393
- function is(x, y) {
394
- return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
395
- ;
396
- }
397
-
398
- var objectIs = typeof Object.is === 'function' ? Object.is : is;
399
-
400
- var useSyncExternalStore = shim.useSyncExternalStore;
401
-
402
- // for CommonJS interop.
403
-
404
- var useRef = React$1.useRef,
405
- useEffect = React$1.useEffect,
406
- useMemo = React$1.useMemo,
407
- useDebugValue = React$1.useDebugValue; // Same as useSyncExternalStore, but supports selector and isEqual arguments.
408
-
409
- function useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
410
- // Use this to track the rendered snapshot.
411
- var instRef = useRef(null);
412
- var inst;
413
-
414
- if (instRef.current === null) {
415
- inst = {
416
- hasValue: false,
417
- value: null
418
- };
419
- instRef.current = inst;
420
- } else {
421
- inst = instRef.current;
422
- }
423
-
424
- var _useMemo = useMemo(function () {
425
- // Track the memoized state using closure variables that are local to this
426
- // memoized instance of a getSnapshot function. Intentionally not using a
427
- // useRef hook, because that state would be shared across all concurrent
428
- // copies of the hook/component.
429
- var hasMemo = false;
430
- var memoizedSnapshot;
431
- var memoizedSelection;
432
-
433
- var memoizedSelector = function (nextSnapshot) {
434
- if (!hasMemo) {
435
- // The first time the hook is called, there is no memoized result.
436
- hasMemo = true;
437
- memoizedSnapshot = nextSnapshot;
438
-
439
- var _nextSelection = selector(nextSnapshot);
440
-
441
- if (isEqual !== undefined) {
442
- // Even if the selector has changed, the currently rendered selection
443
- // may be equal to the new selection. We should attempt to reuse the
444
- // current value if possible, to preserve downstream memoizations.
445
- if (inst.hasValue) {
446
- var currentSelection = inst.value;
447
-
448
- if (isEqual(currentSelection, _nextSelection)) {
449
- memoizedSelection = currentSelection;
450
- return currentSelection;
451
- }
452
- }
453
- }
454
-
455
- memoizedSelection = _nextSelection;
456
- return _nextSelection;
457
- } // We may be able to reuse the previous invocation's result.
458
-
459
-
460
- // We may be able to reuse the previous invocation's result.
461
- var prevSnapshot = memoizedSnapshot;
462
- var prevSelection = memoizedSelection;
463
-
464
- if (objectIs(prevSnapshot, nextSnapshot)) {
465
- // The snapshot is the same as last time. Reuse the previous selection.
466
- return prevSelection;
467
- } // The snapshot has changed, so we need to compute a new selection.
468
-
469
-
470
- // The snapshot has changed, so we need to compute a new selection.
471
- var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data
472
- // has changed. If it hasn't, return the previous selection. That signals
473
- // to React that the selections are conceptually equal, and we can bail
474
- // out of rendering.
475
-
476
- // If a custom isEqual function is provided, use that to check if the data
477
- // has changed. If it hasn't, return the previous selection. That signals
478
- // to React that the selections are conceptually equal, and we can bail
479
- // out of rendering.
480
- if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) {
481
- return prevSelection;
482
- }
483
-
484
- memoizedSnapshot = nextSnapshot;
485
- memoizedSelection = nextSelection;
486
- return nextSelection;
487
- }; // Assigning this to a constant so that Flow knows it can't change.
488
-
489
-
490
- // Assigning this to a constant so that Flow knows it can't change.
491
- var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot;
492
-
493
- var getSnapshotWithSelector = function () {
494
- return memoizedSelector(getSnapshot());
495
- };
496
-
497
- var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () {
498
- return memoizedSelector(maybeGetServerSnapshot());
499
- };
500
- return [getSnapshotWithSelector, getServerSnapshotWithSelector];
501
- }, [getSnapshot, getServerSnapshot, selector, isEqual]),
502
- getSelection = _useMemo[0],
503
- getServerSelection = _useMemo[1];
504
-
505
- var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);
506
- useEffect(function () {
507
- inst.hasValue = true;
508
- inst.value = value;
509
- }, [value]);
510
- useDebugValue(value);
511
- return value;
512
- }
513
-
514
- withSelector_development.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector;
515
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
516
- if (
517
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
518
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
519
- 'function'
520
- ) {
521
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
522
- }
523
-
524
- })();
525
- }
526
- return withSelector_development;
527
- }
528
-
529
- (function (module) {
530
-
531
- if (process.env.NODE_ENV === 'production') {
532
- module.exports = requireWithSelector_production_min();
533
- } else {
534
- module.exports = requireWithSelector_development();
535
- }
536
- } (withSelector));
537
-
538
- var useSyncExternalStoreExports = /*@__PURE__*/getDefaultExportFromCjs(withSelector.exports);
539
-
540
- const { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports;
541
- function useStore(api, selector = api.getState, equalityFn) {
542
- const slice = useSyncExternalStoreWithSelector(
543
- api.subscribe,
544
- api.getState,
545
- api.getServerState || api.getState,
546
- selector,
547
- equalityFn
548
- );
549
- useDebugValue(slice);
550
- return slice;
551
- }
552
- const createImpl = (createState) => {
553
- if ((import.meta.env && import.meta.env.MODE) !== "production" && typeof createState !== "function") {
554
- console.warn(
555
- '[DEPRECATED] Passing a vanilla store will be unsupported in the future version. Please use `import { useStore } from "zustand"` to use the vanilla store in React.'
556
- );
557
- }
558
- const api = typeof createState === "function" ? createStore(createState) : createState;
559
- const useBoundStore = (selector, equalityFn) => useStore(api, selector, equalityFn);
560
- Object.assign(useBoundStore, api);
561
- return useBoundStore;
562
- };
563
- const create = (createState) => createState ? createImpl(createState) : createImpl;
564
-
565
- function shallow(objA, objB) {
566
- if (Object.is(objA, objB)) {
567
- return true;
568
- }
569
- if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
570
- return false;
571
- }
572
- if (objA instanceof Map && objB instanceof Map) {
573
- if (objA.size !== objB.size)
574
- return false;
575
- for (const [key, value] of objA) {
576
- if (!Object.is(value, objB.get(key))) {
577
- return false;
578
- }
579
- }
580
- return true;
581
- }
582
- if (objA instanceof Set && objB instanceof Set) {
583
- if (objA.size !== objB.size)
584
- return false;
585
- for (const value of objA) {
586
- if (!objB.has(value)) {
587
- return false;
588
- }
589
- }
590
- return true;
591
- }
592
- const keysA = Object.keys(objA);
593
- if (keysA.length !== Object.keys(objB).length) {
594
- return false;
595
- }
596
- for (let i = 0; i < keysA.length; i++) {
597
- if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !Object.is(objA[keysA[i]], objB[keysA[i]])) {
598
- return false;
599
- }
600
- }
601
- return true;
602
- }
603
-
604
- /** @type {import("neetocommons/react-utils").ZustandStoreHook} */
605
- var useKeyboardShortcutsStore = create(withImmutableActions(function (set) {
606
- return {
607
- isOpen: false,
608
- setIsOpen: function setIsOpen(arg) {
609
- if (typeof arg === "function") {
610
- set(function (state) {
611
- return {
612
- isOpen: arg(state.isOpen)
613
- };
614
- });
615
- } else {
616
- set({
617
- isOpen: arg
618
- });
619
- }
620
- }
621
- };
622
- }));
623
- var useKeyboardShortcutsPaneState = function useKeyboardShortcutsPaneState() {
624
- return useKeyboardShortcutsStore(function (_ref) {
625
- var isOpen = _ref.isOpen,
626
- setIsOpen = _ref.setIsOpen;
627
- return [isOpen, setIsOpen];
628
- }, shallow);
629
- };
630
-
631
- function _arrayWithHoles(arr) {
632
- if (Array.isArray(arr)) return arr;
633
- }
634
-
635
- function _iterableToArrayLimit(arr, i) {
636
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
637
- if (null != _i) {
638
- var _s,
639
- _e,
640
- _x,
641
- _r,
642
- _arr = [],
643
- _n = !0,
644
- _d = !1;
645
- try {
646
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
647
- if (Object(_i) !== _i) return;
648
- _n = !1;
649
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
650
- } catch (err) {
651
- _d = !0, _e = err;
652
- } finally {
653
- try {
654
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
655
- } finally {
656
- if (_d) throw _e;
657
- }
658
- }
659
- return _arr;
660
- }
661
- }
662
-
663
- function _arrayLikeToArray(arr, len) {
664
- if (len == null || len > arr.length) len = arr.length;
665
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
666
- return arr2;
667
- }
668
-
669
- function _unsupportedIterableToArray(o, minLen) {
670
- if (!o) return;
671
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
672
- var n = Object.prototype.toString.call(o).slice(8, -1);
673
- if (n === "Object" && o.constructor) n = o.constructor.name;
674
- if (n === "Map" || n === "Set") return Array.from(o);
675
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
676
- }
677
-
678
- function _nonIterableRest() {
679
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
680
- }
681
-
682
- function _slicedToArray(arr, i) {
683
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
684
- }
685
-
686
- var classnames$1 = {exports: {}};
687
-
688
- /*!
689
- Copyright (c) 2018 Jed Watson.
690
- Licensed under the MIT License (MIT), see
691
- http://jedwatson.github.io/classnames
692
- */
693
-
694
- (function (module) {
695
- /* global define */
696
-
697
- (function () {
698
-
699
- var hasOwn = {}.hasOwnProperty;
700
-
701
- function classNames() {
702
- var classes = [];
703
-
704
- for (var i = 0; i < arguments.length; i++) {
705
- var arg = arguments[i];
706
- if (!arg) continue;
707
-
708
- var argType = typeof arg;
709
-
710
- if (argType === 'string' || argType === 'number') {
711
- classes.push(arg);
712
- } else if (Array.isArray(arg)) {
713
- if (arg.length) {
714
- var inner = classNames.apply(null, arg);
715
- if (inner) {
716
- classes.push(inner);
717
- }
718
- }
719
- } else if (argType === 'object') {
720
- if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
721
- classes.push(arg.toString());
722
- continue;
723
- }
724
-
725
- for (var key in arg) {
726
- if (hasOwn.call(arg, key) && arg[key]) {
727
- classes.push(key);
728
- }
729
- }
730
- }
731
- }
732
-
733
- return classes.join(' ');
734
- }
735
-
736
- if (module.exports) {
737
- classNames.default = classNames;
738
- module.exports = classNames;
739
- } else {
740
- window.classNames = classNames;
741
- }
742
- }());
743
- } (classnames$1));
744
-
745
- var classnames = classnames$1.exports;
746
-
747
- var KEY_SHORTFORM_MAP = {
748
- command: "⌘",
749
- escape: "esc",
750
- control: "ctrl",
751
- option: "opt",
752
- "return": "enter"
753
- };
754
- var MAC_TO_WINDOWS_KEYS_MAP = {
755
- option: "alt",
756
- command: "ctrl",
757
- "return": "enter",
758
- "delete": "backspace"
759
- };
760
- var OS = {
761
- mac: "OS X",
762
- windows: "Windows"
763
- };
764
- var FULL_SHORTCUTS_LINK_PROP_NAME = "fullShortcutsLink";
765
- var TOOLTIP_CONTENT = {
766
- "⌘": "command",
767
- esc: "escape",
768
- ctrl: "control",
769
- opt: "option",
770
- backspace: "delete"
771
- };
772
-
773
- function _typeof(obj) {
774
- "@babel/helpers - typeof";
775
-
776
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
777
- return typeof obj;
778
- } : function (obj) {
779
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
780
- }, _typeof(obj);
781
- }
782
-
783
- function _toPrimitive(input, hint) {
784
- if (_typeof(input) !== "object" || input === null) return input;
785
- var prim = input[Symbol.toPrimitive];
786
- if (prim !== undefined) {
787
- var res = prim.call(input, hint || "default");
788
- if (_typeof(res) !== "object") return res;
789
- throw new TypeError("@@toPrimitive must return a primitive value.");
790
- }
791
- return (hint === "string" ? String : Number)(input);
792
- }
793
-
794
- function _toPropertyKey(arg) {
795
- var key = _toPrimitive(arg, "string");
796
- return _typeof(key) === "symbol" ? key : String(key);
797
- }
798
-
799
- function _defineProperty(obj, key, value) {
800
- key = _toPropertyKey(key);
801
- if (key in obj) {
802
- Object.defineProperty(obj, key, {
803
- value: value,
804
- enumerable: true,
805
- configurable: true,
806
- writable: true
807
- });
808
- } else {
809
- obj[key] = value;
810
- }
811
- return obj;
812
- }
813
-
814
- var platform$1 = {exports: {}};
815
-
816
- /*!
817
- * Platform.js v1.3.6
818
- * Copyright 2014-2020 Benjamin Tan
819
- * Copyright 2011-2013 John-David Dalton
820
- * Available under MIT license
821
- */
822
-
823
- (function (module, exports) {
824
- (function() {
825
-
826
- /** Used to determine if values are of the language type `Object`. */
827
- var objectTypes = {
828
- 'function': true,
829
- 'object': true
830
- };
831
-
832
- /** Used as a reference to the global object. */
833
- var root = (objectTypes[typeof window] && window) || this;
834
-
835
- /** Detect free variable `exports`. */
836
- var freeExports = exports;
837
-
838
- /** Detect free variable `module`. */
839
- var freeModule = module && !module.nodeType && module;
840
-
841
- /** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */
842
- var freeGlobal = freeExports && freeModule && typeof commonjsGlobal == 'object' && commonjsGlobal;
843
- if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {
844
- root = freeGlobal;
845
- }
846
-
847
- /**
848
- * Used as the maximum length of an array-like object.
849
- * See the [ES6 spec](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
850
- * for more details.
851
- */
852
- var maxSafeInteger = Math.pow(2, 53) - 1;
853
-
854
- /** Regular expression to detect Opera. */
855
- var reOpera = /\bOpera/;
856
-
857
- /** Used for native method references. */
858
- var objectProto = Object.prototype;
859
-
860
- /** Used to check for own properties of an object. */
861
- var hasOwnProperty = objectProto.hasOwnProperty;
862
-
863
- /** Used to resolve the internal `[[Class]]` of values. */
864
- var toString = objectProto.toString;
865
-
866
- /*--------------------------------------------------------------------------*/
867
-
868
- /**
869
- * Capitalizes a string value.
870
- *
871
- * @private
872
- * @param {string} string The string to capitalize.
873
- * @returns {string} The capitalized string.
874
- */
875
- function capitalize(string) {
876
- string = String(string);
877
- return string.charAt(0).toUpperCase() + string.slice(1);
878
- }
879
-
880
- /**
881
- * A utility function to clean up the OS name.
882
- *
883
- * @private
884
- * @param {string} os The OS name to clean up.
885
- * @param {string} [pattern] A `RegExp` pattern matching the OS name.
886
- * @param {string} [label] A label for the OS.
887
- */
888
- function cleanupOS(os, pattern, label) {
889
- // Platform tokens are defined at:
890
- // http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx
891
- // http://web.archive.org/web/20081122053950/http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx
892
- var data = {
893
- '10.0': '10',
894
- '6.4': '10 Technical Preview',
895
- '6.3': '8.1',
896
- '6.2': '8',
897
- '6.1': 'Server 2008 R2 / 7',
898
- '6.0': 'Server 2008 / Vista',
899
- '5.2': 'Server 2003 / XP 64-bit',
900
- '5.1': 'XP',
901
- '5.01': '2000 SP1',
902
- '5.0': '2000',
903
- '4.0': 'NT',
904
- '4.90': 'ME'
905
- };
906
- // Detect Windows version from platform tokens.
907
- if (pattern && label && /^Win/i.test(os) && !/^Windows Phone /i.test(os) &&
908
- (data = data[/[\d.]+$/.exec(os)])) {
909
- os = 'Windows ' + data;
910
- }
911
- // Correct character case and cleanup string.
912
- os = String(os);
913
-
914
- if (pattern && label) {
915
- os = os.replace(RegExp(pattern, 'i'), label);
916
- }
917
-
918
- os = format(
919
- os.replace(/ ce$/i, ' CE')
920
- .replace(/\bhpw/i, 'web')
921
- .replace(/\bMacintosh\b/, 'Mac OS')
922
- .replace(/_PowerPC\b/i, ' OS')
923
- .replace(/\b(OS X) [^ \d]+/i, '$1')
924
- .replace(/\bMac (OS X)\b/, '$1')
925
- .replace(/\/(\d)/, ' $1')
926
- .replace(/_/g, '.')
927
- .replace(/(?: BePC|[ .]*fc[ \d.]+)$/i, '')
928
- .replace(/\bx86\.64\b/gi, 'x86_64')
929
- .replace(/\b(Windows Phone) OS\b/, '$1')
930
- .replace(/\b(Chrome OS \w+) [\d.]+\b/, '$1')
931
- .split(' on ')[0]
932
- );
933
-
934
- return os;
935
- }
936
-
937
- /**
938
- * An iteration utility for arrays and objects.
939
- *
940
- * @private
941
- * @param {Array|Object} object The object to iterate over.
942
- * @param {Function} callback The function called per iteration.
943
- */
944
- function each(object, callback) {
945
- var index = -1,
946
- length = object ? object.length : 0;
947
-
948
- if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) {
949
- while (++index < length) {
950
- callback(object[index], index, object);
951
- }
952
- } else {
953
- forOwn(object, callback);
954
- }
955
- }
956
-
957
- /**
958
- * Trim and conditionally capitalize string values.
959
- *
960
- * @private
961
- * @param {string} string The string to format.
962
- * @returns {string} The formatted string.
963
- */
964
- function format(string) {
965
- string = trim(string);
966
- return /^(?:webOS|i(?:OS|P))/.test(string)
967
- ? string
968
- : capitalize(string);
969
- }
970
-
971
- /**
972
- * Iterates over an object's own properties, executing the `callback` for each.
973
- *
974
- * @private
975
- * @param {Object} object The object to iterate over.
976
- * @param {Function} callback The function executed per own property.
977
- */
978
- function forOwn(object, callback) {
979
- for (var key in object) {
980
- if (hasOwnProperty.call(object, key)) {
981
- callback(object[key], key, object);
982
- }
983
- }
984
- }
985
-
986
- /**
987
- * Gets the internal `[[Class]]` of a value.
988
- *
989
- * @private
990
- * @param {*} value The value.
991
- * @returns {string} The `[[Class]]`.
992
- */
993
- function getClassOf(value) {
994
- return value == null
995
- ? capitalize(value)
996
- : toString.call(value).slice(8, -1);
997
- }
998
-
999
- /**
1000
- * Host objects can return type values that are different from their actual
1001
- * data type. The objects we are concerned with usually return non-primitive
1002
- * types of "object", "function", or "unknown".
1003
- *
1004
- * @private
1005
- * @param {*} object The owner of the property.
1006
- * @param {string} property The property to check.
1007
- * @returns {boolean} Returns `true` if the property value is a non-primitive, else `false`.
1008
- */
1009
- function isHostType(object, property) {
1010
- var type = object != null ? typeof object[property] : 'number';
1011
- return !/^(?:boolean|number|string|undefined)$/.test(type) &&
1012
- (type == 'object' ? !!object[property] : true);
1013
- }
1014
-
1015
- /**
1016
- * Prepares a string for use in a `RegExp` by making hyphens and spaces optional.
1017
- *
1018
- * @private
1019
- * @param {string} string The string to qualify.
1020
- * @returns {string} The qualified string.
1021
- */
1022
- function qualify(string) {
1023
- return String(string).replace(/([ -])(?!$)/g, '$1?');
1024
- }
1025
-
1026
- /**
1027
- * A bare-bones `Array#reduce` like utility function.
1028
- *
1029
- * @private
1030
- * @param {Array} array The array to iterate over.
1031
- * @param {Function} callback The function called per iteration.
1032
- * @returns {*} The accumulated result.
1033
- */
1034
- function reduce(array, callback) {
1035
- var accumulator = null;
1036
- each(array, function(value, index) {
1037
- accumulator = callback(accumulator, value, index, array);
1038
- });
1039
- return accumulator;
1040
- }
1041
-
1042
- /**
1043
- * Removes leading and trailing whitespace from a string.
1044
- *
1045
- * @private
1046
- * @param {string} string The string to trim.
1047
- * @returns {string} The trimmed string.
1048
- */
1049
- function trim(string) {
1050
- return String(string).replace(/^ +| +$/g, '');
1051
- }
1052
-
1053
- /*--------------------------------------------------------------------------*/
1054
-
1055
- /**
1056
- * Creates a new platform object.
1057
- *
1058
- * @memberOf platform
1059
- * @param {Object|string} [ua=navigator.userAgent] The user agent string or
1060
- * context object.
1061
- * @returns {Object} A platform object.
1062
- */
1063
- function parse(ua) {
1064
-
1065
- /** The environment context object. */
1066
- var context = root;
1067
-
1068
- /** Used to flag when a custom context is provided. */
1069
- var isCustomContext = ua && typeof ua == 'object' && getClassOf(ua) != 'String';
1070
-
1071
- // Juggle arguments.
1072
- if (isCustomContext) {
1073
- context = ua;
1074
- ua = null;
1075
- }
1076
-
1077
- /** Browser navigator object. */
1078
- var nav = context.navigator || {};
1079
-
1080
- /** Browser user agent string. */
1081
- var userAgent = nav.userAgent || '';
1082
-
1083
- ua || (ua = userAgent);
1084
-
1085
- /** Used to detect if browser is like Chrome. */
1086
- var likeChrome = isCustomContext
1087
- ? !!nav.likeChrome
1088
- : /\bChrome\b/.test(ua) && !/internal|\n/i.test(toString.toString());
1089
-
1090
- /** Internal `[[Class]]` value shortcuts. */
1091
- var objectClass = 'Object',
1092
- airRuntimeClass = isCustomContext ? objectClass : 'ScriptBridgingProxyObject',
1093
- enviroClass = isCustomContext ? objectClass : 'Environment',
1094
- javaClass = (isCustomContext && context.java) ? 'JavaPackage' : getClassOf(context.java),
1095
- phantomClass = isCustomContext ? objectClass : 'RuntimeObject';
1096
-
1097
- /** Detect Java environments. */
1098
- var java = /\bJava/.test(javaClass) && context.java;
1099
-
1100
- /** Detect Rhino. */
1101
- var rhino = java && getClassOf(context.environment) == enviroClass;
1102
-
1103
- /** A character to represent alpha. */
1104
- var alpha = java ? 'a' : '\u03b1';
1105
-
1106
- /** A character to represent beta. */
1107
- var beta = java ? 'b' : '\u03b2';
1108
-
1109
- /** Browser document object. */
1110
- var doc = context.document || {};
1111
-
1112
- /**
1113
- * Detect Opera browser (Presto-based).
1114
- * http://www.howtocreate.co.uk/operaStuff/operaObject.html
1115
- * http://dev.opera.com/articles/view/opera-mini-web-content-authoring-guidelines/#operamini
1116
- */
1117
- var opera = context.operamini || context.opera;
1118
-
1119
- /** Opera `[[Class]]`. */
1120
- var operaClass = reOpera.test(operaClass = (isCustomContext && opera) ? opera['[[Class]]'] : getClassOf(opera))
1121
- ? operaClass
1122
- : (opera = null);
1123
-
1124
- /*------------------------------------------------------------------------*/
1125
-
1126
- /** Temporary variable used over the script's lifetime. */
1127
- var data;
1128
-
1129
- /** The CPU architecture. */
1130
- var arch = ua;
1131
-
1132
- /** Platform description array. */
1133
- var description = [];
1134
-
1135
- /** Platform alpha/beta indicator. */
1136
- var prerelease = null;
1137
-
1138
- /** A flag to indicate that environment features should be used to resolve the platform. */
1139
- var useFeatures = ua == userAgent;
1140
-
1141
- /** The browser/environment version. */
1142
- var version = useFeatures && opera && typeof opera.version == 'function' && opera.version();
1143
-
1144
- /** A flag to indicate if the OS ends with "/ Version" */
1145
- var isSpecialCasedOS;
1146
-
1147
- /* Detectable layout engines (order is important). */
1148
- var layout = getLayout([
1149
- { 'label': 'EdgeHTML', 'pattern': 'Edge' },
1150
- 'Trident',
1151
- { 'label': 'WebKit', 'pattern': 'AppleWebKit' },
1152
- 'iCab',
1153
- 'Presto',
1154
- 'NetFront',
1155
- 'Tasman',
1156
- 'KHTML',
1157
- 'Gecko'
1158
- ]);
1159
-
1160
- /* Detectable browser names (order is important). */
1161
- var name = getName([
1162
- 'Adobe AIR',
1163
- 'Arora',
1164
- 'Avant Browser',
1165
- 'Breach',
1166
- 'Camino',
1167
- 'Electron',
1168
- 'Epiphany',
1169
- 'Fennec',
1170
- 'Flock',
1171
- 'Galeon',
1172
- 'GreenBrowser',
1173
- 'iCab',
1174
- 'Iceweasel',
1175
- 'K-Meleon',
1176
- 'Konqueror',
1177
- 'Lunascape',
1178
- 'Maxthon',
1179
- { 'label': 'Microsoft Edge', 'pattern': '(?:Edge|Edg|EdgA|EdgiOS)' },
1180
- 'Midori',
1181
- 'Nook Browser',
1182
- 'PaleMoon',
1183
- 'PhantomJS',
1184
- 'Raven',
1185
- 'Rekonq',
1186
- 'RockMelt',
1187
- { 'label': 'Samsung Internet', 'pattern': 'SamsungBrowser' },
1188
- 'SeaMonkey',
1189
- { 'label': 'Silk', 'pattern': '(?:Cloud9|Silk-Accelerated)' },
1190
- 'Sleipnir',
1191
- 'SlimBrowser',
1192
- { 'label': 'SRWare Iron', 'pattern': 'Iron' },
1193
- 'Sunrise',
1194
- 'Swiftfox',
1195
- 'Vivaldi',
1196
- 'Waterfox',
1197
- 'WebPositive',
1198
- { 'label': 'Yandex Browser', 'pattern': 'YaBrowser' },
1199
- { 'label': 'UC Browser', 'pattern': 'UCBrowser' },
1200
- 'Opera Mini',
1201
- { 'label': 'Opera Mini', 'pattern': 'OPiOS' },
1202
- 'Opera',
1203
- { 'label': 'Opera', 'pattern': 'OPR' },
1204
- 'Chromium',
1205
- 'Chrome',
1206
- { 'label': 'Chrome', 'pattern': '(?:HeadlessChrome)' },
1207
- { 'label': 'Chrome Mobile', 'pattern': '(?:CriOS|CrMo)' },
1208
- { 'label': 'Firefox', 'pattern': '(?:Firefox|Minefield)' },
1209
- { 'label': 'Firefox for iOS', 'pattern': 'FxiOS' },
1210
- { 'label': 'IE', 'pattern': 'IEMobile' },
1211
- { 'label': 'IE', 'pattern': 'MSIE' },
1212
- 'Safari'
1213
- ]);
1214
-
1215
- /* Detectable products (order is important). */
1216
- var product = getProduct([
1217
- { 'label': 'BlackBerry', 'pattern': 'BB10' },
1218
- 'BlackBerry',
1219
- { 'label': 'Galaxy S', 'pattern': 'GT-I9000' },
1220
- { 'label': 'Galaxy S2', 'pattern': 'GT-I9100' },
1221
- { 'label': 'Galaxy S3', 'pattern': 'GT-I9300' },
1222
- { 'label': 'Galaxy S4', 'pattern': 'GT-I9500' },
1223
- { 'label': 'Galaxy S5', 'pattern': 'SM-G900' },
1224
- { 'label': 'Galaxy S6', 'pattern': 'SM-G920' },
1225
- { 'label': 'Galaxy S6 Edge', 'pattern': 'SM-G925' },
1226
- { 'label': 'Galaxy S7', 'pattern': 'SM-G930' },
1227
- { 'label': 'Galaxy S7 Edge', 'pattern': 'SM-G935' },
1228
- 'Google TV',
1229
- 'Lumia',
1230
- 'iPad',
1231
- 'iPod',
1232
- 'iPhone',
1233
- 'Kindle',
1234
- { 'label': 'Kindle Fire', 'pattern': '(?:Cloud9|Silk-Accelerated)' },
1235
- 'Nexus',
1236
- 'Nook',
1237
- 'PlayBook',
1238
- 'PlayStation Vita',
1239
- 'PlayStation',
1240
- 'TouchPad',
1241
- 'Transformer',
1242
- { 'label': 'Wii U', 'pattern': 'WiiU' },
1243
- 'Wii',
1244
- 'Xbox One',
1245
- { 'label': 'Xbox 360', 'pattern': 'Xbox' },
1246
- 'Xoom'
1247
- ]);
1248
-
1249
- /* Detectable manufacturers. */
1250
- var manufacturer = getManufacturer({
1251
- 'Apple': { 'iPad': 1, 'iPhone': 1, 'iPod': 1 },
1252
- 'Alcatel': {},
1253
- 'Archos': {},
1254
- 'Amazon': { 'Kindle': 1, 'Kindle Fire': 1 },
1255
- 'Asus': { 'Transformer': 1 },
1256
- 'Barnes & Noble': { 'Nook': 1 },
1257
- 'BlackBerry': { 'PlayBook': 1 },
1258
- 'Google': { 'Google TV': 1, 'Nexus': 1 },
1259
- 'HP': { 'TouchPad': 1 },
1260
- 'HTC': {},
1261
- 'Huawei': {},
1262
- 'Lenovo': {},
1263
- 'LG': {},
1264
- 'Microsoft': { 'Xbox': 1, 'Xbox One': 1 },
1265
- 'Motorola': { 'Xoom': 1 },
1266
- 'Nintendo': { 'Wii U': 1, 'Wii': 1 },
1267
- 'Nokia': { 'Lumia': 1 },
1268
- 'Oppo': {},
1269
- 'Samsung': { 'Galaxy S': 1, 'Galaxy S2': 1, 'Galaxy S3': 1, 'Galaxy S4': 1 },
1270
- 'Sony': { 'PlayStation': 1, 'PlayStation Vita': 1 },
1271
- 'Xiaomi': { 'Mi': 1, 'Redmi': 1 }
1272
- });
1273
-
1274
- /* Detectable operating systems (order is important). */
1275
- var os = getOS([
1276
- 'Windows Phone',
1277
- 'KaiOS',
1278
- 'Android',
1279
- 'CentOS',
1280
- { 'label': 'Chrome OS', 'pattern': 'CrOS' },
1281
- 'Debian',
1282
- { 'label': 'DragonFly BSD', 'pattern': 'DragonFly' },
1283
- 'Fedora',
1284
- 'FreeBSD',
1285
- 'Gentoo',
1286
- 'Haiku',
1287
- 'Kubuntu',
1288
- 'Linux Mint',
1289
- 'OpenBSD',
1290
- 'Red Hat',
1291
- 'SuSE',
1292
- 'Ubuntu',
1293
- 'Xubuntu',
1294
- 'Cygwin',
1295
- 'Symbian OS',
1296
- 'hpwOS',
1297
- 'webOS ',
1298
- 'webOS',
1299
- 'Tablet OS',
1300
- 'Tizen',
1301
- 'Linux',
1302
- 'Mac OS X',
1303
- 'Macintosh',
1304
- 'Mac',
1305
- 'Windows 98;',
1306
- 'Windows '
1307
- ]);
1308
-
1309
- /*------------------------------------------------------------------------*/
1310
-
1311
- /**
1312
- * Picks the layout engine from an array of guesses.
1313
- *
1314
- * @private
1315
- * @param {Array} guesses An array of guesses.
1316
- * @returns {null|string} The detected layout engine.
1317
- */
1318
- function getLayout(guesses) {
1319
- return reduce(guesses, function(result, guess) {
1320
- return result || RegExp('\\b' + (
1321
- guess.pattern || qualify(guess)
1322
- ) + '\\b', 'i').exec(ua) && (guess.label || guess);
1323
- });
1324
- }
1325
-
1326
- /**
1327
- * Picks the manufacturer from an array of guesses.
1328
- *
1329
- * @private
1330
- * @param {Array} guesses An object of guesses.
1331
- * @returns {null|string} The detected manufacturer.
1332
- */
1333
- function getManufacturer(guesses) {
1334
- return reduce(guesses, function(result, value, key) {
1335
- // Lookup the manufacturer by product or scan the UA for the manufacturer.
1336
- return result || (
1337
- value[product] ||
1338
- value[/^[a-z]+(?: +[a-z]+\b)*/i.exec(product)] ||
1339
- RegExp('\\b' + qualify(key) + '(?:\\b|\\w*\\d)', 'i').exec(ua)
1340
- ) && key;
1341
- });
1342
- }
1343
-
1344
- /**
1345
- * Picks the browser name from an array of guesses.
1346
- *
1347
- * @private
1348
- * @param {Array} guesses An array of guesses.
1349
- * @returns {null|string} The detected browser name.
1350
- */
1351
- function getName(guesses) {
1352
- return reduce(guesses, function(result, guess) {
1353
- return result || RegExp('\\b' + (
1354
- guess.pattern || qualify(guess)
1355
- ) + '\\b', 'i').exec(ua) && (guess.label || guess);
1356
- });
1357
- }
1358
-
1359
- /**
1360
- * Picks the OS name from an array of guesses.
1361
- *
1362
- * @private
1363
- * @param {Array} guesses An array of guesses.
1364
- * @returns {null|string} The detected OS name.
1365
- */
1366
- function getOS(guesses) {
1367
- return reduce(guesses, function(result, guess) {
1368
- var pattern = guess.pattern || qualify(guess);
1369
- if (!result && (result =
1370
- RegExp('\\b' + pattern + '(?:/[\\d.]+|[ \\w.]*)', 'i').exec(ua)
1371
- )) {
1372
- result = cleanupOS(result, pattern, guess.label || guess);
1373
- }
1374
- return result;
1375
- });
1376
- }
1377
-
1378
- /**
1379
- * Picks the product name from an array of guesses.
1380
- *
1381
- * @private
1382
- * @param {Array} guesses An array of guesses.
1383
- * @returns {null|string} The detected product name.
1384
- */
1385
- function getProduct(guesses) {
1386
- return reduce(guesses, function(result, guess) {
1387
- var pattern = guess.pattern || qualify(guess);
1388
- if (!result && (result =
1389
- RegExp('\\b' + pattern + ' *\\d+[.\\w_]*', 'i').exec(ua) ||
1390
- RegExp('\\b' + pattern + ' *\\w+-[\\w]*', 'i').exec(ua) ||
1391
- RegExp('\\b' + pattern + '(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)', 'i').exec(ua)
1392
- )) {
1393
- // Split by forward slash and append product version if needed.
1394
- if ((result = String((guess.label && !RegExp(pattern, 'i').test(guess.label)) ? guess.label : result).split('/'))[1] && !/[\d.]+/.test(result[0])) {
1395
- result[0] += ' ' + result[1];
1396
- }
1397
- // Correct character case and cleanup string.
1398
- guess = guess.label || guess;
1399
- result = format(result[0]
1400
- .replace(RegExp(pattern, 'i'), guess)
1401
- .replace(RegExp('; *(?:' + guess + '[_-])?', 'i'), ' ')
1402
- .replace(RegExp('(' + guess + ')[-_.]?(\\w)', 'i'), '$1 $2'));
1403
- }
1404
- return result;
1405
- });
1406
- }
1407
-
1408
- /**
1409
- * Resolves the version using an array of UA patterns.
1410
- *
1411
- * @private
1412
- * @param {Array} patterns An array of UA patterns.
1413
- * @returns {null|string} The detected version.
1414
- */
1415
- function getVersion(patterns) {
1416
- return reduce(patterns, function(result, pattern) {
1417
- return result || (RegExp(pattern +
1418
- '(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)', 'i').exec(ua) || 0)[1] || null;
1419
- });
1420
- }
1421
-
1422
- /**
1423
- * Returns `platform.description` when the platform object is coerced to a string.
1424
- *
1425
- * @name toString
1426
- * @memberOf platform
1427
- * @returns {string} Returns `platform.description` if available, else an empty string.
1428
- */
1429
- function toStringPlatform() {
1430
- return this.description || '';
1431
- }
1432
-
1433
- /*------------------------------------------------------------------------*/
1434
-
1435
- // Convert layout to an array so we can add extra details.
1436
- layout && (layout = [layout]);
1437
-
1438
- // Detect Android products.
1439
- // Browsers on Android devices typically provide their product IDS after "Android;"
1440
- // up to "Build" or ") AppleWebKit".
1441
- // Example:
1442
- // "Mozilla/5.0 (Linux; Android 8.1.0; Moto G (5) Plus) AppleWebKit/537.36
1443
- // (KHTML, like Gecko) Chrome/70.0.3538.80 Mobile Safari/537.36"
1444
- if (/\bAndroid\b/.test(os) && !product &&
1445
- (data = /\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(ua))) {
1446
- product = trim(data[1])
1447
- // Replace any language codes (eg. "en-US").
1448
- .replace(/^[a-z]{2}-[a-z]{2};\s*/i, '')
1449
- || null;
1450
- }
1451
- // Detect product names that contain their manufacturer's name.
1452
- if (manufacturer && !product) {
1453
- product = getProduct([manufacturer]);
1454
- } else if (manufacturer && product) {
1455
- product = product
1456
- .replace(RegExp('^(' + qualify(manufacturer) + ')[-_.\\s]', 'i'), manufacturer + ' ')
1457
- .replace(RegExp('^(' + qualify(manufacturer) + ')[-_.]?(\\w)', 'i'), manufacturer + ' $2');
1458
- }
1459
- // Clean up Google TV.
1460
- if ((data = /\bGoogle TV\b/.exec(product))) {
1461
- product = data[0];
1462
- }
1463
- // Detect simulators.
1464
- if (/\bSimulator\b/i.test(ua)) {
1465
- product = (product ? product + ' ' : '') + 'Simulator';
1466
- }
1467
- // Detect Opera Mini 8+ running in Turbo/Uncompressed mode on iOS.
1468
- if (name == 'Opera Mini' && /\bOPiOS\b/.test(ua)) {
1469
- description.push('running in Turbo/Uncompressed mode');
1470
- }
1471
- // Detect IE Mobile 11.
1472
- if (name == 'IE' && /\blike iPhone OS\b/.test(ua)) {
1473
- data = parse(ua.replace(/like iPhone OS/, ''));
1474
- manufacturer = data.manufacturer;
1475
- product = data.product;
1476
- }
1477
- // Detect iOS.
1478
- else if (/^iP/.test(product)) {
1479
- name || (name = 'Safari');
1480
- os = 'iOS' + ((data = / OS ([\d_]+)/i.exec(ua))
1481
- ? ' ' + data[1].replace(/_/g, '.')
1482
- : '');
1483
- }
1484
- // Detect Kubuntu.
1485
- else if (name == 'Konqueror' && /^Linux\b/i.test(os)) {
1486
- os = 'Kubuntu';
1487
- }
1488
- // Detect Android browsers.
1489
- else if ((manufacturer && manufacturer != 'Google' &&
1490
- ((/Chrome/.test(name) && !/\bMobile Safari\b/i.test(ua)) || /\bVita\b/.test(product))) ||
1491
- (/\bAndroid\b/.test(os) && /^Chrome/.test(name) && /\bVersion\//i.test(ua))) {
1492
- name = 'Android Browser';
1493
- os = /\bAndroid\b/.test(os) ? os : 'Android';
1494
- }
1495
- // Detect Silk desktop/accelerated modes.
1496
- else if (name == 'Silk') {
1497
- if (!/\bMobi/i.test(ua)) {
1498
- os = 'Android';
1499
- description.unshift('desktop mode');
1500
- }
1501
- if (/Accelerated *= *true/i.test(ua)) {
1502
- description.unshift('accelerated');
1503
- }
1504
- }
1505
- // Detect UC Browser speed mode.
1506
- else if (name == 'UC Browser' && /\bUCWEB\b/.test(ua)) {
1507
- description.push('speed mode');
1508
- }
1509
- // Detect PaleMoon identifying as Firefox.
1510
- else if (name == 'PaleMoon' && (data = /\bFirefox\/([\d.]+)\b/.exec(ua))) {
1511
- description.push('identifying as Firefox ' + data[1]);
1512
- }
1513
- // Detect Firefox OS and products running Firefox.
1514
- else if (name == 'Firefox' && (data = /\b(Mobile|Tablet|TV)\b/i.exec(ua))) {
1515
- os || (os = 'Firefox OS');
1516
- product || (product = data[1]);
1517
- }
1518
- // Detect false positives for Firefox/Safari.
1519
- else if (!name || (data = !/\bMinefield\b/i.test(ua) && /\b(?:Firefox|Safari)\b/.exec(name))) {
1520
- // Escape the `/` for Firefox 1.
1521
- if (name && !product && /[\/,]|^[^(]+?\)/.test(ua.slice(ua.indexOf(data + '/') + 8))) {
1522
- // Clear name of false positives.
1523
- name = null;
1524
- }
1525
- // Reassign a generic name.
1526
- if ((data = product || manufacturer || os) &&
1527
- (product || manufacturer || /\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(os))) {
1528
- name = /[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(os) ? os : data) + ' Browser';
1529
- }
1530
- }
1531
- // Add Chrome version to description for Electron.
1532
- else if (name == 'Electron' && (data = (/\bChrome\/([\d.]+)\b/.exec(ua) || 0)[1])) {
1533
- description.push('Chromium ' + data);
1534
- }
1535
- // Detect non-Opera (Presto-based) versions (order is important).
1536
- if (!version) {
1537
- version = getVersion([
1538
- '(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)',
1539
- 'Version',
1540
- qualify(name),
1541
- '(?:Firefox|Minefield|NetFront)'
1542
- ]);
1543
- }
1544
- // Detect stubborn layout engines.
1545
- if ((data =
1546
- layout == 'iCab' && parseFloat(version) > 3 && 'WebKit' ||
1547
- /\bOpera\b/.test(name) && (/\bOPR\b/.test(ua) ? 'Blink' : 'Presto') ||
1548
- /\b(?:Midori|Nook|Safari)\b/i.test(ua) && !/^(?:Trident|EdgeHTML)$/.test(layout) && 'WebKit' ||
1549
- !layout && /\bMSIE\b/i.test(ua) && (os == 'Mac OS' ? 'Tasman' : 'Trident') ||
1550
- layout == 'WebKit' && /\bPlayStation\b(?! Vita\b)/i.test(name) && 'NetFront'
1551
- )) {
1552
- layout = [data];
1553
- }
1554
- // Detect Windows Phone 7 desktop mode.
1555
- if (name == 'IE' && (data = (/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(ua) || 0)[1])) {
1556
- name += ' Mobile';
1557
- os = 'Windows Phone ' + (/\+$/.test(data) ? data : data + '.x');
1558
- description.unshift('desktop mode');
1559
- }
1560
- // Detect Windows Phone 8.x desktop mode.
1561
- else if (/\bWPDesktop\b/i.test(ua)) {
1562
- name = 'IE Mobile';
1563
- os = 'Windows Phone 8.x';
1564
- description.unshift('desktop mode');
1565
- version || (version = (/\brv:([\d.]+)/.exec(ua) || 0)[1]);
1566
- }
1567
- // Detect IE 11 identifying as other browsers.
1568
- else if (name != 'IE' && layout == 'Trident' && (data = /\brv:([\d.]+)/.exec(ua))) {
1569
- if (name) {
1570
- description.push('identifying as ' + name + (version ? ' ' + version : ''));
1571
- }
1572
- name = 'IE';
1573
- version = data[1];
1574
- }
1575
- // Leverage environment features.
1576
- if (useFeatures) {
1577
- // Detect server-side environments.
1578
- // Rhino has a global function while others have a global object.
1579
- if (isHostType(context, 'global')) {
1580
- if (java) {
1581
- data = java.lang.System;
1582
- arch = data.getProperty('os.arch');
1583
- os = os || data.getProperty('os.name') + ' ' + data.getProperty('os.version');
1584
- }
1585
- if (rhino) {
1586
- try {
1587
- version = context.require('ringo/engine').version.join('.');
1588
- name = 'RingoJS';
1589
- } catch(e) {
1590
- if ((data = context.system) && data.global.system == context.system) {
1591
- name = 'Narwhal';
1592
- os || (os = data[0].os || null);
1593
- }
1594
- }
1595
- if (!name) {
1596
- name = 'Rhino';
1597
- }
1598
- }
1599
- else if (
1600
- typeof context.process == 'object' && !context.process.browser &&
1601
- (data = context.process)
1602
- ) {
1603
- if (typeof data.versions == 'object') {
1604
- if (typeof data.versions.electron == 'string') {
1605
- description.push('Node ' + data.versions.node);
1606
- name = 'Electron';
1607
- version = data.versions.electron;
1608
- } else if (typeof data.versions.nw == 'string') {
1609
- description.push('Chromium ' + version, 'Node ' + data.versions.node);
1610
- name = 'NW.js';
1611
- version = data.versions.nw;
1612
- }
1613
- }
1614
- if (!name) {
1615
- name = 'Node.js';
1616
- arch = data.arch;
1617
- os = data.platform;
1618
- version = /[\d.]+/.exec(data.version);
1619
- version = version ? version[0] : null;
1620
- }
1621
- }
1622
- }
1623
- // Detect Adobe AIR.
1624
- else if (getClassOf((data = context.runtime)) == airRuntimeClass) {
1625
- name = 'Adobe AIR';
1626
- os = data.flash.system.Capabilities.os;
1627
- }
1628
- // Detect PhantomJS.
1629
- else if (getClassOf((data = context.phantom)) == phantomClass) {
1630
- name = 'PhantomJS';
1631
- version = (data = data.version || null) && (data.major + '.' + data.minor + '.' + data.patch);
1632
- }
1633
- // Detect IE compatibility modes.
1634
- else if (typeof doc.documentMode == 'number' && (data = /\bTrident\/(\d+)/i.exec(ua))) {
1635
- // We're in compatibility mode when the Trident version + 4 doesn't
1636
- // equal the document mode.
1637
- version = [version, doc.documentMode];
1638
- if ((data = +data[1] + 4) != version[1]) {
1639
- description.push('IE ' + version[1] + ' mode');
1640
- layout && (layout[1] = '');
1641
- version[1] = data;
1642
- }
1643
- version = name == 'IE' ? String(version[1].toFixed(1)) : version[0];
1644
- }
1645
- // Detect IE 11 masking as other browsers.
1646
- else if (typeof doc.documentMode == 'number' && /^(?:Chrome|Firefox)\b/.test(name)) {
1647
- description.push('masking as ' + name + ' ' + version);
1648
- name = 'IE';
1649
- version = '11.0';
1650
- layout = ['Trident'];
1651
- os = 'Windows';
1652
- }
1653
- os = os && format(os);
1654
- }
1655
- // Detect prerelease phases.
1656
- if (version && (data =
1657
- /(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(version) ||
1658
- /(?:alpha|beta)(?: ?\d)?/i.exec(ua + ';' + (useFeatures && nav.appMinorVersion)) ||
1659
- /\bMinefield\b/i.test(ua) && 'a'
1660
- )) {
1661
- prerelease = /b/i.test(data) ? 'beta' : 'alpha';
1662
- version = version.replace(RegExp(data + '\\+?$'), '') +
1663
- (prerelease == 'beta' ? beta : alpha) + (/\d+\+?/.exec(data) || '');
1664
- }
1665
- // Detect Firefox Mobile.
1666
- if (name == 'Fennec' || name == 'Firefox' && /\b(?:Android|Firefox OS|KaiOS)\b/.test(os)) {
1667
- name = 'Firefox Mobile';
1668
- }
1669
- // Obscure Maxthon's unreliable version.
1670
- else if (name == 'Maxthon' && version) {
1671
- version = version.replace(/\.[\d.]+/, '.x');
1672
- }
1673
- // Detect Xbox 360 and Xbox One.
1674
- else if (/\bXbox\b/i.test(product)) {
1675
- if (product == 'Xbox 360') {
1676
- os = null;
1677
- }
1678
- if (product == 'Xbox 360' && /\bIEMobile\b/.test(ua)) {
1679
- description.unshift('mobile mode');
1680
- }
1681
- }
1682
- // Add mobile postfix.
1683
- else if ((/^(?:Chrome|IE|Opera)$/.test(name) || name && !product && !/Browser|Mobi/.test(name)) &&
1684
- (os == 'Windows CE' || /Mobi/i.test(ua))) {
1685
- name += ' Mobile';
1686
- }
1687
- // Detect IE platform preview.
1688
- else if (name == 'IE' && useFeatures) {
1689
- try {
1690
- if (context.external === null) {
1691
- description.unshift('platform preview');
1692
- }
1693
- } catch(e) {
1694
- description.unshift('embedded');
1695
- }
1696
- }
1697
- // Detect BlackBerry OS version.
1698
- // http://docs.blackberry.com/en/developers/deliverables/18169/HTTP_headers_sent_by_BB_Browser_1234911_11.jsp
1699
- else if ((/\bBlackBerry\b/.test(product) || /\bBB10\b/.test(ua)) && (data =
1700
- (RegExp(product.replace(/ +/g, ' *') + '/([.\\d]+)', 'i').exec(ua) || 0)[1] ||
1701
- version
1702
- )) {
1703
- data = [data, /BB10/.test(ua)];
1704
- os = (data[1] ? (product = null, manufacturer = 'BlackBerry') : 'Device Software') + ' ' + data[0];
1705
- version = null;
1706
- }
1707
- // Detect Opera identifying/masking itself as another browser.
1708
- // http://www.opera.com/support/kb/view/843/
1709
- else if (this != forOwn && product != 'Wii' && (
1710
- (useFeatures && opera) ||
1711
- (/Opera/.test(name) && /\b(?:MSIE|Firefox)\b/i.test(ua)) ||
1712
- (name == 'Firefox' && /\bOS X (?:\d+\.){2,}/.test(os)) ||
1713
- (name == 'IE' && (
1714
- (os && !/^Win/.test(os) && version > 5.5) ||
1715
- /\bWindows XP\b/.test(os) && version > 8 ||
1716
- version == 8 && !/\bTrident\b/.test(ua)
1717
- ))
1718
- ) && !reOpera.test((data = parse.call(forOwn, ua.replace(reOpera, '') + ';'))) && data.name) {
1719
- // When "identifying", the UA contains both Opera and the other browser's name.
1720
- data = 'ing as ' + data.name + ((data = data.version) ? ' ' + data : '');
1721
- if (reOpera.test(name)) {
1722
- if (/\bIE\b/.test(data) && os == 'Mac OS') {
1723
- os = null;
1724
- }
1725
- data = 'identify' + data;
1726
- }
1727
- // When "masking", the UA contains only the other browser's name.
1728
- else {
1729
- data = 'mask' + data;
1730
- if (operaClass) {
1731
- name = format(operaClass.replace(/([a-z])([A-Z])/g, '$1 $2'));
1732
- } else {
1733
- name = 'Opera';
1734
- }
1735
- if (/\bIE\b/.test(data)) {
1736
- os = null;
1737
- }
1738
- if (!useFeatures) {
1739
- version = null;
1740
- }
1741
- }
1742
- layout = ['Presto'];
1743
- description.push(data);
1744
- }
1745
- // Detect WebKit Nightly and approximate Chrome/Safari versions.
1746
- if ((data = (/\bAppleWebKit\/([\d.]+\+?)/i.exec(ua) || 0)[1])) {
1747
- // Correct build number for numeric comparison.
1748
- // (e.g. "532.5" becomes "532.05")
1749
- data = [parseFloat(data.replace(/\.(\d)$/, '.0$1')), data];
1750
- // Nightly builds are postfixed with a "+".
1751
- if (name == 'Safari' && data[1].slice(-1) == '+') {
1752
- name = 'WebKit Nightly';
1753
- prerelease = 'alpha';
1754
- version = data[1].slice(0, -1);
1755
- }
1756
- // Clear incorrect browser versions.
1757
- else if (version == data[1] ||
1758
- version == (data[2] = (/\bSafari\/([\d.]+\+?)/i.exec(ua) || 0)[1])) {
1759
- version = null;
1760
- }
1761
- // Use the full Chrome version when available.
1762
- data[1] = (/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(ua) || 0)[1];
1763
- // Detect Blink layout engine.
1764
- if (data[0] == 537.36 && data[2] == 537.36 && parseFloat(data[1]) >= 28 && layout == 'WebKit') {
1765
- layout = ['Blink'];
1766
- }
1767
- // Detect JavaScriptCore.
1768
- // http://stackoverflow.com/questions/6768474/how-can-i-detect-which-javascript-engine-v8-or-jsc-is-used-at-runtime-in-androi
1769
- if (!useFeatures || (!likeChrome && !data[1])) {
1770
- layout && (layout[1] = 'like Safari');
1771
- data = (data = data[0], data < 400 ? 1 : data < 500 ? 2 : data < 526 ? 3 : data < 533 ? 4 : data < 534 ? '4+' : data < 535 ? 5 : data < 537 ? 6 : data < 538 ? 7 : data < 601 ? 8 : data < 602 ? 9 : data < 604 ? 10 : data < 606 ? 11 : data < 608 ? 12 : '12');
1772
- } else {
1773
- layout && (layout[1] = 'like Chrome');
1774
- data = data[1] || (data = data[0], data < 530 ? 1 : data < 532 ? 2 : data < 532.05 ? 3 : data < 533 ? 4 : data < 534.03 ? 5 : data < 534.07 ? 6 : data < 534.10 ? 7 : data < 534.13 ? 8 : data < 534.16 ? 9 : data < 534.24 ? 10 : data < 534.30 ? 11 : data < 535.01 ? 12 : data < 535.02 ? '13+' : data < 535.07 ? 15 : data < 535.11 ? 16 : data < 535.19 ? 17 : data < 536.05 ? 18 : data < 536.10 ? 19 : data < 537.01 ? 20 : data < 537.11 ? '21+' : data < 537.13 ? 23 : data < 537.18 ? 24 : data < 537.24 ? 25 : data < 537.36 ? 26 : layout != 'Blink' ? '27' : '28');
1775
- }
1776
- // Add the postfix of ".x" or "+" for approximate versions.
1777
- layout && (layout[1] += ' ' + (data += typeof data == 'number' ? '.x' : /[.+]/.test(data) ? '' : '+'));
1778
- // Obscure version for some Safari 1-2 releases.
1779
- if (name == 'Safari' && (!version || parseInt(version) > 45)) {
1780
- version = data;
1781
- } else if (name == 'Chrome' && /\bHeadlessChrome/i.test(ua)) {
1782
- description.unshift('headless');
1783
- }
1784
- }
1785
- // Detect Opera desktop modes.
1786
- if (name == 'Opera' && (data = /\bzbov|zvav$/.exec(os))) {
1787
- name += ' ';
1788
- description.unshift('desktop mode');
1789
- if (data == 'zvav') {
1790
- name += 'Mini';
1791
- version = null;
1792
- } else {
1793
- name += 'Mobile';
1794
- }
1795
- os = os.replace(RegExp(' *' + data + '$'), '');
1796
- }
1797
- // Detect Chrome desktop mode.
1798
- else if (name == 'Safari' && /\bChrome\b/.exec(layout && layout[1])) {
1799
- description.unshift('desktop mode');
1800
- name = 'Chrome Mobile';
1801
- version = null;
1802
-
1803
- if (/\bOS X\b/.test(os)) {
1804
- manufacturer = 'Apple';
1805
- os = 'iOS 4.3+';
1806
- } else {
1807
- os = null;
1808
- }
1809
- }
1810
- // Newer versions of SRWare Iron uses the Chrome tag to indicate its version number.
1811
- else if (/\bSRWare Iron\b/.test(name) && !version) {
1812
- version = getVersion('Chrome');
1813
- }
1814
- // Strip incorrect OS versions.
1815
- if (version && version.indexOf((data = /[\d.]+$/.exec(os))) == 0 &&
1816
- ua.indexOf('/' + data + '-') > -1) {
1817
- os = trim(os.replace(data, ''));
1818
- }
1819
- // Ensure OS does not include the browser name.
1820
- if (os && os.indexOf(name) != -1 && !RegExp(name + ' OS').test(os)) {
1821
- os = os.replace(RegExp(' *' + qualify(name) + ' *'), '');
1822
- }
1823
- // Add layout engine.
1824
- if (layout && !/\b(?:Avant|Nook)\b/.test(name) && (
1825
- /Browser|Lunascape|Maxthon/.test(name) ||
1826
- name != 'Safari' && /^iOS/.test(os) && /\bSafari\b/.test(layout[1]) ||
1827
- /^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(name) && layout[1])) {
1828
- // Don't add layout details to description if they are falsey.
1829
- (data = layout[layout.length - 1]) && description.push(data);
1830
- }
1831
- // Combine contextual information.
1832
- if (description.length) {
1833
- description = ['(' + description.join('; ') + ')'];
1834
- }
1835
- // Append manufacturer to description.
1836
- if (manufacturer && product && product.indexOf(manufacturer) < 0) {
1837
- description.push('on ' + manufacturer);
1838
- }
1839
- // Append product to description.
1840
- if (product) {
1841
- description.push((/^on /.test(description[description.length - 1]) ? '' : 'on ') + product);
1842
- }
1843
- // Parse the OS into an object.
1844
- if (os) {
1845
- data = / ([\d.+]+)$/.exec(os);
1846
- isSpecialCasedOS = data && os.charAt(os.length - data[0].length - 1) == '/';
1847
- os = {
1848
- 'architecture': 32,
1849
- 'family': (data && !isSpecialCasedOS) ? os.replace(data[0], '') : os,
1850
- 'version': data ? data[1] : null,
1851
- 'toString': function() {
1852
- var version = this.version;
1853
- return this.family + ((version && !isSpecialCasedOS) ? ' ' + version : '') + (this.architecture == 64 ? ' 64-bit' : '');
1854
- }
1855
- };
1856
- }
1857
- // Add browser/OS architecture.
1858
- if ((data = /\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(arch)) && !/\bi686\b/i.test(arch)) {
1859
- if (os) {
1860
- os.architecture = 64;
1861
- os.family = os.family.replace(RegExp(' *' + data), '');
1862
- }
1863
- if (
1864
- name && (/\bWOW64\b/i.test(ua) ||
1865
- (useFeatures && /\w(?:86|32)$/.test(nav.cpuClass || nav.platform) && !/\bWin64; x64\b/i.test(ua)))
1866
- ) {
1867
- description.unshift('32-bit');
1868
- }
1869
- }
1870
- // Chrome 39 and above on OS X is always 64-bit.
1871
- else if (
1872
- os && /^OS X/.test(os.family) &&
1873
- name == 'Chrome' && parseFloat(version) >= 39
1874
- ) {
1875
- os.architecture = 64;
1876
- }
1877
-
1878
- ua || (ua = null);
1879
-
1880
- /*------------------------------------------------------------------------*/
1881
-
1882
- /**
1883
- * The platform object.
1884
- *
1885
- * @name platform
1886
- * @type Object
1887
- */
1888
- var platform = {};
1889
-
1890
- /**
1891
- * The platform description.
1892
- *
1893
- * @memberOf platform
1894
- * @type string|null
1895
- */
1896
- platform.description = ua;
1897
-
1898
- /**
1899
- * The name of the browser's layout engine.
1900
- *
1901
- * The list of common layout engines include:
1902
- * "Blink", "EdgeHTML", "Gecko", "Trident" and "WebKit"
1903
- *
1904
- * @memberOf platform
1905
- * @type string|null
1906
- */
1907
- platform.layout = layout && layout[0];
1908
-
1909
- /**
1910
- * The name of the product's manufacturer.
1911
- *
1912
- * The list of manufacturers include:
1913
- * "Apple", "Archos", "Amazon", "Asus", "Barnes & Noble", "BlackBerry",
1914
- * "Google", "HP", "HTC", "LG", "Microsoft", "Motorola", "Nintendo",
1915
- * "Nokia", "Samsung" and "Sony"
1916
- *
1917
- * @memberOf platform
1918
- * @type string|null
1919
- */
1920
- platform.manufacturer = manufacturer;
1921
-
1922
- /**
1923
- * The name of the browser/environment.
1924
- *
1925
- * The list of common browser names include:
1926
- * "Chrome", "Electron", "Firefox", "Firefox for iOS", "IE",
1927
- * "Microsoft Edge", "PhantomJS", "Safari", "SeaMonkey", "Silk",
1928
- * "Opera Mini" and "Opera"
1929
- *
1930
- * Mobile versions of some browsers have "Mobile" appended to their name:
1931
- * eg. "Chrome Mobile", "Firefox Mobile", "IE Mobile" and "Opera Mobile"
1932
- *
1933
- * @memberOf platform
1934
- * @type string|null
1935
- */
1936
- platform.name = name;
1937
-
1938
- /**
1939
- * The alpha/beta release indicator.
1940
- *
1941
- * @memberOf platform
1942
- * @type string|null
1943
- */
1944
- platform.prerelease = prerelease;
1945
-
1946
- /**
1947
- * The name of the product hosting the browser.
1948
- *
1949
- * The list of common products include:
1950
- *
1951
- * "BlackBerry", "Galaxy S4", "Lumia", "iPad", "iPod", "iPhone", "Kindle",
1952
- * "Kindle Fire", "Nexus", "Nook", "PlayBook", "TouchPad" and "Transformer"
1953
- *
1954
- * @memberOf platform
1955
- * @type string|null
1956
- */
1957
- platform.product = product;
1958
-
1959
- /**
1960
- * The browser's user agent string.
1961
- *
1962
- * @memberOf platform
1963
- * @type string|null
1964
- */
1965
- platform.ua = ua;
1966
-
1967
- /**
1968
- * The browser/environment version.
1969
- *
1970
- * @memberOf platform
1971
- * @type string|null
1972
- */
1973
- platform.version = name && version;
1974
-
1975
- /**
1976
- * The name of the operating system.
1977
- *
1978
- * @memberOf platform
1979
- * @type Object
1980
- */
1981
- platform.os = os || {
1982
-
1983
- /**
1984
- * The CPU architecture the OS is built for.
1985
- *
1986
- * @memberOf platform.os
1987
- * @type number|null
1988
- */
1989
- 'architecture': null,
1990
-
1991
- /**
1992
- * The family of the OS.
1993
- *
1994
- * Common values include:
1995
- * "Windows", "Windows Server 2008 R2 / 7", "Windows Server 2008 / Vista",
1996
- * "Windows XP", "OS X", "Linux", "Ubuntu", "Debian", "Fedora", "Red Hat",
1997
- * "SuSE", "Android", "iOS" and "Windows Phone"
1998
- *
1999
- * @memberOf platform.os
2000
- * @type string|null
2001
- */
2002
- 'family': null,
2003
-
2004
- /**
2005
- * The version of the OS.
2006
- *
2007
- * @memberOf platform.os
2008
- * @type string|null
2009
- */
2010
- 'version': null,
2011
-
2012
- /**
2013
- * Returns the OS string.
2014
- *
2015
- * @memberOf platform.os
2016
- * @returns {string} The OS string.
2017
- */
2018
- 'toString': function() { return 'null'; }
2019
- };
2020
-
2021
- platform.parse = parse;
2022
- platform.toString = toStringPlatform;
2023
-
2024
- if (platform.version) {
2025
- description.unshift(version);
2026
- }
2027
- if (platform.name) {
2028
- description.unshift(name);
2029
- }
2030
- if (os && name && !(os == String(os).split(' ')[0] && (os == name.split(' ')[0] || product))) {
2031
- description.push(product ? '(' + os + ')' : 'on ' + os);
2032
- }
2033
- if (description.length) {
2034
- platform.description = description.join(' ');
2035
- }
2036
- return platform;
2037
- }
2038
-
2039
- /*--------------------------------------------------------------------------*/
2040
-
2041
- // Export platform.
2042
- var platform = parse();
2043
-
2044
- // Some AMD build optimizers, like r.js, check for condition patterns like the following:
2045
- if (freeExports && freeModule) {
2046
- // Export for CommonJS support.
2047
- forOwn(platform, function(value, key) {
2048
- freeExports[key] = value;
2049
- });
2050
- }
2051
- else {
2052
- // Export to the global object.
2053
- root.platform = platform;
2054
- }
2055
- }.call(commonjsGlobal));
2056
- } (platform$1, platform$1.exports));
2057
-
2058
- var platform = platform$1.exports;
2059
-
2060
- var isMultipleHotkey = function isMultipleHotkey(hotkey) {
2061
- return Array.isArray(hotkey);
2062
- };
2063
- var replaceKeys = function replaceKeys(hotkey, keyName, replaceWith) {
2064
- return isMultipleHotkey(hotkey) ? hotkey.map(function (item) {
2065
- return item.replaceAll(keyName, replaceWith);
2066
- }) : hotkey.replaceAll(keyName, replaceWith);
2067
- };
2068
- var convertHotKeyToWindows = function convertHotKeyToWindows(hotkey) {
2069
- toPairs(MAC_TO_WINDOWS_KEYS_MAP).forEach(function (_ref) {
2070
- var _ref2 = _slicedToArray(_ref, 2),
2071
- macKey = _ref2[0],
2072
- windowsKey = _ref2[1];
2073
- hotkey = replaceKeys(hotkey, macKey, windowsKey);
2074
- });
2075
- return hotkey;
2076
- };
2077
- var convertHotkeyToUsersPlatform = function convertHotkeyToUsersPlatform(hotkey) {
2078
- var _platformInfo$os, _platformInfo$os$fami;
2079
- var platformInfo = platform.parse(navigator.userAgent);
2080
- var isOSX = (_platformInfo$os = platformInfo.os) === null || _platformInfo$os === void 0 ? void 0 : (_platformInfo$os$fami = _platformInfo$os.family) === null || _platformInfo$os$fami === void 0 ? void 0 : _platformInfo$os$fami.includes(OS.mac);
2081
- if (isOSX) return hotkey;
2082
- return convertHotKeyToWindows(hotkey);
2083
- };
2084
- var shortenHotKey = function shortenHotKey(hotkey) {
2085
- var result = hotkey;
2086
- Object.entries(KEY_SHORTFORM_MAP).forEach(function (_ref3) {
2087
- var _ref4 = _slicedToArray(_ref3, 2),
2088
- longform = _ref4[0],
2089
- shortform = _ref4[1];
2090
- result = result.replaceAll(longform, shortform);
2091
- });
2092
- return result;
2093
- };
2094
- var getGlobalShortcuts = function getGlobalShortcuts() {
2095
- return _defineProperty({}, i18next.t("neetoMolecules.keyboardShortcuts.global.categoryName"), {
2096
- openKeyboardShortcutsPane: {
2097
- sequence: "shift+/",
2098
- description: i18next.t("neetoMolecules.keyboardShortcuts.global.openKeyboardShortcutsPane")
2099
- },
2100
- close: {
2101
- sequence: "esc",
2102
- description: i18next.t("neetoMolecules.keyboardShortcuts.global.close")
2103
- },
2104
- submitForm: {
2105
- sequence: "command+return",
2106
- description: i18next.t("neetoMolecules.keyboardShortcuts.global.submitForm")
2107
- }
2108
- });
2109
- };
2110
- var getTooltipProps = function getTooltipProps(key) {
2111
- if (TOOLTIP_CONTENT[key]) {
2112
- return {
2113
- position: "top",
2114
- content: TOOLTIP_CONTENT[key],
2115
- followCursor: "horizontal"
2116
- };
2117
- }
2118
- return null;
2119
- };
2120
-
2121
- var HotKey = function HotKey(_ref) {
2122
- var description = _ref.description,
2123
- sequence = _ref.sequence;
2124
- var hotkey = shortenHotKey(convertHotkeyToUsersPlatform(sequence));
2125
- var isSequentialHotkey = hotkey.includes(" ");
2126
- var isSimultaneousHotkey = hotkey.includes("+");
2127
- var isSingleKeyHotkey = !isSequentialHotkey && !isSimultaneousHotkey;
2128
- var sequences = [];
2129
- if (isSingleKeyHotkey) {
2130
- sequences = [hotkey];
2131
- } else if (isSequentialHotkey) {
2132
- sequences = hotkey.split(" ");
2133
- } else if (isSimultaneousHotkey) {
2134
- sequences = hotkey.split("+");
2135
- }
2136
- return /*#__PURE__*/React.createElement("div", {
2137
- className: "my-3 w-full"
2138
- }, /*#__PURE__*/React.createElement("div", {
2139
- className: "flex items-center justify-between gap-3",
2140
- "data-cy": "hotkey-item",
2141
- "data-testid": "hotkey-item"
2142
- }, /*#__PURE__*/React.createElement(Typography, {
2143
- className: "neeto-ui-text-gray-800 min-w-0 flex-grow break-words",
2144
- lineHeight: "normal",
2145
- style: "body2"
2146
- }, description), /*#__PURE__*/React.createElement("div", {
2147
- className: "flex flex-shrink-0 items-center gap-1"
2148
- }, sequences.map(function (keyName, idx) {
2149
- return /*#__PURE__*/React.createElement(React.Fragment, {
2150
- key: idx
2151
- }, /*#__PURE__*/React.createElement(Kbd, {
2152
- keyName: keyName,
2153
- tooltipProps: getTooltipProps(keyName)
2154
- }), isSequentialHotkey && idx + 1 !== sequences.length && /*#__PURE__*/React.createElement(Kbd, {
2155
- keyName: "then"
2156
- }));
2157
- }))));
2158
- };
2159
- var HotKey$1 = /*#__PURE__*/React.memo(HotKey);
2160
-
2161
- var HotKeyList = function HotKeyList(_ref) {
2162
- var hotkeys = _ref.hotkeys;
2163
- var _useTranslation = useTranslation(),
2164
- t = _useTranslation.t;
2165
- return Object.keys(hotkeys).map(function (categoryName) {
2166
- var categoryValues = hotkeys[categoryName];
2167
- var fullShortcutsLink = categoryValues[FULL_SHORTCUTS_LINK_PROP_NAME];
2168
- return /*#__PURE__*/React.createElement("div", {
2169
- className: "mt-4 px-4",
2170
- key: categoryName
2171
- }, /*#__PURE__*/React.createElement(Typography, {
2172
- style: "h6",
2173
- textTransform: "uppercase",
2174
- weight: "bold"
2175
- }, categoryName), Object.entries(categoryValues).map(function (_ref2) {
2176
- var _ref3 = _slicedToArray(_ref2, 2),
2177
- _ref3$ = _ref3[1],
2178
- sequence = _ref3$.sequence,
2179
- description = _ref3$.description;
2180
- return sequence && /*#__PURE__*/React.createElement(HotKey$1, {
2181
- description: description,
2182
- key: sequence,
2183
- sequence: sequence
2184
- });
2185
- }), fullShortcutsLink && /*#__PURE__*/React.createElement(Button, {
2186
- className: "mb-3",
2187
- href: fullShortcutsLink,
2188
- style: "link",
2189
- target: "_blank",
2190
- label: t("neetoMolecules.keyboardShortcuts.viewFullListOfShortcuts")
2191
- }));
2192
- });
2193
- };
2194
- var HotKeyList$1 = /*#__PURE__*/React.memo(HotKeyList);
2195
-
2196
- var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
2197
-
2198
- var css = ".neeto-molecules-keyboard-shortcuts-pane{flex-grow:0;flex-shrink:0;z-index:calc(var(--neeto-ui-modal-z-index) + 1)}";
2199
- n(css,{});
2200
-
2201
- var KeyboardShortcutsPane = function KeyboardShortcutsPane(_ref) {
2202
- var _ref$productShortcuts = _ref.productShortcuts,
2203
- productShortcuts = _ref$productShortcuts === void 0 ? {} : _ref$productShortcuts;
2204
- var _useKeyboardShortcuts = useKeyboardShortcutsPaneState(),
2205
- _useKeyboardShortcuts2 = _slicedToArray(_useKeyboardShortcuts, 2),
2206
- isOpen = _useKeyboardShortcuts2[0],
2207
- setIsOpen = _useKeyboardShortcuts2[1];
2208
- var hasOverlays = manager.hasOverlays();
2209
- // eslint-disable-next-line @bigbinary/neeto/no-dangling-constants
2210
- var GLOBAL_SHORTCUTS = getGlobalShortcuts();
2211
- var _useTranslation = useTranslation(),
2212
- t = _useTranslation.t;
2213
- var shortcuts = GLOBAL_SHORTCUTS[t("neetoMolecules.keyboardShortcuts.global.categoryName")];
2214
- useHotKeys(shortcuts.openKeyboardShortcutsPane.sequence, function () {
2215
- return setIsOpen(function (prevIsOpen) {
2216
- return !prevIsOpen;
2217
- });
2218
- });
2219
- useHotKeys(shortcuts.close.sequence, function () {
2220
- return setIsOpen(false);
2221
- });
2222
- return /*#__PURE__*/React.createElement("div", {
2223
- "data-cy": "keyboard-shortcuts-pane",
2224
- className: classnames("neeto-molecules-keyboard-shortcuts-pane neeto-ui-border-gray-300 transition-width neeto-ui-bg-white ml-auto h-screen overflow-hidden border-l duration-300 ease-in-out", {
2225
- "w-80": isOpen,
2226
- "w-0": !isOpen,
2227
- absolute: hasOverlays,
2228
- "right-0": hasOverlays
2229
- })
2230
- }, /*#__PURE__*/React.createElement("div", {
2231
- className: "h-full w-80 overflow-y-auto"
2232
- }, /*#__PURE__*/React.createElement("div", {
2233
- className: "neeto-ui-border-gray-300 my-2 flex items-center justify-between border-b px-4 pb-2"
2234
- }, /*#__PURE__*/React.createElement(Typography, {
2235
- style: "h4"
2236
- }, t("neetoMolecules.keyboardShortcuts.title")), /*#__PURE__*/React.createElement(Button, {
2237
- icon: Close,
2238
- style: "text",
2239
- onClick: function onClick() {
2240
- return setIsOpen(false);
2241
- }
2242
- })), /*#__PURE__*/React.createElement(HotKeyList$1, {
2243
- hotkeys: GLOBAL_SHORTCUTS
2244
- }), /*#__PURE__*/React.createElement(HotKeyList$1, {
2245
- hotkeys: productShortcuts
2246
- })));
2247
- };
2248
-
2249
- var KeyboardShortcuts = {
2250
- Pane: KeyboardShortcutsPane,
2251
- usePaneState: useKeyboardShortcutsPaneState,
2252
- GLOBAL_SHORTCUTS: getGlobalShortcuts()
2253
- };
2254
-
2255
- export { KeyboardShortcuts as default };
2256
- //# sourceMappingURL=KeyboardShortcuts.js.map