q2-tecton-elements 1.49.2 → 1.50.1

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 (703) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +2 -2
  2. package/dist/cjs/{index-42fcd170.js → index-43010ce4.js} +1 -1
  3. package/dist/cjs/{index-42fcd170.js.map → index-43010ce4.js.map} +1 -1
  4. package/dist/cjs/index-64d8b839.js +1580 -0
  5. package/dist/cjs/index-64d8b839.js.map +1 -0
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/q2-action-sheet.cjs.entry.js +5 -5
  8. package/dist/cjs/q2-action-sheet.cjs.entry.js.map +1 -1
  9. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  10. package/dist/cjs/{q2-input.cjs.entry.js → q2-badge_7.cjs.entry.js} +1284 -3
  11. package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -0
  12. package/dist/cjs/q2-calendar.cjs.entry.js +3 -3
  13. package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
  14. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  15. package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
  16. package/dist/cjs/q2-carousel-pane.cjs.entry.js.map +1 -1
  17. package/dist/cjs/q2-carousel.cjs.entry.js +131 -149
  18. package/dist/cjs/q2-carousel.cjs.entry.js.map +1 -1
  19. package/dist/cjs/q2-chart-area.cjs.entry.js +3 -3
  20. package/dist/cjs/q2-chart-area.cjs.entry.js.map +1 -1
  21. package/dist/cjs/q2-chart-bar.cjs.entry.js +3 -3
  22. package/dist/cjs/q2-chart-bar.cjs.entry.js.map +1 -1
  23. package/dist/cjs/q2-chart-donut.cjs.entry.js +2 -2
  24. package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
  25. package/dist/cjs/q2-checkbox.cjs.entry.js +2 -2
  26. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  27. package/dist/cjs/q2-data-table.cjs.entry.js +62 -2
  28. package/dist/cjs/q2-data-table.cjs.entry.js.map +1 -1
  29. package/dist/cjs/q2-detail.cjs.entry.js +2 -2
  30. package/dist/cjs/q2-dropdown-item.cjs.entry.js +11 -13
  31. package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
  32. package/dist/cjs/q2-dropdown.cjs.entry.js +62 -58
  33. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  34. package/dist/cjs/q2-editable-field.cjs.entry.js +4 -4
  35. package/dist/cjs/q2-editable-field.cjs.entry.js.map +1 -1
  36. package/dist/cjs/q2-item.cjs.entry.js +3 -3
  37. package/dist/cjs/q2-item.cjs.entry.js.map +1 -1
  38. package/dist/cjs/q2-legend.cjs.entry.js +2 -2
  39. package/dist/cjs/q2-legend.cjs.entry.js.map +1 -1
  40. package/dist/cjs/q2-list.cjs.entry.js +2 -2
  41. package/dist/cjs/q2-loc.cjs.entry.js +2 -2
  42. package/dist/cjs/q2-message.cjs.entry.js +2 -2
  43. package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
  44. package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
  45. package/dist/cjs/q2-option-list.cjs.entry.js +13 -11
  46. package/dist/cjs/q2-option-list.cjs.entry.js.map +1 -1
  47. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  48. package/dist/cjs/q2-pagination.cjs.entry.js +3 -3
  49. package/dist/cjs/q2-pill.cjs.entry.js +95 -36
  50. package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
  51. package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
  52. package/dist/cjs/q2-radio.cjs.entry.js +2 -2
  53. package/dist/cjs/q2-relative-time.cjs.entry.js +3 -3
  54. package/dist/cjs/q2-section.cjs.entry.js +4 -4
  55. package/dist/cjs/q2-section.cjs.entry.js.map +1 -1
  56. package/dist/cjs/q2-select.cjs.entry.js +19 -18
  57. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  58. package/dist/cjs/q2-stepper-pane.cjs.entry.js +2 -2
  59. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
  60. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  61. package/dist/cjs/q2-tag.cjs.entry.js +33 -6
  62. package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
  63. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  64. package/dist/cjs/q2-textarea.cjs.entry.js +2 -2
  65. package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
  66. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  67. package/dist/collection/collection-manifest.json +7 -8
  68. package/dist/collection/components/click-elsewhere/click-elsewhere.js.map +1 -1
  69. package/dist/{test/elements → collection/components/click-elsewhere/test}/click-elsewhere-test.e2e.js +1 -1
  70. package/dist/collection/components/click-elsewhere/test/click-elsewhere-test.e2e.js.map +1 -0
  71. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +5 -5
  72. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js.map +1 -1
  73. package/dist/{test/elements → collection/components/q2-action-sheet/test}/q2-action-sheet-test.e2e.js +29 -1
  74. package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.e2e.js.map +1 -0
  75. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  76. package/dist/collection/components/q2-avatar/q2-avatar.js.map +1 -1
  77. package/dist/{test/elements → collection/components/q2-avatar/test}/q2-avatar-test.e2e.js +1 -1
  78. package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js.map +1 -0
  79. package/dist/collection/components/q2-badge/q2-badge.js +0 -1
  80. package/dist/collection/components/q2-badge/q2-badge.js.map +1 -1
  81. package/dist/{test/elements → collection/components/q2-badge/test}/q2-badge-test.e2e.js +1 -1
  82. package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js.map +1 -0
  83. package/dist/collection/components/q2-btn/q2-btn.css +1 -0
  84. package/dist/collection/components/q2-btn/q2-btn.js +3 -15
  85. package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
  86. package/dist/{test/elements → collection/components/q2-btn/test}/q2-btn-test.e2e.js +36 -1
  87. package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -0
  88. package/dist/collection/components/q2-calendar/q2-calendar-helpers.js.map +1 -1
  89. package/dist/collection/components/q2-calendar/q2-calendar-types.js.map +1 -1
  90. package/dist/collection/components/q2-calendar/q2-calendar-validation.js.map +1 -1
  91. package/dist/collection/components/q2-calendar/q2-calendar.js +1 -1
  92. package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
  93. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  94. package/dist/collection/components/q2-calendar/q2-month-picker.js.map +1 -1
  95. package/dist/{test/elements/q2-calendar → collection/components/q2-calendar/test}/helpers-test.e2e.js +2 -2
  96. package/dist/collection/components/q2-calendar/test/helpers-test.e2e.js.map +1 -0
  97. package/dist/{test/elements → collection/components/q2-calendar/test}/q2-calendar-month-picker-test.e2e.js +1 -1
  98. package/dist/collection/components/q2-calendar/test/q2-calendar-month-picker-test.e2e.js.map +1 -0
  99. package/dist/{test/elements → collection/components/q2-calendar/test}/q2-calendar-test.e2e.js +3 -3
  100. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -0
  101. package/dist/{test/elements/q2-calendar → collection/components/q2-calendar/test}/validation-test.e2e.js +2 -2
  102. package/dist/collection/components/q2-calendar/test/validation-test.e2e.js.map +1 -0
  103. package/dist/collection/components/q2-card/q2-card.js.map +1 -1
  104. package/dist/{test/elements → collection/components/q2-card/test}/q2-card-test.e2e.js +1 -1
  105. package/dist/collection/components/q2-card/test/q2-card-test.e2e.js.map +1 -0
  106. package/dist/collection/components/q2-carousel/q2-carousel.js +190 -164
  107. package/dist/collection/components/q2-carousel/q2-carousel.js.map +1 -1
  108. package/dist/{test/elements → collection/components/q2-carousel/test}/q2-carousel-test.e2e.js +175 -188
  109. package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js.map +1 -0
  110. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +5 -5
  111. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js.map +1 -1
  112. package/dist/{test/elements → collection/components/q2-carousel-pane/test}/q2-carousel-pane-test.e2e.js +1 -1
  113. package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.e2e.js.map +1 -0
  114. package/dist/{test/elements → collection/components/q2-carousel-pane/test}/q2-carousel-pane-test.spec.js +1 -1
  115. package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.spec.js.map +1 -0
  116. package/dist/collection/components/q2-chart-area/q2-chart-area.js +20 -20
  117. package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
  118. package/dist/{test/elements → collection/components/q2-chart-area/test}/q2-chart-area-test.e2e.js +1 -1
  119. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -0
  120. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +20 -20
  121. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js.map +1 -1
  122. package/dist/{test/elements → collection/components/q2-chart-bar/test}/q2-chart-bar-test.e2e.js +1 -1
  123. package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js.map +1 -0
  124. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
  125. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
  126. package/dist/{test/elements → collection/components/q2-chart-donut/test}/q2-chart-donut-test.e2e.js +1 -1
  127. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -0
  128. package/dist/collection/components/q2-checkbox/q2-checkbox.js +1 -1
  129. package/dist/collection/components/q2-checkbox/q2-checkbox.js.map +1 -1
  130. package/dist/{test/elements → collection/components/q2-checkbox/test}/q2-checkbox-test.e2e.js +1 -1
  131. package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js.map +1 -0
  132. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +1 -1
  133. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
  134. package/dist/{test/elements → collection/components/q2-checkbox-group/test}/q2-checkbox-group-test.e2e.js +1 -1
  135. package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js.map +1 -0
  136. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  137. package/dist/collection/components/q2-currency/q2-currency.js.map +1 -1
  138. package/dist/{test/elements → collection/components/q2-currency/test}/q2-currency-test.e2e.js +2 -2
  139. package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -0
  140. package/dist/collection/components/q2-data-table/q2-data-table.js +240 -7
  141. package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
  142. package/dist/{test/elements → collection/components/q2-data-table/test}/q2-data-table-test.e2e.js +64 -2
  143. package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -0
  144. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  145. package/dist/collection/components/q2-detail/q2-detail.js.map +1 -1
  146. package/dist/{test/elements/q2-detail → collection/components/q2-detail/test}/q2-detail-test.e2e.js +3 -3
  147. package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js.map +1 -0
  148. package/dist/collection/components/q2-dropdown/q2-dropdown.js +65 -57
  149. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  150. package/dist/{test/elements → collection/components/q2-dropdown/test}/q2-dropdown-test.e2e.js +165 -120
  151. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -0
  152. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +10 -12
  153. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
  154. package/dist/{test/elements → collection/components/q2-dropdown-item/test}/q2-dropdown-item-test.e2e.js +5 -13
  155. package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -0
  156. package/dist/collection/components/q2-editable-field/q2-editable-field.js +3 -3
  157. package/dist/collection/components/q2-editable-field/q2-editable-field.js.map +1 -1
  158. package/dist/{test/elements → collection/components/q2-editable-field/test}/q2-editable-field-test.e2e.js +1 -4
  159. package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js.map +1 -0
  160. package/dist/collection/components/q2-icon/q2-icon-types.js.map +1 -1
  161. package/dist/collection/components/q2-icon/q2-icon.js.map +1 -1
  162. package/dist/{test/elements → collection/components/q2-icon/test}/q2-icon-test.e2e.js +2 -2
  163. package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js.map +1 -0
  164. package/dist/collection/components/q2-input/formatting/alpha.js.map +1 -1
  165. package/dist/collection/components/q2-input/formatting/alphanumeric.js.map +1 -1
  166. package/dist/collection/components/q2-input/formatting/credit-card.js.map +1 -1
  167. package/dist/collection/components/q2-input/formatting/credit-card.spec.js.map +1 -1
  168. package/dist/collection/components/q2-input/formatting/currency.js.map +1 -1
  169. package/dist/collection/components/q2-input/formatting/date.js.map +1 -1
  170. package/dist/collection/components/q2-input/formatting/generic.js.map +1 -1
  171. package/dist/collection/components/q2-input/formatting/number.js.map +1 -1
  172. package/dist/collection/components/q2-input/formatting/numeric.js.map +1 -1
  173. package/dist/collection/components/q2-input/formatting/phone.js.map +1 -1
  174. package/dist/collection/components/q2-input/formatting/postal.js.map +1 -1
  175. package/dist/collection/components/q2-input/formatting/ssn.js.map +1 -1
  176. package/dist/collection/components/q2-input/formatting/tin.js.map +1 -1
  177. package/dist/collection/components/q2-input/q2-input-types.js.map +1 -1
  178. package/dist/collection/components/q2-input/q2-input.js +2 -2
  179. package/dist/collection/components/q2-input/q2-input.js.map +1 -1
  180. package/dist/{test/elements → collection/components/q2-input/test}/q2-input-credit-card-test.e2e.js +1 -1
  181. package/dist/collection/components/q2-input/test/q2-input-credit-card-test.e2e.js.map +1 -0
  182. package/dist/{test/elements → collection/components/q2-input/test}/q2-input-test.e2e.js +1 -1
  183. package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -0
  184. package/dist/collection/components/q2-item/q2-item.css +3 -3
  185. package/dist/collection/components/q2-item/q2-item.js +1 -1
  186. package/dist/collection/components/q2-item/q2-item.js.map +1 -1
  187. package/dist/{test/elements → collection/components/q2-item/test}/q2-item-test.e2e.js +1 -1
  188. package/dist/collection/components/q2-item/test/q2-item-test.e2e.js.map +1 -0
  189. package/dist/{test/elements → collection/components/q2-item/test}/q2-item-test.spec.js +1 -1
  190. package/dist/collection/components/q2-item/test/q2-item-test.spec.js.map +1 -0
  191. package/dist/collection/components/q2-legend/q2-legend.css +6 -6
  192. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  193. package/dist/collection/components/q2-legend/q2-legend.js.map +1 -1
  194. package/dist/{test/elements → collection/components/q2-legend/test}/q2-legend-test.e2e.js +1 -1
  195. package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js.map +1 -0
  196. package/dist/{test/elements → collection/components/q2-legend/test}/q2-legend-test.spec.js +1 -1
  197. package/dist/collection/components/q2-legend/test/q2-legend-test.spec.js.map +1 -0
  198. package/dist/collection/components/q2-list/q2-list.js +1 -1
  199. package/dist/collection/components/q2-list/q2-list.js.map +1 -1
  200. package/dist/{test/elements/q2-detail → collection/components/q2-list/test}/q2-list-test.e2e.js +1 -1
  201. package/dist/collection/components/q2-list/test/q2-list-test.e2e.js.map +1 -0
  202. package/dist/collection/components/q2-loading/q2-loading.js.map +1 -1
  203. package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js.map +1 -1
  204. package/dist/collection/components/q2-loading/skeleton/shapes.js.map +1 -1
  205. package/dist/{test/elements → collection/components/q2-loading/test}/q2-loading-element-test.e2e.js +1 -1
  206. package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js.map +1 -0
  207. package/dist/{test/elements → collection/components/q2-loading/test}/q2-loading-test.e2e.js +1 -1
  208. package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js.map +1 -0
  209. package/dist/collection/components/q2-loc/q2-loc.js +1 -1
  210. package/dist/collection/components/q2-loc/q2-loc.js.map +1 -1
  211. package/dist/{test/elements → collection/components/q2-loc/test}/q2-loc-test.e2e.js +1 -1
  212. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -0
  213. package/dist/collection/components/q2-message/q2-message.js +1 -1
  214. package/dist/collection/components/q2-message/q2-message.js.map +1 -1
  215. package/dist/{test/elements → collection/components/q2-message/test}/q2-message-test.e2e.js +1 -1
  216. package/dist/collection/components/q2-message/test/q2-message-test.e2e.js.map +1 -0
  217. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  218. package/dist/collection/components/q2-optgroup/q2-optgroup.js.map +1 -1
  219. package/dist/{test/elements → collection/components/q2-optgroup/test}/q2-optgroup-test.e2e.js +1 -1
  220. package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js.map +1 -0
  221. package/dist/collection/components/q2-option/q2-option.js +1 -1
  222. package/dist/collection/components/q2-option/q2-option.js.map +1 -1
  223. package/dist/{test/elements → collection/components/q2-option/test}/q2-option-test.e2e.js +1 -1
  224. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -0
  225. package/dist/collection/components/q2-option-list/q2-option-list.js +15 -13
  226. package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
  227. package/dist/{test/elements → collection/components/q2-option-list/test}/q2-option-list-test.e2e.js +1 -1
  228. package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js.map +1 -0
  229. package/dist/collection/components/q2-pagination/q2-pagination.js +2 -2
  230. package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
  231. package/dist/{test/elements → collection/components/q2-pagination/test}/q2-pagination-test.e2e.js +1 -1
  232. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -0
  233. package/dist/collection/components/q2-pill/q2-pill.js +172 -37
  234. package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
  235. package/dist/{test/elements → collection/components/q2-pill/test}/q2-pill-test.e2e.js +484 -392
  236. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -0
  237. package/dist/collection/components/q2-popover/q2-popover.js +1 -1
  238. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  239. package/dist/{test/elements → collection/components/q2-popover/test}/q2-popover-test.e2e.js +2 -2
  240. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js.map +1 -0
  241. package/dist/{test/elements → collection/components/q2-popover/test}/q2-popover-test.spec.js +1 -1
  242. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -0
  243. package/dist/collection/components/q2-radio/q2-radio.js +1 -1
  244. package/dist/collection/components/q2-radio/q2-radio.js.map +1 -1
  245. package/dist/{test/elements → collection/components/q2-radio/test}/q2-radio-test.e2e.js +1 -1
  246. package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js.map +1 -0
  247. package/dist/collection/components/q2-radio-group/q2-radio-group.js +1 -1
  248. package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
  249. package/dist/{test/elements → collection/components/q2-radio-group/test}/q2-radio-group-test.e2e.js +1 -1
  250. package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js.map +1 -0
  251. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  252. package/dist/collection/components/q2-relative-time/q2-relative-time.js.map +1 -1
  253. package/dist/{test/elements → collection/components/q2-relative-time/test}/q2-relative-time-test.e2e.js +2 -2
  254. package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js.map +1 -0
  255. package/dist/collection/components/q2-section/q2-section.css +1 -1
  256. package/dist/collection/components/q2-section/q2-section.js +2 -2
  257. package/dist/collection/components/q2-section/q2-section.js.map +1 -1
  258. package/dist/{test/elements → collection/components/q2-section/test}/q2-section-test.e2e.js +12 -7
  259. package/dist/collection/components/q2-section/test/q2-section-test.e2e.js.map +1 -0
  260. package/dist/collection/components/q2-select/q2-select.js +18 -17
  261. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  262. package/dist/{test/elements → collection/components/q2-select/test}/q2-select-test.e2e.js +20 -2
  263. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -0
  264. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  265. package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
  266. package/dist/{test/elements → collection/components/q2-stepper/test}/q2-stepper-test.e2e.js +1 -1
  267. package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js.map +1 -0
  268. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +3 -3
  269. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js.map +1 -1
  270. package/dist/{test/elements → collection/components/q2-stepper-pane/test}/q2-stepper-pane-test.e2e.js +1 -1
  271. package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js.map +1 -0
  272. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  273. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js.map +1 -1
  274. package/dist/{test/elements → collection/components/q2-stepper-vertical/test}/q2-stepper-vertical-test.e2e.js +1 -1
  275. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -0
  276. package/dist/collection/components/q2-tab-container/q2-tab-container.js +21 -20
  277. package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
  278. package/dist/{test/elements → collection/components/q2-tab-container/test}/q2-tab-container-test.e2e.js +1 -1
  279. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js.map +1 -0
  280. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.spec.js +54 -0
  281. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.spec.js.map +1 -0
  282. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  283. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js.map +1 -1
  284. package/dist/{test/elements → collection/components/q2-tab-pane/test}/q2-tab-pane-test.e2e.js +1 -1
  285. package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js.map +1 -0
  286. package/dist/collection/components/q2-tag/q2-tag.js +92 -6
  287. package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
  288. package/dist/{test/elements → collection/components/q2-tag/test}/q2-tag-test.e2e.js +40 -8
  289. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -0
  290. package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
  291. package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
  292. package/dist/{test/elements → collection/components/q2-textarea/test}/q2-textarea-test.e2e.js +1 -1
  293. package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js.map +1 -0
  294. package/dist/collection/components/q2-tooltip/q2-tooltip.js.map +1 -1
  295. package/dist/{test/elements → collection/components/q2-tooltip/test}/q2-tooltip-test.e2e.js +1 -1
  296. package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js.map +1 -0
  297. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane-types.js.map +1 -1
  298. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  299. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js.map +1 -1
  300. package/dist/{test/elements → collection/components/tecton-tab-pane/test}/tecton-tab-pane-test.e2e.js +1 -1
  301. package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js.map +1 -0
  302. package/dist/collection/index.js.map +1 -1
  303. package/dist/collection/utils/action-sheet.js.map +1 -1
  304. package/dist/collection/utils/charting.js.map +1 -1
  305. package/dist/{test → collection/utils}/helpers.js +1 -1
  306. package/dist/collection/utils/helpers.js.map +1 -0
  307. package/dist/collection/utils/index.js +9 -0
  308. package/dist/collection/utils/index.js.map +1 -1
  309. package/dist/{test/utils → collection/utils/test}/action-sheet-test.e2e.js +1 -1
  310. package/dist/collection/utils/test/action-sheet-test.e2e.js.map +1 -0
  311. package/dist/{test/utils → collection/utils/test}/index.spec.js +1 -1
  312. package/dist/collection/utils/test/index.spec.js.map +1 -0
  313. package/dist/components/action-sheet.js +1 -1
  314. package/dist/components/index.js +0 -2
  315. package/dist/components/index.js.map +1 -1
  316. package/dist/components/index2.js +1355 -1
  317. package/dist/components/index2.js.map +1 -1
  318. package/dist/components/q2-action-sheet.js +5 -5
  319. package/dist/components/q2-action-sheet.js.map +1 -1
  320. package/dist/components/q2-avatar2.js +1 -1
  321. package/dist/components/q2-badge2.js.map +1 -1
  322. package/dist/components/q2-btn2.js +6 -12
  323. package/dist/components/q2-btn2.js.map +1 -1
  324. package/dist/components/q2-calendar.js +1 -1
  325. package/dist/components/q2-calendar.js.map +1 -1
  326. package/dist/components/q2-carousel-pane.js +2 -2
  327. package/dist/components/q2-carousel-pane.js.map +1 -1
  328. package/dist/components/q2-carousel.js +133 -154
  329. package/dist/components/q2-carousel.js.map +1 -1
  330. package/dist/components/q2-chart-area.js +3 -3
  331. package/dist/components/q2-chart-area.js.map +1 -1
  332. package/dist/components/q2-chart-bar.js +4 -4
  333. package/dist/components/q2-chart-bar.js.map +1 -1
  334. package/dist/components/q2-chart-donut.js +1 -1
  335. package/dist/components/q2-checkbox-group.js +1 -1
  336. package/dist/components/q2-checkbox2.js +1 -1
  337. package/dist/components/q2-currency.js +1 -1
  338. package/dist/components/q2-data-table.js +68 -2
  339. package/dist/components/q2-data-table.js.map +1 -1
  340. package/dist/components/q2-detail.js +1 -1
  341. package/dist/components/q2-dropdown-item2.js +10 -12
  342. package/dist/components/q2-dropdown-item2.js.map +1 -1
  343. package/dist/components/q2-dropdown.js +61 -57
  344. package/dist/components/q2-dropdown.js.map +1 -1
  345. package/dist/components/q2-editable-field.js +3 -3
  346. package/dist/components/q2-editable-field.js.map +1 -1
  347. package/dist/components/q2-input2.js +2 -2
  348. package/dist/components/q2-item.js +2 -2
  349. package/dist/components/q2-item.js.map +1 -1
  350. package/dist/components/q2-legend2.js +2 -2
  351. package/dist/components/q2-legend2.js.map +1 -1
  352. package/dist/components/q2-list.js +1 -1
  353. package/dist/components/q2-loc.js +1 -1
  354. package/dist/components/q2-message2.js +2 -2
  355. package/dist/components/q2-month-picker.js +2 -2
  356. package/dist/components/q2-optgroup2.js +1 -1
  357. package/dist/components/q2-option-list2.js +13 -11
  358. package/dist/components/q2-option-list2.js.map +1 -1
  359. package/dist/components/q2-option2.js +1 -1
  360. package/dist/components/q2-pagination.js +2 -2
  361. package/dist/components/q2-pill.js +100 -38
  362. package/dist/components/q2-pill.js.map +1 -1
  363. package/dist/components/q2-popover2.js +2 -2
  364. package/dist/components/q2-radio-group.js +1 -1
  365. package/dist/components/q2-radio.js +1 -1
  366. package/dist/components/q2-relative-time.js +1 -1
  367. package/dist/components/q2-section.js +3 -3
  368. package/dist/components/q2-section.js.map +1 -1
  369. package/dist/components/q2-select2.js +20 -19
  370. package/dist/components/q2-select2.js.map +1 -1
  371. package/dist/components/q2-stepper-pane.js +1 -1
  372. package/dist/components/q2-stepper-vertical.js +1 -1
  373. package/dist/components/q2-stepper.js +1 -1
  374. package/dist/components/q2-tab-container.js +21 -20
  375. package/dist/components/q2-tab-container.js.map +1 -1
  376. package/dist/components/q2-tab-pane.js +1 -1
  377. package/dist/components/q2-tag.js +38 -8
  378. package/dist/components/q2-tag.js.map +1 -1
  379. package/dist/components/q2-textarea.js +2 -2
  380. package/dist/components/tecton-tab-pane.js +2 -2
  381. package/dist/esm/{action-sheet-dd527168.js → action-sheet-e64cb6f7.js} +2 -2
  382. package/dist/esm/{action-sheet-dd527168.js.map → action-sheet-e64cb6f7.js.map} +1 -1
  383. package/dist/esm/click-elsewhere_2.entry.js +2 -2
  384. package/dist/esm/index-4a80972c.js +1556 -0
  385. package/dist/esm/index-4a80972c.js.map +1 -0
  386. package/dist/esm/{index-1c019b24.js → index-c6d74f10.js} +1 -1
  387. package/dist/esm/{index-1c019b24.js.map → index-c6d74f10.js.map} +1 -1
  388. package/dist/esm/loader.js +1 -1
  389. package/dist/esm/q2-action-sheet.entry.js +5 -5
  390. package/dist/esm/q2-action-sheet.entry.js.map +1 -1
  391. package/dist/esm/q2-avatar.entry.js +1 -1
  392. package/dist/esm/{q2-input.entry.js → q2-badge_7.entry.js} +1280 -5
  393. package/dist/esm/q2-badge_7.entry.js.map +1 -0
  394. package/dist/esm/q2-calendar.entry.js +3 -3
  395. package/dist/esm/q2-calendar.entry.js.map +1 -1
  396. package/dist/esm/q2-card.entry.js +1 -1
  397. package/dist/esm/q2-carousel-pane.entry.js +3 -3
  398. package/dist/esm/q2-carousel-pane.entry.js.map +1 -1
  399. package/dist/esm/q2-carousel.entry.js +131 -149
  400. package/dist/esm/q2-carousel.entry.js.map +1 -1
  401. package/dist/esm/q2-chart-area.entry.js +3 -3
  402. package/dist/esm/q2-chart-area.entry.js.map +1 -1
  403. package/dist/esm/q2-chart-bar.entry.js +3 -3
  404. package/dist/esm/q2-chart-bar.entry.js.map +1 -1
  405. package/dist/esm/q2-chart-donut.entry.js +2 -2
  406. package/dist/esm/q2-checkbox-group.entry.js +2 -2
  407. package/dist/esm/q2-checkbox.entry.js +2 -2
  408. package/dist/esm/q2-currency.entry.js +1 -1
  409. package/dist/esm/q2-data-table.entry.js +62 -2
  410. package/dist/esm/q2-data-table.entry.js.map +1 -1
  411. package/dist/esm/q2-detail.entry.js +2 -2
  412. package/dist/esm/q2-dropdown-item.entry.js +11 -13
  413. package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
  414. package/dist/esm/q2-dropdown.entry.js +62 -58
  415. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  416. package/dist/esm/q2-editable-field.entry.js +4 -4
  417. package/dist/esm/q2-editable-field.entry.js.map +1 -1
  418. package/dist/esm/q2-item.entry.js +3 -3
  419. package/dist/esm/q2-item.entry.js.map +1 -1
  420. package/dist/esm/q2-legend.entry.js +2 -2
  421. package/dist/esm/q2-legend.entry.js.map +1 -1
  422. package/dist/esm/q2-list.entry.js +2 -2
  423. package/dist/esm/q2-loc.entry.js +2 -2
  424. package/dist/esm/q2-message.entry.js +2 -2
  425. package/dist/esm/q2-month-picker.entry.js +3 -3
  426. package/dist/esm/q2-optgroup.entry.js +2 -2
  427. package/dist/esm/q2-option-list.entry.js +13 -11
  428. package/dist/esm/q2-option-list.entry.js.map +1 -1
  429. package/dist/esm/q2-option.entry.js +1 -1
  430. package/dist/esm/q2-pagination.entry.js +3 -3
  431. package/dist/esm/q2-pill.entry.js +96 -37
  432. package/dist/esm/q2-pill.entry.js.map +1 -1
  433. package/dist/esm/q2-radio-group.entry.js +2 -2
  434. package/dist/esm/q2-radio.entry.js +2 -2
  435. package/dist/esm/q2-relative-time.entry.js +3 -3
  436. package/dist/esm/q2-section.entry.js +4 -4
  437. package/dist/esm/q2-section.entry.js.map +1 -1
  438. package/dist/esm/q2-select.entry.js +20 -19
  439. package/dist/esm/q2-select.entry.js.map +1 -1
  440. package/dist/esm/q2-stepper-pane.entry.js +2 -2
  441. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  442. package/dist/esm/q2-stepper.entry.js +2 -2
  443. package/dist/esm/q2-tag.entry.js +34 -7
  444. package/dist/esm/q2-tag.entry.js.map +1 -1
  445. package/dist/esm/q2-tecton-elements.js +1 -1
  446. package/dist/esm/q2-textarea.entry.js +2 -2
  447. package/dist/esm/q2-tooltip.entry.js +1 -1
  448. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  449. package/dist/q2-tecton-elements/{p-da711c59.entry.js → p-072c5877.entry.js} +2 -2
  450. package/dist/q2-tecton-elements/{p-f6358905.entry.js → p-074ae80c.entry.js} +2 -2
  451. package/dist/q2-tecton-elements/p-0a1dff75.entry.js +2 -0
  452. package/dist/q2-tecton-elements/p-0a1dff75.entry.js.map +1 -0
  453. package/dist/q2-tecton-elements/{p-93680d12.entry.js → p-0a3a804a.entry.js} +2 -2
  454. package/dist/q2-tecton-elements/{p-93680d12.entry.js.map → p-0a3a804a.entry.js.map} +1 -1
  455. package/dist/q2-tecton-elements/p-259b728a.entry.js +2 -0
  456. package/dist/q2-tecton-elements/{p-77a763eb.entry.js.map → p-259b728a.entry.js.map} +1 -1
  457. package/dist/q2-tecton-elements/{p-7b9a6bb7.entry.js → p-2c26295e.entry.js} +2 -2
  458. package/dist/q2-tecton-elements/{p-bbf9d36d.entry.js → p-2ca6d44f.entry.js} +2 -2
  459. package/dist/q2-tecton-elements/{p-2bcb7e89.entry.js → p-2fcaf2d6.entry.js} +2 -2
  460. package/dist/q2-tecton-elements/p-2fcaf2d6.entry.js.map +1 -0
  461. package/dist/q2-tecton-elements/{p-0852e6fe.entry.js → p-34696e3f.entry.js} +2 -2
  462. package/dist/q2-tecton-elements/{p-1e7fa870.entry.js → p-34856c71.entry.js} +2 -2
  463. package/dist/q2-tecton-elements/p-34856c71.entry.js.map +1 -0
  464. package/dist/q2-tecton-elements/p-376a0589.entry.js +2 -0
  465. package/dist/q2-tecton-elements/p-376a0589.entry.js.map +1 -0
  466. package/dist/q2-tecton-elements/{p-630613c7.entry.js → p-395904b4.entry.js} +2 -2
  467. package/dist/q2-tecton-elements/p-3b0d3cd4.entry.js +2 -0
  468. package/dist/q2-tecton-elements/p-3b0d3cd4.entry.js.map +1 -0
  469. package/dist/q2-tecton-elements/{p-d8d9ba1f.entry.js → p-3c7be0bb.entry.js} +2 -2
  470. package/dist/q2-tecton-elements/p-3c7be0bb.entry.js.map +1 -0
  471. package/dist/q2-tecton-elements/p-403bf3d4.entry.js +2 -0
  472. package/dist/q2-tecton-elements/{p-5037fa67.entry.js.map → p-403bf3d4.entry.js.map} +1 -1
  473. package/dist/q2-tecton-elements/{p-db79c056.entry.js → p-4116579f.entry.js} +2 -2
  474. package/dist/q2-tecton-elements/{p-e0a6baea.entry.js → p-45407ecc.entry.js} +2 -2
  475. package/dist/q2-tecton-elements/{p-ec8a0b64.entry.js → p-58cafc0d.entry.js} +2 -2
  476. package/dist/q2-tecton-elements/{p-4388e521.entry.js → p-5d936af5.entry.js} +2 -2
  477. package/dist/q2-tecton-elements/p-6237c775.entry.js +2 -0
  478. package/dist/q2-tecton-elements/p-6237c775.entry.js.map +1 -0
  479. package/dist/q2-tecton-elements/{p-a177d812.entry.js → p-661ed976.entry.js} +2 -2
  480. package/dist/q2-tecton-elements/{p-da0cacef.entry.js → p-6b7c53a8.entry.js} +2 -2
  481. package/dist/q2-tecton-elements/{p-6c933b14.entry.js → p-6e6d9793.entry.js} +2 -2
  482. package/dist/q2-tecton-elements/{p-be518818.js → p-721365be.js} +1 -1
  483. package/dist/q2-tecton-elements/{p-a8e7e591.entry.js → p-77272c4c.entry.js} +2 -2
  484. package/dist/q2-tecton-elements/{p-793a453e.entry.js → p-77a0cc0c.entry.js} +2 -2
  485. package/dist/q2-tecton-elements/{p-9c589ab3.entry.js → p-8111547c.entry.js} +2 -2
  486. package/dist/q2-tecton-elements/{p-05b30f98.entry.js → p-8a4b106d.entry.js} +2 -2
  487. package/dist/q2-tecton-elements/p-8a4b106d.entry.js.map +1 -0
  488. package/dist/q2-tecton-elements/p-9a1a4bc0.js +3 -0
  489. package/dist/q2-tecton-elements/p-9a1a4bc0.js.map +1 -0
  490. package/dist/q2-tecton-elements/p-a7a0b8aa.entry.js +2 -0
  491. package/dist/q2-tecton-elements/p-a7a0b8aa.entry.js.map +1 -0
  492. package/dist/q2-tecton-elements/p-aa57b657.entry.js +2 -0
  493. package/dist/q2-tecton-elements/p-aa57b657.entry.js.map +1 -0
  494. package/dist/q2-tecton-elements/p-ad998f71.entry.js +2 -0
  495. package/dist/q2-tecton-elements/p-ad998f71.entry.js.map +1 -0
  496. package/dist/q2-tecton-elements/{p-e3ad770b.entry.js → p-adec9275.entry.js} +2 -2
  497. package/dist/q2-tecton-elements/p-adf0a7c9.entry.js +2 -0
  498. package/dist/q2-tecton-elements/p-adf0a7c9.entry.js.map +1 -0
  499. package/dist/q2-tecton-elements/p-b72fd065.entry.js +2 -0
  500. package/dist/q2-tecton-elements/p-b72fd065.entry.js.map +1 -0
  501. package/dist/q2-tecton-elements/{p-780a1d0e.js → p-b7554a79.js} +2 -2
  502. package/dist/q2-tecton-elements/{p-40df4468.entry.js → p-c0c658d1.entry.js} +2 -2
  503. package/dist/q2-tecton-elements/{p-baa2eaa9.entry.js → p-c81d299a.entry.js} +2 -2
  504. package/dist/q2-tecton-elements/p-c81d299a.entry.js.map +1 -0
  505. package/dist/q2-tecton-elements/{p-08176bd0.entry.js → p-cb3f48de.entry.js} +2 -2
  506. package/dist/q2-tecton-elements/{p-2810ba28.entry.js → p-ce4e6b41.entry.js} +2 -2
  507. package/dist/q2-tecton-elements/{p-76b98623.entry.js → p-cf32b5db.entry.js} +2 -2
  508. package/dist/q2-tecton-elements/p-cf966a0f.entry.js +2 -0
  509. package/dist/q2-tecton-elements/p-cf966a0f.entry.js.map +1 -0
  510. package/dist/q2-tecton-elements/{p-c5aac064.entry.js → p-d2e1631a.entry.js} +2 -2
  511. package/dist/q2-tecton-elements/{p-c5aac064.entry.js.map → p-d2e1631a.entry.js.map} +1 -1
  512. package/dist/q2-tecton-elements/{p-2e6669a7.entry.js → p-dc77bf66.entry.js} +2 -2
  513. package/dist/q2-tecton-elements/{p-e4b8f4b3.entry.js → p-fffb54e9.entry.js} +2 -2
  514. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  515. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  516. package/dist/types/components/q2-action-sheet/q2-action-sheet.d.ts +60 -0
  517. package/dist/types/components/q2-btn/q2-btn.d.ts +1 -2
  518. package/dist/types/components/q2-calendar/q2-calendar.d.ts +323 -0
  519. package/dist/types/components/q2-carousel/q2-carousel.d.ts +36 -25
  520. package/dist/types/components/q2-carousel-pane/q2-carousel-pane.d.ts +3 -3
  521. package/dist/types/components/q2-chart-area/q2-chart-area.d.ts +6 -6
  522. package/dist/types/components/q2-chart-bar/q2-chart-bar.d.ts +14 -14
  523. package/dist/types/components/q2-data-table/q2-data-table.d.ts +259 -0
  524. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +129 -0
  525. package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +50 -0
  526. package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +140 -0
  527. package/dist/types/components/q2-loading/skeleton/shapes.d.ts +1 -0
  528. package/dist/types/components/q2-optgroup/q2-optgroup.d.ts +1 -1
  529. package/dist/types/components/q2-option-list/q2-option-list.d.ts +99 -0
  530. package/dist/types/components/q2-pagination/q2-pagination.d.ts +60 -0
  531. package/dist/types/components/q2-pill/q2-pill.d.ts +128 -0
  532. package/dist/types/components/q2-select/q2-select.d.ts +232 -0
  533. package/dist/types/components/q2-stepper/q2-stepper.d.ts +52 -0
  534. package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +62 -0
  535. package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +5 -5
  536. package/dist/types/components/q2-tag/q2-tag.d.ts +63 -0
  537. package/dist/types/components.d.ts +77 -33
  538. package/dist/types/utils/action-sheet.d.ts +12 -0
  539. package/dist/types/{workspace/workspace/tecton-production_release_1.49.x/packages/q2-tecton-elements/.stencil/test → utils}/helpers.d.ts +1 -1
  540. package/dist/types/utils/index.d.ts +1 -0
  541. package/package.json +8 -6
  542. package/dist/cjs/index-a93362ed.js +0 -225
  543. package/dist/cjs/index-a93362ed.js.map +0 -1
  544. package/dist/cjs/q2-badge.cjs.entry.js +0 -52
  545. package/dist/cjs/q2-badge.cjs.entry.js.map +0 -1
  546. package/dist/cjs/q2-btn_2.cjs.entry.js +0 -237
  547. package/dist/cjs/q2-btn_2.cjs.entry.js.map +0 -1
  548. package/dist/cjs/q2-icon.cjs.entry.js +0 -731
  549. package/dist/cjs/q2-icon.cjs.entry.js.map +0 -1
  550. package/dist/cjs/q2-input.cjs.entry.js.map +0 -1
  551. package/dist/cjs/q2-tab-container.cjs.entry.js +0 -263
  552. package/dist/cjs/q2-tab-container.cjs.entry.js.map +0 -1
  553. package/dist/cjs/q2-tab-pane.cjs.entry.js +0 -46
  554. package/dist/cjs/q2-tab-pane.cjs.entry.js.map +0 -1
  555. package/dist/cjs/slot-component.cjs.entry.js +0 -19
  556. package/dist/cjs/slot-component.cjs.entry.js.map +0 -1
  557. package/dist/components/slot-component.d.ts +0 -11
  558. package/dist/components/slot-component.js +0 -34
  559. package/dist/components/slot-component.js.map +0 -1
  560. package/dist/esm/index-3c5cd75e.js +0 -202
  561. package/dist/esm/index-3c5cd75e.js.map +0 -1
  562. package/dist/esm/q2-badge.entry.js +0 -48
  563. package/dist/esm/q2-badge.entry.js.map +0 -1
  564. package/dist/esm/q2-btn_2.entry.js +0 -232
  565. package/dist/esm/q2-btn_2.entry.js.map +0 -1
  566. package/dist/esm/q2-icon.entry.js +0 -727
  567. package/dist/esm/q2-icon.entry.js.map +0 -1
  568. package/dist/esm/q2-input.entry.js.map +0 -1
  569. package/dist/esm/q2-tab-container.entry.js +0 -259
  570. package/dist/esm/q2-tab-container.entry.js.map +0 -1
  571. package/dist/esm/q2-tab-pane.entry.js +0 -42
  572. package/dist/esm/q2-tab-pane.entry.js.map +0 -1
  573. package/dist/esm/slot-component.entry.js +0 -15
  574. package/dist/esm/slot-component.entry.js.map +0 -1
  575. package/dist/q2-tecton-elements/p-05b30f98.entry.js.map +0 -1
  576. package/dist/q2-tecton-elements/p-089a7a1e.entry.js +0 -2
  577. package/dist/q2-tecton-elements/p-089a7a1e.entry.js.map +0 -1
  578. package/dist/q2-tecton-elements/p-1e7fa870.entry.js.map +0 -1
  579. package/dist/q2-tecton-elements/p-25bfe0b2.entry.js +0 -2
  580. package/dist/q2-tecton-elements/p-25bfe0b2.entry.js.map +0 -1
  581. package/dist/q2-tecton-elements/p-2bcb7e89.entry.js.map +0 -1
  582. package/dist/q2-tecton-elements/p-333a41ca.entry.js +0 -2
  583. package/dist/q2-tecton-elements/p-333a41ca.entry.js.map +0 -1
  584. package/dist/q2-tecton-elements/p-4da4cb5d.entry.js +0 -2
  585. package/dist/q2-tecton-elements/p-4da4cb5d.entry.js.map +0 -1
  586. package/dist/q2-tecton-elements/p-5037fa67.entry.js +0 -2
  587. package/dist/q2-tecton-elements/p-550881db.entry.js +0 -2
  588. package/dist/q2-tecton-elements/p-550881db.entry.js.map +0 -1
  589. package/dist/q2-tecton-elements/p-5775b02b.entry.js +0 -2
  590. package/dist/q2-tecton-elements/p-5775b02b.entry.js.map +0 -1
  591. package/dist/q2-tecton-elements/p-77a763eb.entry.js +0 -2
  592. package/dist/q2-tecton-elements/p-84190698.js +0 -2
  593. package/dist/q2-tecton-elements/p-84190698.js.map +0 -1
  594. package/dist/q2-tecton-elements/p-9e90a38a.entry.js +0 -2
  595. package/dist/q2-tecton-elements/p-9e90a38a.entry.js.map +0 -1
  596. package/dist/q2-tecton-elements/p-9ecabc7a.entry.js +0 -2
  597. package/dist/q2-tecton-elements/p-9ecabc7a.entry.js.map +0 -1
  598. package/dist/q2-tecton-elements/p-a657277b.entry.js +0 -2
  599. package/dist/q2-tecton-elements/p-a657277b.entry.js.map +0 -1
  600. package/dist/q2-tecton-elements/p-b3322f94.entry.js +0 -2
  601. package/dist/q2-tecton-elements/p-b3322f94.entry.js.map +0 -1
  602. package/dist/q2-tecton-elements/p-baa2eaa9.entry.js.map +0 -1
  603. package/dist/q2-tecton-elements/p-c8b4f5f7.entry.js +0 -2
  604. package/dist/q2-tecton-elements/p-c8b4f5f7.entry.js.map +0 -1
  605. package/dist/q2-tecton-elements/p-d2d3d95b.entry.js +0 -2
  606. package/dist/q2-tecton-elements/p-d2d3d95b.entry.js.map +0 -1
  607. package/dist/q2-tecton-elements/p-d78669df.entry.js +0 -2
  608. package/dist/q2-tecton-elements/p-d78669df.entry.js.map +0 -1
  609. package/dist/q2-tecton-elements/p-d8d9ba1f.entry.js.map +0 -1
  610. package/dist/q2-tecton-elements/p-dbfab45b.entry.js +0 -2
  611. package/dist/q2-tecton-elements/p-dbfab45b.entry.js.map +0 -1
  612. package/dist/q2-tecton-elements/p-e44560d9.entry.js +0 -2
  613. package/dist/q2-tecton-elements/p-e44560d9.entry.js.map +0 -1
  614. package/dist/q2-tecton-elements/p-ea7876eb.entry.js +0 -2
  615. package/dist/q2-tecton-elements/p-ea7876eb.entry.js.map +0 -1
  616. package/dist/test/elements/click-elsewhere-test.e2e.js.map +0 -1
  617. package/dist/test/elements/q2-action-sheet-test.e2e.js.map +0 -1
  618. package/dist/test/elements/q2-avatar-test.e2e.js.map +0 -1
  619. package/dist/test/elements/q2-badge-test.e2e.js.map +0 -1
  620. package/dist/test/elements/q2-btn-test.e2e.js.map +0 -1
  621. package/dist/test/elements/q2-calendar/helpers-test.e2e.js.map +0 -1
  622. package/dist/test/elements/q2-calendar/validation-test.e2e.js.map +0 -1
  623. package/dist/test/elements/q2-calendar-month-picker-test.e2e.js.map +0 -1
  624. package/dist/test/elements/q2-calendar-test.e2e.js.map +0 -1
  625. package/dist/test/elements/q2-card-test.e2e.js.map +0 -1
  626. package/dist/test/elements/q2-carousel-pane-test.e2e.js.map +0 -1
  627. package/dist/test/elements/q2-carousel-pane-test.spec.js.map +0 -1
  628. package/dist/test/elements/q2-carousel-test.e2e.js.map +0 -1
  629. package/dist/test/elements/q2-chart-area-test.e2e.js.map +0 -1
  630. package/dist/test/elements/q2-chart-bar-test.e2e.js.map +0 -1
  631. package/dist/test/elements/q2-chart-donut-test.e2e.js.map +0 -1
  632. package/dist/test/elements/q2-checkbox-group-test.e2e.js.map +0 -1
  633. package/dist/test/elements/q2-checkbox-test.e2e.js.map +0 -1
  634. package/dist/test/elements/q2-currency-test.e2e.js.map +0 -1
  635. package/dist/test/elements/q2-data-table-test.e2e.js.map +0 -1
  636. package/dist/test/elements/q2-detail/q2-detail-test.e2e.js.map +0 -1
  637. package/dist/test/elements/q2-detail/q2-list-test.e2e.js.map +0 -1
  638. package/dist/test/elements/q2-detail/slot-component.js +0 -32
  639. package/dist/test/elements/q2-detail/slot-component.js.map +0 -1
  640. package/dist/test/elements/q2-dropdown-item-test.e2e.js.map +0 -1
  641. package/dist/test/elements/q2-dropdown-test.e2e.js.map +0 -1
  642. package/dist/test/elements/q2-editable-field-test.e2e.js.map +0 -1
  643. package/dist/test/elements/q2-icon-test.e2e.js.map +0 -1
  644. package/dist/test/elements/q2-input-credit-card-test.e2e.js.map +0 -1
  645. package/dist/test/elements/q2-input-test.e2e.js.map +0 -1
  646. package/dist/test/elements/q2-item-test.e2e.js.map +0 -1
  647. package/dist/test/elements/q2-item-test.spec.js.map +0 -1
  648. package/dist/test/elements/q2-legend-test.e2e.js.map +0 -1
  649. package/dist/test/elements/q2-legend-test.spec.js.map +0 -1
  650. package/dist/test/elements/q2-loading-element-test.e2e.js.map +0 -1
  651. package/dist/test/elements/q2-loading-test.e2e.js.map +0 -1
  652. package/dist/test/elements/q2-loc-test.e2e.js.map +0 -1
  653. package/dist/test/elements/q2-message-test.e2e.js.map +0 -1
  654. package/dist/test/elements/q2-optgroup-test.e2e.js.map +0 -1
  655. package/dist/test/elements/q2-option-list-test.e2e.js.map +0 -1
  656. package/dist/test/elements/q2-option-test.e2e.js.map +0 -1
  657. package/dist/test/elements/q2-pagination-test.e2e.js.map +0 -1
  658. package/dist/test/elements/q2-pill-test.e2e.js.map +0 -1
  659. package/dist/test/elements/q2-popover-test.e2e.js.map +0 -1
  660. package/dist/test/elements/q2-popover-test.spec.js.map +0 -1
  661. package/dist/test/elements/q2-radio-group-test.e2e.js.map +0 -1
  662. package/dist/test/elements/q2-radio-test.e2e.js.map +0 -1
  663. package/dist/test/elements/q2-relative-time-test.e2e.js.map +0 -1
  664. package/dist/test/elements/q2-section-test.e2e.js.map +0 -1
  665. package/dist/test/elements/q2-select-test.e2e.js.map +0 -1
  666. package/dist/test/elements/q2-stepper-pane-test.e2e.js.map +0 -1
  667. package/dist/test/elements/q2-stepper-test.e2e.js.map +0 -1
  668. package/dist/test/elements/q2-stepper-vertical-test.e2e.js.map +0 -1
  669. package/dist/test/elements/q2-tab-container-test.e2e.js.map +0 -1
  670. package/dist/test/elements/q2-tab-pane-test.e2e.js.map +0 -1
  671. package/dist/test/elements/q2-tag-test.e2e.js.map +0 -1
  672. package/dist/test/elements/q2-textarea-test.e2e.js.map +0 -1
  673. package/dist/test/elements/q2-tooltip-test.e2e.js.map +0 -1
  674. package/dist/test/elements/tecton-tab-pane-test.e2e.js.map +0 -1
  675. package/dist/test/helpers.js.map +0 -1
  676. package/dist/test/utils/action-sheet-test.e2e.js.map +0 -1
  677. package/dist/test/utils/index.spec.js.map +0 -1
  678. package/dist/types/workspace/workspace/tecton-production_release_1.49.x/packages/q2-tecton-elements/.stencil/test/elements/q2-detail/slot-component.d.ts +0 -4
  679. /package/dist/q2-tecton-elements/{p-da711c59.entry.js.map → p-072c5877.entry.js.map} +0 -0
  680. /package/dist/q2-tecton-elements/{p-f6358905.entry.js.map → p-074ae80c.entry.js.map} +0 -0
  681. /package/dist/q2-tecton-elements/{p-7b9a6bb7.entry.js.map → p-2c26295e.entry.js.map} +0 -0
  682. /package/dist/q2-tecton-elements/{p-bbf9d36d.entry.js.map → p-2ca6d44f.entry.js.map} +0 -0
  683. /package/dist/q2-tecton-elements/{p-0852e6fe.entry.js.map → p-34696e3f.entry.js.map} +0 -0
  684. /package/dist/q2-tecton-elements/{p-630613c7.entry.js.map → p-395904b4.entry.js.map} +0 -0
  685. /package/dist/q2-tecton-elements/{p-db79c056.entry.js.map → p-4116579f.entry.js.map} +0 -0
  686. /package/dist/q2-tecton-elements/{p-e0a6baea.entry.js.map → p-45407ecc.entry.js.map} +0 -0
  687. /package/dist/q2-tecton-elements/{p-ec8a0b64.entry.js.map → p-58cafc0d.entry.js.map} +0 -0
  688. /package/dist/q2-tecton-elements/{p-4388e521.entry.js.map → p-5d936af5.entry.js.map} +0 -0
  689. /package/dist/q2-tecton-elements/{p-a177d812.entry.js.map → p-661ed976.entry.js.map} +0 -0
  690. /package/dist/q2-tecton-elements/{p-da0cacef.entry.js.map → p-6b7c53a8.entry.js.map} +0 -0
  691. /package/dist/q2-tecton-elements/{p-6c933b14.entry.js.map → p-6e6d9793.entry.js.map} +0 -0
  692. /package/dist/q2-tecton-elements/{p-be518818.js.map → p-721365be.js.map} +0 -0
  693. /package/dist/q2-tecton-elements/{p-a8e7e591.entry.js.map → p-77272c4c.entry.js.map} +0 -0
  694. /package/dist/q2-tecton-elements/{p-793a453e.entry.js.map → p-77a0cc0c.entry.js.map} +0 -0
  695. /package/dist/q2-tecton-elements/{p-9c589ab3.entry.js.map → p-8111547c.entry.js.map} +0 -0
  696. /package/dist/q2-tecton-elements/{p-e3ad770b.entry.js.map → p-adec9275.entry.js.map} +0 -0
  697. /package/dist/q2-tecton-elements/{p-780a1d0e.js.map → p-b7554a79.js.map} +0 -0
  698. /package/dist/q2-tecton-elements/{p-40df4468.entry.js.map → p-c0c658d1.entry.js.map} +0 -0
  699. /package/dist/q2-tecton-elements/{p-08176bd0.entry.js.map → p-cb3f48de.entry.js.map} +0 -0
  700. /package/dist/q2-tecton-elements/{p-2810ba28.entry.js.map → p-ce4e6b41.entry.js.map} +0 -0
  701. /package/dist/q2-tecton-elements/{p-76b98623.entry.js.map → p-cf32b5db.entry.js.map} +0 -0
  702. /package/dist/q2-tecton-elements/{p-2e6669a7.entry.js.map → p-dc77bf66.entry.js.map} +0 -0
  703. /package/dist/q2-tecton-elements/{p-e4b8f4b3.entry.js.map → p-fffb54e9.entry.js.map} +0 -0
