@bigbinary/neeto-molecules 3.15.42 → 3.15.43

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 (426) hide show
  1. package/package.json +1 -1
  2. package/dist/AuditLogs.js +0 -539
  3. package/dist/AuditLogs.js.map +0 -1
  4. package/dist/BoardView.js +0 -394
  5. package/dist/BoardView.js.map +0 -1
  6. package/dist/Breadcrumbs.js +0 -46
  7. package/dist/Breadcrumbs.js.map +0 -1
  8. package/dist/BrowserPreview.js +0 -50
  9. package/dist/BrowserPreview.js.map +0 -1
  10. package/dist/BrowserSupport.js +0 -348
  11. package/dist/BrowserSupport.js.map +0 -1
  12. package/dist/Builder.js +0 -786
  13. package/dist/Builder.js.map +0 -1
  14. package/dist/ButtonGroup.js +0 -36
  15. package/dist/ButtonGroup.js.map +0 -1
  16. package/dist/CalendarView.js +0 -353
  17. package/dist/CalendarView.js.map +0 -1
  18. package/dist/CardLayout.js +0 -49
  19. package/dist/CardLayout.js.map +0 -1
  20. package/dist/Chevron-6dLkaXtR.js +0 -246
  21. package/dist/Chevron-6dLkaXtR.js.map +0 -1
  22. package/dist/Codeblock.js +0 -58
  23. package/dist/Codeblock.js.map +0 -1
  24. package/dist/Columns.js +0 -21
  25. package/dist/Columns.js.map +0 -1
  26. package/dist/ConfigurePageSidebar.js +0 -97
  27. package/dist/ConfigurePageSidebar.js.map +0 -1
  28. package/dist/ConfirmationModal.js +0 -110
  29. package/dist/ConfirmationModal.js.map +0 -1
  30. package/dist/Container.js +0 -38
  31. package/dist/Container.js.map +0 -1
  32. package/dist/CopyToClipboardButton.js +0 -82
  33. package/dist/CopyToClipboardButton.js.map +0 -1
  34. package/dist/Currency.js +0 -917
  35. package/dist/Currency.js.map +0 -1
  36. package/dist/DateFormat.js +0 -45
  37. package/dist/DateFormat.js.map +0 -1
  38. package/dist/DateRangeFilter.js +0 -178
  39. package/dist/DateRangeFilter.js.map +0 -1
  40. package/dist/DeleteArchiveModal.js +0 -98
  41. package/dist/DeleteArchiveModal.js.map +0 -1
  42. package/dist/DeviceIncompatibilityMessage.js +0 -95
  43. package/dist/DeviceIncompatibilityMessage.js.map +0 -1
  44. package/dist/DocumentEditor.js +0 -183
  45. package/dist/DocumentEditor.js.map +0 -1
  46. package/dist/DownloadMobileAppCallout.js +0 -40
  47. package/dist/DownloadMobileAppCallout.js.map +0 -1
  48. package/dist/DynamicVariables.js +0 -115
  49. package/dist/DynamicVariables.js.map +0 -1
  50. package/dist/EmailForm.js +0 -567
  51. package/dist/EmailForm.js.map +0 -1
  52. package/dist/EmailPreview.js +0 -140
  53. package/dist/EmailPreview.js.map +0 -1
  54. package/dist/EmojiPicker.js +0 -112
  55. package/dist/EmojiPicker.js.map +0 -1
  56. package/dist/EmojiReactions.js +0 -82
  57. package/dist/EmojiReactions.js.map +0 -1
  58. package/dist/Engagements.js +0 -292
  59. package/dist/Engagements.js.map +0 -1
  60. package/dist/ErrorPage.js +0 -1811
  61. package/dist/ErrorPage.js.map +0 -1
  62. package/dist/FileUpload.js +0 -595
  63. package/dist/FileUpload.js.map +0 -1
  64. package/dist/FinderModal.js +0 -280
  65. package/dist/FinderModal.js.map +0 -1
  66. package/dist/FloatingActionMenu.js +0 -854
  67. package/dist/FloatingActionMenu.js.map +0 -1
  68. package/dist/GoogleFontPicker.js +0 -581
  69. package/dist/GoogleFontPicker.js.map +0 -1
  70. package/dist/Header.js +0 -126
  71. package/dist/Header.js.map +0 -1
  72. package/dist/HelpPopover.js +0 -83
  73. package/dist/HelpPopover.js.map +0 -1
  74. package/dist/IconPicker.js +0 -1159
  75. package/dist/IconPicker.js.map +0 -1
  76. package/dist/ImageWithFallback.js +0 -49
  77. package/dist/ImageWithFallback.js.map +0 -1
  78. package/dist/InlineInput.js +0 -230
  79. package/dist/InlineInput.js.map +0 -1
  80. package/dist/Insights.js +0 -358
  81. package/dist/Insights.js.map +0 -1
  82. package/dist/IntegrationCard.js +0 -227
  83. package/dist/IntegrationCard.js.map +0 -1
  84. package/dist/IpRestriction.js +0 -3617
  85. package/dist/IpRestriction.js.map +0 -1
  86. package/dist/KeyboardShortcuts.js +0 -284
  87. package/dist/KeyboardShortcuts.js.map +0 -1
  88. package/dist/LoginPage.js +0 -184
  89. package/dist/LoginPage.js.map +0 -1
  90. package/dist/MadeWith.js +0 -41
  91. package/dist/MadeWith.js.map +0 -1
  92. package/dist/MenuBar.js +0 -1326
  93. package/dist/MenuBar.js.map +0 -1
  94. package/dist/Metadata.js +0 -218
  95. package/dist/Metadata.js.map +0 -1
  96. package/dist/MobilePreviewHeader.js +0 -25
  97. package/dist/MobilePreviewHeader.js.map +0 -1
  98. package/dist/MoreDropdown.js +0 -163
  99. package/dist/MoreDropdown.js.map +0 -1
  100. package/dist/NavigationHeader.js +0 -264
  101. package/dist/NavigationHeader.js.map +0 -1
  102. package/dist/NeetoWidget.js +0 -2867
  103. package/dist/NeetoWidget.js.map +0 -1
  104. package/dist/Onboarding.js +0 -246
  105. package/dist/Onboarding.js.map +0 -1
  106. package/dist/OptionFields.js +0 -717
  107. package/dist/OptionFields.js.map +0 -1
  108. package/dist/PageLoader.js +0 -40
  109. package/dist/PageLoader.js.map +0 -1
  110. package/dist/PhoneNumber.js +0 -75
  111. package/dist/PhoneNumber.js.map +0 -1
  112. package/dist/ProductEmbed.js +0 -884
  113. package/dist/ProductEmbed.js.map +0 -1
  114. package/dist/PublishBlock.js +0 -447
  115. package/dist/PublishBlock.js.map +0 -1
  116. package/dist/PublishYourItem.js +0 -58
  117. package/dist/PublishYourItem.js.map +0 -1
  118. package/dist/Rename.js +0 -366
  119. package/dist/Rename.js.map +0 -1
  120. package/dist/ResponsiveDevicePicker.js +0 -63
  121. package/dist/ResponsiveDevicePicker.js.map +0 -1
  122. package/dist/Schedule.js +0 -926
  123. package/dist/Schedule.js.map +0 -1
  124. package/dist/Scrollable.js +0 -42
  125. package/dist/Scrollable.js.map +0 -1
  126. package/dist/Search.js +0 -110
  127. package/dist/Search.js.map +0 -1
  128. package/dist/SendToFields.js +0 -2221
  129. package/dist/SendToFields.js.map +0 -1
  130. package/dist/SessionEnvironment.js +0 -431
  131. package/dist/SessionEnvironment.js.map +0 -1
  132. package/dist/Settings.js +0 -250
  133. package/dist/Settings.js.map +0 -1
  134. package/dist/ShareRecordingPane.js +0 -216
  135. package/dist/ShareRecordingPane.js.map +0 -1
  136. package/dist/ShareViaEmail.js +0 -416
  137. package/dist/ShareViaEmail.js.map +0 -1
  138. package/dist/ShareViaLink.js +0 -1556
  139. package/dist/ShareViaLink.js.map +0 -1
  140. package/dist/Sidebar.js +0 -294
  141. package/dist/Sidebar.js.map +0 -1
  142. package/dist/StatusDropdown.js +0 -109
  143. package/dist/StatusDropdown.js.map +0 -1
  144. package/dist/StickyRibbonsContainer.js +0 -131
  145. package/dist/StickyRibbonsContainer.js.map +0 -1
  146. package/dist/SubHeader.js +0 -209
  147. package/dist/SubHeader.js.map +0 -1
  148. package/dist/SubscriptionNotificationsContainer.js +0 -77
  149. package/dist/SubscriptionNotificationsContainer.js.map +0 -1
  150. package/dist/SuffixedInput.js +0 -111
  151. package/dist/SuffixedInput.js.map +0 -1
  152. package/dist/TableWrapper.js +0 -27
  153. package/dist/TableWrapper.js.map +0 -1
  154. package/dist/Taxonomy.js +0 -496
  155. package/dist/Taxonomy.js.map +0 -1
  156. package/dist/TimeFormat.js +0 -14
  157. package/dist/TimeFormat.js.map +0 -1
  158. package/dist/TimezoneMismatchModal.js +0 -138
  159. package/dist/TimezoneMismatchModal.js.map +0 -1
  160. package/dist/ToggleFeatureCard.js +0 -211
  161. package/dist/ToggleFeatureCard.js.map +0 -1
  162. package/dist/_commonjsHelpers-BFTU3MAI.js +0 -8
  163. package/dist/_commonjsHelpers-BFTU3MAI.js.map +0 -1
  164. package/dist/cjs/AuditLogs.js +0 -541
  165. package/dist/cjs/AuditLogs.js.map +0 -1
  166. package/dist/cjs/BoardView.js +0 -396
  167. package/dist/cjs/BoardView.js.map +0 -1
  168. package/dist/cjs/Breadcrumbs.js +0 -48
  169. package/dist/cjs/Breadcrumbs.js.map +0 -1
  170. package/dist/cjs/BrowserPreview.js +0 -52
  171. package/dist/cjs/BrowserPreview.js.map +0 -1
  172. package/dist/cjs/BrowserSupport.js +0 -350
  173. package/dist/cjs/BrowserSupport.js.map +0 -1
  174. package/dist/cjs/Builder.js +0 -794
  175. package/dist/cjs/Builder.js.map +0 -1
  176. package/dist/cjs/ButtonGroup.js +0 -38
  177. package/dist/cjs/ButtonGroup.js.map +0 -1
  178. package/dist/cjs/CalendarView.js +0 -355
  179. package/dist/cjs/CalendarView.js.map +0 -1
  180. package/dist/cjs/CardLayout.js +0 -51
  181. package/dist/cjs/CardLayout.js.map +0 -1
  182. package/dist/cjs/Chevron-wfVdaB4-.js +0 -256
  183. package/dist/cjs/Chevron-wfVdaB4-.js.map +0 -1
  184. package/dist/cjs/Codeblock.js +0 -60
  185. package/dist/cjs/Codeblock.js.map +0 -1
  186. package/dist/cjs/Columns.js +0 -35
  187. package/dist/cjs/Columns.js.map +0 -1
  188. package/dist/cjs/ConfigurePageSidebar.js +0 -99
  189. package/dist/cjs/ConfigurePageSidebar.js.map +0 -1
  190. package/dist/cjs/ConfirmationModal.js +0 -131
  191. package/dist/cjs/ConfirmationModal.js.map +0 -1
  192. package/dist/cjs/Container.js +0 -40
  193. package/dist/cjs/Container.js.map +0 -1
  194. package/dist/cjs/CopyToClipboardButton.js +0 -84
  195. package/dist/cjs/CopyToClipboardButton.js.map +0 -1
  196. package/dist/cjs/Currency.js +0 -920
  197. package/dist/cjs/Currency.js.map +0 -1
  198. package/dist/cjs/DateFormat.js +0 -47
  199. package/dist/cjs/DateFormat.js.map +0 -1
  200. package/dist/cjs/DateRangeFilter.js +0 -180
  201. package/dist/cjs/DateRangeFilter.js.map +0 -1
  202. package/dist/cjs/DeleteArchiveModal.js +0 -100
  203. package/dist/cjs/DeleteArchiveModal.js.map +0 -1
  204. package/dist/cjs/DeviceIncompatibilityMessage.js +0 -115
  205. package/dist/cjs/DeviceIncompatibilityMessage.js.map +0 -1
  206. package/dist/cjs/DocumentEditor.js +0 -185
  207. package/dist/cjs/DocumentEditor.js.map +0 -1
  208. package/dist/cjs/DownloadMobileAppCallout.js +0 -42
  209. package/dist/cjs/DownloadMobileAppCallout.js.map +0 -1
  210. package/dist/cjs/DynamicVariables.js +0 -117
  211. package/dist/cjs/DynamicVariables.js.map +0 -1
  212. package/dist/cjs/EmailForm.js +0 -593
  213. package/dist/cjs/EmailForm.js.map +0 -1
  214. package/dist/cjs/EmailPreview.js +0 -142
  215. package/dist/cjs/EmailPreview.js.map +0 -1
  216. package/dist/cjs/EmojiPicker.js +0 -114
  217. package/dist/cjs/EmojiPicker.js.map +0 -1
  218. package/dist/cjs/EmojiReactions.js +0 -84
  219. package/dist/cjs/EmojiReactions.js.map +0 -1
  220. package/dist/cjs/Engagements.js +0 -294
  221. package/dist/cjs/Engagements.js.map +0 -1
  222. package/dist/cjs/ErrorPage.js +0 -1831
  223. package/dist/cjs/ErrorPage.js.map +0 -1
  224. package/dist/cjs/FileUpload.js +0 -598
  225. package/dist/cjs/FileUpload.js.map +0 -1
  226. package/dist/cjs/FinderModal.js +0 -282
  227. package/dist/cjs/FinderModal.js.map +0 -1
  228. package/dist/cjs/FloatingActionMenu.js +0 -875
  229. package/dist/cjs/FloatingActionMenu.js.map +0 -1
  230. package/dist/cjs/GoogleFontPicker.js +0 -583
  231. package/dist/cjs/GoogleFontPicker.js.map +0 -1
  232. package/dist/cjs/Header.js +0 -128
  233. package/dist/cjs/Header.js.map +0 -1
  234. package/dist/cjs/HelpPopover.js +0 -85
  235. package/dist/cjs/HelpPopover.js.map +0 -1
  236. package/dist/cjs/IconPicker.js +0 -1161
  237. package/dist/cjs/IconPicker.js.map +0 -1
  238. package/dist/cjs/ImageWithFallback.js +0 -51
  239. package/dist/cjs/ImageWithFallback.js.map +0 -1
  240. package/dist/cjs/InlineInput.js +0 -233
  241. package/dist/cjs/InlineInput.js.map +0 -1
  242. package/dist/cjs/Insights.js +0 -360
  243. package/dist/cjs/Insights.js.map +0 -1
  244. package/dist/cjs/IntegrationCard.js +0 -229
  245. package/dist/cjs/IntegrationCard.js.map +0 -1
  246. package/dist/cjs/IpRestriction.js +0 -3638
  247. package/dist/cjs/IpRestriction.js.map +0 -1
  248. package/dist/cjs/KeyboardShortcuts.js +0 -286
  249. package/dist/cjs/KeyboardShortcuts.js.map +0 -1
  250. package/dist/cjs/LoginPage.js +0 -205
  251. package/dist/cjs/LoginPage.js.map +0 -1
  252. package/dist/cjs/MadeWith.js +0 -43
  253. package/dist/cjs/MadeWith.js.map +0 -1
  254. package/dist/cjs/MenuBar.js +0 -1328
  255. package/dist/cjs/MenuBar.js.map +0 -1
  256. package/dist/cjs/Metadata.js +0 -220
  257. package/dist/cjs/Metadata.js.map +0 -1
  258. package/dist/cjs/MobilePreviewHeader.js +0 -27
  259. package/dist/cjs/MobilePreviewHeader.js.map +0 -1
  260. package/dist/cjs/MoreDropdown.js +0 -165
  261. package/dist/cjs/MoreDropdown.js.map +0 -1
  262. package/dist/cjs/NavigationHeader.js +0 -266
  263. package/dist/cjs/NavigationHeader.js.map +0 -1
  264. package/dist/cjs/NeetoWidget.js +0 -2888
  265. package/dist/cjs/NeetoWidget.js.map +0 -1
  266. package/dist/cjs/Onboarding.js +0 -248
  267. package/dist/cjs/Onboarding.js.map +0 -1
  268. package/dist/cjs/OptionFields.js +0 -719
  269. package/dist/cjs/OptionFields.js.map +0 -1
  270. package/dist/cjs/PageLoader.js +0 -42
  271. package/dist/cjs/PageLoader.js.map +0 -1
  272. package/dist/cjs/PhoneNumber.js +0 -80
  273. package/dist/cjs/PhoneNumber.js.map +0 -1
  274. package/dist/cjs/ProductEmbed.js +0 -886
  275. package/dist/cjs/ProductEmbed.js.map +0 -1
  276. package/dist/cjs/PublishBlock.js +0 -449
  277. package/dist/cjs/PublishBlock.js.map +0 -1
  278. package/dist/cjs/PublishYourItem.js +0 -60
  279. package/dist/cjs/PublishYourItem.js.map +0 -1
  280. package/dist/cjs/Rename.js +0 -368
  281. package/dist/cjs/Rename.js.map +0 -1
  282. package/dist/cjs/ResponsiveDevicePicker.js +0 -65
  283. package/dist/cjs/ResponsiveDevicePicker.js.map +0 -1
  284. package/dist/cjs/Schedule.js +0 -947
  285. package/dist/cjs/Schedule.js.map +0 -1
  286. package/dist/cjs/Scrollable.js +0 -44
  287. package/dist/cjs/Scrollable.js.map +0 -1
  288. package/dist/cjs/Search.js +0 -112
  289. package/dist/cjs/Search.js.map +0 -1
  290. package/dist/cjs/SendToFields.js +0 -2223
  291. package/dist/cjs/SendToFields.js.map +0 -1
  292. package/dist/cjs/SessionEnvironment.js +0 -433
  293. package/dist/cjs/SessionEnvironment.js.map +0 -1
  294. package/dist/cjs/Settings.js +0 -252
  295. package/dist/cjs/Settings.js.map +0 -1
  296. package/dist/cjs/ShareRecordingPane.js +0 -218
  297. package/dist/cjs/ShareRecordingPane.js.map +0 -1
  298. package/dist/cjs/ShareViaEmail.js +0 -437
  299. package/dist/cjs/ShareViaEmail.js.map +0 -1
  300. package/dist/cjs/ShareViaLink.js +0 -1577
  301. package/dist/cjs/ShareViaLink.js.map +0 -1
  302. package/dist/cjs/Sidebar.js +0 -315
  303. package/dist/cjs/Sidebar.js.map +0 -1
  304. package/dist/cjs/StatusDropdown.js +0 -111
  305. package/dist/cjs/StatusDropdown.js.map +0 -1
  306. package/dist/cjs/StickyRibbonsContainer.js +0 -133
  307. package/dist/cjs/StickyRibbonsContainer.js.map +0 -1
  308. package/dist/cjs/SubHeader.js +0 -211
  309. package/dist/cjs/SubHeader.js.map +0 -1
  310. package/dist/cjs/SubscriptionNotificationsContainer.js +0 -79
  311. package/dist/cjs/SubscriptionNotificationsContainer.js.map +0 -1
  312. package/dist/cjs/SuffixedInput.js +0 -113
  313. package/dist/cjs/SuffixedInput.js.map +0 -1
  314. package/dist/cjs/TableWrapper.js +0 -29
  315. package/dist/cjs/TableWrapper.js.map +0 -1
  316. package/dist/cjs/Taxonomy.js +0 -517
  317. package/dist/cjs/Taxonomy.js.map +0 -1
  318. package/dist/cjs/TimeFormat.js +0 -16
  319. package/dist/cjs/TimeFormat.js.map +0 -1
  320. package/dist/cjs/TimezoneMismatchModal.js +0 -140
  321. package/dist/cjs/TimezoneMismatchModal.js.map +0 -1
  322. package/dist/cjs/ToggleFeatureCard.js +0 -213
  323. package/dist/cjs/ToggleFeatureCard.js.map +0 -1
  324. package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +0 -11
  325. package/dist/cjs/_commonjsHelpers-BJu3ubxk.js.map +0 -1
  326. package/dist/cjs/index-JY2zVpnv.js +0 -1189
  327. package/dist/cjs/index-JY2zVpnv.js.map +0 -1
  328. package/dist/cjs/inject-css-vQvjPR2x.js +0 -6
  329. package/dist/cjs/inject-css-vQvjPR2x.js.map +0 -1
  330. package/dist/cjs/phone-number-BN-c0rfv.js +0 -320
  331. package/dist/cjs/phone-number-BN-c0rfv.js.map +0 -1
  332. package/dist/cjs/platform-BUcCb8Jx.js +0 -1254
  333. package/dist/cjs/platform-BUcCb8Jx.js.map +0 -1
  334. package/dist/cjs/useColumns-BP8c4PV-.js +0 -282
  335. package/dist/cjs/useColumns-BP8c4PV-.js.map +0 -1
  336. package/dist/index-DAYCJu79.js +0 -1187
  337. package/dist/index-DAYCJu79.js.map +0 -1
  338. package/dist/inject-css-DmrvuTKK.js +0 -4
  339. package/dist/inject-css-DmrvuTKK.js.map +0 -1
  340. package/dist/phone-number-CXCBroLh.js +0 -295
  341. package/dist/phone-number-CXCBroLh.js.map +0 -1
  342. package/dist/platform-F44zJ4Xh.js +0 -1252
  343. package/dist/platform-F44zJ4Xh.js.map +0 -1
  344. package/dist/styles/page-loader.css +0 -1
  345. package/dist/styles/page-loader.js +0 -3
  346. package/dist/useColumns-Db5uic1-.js +0 -274
  347. package/dist/useColumns-Db5uic1-.js.map +0 -1
  348. package/types/AuditLogs.d.ts +0 -22
  349. package/types/BoardView.d.ts +0 -149
  350. package/types/Breadcrumbs.d.ts +0 -30
  351. package/types/BrowserPreview.d.ts +0 -30
  352. package/types/BrowserSupport.d.ts +0 -110
  353. package/types/Builder.d.ts +0 -99
  354. package/types/ButtonGroup.d.ts +0 -45
  355. package/types/CalendarView.d.ts +0 -98
  356. package/types/CardLayout.d.ts +0 -34
  357. package/types/Codeblock.d.ts +0 -37
  358. package/types/Columns.d.ts +0 -168
  359. package/types/ConfigurePageSidebar.d.ts +0 -45
  360. package/types/ConfirmationModal.d.ts +0 -65
  361. package/types/Container.d.ts +0 -38
  362. package/types/CopyToClipboardButton.d.ts +0 -28
  363. package/types/Currency.d.ts +0 -50
  364. package/types/DateFormat.d.ts +0 -15
  365. package/types/DateRangeFilter.d.ts +0 -56
  366. package/types/DeleteArchiveModal.d.ts +0 -65
  367. package/types/DeviceIncompatibilityMessage.d.ts +0 -19
  368. package/types/DocumentEditor.d.ts +0 -61
  369. package/types/DownloadMobileAppCallout.d.ts +0 -35
  370. package/types/DynamicVariables.d.ts +0 -48
  371. package/types/EmailForm.d.ts +0 -165
  372. package/types/EmailFormProvider.d.ts +0 -48
  373. package/types/EmailPreview.d.ts +0 -43
  374. package/types/EmojiPicker.d.ts +0 -35
  375. package/types/EmojiReactions.d.ts +0 -62
  376. package/types/Engagements.d.ts +0 -131
  377. package/types/ErrorPage.d.ts +0 -22
  378. package/types/FileUpload.d.ts +0 -89
  379. package/types/FinderModal.d.ts +0 -66
  380. package/types/FloatingActionMenu.d.ts +0 -59
  381. package/types/GoogleFontPicker.d.ts +0 -68
  382. package/types/Header.d.ts +0 -37
  383. package/types/HelpPopover.d.ts +0 -45
  384. package/types/IconPicker.d.ts +0 -45
  385. package/types/ImageWithFallback.d.ts +0 -24
  386. package/types/InlineInput.d.ts +0 -87
  387. package/types/Insights.d.ts +0 -112
  388. package/types/IntegrationCard.d.ts +0 -60
  389. package/types/IpRestriction.d.ts +0 -25
  390. package/types/KeyboardShortcuts.d.ts +0 -149
  391. package/types/LoginPage.d.ts +0 -45
  392. package/types/MadeWith.d.ts +0 -18
  393. package/types/MenuBar.d.ts +0 -127
  394. package/types/Metadata.d.ts +0 -109
  395. package/types/MobilePreviewHeader.d.ts +0 -19
  396. package/types/MoreDropdown.d.ts +0 -52
  397. package/types/NavigationHeader.d.ts +0 -180
  398. package/types/NeetoWidget.d.ts +0 -43
  399. package/types/Onboarding.d.ts +0 -70
  400. package/types/OptionFields.d.ts +0 -70
  401. package/types/PageLoader.d.ts +0 -40
  402. package/types/PhoneNumber.d.ts +0 -112
  403. package/types/ProductEmbed.d.ts +0 -93
  404. package/types/PublishBlock.d.ts +0 -148
  405. package/types/Rename.d.ts +0 -73
  406. package/types/ResponsiveDevicePicker.d.ts +0 -32
  407. package/types/Schedule.d.ts +0 -146
  408. package/types/Scrollable.d.ts +0 -30
  409. package/types/Search.d.ts +0 -22
  410. package/types/SendToFields.d.ts +0 -67
  411. package/types/SessionEnvironment.d.ts +0 -170
  412. package/types/Settings.d.ts +0 -108
  413. package/types/ShareRecordingPane.d.ts +0 -85
  414. package/types/ShareViaEmail.d.ts +0 -99
  415. package/types/ShareViaLink.d.ts +0 -183
  416. package/types/Sidebar.d.ts +0 -51
  417. package/types/StatusDropdown.d.ts +0 -74
  418. package/types/StickyRibbonsContainer.d.ts +0 -28
  419. package/types/SubHeader.d.ts +0 -105
  420. package/types/SubscriptionNotificationsContainer.d.ts +0 -26
  421. package/types/SuffixedInput.d.ts +0 -45
  422. package/types/TableWrapper.d.ts +0 -40
  423. package/types/Taxonomy.d.ts +0 -59
  424. package/types/TimeFormat.d.ts +0 -13
  425. package/types/TimezoneMismatchModal.d.ts +0 -41
  426. package/types/ToggleFeatureCard.d.ts +0 -38
