@iblai/iblai-js 2.75.0 → 2.76.0

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 (137) hide show
  1. package/dist/web-containers/source/_virtual/index2.js +2 -2
  2. package/dist/web-containers/source/_virtual/index3.js +2 -2
  3. package/dist/web-containers/source/canvas/canvas-rich-text-editor.js +8 -8
  4. package/dist/web-containers/source/canvas/tiptap-math-extension.js +3 -3
  5. package/dist/web-containers/source/canvas/tiptap-math-extension.js.map +1 -1
  6. package/dist/web-containers/source/canvas-rich-text-editor.js +8 -8
  7. package/dist/web-containers/source/components/canvas/canvas-rich-text-editor.js +8 -8
  8. package/dist/web-containers/source/components/canvas/tiptap-math-extension.js +3 -3
  9. package/dist/web-containers/source/components/canvas/tiptap-math-extension.js.map +1 -1
  10. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/human-support-tab/use-support-tickets-with-pagination.js +1 -1
  11. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/skills-tab/index.js +1 -1
  12. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/tasks-tab/tasks-tab-content.js +1 -1
  13. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/tasks-tab/tasks-tab-toolbar.js +1 -1
  14. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/tasks-tab.js +1 -1
  15. package/dist/web-containers/source/components/modals/user-profile-modal.js +1 -1
  16. package/dist/web-containers/source/components/rich-text-editor.js +13 -13
  17. package/dist/web-containers/source/components/rich-text-editor.js.map +1 -1
  18. package/dist/web-containers/source/components/summernote-text-editor.js +2 -2
  19. package/dist/web-containers/source/components/summernote-text-editor.js.map +1 -1
  20. package/dist/web-containers/source/edit-mentor-modal/tabs/human-support-tab/use-support-tickets-with-pagination.js +1 -1
  21. package/dist/web-containers/source/edit-mentor-modal/tabs/skills-tab/index.js +1 -1
  22. package/dist/web-containers/source/edit-mentor-modal/tabs/tasks-tab/tasks-tab-content.js +1 -1
  23. package/dist/web-containers/source/edit-mentor-modal/tabs/tasks-tab/tasks-tab-toolbar.js +1 -1
  24. package/dist/web-containers/source/edit-mentor-modal/tabs/tasks-tab.js +1 -1
  25. package/dist/web-containers/source/human-support-tab/use-support-tickets-with-pagination.js +1 -1
  26. package/dist/web-containers/source/index2.js +2 -2
  27. package/dist/web-containers/source/index3.js +2 -2
  28. package/dist/web-containers/source/lib/sanitize-html.js +2 -2
  29. package/dist/web-containers/source/lib/sanitize-html.js.map +1 -1
  30. package/dist/web-containers/source/lib/utils.js +1 -1
  31. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/human-support-tab/use-support-tickets-with-pagination.js +1 -1
  32. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/skills-tab/index.js +1 -1
  33. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/tasks-tab/tasks-tab-content.js +1 -1
  34. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/tasks-tab/tasks-tab-toolbar.js +1 -1
  35. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/tasks-tab.js +1 -1
  36. package/dist/web-containers/source/modals/user-profile-modal.js +1 -1
  37. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_core@3.34.0_@tiptap_pm@3.20.4/node_modules/@tiptap/core/dist/index.js +6554 -0
  38. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_core@3.34.0_@tiptap_pm@3.20.4/node_modules/@tiptap/core/dist/index.js.map +1 -0
  39. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_core@3.34.0_@tiptap_pm@3.20.4/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +55 -0
  40. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_core@3.34.0_@tiptap_pm@3.20.4/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +1 -0
  41. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_core@3.34.0_@tiptap_pm@3.20.4/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js +14 -0
  42. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_core@3.34.0_@tiptap_pm@3.20.4/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js.map +1 -0
  43. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-blockquote@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-blockquote@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-blockquote/dist/index.js +3 -3
  44. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_extension-blockquote@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_/node_modules/@tiptap/extension-blockquote/dist/index.js.map +1 -0
  45. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-bold@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-bold@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-bold/dist/index.js +2 -2
  46. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-bold@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-bold@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-bold/dist/index.js.map +1 -1
  47. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-code-block@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4 → @tiptap_extension-code-block@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4}/node_modules/@tiptap/extension-code-block/dist/index.js +2 -2
  48. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_extension-code-block@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4/node_modules/@tiptap/extension-code-block/dist/index.js.map +1 -0
  49. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-code@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-code@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-code/dist/index.js +1 -1
  50. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-code@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-code@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-code/dist/index.js.map +1 -1
  51. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-document@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-document@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-document/dist/index.js +2 -2
  52. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-document@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-document@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-document/dist/index.js.map +1 -1
  53. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-hard-break@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-hard-break@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-hard-break/dist/index.js +2 -2
  54. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-hard-break@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-hard-break@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-hard-break/dist/index.js.map +1 -1
  55. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-heading@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-heading@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-heading/dist/index.js +2 -2
  56. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_extension-heading@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_/node_modules/@tiptap/extension-heading/dist/index.js.map +1 -0
  57. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-horizontal-rule@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4 → @tiptap_extension-horizontal-rule@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4}/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +2 -2
  58. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-horizontal-rule@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4 → @tiptap_extension-horizontal-rule@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4}/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +1 -1
  59. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-image@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-image@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-image/dist/index.js +2 -2
  60. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_extension-image@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_/node_modules/@tiptap/extension-image/dist/index.js.map +1 -0
  61. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-italic@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-italic@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-italic/dist/index.js +1 -1
  62. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-italic@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-italic@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-italic/dist/index.js.map +1 -1
  63. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-link@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4 → @tiptap_extension-link@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4}/node_modules/@tiptap/extension-link/dist/index.js +1 -1
  64. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-link@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4 → @tiptap_extension-link@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4}/node_modules/@tiptap/extension-link/dist/index.js.map +1 -1
  65. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-list@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4 → @tiptap_extension-list@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4}/node_modules/@tiptap/extension-list/dist/index.js +6 -6
  66. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-list@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4 → @tiptap_extension-list@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4}/node_modules/@tiptap/extension-list/dist/index.js.map +1 -1
  67. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-paragraph@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-paragraph@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-paragraph/dist/index.js +2 -2
  68. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_extension-paragraph@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_/node_modules/@tiptap/extension-paragraph/dist/index.js.map +1 -0
  69. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-placeholder@3.20.4_@tiptap_extensions@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4_ → @tiptap_extension-placeholder@3.20.4_@tiptap_extensions@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-placeholder/dist/index.js +1 -1
  70. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-placeholder@3.20.4_@tiptap_extensions@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4_ → @tiptap_extension-placeholder@3.20.4_@tiptap_extensions@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-placeholder/dist/index.js.map +1 -1
  71. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-strike@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-strike@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-strike/dist/index.js +1 -1
  72. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-strike@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-strike@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-strike/dist/index.js.map +1 -1
  73. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-table-cell@3.20.4_@tiptap_extension-table@3.20.4_@tiptap_core@3.20.4__e5a3c3ff8b554aab527bcd6db879f930 → @tiptap_extension-table-cell@3.20.4_@tiptap_extension-table@3.20.4_@tiptap_core@3.34.0__9df690ad40c269aaedbdba7ccdf2b3c5}/node_modules/@tiptap/extension-table-cell/dist/index.js +1 -1
  74. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-table-cell@3.20.4_@tiptap_extension-table@3.20.4_@tiptap_core@3.20.4__e5a3c3ff8b554aab527bcd6db879f930 → @tiptap_extension-table-cell@3.20.4_@tiptap_extension-table@3.20.4_@tiptap_core@3.34.0__9df690ad40c269aaedbdba7ccdf2b3c5}/node_modules/@tiptap/extension-table-cell/dist/index.js.map +1 -1
  75. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-table-header@3.20.4_@tiptap_extension-table@3.20.4_@tiptap_core@3.20._c6a57e4e630f72502685143ac4e5ec96 → @tiptap_extension-table-header@3.20.4_@tiptap_extension-table@3.20.4_@tiptap_core@3.34._e738836bb39716a2c7e36c23583c8027}/node_modules/@tiptap/extension-table-header/dist/index.js +1 -1
  76. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-table-header@3.20.4_@tiptap_extension-table@3.20.4_@tiptap_core@3.20._c6a57e4e630f72502685143ac4e5ec96 → @tiptap_extension-table-header@3.20.4_@tiptap_extension-table@3.20.4_@tiptap_core@3.34._e738836bb39716a2c7e36c23583c8027}/node_modules/@tiptap/extension-table-header/dist/index.js.map +1 -1
  77. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-table-row@3.20.4_@tiptap_extension-table@3.20.4_@tiptap_core@3.20.4_@_65ee6090c5cc8114f0f28fc8fa71a1d1 → @tiptap_extension-table-row@3.20.4_@tiptap_extension-table@3.20.4_@tiptap_core@3.34.0_@_5ee469de7f353d0b0b7ac18cdf819cfe}/node_modules/@tiptap/extension-table-row/dist/index.js +1 -1
  78. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-table-row@3.20.4_@tiptap_extension-table@3.20.4_@tiptap_core@3.20.4_@_65ee6090c5cc8114f0f28fc8fa71a1d1 → @tiptap_extension-table-row@3.20.4_@tiptap_extension-table@3.20.4_@tiptap_core@3.34.0_@_5ee469de7f353d0b0b7ac18cdf819cfe}/node_modules/@tiptap/extension-table-row/dist/index.js.map +1 -1
  79. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-table@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4 → @tiptap_extension-table@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4}/node_modules/@tiptap/extension-table/dist/index.js +5 -5
  80. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-table@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4 → @tiptap_extension-table@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4}/node_modules/@tiptap/extension-table/dist/index.js.map +1 -1
  81. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-text-align@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-text-align@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-text-align/dist/index.js +1 -1
  82. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-text-align@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-text-align@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-text-align/dist/index.js.map +1 -1
  83. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-text-style@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-text-style@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-text-style/dist/index.js +1 -1
  84. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-text-style@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-text-style@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-text-style/dist/index.js.map +1 -1
  85. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-text@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-text@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-text/dist/index.js +2 -2
  86. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-text@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-text@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-text/dist/index.js.map +1 -1
  87. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-underline@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-underline@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-underline/dist/index.js +1 -1
  88. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extension-underline@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_ → @tiptap_extension-underline@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4_}/node_modules/@tiptap/extension-underline/dist/index.js.map +1 -1
  89. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extensions@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4 → @tiptap_extensions@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4}/node_modules/@tiptap/extensions/dist/index.js +1 -1
  90. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_extensions@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4 → @tiptap_extensions@3.20.4_@tiptap_core@3.34.0_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4}/node_modules/@tiptap/extensions/dist/index.js.map +1 -1
  91. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_react@3.14.0_@floating-ui_dom@1.7.6_@tiptap_core@3.20.4_@tiptap_pm@3.20.4__@tip_17d91a0ec98b7b4802004f8a5d3f7d72 → @tiptap_react@3.14.0_@floating-ui_dom@1.7.6_@tiptap_core@3.34.0_@tiptap_pm@3.20.4__@tip_3f15bb542eb86077efc89f6845872e48}/node_modules/@tiptap/react/dist/index.js +2 -2
  92. package/dist/web-containers/source/node_modules/.pnpm/{@tiptap_react@3.14.0_@floating-ui_dom@1.7.6_@tiptap_core@3.20.4_@tiptap_pm@3.20.4__@tip_17d91a0ec98b7b4802004f8a5d3f7d72 → @tiptap_react@3.14.0_@floating-ui_dom@1.7.6_@tiptap_core@3.34.0_@tiptap_pm@3.20.4__@tip_3f15bb542eb86077efc89f6845872e48}/node_modules/@tiptap/react/dist/index.js.map +1 -1
  93. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_starter-kit@3.14.0/node_modules/@tiptap/starter-kit/dist/index.js +17 -17
  94. package/dist/web-containers/source/node_modules/.pnpm/css-mediaquery@0.1.2/node_modules/css-mediaquery/index.js +1 -1
  95. package/dist/web-containers/source/node_modules/.pnpm/dompurify@3.4.18/node_modules/dompurify/dist/purify.es.js +2401 -0
  96. package/dist/web-containers/source/node_modules/.pnpm/dompurify@3.4.18/node_modules/dompurify/dist/purify.es.js.map +1 -0
  97. package/dist/web-containers/source/node_modules/.pnpm/matchmediaquery@0.4.2/node_modules/matchmediaquery/index.js +1 -1
  98. package/dist/web-containers/source/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
  99. package/dist/web-containers/source/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.js +2 -2
  100. package/dist/web-containers/source/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.js +9 -1
  101. package/dist/web-containers/source/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.js.map +1 -1
  102. package/dist/web-containers/source/node_modules/.pnpm/prosemirror-schema-list@1.5.1/node_modules/prosemirror-schema-list/dist/index.js +1 -1
  103. package/dist/web-containers/source/rich-text-editor.js +13 -13
  104. package/dist/web-containers/source/rich-text-editor.js.map +1 -1
  105. package/dist/web-containers/source/sanitize-html.js +2 -2
  106. package/dist/web-containers/source/sanitize-html.js.map +1 -1
  107. package/dist/web-containers/source/skills-tab/index.js +1 -1
  108. package/dist/web-containers/source/summernote-text-editor.js +2 -2
  109. package/dist/web-containers/source/summernote-text-editor.js.map +1 -1
  110. package/dist/web-containers/source/tabs/human-support-tab/use-support-tickets-with-pagination.js +1 -1
  111. package/dist/web-containers/source/tabs/skills-tab/index.js +1 -1
  112. package/dist/web-containers/source/tabs/tasks-tab/tasks-tab-content.js +1 -1
  113. package/dist/web-containers/source/tabs/tasks-tab/tasks-tab-toolbar.js +1 -1
  114. package/dist/web-containers/source/tabs/tasks-tab.js +1 -1
  115. package/dist/web-containers/source/tasks-tab/tasks-tab-content.js +1 -1
  116. package/dist/web-containers/source/tasks-tab/tasks-tab-toolbar.js +1 -1
  117. package/dist/web-containers/source/tasks-tab-content.js +1 -1
  118. package/dist/web-containers/source/tasks-tab-toolbar.js +1 -1
  119. package/dist/web-containers/source/tasks-tab.js +1 -1
  120. package/dist/web-containers/source/tiptap-math-extension.js +3 -3
  121. package/dist/web-containers/source/tiptap-math-extension.js.map +1 -1
  122. package/dist/web-containers/source/tsconfig.build.tsbuildinfo +1 -1
  123. package/dist/web-containers/source/use-support-tickets-with-pagination.js +1 -1
  124. package/dist/web-containers/source/user-profile-modal.js +1 -1
  125. package/dist/web-containers/source/web-containers/tsconfig.build.tsbuildinfo +1 -1
  126. package/package.json +4 -4
  127. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_core@3.20.4_@tiptap_pm@3.20.4/node_modules/@tiptap/core/dist/index.js +0 -6130
  128. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_core@3.20.4_@tiptap_pm@3.20.4/node_modules/@tiptap/core/dist/index.js.map +0 -1
  129. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_core@3.20.4_@tiptap_pm@3.20.4/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +0 -17
  130. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_core@3.20.4_@tiptap_pm@3.20.4/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +0 -1
  131. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_extension-blockquote@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_/node_modules/@tiptap/extension-blockquote/dist/index.js.map +0 -1
  132. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_extension-code-block@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4__@tiptap_pm@3.20.4/node_modules/@tiptap/extension-code-block/dist/index.js.map +0 -1
  133. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_extension-heading@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_/node_modules/@tiptap/extension-heading/dist/index.js.map +0 -1
  134. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_extension-image@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_/node_modules/@tiptap/extension-image/dist/index.js.map +0 -1
  135. package/dist/web-containers/source/node_modules/.pnpm/@tiptap_extension-paragraph@3.20.4_@tiptap_core@3.20.4_@tiptap_pm@3.20.4_/node_modules/@tiptap/extension-paragraph/dist/index.js.map +0 -1
  136. package/dist/web-containers/source/node_modules/.pnpm/dompurify@3.4.11/node_modules/dompurify/dist/purify.es.js +0 -2249
  137. package/dist/web-containers/source/node_modules/.pnpm/dompurify@3.4.11/node_modules/dompurify/dist/purify.es.js.map +0 -1
