spell-ui 0.8.9 → 0.8.10

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 (1167) hide show
  1. package/README-components.md +9 -3
  2. package/README-frameworks.md +5 -5
  3. package/README-migrating.md +2 -2
  4. package/README.md +5 -5
  5. package/dist/{CodeEngine-GL9EzwF1.js → CodeEngine-B684vKxR.js} +39 -100
  6. package/dist/{CodeEngine-GL9EzwF1.js.map → CodeEngine-B684vKxR.js.map} +1 -1
  7. package/dist/{Dragging-CMZoLEWQ.js → Dragging-B93hbRxF.js} +17 -15
  8. package/dist/Dragging-B93hbRxF.js.map +1 -0
  9. package/dist/{MarkdownEngine-CW1WGqNp.js → MarkdownEngine-D1jqcFeU.js} +11 -72
  10. package/dist/{MarkdownEngine-CW1WGqNp.js.map → MarkdownEngine-D1jqcFeU.js.map} +1 -1
  11. package/dist/MarkdownSanitizer-CqsWivYJ.js +866 -0
  12. package/dist/MarkdownSanitizer-CqsWivYJ.js.map +1 -0
  13. package/dist/{PrefStore-Qv0e5y04.js → PrefStore-Di83C0bY.js} +13 -9
  14. package/dist/PrefStore-Di83C0bY.js.map +1 -0
  15. package/dist/ScrollingRow-DkOtx2QK.js +89 -0
  16. package/dist/ScrollingRow-DkOtx2QK.js.map +1 -0
  17. package/dist/{SitePages-CciwREek.js → SitePages-B3zd5Zgu.js} +37 -10
  18. package/dist/SitePages-B3zd5Zgu.js.map +1 -0
  19. package/dist/SlottedItems-DWfAZYqM.js +88 -0
  20. package/dist/SlottedItems-DWfAZYqM.js.map +1 -0
  21. package/dist/{TemporalPolyfill-D9mr7_wA.js → TemporalPolyfill-Bv_c_xa0.js} +7 -12
  22. package/dist/{TemporalPolyfill-D9mr7_wA.js.map → TemporalPolyfill-Bv_c_xa0.js.map} +1 -1
  23. package/dist/{ThemeDraft-B7NPif4d.js → ThemeDraft-CyX3YA_L.js} +41 -43
  24. package/dist/{ThemeDraft-B7NPif4d.js.map → ThemeDraft-CyX3YA_L.js.map} +1 -1
  25. package/dist/{TreeMeasure-BVJeGb1L.js → TreeMeasure-BK74uexu.js} +3 -4
  26. package/dist/{TreeMeasure-BVJeGb1L.js.map → TreeMeasure-BK74uexu.js.map} +1 -1
  27. package/dist/UIButton-BmIiXYDC.js +5 -0
  28. package/dist/UIButton-BmIiXYDC.js.map +1 -0
  29. package/dist/UIGrid-2ZUA1YEc.js +200 -0
  30. package/dist/UIGrid-2ZUA1YEc.js.map +1 -0
  31. package/dist/{UIInput-BodVbUoQ.js → UIInput-B3K0w4ow.js} +2 -3
  32. package/dist/UIInput-B3K0w4ow.js.map +1 -0
  33. package/dist/{UIKeys-Rh_gUZjP.js → UIKeys-DmXvyJuU.js} +12 -12
  34. package/dist/UIKeys-DmXvyJuU.js.map +1 -0
  35. package/dist/{UILabel-DgJUBzB_.js → UILabel-pCjKxQlQ.js} +2 -3
  36. package/dist/UILabel-pCjKxQlQ.js.map +1 -0
  37. package/dist/UIMenu-CqURPocK.js +42 -0
  38. package/dist/UIMenu-CqURPocK.js.map +1 -0
  39. package/dist/{UIRuntime-KH309p5B.js → UIRuntime-BXutHphM.js} +253 -239
  40. package/dist/UIRuntime-BXutHphM.js.map +1 -0
  41. package/dist/{UISegment-CMMIW7cZ.js → UISegment-BF4Tgy2D.js} +2 -3
  42. package/dist/UISegment-BF4Tgy2D.js.map +1 -0
  43. package/dist/_spell-element/UIComponent.d.ts +8 -0
  44. package/dist/_spell-element/vocabulary.types.d.ts +20 -2
  45. package/dist/_util/Dragging.d.ts +14 -2
  46. package/dist/_util/dom.d.ts +12 -8
  47. package/dist/_util/measures/Dimension.d.ts +1 -1
  48. package/dist/_util/persist/PrefStore.d.ts +7 -2
  49. package/dist/_util/persist/persist.types.d.ts +6 -0
  50. package/dist/_util/platform.d.ts +54 -0
  51. package/dist/_util/string.d.ts +25 -0
  52. package/dist/api.js +2 -3
  53. package/dist/api.js.map +1 -1
  54. package/dist/{apple.palette-B4ivrNlM.js → apple.palette-YLjENwUt.js} +2 -3
  55. package/dist/apple.palette-YLjENwUt.js.map +1 -0
  56. package/dist/{classic-DCTQrteU.js → classic-BHyJFvQa.js} +2 -3
  57. package/dist/classic-BHyJFvQa.js.map +1 -0
  58. package/dist/components/ComponentDefinitions.d.ts +55 -8
  59. package/dist/components/components.es.d.ts +2 -1
  60. package/dist/components/components.planned.d.ts +1 -1
  61. package/dist/components/components.types.d.ts +22 -0
  62. package/dist/components/ui-accordion/UIAccordion.d.ts +1 -0
  63. package/dist/components/ui-accordion/UIAccordion.en.d.ts +1 -0
  64. package/dist/components/ui-action/UIAction.d.ts +38 -1
  65. package/dist/components/ui-action/UIAction.en.d.ts +17 -8
  66. package/dist/components/ui-action/UIAction.es.d.ts +1 -0
  67. package/dist/components/ui-ad/UIAd.d.ts +1 -0
  68. package/dist/components/ui-ad/UIAd.en.d.ts +1 -0
  69. package/dist/components/ui-app-menu/UIAppMenu.d.ts +41 -0
  70. package/dist/components/ui-app-menu/UIAppMenu.en.d.ts +294 -0
  71. package/dist/components/ui-app-menu/UIAppMenu.es.d.ts +35 -0
  72. package/dist/components/ui-app-menu/index.d.ts +2 -0
  73. package/dist/components/ui-breadcrumbs/UIBreadcrumb.d.ts +1 -0
  74. package/dist/components/ui-breadcrumbs/UIBreadcrumb.en.d.ts +1 -0
  75. package/dist/components/ui-breadcrumbs/UIBreadcrumbs.d.ts +1 -0
  76. package/dist/components/ui-breadcrumbs/UIBreadcrumbs.en.d.ts +1 -0
  77. package/dist/components/ui-button/UIButton.d.ts +5 -4
  78. package/dist/components/ui-button/UIButton.en.d.ts +4 -3
  79. package/dist/components/ui-button/UIButton.fallback.d.ts +4 -3
  80. package/dist/components/ui-button/UIButton.types.d.ts +1 -1
  81. package/dist/components/ui-button/UIButtons.d.ts +7 -5
  82. package/dist/components/ui-button/UIButtons.en.d.ts +5 -3
  83. package/dist/components/ui-button/UIButtons.es.d.ts +1 -0
  84. package/dist/components/ui-button/UIOr.d.ts +1 -0
  85. package/dist/components/ui-button/UIOr.en.d.ts +1 -0
  86. package/dist/components/ui-calendar/UICalendar.d.ts +1 -0
  87. package/dist/components/ui-calendar/UICalendar.en.d.ts +1 -0
  88. package/dist/components/ui-calendar/UICalendar.fallback.d.ts +1 -0
  89. package/dist/components/ui-card/UICard.d.ts +1 -0
  90. package/dist/components/ui-card/UICard.en.d.ts +1 -0
  91. package/dist/components/ui-card/UICards.d.ts +1 -0
  92. package/dist/components/ui-card/UICards.en.d.ts +1 -0
  93. package/dist/components/ui-checkbox/UICheckbox.d.ts +1 -0
  94. package/dist/components/ui-checkbox/UICheckbox.en.d.ts +1 -0
  95. package/dist/components/ui-checkbox/UICheckbox.fallback.d.ts +1 -0
  96. package/dist/components/ui-checkbox/UIRadio.d.ts +1 -0
  97. package/dist/components/ui-checkbox/UIRadio.en.d.ts +1 -0
  98. package/dist/components/ui-code/CodeHighlighter.d.ts +7 -3
  99. package/dist/components/ui-code/UICode.d.ts +12 -1
  100. package/dist/components/ui-code/UICode.en.d.ts +1 -0
  101. package/dist/components/ui-code/UICode.types.d.ts +9 -0
  102. package/dist/components/ui-comment/UIComment.d.ts +1 -0
  103. package/dist/components/ui-comment/UIComment.en.d.ts +1 -0
  104. package/dist/components/ui-comment/UIComments.d.ts +1 -0
  105. package/dist/components/ui-comment/UIComments.en.d.ts +1 -0
  106. package/dist/components/ui-components/UIComponents.d.ts +1 -0
  107. package/dist/components/ui-components/UIComponents.en.d.ts +1 -0
  108. package/dist/components/ui-container/UIContainer.d.ts +54 -1
  109. package/dist/components/ui-container/UIContainer.en.d.ts +40 -1
  110. package/dist/components/ui-container/UIContainer.es.d.ts +1 -0
  111. package/dist/components/ui-device/UIDevice.d.ts +234 -0
  112. package/dist/components/ui-device/UIDevice.en.d.ts +126 -0
  113. package/dist/components/ui-device/UIDevice.es.d.ts +52 -0
  114. package/dist/components/ui-device/index.d.ts +1 -0
  115. package/dist/components/ui-diagram/UIDiagram.d.ts +1 -0
  116. package/dist/components/ui-diagram/UIDiagram.en.d.ts +1 -0
  117. package/dist/components/ui-diagram/UIDiagramNode.d.ts +1 -0
  118. package/dist/components/ui-diagram/UIDiagramNode.en.d.ts +1 -0
  119. package/dist/components/ui-dimension/UIDimension.d.ts +1 -0
  120. package/dist/components/ui-dimension/UIDimension.en.d.ts +1 -0
  121. package/dist/components/ui-dimmer/UIDimmer.d.ts +1 -0
  122. package/dist/components/ui-dimmer/UIDimmer.en.d.ts +1 -0
  123. package/dist/components/ui-divider/UIDivider.d.ts +1 -0
  124. package/dist/components/ui-divider/UIDivider.en.d.ts +1 -0
  125. package/dist/components/ui-dropdown/SlottedItems.d.ts +9 -1
  126. package/dist/components/ui-dropdown/UIDropdown.d.ts +1 -0
  127. package/dist/components/ui-dropdown/UIDropdown.en.d.ts +1 -0
  128. package/dist/components/ui-dropdown/UIDropdown.fallback.d.ts +1 -0
  129. package/dist/components/ui-embed/UIEmbed.d.ts +1 -0
  130. package/dist/components/ui-embed/UIEmbed.en.d.ts +1 -0
  131. package/dist/components/ui-emoji/UIEmoji.d.ts +1 -0
  132. package/dist/components/ui-emoji/UIEmoji.en.d.ts +1 -0
  133. package/dist/components/ui-example/UIExample.en.d.ts +1 -0
  134. package/dist/components/ui-feed/UIFeed.d.ts +1 -0
  135. package/dist/components/ui-feed/UIFeed.en.d.ts +1 -0
  136. package/dist/components/ui-feed/UIFeedEvent.d.ts +1 -0
  137. package/dist/components/ui-feed/UIFeedEvent.en.d.ts +1 -0
  138. package/dist/components/ui-flag/UIFlag.d.ts +1 -0
  139. package/dist/components/ui-flag/UIFlag.en.d.ts +1 -0
  140. package/dist/components/ui-flyout/UIFlyout.d.ts +1 -0
  141. package/dist/components/ui-flyout/UIFlyout.en.d.ts +1 -0
  142. package/dist/components/ui-form/UIField.d.ts +11 -4
  143. package/dist/components/ui-form/UIField.en.d.ts +3 -2
  144. package/dist/components/ui-form/UIFields.d.ts +1 -0
  145. package/dist/components/ui-form/UIFields.en.d.ts +1 -0
  146. package/dist/components/ui-form/UIForm.d.ts +1 -0
  147. package/dist/components/ui-form/UIForm.en.d.ts +1 -0
  148. package/dist/components/ui-form/UIRepeat.d.ts +1 -0
  149. package/dist/components/ui-form/UIRepeat.en.d.ts +1 -0
  150. package/dist/components/ui-grid/UIColumn.d.ts +4 -3
  151. package/dist/components/ui-grid/UIColumn.en.d.ts +4 -3
  152. package/dist/components/ui-grid/UIGrid.d.ts +1 -0
  153. package/dist/components/ui-grid/UIGrid.en.d.ts +1 -0
  154. package/dist/components/ui-grid/UIRow.d.ts +1 -0
  155. package/dist/components/ui-grid/UIRow.en.d.ts +1 -0
  156. package/dist/components/ui-icon/UIIcon.d.ts +1 -0
  157. package/dist/components/ui-icon/UIIcon.en.d.ts +1 -0
  158. package/dist/components/ui-icon/UIIcons.d.ts +1 -0
  159. package/dist/components/ui-icon/UIIcons.en.d.ts +1 -0
  160. package/dist/components/ui-icon-picker/UIIconPicker.d.ts +5 -1
  161. package/dist/components/ui-icon-picker/UIIconPicker.en.d.ts +1 -0
  162. package/dist/components/ui-icon-picker/UIIconPicker.fallback.d.ts +1 -0
  163. package/dist/components/ui-image/UIImage.d.ts +1 -0
  164. package/dist/components/ui-image/UIImage.en.d.ts +1 -0
  165. package/dist/components/ui-image/UIImages.d.ts +1 -0
  166. package/dist/components/ui-image/UIImages.en.d.ts +1 -0
  167. package/dist/components/ui-include/UIInclude.d.ts +1 -0
  168. package/dist/components/ui-include/UIInclude.en.d.ts +1 -0
  169. package/dist/components/ui-input/UIInput.d.ts +1 -0
  170. package/dist/components/ui-input/UIInput.en.d.ts +1 -0
  171. package/dist/components/ui-input/UIInput.fallback.d.ts +1 -0
  172. package/dist/components/ui-input/UITextarea.d.ts +1 -0
  173. package/dist/components/ui-input/UITextarea.en.d.ts +1 -0
  174. package/dist/components/ui-item/UIItem.d.ts +19 -8
  175. package/dist/components/ui-item/UIItem.en.d.ts +2 -1
  176. package/dist/components/ui-items/UIItems.d.ts +1 -0
  177. package/dist/components/ui-items/UIItems.en.d.ts +1 -0
  178. package/dist/components/ui-json/UIJson.d.ts +1 -0
  179. package/dist/components/ui-json/UIJson.en.d.ts +1 -0
  180. package/dist/components/ui-keys/UIKeys.d.ts +1 -0
  181. package/dist/components/ui-keys/UIKeys.en.d.ts +1 -0
  182. package/dist/components/ui-label/UILabel.d.ts +3 -2
  183. package/dist/components/ui-label/UILabel.en.d.ts +3 -2
  184. package/dist/components/ui-label/UILabels.d.ts +1 -0
  185. package/dist/components/ui-label/UILabels.en.d.ts +1 -0
  186. package/dist/components/ui-list/UIList.d.ts +1 -0
  187. package/dist/components/ui-list/UIList.en.d.ts +1 -0
  188. package/dist/components/ui-loader/UILoader.d.ts +1 -0
  189. package/dist/components/ui-loader/UILoader.en.d.ts +1 -0
  190. package/dist/components/ui-markdown/MarkdownBox.d.ts +7 -2
  191. package/dist/components/ui-markdown/MarkdownFormats.d.ts +9 -4
  192. package/dist/components/ui-markdown/UIMarkdown.en.d.ts +5 -0
  193. package/dist/components/ui-markdown/UIMarkdown.es.d.ts +1 -0
  194. package/dist/components/ui-menu/ScrollingRow.d.ts +19 -1
  195. package/dist/components/ui-menu/SegmentedThumb.d.ts +8 -1
  196. package/dist/components/ui-menu/SubMenuAim.d.ts +115 -0
  197. package/dist/components/ui-menu/TitleFit.d.ts +16 -1
  198. package/dist/components/ui-menu/UIMenu.d.ts +112 -9
  199. package/dist/components/ui-menu/UIMenu.en.d.ts +3 -2
  200. package/dist/components/ui-menu/UISubmenu.d.ts +261 -0
  201. package/dist/components/ui-menu/UISubmenu.en.d.ts +102 -0
  202. package/dist/components/ui-menu/UISubmenu.es.d.ts +21 -0
  203. package/dist/components/ui-menu/index.d.ts +3 -1
  204. package/dist/components/ui-message/UIMessage.d.ts +3 -2
  205. package/dist/components/ui-message/UIMessage.en.d.ts +4 -3
  206. package/dist/components/ui-modal/ModalDialogs.d.ts +36 -2
  207. package/dist/components/ui-modal/UIModal.d.ts +1 -0
  208. package/dist/components/ui-modal/UIModal.en.d.ts +1 -0
  209. package/dist/components/ui-nag/UINag.d.ts +1 -0
  210. package/dist/components/ui-nag/UINag.en.d.ts +1 -0
  211. package/dist/components/ui-page/UIPage.d.ts +1 -0
  212. package/dist/components/ui-page/UIPage.en.d.ts +1 -0
  213. package/dist/components/ui-page-layout/UIPageLayout.d.ts +311 -0
  214. package/dist/components/ui-page-layout/UIPageLayout.en.d.ts +99 -0
  215. package/dist/components/ui-page-layout/UIPageLayout.es.d.ts +38 -0
  216. package/dist/components/ui-page-layout/index.d.ts +1 -0
  217. package/dist/components/ui-panel/ScrollShades.d.ts +38 -0
  218. package/dist/components/ui-panel/UIPanel.d.ts +21 -2
  219. package/dist/components/ui-panel/UIPanel.en.d.ts +68 -61
  220. package/dist/components/ui-parts/UIActions.d.ts +1 -0
  221. package/dist/components/ui-parts/UIActions.en.d.ts +1 -0
  222. package/dist/components/ui-parts/UIAuthor.d.ts +1 -0
  223. package/dist/components/ui-parts/UIAuthor.en.d.ts +1 -0
  224. package/dist/components/ui-parts/UIAvatar.d.ts +11 -2
  225. package/dist/components/ui-parts/UIAvatar.en.d.ts +3 -2
  226. package/dist/components/ui-parts/UIContent.d.ts +1 -0
  227. package/dist/components/ui-parts/UIContent.en.d.ts +1 -0
  228. package/dist/components/ui-parts/UIDate.d.ts +1 -0
  229. package/dist/components/ui-parts/UIDate.en.d.ts +1 -0
  230. package/dist/components/ui-parts/UIDescription.d.ts +1 -0
  231. package/dist/components/ui-parts/UIDescription.en.d.ts +1 -0
  232. package/dist/components/ui-parts/UIDetail.d.ts +1 -0
  233. package/dist/components/ui-parts/UIDetail.en.d.ts +1 -0
  234. package/dist/components/ui-parts/UIExtra.d.ts +1 -0
  235. package/dist/components/ui-parts/UIExtra.en.d.ts +1 -0
  236. package/dist/components/ui-parts/UIHeader.d.ts +4 -3
  237. package/dist/components/ui-parts/UIHeader.en.d.ts +4 -3
  238. package/dist/components/ui-parts/UIMeta.d.ts +1 -0
  239. package/dist/components/ui-parts/UIMeta.en.d.ts +1 -0
  240. package/dist/components/ui-parts/UIParts.types.d.ts +18 -5
  241. package/dist/components/ui-parts/UISummary.d.ts +1 -0
  242. package/dist/components/ui-parts/UISummary.en.d.ts +1 -0
  243. package/dist/components/ui-parts/UITitle.d.ts +1 -0
  244. package/dist/components/ui-parts/UITitle.en.d.ts +1 -0
  245. package/dist/components/ui-parts/UIValue.d.ts +1 -0
  246. package/dist/components/ui-parts/UIValue.en.d.ts +1 -0
  247. package/dist/components/ui-placeholder/UIPlaceholder.d.ts +1 -0
  248. package/dist/components/ui-placeholder/UIPlaceholder.en.d.ts +1 -0
  249. package/dist/components/ui-placeholder/UIPlaceholderHeader.d.ts +1 -0
  250. package/dist/components/ui-placeholder/UIPlaceholderHeader.en.d.ts +1 -0
  251. package/dist/components/ui-placeholder/UIPlaceholderImage.d.ts +1 -0
  252. package/dist/components/ui-placeholder/UIPlaceholderImage.en.d.ts +1 -0
  253. package/dist/components/ui-placeholder/UIPlaceholderLine.d.ts +1 -0
  254. package/dist/components/ui-placeholder/UIPlaceholderLine.en.d.ts +1 -0
  255. package/dist/components/ui-placeholder/UIPlaceholderParagraph.d.ts +1 -0
  256. package/dist/components/ui-placeholder/UIPlaceholderParagraph.en.d.ts +1 -0
  257. package/dist/components/ui-popup/UIPopup.d.ts +21 -3
  258. package/dist/components/ui-popup/UIPopup.en.d.ts +1 -0
  259. package/dist/components/ui-progress/UIProgress.d.ts +3 -2
  260. package/dist/components/ui-progress/UIProgress.en.d.ts +4 -3
  261. package/dist/components/ui-property-editor/UIProperty.d.ts +47 -13
  262. package/dist/components/ui-property-editor/UIProperty.en.d.ts +1 -0
  263. package/dist/components/ui-property-editor/UIPropertyEditor.d.ts +14 -1
  264. package/dist/components/ui-property-editor/UIPropertyEditor.en.d.ts +1 -0
  265. package/dist/components/ui-property-editor/UIPropertyEditor.types.d.ts +7 -1
  266. package/dist/components/ui-property-editor/UIPropertyGroup.d.ts +15 -6
  267. package/dist/components/ui-property-editor/UIPropertyGroup.en.d.ts +1 -0
  268. package/dist/components/ui-quote/UIQuote.d.ts +1 -0
  269. package/dist/components/ui-quote/UIQuote.en.d.ts +1 -0
  270. package/dist/components/ui-rail/UIRail.d.ts +4 -3
  271. package/dist/components/ui-rail/UIRail.en.d.ts +4 -3
  272. package/dist/components/ui-rating/UIRating.d.ts +1 -0
  273. package/dist/components/ui-rating/UIRating.en.d.ts +1 -0
  274. package/dist/components/ui-rating/UIRating.fallback.d.ts +1 -0
  275. package/dist/components/ui-reveal/UIReveal.d.ts +1 -0
  276. package/dist/components/ui-reveal/UIReveal.en.d.ts +1 -0
  277. package/dist/components/ui-root/UIRoot.en.d.ts +1 -0
  278. package/dist/components/ui-search/UISearch.d.ts +1 -0
  279. package/dist/components/ui-search/UISearch.en.d.ts +1 -0
  280. package/dist/components/ui-search/UISearch.fallback.d.ts +1 -0
  281. package/dist/components/ui-section/UISection.d.ts +3 -2
  282. package/dist/components/ui-section/UISection.en.d.ts +3 -2
  283. package/dist/components/ui-section/UISections.d.ts +1 -0
  284. package/dist/components/ui-section/UISections.en.d.ts +1 -0
  285. package/dist/components/ui-segment/UISegment.d.ts +9 -10
  286. package/dist/components/ui-segment/UISegment.en.d.ts +10 -11
  287. package/dist/components/ui-segment/UISegments.d.ts +1 -0
  288. package/dist/components/ui-segment/UISegments.en.d.ts +1 -0
  289. package/dist/components/ui-select/UISelect.d.ts +1 -0
  290. package/dist/components/ui-select/UISelect.en.d.ts +1 -0
  291. package/dist/components/ui-select/UISelect.fallback.d.ts +1 -0
  292. package/dist/components/ui-shape/UIShape.d.ts +1 -0
  293. package/dist/components/ui-shape/UIShape.en.d.ts +1 -0
  294. package/dist/components/ui-shape/UISide.d.ts +1 -0
  295. package/dist/components/ui-shape/UISide.en.d.ts +1 -0
  296. package/dist/components/ui-sidebar/UIPushable.d.ts +1 -0
  297. package/dist/components/ui-sidebar/UIPushable.en.d.ts +1 -0
  298. package/dist/components/ui-sidebar/UIPusher.d.ts +1 -0
  299. package/dist/components/ui-sidebar/UIPusher.en.d.ts +1 -0
  300. package/dist/components/ui-sidebar/UISidebar.d.ts +1 -0
  301. package/dist/components/ui-sidebar/UISidebar.en.d.ts +1 -0
  302. package/dist/components/ui-sides/UISides.d.ts +1 -0
  303. package/dist/components/ui-sides/UISides.en.d.ts +1 -0
  304. package/dist/components/ui-sides/UISides.fallback.d.ts +1 -0
  305. package/dist/components/ui-site-breadcrumbs/UISiteBreadcrumbs.d.ts +118 -0
  306. package/dist/components/ui-site-breadcrumbs/UISiteBreadcrumbs.en.d.ts +49 -0
  307. package/dist/components/ui-site-breadcrumbs/UISiteBreadcrumbs.es.d.ts +22 -0
  308. package/dist/components/ui-site-breadcrumbs/index.d.ts +1 -0
  309. package/dist/components/ui-site-nav/SitePages.d.ts +26 -3
  310. package/dist/components/ui-site-nav/UISiteNav.d.ts +43 -5
  311. package/dist/components/ui-site-nav/UISiteNav.en.d.ts +10 -1
  312. package/dist/components/ui-site-nav-button/UISiteNavButton.d.ts +63 -0
  313. package/dist/components/ui-site-nav-button/UISiteNavButton.en.d.ts +173 -0
  314. package/dist/components/ui-site-nav-button/UISiteNavButton.es.d.ts +20 -0
  315. package/dist/components/ui-site-nav-button/index.d.ts +1 -0
  316. package/dist/components/ui-site-tabs/UISiteTabs.d.ts +21 -6
  317. package/dist/components/ui-site-tabs/UISiteTabs.en.d.ts +1 -0
  318. package/dist/components/ui-slider/UISlider.d.ts +1 -0
  319. package/dist/components/ui-slider/UISlider.en.d.ts +1 -0
  320. package/dist/components/ui-slider/UISlider.fallback.d.ts +1 -0
  321. package/dist/components/ui-space/UISpace.d.ts +1 -0
  322. package/dist/components/ui-space/UISpace.en.d.ts +1 -0
  323. package/dist/components/ui-split-panel/UISplitPanel.d.ts +43 -7
  324. package/dist/components/ui-split-panel/UISplitPanel.en.d.ts +2 -1
  325. package/dist/components/ui-stack/UIStack.d.ts +1 -0
  326. package/dist/components/ui-stack/UIStack.en.d.ts +1 -0
  327. package/dist/components/ui-statistic/UIStatistic.d.ts +1 -0
  328. package/dist/components/ui-statistic/UIStatistic.en.d.ts +1 -0
  329. package/dist/components/ui-statistic/UIStatistics.d.ts +1 -0
  330. package/dist/components/ui-statistic/UIStatistics.en.d.ts +1 -0
  331. package/dist/components/ui-step/UIStep.d.ts +1 -0
  332. package/dist/components/ui-step/UIStep.en.d.ts +1 -0
  333. package/dist/components/ui-step/UISteps.d.ts +3 -2
  334. package/dist/components/ui-step/UISteps.en.d.ts +3 -2
  335. package/dist/components/ui-sticky/UISticky.d.ts +1 -0
  336. package/dist/components/ui-sticky/UISticky.en.d.ts +1 -0
  337. package/dist/components/ui-tab/UITab.d.ts +3 -2
  338. package/dist/components/ui-tab/UITab.en.d.ts +4 -3
  339. package/dist/components/ui-tab/UITabs.d.ts +5 -4
  340. package/dist/components/ui-tab/UITabs.en.d.ts +4 -3
  341. package/dist/components/ui-table/TableGrammar.d.ts +2 -2
  342. package/dist/components/ui-table/UICell.d.ts +1 -0
  343. package/dist/components/ui-table/UICell.en.d.ts +1 -0
  344. package/dist/components/ui-table/UITable.d.ts +7 -6
  345. package/dist/components/ui-table/UITable.en.d.ts +7 -6
  346. package/dist/components/ui-terms/UITerm.d.ts +1 -0
  347. package/dist/components/ui-terms/UITerm.en.d.ts +1 -0
  348. package/dist/components/ui-terms/UITerms.d.ts +1 -0
  349. package/dist/components/ui-terms/UITerms.en.d.ts +1 -0
  350. package/dist/components/ui-text/UILink.d.ts +1 -0
  351. package/dist/components/ui-text/UILink.en.d.ts +1 -0
  352. package/dist/components/ui-text/UIText.d.ts +2 -1
  353. package/dist/components/ui-text/UIText.en.d.ts +2 -1
  354. package/dist/components/ui-theme-editor/BenchAddress.d.ts +9 -0
  355. package/dist/components/ui-theme-editor/UIColorChip.d.ts +1 -0
  356. package/dist/components/ui-theme-editor/UIColorChip.en.d.ts +1 -0
  357. package/dist/components/ui-theme-editor/UIThemeEditor.d.ts +1 -0
  358. package/dist/components/ui-theme-editor/UIThemeEditor.en.d.ts +1 -0
  359. package/dist/components/ui-theme-editor/UIThemeToken.d.ts +1 -0
  360. package/dist/components/ui-theme-editor/UIThemeToken.en.d.ts +1 -0
  361. package/dist/components/ui-theme-menu/UIThemeMenu.d.ts +37 -15
  362. package/dist/components/ui-theme-menu/UIThemeMenu.en.d.ts +3 -2
  363. package/dist/components/ui-toast/UIToast.d.ts +1 -0
  364. package/dist/components/ui-toast/UIToast.en.d.ts +1 -0
  365. package/dist/components/ui-toc/UIToc.d.ts +1 -0
  366. package/dist/components/ui-toc/UIToc.en.d.ts +1 -0
  367. package/dist/components/ui-toolbar/UIToolbar.d.ts +134 -1
  368. package/dist/components/ui-toolbar/UIToolbar.en.d.ts +75 -42
  369. package/dist/components/ui-toolbar/UIToolbar.es.d.ts +5 -0
  370. package/dist/components/ui-transition/UITransition.d.ts +1 -0
  371. package/dist/components/ui-transition/UITransition.en.d.ts +1 -0
  372. package/dist/components/ui-tree/UITree.d.ts +102 -2
  373. package/dist/components/ui-tree/UITree.en.d.ts +14 -1
  374. package/dist/components/ui-tree/UITree.es.d.ts +3 -0
  375. package/dist/components/ui-tree/UITreeItem.d.ts +21 -2
  376. package/dist/components/ui-tree/UITreeItem.en.d.ts +5 -1
  377. package/dist/components/ui-tree/UITreeItem.es.d.ts +1 -0
  378. package/dist/components/ui-tree-diagram/UITreeDiagram.d.ts +1 -0
  379. package/dist/components/ui-tree-diagram/UITreeDiagram.en.d.ts +1 -0
  380. package/dist/components/ui-tree-diagram/UITreeNode.d.ts +1 -0
  381. package/dist/components/ui-tree-diagram/UITreeNode.en.d.ts +1 -0
  382. package/dist/components/ui-video/UIAudio.d.ts +1 -0
  383. package/dist/components/ui-video/UIAudio.en.d.ts +1 -0
  384. package/dist/components/ui-video/UIVideo.d.ts +1 -0
  385. package/dist/components/ui-video/UIVideo.en.d.ts +1 -0
  386. package/dist/components/ui-visibility/UIVisibility.d.ts +1 -0
  387. package/dist/components/ui-visibility/UIVisibility.en.d.ts +1 -0
  388. package/dist/components/ui-zoom/UIZoom.d.ts +1 -0
  389. package/dist/components/ui-zoom/UIZoom.en.d.ts +1 -0
  390. package/dist/{components.es-BOa_7gFF.js → components.es-DEa8Ep42.js} +265 -77
  391. package/dist/components.es-DEa8Ep42.js.map +1 -0
  392. package/dist/core.js +884 -806
  393. package/dist/core.js.map +1 -1
  394. package/dist/{crisp-VfYZlTph.js → crisp-DIpY320U.js} +3 -4
  395. package/dist/crisp-DIpY320U.js.map +1 -0
  396. package/dist/crisp.theme-Ir9p4BDC.js +5 -0
  397. package/dist/crisp.theme-Ir9p4BDC.js.map +1 -0
  398. package/dist/{dark-CbUdPe0a.js → dark-B5s4QbmU.js} +2 -3
  399. package/dist/dark-B5s4QbmU.js.map +1 -0
  400. package/dist/{dist-BLYIGZVK.js → dist-BQT4KajA.js} +34 -80
  401. package/dist/dist-BQT4KajA.js.map +1 -0
  402. package/dist/docs-components/docs-components.types.d.ts +6 -0
  403. package/dist/docs-components/ui-docs-palette/UIDocsPalette.d.ts +180 -0
  404. package/dist/docs-components/ui-docs-palette/UIDocsPalette.en.d.ts +88 -0
  405. package/dist/docs-components/ui-docs-palette/UIDocsPalette.types.d.ts +5 -0
  406. package/dist/docs-components/ui-docs-palette/index.d.ts +2 -0
  407. package/dist/docs-components/ui-docs-tokens/UIDocsTokens.d.ts +23 -0
  408. package/dist/docs-components/ui-docs-tokens/UIDocsTokens.en.d.ts +5 -1
  409. package/dist/elements/PartComponent.d.ts +5 -0
  410. package/dist/elements/PopoverPanel.d.ts +12 -1
  411. package/dist/elements/Validator.d.ts +1 -1
  412. package/dist/emoji/cldr/{0-DSUpV2d7.js → 0-B6B0nyLW.js} +2 -3
  413. package/dist/emoji/cldr/0-B6B0nyLW.js.map +1 -0
  414. package/dist/emoji/cldr/{a-D_oB4vJ-.js → a-C12vpdzK.js} +2 -3
  415. package/dist/emoji/cldr/a-C12vpdzK.js.map +1 -0
  416. package/dist/emoji/cldr/{b-DX0W0Mda.js → b-BGkQUJ8v.js} +2 -3
  417. package/dist/emoji/cldr/b-BGkQUJ8v.js.map +1 -0
  418. package/dist/emoji/cldr/{c-DUHidpE9.js → c-DtqAfVnG.js} +2 -3
  419. package/dist/emoji/cldr/c-DtqAfVnG.js.map +1 -0
  420. package/dist/emoji/cldr/{d-CiCXZXay.js → d-B5SNGAad.js} +2 -3
  421. package/dist/emoji/cldr/d-B5SNGAad.js.map +1 -0
  422. package/dist/emoji/cldr/{e-DILJo3Ri.js → e-CMUDvE48.js} +2 -3
  423. package/dist/emoji/cldr/e-CMUDvE48.js.map +1 -0
  424. package/dist/emoji/cldr/{f-ByGFLyOq.js → f-Dfhd9bp8.js} +2 -3
  425. package/dist/emoji/cldr/f-Dfhd9bp8.js.map +1 -0
  426. package/dist/emoji/cldr/{g-BZ0FRsud.js → g-VpFllv6y.js} +2 -3
  427. package/dist/emoji/cldr/g-VpFllv6y.js.map +1 -0
  428. package/dist/emoji/cldr/{h-jtLdvRXQ.js → h-CE6GevC3.js} +2 -3
  429. package/dist/emoji/cldr/h-CE6GevC3.js.map +1 -0
  430. package/dist/emoji/cldr/{i-DcbJ5utE.js → i-BUPzV8pA.js} +2 -3
  431. package/dist/emoji/cldr/i-BUPzV8pA.js.map +1 -0
  432. package/dist/emoji/cldr/{j-BuEqP5nz.js → j-BFAg68Ig.js} +2 -3
  433. package/dist/emoji/cldr/j-BFAg68Ig.js.map +1 -0
  434. package/dist/emoji/cldr/{k-P1J6Gvze.js → k-jnBMfMlM.js} +2 -3
  435. package/dist/emoji/cldr/k-jnBMfMlM.js.map +1 -0
  436. package/dist/emoji/cldr/{l-28XcbsPr.js → l-ClLOCfnc.js} +2 -3
  437. package/dist/emoji/cldr/l-ClLOCfnc.js.map +1 -0
  438. package/dist/emoji/cldr/{m-DKgGJ8rW.js → m-p358YNne.js} +2 -3
  439. package/dist/emoji/cldr/m-p358YNne.js.map +1 -0
  440. package/dist/emoji/cldr/{n-DmPLP4F3.js → n-DOh1UxA2.js} +2 -3
  441. package/dist/emoji/cldr/n-DOh1UxA2.js.map +1 -0
  442. package/dist/emoji/cldr/{o-f98nt3s7.js → o-D_nTGMIR.js} +2 -3
  443. package/dist/emoji/cldr/o-D_nTGMIR.js.map +1 -0
  444. package/dist/emoji/cldr/{p-CxnsOTOt.js → p-BA8Ct3hE.js} +2 -3
  445. package/dist/emoji/cldr/p-BA8Ct3hE.js.map +1 -0
  446. package/dist/emoji/cldr/{r-D0GPRJ-Q.js → r-BFZ26mlC.js} +2 -3
  447. package/dist/emoji/cldr/r-BFZ26mlC.js.map +1 -0
  448. package/dist/emoji/cldr/{s-DcFuepnw.js → s-CIZH91hj.js} +2 -3
  449. package/dist/emoji/cldr/s-CIZH91hj.js.map +1 -0
  450. package/dist/emoji/cldr/{t-BvHgGpUr.js → t-qg9oQuYr.js} +2 -3
  451. package/dist/emoji/cldr/t-qg9oQuYr.js.map +1 -0
  452. package/dist/emoji/cldr/{u-ChFYHtUf.js → u-CN-QpqjC.js} +2 -3
  453. package/dist/emoji/cldr/u-CN-QpqjC.js.map +1 -0
  454. package/dist/emoji/cldr/{v-WmX3nWtZ.js → v-CO_76wOC.js} +2 -3
  455. package/dist/emoji/cldr/v-CO_76wOC.js.map +1 -0
  456. package/dist/emoji/cldr/{w-BPySQUWW.js → w-DOQn50Cw.js} +2 -3
  457. package/dist/emoji/cldr/w-DOQn50Cw.js.map +1 -0
  458. package/dist/emoji/cldr/x-DddFDGbR.js +5 -0
  459. package/dist/emoji/cldr/x-DddFDGbR.js.map +1 -0
  460. package/dist/emoji/cldr/{y-zB_yhTFg.js → y-auUWML2r.js} +2 -3
  461. package/dist/emoji/cldr/y-auUWML2r.js.map +1 -0
  462. package/dist/emoji/cldr/{z-BgJ94Cap.js → z-BYAp28d6.js} +2 -3
  463. package/dist/emoji/cldr/z-BYAp28d6.js.map +1 -0
  464. package/dist/emoji/fomantic/0-BdzcjXW3.js +9 -0
  465. package/dist/emoji/fomantic/0-BdzcjXW3.js.map +1 -0
  466. package/dist/emoji/fomantic/{a-CrqYlC21.js → a-R3ZJ-207.js} +2 -3
  467. package/dist/emoji/fomantic/a-R3ZJ-207.js.map +1 -0
  468. package/dist/emoji/fomantic/{b-DneVHRdQ.js → b-NF1y0dRD.js} +2 -3
  469. package/dist/emoji/fomantic/b-NF1y0dRD.js.map +1 -0
  470. package/dist/emoji/fomantic/{c-ClxKRuir.js → c-CuIzdNXI.js} +2 -3
  471. package/dist/emoji/fomantic/c-CuIzdNXI.js.map +1 -0
  472. package/dist/emoji/fomantic/{d-Djqs_y4s.js → d-CuS9uvGS.js} +2 -3
  473. package/dist/emoji/fomantic/d-CuS9uvGS.js.map +1 -0
  474. package/dist/emoji/fomantic/{e-CuF-jOQd.js → e-S2pyUDgP.js} +2 -3
  475. package/dist/emoji/fomantic/e-S2pyUDgP.js.map +1 -0
  476. package/dist/emoji/fomantic/{f-D8VglrJ4.js → f-DnHzZwKR.js} +2 -3
  477. package/dist/emoji/fomantic/f-DnHzZwKR.js.map +1 -0
  478. package/dist/emoji/fomantic/{g-Du_HFl6U.js → g-CdqbF8yB.js} +2 -3
  479. package/dist/emoji/fomantic/g-CdqbF8yB.js.map +1 -0
  480. package/dist/emoji/fomantic/{h-CLE5tHnM.js → h-Dgmy17VC.js} +2 -3
  481. package/dist/emoji/fomantic/h-Dgmy17VC.js.map +1 -0
  482. package/dist/emoji/fomantic/{i-BjOsrQDZ.js → i-BCe1z6Es.js} +2 -3
  483. package/dist/emoji/fomantic/i-BCe1z6Es.js.map +1 -0
  484. package/dist/emoji/fomantic/{j-CyUDXKCu.js → j-D39udLwj.js} +2 -3
  485. package/dist/emoji/fomantic/j-D39udLwj.js.map +1 -0
  486. package/dist/emoji/fomantic/{k-Clypg4R8.js → k-KDlJnEWX.js} +2 -3
  487. package/dist/emoji/fomantic/k-KDlJnEWX.js.map +1 -0
  488. package/dist/emoji/fomantic/{l-DvLPdBh-.js → l-rVE39-7Z.js} +2 -3
  489. package/dist/emoji/fomantic/l-rVE39-7Z.js.map +1 -0
  490. package/dist/emoji/fomantic/{m-B1lIb1kP.js → m-Bys5Cs9k.js} +2 -3
  491. package/dist/emoji/fomantic/m-Bys5Cs9k.js.map +1 -0
  492. package/dist/emoji/fomantic/{n-Bgpp_ht5.js → n-DzPz1atY.js} +2 -3
  493. package/dist/emoji/fomantic/n-DzPz1atY.js.map +1 -0
  494. package/dist/emoji/fomantic/{o-BhYZzpjp.js → o-lKtDGpuN.js} +2 -3
  495. package/dist/emoji/fomantic/o-lKtDGpuN.js.map +1 -0
  496. package/dist/emoji/fomantic/{p-VLL0GK3m.js → p-DUvy18Aa.js} +2 -3
  497. package/dist/emoji/fomantic/p-DUvy18Aa.js.map +1 -0
  498. package/dist/emoji/fomantic/q-WtSN0kE7.js +5 -0
  499. package/dist/emoji/fomantic/q-WtSN0kE7.js.map +1 -0
  500. package/dist/emoji/fomantic/{r-Bd1DjkkI.js → r-Dm_1szGZ.js} +2 -3
  501. package/dist/emoji/fomantic/r-Dm_1szGZ.js.map +1 -0
  502. package/dist/emoji/fomantic/{s-Bqatw1W7.js → s-LPRU4KZk.js} +2 -3
  503. package/dist/emoji/fomantic/s-LPRU4KZk.js.map +1 -0
  504. package/dist/emoji/fomantic/{t-Bs7IFhv3.js → t-iQksEIKb.js} +2 -3
  505. package/dist/emoji/fomantic/t-iQksEIKb.js.map +1 -0
  506. package/dist/emoji/fomantic/{u-M6GfYC-U.js → u-CkDd-u7Y.js} +2 -3
  507. package/dist/emoji/fomantic/u-CkDd-u7Y.js.map +1 -0
  508. package/dist/emoji/fomantic/{v-BKHNqkn0.js → v-C83uQ5pk.js} +2 -3
  509. package/dist/emoji/fomantic/v-C83uQ5pk.js.map +1 -0
  510. package/dist/emoji/fomantic/{w-B_XvIu7h.js → w-D_redhGe.js} +2 -3
  511. package/dist/emoji/fomantic/w-D_redhGe.js.map +1 -0
  512. package/dist/emoji/fomantic/x-eI_dPUEx.js +8 -0
  513. package/dist/emoji/fomantic/x-eI_dPUEx.js.map +1 -0
  514. package/dist/emoji/fomantic/{y-DPZaoIla.js → y-CO_6qz-J.js} +2 -3
  515. package/dist/emoji/fomantic/y-CO_6qz-J.js.map +1 -0
  516. package/dist/emoji/fomantic/{z-FH-kPXch.js → z-C-wWxD0a.js} +2 -3
  517. package/dist/emoji/fomantic/z-C-wWxD0a.js.map +1 -0
  518. package/dist/forms.js +65 -75
  519. package/dist/forms.js.map +1 -1
  520. package/dist/fruity-CsfZNeXb.js +5 -0
  521. package/dist/fruity-CsfZNeXb.js.map +1 -0
  522. package/dist/{fruity.theme-CbC7Jyvk.js → fruity.theme-BL7cCZUQ.js} +3 -4
  523. package/dist/fruity.theme-BL7cCZUQ.js.map +1 -0
  524. package/dist/glass-BCK30hpe.js +5 -0
  525. package/dist/glass-BCK30hpe.js.map +1 -0
  526. package/dist/glass.theme-C7QSRB7b.js +5 -0
  527. package/dist/glass.theme-C7QSRB7b.js.map +1 -0
  528. package/dist/hot.js +18 -32
  529. package/dist/hot.js.map +1 -1
  530. package/dist/index.d.ts +5 -0
  531. package/dist/index.js +95 -90
  532. package/dist/jsx.d.ts +3865 -711
  533. package/dist/matrix-DEnqBfwC.js +5 -0
  534. package/dist/matrix-DEnqBfwC.js.map +1 -0
  535. package/dist/matrix.theme-YV6_nvXv.js +5 -0
  536. package/dist/matrix.theme-YV6_nvXv.js.map +1 -0
  537. package/dist/{merlot-DOXLuUaU.js → merlot-DFa6kDbA.js} +3 -4
  538. package/dist/merlot-DFa6kDbA.js.map +1 -0
  539. package/dist/merlot.theme-B1K8nn2u.js +5 -0
  540. package/dist/merlot.theme-B1K8nn2u.js.map +1 -0
  541. package/dist/{midnight-BxlTQSfw.js → midnight-q0-3-V6U.js} +3 -4
  542. package/dist/midnight-q0-3-V6U.js.map +1 -0
  543. package/dist/midnight.theme-C7M02wTD.js +5 -0
  544. package/dist/midnight.theme-C7M02wTD.js.map +1 -0
  545. package/dist/mockup-D0vovNO7.js +5 -0
  546. package/dist/mockup-D0vovNO7.js.map +1 -0
  547. package/dist/mockup.theme-C92r9NI0.js +5 -0
  548. package/dist/mockup.theme-C92r9NI0.js.map +1 -0
  549. package/dist/{paper-M61nUilz.js → paper-DPxolmdy.js} +3 -4
  550. package/dist/paper-DPxolmdy.js.map +1 -0
  551. package/dist/paper.theme-BAKk3DY1.js +5 -0
  552. package/dist/paper.theme-BAKk3DY1.js.map +1 -0
  553. package/dist/{persist.types-D2m6wD-S.js → persist.types-D7N7GewC.js} +2 -3
  554. package/dist/persist.types-D7N7GewC.js.map +1 -0
  555. package/dist/{pop-CxXfytjk.js → pop-Dw_6k177.js} +3 -4
  556. package/dist/pop-Dw_6k177.js.map +1 -0
  557. package/dist/pop.theme-Cw-yD0MO.js +5 -0
  558. package/dist/pop.theme-Cw-yD0MO.js.map +1 -0
  559. package/dist/property/PropertyEditorPages.d.ts +1 -1
  560. package/dist/property/PropertyLayouts.d.ts +119 -0
  561. package/dist/property/PropertySchemas.d.ts +5 -1
  562. package/dist/property/index.d.ts +2 -0
  563. package/dist/{rolldown-runtime-CYGlBXrH.js → rolldown-runtime-c6e9CmGy.js} +2 -3
  564. package/dist/runtime/Browser.d.ts +7 -0
  565. package/dist/runtime/DataTooltips.d.ts +2 -0
  566. package/dist/runtime/Keyboard.d.ts +4 -1
  567. package/dist/runtime/Toasts.d.ts +10 -0
  568. package/dist/runtime/runtime.types.d.ts +47 -0
  569. package/dist/{search-CzSzx7bX.js → search-C2Rq9HF1.js} +1 -2
  570. package/dist/search-C2Rq9HF1.js.map +1 -0
  571. package/dist/spell-CB-MivSX.js +5 -0
  572. package/dist/spell-CB-MivSX.js.map +1 -0
  573. package/dist/spell.theme-CUoc5rTq.js +5 -0
  574. package/dist/spell.theme-CUoc5rTq.js.map +1 -0
  575. package/dist/styles/StyleGenerator.d.ts +7 -0
  576. package/dist/styles/styles.en.d.ts +27 -18
  577. package/dist/{styles.en-CUUxNwHo.js → styles.en-DZlSJiOR.js} +21 -21
  578. package/dist/styles.en-DZlSJiOR.js.map +1 -0
  579. package/dist/styles.js +9 -10
  580. package/dist/styles.js.map +1 -1
  581. package/dist/ui-accordion.editor-BP8uQGGU.js +5 -0
  582. package/dist/ui-accordion.editor-BP8uQGGU.js.map +1 -0
  583. package/dist/ui-accordion.js +59 -60
  584. package/dist/ui-accordion.js.map +1 -1
  585. package/dist/ui-action.editor-m5R5N5Wy.js +5 -0
  586. package/dist/ui-action.editor-m5R5N5Wy.js.map +1 -0
  587. package/dist/ui-action.js +73 -45
  588. package/dist/ui-action.js.map +1 -1
  589. package/dist/ui-actions.editor-Buc3N2ik.js +5 -0
  590. package/dist/ui-actions.editor-Buc3N2ik.js.map +1 -0
  591. package/dist/ui-ad.editor-BHTDuSii.js +5 -0
  592. package/dist/ui-ad.editor-BHTDuSii.js.map +1 -0
  593. package/dist/ui-ad.js +8 -9
  594. package/dist/ui-ad.js.map +1 -1
  595. package/dist/ui-app-menu.editor-DxPPnMUT.js +5 -0
  596. package/dist/ui-app-menu.editor-DxPPnMUT.js.map +1 -0
  597. package/dist/ui-app-menu.js +89 -0
  598. package/dist/ui-app-menu.js.map +1 -0
  599. package/dist/ui-audio.editor-Y6WeqLRh.js +5 -0
  600. package/dist/ui-audio.editor-Y6WeqLRh.js.map +1 -0
  601. package/dist/ui-author.editor-Bmf-rEXY.js +5 -0
  602. package/dist/ui-author.editor-Bmf-rEXY.js.map +1 -0
  603. package/dist/ui-avatar.editor-CSU6snQz.js +5 -0
  604. package/dist/ui-avatar.editor-CSU6snQz.js.map +1 -0
  605. package/dist/ui-breadcrumb.editor-N1-8OzDq.js +5 -0
  606. package/dist/ui-breadcrumb.editor-N1-8OzDq.js.map +1 -0
  607. package/dist/ui-breadcrumbs.editor-Mml0fUR_.js +5 -0
  608. package/dist/ui-breadcrumbs.editor-Mml0fUR_.js.map +1 -0
  609. package/dist/ui-breadcrumbs.js +18 -17
  610. package/dist/ui-breadcrumbs.js.map +1 -1
  611. package/dist/ui-button.editor-BV9Bh_xf.js +5 -0
  612. package/dist/ui-button.editor-BV9Bh_xf.js.map +1 -0
  613. package/dist/ui-button.js +157 -156
  614. package/dist/ui-button.js.map +1 -1
  615. package/dist/ui-buttons.editor-CSsEIo2s.js +5 -0
  616. package/dist/ui-buttons.editor-CSsEIo2s.js.map +1 -0
  617. package/dist/ui-calendar.editor-TsP8a97s.js +5 -0
  618. package/dist/ui-calendar.editor-TsP8a97s.js.map +1 -0
  619. package/dist/ui-calendar.js +148 -157
  620. package/dist/ui-calendar.js.map +1 -1
  621. package/dist/ui-card.editor-BBZj9e03.js +5 -0
  622. package/dist/ui-card.editor-BBZj9e03.js.map +1 -0
  623. package/dist/ui-card.js +70 -70
  624. package/dist/ui-card.js.map +1 -1
  625. package/dist/ui-cards.editor-Hrmldr4q.js +5 -0
  626. package/dist/ui-cards.editor-Hrmldr4q.js.map +1 -0
  627. package/dist/ui-cell.editor-Dmz_mwJ0.js +5 -0
  628. package/dist/ui-cell.editor-Dmz_mwJ0.js.map +1 -0
  629. package/dist/ui-checkbox.editor-DnOz9r6d.js +5 -0
  630. package/dist/ui-checkbox.editor-DnOz9r6d.js.map +1 -0
  631. package/dist/ui-checkbox.js +49 -48
  632. package/dist/ui-checkbox.js.map +1 -1
  633. package/dist/ui-code.editor-Drr_FVB6.js +5 -0
  634. package/dist/ui-code.editor-Drr_FVB6.js.map +1 -0
  635. package/dist/ui-code.js +116 -79
  636. package/dist/ui-code.js.map +1 -1
  637. package/dist/ui-color-chip.editor-B3zV8FkB.js +5 -0
  638. package/dist/ui-color-chip.editor-B3zV8FkB.js.map +1 -0
  639. package/dist/ui-column.editor-hdUb-qwT.js +5 -0
  640. package/dist/ui-column.editor-hdUb-qwT.js.map +1 -0
  641. package/dist/ui-comment.editor-DJpE_8tz.js +5 -0
  642. package/dist/ui-comment.editor-DJpE_8tz.js.map +1 -0
  643. package/dist/ui-comment.js +15 -14
  644. package/dist/ui-comment.js.map +1 -1
  645. package/dist/ui-comments.editor-GFJN6l3Q.js +5 -0
  646. package/dist/ui-comments.editor-GFJN6l3Q.js.map +1 -0
  647. package/dist/ui-components.editor-BKFXnARt.js +5 -0
  648. package/dist/ui-components.editor-BKFXnARt.js.map +1 -0
  649. package/dist/ui-components.js +12 -13
  650. package/dist/ui-components.js.map +1 -1
  651. package/dist/ui-container.editor-CBNhNkRm.js +5 -0
  652. package/dist/ui-container.editor-CBNhNkRm.js.map +1 -0
  653. package/dist/ui-container.js +106 -21
  654. package/dist/ui-container.js.map +1 -1
  655. package/dist/ui-content.editor-B78lxK3P.js +5 -0
  656. package/dist/ui-content.editor-B78lxK3P.js.map +1 -0
  657. package/dist/ui-date.editor-PHEnU7QX.js +5 -0
  658. package/dist/ui-date.editor-PHEnU7QX.js.map +1 -0
  659. package/dist/ui-description.editor-DWFDJ9mV.js +5 -0
  660. package/dist/ui-description.editor-DWFDJ9mV.js.map +1 -0
  661. package/dist/ui-detail.editor-wliuVbx3.js +5 -0
  662. package/dist/ui-detail.editor-wliuVbx3.js.map +1 -0
  663. package/dist/ui-device.editor-kl48NVma.js +5 -0
  664. package/dist/ui-device.editor-kl48NVma.js.map +1 -0
  665. package/dist/ui-device.js +436 -0
  666. package/dist/ui-device.js.map +1 -0
  667. package/dist/ui-diagram-node.editor-6FyjT7oj.js +5 -0
  668. package/dist/ui-diagram-node.editor-6FyjT7oj.js.map +1 -0
  669. package/dist/ui-diagram.editor-Dn3ef-J9.js +5 -0
  670. package/dist/ui-diagram.editor-Dn3ef-J9.js.map +1 -0
  671. package/dist/ui-diagram.js +128 -129
  672. package/dist/ui-diagram.js.map +1 -1
  673. package/dist/ui-dimension.editor-BEXGKcCB.js +5 -0
  674. package/dist/ui-dimension.editor-BEXGKcCB.js.map +1 -0
  675. package/dist/ui-dimension.js +111 -12
  676. package/dist/ui-dimension.js.map +1 -1
  677. package/dist/ui-dimmer.editor-D14xzXIe.js +5 -0
  678. package/dist/ui-dimmer.editor-D14xzXIe.js.map +1 -0
  679. package/dist/ui-dimmer.js +29 -30
  680. package/dist/ui-dimmer.js.map +1 -1
  681. package/dist/ui-divider.editor-D6ozEXjx.js +5 -0
  682. package/dist/ui-divider.editor-D6ozEXjx.js.map +1 -0
  683. package/dist/ui-divider.js +9 -10
  684. package/dist/ui-divider.js.map +1 -1
  685. package/dist/ui-dropdown.editor-OFDGi1oz.js +5 -0
  686. package/dist/ui-dropdown.editor-OFDGi1oz.js.map +1 -0
  687. package/dist/ui-dropdown.js +155 -156
  688. package/dist/ui-dropdown.js.map +1 -1
  689. package/dist/ui-embed.editor-DHsrjw1j.js +5 -0
  690. package/dist/ui-embed.editor-DHsrjw1j.js.map +1 -0
  691. package/dist/ui-embed.js +23 -24
  692. package/dist/ui-embed.js.map +1 -1
  693. package/dist/ui-emoji.editor-DUL230Hi.js +5 -0
  694. package/dist/ui-emoji.editor-DUL230Hi.js.map +1 -0
  695. package/dist/ui-emoji.js +63 -64
  696. package/dist/ui-emoji.js.map +1 -1
  697. package/dist/ui-event.editor-Bk17y7wW.js +5 -0
  698. package/dist/ui-event.editor-Bk17y7wW.js.map +1 -0
  699. package/dist/ui-example.editor-D46Vnctp.js +5 -0
  700. package/dist/ui-example.editor-D46Vnctp.js.map +1 -0
  701. package/dist/ui-example.js +67 -74
  702. package/dist/ui-example.js.map +1 -1
  703. package/dist/ui-extra.editor-rX6sfH2e.js +5 -0
  704. package/dist/ui-extra.editor-rX6sfH2e.js.map +1 -0
  705. package/dist/ui-feed.editor-B7ycWh1b.js +5 -0
  706. package/dist/ui-feed.editor-B7ycWh1b.js.map +1 -0
  707. package/dist/ui-feed.js +26 -25
  708. package/dist/ui-feed.js.map +1 -1
  709. package/dist/ui-field.editor-Bz9xyCVv.js +5 -0
  710. package/dist/ui-field.editor-Bz9xyCVv.js.map +1 -0
  711. package/dist/ui-fields.editor-BUtW4NTk.js +5 -0
  712. package/dist/ui-fields.editor-BUtW4NTk.js.map +1 -0
  713. package/dist/ui-flag.editor-DNfdXo7y.js +5 -0
  714. package/dist/ui-flag.editor-DNfdXo7y.js.map +1 -0
  715. package/dist/ui-flag.js +13 -14
  716. package/dist/ui-flag.js.map +1 -1
  717. package/dist/ui-flyout.editor-b7UJYiV9.js +5 -0
  718. package/dist/ui-flyout.editor-b7UJYiV9.js.map +1 -0
  719. package/dist/ui-flyout.js +10 -11
  720. package/dist/ui-flyout.js.map +1 -1
  721. package/dist/ui-form.editor-BJC3WhNf.js +5 -0
  722. package/dist/ui-form.editor-BJC3WhNf.js.map +1 -0
  723. package/dist/ui-form.js +199 -195
  724. package/dist/ui-form.js.map +1 -1
  725. package/dist/ui-grid.editor-DVn2YIBW.js +5 -0
  726. package/dist/ui-grid.editor-DVn2YIBW.js.map +1 -0
  727. package/dist/ui-grid.js +43 -234
  728. package/dist/ui-grid.js.map +1 -1
  729. package/dist/ui-header.editor-meOjCASK.js +5 -0
  730. package/dist/ui-header.editor-meOjCASK.js.map +1 -0
  731. package/dist/ui-icon-picker.editor-vFPbT9Kh.js +5 -0
  732. package/dist/ui-icon-picker.editor-vFPbT9Kh.js.map +1 -0
  733. package/dist/ui-icon-picker.js +64 -69
  734. package/dist/ui-icon-picker.js.map +1 -1
  735. package/dist/ui-icon.editor-DoKK49PD.js +5 -0
  736. package/dist/ui-icon.editor-DoKK49PD.js.map +1 -0
  737. package/dist/ui-icon.js +15 -14
  738. package/dist/ui-icon.js.map +1 -1
  739. package/dist/ui-icons.editor-CSD6fOVt.js +5 -0
  740. package/dist/ui-icons.editor-CSD6fOVt.js.map +1 -0
  741. package/dist/ui-image.editor-D4ZUC_Ka.js +5 -0
  742. package/dist/ui-image.editor-D4ZUC_Ka.js.map +1 -0
  743. package/dist/ui-image.js +26 -26
  744. package/dist/ui-image.js.map +1 -1
  745. package/dist/ui-images.editor-Cb0D3vnI.js +5 -0
  746. package/dist/ui-images.editor-Cb0D3vnI.js.map +1 -0
  747. package/dist/ui-include.editor-CZcsVJbH.js +5 -0
  748. package/dist/ui-include.editor-CZcsVJbH.js.map +1 -0
  749. package/dist/ui-include.js +21 -22
  750. package/dist/ui-include.js.map +1 -1
  751. package/dist/ui-input.editor-budoNoB0.js +5 -0
  752. package/dist/ui-input.editor-budoNoB0.js.map +1 -0
  753. package/dist/ui-input.js +131 -130
  754. package/dist/ui-input.js.map +1 -1
  755. package/dist/ui-item.editor-BlWp1HXu.js +5 -0
  756. package/dist/ui-item.editor-BlWp1HXu.js.map +1 -0
  757. package/dist/ui-item.js +127 -113
  758. package/dist/ui-item.js.map +1 -1
  759. package/dist/ui-items.editor-GOul3Xss.js +5 -0
  760. package/dist/ui-items.editor-GOul3Xss.js.map +1 -0
  761. package/dist/ui-items.js +11 -12
  762. package/dist/ui-items.js.map +1 -1
  763. package/dist/ui-json.editor-BgZbrB_W.js +5 -0
  764. package/dist/ui-json.editor-BgZbrB_W.js.map +1 -0
  765. package/dist/ui-json.js +18 -19
  766. package/dist/ui-json.js.map +1 -1
  767. package/dist/ui-keys.editor-BI9EDtS4.js +5 -0
  768. package/dist/ui-keys.editor-BI9EDtS4.js.map +1 -0
  769. package/dist/ui-keys.js +2 -3
  770. package/dist/ui-label.editor-BVUYLSUs.js +5 -0
  771. package/dist/ui-label.editor-BVUYLSUs.js.map +1 -0
  772. package/dist/ui-label.js +22 -22
  773. package/dist/ui-label.js.map +1 -1
  774. package/dist/ui-labels.editor-BWJth86p.js +5 -0
  775. package/dist/ui-labels.editor-BWJth86p.js.map +1 -0
  776. package/dist/ui-link.editor-CpI53scP.js +5 -0
  777. package/dist/ui-link.editor-CpI53scP.js.map +1 -0
  778. package/dist/ui-list.editor-DhBZIkAa.js +5 -0
  779. package/dist/ui-list.editor-DhBZIkAa.js.map +1 -0
  780. package/dist/ui-list.js +9 -10
  781. package/dist/ui-list.js.map +1 -1
  782. package/dist/ui-loader.editor-BJlvmP7S.js +5 -0
  783. package/dist/ui-loader.editor-BJlvmP7S.js.map +1 -0
  784. package/dist/ui-loader.js +10 -11
  785. package/dist/ui-loader.js.map +1 -1
  786. package/dist/ui-markdown.editor-DPVKyxXa.js +5 -0
  787. package/dist/ui-markdown.editor-DPVKyxXa.js.map +1 -0
  788. package/dist/ui-markdown.js +208 -154
  789. package/dist/ui-markdown.js.map +1 -1
  790. package/dist/ui-menu.editor-DJ3PhWtK.js +5 -0
  791. package/dist/ui-menu.editor-DJ3PhWtK.js.map +1 -0
  792. package/dist/ui-menu.js +815 -223
  793. package/dist/ui-menu.js.map +1 -1
  794. package/dist/ui-message.editor-vfT0pyu5.js +5 -0
  795. package/dist/ui-message.editor-vfT0pyu5.js.map +1 -0
  796. package/dist/ui-message.js +32 -33
  797. package/dist/ui-message.js.map +1 -1
  798. package/dist/ui-meta.editor-Bk5m43-E.js +5 -0
  799. package/dist/ui-meta.editor-Bk5m43-E.js.map +1 -0
  800. package/dist/ui-modal.editor-CkkJRgab.js +5 -0
  801. package/dist/ui-modal.editor-CkkJRgab.js.map +1 -0
  802. package/dist/ui-modal.js +132 -96
  803. package/dist/ui-modal.js.map +1 -1
  804. package/dist/ui-nag.editor-BJ3Ia2Bi.js +5 -0
  805. package/dist/ui-nag.editor-BJ3Ia2Bi.js.map +1 -0
  806. package/dist/ui-nag.js +23 -24
  807. package/dist/ui-nag.js.map +1 -1
  808. package/dist/ui-or.editor-BfBLNVgm.js +5 -0
  809. package/dist/ui-or.editor-BfBLNVgm.js.map +1 -0
  810. package/dist/ui-page-layout.editor-xtQW0FZk.js +5 -0
  811. package/dist/ui-page-layout.editor-xtQW0FZk.js.map +1 -0
  812. package/dist/ui-page-layout.js +363 -0
  813. package/dist/ui-page-layout.js.map +1 -0
  814. package/dist/ui-page.editor-Bd5mzlj7.js +5 -0
  815. package/dist/ui-page.editor-Bd5mzlj7.js.map +1 -0
  816. package/dist/ui-page.js +11 -12
  817. package/dist/ui-page.js.map +1 -1
  818. package/dist/ui-panel.editor-BCUkdr4S.js +5 -0
  819. package/dist/ui-panel.editor-BCUkdr4S.js.map +1 -0
  820. package/dist/ui-panel.js +105 -27
  821. package/dist/ui-panel.js.map +1 -1
  822. package/dist/ui-parts.js +83 -68
  823. package/dist/ui-parts.js.map +1 -1
  824. package/dist/ui-placeholder-header.editor-CJNO08Ax.js +5 -0
  825. package/dist/ui-placeholder-header.editor-CJNO08Ax.js.map +1 -0
  826. package/dist/ui-placeholder-image.editor-DctJiCNv.js +5 -0
  827. package/dist/ui-placeholder-image.editor-DctJiCNv.js.map +1 -0
  828. package/dist/ui-placeholder-line.editor-DcxH7mOo.js +5 -0
  829. package/dist/ui-placeholder-line.editor-DcxH7mOo.js.map +1 -0
  830. package/dist/ui-placeholder-paragraph.editor-C4rww_tp.js +5 -0
  831. package/dist/ui-placeholder-paragraph.editor-C4rww_tp.js.map +1 -0
  832. package/dist/ui-placeholder.editor-Bc0CYlZZ.js +5 -0
  833. package/dist/ui-placeholder.editor-Bc0CYlZZ.js.map +1 -0
  834. package/dist/ui-placeholder.js +23 -19
  835. package/dist/ui-placeholder.js.map +1 -1
  836. package/dist/ui-popup.editor-ByUi4CYs.js +5 -0
  837. package/dist/ui-popup.editor-ByUi4CYs.js.map +1 -0
  838. package/dist/ui-popup.js +107 -100
  839. package/dist/ui-popup.js.map +1 -1
  840. package/dist/ui-progress.editor-DX0IjhxZ.js +5 -0
  841. package/dist/ui-progress.editor-DX0IjhxZ.js.map +1 -0
  842. package/dist/ui-progress.js +23 -24
  843. package/dist/ui-progress.js.map +1 -1
  844. package/dist/ui-property-editor.editor-pS6tCPPT.js +5 -0
  845. package/dist/ui-property-editor.editor-pS6tCPPT.js.map +1 -0
  846. package/dist/ui-property-editor.js +649 -277
  847. package/dist/ui-property-editor.js.map +1 -1
  848. package/dist/ui-property-group.editor-BlpUMVlr.js +5 -0
  849. package/dist/ui-property-group.editor-BlpUMVlr.js.map +1 -0
  850. package/dist/ui-property.editor-BC-jtjjt.js +5 -0
  851. package/dist/ui-property.editor-BC-jtjjt.js.map +1 -0
  852. package/dist/ui-pushable.editor-8_EmUD9x.js +5 -0
  853. package/dist/ui-pushable.editor-8_EmUD9x.js.map +1 -0
  854. package/dist/ui-pusher.editor-CiCX6-1J.js +5 -0
  855. package/dist/ui-pusher.editor-CiCX6-1J.js.map +1 -0
  856. package/dist/ui-quote.editor-BvmAjmo9.js +5 -0
  857. package/dist/ui-quote.editor-BvmAjmo9.js.map +1 -0
  858. package/dist/ui-quote.js +8 -9
  859. package/dist/ui-quote.js.map +1 -1
  860. package/dist/ui-radio.editor-DPzActfO.js +5 -0
  861. package/dist/ui-radio.editor-DPzActfO.js.map +1 -0
  862. package/dist/ui-rail.editor-DRfVH4P2.js +5 -0
  863. package/dist/ui-rail.editor-DRfVH4P2.js.map +1 -0
  864. package/dist/ui-rail.js +11 -12
  865. package/dist/ui-rail.js.map +1 -1
  866. package/dist/ui-rating.editor-C19syymj.js +5 -0
  867. package/dist/ui-rating.editor-C19syymj.js.map +1 -0
  868. package/dist/ui-rating.js +40 -49
  869. package/dist/ui-rating.js.map +1 -1
  870. package/dist/ui-repeat.editor-DEf-bFGj.js +5 -0
  871. package/dist/ui-repeat.editor-DEf-bFGj.js.map +1 -0
  872. package/dist/ui-reveal.editor-D7pDOaen.js +5 -0
  873. package/dist/ui-reveal.editor-D7pDOaen.js.map +1 -0
  874. package/dist/ui-reveal.js +10 -11
  875. package/dist/ui-reveal.js.map +1 -1
  876. package/dist/ui-root.editor-CAokPDVa.js +5 -0
  877. package/dist/ui-root.editor-CAokPDVa.js.map +1 -0
  878. package/dist/ui-root.js +205 -102
  879. package/dist/ui-root.js.map +1 -1
  880. package/dist/ui-row.editor-C00Z6Jl5.js +5 -0
  881. package/dist/ui-row.editor-C00Z6Jl5.js.map +1 -0
  882. package/dist/ui-search.editor-CtzfYgNu.js +5 -0
  883. package/dist/ui-search.editor-CtzfYgNu.js.map +1 -0
  884. package/dist/ui-search.js +143 -146
  885. package/dist/ui-search.js.map +1 -1
  886. package/dist/ui-section.editor-DmNICxCs.js +5 -0
  887. package/dist/ui-section.editor-DmNICxCs.js.map +1 -0
  888. package/dist/ui-section.js +74 -73
  889. package/dist/ui-section.js.map +1 -1
  890. package/dist/ui-sections.editor-BxXECGv9.js +5 -0
  891. package/dist/ui-sections.editor-BxXECGv9.js.map +1 -0
  892. package/dist/ui-segment.editor-CebyLPFn.js +5 -0
  893. package/dist/ui-segment.editor-CebyLPFn.js.map +1 -0
  894. package/dist/ui-segment.js +43 -43
  895. package/dist/ui-segment.js.map +1 -1
  896. package/dist/ui-segments.editor-CSumzMa5.js +5 -0
  897. package/dist/ui-segments.editor-CSumzMa5.js.map +1 -0
  898. package/dist/ui-select.editor-wAcZzvU7.js +5 -0
  899. package/dist/ui-select.editor-wAcZzvU7.js.map +1 -0
  900. package/dist/ui-select.js +86 -87
  901. package/dist/ui-select.js.map +1 -1
  902. package/dist/ui-shape.editor-By9-8aD2.js +5 -0
  903. package/dist/ui-shape.editor-By9-8aD2.js.map +1 -0
  904. package/dist/ui-shape.js +39 -38
  905. package/dist/ui-shape.js.map +1 -1
  906. package/dist/ui-side.editor-CFSqGHGH.js +5 -0
  907. package/dist/ui-side.editor-CFSqGHGH.js.map +1 -0
  908. package/dist/ui-sidebar.editor-DWFPQcXv.js +5 -0
  909. package/dist/ui-sidebar.editor-DWFPQcXv.js.map +1 -0
  910. package/dist/ui-sidebar.js +79 -77
  911. package/dist/ui-sidebar.js.map +1 -1
  912. package/dist/ui-sides.editor-CONIJ1r3.js +5 -0
  913. package/dist/ui-sides.editor-CONIJ1r3.js.map +1 -0
  914. package/dist/ui-sides.js +25 -26
  915. package/dist/ui-sides.js.map +1 -1
  916. package/dist/ui-site-breadcrumbs.editor-Dmc4qziE.js +5 -0
  917. package/dist/ui-site-breadcrumbs.editor-Dmc4qziE.js.map +1 -0
  918. package/dist/ui-site-breadcrumbs.js +143 -0
  919. package/dist/ui-site-breadcrumbs.js.map +1 -0
  920. package/dist/ui-site-nav-button.editor-6J-zJLtZ.js +5 -0
  921. package/dist/ui-site-nav-button.editor-6J-zJLtZ.js.map +1 -0
  922. package/dist/ui-site-nav-button.js +113 -0
  923. package/dist/ui-site-nav-button.js.map +1 -0
  924. package/dist/ui-site-nav.editor-CKEsOGCX.js +5 -0
  925. package/dist/ui-site-nav.editor-CKEsOGCX.js.map +1 -0
  926. package/dist/ui-site-nav.js +133 -97
  927. package/dist/ui-site-nav.js.map +1 -1
  928. package/dist/ui-site-tabs.editor-DDvQfH6S.js +5 -0
  929. package/dist/ui-site-tabs.editor-DDvQfH6S.js.map +1 -0
  930. package/dist/ui-site-tabs.js +53 -48
  931. package/dist/ui-site-tabs.js.map +1 -1
  932. package/dist/ui-slider.editor-BEaasx5Q.js +5 -0
  933. package/dist/ui-slider.editor-BEaasx5Q.js.map +1 -0
  934. package/dist/ui-slider.js +37 -38
  935. package/dist/ui-slider.js.map +1 -1
  936. package/dist/ui-space.editor-s-XVWFBN.js +5 -0
  937. package/dist/ui-space.editor-s-XVWFBN.js.map +1 -0
  938. package/dist/ui-space.js +9 -10
  939. package/dist/ui-space.js.map +1 -1
  940. package/dist/ui-split-panel.editor-Cvy5W7nk.js +5 -0
  941. package/dist/ui-split-panel.editor-Cvy5W7nk.js.map +1 -0
  942. package/dist/ui-split-panel.js +107 -68
  943. package/dist/ui-split-panel.js.map +1 -1
  944. package/dist/ui-stack.editor-D69Fky6H.js +5 -0
  945. package/dist/ui-stack.editor-D69Fky6H.js.map +1 -0
  946. package/dist/ui-stack.js +12 -13
  947. package/dist/ui-stack.js.map +1 -1
  948. package/dist/ui-statistic.editor-CBzYqbQ5.js +5 -0
  949. package/dist/ui-statistic.editor-CBzYqbQ5.js.map +1 -0
  950. package/dist/ui-statistic.js +28 -27
  951. package/dist/ui-statistic.js.map +1 -1
  952. package/dist/ui-statistics.editor-fzh3uk_b.js +5 -0
  953. package/dist/ui-statistics.editor-fzh3uk_b.js.map +1 -0
  954. package/dist/ui-step.editor-CYmNXrk_.js +5 -0
  955. package/dist/ui-step.editor-CYmNXrk_.js.map +1 -0
  956. package/dist/ui-step.js +62 -61
  957. package/dist/ui-step.js.map +1 -1
  958. package/dist/ui-steps.editor-BkMIrUrj.js +5 -0
  959. package/dist/ui-steps.editor-BkMIrUrj.js.map +1 -0
  960. package/dist/ui-sticky.editor-D7R1AlJv.js +5 -0
  961. package/dist/ui-sticky.editor-D7R1AlJv.js.map +1 -0
  962. package/dist/ui-sticky.js +10 -11
  963. package/dist/ui-sticky.js.map +1 -1
  964. package/dist/ui-submenu.editor-NdjS0em-.js +5 -0
  965. package/dist/ui-submenu.editor-NdjS0em-.js.map +1 -0
  966. package/dist/ui-summary.editor-CCHS1mVz.js +5 -0
  967. package/dist/ui-summary.editor-CCHS1mVz.js.map +1 -0
  968. package/dist/ui-tab.editor-DCS-gCZV.js +5 -0
  969. package/dist/ui-tab.editor-DCS-gCZV.js.map +1 -0
  970. package/dist/ui-tab.js +115 -117
  971. package/dist/ui-tab.js.map +1 -1
  972. package/dist/ui-table.editor-DJvfg9oG.js +5 -0
  973. package/dist/ui-table.editor-DJvfg9oG.js.map +1 -0
  974. package/dist/ui-table.js +272 -272
  975. package/dist/ui-table.js.map +1 -1
  976. package/dist/ui-tabs.editor-waeMoFNM.js +5 -0
  977. package/dist/ui-tabs.editor-waeMoFNM.js.map +1 -0
  978. package/dist/ui-term.editor-BMCF3jBM.js +5 -0
  979. package/dist/ui-term.editor-BMCF3jBM.js.map +1 -0
  980. package/dist/ui-terms.editor-BLfVVsjI.js +5 -0
  981. package/dist/ui-terms.editor-BLfVVsjI.js.map +1 -0
  982. package/dist/ui-terms.js +13 -12
  983. package/dist/ui-terms.js.map +1 -1
  984. package/dist/ui-text.editor-B6AENK13.js +5 -0
  985. package/dist/ui-text.editor-B6AENK13.js.map +1 -0
  986. package/dist/ui-text.js +37 -36
  987. package/dist/ui-text.js.map +1 -1
  988. package/dist/ui-textarea.editor-C25lVwrF.js +5 -0
  989. package/dist/ui-textarea.editor-C25lVwrF.js.map +1 -0
  990. package/dist/ui-theme-editor.editor-CQGAgy-Q.js +5 -0
  991. package/dist/ui-theme-editor.editor-CQGAgy-Q.js.map +1 -0
  992. package/dist/ui-theme-editor.js +448 -461
  993. package/dist/ui-theme-editor.js.map +1 -1
  994. package/dist/{ui-theme-menu-CuIjr8Ou.js → ui-theme-menu-BZYUMrHe.js} +356 -352
  995. package/dist/ui-theme-menu-BZYUMrHe.js.map +1 -0
  996. package/dist/ui-theme-menu.editor-DNeI-hxN.js +5 -0
  997. package/dist/ui-theme-menu.editor-DNeI-hxN.js.map +1 -0
  998. package/dist/ui-theme-token.editor-C2YAdEye.js +5 -0
  999. package/dist/ui-theme-token.editor-C2YAdEye.js.map +1 -0
  1000. package/dist/ui-title.editor-40PZSOpn.js +5 -0
  1001. package/dist/ui-title.editor-40PZSOpn.js.map +1 -0
  1002. package/dist/ui-toast.editor-BDmIUsU_.js +5 -0
  1003. package/dist/ui-toast.editor-BDmIUsU_.js.map +1 -0
  1004. package/dist/ui-toast.js +125 -128
  1005. package/dist/ui-toast.js.map +1 -1
  1006. package/dist/ui-toc.editor-D_S1KFY_.js +5 -0
  1007. package/dist/ui-toc.editor-D_S1KFY_.js.map +1 -0
  1008. package/dist/ui-toc.js +52 -53
  1009. package/dist/ui-toc.js.map +1 -1
  1010. package/dist/ui-toolbar.editor-CNQ8nJmR.js +5 -0
  1011. package/dist/ui-toolbar.editor-CNQ8nJmR.js.map +1 -0
  1012. package/dist/ui-toolbar.js +254 -50
  1013. package/dist/ui-toolbar.js.map +1 -1
  1014. package/dist/ui-transition.editor-8SQkDkZ6.js +5 -0
  1015. package/dist/ui-transition.editor-8SQkDkZ6.js.map +1 -0
  1016. package/dist/ui-transition.js +13 -14
  1017. package/dist/ui-transition.js.map +1 -1
  1018. package/dist/ui-tree-diagram.editor-DkEK8i7J.js +5 -0
  1019. package/dist/ui-tree-diagram.editor-DkEK8i7J.js.map +1 -0
  1020. package/dist/ui-tree-diagram.js +128 -127
  1021. package/dist/ui-tree-diagram.js.map +1 -1
  1022. package/dist/ui-tree-item.editor-C4fuAlbJ.js +5 -0
  1023. package/dist/ui-tree-item.editor-C4fuAlbJ.js.map +1 -0
  1024. package/dist/ui-tree-node.editor-CB1z_w9F.js +5 -0
  1025. package/dist/ui-tree-node.editor-CB1z_w9F.js.map +1 -0
  1026. package/dist/ui-tree.editor-BoQztwdz.js +5 -0
  1027. package/dist/ui-tree.editor-BoQztwdz.js.map +1 -0
  1028. package/dist/ui-tree.js +393 -134
  1029. package/dist/ui-tree.js.map +1 -1
  1030. package/dist/ui-value.editor-CYak24cr.js +5 -0
  1031. package/dist/ui-value.editor-CYak24cr.js.map +1 -0
  1032. package/dist/ui-video.editor-CuWtFVjR.js +5 -0
  1033. package/dist/ui-video.editor-CuWtFVjR.js.map +1 -0
  1034. package/dist/ui-video.js +15 -14
  1035. package/dist/ui-video.js.map +1 -1
  1036. package/dist/ui-visibility.editor-Crx0DTlv.js +5 -0
  1037. package/dist/ui-visibility.editor-Crx0DTlv.js.map +1 -0
  1038. package/dist/ui-visibility.js +25 -26
  1039. package/dist/ui-visibility.js.map +1 -1
  1040. package/dist/ui-zoom.editor-DZ3HsWV4.js +5 -0
  1041. package/dist/ui-zoom.editor-DZ3HsWV4.js.map +1 -0
  1042. package/dist/ui-zoom.js +82 -83
  1043. package/dist/ui-zoom.js.map +1 -1
  1044. package/dist/util/TopLayerTip.d.ts +11 -2
  1045. package/dist/vocabulary/SharedVocabulary.d.ts +2 -0
  1046. package/dist/vocabulary/SharedVocabulary.es.d.ts +1 -0
  1047. package/dist/vocabulary/help.generated.d.ts +11 -0
  1048. package/dist/vocabulary/partsOfSpeech.generated.d.ts +6 -0
  1049. package/package.json +3 -3
  1050. package/dist/Dragging-CMZoLEWQ.js.map +0 -1
  1051. package/dist/MarkdownSanitizer-zTnnbrLe.js +0 -884
  1052. package/dist/MarkdownSanitizer-zTnnbrLe.js.map +0 -1
  1053. package/dist/PrefStore-Qv0e5y04.js.map +0 -1
  1054. package/dist/ScrollingRow-7n7Z-HIE.js +0 -88
  1055. package/dist/ScrollingRow-7n7Z-HIE.js.map +0 -1
  1056. package/dist/SitePages-CciwREek.js.map +0 -1
  1057. package/dist/SlottedItems-Du3aJwG1.js +0 -80
  1058. package/dist/SlottedItems-Du3aJwG1.js.map +0 -1
  1059. package/dist/UIButton-DFEds67r.js +0 -6
  1060. package/dist/UIButton-DFEds67r.js.map +0 -1
  1061. package/dist/UIInput-BodVbUoQ.js.map +0 -1
  1062. package/dist/UIKeys-Rh_gUZjP.js.map +0 -1
  1063. package/dist/UILabel-DgJUBzB_.js.map +0 -1
  1064. package/dist/UIMenu-zdcAtwTa.js +0 -42
  1065. package/dist/UIMenu-zdcAtwTa.js.map +0 -1
  1066. package/dist/UIRuntime-KH309p5B.js.map +0 -1
  1067. package/dist/UISegment-CMMIW7cZ.js.map +0 -1
  1068. package/dist/apple.palette-B4ivrNlM.js.map +0 -1
  1069. package/dist/classic-DCTQrteU.js.map +0 -1
  1070. package/dist/components.es-BOa_7gFF.js.map +0 -1
  1071. package/dist/crisp-VfYZlTph.js.map +0 -1
  1072. package/dist/crisp.theme-DRiePRdf.js +0 -6
  1073. package/dist/crisp.theme-DRiePRdf.js.map +0 -1
  1074. package/dist/dark-CbUdPe0a.js.map +0 -1
  1075. package/dist/dist-BLYIGZVK.js.map +0 -1
  1076. package/dist/emoji/cldr/0-DSUpV2d7.js.map +0 -1
  1077. package/dist/emoji/cldr/a-D_oB4vJ-.js.map +0 -1
  1078. package/dist/emoji/cldr/b-DX0W0Mda.js.map +0 -1
  1079. package/dist/emoji/cldr/c-DUHidpE9.js.map +0 -1
  1080. package/dist/emoji/cldr/d-CiCXZXay.js.map +0 -1
  1081. package/dist/emoji/cldr/e-DILJo3Ri.js.map +0 -1
  1082. package/dist/emoji/cldr/f-ByGFLyOq.js.map +0 -1
  1083. package/dist/emoji/cldr/g-BZ0FRsud.js.map +0 -1
  1084. package/dist/emoji/cldr/h-jtLdvRXQ.js.map +0 -1
  1085. package/dist/emoji/cldr/i-DcbJ5utE.js.map +0 -1
  1086. package/dist/emoji/cldr/j-BuEqP5nz.js.map +0 -1
  1087. package/dist/emoji/cldr/k-P1J6Gvze.js.map +0 -1
  1088. package/dist/emoji/cldr/l-28XcbsPr.js.map +0 -1
  1089. package/dist/emoji/cldr/m-DKgGJ8rW.js.map +0 -1
  1090. package/dist/emoji/cldr/n-DmPLP4F3.js.map +0 -1
  1091. package/dist/emoji/cldr/o-f98nt3s7.js.map +0 -1
  1092. package/dist/emoji/cldr/p-CxnsOTOt.js.map +0 -1
  1093. package/dist/emoji/cldr/r-D0GPRJ-Q.js.map +0 -1
  1094. package/dist/emoji/cldr/s-DcFuepnw.js.map +0 -1
  1095. package/dist/emoji/cldr/t-BvHgGpUr.js.map +0 -1
  1096. package/dist/emoji/cldr/u-ChFYHtUf.js.map +0 -1
  1097. package/dist/emoji/cldr/v-WmX3nWtZ.js.map +0 -1
  1098. package/dist/emoji/cldr/w-BPySQUWW.js.map +0 -1
  1099. package/dist/emoji/cldr/x-SC3r1n9O.js +0 -6
  1100. package/dist/emoji/cldr/x-SC3r1n9O.js.map +0 -1
  1101. package/dist/emoji/cldr/y-zB_yhTFg.js.map +0 -1
  1102. package/dist/emoji/cldr/z-BgJ94Cap.js.map +0 -1
  1103. package/dist/emoji/fomantic/0-CGf6gC3a.js +0 -10
  1104. package/dist/emoji/fomantic/0-CGf6gC3a.js.map +0 -1
  1105. package/dist/emoji/fomantic/a-CrqYlC21.js.map +0 -1
  1106. package/dist/emoji/fomantic/b-DneVHRdQ.js.map +0 -1
  1107. package/dist/emoji/fomantic/c-ClxKRuir.js.map +0 -1
  1108. package/dist/emoji/fomantic/d-Djqs_y4s.js.map +0 -1
  1109. package/dist/emoji/fomantic/e-CuF-jOQd.js.map +0 -1
  1110. package/dist/emoji/fomantic/f-D8VglrJ4.js.map +0 -1
  1111. package/dist/emoji/fomantic/g-Du_HFl6U.js.map +0 -1
  1112. package/dist/emoji/fomantic/h-CLE5tHnM.js.map +0 -1
  1113. package/dist/emoji/fomantic/i-BjOsrQDZ.js.map +0 -1
  1114. package/dist/emoji/fomantic/j-CyUDXKCu.js.map +0 -1
  1115. package/dist/emoji/fomantic/k-Clypg4R8.js.map +0 -1
  1116. package/dist/emoji/fomantic/l-DvLPdBh-.js.map +0 -1
  1117. package/dist/emoji/fomantic/m-B1lIb1kP.js.map +0 -1
  1118. package/dist/emoji/fomantic/n-Bgpp_ht5.js.map +0 -1
  1119. package/dist/emoji/fomantic/o-BhYZzpjp.js.map +0 -1
  1120. package/dist/emoji/fomantic/p-VLL0GK3m.js.map +0 -1
  1121. package/dist/emoji/fomantic/q-CKrtMwhc.js +0 -6
  1122. package/dist/emoji/fomantic/q-CKrtMwhc.js.map +0 -1
  1123. package/dist/emoji/fomantic/r-Bd1DjkkI.js.map +0 -1
  1124. package/dist/emoji/fomantic/s-Bqatw1W7.js.map +0 -1
  1125. package/dist/emoji/fomantic/t-Bs7IFhv3.js.map +0 -1
  1126. package/dist/emoji/fomantic/u-M6GfYC-U.js.map +0 -1
  1127. package/dist/emoji/fomantic/v-BKHNqkn0.js.map +0 -1
  1128. package/dist/emoji/fomantic/w-B_XvIu7h.js.map +0 -1
  1129. package/dist/emoji/fomantic/x-CG1_nzCF.js +0 -9
  1130. package/dist/emoji/fomantic/x-CG1_nzCF.js.map +0 -1
  1131. package/dist/emoji/fomantic/y-DPZaoIla.js.map +0 -1
  1132. package/dist/emoji/fomantic/z-FH-kPXch.js.map +0 -1
  1133. package/dist/fruity-BRVlgJZd.js +0 -6
  1134. package/dist/fruity-BRVlgJZd.js.map +0 -1
  1135. package/dist/fruity.theme-CbC7Jyvk.js.map +0 -1
  1136. package/dist/glass-x9tbbwVq.js +0 -6
  1137. package/dist/glass-x9tbbwVq.js.map +0 -1
  1138. package/dist/glass.theme-24wY2wH9.js +0 -6
  1139. package/dist/glass.theme-24wY2wH9.js.map +0 -1
  1140. package/dist/matrix-QY2gWbJ0.js +0 -6
  1141. package/dist/matrix-QY2gWbJ0.js.map +0 -1
  1142. package/dist/matrix.theme-_8xtwhDq.js +0 -6
  1143. package/dist/matrix.theme-_8xtwhDq.js.map +0 -1
  1144. package/dist/merlot-DOXLuUaU.js.map +0 -1
  1145. package/dist/merlot.theme-S-QnNGsw.js +0 -6
  1146. package/dist/merlot.theme-S-QnNGsw.js.map +0 -1
  1147. package/dist/midnight-BxlTQSfw.js.map +0 -1
  1148. package/dist/midnight.theme-wXbqRYLy.js +0 -6
  1149. package/dist/midnight.theme-wXbqRYLy.js.map +0 -1
  1150. package/dist/mockup-83ELBuVr.js +0 -6
  1151. package/dist/mockup-83ELBuVr.js.map +0 -1
  1152. package/dist/mockup.theme-DmpBgGBl.js +0 -6
  1153. package/dist/mockup.theme-DmpBgGBl.js.map +0 -1
  1154. package/dist/paper-M61nUilz.js.map +0 -1
  1155. package/dist/paper.theme-B8R5Jn5H.js +0 -6
  1156. package/dist/paper.theme-B8R5Jn5H.js.map +0 -1
  1157. package/dist/persist.types-D2m6wD-S.js.map +0 -1
  1158. package/dist/pop-CxXfytjk.js.map +0 -1
  1159. package/dist/pop.theme-CXzv8B9x.js +0 -6
  1160. package/dist/pop.theme-CXzv8B9x.js.map +0 -1
  1161. package/dist/search-CzSzx7bX.js.map +0 -1
  1162. package/dist/spell-By5Y3jKP.js +0 -6
  1163. package/dist/spell-By5Y3jKP.js.map +0 -1
  1164. package/dist/spell.theme-DxGj7qHx.js +0 -6
  1165. package/dist/spell.theme-DxGj7qHx.js.map +0 -1
  1166. package/dist/styles.en-CUUxNwHo.js.map +0 -1
  1167. package/dist/ui-theme-menu-CuIjr8Ou.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"MarkdownSanitizer-zTnnbrLe.js","names":["DOMPurify","d","a","r","e","n","t","i","u","f","o","l","entries","setPrototypeOf","isFrozen","getPrototypeOf","getOwnPropertyDescriptor","freeze","seal","create","_ref","apply","construct","x","args","func","thisArg","Func","arrayForEach","arrayLastIndexOf","arrayPop","arrayPush","arraySplice","arrayIsArray","stringToLowerCase","stringToString","stringMatch","stringReplace","stringIndexOf","stringTrim","numberToString","booleanToString","bigintToString","symbolToString","objectHasOwnProperty","objectToString","regExpTest","typeErrorCreate","transformCaseFunc","set","array","element","lcElement","index","newObject","_ref2","object","_ref3","property","value","valueAsRecord","valueToString","stringified","desc","prop","html$1","svg$1","svgFilters","svgDisallowed","mathMl$1","mathMlDisallowed","text","html","svg","mathMl","xml","MUSTACHE_EXPR","ERB_EXPR","TMPLIT_EXPR","DATA_ATTR","ARIA_ATTR","IS_ALLOWED_URI","IS_SCRIPT_OR_DATA","ATTR_WHITESPACE","DOCTYPE_NAME","CUSTOM_ELEMENT","ELEMENT_MARKUP_PROBE","COMMENT_MARKUP_PROBE","FALLBACK_TAG_CLOSE","SELF_CLOSING_TAG","NODE_TYPE","LITERAL_TEXT_ELEMENT_NAMES","LITERAL_TEXT_ELEMENTS","LITERAL_TEXT_CLOSE","map","name","getGlobal","_createTrustedTypesPolicy","trustedTypes","suffix","ATTR_NAME","purifyHostElement","policyName","scriptUrl","_createHooksMap","_resolveSetOption","cfg","key","options","fallback","_resolveObjectOption","makeFallback","window","root","document","originalDocument","currentScript","HTMLTemplateElement","Node","Element","NodeFilter","DOMParser","ElementPrototype","cloneNode","remove","removeAttributeNode","getNextSibling","getChildNodes","getParentNode","getShadowRoot","getAttributes","getNodeType","getNodeName","getOwnerDocument","_readNodeType","node","_readNodeName","template","trustedTypesPolicy","emptyHTML","defaultTrustedTypesPolicy","defaultTrustedTypesPolicyResolved","IN_TRUSTED_TYPES_POLICY","_assertNotInTrustedTypesPolicy","_createTrustedHTML","_createTrustedScriptURL","_getDefaultTrustedTypesPolicy","_document","implementation","createNodeIterator","createDocumentFragment","getElementsByTagName","importNode","hooks","MUSTACHE_EXPR$1","ERB_EXPR$1","TMPLIT_EXPR$1","DATA_ATTR$1","ARIA_ATTR$1","IS_SCRIPT_OR_DATA$1","ATTR_WHITESPACE$1","CUSTOM_ELEMENT$1","IS_ALLOWED_URI$1","ALLOWED_TAGS","DEFAULT_ALLOWED_TAGS","ALLOWED_ATTR","DEFAULT_ALLOWED_ATTR","CUSTOM_ELEMENT_HANDLING","FORBID_TAGS","FORBID_ATTR","EXTRA_ELEMENT_HANDLING","ALLOW_ARIA_ATTR","ALLOW_DATA_ATTR","ALLOW_UNKNOWN_PROTOCOLS","ALLOW_SELF_CLOSE_IN_ATTR","SAFE_FOR_TEMPLATES","SAFE_FOR_XML","WHOLE_DOCUMENT","SET_CONFIG","SET_CONFIG_ALLOWED_TAGS","SET_CONFIG_ALLOWED_ATTR","FORCE_BODY","RETURN_DOM","RETURN_DOM_FRAGMENT","RETURN_TRUSTED_TYPE","SANITIZE_DOM","SANITIZE_NAMED_PROPS","SANITIZE_NAMED_PROPS_PREFIX","KEEP_CONTENT","IN_PLACE","USE_PROFILES","FORBID_CONTENTS","DEFAULT_FORBID_CONTENTS","DATA_URI_TAGS","DEFAULT_DATA_URI_TAGS","URI_SAFE_ATTRIBUTES","DEFAULT_URI_SAFE_ATTRIBUTES","MATHML_NAMESPACE","SVG_NAMESPACE","HTML_NAMESPACE","NAMESPACE","IS_EMPTY_INPUT","ALLOWED_NAMESPACES","DEFAULT_ALLOWED_NAMESPACES","DEFAULT_MATHML_TEXT_INTEGRATION_POINTS","MATHML_TEXT_INTEGRATION_POINTS","DEFAULT_HTML_INTEGRATION_POINTS","HTML_INTEGRATION_POINTS","COMMON_SVG_AND_HTML_ELEMENTS","PARSER_MEDIA_TYPE","SUPPORTED_PARSER_MEDIA_TYPES","CONFIG","formElement","isRegexOrFunction","testValue","_parseConfig","customElementHandling","previousTrustedTypesPolicy","error","ALL_SVG_TAGS","ALL_MATHML_TAGS","_checkSvgNamespace","parent","tagName","parentTagName","_checkMathMlNamespace","_checkHtmlNamespace","_checkValidNamespace","_forceRemove","_stripAttributeNode","attribute","_neutralizeRoot","childNodes","snapshot","child","attributes","_removeAttribute","attr","_stripDisallowedAttributes","_neutralizeSubtree","stack","_isPatchLinkageAttribute","lcName","lcTag","_neutralizePatchLinkage","nodeType","_initDocument","doc","leadingWhitespace","dirty","matches","dirtyPayload","body","_createNodeIterator","_stripTemplateExpressions","_scrubTemplateExpressions2","walker","currentNode","templates","_isDocumentFragment","tmpl","_isClobbered","realTagName","_isNode","data","_isUnsafeNode","_matchesNameCheck","check","_sanitizeDisallowedNode","_isBasicCustomElement","parentNode","childCount","hoisted","_forkSharedAllowlist","hookList","defaultSet","setConfigSet","_handleHookDetachedNode","_sanitizeElements","removed","content","_isValidAttribute","nameIsPermitted","RESERVED_CUSTOM_ELEMENT_NAMES","_applyTrustedTypesToAttribute","namespaceURI","_setAttributeValue","_sanitizeAttributes","hookEvent","attrValue","initValue","recreatedNamedProp","_sanitizeShadowDOM2","shadowNode","shadowIterator","fragment","innerSr","_sanitizeAttachedShadowRoots","item","isElement","rootName","sr","importedNode","returnNode","inPlace","nn","walkRoot","nodeIterator","entry","rootWasRemoved","serializedHTML","tag","hookFunction","entryPoint","purify_default","MarkdownSanitizer","SourceError","uiTags","UI_TAG","HANDLER"],"sources":["../../node_modules/dompurify/dist/purify.es.mjs","../src/components/ui-markdown/MarkdownSanitizer.ts"],"sourcesContent":["/*! @license DOMPurify 3.4.16 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.16/LICENSE */\nfunction _OverloadYield(e, d) {\n\tthis.v = e, this.k = d;\n}\nfunction _arrayLikeToArray(r, a) {\n\t(null == a || a > r.length) && (a = r.length);\n\tfor (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n\treturn n;\n}\nfunction _arrayWithHoles(r) {\n\tif (Array.isArray(r)) return r;\n}\nfunction _iterableToArrayLimit(r, l) {\n\tvar t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n\tif (null != t) {\n\t\tvar e, n, i, u, a = [], f = !0, o = !1;\n\t\ttry {\n\t\t\tif (i = (t = t.call(r)).next, 0 === l) {\n\t\t\t\tif (Object(t) !== t) return;\n\t\t\t\tf = !1;\n\t\t\t} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n\t\t} catch (r) {\n\t\t\to = !0, n = r;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n\t\t\t} finally {\n\t\t\t\tif (o) throw n;\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}\n}\nfunction _nonIterableRest() {\n\tthrow new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */\nfunction _slicedToArray(r, e) {\n\treturn _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _unsupportedIterableToArray(r, a) {\n\tif (r) {\n\t\tif (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n\t\tvar t = {}.toString.call(r).slice(8, -1);\n\t\treturn \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n\t}\n}\nfunction AsyncGenerator(e) {\n\tvar t, n;\n\tfunction resume(t, n) {\n\t\ttry {\n\t\t\tvar r = e[t](n), o = r.value, u = o instanceof _OverloadYield;\n\t\t\tPromise.resolve(u ? o.v : o).then(function(n) {\n\t\t\t\tif (u) {\n\t\t\t\t\tvar i = \"return\" === t && o.k ? t : \"next\";\n\t\t\t\t\tif (!o.k || n.done) return resume(i, n);\n\t\t\t\t\tn = e[i](n).value;\n\t\t\t\t}\n\t\t\t\tsettle(!!r.done, n);\n\t\t\t}, function(e) {\n\t\t\t\tresume(\"throw\", e);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tsettle(2, e);\n\t\t}\n\t}\n\tfunction settle(e, r) {\n\t\t2 === e ? t.reject(r) : t.resolve({\n\t\t\tvalue: r,\n\t\t\tdone: e\n\t\t}), (t = t.next) ? resume(t.key, t.arg) : n = null;\n\t}\n\tthis._invoke = function(e, r) {\n\t\treturn new Promise(function(o, u) {\n\t\t\tvar i = {\n\t\t\t\tkey: e,\n\t\t\t\targ: r,\n\t\t\t\tresolve: o,\n\t\t\t\treject: u,\n\t\t\t\tnext: null\n\t\t\t};\n\t\t\tn ? n = n.next = i : (t = n = i, resume(e, r));\n\t\t});\n\t}, \"function\" != typeof e.return && (this.return = void 0);\n}\nAsyncGenerator.prototype[\"function\" == typeof Symbol && Symbol.asyncIterator || \"@@asyncIterator\"] = function() {\n\treturn this;\n}, AsyncGenerator.prototype.next = function(e) {\n\treturn this._invoke(\"next\", e);\n}, AsyncGenerator.prototype.throw = function(e) {\n\treturn this._invoke(\"throw\", e);\n}, AsyncGenerator.prototype.return = function(e) {\n\treturn this._invoke(\"return\", e);\n};\nconst entries = Object.entries;\nconst setPrototypeOf = Object.setPrototypeOf;\nconst isFrozen = Object.isFrozen;\nconst getPrototypeOf = Object.getPrototypeOf;\nconst getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nlet freeze = Object.freeze;\nlet seal = Object.seal;\nlet create = Object.create;\nlet _ref = typeof Reflect !== \"undefined\" && Reflect;\nlet apply = _ref.apply;\nlet construct = _ref.construct;\nif (!freeze) freeze = function freeze(x) {\n\treturn x;\n};\nif (!seal) seal = function seal(x) {\n\treturn x;\n};\nif (!apply) apply = function apply(func, thisArg) {\n\tfor (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];\n\treturn func.apply(thisArg, args);\n};\nif (!construct) construct = function construct(Func) {\n\tfor (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];\n\treturn new Func(...args);\n};\nconst arrayForEach = unapply(Array.prototype.forEach);\nArray.prototype.indexOf;\nconst arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nArray.prototype.slice;\nconst arraySplice = unapply(Array.prototype.splice);\nconst arrayIsArray = Array.isArray;\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\nconst numberToString = unapply(Number.prototype.toString);\nconst booleanToString = unapply(Boolean.prototype.toString);\nconst bigintToString = typeof BigInt === \"undefined\" ? null : unapply(BigInt.prototype.toString);\nconst symbolToString = typeof Symbol === \"undefined\" ? null : unapply(Symbol.prototype.toString);\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\nconst objectToString = unapply(Object.prototype.toString);\nconst regExpTest = unapply(RegExp.prototype.test);\nconst typeErrorCreate = unconstruct(TypeError);\n/**\n* Creates a new function that calls the given function with a specified thisArg and arguments.\n*\n* @param func - The function to be wrapped and called.\n* @returns A new function that calls the given function with a specified thisArg and arguments.\n*/\nfunction unapply(func) {\n\treturn function(thisArg) {\n\t\tif (thisArg instanceof RegExp) thisArg.lastIndex = 0;\n\t\tfor (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) args[_key3 - 1] = arguments[_key3];\n\t\treturn apply(func, thisArg, args);\n\t};\n}\n/**\n* Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n*\n* @param func - The constructor function to be wrapped and called.\n* @returns A new function that constructs an instance of the given constructor function with the provided arguments.\n*/\nfunction unconstruct(Func) {\n\treturn function() {\n\t\tfor (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) args[_key4] = arguments[_key4];\n\t\treturn construct(Func, args);\n\t};\n}\n/**\n* Add properties to a lookup table\n*\n* @param set - The set to which elements will be added.\n* @param array - The array containing elements to be added to the set.\n* @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n* @returns The modified set with added elements.\n*/\nfunction addToSet(set, array) {\n\tlet transformCaseFunc = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : stringToLowerCase;\n\tif (setPrototypeOf) setPrototypeOf(set, null);\n\tif (!arrayIsArray(array)) return set;\n\tlet l = array.length;\n\twhile (l--) {\n\t\tlet element = array[l];\n\t\tif (typeof element === \"string\") {\n\t\t\tconst lcElement = transformCaseFunc(element);\n\t\t\tif (lcElement !== element) {\n\t\t\t\tif (!isFrozen(array)) array[l] = lcElement;\n\t\t\t\telement = lcElement;\n\t\t\t}\n\t\t}\n\t\tset[element] = true;\n\t}\n\treturn set;\n}\n/**\n* Clean up an array to harden against CSPP\n*\n* @param array - The array to be cleaned.\n* @returns The cleaned version of the array\n*/\nfunction cleanArray(array) {\n\tfor (let index = 0; index < array.length; index++) if (!objectHasOwnProperty(array, index)) array[index] = null;\n\treturn array;\n}\n/**\n* Shallow clone an object\n*\n* @param object - The object to be cloned.\n* @returns A new object that copies the original.\n*/\nfunction clone(object) {\n\tconst newObject = create(null);\n\tfor (const _ref2 of entries(object)) {\n\t\tvar _ref3 = _slicedToArray(_ref2, 2);\n\t\tconst property = _ref3[0];\n\t\tconst value = _ref3[1];\n\t\tif (objectHasOwnProperty(object, property)) {\n\t\t\tif (arrayIsArray(value)) newObject[property] = cleanArray(value);\n\t\t\telse if (value && typeof value === \"object\" && value.constructor === Object) newObject[property] = clone(value);\n\t\t\telse newObject[property] = value;\n\t\t}\n\t}\n\treturn newObject;\n}\n/**\n* Convert non-node values into strings without depending on direct property access.\n*\n* @param value - The value to stringify.\n* @returns A string representation of the provided value.\n*/\nfunction stringifyValue(value) {\n\tswitch (typeof value) {\n\t\tcase \"string\": return value;\n\t\tcase \"number\": return numberToString(value);\n\t\tcase \"boolean\": return booleanToString(value);\n\t\tcase \"bigint\": return bigintToString ? bigintToString(value) : \"0\";\n\t\tcase \"symbol\": return symbolToString ? symbolToString(value) : \"Symbol()\";\n\t\tcase \"undefined\": return objectToString(value);\n\t\tcase \"function\":\n\t\tcase \"object\": {\n\t\t\tif (value === null) return objectToString(value);\n\t\t\tconst valueAsRecord = value;\n\t\t\tconst valueToString = lookupGetter(valueAsRecord, \"toString\");\n\t\t\tif (typeof valueToString === \"function\") {\n\t\t\t\tconst stringified = valueToString(valueAsRecord);\n\t\t\t\treturn typeof stringified === \"string\" ? stringified : objectToString(stringified);\n\t\t\t}\n\t\t\treturn objectToString(value);\n\t\t}\n\t\tdefault: return objectToString(value);\n\t}\n}\n/**\n* This method automatically checks if the prop is function or getter and behaves accordingly.\n*\n* @param object - The object to look up the getter function in its prototype chain.\n* @param prop - The property name for which to find the getter function.\n* @returns The getter function found in the prototype chain or a fallback function.\n*/\nfunction lookupGetter(object, prop) {\n\twhile (object !== null) {\n\t\tconst desc = getOwnPropertyDescriptor(object, prop);\n\t\tif (desc) {\n\t\t\tif (desc.get) return unapply(desc.get);\n\t\t\tif (typeof desc.value === \"function\") return unapply(desc.value);\n\t\t}\n\t\tobject = getPrototypeOf(object);\n\t}\n\tfunction fallbackValue() {\n\t\treturn null;\n\t}\n\treturn fallbackValue;\n}\nfunction isRegex(value) {\n\ttry {\n\t\tregExpTest(value, \"\");\n\t\treturn true;\n\t} catch (_unused) {\n\t\treturn false;\n\t}\n}\nconst html$1 = freeze([\n\t\"a\",\n\t\"abbr\",\n\t\"acronym\",\n\t\"address\",\n\t\"area\",\n\t\"article\",\n\t\"aside\",\n\t\"audio\",\n\t\"b\",\n\t\"bdi\",\n\t\"bdo\",\n\t\"big\",\n\t\"blink\",\n\t\"blockquote\",\n\t\"body\",\n\t\"br\",\n\t\"button\",\n\t\"canvas\",\n\t\"caption\",\n\t\"center\",\n\t\"cite\",\n\t\"code\",\n\t\"col\",\n\t\"colgroup\",\n\t\"content\",\n\t\"data\",\n\t\"datalist\",\n\t\"dd\",\n\t\"decorator\",\n\t\"del\",\n\t\"details\",\n\t\"dfn\",\n\t\"dialog\",\n\t\"dir\",\n\t\"div\",\n\t\"dl\",\n\t\"dt\",\n\t\"element\",\n\t\"em\",\n\t\"fieldset\",\n\t\"figcaption\",\n\t\"figure\",\n\t\"font\",\n\t\"footer\",\n\t\"form\",\n\t\"h1\",\n\t\"h2\",\n\t\"h3\",\n\t\"h4\",\n\t\"h5\",\n\t\"h6\",\n\t\"head\",\n\t\"header\",\n\t\"hgroup\",\n\t\"hr\",\n\t\"html\",\n\t\"i\",\n\t\"img\",\n\t\"input\",\n\t\"ins\",\n\t\"kbd\",\n\t\"label\",\n\t\"legend\",\n\t\"li\",\n\t\"main\",\n\t\"map\",\n\t\"mark\",\n\t\"marquee\",\n\t\"menu\",\n\t\"menuitem\",\n\t\"meter\",\n\t\"nav\",\n\t\"nobr\",\n\t\"ol\",\n\t\"optgroup\",\n\t\"option\",\n\t\"output\",\n\t\"p\",\n\t\"picture\",\n\t\"pre\",\n\t\"progress\",\n\t\"q\",\n\t\"rp\",\n\t\"rt\",\n\t\"ruby\",\n\t\"s\",\n\t\"samp\",\n\t\"search\",\n\t\"section\",\n\t\"select\",\n\t\"shadow\",\n\t\"slot\",\n\t\"small\",\n\t\"source\",\n\t\"spacer\",\n\t\"span\",\n\t\"strike\",\n\t\"strong\",\n\t\"style\",\n\t\"sub\",\n\t\"summary\",\n\t\"sup\",\n\t\"table\",\n\t\"tbody\",\n\t\"td\",\n\t\"template\",\n\t\"textarea\",\n\t\"tfoot\",\n\t\"th\",\n\t\"thead\",\n\t\"time\",\n\t\"tr\",\n\t\"track\",\n\t\"tt\",\n\t\"u\",\n\t\"ul\",\n\t\"var\",\n\t\"video\",\n\t\"wbr\"\n]);\nconst svg$1 = freeze([\n\t\"svg\",\n\t\"a\",\n\t\"altglyph\",\n\t\"altglyphdef\",\n\t\"altglyphitem\",\n\t\"animatecolor\",\n\t\"animatemotion\",\n\t\"animatetransform\",\n\t\"circle\",\n\t\"clippath\",\n\t\"defs\",\n\t\"desc\",\n\t\"ellipse\",\n\t\"enterkeyhint\",\n\t\"exportparts\",\n\t\"filter\",\n\t\"font\",\n\t\"g\",\n\t\"glyph\",\n\t\"glyphref\",\n\t\"hkern\",\n\t\"image\",\n\t\"inputmode\",\n\t\"line\",\n\t\"lineargradient\",\n\t\"marker\",\n\t\"mask\",\n\t\"metadata\",\n\t\"mpath\",\n\t\"part\",\n\t\"path\",\n\t\"pattern\",\n\t\"polygon\",\n\t\"polyline\",\n\t\"radialgradient\",\n\t\"rect\",\n\t\"stop\",\n\t\"style\",\n\t\"switch\",\n\t\"symbol\",\n\t\"text\",\n\t\"textpath\",\n\t\"title\",\n\t\"tref\",\n\t\"tspan\",\n\t\"view\",\n\t\"vkern\"\n]);\nconst svgFilters = freeze([\n\t\"feBlend\",\n\t\"feColorMatrix\",\n\t\"feComponentTransfer\",\n\t\"feComposite\",\n\t\"feConvolveMatrix\",\n\t\"feDiffuseLighting\",\n\t\"feDisplacementMap\",\n\t\"feDistantLight\",\n\t\"feDropShadow\",\n\t\"feFlood\",\n\t\"feFuncA\",\n\t\"feFuncB\",\n\t\"feFuncG\",\n\t\"feFuncR\",\n\t\"feGaussianBlur\",\n\t\"feImage\",\n\t\"feMerge\",\n\t\"feMergeNode\",\n\t\"feMorphology\",\n\t\"feOffset\",\n\t\"fePointLight\",\n\t\"feSpecularLighting\",\n\t\"feSpotLight\",\n\t\"feTile\",\n\t\"feTurbulence\"\n]);\nconst svgDisallowed = freeze([\n\t\"animate\",\n\t\"color-profile\",\n\t\"cursor\",\n\t\"discard\",\n\t\"font-face\",\n\t\"font-face-format\",\n\t\"font-face-name\",\n\t\"font-face-src\",\n\t\"font-face-uri\",\n\t\"foreignobject\",\n\t\"hatch\",\n\t\"hatchpath\",\n\t\"mesh\",\n\t\"meshgradient\",\n\t\"meshpatch\",\n\t\"meshrow\",\n\t\"missing-glyph\",\n\t\"script\",\n\t\"set\",\n\t\"solidcolor\",\n\t\"unknown\",\n\t\"use\"\n]);\nconst mathMl$1 = freeze([\n\t\"math\",\n\t\"menclose\",\n\t\"merror\",\n\t\"mfenced\",\n\t\"mfrac\",\n\t\"mglyph\",\n\t\"mi\",\n\t\"mlabeledtr\",\n\t\"mmultiscripts\",\n\t\"mn\",\n\t\"mo\",\n\t\"mover\",\n\t\"mpadded\",\n\t\"mphantom\",\n\t\"mroot\",\n\t\"mrow\",\n\t\"ms\",\n\t\"mspace\",\n\t\"msqrt\",\n\t\"mstyle\",\n\t\"msub\",\n\t\"msup\",\n\t\"msubsup\",\n\t\"mtable\",\n\t\"mtd\",\n\t\"mtext\",\n\t\"mtr\",\n\t\"munder\",\n\t\"munderover\",\n\t\"mprescripts\"\n]);\nconst mathMlDisallowed = freeze([\n\t\"maction\",\n\t\"maligngroup\",\n\t\"malignmark\",\n\t\"mlongdiv\",\n\t\"mscarries\",\n\t\"mscarry\",\n\t\"msgroup\",\n\t\"mstack\",\n\t\"msline\",\n\t\"msrow\",\n\t\"semantics\",\n\t\"annotation\",\n\t\"annotation-xml\",\n\t\"mprescripts\",\n\t\"none\"\n]);\nconst text = freeze([\"#text\"]);\nconst html = freeze([\n\t\"accept\",\n\t\"action\",\n\t\"align\",\n\t\"alt\",\n\t\"autocapitalize\",\n\t\"autocomplete\",\n\t\"autopictureinpicture\",\n\t\"autoplay\",\n\t\"background\",\n\t\"bgcolor\",\n\t\"border\",\n\t\"capture\",\n\t\"cellpadding\",\n\t\"cellspacing\",\n\t\"checked\",\n\t\"cite\",\n\t\"class\",\n\t\"clear\",\n\t\"color\",\n\t\"cols\",\n\t\"colspan\",\n\t\"command\",\n\t\"commandfor\",\n\t\"controls\",\n\t\"controlslist\",\n\t\"coords\",\n\t\"crossorigin\",\n\t\"datetime\",\n\t\"decoding\",\n\t\"default\",\n\t\"dir\",\n\t\"disabled\",\n\t\"disablepictureinpicture\",\n\t\"disableremoteplayback\",\n\t\"download\",\n\t\"draggable\",\n\t\"enctype\",\n\t\"enterkeyhint\",\n\t\"exportparts\",\n\t\"face\",\n\t\"for\",\n\t\"headers\",\n\t\"height\",\n\t\"hidden\",\n\t\"high\",\n\t\"href\",\n\t\"hreflang\",\n\t\"id\",\n\t\"inert\",\n\t\"inputmode\",\n\t\"integrity\",\n\t\"ismap\",\n\t\"kind\",\n\t\"label\",\n\t\"lang\",\n\t\"list\",\n\t\"loading\",\n\t\"loop\",\n\t\"low\",\n\t\"max\",\n\t\"maxlength\",\n\t\"media\",\n\t\"method\",\n\t\"min\",\n\t\"minlength\",\n\t\"multiple\",\n\t\"muted\",\n\t\"name\",\n\t\"nonce\",\n\t\"noshade\",\n\t\"novalidate\",\n\t\"nowrap\",\n\t\"open\",\n\t\"optimum\",\n\t\"part\",\n\t\"pattern\",\n\t\"placeholder\",\n\t\"playsinline\",\n\t\"popover\",\n\t\"popovertarget\",\n\t\"popovertargetaction\",\n\t\"poster\",\n\t\"preload\",\n\t\"pubdate\",\n\t\"radiogroup\",\n\t\"readonly\",\n\t\"rel\",\n\t\"required\",\n\t\"rev\",\n\t\"reversed\",\n\t\"role\",\n\t\"rows\",\n\t\"rowspan\",\n\t\"spellcheck\",\n\t\"scope\",\n\t\"selected\",\n\t\"shape\",\n\t\"size\",\n\t\"sizes\",\n\t\"slot\",\n\t\"span\",\n\t\"srclang\",\n\t\"start\",\n\t\"src\",\n\t\"srcset\",\n\t\"step\",\n\t\"style\",\n\t\"summary\",\n\t\"tabindex\",\n\t\"title\",\n\t\"translate\",\n\t\"type\",\n\t\"usemap\",\n\t\"valign\",\n\t\"value\",\n\t\"width\",\n\t\"wrap\",\n\t\"xmlns\"\n]);\nconst svg = freeze([\n\t\"accent-height\",\n\t\"accumulate\",\n\t\"additive\",\n\t\"alignment-baseline\",\n\t\"amplitude\",\n\t\"ascent\",\n\t\"attributename\",\n\t\"attributetype\",\n\t\"azimuth\",\n\t\"basefrequency\",\n\t\"baseline-shift\",\n\t\"begin\",\n\t\"bias\",\n\t\"by\",\n\t\"class\",\n\t\"clip\",\n\t\"clippathunits\",\n\t\"clip-path\",\n\t\"clip-rule\",\n\t\"color\",\n\t\"color-interpolation\",\n\t\"color-interpolation-filters\",\n\t\"color-profile\",\n\t\"color-rendering\",\n\t\"cx\",\n\t\"cy\",\n\t\"d\",\n\t\"dx\",\n\t\"dy\",\n\t\"diffuseconstant\",\n\t\"direction\",\n\t\"display\",\n\t\"divisor\",\n\t\"dominant-baseline\",\n\t\"dur\",\n\t\"edgemode\",\n\t\"elevation\",\n\t\"end\",\n\t\"exponent\",\n\t\"fill\",\n\t\"fill-opacity\",\n\t\"fill-rule\",\n\t\"filter\",\n\t\"filterunits\",\n\t\"flood-color\",\n\t\"flood-opacity\",\n\t\"font-family\",\n\t\"font-size\",\n\t\"font-size-adjust\",\n\t\"font-stretch\",\n\t\"font-style\",\n\t\"font-variant\",\n\t\"font-weight\",\n\t\"fx\",\n\t\"fy\",\n\t\"g1\",\n\t\"g2\",\n\t\"glyph-name\",\n\t\"glyphref\",\n\t\"gradientunits\",\n\t\"gradienttransform\",\n\t\"height\",\n\t\"href\",\n\t\"id\",\n\t\"image-rendering\",\n\t\"in\",\n\t\"in2\",\n\t\"intercept\",\n\t\"k\",\n\t\"k1\",\n\t\"k2\",\n\t\"k3\",\n\t\"k4\",\n\t\"kerning\",\n\t\"keypoints\",\n\t\"keysplines\",\n\t\"keytimes\",\n\t\"lang\",\n\t\"lengthadjust\",\n\t\"letter-spacing\",\n\t\"kernelmatrix\",\n\t\"kernelunitlength\",\n\t\"lighting-color\",\n\t\"local\",\n\t\"marker-end\",\n\t\"marker-mid\",\n\t\"marker-start\",\n\t\"markerheight\",\n\t\"markerunits\",\n\t\"markerwidth\",\n\t\"maskcontentunits\",\n\t\"maskunits\",\n\t\"max\",\n\t\"mask\",\n\t\"mask-type\",\n\t\"media\",\n\t\"method\",\n\t\"mode\",\n\t\"min\",\n\t\"name\",\n\t\"numoctaves\",\n\t\"offset\",\n\t\"operator\",\n\t\"opacity\",\n\t\"order\",\n\t\"orient\",\n\t\"orientation\",\n\t\"origin\",\n\t\"overflow\",\n\t\"paint-order\",\n\t\"path\",\n\t\"pathlength\",\n\t\"patterncontentunits\",\n\t\"patterntransform\",\n\t\"patternunits\",\n\t\"pointer-events\",\n\t\"points\",\n\t\"preservealpha\",\n\t\"preserveaspectratio\",\n\t\"primitiveunits\",\n\t\"r\",\n\t\"rx\",\n\t\"ry\",\n\t\"radius\",\n\t\"refx\",\n\t\"refy\",\n\t\"repeatcount\",\n\t\"repeatdur\",\n\t\"restart\",\n\t\"result\",\n\t\"rotate\",\n\t\"scale\",\n\t\"seed\",\n\t\"shape-rendering\",\n\t\"slope\",\n\t\"specularconstant\",\n\t\"specularexponent\",\n\t\"spreadmethod\",\n\t\"startoffset\",\n\t\"stddeviation\",\n\t\"stitchtiles\",\n\t\"stop-color\",\n\t\"stop-opacity\",\n\t\"stroke-dasharray\",\n\t\"stroke-dashoffset\",\n\t\"stroke-linecap\",\n\t\"stroke-linejoin\",\n\t\"stroke-miterlimit\",\n\t\"stroke-opacity\",\n\t\"stroke\",\n\t\"stroke-width\",\n\t\"style\",\n\t\"surfacescale\",\n\t\"systemlanguage\",\n\t\"tabindex\",\n\t\"tablevalues\",\n\t\"targetx\",\n\t\"targety\",\n\t\"transform\",\n\t\"transform-origin\",\n\t\"text-anchor\",\n\t\"text-decoration\",\n\t\"text-orientation\",\n\t\"text-rendering\",\n\t\"textlength\",\n\t\"type\",\n\t\"u1\",\n\t\"u2\",\n\t\"unicode\",\n\t\"values\",\n\t\"vector-effect\",\n\t\"viewbox\",\n\t\"visibility\",\n\t\"version\",\n\t\"vert-adv-y\",\n\t\"vert-origin-x\",\n\t\"vert-origin-y\",\n\t\"width\",\n\t\"word-spacing\",\n\t\"wrap\",\n\t\"writing-mode\",\n\t\"xchannelselector\",\n\t\"ychannelselector\",\n\t\"x\",\n\t\"x1\",\n\t\"x2\",\n\t\"xmlns\",\n\t\"y\",\n\t\"y1\",\n\t\"y2\",\n\t\"z\",\n\t\"zoomandpan\"\n]);\nconst mathMl = freeze([\n\t\"accent\",\n\t\"accentunder\",\n\t\"align\",\n\t\"bevelled\",\n\t\"close\",\n\t\"columnalign\",\n\t\"columnlines\",\n\t\"columnspacing\",\n\t\"columnspan\",\n\t\"denomalign\",\n\t\"depth\",\n\t\"dir\",\n\t\"display\",\n\t\"displaystyle\",\n\t\"encoding\",\n\t\"fence\",\n\t\"frame\",\n\t\"height\",\n\t\"href\",\n\t\"id\",\n\t\"largeop\",\n\t\"length\",\n\t\"linethickness\",\n\t\"lquote\",\n\t\"lspace\",\n\t\"mathbackground\",\n\t\"mathcolor\",\n\t\"mathsize\",\n\t\"mathvariant\",\n\t\"maxsize\",\n\t\"minsize\",\n\t\"movablelimits\",\n\t\"notation\",\n\t\"numalign\",\n\t\"open\",\n\t\"rowalign\",\n\t\"rowlines\",\n\t\"rowspacing\",\n\t\"rowspan\",\n\t\"rspace\",\n\t\"rquote\",\n\t\"scriptlevel\",\n\t\"scriptminsize\",\n\t\"scriptsizemultiplier\",\n\t\"selection\",\n\t\"separator\",\n\t\"separators\",\n\t\"stretchy\",\n\t\"subscriptshift\",\n\t\"supscriptshift\",\n\t\"symmetric\",\n\t\"voffset\",\n\t\"width\",\n\t\"xmlns\"\n]);\nconst xml = freeze([\n\t\"xlink:href\",\n\t\"xml:id\",\n\t\"xlink:title\",\n\t\"xml:space\",\n\t\"xmlns:xlink\"\n]);\nconst MUSTACHE_EXPR = seal(/{{[\\w\\W]*|^[\\w\\W]*}}/g);\nconst ERB_EXPR = seal(/<%[\\w\\W]*|^[\\w\\W]*%>/g);\nconst TMPLIT_EXPR = seal(/\\${[\\w\\W]*/g);\nconst DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/);\nconst ARIA_ATTR = seal(/^aria-[\\-\\w]+$/);\nconst IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i);\nconst IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nconst ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g);\nconst DOCTYPE_NAME = seal(/^html$/i);\nconst CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\nconst ELEMENT_MARKUP_PROBE = seal(/<[/\\w!]/g);\nconst COMMENT_MARKUP_PROBE = seal(/<[/\\w]/g);\nconst FALLBACK_TAG_CLOSE = seal(/<\\/no(script|embed|frames)/i);\nconst SELF_CLOSING_TAG = seal(/\\/>/i);\nconst NODE_TYPE = {\n\telement: 1,\n\tattribute: 2,\n\ttext: 3,\n\tcdataSection: 4,\n\tentityReference: 5,\n\tentityNode: 6,\n\tprocessingInstruction: 7,\n\tcomment: 8,\n\tdocument: 9,\n\tdocumentType: 10,\n\tdocumentFragment: 11,\n\tnotation: 12\n};\nconst LITERAL_TEXT_ELEMENT_NAMES = [\n\t\"style\",\n\t\"script\",\n\t\"xmp\",\n\t\"iframe\",\n\t\"noembed\",\n\t\"noframes\",\n\t\"plaintext\",\n\t\"noscript\"\n];\nconst LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, LITERAL_TEXT_ELEMENT_NAMES));\nconst LITERAL_TEXT_CLOSE = function() {\n\tconst map = {};\n\tarrayForEach(LITERAL_TEXT_ELEMENT_NAMES, (name) => {\n\t\tmap[name] = seal(new RegExp(\"</\" + name + \"(?=[\\\\t\\\\n\\\\f\\\\r />])\", \"i\"));\n\t});\n\treturn freeze(map);\n}();\nconst getGlobal = function getGlobal() {\n\treturn typeof window === \"undefined\" ? null : window;\n};\n/**\n* Creates a no-op policy for internal use only.\n* Don't export this function outside this module!\n* @param trustedTypes The policy factory.\n* @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n* @return The policy created (or null, if Trusted Types\n* are not supported or creating the policy failed).\n*/\nconst _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n\tif (typeof trustedTypes !== \"object\" || typeof trustedTypes.createPolicy !== \"function\") return null;\n\tlet suffix = null;\n\tconst ATTR_NAME = \"data-tt-policy-suffix\";\n\tif (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) suffix = purifyHostElement.getAttribute(ATTR_NAME);\n\tconst policyName = \"dompurify\" + (suffix ? \"#\" + suffix : \"\");\n\ttry {\n\t\treturn trustedTypes.createPolicy(policyName, {\n\t\t\tcreateHTML(html) {\n\t\t\t\treturn html;\n\t\t\t},\n\t\t\tcreateScriptURL(scriptUrl) {\n\t\t\t\treturn scriptUrl;\n\t\t\t}\n\t\t});\n\t} catch (_) {\n\t\tconsole.warn(\"TrustedTypes policy \" + policyName + \" could not be created.\");\n\t\treturn null;\n\t}\n};\nconst _createHooksMap = function _createHooksMap() {\n\treturn {\n\t\tafterSanitizeAttributes: [],\n\t\tafterSanitizeElements: [],\n\t\tafterSanitizeShadowDOM: [],\n\t\tbeforeSanitizeAttributes: [],\n\t\tbeforeSanitizeElements: [],\n\t\tbeforeSanitizeShadowDOM: [],\n\t\tuponSanitizeAttribute: [],\n\t\tuponSanitizeElement: [],\n\t\tuponSanitizeShadowNode: []\n\t};\n};\n/**\n* Resolve a set-valued configuration option: a fresh set built from\n* cfg[key] when it is an own array property (seeded with a clone of\n* options.base when given, case-normalized via options.transform),\n* the fallback set otherwise.\n*\n* @param cfg the cloned, prototype-free configuration object\n* @param key the configuration property to read\n* @param fallback the set to use when the option is absent or not an array\n* @param options transform and optional base set to merge into\n* @returns the resolved set\n*/\nconst _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options) {\n\treturn objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key], options.transform) : fallback;\n};\n/**\n* Resolve an object-valued configuration option: a prototype-free clone\n* of cfg[key] when it is an own, truthy object property, else a fresh\n* fallback built by makeFallback (fresh on every parse, so a previous\n* parse can never leak state into the next one).\n*\n* @param cfg the cloned, prototype-free configuration object\n* @param key the configuration property to read\n* @param makeFallback builds the fallback value when the option is absent\n* @returns the resolved object\n*/\nconst _resolveObjectOption = function _resolveObjectOption(cfg, key, makeFallback) {\n\tconst value = objectHasOwnProperty(cfg, key) ? cfg[key] : void 0;\n\treturn value && typeof value === \"object\" ? clone(value) : makeFallback();\n};\nfunction createDOMPurify() {\n\tlet window = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();\n\tconst DOMPurify = (root) => createDOMPurify(root);\n\tDOMPurify.version = \"3.4.16\";\n\tDOMPurify.removed = [];\n\tif (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {\n\t\tDOMPurify.isSupported = false;\n\t\treturn DOMPurify;\n\t}\n\tlet document = window.document;\n\tconst originalDocument = document;\n\tconst currentScript = originalDocument.currentScript;\n\twindow.DocumentFragment;\n\tconst HTMLTemplateElement = window.HTMLTemplateElement, Node = window.Node, Element = window.Element, NodeFilter = window.NodeFilter;\n\twindow.NamedNodeMap === void 0 && (window.NamedNodeMap || window.MozNamedAttrMap);\n\twindow.HTMLFormElement;\n\tconst DOMParser = window.DOMParser, trustedTypes = window.trustedTypes;\n\tconst ElementPrototype = Element.prototype;\n\tconst cloneNode = lookupGetter(ElementPrototype, \"cloneNode\");\n\tconst remove = lookupGetter(ElementPrototype, \"remove\");\n\tconst removeAttributeNode = lookupGetter(ElementPrototype, \"removeAttributeNode\");\n\tconst getNextSibling = lookupGetter(ElementPrototype, \"nextSibling\");\n\tconst getChildNodes = lookupGetter(ElementPrototype, \"childNodes\");\n\tconst getParentNode = lookupGetter(ElementPrototype, \"parentNode\");\n\tconst getShadowRoot = lookupGetter(ElementPrototype, \"shadowRoot\");\n\tconst getAttributes = lookupGetter(ElementPrototype, \"attributes\");\n\tconst getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, \"nodeType\") : null;\n\tconst getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, \"nodeName\") : null;\n\tconst getOwnerDocument = Node && Node.prototype ? lookupGetter(Node.prototype, \"ownerDocument\") : null;\n\tconst _readNodeType = function _readNodeType(node) {\n\t\treturn getNodeType ? getNodeType(node) : node.nodeType;\n\t};\n\tconst _readNodeName = function _readNodeName(node) {\n\t\treturn getNodeName ? getNodeName(node) : node.nodeName;\n\t};\n\tif (typeof HTMLTemplateElement === \"function\") {\n\t\tconst template = document.createElement(\"template\");\n\t\tif (template.content && template.content.ownerDocument) document = template.content.ownerDocument;\n\t}\n\tlet trustedTypesPolicy;\n\tlet emptyHTML = \"\";\n\tlet defaultTrustedTypesPolicy;\n\tlet defaultTrustedTypesPolicyResolved = false;\n\tlet IN_TRUSTED_TYPES_POLICY = 0;\n\tconst _assertNotInTrustedTypesPolicy = function _assertNotInTrustedTypesPolicy() {\n\t\tif (IN_TRUSTED_TYPES_POLICY > 0) throw typeErrorCreate(\"A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \\\"DOMPurify and Trusted Types\\\" section of the README.\");\n\t};\n\tconst _createTrustedHTML = function _createTrustedHTML(html) {\n\t\t_assertNotInTrustedTypesPolicy();\n\t\tIN_TRUSTED_TYPES_POLICY++;\n\t\ttry {\n\t\t\treturn trustedTypesPolicy.createHTML(html);\n\t\t} finally {\n\t\t\tIN_TRUSTED_TYPES_POLICY--;\n\t\t}\n\t};\n\tconst _createTrustedScriptURL = function _createTrustedScriptURL(scriptUrl) {\n\t\t_assertNotInTrustedTypesPolicy();\n\t\tIN_TRUSTED_TYPES_POLICY++;\n\t\ttry {\n\t\t\treturn trustedTypesPolicy.createScriptURL(scriptUrl);\n\t\t} finally {\n\t\t\tIN_TRUSTED_TYPES_POLICY--;\n\t\t}\n\t};\n\tconst _getDefaultTrustedTypesPolicy = function _getDefaultTrustedTypesPolicy() {\n\t\tif (!defaultTrustedTypesPolicyResolved) {\n\t\t\tdefaultTrustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n\t\t\tdefaultTrustedTypesPolicyResolved = true;\n\t\t}\n\t\treturn defaultTrustedTypesPolicy;\n\t};\n\tconst _document = document, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;\n\tconst importNode = originalDocument.importNode;\n\tlet hooks = _createHooksMap();\n\t/**\n\t* Expose whether this browser supports running the full DOMPurify.\n\t*/\n\tDOMPurify.isSupported = typeof entries === \"function\" && typeof getParentNode === \"function\" && implementation && implementation.createHTMLDocument !== void 0;\n\tconst MUSTACHE_EXPR$1 = MUSTACHE_EXPR, ERB_EXPR$1 = ERB_EXPR, TMPLIT_EXPR$1 = TMPLIT_EXPR, DATA_ATTR$1 = DATA_ATTR, ARIA_ATTR$1 = ARIA_ATTR, IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$1 = ATTR_WHITESPACE, CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;\n\tlet IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\n\t/**\n\t* We consider the elements and attributes below to be safe. Ideally\n\t* don't add any new ones but feel free to remove unwanted ones.\n\t*/\n\tlet ALLOWED_TAGS = null;\n\tconst DEFAULT_ALLOWED_TAGS = addToSet({}, [\n\t\t...html$1,\n\t\t...svg$1,\n\t\t...svgFilters,\n\t\t...mathMl$1,\n\t\t...text\n\t]);\n\tlet ALLOWED_ATTR = null;\n\tconst DEFAULT_ALLOWED_ATTR = addToSet({}, [\n\t\t...html,\n\t\t...svg,\n\t\t...mathMl,\n\t\t...xml\n\t]);\n\tlet CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n\t\ttagNameCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t},\n\t\tattributeNameCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t},\n\t\tallowCustomizedBuiltInElements: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: false\n\t\t}\n\t}));\n\tlet FORBID_TAGS = null;\n\tlet FORBID_ATTR = null;\n\tconst EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {\n\t\ttagCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t},\n\t\tattributeCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t}\n\t}));\n\tlet ALLOW_ARIA_ATTR = true;\n\tlet ALLOW_DATA_ATTR = true;\n\tlet ALLOW_UNKNOWN_PROTOCOLS = false;\n\tlet ALLOW_SELF_CLOSE_IN_ATTR = true;\n\tlet SAFE_FOR_TEMPLATES = false;\n\tlet SAFE_FOR_XML = true;\n\tlet WHOLE_DOCUMENT = false;\n\tlet SET_CONFIG = false;\n\tlet SET_CONFIG_ALLOWED_TAGS = null;\n\tlet SET_CONFIG_ALLOWED_ATTR = null;\n\tlet FORCE_BODY = false;\n\tlet RETURN_DOM = false;\n\tlet RETURN_DOM_FRAGMENT = false;\n\tlet RETURN_TRUSTED_TYPE = false;\n\tlet SANITIZE_DOM = true;\n\tlet SANITIZE_NAMED_PROPS = false;\n\tconst SANITIZE_NAMED_PROPS_PREFIX = \"user-content-\";\n\tlet KEEP_CONTENT = true;\n\tlet IN_PLACE = false;\n\tlet USE_PROFILES = {};\n\tlet FORBID_CONTENTS = null;\n\tconst DEFAULT_FORBID_CONTENTS = addToSet({}, [\n\t\t\"annotation-xml\",\n\t\t\"audio\",\n\t\t\"colgroup\",\n\t\t\"desc\",\n\t\t\"foreignobject\",\n\t\t\"head\",\n\t\t\"iframe\",\n\t\t\"math\",\n\t\t\"mi\",\n\t\t\"mn\",\n\t\t\"mo\",\n\t\t\"ms\",\n\t\t\"mtext\",\n\t\t\"noembed\",\n\t\t\"noframes\",\n\t\t\"noscript\",\n\t\t\"plaintext\",\n\t\t\"script\",\n\t\t\"selectedcontent\",\n\t\t\"style\",\n\t\t\"svg\",\n\t\t\"template\",\n\t\t\"thead\",\n\t\t\"title\",\n\t\t\"video\",\n\t\t\"xmp\"\n\t]);\n\tlet DATA_URI_TAGS = null;\n\tconst DEFAULT_DATA_URI_TAGS = addToSet({}, [\n\t\t\"audio\",\n\t\t\"video\",\n\t\t\"img\",\n\t\t\"source\",\n\t\t\"image\",\n\t\t\"track\"\n\t]);\n\tlet URI_SAFE_ATTRIBUTES = null;\n\tconst DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, [\n\t\t\"alt\",\n\t\t\"class\",\n\t\t\"for\",\n\t\t\"id\",\n\t\t\"label\",\n\t\t\"name\",\n\t\t\"pattern\",\n\t\t\"placeholder\",\n\t\t\"role\",\n\t\t\"summary\",\n\t\t\"title\",\n\t\t\"value\",\n\t\t\"style\",\n\t\t\"xmlns\"\n\t]);\n\tconst MATHML_NAMESPACE = \"http://www.w3.org/1998/Math/MathML\";\n\tconst SVG_NAMESPACE = \"http://www.w3.org/2000/svg\";\n\tconst HTML_NAMESPACE = \"http://www.w3.org/1999/xhtml\";\n\tlet NAMESPACE = HTML_NAMESPACE;\n\tlet IS_EMPTY_INPUT = false;\n\tlet ALLOWED_NAMESPACES = null;\n\tconst DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [\n\t\tMATHML_NAMESPACE,\n\t\tSVG_NAMESPACE,\n\t\tHTML_NAMESPACE\n\t], stringToString);\n\tconst DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze([\n\t\t\"mi\",\n\t\t\"mo\",\n\t\t\"mn\",\n\t\t\"ms\",\n\t\t\"mtext\"\n\t]);\n\tlet MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);\n\tconst DEFAULT_HTML_INTEGRATION_POINTS = freeze([\"annotation-xml\"]);\n\tlet HTML_INTEGRATION_POINTS = addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);\n\tconst COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, [\n\t\t\"title\",\n\t\t\"style\",\n\t\t\"font\",\n\t\t\"a\",\n\t\t\"script\"\n\t]);\n\tlet PARSER_MEDIA_TYPE = null;\n\tconst SUPPORTED_PARSER_MEDIA_TYPES = [\"application/xhtml+xml\", \"text/html\"];\n\tconst DEFAULT_PARSER_MEDIA_TYPE = \"text/html\";\n\tlet transformCaseFunc = null;\n\tlet CONFIG = null;\n\tconst formElement = document.createElement(\"form\");\n\tconst isRegexOrFunction = function isRegexOrFunction(testValue) {\n\t\treturn testValue instanceof RegExp || testValue instanceof Function;\n\t};\n\t/**\n\t* _parseConfig\n\t*\n\t* @param cfg optional config literal\n\t*/\n\tconst _parseConfig = function _parseConfig() {\n\t\tlet cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n\t\tif (CONFIG && CONFIG === cfg) return;\n\t\tif (!cfg || typeof cfg !== \"object\") cfg = {};\n\t\tcfg = clone(cfg);\n\t\tPARSER_MEDIA_TYPE = SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n\t\ttransformCaseFunc = PARSER_MEDIA_TYPE === \"application/xhtml+xml\" ? stringToString : stringToLowerCase;\n\t\tALLOWED_TAGS = _resolveSetOption(cfg, \"ALLOWED_TAGS\", DEFAULT_ALLOWED_TAGS, { transform: transformCaseFunc });\n\t\tALLOWED_ATTR = _resolveSetOption(cfg, \"ALLOWED_ATTR\", DEFAULT_ALLOWED_ATTR, { transform: transformCaseFunc });\n\t\tALLOWED_NAMESPACES = _resolveSetOption(cfg, \"ALLOWED_NAMESPACES\", DEFAULT_ALLOWED_NAMESPACES, { transform: stringToString });\n\t\tURI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, \"ADD_URI_SAFE_ATTR\", DEFAULT_URI_SAFE_ATTRIBUTES, {\n\t\t\ttransform: transformCaseFunc,\n\t\t\tbase: DEFAULT_URI_SAFE_ATTRIBUTES\n\t\t});\n\t\tDATA_URI_TAGS = _resolveSetOption(cfg, \"ADD_DATA_URI_TAGS\", DEFAULT_DATA_URI_TAGS, {\n\t\t\ttransform: transformCaseFunc,\n\t\t\tbase: DEFAULT_DATA_URI_TAGS\n\t\t});\n\t\tFORBID_CONTENTS = _resolveSetOption(cfg, \"FORBID_CONTENTS\", DEFAULT_FORBID_CONTENTS, { transform: transformCaseFunc });\n\t\tFORBID_TAGS = _resolveSetOption(cfg, \"FORBID_TAGS\", clone({}), { transform: transformCaseFunc });\n\t\tFORBID_ATTR = _resolveSetOption(cfg, \"FORBID_ATTR\", clone({}), { transform: transformCaseFunc });\n\t\tUSE_PROFILES = objectHasOwnProperty(cfg, \"USE_PROFILES\") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === \"object\" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;\n\t\tALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;\n\t\tALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;\n\t\tALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;\n\t\tALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false;\n\t\tSAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false;\n\t\tSAFE_FOR_XML = cfg.SAFE_FOR_XML !== false;\n\t\tWHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false;\n\t\tRETURN_DOM = cfg.RETURN_DOM || false;\n\t\tRETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false;\n\t\tRETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false;\n\t\tFORCE_BODY = cfg.FORCE_BODY || false;\n\t\tSANITIZE_DOM = cfg.SANITIZE_DOM !== false;\n\t\tSANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;\n\t\tKEEP_CONTENT = cfg.KEEP_CONTENT !== false;\n\t\tIN_PLACE = cfg.IN_PLACE || false;\n\t\tIS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;\n\t\tNAMESPACE = typeof cfg.NAMESPACE === \"string\" ? cfg.NAMESPACE : HTML_NAMESPACE;\n\t\tMATHML_TEXT_INTEGRATION_POINTS = _resolveObjectOption(cfg, \"MATHML_TEXT_INTEGRATION_POINTS\", () => addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS));\n\t\tHTML_INTEGRATION_POINTS = _resolveObjectOption(cfg, \"HTML_INTEGRATION_POINTS\", () => addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS));\n\t\tconst customElementHandling = _resolveObjectOption(cfg, \"CUSTOM_ELEMENT_HANDLING\", () => create(null));\n\t\tCUSTOM_ELEMENT_HANDLING = create(null);\n\t\tif (objectHasOwnProperty(customElementHandling, \"tagNameCheck\") && isRegexOrFunction(customElementHandling.tagNameCheck)) CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;\n\t\tif (objectHasOwnProperty(customElementHandling, \"attributeNameCheck\") && isRegexOrFunction(customElementHandling.attributeNameCheck)) CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;\n\t\tif (objectHasOwnProperty(customElementHandling, \"allowCustomizedBuiltInElements\") && typeof customElementHandling.allowCustomizedBuiltInElements === \"boolean\") CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;\n\t\tseal(CUSTOM_ELEMENT_HANDLING);\n\t\tif (SAFE_FOR_TEMPLATES) ALLOW_DATA_ATTR = false;\n\t\tif (RETURN_DOM_FRAGMENT) RETURN_DOM = true;\n\t\tif (USE_PROFILES) {\n\t\t\tALLOWED_TAGS = addToSet({}, text);\n\t\t\tALLOWED_ATTR = create(null);\n\t\t\tif (USE_PROFILES.html === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, html$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, html);\n\t\t\t}\n\t\t\tif (USE_PROFILES.svg === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, svg$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, svg);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\t\t\tif (USE_PROFILES.svgFilters === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, svgFilters);\n\t\t\t\taddToSet(ALLOWED_ATTR, svg);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\t\t\tif (USE_PROFILES.mathMl === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, mathMl$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, mathMl);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\t\t}\n\t\tEXTRA_ELEMENT_HANDLING.tagCheck = null;\n\t\tEXTRA_ELEMENT_HANDLING.attributeCheck = null;\n\t\tif (objectHasOwnProperty(cfg, \"ADD_TAGS\")) {\n\t\t\tif (typeof cfg.ADD_TAGS === \"function\") EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;\n\t\t\telse if (arrayIsArray(cfg.ADD_TAGS)) {\n\t\t\t\tif (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) ALLOWED_TAGS = clone(ALLOWED_TAGS);\n\t\t\t\taddToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n\t\t\t}\n\t\t}\n\t\tif (objectHasOwnProperty(cfg, \"ADD_ATTR\")) {\n\t\t\tif (typeof cfg.ADD_ATTR === \"function\") EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;\n\t\t\telse if (arrayIsArray(cfg.ADD_ATTR)) {\n\t\t\t\tif (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) ALLOWED_ATTR = clone(ALLOWED_ATTR);\n\t\t\t\taddToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n\t\t\t}\n\t\t}\n\t\tif (objectHasOwnProperty(cfg, \"ADD_FORBID_CONTENTS\") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {\n\t\t\tif (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) FORBID_CONTENTS = clone(FORBID_CONTENTS);\n\t\t\taddToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);\n\t\t}\n\t\tif (KEEP_CONTENT) ALLOWED_TAGS[\"#text\"] = true;\n\t\tif (WHOLE_DOCUMENT) addToSet(ALLOWED_TAGS, [\n\t\t\t\"html\",\n\t\t\t\"head\",\n\t\t\t\"body\"\n\t\t]);\n\t\tif (ALLOWED_TAGS.table) {\n\t\t\taddToSet(ALLOWED_TAGS, [\"tbody\"]);\n\t\t\tdelete FORBID_TAGS.tbody;\n\t\t}\n\t\tif (cfg.TRUSTED_TYPES_POLICY) {\n\t\t\tif (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== \"function\") throw typeErrorCreate(\"TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.\");\n\t\t\tif (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== \"function\") throw typeErrorCreate(\"TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.\");\n\t\t\tconst previousTrustedTypesPolicy = trustedTypesPolicy;\n\t\t\ttrustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\t\t\ttry {\n\t\t\t\temptyHTML = _createTrustedHTML(\"\");\n\t\t\t} catch (error) {\n\t\t\t\ttrustedTypesPolicy = previousTrustedTypesPolicy;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t} else if (cfg.TRUSTED_TYPES_POLICY === null) {\n\t\t\ttrustedTypesPolicy = void 0;\n\t\t\temptyHTML = \"\";\n\t\t} else {\n\t\t\tif (trustedTypesPolicy === void 0) trustedTypesPolicy = _getDefaultTrustedTypesPolicy();\n\t\t\tif (trustedTypesPolicy && typeof emptyHTML === \"string\") emptyHTML = _createTrustedHTML(\"\");\n\t\t}\n\t\tif (freeze) freeze(cfg);\n\t\tCONFIG = cfg;\n\t};\n\tconst ALL_SVG_TAGS = addToSet({}, [\n\t\t...svg$1,\n\t\t...svgFilters,\n\t\t...svgDisallowed\n\t]);\n\tconst ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n\t/**\n\t* Namespace rules for an element in the SVG namespace.\n\t*\n\t* @param tagName the element's lowercase tag name\n\t* @param parent the (possibly simulated) parent node\n\t* @param parentTagName the parent's lowercase tag name\n\t* @returns true if a spec-compliant parser could produce this element\n\t*/\n\tconst _checkSvgNamespace = function _checkSvgNamespace(tagName, parent, parentTagName) {\n\t\tif (parent.namespaceURI === HTML_NAMESPACE) return tagName === \"svg\";\n\t\tif (parent.namespaceURI === MATHML_NAMESPACE) return tagName === \"svg\" && (parentTagName === \"annotation-xml\" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n\t\treturn Boolean(ALL_SVG_TAGS[tagName]);\n\t};\n\t/**\n\t* Namespace rules for an element in the MathML namespace.\n\t*\n\t* @param tagName the element's lowercase tag name\n\t* @param parent the (possibly simulated) parent node\n\t* @param parentTagName the parent's lowercase tag name\n\t* @returns true if a spec-compliant parser could produce this element\n\t*/\n\tconst _checkMathMlNamespace = function _checkMathMlNamespace(tagName, parent, parentTagName) {\n\t\tif (parent.namespaceURI === HTML_NAMESPACE) return tagName === \"math\";\n\t\tif (parent.namespaceURI === SVG_NAMESPACE) return tagName === \"math\" && HTML_INTEGRATION_POINTS[parentTagName];\n\t\treturn Boolean(ALL_MATHML_TAGS[tagName]);\n\t};\n\t/**\n\t* Namespace rules for an element in the HTML namespace.\n\t*\n\t* @param tagName the element's lowercase tag name\n\t* @param parent the (possibly simulated) parent node\n\t* @param parentTagName the parent's lowercase tag name\n\t* @returns true if a spec-compliant parser could produce this element\n\t*/\n\tconst _checkHtmlNamespace = function _checkHtmlNamespace(tagName, parent, parentTagName) {\n\t\tif (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) return false;\n\t\tif (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) return false;\n\t\treturn !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n\t};\n\t/**\n\t* @param element a DOM element whose namespace is being checked\n\t* @returns Return false if the element has a\n\t* namespace that a spec-compliant parser would never\n\t* return. Return true otherwise.\n\t*/\n\tconst _checkValidNamespace = function _checkValidNamespace(element) {\n\t\tlet parent = getParentNode(element);\n\t\tif (!parent || !parent.tagName) parent = {\n\t\t\tnamespaceURI: NAMESPACE,\n\t\t\ttagName: \"template\"\n\t\t};\n\t\tconst tagName = stringToLowerCase(element.tagName);\n\t\tconst parentTagName = stringToLowerCase(parent.tagName);\n\t\tif (!ALLOWED_NAMESPACES[element.namespaceURI]) return false;\n\t\tif (element.namespaceURI === SVG_NAMESPACE) return _checkSvgNamespace(tagName, parent, parentTagName);\n\t\tif (element.namespaceURI === MATHML_NAMESPACE) return _checkMathMlNamespace(tagName, parent, parentTagName);\n\t\tif (element.namespaceURI === HTML_NAMESPACE) return _checkHtmlNamespace(tagName, parent, parentTagName);\n\t\tif (PARSER_MEDIA_TYPE === \"application/xhtml+xml\" && ALLOWED_NAMESPACES[element.namespaceURI]) return true;\n\t\treturn false;\n\t};\n\t/**\n\t* _forceRemove\n\t*\n\t* @param node a DOM node\n\t*/\n\tconst _forceRemove = function _forceRemove(node) {\n\t\tarrayPush(DOMPurify.removed, { element: node });\n\t\ttry {\n\t\t\tgetParentNode(node).removeChild(node);\n\t\t} catch (_) {\n\t\t\tremove(node);\n\t\t\tif (!getParentNode(node)) throw typeErrorCreate(\"a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place\");\n\t\t}\n\t};\n\t/**\n\t* _stripAttributeNode\n\t*\n\t* Remove a single Attr node case/namespace-exactly on an attribute-teardown\n\t* path. Name-based removeAttribute() ASCII-lowercases its lookup key for an\n\t* HTML element in an HTML document and so silently misses a case-preserved\n\t* handler (e.g. `ONERROR` off an XML/XHTML import) - the same defect\n\t* _removeAttribute() was fixed for, which a name-based call would reintroduce\n\t* on these IN_PLACE teardown paths. Unlike _removeAttribute this does not\n\t* record into DOMPurify.removed: the neutralize passes intentionally do not\n\t* book-keep. A clobbered/detached node falls back to best-effort name-based\n\t* removal.\n\t*\n\t* @param element the element to strip the attribute from\n\t* @param attribute the Attr node to remove\n\t* @param name the attribute's name, for the fallback path\n\t*/\n\tconst _stripAttributeNode = function _stripAttributeNode(element, attribute, name) {\n\t\ttry {\n\t\t\tremoveAttributeNode(element, attribute);\n\t\t} catch (_) {\n\t\t\ttry {\n\t\t\t\telement.removeAttribute(name);\n\t\t\t} catch (_) {}\n\t\t}\n\t};\n\t/**\n\t* _neutralizeRoot\n\t*\n\t* Fail-closed teardown of an in-place root after the sanitize walk aborts\n\t* (campaign-3 F2). An internal throw mid-walk — e.g. a page-registered\n\t* custom element's reaction detaches a node so `_forceRemove`'s deliberate\n\t* parentless guard throws, or any other re-entrant engine mutation — would\n\t* otherwise leave the caller's *live* tree half-sanitized, with everything\n\t* after the abort point still carrying its handlers. There is no safe way\n\t* to resume the walk (the tree mutated under us), so we strip the root bare:\n\t* remove every child and every attribute, then let the caller's catch see\n\t* the original error. Clobber-safe (cached `remove`/`childNodes`/`attributes`\n\t* getters; the root was already clobber-pre-flighted at the IN_PLACE entry).\n\t*\n\t* @param root the in-place root to empty\n\t*/\n\tconst _neutralizeRoot = function _neutralizeRoot(root) {\n\t\t_neutralizeSubtree(root);\n\t\tconst childNodes = getChildNodes(root);\n\t\tif (childNodes) {\n\t\t\tconst snapshot = [];\n\t\t\tarrayForEach(childNodes, (child) => {\n\t\t\t\tarrayPush(snapshot, child);\n\t\t\t});\n\t\t\tarrayForEach(snapshot, (child) => {\n\t\t\t\ttry {\n\t\t\t\t\tremove(child);\n\t\t\t\t} catch (_) {}\n\t\t\t});\n\t\t}\n\t\tconst attributes = getAttributes(root);\n\t\tif (attributes) for (let i = attributes.length - 1; i >= 0; --i) {\n\t\t\tconst attribute = attributes[i];\n\t\t\tconst name = attribute && attribute.name;\n\t\t\tif (typeof name === \"string\") _stripAttributeNode(root, attribute, name);\n\t\t}\n\t};\n\t/**\n\t* _removeAttribute\n\t*\n\t* Name-based getAttributeNode()/removeAttribute() ASCII-lowercase their\n\t* lookup key for HTML elements in an HTML document, so they silently miss an\n\t* attribute whose stored qualified name still contains uppercase ASCII\n\t* letters. That happens when the node came from a case-preserving source\n\t* (an XML/XHTML document imported via importNode(), or createAttributeNS()),\n\t* where e.g. `ONERROR` survives the walk: the policy check lowercases to\n\t* `onerror` and rejects it, but `removeAttribute('ONERROR')` looks up\n\t* `onerror` and finds nothing. Remove the exact Attr node instead, which is\n\t* case- and namespace-exact, and fall back to name-based removal only when\n\t* the caller could not supply the node.\n\t*\n\t* @param name an Attribute name\n\t* @param element a DOM node\n\t* @param attr the exact Attr node to remove, when the caller has it\n\t*/\n\tconst _removeAttribute = function _removeAttribute(name, element, attr) {\n\t\tif (!attr) try {\n\t\t\tattr = element.getAttributeNode(name);\n\t\t} catch (_) {\n\t\t\tattr = null;\n\t\t}\n\t\tarrayPush(DOMPurify.removed, {\n\t\t\tattribute: attr || null,\n\t\t\tfrom: element\n\t\t});\n\t\ttry {\n\t\t\tif (attr) removeAttributeNode(element, attr);\n\t\t\telse element.removeAttribute(name);\n\t\t} catch (_) {\n\t\t\ttry {\n\t\t\t\telement.removeAttribute(name);\n\t\t\t} catch (_) {}\n\t\t}\n\t\tif (name === \"is\") {\n\t\t\tif (RETURN_DOM || RETURN_DOM_FRAGMENT) try {\n\t\t\t\t_forceRemove(element);\n\t\t\t} catch (_) {}\n\t\t\telse try {\n\t\t\t\telement.setAttribute(name, \"\");\n\t\t\t} catch (_) {}\n\t\t}\n\t};\n\t/**\n\t* _stripDisallowedAttributes\n\t*\n\t* Removes every attribute the active configuration does not allow from a\n\t* single element, using the same allowlist as the main attribute pass (so\n\t* `on*` handlers go, but no `/^on/` blocklist is introduced). Used only to\n\t* neutralise nodes that are being discarded from an in-place tree.\n\t*\n\t* @param element the element to strip\n\t*/\n\tconst _stripDisallowedAttributes = function _stripDisallowedAttributes(element) {\n\t\tconst attributes = getAttributes(element);\n\t\tif (!attributes) return;\n\t\tfor (let i = attributes.length - 1; i >= 0; --i) {\n\t\t\tconst attribute = attributes[i];\n\t\t\tconst name = attribute && attribute.name;\n\t\t\tif (typeof name !== \"string\" || ALLOWED_ATTR[transformCaseFunc(name)]) continue;\n\t\t\t_stripAttributeNode(element, attribute, name);\n\t\t}\n\t};\n\t/**\n\t* _neutralizeSubtree\n\t*\n\t* Completes the audit-5 F1 fix across every removal path. The KEEP_CONTENT\n\t* move-hoist neutralises only disallowed-tag removals; clobber, mXSS-canary,\n\t* namespace, comment, processing-instruction and KEEP_CONTENT:false removals\n\t* all drop their subtree wholesale via `_forceRemove`. On the IN_PLACE path\n\t* those dropped nodes are detached from the caller's LIVE tree but a\n\t* handler-bearing original among them (an `<img onerror>`/`<video>` that was\n\t* loading) keeps its queued resource event, which fires in page scope after\n\t* sanitize returns. This walks a removed subtree and strips every attribute\n\t* the active configuration does not allow — so `on*` handlers are cancelled\n\t* through the SAME allowlist that governs kept nodes, not a separate `/^on/`\n\t* blocklist. Run synchronously before sanitize returns, i.e. before any\n\t* queued event can fire. Hook-free by design: these nodes leave the output,\n\t* so firing attribute hooks for them would be surprising. Clobber-safe reads;\n\t* a doomed clobbered node may shadow `removeAttribute` (its own attributes are\n\t* irrelevant — it is discarded — while its non-clobbered descendants, e.g.\n\t* the `<img>`, are reached and scrubbed).\n\t*\n\t* @param root the root of a removed subtree to neutralise\n\t*/\n\tconst _neutralizeSubtree = function _neutralizeSubtree(root) {\n\t\tconst stack = [root];\n\t\twhile (stack.length > 0) {\n\t\t\tconst node = stack.pop();\n\t\t\tif (_readNodeType(node) === NODE_TYPE.element) _stripDisallowedAttributes(node);\n\t\t\tconst childNodes = getChildNodes(node);\n\t\t\tif (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);\n\t\t}\n\t};\n\t/**\n\t* _neutralizePatchLinkage\n\t*\n\t* IN_PLACE entry pre-pass (declarative-partial-updates / streaming\n\t* hardening, https://github.com/WICG/declarative-partial-updates).\n\t*\n\t* The main walk strips patch linkage (`for`/`patchsrc`) and removes range\n\t* markers (PIs / markup comments) node-by-node, in document order, AS it\n\t* reaches each node. On a live in-place root that leaves a window: from the\n\t* moment the root is connected until the walk arrives at a given node, that\n\t* node's linkage is live. A patch applied on connection/stream can fire as\n\t* a microtask during the walk and inject or teleport an unsanitized DOM\n\t* range into a region the iterator has already passed and will not revisit,\n\t* so the post-return \"tree is sanitized\" contract is violated. Sweep the\n\t* whole tree once up front and sever every linkage before the walk begins,\n\t* closing that window.\n\t*\n\t* This CANNOT undo a patch that already fired before sanitize ran — that is\n\t* the irreducible \"do not IN_PLACE a live-connected attacker tree\" caveat —\n\t* but it closes everything from sanitize-start onward. Gated on SAFE_FOR_XML\n\t* to group with the rest of the declarative-partial-updates handling and\n\t* stay overridable, consistent with the codebase.\n\t*\n\t* Clobber-safe traversal (cached childNodes getter); per-node try/catch so a\n\t* clobbered root cannot defeat the sweep of its non-clobbered descendants.\n\t*\n\t* NOTE (pending real-Chrome confirmation, see test/declarative-patch-probe\n\t* .html Q1): this mirrors the existing policy of keeping `for` on\n\t* <label>/<output>. If the shipping feature can drive a patch through a\n\t* surviving `for`-on-label/output + `id` pair, this pre-pass and the\n\t* attribute check at _isBasicCustomElement's caller must additionally drop\n\t* that pair on the IN_PLACE path. Left as-is until the taxonomy is verified.\n\t*\n\t* @param root the in-place root to sweep\n\t*/\n\t/**\n\t* Central policy for declarative-partial-updates patch-linkage attributes,\n\t* shared by the _neutralizePatchLinkage pre-pass and _isValidAttribute so\n\t* the two sites cannot drift: `patchsrc` always links, `for` links\n\t* everywhere except on <label>/<output>, and the whole policy is gated on\n\t* SAFE_FOR_XML (see the rationale block in _isValidAttribute).\n\t*\n\t* @param lcName the transformCaseFunc'd attribute name\n\t* @param lcTag the transformCaseFunc'd tag name of the carrying element\n\t* @return true if the attribute is patch linkage and must be dropped\n\t*/\n\tconst _isPatchLinkageAttribute = function _isPatchLinkageAttribute(lcName, lcTag) {\n\t\tif (!SAFE_FOR_XML) return false;\n\t\tif (lcName === \"patchsrc\") return true;\n\t\treturn lcName === \"for\" && lcTag !== \"label\" && lcTag !== \"output\";\n\t};\n\tconst _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {\n\t\tif (!SAFE_FOR_XML) return;\n\t\tconst stack = [root];\n\t\twhile (stack.length > 0) {\n\t\t\tconst node = stack.pop();\n\t\t\tconst nodeType = _readNodeType(node);\n\t\t\tif (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {\n\t\t\t\ttry {\n\t\t\t\t\tremove(node);\n\t\t\t\t} catch (_) {}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (nodeType === NODE_TYPE.element) {\n\t\t\t\tconst element = node;\n\t\t\t\tconst lcTag = transformCaseFunc(_readNodeName(node));\n\t\t\t\ttry {\n\t\t\t\t\tif (element.hasAttribute && element.hasAttribute(\"patchsrc\")) element.removeAttribute(\"patchsrc\");\n\t\t\t\t\tif (element.hasAttribute && element.hasAttribute(\"for\") && _isPatchLinkageAttribute(\"for\", lcTag)) element.removeAttribute(\"for\");\n\t\t\t\t} catch (_) {}\n\t\t\t}\n\t\t\tconst childNodes = getChildNodes(node);\n\t\t\tif (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);\n\t\t}\n\t};\n\t/**\n\t* _initDocument\n\t*\n\t* @param dirty - a string of dirty markup\n\t* @return a DOM, filled with the dirty markup\n\t*/\n\tconst _initDocument = function _initDocument(dirty) {\n\t\tlet doc = null;\n\t\tlet leadingWhitespace = null;\n\t\tif (FORCE_BODY) dirty = \"<remove></remove>\" + dirty;\n\t\telse {\n\t\t\tconst matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n\t\t\tleadingWhitespace = matches && matches[0];\n\t\t}\n\t\tif (PARSER_MEDIA_TYPE === \"application/xhtml+xml\" && NAMESPACE === HTML_NAMESPACE) dirty = \"<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>\" + dirty + \"</body></html>\";\n\t\tconst dirtyPayload = trustedTypesPolicy ? _createTrustedHTML(dirty) : dirty;\n\t\tif (NAMESPACE === HTML_NAMESPACE) try {\n\t\t\tdoc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n\t\t} catch (_) {}\n\t\tif (!doc || !doc.documentElement) {\n\t\t\tdoc = implementation.createDocument(NAMESPACE, \"template\", null);\n\t\t\ttry {\n\t\t\t\tdoc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n\t\t\t} catch (_) {}\n\t\t}\n\t\tconst body = doc.body || doc.documentElement;\n\t\tif (dirty && leadingWhitespace) body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n\t\tif (NAMESPACE === HTML_NAMESPACE) return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? \"html\" : \"body\")[0];\n\t\treturn WHOLE_DOCUMENT ? doc.documentElement : body;\n\t};\n\t/**\n\t* Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n\t*\n\t* @param root The root element or node to start traversing on.\n\t* @return The created NodeIterator\n\t*/\n\tconst _createNodeIterator = function _createNodeIterator(root) {\n\t\tconst doc = getOwnerDocument ? getOwnerDocument(root) : root.ownerDocument;\n\t\treturn createNodeIterator.call(doc || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n\t};\n\t/**\n\t* Replace template expression syntax (mustache, ERB, template\n\t* literal) with a space; shared by all SAFE_FOR_TEMPLATES scrub\n\t* sites. Order matters: mustache, then ERB, then template literal.\n\t*\n\t* @param value the string to scrub\n\t* @returns the scrubbed string\n\t*/\n\tconst _stripTemplateExpressions = function _stripTemplateExpressions(value) {\n\t\tvalue = stringReplace(value, MUSTACHE_EXPR$1, \" \");\n\t\tvalue = stringReplace(value, ERB_EXPR$1, \" \");\n\t\tvalue = stringReplace(value, TMPLIT_EXPR$1, \" \");\n\t\treturn value;\n\t};\n\t/**\n\t* Strip template-engine expressions ({{...}}, ${...}, <%...%>) from the\n\t* character data of an element subtree. Used as the final safety net for\n\t* SAFE_FOR_TEMPLATES on every DOM-returning code path so that expressions\n\t* which only form after text-node normalization (e.g. fragments split across\n\t* stripped elements) cannot survive into a template-evaluating framework.\n\t*\n\t* Walks text/comment/CDATA/processing-instruction nodes and mutates `.data`\n\t* in place rather than round-tripping through innerHTML. This preserves\n\t* descendant node references (important for IN_PLACE callers), avoids a\n\t* serialize/reparse cycle, and reads literal character data — which means\n\t* `<%...%>` in text content matches the ERB regex against its real bytes\n\t* instead of the HTML-entity-escaped form innerHTML would produce.\n\t*\n\t* Attribute values are not visited here; SAFE_FOR_TEMPLATES handling for\n\t* attributes is performed during the per-node `_sanitizeAttributes` pass.\n\t*\n\t* @param node The root element whose character data should be scrubbed.\n\t*/\n\tconst _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {\n\t\tvar _node$querySelectorAl;\n\t\tnode.normalize();\n\t\tconst doc = getOwnerDocument ? getOwnerDocument(node) : node.ownerDocument;\n\t\tconst walker = createNodeIterator.call(doc || node, node, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);\n\t\tlet currentNode = walker.nextNode();\n\t\twhile (currentNode) {\n\t\t\tcurrentNode.data = _stripTemplateExpressions(currentNode.data);\n\t\t\tcurrentNode = walker.nextNode();\n\t\t}\n\t\tconst templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, \"template\");\n\t\tif (templates) arrayForEach(templates, (tmpl) => {\n\t\t\tif (_isDocumentFragment(tmpl.content)) _scrubTemplateExpressions2(tmpl.content);\n\t\t});\n\t};\n\t/**\n\t* _isClobbered\n\t*\n\t* Detect DOM-clobbering on HTMLFormElement nodes. Form is the only HTML\n\t* interface with [LegacyOverrideBuiltIns]; a descendant element with a\n\t* `name` attribute matching a prototype property shadows that property\n\t* on direct reads. We use this check at the IN_PLACE entry-point and\n\t* during attribute sanitization to refuse clobbered forms.\n\t*\n\t* @param element element to check for clobbering attacks\n\t* @return true if clobbered, false if safe\n\t*/\n\tconst _isClobbered = function _isClobbered(element) {\n\t\tconst realTagName = getNodeName ? getNodeName(element) : null;\n\t\tif (typeof realTagName !== \"string\") return false;\n\t\tif (transformCaseFunc(realTagName) !== \"form\") return false;\n\t\treturn typeof element.nodeName !== \"string\" || typeof element.textContent !== \"string\" || typeof element.removeChild !== \"function\" || element.attributes !== getAttributes(element) || typeof element.removeAttribute !== \"function\" || typeof element.removeAttributeNode !== \"function\" || typeof element.getAttributeNode !== \"function\" || typeof element.setAttribute !== \"function\" || typeof element.namespaceURI !== \"string\" || typeof element.insertBefore !== \"function\" || typeof element.hasChildNodes !== \"function\" || element.nodeType !== getNodeType(element) || element.childNodes !== getChildNodes(element);\n\t};\n\t/**\n\t* Checks whether the given value is a DocumentFragment from any realm.\n\t*\n\t* The realm-independent replacement reads `nodeType` through the cached\n\t* Node.prototype getter and compares to the DOCUMENT_FRAGMENT_NODE\n\t* constant (11). nodeType is a numeric value resolved from the node's\n\t* internal slot, identical across realms for the same kind of node.\n\t*\n\t* @param value object to check\n\t* @return true if value is a DocumentFragment-shaped node from any realm\n\t*/\n\tconst _isDocumentFragment = function _isDocumentFragment(value) {\n\t\tif (!getNodeType || typeof value !== \"object\" || value === null) return false;\n\t\ttry {\n\t\t\treturn getNodeType(value) === NODE_TYPE.documentFragment;\n\t\t} catch (_) {\n\t\t\treturn false;\n\t\t}\n\t};\n\t/**\n\t* Checks whether the given object is a DOM node, including nodes that\n\t* originate from a different window/realm (e.g. an iframe's\n\t* contentDocument). The previous `value instanceof Node` check was\n\t* realm-bound: nodes from a different window failed it, causing\n\t* sanitize() to silently stringify them and reset IN_PLACE to false,\n\t* returning the original node unsanitized. See GHSA-4w3q-35jp-p934.\n\t*\n\t* @param value object to check whether it's a DOM node\n\t* @return true if value is a DOM node from any realm\n\t*/\n\tconst _isNode = function _isNode(value) {\n\t\tif (!getNodeType || typeof value !== \"object\" || value === null) return false;\n\t\ttry {\n\t\t\treturn typeof getNodeType(value) === \"number\";\n\t\t} catch (_) {\n\t\t\treturn false;\n\t\t}\n\t};\n\tfunction _executeHooks(hooks, currentNode, data) {\n\t\tif (hooks.length === 0) return;\n\t\tarrayForEach(hooks, (hook) => {\n\t\t\thook.call(DOMPurify, currentNode, data, CONFIG);\n\t\t});\n\t}\n\t/**\n\t* Structural-threat checks that condemn a node regardless of the\n\t* allowlists: mXSS via namespace confusion, risky CSS construction,\n\t* processing instructions, markup-bearing comments. Pure predicate;\n\t* the caller removes. Check order is load-bearing.\n\t*\n\t* @param currentNode the node to inspect\n\t* @param tagName the node's transformCaseFunc'd tag name\n\t* @return true if the node must be removed\n\t*/\n\tconst _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {\n\t\tif (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) return true;\n\t\tif (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && LITERAL_TEXT_ELEMENTS[tagName] && (_isNode(currentNode.firstElementChild) || typeof currentNode.textContent === \"string\" && regExpTest(LITERAL_TEXT_CLOSE[tagName], currentNode.textContent))) return true;\n\t\tif (currentNode.nodeType === NODE_TYPE.processingInstruction) return true;\n\t\tif (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) return true;\n\t\treturn false;\n\t};\n\t/**\n\t* Evaluate a CUSTOM_ELEMENT_HANDLING check (a RegExp or a predicate\n\t* function, per the validation in _parseConfig) against a name.\n\t* Additional arguments are forwarded to predicate functions - the\n\t* attributeNameCheck predicate receives the tag name as its second\n\t* argument. A null/absent check never matches.\n\t*\n\t* @param check the configured tagNameCheck / attributeNameCheck value\n\t* @param name the name to test\n\t* @param args extra arguments forwarded to a predicate function\n\t* @return true if the check matches the name\n\t*/\n\tconst _matchesNameCheck = function _matchesNameCheck(check, name) {\n\t\tif (check instanceof RegExp) return regExpTest(check, name);\n\t\tif (check instanceof Function) {\n\t\t\tfor (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];\n\t\t\treturn Boolean(check(name, ...args));\n\t\t}\n\t\treturn false;\n\t};\n\t/**\n\t* Handle a node whose tag is forbidden or not allowlisted: keep\n\t* allowed custom elements (false return exits _sanitizeElements\n\t* early - the namespace and fallback-tag removal checks are\n\t* intentionally skipped for kept custom elements), else hoist\n\t* content per KEEP_CONTENT and remove.\n\t*\n\t* A kept custom element is the ONLY case in which this function\n\t* returns false, so the caller uses that return value to run the\n\t* afterSanitizeElements hook on the kept element and keep the\n\t* element-hook lifecycle consistent with normal allowlisted\n\t* elements (GHSA-c2j3-45gr-mqc4).\n\t*\n\t* @param currentNode the disallowed node\n\t* @param tagName the node's transformCaseFunc'd tag name\n\t* @return true if the node was removed, false if kept\n\t*/\n\tconst _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName, root) {\n\t\tif (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;\n\t\tif (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n\t\t\tconst parentNode = getParentNode(currentNode);\n\t\t\tconst childNodes = getChildNodes(currentNode);\n\t\t\tif (childNodes && parentNode) {\n\t\t\t\tconst childCount = childNodes.length;\n\t\t\t\tfor (let i = childCount - 1; i >= 0; --i) {\n\t\t\t\t\tconst hoisted = currentNode === root ? cloneNode(childNodes[i], true) : childNodes[i];\n\t\t\t\t\tparentNode.insertBefore(hoisted, getNextSibling(currentNode));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t_forceRemove(currentNode);\n\t\treturn true;\n\t};\n\t/**\n\t* Fork a hook-mutable allowlist off its shared binding the first time a\n\t* (possibly lazily-installed) uponSanitize* hook is about to see it, so the\n\t* hook cannot widen the per-instance default or the setConfig binding by\n\t* reference and leak past the call. Returns the set unchanged once it is\n\t* already call-local, so repeated calls across elements are idempotent.\n\t*\n\t* @param hookList the uponSanitize* hook array for this event\n\t* @param set the current ALLOWED_TAGS / ALLOWED_ATTR binding\n\t* @param defaultSet the per-instance DEFAULT_ALLOWED_* constant\n\t* @param setConfigSet the captured setConfig() binding, or null\n\t* @return a call-local clone if a hook is present and set is still shared,\n\t* else set unchanged\n\t*/\n\tconst _forkSharedAllowlist = function _forkSharedAllowlist(hookList, set, defaultSet, setConfigSet) {\n\t\tif (hookList.length === 0) return set;\n\t\treturn set === defaultSet || set === setConfigSet ? clone(set) : set;\n\t};\n\t/**\n\t* Shared guard for a node that a hook has detached from the walk tree,\n\t* used after each element-hook site in _sanitizeElements. Detaching is a\n\t* long-standing user pattern (issue #469; draw.io-style foreignObject\n\t* filtering). Per the cached, unclobberable parentNode getter the node is\n\t* genuinely out of the tree, so it can reach neither the serialized\n\t* output nor an IN_PLACE live tree; treat it as removed and stop\n\t* processing it. Without this guard, the unsafe-node / namespace checks\n\t* would call _forceRemove on a parentless node and hit the REPORT-3\n\t* fail-closed throw — which exists for nodes DOMPurify wants gone but\n\t* *cannot* detach (clobbered / parentless roots), the opposite of a node\n\t* that is already safely gone. The walk root is exempt: a detached\n\t* IN_PLACE root is legitimate input and must still be fully sanitized,\n\t* and a kill-decision on it must keep hitting the REPORT-3 throw.\n\t*\n\t* Nodes detached by hooks stay the hook's responsibility for placement:\n\t* they are not recorded in DOMPurify.removed, so the post-walk IN_PLACE\n\t* pass (which iterates DOMPurify.removed) does not reach them. But a\n\t* hook-detached subtree can still hold a queued resource-event handler -\n\t* e.g. an <img onload> that began loading when the caller built the live\n\t* tree - which fires in page scope after sanitize returns even though the\n\t* handler never reached the returned tree. That is the audit-5 F1 hazard,\n\t* and the documented node.remove() hook pattern walks straight into it.\n\t* So on the IN_PLACE path we neutralize the detached subtree inline,\n\t* stripping its non-allow-listed attributes before returning, exactly as\n\t* the post-walk pass does for _forceRemove'd subtrees.\n\t*\n\t* @param currentNode the node a hook may have detached\n\t* @param root the current walk root\n\t* @return true if the node is detached and now handled, false otherwise\n\t*/\n\tconst _handleHookDetachedNode = function _handleHookDetachedNode(currentNode, root) {\n\t\tif (currentNode === root || getParentNode(currentNode) !== null) return false;\n\t\tif (IN_PLACE) _neutralizeSubtree(currentNode);\n\t\treturn true;\n\t};\n\t/**\n\t* _sanitizeElements\n\t*\n\t* @protect nodeName\n\t* @protect textContent\n\t* @protect removeChild\n\t* @param currentNode to check for permission to exist\n\t* @return true if node was killed, false if left alive\n\t*/\n\tconst _sanitizeElements = function _sanitizeElements(currentNode, root) {\n\t\t_executeHooks(hooks.beforeSanitizeElements, currentNode, null);\n\t\tif (_handleHookDetachedNode(currentNode, root)) return true;\n\t\tif (_isClobbered(currentNode)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tconst tagName = transformCaseFunc(_readNodeName(currentNode));\n\t\tALLOWED_TAGS = _forkSharedAllowlist(hooks.uponSanitizeElement, ALLOWED_TAGS, DEFAULT_ALLOWED_TAGS, SET_CONFIG_ALLOWED_TAGS);\n\t\t_executeHooks(hooks.uponSanitizeElement, currentNode, {\n\t\t\ttagName,\n\t\t\tallowedTags: ALLOWED_TAGS\n\t\t});\n\t\tif (_handleHookDetachedNode(currentNode, root)) return true;\n\t\tif (_isUnsafeNode(currentNode, tagName)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tif (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {\n\t\t\tconst removed = _sanitizeDisallowedNode(currentNode, tagName, root);\n\t\t\tif (removed === false) {\n\t\t\t\t_executeHooks(hooks.afterSanitizeElements, currentNode, null);\n\t\t\t\tif (_handleHookDetachedNode(currentNode, root)) return true;\n\t\t\t}\n\t\t\treturn removed;\n\t\t}\n\t\tif (_readNodeType(currentNode) === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tif ((tagName === \"noscript\" || tagName === \"noembed\" || tagName === \"noframes\") && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tif (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n\t\t\tconst content = _stripTemplateExpressions(currentNode.textContent);\n\t\t\tif (currentNode.textContent !== content) {\n\t\t\t\tarrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });\n\t\t\t\tcurrentNode.textContent = content;\n\t\t\t}\n\t\t}\n\t\t_executeHooks(hooks.afterSanitizeElements, currentNode, null);\n\t\treturn _handleHookDetachedNode(currentNode, root);\n\t};\n\t/**\n\t* _isValidAttribute\n\t*\n\t* @param lcTag Lowercase tag name of containing element.\n\t* @param lcName Lowercase attribute name.\n\t* @param value Attribute value.\n\t* @return Returns true if `value` is valid, otherwise false.\n\t*/\n\tconst _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n\t\tif (FORBID_ATTR[lcName]) return false;\n\t\tif (_isPatchLinkageAttribute(lcName, lcTag)) return false;\n\t\tif (SANITIZE_DOM && (lcName === \"id\" || lcName === \"name\") && (value in document || value in formElement)) return false;\n\t\tconst nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);\n\t\tif (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) return true;\n\t\tif (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) return true;\n\t\tif (!nameIsPermitted) return _isBasicCustomElement(lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName, lcTag) || lcName === \"is\" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value);\n\t\tif (URI_SAFE_ATTRIBUTES[lcName]) return true;\n\t\tif (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, \"\"))) return true;\n\t\tif ((lcName === \"src\" || lcName === \"xlink:href\" || lcName === \"href\") && lcTag !== \"script\" && stringIndexOf(value, \"data:\") === 0 && DATA_URI_TAGS[lcTag]) return true;\n\t\tif (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, \"\"))) return true;\n\t\treturn !value;\n\t};\n\tconst RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, [\n\t\t\"annotation-xml\",\n\t\t\"color-profile\",\n\t\t\"font-face\",\n\t\t\"font-face-format\",\n\t\t\"font-face-name\",\n\t\t\"font-face-src\",\n\t\t\"font-face-uri\",\n\t\t\"missing-glyph\"\n\t]);\n\t/**\n\t* _isBasicCustomElement\n\t* checks if at least one dash is included in tagName, and it's not the first char\n\t* for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n\t*\n\t* @param tagName name of the tag of the node to sanitize\n\t* @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n\t*/\n\tconst _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n\t\treturn !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);\n\t};\n\t/**\n\t* Wrap an attribute value in the matching Trusted Types object when\n\t* the active policy requires it. Namespaced attributes pass through\n\t* unchanged (no TT support yet, see\n\t* https://bugs.chromium.org/p/chromium/issues/detail?id=1305293).\n\t*\n\t* @param lcTag lowercase tag name of the containing element\n\t* @param lcName lowercase attribute name\n\t* @param namespaceURI the attribute's namespace, if any\n\t* @param value the attribute value to wrap\n\t* @return the value, wrapped when Trusted Types demand it\n\t*/\n\tconst _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value) {\n\t\tif (trustedTypesPolicy && typeof trustedTypes === \"object\" && typeof trustedTypes.getAttributeType === \"function\" && !namespaceURI) switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n\t\t\tcase \"TrustedHTML\": return _createTrustedHTML(value);\n\t\t\tcase \"TrustedScriptURL\": return _createTrustedScriptURL(value);\n\t\t}\n\t\treturn value;\n\t};\n\t/**\n\t* Write a modified attribute value back onto the element. On\n\t* success, re-probe for clobbering introduced by the new value and\n\t* remove the element when found; otherwise, when this writeback is the\n\t* recreate half of the SANITIZE_NAMED_PROPS remove-and-recreate, pop the\n\t* removal entry that path recorded so it does not show as removed. On\n\t* failure, remove the attribute instead.\n\t*\n\t* Returns true only on a clean write (the value was set and the new value\n\t* introduced no clobbering). The caller uses that, together with its own\n\t* knowledge of whether this attribute pushed a DOMPurify.removed record, to\n\t* decide whether to pop that record. The pop must happen ONLY for the\n\t* named-prop remove-and-recreate; popping on any other value change (trim,\n\t* template scrubbing, Trusted Types) would consume an unrelated _forceRemove\n\t* subtree-cleanup record and let that detached subtree keep a live event\n\t* handler through the IN_PLACE neutralization pass (SO-001).\n\t*\n\t* @param currentNode the element carrying the attribute\n\t* @param name the attribute name as present on the element\n\t* @param namespaceURI the attribute's namespace, if any\n\t* @param value the new attribute value\n\t* @return true if the value was written without introducing clobbering\n\t*/\n\tconst _setAttributeValue = function _setAttributeValue(currentNode, name, namespaceURI, value) {\n\t\ttry {\n\t\t\tif (namespaceURI) currentNode.setAttributeNS(namespaceURI, name, value);\n\t\t\telse currentNode.setAttribute(name, value);\n\t\t\tif (_isClobbered(currentNode)) {\n\t\t\t\t_forceRemove(currentNode);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (_) {\n\t\t\t_removeAttribute(name, currentNode);\n\t\t\treturn false;\n\t\t}\n\t};\n\t/**\n\t* _sanitizeAttributes\n\t*\n\t* @protect attributes\n\t* @protect nodeName\n\t* @protect removeAttribute\n\t* @protect setAttribute\n\t*\n\t* @param currentNode to sanitize\n\t* @param root the current walk root\n\t*/\n\tconst _sanitizeAttributes = function _sanitizeAttributes(currentNode, root) {\n\t\t_executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);\n\t\tif (_handleHookDetachedNode(currentNode, root)) return;\n\t\tconst attributes = currentNode.attributes;\n\t\tif (!attributes || _isClobbered(currentNode)) return;\n\t\tALLOWED_ATTR = _forkSharedAllowlist(hooks.uponSanitizeAttribute, ALLOWED_ATTR, DEFAULT_ALLOWED_ATTR, SET_CONFIG_ALLOWED_ATTR);\n\t\tconst hookEvent = {\n\t\t\tattrName: \"\",\n\t\t\tattrValue: \"\",\n\t\t\tkeepAttr: true,\n\t\t\tallowedAttributes: ALLOWED_ATTR,\n\t\t\tforceKeepAttr: void 0\n\t\t};\n\t\tlet l = attributes.length;\n\t\tconst lcTag = transformCaseFunc(currentNode.nodeName);\n\t\twhile (l--) {\n\t\t\tconst attr = attributes[l];\n\t\t\tconst name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;\n\t\t\tconst lcName = transformCaseFunc(name);\n\t\t\tconst initValue = attrValue;\n\t\t\tlet value = name === \"value\" ? initValue : stringTrim(initValue);\n\t\t\tlet recreatedNamedProp = false;\n\t\t\thookEvent.attrName = lcName;\n\t\t\thookEvent.attrValue = value;\n\t\t\thookEvent.keepAttr = true;\n\t\t\thookEvent.forceKeepAttr = void 0;\n\t\t\t_executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);\n\t\t\tvalue = hookEvent.attrValue;\n\t\t\tif (SANITIZE_NAMED_PROPS && (lcName === \"id\" || lcName === \"name\") && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tvalue = SANITIZE_NAMED_PROPS_PREFIX + value;\n\t\t\t\trecreatedNamedProp = true;\n\t\t\t}\n\t\t\tif (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (lcName === \"attributename\" && stringMatch(value, \"href\")) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (hookEvent.forceKeepAttr) continue;\n\t\t\tif (!hookEvent.keepAttr) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (SAFE_FOR_TEMPLATES) value = _stripTemplateExpressions(value);\n\t\t\tif (!_isValidAttribute(lcTag, lcName, value)) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvalue = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);\n\t\t\tif (value !== initValue) {\n\t\t\t\tif (_setAttributeValue(currentNode, name, namespaceURI, value) && recreatedNamedProp) arrayPop(DOMPurify.removed);\n\t\t\t}\n\t\t}\n\t\t_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);\n\t\t_handleHookDetachedNode(currentNode, root);\n\t};\n\t/**\n\t* _sanitizeShadowDOM\n\t*\n\t* @param fragment to iterate over recursively\n\t*/\n\tconst _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {\n\t\tlet shadowNode = null;\n\t\tconst shadowIterator = _createNodeIterator(fragment);\n\t\t_executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);\n\t\twhile (shadowNode = shadowIterator.nextNode()) {\n\t\t\t_executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);\n\t\t\t_sanitizeElements(shadowNode, fragment);\n\t\t\t_sanitizeAttributes(shadowNode, fragment);\n\t\t\tif (_isDocumentFragment(shadowNode.content)) _sanitizeShadowDOM2(shadowNode.content);\n\t\t\tif (_readNodeType(shadowNode) === NODE_TYPE.element) {\n\t\t\t\tconst innerSr = getShadowRoot(shadowNode);\n\t\t\t\tif (_isDocumentFragment(innerSr)) {\n\t\t\t\t\t_sanitizeAttachedShadowRoots(innerSr);\n\t\t\t\t\t_sanitizeShadowDOM2(innerSr);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t_executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);\n\t};\n\t/**\n\t* _sanitizeAttachedShadowRoots\n\t*\n\t* Walks `root` and feeds every attached shadow root we encounter into\n\t* the existing _sanitizeShadowDOM pipeline. The default node iterator\n\t* does not descend into shadow trees, so nodes inside an attached\n\t* shadow root would otherwise be skipped entirely.\n\t*\n\t* Two real input paths put attached shadow roots in front of us:\n\t* 1. IN_PLACE on a DOM node that already has shadow roots attached.\n\t* 2. DOM-node input where importNode(dirty, true) deep-clones the\n\t* shadow root because it was created with `clonable: true`.\n\t*\n\t* This pass runs once, up front, so the main iteration loop (and the\n\t* existing _sanitizeShadowDOM template-content recursion) stay\n\t* untouched — string-input paths are not affected.\n\t*\n\t* @param root the subtree root to walk for attached shadow roots\n\t*/\n\tconst _sanitizeAttachedShadowRoots = function _sanitizeAttachedShadowRoots(root) {\n\t\tconst stack = [{\n\t\t\tnode: root,\n\t\t\tshadow: null\n\t\t}];\n\t\twhile (stack.length > 0) {\n\t\t\tconst item = stack.pop();\n\t\t\tif (item.shadow) {\n\t\t\t\t_sanitizeShadowDOM2(item.shadow);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst node = item.node;\n\t\t\tconst isElement = _readNodeType(node) === NODE_TYPE.element;\n\t\t\tconst childNodes = getChildNodes(node);\n\t\t\tif (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push({\n\t\t\t\tnode: childNodes[i],\n\t\t\t\tshadow: null\n\t\t\t});\n\t\t\tif (isElement) {\n\t\t\t\tconst rootName = getNodeName ? getNodeName(node) : null;\n\t\t\t\tif (typeof rootName === \"string\" && transformCaseFunc(rootName) === \"template\") {\n\t\t\t\t\tconst content = node.content;\n\t\t\t\t\tif (_isDocumentFragment(content)) stack.push({\n\t\t\t\t\t\tnode: content,\n\t\t\t\t\t\tshadow: null\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isElement) {\n\t\t\t\tconst sr = getShadowRoot(node);\n\t\t\t\tif (_isDocumentFragment(sr)) stack.push({\n\t\t\t\t\tnode: null,\n\t\t\t\t\tshadow: sr\n\t\t\t\t}, {\n\t\t\t\t\tnode: sr,\n\t\t\t\t\tshadow: null\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\tDOMPurify.sanitize = function(dirty) {\n\t\tlet cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n\t\tlet body = null;\n\t\tlet importedNode = null;\n\t\tlet currentNode = null;\n\t\tlet returnNode = null;\n\t\tIS_EMPTY_INPUT = !dirty;\n\t\tif (IS_EMPTY_INPUT) dirty = \"<!-->\";\n\t\tif (typeof dirty !== \"string\" && !_isNode(dirty)) {\n\t\t\tdirty = stringifyValue(dirty);\n\t\t\tif (typeof dirty !== \"string\") throw typeErrorCreate(\"dirty is not a string, aborting\");\n\t\t}\n\t\tif (!DOMPurify.isSupported) return dirty;\n\t\tif (SET_CONFIG) {\n\t\t\tALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;\n\t\t\tALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;\n\t\t} else _parseConfig(cfg);\n\t\tif (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) ALLOWED_TAGS = clone(ALLOWED_TAGS);\n\t\tif (hooks.uponSanitizeAttribute.length > 0) ALLOWED_ATTR = clone(ALLOWED_ATTR);\n\t\tDOMPurify.removed = [];\n\t\tconst inPlace = IN_PLACE && typeof dirty !== \"string\" && _isNode(dirty);\n\t\tif (inPlace) {\n\t\t\t_neutralizePatchLinkage(dirty);\n\t\t\tconst nn = _readNodeName(dirty);\n\t\t\tif (typeof nn === \"string\") {\n\t\t\t\tconst tagName = transformCaseFunc(nn);\n\t\t\t\tif (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n\t\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\t\tthrow typeErrorCreate(\"root node is forbidden and cannot be sanitized in-place\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (_isClobbered(dirty)) {\n\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\tthrow typeErrorCreate(\"root node is clobbered and cannot be sanitized in-place\");\n\t\t\t}\n\t\t\ttry {\n\t\t\t\t_sanitizeAttachedShadowRoots(dirty);\n\t\t\t} catch (error) {\n\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t} else if (_isNode(dirty)) {\n\t\t\tbody = _initDocument(\"<!---->\");\n\t\t\timportedNode = body.ownerDocument.importNode(dirty, true);\n\t\t\tif (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === \"BODY\") body = importedNode;\n\t\t\telse if (importedNode.nodeName === \"HTML\") body = importedNode;\n\t\t\telse body.appendChild(importedNode);\n\t\t\t_sanitizeAttachedShadowRoots(body);\n\t\t} else {\n\t\t\tif (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && dirty.indexOf(\"<\") === -1) return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(dirty) : dirty;\n\t\t\tbody = _initDocument(dirty);\n\t\t\tif (!body) return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : \"\";\n\t\t}\n\t\tif (body && FORCE_BODY) _forceRemove(body.firstChild);\n\t\tconst walkRoot = inPlace ? dirty : body;\n\t\ttry {\n\t\t\tconst nodeIterator = _createNodeIterator(walkRoot);\n\t\t\twhile (currentNode = nodeIterator.nextNode()) {\n\t\t\t\t_sanitizeElements(currentNode, walkRoot);\n\t\t\t\t_sanitizeAttributes(currentNode, walkRoot);\n\t\t\t\tif (_isDocumentFragment(currentNode.content)) _sanitizeShadowDOM2(currentNode.content);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (inPlace) {\n\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\tarrayForEach(DOMPurify.removed, (entry) => {\n\t\t\t\t\tif (entry.element) _neutralizeSubtree(entry.element);\n\t\t\t\t});\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t\tif (inPlace) {\n\t\t\tlet rootWasRemoved = false;\n\t\t\tarrayForEach(DOMPurify.removed, (entry) => {\n\t\t\t\tif (entry.element) {\n\t\t\t\t\tif (entry.element === dirty) rootWasRemoved = true;\n\t\t\t\t\t_neutralizeSubtree(entry.element);\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (rootWasRemoved) throw typeErrorCreate(\"a node selected for removal could not be safely returned; refusing to sanitize in place\");\n\t\t\tif (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(dirty);\n\t\t\treturn dirty;\n\t\t}\n\t\tif (RETURN_DOM) {\n\t\t\tif (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(body);\n\t\t\tif (RETURN_DOM_FRAGMENT) {\n\t\t\t\treturnNode = createDocumentFragment.call(body.ownerDocument);\n\t\t\t\twhile (body.firstChild) returnNode.appendChild(body.firstChild);\n\t\t\t} else returnNode = body;\n\t\t\tif (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) returnNode = importNode.call(originalDocument, returnNode, true);\n\t\t\treturn returnNode;\n\t\t}\n\t\tlet serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\t\tif (WHOLE_DOCUMENT && ALLOWED_TAGS[\"!doctype\"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) serializedHTML = \"<!DOCTYPE \" + body.ownerDocument.doctype.name + \">\\n\" + serializedHTML;\n\t\tif (SAFE_FOR_TEMPLATES) serializedHTML = _stripTemplateExpressions(serializedHTML);\n\t\treturn trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(serializedHTML) : serializedHTML;\n\t};\n\tDOMPurify.setConfig = function() {\n\t\tlet cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n\t\t_parseConfig(cfg);\n\t\tSET_CONFIG = true;\n\t\tSET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;\n\t\tSET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;\n\t};\n\tDOMPurify.clearConfig = function() {\n\t\tCONFIG = null;\n\t\tSET_CONFIG = false;\n\t\tSET_CONFIG_ALLOWED_TAGS = null;\n\t\tSET_CONFIG_ALLOWED_ATTR = null;\n\t\ttrustedTypesPolicy = defaultTrustedTypesPolicy;\n\t\temptyHTML = \"\";\n\t};\n\tDOMPurify.isValidAttribute = function(tag, attr, value) {\n\t\tif (!CONFIG) _parseConfig({});\n\t\tconst lcTag = transformCaseFunc(tag);\n\t\tconst lcName = transformCaseFunc(attr);\n\t\treturn _isValidAttribute(lcTag, lcName, value);\n\t};\n\tDOMPurify.addHook = function(entryPoint, hookFunction) {\n\t\tif (typeof hookFunction !== \"function\") return;\n\t\tif (!objectHasOwnProperty(hooks, entryPoint)) return;\n\t\tarrayPush(hooks[entryPoint], hookFunction);\n\t};\n\tDOMPurify.removeHook = function(entryPoint, hookFunction) {\n\t\tif (!objectHasOwnProperty(hooks, entryPoint)) return;\n\t\tif (hookFunction !== void 0) {\n\t\t\tconst index = arrayLastIndexOf(hooks[entryPoint], hookFunction);\n\t\t\treturn index === -1 ? void 0 : arraySplice(hooks[entryPoint], index, 1)[0];\n\t\t}\n\t\treturn arrayPop(hooks[entryPoint]);\n\t};\n\tDOMPurify.removeHooks = function(entryPoint) {\n\t\tif (!objectHasOwnProperty(hooks, entryPoint)) return;\n\t\thooks[entryPoint] = [];\n\t};\n\tDOMPurify.removeAllHooks = function() {\n\t\thooks = _createHooksMap();\n\t};\n\treturn DOMPurify;\n}\nvar purify_default = createDOMPurify();\nexport { purify_default as default };\n\n//# sourceMappingURL=purify.es.mjs.map","import DOMPurify from \"dompurify\"\n\nimport { SourceError } from \"spell/ui/runtime/runtime.types\"\n\n/****************\n * ### `MarkdownSanitizer`\n * DOMPurify, in `<ui-markdown>`'s `sanitized` chunk: imported by `MarkdownRenderer.loadSanitizer()` on the first\n * render of a `sanitized` element, so a page that shows only its own markdown never loads it.\n * - Sanitizes in EVERY browser. Why not the platform's `Element.setHTML()`: by default it drops task-list\n * checkboxes, images, heading ids and code-language classes, and it differs by browser (none in Safari).\n * - `SANITIZE_DOM` off: it drops ids that shadow DOM properties (`id=\"elements\"`, `id=\"forms\"`),\n * to stop DOM clobbering -- which can't happen here: the markup lives in a shadow root,\n * out of `document`'s named access.\n * - Fails CLOSED: where DOMPurify can't sanitize (`isSupported` false), it throws a `SourceError` (\"render\") rather\n * than hand back markup it didn't clean.\n * - NEVER a value import but DOMPurify and `SourceError`: the docs bundler builds this file ALONE into a classic\n * script (`MarkdownRenderer.sanitizerLoader`).\n * - Imports `SourceError` straight from `spell/ui/runtime/runtime.types` (built into `core.js`), and USES it,\n * as `MarkdownEngine` / `CodeEngine` do: without it this chunk needed Rolldown's helpers (`keepNames`) without\n * depending on core, and Rolldown split them into a `rolldown-runtime-<hash>.js` EVERY page loaded (epic\n * `wwod-spell-ui`, I12; `yarn measure`'s `runtimeChunks`).\n ****************/\nexport class MarkdownSanitizer {\n /** The one sanitizer: static, as it keeps no state and every element shares it. */\n static readonly instance = new MarkdownSanitizer()\n\n /**\n * `html`, sanitized, as a fragment of this document; throws where DOMPurify can't sanitize.\n * - `uiTags`: keep `ui-*` elements (an engine that draws with them: `<spell-markdown>`'s),\n * with any attribute but an `on*` handler.\n * Default: `false`.\n */\n sanitize(html: string, { uiTags = false }: { uiTags?: boolean } = {}): DocumentFragment {\n if (!DOMPurify.isSupported) {\n throw new SourceError(\n \"MarkdownSanitizer.sanitize(): DOMPurify can't sanitize in this browser; use a newer one\",\n { cause: { kind: \"render\" } }\n )\n }\n return DOMPurify.sanitize(html, {\n RETURN_DOM_FRAGMENT: true,\n SANITIZE_DOM: false,\n ...(uiTags && {\n CUSTOM_ELEMENT_HANDLING: {\n tagNameCheck: UI_TAG,\n attributeNameCheck: (name: string) => !HANDLER.test(name),\n allowCustomizedBuiltInElements: false\n }\n })\n })\n }\n}\n\n/** Custom elements `uiTags` keeps. */\nconst UI_TAG = /^ui-[a-z-]+$/\n\n/** Event-handler attributes, never kept. */\nconst HANDLER = /^on/i\n"],"x_google_ignoreList":[0],"mappings":";;;AACA,SAAS,eAAe,GAAG,GAAG;CAC7B,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N,KAAiB,gBAAgB,GCt4ExBC,IAAb,MAAa,kBAAkB;CAE7B,OAAgB,WAAW,IAAI,kBAAkB;CAQjD,SAAS,GAAc,EAAE,YAAS,OAAgC,CAAC,GAAqB;EACtF,IAAI,CAAC3T,GAAU,aACb,MAAM,IAAI4T,EACR,6FACA,EAAE,OAAO,EAAE,MAAM,SAAS,EAAE,CAC9B;EAEF,OAAO5T,GAAU,SAASwE,GAAM;GAC9B,qBAAqB;GACrB,cAAc;GACd,GAAIqP,KAAU,EACZ,yBAAyB;IACvB,cAAcC;IACd,qBAAqB,MAAiB,CAACC,GAAQ,KAAKhO,CAAI;IACxD,gCAAgC;GAClC,EACF;EACF,CAAC;CACH;AACF,GAGM+N,IAAS,gBAGTC,KAAU"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"PrefStore-Qv0e5y04.js","names":["__exportAll","index","key","value","store","change","prefix","JSON_TEXT","text","TYPE_DEFAULTS","JS_TYPES","info","choices","jsType","storage","description","error","start","found","oldKey","act","method","PrefStore_exports","PrefStore","name","place","colon","fullKey","fallback","newKey","after","kept","settled","SHARED_PLACES","sharedPlaces","shared"],"sources":["../../src/util/persist/MemoryStorage.ts","../../src/util/persist/PrefPlace.ts","../../src/util/persist/values.ts","../../src/util/persist/StoragePlace.ts","../../src/util/persist/PrefStore.ts"],"sourcesContent":["import type { StorageLike } from \"./persist.types\"\n\n/****************\n * ### `MemoryStorage`\n * A web `Storage` kept in memory, for this page only: what a `memory` place keeps its values in.\n * - Also where a `StoragePlace` keeps them when the browser blocks its storage, for the visit.\n * - Keys in the order they were first set, as the browser's storages list them.\n ****************/\nexport class MemoryStorage implements StorageLike {\n /** The values, by key. */\n private values = new Map<string, string>()\n\n /** How many keys it holds. */\n get length(): number {\n return this.values.size\n }\n\n /** The key at `index`, or `null` past the end. */\n key(index: number): string | null {\n return [...this.values.keys()][index] ?? null\n }\n\n /** The value under `key`, or `null` for none. */\n getItem(key: string): string | null {\n return this.values.get(key) ?? null\n }\n\n /** Keep `value` under `key`. */\n setItem(key: string, value: string): void {\n this.values.set(key, String(value))\n }\n\n /** Forget `key`. */\n removeItem(key: string): void {\n this.values.delete(key)\n }\n}\n","/****************\n * ### `PrefPlace`\n * Where a `PrefStore` keeps its values: the browser's storage, memory, the browser's database, a server.\n * - Every method takes the store's name and the key apart: the place decides how to join them.\n * - A QUICK place (`isAsync` false) answers at once; its waited-on methods wrap the quick ones.\n * - `StoragePlace`\n * - A WAITED-ON place (`isAsync` true) refuses a quick read, and does a quick write later, without waiting.\n * - `WaitedOnPlace`, and its `DatabasePlace` and `ServerPlace`\n * - NEVER throws on a storage failure (blocked, full, offline, a bad value): it logs, and a read answers `undefined`.\n * - Generic: knows nothing of what's kept, or by whom.\n ****************/\nexport abstract class PrefPlace {\n /** Must its reads be waited on (`load()`)? Then a quick `read()` throws. */\n abstract readonly isAsync: boolean\n /** What it is, in words, for messages: e.g. `the browser's storage`. */\n abstract readonly description: string\n\n ////////////////\n // ## Quick\n ////////////////\n\n /** `store`'s value under `key`, or `undefined` for none. */\n abstract read(store: string, key: string): unknown\n /** Keep `value` under `key` for `store`. */\n abstract write(store: string, key: string, value: unknown): void\n /** Forget `store`'s value under `key`. */\n abstract remove(store: string, key: string): void\n /** Every key `store` keeps, without its name. */\n abstract keys(store: string): string[]\n\n ////////////////\n // ## Waited on\n ////////////////\n\n /** `read()`, waited on. */\n async load(store: string, key: string): Promise<unknown> {\n return this.read(store, key)\n }\n\n /** `write()`, waited on; `undefined` forgets the key. */\n async save(store: string, key: string, value: unknown): Promise<void> {\n if (value === undefined) this.remove(store, key)\n else this.write(store, key, value)\n }\n\n /** `keys()`, waited on. */\n async loadKeys(store: string): Promise<string[]> {\n return this.keys(store)\n }\n\n /**\n * Read `store`'s value under `key`, `change` it, and save what it answers (`undefined` forgets it).\n * - Returns the new value.\n * - Here: a load, then a save. A place that can do both in one step (a database's transaction) does.\n */\n async update(store: string, key: string, change: (kept: unknown) => unknown): Promise<unknown> {\n const value = change(await this.load(store, key))\n await this.save(store, key, value)\n return value\n }\n\n /**\n * Forget every key `store` keeps that starts with `prefix`: every key, for `\"\"`.\n * - Here, for a quick place: done before it returns; the promise is already settled.\n */\n async removeUnder(store: string, prefix: string): Promise<void> {\n for (const key of this.keys(store)) if (key.startsWith(prefix)) this.remove(store, key)\n }\n}\n","/**\n * How a kept value is written as text, read back, defaulted and checked:\n * `PrefStore`'s, and spell properties' defaults.\n * - Text people and plain scripts can read:\n * a string as itself (`dark`), anything else as JSON (`1`, `true`, `{\"open\":true}`).\n */\nimport type { ValueInfo } from \"./persist.types\"\n\n////////////////\n// ## Text\n////////////////\n\n/**\n * Text that reads back as JSON:\n * it starts with a quote, a brace or a bracket, or it's a number, `true`, `false` or `null`, whole.\n * - A JSON number exactly: `007` and `1.` are text.\n */\nconst JSON_TEXT = /^(?:[\"{[]|-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$|true$|false$|null$)/\n\n/**\n * `value` as kept text: a string as itself, unless it would read back as something else; anything else as JSON.\n * - e.g. `\"dark\"` => `dark`; `\"1\"` => `\"1\"` (quoted); `1` => `1`; `{ open: true }` => `{\"open\":true}`\n * - throws `TypeError` for a value JSON can't keep: a function, a symbol, `undefined`, a cycle\n */\nexport function textForValue(value: unknown): string {\n if (typeof value === \"string\" && !JSON_TEXT.test(value)) return value\n const text = JSON.stringify(value) as string | undefined\n if (text === undefined) throw new TypeError(`textForValue(): can't keep a ${typeof value} as text; pass plain data`)\n return text\n}\n\n/**\n * The value kept as `text`: JSON when it looks like it (see `textForValue()`), else the text itself.\n * - throws `SyntaxError` for text that starts like JSON but isn't (`{oops`), as `JSON.parse()` does\n */\nexport function valueForText(text: string): unknown {\n return JSON_TEXT.test(text) ? JSON.parse(text) : text\n}\n\n////////////////\n// ## Defaults and checks\n////////////////\n\n/** Each type's default, for a declaration that names no default and no choices. */\nconst TYPE_DEFAULTS = new Map<string, unknown>([\n [\"number\", 0],\n [\"text\", \"\"],\n [\"choice\", false]\n])\n\n/** The JavaScript `typeof` for each type Spell's runtime names. */\nconst JS_TYPES = new Map<string, string>([\n [\"number\", \"number\"],\n [\"text\", \"string\"],\n [\"choice\", \"boolean\"]\n])\n\n/**\n * The default `info` declares: its `default`, else its first choice, else its type's, else `undefined`.\n * - The types': `number` 0, `text` \"\", `choice` false.\n * - e.g. `{ oneOf: [\"light\", \"dark\", \"auto\"] }` => `\"light\"`; `{ type: \"number\" }` => `0`\n */\nexport function defaultFor(info: ValueInfo | undefined): unknown {\n if (!info) return undefined\n if (info.default !== undefined) return info.default\n const choices = choicesOf(info)\n if (choices?.length) return choices[0]\n return info.type === undefined ? undefined : TYPE_DEFAULTS.get(info.type)\n}\n\n/**\n * Is `value` one `info` allows: one of its choices, and of its type?\n * - No declaration, or a type we don't know (a class's name): anything is.\n */\nexport function isAllowed(info: ValueInfo | undefined, value: unknown): boolean {\n if (!info) return true\n const choices = choicesOf(info)\n if (choices && !choices.includes(value)) return false\n const jsType = info.type === undefined ? undefined : JS_TYPES.get(info.type)\n return jsType === undefined || typeof value === jsType\n}\n\n/** `info`'s choices, read now (`oneOf` may be a function), or `undefined` for none. */\nexport function choicesOf(info: ValueInfo): readonly unknown[] | undefined {\n return typeof info.oneOf === \"function\" ? info.oneOf() : info.oneOf\n}\n","import type { StorageLike } from \"./persist.types\"\nimport { MemoryStorage } from \"./MemoryStorage\"\nimport { PrefPlace } from \"./PrefPlace\"\nimport { textForValue, valueForText } from \"./values\"\n\n/****************\n * ### `StoragePlace`\n * A quick `PrefPlace` over a web `Storage`: `localStorage`, `sessionStorage`, a `MemoryStorage`, or one handed in.\n * - Its keys are `<store>:<key>`, e.g. `spell-site:scheme`.\n * - Its values are text (`textForValue()`): `dark`, `1`, `{\"open\":true}`, so plain scripts read them too.\n * - Storage the browser blocks (reading `localStorage` throws: a private window, an iframe with cookies off):\n * it keeps values in memory for the visit, and says so once.\n * - No storage at all (node, a server drawing a page): memory too, silently.\n ****************/\nexport class StoragePlace extends PrefPlace {\n readonly isAsync = false\n readonly description: string\n\n constructor({ storage, description }: StoragePlaceProps) {\n super()\n this.findStorage = typeof storage === \"function\" ? storage : () => storage\n this.description = description\n }\n\n ////////////////\n // ## Quick\n ////////////////\n\n read(store: string, key: string): unknown {\n const text = this.attempt(\"read\", store, key, (storage) => storage.getItem(fullKey(store, key)))\n if (text === null || text === undefined) return undefined\n try {\n return valueForText(text)\n } catch (error) {\n console.error(\n `StoragePlace.read(): \\`${fullKey(store, key)}\\` holds no value it can read; answering none:`,\n text\n )\n console.error(error)\n return undefined\n }\n }\n\n /**\n * Keep `value` under `key` for `store`.\n * - throws `TypeError` for a value it can't keep as text (a function ...): see `textForValue()`\n */\n write(store: string, key: string, value: unknown): void {\n const text = textForValue(value)\n this.attempt(\"write\", store, key, (storage) => storage.setItem(fullKey(store, key), text))\n }\n\n remove(store: string, key: string): void {\n this.attempt(\"remove\", store, key, (storage) => storage.removeItem(fullKey(store, key)))\n }\n\n keys(store: string): string[] {\n const start = `${store}:`\n const keys = this.attempt(\"keys\", store, \"\", (storage) => {\n const found: string[] = []\n for (let index = 0; index < storage.length; index++) {\n const key = storage.key(index)\n if (key?.startsWith(start)) found.push(key.slice(start.length))\n }\n return found\n })\n return keys ?? []\n }\n\n /**\n * Move the text kept under `oldKey`, a key no store names (written before `PrefStore`), to `key` of `store`.\n * - The text as it is, byte for byte; a value `key` already has wins, and `oldKey` is forgotten either way.\n * - Nothing under `oldKey`: nothing happens.\n * - NEVER throws: a failure is logged.\n */\n moveText(oldKey: string, store: string, key: string): void {\n this.attempt(\"moveText\", store, key, (storage) => {\n const text = storage.getItem(oldKey)\n if (text === null) return\n if (storage.getItem(fullKey(store, key)) === null) storage.setItem(fullKey(store, key), text)\n storage.removeItem(oldKey)\n })\n }\n\n ////////////////\n // ## The storage\n ////////////////\n\n /** The storage, found on first use: the one it was given, or memory when that's blocked or missing. */\n private get storage(): StorageLike {\n return (this._storage ??= this.storageOrMemory())\n }\n private _storage: StorageLike | undefined\n\n /** Finds the storage: `StoragePlaceProps.storage`. */\n private findStorage: () => StorageLike | undefined\n\n /** The storage `findStorage()` finds, or a `MemoryStorage` when it throws (blocked) or finds none. */\n private storageOrMemory(): StorageLike {\n try {\n const storage = this.findStorage()\n if (storage) return storage\n } catch (error) {\n console.error(`StoragePlace: ${this.description} is blocked; keeping its values in memory for this visit:`)\n console.error(error)\n }\n return new MemoryStorage()\n }\n\n /**\n * Run `act` on the storage.\n * - A failure (full, blocked mid-visit) is logged, and answers `undefined`.\n */\n private attempt<T>(method: string, store: string, key: string, act: (storage: StorageLike) => T): T | undefined {\n try {\n return act(this.storage)\n } catch (error) {\n console.error(`StoragePlace.${method}(): ${this.description} refused \\`${fullKey(store, key)}\\`:`)\n console.error(error)\n return undefined\n }\n }\n}\n\n/** Props for a `StoragePlace`. */\nexport type StoragePlaceProps = {\n /**\n * The storage, or a function that finds it, called on first use.\n * - It may throw (the browser blocks it) or answer `undefined` (there's none): then values are kept in memory.\n */\n storage: StorageLike | (() => StorageLike | undefined)\n /** What it is, in words: `PrefPlace.description`. */\n description: string\n}\n\n/** `key` of `store`, as the storage keeps it, e.g. `spell-site:scheme`. */\nfunction fullKey(store: string, key: string): string {\n return `${store}:${key}`\n}\n","import type { PrefPlaceName, ValueInfo } from \"./persist.types\"\nimport { MemoryStorage } from \"./MemoryStorage\"\nimport { PrefPlace } from \"./PrefPlace\"\nimport { StoragePlace } from \"./StoragePlace\"\nimport { choicesOf, defaultFor, isAllowed } from \"./values\"\n\n/****************\n * ### `PrefStore`\n * The preferences one app keeps for each person: a theme, a panel's width, the last folder opened.\n * - ONE per app, named for it: every key it writes starts with its name and a colon.\n * - e.g. `new PrefStore(\"spell-site\")` keeps `scheme` at `spell-site:scheme`\n * - So two apps on one site never share a value, and `forgetAll()` forgets only its own.\n * - It always asks the same way; WHERE it keeps them is its place's business (`PrefStoreOptions.place`):\n * - the browser's storage, unless it says otherwise\n * - per tab, or memory, by name (`session`, `memory`)\n * - the browser's database or the page server, waited on (`DatabasePlace.shared`, `ServerPlace.shared`)\n * - In the browser's storage, values are text people and plain scripts can read:\n * `dark`, `1`, `{\"open\":true}` (`textForValue()`).\n * The browser's database keeps them as they are, a server as JSON.\n * - A pref may be declared, with its type, choices and default (`declare()`):\n * `get()` then answers its default while nothing's kept, and refuses to keep what it doesn't allow.\n * - Two ways to ask: quick (`get()`, `set()` ...) and waited on (`load()`, `save()`, `update()`).\n * A place that must be waited on refuses a quick read, and does a quick write later.\n * - NEVER throws when storage fails (blocked, full, a value it can't read): it logs, and answers the default.\n * - It throws `TypeError` for a caller's mistake:\n * a store name with a colon, no key, a value its declaration doesn't allow, a quick read of a waited-on place.\n * - Generic, in the kit's util: nothing spell-specific, and nothing imported from outside this folder,\n * so Spell UI uses it too.\n ****************/\nexport class PrefStore {\n /** Its name: the start of every key it writes, before the colon. */\n readonly name: string\n /** Where it keeps its values. */\n readonly place: PrefPlace\n\n /**\n * A store named `name`, keeping its values in `place`.\n * - throws `TypeError` for an empty name, or one with a colon\n */\n constructor(name: string, { place = \"local\" }: PrefStoreOptions = {}) {\n if (!name || name.includes(\":\")) {\n throw new TypeError(\n `new PrefStore(): \\`${name}\\` can't name a store; give it a name with no colon, e.g. \"spell-site\"`\n )\n }\n this.name = name\n this.place = placeFor(place)\n }\n\n /**\n * `fullKey`, as a plain script names it, split into its store's name and its key, at the first colon.\n * - e.g. `\"spell-site:scheme\"` => `[\"spell-site\", \"scheme\"]`\n * and `\"spell-ui-site:folds:/x.html\"` => `[\"spell-ui-site\", \"folds:/x.html\"]`\n * - For code that knows a key whole: a key two files share, a plain script's, an old one being moved over.\n * - throws `TypeError` for a key with no colon\n */\n static splitKey(fullKey: string): [store: string, key: string] {\n const colon = fullKey.indexOf(\":\")\n if (colon < 1) throw new TypeError(`PrefStore.splitKey(): \\`${fullKey}\\` has no store; name it \"<store>:<key>\"`)\n return [fullKey.slice(0, colon), fullKey.slice(colon + 1)]\n }\n\n /**\n * The value kept at `fullKey` (`spell-site:scheme`), a key named whole: `get()` of its store, in `place`.\n * - For code that names its keys whole, as a plain script does (`splitKey()`).\n * - `place`: a quick place's name, or a place itself (a `StoragePlace` over a test's storage)\n * - throws `TypeError` for a key with no colon\n */\n static getAt(fullKey: string, place: PrefPlaceName | PrefPlace = \"local\"): unknown {\n const [store, key] = PrefStore.splitKey(fullKey)\n return new PrefStore(store, { place }).get(key)\n }\n\n /**\n * Move what's kept under `oldKey` to `fullKey` (`spell-epics:sort`), once.\n * - `oldKey`: a key no store names, written before `PrefStore` (`spell-epics-sort`)\n * - Its text moved byte for byte, so it reads as it did; a value `fullKey` already has wins.\n * - Nothing under `oldKey`: nothing happens, so it's safe to call on every start.\n * - throws `TypeError` for a `fullKey` with no colon\n */\n static moveOldKey(oldKey: string, fullKey: string, place: \"local\" | \"session\" = \"local\"): void {\n const [store, key] = PrefStore.splitKey(fullKey)\n ;(placeFor(place) as StoragePlace).moveText(oldKey, store, key)\n }\n\n /** Keep `value` at `fullKey`, a key named whole; `undefined` forgets it: `set()` of its store, in `place`. */\n static setAt(fullKey: string, value: unknown, place: PrefPlaceName | PrefPlace = \"local\"): void {\n const [store, key] = PrefStore.splitKey(fullKey)\n new PrefStore(store, { place }).set(key, value)\n }\n\n ////////////////\n // ## Declaring\n ////////////////\n\n /**\n * Declare pref `key`: its type, its choices, its default. Returns this store.\n * - e.g. `prefs.declare(\"scheme\", { oneOf: [\"light\", \"dark\", \"auto\"] })`: `get(\"scheme\")` is `\"light\"` until set\n * - Its default: `defaultFor()` -- its `default`, else its first choice, else its type's (`0`, `\"\"`, `false`).\n */\n declare(key: string, info: ValueInfo): this {\n this.checkKey(\"declare\", key)\n this.declared.set(key, info)\n return this\n }\n\n /** What `key` reads as while nothing's kept: its declared default, or `undefined`. */\n defaultFor(key: string): unknown {\n return defaultFor(this.declared.get(key))\n }\n\n ////////////////\n // ## Quick\n ////////////////\n\n /**\n * Does it keep a value under `key`?\n * - throws `TypeError` when its place must be waited on\n */\n has(key: string): boolean {\n this.checkQuickRead(\"has\", key)\n return this.place.read(this.name, key) !== undefined\n }\n\n /**\n * The value kept under `key`, else `fallback`, else its declared default.\n * - A kept value its declaration doesn't allow reads as the default, logged.\n * - throws `TypeError` when its place must be waited on: use `load()`\n */\n get<T = unknown>(key: string): T | undefined\n get<T>(key: string, fallback: T): T\n get(key: string, fallback?: unknown): unknown {\n this.checkQuickRead(\"get\", key)\n return this.keptOrDefault(\"get\", key, this.place.read(this.name, key), fallback)\n }\n\n /**\n * Keep `value` under `key`; `undefined` forgets it. Returns `value`.\n * - A place that must be waited on keeps it later: a failure is logged.\n * - throws `TypeError` for a value its declaration doesn't allow, or one it can't keep (a function ...)\n */\n set<T>(key: string, value: T): T {\n this.checkWrite(\"set\", key, value)\n if (value === undefined) this.place.remove(this.name, key)\n else this.place.write(this.name, key, value)\n return value\n }\n\n /** Forget the value under `key`. */\n forget(key: string): void {\n this.set(key, undefined)\n }\n\n /**\n * Every key it keeps that starts with `prefix`: keys with a shared start act like a folder (`layout/`).\n * - throws `TypeError` when its place must be waited on: use `loadKeysUnder()`\n */\n keysUnder(prefix = \"\"): string[] {\n this.checkQuickRead(\"keysUnder\")\n return this.place.keys(this.name).filter((key) => key.startsWith(prefix))\n }\n\n /**\n * Forget every key that starts with `prefix`.\n * - A quick place has forgotten them when it returns; the promise says when a waited-on one has.\n */\n forgetUnder(prefix: string): Promise<void> {\n return this.place.removeUnder(this.name, prefix)\n }\n\n /** Forget every key it keeps, and no other store's: as `forgetUnder(\"\")`. */\n forgetAll(): Promise<void> {\n return this.forgetUnder(\"\")\n }\n\n /**\n * Move the value kept under `oldKey` to `newKey`, when a pref is renamed. Returns this store.\n * - Only when `newKey` keeps none yet; `oldKey` is forgotten either way.\n * - Nothing kept under `oldKey`: nothing happens, so it's safe to call on every start.\n * - throws `TypeError` when its place must be waited on\n */\n rename(oldKey: string, newKey: string): this {\n this.checkQuickRead(\"rename\", oldKey)\n this.checkKey(\"rename\", newKey)\n const value = this.place.read(this.name, oldKey)\n if (value === undefined) return this\n if (this.place.read(this.name, newKey) === undefined) this.place.write(this.name, newKey, value)\n this.place.remove(this.name, oldKey)\n return this\n }\n\n ////////////////\n // ## Waited on\n ////////////////\n\n /** `get()`, waited on: for every place. */\n async load<T = unknown>(key: string, fallback?: T): Promise<T | undefined> {\n this.checkKey(\"load\", key)\n return this.keptOrDefault(\"load\", key, await this.place.load(this.name, key), fallback) as T | undefined\n }\n\n /** `set()`, waited on: for every place. Returns `value`. */\n async save<T>(key: string, value: T): Promise<T> {\n this.checkWrite(\"save\", key, value)\n await this.place.save(this.name, key, value)\n return value\n }\n\n /**\n * Read, change and save `key`'s value as one step: `change` gets the value (`load()`'s), and answers the new one.\n * - One at a time for each key in this page; the browser's database also keeps other tabs out, in one transaction.\n * - Returns the new value.\n * - throws `TypeError` for a new value its declaration doesn't allow: nothing is saved\n */\n update<T>(key: string, change: (value: T) => T): Promise<T> {\n this.checkKey(\"update\", key)\n const before = this.updating.get(key) ?? Promise.resolve()\n const after = before.then(\n async () =>\n (await this.place.update(this.name, key, (kept) => {\n const value = change(this.keptOrDefault(\"update\", key, kept, undefined) as T)\n this.checkWrite(\"update\", key, value)\n return value\n })) as T\n )\n const settled = after.then(\n () => undefined,\n () => undefined\n )\n this.updating.set(key, settled)\n void settled.then(() => {\n if (this.updating.get(key) === settled) this.updating.delete(key)\n })\n return after\n }\n\n /** `keysUnder()`, waited on: for every place. */\n async loadKeysUnder(prefix = \"\"): Promise<string[]> {\n return (await this.place.loadKeys(this.name)).filter((key) => key.startsWith(prefix))\n }\n\n ////////////////\n // ## Checks\n ////////////////\n\n /** `kept` when there is one its declaration allows, else `fallback`, else `key`'s default. */\n private keptOrDefault(method: string, key: string, kept: unknown, fallback: unknown): unknown {\n const info = this.declared.get(key)\n if (kept !== undefined) {\n if (isAllowed(info, kept)) return kept\n console.error(\n `PrefStore.${method}(): \\`${this.name}:${key}\\` isn't ${allowedText(info)}; answering its default:`,\n kept\n )\n }\n return fallback !== undefined ? fallback : defaultFor(info)\n }\n\n /** Throws `TypeError` for no `key`. */\n private checkKey(method: string, key: string): void {\n if (!key) throw new TypeError(`PrefStore.${method}(): no key; pass the pref's name, e.g. \"scheme\"`)\n }\n\n /** Throws `TypeError` for no `key`, or a place that must be waited on. */\n private checkQuickRead(method: string, key?: string): void {\n if (key !== undefined) this.checkKey(method, key)\n if (!this.place.isAsync) return\n throw new TypeError(\n `PrefStore.${method}(): \\`${this.name}\\` keeps its values in ${this.place.description}, which must be waited on; ` +\n \"use `load()` or `loadKeysUnder()`\"\n )\n }\n\n /** Throws `TypeError` for no `key`, or a `value` its declaration doesn't allow. */\n private checkWrite(method: string, key: string, value: unknown): void {\n this.checkKey(method, key)\n const info = this.declared.get(key)\n if (value === undefined || isAllowed(info, value)) return\n throw new TypeError(`PrefStore.${method}(): \\`${key}\\` is ${allowedText(info)}; not \\`${shown(value)}\\``)\n }\n\n /** Each declared pref's declaration, by key. */\n private declared = new Map<string, ValueInfo>()\n\n /** The update under way for each key: see `update()`. */\n private updating = new Map<string, Promise<void>>()\n}\n\n/** Options for a `PrefStore`. */\nexport type PrefStoreOptions = {\n /**\n * Where it keeps its values:\n * a place's name (`PrefPlaceNames`), or a place itself (a `StoragePlace` over a test's storage ...).\n * - Default `local`: the browser's lasting storage.\n */\n place?: PrefPlaceName | PrefPlace\n}\n\n////////////////\n// ## Places by name\n////////////////\n\n/** What each place the page shares is, by name: made on first use, see `placeFor()`. */\nconst SHARED_PLACES = {\n local: { storage: () => globalThis.localStorage, description: \"the browser's storage\" },\n session: { storage: () => globalThis.sessionStorage, description: \"the browser's per-tab storage\" }\n} as const\n\n/** The place each name has made, so every store on the page shares one. */\nconst sharedPlaces = new Map<PrefPlaceName, PrefPlace>()\n\n/**\n * The place `place` names, or `place` itself.\n * - `local` and `session`: ONE for the page, shared by every store.\n * - `memory`: a new one each time, so a store's values are its own (a server's request, a test).\n */\nfunction placeFor(place: PrefPlaceName | PrefPlace): PrefPlace {\n if (place instanceof PrefPlace) return place\n if (place === \"memory\") return new StoragePlace({ storage: new MemoryStorage(), description: \"memory\" })\n let shared = sharedPlaces.get(place)\n if (!shared) sharedPlaces.set(place, (shared = new StoragePlace(SHARED_PLACES[place])))\n return shared\n}\n\n/** What `info` allows, in words: `one of light, dark, auto`, `a number`, `anything`. */\nfunction allowedText(info: ValueInfo | undefined): string {\n const choices = info && choicesOf(info)\n if (choices) return `one of ${choices.map(shown).join(\", \")}`\n return info?.type ? `a ${info.type}` : \"anything\"\n}\n\n/** `value` for a message: plain data as JSON (`{\"left\":30}`), anything else as its string. */\nfunction shown(value: unknown): string {\n if (typeof value === \"string\") return value\n return (typeof value === \"object\" && JSON.stringify(value)) || String(value as string)\n}\n"],"mappings":";;AAQA,IAAa,gBAAb,MAAkD;CAEhD,yBAAiB,IAAI,IAAoB;CAGzC,IAAI,SAAiB;EACnB,OAAO,KAAK,OAAO;CACrB;CAGA,IAAI,GAA8B;EAChC,OAAO,CAAC,GAAG,KAAK,OAAO,KAAK,CAAC,CAAC,CAACC,MAAU;CAC3C;CAGA,QAAQ,GAA4B;EAClC,OAAO,KAAK,OAAO,IAAIC,CAAG,KAAK;CACjC;CAGA,QAAQ,GAAa,GAAqB;EACxC,KAAK,OAAO,IAAIA,GAAK,OAAOC,CAAK,CAAC;CACpC;CAGA,WAAW,GAAmB;EAC5B,KAAK,OAAO,OAAOD,CAAG;CACxB;AACF,GCzBsB,YAAtB,MAAgC;CAwB9B,MAAM,KAAK,GAAe,GAA+B;EACvD,OAAO,KAAK,KAAKE,GAAOF,CAAG;CAC7B;CAGA,MAAM,KAAK,GAAe,GAAa,GAA+B;EACpE,AAAIC,MAAU,KAAA,IAAW,KAAK,OAAOC,GAAOF,CAAG,IAC1C,KAAK,MAAME,GAAOF,GAAKC,CAAK;CACnC;CAGA,MAAM,SAAS,GAAkC;EAC/C,OAAO,KAAK,KAAKC,CAAK;CACxB;CAOA,MAAM,OAAO,GAAe,GAAa,GAAsD;EAC7F,IAAMD,IAAQE,EAAO,M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1