@@ -0,0 +1,1580 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index-14c3693c.js');
4
+
5
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
6
+
7
+ var purify = {exports: {}};
8
+
9
+ /*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */
10
+
11
+ (function (module, exports) {
12
+ (function (global, factory) {
13
+ module.exports = factory() ;
14
+ })(commonjsGlobal, (function () {
15
+ const {
16
+ entries,
17
+ setPrototypeOf,
18
+ isFrozen,
19
+ getPrototypeOf,
20
+ getOwnPropertyDescriptor
21
+ } = Object;
22
+ let {
23
+ freeze,
24
+ seal,
25
+ create
26
+ } = Object; // eslint-disable-line import/no-mutable-exports
27
+ let {
28
+ apply,
29
+ construct
30
+ } = typeof Reflect !== 'undefined' && Reflect;
31
+ if (!freeze) {
32
+ freeze = function freeze(x) {
33
+ return x;
34
+ };
35
+ }
36
+ if (!seal) {
37
+ seal = function seal(x) {
38
+ return x;
39
+ };
40
+ }
41
+ if (!apply) {
42
+ apply = function apply(fun, thisValue, args) {
43
+ return fun.apply(thisValue, args);
44
+ };
45
+ }
46
+ if (!construct) {
47
+ construct = function construct(Func, args) {
48
+ return new Func(...args);
49
+ };
50
+ }
51
+ const arrayForEach = unapply(Array.prototype.forEach);
52
+ const arrayPop = unapply(Array.prototype.pop);
53
+ const arrayPush = unapply(Array.prototype.push);
54
+ const stringToLowerCase = unapply(String.prototype.toLowerCase);
55
+ const stringToString = unapply(String.prototype.toString);
56
+ const stringMatch = unapply(String.prototype.match);
57
+ const stringReplace = unapply(String.prototype.replace);
58
+ const stringIndexOf = unapply(String.prototype.indexOf);
59
+ const stringTrim = unapply(String.prototype.trim);
60
+ const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
61
+ const regExpTest = unapply(RegExp.prototype.test);
62
+ const typeErrorCreate = unconstruct(TypeError);
63
+ /**
64
+ * Creates a new function that calls the given function with a specified thisArg and arguments.
65
+ *
66
+ * @param func - The function to be wrapped and called.
67
+ * @returns A new function that calls the given function with a specified thisArg and arguments.
68
+ */
69
+ function unapply(func) {
70
+ return function (thisArg) {
71
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
72
+ args[_key - 1] = arguments[_key];
73
+ }
74
+ return apply(func, thisArg, args);
75
+ };
76
+ }
77
+ /**
78
+ * Creates a new function that constructs an instance of the given constructor function with the provided arguments.
79
+ *
80
+ * @param func - The constructor function to be wrapped and called.
81
+ * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
82
+ */
83
+ function unconstruct(func) {
84
+ return function () {
85
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
86
+ args[_key2] = arguments[_key2];
87
+ }
88
+ return construct(func, args);
89
+ };
90
+ }
91
+ /**
92
+ * Add properties to a lookup table
93
+ *
94
+ * @param set - The set to which elements will be added.
95
+ * @param array - The array containing elements to be added to the set.
96
+ * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
97
+ * @returns The modified set with added elements.
98
+ */
99
+ function addToSet(set, array) {
100
+ let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;
101
+ if (setPrototypeOf) {
102
+ // Make 'in' and truthy checks like Boolean(set.constructor)
103
+ // independent of any properties defined on Object.prototype.
104
+ // Prevent prototype setters from intercepting set as a this value.
105
+ setPrototypeOf(set, null);
106
+ }
107
+ let l = array.length;
108
+ while (l--) {
109
+ let element = array[l];
110
+ if (typeof element === 'string') {
111
+ const lcElement = transformCaseFunc(element);
112
+ if (lcElement !== element) {
113
+ // Config presets (e.g. tags.js, attrs.js) are immutable.
114
+ if (!isFrozen(array)) {
115
+ array[l] = lcElement;
116
+ }
117
+ element = lcElement;
118
+ }
119
+ }
120
+ set[element] = true;
121
+ }
122
+ return set;
123
+ }
124
+ /**
125
+ * Clean up an array to harden against CSPP
126
+ *
127
+ * @param array - The array to be cleaned.
128
+ * @returns The cleaned version of the array
129
+ */
130
+ function cleanArray(array) {
131
+ for (let index = 0; index < array.length; index++) {
132
+ const isPropertyExist = objectHasOwnProperty(array, index);
133
+ if (!isPropertyExist) {
134
+ array[index] = null;
135
+ }
136
+ }
137
+ return array;
138
+ }
139
+ /**
140
+ * Shallow clone an object
141
+ *
142
+ * @param object - The object to be cloned.
143
+ * @returns A new object that copies the original.
144
+ */
145
+ function clone(object) {
146
+ const newObject = create(null);
147
+ for (const [property, value] of entries(object)) {
148
+ const isPropertyExist = objectHasOwnProperty(object, property);
149
+ if (isPropertyExist) {
150
+ if (Array.isArray(value)) {
151
+ newObject[property] = cleanArray(value);
152
+ } else if (value && typeof value === 'object' && value.constructor === Object) {
153
+ newObject[property] = clone(value);
154
+ } else {
155
+ newObject[property] = value;
156
+ }
157
+ }
158
+ }
159
+ return newObject;
160
+ }
161
+ /**
162
+ * This method automatically checks if the prop is function or getter and behaves accordingly.
163
+ *
164
+ * @param object - The object to look up the getter function in its prototype chain.
165
+ * @param prop - The property name for which to find the getter function.
166
+ * @returns The getter function found in the prototype chain or a fallback function.
167
+ */
168
+ function lookupGetter(object, prop) {
169
+ while (object !== null) {
170
+ const desc = getOwnPropertyDescriptor(object, prop);
171
+ if (desc) {
172
+ if (desc.get) {
173
+ return unapply(desc.get);
174
+ }
175
+ if (typeof desc.value === 'function') {
176
+ return unapply(desc.value);
177
+ }
178
+ }
179
+ object = getPrototypeOf(object);
180
+ }
181
+ function fallbackValue() {
182
+ return null;
183
+ }
184
+ return fallbackValue;
185
+ }
186
+
187
+ const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
188
+ const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
189
+ const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
190
+ // List of SVG elements that are disallowed by default.
191
+ // We still need to know them so that we can do namespace
192
+ // checks properly in case one wants to add them to
193
+ // allow-list.
194
+ const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
195
+ const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);
196
+ // Similarly to SVG, we want to know all MathML elements,
197
+ // even those that we disallow by default.
198
+ const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
199
+ const text = freeze(['#text']);
200
+
201
+ const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
202
+ const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
203
+ const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
204
+ const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
205
+
206
+ // eslint-disable-next-line unicorn/better-regex
207
+ const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
208
+ const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
209
+ const TMPLIT_EXPR = seal(/\$\{[\w\W]*}/gm); // eslint-disable-line unicorn/better-regex
210
+ const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
211
+ const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
212
+ const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
213
+ );
214
+ const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
215
+ const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
216
+ );
217
+ const DOCTYPE_NAME = seal(/^html$/i);
218
+ const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
219
+
220
+ var EXPRESSIONS = /*#__PURE__*/Object.freeze({
221
+ __proto__: null,
222
+ ARIA_ATTR: ARIA_ATTR,
223
+ ATTR_WHITESPACE: ATTR_WHITESPACE,
224
+ CUSTOM_ELEMENT: CUSTOM_ELEMENT,
225
+ DATA_ATTR: DATA_ATTR,
226
+ DOCTYPE_NAME: DOCTYPE_NAME,
227
+ ERB_EXPR: ERB_EXPR,
228
+ IS_ALLOWED_URI: IS_ALLOWED_URI,
229
+ IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,
230
+ MUSTACHE_EXPR: MUSTACHE_EXPR,
231
+ TMPLIT_EXPR: TMPLIT_EXPR
232
+ });
233
+
234
+ /* eslint-disable @typescript-eslint/indent */
235
+ // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
236
+ const NODE_TYPE = {
237
+ element: 1,
238
+ attribute: 2,
239
+ text: 3,
240
+ cdataSection: 4,
241
+ entityReference: 5,
242
+ // Deprecated
243
+ entityNode: 6,
244
+ // Deprecated
245
+ progressingInstruction: 7,
246
+ comment: 8,
247
+ document: 9,
248
+ documentType: 10,
249
+ documentFragment: 11,
250
+ notation: 12 // Deprecated
251
+ };
252
+ const getGlobal = function getGlobal() {
253
+ return typeof window === 'undefined' ? null : window;
254
+ };
255
+ /**
256
+ * Creates a no-op policy for internal use only.
257
+ * Don't export this function outside this module!
258
+ * @param trustedTypes The policy factory.
259
+ * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
260
+ * @return The policy created (or null, if Trusted Types
261
+ * are not supported or creating the policy failed).
262
+ */
263
+ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
264
+ if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
265
+ return null;
266
+ }
267
+ // Allow the callers to control the unique policy name
268
+ // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
269
+ // Policy creation with duplicate names throws in Trusted Types.
270
+ let suffix = null;
271
+ const ATTR_NAME = 'data-tt-policy-suffix';
272
+ if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
273
+ suffix = purifyHostElement.getAttribute(ATTR_NAME);
274
+ }
275
+ const policyName = 'dompurify' + (suffix ? '#' + suffix : '');
276
+ try {
277
+ return trustedTypes.createPolicy(policyName, {
278
+ createHTML(html) {
279
+ return html;
280
+ },
281
+ createScriptURL(scriptUrl) {
282
+ return scriptUrl;
283
+ }
284
+ });
285
+ } catch (_) {
286
+ // Policy creation failed (most likely another DOMPurify script has
287
+ // already run). Skip creating the policy, as this will only cause errors
288
+ // if TT are enforced.
289
+ console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
290
+ return null;
291
+ }
292
+ };
293
+ const _createHooksMap = function _createHooksMap() {
294
+ return {
295
+ afterSanitizeAttributes: [],
296
+ afterSanitizeElements: [],
297
+ afterSanitizeShadowDOM: [],
298
+ beforeSanitizeAttributes: [],
299
+ beforeSanitizeElements: [],
300
+ beforeSanitizeShadowDOM: [],
301
+ uponSanitizeAttribute: [],
302
+ uponSanitizeElement: [],
303
+ uponSanitizeShadowNode: []
304
+ };
305
+ };
306
+ function createDOMPurify() {
307
+ let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
308
+ const DOMPurify = root => createDOMPurify(root);
309
+ DOMPurify.version = '3.2.3';
310
+ DOMPurify.removed = [];
311
+ if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document) {
312
+ // Not running in a browser, provide a factory function
313
+ // so that you can pass your own Window
314
+ DOMPurify.isSupported = false;
315
+ return DOMPurify;
316
+ }
317
+ let {
318
+ document
319
+ } = window;
320
+ const originalDocument = document;
321
+ const currentScript = originalDocument.currentScript;
322
+ const {
323
+ DocumentFragment,
324
+ HTMLTemplateElement,
325
+ Node,
326
+ Element,
327
+ NodeFilter,
328
+ NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,
329
+ HTMLFormElement,
330
+ DOMParser,
331
+ trustedTypes
332
+ } = window;
333
+ const ElementPrototype = Element.prototype;
334
+ const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
335
+ const remove = lookupGetter(ElementPrototype, 'remove');
336
+ const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
337
+ const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
338
+ const getParentNode = lookupGetter(ElementPrototype, 'parentNode');
339
+ // As per issue #47, the web-components registry is inherited by a
340
+ // new document created via createHTMLDocument. As per the spec
341
+ // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
342
+ // a new empty registry is used when creating a template contents owner
343
+ // document, so we use that as our parent document to ensure nothing
344
+ // is inherited.
345
+ if (typeof HTMLTemplateElement === 'function') {
346
+ const template = document.createElement('template');
347
+ if (template.content && template.content.ownerDocument) {
348
+ document = template.content.ownerDocument;
349
+ }
350
+ }
351
+ let trustedTypesPolicy;
352
+ let emptyHTML = '';
353
+ const {
354
+ implementation,
355
+ createNodeIterator,
356
+ createDocumentFragment,
357
+ getElementsByTagName
358
+ } = document;
359
+ const {
360
+ importNode
361
+ } = originalDocument;
362
+ let hooks = _createHooksMap();
363
+ /**
364
+ * Expose whether this browser supports running the full DOMPurify.
365
+ */
366
+ DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;
367
+ const {
368
+ MUSTACHE_EXPR,
369
+ ERB_EXPR,
370
+ TMPLIT_EXPR,
371
+ DATA_ATTR,
372
+ ARIA_ATTR,
373
+ IS_SCRIPT_OR_DATA,
374
+ ATTR_WHITESPACE,
375
+ CUSTOM_ELEMENT
376
+ } = EXPRESSIONS;
377
+ let {
378
+ IS_ALLOWED_URI: IS_ALLOWED_URI$1
379
+ } = EXPRESSIONS;
380
+ /**
381
+ * We consider the elements and attributes below to be safe. Ideally
382
+ * don't add any new ones but feel free to remove unwanted ones.
383
+ */
384
+ /* allowed element names */
385
+ let ALLOWED_TAGS = null;
386
+ const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
387
+ /* Allowed attribute names */
388
+ let ALLOWED_ATTR = null;
389
+ const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
390
+ /*
391
+ * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.
392
+ * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
393
+ * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
394
+ * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
395
+ */
396
+ let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
397
+ tagNameCheck: {
398
+ writable: true,
399
+ configurable: false,
400
+ enumerable: true,
401
+ value: null
402
+ },
403
+ attributeNameCheck: {
404
+ writable: true,
405
+ configurable: false,
406
+ enumerable: true,
407
+ value: null
408
+ },
409
+ allowCustomizedBuiltInElements: {
410
+ writable: true,
411
+ configurable: false,
412
+ enumerable: true,
413
+ value: false
414
+ }
415
+ }));
416
+ /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
417
+ let FORBID_TAGS = null;
418
+ /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
419
+ let FORBID_ATTR = null;
420
+ /* Decide if ARIA attributes are okay */
421
+ let ALLOW_ARIA_ATTR = true;
422
+ /* Decide if custom data attributes are okay */
423
+ let ALLOW_DATA_ATTR = true;
424
+ /* Decide if unknown protocols are okay */
425
+ let ALLOW_UNKNOWN_PROTOCOLS = false;
426
+ /* Decide if self-closing tags in attributes are allowed.
427
+ * Usually removed due to a mXSS issue in jQuery 3.0 */
428
+ let ALLOW_SELF_CLOSE_IN_ATTR = true;
429
+ /* Output should be safe for common template engines.
430
+ * This means, DOMPurify removes data attributes, mustaches and ERB
431
+ */
432
+ let SAFE_FOR_TEMPLATES = false;
433
+ /* Output should be safe even for XML used within HTML and alike.
434
+ * This means, DOMPurify removes comments when containing risky content.
435
+ */
436
+ let SAFE_FOR_XML = true;
437
+ /* Decide if document with <html>... should be returned */
438
+ let WHOLE_DOCUMENT = false;
439
+ /* Track whether config is already set on this instance of DOMPurify. */
440
+ let SET_CONFIG = false;
441
+ /* Decide if all elements (e.g. style, script) must be children of
442
+ * document.body. By default, browsers might move them to document.head */
443
+ let FORCE_BODY = false;
444
+ /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
445
+ * string (or a TrustedHTML object if Trusted Types are supported).
446
+ * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
447
+ */
448
+ let RETURN_DOM = false;
449
+ /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
450
+ * string (or a TrustedHTML object if Trusted Types are supported) */
451
+ let RETURN_DOM_FRAGMENT = false;
452
+ /* Try to return a Trusted Type object instead of a string, return a string in
453
+ * case Trusted Types are not supported */
454
+ let RETURN_TRUSTED_TYPE = false;
455
+ /* Output should be free from DOM clobbering attacks?
456
+ * This sanitizes markups named with colliding, clobberable built-in DOM APIs.
457
+ */
458
+ let SANITIZE_DOM = true;
459
+ /* Achieve full DOM Clobbering protection by isolating the namespace of named
460
+ * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
461
+ *
462
+ * HTML/DOM spec rules that enable DOM Clobbering:
463
+ * - Named Access on Window (§7.3.3)
464
+ * - DOM Tree Accessors (§3.1.5)
465
+ * - Form Element Parent-Child Relations (§4.10.3)
466
+ * - Iframe srcdoc / Nested WindowProxies (§4.8.5)
467
+ * - HTMLCollection (§4.2.10.2)
468
+ *
469
+ * Namespace isolation is implemented by prefixing `id` and `name` attributes
470
+ * with a constant string, i.e., `user-content-`
471
+ */
472
+ let SANITIZE_NAMED_PROPS = false;
473
+ const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
474
+ /* Keep element content when removing element? */
475
+ let KEEP_CONTENT = true;
476
+ /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
477
+ * of importing it into a new Document and returning a sanitized copy */
478
+ let IN_PLACE = false;
479
+ /* Allow usage of profiles like html, svg and mathMl */
480
+ let USE_PROFILES = {};
481
+ /* Tags to ignore content of when KEEP_CONTENT is true */
482
+ let FORBID_CONTENTS = null;
483
+ const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
484
+ /* Tags that are safe for data: URIs */
485
+ let DATA_URI_TAGS = null;
486
+ const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
487
+ /* Attributes safe for values like "javascript:" */
488
+ let URI_SAFE_ATTRIBUTES = null;
489
+ const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
490
+ const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
491
+ const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
492
+ const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
493
+ /* Document namespace */
494
+ let NAMESPACE = HTML_NAMESPACE;
495
+ let IS_EMPTY_INPUT = false;
496
+ /* Allowed XHTML+XML namespaces */
497
+ let ALLOWED_NAMESPACES = null;
498
+ const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
499
+ let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
500
+ let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);
501
+ // Certain elements are allowed in both SVG and HTML
502
+ // namespace. We need to specify them explicitly
503
+ // so that they don't get erroneously deleted from
504
+ // HTML namespace.
505
+ const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
506
+ /* Parsing of strict XHTML documents */
507
+ let PARSER_MEDIA_TYPE = null;
508
+ const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
509
+ const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
510
+ let transformCaseFunc = null;
511
+ /* Keep a reference to config to pass to hooks */
512
+ let CONFIG = null;
513
+ /* Ideally, do not touch anything below this line */
514
+ /* ______________________________________________ */
515
+ const formElement = document.createElement('form');
516
+ const isRegexOrFunction = function isRegexOrFunction(testValue) {
517
+ return testValue instanceof RegExp || testValue instanceof Function;
518
+ };
519
+ /**
520
+ * _parseConfig
521
+ *
522
+ * @param cfg optional config literal
523
+ */
524
+ // eslint-disable-next-line complexity
525
+ const _parseConfig = function _parseConfig() {
526
+ let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
527
+ if (CONFIG && CONFIG === cfg) {
528
+ return;
529
+ }
530
+ /* Shield configuration object from tampering */
531
+ if (!cfg || typeof cfg !== 'object') {
532
+ cfg = {};
533
+ }
534
+ /* Shield configuration object from prototype pollution */
535
+ cfg = clone(cfg);
536
+ PARSER_MEDIA_TYPE =
537
+ // eslint-disable-next-line unicorn/prefer-includes
538
+ SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
539
+ // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
540
+ transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
541
+ /* Set configuration parameters */
542
+ ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
543
+ ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
544
+ ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
545
+ URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
546
+ DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
547
+ FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
548
+ FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};
549
+ FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};
550
+ USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;
551
+ ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
552
+ ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
553
+ ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
554
+ ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true
555
+ SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
556
+ SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true
557
+ WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
558
+ RETURN_DOM = cfg.RETURN_DOM || false; // Default false
559
+ RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
560
+ RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
561
+ FORCE_BODY = cfg.FORCE_BODY || false; // Default false
562
+ SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
563
+ SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
564
+ KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
565
+ IN_PLACE = cfg.IN_PLACE || false; // Default false
566
+ IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
567
+ NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
568
+ MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
569
+ HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
570
+ CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
571
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
572
+ CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
573
+ }
574
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
575
+ CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
576
+ }
577
+ if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
578
+ CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
579
+ }
580
+ if (SAFE_FOR_TEMPLATES) {
581
+ ALLOW_DATA_ATTR = false;
582
+ }
583
+ if (RETURN_DOM_FRAGMENT) {
584
+ RETURN_DOM = true;
585
+ }
586
+ /* Parse profile info */
587
+ if (USE_PROFILES) {
588
+ ALLOWED_TAGS = addToSet({}, text);
589
+ ALLOWED_ATTR = [];
590
+ if (USE_PROFILES.html === true) {
591
+ addToSet(ALLOWED_TAGS, html$1);
592
+ addToSet(ALLOWED_ATTR, html);
593
+ }
594
+ if (USE_PROFILES.svg === true) {
595
+ addToSet(ALLOWED_TAGS, svg$1);
596
+ addToSet(ALLOWED_ATTR, svg);
597
+ addToSet(ALLOWED_ATTR, xml);
598
+ }
599
+ if (USE_PROFILES.svgFilters === true) {
600
+ addToSet(ALLOWED_TAGS, svgFilters);
601
+ addToSet(ALLOWED_ATTR, svg);
602
+ addToSet(ALLOWED_ATTR, xml);
603
+ }
604
+ if (USE_PROFILES.mathMl === true) {
605
+ addToSet(ALLOWED_TAGS, mathMl$1);
606
+ addToSet(ALLOWED_ATTR, mathMl);
607
+ addToSet(ALLOWED_ATTR, xml);
608
+ }
609
+ }
610
+ /* Merge configuration parameters */
611
+ if (cfg.ADD_TAGS) {
612
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
613
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
614
+ }
615
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
616
+ }
617
+ if (cfg.ADD_ATTR) {
618
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
619
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
620
+ }
621
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
622
+ }
623
+ if (cfg.ADD_URI_SAFE_ATTR) {
624
+ addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
625
+ }
626
+ if (cfg.FORBID_CONTENTS) {
627
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
628
+ FORBID_CONTENTS = clone(FORBID_CONTENTS);
629
+ }
630
+ addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
631
+ }
632
+ /* Add #text in case KEEP_CONTENT is set to true */
633
+ if (KEEP_CONTENT) {
634
+ ALLOWED_TAGS['#text'] = true;
635
+ }
636
+ /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
637
+ if (WHOLE_DOCUMENT) {
638
+ addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
639
+ }
640
+ /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
641
+ if (ALLOWED_TAGS.table) {
642
+ addToSet(ALLOWED_TAGS, ['tbody']);
643
+ delete FORBID_TAGS.tbody;
644
+ }
645
+ if (cfg.TRUSTED_TYPES_POLICY) {
646
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {
647
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
648
+ }
649
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
650
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
651
+ }
652
+ // Overwrite existing TrustedTypes policy.
653
+ trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
654
+ // Sign local variables required by `sanitize`.
655
+ emptyHTML = trustedTypesPolicy.createHTML('');
656
+ } else {
657
+ // Uninitialized policy, attempt to initialize the internal dompurify policy.
658
+ if (trustedTypesPolicy === undefined) {
659
+ trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
660
+ }
661
+ // If creating the internal policy succeeded sign internal variables.
662
+ if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {
663
+ emptyHTML = trustedTypesPolicy.createHTML('');
664
+ }
665
+ }
666
+ // Prevent further manipulation of configuration.
667
+ // Not available in IE8, Safari 5, etc.
668
+ if (freeze) {
669
+ freeze(cfg);
670
+ }
671
+ CONFIG = cfg;
672
+ };
673
+ /* Keep track of all possible SVG and MathML tags
674
+ * so that we can perform the namespace checks
675
+ * correctly. */
676
+ const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
677
+ const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
678
+ /**
679
+ * @param element a DOM element whose namespace is being checked
680
+ * @returns Return false if the element has a
681
+ * namespace that a spec-compliant parser would never
682
+ * return. Return true otherwise.
683
+ */
684
+ const _checkValidNamespace = function _checkValidNamespace(element) {
685
+ let parent = getParentNode(element);
686
+ // In JSDOM, if we're inside shadow DOM, then parentNode
687
+ // can be null. We just simulate parent in this case.
688
+ if (!parent || !parent.tagName) {
689
+ parent = {
690
+ namespaceURI: NAMESPACE,
691
+ tagName: 'template'
692
+ };
693
+ }
694
+ const tagName = stringToLowerCase(element.tagName);
695
+ const parentTagName = stringToLowerCase(parent.tagName);
696
+ if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
697
+ return false;
698
+ }
699
+ if (element.namespaceURI === SVG_NAMESPACE) {
700
+ // The only way to switch from HTML namespace to SVG
701
+ // is via <svg>. If it happens via any other tag, then
702
+ // it should be killed.
703
+ if (parent.namespaceURI === HTML_NAMESPACE) {
704
+ return tagName === 'svg';
705
+ }
706
+ // The only way to switch from MathML to SVG is via`
707
+ // svg if parent is either <annotation-xml> or MathML
708
+ // text integration points.
709
+ if (parent.namespaceURI === MATHML_NAMESPACE) {
710
+ return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
711
+ }
712
+ // We only allow elements that are defined in SVG
713
+ // spec. All others are disallowed in SVG namespace.
714
+ return Boolean(ALL_SVG_TAGS[tagName]);
715
+ }
716
+ if (element.namespaceURI === MATHML_NAMESPACE) {
717
+ // The only way to switch from HTML namespace to MathML
718
+ // is via <math>. If it happens via any other tag, then
719
+ // it should be killed.
720
+ if (parent.namespaceURI === HTML_NAMESPACE) {
721
+ return tagName === 'math';
722
+ }
723
+ // The only way to switch from SVG to MathML is via
724
+ // <math> and HTML integration points
725
+ if (parent.namespaceURI === SVG_NAMESPACE) {
726
+ return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
727
+ }
728
+ // We only allow elements that are defined in MathML
729
+ // spec. All others are disallowed in MathML namespace.
730
+ return Boolean(ALL_MATHML_TAGS[tagName]);
731
+ }
732
+ if (element.namespaceURI === HTML_NAMESPACE) {
733
+ // The only way to switch from SVG to HTML is via
734
+ // HTML integration points, and from MathML to HTML
735
+ // is via MathML text integration points
736
+ if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
737
+ return false;
738
+ }
739
+ if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
740
+ return false;
741
+ }
742
+ // We disallow tags that are specific for MathML
743
+ // or SVG and should never appear in HTML namespace
744
+ return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
745
+ }
746
+ // For XHTML and XML documents that support custom namespaces
747
+ if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
748
+ return true;
749
+ }
750
+ // The code should never reach this place (this means
751
+ // that the element somehow got namespace that is not
752
+ // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
753
+ // Return false just in case.
754
+ return false;
755
+ };
756
+ /**
757
+ * _forceRemove
758
+ *
759
+ * @param node a DOM node
760
+ */
761
+ const _forceRemove = function _forceRemove(node) {
762
+ arrayPush(DOMPurify.removed, {
763
+ element: node
764
+ });
765
+ try {
766
+ // eslint-disable-next-line unicorn/prefer-dom-node-remove
767
+ getParentNode(node).removeChild(node);
768
+ } catch (_) {
769
+ remove(node);
770
+ }
771
+ };
772
+ /**
773
+ * _removeAttribute
774
+ *
775
+ * @param name an Attribute name
776
+ * @param element a DOM node
777
+ */
778
+ const _removeAttribute = function _removeAttribute(name, element) {
779
+ try {
780
+ arrayPush(DOMPurify.removed, {
781
+ attribute: element.getAttributeNode(name),
782
+ from: element
783
+ });
784
+ } catch (_) {
785
+ arrayPush(DOMPurify.removed, {
786
+ attribute: null,
787
+ from: element
788
+ });
789
+ }
790
+ element.removeAttribute(name);
791
+ // We void attribute values for unremovable "is" attributes
792
+ if (name === 'is') {
793
+ if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
794
+ try {
795
+ _forceRemove(element);
796
+ } catch (_) {}
797
+ } else {
798
+ try {
799
+ element.setAttribute(name, '');
800
+ } catch (_) {}
801
+ }
802
+ }
803
+ };
804
+ /**
805
+ * _initDocument
806
+ *
807
+ * @param dirty - a string of dirty markup
808
+ * @return a DOM, filled with the dirty markup
809
+ */
810
+ const _initDocument = function _initDocument(dirty) {
811
+ /* Create a HTML document */
812
+ let doc = null;
813
+ let leadingWhitespace = null;
814
+ if (FORCE_BODY) {
815
+ dirty = '<remove></remove>' + dirty;
816
+ } else {
817
+ /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
818
+ const matches = stringMatch(dirty, /^[\r\n\t ]+/);
819
+ leadingWhitespace = matches && matches[0];
820
+ }
821
+ if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {
822
+ // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
823
+ dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
824
+ }
825
+ const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
826
+ /*
827
+ * Use the DOMParser API by default, fallback later if needs be
828
+ * DOMParser not work for svg when has multiple root element.
829
+ */
830
+ if (NAMESPACE === HTML_NAMESPACE) {
831
+ try {
832
+ doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
833
+ } catch (_) {}
834
+ }
835
+ /* Use createHTMLDocument in case DOMParser is not available */
836
+ if (!doc || !doc.documentElement) {
837
+ doc = implementation.createDocument(NAMESPACE, 'template', null);
838
+ try {
839
+ doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
840
+ } catch (_) {
841
+ // Syntax error if dirtyPayload is invalid xml
842
+ }
843
+ }
844
+ const body = doc.body || doc.documentElement;
845
+ if (dirty && leadingWhitespace) {
846
+ body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
847
+ }
848
+ /* Work on whole document or just its body */
849
+ if (NAMESPACE === HTML_NAMESPACE) {
850
+ return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
851
+ }
852
+ return WHOLE_DOCUMENT ? doc.documentElement : body;
853
+ };
854
+ /**
855
+ * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
856
+ *
857
+ * @param root The root element or node to start traversing on.
858
+ * @return The created NodeIterator
859
+ */
860
+ const _createNodeIterator = function _createNodeIterator(root) {
861
+ return createNodeIterator.call(root.ownerDocument || root, root,
862
+ // eslint-disable-next-line no-bitwise
863
+ NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
864
+ };
865
+ /**
866
+ * _isClobbered
867
+ *
868
+ * @param element element to check for clobbering attacks
869
+ * @return true if clobbered, false if safe
870
+ */
871
+ const _isClobbered = function _isClobbered(element) {
872
+ return element instanceof HTMLFormElement && (typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function');
873
+ };
874
+ /**
875
+ * Checks whether the given object is a DOM node.
876
+ *
877
+ * @param value object to check whether it's a DOM node
878
+ * @return true is object is a DOM node
879
+ */
880
+ const _isNode = function _isNode(value) {
881
+ return typeof Node === 'function' && value instanceof Node;
882
+ };
883
+ function _executeHooks(hooks, currentNode, data) {
884
+ arrayForEach(hooks, hook => {
885
+ hook.call(DOMPurify, currentNode, data, CONFIG);
886
+ });
887
+ }
888
+ /**
889
+ * _sanitizeElements
890
+ *
891
+ * @protect nodeName
892
+ * @protect textContent
893
+ * @protect removeChild
894
+ * @param currentNode to check for permission to exist
895
+ * @return true if node was killed, false if left alive
896
+ */
897
+ const _sanitizeElements = function _sanitizeElements(currentNode) {
898
+ let content = null;
899
+ /* Execute a hook if present */
900
+ _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
901
+ /* Check if element is clobbered or can clobber */
902
+ if (_isClobbered(currentNode)) {
903
+ _forceRemove(currentNode);
904
+ return true;
905
+ }
906
+ /* Now let's check the element's type and name */
907
+ const tagName = transformCaseFunc(currentNode.nodeName);
908
+ /* Execute a hook if present */
909
+ _executeHooks(hooks.uponSanitizeElement, currentNode, {
910
+ tagName,
911
+ allowedTags: ALLOWED_TAGS
912
+ });
913
+ /* Detect mXSS attempts abusing namespace confusion */
914
+ if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
915
+ _forceRemove(currentNode);
916
+ return true;
917
+ }
918
+ /* Remove any occurrence of processing instructions */
919
+ if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
920
+ _forceRemove(currentNode);
921
+ return true;
922
+ }
923
+ /* Remove any kind of possibly harmful comments */
924
+ if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
925
+ _forceRemove(currentNode);
926
+ return true;
927
+ }
928
+ /* Remove element if anything forbids its presence */
929
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
930
+ /* Check if we have a custom element to handle */
931
+ if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
932
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
933
+ return false;
934
+ }
935
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
936
+ return false;
937
+ }
938
+ }
939
+ /* Keep content except for bad-listed elements */
940
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
941
+ const parentNode = getParentNode(currentNode) || currentNode.parentNode;
942
+ const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
943
+ if (childNodes && parentNode) {
944
+ const childCount = childNodes.length;
945
+ for (let i = childCount - 1; i >= 0; --i) {
946
+ const childClone = cloneNode(childNodes[i], true);
947
+ childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
948
+ parentNode.insertBefore(childClone, getNextSibling(currentNode));
949
+ }
950
+ }
951
+ }
952
+ _forceRemove(currentNode);
953
+ return true;
954
+ }
955
+ /* Check whether element has a valid namespace */
956
+ if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
957
+ _forceRemove(currentNode);
958
+ return true;
959
+ }
960
+ /* Make sure that older browsers don't get fallback-tag mXSS */
961
+ if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
962
+ _forceRemove(currentNode);
963
+ return true;
964
+ }
965
+ /* Sanitize element content to be template-safe */
966
+ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
967
+ /* Get the element's text content */
968
+ content = currentNode.textContent;
969
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
970
+ content = stringReplace(content, expr, ' ');
971
+ });
972
+ if (currentNode.textContent !== content) {
973
+ arrayPush(DOMPurify.removed, {
974
+ element: currentNode.cloneNode()
975
+ });
976
+ currentNode.textContent = content;
977
+ }
978
+ }
979
+ /* Execute a hook if present */
980
+ _executeHooks(hooks.afterSanitizeElements, currentNode, null);
981
+ return false;
982
+ };
983
+ /**
984
+ * _isValidAttribute
985
+ *
986
+ * @param lcTag Lowercase tag name of containing element.
987
+ * @param lcName Lowercase attribute name.
988
+ * @param value Attribute value.
989
+ * @return Returns true if `value` is valid, otherwise false.
990
+ */
991
+ // eslint-disable-next-line complexity
992
+ const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
993
+ /* Make sure attribute cannot clobber */
994
+ if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
995
+ return false;
996
+ }
997
+ /* Allow valid data-* attributes: At least one character after "-"
998
+ (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
999
+ XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
1000
+ We don't need to check the value; it's always URI safe. */
1001
+ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
1002
+ if (
1003
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1004
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1005
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1006
+ _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||
1007
+ // Alternative, second condition checks if it's an `is`-attribute, AND
1008
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1009
+ lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {
1010
+ return false;
1011
+ }
1012
+ /* Check value is safe. First, is attr inert? If so, is safe */
1013
+ } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {
1014
+ return false;
1015
+ } else ;
1016
+ return true;
1017
+ };
1018
+ /**
1019
+ * _isBasicCustomElement
1020
+ * checks if at least one dash is included in tagName, and it's not the first char
1021
+ * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
1022
+ *
1023
+ * @param tagName name of the tag of the node to sanitize
1024
+ * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
1025
+ */
1026
+ const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
1027
+ return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);
1028
+ };
1029
+ /**
1030
+ * _sanitizeAttributes
1031
+ *
1032
+ * @protect attributes
1033
+ * @protect nodeName
1034
+ * @protect removeAttribute
1035
+ * @protect setAttribute
1036
+ *
1037
+ * @param currentNode to sanitize
1038
+ */
1039
+ const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
1040
+ /* Execute a hook if present */
1041
+ _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
1042
+ const {
1043
+ attributes
1044
+ } = currentNode;
1045
+ /* Check if we have attributes; if not we might have a text node */
1046
+ if (!attributes || _isClobbered(currentNode)) {
1047
+ return;
1048
+ }
1049
+ const hookEvent = {
1050
+ attrName: '',
1051
+ attrValue: '',
1052
+ keepAttr: true,
1053
+ allowedAttributes: ALLOWED_ATTR,
1054
+ forceKeepAttr: undefined
1055
+ };
1056
+ let l = attributes.length;
1057
+ /* Go backwards over all attributes; safely remove bad ones */
1058
+ while (l--) {
1059
+ const attr = attributes[l];
1060
+ const {
1061
+ name,
1062
+ namespaceURI,
1063
+ value: attrValue
1064
+ } = attr;
1065
+ const lcName = transformCaseFunc(name);
1066
+ let value = name === 'value' ? attrValue : stringTrim(attrValue);
1067
+ /* Execute a hook if present */
1068
+ hookEvent.attrName = lcName;
1069
+ hookEvent.attrValue = value;
1070
+ hookEvent.keepAttr = true;
1071
+ hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
1072
+ _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
1073
+ value = hookEvent.attrValue;
1074
+ /* Full DOM Clobbering protection via namespace isolation,
1075
+ * Prefix id and name attributes with `user-content-`
1076
+ */
1077
+ if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {
1078
+ // Remove the attribute with this value
1079
+ _removeAttribute(name, currentNode);
1080
+ // Prefix the value and later re-create the attribute with the sanitized value
1081
+ value = SANITIZE_NAMED_PROPS_PREFIX + value;
1082
+ }
1083
+ /* Work around a security issue with comments inside attributes */
1084
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
1085
+ _removeAttribute(name, currentNode);
1086
+ continue;
1087
+ }
1088
+ /* Did the hooks approve of the attribute? */
1089
+ if (hookEvent.forceKeepAttr) {
1090
+ continue;
1091
+ }
1092
+ /* Remove attribute */
1093
+ _removeAttribute(name, currentNode);
1094
+ /* Did the hooks approve of the attribute? */
1095
+ if (!hookEvent.keepAttr) {
1096
+ continue;
1097
+ }
1098
+ /* Work around a security issue in jQuery 3.0 */
1099
+ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
1100
+ _removeAttribute(name, currentNode);
1101
+ continue;
1102
+ }
1103
+ /* Sanitize attribute content to be template-safe */
1104
+ if (SAFE_FOR_TEMPLATES) {
1105
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1106
+ value = stringReplace(value, expr, ' ');
1107
+ });
1108
+ }
1109
+ /* Is `value` valid for this attribute? */
1110
+ const lcTag = transformCaseFunc(currentNode.nodeName);
1111
+ if (!_isValidAttribute(lcTag, lcName, value)) {
1112
+ continue;
1113
+ }
1114
+ /* Handle attributes that require Trusted Types */
1115
+ if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {
1116
+ if (namespaceURI) ; else {
1117
+ switch (trustedTypes.getAttributeType(lcTag, lcName)) {
1118
+ case 'TrustedHTML':
1119
+ {
1120
+ value = trustedTypesPolicy.createHTML(value);
1121
+ break;
1122
+ }
1123
+ case 'TrustedScriptURL':
1124
+ {
1125
+ value = trustedTypesPolicy.createScriptURL(value);
1126
+ break;
1127
+ }
1128
+ }
1129
+ }
1130
+ }
1131
+ /* Handle invalid data-* attribute set by try-catching it */
1132
+ try {
1133
+ if (namespaceURI) {
1134
+ currentNode.setAttributeNS(namespaceURI, name, value);
1135
+ } else {
1136
+ /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
1137
+ currentNode.setAttribute(name, value);
1138
+ }
1139
+ if (_isClobbered(currentNode)) {
1140
+ _forceRemove(currentNode);
1141
+ } else {
1142
+ arrayPop(DOMPurify.removed);
1143
+ }
1144
+ } catch (_) {}
1145
+ }
1146
+ /* Execute a hook if present */
1147
+ _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
1148
+ };
1149
+ /**
1150
+ * _sanitizeShadowDOM
1151
+ *
1152
+ * @param fragment to iterate over recursively
1153
+ */
1154
+ const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
1155
+ let shadowNode = null;
1156
+ const shadowIterator = _createNodeIterator(fragment);
1157
+ /* Execute a hook if present */
1158
+ _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
1159
+ while (shadowNode = shadowIterator.nextNode()) {
1160
+ /* Execute a hook if present */
1161
+ _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
1162
+ /* Sanitize tags and elements */
1163
+ _sanitizeElements(shadowNode);
1164
+ /* Check attributes next */
1165
+ _sanitizeAttributes(shadowNode);
1166
+ /* Deep shadow DOM detected */
1167
+ if (shadowNode.content instanceof DocumentFragment) {
1168
+ _sanitizeShadowDOM(shadowNode.content);
1169
+ }
1170
+ }
1171
+ /* Execute a hook if present */
1172
+ _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
1173
+ };
1174
+ // eslint-disable-next-line complexity
1175
+ DOMPurify.sanitize = function (dirty) {
1176
+ let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1177
+ let body = null;
1178
+ let importedNode = null;
1179
+ let currentNode = null;
1180
+ let returnNode = null;
1181
+ /* Make sure we have a string to sanitize.
1182
+ DO NOT return early, as this will return the wrong type if
1183
+ the user has requested a DOM object rather than a string */
1184
+ IS_EMPTY_INPUT = !dirty;
1185
+ if (IS_EMPTY_INPUT) {
1186
+ dirty = '<!-->';
1187
+ }
1188
+ /* Stringify, in case dirty is an object */
1189
+ if (typeof dirty !== 'string' && !_isNode(dirty)) {
1190
+ if (typeof dirty.toString === 'function') {
1191
+ dirty = dirty.toString();
1192
+ if (typeof dirty !== 'string') {
1193
+ throw typeErrorCreate('dirty is not a string, aborting');
1194
+ }
1195
+ } else {
1196
+ throw typeErrorCreate('toString is not a function');
1197
+ }
1198
+ }
1199
+ /* Return dirty HTML if DOMPurify cannot run */
1200
+ if (!DOMPurify.isSupported) {
1201
+ return dirty;
1202
+ }
1203
+ /* Assign config vars */
1204
+ if (!SET_CONFIG) {
1205
+ _parseConfig(cfg);
1206
+ }
1207
+ /* Clean up removed elements */
1208
+ DOMPurify.removed = [];
1209
+ /* Check if dirty is correctly typed for IN_PLACE */
1210
+ if (typeof dirty === 'string') {
1211
+ IN_PLACE = false;
1212
+ }
1213
+ if (IN_PLACE) {
1214
+ /* Do some early pre-sanitization to avoid unsafe root nodes */
1215
+ if (dirty.nodeName) {
1216
+ const tagName = transformCaseFunc(dirty.nodeName);
1217
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
1218
+ throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
1219
+ }
1220
+ }
1221
+ } else if (dirty instanceof Node) {
1222
+ /* If dirty is a DOM element, append to an empty document to avoid
1223
+ elements being stripped by the parser */
1224
+ body = _initDocument('<!---->');
1225
+ importedNode = body.ownerDocument.importNode(dirty, true);
1226
+ if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {
1227
+ /* Node is already a body, use as is */
1228
+ body = importedNode;
1229
+ } else if (importedNode.nodeName === 'HTML') {
1230
+ body = importedNode;
1231
+ } else {
1232
+ // eslint-disable-next-line unicorn/prefer-dom-node-append
1233
+ body.appendChild(importedNode);
1234
+ }
1235
+ } else {
1236
+ /* Exit directly if we have nothing to do */
1237
+ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
1238
+ // eslint-disable-next-line unicorn/prefer-includes
1239
+ dirty.indexOf('<') === -1) {
1240
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
1241
+ }
1242
+ /* Initialize the document to work on */
1243
+ body = _initDocument(dirty);
1244
+ /* Check we have a DOM node from the data */
1245
+ if (!body) {
1246
+ return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
1247
+ }
1248
+ }
1249
+ /* Remove first element node (ours) if FORCE_BODY is set */
1250
+ if (body && FORCE_BODY) {
1251
+ _forceRemove(body.firstChild);
1252
+ }
1253
+ /* Get node iterator */
1254
+ const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
1255
+ /* Now start iterating over the created document */
1256
+ while (currentNode = nodeIterator.nextNode()) {
1257
+ /* Sanitize tags and elements */
1258
+ _sanitizeElements(currentNode);
1259
+ /* Check attributes next */
1260
+ _sanitizeAttributes(currentNode);
1261
+ /* Shadow DOM detected, sanitize it */
1262
+ if (currentNode.content instanceof DocumentFragment) {
1263
+ _sanitizeShadowDOM(currentNode.content);
1264
+ }
1265
+ }
1266
+ /* If we sanitized `dirty` in-place, return it. */
1267
+ if (IN_PLACE) {
1268
+ return dirty;
1269
+ }
1270
+ /* Return sanitized string or DOM */
1271
+ if (RETURN_DOM) {
1272
+ if (RETURN_DOM_FRAGMENT) {
1273
+ returnNode = createDocumentFragment.call(body.ownerDocument);
1274
+ while (body.firstChild) {
1275
+ // eslint-disable-next-line unicorn/prefer-dom-node-append
1276
+ returnNode.appendChild(body.firstChild);
1277
+ }
1278
+ } else {
1279
+ returnNode = body;
1280
+ }
1281
+ if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
1282
+ /*
1283
+ AdoptNode() is not used because internal state is not reset
1284
+ (e.g. the past names map of a HTMLFormElement), this is safe
1285
+ in theory but we would rather not risk another attack vector.
1286
+ The state that is cloned by importNode() is explicitly defined
1287
+ by the specs.
1288
+ */
1289
+ returnNode = importNode.call(originalDocument, returnNode, true);
1290
+ }
1291
+ return returnNode;
1292
+ }
1293
+ let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
1294
+ /* Serialize doctype if allowed */
1295
+ if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
1296
+ serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
1297
+ }
1298
+ /* Sanitize final string template-safe */
1299
+ if (SAFE_FOR_TEMPLATES) {
1300
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1301
+ serializedHTML = stringReplace(serializedHTML, expr, ' ');
1302
+ });
1303
+ }
1304
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
1305
+ };
1306
+ DOMPurify.setConfig = function () {
1307
+ let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1308
+ _parseConfig(cfg);
1309
+ SET_CONFIG = true;
1310
+ };
1311
+ DOMPurify.clearConfig = function () {
1312
+ CONFIG = null;
1313
+ SET_CONFIG = false;
1314
+ };
1315
+ DOMPurify.isValidAttribute = function (tag, attr, value) {
1316
+ /* Initialize shared config vars if necessary. */
1317
+ if (!CONFIG) {
1318
+ _parseConfig({});
1319
+ }
1320
+ const lcTag = transformCaseFunc(tag);
1321
+ const lcName = transformCaseFunc(attr);
1322
+ return _isValidAttribute(lcTag, lcName, value);
1323
+ };
1324
+ DOMPurify.addHook = function (entryPoint, hookFunction) {
1325
+ if (typeof hookFunction !== 'function') {
1326
+ return;
1327
+ }
1328
+ arrayPush(hooks[entryPoint], hookFunction);
1329
+ };
1330
+ DOMPurify.removeHook = function (entryPoint) {
1331
+ return arrayPop(hooks[entryPoint]);
1332
+ };
1333
+ DOMPurify.removeHooks = function (entryPoint) {
1334
+ hooks[entryPoint] = [];
1335
+ };
1336
+ DOMPurify.removeAllHooks = function () {
1337
+ hooks = _createHooksMap();
1338
+ };
1339
+ return DOMPurify;
1340
+ }
1341
+ var purify = createDOMPurify();
1342
+
1343
+ return purify;
1344
+
1345
+ }));
1346
+
1347
+ }(purify));
1348
+
1349
+ const DOMPurify = purify.exports;
1350
+
1351
+ function isMobile() {
1352
+ return /Android|webOS|iPhone|iPad|iPod|BlackBerry|Mobile|IEMobile|Windows Phone|Opera Mini/i.test(navigator.userAgent);
1353
+ }
1354
+ function isHostLosingFocus(event, hostElement) {
1355
+ const type = event.type;
1356
+ const focusInTypes = ['focusin', 'focus'];
1357
+ const isFocusIn = focusInTypes.includes(type);
1358
+ // on focusin: `target` is element losing focus, `relatedTarget` is element gaining focus
1359
+ // on focusout: `target` is element gaining focus, `relatedTarget` is element losing focus
1360
+ const elementGainingFocus = isFocusIn ? event.target : event.relatedTarget;
1361
+ const isElementNestedInHostElement = (element) => {
1362
+ if (element === hostElement)
1363
+ return true;
1364
+ if (element.parentElement) {
1365
+ return isElementNestedInHostElement(element.parentElement);
1366
+ }
1367
+ return false;
1368
+ };
1369
+ if (!(elementGainingFocus instanceof HTMLElement))
1370
+ return true;
1371
+ return !isElementNestedInHostElement(elementGainingFocus);
1372
+ }
1373
+ function isRelatedTargetWithinHost(event, element) {
1374
+ return event.relatedTarget !== element && !element.contains(event.relatedTarget);
1375
+ }
1376
+ function isEventFromElement(event, element) {
1377
+ var _a;
1378
+ return ((_a = event.composedPath) === null || _a === void 0 ? void 0 : _a.call(event)[0]) === element;
1379
+ }
1380
+ function overrideFocus(hostElement) {
1381
+ hostElement.focus = () => hostElement === null || hostElement === void 0 ? void 0 : hostElement.dispatchEvent(new FocusEvent('focus', { bubbles: false }));
1382
+ }
1383
+ function isFirefox() {
1384
+ const userAgent = navigator.userAgent.toLowerCase();
1385
+ return userAgent.includes('firefox');
1386
+ }
1387
+ function isTouchDevice() {
1388
+ return 'ontouchstart' in window || navigator.maxTouchPoints > 0;
1389
+ }
1390
+ /**
1391
+ * Returns the value of a prop if it is defined and included in the `validValues`
1392
+ * array. This is used primarily to prevent Vue wrappers from setting aria props
1393
+ * to "Symbol()" when the prop is not set.
1394
+ */
1395
+ function getAriaValueFromProp(prop, validValues) {
1396
+ if (prop === undefined)
1397
+ return prop;
1398
+ if (!validValues)
1399
+ return prop !== 'Symbol()' ? prop : undefined;
1400
+ return validValues.includes(prop) || prop === '' ? prop : undefined;
1401
+ }
1402
+ let guid = 1000;
1403
+ function createGuid() {
1404
+ return guid++;
1405
+ }
1406
+ function nextPaint(fn) {
1407
+ requestAnimationFrame(() => {
1408
+ requestAnimationFrame(fn);
1409
+ });
1410
+ }
1411
+ function isVisible(element) {
1412
+ return element.offsetWidth > 0 || element.offsetHeight > 0 || element.getClientRects().length > 0;
1413
+ }
1414
+ function waitForNextPaint() {
1415
+ return new Promise(resolve => nextPaint(resolve));
1416
+ }
1417
+ function sanitizeHTMLString(htmlString) {
1418
+ return DOMPurify(window).sanitize(htmlString, {
1419
+ FORBID_TAGS: ['style'],
1420
+ CUSTOM_ELEMENT_HANDLING: {
1421
+ tagNameCheck: /^q2-/,
1422
+ },
1423
+ });
1424
+ }
1425
+ function loc(key, subs) {
1426
+ var _a, _b, _c;
1427
+ if (!key)
1428
+ return '';
1429
+ if (((_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.noStrings) === true) {
1430
+ return key;
1431
+ }
1432
+ return (_c = (_b = window === null || window === void 0 ? void 0 : window.TectonElements) === null || _b === void 0 ? void 0 : _b.loc(key, subs)) !== null && _c !== void 0 ? _c : key;
1433
+ }
1434
+ function labelDOM(target) {
1435
+ const { label, hideLabel, optional, readonly } = target;
1436
+ const labelClasses = ['input-label'];
1437
+ let helpText = '';
1438
+ let shouldHideLabel = hideLabel;
1439
+ if (!shouldHideLabel) {
1440
+ const labelSlotElements = target.hostElement.querySelectorAll('[slot="label"]');
1441
+ const hasSlotContent = labelSlotElements.length > 0;
1442
+ const hasLabel = !!label;
1443
+ shouldHideLabel = hasLabel || hasSlotContent ? false : true;
1444
+ }
1445
+ if (shouldHideLabel)
1446
+ labelClasses.push('sr');
1447
+ if (optional) {
1448
+ helpText = index.h("span", { class: "optional-tag" }, loc('tecton.element.input.optional'));
1449
+ }
1450
+ if (readonly) {
1451
+ helpText = index.h("span", { class: "optional-tag" }, loc('tecton.element.input.readonly'));
1452
+ labelClasses.push('readonly-field');
1453
+ }
1454
+ return (index.h("label", { htmlFor: target.inputId, class: labelClasses.join(' ') },
1455
+ index.h("slot", { name: "label" },
1456
+ label ? loc(label) : undefined,
1457
+ helpText)));
1458
+ }
1459
+ function hasSlotContent(target, slotName) {
1460
+ return target.querySelector(`[slot="${slotName}"]`) !== null;
1461
+ }
1462
+ function handleAriaLabel(target) {
1463
+ const { ariaLabel } = target;
1464
+ if (!ariaLabel)
1465
+ return;
1466
+ // If empty ariaLabel prop is set to primitive symbol by framework wrapper, set ariaLabel to undefined and return
1467
+ const FW_WRAPPERS_EMPTY_PROP = Symbol().toString();
1468
+ if (ariaLabel === FW_WRAPPERS_EMPTY_PROP) {
1469
+ target.ariaLabel = undefined;
1470
+ return;
1471
+ }
1472
+ // If ariaLabel is set, set hideLabel to true and set label to ariaLabel
1473
+ if ('hideLabel' in target)
1474
+ target.hideLabel = true;
1475
+ target.label = loc(ariaLabel);
1476
+ target.ariaLabel = undefined;
1477
+ }
1478
+ /**
1479
+ * Handles when a prop has been renamed on a component without introducing a breaking change.
1480
+ */
1481
+ function handleRenamedProp(target, oldProp, newProp, removeOldProp) {
1482
+ if (typeof target[oldProp] === 'undefined')
1483
+ return;
1484
+ // If old prop has value, aka set in component, call handleDeprecationWarning()
1485
+ if (target[oldProp]) {
1486
+ handleDeprecationWarning(target, oldProp, 'prop');
1487
+ }
1488
+ target[newProp] = target[oldProp];
1489
+ if (removeOldProp) {
1490
+ delete target[oldProp];
1491
+ }
1492
+ }
1493
+ function handleDeprecationWarning(target, deprecatedItemName, deprecatedItemType) {
1494
+ if (window.location.hostname === 'localhost' || window.location.host === 'stack.q2developer.com') {
1495
+ if (target[deprecatedItemName] === 'undefined')
1496
+ return;
1497
+ const componentName = target.constructor.name.toLowerCase().slice(2);
1498
+ switch (deprecatedItemType) {
1499
+ case 'prop':
1500
+ if (deprecatedItemName === 'size' && componentName === 'btn') {
1501
+ console.warn(`The property of size in q2-btn should not be typeof number, or typeof string containing a number. This functionality will be deprecated in an upcoming release. Instead, please use the value 'undefined', or typeof string with any of the following values: "small" / "medium" / "large" `);
1502
+ }
1503
+ else {
1504
+ console.warn(`The property ${deprecatedItemName} in q2-${componentName} has been marked for deprecation and will be removed in an upcoming major release.`);
1505
+ }
1506
+ break;
1507
+ case 'function':
1508
+ console.warn(`The function ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`);
1509
+ break;
1510
+ case 'method':
1511
+ console.warn(`The method ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`);
1512
+ break;
1513
+ case 'event':
1514
+ console.warn(`The event ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`);
1515
+ break;
1516
+ default:
1517
+ console.error(`handleDeprecationWarning --> No type found for desired deprecation: ${deprecatedItemName} in q2-${componentName}: deprecatedItemType = ${deprecatedItemName}`);
1518
+ }
1519
+ }
1520
+ }
1521
+ function messagesDOM(target) {
1522
+ const type = target.hasError ? 'danger' : 'info';
1523
+ return (index.h("div", { class: "messages-container" },
1524
+ index.h("q2-message", { appearance: "minimal", description: true, type: type, "test-id": "message" },
1525
+ index.h("ul", { id: target.inputDescribedBy }, target.messages.map(message => (index.h("li", { "test-id": "messageListItem" }, loc(message))))))));
1526
+ }
1527
+ function setMessageHeight(target) {
1528
+ const messageContainer = target.hostElement.shadowRoot.querySelector('.messages-container');
1529
+ const q2Message = messageContainer.querySelector('q2-message');
1530
+ nextPaint(() => {
1531
+ const height = target.showMessages && target.hasFocus ? q2Message.getBoundingClientRect().height : 0;
1532
+ if (messageContainer.style.getPropertyValue('height') === `${height}px`)
1533
+ return;
1534
+ if (height === 0) {
1535
+ q2Message.classList.add('invisible');
1536
+ messageContainer.style.removeProperty('height');
1537
+ }
1538
+ else {
1539
+ q2Message.classList.remove('invisible');
1540
+ messageContainer.style.setProperty('height', `${height}px`);
1541
+ }
1542
+ });
1543
+ }
1544
+ const resizeIframe = () => {
1545
+ var _a, _b;
1546
+ return (_b = (_a = window.TectonElements) === null || _a === void 0 ? void 0 : _a.resizeIframe) === null || _b === void 0 ? void 0 : _b.call(_a);
1547
+ };
1548
+ // Handling color attribute (deprecated)
1549
+ const handleColor = (target) => {
1550
+ if (!target.intent && ['primary', 'secondary'].includes(target.color)) {
1551
+ target.intent = `workflow-${target.color}`;
1552
+ target.color = undefined;
1553
+ }
1554
+ };
1555
+
1556
+ exports.createGuid = createGuid;
1557
+ exports.getAriaValueFromProp = getAriaValueFromProp;
1558
+ exports.handleAriaLabel = handleAriaLabel;
1559
+ exports.handleColor = handleColor;
1560
+ exports.handleDeprecationWarning = handleDeprecationWarning;
1561
+ exports.handleRenamedProp = handleRenamedProp;
1562
+ exports.hasSlotContent = hasSlotContent;
1563
+ exports.isEventFromElement = isEventFromElement;
1564
+ exports.isFirefox = isFirefox;
1565
+ exports.isHostLosingFocus = isHostLosingFocus;
1566
+ exports.isMobile = isMobile;
1567
+ exports.isRelatedTargetWithinHost = isRelatedTargetWithinHost;
1568
+ exports.isTouchDevice = isTouchDevice;
1569
+ exports.isVisible = isVisible;
1570
+ exports.labelDOM = labelDOM;
1571
+ exports.loc = loc;
1572
+ exports.messagesDOM = messagesDOM;
1573
+ exports.nextPaint = nextPaint;
1574
+ exports.overrideFocus = overrideFocus;
1575
+ exports.resizeIframe = resizeIframe;
1576
+ exports.sanitizeHTMLString = sanitizeHTMLString;
1577
+ exports.setMessageHeight = setMessageHeight;
1578
+ exports.waitForNextPaint = waitForNextPaint;
1579
+
1580
+ //# sourceMappingURL=index-64d8b839.js.map