@@ -1,1831 +0,0 @@
1
- 'use strict';
2
-
3
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
- var shallow = require('zustand/shallow');
5
- var React = require('react');
6
- var useDisplayErrorPage = require('@bigbinary/neeto-commons-frontend/react-utils/useDisplayErrorPage');
7
- var Button = require('@bigbinary/neetoui/Button');
8
- var Typography = require('@bigbinary/neetoui/Typography');
9
- var reactHelmet = require('react-helmet');
10
- var reactI18next = require('react-i18next');
11
- var injectCss = require('./inject-css-vQvjPR2x.js');
12
- var jsxRuntime = require('react/jsx-runtime');
13
-
14
- function _interopNamespaceDefault(e) {
15
- var n = Object.create(null);
16
- if (e) {
17
- Object.keys(e).forEach(function (k) {
18
- if (k !== 'default') {
19
- var d = Object.getOwnPropertyDescriptor(e, k);
20
- Object.defineProperty(n, k, d.get ? d : {
21
- enumerable: true,
22
- get: function () { return e[k]; }
23
- });
24
- }
25
- });
26
- }
27
- n.default = e;
28
- return Object.freeze(n);
29
- }
30
-
31
- var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
32
-
33
- /*! @license DOMPurify 3.0.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.3/LICENSE */
34
-
35
- const {
36
- entries,
37
- setPrototypeOf,
38
- isFrozen,
39
- getPrototypeOf,
40
- getOwnPropertyDescriptor
41
- } = Object;
42
- let {
43
- freeze,
44
- seal,
45
- create
46
- } = Object; // eslint-disable-line import/no-mutable-exports
47
-
48
- let {
49
- apply,
50
- construct
51
- } = typeof Reflect !== 'undefined' && Reflect;
52
-
53
- if (!apply) {
54
- apply = function apply(fun, thisValue, args) {
55
- return fun.apply(thisValue, args);
56
- };
57
- }
58
-
59
- if (!freeze) {
60
- freeze = function freeze(x) {
61
- return x;
62
- };
63
- }
64
-
65
- if (!seal) {
66
- seal = function seal(x) {
67
- return x;
68
- };
69
- }
70
-
71
- if (!construct) {
72
- construct = function construct(Func, args) {
73
- return new Func(...args);
74
- };
75
- }
76
-
77
- const arrayForEach = unapply(Array.prototype.forEach);
78
- const arrayPop = unapply(Array.prototype.pop);
79
- const arrayPush = unapply(Array.prototype.push);
80
- const stringToLowerCase = unapply(String.prototype.toLowerCase);
81
- const stringToString = unapply(String.prototype.toString);
82
- const stringMatch = unapply(String.prototype.match);
83
- const stringReplace = unapply(String.prototype.replace);
84
- const stringIndexOf = unapply(String.prototype.indexOf);
85
- const stringTrim = unapply(String.prototype.trim);
86
- const regExpTest = unapply(RegExp.prototype.test);
87
- const typeErrorCreate = unconstruct(TypeError);
88
- function unapply(func) {
89
- return function (thisArg) {
90
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
91
- args[_key - 1] = arguments[_key];
92
- }
93
-
94
- return apply(func, thisArg, args);
95
- };
96
- }
97
- function unconstruct(func) {
98
- return function () {
99
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
100
- args[_key2] = arguments[_key2];
101
- }
102
-
103
- return construct(func, args);
104
- };
105
- }
106
- /* Add properties to a lookup table */
107
-
108
- function addToSet(set, array, transformCaseFunc) {
109
- var _transformCaseFunc;
110
-
111
- transformCaseFunc = (_transformCaseFunc = transformCaseFunc) !== null && _transformCaseFunc !== void 0 ? _transformCaseFunc : stringToLowerCase;
112
-
113
- if (setPrototypeOf) {
114
- // Make 'in' and truthy checks like Boolean(set.constructor)
115
- // independent of any properties defined on Object.prototype.
116
- // Prevent prototype setters from intercepting set as a this value.
117
- setPrototypeOf(set, null);
118
- }
119
-
120
- let l = array.length;
121
-
122
- while (l--) {
123
- let element = array[l];
124
-
125
- if (typeof element === 'string') {
126
- const lcElement = transformCaseFunc(element);
127
-
128
- if (lcElement !== element) {
129
- // Config presets (e.g. tags.js, attrs.js) are immutable.
130
- if (!isFrozen(array)) {
131
- array[l] = lcElement;
132
- }
133
-
134
- element = lcElement;
135
- }
136
- }
137
-
138
- set[element] = true;
139
- }
140
-
141
- return set;
142
- }
143
- /* Shallow clone an object */
144
-
145
- function clone(object) {
146
- const newObject = create(null);
147
-
148
- for (const [property, value] of entries(object)) {
149
- newObject[property] = value;
150
- }
151
-
152
- return newObject;
153
- }
154
- /* This method automatically checks if the prop is function
155
- * or getter and behaves accordingly. */
156
-
157
- function lookupGetter(object, prop) {
158
- while (object !== null) {
159
- const desc = getOwnPropertyDescriptor(object, prop);
160
-
161
- if (desc) {
162
- if (desc.get) {
163
- return unapply(desc.get);
164
- }
165
-
166
- if (typeof desc.value === 'function') {
167
- return unapply(desc.value);
168
- }
169
- }
170
-
171
- object = getPrototypeOf(object);
172
- }
173
-
174
- function fallbackValue(element) {
175
- console.warn('fallback value for', element);
176
- return null;
177
- }
178
-
179
- return fallbackValue;
180
- }
181
-
182
- const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG
183
-
184
- const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
185
- const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default.
186
- // We still need to know them so that we can do namespace
187
- // checks properly in case one wants to add them to
188
- // allow-list.
189
-
190
- const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
191
- const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']); // Similarly to SVG, we want to know all MathML elements,
192
- // even those that we disallow by default.
193
-
194
- const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
195
- const text = freeze(['#text']);
196
-
197
- const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);
198
- const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
199
- const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
200
- const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
201
-
202
- const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
203
-
204
- const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
205
- const TMPLIT_EXPR = seal(/\${[\w\W]*}/gm);
206
- const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape
207
-
208
- const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
209
-
210
- const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
211
- );
212
- const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
213
- const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
214
- );
215
- const DOCTYPE_NAME = seal(/^html$/i);
216
-
217
- var EXPRESSIONS = /*#__PURE__*/Object.freeze({
218
- __proto__: null,
219
- MUSTACHE_EXPR: MUSTACHE_EXPR,
220
- ERB_EXPR: ERB_EXPR,
221
- TMPLIT_EXPR: TMPLIT_EXPR,
222
- DATA_ATTR: DATA_ATTR,
223
- ARIA_ATTR: ARIA_ATTR,
224
- IS_ALLOWED_URI: IS_ALLOWED_URI,
225
- IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,
226
- ATTR_WHITESPACE: ATTR_WHITESPACE,
227
- DOCTYPE_NAME: DOCTYPE_NAME
228
- });
229
-
230
- const getGlobal = () => typeof window === 'undefined' ? null : window;
231
- /**
232
- * Creates a no-op policy for internal use only.
233
- * Don't export this function outside this module!
234
- * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.
235
- * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
236
- * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types
237
- * are not supported or creating the policy failed).
238
- */
239
-
240
-
241
- const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
242
- if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
243
- return null;
244
- } // Allow the callers to control the unique policy name
245
- // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
246
- // Policy creation with duplicate names throws in Trusted Types.
247
-
248
-
249
- let suffix = null;
250
- const ATTR_NAME = 'data-tt-policy-suffix';
251
-
252
- if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
253
- suffix = purifyHostElement.getAttribute(ATTR_NAME);
254
- }
255
-
256
- const policyName = 'dompurify' + (suffix ? '#' + suffix : '');
257
-
258
- try {
259
- return trustedTypes.createPolicy(policyName, {
260
- createHTML(html) {
261
- return html;
262
- },
263
-
264
- createScriptURL(scriptUrl) {
265
- return scriptUrl;
266
- }
267
-
268
- });
269
- } catch (_) {
270
- // Policy creation failed (most likely another DOMPurify script has
271
- // already run). Skip creating the policy, as this will only cause errors
272
- // if TT are enforced.
273
- console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
274
- return null;
275
- }
276
- };
277
-
278
- function createDOMPurify() {
279
- let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
280
-
281
- const DOMPurify = root => createDOMPurify(root);
282
- /**
283
- * Version label, exposed for easier checks
284
- * if DOMPurify is up to date or not
285
- */
286
-
287
-
288
- DOMPurify.version = '3.0.3';
289
- /**
290
- * Array of elements that DOMPurify removed during sanitation.
291
- * Empty if nothing was removed.
292
- */
293
-
294
- DOMPurify.removed = [];
295
-
296
- if (!window || !window.document || window.document.nodeType !== 9) {
297
- // Not running in a browser, provide a factory function
298
- // so that you can pass your own Window
299
- DOMPurify.isSupported = false;
300
- return DOMPurify;
301
- }
302
-
303
- const originalDocument = window.document;
304
- const currentScript = originalDocument.currentScript;
305
- let {
306
- document
307
- } = window;
308
- const {
309
- DocumentFragment,
310
- HTMLTemplateElement,
311
- Node,
312
- Element,
313
- NodeFilter,
314
- NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,
315
- HTMLFormElement,
316
- DOMParser,
317
- trustedTypes
318
- } = window;
319
- const ElementPrototype = Element.prototype;
320
- const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
321
- const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
322
- const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
323
- const getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a
324
- // new document created via createHTMLDocument. As per the spec
325
- // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
326
- // a new empty registry is used when creating a template contents owner
327
- // document, so we use that as our parent document to ensure nothing
328
- // is inherited.
329
-
330
- if (typeof HTMLTemplateElement === 'function') {
331
- const template = document.createElement('template');
332
-
333
- if (template.content && template.content.ownerDocument) {
334
- document = template.content.ownerDocument;
335
- }
336
- }
337
-
338
- let trustedTypesPolicy;
339
- let emptyHTML = '';
340
- const {
341
- implementation,
342
- createNodeIterator,
343
- createDocumentFragment,
344
- getElementsByTagName
345
- } = document;
346
- const {
347
- importNode
348
- } = originalDocument;
349
- let hooks = {};
350
- /**
351
- * Expose whether this browser supports running the full DOMPurify.
352
- */
353
-
354
- DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;
355
- const {
356
- MUSTACHE_EXPR,
357
- ERB_EXPR,
358
- TMPLIT_EXPR,
359
- DATA_ATTR,
360
- ARIA_ATTR,
361
- IS_SCRIPT_OR_DATA,
362
- ATTR_WHITESPACE
363
- } = EXPRESSIONS;
364
- let {
365
- IS_ALLOWED_URI: IS_ALLOWED_URI$1
366
- } = EXPRESSIONS;
367
- /**
368
- * We consider the elements and attributes below to be safe. Ideally
369
- * don't add any new ones but feel free to remove unwanted ones.
370
- */
371
-
372
- /* allowed element names */
373
-
374
- let ALLOWED_TAGS = null;
375
- const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
376
- /* Allowed attribute names */
377
-
378
- let ALLOWED_ATTR = null;
379
- const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
380
- /*
381
- * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.
382
- * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
383
- * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
384
- * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
385
- */
386
-
387
- let CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, {
388
- tagNameCheck: {
389
- writable: true,
390
- configurable: false,
391
- enumerable: true,
392
- value: null
393
- },
394
- attributeNameCheck: {
395
- writable: true,
396
- configurable: false,
397
- enumerable: true,
398
- value: null
399
- },
400
- allowCustomizedBuiltInElements: {
401
- writable: true,
402
- configurable: false,
403
- enumerable: true,
404
- value: false
405
- }
406
- }));
407
- /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
408
-
409
- let FORBID_TAGS = null;
410
- /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
411
-
412
- let FORBID_ATTR = null;
413
- /* Decide if ARIA attributes are okay */
414
-
415
- let ALLOW_ARIA_ATTR = true;
416
- /* Decide if custom data attributes are okay */
417
-
418
- let ALLOW_DATA_ATTR = true;
419
- /* Decide if unknown protocols are okay */
420
-
421
- let ALLOW_UNKNOWN_PROTOCOLS = false;
422
- /* Decide if self-closing tags in attributes are allowed.
423
- * Usually removed due to a mXSS issue in jQuery 3.0 */
424
-
425
- let ALLOW_SELF_CLOSE_IN_ATTR = true;
426
- /* Output should be safe for common template engines.
427
- * This means, DOMPurify removes data attributes, mustaches and ERB
428
- */
429
-
430
- let SAFE_FOR_TEMPLATES = false;
431
- /* Decide if document with <html>... should be returned */
432
-
433
- let WHOLE_DOCUMENT = false;
434
- /* Track whether config is already set on this instance of DOMPurify. */
435
-
436
- let SET_CONFIG = false;
437
- /* Decide if all elements (e.g. style, script) must be children of
438
- * document.body. By default, browsers might move them to document.head */
439
-
440
- let FORCE_BODY = false;
441
- /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
442
- * string (or a TrustedHTML object if Trusted Types are supported).
443
- * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
444
- */
445
-
446
- let RETURN_DOM = false;
447
- /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
448
- * string (or a TrustedHTML object if Trusted Types are supported) */
449
-
450
- let RETURN_DOM_FRAGMENT = false;
451
- /* Try to return a Trusted Type object instead of a string, return a string in
452
- * case Trusted Types are not supported */
453
-
454
- let RETURN_TRUSTED_TYPE = false;
455
- /* Output should be free from DOM clobbering attacks?
456
- * This sanitizes markups named with colliding, clobberable built-in DOM APIs.
457
- */
458
-
459
- let SANITIZE_DOM = true;
460
- /* Achieve full DOM Clobbering protection by isolating the namespace of named
461
- * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
462
- *
463
- * HTML/DOM spec rules that enable DOM Clobbering:
464
- * - Named Access on Window (§7.3.3)
465
- * - DOM Tree Accessors (§3.1.5)
466
- * - Form Element Parent-Child Relations (§4.10.3)
467
- * - Iframe srcdoc / Nested WindowProxies (§4.8.5)
468
- * - HTMLCollection (§4.2.10.2)
469
- *
470
- * Namespace isolation is implemented by prefixing `id` and `name` attributes
471
- * with a constant string, i.e., `user-content-`
472
- */
473
-
474
- let SANITIZE_NAMED_PROPS = false;
475
- const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
476
- /* Keep element content when removing element? */
477
-
478
- let KEEP_CONTENT = true;
479
- /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
480
- * of importing it into a new Document and returning a sanitized copy */
481
-
482
- let IN_PLACE = false;
483
- /* Allow usage of profiles like html, svg and mathMl */
484
-
485
- let USE_PROFILES = {};
486
- /* Tags to ignore content of when KEEP_CONTENT is true */
487
-
488
- let FORBID_CONTENTS = null;
489
- const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
490
- /* Tags that are safe for data: URIs */
491
-
492
- let DATA_URI_TAGS = null;
493
- const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
494
- /* Attributes safe for values like "javascript:" */
495
-
496
- let URI_SAFE_ATTRIBUTES = null;
497
- const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
498
- const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
499
- const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
500
- const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
501
- /* Document namespace */
502
-
503
- let NAMESPACE = HTML_NAMESPACE;
504
- let IS_EMPTY_INPUT = false;
505
- /* Allowed XHTML+XML namespaces */
506
-
507
- let ALLOWED_NAMESPACES = null;
508
- const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
509
- /* Parsing of strict XHTML documents */
510
-
511
- let PARSER_MEDIA_TYPE;
512
- const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
513
- const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
514
- let transformCaseFunc;
515
- /* Keep a reference to config to pass to hooks */
516
-
517
- let CONFIG = null;
518
- /* Ideally, do not touch anything below this line */
519
-
520
- /* ______________________________________________ */
521
-
522
- const formElement = document.createElement('form');
523
-
524
- const isRegexOrFunction = function isRegexOrFunction(testValue) {
525
- return testValue instanceof RegExp || testValue instanceof Function;
526
- };
527
- /**
528
- * _parseConfig
529
- *
530
- * @param {Object} cfg optional config literal
531
- */
532
- // eslint-disable-next-line complexity
533
-
534
-
535
- const _parseConfig = function _parseConfig(cfg) {
536
- if (CONFIG && CONFIG === cfg) {
537
- return;
538
- }
539
- /* Shield configuration object from tampering */
540
-
541
-
542
- if (!cfg || typeof cfg !== 'object') {
543
- cfg = {};
544
- }
545
- /* Shield configuration object from prototype pollution */
546
-
547
-
548
- cfg = clone(cfg);
549
- PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
550
- SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
551
-
552
- transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
553
- /* Set configuration parameters */
554
-
555
- ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
556
- ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
557
- ALLOWED_NAMESPACES = 'ALLOWED_NAMESPACES' in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
558
- URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent
559
- cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent
560
- transformCaseFunc // eslint-disable-line indent
561
- ) // eslint-disable-line indent
562
- : DEFAULT_URI_SAFE_ATTRIBUTES;
563
- DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent
564
- cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent
565
- transformCaseFunc // eslint-disable-line indent
566
- ) // eslint-disable-line indent
567
- : DEFAULT_DATA_URI_TAGS;
568
- FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
569
- FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};
570
- FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};
571
- USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;
572
- ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
573
-
574
- ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
575
-
576
- ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
577
-
578
- ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true
579
-
580
- SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
581
-
582
- WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
583
-
584
- RETURN_DOM = cfg.RETURN_DOM || false; // Default false
585
-
586
- RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
587
-
588
- RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
589
-
590
- FORCE_BODY = cfg.FORCE_BODY || false; // Default false
591
-
592
- SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
593
-
594
- SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
595
-
596
- KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
597
-
598
- IN_PLACE = cfg.IN_PLACE || false; // Default false
599
-
600
- IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
601
- NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
602
- CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
603
-
604
- if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
605
- CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
606
- }
607
-
608
- if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
609
- CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
610
- }
611
-
612
- if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
613
- CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
614
- }
615
-
616
- if (SAFE_FOR_TEMPLATES) {
617
- ALLOW_DATA_ATTR = false;
618
- }
619
-
620
- if (RETURN_DOM_FRAGMENT) {
621
- RETURN_DOM = true;
622
- }
623
- /* Parse profile info */
624
-
625
-
626
- if (USE_PROFILES) {
627
- ALLOWED_TAGS = addToSet({}, [...text]);
628
- ALLOWED_ATTR = [];
629
-
630
- if (USE_PROFILES.html === true) {
631
- addToSet(ALLOWED_TAGS, html$1);
632
- addToSet(ALLOWED_ATTR, html);
633
- }
634
-
635
- if (USE_PROFILES.svg === true) {
636
- addToSet(ALLOWED_TAGS, svg$1);
637
- addToSet(ALLOWED_ATTR, svg);
638
- addToSet(ALLOWED_ATTR, xml);
639
- }
640
-
641
- if (USE_PROFILES.svgFilters === true) {
642
- addToSet(ALLOWED_TAGS, svgFilters);
643
- addToSet(ALLOWED_ATTR, svg);
644
- addToSet(ALLOWED_ATTR, xml);
645
- }
646
-
647
- if (USE_PROFILES.mathMl === true) {
648
- addToSet(ALLOWED_TAGS, mathMl$1);
649
- addToSet(ALLOWED_ATTR, mathMl);
650
- addToSet(ALLOWED_ATTR, xml);
651
- }
652
- }
653
- /* Merge configuration parameters */
654
-
655
-
656
- if (cfg.ADD_TAGS) {
657
- if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
658
- ALLOWED_TAGS = clone(ALLOWED_TAGS);
659
- }
660
-
661
- addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
662
- }
663
-
664
- if (cfg.ADD_ATTR) {
665
- if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
666
- ALLOWED_ATTR = clone(ALLOWED_ATTR);
667
- }
668
-
669
- addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
670
- }
671
-
672
- if (cfg.ADD_URI_SAFE_ATTR) {
673
- addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
674
- }
675
-
676
- if (cfg.FORBID_CONTENTS) {
677
- if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
678
- FORBID_CONTENTS = clone(FORBID_CONTENTS);
679
- }
680
-
681
- addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
682
- }
683
- /* Add #text in case KEEP_CONTENT is set to true */
684
-
685
-
686
- if (KEEP_CONTENT) {
687
- ALLOWED_TAGS['#text'] = true;
688
- }
689
- /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
690
-
691
-
692
- if (WHOLE_DOCUMENT) {
693
- addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
694
- }
695
- /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
696
-
697
-
698
- if (ALLOWED_TAGS.table) {
699
- addToSet(ALLOWED_TAGS, ['tbody']);
700
- delete FORBID_TAGS.tbody;
701
- }
702
-
703
- if (cfg.TRUSTED_TYPES_POLICY) {
704
- if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {
705
- throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
706
- }
707
-
708
- if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
709
- throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
710
- } // Overwrite existing TrustedTypes policy.
711
-
712
-
713
- trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY; // Sign local variables required by `sanitize`.
714
-
715
- emptyHTML = trustedTypesPolicy.createHTML('');
716
- } else {
717
- // Uninitialized policy, attempt to initialize the internal dompurify policy.
718
- if (trustedTypesPolicy === undefined) {
719
- trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
720
- } // If creating the internal policy succeeded sign internal variables.
721
-
722
-
723
- if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {
724
- emptyHTML = trustedTypesPolicy.createHTML('');
725
- }
726
- } // Prevent further manipulation of configuration.
727
- // Not available in IE8, Safari 5, etc.
728
-
729
-
730
- if (freeze) {
731
- freeze(cfg);
732
- }
733
-
734
- CONFIG = cfg;
735
- };
736
-
737
- const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
738
- const HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML
739
- // namespace. We need to specify them explicitly
740
- // so that they don't get erroneously deleted from
741
- // HTML namespace.
742
-
743
- const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
744
- /* Keep track of all possible SVG and MathML tags
745
- * so that we can perform the namespace checks
746
- * correctly. */
747
-
748
- const ALL_SVG_TAGS = addToSet({}, svg$1);
749
- addToSet(ALL_SVG_TAGS, svgFilters);
750
- addToSet(ALL_SVG_TAGS, svgDisallowed);
751
- const ALL_MATHML_TAGS = addToSet({}, mathMl$1);
752
- addToSet(ALL_MATHML_TAGS, mathMlDisallowed);
753
- /**
754
- *
755
- *
756
- * @param {Element} element a DOM element whose namespace is being checked
757
- * @returns {boolean} Return false if the element has a
758
- * namespace that a spec-compliant parser would never
759
- * return. Return true otherwise.
760
- */
761
-
762
- const _checkValidNamespace = function _checkValidNamespace(element) {
763
- let parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode
764
- // can be null. We just simulate parent in this case.
765
-
766
- if (!parent || !parent.tagName) {
767
- parent = {
768
- namespaceURI: NAMESPACE,
769
- tagName: 'template'
770
- };
771
- }
772
-
773
- const tagName = stringToLowerCase(element.tagName);
774
- const parentTagName = stringToLowerCase(parent.tagName);
775
-
776
- if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
777
- return false;
778
- }
779
-
780
- if (element.namespaceURI === SVG_NAMESPACE) {
781
- // The only way to switch from HTML namespace to SVG
782
- // is via <svg>. If it happens via any other tag, then
783
- // it should be killed.
784
- if (parent.namespaceURI === HTML_NAMESPACE) {
785
- return tagName === 'svg';
786
- } // The only way to switch from MathML to SVG is via`
787
- // svg if parent is either <annotation-xml> or MathML
788
- // text integration points.
789
-
790
-
791
- if (parent.namespaceURI === MATHML_NAMESPACE) {
792
- return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
793
- } // We only allow elements that are defined in SVG
794
- // spec. All others are disallowed in SVG namespace.
795
-
796
-
797
- return Boolean(ALL_SVG_TAGS[tagName]);
798
- }
799
-
800
- if (element.namespaceURI === MATHML_NAMESPACE) {
801
- // The only way to switch from HTML namespace to MathML
802
- // is via <math>. If it happens via any other tag, then
803
- // it should be killed.
804
- if (parent.namespaceURI === HTML_NAMESPACE) {
805
- return tagName === 'math';
806
- } // The only way to switch from SVG to MathML is via
807
- // <math> and HTML integration points
808
-
809
-
810
- if (parent.namespaceURI === SVG_NAMESPACE) {
811
- return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
812
- } // We only allow elements that are defined in MathML
813
- // spec. All others are disallowed in MathML namespace.
814
-
815
-
816
- return Boolean(ALL_MATHML_TAGS[tagName]);
817
- }
818
-
819
- if (element.namespaceURI === HTML_NAMESPACE) {
820
- // The only way to switch from SVG to HTML is via
821
- // HTML integration points, and from MathML to HTML
822
- // is via MathML text integration points
823
- if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
824
- return false;
825
- }
826
-
827
- if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
828
- return false;
829
- } // We disallow tags that are specific for MathML
830
- // or SVG and should never appear in HTML namespace
831
-
832
-
833
- return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
834
- } // For XHTML and XML documents that support custom namespaces
835
-
836
-
837
- if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
838
- return true;
839
- } // The code should never reach this place (this means
840
- // that the element somehow got namespace that is not
841
- // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
842
- // Return false just in case.
843
-
844
-
845
- return false;
846
- };
847
- /**
848
- * _forceRemove
849
- *
850
- * @param {Node} node a DOM node
851
- */
852
-
853
-
854
- const _forceRemove = function _forceRemove(node) {
855
- arrayPush(DOMPurify.removed, {
856
- element: node
857
- });
858
-
859
- try {
860
- // eslint-disable-next-line unicorn/prefer-dom-node-remove
861
- node.parentNode.removeChild(node);
862
- } catch (_) {
863
- node.remove();
864
- }
865
- };
866
- /**
867
- * _removeAttribute
868
- *
869
- * @param {String} name an Attribute name
870
- * @param {Node} node a DOM node
871
- */
872
-
873
-
874
- const _removeAttribute = function _removeAttribute(name, node) {
875
- try {
876
- arrayPush(DOMPurify.removed, {
877
- attribute: node.getAttributeNode(name),
878
- from: node
879
- });
880
- } catch (_) {
881
- arrayPush(DOMPurify.removed, {
882
- attribute: null,
883
- from: node
884
- });
885
- }
886
-
887
- node.removeAttribute(name); // We void attribute values for unremovable "is"" attributes
888
-
889
- if (name === 'is' && !ALLOWED_ATTR[name]) {
890
- if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
891
- try {
892
- _forceRemove(node);
893
- } catch (_) {}
894
- } else {
895
- try {
896
- node.setAttribute(name, '');
897
- } catch (_) {}
898
- }
899
- }
900
- };
901
- /**
902
- * _initDocument
903
- *
904
- * @param {String} dirty a string of dirty markup
905
- * @return {Document} a DOM, filled with the dirty markup
906
- */
907
-
908
-
909
- const _initDocument = function _initDocument(dirty) {
910
- /* Create a HTML document */
911
- let doc;
912
- let leadingWhitespace;
913
-
914
- if (FORCE_BODY) {
915
- dirty = '<remove></remove>' + dirty;
916
- } else {
917
- /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
918
- const matches = stringMatch(dirty, /^[\r\n\t ]+/);
919
- leadingWhitespace = matches && matches[0];
920
- }
921
-
922
- if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {
923
- // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
924
- dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
925
- }
926
-
927
- const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
928
- /*
929
- * Use the DOMParser API by default, fallback later if needs be
930
- * DOMParser not work for svg when has multiple root element.
931
- */
932
-
933
- if (NAMESPACE === HTML_NAMESPACE) {
934
- try {
935
- doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
936
- } catch (_) {}
937
- }
938
- /* Use createHTMLDocument in case DOMParser is not available */
939
-
940
-
941
- if (!doc || !doc.documentElement) {
942
- doc = implementation.createDocument(NAMESPACE, 'template', null);
943
-
944
- try {
945
- doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
946
- } catch (_) {// Syntax error if dirtyPayload is invalid xml
947
- }
948
- }
949
-
950
- const body = doc.body || doc.documentElement;
951
-
952
- if (dirty && leadingWhitespace) {
953
- body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
954
- }
955
- /* Work on whole document or just its body */
956
-
957
-
958
- if (NAMESPACE === HTML_NAMESPACE) {
959
- return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
960
- }
961
-
962
- return WHOLE_DOCUMENT ? doc.documentElement : body;
963
- };
964
- /**
965
- * _createIterator
966
- *
967
- * @param {Document} root document/fragment to create iterator for
968
- * @return {Iterator} iterator instance
969
- */
970
-
971
-
972
- const _createIterator = function _createIterator(root) {
973
- return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise
974
- NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);
975
- };
976
- /**
977
- * _isClobbered
978
- *
979
- * @param {Node} elm element to check for clobbering attacks
980
- * @return {Boolean} true if clobbered, false if safe
981
- */
982
-
983
-
984
- const _isClobbered = function _isClobbered(elm) {
985
- return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');
986
- };
987
- /**
988
- * _isNode
989
- *
990
- * @param {Node} obj object to check whether it's a DOM node
991
- * @return {Boolean} true is object is a DOM node
992
- */
993
-
994
-
995
- const _isNode = function _isNode(object) {
996
- return typeof Node === 'object' ? object instanceof Node : object && typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';
997
- };
998
- /**
999
- * _executeHook
1000
- * Execute user configurable hooks
1001
- *
1002
- * @param {String} entryPoint Name of the hook's entry point
1003
- * @param {Node} currentNode node to work on with the hook
1004
- * @param {Object} data additional hook parameters
1005
- */
1006
-
1007
-
1008
- const _executeHook = function _executeHook(entryPoint, currentNode, data) {
1009
- if (!hooks[entryPoint]) {
1010
- return;
1011
- }
1012
-
1013
- arrayForEach(hooks[entryPoint], hook => {
1014
- hook.call(DOMPurify, currentNode, data, CONFIG);
1015
- });
1016
- };
1017
- /**
1018
- * _sanitizeElements
1019
- *
1020
- * @protect nodeName
1021
- * @protect textContent
1022
- * @protect removeChild
1023
- *
1024
- * @param {Node} currentNode to check for permission to exist
1025
- * @return {Boolean} true if node was killed, false if left alive
1026
- */
1027
-
1028
-
1029
- const _sanitizeElements = function _sanitizeElements(currentNode) {
1030
- let content;
1031
- /* Execute a hook if present */
1032
-
1033
- _executeHook('beforeSanitizeElements', currentNode, null);
1034
- /* Check if element is clobbered or can clobber */
1035
-
1036
-
1037
- if (_isClobbered(currentNode)) {
1038
- _forceRemove(currentNode);
1039
-
1040
- return true;
1041
- }
1042
- /* Now let's check the element's type and name */
1043
-
1044
-
1045
- const tagName = transformCaseFunc(currentNode.nodeName);
1046
- /* Execute a hook if present */
1047
-
1048
- _executeHook('uponSanitizeElement', currentNode, {
1049
- tagName,
1050
- allowedTags: ALLOWED_TAGS
1051
- });
1052
- /* Detect mXSS attempts abusing namespace confusion */
1053
-
1054
-
1055
- if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
1056
- _forceRemove(currentNode);
1057
-
1058
- return true;
1059
- }
1060
- /* Remove element if anything forbids its presence */
1061
-
1062
-
1063
- if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
1064
- /* Check if we have a custom element to handle */
1065
- if (!FORBID_TAGS[tagName] && _basicCustomElementTest(tagName)) {
1066
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;
1067
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) return false;
1068
- }
1069
- /* Keep content except for bad-listed elements */
1070
-
1071
-
1072
- if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
1073
- const parentNode = getParentNode(currentNode) || currentNode.parentNode;
1074
- const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
1075
-
1076
- if (childNodes && parentNode) {
1077
- const childCount = childNodes.length;
1078
-
1079
- for (let i = childCount - 1; i >= 0; --i) {
1080
- parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));
1081
- }
1082
- }
1083
- }
1084
-
1085
- _forceRemove(currentNode);
1086
-
1087
- return true;
1088
- }
1089
- /* Check whether element has a valid namespace */
1090
-
1091
-
1092
- if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
1093
- _forceRemove(currentNode);
1094
-
1095
- return true;
1096
- }
1097
- /* Make sure that older browsers don't get noscript mXSS */
1098
-
1099
-
1100
- if ((tagName === 'noscript' || tagName === 'noembed') && regExpTest(/<\/no(script|embed)/i, currentNode.innerHTML)) {
1101
- _forceRemove(currentNode);
1102
-
1103
- return true;
1104
- }
1105
- /* Sanitize element content to be template-safe */
1106
-
1107
-
1108
- if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {
1109
- /* Get the element's text content */
1110
- content = currentNode.textContent;
1111
- content = stringReplace(content, MUSTACHE_EXPR, ' ');
1112
- content = stringReplace(content, ERB_EXPR, ' ');
1113
- content = stringReplace(content, TMPLIT_EXPR, ' ');
1114
-
1115
- if (currentNode.textContent !== content) {
1116
- arrayPush(DOMPurify.removed, {
1117
- element: currentNode.cloneNode()
1118
- });
1119
- currentNode.textContent = content;
1120
- }
1121
- }
1122
- /* Execute a hook if present */
1123
-
1124
-
1125
- _executeHook('afterSanitizeElements', currentNode, null);
1126
-
1127
- return false;
1128
- };
1129
- /**
1130
- * _isValidAttribute
1131
- *
1132
- * @param {string} lcTag Lowercase tag name of containing element.
1133
- * @param {string} lcName Lowercase attribute name.
1134
- * @param {string} value Attribute value.
1135
- * @return {Boolean} Returns true if `value` is valid, otherwise false.
1136
- */
1137
- // eslint-disable-next-line complexity
1138
-
1139
-
1140
- const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
1141
- /* Make sure attribute cannot clobber */
1142
- if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
1143
- return false;
1144
- }
1145
- /* Allow valid data-* attributes: At least one character after "-"
1146
- (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
1147
- XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
1148
- We don't need to check the value; it's always URI safe. */
1149
-
1150
-
1151
- if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
1152
- if ( // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1153
- // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1154
- // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1155
- _basicCustomElementTest(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1156
- // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1157
- lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {
1158
- return false;
1159
- }
1160
- /* Check value is safe. First, is attr inert? If so, is safe */
1161
-
1162
- } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {
1163
- return false;
1164
- } else ;
1165
-
1166
- return true;
1167
- };
1168
- /**
1169
- * _basicCustomElementCheck
1170
- * checks if at least one dash is included in tagName, and it's not the first char
1171
- * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
1172
- * @param {string} tagName name of the tag of the node to sanitize
1173
- */
1174
-
1175
-
1176
- const _basicCustomElementTest = function _basicCustomElementTest(tagName) {
1177
- return tagName.indexOf('-') > 0;
1178
- };
1179
- /**
1180
- * _sanitizeAttributes
1181
- *
1182
- * @protect attributes
1183
- * @protect nodeName
1184
- * @protect removeAttribute
1185
- * @protect setAttribute
1186
- *
1187
- * @param {Node} currentNode to sanitize
1188
- */
1189
-
1190
-
1191
- const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
1192
- let attr;
1193
- let value;
1194
- let lcName;
1195
- let l;
1196
- /* Execute a hook if present */
1197
-
1198
- _executeHook('beforeSanitizeAttributes', currentNode, null);
1199
-
1200
- const {
1201
- attributes
1202
- } = currentNode;
1203
- /* Check if we have attributes; if not we might have a text node */
1204
-
1205
- if (!attributes) {
1206
- return;
1207
- }
1208
-
1209
- const hookEvent = {
1210
- attrName: '',
1211
- attrValue: '',
1212
- keepAttr: true,
1213
- allowedAttributes: ALLOWED_ATTR
1214
- };
1215
- l = attributes.length;
1216
- /* Go backwards over all attributes; safely remove bad ones */
1217
-
1218
- while (l--) {
1219
- attr = attributes[l];
1220
- const {
1221
- name,
1222
- namespaceURI
1223
- } = attr;
1224
- value = name === 'value' ? attr.value : stringTrim(attr.value);
1225
- lcName = transformCaseFunc(name);
1226
- /* Execute a hook if present */
1227
-
1228
- hookEvent.attrName = lcName;
1229
- hookEvent.attrValue = value;
1230
- hookEvent.keepAttr = true;
1231
- hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
1232
-
1233
- _executeHook('uponSanitizeAttribute', currentNode, hookEvent);
1234
-
1235
- value = hookEvent.attrValue;
1236
- /* Did the hooks approve of the attribute? */
1237
-
1238
- if (hookEvent.forceKeepAttr) {
1239
- continue;
1240
- }
1241
- /* Remove attribute */
1242
-
1243
-
1244
- _removeAttribute(name, currentNode);
1245
- /* Did the hooks approve of the attribute? */
1246
-
1247
-
1248
- if (!hookEvent.keepAttr) {
1249
- continue;
1250
- }
1251
- /* Work around a security issue in jQuery 3.0 */
1252
-
1253
-
1254
- if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
1255
- _removeAttribute(name, currentNode);
1256
-
1257
- continue;
1258
- }
1259
- /* Sanitize attribute content to be template-safe */
1260
-
1261
-
1262
- if (SAFE_FOR_TEMPLATES) {
1263
- value = stringReplace(value, MUSTACHE_EXPR, ' ');
1264
- value = stringReplace(value, ERB_EXPR, ' ');
1265
- value = stringReplace(value, TMPLIT_EXPR, ' ');
1266
- }
1267
- /* Is `value` valid for this attribute? */
1268
-
1269
-
1270
- const lcTag = transformCaseFunc(currentNode.nodeName);
1271
-
1272
- if (!_isValidAttribute(lcTag, lcName, value)) {
1273
- continue;
1274
- }
1275
- /* Full DOM Clobbering protection via namespace isolation,
1276
- * Prefix id and name attributes with `user-content-`
1277
- */
1278
-
1279
-
1280
- if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {
1281
- // Remove the attribute with this value
1282
- _removeAttribute(name, currentNode); // Prefix the value and later re-create the attribute with the sanitized value
1283
-
1284
-
1285
- value = SANITIZE_NAMED_PROPS_PREFIX + value;
1286
- }
1287
- /* Handle attributes that require Trusted Types */
1288
-
1289
-
1290
- if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {
1291
- if (namespaceURI) ; else {
1292
- switch (trustedTypes.getAttributeType(lcTag, lcName)) {
1293
- case 'TrustedHTML':
1294
- {
1295
- value = trustedTypesPolicy.createHTML(value);
1296
- break;
1297
- }
1298
-
1299
- case 'TrustedScriptURL':
1300
- {
1301
- value = trustedTypesPolicy.createScriptURL(value);
1302
- break;
1303
- }
1304
- }
1305
- }
1306
- }
1307
- /* Handle invalid data-* attribute set by try-catching it */
1308
-
1309
-
1310
- try {
1311
- if (namespaceURI) {
1312
- currentNode.setAttributeNS(namespaceURI, name, value);
1313
- } else {
1314
- /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
1315
- currentNode.setAttribute(name, value);
1316
- }
1317
-
1318
- arrayPop(DOMPurify.removed);
1319
- } catch (_) {}
1320
- }
1321
- /* Execute a hook if present */
1322
-
1323
-
1324
- _executeHook('afterSanitizeAttributes', currentNode, null);
1325
- };
1326
- /**
1327
- * _sanitizeShadowDOM
1328
- *
1329
- * @param {DocumentFragment} fragment to iterate over recursively
1330
- */
1331
-
1332
-
1333
- const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
1334
- let shadowNode;
1335
-
1336
- const shadowIterator = _createIterator(fragment);
1337
- /* Execute a hook if present */
1338
-
1339
-
1340
- _executeHook('beforeSanitizeShadowDOM', fragment, null);
1341
-
1342
- while (shadowNode = shadowIterator.nextNode()) {
1343
- /* Execute a hook if present */
1344
- _executeHook('uponSanitizeShadowNode', shadowNode, null);
1345
- /* Sanitize tags and elements */
1346
-
1347
-
1348
- if (_sanitizeElements(shadowNode)) {
1349
- continue;
1350
- }
1351
- /* Deep shadow DOM detected */
1352
-
1353
-
1354
- if (shadowNode.content instanceof DocumentFragment) {
1355
- _sanitizeShadowDOM(shadowNode.content);
1356
- }
1357
- /* Check attributes, sanitize if necessary */
1358
-
1359
-
1360
- _sanitizeAttributes(shadowNode);
1361
- }
1362
- /* Execute a hook if present */
1363
-
1364
-
1365
- _executeHook('afterSanitizeShadowDOM', fragment, null);
1366
- };
1367
- /**
1368
- * Sanitize
1369
- * Public method providing core sanitation functionality
1370
- *
1371
- * @param {String|Node} dirty string or DOM node
1372
- * @param {Object} configuration object
1373
- */
1374
- // eslint-disable-next-line complexity
1375
-
1376
-
1377
- DOMPurify.sanitize = function (dirty) {
1378
- let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1379
- let body;
1380
- let importedNode;
1381
- let currentNode;
1382
- let returnNode;
1383
- /* Make sure we have a string to sanitize.
1384
- DO NOT return early, as this will return the wrong type if
1385
- the user has requested a DOM object rather than a string */
1386
-
1387
- IS_EMPTY_INPUT = !dirty;
1388
-
1389
- if (IS_EMPTY_INPUT) {
1390
- dirty = '<!-->';
1391
- }
1392
- /* Stringify, in case dirty is an object */
1393
-
1394
-
1395
- if (typeof dirty !== 'string' && !_isNode(dirty)) {
1396
- if (typeof dirty.toString === 'function') {
1397
- dirty = dirty.toString();
1398
-
1399
- if (typeof dirty !== 'string') {
1400
- throw typeErrorCreate('dirty is not a string, aborting');
1401
- }
1402
- } else {
1403
- throw typeErrorCreate('toString is not a function');
1404
- }
1405
- }
1406
- /* Return dirty HTML if DOMPurify cannot run */
1407
-
1408
-
1409
- if (!DOMPurify.isSupported) {
1410
- return dirty;
1411
- }
1412
- /* Assign config vars */
1413
-
1414
-
1415
- if (!SET_CONFIG) {
1416
- _parseConfig(cfg);
1417
- }
1418
- /* Clean up removed elements */
1419
-
1420
-
1421
- DOMPurify.removed = [];
1422
- /* Check if dirty is correctly typed for IN_PLACE */
1423
-
1424
- if (typeof dirty === 'string') {
1425
- IN_PLACE = false;
1426
- }
1427
-
1428
- if (IN_PLACE) {
1429
- /* Do some early pre-sanitization to avoid unsafe root nodes */
1430
- if (dirty.nodeName) {
1431
- const tagName = transformCaseFunc(dirty.nodeName);
1432
-
1433
- if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
1434
- throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
1435
- }
1436
- }
1437
- } else if (dirty instanceof Node) {
1438
- /* If dirty is a DOM element, append to an empty document to avoid
1439
- elements being stripped by the parser */
1440
- body = _initDocument('<!---->');
1441
- importedNode = body.ownerDocument.importNode(dirty, true);
1442
-
1443
- if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {
1444
- /* Node is already a body, use as is */
1445
- body = importedNode;
1446
- } else if (importedNode.nodeName === 'HTML') {
1447
- body = importedNode;
1448
- } else {
1449
- // eslint-disable-next-line unicorn/prefer-dom-node-append
1450
- body.appendChild(importedNode);
1451
- }
1452
- } else {
1453
- /* Exit directly if we have nothing to do */
1454
- if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
1455
- dirty.indexOf('<') === -1) {
1456
- return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
1457
- }
1458
- /* Initialize the document to work on */
1459
-
1460
-
1461
- body = _initDocument(dirty);
1462
- /* Check we have a DOM node from the data */
1463
-
1464
- if (!body) {
1465
- return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
1466
- }
1467
- }
1468
- /* Remove first element node (ours) if FORCE_BODY is set */
1469
-
1470
-
1471
- if (body && FORCE_BODY) {
1472
- _forceRemove(body.firstChild);
1473
- }
1474
- /* Get node iterator */
1475
-
1476
-
1477
- const nodeIterator = _createIterator(IN_PLACE ? dirty : body);
1478
- /* Now start iterating over the created document */
1479
-
1480
-
1481
- while (currentNode = nodeIterator.nextNode()) {
1482
- /* Sanitize tags and elements */
1483
- if (_sanitizeElements(currentNode)) {
1484
- continue;
1485
- }
1486
- /* Shadow DOM detected, sanitize it */
1487
-
1488
-
1489
- if (currentNode.content instanceof DocumentFragment) {
1490
- _sanitizeShadowDOM(currentNode.content);
1491
- }
1492
- /* Check attributes, sanitize if necessary */
1493
-
1494
-
1495
- _sanitizeAttributes(currentNode);
1496
- }
1497
- /* If we sanitized `dirty` in-place, return it. */
1498
-
1499
-
1500
- if (IN_PLACE) {
1501
- return dirty;
1502
- }
1503
- /* Return sanitized string or DOM */
1504
-
1505
-
1506
- if (RETURN_DOM) {
1507
- if (RETURN_DOM_FRAGMENT) {
1508
- returnNode = createDocumentFragment.call(body.ownerDocument);
1509
-
1510
- while (body.firstChild) {
1511
- // eslint-disable-next-line unicorn/prefer-dom-node-append
1512
- returnNode.appendChild(body.firstChild);
1513
- }
1514
- } else {
1515
- returnNode = body;
1516
- }
1517
-
1518
- if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmod) {
1519
- /*
1520
- AdoptNode() is not used because internal state is not reset
1521
- (e.g. the past names map of a HTMLFormElement), this is safe
1522
- in theory but we would rather not risk another attack vector.
1523
- The state that is cloned by importNode() is explicitly defined
1524
- by the specs.
1525
- */
1526
- returnNode = importNode.call(originalDocument, returnNode, true);
1527
- }
1528
-
1529
- return returnNode;
1530
- }
1531
-
1532
- let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
1533
- /* Serialize doctype if allowed */
1534
-
1535
- if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
1536
- serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
1537
- }
1538
- /* Sanitize final string template-safe */
1539
-
1540
-
1541
- if (SAFE_FOR_TEMPLATES) {
1542
- serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR, ' ');
1543
- serializedHTML = stringReplace(serializedHTML, ERB_EXPR, ' ');
1544
- serializedHTML = stringReplace(serializedHTML, TMPLIT_EXPR, ' ');
1545
- }
1546
-
1547
- return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
1548
- };
1549
- /**
1550
- * Public method to set the configuration once
1551
- * setConfig
1552
- *
1553
- * @param {Object} cfg configuration object
1554
- */
1555
-
1556
-
1557
- DOMPurify.setConfig = function (cfg) {
1558
- _parseConfig(cfg);
1559
-
1560
- SET_CONFIG = true;
1561
- };
1562
- /**
1563
- * Public method to remove the configuration
1564
- * clearConfig
1565
- *
1566
- */
1567
-
1568
-
1569
- DOMPurify.clearConfig = function () {
1570
- CONFIG = null;
1571
- SET_CONFIG = false;
1572
- };
1573
- /**
1574
- * Public method to check if an attribute value is valid.
1575
- * Uses last set config, if any. Otherwise, uses config defaults.
1576
- * isValidAttribute
1577
- *
1578
- * @param {string} tag Tag name of containing element.
1579
- * @param {string} attr Attribute name.
1580
- * @param {string} value Attribute value.
1581
- * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.
1582
- */
1583
-
1584
-
1585
- DOMPurify.isValidAttribute = function (tag, attr, value) {
1586
- /* Initialize shared config vars if necessary. */
1587
- if (!CONFIG) {
1588
- _parseConfig({});
1589
- }
1590
-
1591
- const lcTag = transformCaseFunc(tag);
1592
- const lcName = transformCaseFunc(attr);
1593
- return _isValidAttribute(lcTag, lcName, value);
1594
- };
1595
- /**
1596
- * AddHook
1597
- * Public method to add DOMPurify hooks
1598
- *
1599
- * @param {String} entryPoint entry point for the hook to add
1600
- * @param {Function} hookFunction function to execute
1601
- */
1602
-
1603
-
1604
- DOMPurify.addHook = function (entryPoint, hookFunction) {
1605
- if (typeof hookFunction !== 'function') {
1606
- return;
1607
- }
1608
-
1609
- hooks[entryPoint] = hooks[entryPoint] || [];
1610
- arrayPush(hooks[entryPoint], hookFunction);
1611
- };
1612
- /**
1613
- * RemoveHook
1614
- * Public method to remove a DOMPurify hook at a given entryPoint
1615
- * (pops it from the stack of hooks if more are present)
1616
- *
1617
- * @param {String} entryPoint entry point for the hook to remove
1618
- * @return {Function} removed(popped) hook
1619
- */
1620
-
1621
-
1622
- DOMPurify.removeHook = function (entryPoint) {
1623
- if (hooks[entryPoint]) {
1624
- return arrayPop(hooks[entryPoint]);
1625
- }
1626
- };
1627
- /**
1628
- * RemoveHooks
1629
- * Public method to remove all DOMPurify hooks at a given entryPoint
1630
- *
1631
- * @param {String} entryPoint entry point for the hooks to remove
1632
- */
1633
-
1634
-
1635
- DOMPurify.removeHooks = function (entryPoint) {
1636
- if (hooks[entryPoint]) {
1637
- hooks[entryPoint] = [];
1638
- }
1639
- };
1640
- /**
1641
- * RemoveAllHooks
1642
- * Public method to remove all DOMPurify hooks
1643
- *
1644
- */
1645
-
1646
-
1647
- DOMPurify.removeAllHooks = function () {
1648
- hooks = {};
1649
- };
1650
-
1651
- return DOMPurify;
1652
- }
1653
-
1654
- var purify = createDOMPurify();
1655
-
1656
- var _path$2, _path2$1;
1657
- function _extends$2() { return _extends$2 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2.apply(null, arguments); }
1658
- var SvgInternalServerError = function SvgInternalServerError(props) {
1659
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
1660
- xmlns: "http://www.w3.org/2000/svg",
1661
- fill: "none",
1662
- viewBox: "0 0 257 117"
1663
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
1664
- fill: "#000",
1665
- d: "M37.303 116.601c-19.485 0-34.9-12.52-36.778-28.561l-.078-.704h6.182l.078.547c1.8 12.912 14.71 23.163 30.674 23.163 18.702 0 32.552-13.538 32.552-31.927v-.156c0-18.076-13.694-31.926-31.77-31.926-10.642 0-20.11 4.46-26.448 12.364-1.252 1.33-2.348 2.895-3.287 4.538H2.403L8.976 2.043h59.861v5.634h-54.54l-5.4 48.437h.314c6.025-8.999 17.371-14.554 29.657-14.554 21.283 0 37.247 15.962 37.247 37.247v.156c0 21.753-16.433 37.638-38.812 37.638M125.963 116.601c-24.884 0-39.908-22.38-39.908-57.983v-.235C86.055 22.701 101.08.4 125.963.4c24.883 0 39.986 22.458 39.986 57.983v.235c0 35.839-15.103 57.983-39.986 57.983m0-5.555c21.127 0 33.726-20.267 33.726-52.428v-.235c0-32.317-12.599-52.427-33.726-52.427-21.128 0-33.726 20.345-33.726 52.427v.235c0 32.16 12.598 52.428 33.726 52.428M216.188 116.601c-24.883 0-39.907-22.38-39.907-57.983v-.235C176.281 22.701 191.305.4 216.188.4c24.884 0 39.986 22.458 39.986 57.983v.235c0 35.839-15.102 57.983-39.986 57.983m0-5.555c21.128 0 33.726-20.267 33.726-52.428v-.235c0-32.317-12.598-52.427-33.726-52.427-21.127 0-33.725 20.345-33.725 52.427v.235c0 32.16 12.598 52.428 33.725 52.428"
1666
- })), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
1667
- fill: "#000",
1668
- fillRule: "evenodd",
1669
- d: "M.128 88.087v-.003L0 86.936h6.976l.127.892c1.766 12.672 14.469 22.817 30.278 22.817 18.489 0 32.152-13.365 32.152-31.525v-.157c0-17.857-13.517-31.526-31.37-31.526-10.526 0-19.877 4.41-26.136 12.214l-.01.012-.01.012c-1.226 1.302-2.304 2.84-3.231 4.462l-.115.202H1.958L8.616 1.643h60.621v6.434H14.655L9.411 55.124c6.23-8.672 17.41-13.965 29.457-13.965 21.505 0 37.647 16.143 37.647 37.648v.156c0 21.986-16.624 38.038-39.212 38.038-19.643 0-35.269-12.63-37.175-28.915Zm9.19-32.132-.107.159h-.313l5.399-48.437h54.54V2.043H8.976L2.403 63.94h6.025c.94-1.643 2.035-3.208 3.287-4.538 6.338-7.904 15.806-12.364 26.448-12.364 18.076 0 31.77 13.85 31.77 31.926v.157c0 18.388-13.85 31.926-32.552 31.926-15.963 0-28.874-10.251-30.674-23.163l-.078-.547H.447l.078.704c1.878 16.041 17.293 28.561 36.778 28.561 22.379 0 38.812-15.885 38.812-37.638v-.156c0-21.284-15.963-37.247-37.247-37.247-12.213 0-23.498 5.49-29.55 14.395Zm87.03 45.232C89.42 91.053 85.656 76.469 85.656 58.618v-.235c0-17.89 3.765-32.474 10.692-42.598C103.286 5.645 113.384 0 125.963 0c12.58 0 22.697 5.685 29.654 15.844 6.947 10.143 10.732 24.727 10.732 42.54v.234c0 17.968-3.785 32.553-10.732 42.658-6.958 10.12-17.076 15.725-29.654 15.725-12.58 0-22.678-5.665-29.615-15.814m54.063-4.51c5.736-9 8.878-22.023 8.878-38.059v-.235c0-16.114-3.142-29.137-8.877-38.117-5.724-8.963-14.034-13.91-24.449-13.91-10.413 0-18.723 5.004-24.448 13.997-5.736 9.01-8.878 22.033-8.878 38.03v.235c0 16.036 3.142 29.059 8.878 38.059 5.724 8.984 14.035 13.968 24.448 13.968s18.724-4.984 24.448-13.968m36.162 4.51c-6.927-10.134-10.692-24.718-10.692-42.569v-.235c0-17.89 3.765-32.474 10.692-42.598C193.511 5.645 203.609 0 216.188 0c12.581 0 22.698 5.685 29.655 15.844 6.946 10.143 10.731 24.727 10.731 42.54v.234c0 17.968-3.785 32.553-10.732 42.658-6.958 10.12-17.075 15.725-29.654 15.725-12.58 0-22.677-5.665-29.615-15.814m54.064-4.51c5.735-9 8.877-22.023 8.877-38.059v-.235c0-16.114-3.142-29.137-8.877-38.117-5.724-8.963-14.034-13.91-24.449-13.91-10.413 0-18.723 5.004-24.448 13.997-5.735 9.01-8.877 22.033-8.877 38.03v.235c0 16.036 3.142 29.059 8.877 38.059 5.725 8.984 14.035 13.968 24.448 13.968 10.414 0 18.724-4.984 24.449-13.968m-114.674 19.924c-24.884 0-39.908-22.38-39.908-57.983v-.235C86.055 22.701 101.08.4 125.963.4c24.883 0 39.986 22.458 39.986 57.983v.235c0 35.839-15.103 57.983-39.986 57.983m0-5.555c21.127 0 33.726-20.267 33.726-52.428v-.235c0-32.317-12.599-52.427-33.726-52.427-21.128 0-33.726 20.345-33.726 52.427v.235c0 32.16 12.598 52.428 33.726 52.428m50.318-52.428c0 35.604 15.024 57.983 39.907 57.983 24.884 0 39.986-22.144 39.986-57.983v-.235C256.174 22.858 241.072.4 216.188.4c-24.883 0-39.907 22.301-39.907 57.983zm73.633 0c0 32.16-12.598 52.428-33.726 52.428-21.127 0-33.725-20.267-33.725-52.428v-.235c0-32.082 12.598-52.427 33.725-52.427 21.128 0 33.726 20.11 33.726 52.427z",
1670
- clipRule: "evenodd"
1671
- })));
1672
- };
1673
-
1674
- var _path$1;
1675
- function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
1676
- var SvgPageNotFound = function SvgPageNotFound(props) {
1677
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
1678
- xmlns: "http://www.w3.org/2000/svg",
1679
- fill: "none",
1680
- viewBox: "0 0 263 118"
1681
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
1682
- fill: "#000",
1683
- stroke: "#000",
1684
- strokeWidth: 0.4,
1685
- d: "M58.94 115.558v.2h6.503V87.51H83.363V81.476H65.442V2.443H56.22l-.06.085L.836 81.483l-.036.051v5.976h58.14v28.048Zm179.355 0v.2h6.503V87.51H262.718V81.476H244.798V2.443H235.574l-.06.085-55.323 78.955-.036.051v5.976h58.14zM58.94 9.182v72.294H8.005L58.93 9.182h.009Zm32.32 50.036c0 17.826 3.76 32.366 10.657 42.456 6.902 10.097 16.94 15.727 29.451 15.727 12.51 0 22.567-5.57 29.489-15.639 6.916-10.06 10.696-24.6 10.696-42.544v-.235c0-17.787-3.78-32.327-10.696-42.426C153.935 6.45 143.879.8 131.368.8s-22.548 5.61-29.451 15.698c-6.896 10.08-10.657 24.62-10.657 42.485v.235Zm73.633 0c0 16.058-3.145 29.123-8.908 38.167-5.758 9.035-14.129 14.06-24.617 14.06-10.489 0-18.86-5.025-24.617-14.06-5.763-9.044-8.91-22.109-8.91-38.167v-.235c0-16.019 3.147-29.084 8.91-38.137 5.757-9.045 14.128-14.09 24.617-14.09s18.859 4.987 24.617 14.002c5.762 9.024 8.908 22.089 8.908 38.225zm73.402-50.037v72.295H187.36l50.926-72.294h.009Z"
1686
- })));
1687
- };
1688
-
1689
- var _path, _path2;
1690
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1691
- var SvgUnauthorized = function SvgUnauthorized(props) {
1692
- return /*#__PURE__*/React__namespace.createElement("svg", _extends({
1693
- xmlns: "http://www.w3.org/2000/svg",
1694
- fill: "none",
1695
- viewBox: "0 0 258 117"
1696
- }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
1697
- fill: "#000",
1698
- d: "M58.54 114.958V86.71H.4v-5.712L55.723 2.043h8.92v79.033h17.92v5.634h-17.92v28.248H58.54M7.13 81.076h51.41V8.382h-.313L7.129 80.919v.157M130.768 116.601c-24.884 0-39.908-22.38-39.908-57.983v-.235C90.86 22.701 105.884.4 130.768.4c24.883 0 39.985 22.458 39.985 57.983v.235c0 35.839-15.102 57.983-39.985 57.983m0-5.555c21.127 0 33.725-20.267 33.725-52.428v-.235c0-32.317-12.598-52.427-33.725-52.427-21.128 0-33.726 20.345-33.726 52.427v.235c0 32.16 12.598 52.428 33.726 52.428M218.958 116.601c-21.91 0-35.682-12.676-37.794-29.344l-.079-.704h6.026l.078.626c2.113 13.537 13.537 23.867 31.769 23.867 18.233 0 31.535-11.269 31.535-26.606v-.156c0-15.885-12.598-25.275-33.413-25.275h-12.754v-5.477h12.598c17.137 0 29.031-9.86 29.031-23.866v-.157c0-13.694-11.425-23.553-27.779-23.553-16.276 0-27.153 9.781-28.405 22.536l-.078.782h-6.025l.078-.782C185.233 12.45 198.379.4 218.176.4c19.875 0 34.039 12.129 34.039 28.561v.157c0 13.928-9.39 23.866-24.18 26.761v.313c17.294 1.174 28.718 11.973 28.718 28.014v.156c0 18.624-15.963 32.239-37.795 32.239"
1699
- })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
1700
- fill: "#000",
1701
- fillRule: "evenodd",
1702
- d: "M58.14 115.358V87.11H0V80.87L55.515 1.643h9.528v79.033h17.92v6.434h-17.92v28.248H58.14m6.503-28.648h17.92v-5.634h-17.92V2.043h-8.92L.4 80.998v5.712h58.14v28.248h6.103V86.71m116.124.598-.001-.006-.127-1.149h6.825l.12.965.001.006c2.081 13.313 13.313 23.521 31.373 23.521 18.078 0 31.135-11.15 31.135-26.204v-.157c0-7.824-3.096-14.021-8.741-18.275-5.66-4.264-13.918-6.6-24.272-6.6h-13.154v-6.277h12.998c8.494 0 15.656-2.443 20.687-6.59 5.026-4.141 7.944-9.995 7.944-16.876v-.157c0-13.415-11.183-23.153-27.379-23.153-16.106 0-26.778 9.658-28.007 22.175l-.114 1.143h-6.829l.122-1.22C184.856 12.182 198.2 0 218.176 0c20.03 0 34.439 12.247 34.439 28.961v.157c0 7.059-2.382 13.123-6.649 17.788-3.96 4.33-9.528 7.436-16.281 9.027 8.003.838 14.694 3.783 19.472 8.403 5.102 4.932 7.996 11.749 7.996 19.87v.156c0 18.902-16.204 32.639-38.195 32.639-22.083 0-36.05-12.799-38.191-29.693m47.619-31.09a46.445 46.445 0 0 0-.351-.026v-.313l.022-.004.303-.06c14.602-2.977 23.855-12.871 23.855-26.697v-.157C252.215 12.53 238.051.4 218.176.4c-19.797 0-32.943 12.05-34.43 28.092l-.078.782h6.025l.078-.782c1.252-12.755 12.129-22.536 28.405-22.536 16.354 0 27.779 9.86 27.779 23.553v.157c0 14.006-11.894 23.866-29.031 23.866h-12.598v5.477h12.754c20.815 0 33.413 9.39 33.413 25.275v.156c0 15.338-13.302 26.606-31.535 26.606-18.232 0-29.656-10.33-31.769-23.867l-.078-.626h-6.026l.079.704c2.112 16.668 15.884 29.344 37.794 29.344 21.832 0 37.795-13.615 37.795-32.239v-.156c0-15.933-11.27-26.694-28.367-27.989M58.54 81.075H7.13v-.157L58.226 8.382h.313v72.694ZM58.14 9.2 7.79 80.676h50.35V9.2m43.012 91.987C94.225 91.053 90.46 76.469 90.46 58.618v-.235c0-17.89 3.765-32.474 10.692-42.598C108.09 5.645 118.188 0 130.768 0c12.58 0 22.697 5.685 29.654 15.844 6.946 10.143 10.731 24.727 10.731 42.54v.234c0 17.968-3.784 32.553-10.732 42.658-6.957 10.12-17.075 15.725-29.653 15.725-12.58 0-22.678-5.665-29.616-15.814m54.064-4.51c5.735-9 8.877-22.023 8.877-38.059v-.235c0-16.114-3.142-29.137-8.877-38.117-5.724-8.963-14.034-13.91-24.448-13.91-10.413 0-18.724 5.004-24.449 13.997-5.735 9.01-8.877 22.033-8.877 38.03v.235c0 16.036 3.142 29.059 8.877 38.059 5.725 8.984 14.035 13.968 24.449 13.968 10.413 0 18.723-4.984 24.448-13.968m-24.448 19.924c-24.884 0-39.908-22.38-39.908-57.983v-.235C90.86 22.701 105.884.4 130.768.4c24.883 0 39.985 22.458 39.985 57.983v.235c0 35.839-15.102 57.983-39.985 57.983m0-5.555c21.127 0 33.725-20.267 33.725-52.428v-.235c0-32.317-12.598-52.427-33.725-52.427-21.128 0-33.726 20.345-33.726 52.427v.235c0 32.16 12.598 52.428 33.726 52.428",
1703
- clipRule: "evenodd"
1704
- })));
1705
- };
1706
-
1707
- var ERRORS = {
1708
- 404: {
1709
- Image: SvgPageNotFound,
1710
- errorKey: "neetoMolecules.errorPage.cantBeFound",
1711
- titleKey: "neetoMolecules.errorPage.title.cantBeFound"
1712
- },
1713
- 403: {
1714
- Image: SvgUnauthorized,
1715
- errorKey: "neetoMolecules.errorPage.unauthorized",
1716
- titleKey: "neetoMolecules.errorPage.title.unauthorized"
1717
- },
1718
- 500: {
1719
- Image: SvgInternalServerError,
1720
- errorKey: "neetoMolecules.errorPage.internalServerError",
1721
- titleKey: "neetoMolecules.errorPage.title.internalServerError"
1722
- }
1723
- };
1724
-
1725
- var css = ".neeto-molecules-error-page__wrapper{align-items:center;display:flex;flex-direction:column;justify-content:center;min-height:100vh;width:100%}.neeto-molecules-error-page__container{display:flex;flex-direction:column;gap:32px;max-width:768px;padding:16px}@media (min-width:640px){.neeto-molecules-error-page__container{flex-direction:row;gap:48px;padding:24px}}.neeto-molecules-error-page__image{max-width:150px;width:100%}@media (min-width:640px){.neeto-molecules-error-page__image{max-width:250px}}.neeto-molecules-error-page__action-btn{align-items:flex-start;display:flex;flex-direction:column;gap:12px}.neeto-molecules-error-page__action-btn a{text-decoration:none}.neeto-ui-theme--dark .neeto-molecules-error-code path{fill:rgb(var(--neeto-ui-black))}";
1726
- injectCss.n(css,{});
1727
-
1728
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1729
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1730
- var sanitize = purify.sanitize;
1731
- var ErrorPage = function ErrorPage(_ref) {
1732
- var _ref$homeUrl = _ref.homeUrl,
1733
- homeUrl = _ref$homeUrl === void 0 ? "/" : _ref$homeUrl,
1734
- status = _ref.status,
1735
- backToHomeButtonProps = _ref.backToHomeButtonProps,
1736
- children = _ref.children,
1737
- _ref$showNeetoChatWid = _ref.showNeetoChatWidget,
1738
- showNeetoChatWidget = _ref$showNeetoChatWid === void 0 ? true : _ref$showNeetoChatWid,
1739
- description = _ref.description;
1740
- var _useTranslation = reactI18next.useTranslation(),
1741
- t = _useTranslation.t;
1742
- var _useErrorDisplayStore = useDisplayErrorPage.useErrorDisplayStore(function (store) {
1743
- return {
1744
- statusCode: store["statusCode"],
1745
- showErrorPage: store["showErrorPage"]
1746
- };
1747
- }, shallow.shallow),
1748
- storeStatusCode = _useErrorDisplayStore.statusCode,
1749
- showErrorPage = _useErrorDisplayStore.showErrorPage;
1750
- status = status || storeStatusCode;
1751
- var _ref2 = ERRORS[status] || ERRORS[404],
1752
- Image = _ref2.Image,
1753
- errorKey = _ref2.errorKey,
1754
- titleKey = _ref2.titleKey;
1755
- React.useEffect(function () {
1756
- var onBackButtonPress = function onBackButtonPress() {
1757
- if (!showErrorPage) return;
1758
- useDisplayErrorPage.useErrorDisplayStore.setState({
1759
- showErrorPage: false
1760
- });
1761
- };
1762
- window.addEventListener("popstate", onBackButtonPress);
1763
- return function () {
1764
- window.removeEventListener("popstate", onBackButtonPress);
1765
- };
1766
- }, []);
1767
- var openChatWidget = function openChatWidget() {
1768
- var _window$NeetoChat, _window$NeetoChat2;
1769
- (_window$NeetoChat = window.NeetoChat) === null || _window$NeetoChat === void 0 || (_window$NeetoChat = _window$NeetoChat.contextualHelp) === null || _window$NeetoChat === void 0 || _window$NeetoChat.maximizeWidget();
1770
- (_window$NeetoChat2 = window.NeetoChat) === null || _window$NeetoChat2 === void 0 || (_window$NeetoChat2 = _window$NeetoChat2.contextualHelp) === null || _window$NeetoChat2 === void 0 || _window$NeetoChat2.openWidget();
1771
- };
1772
- return /*#__PURE__*/jsxRuntime.jsx("div", {
1773
- className: "neeto-molecules-error-page__wrapper",
1774
- "data-cy": "error-page-container",
1775
- children: /*#__PURE__*/jsxRuntime.jsxs("div", {
1776
- className: "neeto-molecules-error-page__container",
1777
- children: [/*#__PURE__*/jsxRuntime.jsx(Image, {
1778
- className: "neeto-molecules-error-code neeto-molecules-error-page__image",
1779
- "data-cy": "error-image"
1780
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
1781
- className: "neeto-ui-flex neeto-ui-flex-col",
1782
- children: [/*#__PURE__*/jsxRuntime.jsx(reactHelmet.Helmet, {
1783
- children: /*#__PURE__*/jsxRuntime.jsx("title", {
1784
- children: t(titleKey)
1785
- })
1786
- }), /*#__PURE__*/jsxRuntime.jsx(Typography, {
1787
- className: "neeto-ui-mb-4",
1788
- "data-cy": "title",
1789
- style: "h2",
1790
- weight: "semibold",
1791
- children: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
1792
- i18nKey: errorKey
1793
- })
1794
- }), !!description && /*#__PURE__*/jsxRuntime.jsx(Typography, {
1795
- className: "neeto-ui-mb-4",
1796
- dangerouslySetInnerHTML: {
1797
- __html: sanitize(description)
1798
- },
1799
- "data-cy": "description",
1800
- style: "body1"
1801
- }), showNeetoChatWidget && /*#__PURE__*/jsxRuntime.jsx(Typography, {
1802
- className: "neeto-ui-mb-6",
1803
- "data-cy": "title",
1804
- style: "body1",
1805
- children: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
1806
- i18nKey: "neetoMolecules.errorPage.contactUs",
1807
- components: {
1808
- button: /*#__PURE__*/jsxRuntime.jsx(Button, {
1809
- className: "neeto-ui-font-size-inherit",
1810
- size: "large",
1811
- style: "link",
1812
- onClick: openChatWidget
1813
- })
1814
- }
1815
- })
1816
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
1817
- className: "neeto-molecules-error-page__action-btn",
1818
- children: [/*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread({
1819
- href: homeUrl,
1820
- label: t("neetoMolecules.errorPage.backToHome"),
1821
- size: "large",
1822
- style: "primary"
1823
- }, backToHomeButtonProps)), children]
1824
- })]
1825
- })]
1826
- })
1827
- });
1828
- };
1829
-
1830
- module.exports = ErrorPage;
1831
- //# sourceMappingURL=ErrorPage.js.map