@vc-shell/framework 1.1.44 → 1.1.46

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 (453) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/core/plugins/modularity/loader.ts +150 -74
  3. package/core/services/app-bar-mobile-buttons-service.ts +1 -1
  4. package/dist/core/plugins/modularity/loader.d.ts.map +1 -1
  5. package/dist/core/services/app-bar-mobile-buttons-service.d.ts +1 -1
  6. package/dist/core/services/app-bar-mobile-buttons-service.d.ts.map +1 -1
  7. package/dist/framework.js +33355 -295
  8. package/dist/index.css +1 -9
  9. package/dist/index.d.ts +0 -4
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/locales/de.json +0 -84
  12. package/dist/locales/en.json +0 -84
  13. package/dist/shared/components/blade-navigation/components/vc-blade-navigation/_internal/vc-mobile-back-button.vue.d.ts.map +1 -1
  14. package/dist/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.d.ts +1 -1
  15. package/dist/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.d.ts.map +1 -1
  16. package/dist/shared/components/blade-navigation/composables/useBladeNavigation/internal/bladeRouteResolver.d.ts.map +1 -1
  17. package/dist/shared/components/change-password-button/change-password-button.vue.d.ts.map +1 -1
  18. package/dist/shared/components/logout-button/logout-button.vue.d.ts.map +1 -1
  19. package/dist/shared/components/settings-menu-item/settings-menu-item.vue.d.ts.map +1 -1
  20. package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +2 -2
  21. package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +6 -6
  22. package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
  23. package/dist/tsconfig.tsbuildinfo +1 -1
  24. package/dist/ui/components/atoms/vc-hint/vc-hint.vue.d.ts.map +1 -1
  25. package/dist/ui/components/atoms/vc-icon/icons/MenuBurgerIcon.vue.d.ts.map +1 -1
  26. package/dist/ui/components/atoms/vc-icon/icons/index.d.ts +0 -26
  27. package/dist/ui/components/atoms/vc-icon/icons/index.d.ts.map +1 -1
  28. package/dist/ui/components/atoms/vc-icon/vc-bootstrap-icon.vue.d.ts.map +1 -1
  29. package/dist/ui/components/atoms/vc-icon/vc-fontawesome-icon.vue.d.ts.map +1 -1
  30. package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
  31. package/dist/ui/components/atoms/vc-icon/vc-lucide-icon.vue.d.ts +0 -5
  32. package/dist/ui/components/atoms/vc-icon/vc-lucide-icon.vue.d.ts.map +1 -1
  33. package/dist/ui/components/atoms/vc-icon/vc-material-icon.vue.d.ts +0 -20
  34. package/dist/ui/components/atoms/vc-icon/vc-material-icon.vue.d.ts.map +1 -1
  35. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
  36. package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-button.vue.d.ts +36 -0
  37. package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-button.vue.d.ts.map +1 -0
  38. package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-toolbar.vue.d.ts +17 -0
  39. package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-toolbar.vue.d.ts.map +1 -0
  40. package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts +16 -2381
  41. package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
  42. package/dist/ui/components/molecules/vc-form/vc-form.vue.d.ts.map +1 -1
  43. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts +1 -1
  44. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts.map +1 -1
  45. package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts +1 -1
  46. package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts.map +1 -1
  47. package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/MenuSidebar.vue.d.ts.map +1 -1
  48. package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.d.ts.map +1 -1
  49. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts.map +1 -1
  50. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
  51. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue.d.ts.map +1 -1
  52. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-desktop.vue.d.ts.map +1 -1
  53. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue.d.ts.map +1 -1
  54. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
  55. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +2 -2
  56. package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +2 -2
  57. package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map +1 -1
  58. package/dist/ui/components/organisms/vc-table/_internal/vc-table-header/vc-table-header.vue.d.ts.map +1 -1
  59. package/dist/vendor-boolbase-Cp9L0GAZ.js +25 -0
  60. package/dist/vendor-cheerio-HN9zIPZn.js +3135 -0
  61. package/dist/vendor-cheerio-select-5Ry0HvBq.js +306 -0
  62. package/dist/vendor-core-js-l0sNRNKZ.js +1 -0
  63. package/dist/vendor-css-select-DRIZ9kfZ.js +966 -0
  64. package/dist/vendor-css-what-DuPJ1HEF.js +448 -0
  65. package/dist/vendor-cypress-signalr-mock-BKdBJpdt.js +778 -0
  66. package/dist/vendor-date-fns-515YWkk-.js +6724 -0
  67. package/dist/vendor-dom-serializer-nQMsqjYW.js +286 -0
  68. package/dist/vendor-dom7-CJLPMwy5.js +941 -0
  69. package/dist/vendor-domelementtype-CjSzQey5.js +53 -0
  70. package/dist/vendor-domhandler-9z8cS16a.js +484 -0
  71. package/dist/vendor-dompurify-CRFzu7ib.js +1336 -0
  72. package/dist/vendor-domutils-Bc-Opz-v.js +981 -0
  73. package/dist/vendor-entities-Bfsx4xOQ.js +636 -0
  74. package/dist/vendor-floating-ui-core-wV8u8QP4.js +511 -0
  75. package/dist/vendor-floating-ui-dom-DDnRPs17.js +706 -0
  76. package/dist/vendor-floating-ui-utils-OMIFy1QU.js +296 -0
  77. package/dist/vendor-floating-ui-vue-D-tCDAMm.js +167 -0
  78. package/dist/vendor-fontsource-plus-jakarta-sans.css +1 -0
  79. package/dist/vendor-headlessui-vue-CY9FRgTb.js +83 -0
  80. package/dist/vendor-htmlparser2-B1dhFPOs.js +1426 -0
  81. package/dist/vendor-iconify-vue-DfRGgyNu.js +1840 -0
  82. package/dist/vendor-intlify-core-base-BuknsFQe.js +1876 -0
  83. package/dist/vendor-intlify-message-compiler-CuOQDWx1.js +1508 -0
  84. package/dist/vendor-intlify-shared-Cz4YRMuC.js +241 -0
  85. package/dist/vendor-iso-639-1-BJCk9DvE.js +819 -0
  86. package/dist/vendor-linkify-it-CKUf4vsc.js +830 -0
  87. package/dist/vendor-linkifyjs-BfyGgbCh.js +1756 -0
  88. package/dist/vendor-lodash-es-BySUOlwf.js +18333 -0
  89. package/dist/vendor-markdown-it-D-apazHa.js +6000 -0
  90. package/dist/vendor-markdown-it-task-lists-rxMVH6Ku.js +131 -0
  91. package/dist/vendor-mdurl-BNh2CCgT.js +537 -0
  92. package/dist/vendor-microsoft-applicationinsights-analytics-js-kG3lLg8X.js +1275 -0
  93. package/dist/vendor-microsoft-applicationinsights-cfgsync-js-C0uQkiQq.js +591 -0
  94. package/dist/vendor-microsoft-applicationinsights-channel-js-Dyd_PXA3.js +2153 -0
  95. package/dist/vendor-microsoft-applicationinsights-common-CfmP1_Qr.js +2470 -0
  96. package/dist/vendor-microsoft-applicationinsights-core-js-Cq4YSEvZ.js +6589 -0
  97. package/dist/vendor-microsoft-applicationinsights-dependencies-js-C56OBFr4.js +1510 -0
  98. package/dist/vendor-microsoft-applicationinsights-properties-js-CBJTBawx.js +761 -0
  99. package/dist/vendor-microsoft-applicationinsights-shims-CX8sJgar.js +70 -0
  100. package/dist/vendor-microsoft-applicationinsights-web-pim2ri-g.js +667 -0
  101. package/dist/vendor-microsoft-dynamicproto-js-CFBBUu9p.js +520 -0
  102. package/dist/vendor-microsoft-signalr-dUnlRsGm.js +3339 -0
  103. package/dist/vendor-moment-Mki5YqAR.js +5679 -0
  104. package/dist/vendor-nevware21-ts-async-CLMApQ9E.js +395 -0
  105. package/dist/vendor-nevware21-ts-utils-e8v8Jty3.js +1160 -0
  106. package/dist/vendor-normalize-css.css +1 -0
  107. package/dist/vendor-nth-check-Bx8TxtJt.js +157 -0
  108. package/dist/vendor-orderedmap-dGG6uMFJ.js +137 -0
  109. package/dist/vendor-parse5-Bt2NhSzR.js +8432 -0
  110. package/dist/vendor-parse5-htmlparser2-tree-adapter-BUUtKzf8.js +216 -0
  111. package/dist/vendor-popperjs-core-Cr2byIky.js +1790 -0
  112. package/dist/vendor-prettier-B4PaeWRQ.js +98 -0
  113. package/dist/vendor-prosemirror-commands-BH9lWGpW.js +561 -0
  114. package/dist/vendor-prosemirror-dropcursor-CeyPcxrA.js +146 -0
  115. package/dist/vendor-prosemirror-gapcursor-U8UoUJII.js +236 -0
  116. package/dist/vendor-prosemirror-history-BDaJkvNx.js +414 -0
  117. package/dist/vendor-prosemirror-keymap-BbWvIWmH.js +128 -0
  118. package/dist/vendor-prosemirror-markdown-gB0PXBbz.js +866 -0
  119. package/dist/vendor-prosemirror-model-BZu3WVcD.js +3463 -0
  120. package/dist/vendor-prosemirror-schema-list-Bl9NpKA7.js +158 -0
  121. package/dist/vendor-prosemirror-state-BvL9Pxph.js +1003 -0
  122. package/dist/vendor-prosemirror-tables-17qAnviK.js +2159 -0
  123. package/dist/vendor-prosemirror-transform-CE9VV3qg.js +2156 -0
  124. package/dist/vendor-prosemirror-view-CU2WTHT7.js +5811 -0
  125. package/dist/vendor-punycode-js-iAs5RxMf.js +441 -0
  126. package/dist/vendor-rope-sequence-BdXDKoGt.js +207 -0
  127. package/dist/vendor-semver-CVLMK-S4.js +2702 -0
  128. package/dist/vendor-ssr-window-s6OpKa3O.js +150 -0
  129. package/dist/vendor-swiper-CdiyNHVt.js +5679 -0
  130. package/dist/vendor-swiper.css +1 -0
  131. package/dist/vendor-tanstack-virtual-core-l0sNRNKZ.js +1 -0
  132. package/dist/vendor-tanstack-vue-virtual-l0sNRNKZ.js +1 -0
  133. package/dist/vendor-tippy-js-DWFe2TfK.js +1647 -0
  134. package/dist/vendor-tiptap-core-NfwGfaQk.js +4910 -0
  135. package/dist/vendor-tiptap-extension-blockquote-jmWBTtsI.js +57 -0
  136. package/dist/vendor-tiptap-extension-bold-p5frh4ak.js +97 -0
  137. package/dist/vendor-tiptap-extension-bubble-menu-KUhZSfrs.js +218 -0
  138. package/dist/vendor-tiptap-extension-bullet-list-COmZRoSB.js +73 -0
  139. package/dist/vendor-tiptap-extension-code-block-DyTARZss.js +221 -0
  140. package/dist/vendor-tiptap-extension-code-jVv6CXpX.js +75 -0
  141. package/dist/vendor-tiptap-extension-document-DssuotYs.js +13 -0
  142. package/dist/vendor-tiptap-extension-dropcursor-BoO0Qv91.js +26 -0
  143. package/dist/vendor-tiptap-extension-floating-menu-CrO8CN5w.js +165 -0
  144. package/dist/vendor-tiptap-extension-gapcursor-KpsWEoMD.js +30 -0
  145. package/dist/vendor-tiptap-extension-hard-break-ldOzhSvf.js +68 -0
  146. package/dist/vendor-tiptap-extension-heading-CKz2llX0.js +77 -0
  147. package/dist/vendor-tiptap-extension-history-DeKZ2VQ9.js +48 -0
  148. package/dist/vendor-tiptap-extension-horizontal-rule-CAjWRyDS.js +92 -0
  149. package/dist/vendor-tiptap-extension-image-ZagcEYuk.js +76 -0
  150. package/dist/vendor-tiptap-extension-italic-CM4xdznY.js +96 -0
  151. package/dist/vendor-tiptap-extension-link-Z-AMC4Ri.js +414 -0
  152. package/dist/vendor-tiptap-extension-list-item-BJi5QpXc.js +37 -0
  153. package/dist/vendor-tiptap-extension-ordered-list-C_TMrfBE.js +97 -0
  154. package/dist/vendor-tiptap-extension-paragraph-CQw0E0Au.js +39 -0
  155. package/dist/vendor-tiptap-extension-placeholder-BBNVKfa_.js +66 -0
  156. package/dist/vendor-tiptap-extension-strike-DUyMYX1Z.js +79 -0
  157. package/dist/vendor-tiptap-extension-table-cell-CoDIMPA5.js +47 -0
  158. package/dist/vendor-tiptap-extension-table-header-DvbGHnmw.js +47 -0
  159. package/dist/vendor-tiptap-extension-table-row-D1uqN5Aj.js +26 -0
  160. package/dist/vendor-tiptap-extension-table-tKS4MOM4.js +354 -0
  161. package/dist/vendor-tiptap-extension-text-DtRBhKB2.js +12 -0
  162. package/dist/vendor-tiptap-extension-underline-DqaSFp_P.js +50 -0
  163. package/dist/vendor-tiptap-markdown-7-PCADTU.js +1017 -0
  164. package/dist/vendor-tiptap-pm-l0sNRNKZ.js +1 -0
  165. package/dist/vendor-tiptap-starter-kit-CDSV_Zuu.js +88 -0
  166. package/dist/vendor-tiptap-vue-3-DZg2fjq_.js +268 -0
  167. package/dist/vendor-truncate-html-3qQY0Djo.js +196 -0
  168. package/dist/vendor-uc-micro-jjt6LQ65.js +23 -0
  169. package/dist/vendor-vee-validate-i18n-v_gHjRmD.js +154 -0
  170. package/dist/vendor-vee-validate-rules-DzV3VY3N.js +536 -0
  171. package/dist/vendor-vue-currency-input-DGAkEFBO.js +545 -0
  172. package/dist/vendor-vue-demi-l0sNRNKZ.js +1 -0
  173. package/dist/vendor-vue-devtools-api-DXYR8qBG.js +169 -0
  174. package/dist/vendor-vue-i18n-Co752uk3.js +1897 -0
  175. package/dist/vendor-vue3-application-insights-CYWFCr_J.js +119 -0
  176. package/dist/vendor-vue3-touch-events-BJEAiSa3.js +416 -0
  177. package/dist/vendor-vuepic-vue-datepicker-BSWXRSiu.js +5019 -0
  178. package/dist/vendor-vuepic-vue-datepicker.css +1 -0
  179. package/dist/vendor-vueuse-components-l1bL12mE.js +339 -0
  180. package/dist/vendor-vueuse-core-DGcJOmwG.js +7743 -0
  181. package/dist/vendor-vueuse-shared-_mOXsFuM.js +1568 -0
  182. package/dist/vendor-w3c-keyname-BOm2dtJm.js +121 -0
  183. package/package.json +22 -11
  184. package/shared/components/blade-navigation/components/vc-blade-navigation/_internal/vc-mobile-back-button.vue +3 -3
  185. package/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.ts +2 -1
  186. package/shared/components/blade-navigation/composables/useBladeNavigation/internal/bladeRouteResolver.ts +1 -0
  187. package/shared/components/change-password-button/change-password-button.vue +1 -2
  188. package/shared/components/logout-button/logout-button.vue +1 -2
  189. package/shared/components/notifications/components/notification-container/index.ts +1 -1
  190. package/shared/components/notifications/core/notification.ts +1 -1
  191. package/shared/components/settings-menu-item/settings-menu-item.vue +1 -0
  192. package/shared/components/sidebar/sidebar.vue +2 -2
  193. package/shared/modules/dynamic/pages/dynamic-blade-list.vue +2 -1
  194. package/ui/components/atoms/vc-hint/vc-hint.vue +2 -0
  195. package/ui/components/atoms/vc-icon/composables/use-icon.ts +1 -1
  196. package/ui/components/atoms/vc-icon/icons/MenuBurgerIcon.vue +18 -14
  197. package/ui/components/atoms/vc-icon/icons/index.ts +1 -27
  198. package/ui/components/atoms/vc-icon/vc-bootstrap-icon.vue +7 -11
  199. package/ui/components/atoms/vc-icon/vc-fontawesome-icon.vue +37 -31
  200. package/ui/components/atoms/vc-icon/vc-icon-examples.vue +1 -1
  201. package/ui/components/atoms/vc-icon/vc-icon.stories.ts +4 -5
  202. package/ui/components/atoms/vc-icon/vc-icon.vue +43 -186
  203. package/ui/components/atoms/vc-icon/vc-lucide-icon.vue +22 -70
  204. package/ui/components/atoms/vc-icon/vc-material-icon.vue +28 -59
  205. package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +2 -3
  206. package/ui/components/molecules/vc-editor/_internal/vc-editor-button.vue +103 -0
  207. package/ui/components/molecules/vc-editor/_internal/vc-editor-toolbar.vue +252 -0
  208. package/ui/components/molecules/vc-editor/vc-editor.stories.ts +1 -4
  209. package/ui/components/molecules/vc-editor/vc-editor.vue +666 -360
  210. package/ui/components/molecules/vc-form/vc-form.vue +7 -5
  211. package/ui/components/molecules/vc-input/vc-input.vue +1 -1
  212. package/ui/components/molecules/vc-pagination/vc-pagination.vue +4 -17
  213. package/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarMobileActions.vue +1 -1
  214. package/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/MenuSidebar.vue +1 -3
  215. package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +1 -4
  216. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +1 -3
  217. package/ui/components/organisms/vc-app/vc-app.backupsb.ts +214 -214
  218. package/ui/components/organisms/vc-app/vc-app.vue +3 -5
  219. package/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +3 -10
  220. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/mobile/vc-blade-toolbar-mobile.vue +1 -1
  221. package/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-desktop.vue +2 -2
  222. package/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue +2 -2
  223. package/ui/components/organisms/vc-blade/vc-blade.vue +4 -5
  224. package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +1 -3
  225. package/ui/components/organisms/vc-table/_internal/vc-table-header/vc-table-header.vue +1 -2
  226. package/ui/components/organisms/vc-table/composables/useTableState.ts +5 -5
  227. package/dist/apl-B2DGVGxc.js +0 -76
  228. package/dist/asciiarmor-2LVJmxlE.js +0 -34
  229. package/dist/asn1-jKiBa2Ya.js +0 -95
  230. package/dist/asterisk-DS281yxp.js +0 -271
  231. package/dist/brainfuck-C_p9pTT8.js +0 -34
  232. package/dist/clike-DGTaUp48.js +0 -620
  233. package/dist/clojure-CCKyeQKf.js +0 -800
  234. package/dist/cmake-CuaCgAKt.js +0 -28
  235. package/dist/cobol-BlTKFDRj.js +0 -72
  236. package/dist/coffeescript-BVCvwO8I.js +0 -179
  237. package/dist/commonlisp-D_kxz07b.js +0 -75
  238. package/dist/crystal-D309uH6_.js +0 -217
  239. package/dist/css-BkF-NPzE.js +0 -1553
  240. package/dist/cypher-BMq4Fwjl.js +0 -68
  241. package/dist/d-BZcgY6La.js +0 -127
  242. package/dist/diff-Cg9d_RX2.js +0 -18
  243. package/dist/dockerfile-DIy8NleC.js +0 -194
  244. package/dist/dtd-CtLokQ-U.js +0 -84
  245. package/dist/dylan-QYeExnWK.js +0 -234
  246. package/dist/ebnf-DUPDuY4r.js +0 -78
  247. package/dist/ecl-CiXN-g_D.js +0 -121
  248. package/dist/eiffel-yQhjl4T1.js +0 -110
  249. package/dist/elm-CNT9vbN0.js +0 -108
  250. package/dist/erlang-CFOYdy9e.js +0 -487
  251. package/dist/factor-DDOC7X6P.js +0 -65
  252. package/dist/fcl-CPC2WYrI.js +0 -103
  253. package/dist/forth-BmxRyE9S.js +0 -60
  254. package/dist/fortran-9bvPyrOW.js +0 -442
  255. package/dist/gas-cpmYfFX2.js +0 -183
  256. package/dist/gherkin-CJuwpceU.js +0 -34
  257. package/dist/groovy-DZeT_VM-.js +0 -146
  258. package/dist/haskell-Bvt3Qq1t.js +0 -375
  259. package/dist/haxe-70NVW1pR.js +0 -359
  260. package/dist/http-D9LttvKF.js +0 -44
  261. package/dist/idl-B6TRFYjl.js +0 -947
  262. package/dist/index-4DWvmoYg.js +0 -71
  263. package/dist/index-52o7mJaX.js +0 -156
  264. package/dist/index-B0KatioT.js +0 -98
  265. package/dist/index-BP3W8zuk.js +0 -268
  266. package/dist/index-BykT5L1A.js +0 -148134
  267. package/dist/index-CfXo9hsG.js +0 -75
  268. package/dist/index-Ch37pBUt.js +0 -308
  269. package/dist/index-D2KGkAYT.js +0 -93
  270. package/dist/index-D83zQom_.js +0 -58
  271. package/dist/index-DuQrVLbu.js +0 -134
  272. package/dist/index-_fdMid5h.js +0 -288
  273. package/dist/index-a1wO-owY.js +0 -545
  274. package/dist/index-crMpNSFe.js +0 -611
  275. package/dist/index-dmBRpHHY.js +0 -137
  276. package/dist/index-kBdB14Fz.js +0 -341
  277. package/dist/index-uBhy41le.js +0 -249
  278. package/dist/index-zZrijNsr.js +0 -299
  279. package/dist/javascript-C2yteZeJ.js +0 -691
  280. package/dist/jinja2-DnB6dQmV.js +0 -154
  281. package/dist/julia-DpvXAuO6.js +0 -241
  282. package/dist/livescript-CanGTf8u.js +0 -272
  283. package/dist/lua-XplVlWi_.js +0 -217
  284. package/dist/mathematica-jaRHnSxC.js +0 -35
  285. package/dist/mbox-BctzC1hL.js +0 -76
  286. package/dist/mirc-CFBPAOaF.js +0 -72
  287. package/dist/mllike-BSnXJBGA.js +0 -272
  288. package/dist/modelica-vUgVs--1.js +0 -93
  289. package/dist/mscgen-Cpl0NYLN.js +0 -104
  290. package/dist/mumps-CQoS1kWX.js +0 -25
  291. package/dist/nginx-zDPm3Z74.js +0 -89
  292. package/dist/nsis-fePjrhq7.js +0 -62
  293. package/dist/ntriples-CsNjv2QF.js +0 -79
  294. package/dist/octave-C8PmmSRH.js +0 -143
  295. package/dist/oz-Ce8aN8oE.js +0 -151
  296. package/dist/pascal-De0D6mP7.js +0 -77
  297. package/dist/perl-B4bSCe1C.js +0 -915
  298. package/dist/pig-D24Z8EXi.js +0 -54
  299. package/dist/powershell-DkYVfTzP.js +0 -249
  300. package/dist/properties-Dn9wna3M.js +0 -26
  301. package/dist/protobuf-BPIjwpzm.js +0 -49
  302. package/dist/pug-CwAQJzGR.js +0 -248
  303. package/dist/puppet-nyd4dhjf.js +0 -45
  304. package/dist/python-BkR3uSy8.js +0 -313
  305. package/dist/q-DXjKs-tC.js +0 -83
  306. package/dist/r-LKEuhEGI.js +0 -104
  307. package/dist/rpm-IznJm2Xc.js +0 -57
  308. package/dist/ruby-CcYfvIk6.js +0 -228
  309. package/dist/sas-7E8yHoCW.js +0 -105
  310. package/dist/scheme-DjibxsNh.js +0 -124
  311. package/dist/shared/modules/dynamic/components/fields/storybook/common/args.d.ts +0 -113
  312. package/dist/shared/modules/dynamic/components/fields/storybook/common/args.d.ts.map +0 -1
  313. package/dist/shared/modules/dynamic/components/fields/storybook/common/templates.d.ts +0 -3
  314. package/dist/shared/modules/dynamic/components/fields/storybook/common/templates.d.ts.map +0 -1
  315. package/dist/shared/modules/dynamic/components/fields/storybook/pages/DynamicRender.d.ts +0 -102
  316. package/dist/shared/modules/dynamic/components/fields/storybook/pages/DynamicRender.d.ts.map +0 -1
  317. package/dist/shared/modules/dynamic/components/fields/storybook/utils/sourceHighlighter.d.ts +0 -4
  318. package/dist/shared/modules/dynamic/components/fields/storybook/utils/sourceHighlighter.d.ts.map +0 -1
  319. package/dist/shared/modules/dynamic/components/fields/storybook/utils/sourceTransform.d.ts +0 -3
  320. package/dist/shared/modules/dynamic/components/fields/storybook/utils/sourceTransform.d.ts.map +0 -1
  321. package/dist/shell-C0C2sNA_.js +0 -182
  322. package/dist/sieve-Bwz7vjP5.js +0 -72
  323. package/dist/simple-mode-B0dvCdAA.js +0 -89
  324. package/dist/smalltalk-Bhddl2pB.js +0 -48
  325. package/dist/solr-BNlsLglM.js +0 -41
  326. package/dist/sparql-FarWu_Gb.js +0 -197
  327. package/dist/spreadsheet-C-cy4P5N.js +0 -49
  328. package/dist/sql-CfG5lQ3l.js +0 -282
  329. package/dist/stex-Du4h4KAU.js +0 -129
  330. package/dist/stylus-CAdqWld3.js +0 -250
  331. package/dist/swift-DSxqR9R6.js +0 -230
  332. package/dist/tcl-xfoLljhY.js +0 -81
  333. package/dist/textile-D1AWE-pc.js +0 -295
  334. package/dist/tiddlywiki-5wqsXtSk.js +0 -155
  335. package/dist/tiki-__Kn3CeS.js +0 -181
  336. package/dist/toml-BHiuTcfn.js +0 -49
  337. package/dist/troff-D2UO-fKf.js +0 -35
  338. package/dist/ttcn-Bsa4sfRm.js +0 -123
  339. package/dist/ttcn-cfg-Bac_acMi.js +0 -88
  340. package/dist/turtle-xwJUxoPV.js +0 -80
  341. package/dist/ui/components/atoms/vc-icon/icons/AppWindowIcon.vue.d.ts +0 -7
  342. package/dist/ui/components/atoms/vc-icon/icons/AppWindowIcon.vue.d.ts.map +0 -1
  343. package/dist/ui/components/atoms/vc-icon/icons/ArrowLeftIcon.vue.d.ts +0 -7
  344. package/dist/ui/components/atoms/vc-icon/icons/ArrowLeftIcon.vue.d.ts.map +0 -1
  345. package/dist/ui/components/atoms/vc-icon/icons/ArrowRightIcon.vue.d.ts +0 -7
  346. package/dist/ui/components/atoms/vc-icon/icons/ArrowRightIcon.vue.d.ts.map +0 -1
  347. package/dist/ui/components/atoms/vc-icon/icons/BellIcon.vue.d.ts +0 -7
  348. package/dist/ui/components/atoms/vc-icon/icons/BellIcon.vue.d.ts.map +0 -1
  349. package/dist/ui/components/atoms/vc-icon/icons/ChevronDownIcon.vue.d.ts +0 -7
  350. package/dist/ui/components/atoms/vc-icon/icons/ChevronDownIcon.vue.d.ts.map +0 -1
  351. package/dist/ui/components/atoms/vc-icon/icons/ChevronLeftIcon.vue.d.ts +0 -7
  352. package/dist/ui/components/atoms/vc-icon/icons/ChevronLeftIcon.vue.d.ts.map +0 -1
  353. package/dist/ui/components/atoms/vc-icon/icons/ChevronRightIcon.vue.d.ts +0 -7
  354. package/dist/ui/components/atoms/vc-icon/icons/ChevronRightIcon.vue.d.ts.map +0 -1
  355. package/dist/ui/components/atoms/vc-icon/icons/ChevronUpIcon.vue.d.ts +0 -7
  356. package/dist/ui/components/atoms/vc-icon/icons/ChevronUpIcon.vue.d.ts.map +0 -1
  357. package/dist/ui/components/atoms/vc-icon/icons/CircleDotsIcon.vue.d.ts +0 -7
  358. package/dist/ui/components/atoms/vc-icon/icons/CircleDotsIcon.vue.d.ts.map +0 -1
  359. package/dist/ui/components/atoms/vc-icon/icons/CrossSignIcon.vue.d.ts +0 -7
  360. package/dist/ui/components/atoms/vc-icon/icons/CrossSignIcon.vue.d.ts.map +0 -1
  361. package/dist/ui/components/atoms/vc-icon/icons/DoubleArrowLeftIcon.vue.d.ts +0 -7
  362. package/dist/ui/components/atoms/vc-icon/icons/DoubleArrowLeftIcon.vue.d.ts.map +0 -1
  363. package/dist/ui/components/atoms/vc-icon/icons/DoubleArrowRightIcon.vue.d.ts +0 -7
  364. package/dist/ui/components/atoms/vc-icon/icons/DoubleArrowRightIcon.vue.d.ts.map +0 -1
  365. package/dist/ui/components/atoms/vc-icon/icons/FulfillmentCentersIcon.vue.d.ts +0 -7
  366. package/dist/ui/components/atoms/vc-icon/icons/FulfillmentCentersIcon.vue.d.ts.map +0 -1
  367. package/dist/ui/components/atoms/vc-icon/icons/GridDotsIcon.vue.d.ts +0 -7
  368. package/dist/ui/components/atoms/vc-icon/icons/GridDotsIcon.vue.d.ts.map +0 -1
  369. package/dist/ui/components/atoms/vc-icon/icons/LogoutIcon.vue.d.ts +0 -7
  370. package/dist/ui/components/atoms/vc-icon/icons/LogoutIcon.vue.d.ts.map +0 -1
  371. package/dist/ui/components/atoms/vc-icon/icons/MinusSignIcon.vue.d.ts +0 -7
  372. package/dist/ui/components/atoms/vc-icon/icons/MinusSignIcon.vue.d.ts.map +0 -1
  373. package/dist/ui/components/atoms/vc-icon/icons/OffersIcon.vue.d.ts +0 -7
  374. package/dist/ui/components/atoms/vc-icon/icons/OffersIcon.vue.d.ts.map +0 -1
  375. package/dist/ui/components/atoms/vc-icon/icons/OrdersIcon.vue.d.ts +0 -7
  376. package/dist/ui/components/atoms/vc-icon/icons/OrdersIcon.vue.d.ts.map +0 -1
  377. package/dist/ui/components/atoms/vc-icon/icons/PeopleIcon.vue.d.ts +0 -7
  378. package/dist/ui/components/atoms/vc-icon/icons/PeopleIcon.vue.d.ts.map +0 -1
  379. package/dist/ui/components/atoms/vc-icon/icons/PlusSignIcon.vue.d.ts +0 -7
  380. package/dist/ui/components/atoms/vc-icon/icons/PlusSignIcon.vue.d.ts.map +0 -1
  381. package/dist/ui/components/atoms/vc-icon/icons/ProductsIcon.vue.d.ts +0 -7
  382. package/dist/ui/components/atoms/vc-icon/icons/ProductsIcon.vue.d.ts.map +0 -1
  383. package/dist/ui/components/atoms/vc-icon/icons/ProfileIcon.vue.d.ts +0 -7
  384. package/dist/ui/components/atoms/vc-icon/icons/ProfileIcon.vue.d.ts.map +0 -1
  385. package/dist/ui/components/atoms/vc-icon/icons/SearchIcon.vue.d.ts +0 -7
  386. package/dist/ui/components/atoms/vc-icon/icons/SearchIcon.vue.d.ts.map +0 -1
  387. package/dist/ui/components/atoms/vc-icon/icons/SettingsBoltIcon.vue.d.ts +0 -7
  388. package/dist/ui/components/atoms/vc-icon/icons/SettingsBoltIcon.vue.d.ts.map +0 -1
  389. package/dist/ui/components/atoms/vc-icon/icons/ShoppingCardIcon.vue.d.ts +0 -7
  390. package/dist/ui/components/atoms/vc-icon/icons/ShoppingCardIcon.vue.d.ts.map +0 -1
  391. package/dist/ui/components/atoms/vc-icon/icons/VendorSwitchIcon.vue.d.ts +0 -7
  392. package/dist/ui/components/atoms/vc-icon/icons/VendorSwitchIcon.vue.d.ts.map +0 -1
  393. package/dist/ui/components/atoms/vc-icon/icons/VertDotsIcon.vue.d.ts +0 -7
  394. package/dist/ui/components/atoms/vc-icon/icons/VertDotsIcon.vue.d.ts.map +0 -1
  395. package/dist/vb-c2kQGd6-.js +0 -74
  396. package/dist/vbscript-1f_Dhg5H.js +0 -324
  397. package/dist/velocity-DJd0pTTC.js +0 -96
  398. package/dist/verilog-CiS1jyi5.js +0 -262
  399. package/dist/vhdl-T9HkrbI2.js +0 -106
  400. package/dist/webidl-CjfDENEo.js +0 -155
  401. package/dist/xquery-BUQdORAS.js +0 -422
  402. package/dist/yacas-C0absKBh.js +0 -73
  403. package/dist/z80-Pki2zAjW.js +0 -61
  404. package/shared/modules/dynamic/components/fields/storybook/Button.stories.ts +0 -186
  405. package/shared/modules/dynamic/components/fields/storybook/Card.stories.ts +0 -175
  406. package/shared/modules/dynamic/components/fields/storybook/Checkbox.stories.ts +0 -185
  407. package/shared/modules/dynamic/components/fields/storybook/ContentField.stories.ts +0 -245
  408. package/shared/modules/dynamic/components/fields/storybook/EditorField.stories.ts +0 -192
  409. package/shared/modules/dynamic/components/fields/storybook/Fieldset.stories.ts +0 -347
  410. package/shared/modules/dynamic/components/fields/storybook/GalleryField.stories.ts +0 -239
  411. package/shared/modules/dynamic/components/fields/storybook/ImageField.stories.ts +0 -186
  412. package/shared/modules/dynamic/components/fields/storybook/InputCurrency.stories.ts +0 -281
  413. package/shared/modules/dynamic/components/fields/storybook/InputField.stories.ts +0 -312
  414. package/shared/modules/dynamic/components/fields/storybook/MultivalueField.stories.ts +0 -361
  415. package/shared/modules/dynamic/components/fields/storybook/RadioButtonGroup.stories.ts +0 -224
  416. package/shared/modules/dynamic/components/fields/storybook/RatingField.stories.ts +0 -131
  417. package/shared/modules/dynamic/components/fields/storybook/SelectField.stories.ts +0 -666
  418. package/shared/modules/dynamic/components/fields/storybook/StatusField.stories.ts +0 -202
  419. package/shared/modules/dynamic/components/fields/storybook/SwitchField.stories.ts +0 -178
  420. package/shared/modules/dynamic/components/fields/storybook/TextareaField.stories.ts +0 -203
  421. package/shared/modules/dynamic/components/fields/storybook/VideoField.stories.ts +0 -92
  422. package/shared/modules/dynamic/components/fields/storybook/common/args.ts +0 -130
  423. package/shared/modules/dynamic/components/fields/storybook/common/templates.ts +0 -8
  424. package/shared/modules/dynamic/components/fields/storybook/pages/DynamicRender.ts +0 -54
  425. package/shared/modules/dynamic/components/fields/storybook/utils/sourceHighlighter.ts +0 -16
  426. package/shared/modules/dynamic/components/fields/storybook/utils/sourceTransform.ts +0 -41
  427. package/ui/components/atoms/vc-icon/icons/AppWindowIcon.vue +0 -15
  428. package/ui/components/atoms/vc-icon/icons/ArrowLeftIcon.vue +0 -20
  429. package/ui/components/atoms/vc-icon/icons/ArrowRightIcon.vue +0 -13
  430. package/ui/components/atoms/vc-icon/icons/BellIcon.vue +0 -14
  431. package/ui/components/atoms/vc-icon/icons/ChevronDownIcon.vue +0 -13
  432. package/ui/components/atoms/vc-icon/icons/ChevronLeftIcon.vue +0 -13
  433. package/ui/components/atoms/vc-icon/icons/ChevronRightIcon.vue +0 -13
  434. package/ui/components/atoms/vc-icon/icons/ChevronUpIcon.vue +0 -13
  435. package/ui/components/atoms/vc-icon/icons/CircleDotsIcon.vue +0 -16
  436. package/ui/components/atoms/vc-icon/icons/CrossSignIcon.vue +0 -20
  437. package/ui/components/atoms/vc-icon/icons/DoubleArrowLeftIcon.vue +0 -14
  438. package/ui/components/atoms/vc-icon/icons/DoubleArrowRightIcon.vue +0 -14
  439. package/ui/components/atoms/vc-icon/icons/FulfillmentCentersIcon.vue +0 -27
  440. package/ui/components/atoms/vc-icon/icons/GridDotsIcon.vue +0 -22
  441. package/ui/components/atoms/vc-icon/icons/LogoutIcon.vue +0 -13
  442. package/ui/components/atoms/vc-icon/icons/MinusSignIcon.vue +0 -14
  443. package/ui/components/atoms/vc-icon/icons/OffersIcon.vue +0 -23
  444. package/ui/components/atoms/vc-icon/icons/OrdersIcon.vue +0 -19
  445. package/ui/components/atoms/vc-icon/icons/PeopleIcon.vue +0 -21
  446. package/ui/components/atoms/vc-icon/icons/PlusSignIcon.vue +0 -20
  447. package/ui/components/atoms/vc-icon/icons/ProductsIcon.vue +0 -23
  448. package/ui/components/atoms/vc-icon/icons/ProfileIcon.vue +0 -18
  449. package/ui/components/atoms/vc-icon/icons/SearchIcon.vue +0 -14
  450. package/ui/components/atoms/vc-icon/icons/SettingsBoltIcon.vue +0 -21
  451. package/ui/components/atoms/vc-icon/icons/ShoppingCardIcon.vue +0 -16
  452. package/ui/components/atoms/vc-icon/icons/VendorSwitchIcon.vue +0 -26
  453. package/ui/components/atoms/vc-icon/icons/VertDotsIcon.vue +0 -19