@@ -0,0 +1,2401 @@
1
+ /*! @license DOMPurify 3.4.18 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.18/LICENSE */
2
+ function _arrayLikeToArray(r, a) {
3
+ (null == a || a > r.length) && (a = r.length);
4
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
5
+ return n;
6
+ }
7
+ function _arrayWithHoles(r) {
8
+ if (Array.isArray(r)) return r;
9
+ }
10
+ function _iterableToArrayLimit(r, l) {
11
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
12
+ if (null != t) {
13
+ var e, n, i, u, a = [], f = true, o = false;
14
+ try {
15
+ if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
16
+ } catch (r) {
17
+ o = true, n = r;
18
+ } finally {
19
+ try {
20
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
21
+ } finally {
22
+ if (o) throw n;
23
+ }
24
+ }
25
+ return a;
26
+ }
27
+ }
28
+ function _nonIterableRest() {
29
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
30
+ }
31
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
32
+ function _slicedToArray(r, e) {
33
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
34
+ }
35
+ function _unsupportedIterableToArray(r, a) {
36
+ if (r) {
37
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
38
+ var t = {}.toString.call(r).slice(8, -1);
39
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
40
+ }
41
+ }
42
+ const entries = Object.entries;
43
+ const objectKeys = Object.keys;
44
+ const setPrototypeOf = Object.setPrototypeOf;
45
+ const isFrozen = Object.isFrozen;
46
+ const getPrototypeOf = Object.getPrototypeOf;
47
+ const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
48
+ let freeze = Object.freeze;
49
+ let seal = Object.seal;
50
+ let create = Object.create;
51
+ let _ref = typeof Reflect !== "undefined" && Reflect;
52
+ let apply = _ref.apply;
53
+ let construct = _ref.construct;
54
+ if (!freeze) freeze = function freeze(x) {
55
+ return x;
56
+ };
57
+ if (!seal) seal = function seal(x) {
58
+ return x;
59
+ };
60
+ if (!apply) apply = function apply(func, thisArg) {
61
+ for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];
62
+ return func.apply(thisArg, args);
63
+ };
64
+ if (!construct) construct = function construct(Func) {
65
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];
66
+ return new Func(...args);
67
+ };
68
+ const arrayForEach = unapply(Array.prototype.forEach);
69
+ const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
70
+ const arrayPop = unapply(Array.prototype.pop);
71
+ const arrayPush = unapply(Array.prototype.push);
72
+ const arraySlice = unapply(Array.prototype.slice);
73
+ const arraySplice = unapply(Array.prototype.splice);
74
+ const arrayIsArray = Array.isArray;
75
+ const setCreate = unconstruct(Set);
76
+ const setAdd = unapply(Set.prototype.add);
77
+ const setHas = unapply(Set.prototype.has);
78
+ const stringToLowerCase = unapply(String.prototype.toLowerCase);
79
+ const stringToString = unapply(String.prototype.toString);
80
+ const stringMatch = unapply(String.prototype.match);
81
+ const stringReplace = unapply(String.prototype.replace);
82
+ const stringIndexOf = unapply(String.prototype.indexOf);
83
+ const stringTrim = unapply(String.prototype.trim);
84
+ const numberToString = unapply(Number.prototype.toString);
85
+ const booleanToString = unapply(Boolean.prototype.toString);
86
+ const bigintToString = typeof BigInt === "undefined" ? null : unapply(BigInt.prototype.toString);
87
+ const symbolToString = typeof Symbol === "undefined" ? null : unapply(Symbol.prototype.toString);
88
+ const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
89
+ const objectToString = unapply(Object.prototype.toString);
90
+ const regExpTestRaw = RegExp.prototype.test;
91
+ const regExpTest = function regExpTest(regExp, value) {
92
+ if (regExp instanceof RegExp) regExp.lastIndex = 0;
93
+ return apply(regExpTestRaw, regExp, [value]);
94
+ };
95
+ const typeErrorCreate = unconstruct(TypeError);
96
+ /**
97
+ * Creates a new function that calls the given function with a specified thisArg and arguments.
98
+ *
99
+ * @param func - The function to be wrapped and called.
100
+ * @returns A new function that calls the given function with a specified thisArg and arguments.
101
+ */
102
+ function unapply(func) {
103
+ return function(thisArg) {
104
+ for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) args[_key3 - 1] = arguments[_key3];
105
+ return apply(func, thisArg, args);
106
+ };
107
+ }
108
+ /**
109
+ * Creates a new function that constructs an instance of the given constructor function with the provided arguments.
110
+ *
111
+ * @param func - The constructor function to be wrapped and called.
112
+ * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
113
+ */
114
+ function unconstruct(Func) {
115
+ return function() {
116
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) args[_key4] = arguments[_key4];
117
+ return construct(Func, args);
118
+ };
119
+ }
120
+ /**
121
+ * Add properties to a lookup table
122
+ *
123
+ * @param set - The set to which elements will be added.
124
+ * @param array - The array containing elements to be added to the set.
125
+ * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
126
+ * @returns The modified set with added elements.
127
+ */
128
+ function addToSet(set, array) {
129
+ let transformCaseFunc = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : stringToLowerCase;
130
+ if (setPrototypeOf) setPrototypeOf(set, null);
131
+ if (!arrayIsArray(array)) return set;
132
+ let l = array.length;
133
+ while (l--) {
134
+ let element = array[l];
135
+ if (typeof element === "string") {
136
+ const lcElement = transformCaseFunc(element);
137
+ if (lcElement !== element) {
138
+ if (!isFrozen(array)) array[l] = lcElement;
139
+ element = lcElement;
140
+ }
141
+ }
142
+ set[element] = true;
143
+ }
144
+ return set;
145
+ }
146
+ /**
147
+ * Clean up an array to harden against CSPP
148
+ *
149
+ * @param array - The array to be cleaned.
150
+ * @returns The cleaned version of the array
151
+ */
152
+ function cleanArray(array) {
153
+ for (let index = 0; index < array.length; index++) if (!objectHasOwnProperty(array, index)) array[index] = null;
154
+ return array;
155
+ }
156
+ /**
157
+ * Shallow clone an object
158
+ *
159
+ * @param object - The object to be cloned.
160
+ * @returns A new object that copies the original.
161
+ */
162
+ function clone(object) {
163
+ const newObject = create(null);
164
+ for (const _ref2 of entries(object)) {
165
+ var _ref3 = _slicedToArray(_ref2, 2);
166
+ const property = _ref3[0];
167
+ const value = _ref3[1];
168
+ if (objectHasOwnProperty(object, property)) {
169
+ if (arrayIsArray(value)) newObject[property] = cleanArray(value);
170
+ else if (value && typeof value === "object" && value.constructor === Object) newObject[property] = clone(value);
171
+ else newObject[property] = value;
172
+ }
173
+ }
174
+ return newObject;
175
+ }
176
+ /**
177
+ * Copy a flat lookup table
178
+ *
179
+ * @param set - The set to copy.
180
+ * @returns A new prototype-free set with the same entries.
181
+ */
182
+ function cloneSet(set) {
183
+ const newSet = create(null);
184
+ const keys = objectKeys(set);
185
+ let l = keys.length;
186
+ while (l--) newSet[keys[l]] = set[keys[l]];
187
+ return newSet;
188
+ }
189
+ /**
190
+ * Convert non-node values into strings without depending on direct property access.
191
+ *
192
+ * @param value - The value to stringify.
193
+ * @returns A string representation of the provided value.
194
+ */
195
+ function stringifyValue(value) {
196
+ switch (typeof value) {
197
+ case "string": return value;
198
+ case "number": return numberToString(value);
199
+ case "boolean": return booleanToString(value);
200
+ case "bigint": return bigintToString ? bigintToString(value) : "0";
201
+ case "symbol": return symbolToString ? symbolToString(value) : "Symbol()";
202
+ case "undefined": return objectToString(value);
203
+ case "function":
204
+ case "object": {
205
+ if (value === null) return objectToString(value);
206
+ const valueAsRecord = value;
207
+ const valueToString = lookupGetter(valueAsRecord, "toString");
208
+ if (typeof valueToString === "function") {
209
+ const stringified = valueToString(valueAsRecord);
210
+ return typeof stringified === "string" ? stringified : objectToString(stringified);
211
+ }
212
+ return objectToString(value);
213
+ }
214
+ default: return objectToString(value);
215
+ }
216
+ }
217
+ /**
218
+ * This method automatically checks if the prop is function or getter and behaves accordingly.
219
+ *
220
+ * @param object - The object to look up the getter function in its prototype chain.
221
+ * @param prop - The property name for which to find the getter function.
222
+ * @returns The getter function found in the prototype chain or a fallback function.
223
+ */
224
+ function lookupGetter(object, prop) {
225
+ while (object !== null) {
226
+ const desc = getOwnPropertyDescriptor(object, prop);
227
+ if (desc) {
228
+ if (desc.get) return unapply(desc.get);
229
+ if (typeof desc.value === "function") return unapply(desc.value);
230
+ }
231
+ object = getPrototypeOf(object);
232
+ }
233
+ function fallbackValue() {
234
+ return null;
235
+ }
236
+ return fallbackValue;
237
+ }
238
+ /**
239
+ * Like lookupGetter, but for accessor properties only, and returns null
240
+ * instead of a null-returning fallback when no getter exists on the chain.
241
+ * Lets a caller fall back to a direct property read in environments that
242
+ * lack the getter, where a fallback returning null would be indistinguishable
243
+ * from a legitimate null value (e.g. namespaceURI of a no-namespace element).
244
+ *
245
+ * @param object - The object (usually a prototype) to start the lookup at.
246
+ * @param prop - The accessor property name.
247
+ * @returns The unapplied getter, or null if none was found.
248
+ */
249
+ function lookupAccessor(object, prop) {
250
+ while (object !== null) {
251
+ const desc = getOwnPropertyDescriptor(object, prop);
252
+ if (desc) return desc.get ? unapply(desc.get) : null;
253
+ object = getPrototypeOf(object);
254
+ }
255
+ return null;
256
+ }
257
+ function isRegex(value) {
258
+ if (!value) return false;
259
+ try {
260
+ regExpTest(value, "");
261
+ return true;
262
+ } catch (_unused) {
263
+ return false;
264
+ }
265
+ }
266
+ const html$1 = freeze([
267
+ "a",
268
+ "abbr",
269
+ "acronym",
270
+ "address",
271
+ "area",
272
+ "article",
273
+ "aside",
274
+ "audio",
275
+ "b",
276
+ "bdi",
277
+ "bdo",
278
+ "big",
279
+ "blink",
280
+ "blockquote",
281
+ "body",
282
+ "br",
283
+ "button",
284
+ "canvas",
285
+ "caption",
286
+ "center",
287
+ "cite",
288
+ "code",
289
+ "col",
290
+ "colgroup",
291
+ "content",
292
+ "data",
293
+ "datalist",
294
+ "dd",
295
+ "decorator",
296
+ "del",
297
+ "details",
298
+ "dfn",
299
+ "dialog",
300
+ "dir",
301
+ "div",
302
+ "dl",
303
+ "dt",
304
+ "element",
305
+ "em",
306
+ "fieldset",
307
+ "figcaption",
308
+ "figure",
309
+ "font",
310
+ "footer",
311
+ "form",
312
+ "h1",
313
+ "h2",
314
+ "h3",
315
+ "h4",
316
+ "h5",
317
+ "h6",
318
+ "head",
319
+ "header",
320
+ "hgroup",
321
+ "hr",
322
+ "html",
323
+ "i",
324
+ "img",
325
+ "input",
326
+ "ins",
327
+ "kbd",
328
+ "label",
329
+ "legend",
330
+ "li",
331
+ "main",
332
+ "map",
333
+ "mark",
334
+ "marquee",
335
+ "menu",
336
+ "menuitem",
337
+ "meter",
338
+ "nav",
339
+ "nobr",
340
+ "ol",
341
+ "optgroup",
342
+ "option",
343
+ "output",
344
+ "p",
345
+ "picture",
346
+ "pre",
347
+ "progress",
348
+ "q",
349
+ "rp",
350
+ "rt",
351
+ "ruby",
352
+ "s",
353
+ "samp",
354
+ "search",
355
+ "section",
356
+ "select",
357
+ "shadow",
358
+ "slot",
359
+ "small",
360
+ "source",
361
+ "spacer",
362
+ "span",
363
+ "strike",
364
+ "strong",
365
+ "style",
366
+ "sub",
367
+ "summary",
368
+ "sup",
369
+ "table",
370
+ "tbody",
371
+ "td",
372
+ "template",
373
+ "textarea",
374
+ "tfoot",
375
+ "th",
376
+ "thead",
377
+ "time",
378
+ "tr",
379
+ "track",
380
+ "tt",
381
+ "u",
382
+ "ul",
383
+ "var",
384
+ "video",
385
+ "wbr"
386
+ ]);
387
+ const svg$1 = freeze([
388
+ "svg",
389
+ "a",
390
+ "altglyph",
391
+ "altglyphdef",
392
+ "altglyphitem",
393
+ "animatecolor",
394
+ "animatemotion",
395
+ "animatetransform",
396
+ "circle",
397
+ "clippath",
398
+ "defs",
399
+ "desc",
400
+ "ellipse",
401
+ "filter",
402
+ "font",
403
+ "g",
404
+ "glyph",
405
+ "glyphref",
406
+ "hkern",
407
+ "image",
408
+ "line",
409
+ "lineargradient",
410
+ "marker",
411
+ "mask",
412
+ "metadata",
413
+ "mpath",
414
+ "path",
415
+ "pattern",
416
+ "polygon",
417
+ "polyline",
418
+ "radialgradient",
419
+ "rect",
420
+ "stop",
421
+ "style",
422
+ "switch",
423
+ "symbol",
424
+ "text",
425
+ "textpath",
426
+ "title",
427
+ "tref",
428
+ "tspan",
429
+ "view",
430
+ "vkern"
431
+ ]);
432
+ const svgFilters = freeze([
433
+ "feBlend",
434
+ "feColorMatrix",
435
+ "feComponentTransfer",
436
+ "feComposite",
437
+ "feConvolveMatrix",
438
+ "feDiffuseLighting",
439
+ "feDisplacementMap",
440
+ "feDistantLight",
441
+ "feDropShadow",
442
+ "feFlood",
443
+ "feFuncA",
444
+ "feFuncB",
445
+ "feFuncG",
446
+ "feFuncR",
447
+ "feGaussianBlur",
448
+ "feImage",
449
+ "feMerge",
450
+ "feMergeNode",
451
+ "feMorphology",
452
+ "feOffset",
453
+ "fePointLight",
454
+ "feSpecularLighting",
455
+ "feSpotLight",
456
+ "feTile",
457
+ "feTurbulence"
458
+ ]);
459
+ const svgDisallowed = freeze([
460
+ "animate",
461
+ "color-profile",
462
+ "cursor",
463
+ "discard",
464
+ "font-face",
465
+ "font-face-format",
466
+ "font-face-name",
467
+ "font-face-src",
468
+ "font-face-uri",
469
+ "foreignobject",
470
+ "hatch",
471
+ "hatchpath",
472
+ "mesh",
473
+ "meshgradient",
474
+ "meshpatch",
475
+ "meshrow",
476
+ "missing-glyph",
477
+ "script",
478
+ "set",
479
+ "solidcolor",
480
+ "unknown",
481
+ "use"
482
+ ]);
483
+ const mathMl$1 = freeze([
484
+ "math",
485
+ "menclose",
486
+ "merror",
487
+ "mfenced",
488
+ "mfrac",
489
+ "mglyph",
490
+ "mi",
491
+ "mlabeledtr",
492
+ "mmultiscripts",
493
+ "mn",
494
+ "mo",
495
+ "mover",
496
+ "mpadded",
497
+ "mphantom",
498
+ "mroot",
499
+ "mrow",
500
+ "ms",
501
+ "mspace",
502
+ "msqrt",
503
+ "mstyle",
504
+ "msub",
505
+ "msup",
506
+ "msubsup",
507
+ "mtable",
508
+ "mtd",
509
+ "mtext",
510
+ "mtr",
511
+ "munder",
512
+ "munderover",
513
+ "mprescripts"
514
+ ]);
515
+ const mathMlDisallowed = freeze([
516
+ "maction",
517
+ "maligngroup",
518
+ "malignmark",
519
+ "mlongdiv",
520
+ "mscarries",
521
+ "mscarry",
522
+ "msgroup",
523
+ "mstack",
524
+ "msline",
525
+ "msrow",
526
+ "semantics",
527
+ "annotation",
528
+ "annotation-xml",
529
+ "mprescripts",
530
+ "none"
531
+ ]);
532
+ const text = freeze(["#text"]);
533
+ const html = freeze([
534
+ "accept",
535
+ "action",
536
+ "align",
537
+ "alt",
538
+ "autocapitalize",
539
+ "autocomplete",
540
+ "autopictureinpicture",
541
+ "autoplay",
542
+ "background",
543
+ "bgcolor",
544
+ "border",
545
+ "capture",
546
+ "cellpadding",
547
+ "cellspacing",
548
+ "checked",
549
+ "cite",
550
+ "class",
551
+ "clear",
552
+ "color",
553
+ "cols",
554
+ "colspan",
555
+ "command",
556
+ "commandfor",
557
+ "controls",
558
+ "controlslist",
559
+ "coords",
560
+ "crossorigin",
561
+ "datetime",
562
+ "decoding",
563
+ "default",
564
+ "dir",
565
+ "disabled",
566
+ "disablepictureinpicture",
567
+ "disableremoteplayback",
568
+ "download",
569
+ "draggable",
570
+ "enctype",
571
+ "enterkeyhint",
572
+ "exportparts",
573
+ "face",
574
+ "for",
575
+ "headers",
576
+ "height",
577
+ "hidden",
578
+ "high",
579
+ "href",
580
+ "hreflang",
581
+ "id",
582
+ "inert",
583
+ "inputmode",
584
+ "integrity",
585
+ "ismap",
586
+ "kind",
587
+ "label",
588
+ "lang",
589
+ "list",
590
+ "loading",
591
+ "loop",
592
+ "low",
593
+ "max",
594
+ "maxlength",
595
+ "media",
596
+ "method",
597
+ "min",
598
+ "minlength",
599
+ "multiple",
600
+ "muted",
601
+ "name",
602
+ "nonce",
603
+ "noshade",
604
+ "novalidate",
605
+ "nowrap",
606
+ "open",
607
+ "optimum",
608
+ "part",
609
+ "pattern",
610
+ "placeholder",
611
+ "playsinline",
612
+ "popover",
613
+ "popovertarget",
614
+ "popovertargetaction",
615
+ "poster",
616
+ "preload",
617
+ "pubdate",
618
+ "radiogroup",
619
+ "readonly",
620
+ "rel",
621
+ "required",
622
+ "rev",
623
+ "reversed",
624
+ "role",
625
+ "rows",
626
+ "rowspan",
627
+ "spellcheck",
628
+ "scope",
629
+ "selected",
630
+ "shape",
631
+ "size",
632
+ "sizes",
633
+ "slot",
634
+ "span",
635
+ "srclang",
636
+ "start",
637
+ "src",
638
+ "srcset",
639
+ "step",
640
+ "style",
641
+ "summary",
642
+ "tabindex",
643
+ "title",
644
+ "translate",
645
+ "type",
646
+ "usemap",
647
+ "valign",
648
+ "value",
649
+ "width",
650
+ "wrap",
651
+ "xmlns"
652
+ ]);
653
+ const svg = freeze([
654
+ "accent-height",
655
+ "accumulate",
656
+ "additive",
657
+ "alignment-baseline",
658
+ "amplitude",
659
+ "ascent",
660
+ "attributename",
661
+ "attributetype",
662
+ "azimuth",
663
+ "basefrequency",
664
+ "baseline-shift",
665
+ "begin",
666
+ "bias",
667
+ "by",
668
+ "class",
669
+ "clip",
670
+ "clippathunits",
671
+ "clip-path",
672
+ "clip-rule",
673
+ "color",
674
+ "color-interpolation",
675
+ "color-interpolation-filters",
676
+ "color-profile",
677
+ "color-rendering",
678
+ "cx",
679
+ "cy",
680
+ "d",
681
+ "dx",
682
+ "dy",
683
+ "diffuseconstant",
684
+ "direction",
685
+ "display",
686
+ "divisor",
687
+ "dominant-baseline",
688
+ "dur",
689
+ "edgemode",
690
+ "elevation",
691
+ "end",
692
+ "exponent",
693
+ "fill",
694
+ "fill-opacity",
695
+ "fill-rule",
696
+ "filter",
697
+ "filterunits",
698
+ "flood-color",
699
+ "flood-opacity",
700
+ "font-family",
701
+ "font-size",
702
+ "font-size-adjust",
703
+ "font-stretch",
704
+ "font-style",
705
+ "font-variant",
706
+ "font-weight",
707
+ "fx",
708
+ "fy",
709
+ "g1",
710
+ "g2",
711
+ "glyph-name",
712
+ "glyphref",
713
+ "gradientunits",
714
+ "gradienttransform",
715
+ "height",
716
+ "href",
717
+ "id",
718
+ "image-rendering",
719
+ "in",
720
+ "in2",
721
+ "intercept",
722
+ "k",
723
+ "k1",
724
+ "k2",
725
+ "k3",
726
+ "k4",
727
+ "kerning",
728
+ "keypoints",
729
+ "keysplines",
730
+ "keytimes",
731
+ "lang",
732
+ "lengthadjust",
733
+ "letter-spacing",
734
+ "kernelmatrix",
735
+ "kernelunitlength",
736
+ "lighting-color",
737
+ "local",
738
+ "marker-end",
739
+ "marker-mid",
740
+ "marker-start",
741
+ "markerheight",
742
+ "markerunits",
743
+ "markerwidth",
744
+ "maskcontentunits",
745
+ "maskunits",
746
+ "max",
747
+ "mask",
748
+ "mask-type",
749
+ "media",
750
+ "method",
751
+ "mode",
752
+ "min",
753
+ "name",
754
+ "numoctaves",
755
+ "offset",
756
+ "operator",
757
+ "opacity",
758
+ "order",
759
+ "orient",
760
+ "orientation",
761
+ "origin",
762
+ "overflow",
763
+ "paint-order",
764
+ "path",
765
+ "pathlength",
766
+ "patterncontentunits",
767
+ "patterntransform",
768
+ "patternunits",
769
+ "pointer-events",
770
+ "points",
771
+ "preservealpha",
772
+ "preserveaspectratio",
773
+ "primitiveunits",
774
+ "r",
775
+ "rx",
776
+ "ry",
777
+ "radius",
778
+ "refx",
779
+ "refy",
780
+ "repeatcount",
781
+ "repeatdur",
782
+ "restart",
783
+ "result",
784
+ "rotate",
785
+ "scale",
786
+ "seed",
787
+ "shape-rendering",
788
+ "slope",
789
+ "specularconstant",
790
+ "specularexponent",
791
+ "spreadmethod",
792
+ "startoffset",
793
+ "stddeviation",
794
+ "stitchtiles",
795
+ "stop-color",
796
+ "stop-opacity",
797
+ "stroke-dasharray",
798
+ "stroke-dashoffset",
799
+ "stroke-linecap",
800
+ "stroke-linejoin",
801
+ "stroke-miterlimit",
802
+ "stroke-opacity",
803
+ "stroke",
804
+ "stroke-width",
805
+ "style",
806
+ "surfacescale",
807
+ "systemlanguage",
808
+ "tabindex",
809
+ "tablevalues",
810
+ "targetx",
811
+ "targety",
812
+ "transform",
813
+ "transform-origin",
814
+ "text-anchor",
815
+ "text-decoration",
816
+ "text-orientation",
817
+ "text-rendering",
818
+ "textlength",
819
+ "type",
820
+ "u1",
821
+ "u2",
822
+ "unicode",
823
+ "values",
824
+ "vector-effect",
825
+ "viewbox",
826
+ "visibility",
827
+ "version",
828
+ "vert-adv-y",
829
+ "vert-origin-x",
830
+ "vert-origin-y",
831
+ "width",
832
+ "word-spacing",
833
+ "wrap",
834
+ "writing-mode",
835
+ "xchannelselector",
836
+ "ychannelselector",
837
+ "x",
838
+ "x1",
839
+ "x2",
840
+ "xmlns",
841
+ "y",
842
+ "y1",
843
+ "y2",
844
+ "z",
845
+ "zoomandpan"
846
+ ]);
847
+ const mathMl = freeze([
848
+ "accent",
849
+ "accentunder",
850
+ "align",
851
+ "bevelled",
852
+ "close",
853
+ "columnalign",
854
+ "columnlines",
855
+ "columnspacing",
856
+ "columnspan",
857
+ "denomalign",
858
+ "depth",
859
+ "dir",
860
+ "display",
861
+ "displaystyle",
862
+ "encoding",
863
+ "fence",
864
+ "frame",
865
+ "height",
866
+ "href",
867
+ "id",
868
+ "largeop",
869
+ "length",
870
+ "linethickness",
871
+ "lquote",
872
+ "lspace",
873
+ "mathbackground",
874
+ "mathcolor",
875
+ "mathsize",
876
+ "mathvariant",
877
+ "maxsize",
878
+ "minsize",
879
+ "movablelimits",
880
+ "notation",
881
+ "numalign",
882
+ "open",
883
+ "rowalign",
884
+ "rowlines",
885
+ "rowspacing",
886
+ "rowspan",
887
+ "rspace",
888
+ "rquote",
889
+ "scriptlevel",
890
+ "scriptminsize",
891
+ "scriptsizemultiplier",
892
+ "selection",
893
+ "separator",
894
+ "separators",
895
+ "stretchy",
896
+ "subscriptshift",
897
+ "supscriptshift",
898
+ "symmetric",
899
+ "voffset",
900
+ "width",
901
+ "xmlns"
902
+ ]);
903
+ const xml = freeze([
904
+ "xlink:href",
905
+ "xml:id",
906
+ "xlink:title",
907
+ "xml:space",
908
+ "xmlns:xlink"
909
+ ]);
910
+ const MUSTACHE_EXPR = seal(/{{[\w\W]*|^[\w\W]*}}/g);
911
+ const ERB_EXPR = seal(/<%[\w\W]*|^[\w\W]*%>/g);
912
+ const TMPLIT_EXPR = seal(/\${[\w\W]*/g);
913
+ const TMPL_MARKER_SERIALIZED = seal(/{{|}}|\${|<%|%>|&lt;%|%&gt;/);
914
+ const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
915
+ const ARIA_ATTR = seal(/^aria-[\-\w]+$/);
916
+ const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i);
917
+ const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
918
+ const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);
919
+ const DOCTYPE_NAME = seal(/^html$/i);
920
+ const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
921
+ const ELEMENT_MARKUP_PROBE = seal(/<[/\w!]/g);
922
+ const COMMENT_MARKUP_PROBE = seal(/<[/\w]/g);
923
+ const FALLBACK_TAG_CLOSE = seal(/<\/no(script|embed|frames)/i);
924
+ const SELF_CLOSING_TAG = seal(/\/>/i);
925
+ const ATTR_VALUE_BREAKOUT = seal(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i);
926
+ const LEADING_WHITESPACE = seal(/^[\r\n\t ]+/);
927
+ const NODE_TYPE = {
928
+ element: 1,
929
+ text: 3,
930
+ processingInstruction: 7,
931
+ comment: 8,
932
+ document: 9,
933
+ documentFragment: 11
934
+ };
935
+ const LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, [
936
+ "style",
937
+ "script",
938
+ "xmp",
939
+ "iframe",
940
+ "noembed",
941
+ "noframes",
942
+ "plaintext",
943
+ "noscript"
944
+ ]));
945
+ const getGlobal = function getGlobal() {
946
+ return typeof window === "undefined" ? null : window;
947
+ };
948
+ /**
949
+ * Creates a no-op policy for internal use only.
950
+ * Don't export this function outside this module!
951
+ * @param trustedTypes The policy factory.
952
+ * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
953
+ * @return The policy created (or null, if Trusted Types
954
+ * are not supported or creating the policy failed).
955
+ */
956
+ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
957
+ if (typeof trustedTypes !== "object" || typeof trustedTypes.createPolicy !== "function") return null;
958
+ let suffix = null;
959
+ const ATTR_NAME = "data-tt-policy-suffix";
960
+ if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) suffix = purifyHostElement.getAttribute(ATTR_NAME);
961
+ const policyName = "dompurify" + (suffix ? "#" + suffix : "");
962
+ try {
963
+ return trustedTypes.createPolicy(policyName, {
964
+ createHTML(html) {
965
+ return html;
966
+ },
967
+ createScriptURL(scriptUrl) {
968
+ return scriptUrl;
969
+ }
970
+ });
971
+ } catch (_) {
972
+ console.warn("TrustedTypes policy " + policyName + " could not be created.");
973
+ return null;
974
+ }
975
+ };
976
+ const _createHooksMap = function _createHooksMap() {
977
+ return {
978
+ afterSanitizeAttributes: [],
979
+ afterSanitizeElements: [],
980
+ afterSanitizeShadowDOM: [],
981
+ beforeSanitizeAttributes: [],
982
+ beforeSanitizeElements: [],
983
+ beforeSanitizeShadowDOM: [],
984
+ uponSanitizeAttribute: [],
985
+ uponSanitizeElement: [],
986
+ uponSanitizeShadowNode: []
987
+ };
988
+ };
989
+ /**
990
+ * Resolve a set-valued configuration option.
991
+ *
992
+ * @param cfg the cloned, prototype-free configuration object
993
+ * @param key the configuration property to read
994
+ * @param fallback the set to use when the option is absent or not an array
995
+ * @param options case transform, and an optional base set to extend a copy of
996
+ * @returns a fresh set built from cfg[key], or the fallback
997
+ */
998
+ const _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options) {
999
+ return objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? cloneSet(options.base) : {}, cfg[key], options.transform) : fallback;
1000
+ };
1001
+ /**
1002
+ * Resolve an object-valued configuration option.
1003
+ *
1004
+ * @param cfg the cloned, prototype-free configuration object
1005
+ * @param key the configuration property to read
1006
+ * @param fallback the read-only value to use when the option is absent
1007
+ * @returns a prototype-free clone of cfg[key], or the fallback
1008
+ */
1009
+ const _resolveObjectOption = function _resolveObjectOption(cfg, key, fallback) {
1010
+ const value = objectHasOwnProperty(cfg, key) ? cfg[key] : void 0;
1011
+ return value && typeof value === "object" ? clone(value) : fallback;
1012
+ };
1013
+ function createDOMPurify() {
1014
+ let window = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
1015
+ const DOMPurify = (root) => createDOMPurify(root);
1016
+ DOMPurify.version = "3.4.18";
1017
+ DOMPurify.removed = [];
1018
+ if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
1019
+ DOMPurify.isSupported = false;
1020
+ return DOMPurify;
1021
+ }
1022
+ let document = window.document;
1023
+ const originalDocument = document;
1024
+ const currentScript = originalDocument.currentScript;
1025
+ const HTMLTemplateElement = window.HTMLTemplateElement, Node = window.Node, Element = window.Element, NodeFilter = window.NodeFilter, DOMParser = window.DOMParser, trustedTypes = window.trustedTypes;
1026
+ const ElementPrototype = Element.prototype;
1027
+ const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
1028
+ const remove = lookupGetter(ElementPrototype, "remove");
1029
+ const removeAttributeNode = lookupGetter(ElementPrototype, "removeAttributeNode");
1030
+ const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
1031
+ const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
1032
+ const getParentNode = lookupGetter(ElementPrototype, "parentNode");
1033
+ const getShadowRoot = lookupGetter(ElementPrototype, "shadowRoot");
1034
+ const getAttributes = lookupGetter(ElementPrototype, "attributes");
1035
+ const getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeType") : null;
1036
+ const getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeName") : null;
1037
+ const getOwnerDocument = Node && Node.prototype ? lookupGetter(Node.prototype, "ownerDocument") : null;
1038
+ const _readNodeType = function _readNodeType(node) {
1039
+ return getNodeType ? getNodeType(node) : node.nodeType;
1040
+ };
1041
+ const _readNodeName = function _readNodeName(node) {
1042
+ return getNodeName ? getNodeName(node) : node.nodeName;
1043
+ };
1044
+ const getNamespaceURI = lookupAccessor(ElementPrototype, "namespaceURI");
1045
+ const _readNamespaceURI = function _readNamespaceURI(element) {
1046
+ return getNamespaceURI ? getNamespaceURI(element) : element.namespaceURI;
1047
+ };
1048
+ if (typeof HTMLTemplateElement === "function") {
1049
+ const template = document.createElement("template");
1050
+ if (template.content && template.content.ownerDocument) document = template.content.ownerDocument;
1051
+ }
1052
+ let trustedTypesPolicy;
1053
+ let emptyHTML = "";
1054
+ let defaultTrustedTypesPolicy;
1055
+ let defaultTrustedTypesPolicyResolved = false;
1056
+ let IN_TRUSTED_TYPES_POLICY = 0;
1057
+ const _assertNotInTrustedTypesPolicy = function _assertNotInTrustedTypesPolicy() {
1058
+ if (IN_TRUSTED_TYPES_POLICY > 0) throw typeErrorCreate("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
1059
+ };
1060
+ const _createTrustedHTML = function _createTrustedHTML(html) {
1061
+ _assertNotInTrustedTypesPolicy();
1062
+ IN_TRUSTED_TYPES_POLICY++;
1063
+ try {
1064
+ return trustedTypesPolicy.createHTML(html);
1065
+ } finally {
1066
+ IN_TRUSTED_TYPES_POLICY--;
1067
+ }
1068
+ };
1069
+ const _signOutput = function _signOutput(html) {
1070
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(html) : html;
1071
+ };
1072
+ const _createTrustedScriptURL = function _createTrustedScriptURL(scriptUrl) {
1073
+ _assertNotInTrustedTypesPolicy();
1074
+ IN_TRUSTED_TYPES_POLICY++;
1075
+ try {
1076
+ return trustedTypesPolicy.createScriptURL(scriptUrl);
1077
+ } finally {
1078
+ IN_TRUSTED_TYPES_POLICY--;
1079
+ }
1080
+ };
1081
+ const _getDefaultTrustedTypesPolicy = function _getDefaultTrustedTypesPolicy() {
1082
+ if (!defaultTrustedTypesPolicyResolved) {
1083
+ defaultTrustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
1084
+ defaultTrustedTypesPolicyResolved = true;
1085
+ }
1086
+ return defaultTrustedTypesPolicy;
1087
+ };
1088
+ const _document = document, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;
1089
+ const importNode = originalDocument.importNode;
1090
+ let hooks = _createHooksMap();
1091
+ /**
1092
+ * Expose whether this browser supports running the full DOMPurify.
1093
+ */
1094
+ DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0;
1095
+ const MUSTACHE_EXPR$1 = MUSTACHE_EXPR, ERB_EXPR$1 = ERB_EXPR, TMPLIT_EXPR$1 = TMPLIT_EXPR, DATA_ATTR$1 = DATA_ATTR, ARIA_ATTR$1 = ARIA_ATTR, IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$1 = ATTR_WHITESPACE, CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;
1096
+ let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
1097
+ /**
1098
+ * We consider the elements and attributes below to be safe. Ideally
1099
+ * don't add any new ones but feel free to remove unwanted ones.
1100
+ */
1101
+ let ALLOWED_TAGS = null;
1102
+ const DEFAULT_ALLOWED_TAGS = addToSet({}, [
1103
+ ...html$1,
1104
+ ...svg$1,
1105
+ ...svgFilters,
1106
+ ...mathMl$1,
1107
+ ...text
1108
+ ]);
1109
+ let ALLOWED_ATTR = null;
1110
+ const DEFAULT_ALLOWED_ATTR = addToSet({}, [
1111
+ ...html,
1112
+ ...svg,
1113
+ ...mathMl,
1114
+ ...xml
1115
+ ]);
1116
+ let CUSTOM_ELEMENT_HANDLING = null;
1117
+ let FORBID_TAGS = null;
1118
+ let FORBID_ATTR = null;
1119
+ const EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {
1120
+ tagCheck: {
1121
+ writable: true,
1122
+ configurable: false,
1123
+ enumerable: true,
1124
+ value: null
1125
+ },
1126
+ attributeCheck: {
1127
+ writable: true,
1128
+ configurable: false,
1129
+ enumerable: true,
1130
+ value: null
1131
+ }
1132
+ }));
1133
+ let ALLOW_ARIA_ATTR = true;
1134
+ let ALLOW_DATA_ATTR = true;
1135
+ let ALLOW_UNKNOWN_PROTOCOLS = false;
1136
+ let ALLOW_SELF_CLOSE_IN_ATTR = true;
1137
+ let SAFE_FOR_TEMPLATES = false;
1138
+ let SAFE_FOR_XML = true;
1139
+ let WHOLE_DOCUMENT = false;
1140
+ let SET_CONFIG = false;
1141
+ let SET_CONFIG_ALLOWED_TAGS = null;
1142
+ let SET_CONFIG_ALLOWED_ATTR = null;
1143
+ let FORCE_BODY = false;
1144
+ let RETURN_DOM = false;
1145
+ let RETURN_DOM_FRAGMENT = false;
1146
+ let RETURN_TRUSTED_TYPE = false;
1147
+ let SANITIZE_DOM = true;
1148
+ let SANITIZE_NAMED_PROPS = false;
1149
+ const SANITIZE_NAMED_PROPS_PREFIX = "user-content-";
1150
+ let KEEP_CONTENT = true;
1151
+ let IN_PLACE = false;
1152
+ let IN_PLACE_VISITED = null;
1153
+ let USE_PROFILES = false;
1154
+ let FORBID_CONTENTS = null;
1155
+ const DEFAULT_FORBID_CONTENTS = addToSet({}, [
1156
+ "annotation-xml",
1157
+ "audio",
1158
+ "colgroup",
1159
+ "desc",
1160
+ "foreignobject",
1161
+ "head",
1162
+ "iframe",
1163
+ "math",
1164
+ "mi",
1165
+ "mn",
1166
+ "mo",
1167
+ "ms",
1168
+ "mtext",
1169
+ "noembed",
1170
+ "noframes",
1171
+ "noscript",
1172
+ "plaintext",
1173
+ "script",
1174
+ "selectedcontent",
1175
+ "style",
1176
+ "svg",
1177
+ "template",
1178
+ "thead",
1179
+ "title",
1180
+ "video",
1181
+ "xmp"
1182
+ ]);
1183
+ let DATA_URI_TAGS = null;
1184
+ const DEFAULT_DATA_URI_TAGS = addToSet({}, [
1185
+ "audio",
1186
+ "video",
1187
+ "img",
1188
+ "source",
1189
+ "image",
1190
+ "track"
1191
+ ]);
1192
+ let URI_SAFE_ATTRIBUTES = null;
1193
+ const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, [
1194
+ "alt",
1195
+ "class",
1196
+ "for",
1197
+ "id",
1198
+ "label",
1199
+ "name",
1200
+ "pattern",
1201
+ "placeholder",
1202
+ "role",
1203
+ "summary",
1204
+ "title",
1205
+ "value",
1206
+ "style",
1207
+ "xmlns"
1208
+ ]);
1209
+ const MATHML_NAMESPACE = "http://www.w3.org/1998/Math/MathML";
1210
+ const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
1211
+ const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
1212
+ let NAMESPACE = HTML_NAMESPACE;
1213
+ let IS_EMPTY_INPUT = false;
1214
+ let ALLOWED_NAMESPACES = null;
1215
+ const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [
1216
+ MATHML_NAMESPACE,
1217
+ SVG_NAMESPACE,
1218
+ HTML_NAMESPACE
1219
+ ], stringToString);
1220
+ const DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze(addToSet({}, [
1221
+ "mi",
1222
+ "mo",
1223
+ "mn",
1224
+ "ms",
1225
+ "mtext"
1226
+ ]));
1227
+ let MATHML_TEXT_INTEGRATION_POINTS = null;
1228
+ const DEFAULT_HTML_INTEGRATION_POINTS = freeze(addToSet({}, ["annotation-xml"]));
1229
+ let HTML_INTEGRATION_POINTS = null;
1230
+ const DEFAULT_CUSTOM_ELEMENT_HANDLING = freeze(create(null));
1231
+ const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, [
1232
+ "title",
1233
+ "style",
1234
+ "font",
1235
+ "a",
1236
+ "script"
1237
+ ]);
1238
+ let PARSER_MEDIA_TYPE = null;
1239
+ const SUPPORTED_PARSER_MEDIA_TYPES = ["application/xhtml+xml", "text/html"];
1240
+ const DEFAULT_PARSER_MEDIA_TYPE = "text/html";
1241
+ let transformCaseFunc = null;
1242
+ let CONFIG = null;
1243
+ const formElement = document.createElement("form");
1244
+ const isRegexOrFunction = function isRegexOrFunction(testValue) {
1245
+ return testValue instanceof RegExp || testValue instanceof Function;
1246
+ };
1247
+ /**
1248
+ * _parseConfig
1249
+ *
1250
+ * @param cfg optional config literal
1251
+ */
1252
+ const _parseConfig = function _parseConfig() {
1253
+ let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1254
+ if (!cfg || typeof cfg !== "object") cfg = {};
1255
+ cfg = clone(cfg);
1256
+ PARSER_MEDIA_TYPE = SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
1257
+ transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
1258
+ ALLOWED_TAGS = _resolveSetOption(cfg, "ALLOWED_TAGS", DEFAULT_ALLOWED_TAGS, { transform: transformCaseFunc });
1259
+ ALLOWED_ATTR = _resolveSetOption(cfg, "ALLOWED_ATTR", DEFAULT_ALLOWED_ATTR, { transform: transformCaseFunc });
1260
+ ALLOWED_NAMESPACES = _resolveSetOption(cfg, "ALLOWED_NAMESPACES", DEFAULT_ALLOWED_NAMESPACES, { transform: stringToString });
1261
+ URI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, "ADD_URI_SAFE_ATTR", DEFAULT_URI_SAFE_ATTRIBUTES, {
1262
+ transform: transformCaseFunc,
1263
+ base: DEFAULT_URI_SAFE_ATTRIBUTES
1264
+ });
1265
+ DATA_URI_TAGS = _resolveSetOption(cfg, "ADD_DATA_URI_TAGS", DEFAULT_DATA_URI_TAGS, {
1266
+ transform: transformCaseFunc,
1267
+ base: DEFAULT_DATA_URI_TAGS
1268
+ });
1269
+ FORBID_CONTENTS = _resolveSetOption(cfg, "FORBID_CONTENTS", DEFAULT_FORBID_CONTENTS, { transform: transformCaseFunc });
1270
+ FORBID_TAGS = _resolveSetOption(cfg, "FORBID_TAGS", create(null), { transform: transformCaseFunc });
1271
+ FORBID_ATTR = _resolveSetOption(cfg, "FORBID_ATTR", create(null), { transform: transformCaseFunc });
1272
+ USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === "object" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;
1273
+ ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
1274
+ ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
1275
+ ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
1276
+ ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false;
1277
+ SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false;
1278
+ SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false;
1279
+ WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false;
1280
+ RETURN_DOM = cfg.RETURN_DOM || false;
1281
+ RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false;
1282
+ RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false;
1283
+ FORCE_BODY = cfg.FORCE_BODY || false;
1284
+ SANITIZE_DOM = cfg.SANITIZE_DOM !== false;
1285
+ SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;
1286
+ KEEP_CONTENT = cfg.KEEP_CONTENT !== false;
1287
+ IN_PLACE = cfg.IN_PLACE || false;
1288
+ IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;
1289
+ NAMESPACE = typeof cfg.NAMESPACE === "string" ? cfg.NAMESPACE : HTML_NAMESPACE;
1290
+ MATHML_TEXT_INTEGRATION_POINTS = _resolveObjectOption(cfg, "MATHML_TEXT_INTEGRATION_POINTS", DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);
1291
+ HTML_INTEGRATION_POINTS = _resolveObjectOption(cfg, "HTML_INTEGRATION_POINTS", DEFAULT_HTML_INTEGRATION_POINTS);
1292
+ const customElementHandling = _resolveObjectOption(cfg, "CUSTOM_ELEMENT_HANDLING", DEFAULT_CUSTOM_ELEMENT_HANDLING);
1293
+ CUSTOM_ELEMENT_HANDLING = create(null);
1294
+ if (objectHasOwnProperty(customElementHandling, "tagNameCheck") && isRegexOrFunction(customElementHandling.tagNameCheck)) CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;
1295
+ if (objectHasOwnProperty(customElementHandling, "attributeNameCheck") && isRegexOrFunction(customElementHandling.attributeNameCheck)) CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;
1296
+ if (objectHasOwnProperty(customElementHandling, "allowCustomizedBuiltInElements") && typeof customElementHandling.allowCustomizedBuiltInElements === "boolean") CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;
1297
+ seal(CUSTOM_ELEMENT_HANDLING);
1298
+ if (SAFE_FOR_TEMPLATES) ALLOW_DATA_ATTR = false;
1299
+ if (RETURN_DOM_FRAGMENT) RETURN_DOM = true;
1300
+ if (USE_PROFILES) {
1301
+ if ((objectHasOwnProperty(cfg, "ALLOWED_TAGS") || objectHasOwnProperty(cfg, "ALLOWED_ATTR")) && typeof console !== "undefined" && typeof console.warn === "function") console.warn("DOMPurify: USE_PROFILES overrides ALLOWED_TAGS and ALLOWED_ATTR. Do not use these options together.");
1302
+ ALLOWED_TAGS = addToSet({}, text);
1303
+ ALLOWED_ATTR = create(null);
1304
+ if (USE_PROFILES.html === true) {
1305
+ addToSet(ALLOWED_TAGS, html$1);
1306
+ addToSet(ALLOWED_ATTR, html);
1307
+ }
1308
+ if (USE_PROFILES.svg === true) {
1309
+ addToSet(ALLOWED_TAGS, svg$1);
1310
+ addToSet(ALLOWED_ATTR, svg);
1311
+ addToSet(ALLOWED_ATTR, xml);
1312
+ }
1313
+ if (USE_PROFILES.svgFilters === true) {
1314
+ addToSet(ALLOWED_TAGS, svgFilters);
1315
+ addToSet(ALLOWED_ATTR, svg);
1316
+ addToSet(ALLOWED_ATTR, xml);
1317
+ }
1318
+ if (USE_PROFILES.mathMl === true) {
1319
+ addToSet(ALLOWED_TAGS, mathMl$1);
1320
+ addToSet(ALLOWED_ATTR, mathMl);
1321
+ addToSet(ALLOWED_ATTR, xml);
1322
+ }
1323
+ }
1324
+ EXTRA_ELEMENT_HANDLING.tagCheck = null;
1325
+ EXTRA_ELEMENT_HANDLING.attributeCheck = null;
1326
+ if (objectHasOwnProperty(cfg, "ADD_TAGS")) {
1327
+ if (typeof cfg.ADD_TAGS === "function") EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
1328
+ else if (arrayIsArray(cfg.ADD_TAGS)) {
1329
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) ALLOWED_TAGS = cloneSet(ALLOWED_TAGS);
1330
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
1331
+ }
1332
+ }
1333
+ if (objectHasOwnProperty(cfg, "ADD_ATTR")) {
1334
+ if (typeof cfg.ADD_ATTR === "function") EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
1335
+ else if (arrayIsArray(cfg.ADD_ATTR)) {
1336
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) ALLOWED_ATTR = cloneSet(ALLOWED_ATTR);
1337
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
1338
+ }
1339
+ }
1340
+ if (objectHasOwnProperty(cfg, "ADD_FORBID_CONTENTS") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {
1341
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) FORBID_CONTENTS = cloneSet(FORBID_CONTENTS);
1342
+ addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);
1343
+ }
1344
+ if (KEEP_CONTENT) ALLOWED_TAGS["#text"] = true;
1345
+ if (WHOLE_DOCUMENT) addToSet(ALLOWED_TAGS, [
1346
+ "html",
1347
+ "head",
1348
+ "body"
1349
+ ]);
1350
+ if (ALLOWED_TAGS.table) {
1351
+ ALLOWED_TAGS.tbody = true;
1352
+ delete FORBID_TAGS.tbody;
1353
+ }
1354
+ if (cfg.TRUSTED_TYPES_POLICY) {
1355
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
1356
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
1357
+ const previousTrustedTypesPolicy = trustedTypesPolicy;
1358
+ trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
1359
+ try {
1360
+ emptyHTML = _createTrustedHTML("");
1361
+ } catch (error) {
1362
+ trustedTypesPolicy = previousTrustedTypesPolicy;
1363
+ throw error;
1364
+ }
1365
+ } else if (cfg.TRUSTED_TYPES_POLICY === null) {
1366
+ trustedTypesPolicy = void 0;
1367
+ emptyHTML = "";
1368
+ } else {
1369
+ if (trustedTypesPolicy === void 0) trustedTypesPolicy = _getDefaultTrustedTypesPolicy();
1370
+ if (trustedTypesPolicy && typeof emptyHTML === "string") emptyHTML = _createTrustedHTML("");
1371
+ }
1372
+ CONFIG = freeze(cfg);
1373
+ };
1374
+ const ALL_SVG_TAGS = addToSet({}, [
1375
+ ...svg$1,
1376
+ ...svgFilters,
1377
+ ...svgDisallowed
1378
+ ]);
1379
+ const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
1380
+ /**
1381
+ * Namespace rules for an element in the SVG namespace.
1382
+ *
1383
+ * @param tagName the element's lowercase tag name
1384
+ * @param parentNamespace the (possibly simulated) parent's namespace
1385
+ * @param parentTagName the parent's lowercase tag name
1386
+ * @returns true if a spec-compliant parser could produce this element
1387
+ */
1388
+ const _checkSvgNamespace = function _checkSvgNamespace(tagName, parentNamespace, parentTagName) {
1389
+ if (parentNamespace === HTML_NAMESPACE) return tagName === "svg";
1390
+ if (parentNamespace === MATHML_NAMESPACE) return tagName === "svg" && (parentTagName === "annotation-xml" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
1391
+ return Boolean(ALL_SVG_TAGS[tagName]);
1392
+ };
1393
+ /**
1394
+ * Namespace rules for an element in the MathML namespace.
1395
+ *
1396
+ * @param tagName the element's lowercase tag name
1397
+ * @param parentNamespace the (possibly simulated) parent's namespace
1398
+ * @param parentTagName the parent's lowercase tag name
1399
+ * @returns true if a spec-compliant parser could produce this element
1400
+ */
1401
+ const _checkMathMlNamespace = function _checkMathMlNamespace(tagName, parentNamespace, parentTagName) {
1402
+ if (parentNamespace === HTML_NAMESPACE) return tagName === "math";
1403
+ if (parentNamespace === SVG_NAMESPACE) return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName];
1404
+ return Boolean(ALL_MATHML_TAGS[tagName]);
1405
+ };
1406
+ /**
1407
+ * Namespace rules for an element in the HTML namespace.
1408
+ *
1409
+ * @param tagName the element's lowercase tag name
1410
+ * @param parentNamespace the (possibly simulated) parent's namespace
1411
+ * @param parentTagName the parent's lowercase tag name
1412
+ * @returns true if a spec-compliant parser could produce this element
1413
+ */
1414
+ const _checkHtmlNamespace = function _checkHtmlNamespace(tagName, parentNamespace, parentTagName) {
1415
+ if (parentNamespace === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) return false;
1416
+ if (parentNamespace === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) return false;
1417
+ return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
1418
+ };
1419
+ /**
1420
+ * @param element a DOM element whose namespace is being checked
1421
+ * @returns Return false if the element has a
1422
+ * namespace that a spec-compliant parser would never
1423
+ * return. Return true otherwise.
1424
+ */
1425
+ const _checkValidNamespace = function _checkValidNamespace(element) {
1426
+ const elementNamespace = _readNamespaceURI(element);
1427
+ const tagName = stringToLowerCase(_readNodeName(element));
1428
+ const parentNode = getParentNode(element);
1429
+ let parentNamespace = NAMESPACE;
1430
+ let parentTagName = "template";
1431
+ if (parentNode && _readNodeType(parentNode) === NODE_TYPE.element) {
1432
+ parentNamespace = _readNamespaceURI(parentNode);
1433
+ parentTagName = stringToLowerCase(_readNodeName(parentNode));
1434
+ }
1435
+ if (!ALLOWED_NAMESPACES[elementNamespace]) return false;
1436
+ if (elementNamespace === SVG_NAMESPACE) return _checkSvgNamespace(tagName, parentNamespace, parentTagName);
1437
+ if (elementNamespace === MATHML_NAMESPACE) return _checkMathMlNamespace(tagName, parentNamespace, parentTagName);
1438
+ if (elementNamespace === HTML_NAMESPACE) return _checkHtmlNamespace(tagName, parentNamespace, parentTagName);
1439
+ return PARSER_MEDIA_TYPE === "application/xhtml+xml";
1440
+ };
1441
+ /**
1442
+ * _forceRemove
1443
+ *
1444
+ * @param node a DOM node
1445
+ */
1446
+ const _forceRemove = function _forceRemove(node) {
1447
+ arrayPush(DOMPurify.removed, { element: node });
1448
+ try {
1449
+ getParentNode(node).removeChild(node);
1450
+ } catch (_) {
1451
+ remove(node);
1452
+ if (!getParentNode(node)) throw typeErrorCreate("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
1453
+ }
1454
+ };
1455
+ /**
1456
+ * Removes an Attr node as that exact node, without book-keeping. Name-based
1457
+ * removal lowercases the name in HTML documents and would miss a
1458
+ * case-preserved one such as `ONERROR`, so it is only the fallback for
1459
+ * clobbered or detached nodes.
1460
+ *
1461
+ * @param element the element to strip the attribute from
1462
+ * @param attribute the Attr node to remove
1463
+ * @param name the attribute's name, for the fallback path
1464
+ */
1465
+ const _stripAttributeNode = function _stripAttributeNode(element, attribute, name) {
1466
+ try {
1467
+ removeAttributeNode(element, attribute);
1468
+ } catch (_) {
1469
+ try {
1470
+ element.removeAttribute(name);
1471
+ } catch (_) {}
1472
+ }
1473
+ };
1474
+ /**
1475
+ * Fail-closed teardown of an in-place root: strip every disallowed attribute
1476
+ * in the subtree first, so nothing armed is left behind, then remove all
1477
+ * children and the root's own attributes.
1478
+ *
1479
+ * @param root the in-place root to empty
1480
+ */
1481
+ const _neutralizeRoot = function _neutralizeRoot(root) {
1482
+ _neutralizeSubtree(root);
1483
+ const childNodes = getChildNodes(root);
1484
+ if (childNodes) arrayForEach(arraySlice(childNodes), (child) => {
1485
+ try {
1486
+ remove(child);
1487
+ } catch (_) {}
1488
+ });
1489
+ if (_readNodeType(root) === NODE_TYPE.element) _stripAttributes(root, false);
1490
+ };
1491
+ /**
1492
+ * Removes an attribute, preferably as its exact Attr node: name-based
1493
+ * removal lowercases the name in HTML documents and misses case-preserved
1494
+ * names, e.g. from imported XHTML.
1495
+ *
1496
+ * @param name an Attribute name
1497
+ * @param element a DOM node
1498
+ * @param attr the exact Attr node to remove, when the caller has it
1499
+ */
1500
+ const _removeAttribute = function _removeAttribute(name, element, attr) {
1501
+ if (!attr) try {
1502
+ attr = element.getAttributeNode(name);
1503
+ } catch (_) {
1504
+ attr = null;
1505
+ }
1506
+ arrayPush(DOMPurify.removed, {
1507
+ attribute: attr || null,
1508
+ from: element
1509
+ });
1510
+ if (attr) _stripAttributeNode(element, attr, name);
1511
+ else try {
1512
+ element.removeAttribute(name);
1513
+ } catch (_) {}
1514
+ if (name === "is") {
1515
+ if (RETURN_DOM || RETURN_DOM_FRAGMENT) try {
1516
+ _forceRemove(element);
1517
+ } catch (_) {}
1518
+ else try {
1519
+ element.setAttribute(name, "");
1520
+ } catch (_) {}
1521
+ }
1522
+ };
1523
+ /**
1524
+ * Removes an element's attributes without book-keeping. Used to neutralize
1525
+ * nodes discarded from an in-place tree.
1526
+ *
1527
+ * @param element the element to strip
1528
+ * @param keepAllowed whether attributes on the allowlist stay
1529
+ */
1530
+ const _stripAttributes = function _stripAttributes(element, keepAllowed) {
1531
+ const attributes = getAttributes(element);
1532
+ if (!attributes) return;
1533
+ for (let i = attributes.length - 1; i >= 0; --i) {
1534
+ const attribute = attributes[i];
1535
+ const name = attribute && attribute.name;
1536
+ if (typeof name === "string" && !(keepAllowed && ALLOWED_ATTR[transformCaseFunc(name)])) _stripAttributeNode(element, attribute, name);
1537
+ }
1538
+ };
1539
+ /**
1540
+ * Iterative depth-first walk, so deep trees cannot overflow the call stack,
1541
+ * reading through the cached getters, so clobbering cannot hide children.
1542
+ * When `visit` returns false, the node's children are skipped. With
1543
+ * `intoShadow`, open shadow roots are walked after their host's children.
1544
+ *
1545
+ * @param root where to start
1546
+ * @param visit called for every node
1547
+ * @param intoShadow whether to enter open shadow roots
1548
+ */
1549
+ const _walkTree = function _walkTree(root, visit) {
1550
+ let intoShadow = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
1551
+ const stack = [root];
1552
+ while (stack.length > 0) {
1553
+ const node = stack.pop();
1554
+ if (visit(node) === false) continue;
1555
+ if (intoShadow && _readNodeType(node) === NODE_TYPE.element) {
1556
+ const shadowRoot = getShadowRoot(node);
1557
+ if (_isDocumentFragment(shadowRoot)) stack.push(shadowRoot);
1558
+ }
1559
+ const childNodes = getChildNodes(node);
1560
+ if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);
1561
+ }
1562
+ };
1563
+ /**
1564
+ * Strips disallowed attributes from every element of a discarded subtree,
1565
+ * so a handler that is already queued (a loading image) cannot fire.
1566
+ *
1567
+ * @param root the root of a removed subtree
1568
+ */
1569
+ const _neutralizeSubtree = function _neutralizeSubtree(root) {
1570
+ _walkTree(root, (node) => {
1571
+ if (_readNodeType(node) === NODE_TYPE.element) _stripAttributes(node, true);
1572
+ });
1573
+ };
1574
+ /**
1575
+ * All nodes under `root`, root first, including open shadow roots. Template
1576
+ * content is not entered, it is inert.
1577
+ *
1578
+ * @param root the in-place root
1579
+ * @return the nodes
1580
+ */
1581
+ const _collectLiveNodes = function _collectLiveNodes(root) {
1582
+ const nodes = [];
1583
+ _walkTree(root, (node) => {
1584
+ nodes.push(node);
1585
+ }, true);
1586
+ return nodes;
1587
+ };
1588
+ /**
1589
+ * Strips disallowed attributes from every element that was under the
1590
+ * in-place root when the call started and no longer is, whatever removed
1591
+ * or moved it.
1592
+ *
1593
+ * @param root the in-place root
1594
+ * @param before the root's nodes, collected before the walk
1595
+ */
1596
+ const _neutralizeEscapedElements = function _neutralizeEscapedElements(root, before) {
1597
+ const reachable = setCreate();
1598
+ arrayForEach(_collectLiveNodes(root), (node) => {
1599
+ if (_readNodeType(node) === NODE_TYPE.element) setAdd(reachable, node);
1600
+ });
1601
+ arrayForEach(before, (node) => {
1602
+ if (_readNodeType(node) === NODE_TYPE.element && !setHas(reachable, node)) _stripAttributes(node, true);
1603
+ });
1604
+ };
1605
+ /**
1606
+ * Neutralizes everything that left the in-place tree during the call: what
1607
+ * DOMPurify removed, and what hooks or custom elements removed or moved out.
1608
+ *
1609
+ * @param root the in-place root
1610
+ * @param before the root's nodes, collected before the walk
1611
+ * @return true if the root itself was removed
1612
+ */
1613
+ const _neutralizeDiscarded = function _neutralizeDiscarded(root, before) {
1614
+ let rootRemoved = false;
1615
+ arrayForEach(DOMPurify.removed, (entry) => {
1616
+ if (entry.element) {
1617
+ rootRemoved = rootRemoved || entry.element === root;
1618
+ _neutralizeSubtree(entry.element);
1619
+ }
1620
+ });
1621
+ _neutralizeEscapedElements(root, before);
1622
+ return rootRemoved;
1623
+ };
1624
+ const MAX_UNVISITED_ROUNDS = 8;
1625
+ /**
1626
+ * The walk only moves forward, so a node moved to a position it already
1627
+ * passed is never visited. Give every original node that is still in the
1628
+ * tree but unvisited the normal treatment, hooks included. Nodes created
1629
+ * during the call are left alone. Fails closed if the tree keeps changing.
1630
+ *
1631
+ * @param root the in-place root
1632
+ * @param before the root's nodes, collected before the walk
1633
+ */
1634
+ const _sanitizeUnvisitedNodes = function _sanitizeUnvisitedNodes(root, before) {
1635
+ const visited = IN_PLACE_VISITED;
1636
+ let original = null;
1637
+ const getOriginal = () => {
1638
+ if (!original) {
1639
+ original = setCreate();
1640
+ arrayForEach(before, (beforeNode) => {
1641
+ setAdd(original, beforeNode);
1642
+ });
1643
+ }
1644
+ return original;
1645
+ };
1646
+ for (let round = 0;; round++) {
1647
+ const live = _collectLiveNodes(root);
1648
+ const containers = [root];
1649
+ let pending = false;
1650
+ arrayForEach(live, (node) => {
1651
+ if (_readNodeType(node) === NODE_TYPE.documentFragment) arrayPush(containers, node);
1652
+ else if (!pending && !setHas(visited, node)) pending = setHas(getOriginal(), node);
1653
+ });
1654
+ if (!pending) return;
1655
+ if (round >= MAX_UNVISITED_ROUNDS) throw typeErrorCreate("the tree kept changing during in-place sanitization; refusing to return it");
1656
+ arrayForEach(containers, (container, index) => {
1657
+ _sanitizeUnvisitedIn(container, index > 0, root, getOriginal());
1658
+ });
1659
+ }
1660
+ };
1661
+ /**
1662
+ * One _sanitizeUnvisitedNodes pass over the root or an open shadow root.
1663
+ *
1664
+ * @param container the root or an open shadow root
1665
+ * @param inShadow whether container is a shadow root
1666
+ * @param root the in-place root
1667
+ * @param original the root's nodes collected before the walk, as a set
1668
+ */
1669
+ const _sanitizeUnvisitedIn = function _sanitizeUnvisitedIn(container, inShadow, root, original) {
1670
+ const iterator = _createNodeIterator(container);
1671
+ let node;
1672
+ while (node = iterator.nextNode()) {
1673
+ if (!setHas(original, node) || setHas(IN_PLACE_VISITED, node)) continue;
1674
+ if (inShadow) _executeHooks(hooks.uponSanitizeShadowNode, node, null);
1675
+ _sanitizeNode(node, root);
1676
+ }
1677
+ };
1678
+ /**
1679
+ * Records that _sanitizeElements processed `node`. No-op outside IN_PLACE.
1680
+ *
1681
+ * @param node the node being processed
1682
+ */
1683
+ const _markVisited = function _markVisited(node) {
1684
+ if (IN_PLACE_VISITED) setAdd(IN_PLACE_VISITED, node);
1685
+ };
1686
+ /**
1687
+ * Patch-linkage attributes (declarative partial updates): `patchsrc`
1688
+ * always, `for` everywhere except on <label> and <output>. Gated on
1689
+ * SAFE_FOR_XML. Shared by the IN_PLACE pre-pass and _isValidAttribute.
1690
+ *
1691
+ * @param lcName the transformCaseFunc'd attribute name
1692
+ * @param lcTag the transformCaseFunc'd tag name of the carrying element
1693
+ * @return true if the attribute is patch linkage and must be dropped
1694
+ */
1695
+ const _isPatchLinkageAttribute = function _isPatchLinkageAttribute(lcName, lcTag) {
1696
+ if (!SAFE_FOR_XML) return false;
1697
+ if (lcName === "patchsrc") return true;
1698
+ return lcName === "for" && lcTag !== "label" && lcTag !== "output";
1699
+ };
1700
+ /**
1701
+ * IN_PLACE pre-pass: sever all patch linkage before the walk, so no patch
1702
+ * can fire mid-walk into a part of the tree the walker already passed.
1703
+ * Removes range markers (processing instructions, comments with markup)
1704
+ * and strips linkage attributes. It cannot undo a patch that already fired.
1705
+ *
1706
+ * TODO: if the shipped feature can patch through `for` on <label>/<output>,
1707
+ * drop that pair here too.
1708
+ *
1709
+ * @param root the in-place root to sweep
1710
+ */
1711
+ const _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {
1712
+ if (!SAFE_FOR_XML) return;
1713
+ _walkTree(root, (node) => {
1714
+ const nodeType = _readNodeType(node);
1715
+ if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {
1716
+ try {
1717
+ remove(node);
1718
+ } catch (_) {}
1719
+ return false;
1720
+ }
1721
+ if (nodeType === NODE_TYPE.element) {
1722
+ const element = node;
1723
+ const lcTag = transformCaseFunc(_readNodeName(node));
1724
+ try {
1725
+ if (element.hasAttribute && element.hasAttribute("patchsrc")) element.removeAttribute("patchsrc");
1726
+ if (element.hasAttribute && element.hasAttribute("for") && _isPatchLinkageAttribute("for", lcTag)) element.removeAttribute("for");
1727
+ } catch (_) {}
1728
+ }
1729
+ return true;
1730
+ });
1731
+ };
1732
+ /**
1733
+ * _initDocument
1734
+ *
1735
+ * @param dirty - a string of dirty markup
1736
+ * @return a DOM, filled with the dirty markup
1737
+ */
1738
+ const _initDocument = function _initDocument(dirty) {
1739
+ let doc = null;
1740
+ let leadingWhitespace = null;
1741
+ if (FORCE_BODY) dirty = "<remove></remove>" + dirty;
1742
+ else {
1743
+ const matches = stringMatch(dirty, LEADING_WHITESPACE);
1744
+ leadingWhitespace = matches && matches[0];
1745
+ }
1746
+ if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && NAMESPACE === HTML_NAMESPACE) dirty = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + dirty + "</body></html>";
1747
+ const dirtyPayload = trustedTypesPolicy ? _createTrustedHTML(dirty) : dirty;
1748
+ if (NAMESPACE === HTML_NAMESPACE) try {
1749
+ doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
1750
+ } catch (_) {}
1751
+ if (!doc || !doc.documentElement) {
1752
+ doc = implementation.createDocument(NAMESPACE, "template", null);
1753
+ try {
1754
+ doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
1755
+ } catch (_) {}
1756
+ }
1757
+ const body = doc.body || doc.documentElement;
1758
+ if (dirty && leadingWhitespace) body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
1759
+ if (NAMESPACE === HTML_NAMESPACE) return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0];
1760
+ return WHOLE_DOCUMENT ? doc.documentElement : body;
1761
+ };
1762
+ /**
1763
+ * Creates a NodeIterator over `root`. ownerDocument is read through the
1764
+ * cached getter: a form child named "ownerDocument" shadows the direct
1765
+ * read and would make createNodeIterator throw.
1766
+ *
1767
+ * @param root The node to start traversing on.
1768
+ * @param characterDataOnly whether to skip elements
1769
+ * @return The created NodeIterator
1770
+ */
1771
+ const _createNodeIterator = function _createNodeIterator(root) {
1772
+ let characterDataOnly = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
1773
+ const doc = getOwnerDocument ? getOwnerDocument(root) : root.ownerDocument;
1774
+ return createNodeIterator.call(doc || root, root, (characterDataOnly ? 0 : NodeFilter.SHOW_ELEMENT) | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
1775
+ };
1776
+ /**
1777
+ * Replace template expression syntax (mustache, ERB, template
1778
+ * literal) with a space; shared by all SAFE_FOR_TEMPLATES scrub
1779
+ * sites. Order matters: mustache, then ERB, then template literal.
1780
+ *
1781
+ * @param value the string to scrub
1782
+ * @returns the scrubbed string
1783
+ */
1784
+ const _stripTemplateExpressions = function _stripTemplateExpressions(value) {
1785
+ value = stringReplace(value, MUSTACHE_EXPR$1, " ");
1786
+ value = stringReplace(value, ERB_EXPR$1, " ");
1787
+ value = stringReplace(value, TMPLIT_EXPR$1, " ");
1788
+ return value;
1789
+ };
1790
+ /**
1791
+ * Strips template expressions from the character data under `node`,
1792
+ * template contents included. Runs after the walk, since an expression can
1793
+ * also form when a removed element leaves two text nodes adjacent. Works on
1794
+ * the nodes rather than on markup, which keeps node references intact and
1795
+ * sees `<%` unescaped. Attribute values are handled in _sanitizeAttributes.
1796
+ *
1797
+ * @param node The root element whose character data should be scrubbed.
1798
+ */
1799
+ const _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {
1800
+ var _node$querySelectorAl;
1801
+ _scrubOwnCharacterData(node);
1802
+ const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, "template");
1803
+ if (templates) arrayForEach(templates, (tmpl) => {
1804
+ if (_isDocumentFragment(tmpl.content)) _scrubTemplateExpressions2(tmpl.content);
1805
+ });
1806
+ };
1807
+ /**
1808
+ * Normalizes `node` and strips template expressions from its own character
1809
+ * data. Template contents and shadow roots are not entered, their own
1810
+ * _sanitizeShadowDOM call scrubs them.
1811
+ *
1812
+ * @param node The root whose own character data should be scrubbed.
1813
+ */
1814
+ const _scrubOwnCharacterData = function _scrubOwnCharacterData(node) {
1815
+ node.normalize();
1816
+ const walker = _createNodeIterator(node, true);
1817
+ let currentNode = walker.nextNode();
1818
+ while (currentNode) {
1819
+ currentNode.data = _stripTemplateExpressions(currentNode.data);
1820
+ currentNode = walker.nextNode();
1821
+ }
1822
+ };
1823
+ /**
1824
+ * Detects DOM clobbering on a form, the only element whose named children
1825
+ * shadow its own properties. Each probe compares a direct read with what
1826
+ * the property has to be.
1827
+ *
1828
+ * @param element element to check for clobbering attacks
1829
+ * @return true if clobbered, false if safe
1830
+ */
1831
+ const _isClobbered = function _isClobbered(element) {
1832
+ const realTagName = getNodeName ? getNodeName(element) : null;
1833
+ if (typeof realTagName !== "string") return false;
1834
+ if (transformCaseFunc(realTagName) !== "form") return false;
1835
+ return typeof element.nodeName !== "string" || typeof element.textContent !== "string" || typeof element.removeChild !== "function" || element.attributes !== getAttributes(element) || typeof element.removeAttribute !== "function" || typeof element.removeAttributeNode !== "function" || typeof element.getAttributeNode !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function" || element.nodeType !== getNodeType(element) || element.childNodes !== getChildNodes(element);
1836
+ };
1837
+ /**
1838
+ * Reads nodeType through the cached getter, so the result holds for nodes
1839
+ * from any realm (GHSA-4w3q-35jp-p934) and cannot be clobbered.
1840
+ *
1841
+ * @param value anything
1842
+ * @return the node type, or null if value is not a DOM node
1843
+ */
1844
+ const _nodeTypeOf = function _nodeTypeOf(value) {
1845
+ if (!getNodeType || typeof value !== "object" || value === null) return null;
1846
+ try {
1847
+ const nodeType = getNodeType(value);
1848
+ return typeof nodeType === "number" ? nodeType : null;
1849
+ } catch (_) {
1850
+ return null;
1851
+ }
1852
+ };
1853
+ const _isDocumentFragment = function _isDocumentFragment(value) {
1854
+ return _nodeTypeOf(value) === NODE_TYPE.documentFragment;
1855
+ };
1856
+ const _isNode = function _isNode(value) {
1857
+ return _nodeTypeOf(value) !== null;
1858
+ };
1859
+ function _executeHooks(hooks, currentNode, data) {
1860
+ if (hooks.length === 0) return;
1861
+ arrayForEach(hooks, (hook) => {
1862
+ hook.call(DOMPurify, currentNode, data, CONFIG);
1863
+ });
1864
+ }
1865
+ /**
1866
+ * Structural-threat checks that condemn a node regardless of the
1867
+ * allowlists: mXSS via namespace confusion, risky CSS construction,
1868
+ * processing instructions, markup-bearing comments. Pure predicate;
1869
+ * the caller removes. Check order is load-bearing.
1870
+ *
1871
+ * @param currentNode the node to inspect
1872
+ * @param tagName the node's transformCaseFunc'd tag name
1873
+ * @param nodeType the node's type, read through the cached getter
1874
+ * @return true if the node must be removed
1875
+ */
1876
+ const _isUnsafeNode = function _isUnsafeNode(currentNode, tagName, nodeType) {
1877
+ if (SAFE_FOR_XML && nodeType === NODE_TYPE.element && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) return true;
1878
+ if (SAFE_FOR_XML && LITERAL_TEXT_ELEMENTS[tagName] && nodeType === NODE_TYPE.element && _readNamespaceURI(currentNode) === HTML_NAMESPACE && (_isNode(currentNode.firstElementChild) || typeof currentNode.textContent === "string" && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent))) return true;
1879
+ if (nodeType === NODE_TYPE.processingInstruction) return true;
1880
+ if (SAFE_FOR_XML && nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) return true;
1881
+ return false;
1882
+ };
1883
+ /**
1884
+ * Evaluate a CUSTOM_ELEMENT_HANDLING check (a RegExp or a predicate
1885
+ * function, per the validation in _parseConfig) against a name.
1886
+ * Additional arguments are forwarded to predicate functions - the
1887
+ * attributeNameCheck predicate receives the tag name as its second
1888
+ * argument. A null/absent check never matches.
1889
+ *
1890
+ * @param check the configured tagNameCheck / attributeNameCheck value
1891
+ * @param name the name to test
1892
+ * @param args extra arguments forwarded to a predicate function
1893
+ * @return true if the check matches the name
1894
+ */
1895
+ const _matchesNameCheck = function _matchesNameCheck(check, name) {
1896
+ if (check instanceof RegExp) return regExpTest(check, name);
1897
+ if (check instanceof Function) {
1898
+ for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];
1899
+ return Boolean(check(name, ...args));
1900
+ }
1901
+ return false;
1902
+ };
1903
+ /**
1904
+ * Handles a node whose tag is forbidden or not allowlisted: hoists its
1905
+ * content per KEEP_CONTENT and removes it. The one exception is a custom
1906
+ * element allowed via CUSTOM_ELEMENT_HANDLING, which is kept.
1907
+ *
1908
+ * @param currentNode the disallowed node
1909
+ * @param tagName the node's transformCaseFunc'd tag name
1910
+ * @return true if the node was removed, false if kept
1911
+ */
1912
+ const _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName, root) {
1913
+ if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;
1914
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName] && !FORBID_CONTENTS[stringToLowerCase(tagName)]) {
1915
+ const parentNode = getParentNode(currentNode);
1916
+ const childNodes = getChildNodes(currentNode);
1917
+ if (childNodes && parentNode) {
1918
+ const childCount = childNodes.length;
1919
+ for (let i = childCount - 1; i >= 0; --i) {
1920
+ const hoisted = currentNode === root ? cloneNode(childNodes[i], true) : childNodes[i];
1921
+ parentNode.insertBefore(hoisted, getNextSibling(currentNode));
1922
+ }
1923
+ }
1924
+ }
1925
+ _forceRemove(currentNode);
1926
+ return true;
1927
+ };
1928
+ /**
1929
+ * Forks an allowlist off its shared binding (the instance default or the
1930
+ * setConfig() capture) before a hook sees it, so a hook's widening stays
1931
+ * within the call. A set that is already call-local is returned as is.
1932
+ *
1933
+ * @param hookList the uponSanitize* hook array for this event
1934
+ * @param set the current ALLOWED_TAGS / ALLOWED_ATTR binding
1935
+ * @param defaultSet the per-instance DEFAULT_ALLOWED_* constant
1936
+ * @param setConfigSet the captured setConfig() binding, or null
1937
+ * @return a call-local clone if a hook is present and set is still shared,
1938
+ * else set unchanged
1939
+ */
1940
+ const _forkSharedAllowlist = function _forkSharedAllowlist(hookList, set, defaultSet, setConfigSet) {
1941
+ if (hookList.length === 0) return set;
1942
+ return set === defaultSet || set === setConfigSet ? cloneSet(set) : set;
1943
+ };
1944
+ /**
1945
+ * A hook may have detached the node it was called for. If so, treat it as
1946
+ * removed and stop processing it; the walk root is exempt. On the IN_PLACE
1947
+ * path the detached subtree is neutralized right away.
1948
+ *
1949
+ * @param currentNode the node a hook may have detached
1950
+ * @param root the current walk root
1951
+ * @return true if the node was detached
1952
+ */
1953
+ const _handleHookDetachedNode = function _handleHookDetachedNode(currentNode, root) {
1954
+ if (currentNode === root || getParentNode(currentNode) !== null) return false;
1955
+ if (IN_PLACE) _neutralizeSubtree(currentNode);
1956
+ return true;
1957
+ };
1958
+ /**
1959
+ * _sanitizeElements
1960
+ *
1961
+ * @protect nodeName
1962
+ * @protect textContent
1963
+ * @protect removeChild
1964
+ * @param currentNode to check for permission to exist
1965
+ * @return true if node was killed, false if left alive
1966
+ */
1967
+ const _sanitizeElements = function _sanitizeElements(currentNode, root) {
1968
+ _markVisited(currentNode);
1969
+ _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
1970
+ if (_handleHookDetachedNode(currentNode, root)) return true;
1971
+ if (_isClobbered(currentNode)) {
1972
+ _forceRemove(currentNode);
1973
+ return true;
1974
+ }
1975
+ const tagName = transformCaseFunc(_readNodeName(currentNode));
1976
+ const nodeType = _readNodeType(currentNode);
1977
+ ALLOWED_TAGS = _forkSharedAllowlist(hooks.uponSanitizeElement, ALLOWED_TAGS, DEFAULT_ALLOWED_TAGS, SET_CONFIG_ALLOWED_TAGS);
1978
+ _executeHooks(hooks.uponSanitizeElement, currentNode, {
1979
+ tagName,
1980
+ allowedTags: ALLOWED_TAGS
1981
+ });
1982
+ if (_handleHookDetachedNode(currentNode, root)) return true;
1983
+ if (_isUnsafeNode(currentNode, tagName, nodeType)) {
1984
+ _forceRemove(currentNode);
1985
+ return true;
1986
+ }
1987
+ if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
1988
+ const removed = _sanitizeDisallowedNode(currentNode, tagName, root);
1989
+ if (removed === false) {
1990
+ _executeHooks(hooks.afterSanitizeElements, currentNode, null);
1991
+ if (_handleHookDetachedNode(currentNode, root)) return true;
1992
+ }
1993
+ return removed;
1994
+ }
1995
+ if (nodeType === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {
1996
+ _forceRemove(currentNode);
1997
+ return true;
1998
+ }
1999
+ if ((tagName === "noscript" || tagName === "noembed" || tagName === "noframes") && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {
2000
+ _forceRemove(currentNode);
2001
+ return true;
2002
+ }
2003
+ if (SAFE_FOR_TEMPLATES && nodeType === NODE_TYPE.text) {
2004
+ const text = currentNode.textContent;
2005
+ const content = _stripTemplateExpressions(text);
2006
+ if (text !== content) {
2007
+ arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });
2008
+ currentNode.textContent = content;
2009
+ }
2010
+ }
2011
+ _executeHooks(hooks.afterSanitizeElements, currentNode, null);
2012
+ return _handleHookDetachedNode(currentNode, root);
2013
+ };
2014
+ /**
2015
+ * _isValidAttribute
2016
+ *
2017
+ * @param lcTag Lowercase tag name of containing element.
2018
+ * @param lcName Lowercase attribute name.
2019
+ * @param value Attribute value.
2020
+ * @return Returns true if `value` is valid, otherwise false.
2021
+ */
2022
+ const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
2023
+ if (FORBID_ATTR[lcName]) return false;
2024
+ if (_isPatchLinkageAttribute(lcName, lcTag)) return false;
2025
+ if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document || value in formElement)) return false;
2026
+ const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
2027
+ if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) return true;
2028
+ if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) return true;
2029
+ if (!nameIsPermitted) return _isBasicCustomElement(lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName, lcTag) || lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value);
2030
+ if (URI_SAFE_ATTRIBUTES[lcName]) return true;
2031
+ const compactValue = stringReplace(value, ATTR_WHITESPACE$1, "");
2032
+ if (regExpTest(IS_ALLOWED_URI$1, compactValue)) return true;
2033
+ if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag]) return true;
2034
+ if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, compactValue)) return true;
2035
+ return !value;
2036
+ };
2037
+ const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, [
2038
+ "annotation-xml",
2039
+ "color-profile",
2040
+ "font-face",
2041
+ "font-face-format",
2042
+ "font-face-name",
2043
+ "font-face-src",
2044
+ "font-face-uri",
2045
+ "missing-glyph"
2046
+ ]);
2047
+ /**
2048
+ * _isBasicCustomElement
2049
+ * checks if at least one dash is included in tagName, and it's not the first char
2050
+ * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
2051
+ *
2052
+ * @param tagName name of the tag of the node to sanitize
2053
+ * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
2054
+ */
2055
+ const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
2056
+ return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
2057
+ };
2058
+ /**
2059
+ * Wrap an attribute value in the matching Trusted Types object when
2060
+ * the active policy requires it. Namespaced attributes pass through
2061
+ * unchanged (no TT support yet, see
2062
+ * https://bugs.chromium.org/p/chromium/issues/detail?id=1305293).
2063
+ *
2064
+ * @param lcTag lowercase tag name of the containing element
2065
+ * @param lcName lowercase attribute name
2066
+ * @param namespaceURI the attribute's namespace, if any
2067
+ * @param value the attribute value to wrap
2068
+ * @return the value, wrapped when Trusted Types demand it
2069
+ */
2070
+ const _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value) {
2071
+ if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function" && !namespaceURI) switch (trustedTypes.getAttributeType(lcTag, lcName)) {
2072
+ case "TrustedHTML": return _createTrustedHTML(value);
2073
+ case "TrustedScriptURL": return _createTrustedScriptURL(value);
2074
+ }
2075
+ return value;
2076
+ };
2077
+ /**
2078
+ * Writes a changed attribute value back. If the new value clobbers, the
2079
+ * element is removed; if the write fails, the attribute is.
2080
+ *
2081
+ * @param currentNode the element carrying the attribute
2082
+ * @param name the attribute name as present on the element
2083
+ * @param namespaceURI the attribute's namespace, if any
2084
+ * @param value the new attribute value
2085
+ * @return true if the value was written without introducing clobbering
2086
+ */
2087
+ const _setAttributeValue = function _setAttributeValue(currentNode, name, namespaceURI, value) {
2088
+ try {
2089
+ if (namespaceURI) currentNode.setAttributeNS(namespaceURI, name, value);
2090
+ else currentNode.setAttribute(name, value);
2091
+ if (_isClobbered(currentNode)) {
2092
+ _forceRemove(currentNode);
2093
+ return false;
2094
+ }
2095
+ return true;
2096
+ } catch (_) {
2097
+ _removeAttribute(name, currentNode);
2098
+ return false;
2099
+ }
2100
+ };
2101
+ /**
2102
+ * Value checks that apply before a hook can force-keep an attribute. Also
2103
+ * used by isValidAttribute(), so it never approves a value that sanitize()
2104
+ * would strip.
2105
+ *
2106
+ * @param name the attribute name as found on the node (case preserved)
2107
+ * @param value the attribute value
2108
+ * @returns true if the attribute must be removed because of its value
2109
+ */
2110
+ const _isUnsafeAttributeValue = function _isUnsafeAttributeValue(name, value) {
2111
+ if (SAFE_FOR_XML && regExpTest(ATTR_VALUE_BREAKOUT, value)) return true;
2112
+ return stringToLowerCase(name) === "attributename" && stringIndexOf(value, "href") !== -1;
2113
+ };
2114
+ /**
2115
+ * _sanitizeAttributes
2116
+ *
2117
+ * @protect attributes
2118
+ * @protect nodeName
2119
+ * @protect removeAttribute
2120
+ * @protect setAttribute
2121
+ *
2122
+ * @param currentNode to sanitize
2123
+ * @param root the current walk root
2124
+ */
2125
+ const _sanitizeAttributes = function _sanitizeAttributes(currentNode, root) {
2126
+ _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
2127
+ if (_handleHookDetachedNode(currentNode, root)) return;
2128
+ const attributes = currentNode.attributes;
2129
+ if (!attributes || _isClobbered(currentNode)) return;
2130
+ ALLOWED_ATTR = _forkSharedAllowlist(hooks.uponSanitizeAttribute, ALLOWED_ATTR, DEFAULT_ALLOWED_ATTR, SET_CONFIG_ALLOWED_ATTR);
2131
+ const hookEvent = {
2132
+ attrName: "",
2133
+ attrValue: "",
2134
+ keepAttr: true,
2135
+ allowedAttributes: ALLOWED_ATTR,
2136
+ forceKeepAttr: void 0
2137
+ };
2138
+ let l = attributes.length;
2139
+ const lcTag = transformCaseFunc(_readNodeName(currentNode));
2140
+ while (l--) {
2141
+ const attr = attributes[l];
2142
+ const name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
2143
+ const lcName = transformCaseFunc(name);
2144
+ const initValue = attrValue;
2145
+ let value = name === "value" ? initValue : stringTrim(initValue);
2146
+ let recreatedNamedProp = false;
2147
+ hookEvent.attrName = lcName;
2148
+ hookEvent.attrValue = value;
2149
+ hookEvent.keepAttr = true;
2150
+ hookEvent.forceKeepAttr = void 0;
2151
+ _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
2152
+ value = hookEvent.attrValue;
2153
+ if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name") && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {
2154
+ _removeAttribute(name, currentNode, attr);
2155
+ value = SANITIZE_NAMED_PROPS_PREFIX + value;
2156
+ recreatedNamedProp = true;
2157
+ }
2158
+ if (_isUnsafeAttributeValue(name, value)) {
2159
+ _removeAttribute(name, currentNode, attr);
2160
+ continue;
2161
+ }
2162
+ if (hookEvent.forceKeepAttr) continue;
2163
+ if (!hookEvent.keepAttr) {
2164
+ _removeAttribute(name, currentNode, attr);
2165
+ continue;
2166
+ }
2167
+ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {
2168
+ _removeAttribute(name, currentNode, attr);
2169
+ continue;
2170
+ }
2171
+ if (SAFE_FOR_TEMPLATES) value = _stripTemplateExpressions(value);
2172
+ if (!_isValidAttribute(lcTag, lcName, value)) {
2173
+ _removeAttribute(name, currentNode, attr);
2174
+ continue;
2175
+ }
2176
+ value = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);
2177
+ if (value !== initValue) {
2178
+ if (_setAttributeValue(currentNode, name, namespaceURI, value) && recreatedNamedProp) arrayPop(DOMPurify.removed);
2179
+ }
2180
+ }
2181
+ _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
2182
+ _handleHookDetachedNode(currentNode, root);
2183
+ };
2184
+ /**
2185
+ * Sanitizes one node: the node itself, its attributes and, for a
2186
+ * template, its content.
2187
+ *
2188
+ * @param node the node to sanitize
2189
+ * @param root the current walk root
2190
+ */
2191
+ const _sanitizeNode = function _sanitizeNode(node, root) {
2192
+ _sanitizeElements(node, root);
2193
+ _sanitizeAttributes(node, root);
2194
+ if (_isDocumentFragment(node.content)) _sanitizeShadowDOM2(node.content);
2195
+ };
2196
+ /**
2197
+ * _sanitizeShadowDOM
2198
+ *
2199
+ * @param fragment to iterate over recursively
2200
+ */
2201
+ const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {
2202
+ let shadowNode = null;
2203
+ const shadowIterator = _createNodeIterator(fragment);
2204
+ _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
2205
+ while (shadowNode = shadowIterator.nextNode()) {
2206
+ _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
2207
+ _sanitizeNode(shadowNode, fragment);
2208
+ if (_readNodeType(shadowNode) === NODE_TYPE.element) {
2209
+ const innerSr = getShadowRoot(shadowNode);
2210
+ if (_isDocumentFragment(innerSr)) {
2211
+ _sanitizeAttachedShadowRoots(innerSr);
2212
+ _sanitizeShadowDOM2(innerSr);
2213
+ }
2214
+ }
2215
+ }
2216
+ if (SAFE_FOR_TEMPLATES) _scrubOwnCharacterData(fragment);
2217
+ _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
2218
+ };
2219
+ /**
2220
+ * Sanitizes every attached shadow root under `root`, since the node
2221
+ * iterator does not enter shadow trees. Needed for IN_PLACE input and for
2222
+ * DOM input whose clonable shadow roots were copied by importNode().
2223
+ *
2224
+ * @param root the subtree root to walk for attached shadow roots
2225
+ */
2226
+ const _sanitizeAttachedShadowRoots = function _sanitizeAttachedShadowRoots(root) {
2227
+ const stack = [{
2228
+ node: root,
2229
+ shadow: null
2230
+ }];
2231
+ while (stack.length > 0) {
2232
+ const item = stack.pop();
2233
+ if (item.shadow) {
2234
+ _sanitizeShadowDOM2(item.shadow);
2235
+ continue;
2236
+ }
2237
+ const node = item.node;
2238
+ const isElement = _readNodeType(node) === NODE_TYPE.element;
2239
+ const childNodes = getChildNodes(node);
2240
+ if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push({
2241
+ node: childNodes[i],
2242
+ shadow: null
2243
+ });
2244
+ if (isElement) {
2245
+ const rootName = getNodeName ? getNodeName(node) : null;
2246
+ if (typeof rootName === "string" && transformCaseFunc(rootName) === "template") {
2247
+ const content = node.content;
2248
+ if (_isDocumentFragment(content)) stack.push({
2249
+ node: content,
2250
+ shadow: null
2251
+ });
2252
+ }
2253
+ }
2254
+ if (isElement) {
2255
+ const sr = getShadowRoot(node);
2256
+ if (_isDocumentFragment(sr)) stack.push({
2257
+ node: null,
2258
+ shadow: sr
2259
+ }, {
2260
+ node: sr,
2261
+ shadow: null
2262
+ });
2263
+ }
2264
+ }
2265
+ };
2266
+ DOMPurify.sanitize = function(dirty) {
2267
+ let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2268
+ let body = null;
2269
+ let importedNode = null;
2270
+ let currentNode = null;
2271
+ let returnNode = null;
2272
+ IS_EMPTY_INPUT = !dirty;
2273
+ if (IS_EMPTY_INPUT) dirty = "<!-->";
2274
+ if (typeof dirty !== "string" && !_isNode(dirty)) {
2275
+ dirty = stringifyValue(dirty);
2276
+ if (typeof dirty !== "string") throw typeErrorCreate("dirty is not a string, aborting");
2277
+ }
2278
+ if (!DOMPurify.isSupported) return dirty;
2279
+ if (SET_CONFIG) {
2280
+ ALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;
2281
+ ALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;
2282
+ } else _parseConfig(cfg);
2283
+ DOMPurify.removed = [];
2284
+ const inPlace = IN_PLACE && typeof dirty !== "string" && _isNode(dirty);
2285
+ let inPlaceNodes = [];
2286
+ const outerVisited = IN_PLACE_VISITED;
2287
+ if (inPlace) {
2288
+ _neutralizePatchLinkage(dirty);
2289
+ const nn = _readNodeName(dirty);
2290
+ if (typeof nn === "string") {
2291
+ const tagName = transformCaseFunc(nn);
2292
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
2293
+ _neutralizeRoot(dirty);
2294
+ throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
2295
+ }
2296
+ }
2297
+ if (_isClobbered(dirty)) {
2298
+ _neutralizeRoot(dirty);
2299
+ throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
2300
+ }
2301
+ inPlaceNodes = _collectLiveNodes(dirty);
2302
+ IN_PLACE_VISITED = setCreate();
2303
+ } else if (_isNode(dirty)) {
2304
+ body = _initDocument("<!---->");
2305
+ importedNode = body.ownerDocument.importNode(dirty, true);
2306
+ if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY") body = importedNode;
2307
+ else if (importedNode.nodeName === "HTML") body = importedNode;
2308
+ else body.appendChild(importedNode);
2309
+ _sanitizeAttachedShadowRoots(body);
2310
+ } else {
2311
+ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && dirty.indexOf("<") === -1) return _signOutput(dirty);
2312
+ body = _initDocument(dirty);
2313
+ if (!body) return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
2314
+ }
2315
+ if (body && FORCE_BODY) _forceRemove(body.firstChild);
2316
+ const walkRoot = inPlace ? dirty : body;
2317
+ try {
2318
+ if (inPlace) _sanitizeAttachedShadowRoots(dirty);
2319
+ const nodeIterator = _createNodeIterator(walkRoot);
2320
+ while (currentNode = nodeIterator.nextNode()) _sanitizeNode(currentNode, walkRoot);
2321
+ if (inPlace) _sanitizeUnvisitedNodes(dirty, inPlaceNodes);
2322
+ } catch (error) {
2323
+ if (inPlace) {
2324
+ _neutralizeRoot(dirty);
2325
+ _neutralizeDiscarded(dirty, inPlaceNodes);
2326
+ }
2327
+ throw error;
2328
+ } finally {
2329
+ IN_PLACE_VISITED = outerVisited;
2330
+ }
2331
+ if (inPlace) {
2332
+ if (_neutralizeDiscarded(dirty, inPlaceNodes)) throw typeErrorCreate("a node selected for removal could not be safely returned; refusing to sanitize in place");
2333
+ if (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(dirty);
2334
+ return dirty;
2335
+ }
2336
+ if (RETURN_DOM) {
2337
+ if (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(body);
2338
+ if (RETURN_DOM_FRAGMENT) {
2339
+ returnNode = createDocumentFragment.call(body.ownerDocument);
2340
+ while (body.firstChild) returnNode.appendChild(body.firstChild);
2341
+ } else returnNode = body;
2342
+ if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) returnNode = importNode.call(originalDocument, returnNode, true);
2343
+ return returnNode;
2344
+ }
2345
+ const serialize = () => WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
2346
+ let serializedHTML = serialize();
2347
+ if (SAFE_FOR_TEMPLATES && regExpTest(TMPL_MARKER_SERIALIZED, serializedHTML)) {
2348
+ _scrubOwnCharacterData(body);
2349
+ serializedHTML = serialize();
2350
+ }
2351
+ if (WHOLE_DOCUMENT && ALLOWED_TAGS["!doctype"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
2352
+ return _signOutput(serializedHTML);
2353
+ };
2354
+ DOMPurify.setConfig = function() {
2355
+ let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2356
+ _parseConfig(cfg);
2357
+ SET_CONFIG = true;
2358
+ SET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;
2359
+ SET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;
2360
+ };
2361
+ DOMPurify.clearConfig = function() {
2362
+ CONFIG = null;
2363
+ SET_CONFIG = false;
2364
+ SET_CONFIG_ALLOWED_TAGS = null;
2365
+ SET_CONFIG_ALLOWED_ATTR = null;
2366
+ trustedTypesPolicy = defaultTrustedTypesPolicy;
2367
+ emptyHTML = "";
2368
+ };
2369
+ DOMPurify.isValidAttribute = function(tag, attr, value) {
2370
+ if (!CONFIG) _parseConfig({});
2371
+ const lcTag = transformCaseFunc(tag);
2372
+ const lcName = transformCaseFunc(attr);
2373
+ if (typeof value === "string" && (_isUnsafeAttributeValue(attr, value) || !ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value))) return false;
2374
+ return _isValidAttribute(lcTag, lcName, value);
2375
+ };
2376
+ DOMPurify.addHook = function(entryPoint, hookFunction) {
2377
+ if (typeof hookFunction !== "function") return;
2378
+ if (!objectHasOwnProperty(hooks, entryPoint)) return;
2379
+ arrayPush(hooks[entryPoint], hookFunction);
2380
+ };
2381
+ DOMPurify.removeHook = function(entryPoint, hookFunction) {
2382
+ if (!objectHasOwnProperty(hooks, entryPoint)) return;
2383
+ if (hookFunction !== void 0) {
2384
+ const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
2385
+ return index === -1 ? void 0 : arraySplice(hooks[entryPoint], index, 1)[0];
2386
+ }
2387
+ return arrayPop(hooks[entryPoint]);
2388
+ };
2389
+ DOMPurify.removeHooks = function(entryPoint) {
2390
+ if (!objectHasOwnProperty(hooks, entryPoint)) return;
2391
+ hooks[entryPoint] = [];
2392
+ };
2393
+ DOMPurify.removeAllHooks = function() {
2394
+ hooks = _createHooksMap();
2395
+ };
2396
+ return DOMPurify;
2397
+ }
2398
+ var purify_default = createDOMPurify();
2399
+
2400
+ export { purify_default as default };
2401
+ //# sourceMappingURL=purify.es.js.map