- import "./rolldown-runtime-CYGlBXrH.js";
2
- import { Bt as e, Ht as t, IconGlyph as n, Lt as r, Rt as i, Ut as a, Vt as o, scrollByRow as s, scrollEnds as c, state as l, zt as u } from "./core.js";
3
- import { className as d, delegateEvents as f, effect as p, insert as m, setAttribute as h, template as g } from "@solidjs/web";
4
- //#region src/components/ui-menu/ScrollingRow.tsx
5
- var _ = /* @__PURE__ */ g("<button type=button tabindex=-1>"), v, y = [l], b, x, S;
6
- v = [l];
7
- var C = class _ScrollingRow {
8
- constructor({ owner: n, canScroll: r = /* @__PURE__ */ e(() => !0, "canScroll") }) {
9
- o(this, x, a(b, 8, this, !1)), a(b, 11, this), o(this, S, a(b, 12, this, !1)), a(b, 15, this), t(this, "owner"), t(this, "canScroll"), t(this, "row"), this.owner = n, this.canScroll = r;
10
- }
11
- get isOverflowing() {
12
- return this.canScrollStart || this.canScrollEnd;
13
- }
14
- follow(t) {
15
- this.row = t;
16
- let n = new AbortController();
17
- t.addEventListener("scroll", () => this.measure(), {
18
- passive: !0,
19
- signal: n.signal
20
- });
21
- let r = new ResizeObserver(() => this.measure());
22
- r.observe(t);
23
- let i = t.querySelector("slot"), a = /* @__PURE__ */ e(() => {
24
- for (let e of this.items()) r.observe(e);
25
- }, "watchItems");
26
- a(), i?.addEventListener("slotchange", a, { signal: n.signal });
27
- let o = i ? void 0 : new MutationObserver(a);
28
- return o?.observe(t, { childList: !0 }), this.measure(), () => {
29
- n.abort(), r.disconnect(), o?.disconnect(), this.row === t && (this.row = void 0, this.canScrollStart = this.canScrollEnd = !1);
30
- };
31
- }
32
- measure() {
33
- let e = this.row;
34
- if (!e) return;
35
- let t = this.canScroll(), { start: n, end: r } = c(e);
36
- this.canScrollStart = t && n, this.canScrollEnd = t && r;
37
- }
38
- scrollByPage(e) {
39
- this.row && s(this.row, e);
40
- }
41
- bringIntoView(e, { smoothly: t = !1 } = {}) {
42
- let n = this.row;
43
- if (!n || !e.isConnected) return;
44
- let r = n.getBoundingClientRect(), i = e.getBoundingClientRect(), a = parseFloat(getComputedStyle(n).scrollPaddingInlineStart) || 0, o = r.left + a, s = r.right - a, c = 0;
45
- if (i.left < o) c = i.left - o;
46
- else if (i.right > s) {
47
- let e = this.items().map((e) => e.getBoundingClientRect().left).find((e) => e > o && i.right - (e - o) <= s);
48
- c = Math.min(e ?? i.left, i.left) - o;
49
- }
50
- if (!c) return;
51
- let l = !!n.ownerDocument.defaultView?.matchMedia(k).matches;
52
- n.scrollBy({
53
- left: c,
54
- behavior: t && !l ? "smooth" : "instant"
55
- });
56
- }
57
- items() {
58
- let e = this.row, t = e?.querySelector("slot");
59
- return t ? t.assignedElements() : [...e?.children ?? []];
60
- }
61
- key(t) {
62
- let r = t === T, i = /* @__PURE__ */ e(() => this.owner.translationForKey(r ? "scrollStart" : "scrollEnd"), "label"), a = new n({
63
- owner: this.owner,
64
- name: /* @__PURE__ */ e(() => r ? D : O, "name")
65
- }), o = this;
66
- var s = _();
67
- return s._$$click = () => o.scrollByPage(r ? -1 : 1), m(s, () => a.svg), p(() => ({
68
- e: `${E} ${t}`,
69
- t: o.owner.partForName(r ? "scroll-start" : "scroll-end"),
70
- a: i(),
71
- o: i(),
72
- i: !o.isOverflowing,
73
- n: (r ? o.canScrollStart : o.canScrollEnd) ? "" : void 0
74
- }), ({ e, t, a: n, o: r, i, n: a }, o) => {
75
- d(s, e, o?.e), t !== o?.t && h(s, "part", t), n !== o?.a && h(s, "aria-label", n), r !== o?.o && h(s, "title", r), i !== o?.i && h(s, "hidden", i), a !== o?.n && h(s, "data-can", a);
76
- }), s;
77
- }
78
- };
79
- b = u(null), x = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), r(b, 4, "canScrollStart", y, C, x), r(b, 4, "canScrollEnd", v, C, S), i(b, C), e(C, "ScrollingRow");
80
- var w = C, T = "start", E = "scroll", D = "chevron left", O = "chevron right", k = "(prefers-reduced-motion: reduce)";
81
- f(["click"]);
82
- //#endregion
83
- //#region src/components/ui-menu/ScrollingRow.css?inline
84
- var A = "@layer ui.components.scrolling-row.types{.scrolling-row{--_ui-toolbar-button-size:var(--ui-toolbar-button-size,1.75em);--_ui-toolbar-button-background:var(--ui-toolbar-button-background,transparent);--_ui-toolbar-button-hover-background:var(--ui-toolbar-button-hover-background,oklch(from var(--ui-ink) l c h / .08));--_ui-toolbar-button-color:var(--ui-toolbar-button-color,var(--ui-text-muted));--_ui-toolbar-button-radius:var(--ui-toolbar-button-radius,50%);min-width:0;position:relative}.scrolling-row>.ui.menu{overscroll-behavior-x:contain;scrollbar-width:none;flex-wrap:nowrap;min-width:0;max-width:100%;overflow-x:auto}.scrolling-row>.ui.menu::-webkit-scrollbar{display:none}.scrolling-row>.ui.secondary.pointing.menu:not(.vertical){--_ui-menu-item-margin:0;box-shadow:inset 0 -2px 0 var(--ui-border-color);border-bottom-width:0}.scrolling-row>.ui.tabular.menu:not(.vertical,.bottom){--_ui-menu-active-margin:0;box-shadow:inset 0 -1px 0 var(--ui-border-color-strong);border-bottom-width:0}.scrolling-row>.ui.menu{anchor-name:--ui-scrolling-row;scroll-snap-type:x mandatory;scroll-padding-inline:var(--_ui-toolbar-button-size);--_toolbar-fade-start:0px;--_toolbar-fade-end:0px;--_toolbar-fade-in:0px;--_toolbar-fade-out:0px;mask-image:linear-gradient(to right, transparent var(--_toolbar-fade-start), #000 calc(var(--_toolbar-fade-start) + var(--_toolbar-fade-in)), #000 calc(100% - var(--_toolbar-fade-end) - var(--_toolbar-fade-out)), transparent calc(100% - var(--_toolbar-fade-end)))}.scrolling-row>.ui.menu ::slotted(*),.scrolling-row>.ui.menu>.item{scroll-snap-align:start}.scrolling-row:has(>.scroll.start[data-can])>.ui.menu{--_toolbar-fade-start:var(--_ui-toolbar-button-size);--_toolbar-fade-in:1em}.scrolling-row:has(>.scroll.end[data-can])>.ui.menu{--_toolbar-fade-end:var(--_ui-toolbar-button-size);--_toolbar-fade-out:1em}.scrolling-row>.scroll{position-anchor:--ui-scrolling-row;top:anchor(center);z-index:1;width:var(--_ui-toolbar-button-size);height:var(--_ui-toolbar-button-size);border-radius:var(--_ui-toolbar-button-radius);font:inherit;color:var(--_ui-toolbar-button-color);background:var(--_ui-toolbar-button-background);cursor:var(--ui-control-cursor);border:0;flex:none;place-items:center;margin:0;padding:0;display:inline-grid;position:absolute;translate:0 -50%}.scrolling-row>.scroll.start{left:anchor(left)}.scrolling-row>.scroll.end{right:anchor(right)}.scrolling-row>.scroll>svg{fill:currentColor;pointer-events:none;width:.875em;height:.875em}}@layer ui.components.scrolling-row.states{.scrolling-row>.scroll[hidden]{display:none}.scrolling-row>.scroll:not([data-can]){visibility:hidden}.scrolling-row>.scroll:hover{color:var(--ui-text-color);background:var(--_ui-toolbar-button-hover-background)}.scrolling-row>.scroll:focus-visible{outline:var(--ui-focus-width) solid var(--ui-focus-color);outline-offset:1px}}";
85
- //#endregion
86
- export { T as n, w as r, A as t };
87
-
88
- //# sourceMappingURL=ScrollingRow-7n7Z-HIE.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScrollingRow-7n7Z-HIE.js","names":["this","part={this.owner.partForName(isStart ? \"scroll-start\" : \"scroll-end\")}","aria-label={label()}","title={label()}","hidden={!this.isOverflowing}","data-can={(isStart ? this.canScrollStart : this.canScrollEnd) ? \"\" : void 0}","<button\n type=\"button\"\n class={`${SCROLL} ${end}`}\n part={this.owner.partForName(isStart ? \"scroll-start\" : \"scroll-end\")}\n tabindex=\"-1\"\n aria-label={label()}\n title={label()}\n hidden={!this.isOverflowing}\n data-can={(isStart ? this.canScrollStart : this.canScrollEnd) ? \"\" : void 0}\n onClick={() => this.scrollByPage(isStart ? -1 : 1)}\n >\n {glyph.svg}\n </button>","E.state","E.scrollEnds","E.IconGlyph","_$setAttribute","__name","_$delegateEvents","__name$1","__publicField","__decorateElement","__decoratorMetadata","__runInitializers","__privateAdd","__decoratorStart","_tmpl$","_canScrollEnd_dec","_canScrollStart_dec","state","_init","_canScrollStart","_canScrollEnd","_ScrollingRow","owner","canScroll","row","stop","resizes","slot","watchItems","item","children","scrollEnds","start","end","scrollByRow","direction","view","box","inset","by","fits","each","left","isReduced","REDUCED_MOTION","smoothly","isStart","START","label","glyph","IconGlyph","CHEVRON_START","CHEVRON_END","_self$","_el$","insert","effect","SCROLL","className","_p$","setAttribute","a","o","n","ScrollingRow","delegateEvents","ScrollingRow_default"],"sources":["../src/components/ui-menu/ScrollingRow.tsx","../src/components/ui-menu/ScrollingRow.css?inline"],"sourcesContent":["import type { JSX } from \"@solidjs/web\"\n\nimport { E } from \"spell/ui/core\"\n\n/****************\n * ### `ScrollingRow`\n * A row of items that scrolls sideways when they don't fit, with a `‹` / `›` key at each end\n * while there's more to scroll that way.\n * - `<ui-toolbar>` and `<ui-tabs>` both use it: ONE way a row of ours scrolls.\n * - The toolbar's row is its menu's `<nav>`; the tab set's, its tab list.\n * - Its look is [the scrolling row's sheet](ScrollingRow.css), which each of them adopts:\n * the row's box carries the class `scrolling-row`, the row and its two keys are its children.\n * - What it does:\n * - follows the row's scroll, and the sizes of the row and its items (`ResizeObserver`), once `follow()`ed\n * - `canScrollStart` / `canScrollEnd`: which key shows; `isOverflowing`: either does\n * - `scrollByPage()`: a key's press, by most of the row's width (the kit's `scrollByRow()`)\n * - `bringIntoView()`: scrolls the row, and only the row, so one item shows whole\n * - `key()`: draws a key\n * - Its owner is the component drawing the row: the keys take its part names, words and icon packs.\n * - MUST be created under that component's owner: each key draws an icon.\n * - NOTE: left-to-right only, for now: in a right-to-left page `scrollLeft` counts the other way.\n ****************/\nexport class ScrollingRow {\n /** There's more to scroll back to (the `‹` key shows). */\n @E.state accessor canScrollStart = false\n\n /** There's more to scroll on to (the `›` key shows). */\n @E.state accessor canScrollEnd = false\n\n /** The items don't all fit: the row scrolls. */\n get isOverflowing(): boolean {\n return this.canScrollStart || this.canScrollEnd\n }\n\n /** The component drawing the row. */\n private readonly owner: ScrollingRowOwner\n\n /** Whether the keys may show: a shrinkable toolbar fits its titles instead; untracked when it's asked. */\n private readonly canScroll: () => boolean\n\n /** The row's box, while followed. */\n private row: HTMLElement | undefined\n\n constructor({ owner, canScroll = () => true }: ScrollingRowProps) {\n this.owner = owner\n this.canScroll = canScroll\n }\n\n /**\n * SIDE EFFECT: follow `row`'s scroll, and the sizes of it and its items.\n * - Its items: what its `<slot>` holds (a toolbar's), else its own children (a tab set's buttons).\n * - Returns the cleanup, for an effect's.\n */\n follow(row: HTMLElement): () => void {\n this.row = row\n const stop = new AbortController()\n row.addEventListener(\"scroll\", () => this.measure(), { passive: true, signal: stop.signal })\n const resizes = new ResizeObserver(() => this.measure())\n resizes.observe(row)\n const slot = row.querySelector(\"slot\")\n const watchItems = () => {\n for (const item of this.items()) resizes.observe(item)\n }\n watchItems()\n slot?.addEventListener(\"slotchange\", watchItems, { signal: stop.signal })\n // a tab set's buttons come and go with its panes\n // oxlint-disable-next-line spell-ui/no-mutation-observer -- a watch on ANOTHER element (the row a component hands it), only while followed\n const children = slot ? undefined : new MutationObserver(watchItems)\n children?.observe(row, { childList: true })\n this.measure()\n return () => {\n stop.abort()\n resizes.disconnect()\n children?.disconnect()\n if (this.row !== row) return\n // no longer a row (a tab set turned vertical): no keys\n this.row = undefined\n this.canScrollStart = this.canScrollEnd = false\n }\n }\n\n /** Read where the row is scrolled to, and how far it can go. */\n measure() {\n const row = this.row\n if (!row) return\n const canScroll = this.canScroll()\n const { start, end } = E.scrollEnds(row)\n this.canScrollStart = canScroll && start\n this.canScrollEnd = canScroll && end\n }\n\n /** Scroll by most of the row's width: `-1` back, `1` on; smoothly, unless the person asked for less motion. */\n scrollByPage(direction: -1 | 1) {\n if (this.row) E.scrollByRow(this.row, direction)\n }\n\n /**\n * Scroll the row so `item` shows whole, clear of the keys: the least that does it.\n * - It stops where a press of a key would (an item's start at the row's start, the row's scroll snap):\n * between two such places, the browser snapped back, and a tab near the end was left out of sight.\n * - Only the row moves, never the page: a tab picked at the bottom of a long page stays where it is.\n * - `smoothly`: as a key's press does (at once with reduced motion); else at once, for a first drawing.\n */\n bringIntoView(item: Element, { smoothly = false }: { smoothly?: boolean } = {}) {\n const row = this.row\n if (!row || !item.isConnected) return\n const view = row.getBoundingClientRect()\n const box = item.getBoundingClientRect()\n // the keys sit over the row's ends: the item shows clear of them\n const inset = parseFloat(getComputedStyle(row).scrollPaddingInlineStart) || 0\n const start = view.left + inset\n const end = view.right - inset\n let by = 0\n if (box.left < start) by = box.left - start\n else if (box.right > end) {\n // the first item whose start, at the row's start, brings `item`'s end in; else `item`'s own start\n const starts = this.items().map((each) => each.getBoundingClientRect().left)\n const fits = starts.find((left) => left > start && box.right - (left - start) <= end)\n by = Math.min(fits ?? box.left, box.left) - start\n }\n if (!by) return\n const isReduced = !!row.ownerDocument.defaultView?.matchMedia(REDUCED_MOTION).matches\n row.scrollBy({ left: by, behavior: smoothly && !isReduced ? \"smooth\" : \"instant\" })\n }\n\n /** The row's items: what its `<slot>` holds (a toolbar's), else its own children (a tab set's buttons). */\n private items(): Element[] {\n const row = this.row\n const slot = row?.querySelector(\"slot\")\n return slot ? slot.assignedElements() : [...(row?.children ?? [])]\n }\n\n /** The `‹` (`start`) or `›` (`end`) key: in the layout only while the items overflow, shown while it can go. */\n key(end: ScrollEnd): JSX.Element {\n const isStart = end === START\n const label = () => this.owner.translationForKey(isStart ? \"scrollStart\" : \"scrollEnd\")\n const glyph = new E.IconGlyph({ owner: this.owner, name: () => (isStart ? CHEVRON_START : CHEVRON_END) })\n return (\n <button\n type=\"button\"\n class={`${SCROLL} ${end}`}\n part={this.owner.partForName(isStart ? \"scroll-start\" : \"scroll-end\")}\n tabindex=\"-1\"\n aria-label={label()}\n title={label()}\n hidden={!this.isOverflowing}\n data-can={(isStart ? this.canScrollStart : this.canScrollEnd) ? \"\" : undefined}\n onClick={() => this.scrollByPage(isStart ? -1 : 1)}\n >\n {glyph.svg}\n </button>\n )\n }\n}\n\n/** What a `ScrollingRow` needs of the component drawing it. */\nexport type ScrollingRowOwner = E.IconGlyphOwner & {\n /** a part's name in its vocabulary: `scroll-start`, `scroll-end` */\n partForName(name: string): string\n /** a text of its vocabulary: `scrollStart`, `scrollEnd` (each key's name and tooltip) */\n translationForKey(key: string): string\n}\n\n/** `ScrollingRow`'s settings. */\nexport type ScrollingRowProps = {\n /** the component drawing the row */\n owner: ScrollingRowOwner\n /** whether the keys may show (default: always, while the items don't fit) */\n canScroll?: () => boolean\n}\n\n/** An end of the row: where a key sits. */\nexport type ScrollEnd = typeof START | typeof END\n\n/** The `‹` key's end. */\nexport const START = \"start\"\n\n/** The `›` key's end. */\nexport const END = \"end\"\n\n/** Class word of the two keys. */\nconst SCROLL = \"scroll\"\n\n/** The `‹` key's icon. */\nconst CHEVRON_START = \"chevron left\"\n\n/** The `›` key's icon. */\nconst CHEVRON_END = \"chevron right\"\n\n/** The person asked for less motion. */\nconst REDUCED_MOTION = \"(prefers-reduced-motion: reduce)\"\n","/*\n * A row of a menu's items that scrolls sideways, with a `‹` / `›` key at each end (`ScrollingRow`):\n * `<ui-toolbar>`'s row and `<ui-tabs>`' tab list. Adopted after `UIMenu.css`, which draws the menu and its items.\n * - The markup: a box of class `scrolling-row` holding the menu (`.ui.menu`, the row that scrolls) and the two keys\n * (`<button class=\"scroll start | end\">`), as siblings.\n * - The row's own box scrolls, its scrollbar hidden; its items stay on one line.\n * - The keys sit over the row's ends (anchored to the row), taking no room in it:\n * the items never move as one comes and goes.\n * - Tokens (public, never declared here: read through private aliases; the toolbar's names, as it had them first):\n *\n * | Token | What | Default |\n * | --- | --- | --- |\n * | `--ui-toolbar-button-size` | each key's width and height | `1.75em` |\n * | `--ui-toolbar-button-background` | a key at rest | `transparent` |\n * | `--ui-toolbar-button-hover-background` | a key under the pointer | a faint ink |\n * | `--ui-toolbar-button-color` | its chevron | `--ui-text-muted` |\n * | `--ui-toolbar-button-radius` | its corners | a circle; on a segmented track, the track's corner less its inset |\n */\n\n@layer ui.components.scrolling-row.types, ui.components.scrolling-row.states;\n\n@layer ui.components.scrolling-row.types {\n .scrolling-row {\n --_ui-toolbar-button-size: var(--ui-toolbar-button-size, 1.75em);\n --_ui-toolbar-button-background: var(--ui-toolbar-button-background, transparent);\n --_ui-toolbar-button-hover-background: var(\n --ui-toolbar-button-hover-background,\n oklch(from var(--ui-ink) l c h / 0.08)\n );\n --_ui-toolbar-button-color: var(--ui-toolbar-button-color, var(--ui-text-muted));\n --_ui-toolbar-button-radius: var(--ui-toolbar-button-radius, 50%);\n position: relative;\n min-width: 0;\n }\n\n /* the row's own box scrolls: its items on one line */\n .scrolling-row > .ui.menu {\n flex-wrap: nowrap;\n min-width: 0;\n max-width: 100%;\n overflow-x: auto;\n overscroll-behavior-x: contain;\n scrollbar-width: none;\n }\n .scrolling-row > .ui.menu::-webkit-scrollbar {\n display: none;\n }\n\n /*\n * A rule under the row is drawn INSIDE its box (an inset shadow), never as its border:\n * the box clips what it scrolls, so an item reaching over its border was cut off --\n * a secondary pointing row's underline, a tabular row's chosen tab\n */\n .scrolling-row > .ui.secondary.pointing.menu:not(.vertical) {\n --_ui-menu-item-margin: 0;\n border-bottom-width: 0;\n box-shadow: inset 0 -2px 0 var(--ui-border-color);\n }\n .scrolling-row > .ui.tabular.menu:not(.vertical, .bottom) {\n --_ui-menu-active-margin: 0;\n border-bottom-width: 0;\n box-shadow: inset 0 -1px 0 var(--ui-border-color-strong);\n }\n\n /*\n * the two keys: quiet round keys OVER the row's ends (anchored to its box), taking no room in it\n * - room kept for a hidden `‹` left the row's start further in than its end\n * - the row fades out under a key while there's more that way\n * - a key's press stops on a whole item (scroll snap): without it, it could stop mid-label\n */\n .scrolling-row > .ui.menu {\n anchor-name: --ui-scrolling-row;\n scroll-snap-type: x mandatory;\n scroll-padding-inline: var(--_ui-toolbar-button-size);\n --_toolbar-fade-start: 0px;\n --_toolbar-fade-end: 0px;\n /* each end's own fade: one shared width faded the start of a row that could only scroll on (debut I31) */\n --_toolbar-fade-in: 0px;\n --_toolbar-fade-out: 0px;\n /* clear under a key, then fading in over 1em */\n mask-image: linear-gradient(\n to right,\n transparent var(--_toolbar-fade-start),\n #000 calc(var(--_toolbar-fade-start) + var(--_toolbar-fade-in)),\n #000 calc(100% - var(--_toolbar-fade-end) - var(--_toolbar-fade-out)),\n transparent calc(100% - var(--_toolbar-fade-end))\n );\n }\n /* a toolbar's items are slotted; a tab set's, its own buttons */\n .scrolling-row > .ui.menu ::slotted(*),\n .scrolling-row > .ui.menu > .item {\n scroll-snap-align: start;\n }\n .scrolling-row:has(> .scroll.start[data-can]) > .ui.menu {\n --_toolbar-fade-start: var(--_ui-toolbar-button-size);\n --_toolbar-fade-in: 1em;\n }\n .scrolling-row:has(> .scroll.end[data-can]) > .ui.menu {\n --_toolbar-fade-end: var(--_ui-toolbar-button-size);\n --_toolbar-fade-out: 1em;\n }\n .scrolling-row > .scroll {\n position: absolute;\n position-anchor: --ui-scrolling-row;\n top: anchor(center);\n translate: 0 -50%;\n z-index: 1;\n display: inline-grid;\n flex: none;\n place-items: center;\n width: var(--_ui-toolbar-button-size);\n height: var(--_ui-toolbar-button-size);\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: var(--_ui-toolbar-button-radius);\n font: inherit;\n color: var(--_ui-toolbar-button-color);\n background: var(--_ui-toolbar-button-background);\n cursor: var(--ui-control-cursor);\n }\n .scrolling-row > .scroll.start {\n left: anchor(left);\n }\n .scrolling-row > .scroll.end {\n right: anchor(right);\n }\n .scrolling-row > .scroll > svg {\n width: 0.875em;\n height: 0.875em;\n fill: currentColor;\n pointer-events: none;\n }\n}\n\n@layer ui.components.scrolling-row.states {\n /* nothing to scroll: no keys at all */\n .scrolling-row > .scroll[hidden] {\n display: none;\n }\n /* at that end already: hidden (it takes no room in the row) */\n .scrolling-row > .scroll:not([data-can]) {\n visibility: hidden;\n }\n .scrolling-row > .scroll:hover {\n color: var(--ui-text-color);\n background: var(--_ui-toolbar-button-hover-background);\n }\n .scrolling-row > .scroll:focus-visible {\n outline: var(--ui-focus-width) solid var(--ui-focus-color);\n outline-offset: 1px;\n }\n}\n"],"m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AA,QAAA,GAHTJ,EAAAS,GAAA,GAAS,kBAAlBF,GAFWK,GAEOF,CAAA,GAGTV,EAAAS,GAAA,GAAS,gBAAlBH,GALWM,GAKOD,CAAA,GALbV,EAAAQ,GAAMG,CAAA,GAAahB,EAAAgB,GAAA,cAAA;AAAnB,IAAM2C,IAAN3C,GAyJM0B,IAAQ,SAMfU,IAAS,UAGTN,IAAgB,gBAGhBC,IAAc,iBAGdR,IAAiB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SitePages-CciwREek.js","names":["SitePages","page","key","isServer","value","each","pages","groups","order","tag","loose","filed","listed","untagged","event","url","href"],"sources":["../src/components/ui-site-nav/SitePages.ts"],"sourcesContent":["import { isServer } from \"@solidjs/web\"\n\n/****************\n * ### `SitePages`\n * What `<ui-site-nav>` and `<ui-site-tabs>` share about a site's list of pages:\n * which pages are well-formed, what each is known by, and whether a page is the one shown.\n * - Plain data, no element: each family imports this file, and neither draws the other.\n ****************/\nexport class SitePages {\n /** What `page` is known by, to open, find and remember it: its `id`, else its `href`, else its `title`. */\n static keyOf(page: SitePage): string {\n return page.id ?? page.href ?? page.title\n }\n\n /** Is `page` the one `key` names: its `id`, its `href`, or its `href`'s path? */\n static isShown(page: SitePage, key: string): boolean {\n if (!key) return false\n if (page.id === key || page.href === key) return true\n return !!page.href && !isServer && SitePages.pathOf(page.href) === SitePages.pathOf(key)\n }\n\n /** The pages in `value` that are pages: objects with a text `title`; anything else is left out. */\n static wellFormed<Page extends SitePage>(value: unknown): readonly Page[] {\n if (!Array.isArray(value)) return []\n return value.flatMap((each): Page[] => {\n if (!each || typeof each !== \"object\" || typeof (each as SitePage).title !== \"string\") return []\n const page = each as Page\n return [page.pages ? { ...page, pages: SitePages.wellFormed<Page>(page.pages) } : page]\n })\n }\n\n /** Every page of `pages`, the ones under each too, in order. */\n static allOf<Page extends SitePage>(pages: readonly Page[]): Page[] {\n return pages.flatMap((page) => [page, ...SitePages.allOf((page.pages ?? []) as readonly Page[])])\n }\n\n /**\n * The pages of `pages`, at any depth, filed under each of their `tags`: a page with two tags is in both groups.\n * - Groups come in `order`'s order, then the others as the pages first name them.\n * - A top-level page with pages under it and no tags goes under `untagged`, last: a new family shows up even before\n * it's filed. Any other page with no tags isn't listed.\n */\n static groupedByTag<Page extends SitePage>(\n pages: readonly Page[],\n { order = [], untagged }: { order?: readonly string[]; untagged: string }\n ): SitePageGroup<Page>[] {\n const groups = new Map<string, Page[]>(order.map((tag) => [tag, []]))\n for (const page of SitePages.allOf(pages))\n for (const tag of page.tags ?? []) groups.set(tag, [...(groups.get(tag) ?? []), page])\n const loose = pages.filter((page) => page.pages?.length && !page.tags?.length)\n const filed = [...groups].filter(([, listed]) => listed.length).map(([tag, listed]) => ({ tag, pages: listed }))\n return loose.length ? [...filed, { tag: untagged, pages: loose }] : filed\n }\n\n /** `event` is a click the browser opens elsewhere: a middle click, or one with Command, Control, Shift or Alt. */\n static isOpenElsewhere(event: Event | undefined): boolean {\n if (!(event instanceof MouseEvent)) return false\n return event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey\n }\n\n /**\n * `href`'s path and hash, against the page's address: `films/1` on `/guide/` => `/guide/films/1`.\n * - With its hash: else every hash link (`#/films`) on one page would be the page shown.\n */\n private static pathOf(href: string): string {\n try {\n const url = new URL(href, location.href)\n return url.pathname + url.hash\n } catch {\n return href\n }\n }\n}\n\n/** What every site's page has, whichever element draws it: each adds its own fields (`SiteNavPage`, `SiteTabsPage`). */\nexport type SitePage = {\n /** what the navigation calls it: `Films` */\n title: string\n /** where it is: `/films`; none, a page that only holds pages */\n href?: string\n /** what `current` may call it, when its `href` isn't enough: `film-page` */\n id?: string\n /** what it's filed under, to group and search a site's pages by: `[\"Forms\", \"Inputs\"]` */\n tags?: readonly string[]\n /** the pages under it */\n pages?: readonly SitePage[]\n}\n\n/** One group of `SitePages.groupedByTag()`. */\nexport type SitePageGroup<Page extends SitePage = SitePage> = {\n /** what its pages are filed under */\n tag: string\n /** its pages, in the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