@@ -0,0 +1,1336 @@
1
+ /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
2
+
3
+ const {
4
+ entries,
5
+ setPrototypeOf,
6
+ isFrozen,
7
+ getPrototypeOf,
8
+ getOwnPropertyDescriptor
9
+ } = Object;
10
+ let {
11
+ freeze,
12
+ seal,
13
+ create
14
+ } = Object; // eslint-disable-line import/no-mutable-exports
15
+ let {
16
+ apply,
17
+ construct
18
+ } = typeof Reflect !== 'undefined' && Reflect;
19
+ if (!freeze) {
20
+ freeze = function freeze(x) {
21
+ return x;
22
+ };
23
+ }
24
+ if (!seal) {
25
+ seal = function seal(x) {
26
+ return x;
27
+ };
28
+ }
29
+ if (!apply) {
30
+ apply = function apply(fun, thisValue, args) {
31
+ return fun.apply(thisValue, args);
32
+ };
33
+ }
34
+ if (!construct) {
35
+ construct = function construct(Func, args) {
36
+ return new Func(...args);
37
+ };
38
+ }
39
+ const arrayForEach = unapply(Array.prototype.forEach);
40
+ const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
41
+ const arrayPop = unapply(Array.prototype.pop);
42
+ const arrayPush = unapply(Array.prototype.push);
43
+ const arraySplice = unapply(Array.prototype.splice);
44
+ const stringToLowerCase = unapply(String.prototype.toLowerCase);
45
+ const stringToString = unapply(String.prototype.toString);
46
+ const stringMatch = unapply(String.prototype.match);
47
+ const stringReplace = unapply(String.prototype.replace);
48
+ const stringIndexOf = unapply(String.prototype.indexOf);
49
+ const stringTrim = unapply(String.prototype.trim);
50
+ const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
51
+ const regExpTest = unapply(RegExp.prototype.test);
52
+ const typeErrorCreate = unconstruct(TypeError);
53
+ /**
54
+ * Creates a new function that calls the given function with a specified thisArg and arguments.
55
+ *
56
+ * @param func - The function to be wrapped and called.
57
+ * @returns A new function that calls the given function with a specified thisArg and arguments.
58
+ */
59
+ function unapply(func) {
60
+ return function (thisArg) {
61
+ if (thisArg instanceof RegExp) {
62
+ thisArg.lastIndex = 0;
63
+ }
64
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
65
+ args[_key - 1] = arguments[_key];
66
+ }
67
+ return apply(func, thisArg, args);
68
+ };
69
+ }
70
+ /**
71
+ * Creates a new function that constructs an instance of the given constructor function with the provided arguments.
72
+ *
73
+ * @param func - The constructor function to be wrapped and called.
74
+ * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
75
+ */
76
+ function unconstruct(func) {
77
+ return function () {
78
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
79
+ args[_key2] = arguments[_key2];
80
+ }
81
+ return construct(func, args);
82
+ };
83
+ }
84
+ /**
85
+ * Add properties to a lookup table
86
+ *
87
+ * @param set - The set to which elements will be added.
88
+ * @param array - The array containing elements to be added to the set.
89
+ * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
90
+ * @returns The modified set with added elements.
91
+ */
92
+ function addToSet(set, array) {
93
+ let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;
94
+ if (setPrototypeOf) {
95
+ // Make 'in' and truthy checks like Boolean(set.constructor)
96
+ // independent of any properties defined on Object.prototype.
97
+ // Prevent prototype setters from intercepting set as a this value.
98
+ setPrototypeOf(set, null);
99
+ }
100
+ let l = array.length;
101
+ while (l--) {
102
+ let element = array[l];
103
+ if (typeof element === 'string') {
104
+ const lcElement = transformCaseFunc(element);
105
+ if (lcElement !== element) {
106
+ // Config presets (e.g. tags.js, attrs.js) are immutable.
107
+ if (!isFrozen(array)) {
108
+ array[l] = lcElement;
109
+ }
110
+ element = lcElement;
111
+ }
112
+ }
113
+ set[element] = true;
114
+ }
115
+ return set;
116
+ }
117
+ /**
118
+ * Clean up an array to harden against CSPP
119
+ *
120
+ * @param array - The array to be cleaned.
121
+ * @returns The cleaned version of the array
122
+ */
123
+ function cleanArray(array) {
124
+ for (let index = 0; index < array.length; index++) {
125
+ const isPropertyExist = objectHasOwnProperty(array, index);
126
+ if (!isPropertyExist) {
127
+ array[index] = null;
128
+ }
129
+ }
130
+ return array;
131
+ }
132
+ /**
133
+ * Shallow clone an object
134
+ *
135
+ * @param object - The object to be cloned.
136
+ * @returns A new object that copies the original.
137
+ */
138
+ function clone(object) {
139
+ const newObject = create(null);
140
+ for (const [property, value] of entries(object)) {
141
+ const isPropertyExist = objectHasOwnProperty(object, property);
142
+ if (isPropertyExist) {
143
+ if (Array.isArray(value)) {
144
+ newObject[property] = cleanArray(value);
145
+ } else if (value && typeof value === 'object' && value.constructor === Object) {
146
+ newObject[property] = clone(value);
147
+ } else {
148
+ newObject[property] = value;
149
+ }
150
+ }
151
+ }
152
+ return newObject;
153
+ }
154
+ /**
155
+ * This method automatically checks if the prop is function or getter and behaves accordingly.
156
+ *
157
+ * @param object - The object to look up the getter function in its prototype chain.
158
+ * @param prop - The property name for which to find the getter function.
159
+ * @returns The getter function found in the prototype chain or a fallback function.
160
+ */
161
+ function lookupGetter(object, prop) {
162
+ while (object !== null) {
163
+ const desc = getOwnPropertyDescriptor(object, prop);
164
+ if (desc) {
165
+ if (desc.get) {
166
+ return unapply(desc.get);
167
+ }
168
+ if (typeof desc.value === 'function') {
169
+ return unapply(desc.value);
170
+ }
171
+ }
172
+ object = getPrototypeOf(object);
173
+ }
174
+ function fallbackValue() {
175
+ return null;
176
+ }
177
+ return fallbackValue;
178
+ }
179
+
180
+ 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']);
181
+ 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']);
182
+ 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']);
183
+ // List of SVG elements that are disallowed by default.
184
+ // We still need to know them so that we can do namespace
185
+ // checks properly in case one wants to add them to
186
+ // allow-list.
187
+ 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']);
188
+ 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']);
189
+ // Similarly to SVG, we want to know all MathML elements,
190
+ // even those that we disallow by default.
191
+ const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
192
+ const text = freeze(['#text']);
193
+
194
+ 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', 'popover', 'popovertarget', 'popovertargetaction', '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', 'wrap', 'xmlns', 'slot']);
195
+ const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', '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', 'exponent', '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', 'intercept', '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', 'slope', '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', 'tablevalues', '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']);
196
+ 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']);
197
+ const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
198
+
199
+ // eslint-disable-next-line unicorn/better-regex
200
+ const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
201
+ const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
202
+ const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
203
+ const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
204
+ const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
205
+ const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
206
+ );
207
+ const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
208
+ const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
209
+ );
210
+ const DOCTYPE_NAME = seal(/^html$/i);
211
+ const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
212
+
213
+ var EXPRESSIONS = /*#__PURE__*/Object.freeze({
214
+ __proto__: null,
215
+ ARIA_ATTR: ARIA_ATTR,
216
+ ATTR_WHITESPACE: ATTR_WHITESPACE,
217
+ CUSTOM_ELEMENT: CUSTOM_ELEMENT,
218
+ DATA_ATTR: DATA_ATTR,
219
+ DOCTYPE_NAME: DOCTYPE_NAME,
220
+ ERB_EXPR: ERB_EXPR,
221
+ IS_ALLOWED_URI: IS_ALLOWED_URI,
222
+ IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,
223
+ MUSTACHE_EXPR: MUSTACHE_EXPR,
224
+ TMPLIT_EXPR: TMPLIT_EXPR
225
+ });
226
+
227
+ /* eslint-disable @typescript-eslint/indent */
228
+ // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
229
+ const NODE_TYPE = {
230
+ element: 1,
231
+ text: 3,
232
+ // Deprecated
233
+ progressingInstruction: 7,
234
+ comment: 8,
235
+ document: 9};
236
+ const getGlobal = function getGlobal() {
237
+ return typeof window === 'undefined' ? null : window;
238
+ };
239
+ /**
240
+ * Creates a no-op policy for internal use only.
241
+ * Don't export this function outside this module!
242
+ * @param trustedTypes The policy factory.
243
+ * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
244
+ * @return The policy created (or null, if Trusted Types
245
+ * are not supported or creating the policy failed).
246
+ */
247
+ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
248
+ if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
249
+ return null;
250
+ }
251
+ // Allow the callers to control the unique policy name
252
+ // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
253
+ // Policy creation with duplicate names throws in Trusted Types.
254
+ let suffix = null;
255
+ const ATTR_NAME = 'data-tt-policy-suffix';
256
+ if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
257
+ suffix = purifyHostElement.getAttribute(ATTR_NAME);
258
+ }
259
+ const policyName = 'dompurify' + (suffix ? '#' + suffix : '');
260
+ try {
261
+ return trustedTypes.createPolicy(policyName, {
262
+ createHTML(html) {
263
+ return html;
264
+ },
265
+ createScriptURL(scriptUrl) {
266
+ return scriptUrl;
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
+ const _createHooksMap = function _createHooksMap() {
278
+ return {
279
+ afterSanitizeAttributes: [],
280
+ afterSanitizeElements: [],
281
+ afterSanitizeShadowDOM: [],
282
+ beforeSanitizeAttributes: [],
283
+ beforeSanitizeElements: [],
284
+ beforeSanitizeShadowDOM: [],
285
+ uponSanitizeAttribute: [],
286
+ uponSanitizeElement: [],
287
+ uponSanitizeShadowNode: []
288
+ };
289
+ };
290
+ function createDOMPurify() {
291
+ let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
292
+ const DOMPurify = root => createDOMPurify(root);
293
+ DOMPurify.version = '3.2.6';
294
+ DOMPurify.removed = [];
295
+ if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
296
+ // Not running in a browser, provide a factory function
297
+ // so that you can pass your own Window
298
+ DOMPurify.isSupported = false;
299
+ return DOMPurify;
300
+ }
301
+ let {
302
+ document
303
+ } = window;
304
+ const originalDocument = document;
305
+ const currentScript = originalDocument.currentScript;
306
+ const {
307
+ DocumentFragment,
308
+ HTMLTemplateElement,
309
+ Node,
310
+ Element,
311
+ NodeFilter,
312
+ NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,
313
+ HTMLFormElement,
314
+ DOMParser,
315
+ trustedTypes
316
+ } = window;
317
+ const ElementPrototype = Element.prototype;
318
+ const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
319
+ const remove = lookupGetter(ElementPrototype, 'remove');
320
+ const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
321
+ const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
322
+ const getParentNode = lookupGetter(ElementPrototype, 'parentNode');
323
+ // 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
+ if (typeof HTMLTemplateElement === 'function') {
330
+ const template = document.createElement('template');
331
+ if (template.content && template.content.ownerDocument) {
332
+ document = template.content.ownerDocument;
333
+ }
334
+ }
335
+ let trustedTypesPolicy;
336
+ let emptyHTML = '';
337
+ const {
338
+ implementation,
339
+ createNodeIterator,
340
+ createDocumentFragment,
341
+ getElementsByTagName
342
+ } = document;
343
+ const {
344
+ importNode
345
+ } = originalDocument;
346
+ let hooks = _createHooksMap();
347
+ /**
348
+ * Expose whether this browser supports running the full DOMPurify.
349
+ */
350
+ DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;
351
+ const {
352
+ MUSTACHE_EXPR,
353
+ ERB_EXPR,
354
+ TMPLIT_EXPR,
355
+ DATA_ATTR,
356
+ ARIA_ATTR,
357
+ IS_SCRIPT_OR_DATA,
358
+ ATTR_WHITESPACE,
359
+ CUSTOM_ELEMENT
360
+ } = EXPRESSIONS;
361
+ let {
362
+ IS_ALLOWED_URI: IS_ALLOWED_URI$1
363
+ } = EXPRESSIONS;
364
+ /**
365
+ * We consider the elements and attributes below to be safe. Ideally
366
+ * don't add any new ones but feel free to remove unwanted ones.
367
+ */
368
+ /* allowed element names */
369
+ let ALLOWED_TAGS = null;
370
+ const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
371
+ /* Allowed attribute names */
372
+ let ALLOWED_ATTR = null;
373
+ const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
374
+ /*
375
+ * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.
376
+ * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
377
+ * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
378
+ * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
379
+ */
380
+ let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
381
+ tagNameCheck: {
382
+ writable: true,
383
+ configurable: false,
384
+ enumerable: true,
385
+ value: null
386
+ },
387
+ attributeNameCheck: {
388
+ writable: true,
389
+ configurable: false,
390
+ enumerable: true,
391
+ value: null
392
+ },
393
+ allowCustomizedBuiltInElements: {
394
+ writable: true,
395
+ configurable: false,
396
+ enumerable: true,
397
+ value: false
398
+ }
399
+ }));
400
+ /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
401
+ let FORBID_TAGS = null;
402
+ /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
403
+ let FORBID_ATTR = null;
404
+ /* Decide if ARIA attributes are okay */
405
+ let ALLOW_ARIA_ATTR = true;
406
+ /* Decide if custom data attributes are okay */
407
+ let ALLOW_DATA_ATTR = true;
408
+ /* Decide if unknown protocols are okay */
409
+ let ALLOW_UNKNOWN_PROTOCOLS = false;
410
+ /* Decide if self-closing tags in attributes are allowed.
411
+ * Usually removed due to a mXSS issue in jQuery 3.0 */
412
+ let ALLOW_SELF_CLOSE_IN_ATTR = true;
413
+ /* Output should be safe for common template engines.
414
+ * This means, DOMPurify removes data attributes, mustaches and ERB
415
+ */
416
+ let SAFE_FOR_TEMPLATES = false;
417
+ /* Output should be safe even for XML used within HTML and alike.
418
+ * This means, DOMPurify removes comments when containing risky content.
419
+ */
420
+ let SAFE_FOR_XML = true;
421
+ /* Decide if document with <html>... should be returned */
422
+ let WHOLE_DOCUMENT = false;
423
+ /* Track whether config is already set on this instance of DOMPurify. */
424
+ let SET_CONFIG = false;
425
+ /* Decide if all elements (e.g. style, script) must be children of
426
+ * document.body. By default, browsers might move them to document.head */
427
+ let FORCE_BODY = false;
428
+ /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
429
+ * string (or a TrustedHTML object if Trusted Types are supported).
430
+ * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
431
+ */
432
+ let RETURN_DOM = false;
433
+ /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
434
+ * string (or a TrustedHTML object if Trusted Types are supported) */
435
+ let RETURN_DOM_FRAGMENT = false;
436
+ /* Try to return a Trusted Type object instead of a string, return a string in
437
+ * case Trusted Types are not supported */
438
+ let RETURN_TRUSTED_TYPE = false;
439
+ /* Output should be free from DOM clobbering attacks?
440
+ * This sanitizes markups named with colliding, clobberable built-in DOM APIs.
441
+ */
442
+ let SANITIZE_DOM = true;
443
+ /* Achieve full DOM Clobbering protection by isolating the namespace of named
444
+ * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
445
+ *
446
+ * HTML/DOM spec rules that enable DOM Clobbering:
447
+ * - Named Access on Window (§7.3.3)
448
+ * - DOM Tree Accessors (§3.1.5)
449
+ * - Form Element Parent-Child Relations (§4.10.3)
450
+ * - Iframe srcdoc / Nested WindowProxies (§4.8.5)
451
+ * - HTMLCollection (§4.2.10.2)
452
+ *
453
+ * Namespace isolation is implemented by prefixing `id` and `name` attributes
454
+ * with a constant string, i.e., `user-content-`
455
+ */
456
+ let SANITIZE_NAMED_PROPS = false;
457
+ const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
458
+ /* Keep element content when removing element? */
459
+ let KEEP_CONTENT = true;
460
+ /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
461
+ * of importing it into a new Document and returning a sanitized copy */
462
+ let IN_PLACE = false;
463
+ /* Allow usage of profiles like html, svg and mathMl */
464
+ let USE_PROFILES = {};
465
+ /* Tags to ignore content of when KEEP_CONTENT is true */
466
+ let FORBID_CONTENTS = null;
467
+ 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']);
468
+ /* Tags that are safe for data: URIs */
469
+ let DATA_URI_TAGS = null;
470
+ const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
471
+ /* Attributes safe for values like "javascript:" */
472
+ let URI_SAFE_ATTRIBUTES = null;
473
+ const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
474
+ const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
475
+ const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
476
+ const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
477
+ /* Document namespace */
478
+ let NAMESPACE = HTML_NAMESPACE;
479
+ let IS_EMPTY_INPUT = false;
480
+ /* Allowed XHTML+XML namespaces */
481
+ let ALLOWED_NAMESPACES = null;
482
+ const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
483
+ let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
484
+ let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);
485
+ // Certain elements are allowed in both SVG and HTML
486
+ // namespace. We need to specify them explicitly
487
+ // so that they don't get erroneously deleted from
488
+ // HTML namespace.
489
+ const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
490
+ /* Parsing of strict XHTML documents */
491
+ let PARSER_MEDIA_TYPE = null;
492
+ const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
493
+ const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
494
+ let transformCaseFunc = null;
495
+ /* Keep a reference to config to pass to hooks */
496
+ let CONFIG = null;
497
+ /* Ideally, do not touch anything below this line */
498
+ /* ______________________________________________ */
499
+ const formElement = document.createElement('form');
500
+ const isRegexOrFunction = function isRegexOrFunction(testValue) {
501
+ return testValue instanceof RegExp || testValue instanceof Function;
502
+ };
503
+ /**
504
+ * _parseConfig
505
+ *
506
+ * @param cfg optional config literal
507
+ */
508
+ // eslint-disable-next-line complexity
509
+ const _parseConfig = function _parseConfig() {
510
+ let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
511
+ if (CONFIG && CONFIG === cfg) {
512
+ return;
513
+ }
514
+ /* Shield configuration object from tampering */
515
+ if (!cfg || typeof cfg !== 'object') {
516
+ cfg = {};
517
+ }
518
+ /* Shield configuration object from prototype pollution */
519
+ cfg = clone(cfg);
520
+ PARSER_MEDIA_TYPE =
521
+ // eslint-disable-next-line unicorn/prefer-includes
522
+ SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
523
+ // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
524
+ transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
525
+ /* Set configuration parameters */
526
+ ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
527
+ ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
528
+ ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
529
+ URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
530
+ DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
531
+ FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
532
+ FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
533
+ FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
534
+ USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;
535
+ ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
536
+ ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
537
+ ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
538
+ ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true
539
+ SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
540
+ SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true
541
+ WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
542
+ RETURN_DOM = cfg.RETURN_DOM || false; // Default false
543
+ RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
544
+ RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
545
+ FORCE_BODY = cfg.FORCE_BODY || false; // Default false
546
+ SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
547
+ SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
548
+ KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
549
+ IN_PLACE = cfg.IN_PLACE || false; // Default false
550
+ IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
551
+ NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
552
+ MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
553
+ HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
554
+ CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
555
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
556
+ CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
557
+ }
558
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
559
+ CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
560
+ }
561
+ if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
562
+ CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
563
+ }
564
+ if (SAFE_FOR_TEMPLATES) {
565
+ ALLOW_DATA_ATTR = false;
566
+ }
567
+ if (RETURN_DOM_FRAGMENT) {
568
+ RETURN_DOM = true;
569
+ }
570
+ /* Parse profile info */
571
+ if (USE_PROFILES) {
572
+ ALLOWED_TAGS = addToSet({}, text);
573
+ ALLOWED_ATTR = [];
574
+ if (USE_PROFILES.html === true) {
575
+ addToSet(ALLOWED_TAGS, html$1);
576
+ addToSet(ALLOWED_ATTR, html);
577
+ }
578
+ if (USE_PROFILES.svg === true) {
579
+ addToSet(ALLOWED_TAGS, svg$1);
580
+ addToSet(ALLOWED_ATTR, svg);
581
+ addToSet(ALLOWED_ATTR, xml);
582
+ }
583
+ if (USE_PROFILES.svgFilters === true) {
584
+ addToSet(ALLOWED_TAGS, svgFilters);
585
+ addToSet(ALLOWED_ATTR, svg);
586
+ addToSet(ALLOWED_ATTR, xml);
587
+ }
588
+ if (USE_PROFILES.mathMl === true) {
589
+ addToSet(ALLOWED_TAGS, mathMl$1);
590
+ addToSet(ALLOWED_ATTR, mathMl);
591
+ addToSet(ALLOWED_ATTR, xml);
592
+ }
593
+ }
594
+ /* Merge configuration parameters */
595
+ if (cfg.ADD_TAGS) {
596
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
597
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
598
+ }
599
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
600
+ }
601
+ if (cfg.ADD_ATTR) {
602
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
603
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
604
+ }
605
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
606
+ }
607
+ if (cfg.ADD_URI_SAFE_ATTR) {
608
+ addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
609
+ }
610
+ if (cfg.FORBID_CONTENTS) {
611
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
612
+ FORBID_CONTENTS = clone(FORBID_CONTENTS);
613
+ }
614
+ addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
615
+ }
616
+ /* Add #text in case KEEP_CONTENT is set to true */
617
+ if (KEEP_CONTENT) {
618
+ ALLOWED_TAGS['#text'] = true;
619
+ }
620
+ /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
621
+ if (WHOLE_DOCUMENT) {
622
+ addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
623
+ }
624
+ /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
625
+ if (ALLOWED_TAGS.table) {
626
+ addToSet(ALLOWED_TAGS, ['tbody']);
627
+ delete FORBID_TAGS.tbody;
628
+ }
629
+ if (cfg.TRUSTED_TYPES_POLICY) {
630
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {
631
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
632
+ }
633
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
634
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
635
+ }
636
+ // Overwrite existing TrustedTypes policy.
637
+ trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
638
+ // Sign local variables required by `sanitize`.
639
+ emptyHTML = trustedTypesPolicy.createHTML('');
640
+ } else {
641
+ // Uninitialized policy, attempt to initialize the internal dompurify policy.
642
+ if (trustedTypesPolicy === undefined) {
643
+ trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
644
+ }
645
+ // If creating the internal policy succeeded sign internal variables.
646
+ if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {
647
+ emptyHTML = trustedTypesPolicy.createHTML('');
648
+ }
649
+ }
650
+ // Prevent further manipulation of configuration.
651
+ // Not available in IE8, Safari 5, etc.
652
+ if (freeze) {
653
+ freeze(cfg);
654
+ }
655
+ CONFIG = cfg;
656
+ };
657
+ /* Keep track of all possible SVG and MathML tags
658
+ * so that we can perform the namespace checks
659
+ * correctly. */
660
+ const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
661
+ const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
662
+ /**
663
+ * @param element a DOM element whose namespace is being checked
664
+ * @returns Return false if the element has a
665
+ * namespace that a spec-compliant parser would never
666
+ * return. Return true otherwise.
667
+ */
668
+ const _checkValidNamespace = function _checkValidNamespace(element) {
669
+ let parent = getParentNode(element);
670
+ // In JSDOM, if we're inside shadow DOM, then parentNode
671
+ // can be null. We just simulate parent in this case.
672
+ if (!parent || !parent.tagName) {
673
+ parent = {
674
+ namespaceURI: NAMESPACE,
675
+ tagName: 'template'
676
+ };
677
+ }
678
+ const tagName = stringToLowerCase(element.tagName);
679
+ const parentTagName = stringToLowerCase(parent.tagName);
680
+ if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
681
+ return false;
682
+ }
683
+ if (element.namespaceURI === SVG_NAMESPACE) {
684
+ // The only way to switch from HTML namespace to SVG
685
+ // is via <svg>. If it happens via any other tag, then
686
+ // it should be killed.
687
+ if (parent.namespaceURI === HTML_NAMESPACE) {
688
+ return tagName === 'svg';
689
+ }
690
+ // The only way to switch from MathML to SVG is via`
691
+ // svg if parent is either <annotation-xml> or MathML
692
+ // text integration points.
693
+ if (parent.namespaceURI === MATHML_NAMESPACE) {
694
+ return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
695
+ }
696
+ // We only allow elements that are defined in SVG
697
+ // spec. All others are disallowed in SVG namespace.
698
+ return Boolean(ALL_SVG_TAGS[tagName]);
699
+ }
700
+ if (element.namespaceURI === MATHML_NAMESPACE) {
701
+ // The only way to switch from HTML namespace to MathML
702
+ // is via <math>. If it happens via any other tag, then
703
+ // it should be killed.
704
+ if (parent.namespaceURI === HTML_NAMESPACE) {
705
+ return tagName === 'math';
706
+ }
707
+ // The only way to switch from SVG to MathML is via
708
+ // <math> and HTML integration points
709
+ if (parent.namespaceURI === SVG_NAMESPACE) {
710
+ return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
711
+ }
712
+ // We only allow elements that are defined in MathML
713
+ // spec. All others are disallowed in MathML namespace.
714
+ return Boolean(ALL_MATHML_TAGS[tagName]);
715
+ }
716
+ if (element.namespaceURI === HTML_NAMESPACE) {
717
+ // The only way to switch from SVG to HTML is via
718
+ // HTML integration points, and from MathML to HTML
719
+ // is via MathML text integration points
720
+ if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
721
+ return false;
722
+ }
723
+ if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
724
+ return false;
725
+ }
726
+ // We disallow tags that are specific for MathML
727
+ // or SVG and should never appear in HTML namespace
728
+ return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
729
+ }
730
+ // For XHTML and XML documents that support custom namespaces
731
+ if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
732
+ return true;
733
+ }
734
+ // The code should never reach this place (this means
735
+ // that the element somehow got namespace that is not
736
+ // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
737
+ // Return false just in case.
738
+ return false;
739
+ };
740
+ /**
741
+ * _forceRemove
742
+ *
743
+ * @param node a DOM node
744
+ */
745
+ const _forceRemove = function _forceRemove(node) {
746
+ arrayPush(DOMPurify.removed, {
747
+ element: node
748
+ });
749
+ try {
750
+ // eslint-disable-next-line unicorn/prefer-dom-node-remove
751
+ getParentNode(node).removeChild(node);
752
+ } catch (_) {
753
+ remove(node);
754
+ }
755
+ };
756
+ /**
757
+ * _removeAttribute
758
+ *
759
+ * @param name an Attribute name
760
+ * @param element a DOM node
761
+ */
762
+ const _removeAttribute = function _removeAttribute(name, element) {
763
+ try {
764
+ arrayPush(DOMPurify.removed, {
765
+ attribute: element.getAttributeNode(name),
766
+ from: element
767
+ });
768
+ } catch (_) {
769
+ arrayPush(DOMPurify.removed, {
770
+ attribute: null,
771
+ from: element
772
+ });
773
+ }
774
+ element.removeAttribute(name);
775
+ // We void attribute values for unremovable "is" attributes
776
+ if (name === 'is') {
777
+ if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
778
+ try {
779
+ _forceRemove(element);
780
+ } catch (_) {}
781
+ } else {
782
+ try {
783
+ element.setAttribute(name, '');
784
+ } catch (_) {}
785
+ }
786
+ }
787
+ };
788
+ /**
789
+ * _initDocument
790
+ *
791
+ * @param dirty - a string of dirty markup
792
+ * @return a DOM, filled with the dirty markup
793
+ */
794
+ const _initDocument = function _initDocument(dirty) {
795
+ /* Create a HTML document */
796
+ let doc = null;
797
+ let leadingWhitespace = null;
798
+ if (FORCE_BODY) {
799
+ dirty = '<remove></remove>' + dirty;
800
+ } else {
801
+ /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
802
+ const matches = stringMatch(dirty, /^[\r\n\t ]+/);
803
+ leadingWhitespace = matches && matches[0];
804
+ }
805
+ if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {
806
+ // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
807
+ dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
808
+ }
809
+ const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
810
+ /*
811
+ * Use the DOMParser API by default, fallback later if needs be
812
+ * DOMParser not work for svg when has multiple root element.
813
+ */
814
+ if (NAMESPACE === HTML_NAMESPACE) {
815
+ try {
816
+ doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
817
+ } catch (_) {}
818
+ }
819
+ /* Use createHTMLDocument in case DOMParser is not available */
820
+ if (!doc || !doc.documentElement) {
821
+ doc = implementation.createDocument(NAMESPACE, 'template', null);
822
+ try {
823
+ doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
824
+ } catch (_) {
825
+ // Syntax error if dirtyPayload is invalid xml
826
+ }
827
+ }
828
+ const body = doc.body || doc.documentElement;
829
+ if (dirty && leadingWhitespace) {
830
+ body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
831
+ }
832
+ /* Work on whole document or just its body */
833
+ if (NAMESPACE === HTML_NAMESPACE) {
834
+ return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
835
+ }
836
+ return WHOLE_DOCUMENT ? doc.documentElement : body;
837
+ };
838
+ /**
839
+ * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
840
+ *
841
+ * @param root The root element or node to start traversing on.
842
+ * @return The created NodeIterator
843
+ */
844
+ const _createNodeIterator = function _createNodeIterator(root) {
845
+ return createNodeIterator.call(root.ownerDocument || root, root,
846
+ // eslint-disable-next-line no-bitwise
847
+ NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
848
+ };
849
+ /**
850
+ * _isClobbered
851
+ *
852
+ * @param element element to check for clobbering attacks
853
+ * @return true if clobbered, false if safe
854
+ */
855
+ const _isClobbered = function _isClobbered(element) {
856
+ return element instanceof HTMLFormElement && (typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function');
857
+ };
858
+ /**
859
+ * Checks whether the given object is a DOM node.
860
+ *
861
+ * @param value object to check whether it's a DOM node
862
+ * @return true is object is a DOM node
863
+ */
864
+ const _isNode = function _isNode(value) {
865
+ return typeof Node === 'function' && value instanceof Node;
866
+ };
867
+ function _executeHooks(hooks, currentNode, data) {
868
+ arrayForEach(hooks, hook => {
869
+ hook.call(DOMPurify, currentNode, data, CONFIG);
870
+ });
871
+ }
872
+ /**
873
+ * _sanitizeElements
874
+ *
875
+ * @protect nodeName
876
+ * @protect textContent
877
+ * @protect removeChild
878
+ * @param currentNode to check for permission to exist
879
+ * @return true if node was killed, false if left alive
880
+ */
881
+ const _sanitizeElements = function _sanitizeElements(currentNode) {
882
+ let content = null;
883
+ /* Execute a hook if present */
884
+ _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
885
+ /* Check if element is clobbered or can clobber */
886
+ if (_isClobbered(currentNode)) {
887
+ _forceRemove(currentNode);
888
+ return true;
889
+ }
890
+ /* Now let's check the element's type and name */
891
+ const tagName = transformCaseFunc(currentNode.nodeName);
892
+ /* Execute a hook if present */
893
+ _executeHooks(hooks.uponSanitizeElement, currentNode, {
894
+ tagName,
895
+ allowedTags: ALLOWED_TAGS
896
+ });
897
+ /* Detect mXSS attempts abusing namespace confusion */
898
+ if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
899
+ _forceRemove(currentNode);
900
+ return true;
901
+ }
902
+ /* Remove any occurrence of processing instructions */
903
+ if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
904
+ _forceRemove(currentNode);
905
+ return true;
906
+ }
907
+ /* Remove any kind of possibly harmful comments */
908
+ if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
909
+ _forceRemove(currentNode);
910
+ return true;
911
+ }
912
+ /* Remove element if anything forbids its presence */
913
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
914
+ /* Check if we have a custom element to handle */
915
+ if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
916
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
917
+ return false;
918
+ }
919
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
920
+ return false;
921
+ }
922
+ }
923
+ /* Keep content except for bad-listed elements */
924
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
925
+ const parentNode = getParentNode(currentNode) || currentNode.parentNode;
926
+ const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
927
+ if (childNodes && parentNode) {
928
+ const childCount = childNodes.length;
929
+ for (let i = childCount - 1; i >= 0; --i) {
930
+ const childClone = cloneNode(childNodes[i], true);
931
+ childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
932
+ parentNode.insertBefore(childClone, getNextSibling(currentNode));
933
+ }
934
+ }
935
+ }
936
+ _forceRemove(currentNode);
937
+ return true;
938
+ }
939
+ /* Check whether element has a valid namespace */
940
+ if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
941
+ _forceRemove(currentNode);
942
+ return true;
943
+ }
944
+ /* Make sure that older browsers don't get fallback-tag mXSS */
945
+ if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
946
+ _forceRemove(currentNode);
947
+ return true;
948
+ }
949
+ /* Sanitize element content to be template-safe */
950
+ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
951
+ /* Get the element's text content */
952
+ content = currentNode.textContent;
953
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
954
+ content = stringReplace(content, expr, ' ');
955
+ });
956
+ if (currentNode.textContent !== content) {
957
+ arrayPush(DOMPurify.removed, {
958
+ element: currentNode.cloneNode()
959
+ });
960
+ currentNode.textContent = content;
961
+ }
962
+ }
963
+ /* Execute a hook if present */
964
+ _executeHooks(hooks.afterSanitizeElements, currentNode, null);
965
+ return false;
966
+ };
967
+ /**
968
+ * _isValidAttribute
969
+ *
970
+ * @param lcTag Lowercase tag name of containing element.
971
+ * @param lcName Lowercase attribute name.
972
+ * @param value Attribute value.
973
+ * @return Returns true if `value` is valid, otherwise false.
974
+ */
975
+ // eslint-disable-next-line complexity
976
+ const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
977
+ /* Make sure attribute cannot clobber */
978
+ if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
979
+ return false;
980
+ }
981
+ /* Allow valid data-* attributes: At least one character after "-"
982
+ (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
983
+ XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
984
+ We don't need to check the value; it's always URI safe. */
985
+ 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]) {
986
+ if (
987
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
988
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
989
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
990
+ _isBasicCustomElement(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)) ||
991
+ // Alternative, second condition checks if it's an `is`-attribute, AND
992
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
993
+ 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 {
994
+ return false;
995
+ }
996
+ /* Check value is safe. First, is attr inert? If so, is safe */
997
+ } 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) {
998
+ return false;
999
+ } else ;
1000
+ return true;
1001
+ };
1002
+ /**
1003
+ * _isBasicCustomElement
1004
+ * checks if at least one dash is included in tagName, and it's not the first char
1005
+ * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
1006
+ *
1007
+ * @param tagName name of the tag of the node to sanitize
1008
+ * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
1009
+ */
1010
+ const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
1011
+ return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);
1012
+ };
1013
+ /**
1014
+ * _sanitizeAttributes
1015
+ *
1016
+ * @protect attributes
1017
+ * @protect nodeName
1018
+ * @protect removeAttribute
1019
+ * @protect setAttribute
1020
+ *
1021
+ * @param currentNode to sanitize
1022
+ */
1023
+ const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
1024
+ /* Execute a hook if present */
1025
+ _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
1026
+ const {
1027
+ attributes
1028
+ } = currentNode;
1029
+ /* Check if we have attributes; if not we might have a text node */
1030
+ if (!attributes || _isClobbered(currentNode)) {
1031
+ return;
1032
+ }
1033
+ const hookEvent = {
1034
+ attrName: '',
1035
+ attrValue: '',
1036
+ keepAttr: true,
1037
+ allowedAttributes: ALLOWED_ATTR,
1038
+ forceKeepAttr: undefined
1039
+ };
1040
+ let l = attributes.length;
1041
+ /* Go backwards over all attributes; safely remove bad ones */
1042
+ while (l--) {
1043
+ const attr = attributes[l];
1044
+ const {
1045
+ name,
1046
+ namespaceURI,
1047
+ value: attrValue
1048
+ } = attr;
1049
+ const lcName = transformCaseFunc(name);
1050
+ const initValue = attrValue;
1051
+ let value = name === 'value' ? initValue : stringTrim(initValue);
1052
+ /* Execute a hook if present */
1053
+ hookEvent.attrName = lcName;
1054
+ hookEvent.attrValue = value;
1055
+ hookEvent.keepAttr = true;
1056
+ hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
1057
+ _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
1058
+ value = hookEvent.attrValue;
1059
+ /* Full DOM Clobbering protection via namespace isolation,
1060
+ * Prefix id and name attributes with `user-content-`
1061
+ */
1062
+ if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {
1063
+ // Remove the attribute with this value
1064
+ _removeAttribute(name, currentNode);
1065
+ // Prefix the value and later re-create the attribute with the sanitized value
1066
+ value = SANITIZE_NAMED_PROPS_PREFIX + value;
1067
+ }
1068
+ /* Work around a security issue with comments inside attributes */
1069
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
1070
+ _removeAttribute(name, currentNode);
1071
+ continue;
1072
+ }
1073
+ /* Did the hooks approve of the attribute? */
1074
+ if (hookEvent.forceKeepAttr) {
1075
+ continue;
1076
+ }
1077
+ /* Did the hooks approve of the attribute? */
1078
+ if (!hookEvent.keepAttr) {
1079
+ _removeAttribute(name, currentNode);
1080
+ continue;
1081
+ }
1082
+ /* Work around a security issue in jQuery 3.0 */
1083
+ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
1084
+ _removeAttribute(name, currentNode);
1085
+ continue;
1086
+ }
1087
+ /* Sanitize attribute content to be template-safe */
1088
+ if (SAFE_FOR_TEMPLATES) {
1089
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1090
+ value = stringReplace(value, expr, ' ');
1091
+ });
1092
+ }
1093
+ /* Is `value` valid for this attribute? */
1094
+ const lcTag = transformCaseFunc(currentNode.nodeName);
1095
+ if (!_isValidAttribute(lcTag, lcName, value)) {
1096
+ _removeAttribute(name, currentNode);
1097
+ continue;
1098
+ }
1099
+ /* Handle attributes that require Trusted Types */
1100
+ if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {
1101
+ if (namespaceURI) ; else {
1102
+ switch (trustedTypes.getAttributeType(lcTag, lcName)) {
1103
+ case 'TrustedHTML':
1104
+ {
1105
+ value = trustedTypesPolicy.createHTML(value);
1106
+ break;
1107
+ }
1108
+ case 'TrustedScriptURL':
1109
+ {
1110
+ value = trustedTypesPolicy.createScriptURL(value);
1111
+ break;
1112
+ }
1113
+ }
1114
+ }
1115
+ }
1116
+ /* Handle invalid data-* attribute set by try-catching it */
1117
+ if (value !== initValue) {
1118
+ try {
1119
+ if (namespaceURI) {
1120
+ currentNode.setAttributeNS(namespaceURI, name, value);
1121
+ } else {
1122
+ /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
1123
+ currentNode.setAttribute(name, value);
1124
+ }
1125
+ if (_isClobbered(currentNode)) {
1126
+ _forceRemove(currentNode);
1127
+ } else {
1128
+ arrayPop(DOMPurify.removed);
1129
+ }
1130
+ } catch (_) {
1131
+ _removeAttribute(name, currentNode);
1132
+ }
1133
+ }
1134
+ }
1135
+ /* Execute a hook if present */
1136
+ _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
1137
+ };
1138
+ /**
1139
+ * _sanitizeShadowDOM
1140
+ *
1141
+ * @param fragment to iterate over recursively
1142
+ */
1143
+ const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
1144
+ let shadowNode = null;
1145
+ const shadowIterator = _createNodeIterator(fragment);
1146
+ /* Execute a hook if present */
1147
+ _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
1148
+ while (shadowNode = shadowIterator.nextNode()) {
1149
+ /* Execute a hook if present */
1150
+ _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
1151
+ /* Sanitize tags and elements */
1152
+ _sanitizeElements(shadowNode);
1153
+ /* Check attributes next */
1154
+ _sanitizeAttributes(shadowNode);
1155
+ /* Deep shadow DOM detected */
1156
+ if (shadowNode.content instanceof DocumentFragment) {
1157
+ _sanitizeShadowDOM(shadowNode.content);
1158
+ }
1159
+ }
1160
+ /* Execute a hook if present */
1161
+ _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
1162
+ };
1163
+ // eslint-disable-next-line complexity
1164
+ DOMPurify.sanitize = function (dirty) {
1165
+ let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1166
+ let body = null;
1167
+ let importedNode = null;
1168
+ let currentNode = null;
1169
+ let returnNode = null;
1170
+ /* Make sure we have a string to sanitize.
1171
+ DO NOT return early, as this will return the wrong type if
1172
+ the user has requested a DOM object rather than a string */
1173
+ IS_EMPTY_INPUT = !dirty;
1174
+ if (IS_EMPTY_INPUT) {
1175
+ dirty = '<!-->';
1176
+ }
1177
+ /* Stringify, in case dirty is an object */
1178
+ if (typeof dirty !== 'string' && !_isNode(dirty)) {
1179
+ if (typeof dirty.toString === 'function') {
1180
+ dirty = dirty.toString();
1181
+ if (typeof dirty !== 'string') {
1182
+ throw typeErrorCreate('dirty is not a string, aborting');
1183
+ }
1184
+ } else {
1185
+ throw typeErrorCreate('toString is not a function');
1186
+ }
1187
+ }
1188
+ /* Return dirty HTML if DOMPurify cannot run */
1189
+ if (!DOMPurify.isSupported) {
1190
+ return dirty;
1191
+ }
1192
+ /* Assign config vars */
1193
+ if (!SET_CONFIG) {
1194
+ _parseConfig(cfg);
1195
+ }
1196
+ /* Clean up removed elements */
1197
+ DOMPurify.removed = [];
1198
+ /* Check if dirty is correctly typed for IN_PLACE */
1199
+ if (typeof dirty === 'string') {
1200
+ IN_PLACE = false;
1201
+ }
1202
+ if (IN_PLACE) {
1203
+ /* Do some early pre-sanitization to avoid unsafe root nodes */
1204
+ if (dirty.nodeName) {
1205
+ const tagName = transformCaseFunc(dirty.nodeName);
1206
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
1207
+ throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
1208
+ }
1209
+ }
1210
+ } else if (dirty instanceof Node) {
1211
+ /* If dirty is a DOM element, append to an empty document to avoid
1212
+ elements being stripped by the parser */
1213
+ body = _initDocument('<!---->');
1214
+ importedNode = body.ownerDocument.importNode(dirty, true);
1215
+ if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {
1216
+ /* Node is already a body, use as is */
1217
+ body = importedNode;
1218
+ } else if (importedNode.nodeName === 'HTML') {
1219
+ body = importedNode;
1220
+ } else {
1221
+ // eslint-disable-next-line unicorn/prefer-dom-node-append
1222
+ body.appendChild(importedNode);
1223
+ }
1224
+ } else {
1225
+ /* Exit directly if we have nothing to do */
1226
+ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
1227
+ // eslint-disable-next-line unicorn/prefer-includes
1228
+ dirty.indexOf('<') === -1) {
1229
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
1230
+ }
1231
+ /* Initialize the document to work on */
1232
+ body = _initDocument(dirty);
1233
+ /* Check we have a DOM node from the data */
1234
+ if (!body) {
1235
+ return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
1236
+ }
1237
+ }
1238
+ /* Remove first element node (ours) if FORCE_BODY is set */
1239
+ if (body && FORCE_BODY) {
1240
+ _forceRemove(body.firstChild);
1241
+ }
1242
+ /* Get node iterator */
1243
+ const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
1244
+ /* Now start iterating over the created document */
1245
+ while (currentNode = nodeIterator.nextNode()) {
1246
+ /* Sanitize tags and elements */
1247
+ _sanitizeElements(currentNode);
1248
+ /* Check attributes next */
1249
+ _sanitizeAttributes(currentNode);
1250
+ /* Shadow DOM detected, sanitize it */
1251
+ if (currentNode.content instanceof DocumentFragment) {
1252
+ _sanitizeShadowDOM(currentNode.content);
1253
+ }
1254
+ }
1255
+ /* If we sanitized `dirty` in-place, return it. */
1256
+ if (IN_PLACE) {
1257
+ return dirty;
1258
+ }
1259
+ /* Return sanitized string or DOM */
1260
+ if (RETURN_DOM) {
1261
+ if (RETURN_DOM_FRAGMENT) {
1262
+ returnNode = createDocumentFragment.call(body.ownerDocument);
1263
+ while (body.firstChild) {
1264
+ // eslint-disable-next-line unicorn/prefer-dom-node-append
1265
+ returnNode.appendChild(body.firstChild);
1266
+ }
1267
+ } else {
1268
+ returnNode = body;
1269
+ }
1270
+ if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
1271
+ /*
1272
+ AdoptNode() is not used because internal state is not reset
1273
+ (e.g. the past names map of a HTMLFormElement), this is safe
1274
+ in theory but we would rather not risk another attack vector.
1275
+ The state that is cloned by importNode() is explicitly defined
1276
+ by the specs.
1277
+ */
1278
+ returnNode = importNode.call(originalDocument, returnNode, true);
1279
+ }
1280
+ return returnNode;
1281
+ }
1282
+ let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
1283
+ /* Serialize doctype if allowed */
1284
+ if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
1285
+ serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
1286
+ }
1287
+ /* Sanitize final string template-safe */
1288
+ if (SAFE_FOR_TEMPLATES) {
1289
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1290
+ serializedHTML = stringReplace(serializedHTML, expr, ' ');
1291
+ });
1292
+ }
1293
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
1294
+ };
1295
+ DOMPurify.setConfig = function () {
1296
+ let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1297
+ _parseConfig(cfg);
1298
+ SET_CONFIG = true;
1299
+ };
1300
+ DOMPurify.clearConfig = function () {
1301
+ CONFIG = null;
1302
+ SET_CONFIG = false;
1303
+ };
1304
+ DOMPurify.isValidAttribute = function (tag, attr, value) {
1305
+ /* Initialize shared config vars if necessary. */
1306
+ if (!CONFIG) {
1307
+ _parseConfig({});
1308
+ }
1309
+ const lcTag = transformCaseFunc(tag);
1310
+ const lcName = transformCaseFunc(attr);
1311
+ return _isValidAttribute(lcTag, lcName, value);
1312
+ };
1313
+ DOMPurify.addHook = function (entryPoint, hookFunction) {
1314
+ if (typeof hookFunction !== 'function') {
1315
+ return;
1316
+ }
1317
+ arrayPush(hooks[entryPoint], hookFunction);
1318
+ };
1319
+ DOMPurify.removeHook = function (entryPoint, hookFunction) {
1320
+ if (hookFunction !== undefined) {
1321
+ const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
1322
+ return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];
1323
+ }
1324
+ return arrayPop(hooks[entryPoint]);
1325
+ };
1326
+ DOMPurify.removeHooks = function (entryPoint) {
1327
+ hooks[entryPoint] = [];
1328
+ };
1329
+ DOMPurify.removeAllHooks = function () {
1330
+ hooks = _createHooksMap();
1331
+ };
1332
+ return DOMPurify;
1333
+ }
1334
+ var purify = createDOMPurify();
1335
+
1336
+ export { purify as p };