@pine-ds/core 3.26.4 → 3.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1139) hide show
  1. package/components/attributes.js +1 -85
  2. package/components/closest.js +1 -12
  3. package/components/floating-ui.dom.js +1 -1631
  4. package/components/form.js +1 -62
  5. package/components/i18n-format.js +1 -0
  6. package/components/index.d.ts +1 -0
  7. package/components/index.js +1 -54
  8. package/components/index2.js +1 -20
  9. package/components/mock-pds-modal.js +1 -119
  10. package/components/pds-accordion.js +1 -74
  11. package/components/pds-alert.js +1 -115
  12. package/components/pds-avatar.js +1 -141
  13. package/components/pds-box.js +1 -9
  14. package/components/pds-box2.js +1 -283
  15. package/components/pds-button.js +1 -9
  16. package/components/pds-button2.js +1 -250
  17. package/components/pds-checkbox.js +1 -9
  18. package/components/pds-checkbox2.js +1 -150
  19. package/components/pds-chip.js +1 -9
  20. package/components/pds-chip2.js +1 -167
  21. package/components/pds-combobox.js +2 -2958
  22. package/components/pds-container.js +1 -61
  23. package/components/pds-copytext.js +1 -154
  24. package/components/pds-divider.js +1 -58
  25. package/components/pds-dropdown-menu-item.js +1 -128
  26. package/components/pds-dropdown-menu-separator.js +1 -46
  27. package/components/pds-dropdown-menu.js +1 -349
  28. package/components/pds-filter.js +1 -524
  29. package/components/pds-filters.js +1 -40
  30. package/components/pds-icon.js +1 -9
  31. package/components/pds-icon2.js +1 -601
  32. package/components/pds-image.js +1 -61
  33. package/components/pds-input.js +1 -372
  34. package/components/pds-link.js +1 -9
  35. package/components/pds-link2.js +1 -93
  36. package/components/pds-loader.js +1 -9
  37. package/components/pds-loader2.js +1 -79
  38. package/components/pds-modal-content.js +1 -214
  39. package/components/pds-modal-footer.js +1 -37
  40. package/components/pds-modal-header.js +1 -37
  41. package/components/pds-modal.js +1 -291
  42. package/components/pds-multiselect.js +1 -1087
  43. package/components/pds-popover.js +1 -602
  44. package/components/pds-progress.js +1 -60
  45. package/components/pds-property.js +1 -57
  46. package/components/pds-radio-group.js +1 -211
  47. package/components/pds-radio.js +1 -138
  48. package/components/pds-row.js +1 -99
  49. package/components/pds-select.js +1 -291
  50. package/components/pds-sortable-item.js +1 -67
  51. package/components/pds-sortable.js +2 -2747
  52. package/components/pds-switch.js +1 -147
  53. package/components/pds-tab.js +1 -71
  54. package/components/pds-table-body.js +1 -38
  55. package/components/pds-table-cell.js +1 -9
  56. package/components/pds-table-cell2.js +1 -169
  57. package/components/pds-table-head-cell.js +1 -9
  58. package/components/pds-table-head-cell2.js +1 -254
  59. package/components/pds-table-head.js +1 -102
  60. package/components/pds-table-row.js +1 -197
  61. package/components/pds-table.js +1 -291
  62. package/components/pds-tabpanel.js +1 -48
  63. package/components/pds-tabs.js +1 -126
  64. package/components/pds-text.js +1 -9
  65. package/components/pds-text2.js +1 -110
  66. package/components/pds-textarea.js +1 -376
  67. package/components/pds-toast.js +1 -175
  68. package/components/pds-tooltip.js +1 -362
  69. package/components/scroll.js +1 -78
  70. package/components/truncation-tooltip.js +1 -247
  71. package/components/utils.js +1 -74
  72. package/dist/cjs/attributes-oNMnBEnP.js +0 -3
  73. package/dist/cjs/closest-BZXvuB_Y.js +0 -3
  74. package/dist/cjs/floating-ui.dom-BZk7Blsu.js +0 -3
  75. package/dist/cjs/form-CpM5Z8q7.js +0 -3
  76. package/dist/cjs/i18n-format-CrpIhahc.js +64 -0
  77. package/dist/cjs/{index-BUvWX8u2.js → index-DBhfI2Jq.js} +567 -387
  78. package/dist/cjs/index-DGBoDsAL.js +0 -3
  79. package/dist/cjs/index.cjs.js +0 -1
  80. package/dist/cjs/loader.cjs.js +2 -3
  81. package/dist/cjs/mock-pds-modal.cjs.entry.js +3 -4
  82. package/dist/cjs/pds-accordion.cjs.entry.js +7 -6
  83. package/dist/cjs/pds-alert.cjs.entry.js +11 -6
  84. package/dist/cjs/pds-avatar.cjs.entry.js +11 -6
  85. package/dist/cjs/pds-box.cjs.entry.js +3 -4
  86. package/dist/cjs/pds-button.cjs.entry.js +3 -4
  87. package/dist/cjs/pds-checkbox.cjs.entry.js +9 -6
  88. package/dist/cjs/pds-chip.cjs.entry.js +12 -8
  89. package/dist/cjs/pds-combobox.cjs.entry.js +18 -9
  90. package/dist/cjs/pds-container.cjs.entry.js +3 -4
  91. package/dist/cjs/pds-copytext.cjs.entry.js +10 -7
  92. package/dist/cjs/pds-divider.cjs.entry.js +3 -4
  93. package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +3 -4
  94. package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +3 -4
  95. package/dist/cjs/pds-dropdown-menu.cjs.entry.js +3 -4
  96. package/dist/cjs/pds-filter.cjs.entry.js +3 -4
  97. package/dist/cjs/pds-filters.cjs.entry.js +3 -4
  98. package/dist/cjs/pds-icon.cjs.entry.js +18 -9
  99. package/dist/cjs/pds-image.cjs.entry.js +3 -4
  100. package/dist/cjs/pds-input.cjs.entry.js +12 -9
  101. package/dist/cjs/pds-link.cjs.entry.js +5 -6
  102. package/dist/cjs/pds-loader.cjs.entry.js +3 -4
  103. package/dist/cjs/pds-modal-content.cjs.entry.js +3 -4
  104. package/dist/cjs/pds-modal-footer.cjs.entry.js +3 -4
  105. package/dist/cjs/pds-modal-header.cjs.entry.js +3 -4
  106. package/dist/cjs/pds-modal.cjs.entry.js +6 -5
  107. package/dist/cjs/pds-multiselect.cjs.entry.js +106 -20
  108. package/dist/cjs/pds-popover.cjs.entry.js +3 -4
  109. package/dist/cjs/pds-progress.cjs.entry.js +3 -4
  110. package/dist/cjs/pds-property.cjs.entry.js +3 -4
  111. package/dist/cjs/pds-radio-group.cjs.entry.js +15 -8
  112. package/dist/cjs/pds-radio.cjs.entry.js +4 -5
  113. package/dist/cjs/pds-row.cjs.entry.js +3 -4
  114. package/dist/cjs/pds-select.cjs.entry.js +13 -10
  115. package/dist/cjs/pds-sortable-item.cjs.entry.js +4 -5
  116. package/dist/cjs/pds-sortable.cjs.entry.js +6 -5
  117. package/dist/cjs/pds-switch.cjs.entry.js +7 -6
  118. package/dist/cjs/pds-tab.cjs.entry.js +3 -4
  119. package/dist/cjs/pds-table-body.cjs.entry.js +3 -4
  120. package/dist/cjs/pds-table-cell.cjs.entry.js +6 -5
  121. package/dist/cjs/pds-table-head-cell.cjs.entry.js +3 -4
  122. package/dist/cjs/pds-table-head.cjs.entry.js +3 -4
  123. package/dist/cjs/pds-table-row.cjs.entry.js +3 -4
  124. package/dist/cjs/pds-table.cjs.entry.js +3 -4
  125. package/dist/cjs/pds-tabpanel.cjs.entry.js +3 -4
  126. package/dist/cjs/pds-tabs.cjs.entry.js +3 -4
  127. package/dist/cjs/pds-text.cjs.entry.js +46 -6
  128. package/dist/cjs/pds-textarea.cjs.entry.js +26 -14
  129. package/dist/cjs/pds-toast.cjs.entry.js +15 -8
  130. package/dist/cjs/pds-tooltip.cjs.entry.js +6 -5
  131. package/dist/cjs/pine-core.cjs.js +3 -4
  132. package/dist/cjs/scroll-2XcoE_6Q.js +0 -3
  133. package/dist/cjs/truncation-tooltip-CVzAha5B.js +0 -3
  134. package/dist/cjs/utils-7jx8T2mW.js +0 -3
  135. package/dist/collection/collection-manifest.json +3 -2
  136. package/dist/collection/components/_internal/pds-label/pds-label.js +0 -1
  137. package/dist/collection/components/pds-accordion/pds-accordion.js +1 -2
  138. package/dist/collection/components/pds-alert/pds-alert.js +30 -2
  139. package/dist/collection/components/pds-avatar/pds-avatar.js +31 -3
  140. package/dist/collection/components/pds-box/pds-box.js +206 -134
  141. package/dist/collection/components/pds-button/pds-button.css +74 -74
  142. package/dist/collection/components/pds-button/pds-button.js +2 -2
  143. package/dist/collection/components/pds-checkbox/checkbox-interface.js +0 -1
  144. package/dist/collection/components/pds-checkbox/pds-checkbox.js +4 -3
  145. package/dist/collection/components/pds-chip/pds-chip.js +37 -7
  146. package/dist/collection/components/pds-combobox/combobox-interface.js +0 -1
  147. package/dist/collection/components/pds-combobox/pds-combobox.css +3 -0
  148. package/dist/collection/components/pds-combobox/pds-combobox.js +10 -6
  149. package/dist/collection/components/pds-container/pds-container.js +0 -1
  150. package/dist/collection/components/pds-copytext/pds-copytext.js +1 -2
  151. package/dist/collection/components/pds-divider/pds-divider.js +0 -1
  152. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +0 -1
  153. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +0 -1
  154. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +2 -2
  155. package/dist/collection/components/pds-filters/pds-filter/filter-interface.js +0 -1
  156. package/dist/collection/components/pds-filters/pds-filter/pds-filter.js +8 -5
  157. package/dist/collection/components/pds-filters/pds-filters.js +0 -1
  158. package/dist/collection/components/pds-image/pds-image.js +0 -1
  159. package/dist/collection/components/pds-input/input-interface.js +0 -1
  160. package/dist/collection/components/pds-input/pds-input.js +5 -4
  161. package/dist/collection/components/pds-link/pds-link.js +154 -3
  162. package/dist/collection/components/pds-loader/pds-loader.js +0 -1
  163. package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +0 -1
  164. package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +0 -1
  165. package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +0 -1
  166. package/dist/collection/components/pds-modal/pds-modal.js +0 -1
  167. package/dist/collection/components/pds-modal/test/mock-pds-modal.js +0 -1
  168. package/dist/collection/components/pds-multiselect/multiselect-interface.js +0 -1
  169. package/dist/collection/components/pds-multiselect/pds-multiselect.css +1 -0
  170. package/dist/collection/components/pds-multiselect/pds-multiselect.js +370 -24
  171. package/dist/collection/components/pds-popover/pds-popover.js +6 -4
  172. package/dist/collection/components/pds-popover/popover-interface.js +0 -1
  173. package/dist/collection/components/pds-progress/pds-progress.js +0 -1
  174. package/dist/collection/components/pds-property/pds-property.js +0 -1
  175. package/dist/collection/components/pds-radio/pds-radio.js +0 -1
  176. package/dist/collection/components/pds-radio-group/pds-radio-group.js +2 -2
  177. package/dist/collection/components/pds-radio-group/radio-group-interface.js +0 -1
  178. package/dist/collection/components/pds-row/pds-row.js +9 -7
  179. package/dist/collection/components/pds-select/pds-select.js +2 -3
  180. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -2
  181. package/dist/collection/components/pds-sortable/pds-sortable.js +2 -2
  182. package/dist/collection/components/pds-sortable/sortable-interface.js +0 -1
  183. package/dist/collection/components/pds-switch/pds-switch.js +0 -1
  184. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +0 -1
  185. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +0 -1
  186. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +0 -1
  187. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +0 -1
  188. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +0 -1
  189. package/dist/collection/components/pds-table/pds-table.css +1 -0
  190. package/dist/collection/components/pds-table/pds-table.js +0 -1
  191. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +0 -1
  192. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +0 -1
  193. package/dist/collection/components/pds-tabs/pds-tabs.js +0 -1
  194. package/dist/collection/components/pds-text/pds-text.js +31 -4
  195. package/dist/collection/components/pds-textarea/pds-textarea.js +39 -8
  196. package/dist/collection/components/pds-textarea/textarea-interface.js +0 -1
  197. package/dist/collection/components/pds-toast/pds-toast.js +32 -4
  198. package/dist/collection/components/pds-tooltip/pds-tooltip.js +2 -2
  199. package/dist/collection/global/pine-ui-global.js +0 -1
  200. package/dist/collection/i18n/i18n-format.js +59 -0
  201. package/dist/collection/i18n/index.js +1 -0
  202. package/dist/collection/index.js +0 -1
  203. package/dist/collection/utils/attributes.js +0 -1
  204. package/dist/collection/utils/closest.js +0 -1
  205. package/dist/collection/utils/form.js +0 -1
  206. package/dist/collection/utils/interfaces.js +0 -1
  207. package/dist/collection/utils/overlay.js +0 -1
  208. package/dist/collection/utils/scroll.js +0 -1
  209. package/dist/collection/utils/test/axe.js +9 -4
  210. package/dist/collection/utils/truncation-tooltip.js +0 -1
  211. package/dist/collection/utils/types.js +18 -2
  212. package/dist/collection/utils/utils.js +0 -1
  213. package/dist/docs.d.ts +37 -0
  214. package/dist/docs.json +2833 -1964
  215. package/dist/esm/attributes-C0M1gTKv.js +0 -3
  216. package/dist/esm/closest-DnUJodVd.js +0 -3
  217. package/dist/esm/floating-ui.dom-DDtwbwIl.js +0 -3
  218. package/dist/esm/form-C3xDZBme.js +0 -3
  219. package/dist/esm/i18n-format-BKsJZTyn.js +61 -0
  220. package/dist/esm/{index-B2f84Zog.js → index-CaRgVPt7.js} +567 -387
  221. package/dist/esm/index-D4ys0pep.js +0 -3
  222. package/dist/esm/index.js +0 -1
  223. package/dist/esm/loader.js +3 -4
  224. package/dist/esm/mock-pds-modal.entry.js +3 -4
  225. package/dist/esm/pds-accordion.entry.js +7 -6
  226. package/dist/esm/pds-alert.entry.js +11 -6
  227. package/dist/esm/pds-avatar.entry.js +11 -6
  228. package/dist/esm/pds-box.entry.js +3 -4
  229. package/dist/esm/pds-button.entry.js +3 -4
  230. package/dist/esm/pds-checkbox.entry.js +9 -6
  231. package/dist/esm/pds-chip.entry.js +12 -8
  232. package/dist/esm/pds-combobox.entry.js +18 -9
  233. package/dist/esm/pds-container.entry.js +3 -4
  234. package/dist/esm/pds-copytext.entry.js +10 -7
  235. package/dist/esm/pds-divider.entry.js +3 -4
  236. package/dist/esm/pds-dropdown-menu-item.entry.js +3 -4
  237. package/dist/esm/pds-dropdown-menu-separator.entry.js +3 -4
  238. package/dist/esm/pds-dropdown-menu.entry.js +3 -4
  239. package/dist/esm/pds-filter.entry.js +3 -4
  240. package/dist/esm/pds-filters.entry.js +3 -4
  241. package/dist/esm/pds-icon.entry.js +18 -9
  242. package/dist/esm/pds-image.entry.js +3 -4
  243. package/dist/esm/pds-input.entry.js +12 -9
  244. package/dist/esm/pds-link.entry.js +5 -6
  245. package/dist/esm/pds-loader.entry.js +3 -4
  246. package/dist/esm/pds-modal-content.entry.js +3 -4
  247. package/dist/esm/pds-modal-footer.entry.js +3 -4
  248. package/dist/esm/pds-modal-header.entry.js +3 -4
  249. package/dist/esm/pds-modal.entry.js +6 -5
  250. package/dist/esm/pds-multiselect.entry.js +106 -20
  251. package/dist/esm/pds-popover.entry.js +3 -4
  252. package/dist/esm/pds-progress.entry.js +3 -4
  253. package/dist/esm/pds-property.entry.js +3 -4
  254. package/dist/esm/pds-radio-group.entry.js +15 -8
  255. package/dist/esm/pds-radio.entry.js +4 -5
  256. package/dist/esm/pds-row.entry.js +3 -4
  257. package/dist/esm/pds-select.entry.js +13 -10
  258. package/dist/esm/pds-sortable-item.entry.js +4 -5
  259. package/dist/esm/pds-sortable.entry.js +6 -5
  260. package/dist/esm/pds-switch.entry.js +7 -6
  261. package/dist/esm/pds-tab.entry.js +3 -4
  262. package/dist/esm/pds-table-body.entry.js +3 -4
  263. package/dist/esm/pds-table-cell.entry.js +6 -5
  264. package/dist/esm/pds-table-head-cell.entry.js +3 -4
  265. package/dist/esm/pds-table-head.entry.js +3 -4
  266. package/dist/esm/pds-table-row.entry.js +3 -4
  267. package/dist/esm/pds-table.entry.js +3 -4
  268. package/dist/esm/pds-tabpanel.entry.js +3 -4
  269. package/dist/esm/pds-tabs.entry.js +3 -4
  270. package/dist/esm/pds-text.entry.js +46 -6
  271. package/dist/esm/pds-textarea.entry.js +26 -14
  272. package/dist/esm/pds-toast.entry.js +15 -8
  273. package/dist/esm/pds-tooltip.entry.js +6 -5
  274. package/dist/esm/pine-core.js +4 -5
  275. package/dist/esm/scroll-DtgUQhjl.js +0 -3
  276. package/dist/esm/truncation-tooltip-Blk4GigP.js +0 -3
  277. package/dist/esm/utils-tJa4KYNO.js +0 -3
  278. package/dist/esm-es5/attributes-C0M1gTKv.js +1 -2
  279. package/dist/esm-es5/closest-DnUJodVd.js +1 -2
  280. package/dist/esm-es5/floating-ui.dom-DDtwbwIl.js +1 -2
  281. package/dist/esm-es5/form-C3xDZBme.js +1 -2
  282. package/dist/esm-es5/i18n-format-BKsJZTyn.js +1 -0
  283. package/dist/esm-es5/index-CaRgVPt7.js +2 -0
  284. package/dist/esm-es5/index-D4ys0pep.js +1 -2
  285. package/dist/esm-es5/index.js +0 -2
  286. package/dist/esm-es5/loader.js +1 -2
  287. package/dist/esm-es5/mock-pds-modal.entry.js +1 -2
  288. package/dist/esm-es5/pds-accordion.entry.js +1 -2
  289. package/dist/esm-es5/pds-alert.entry.js +1 -2
  290. package/dist/esm-es5/pds-avatar.entry.js +1 -2
  291. package/dist/esm-es5/pds-box.entry.js +1 -2
  292. package/dist/esm-es5/pds-button.entry.js +1 -2
  293. package/dist/esm-es5/pds-checkbox.entry.js +1 -2
  294. package/dist/esm-es5/pds-chip.entry.js +1 -2
  295. package/dist/esm-es5/pds-combobox.entry.js +2 -3
  296. package/dist/esm-es5/pds-container.entry.js +1 -2
  297. package/dist/esm-es5/pds-copytext.entry.js +1 -2
  298. package/dist/esm-es5/pds-divider.entry.js +1 -2
  299. package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -2
  300. package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -2
  301. package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -2
  302. package/dist/esm-es5/pds-filter.entry.js +1 -2
  303. package/dist/esm-es5/pds-filters.entry.js +1 -2
  304. package/dist/esm-es5/pds-icon.entry.js +1 -2
  305. package/dist/esm-es5/pds-image.entry.js +1 -2
  306. package/dist/esm-es5/pds-input.entry.js +1 -2
  307. package/dist/esm-es5/pds-link.entry.js +1 -2
  308. package/dist/esm-es5/pds-loader.entry.js +1 -2
  309. package/dist/esm-es5/pds-modal-content.entry.js +1 -2
  310. package/dist/esm-es5/pds-modal-footer.entry.js +1 -2
  311. package/dist/esm-es5/pds-modal-header.entry.js +1 -2
  312. package/dist/esm-es5/pds-modal.entry.js +1 -2
  313. package/dist/esm-es5/pds-multiselect.entry.js +1 -2
  314. package/dist/esm-es5/pds-popover.entry.js +1 -2
  315. package/dist/esm-es5/pds-progress.entry.js +1 -2
  316. package/dist/esm-es5/pds-property.entry.js +1 -2
  317. package/dist/esm-es5/pds-radio-group.entry.js +1 -2
  318. package/dist/esm-es5/pds-radio.entry.js +1 -2
  319. package/dist/esm-es5/pds-row.entry.js +1 -2
  320. package/dist/esm-es5/pds-select.entry.js +1 -2
  321. package/dist/esm-es5/pds-sortable-item.entry.js +1 -2
  322. package/dist/esm-es5/pds-sortable.entry.js +2 -3
  323. package/dist/esm-es5/pds-switch.entry.js +1 -2
  324. package/dist/esm-es5/pds-tab.entry.js +1 -2
  325. package/dist/esm-es5/pds-table-body.entry.js +1 -2
  326. package/dist/esm-es5/pds-table-cell.entry.js +1 -2
  327. package/dist/esm-es5/pds-table-head-cell.entry.js +1 -2
  328. package/dist/esm-es5/pds-table-head.entry.js +1 -2
  329. package/dist/esm-es5/pds-table-row.entry.js +1 -2
  330. package/dist/esm-es5/pds-table.entry.js +1 -2
  331. package/dist/esm-es5/pds-tabpanel.entry.js +1 -2
  332. package/dist/esm-es5/pds-tabs.entry.js +1 -2
  333. package/dist/esm-es5/pds-text.entry.js +1 -2
  334. package/dist/esm-es5/pds-textarea.entry.js +1 -2
  335. package/dist/esm-es5/pds-toast.entry.js +1 -2
  336. package/dist/esm-es5/pds-tooltip.entry.js +1 -2
  337. package/dist/esm-es5/pine-core.js +1 -2
  338. package/dist/esm-es5/scroll-DtgUQhjl.js +1 -2
  339. package/dist/esm-es5/truncation-tooltip-Blk4GigP.js +1 -2
  340. package/dist/esm-es5/utils-tJa4KYNO.js +1 -2
  341. package/dist/pine-core/index.esm.js +0 -2
  342. package/dist/pine-core/p-002c420f.system.entry.js +1 -0
  343. package/dist/pine-core/p-003f91b1.system.entry.js +1 -0
  344. package/dist/pine-core/p-006398c3.system.entry.js +1 -0
  345. package/dist/pine-core/p-01dba061.entry.js +1 -0
  346. package/dist/pine-core/p-041243ee.system.entry.js +1 -0
  347. package/dist/pine-core/p-0451fdf7.entry.js +1 -0
  348. package/dist/pine-core/p-04f8b32a.entry.js +1 -0
  349. package/dist/pine-core/p-0bf56f61.entry.js +1 -0
  350. package/dist/pine-core/p-13ec2343.entry.js +1 -0
  351. package/dist/pine-core/p-1e3beca4.system.entry.js +1 -0
  352. package/dist/pine-core/p-1f4910b0.system.entry.js +1 -0
  353. package/dist/pine-core/p-20f39b93.system.entry.js +1 -0
  354. package/dist/pine-core/p-22bfa998.entry.js +1 -0
  355. package/dist/pine-core/p-25f8690f.entry.js +1 -0
  356. package/dist/pine-core/p-27ac77c3.entry.js +1 -0
  357. package/dist/pine-core/p-2af1d1d3.system.entry.js +1 -0
  358. package/dist/pine-core/p-2b0cb8c4.system.entry.js +1 -0
  359. package/dist/pine-core/p-2cc1ec4c.entry.js +1 -0
  360. package/dist/pine-core/p-334b7c30.entry.js +1 -0
  361. package/dist/pine-core/p-3876b9be.entry.js +1 -0
  362. package/dist/pine-core/p-3a1b7302.system.entry.js +1 -0
  363. package/dist/pine-core/p-3ad9bcef.system.entry.js +1 -0
  364. package/dist/pine-core/p-3ba36512.system.entry.js +1 -0
  365. package/dist/pine-core/p-3f19666c.entry.js +1 -0
  366. package/dist/pine-core/p-3fa80c5a.system.entry.js +1 -0
  367. package/dist/pine-core/p-44388b8f.system.entry.js +1 -0
  368. package/dist/pine-core/p-44f58d33.system.entry.js +1 -0
  369. package/dist/pine-core/p-46de2438.entry.js +1 -0
  370. package/dist/pine-core/p-4abec102.system.entry.js +3 -0
  371. package/dist/pine-core/p-4e49712d.entry.js +1 -0
  372. package/dist/pine-core/p-52e9ec4f.entry.js +1 -0
  373. package/dist/pine-core/p-52f7115b.entry.js +1 -0
  374. package/dist/pine-core/p-5584a56b.entry.js +1 -0
  375. package/dist/pine-core/p-568bb210.system.entry.js +1 -0
  376. package/dist/pine-core/p-571d6bef.system.entry.js +1 -0
  377. package/dist/pine-core/p-587a15ee.system.entry.js +1 -0
  378. package/dist/pine-core/p-59a5dd77.system.entry.js +1 -0
  379. package/dist/pine-core/p-59c60e5b.entry.js +1 -0
  380. package/dist/pine-core/p-5a2df1e2.entry.js +1 -0
  381. package/dist/pine-core/p-5c6c2f79.system.entry.js +1 -0
  382. package/dist/pine-core/p-5f36fafa.system.entry.js +1 -0
  383. package/dist/pine-core/p-618ba6d5.system.entry.js +1 -0
  384. package/dist/pine-core/p-621fdce1.entry.js +1 -0
  385. package/dist/pine-core/p-63e0d4a5.system.entry.js +1 -0
  386. package/dist/pine-core/p-65fb166c.system.entry.js +1 -0
  387. package/dist/pine-core/p-6a2373d0.system.entry.js +1 -0
  388. package/dist/pine-core/p-6c5aacad.entry.js +1 -0
  389. package/dist/pine-core/p-71ca8845.system.entry.js +1 -0
  390. package/dist/pine-core/p-7247fb4f.entry.js +2 -0
  391. package/dist/pine-core/p-73b81009.entry.js +1 -0
  392. package/dist/pine-core/p-73dd2a2b.entry.js +1 -0
  393. package/dist/pine-core/p-74e06c8d.system.entry.js +1 -0
  394. package/dist/pine-core/p-7520a715.system.entry.js +1 -0
  395. package/dist/pine-core/p-7766e970.entry.js +1 -0
  396. package/dist/pine-core/p-7874fe2b.entry.js +1 -0
  397. package/dist/pine-core/p-791d357a.entry.js +1 -0
  398. package/dist/pine-core/p-7a4da839.entry.js +1 -0
  399. package/dist/pine-core/p-7aca41d9.system.entry.js +1 -0
  400. package/dist/pine-core/p-7b954dbf.entry.js +1 -0
  401. package/dist/pine-core/p-8065c732.entry.js +1 -0
  402. package/dist/pine-core/p-835d9f18.system.entry.js +1 -0
  403. package/dist/pine-core/p-83eb33d4.entry.js +1 -0
  404. package/dist/pine-core/p-855dfc31.system.entry.js +1 -0
  405. package/dist/pine-core/p-889fce8a.entry.js +7 -0
  406. package/dist/pine-core/p-8a00e32b.system.entry.js +1 -0
  407. package/dist/pine-core/p-974bf0c5.entry.js +1 -0
  408. package/dist/pine-core/p-9865431f.system.entry.js +1 -0
  409. package/dist/pine-core/p-B1u-QvFn.system.js +1 -2
  410. package/dist/pine-core/p-BG6uGRQj.system.js +1 -2
  411. package/dist/pine-core/p-BKsJZTyn.js +1 -0
  412. package/dist/pine-core/p-BNSGedhN.js +1 -2
  413. package/dist/pine-core/p-BhQhw0S3.system.js +1 -2
  414. package/dist/pine-core/p-BrLs99ML.system.js +1 -2
  415. package/dist/pine-core/p-C0M1gTKv.js +1 -2
  416. package/dist/pine-core/p-C3xDZBme.js +1 -2
  417. package/dist/pine-core/p-C61CFP22.system.js +1 -0
  418. package/dist/pine-core/p-C62JIZmE.system.js +1 -2
  419. package/dist/pine-core/p-CRCxGYgw.system.js +1 -2
  420. package/dist/pine-core/p-CaRgVPt7.js +2 -0
  421. package/dist/pine-core/p-CdwliqhD.system.js +2 -0
  422. package/dist/pine-core/p-Cr7-rJtJ.system.js +1 -0
  423. package/dist/pine-core/p-D4ys0pep.js +1 -2
  424. package/dist/pine-core/p-DDtwbwIl.js +1 -2
  425. package/dist/pine-core/p-DVra397g.system.js +1 -2
  426. package/dist/pine-core/p-DnUJodVd.js +1 -2
  427. package/dist/pine-core/p-DtgUQhjl.js +1 -2
  428. package/dist/pine-core/p-YWpyar7R.system.js +1 -2
  429. package/dist/pine-core/p-a1750a54.entry.js +1 -0
  430. package/dist/pine-core/p-a659cce1.entry.js +1 -0
  431. package/dist/pine-core/p-a982ac91.system.entry.js +1 -0
  432. package/dist/pine-core/p-ab957ace.system.entry.js +1 -0
  433. package/dist/pine-core/p-ae2b466a.system.entry.js +1 -0
  434. package/dist/pine-core/p-ae840ec4.entry.js +1 -0
  435. package/dist/pine-core/p-af48e6ae.entry.js +1 -0
  436. package/dist/pine-core/p-b1b317a5.entry.js +1 -0
  437. package/dist/pine-core/p-ba88ff60.system.entry.js +1 -0
  438. package/dist/pine-core/p-babd0607.system.entry.js +1 -0
  439. package/dist/pine-core/p-bdf18687.entry.js +1 -0
  440. package/dist/pine-core/p-c273210a.entry.js +1 -0
  441. package/dist/pine-core/p-c3a99f39.entry.js +1 -0
  442. package/dist/pine-core/p-c7c17fe3.system.entry.js +1 -0
  443. package/dist/pine-core/p-ccb889d8.system.entry.js +1 -0
  444. package/dist/pine-core/p-cce83ef0.entry.js +1 -0
  445. package/dist/pine-core/p-d09ae46d.system.entry.js +1 -0
  446. package/dist/pine-core/p-d5c1f85e.system.entry.js +1 -0
  447. package/dist/pine-core/p-db1572a3.entry.js +1 -0
  448. package/dist/pine-core/p-e0cfb931.system.entry.js +1 -0
  449. package/dist/pine-core/p-e291db30.entry.js +1 -0
  450. package/dist/pine-core/p-e48161a5.entry.js +1 -0
  451. package/dist/pine-core/p-e620e492.system.entry.js +1 -0
  452. package/dist/pine-core/p-e70c9002.entry.js +1 -0
  453. package/dist/pine-core/p-e77c5c08.system.entry.js +1 -0
  454. package/dist/pine-core/p-edf4e4eb.system.entry.js +1 -0
  455. package/dist/pine-core/p-ee6f914c.entry.js +1 -0
  456. package/dist/pine-core/{p-85e889c3.system.entry.js → p-ef71710b.system.entry.js} +2 -3
  457. package/dist/pine-core/p-f2cf8e76.entry.js +1 -0
  458. package/dist/pine-core/p-f366f064.entry.js +1 -0
  459. package/dist/pine-core/p-fa81009f.system.entry.js +1 -0
  460. package/dist/pine-core/p-fb68e503.system.entry.js +1 -0
  461. package/dist/pine-core/p-fda3f3c6.entry.js +1 -0
  462. package/dist/pine-core/p-kYMYDfJY.system.js +1 -2
  463. package/dist/pine-core/p-tJa4KYNO.js +1 -2
  464. package/dist/pine-core/pine-core.esm.js +1 -2
  465. package/dist/pine-core/pine-core.js +1 -1
  466. package/dist/scripts/vscode-custom-data-generator.js +0 -1
  467. package/dist/types/components/pds-alert/pds-alert.d.ts +6 -0
  468. package/dist/types/components/pds-avatar/pds-avatar.d.ts +6 -0
  469. package/dist/types/components/pds-chip/pds-chip.d.ts +5 -0
  470. package/dist/types/components/pds-link/pds-link.d.ts +40 -0
  471. package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +67 -4
  472. package/dist/types/components/pds-text/pds-text.d.ts +4 -1
  473. package/dist/types/components/pds-textarea/pds-textarea.d.ts +6 -0
  474. package/dist/types/components/pds-toast/pds-toast.d.ts +6 -0
  475. package/dist/types/components.d.ts +955 -132
  476. package/dist/types/i18n/i18n-format.d.ts +38 -0
  477. package/dist/types/i18n/index.d.ts +2 -0
  478. package/dist/types/stencil-public-runtime.d.ts +110 -5
  479. package/dist/types/utils/test/axe.d.ts +5 -4
  480. package/dist/types/utils/types.d.ts +2 -0
  481. package/hydrate/index.d.ts +12 -0
  482. package/hydrate/index.js +5420 -1083
  483. package/hydrate/index.mjs +5419 -1084
  484. package/package.json +12 -11
  485. package/components/attributes.js.map +0 -1
  486. package/components/closest.js.map +0 -1
  487. package/components/floating-ui.dom.js.map +0 -1
  488. package/components/form.js.map +0 -1
  489. package/components/index.js.map +0 -1
  490. package/components/index2.js.map +0 -1
  491. package/components/mock-pds-modal.js.map +0 -1
  492. package/components/pds-accordion.js.map +0 -1
  493. package/components/pds-alert.js.map +0 -1
  494. package/components/pds-avatar.js.map +0 -1
  495. package/components/pds-box.js.map +0 -1
  496. package/components/pds-box2.js.map +0 -1
  497. package/components/pds-button.js.map +0 -1
  498. package/components/pds-button2.js.map +0 -1
  499. package/components/pds-checkbox.js.map +0 -1
  500. package/components/pds-checkbox2.js.map +0 -1
  501. package/components/pds-chip.js.map +0 -1
  502. package/components/pds-chip2.js.map +0 -1
  503. package/components/pds-combobox.js.map +0 -1
  504. package/components/pds-container.js.map +0 -1
  505. package/components/pds-copytext.js.map +0 -1
  506. package/components/pds-divider.js.map +0 -1
  507. package/components/pds-dropdown-menu-item.js.map +0 -1
  508. package/components/pds-dropdown-menu-separator.js.map +0 -1
  509. package/components/pds-dropdown-menu.js.map +0 -1
  510. package/components/pds-filter.js.map +0 -1
  511. package/components/pds-filters.js.map +0 -1
  512. package/components/pds-icon.js.map +0 -1
  513. package/components/pds-icon2.js.map +0 -1
  514. package/components/pds-image.js.map +0 -1
  515. package/components/pds-input.js.map +0 -1
  516. package/components/pds-link.js.map +0 -1
  517. package/components/pds-link2.js.map +0 -1
  518. package/components/pds-loader.js.map +0 -1
  519. package/components/pds-loader2.js.map +0 -1
  520. package/components/pds-modal-content.js.map +0 -1
  521. package/components/pds-modal-footer.js.map +0 -1
  522. package/components/pds-modal-header.js.map +0 -1
  523. package/components/pds-modal.js.map +0 -1
  524. package/components/pds-multiselect.js.map +0 -1
  525. package/components/pds-popover.js.map +0 -1
  526. package/components/pds-progress.js.map +0 -1
  527. package/components/pds-property.js.map +0 -1
  528. package/components/pds-radio-group.js.map +0 -1
  529. package/components/pds-radio.js.map +0 -1
  530. package/components/pds-row.js.map +0 -1
  531. package/components/pds-select.js.map +0 -1
  532. package/components/pds-sortable-item.js.map +0 -1
  533. package/components/pds-sortable.js.map +0 -1
  534. package/components/pds-switch.js.map +0 -1
  535. package/components/pds-tab.js.map +0 -1
  536. package/components/pds-table-body.js.map +0 -1
  537. package/components/pds-table-cell.js.map +0 -1
  538. package/components/pds-table-cell2.js.map +0 -1
  539. package/components/pds-table-head-cell.js.map +0 -1
  540. package/components/pds-table-head-cell2.js.map +0 -1
  541. package/components/pds-table-head.js.map +0 -1
  542. package/components/pds-table-row.js.map +0 -1
  543. package/components/pds-table.js.map +0 -1
  544. package/components/pds-tabpanel.js.map +0 -1
  545. package/components/pds-tabs.js.map +0 -1
  546. package/components/pds-text.js.map +0 -1
  547. package/components/pds-text2.js.map +0 -1
  548. package/components/pds-textarea.js.map +0 -1
  549. package/components/pds-toast.js.map +0 -1
  550. package/components/pds-tooltip.js.map +0 -1
  551. package/components/scroll.js.map +0 -1
  552. package/components/truncation-tooltip.js.map +0 -1
  553. package/components/utils.js.map +0 -1
  554. package/dist/cjs/attributes-oNMnBEnP.js.map +0 -1
  555. package/dist/cjs/closest-BZXvuB_Y.js.map +0 -1
  556. package/dist/cjs/floating-ui.dom-BZk7Blsu.js.map +0 -1
  557. package/dist/cjs/form-CpM5Z8q7.js.map +0 -1
  558. package/dist/cjs/index-BUvWX8u2.js.map +0 -1
  559. package/dist/cjs/index-DGBoDsAL.js.map +0 -1
  560. package/dist/cjs/index.cjs.js.map +0 -1
  561. package/dist/cjs/loader.cjs.js.map +0 -1
  562. package/dist/cjs/mock-pds-modal.entry.cjs.js.map +0 -1
  563. package/dist/cjs/pds-accordion.entry.cjs.js.map +0 -1
  564. package/dist/cjs/pds-alert.entry.cjs.js.map +0 -1
  565. package/dist/cjs/pds-avatar.entry.cjs.js.map +0 -1
  566. package/dist/cjs/pds-box.entry.cjs.js.map +0 -1
  567. package/dist/cjs/pds-button.entry.cjs.js.map +0 -1
  568. package/dist/cjs/pds-checkbox.entry.cjs.js.map +0 -1
  569. package/dist/cjs/pds-chip.entry.cjs.js.map +0 -1
  570. package/dist/cjs/pds-combobox.entry.cjs.js.map +0 -1
  571. package/dist/cjs/pds-container.entry.cjs.js.map +0 -1
  572. package/dist/cjs/pds-copytext.entry.cjs.js.map +0 -1
  573. package/dist/cjs/pds-divider.entry.cjs.js.map +0 -1
  574. package/dist/cjs/pds-dropdown-menu-item.entry.cjs.js.map +0 -1
  575. package/dist/cjs/pds-dropdown-menu-separator.entry.cjs.js.map +0 -1
  576. package/dist/cjs/pds-dropdown-menu.entry.cjs.js.map +0 -1
  577. package/dist/cjs/pds-filter.entry.cjs.js.map +0 -1
  578. package/dist/cjs/pds-filters.entry.cjs.js.map +0 -1
  579. package/dist/cjs/pds-icon.entry.cjs.js.map +0 -1
  580. package/dist/cjs/pds-image.entry.cjs.js.map +0 -1
  581. package/dist/cjs/pds-input.entry.cjs.js.map +0 -1
  582. package/dist/cjs/pds-link.entry.cjs.js.map +0 -1
  583. package/dist/cjs/pds-loader.entry.cjs.js.map +0 -1
  584. package/dist/cjs/pds-modal-content.entry.cjs.js.map +0 -1
  585. package/dist/cjs/pds-modal-footer.entry.cjs.js.map +0 -1
  586. package/dist/cjs/pds-modal-header.entry.cjs.js.map +0 -1
  587. package/dist/cjs/pds-modal.entry.cjs.js.map +0 -1
  588. package/dist/cjs/pds-multiselect.entry.cjs.js.map +0 -1
  589. package/dist/cjs/pds-popover.entry.cjs.js.map +0 -1
  590. package/dist/cjs/pds-progress.entry.cjs.js.map +0 -1
  591. package/dist/cjs/pds-property.entry.cjs.js.map +0 -1
  592. package/dist/cjs/pds-radio-group.entry.cjs.js.map +0 -1
  593. package/dist/cjs/pds-radio.entry.cjs.js.map +0 -1
  594. package/dist/cjs/pds-row.entry.cjs.js.map +0 -1
  595. package/dist/cjs/pds-select.entry.cjs.js.map +0 -1
  596. package/dist/cjs/pds-sortable-item.entry.cjs.js.map +0 -1
  597. package/dist/cjs/pds-sortable.entry.cjs.js.map +0 -1
  598. package/dist/cjs/pds-switch.entry.cjs.js.map +0 -1
  599. package/dist/cjs/pds-tab.entry.cjs.js.map +0 -1
  600. package/dist/cjs/pds-table-body.entry.cjs.js.map +0 -1
  601. package/dist/cjs/pds-table-cell.entry.cjs.js.map +0 -1
  602. package/dist/cjs/pds-table-head-cell.entry.cjs.js.map +0 -1
  603. package/dist/cjs/pds-table-head.entry.cjs.js.map +0 -1
  604. package/dist/cjs/pds-table-row.entry.cjs.js.map +0 -1
  605. package/dist/cjs/pds-table.entry.cjs.js.map +0 -1
  606. package/dist/cjs/pds-tabpanel.entry.cjs.js.map +0 -1
  607. package/dist/cjs/pds-tabs.entry.cjs.js.map +0 -1
  608. package/dist/cjs/pds-text.entry.cjs.js.map +0 -1
  609. package/dist/cjs/pds-textarea.entry.cjs.js.map +0 -1
  610. package/dist/cjs/pds-toast.entry.cjs.js.map +0 -1
  611. package/dist/cjs/pds-tooltip.entry.cjs.js.map +0 -1
  612. package/dist/cjs/pine-core.cjs.js.map +0 -1
  613. package/dist/cjs/scroll-2XcoE_6Q.js.map +0 -1
  614. package/dist/cjs/truncation-tooltip-CVzAha5B.js.map +0 -1
  615. package/dist/cjs/utils-7jx8T2mW.js.map +0 -1
  616. package/dist/collection/components/_internal/pds-label/pds-label.js.map +0 -1
  617. package/dist/collection/components/pds-accordion/pds-accordion.js.map +0 -1
  618. package/dist/collection/components/pds-alert/pds-alert.js.map +0 -1
  619. package/dist/collection/components/pds-avatar/pds-avatar.js.map +0 -1
  620. package/dist/collection/components/pds-box/pds-box.js.map +0 -1
  621. package/dist/collection/components/pds-button/pds-button.js.map +0 -1
  622. package/dist/collection/components/pds-checkbox/checkbox-interface.js.map +0 -1
  623. package/dist/collection/components/pds-checkbox/pds-checkbox.js.map +0 -1
  624. package/dist/collection/components/pds-chip/pds-chip.js.map +0 -1
  625. package/dist/collection/components/pds-combobox/combobox-interface.js.map +0 -1
  626. package/dist/collection/components/pds-combobox/pds-combobox.js.map +0 -1
  627. package/dist/collection/components/pds-container/pds-container.js.map +0 -1
  628. package/dist/collection/components/pds-copytext/pds-copytext.js.map +0 -1
  629. package/dist/collection/components/pds-divider/pds-divider.js.map +0 -1
  630. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js.map +0 -1
  631. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js.map +0 -1
  632. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js.map +0 -1
  633. package/dist/collection/components/pds-filters/pds-filter/filter-interface.js.map +0 -1
  634. package/dist/collection/components/pds-filters/pds-filter/pds-filter.js.map +0 -1
  635. package/dist/collection/components/pds-filters/pds-filters.js.map +0 -1
  636. package/dist/collection/components/pds-image/pds-image.js.map +0 -1
  637. package/dist/collection/components/pds-input/input-interface.js.map +0 -1
  638. package/dist/collection/components/pds-input/pds-input.js.map +0 -1
  639. package/dist/collection/components/pds-link/pds-link.js.map +0 -1
  640. package/dist/collection/components/pds-loader/pds-loader.js.map +0 -1
  641. package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js.map +0 -1
  642. package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js.map +0 -1
  643. package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js.map +0 -1
  644. package/dist/collection/components/pds-modal/pds-modal.js.map +0 -1
  645. package/dist/collection/components/pds-modal/test/mock-pds-modal.js.map +0 -1
  646. package/dist/collection/components/pds-multiselect/multiselect-interface.js.map +0 -1
  647. package/dist/collection/components/pds-multiselect/pds-multiselect.js.map +0 -1
  648. package/dist/collection/components/pds-popover/pds-popover.js.map +0 -1
  649. package/dist/collection/components/pds-popover/popover-interface.js.map +0 -1
  650. package/dist/collection/components/pds-progress/pds-progress.js.map +0 -1
  651. package/dist/collection/components/pds-property/pds-property.js.map +0 -1
  652. package/dist/collection/components/pds-radio/pds-radio.js.map +0 -1
  653. package/dist/collection/components/pds-radio-group/pds-radio-group.js.map +0 -1
  654. package/dist/collection/components/pds-radio-group/radio-group-interface.js.map +0 -1
  655. package/dist/collection/components/pds-row/pds-row.js.map +0 -1
  656. package/dist/collection/components/pds-select/pds-select.js.map +0 -1
  657. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js.map +0 -1
  658. package/dist/collection/components/pds-sortable/pds-sortable.js.map +0 -1
  659. package/dist/collection/components/pds-sortable/sortable-interface.js.map +0 -1
  660. package/dist/collection/components/pds-switch/pds-switch.js.map +0 -1
  661. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js.map +0 -1
  662. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js.map +0 -1
  663. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js.map +0 -1
  664. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js.map +0 -1
  665. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js.map +0 -1
  666. package/dist/collection/components/pds-table/pds-table.js.map +0 -1
  667. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js.map +0 -1
  668. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js.map +0 -1
  669. package/dist/collection/components/pds-tabs/pds-tabs.js.map +0 -1
  670. package/dist/collection/components/pds-text/pds-text.js.map +0 -1
  671. package/dist/collection/components/pds-textarea/pds-textarea.js.map +0 -1
  672. package/dist/collection/components/pds-textarea/textarea-interface.js.map +0 -1
  673. package/dist/collection/components/pds-toast/pds-toast.js.map +0 -1
  674. package/dist/collection/components/pds-tooltip/pds-tooltip.js.map +0 -1
  675. package/dist/collection/global/pine-ui-global.js.map +0 -1
  676. package/dist/collection/index.js.map +0 -1
  677. package/dist/collection/utils/attributes.js.map +0 -1
  678. package/dist/collection/utils/closest.js.map +0 -1
  679. package/dist/collection/utils/form.js.map +0 -1
  680. package/dist/collection/utils/interfaces.js.map +0 -1
  681. package/dist/collection/utils/overlay.js.map +0 -1
  682. package/dist/collection/utils/scroll.js.map +0 -1
  683. package/dist/collection/utils/test/axe.js.map +0 -1
  684. package/dist/collection/utils/truncation-tooltip.js.map +0 -1
  685. package/dist/collection/utils/types.js.map +0 -1
  686. package/dist/collection/utils/utils.js.map +0 -1
  687. package/dist/esm/attributes-C0M1gTKv.js.map +0 -1
  688. package/dist/esm/closest-DnUJodVd.js.map +0 -1
  689. package/dist/esm/floating-ui.dom-DDtwbwIl.js.map +0 -1
  690. package/dist/esm/form-C3xDZBme.js.map +0 -1
  691. package/dist/esm/index-B2f84Zog.js.map +0 -1
  692. package/dist/esm/index-D4ys0pep.js.map +0 -1
  693. package/dist/esm/index.js.map +0 -1
  694. package/dist/esm/loader.js.map +0 -1
  695. package/dist/esm/mock-pds-modal.entry.js.map +0 -1
  696. package/dist/esm/pds-accordion.entry.js.map +0 -1
  697. package/dist/esm/pds-alert.entry.js.map +0 -1
  698. package/dist/esm/pds-avatar.entry.js.map +0 -1
  699. package/dist/esm/pds-box.entry.js.map +0 -1
  700. package/dist/esm/pds-button.entry.js.map +0 -1
  701. package/dist/esm/pds-checkbox.entry.js.map +0 -1
  702. package/dist/esm/pds-chip.entry.js.map +0 -1
  703. package/dist/esm/pds-combobox.entry.js.map +0 -1
  704. package/dist/esm/pds-container.entry.js.map +0 -1
  705. package/dist/esm/pds-copytext.entry.js.map +0 -1
  706. package/dist/esm/pds-divider.entry.js.map +0 -1
  707. package/dist/esm/pds-dropdown-menu-item.entry.js.map +0 -1
  708. package/dist/esm/pds-dropdown-menu-separator.entry.js.map +0 -1
  709. package/dist/esm/pds-dropdown-menu.entry.js.map +0 -1
  710. package/dist/esm/pds-filter.entry.js.map +0 -1
  711. package/dist/esm/pds-filters.entry.js.map +0 -1
  712. package/dist/esm/pds-icon.entry.js.map +0 -1
  713. package/dist/esm/pds-image.entry.js.map +0 -1
  714. package/dist/esm/pds-input.entry.js.map +0 -1
  715. package/dist/esm/pds-link.entry.js.map +0 -1
  716. package/dist/esm/pds-loader.entry.js.map +0 -1
  717. package/dist/esm/pds-modal-content.entry.js.map +0 -1
  718. package/dist/esm/pds-modal-footer.entry.js.map +0 -1
  719. package/dist/esm/pds-modal-header.entry.js.map +0 -1
  720. package/dist/esm/pds-modal.entry.js.map +0 -1
  721. package/dist/esm/pds-multiselect.entry.js.map +0 -1
  722. package/dist/esm/pds-popover.entry.js.map +0 -1
  723. package/dist/esm/pds-progress.entry.js.map +0 -1
  724. package/dist/esm/pds-property.entry.js.map +0 -1
  725. package/dist/esm/pds-radio-group.entry.js.map +0 -1
  726. package/dist/esm/pds-radio.entry.js.map +0 -1
  727. package/dist/esm/pds-row.entry.js.map +0 -1
  728. package/dist/esm/pds-select.entry.js.map +0 -1
  729. package/dist/esm/pds-sortable-item.entry.js.map +0 -1
  730. package/dist/esm/pds-sortable.entry.js.map +0 -1
  731. package/dist/esm/pds-switch.entry.js.map +0 -1
  732. package/dist/esm/pds-tab.entry.js.map +0 -1
  733. package/dist/esm/pds-table-body.entry.js.map +0 -1
  734. package/dist/esm/pds-table-cell.entry.js.map +0 -1
  735. package/dist/esm/pds-table-head-cell.entry.js.map +0 -1
  736. package/dist/esm/pds-table-head.entry.js.map +0 -1
  737. package/dist/esm/pds-table-row.entry.js.map +0 -1
  738. package/dist/esm/pds-table.entry.js.map +0 -1
  739. package/dist/esm/pds-tabpanel.entry.js.map +0 -1
  740. package/dist/esm/pds-tabs.entry.js.map +0 -1
  741. package/dist/esm/pds-text.entry.js.map +0 -1
  742. package/dist/esm/pds-textarea.entry.js.map +0 -1
  743. package/dist/esm/pds-toast.entry.js.map +0 -1
  744. package/dist/esm/pds-tooltip.entry.js.map +0 -1
  745. package/dist/esm/pine-core.js.map +0 -1
  746. package/dist/esm/scroll-DtgUQhjl.js.map +0 -1
  747. package/dist/esm/truncation-tooltip-Blk4GigP.js.map +0 -1
  748. package/dist/esm/utils-tJa4KYNO.js.map +0 -1
  749. package/dist/esm-es5/attributes-C0M1gTKv.js.map +0 -1
  750. package/dist/esm-es5/closest-DnUJodVd.js.map +0 -1
  751. package/dist/esm-es5/floating-ui.dom-DDtwbwIl.js.map +0 -1
  752. package/dist/esm-es5/form-C3xDZBme.js.map +0 -1
  753. package/dist/esm-es5/index-B2f84Zog.js +0 -3
  754. package/dist/esm-es5/index-B2f84Zog.js.map +0 -1
  755. package/dist/esm-es5/index-D4ys0pep.js.map +0 -1
  756. package/dist/esm-es5/index.js.map +0 -1
  757. package/dist/esm-es5/loader.js.map +0 -1
  758. package/dist/esm-es5/mock-pds-modal.entry.js.map +0 -1
  759. package/dist/esm-es5/pds-accordion.entry.js.map +0 -1
  760. package/dist/esm-es5/pds-alert.entry.js.map +0 -1
  761. package/dist/esm-es5/pds-avatar.entry.js.map +0 -1
  762. package/dist/esm-es5/pds-box.entry.js.map +0 -1
  763. package/dist/esm-es5/pds-button.entry.js.map +0 -1
  764. package/dist/esm-es5/pds-checkbox.entry.js.map +0 -1
  765. package/dist/esm-es5/pds-chip.entry.js.map +0 -1
  766. package/dist/esm-es5/pds-combobox.entry.js.map +0 -1
  767. package/dist/esm-es5/pds-container.entry.js.map +0 -1
  768. package/dist/esm-es5/pds-copytext.entry.js.map +0 -1
  769. package/dist/esm-es5/pds-divider.entry.js.map +0 -1
  770. package/dist/esm-es5/pds-dropdown-menu-item.entry.js.map +0 -1
  771. package/dist/esm-es5/pds-dropdown-menu-separator.entry.js.map +0 -1
  772. package/dist/esm-es5/pds-dropdown-menu.entry.js.map +0 -1
  773. package/dist/esm-es5/pds-filter.entry.js.map +0 -1
  774. package/dist/esm-es5/pds-filters.entry.js.map +0 -1
  775. package/dist/esm-es5/pds-icon.entry.js.map +0 -1
  776. package/dist/esm-es5/pds-image.entry.js.map +0 -1
  777. package/dist/esm-es5/pds-input.entry.js.map +0 -1
  778. package/dist/esm-es5/pds-link.entry.js.map +0 -1
  779. package/dist/esm-es5/pds-loader.entry.js.map +0 -1
  780. package/dist/esm-es5/pds-modal-content.entry.js.map +0 -1
  781. package/dist/esm-es5/pds-modal-footer.entry.js.map +0 -1
  782. package/dist/esm-es5/pds-modal-header.entry.js.map +0 -1
  783. package/dist/esm-es5/pds-modal.entry.js.map +0 -1
  784. package/dist/esm-es5/pds-multiselect.entry.js.map +0 -1
  785. package/dist/esm-es5/pds-popover.entry.js.map +0 -1
  786. package/dist/esm-es5/pds-progress.entry.js.map +0 -1
  787. package/dist/esm-es5/pds-property.entry.js.map +0 -1
  788. package/dist/esm-es5/pds-radio-group.entry.js.map +0 -1
  789. package/dist/esm-es5/pds-radio.entry.js.map +0 -1
  790. package/dist/esm-es5/pds-row.entry.js.map +0 -1
  791. package/dist/esm-es5/pds-select.entry.js.map +0 -1
  792. package/dist/esm-es5/pds-sortable-item.entry.js.map +0 -1
  793. package/dist/esm-es5/pds-sortable.entry.js.map +0 -1
  794. package/dist/esm-es5/pds-switch.entry.js.map +0 -1
  795. package/dist/esm-es5/pds-tab.entry.js.map +0 -1
  796. package/dist/esm-es5/pds-table-body.entry.js.map +0 -1
  797. package/dist/esm-es5/pds-table-cell.entry.js.map +0 -1
  798. package/dist/esm-es5/pds-table-head-cell.entry.js.map +0 -1
  799. package/dist/esm-es5/pds-table-head.entry.js.map +0 -1
  800. package/dist/esm-es5/pds-table-row.entry.js.map +0 -1
  801. package/dist/esm-es5/pds-table.entry.js.map +0 -1
  802. package/dist/esm-es5/pds-tabpanel.entry.js.map +0 -1
  803. package/dist/esm-es5/pds-tabs.entry.js.map +0 -1
  804. package/dist/esm-es5/pds-text.entry.js.map +0 -1
  805. package/dist/esm-es5/pds-textarea.entry.js.map +0 -1
  806. package/dist/esm-es5/pds-toast.entry.js.map +0 -1
  807. package/dist/esm-es5/pds-tooltip.entry.js.map +0 -1
  808. package/dist/esm-es5/pine-core.js.map +0 -1
  809. package/dist/esm-es5/scroll-DtgUQhjl.js.map +0 -1
  810. package/dist/esm-es5/truncation-tooltip-Blk4GigP.js.map +0 -1
  811. package/dist/esm-es5/utils-tJa4KYNO.js.map +0 -1
  812. package/dist/pine-core/index.esm.js.map +0 -1
  813. package/dist/pine-core/loader.esm.js.map +0 -1
  814. package/dist/pine-core/mock-pds-modal.entry.esm.js.map +0 -1
  815. package/dist/pine-core/p-037dbdcd.system.entry.js +0 -2
  816. package/dist/pine-core/p-037dbdcd.system.entry.js.map +0 -1
  817. package/dist/pine-core/p-06713f25.entry.js +0 -2
  818. package/dist/pine-core/p-06713f25.entry.js.map +0 -1
  819. package/dist/pine-core/p-0977b2dd.entry.js +0 -2
  820. package/dist/pine-core/p-0977b2dd.entry.js.map +0 -1
  821. package/dist/pine-core/p-099e9f9b.system.entry.js +0 -2
  822. package/dist/pine-core/p-099e9f9b.system.entry.js.map +0 -1
  823. package/dist/pine-core/p-0a7115f0.entry.js +0 -2
  824. package/dist/pine-core/p-0a7115f0.entry.js.map +0 -1
  825. package/dist/pine-core/p-0c1ab384.system.entry.js +0 -2
  826. package/dist/pine-core/p-0c1ab384.system.entry.js.map +0 -1
  827. package/dist/pine-core/p-0dee7449.system.entry.js +0 -2
  828. package/dist/pine-core/p-0dee7449.system.entry.js.map +0 -1
  829. package/dist/pine-core/p-102d0dd6.system.entry.js +0 -2
  830. package/dist/pine-core/p-102d0dd6.system.entry.js.map +0 -1
  831. package/dist/pine-core/p-10ebecc5.entry.js +0 -2
  832. package/dist/pine-core/p-10ebecc5.entry.js.map +0 -1
  833. package/dist/pine-core/p-1598f3af.entry.js +0 -2
  834. package/dist/pine-core/p-1598f3af.entry.js.map +0 -1
  835. package/dist/pine-core/p-1c32102e.system.entry.js +0 -2
  836. package/dist/pine-core/p-1c32102e.system.entry.js.map +0 -1
  837. package/dist/pine-core/p-2258b31b.system.entry.js +0 -2
  838. package/dist/pine-core/p-2258b31b.system.entry.js.map +0 -1
  839. package/dist/pine-core/p-275fa74c.system.entry.js +0 -2
  840. package/dist/pine-core/p-275fa74c.system.entry.js.map +0 -1
  841. package/dist/pine-core/p-27fc0737.system.entry.js +0 -2
  842. package/dist/pine-core/p-27fc0737.system.entry.js.map +0 -1
  843. package/dist/pine-core/p-32ad2807.system.entry.js +0 -2
  844. package/dist/pine-core/p-32ad2807.system.entry.js.map +0 -1
  845. package/dist/pine-core/p-33544ed1.system.entry.js +0 -2
  846. package/dist/pine-core/p-33544ed1.system.entry.js.map +0 -1
  847. package/dist/pine-core/p-34763aae.system.entry.js +0 -2
  848. package/dist/pine-core/p-34763aae.system.entry.js.map +0 -1
  849. package/dist/pine-core/p-36070380.system.entry.js +0 -2
  850. package/dist/pine-core/p-36070380.system.entry.js.map +0 -1
  851. package/dist/pine-core/p-3625bc45.entry.js +0 -2
  852. package/dist/pine-core/p-3625bc45.entry.js.map +0 -1
  853. package/dist/pine-core/p-3b087f24.entry.js +0 -2
  854. package/dist/pine-core/p-3b087f24.entry.js.map +0 -1
  855. package/dist/pine-core/p-3f66c070.entry.js +0 -2
  856. package/dist/pine-core/p-3f66c070.entry.js.map +0 -1
  857. package/dist/pine-core/p-407aad2b.system.entry.js +0 -2
  858. package/dist/pine-core/p-407aad2b.system.entry.js.map +0 -1
  859. package/dist/pine-core/p-44ca9b92.entry.js +0 -2
  860. package/dist/pine-core/p-44ca9b92.entry.js.map +0 -1
  861. package/dist/pine-core/p-476db791.entry.js +0 -2
  862. package/dist/pine-core/p-476db791.entry.js.map +0 -1
  863. package/dist/pine-core/p-4780403d.system.entry.js +0 -2
  864. package/dist/pine-core/p-4780403d.system.entry.js.map +0 -1
  865. package/dist/pine-core/p-48ac6873.entry.js +0 -2
  866. package/dist/pine-core/p-48ac6873.entry.js.map +0 -1
  867. package/dist/pine-core/p-4FBDaIH3.system.js.map +0 -1
  868. package/dist/pine-core/p-4ede20e6.entry.js +0 -2
  869. package/dist/pine-core/p-4ede20e6.entry.js.map +0 -1
  870. package/dist/pine-core/p-4f2a48cb.system.entry.js +0 -2
  871. package/dist/pine-core/p-4f2a48cb.system.entry.js.map +0 -1
  872. package/dist/pine-core/p-4f440dd4.entry.js +0 -2
  873. package/dist/pine-core/p-4f440dd4.entry.js.map +0 -1
  874. package/dist/pine-core/p-4jrX5aRd.system.js.map +0 -1
  875. package/dist/pine-core/p-51e47e6e.system.entry.js +0 -2
  876. package/dist/pine-core/p-51e47e6e.system.entry.js.map +0 -1
  877. package/dist/pine-core/p-52411757.system.entry.js +0 -2
  878. package/dist/pine-core/p-52411757.system.entry.js.map +0 -1
  879. package/dist/pine-core/p-557005a0.entry.js +0 -2
  880. package/dist/pine-core/p-557005a0.entry.js.map +0 -1
  881. package/dist/pine-core/p-5e117b98.entry.js +0 -2
  882. package/dist/pine-core/p-5e117b98.entry.js.map +0 -1
  883. package/dist/pine-core/p-639012b9.system.entry.js +0 -2
  884. package/dist/pine-core/p-639012b9.system.entry.js.map +0 -1
  885. package/dist/pine-core/p-643b01ad.entry.js +0 -2
  886. package/dist/pine-core/p-643b01ad.entry.js.map +0 -1
  887. package/dist/pine-core/p-6623b257.system.entry.js +0 -2
  888. package/dist/pine-core/p-6623b257.system.entry.js.map +0 -1
  889. package/dist/pine-core/p-74ff4d96.system.entry.js +0 -2
  890. package/dist/pine-core/p-74ff4d96.system.entry.js.map +0 -1
  891. package/dist/pine-core/p-77327e1b.system.entry.js +0 -2
  892. package/dist/pine-core/p-77327e1b.system.entry.js.map +0 -1
  893. package/dist/pine-core/p-774ecbd4.entry.js +0 -2
  894. package/dist/pine-core/p-774ecbd4.entry.js.map +0 -1
  895. package/dist/pine-core/p-7926dc93.entry.js +0 -2
  896. package/dist/pine-core/p-7926dc93.entry.js.map +0 -1
  897. package/dist/pine-core/p-7a3eccef.entry.js +0 -2
  898. package/dist/pine-core/p-7a3eccef.entry.js.map +0 -1
  899. package/dist/pine-core/p-7acb131c.system.entry.js +0 -2
  900. package/dist/pine-core/p-7acb131c.system.entry.js.map +0 -1
  901. package/dist/pine-core/p-81a3e32b.entry.js +0 -2
  902. package/dist/pine-core/p-81a3e32b.entry.js.map +0 -1
  903. package/dist/pine-core/p-848763b6.system.entry.js +0 -2
  904. package/dist/pine-core/p-848763b6.system.entry.js.map +0 -1
  905. package/dist/pine-core/p-85e889c3.system.entry.js.map +0 -1
  906. package/dist/pine-core/p-8669e0e3.system.entry.js +0 -2
  907. package/dist/pine-core/p-8669e0e3.system.entry.js.map +0 -1
  908. package/dist/pine-core/p-8735cb58.entry.js +0 -2
  909. package/dist/pine-core/p-8735cb58.entry.js.map +0 -1
  910. package/dist/pine-core/p-8b3aeaf9.system.entry.js +0 -2
  911. package/dist/pine-core/p-8b3aeaf9.system.entry.js.map +0 -1
  912. package/dist/pine-core/p-8b7aa53d.entry.js +0 -2
  913. package/dist/pine-core/p-8b7aa53d.entry.js.map +0 -1
  914. package/dist/pine-core/p-8c97fcb1.entry.js +0 -2
  915. package/dist/pine-core/p-8c97fcb1.entry.js.map +0 -1
  916. package/dist/pine-core/p-8c9f8ca6.entry.js +0 -2
  917. package/dist/pine-core/p-8c9f8ca6.entry.js.map +0 -1
  918. package/dist/pine-core/p-904e8d9d.system.entry.js +0 -2
  919. package/dist/pine-core/p-904e8d9d.system.entry.js.map +0 -1
  920. package/dist/pine-core/p-91bea052.entry.js +0 -2
  921. package/dist/pine-core/p-91bea052.entry.js.map +0 -1
  922. package/dist/pine-core/p-9230df2a.system.entry.js +0 -2
  923. package/dist/pine-core/p-9230df2a.system.entry.js.map +0 -1
  924. package/dist/pine-core/p-94a09b06.entry.js +0 -2
  925. package/dist/pine-core/p-94a09b06.entry.js.map +0 -1
  926. package/dist/pine-core/p-94d4d1de.entry.js +0 -3
  927. package/dist/pine-core/p-94d4d1de.entry.js.map +0 -1
  928. package/dist/pine-core/p-984db3fc.entry.js +0 -2
  929. package/dist/pine-core/p-984db3fc.entry.js.map +0 -1
  930. package/dist/pine-core/p-988d1723.system.entry.js +0 -2
  931. package/dist/pine-core/p-988d1723.system.entry.js.map +0 -1
  932. package/dist/pine-core/p-98dabbbf.entry.js +0 -2
  933. package/dist/pine-core/p-98dabbbf.entry.js.map +0 -1
  934. package/dist/pine-core/p-9a3c9d15.system.entry.js +0 -2
  935. package/dist/pine-core/p-9a3c9d15.system.entry.js.map +0 -1
  936. package/dist/pine-core/p-9b3aedeb.system.entry.js +0 -2
  937. package/dist/pine-core/p-9b3aedeb.system.entry.js.map +0 -1
  938. package/dist/pine-core/p-9ce56712.system.entry.js +0 -2
  939. package/dist/pine-core/p-9ce56712.system.entry.js.map +0 -1
  940. package/dist/pine-core/p-9e48d1ea.system.entry.js +0 -2
  941. package/dist/pine-core/p-9e48d1ea.system.entry.js.map +0 -1
  942. package/dist/pine-core/p-9e5c58c6.entry.js +0 -8
  943. package/dist/pine-core/p-9e5c58c6.entry.js.map +0 -1
  944. package/dist/pine-core/p-B-I9BXj1.system.js.map +0 -1
  945. package/dist/pine-core/p-B-nnQT8K.system.js.map +0 -1
  946. package/dist/pine-core/p-B1u-QvFn.system.js.map +0 -1
  947. package/dist/pine-core/p-B2f84Zog.js +0 -3
  948. package/dist/pine-core/p-B2f84Zog.js.map +0 -1
  949. package/dist/pine-core/p-BC7kndqW.system.js.map +0 -1
  950. package/dist/pine-core/p-BFAhunk3.system.js.map +0 -1
  951. package/dist/pine-core/p-BG6uGRQj.system.js.map +0 -1
  952. package/dist/pine-core/p-BJQiqlL7.system.js.map +0 -1
  953. package/dist/pine-core/p-BLg534X3.system.js.map +0 -1
  954. package/dist/pine-core/p-BNSGedhN.js.map +0 -1
  955. package/dist/pine-core/p-BT-iITx_.system.js.map +0 -1
  956. package/dist/pine-core/p-BTsajr3h.system.js.map +0 -1
  957. package/dist/pine-core/p-BcCpTdwz.system.js.map +0 -1
  958. package/dist/pine-core/p-BhQhw0S3.system.js.map +0 -1
  959. package/dist/pine-core/p-Bkk7A0W9.system.js.map +0 -1
  960. package/dist/pine-core/p-BmOvsRx7.system.js.map +0 -1
  961. package/dist/pine-core/p-BrLs99ML.system.js.map +0 -1
  962. package/dist/pine-core/p-BtfqzsXS.system.js.map +0 -1
  963. package/dist/pine-core/p-BvJkwltO.system.js.map +0 -1
  964. package/dist/pine-core/p-BvV4-w8H.system.js.map +0 -1
  965. package/dist/pine-core/p-C0M1gTKv.js.map +0 -1
  966. package/dist/pine-core/p-C3TuSlI7.system.js.map +0 -1
  967. package/dist/pine-core/p-C3xDZBme.js.map +0 -1
  968. package/dist/pine-core/p-C5jXV4WJ.system.js.map +0 -1
  969. package/dist/pine-core/p-C5qxTQb1.system.js.map +0 -1
  970. package/dist/pine-core/p-C62JIZmE.system.js.map +0 -1
  971. package/dist/pine-core/p-C6yvFUy3.system.js.map +0 -1
  972. package/dist/pine-core/p-CCRLZO4N.system.js.map +0 -1
  973. package/dist/pine-core/p-CD-PjU09.system.js.map +0 -1
  974. package/dist/pine-core/p-CI-oL5TR.system.js.map +0 -1
  975. package/dist/pine-core/p-CIbXcB4O.system.js.map +0 -1
  976. package/dist/pine-core/p-CIe6-SsT.system.js.map +0 -1
  977. package/dist/pine-core/p-CRCxGYgw.system.js.map +0 -1
  978. package/dist/pine-core/p-CSVND2Gt.system.js.map +0 -1
  979. package/dist/pine-core/p-CUEE9EMe.system.js.map +0 -1
  980. package/dist/pine-core/p-CXImmjF5.system.js.map +0 -1
  981. package/dist/pine-core/p-C_g3FnvJ.system.js.map +0 -1
  982. package/dist/pine-core/p-CmNZDo8q.system.js.map +0 -1
  983. package/dist/pine-core/p-Cn98QWqb.system.js.map +0 -1
  984. package/dist/pine-core/p-Cqgvmo2o.system.js +0 -2
  985. package/dist/pine-core/p-Cqgvmo2o.system.js.map +0 -1
  986. package/dist/pine-core/p-Cu24FhMY.system.js.map +0 -1
  987. package/dist/pine-core/p-CwEjYXkp.system.js.map +0 -1
  988. package/dist/pine-core/p-D4ys0pep.js.map +0 -1
  989. package/dist/pine-core/p-DA3fC_kX.system.js.map +0 -1
  990. package/dist/pine-core/p-DDtwbwIl.js.map +0 -1
  991. package/dist/pine-core/p-DG_z5J3G.system.js.map +0 -1
  992. package/dist/pine-core/p-DL3JCnpO.system.js.map +0 -1
  993. package/dist/pine-core/p-DSlRwx2e.system.js.map +0 -1
  994. package/dist/pine-core/p-DVra397g.system.js.map +0 -1
  995. package/dist/pine-core/p-DYlgS5d7.system.js +0 -3
  996. package/dist/pine-core/p-DYlgS5d7.system.js.map +0 -1
  997. package/dist/pine-core/p-DeVgpUr5.system.js.map +0 -1
  998. package/dist/pine-core/p-DnUJodVd.js.map +0 -1
  999. package/dist/pine-core/p-DtgUQhjl.js.map +0 -1
  1000. package/dist/pine-core/p-Dxrjs-vy.system.js.map +0 -1
  1001. package/dist/pine-core/p-H7VDsgsr.system.js.map +0 -1
  1002. package/dist/pine-core/p-JwuGXyPc.system.js.map +0 -1
  1003. package/dist/pine-core/p-U1PewsWZ.system.js.map +0 -1
  1004. package/dist/pine-core/p-UILRZV99.system.js.map +0 -1
  1005. package/dist/pine-core/p-V-ORMWaS.system.js.map +0 -1
  1006. package/dist/pine-core/p-W7E5TRNL.system.js.map +0 -1
  1007. package/dist/pine-core/p-YWpyar7R.system.js.map +0 -1
  1008. package/dist/pine-core/p-Yfy85hdp.system.js.map +0 -1
  1009. package/dist/pine-core/p-ZrPaY2bh.system.js.map +0 -1
  1010. package/dist/pine-core/p-a30b386f.entry.js +0 -2
  1011. package/dist/pine-core/p-a30b386f.entry.js.map +0 -1
  1012. package/dist/pine-core/p-a5014407.system.entry.js +0 -2
  1013. package/dist/pine-core/p-a5014407.system.entry.js.map +0 -1
  1014. package/dist/pine-core/p-a695ff4c.system.entry.js +0 -2
  1015. package/dist/pine-core/p-a695ff4c.system.entry.js.map +0 -1
  1016. package/dist/pine-core/p-a8c49f8e.entry.js +0 -2
  1017. package/dist/pine-core/p-a8c49f8e.entry.js.map +0 -1
  1018. package/dist/pine-core/p-ae74a4b6.system.entry.js +0 -2
  1019. package/dist/pine-core/p-ae74a4b6.system.entry.js.map +0 -1
  1020. package/dist/pine-core/p-b1cde22a.entry.js +0 -2
  1021. package/dist/pine-core/p-b1cde22a.entry.js.map +0 -1
  1022. package/dist/pine-core/p-b9340fb1.system.entry.js +0 -2
  1023. package/dist/pine-core/p-b9340fb1.system.entry.js.map +0 -1
  1024. package/dist/pine-core/p-b9fcc3f8.system.entry.js +0 -2
  1025. package/dist/pine-core/p-b9fcc3f8.system.entry.js.map +0 -1
  1026. package/dist/pine-core/p-bIvjoz7p.system.js.map +0 -1
  1027. package/dist/pine-core/p-bc8f61d1.entry.js +0 -2
  1028. package/dist/pine-core/p-bc8f61d1.entry.js.map +0 -1
  1029. package/dist/pine-core/p-bea013d1.entry.js +0 -2
  1030. package/dist/pine-core/p-bea013d1.entry.js.map +0 -1
  1031. package/dist/pine-core/p-c026479a.system.entry.js +0 -2
  1032. package/dist/pine-core/p-c026479a.system.entry.js.map +0 -1
  1033. package/dist/pine-core/p-c9784d20.system.entry.js +0 -4
  1034. package/dist/pine-core/p-c9784d20.system.entry.js.map +0 -1
  1035. package/dist/pine-core/p-c9b06db1.system.entry.js +0 -2
  1036. package/dist/pine-core/p-c9b06db1.system.entry.js.map +0 -1
  1037. package/dist/pine-core/p-cab14421.entry.js +0 -2
  1038. package/dist/pine-core/p-cab14421.entry.js.map +0 -1
  1039. package/dist/pine-core/p-d5fcdcdd.entry.js +0 -2
  1040. package/dist/pine-core/p-d5fcdcdd.entry.js.map +0 -1
  1041. package/dist/pine-core/p-d86e20b5.system.entry.js +0 -2
  1042. package/dist/pine-core/p-d86e20b5.system.entry.js.map +0 -1
  1043. package/dist/pine-core/p-d9354ad3.system.entry.js +0 -2
  1044. package/dist/pine-core/p-d9354ad3.system.entry.js.map +0 -1
  1045. package/dist/pine-core/p-dab76f15.entry.js +0 -2
  1046. package/dist/pine-core/p-dab76f15.entry.js.map +0 -1
  1047. package/dist/pine-core/p-db16d1fe.entry.js +0 -2
  1048. package/dist/pine-core/p-db16d1fe.entry.js.map +0 -1
  1049. package/dist/pine-core/p-db63f83b.system.entry.js +0 -2
  1050. package/dist/pine-core/p-db63f83b.system.entry.js.map +0 -1
  1051. package/dist/pine-core/p-dd3ea74e.system.entry.js +0 -2
  1052. package/dist/pine-core/p-dd3ea74e.system.entry.js.map +0 -1
  1053. package/dist/pine-core/p-ddb48534.entry.js +0 -2
  1054. package/dist/pine-core/p-ddb48534.entry.js.map +0 -1
  1055. package/dist/pine-core/p-de9f43b6.entry.js +0 -2
  1056. package/dist/pine-core/p-de9f43b6.entry.js.map +0 -1
  1057. package/dist/pine-core/p-e25da259.entry.js +0 -2
  1058. package/dist/pine-core/p-e25da259.entry.js.map +0 -1
  1059. package/dist/pine-core/p-e288dc89.system.entry.js +0 -2
  1060. package/dist/pine-core/p-e288dc89.system.entry.js.map +0 -1
  1061. package/dist/pine-core/p-ea5c42b8.system.entry.js +0 -2
  1062. package/dist/pine-core/p-ea5c42b8.system.entry.js.map +0 -1
  1063. package/dist/pine-core/p-ed5d5be6.entry.js +0 -2
  1064. package/dist/pine-core/p-ed5d5be6.entry.js.map +0 -1
  1065. package/dist/pine-core/p-ef081f0f.entry.js +0 -2
  1066. package/dist/pine-core/p-ef081f0f.entry.js.map +0 -1
  1067. package/dist/pine-core/p-f09c5021.entry.js +0 -2
  1068. package/dist/pine-core/p-f09c5021.entry.js.map +0 -1
  1069. package/dist/pine-core/p-f201cf57.entry.js +0 -2
  1070. package/dist/pine-core/p-f201cf57.entry.js.map +0 -1
  1071. package/dist/pine-core/p-f20ab351.entry.js +0 -2
  1072. package/dist/pine-core/p-f20ab351.entry.js.map +0 -1
  1073. package/dist/pine-core/p-f2798581.entry.js +0 -2
  1074. package/dist/pine-core/p-f2798581.entry.js.map +0 -1
  1075. package/dist/pine-core/p-f2ca0cf8.entry.js +0 -2
  1076. package/dist/pine-core/p-f2ca0cf8.entry.js.map +0 -1
  1077. package/dist/pine-core/p-f77fad86.system.entry.js +0 -2
  1078. package/dist/pine-core/p-f77fad86.system.entry.js.map +0 -1
  1079. package/dist/pine-core/p-ff472f7c.system.entry.js +0 -2
  1080. package/dist/pine-core/p-ff472f7c.system.entry.js.map +0 -1
  1081. package/dist/pine-core/p-ff5b2c90.entry.js +0 -2
  1082. package/dist/pine-core/p-ff5b2c90.entry.js.map +0 -1
  1083. package/dist/pine-core/p-g4mFEadi.system.js.map +0 -1
  1084. package/dist/pine-core/p-kYMYDfJY.system.js.map +0 -1
  1085. package/dist/pine-core/p-tJa4KYNO.js.map +0 -1
  1086. package/dist/pine-core/p-vLxlRu4_.system.js.map +0 -1
  1087. package/dist/pine-core/p-ziMh7dwl.system.js.map +0 -1
  1088. package/dist/pine-core/pds-accordion.entry.esm.js.map +0 -1
  1089. package/dist/pine-core/pds-alert.entry.esm.js.map +0 -1
  1090. package/dist/pine-core/pds-avatar.entry.esm.js.map +0 -1
  1091. package/dist/pine-core/pds-box.entry.esm.js.map +0 -1
  1092. package/dist/pine-core/pds-button.entry.esm.js.map +0 -1
  1093. package/dist/pine-core/pds-checkbox.entry.esm.js.map +0 -1
  1094. package/dist/pine-core/pds-chip.entry.esm.js.map +0 -1
  1095. package/dist/pine-core/pds-combobox.entry.esm.js.map +0 -1
  1096. package/dist/pine-core/pds-container.entry.esm.js.map +0 -1
  1097. package/dist/pine-core/pds-copytext.entry.esm.js.map +0 -1
  1098. package/dist/pine-core/pds-divider.entry.esm.js.map +0 -1
  1099. package/dist/pine-core/pds-dropdown-menu-item.entry.esm.js.map +0 -1
  1100. package/dist/pine-core/pds-dropdown-menu-separator.entry.esm.js.map +0 -1
  1101. package/dist/pine-core/pds-dropdown-menu.entry.esm.js.map +0 -1
  1102. package/dist/pine-core/pds-filter.entry.esm.js.map +0 -1
  1103. package/dist/pine-core/pds-filters.entry.esm.js.map +0 -1
  1104. package/dist/pine-core/pds-icon.entry.esm.js.map +0 -1
  1105. package/dist/pine-core/pds-image.entry.esm.js.map +0 -1
  1106. package/dist/pine-core/pds-input.entry.esm.js.map +0 -1
  1107. package/dist/pine-core/pds-link.entry.esm.js.map +0 -1
  1108. package/dist/pine-core/pds-loader.entry.esm.js.map +0 -1
  1109. package/dist/pine-core/pds-modal-content.entry.esm.js.map +0 -1
  1110. package/dist/pine-core/pds-modal-footer.entry.esm.js.map +0 -1
  1111. package/dist/pine-core/pds-modal-header.entry.esm.js.map +0 -1
  1112. package/dist/pine-core/pds-modal.entry.esm.js.map +0 -1
  1113. package/dist/pine-core/pds-multiselect.entry.esm.js.map +0 -1
  1114. package/dist/pine-core/pds-popover.entry.esm.js.map +0 -1
  1115. package/dist/pine-core/pds-progress.entry.esm.js.map +0 -1
  1116. package/dist/pine-core/pds-property.entry.esm.js.map +0 -1
  1117. package/dist/pine-core/pds-radio-group.entry.esm.js.map +0 -1
  1118. package/dist/pine-core/pds-radio.entry.esm.js.map +0 -1
  1119. package/dist/pine-core/pds-row.entry.esm.js.map +0 -1
  1120. package/dist/pine-core/pds-select.entry.esm.js.map +0 -1
  1121. package/dist/pine-core/pds-sortable-item.entry.esm.js.map +0 -1
  1122. package/dist/pine-core/pds-sortable.entry.esm.js.map +0 -1
  1123. package/dist/pine-core/pds-switch.entry.esm.js.map +0 -1
  1124. package/dist/pine-core/pds-tab.entry.esm.js.map +0 -1
  1125. package/dist/pine-core/pds-table-body.entry.esm.js.map +0 -1
  1126. package/dist/pine-core/pds-table-cell.entry.esm.js.map +0 -1
  1127. package/dist/pine-core/pds-table-head-cell.entry.esm.js.map +0 -1
  1128. package/dist/pine-core/pds-table-head.entry.esm.js.map +0 -1
  1129. package/dist/pine-core/pds-table-row.entry.esm.js.map +0 -1
  1130. package/dist/pine-core/pds-table.entry.esm.js.map +0 -1
  1131. package/dist/pine-core/pds-tabpanel.entry.esm.js.map +0 -1
  1132. package/dist/pine-core/pds-tabs.entry.esm.js.map +0 -1
  1133. package/dist/pine-core/pds-text.entry.esm.js.map +0 -1
  1134. package/dist/pine-core/pds-textarea.entry.esm.js.map +0 -1
  1135. package/dist/pine-core/pds-toast.entry.esm.js.map +0 -1
  1136. package/dist/pine-core/pds-tooltip.entry.esm.js.map +0 -1
  1137. package/dist/pine-core/pine-core.esm.js.map +0 -1
  1138. package/dist/scripts/vscode-custom-data-generator.js.map +0 -1
  1139. package/dist/vscode.html-data.json +0 -10551
@@ -1,2958 +1,2 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { i as isSpecTest } from './form.js';
3
- import { c as computePosition, a as autoUpdate, o as offset, f as flip, s as shift } from './floating-ui.dom.js';
4
- import { d as debounceEvent } from './utils.js';
5
- import { d as defineCustomElement$5 } from './pds-box2.js';
6
- import { d as defineCustomElement$4 } from './pds-chip2.js';
7
- import { d as defineCustomElement$3 } from './pds-icon2.js';
8
- import { d as defineCustomElement$2 } from './pds-loader2.js';
9
-
10
- /*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */
11
-
12
- const {
13
- entries,
14
- setPrototypeOf,
15
- isFrozen,
16
- getPrototypeOf,
17
- getOwnPropertyDescriptor
18
- } = Object;
19
- let {
20
- freeze,
21
- seal,
22
- create
23
- } = Object; // eslint-disable-line import/no-mutable-exports
24
- let {
25
- apply,
26
- construct
27
- } = typeof Reflect !== 'undefined' && Reflect;
28
- if (!freeze) {
29
- freeze = function freeze(x) {
30
- return x;
31
- };
32
- }
33
- if (!seal) {
34
- seal = function seal(x) {
35
- return x;
36
- };
37
- }
38
- if (!apply) {
39
- apply = function apply(func, thisArg) {
40
- for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
41
- args[_key - 2] = arguments[_key];
42
- }
43
- return func.apply(thisArg, args);
44
- };
45
- }
46
- if (!construct) {
47
- construct = function construct(Func) {
48
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
49
- args[_key2 - 1] = arguments[_key2];
50
- }
51
- return new Func(...args);
52
- };
53
- }
54
- const arrayForEach = unapply(Array.prototype.forEach);
55
- const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
56
- const arrayPop = unapply(Array.prototype.pop);
57
- const arrayPush = unapply(Array.prototype.push);
58
- const arraySplice = unapply(Array.prototype.splice);
59
- const stringToLowerCase = unapply(String.prototype.toLowerCase);
60
- const stringToString = unapply(String.prototype.toString);
61
- const stringMatch = unapply(String.prototype.match);
62
- const stringReplace = unapply(String.prototype.replace);
63
- const stringIndexOf = unapply(String.prototype.indexOf);
64
- const stringTrim = unapply(String.prototype.trim);
65
- const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
66
- const regExpTest = unapply(RegExp.prototype.test);
67
- const typeErrorCreate = unconstruct(TypeError);
68
- /**
69
- * Creates a new function that calls the given function with a specified thisArg and arguments.
70
- *
71
- * @param func - The function to be wrapped and called.
72
- * @returns A new function that calls the given function with a specified thisArg and arguments.
73
- */
74
- function unapply(func) {
75
- return function (thisArg) {
76
- if (thisArg instanceof RegExp) {
77
- thisArg.lastIndex = 0;
78
- }
79
- for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
80
- args[_key3 - 1] = arguments[_key3];
81
- }
82
- return apply(func, thisArg, args);
83
- };
84
- }
85
- /**
86
- * Creates a new function that constructs an instance of the given constructor function with the provided arguments.
87
- *
88
- * @param func - The constructor function to be wrapped and called.
89
- * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
90
- */
91
- function unconstruct(Func) {
92
- return function () {
93
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
94
- args[_key4] = arguments[_key4];
95
- }
96
- return construct(Func, args);
97
- };
98
- }
99
- /**
100
- * Add properties to a lookup table
101
- *
102
- * @param set - The set to which elements will be added.
103
- * @param array - The array containing elements to be added to the set.
104
- * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
105
- * @returns The modified set with added elements.
106
- */
107
- function addToSet(set, array) {
108
- let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;
109
- if (setPrototypeOf) {
110
- // Make 'in' and truthy checks like Boolean(set.constructor)
111
- // independent of any properties defined on Object.prototype.
112
- // Prevent prototype setters from intercepting set as a this value.
113
- setPrototypeOf(set, null);
114
- }
115
- let l = array.length;
116
- while (l--) {
117
- let element = array[l];
118
- if (typeof element === 'string') {
119
- const lcElement = transformCaseFunc(element);
120
- if (lcElement !== element) {
121
- // Config presets (e.g. tags.js, attrs.js) are immutable.
122
- if (!isFrozen(array)) {
123
- array[l] = lcElement;
124
- }
125
- element = lcElement;
126
- }
127
- }
128
- set[element] = true;
129
- }
130
- return set;
131
- }
132
- /**
133
- * Clean up an array to harden against CSPP
134
- *
135
- * @param array - The array to be cleaned.
136
- * @returns The cleaned version of the array
137
- */
138
- function cleanArray(array) {
139
- for (let index = 0; index < array.length; index++) {
140
- const isPropertyExist = objectHasOwnProperty(array, index);
141
- if (!isPropertyExist) {
142
- array[index] = null;
143
- }
144
- }
145
- return array;
146
- }
147
- /**
148
- * Shallow clone an object
149
- *
150
- * @param object - The object to be cloned.
151
- * @returns A new object that copies the original.
152
- */
153
- function clone(object) {
154
- const newObject = create(null);
155
- for (const [property, value] of entries(object)) {
156
- const isPropertyExist = objectHasOwnProperty(object, property);
157
- if (isPropertyExist) {
158
- if (Array.isArray(value)) {
159
- newObject[property] = cleanArray(value);
160
- } else if (value && typeof value === 'object' && value.constructor === Object) {
161
- newObject[property] = clone(value);
162
- } else {
163
- newObject[property] = value;
164
- }
165
- }
166
- }
167
- return newObject;
168
- }
169
- /**
170
- * This method automatically checks if the prop is function or getter and behaves accordingly.
171
- *
172
- * @param object - The object to look up the getter function in its prototype chain.
173
- * @param prop - The property name for which to find the getter function.
174
- * @returns The getter function found in the prototype chain or a fallback function.
175
- */
176
- function lookupGetter(object, prop) {
177
- while (object !== null) {
178
- const desc = getOwnPropertyDescriptor(object, prop);
179
- if (desc) {
180
- if (desc.get) {
181
- return unapply(desc.get);
182
- }
183
- if (typeof desc.value === 'function') {
184
- return unapply(desc.value);
185
- }
186
- }
187
- object = getPrototypeOf(object);
188
- }
189
- function fallbackValue() {
190
- return null;
191
- }
192
- return fallbackValue;
193
- }
194
-
195
- const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'search', 'section', 'select', 'shadow', 'slot', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
196
- const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
197
- const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
198
- // List of SVG elements that are disallowed by default.
199
- // We still need to know them so that we can do namespace
200
- // checks properly in case one wants to add them to
201
- // allow-list.
202
- const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
203
- const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);
204
- // Similarly to SVG, we want to know all MathML elements,
205
- // even those that we disallow by default.
206
- const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
207
- const text = freeze(['#text']);
208
-
209
- const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'exportparts', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inert', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'part', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
210
- const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'mask-type', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
211
- const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
212
- const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
213
-
214
- // eslint-disable-next-line unicorn/better-regex
215
- const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
216
- const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
217
- const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
218
- const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
219
- const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
220
- const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
221
- );
222
- const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
223
- const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
224
- );
225
- const DOCTYPE_NAME = seal(/^html$/i);
226
- const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
227
-
228
- var EXPRESSIONS = /*#__PURE__*/Object.freeze({
229
- __proto__: null,
230
- ARIA_ATTR: ARIA_ATTR,
231
- ATTR_WHITESPACE: ATTR_WHITESPACE,
232
- CUSTOM_ELEMENT: CUSTOM_ELEMENT,
233
- DATA_ATTR: DATA_ATTR,
234
- DOCTYPE_NAME: DOCTYPE_NAME,
235
- ERB_EXPR: ERB_EXPR,
236
- IS_ALLOWED_URI: IS_ALLOWED_URI,
237
- IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,
238
- MUSTACHE_EXPR: MUSTACHE_EXPR,
239
- TMPLIT_EXPR: TMPLIT_EXPR
240
- });
241
-
242
- /* eslint-disable @typescript-eslint/indent */
243
- // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
244
- const NODE_TYPE = {
245
- element: 1,
246
- text: 3,
247
- // Deprecated
248
- progressingInstruction: 7,
249
- comment: 8,
250
- document: 9};
251
- const getGlobal = function getGlobal() {
252
- return typeof window === 'undefined' ? null : window;
253
- };
254
- /**
255
- * Creates a no-op policy for internal use only.
256
- * Don't export this function outside this module!
257
- * @param trustedTypes The policy factory.
258
- * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
259
- * @return The policy created (or null, if Trusted Types
260
- * are not supported or creating the policy failed).
261
- */
262
- const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
263
- if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
264
- return null;
265
- }
266
- // Allow the callers to control the unique policy name
267
- // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
268
- // Policy creation with duplicate names throws in Trusted Types.
269
- let suffix = null;
270
- const ATTR_NAME = 'data-tt-policy-suffix';
271
- if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
272
- suffix = purifyHostElement.getAttribute(ATTR_NAME);
273
- }
274
- const policyName = 'dompurify' + (suffix ? '#' + suffix : '');
275
- try {
276
- return trustedTypes.createPolicy(policyName, {
277
- createHTML(html) {
278
- return html;
279
- },
280
- createScriptURL(scriptUrl) {
281
- return scriptUrl;
282
- }
283
- });
284
- } catch (_) {
285
- // Policy creation failed (most likely another DOMPurify script has
286
- // already run). Skip creating the policy, as this will only cause errors
287
- // if TT are enforced.
288
- console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
289
- return null;
290
- }
291
- };
292
- const _createHooksMap = function _createHooksMap() {
293
- return {
294
- afterSanitizeAttributes: [],
295
- afterSanitizeElements: [],
296
- afterSanitizeShadowDOM: [],
297
- beforeSanitizeAttributes: [],
298
- beforeSanitizeElements: [],
299
- beforeSanitizeShadowDOM: [],
300
- uponSanitizeAttribute: [],
301
- uponSanitizeElement: [],
302
- uponSanitizeShadowNode: []
303
- };
304
- };
305
- function createDOMPurify() {
306
- let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
307
- const DOMPurify = root => createDOMPurify(root);
308
- DOMPurify.version = '3.3.3';
309
- DOMPurify.removed = [];
310
- if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
311
- // Not running in a browser, provide a factory function
312
- // so that you can pass your own Window
313
- DOMPurify.isSupported = false;
314
- return DOMPurify;
315
- }
316
- let {
317
- document
318
- } = window;
319
- const originalDocument = document;
320
- const currentScript = originalDocument.currentScript;
321
- const {
322
- DocumentFragment,
323
- HTMLTemplateElement,
324
- Node,
325
- Element,
326
- NodeFilter,
327
- NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,
328
- HTMLFormElement,
329
- DOMParser,
330
- trustedTypes
331
- } = window;
332
- const ElementPrototype = Element.prototype;
333
- const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
334
- const remove = lookupGetter(ElementPrototype, 'remove');
335
- const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
336
- const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
337
- const getParentNode = lookupGetter(ElementPrototype, 'parentNode');
338
- // As per issue #47, the web-components registry is inherited by a
339
- // new document created via createHTMLDocument. As per the spec
340
- // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
341
- // a new empty registry is used when creating a template contents owner
342
- // document, so we use that as our parent document to ensure nothing
343
- // is inherited.
344
- if (typeof HTMLTemplateElement === 'function') {
345
- const template = document.createElement('template');
346
- if (template.content && template.content.ownerDocument) {
347
- document = template.content.ownerDocument;
348
- }
349
- }
350
- let trustedTypesPolicy;
351
- let emptyHTML = '';
352
- const {
353
- implementation,
354
- createNodeIterator,
355
- createDocumentFragment,
356
- getElementsByTagName
357
- } = document;
358
- const {
359
- importNode
360
- } = originalDocument;
361
- let hooks = _createHooksMap();
362
- /**
363
- * Expose whether this browser supports running the full DOMPurify.
364
- */
365
- DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;
366
- const {
367
- MUSTACHE_EXPR,
368
- ERB_EXPR,
369
- TMPLIT_EXPR,
370
- DATA_ATTR,
371
- ARIA_ATTR,
372
- IS_SCRIPT_OR_DATA,
373
- ATTR_WHITESPACE,
374
- CUSTOM_ELEMENT
375
- } = EXPRESSIONS;
376
- let {
377
- IS_ALLOWED_URI: IS_ALLOWED_URI$1
378
- } = EXPRESSIONS;
379
- /**
380
- * We consider the elements and attributes below to be safe. Ideally
381
- * don't add any new ones but feel free to remove unwanted ones.
382
- */
383
- /* allowed element names */
384
- let ALLOWED_TAGS = null;
385
- const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
386
- /* Allowed attribute names */
387
- let ALLOWED_ATTR = null;
388
- const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
389
- /*
390
- * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.
391
- * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
392
- * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
393
- * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
394
- */
395
- let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
396
- tagNameCheck: {
397
- writable: true,
398
- configurable: false,
399
- enumerable: true,
400
- value: null
401
- },
402
- attributeNameCheck: {
403
- writable: true,
404
- configurable: false,
405
- enumerable: true,
406
- value: null
407
- },
408
- allowCustomizedBuiltInElements: {
409
- writable: true,
410
- configurable: false,
411
- enumerable: true,
412
- value: false
413
- }
414
- }));
415
- /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
416
- let FORBID_TAGS = null;
417
- /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
418
- let FORBID_ATTR = null;
419
- /* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */
420
- const EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {
421
- tagCheck: {
422
- writable: true,
423
- configurable: false,
424
- enumerable: true,
425
- value: null
426
- },
427
- attributeCheck: {
428
- writable: true,
429
- configurable: false,
430
- enumerable: true,
431
- value: null
432
- }
433
- }));
434
- /* Decide if ARIA attributes are okay */
435
- let ALLOW_ARIA_ATTR = true;
436
- /* Decide if custom data attributes are okay */
437
- let ALLOW_DATA_ATTR = true;
438
- /* Decide if unknown protocols are okay */
439
- let ALLOW_UNKNOWN_PROTOCOLS = false;
440
- /* Decide if self-closing tags in attributes are allowed.
441
- * Usually removed due to a mXSS issue in jQuery 3.0 */
442
- let ALLOW_SELF_CLOSE_IN_ATTR = true;
443
- /* Output should be safe for common template engines.
444
- * This means, DOMPurify removes data attributes, mustaches and ERB
445
- */
446
- let SAFE_FOR_TEMPLATES = false;
447
- /* Output should be safe even for XML used within HTML and alike.
448
- * This means, DOMPurify removes comments when containing risky content.
449
- */
450
- let SAFE_FOR_XML = true;
451
- /* Decide if document with <html>... should be returned */
452
- let WHOLE_DOCUMENT = false;
453
- /* Track whether config is already set on this instance of DOMPurify. */
454
- let SET_CONFIG = false;
455
- /* Decide if all elements (e.g. style, script) must be children of
456
- * document.body. By default, browsers might move them to document.head */
457
- let FORCE_BODY = false;
458
- /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
459
- * string (or a TrustedHTML object if Trusted Types are supported).
460
- * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
461
- */
462
- let RETURN_DOM = false;
463
- /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
464
- * string (or a TrustedHTML object if Trusted Types are supported) */
465
- let RETURN_DOM_FRAGMENT = false;
466
- /* Try to return a Trusted Type object instead of a string, return a string in
467
- * case Trusted Types are not supported */
468
- let RETURN_TRUSTED_TYPE = false;
469
- /* Output should be free from DOM clobbering attacks?
470
- * This sanitizes markups named with colliding, clobberable built-in DOM APIs.
471
- */
472
- let SANITIZE_DOM = true;
473
- /* Achieve full DOM Clobbering protection by isolating the namespace of named
474
- * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
475
- *
476
- * HTML/DOM spec rules that enable DOM Clobbering:
477
- * - Named Access on Window (§7.3.3)
478
- * - DOM Tree Accessors (§3.1.5)
479
- * - Form Element Parent-Child Relations (§4.10.3)
480
- * - Iframe srcdoc / Nested WindowProxies (§4.8.5)
481
- * - HTMLCollection (§4.2.10.2)
482
- *
483
- * Namespace isolation is implemented by prefixing `id` and `name` attributes
484
- * with a constant string, i.e., `user-content-`
485
- */
486
- let SANITIZE_NAMED_PROPS = false;
487
- const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
488
- /* Keep element content when removing element? */
489
- let KEEP_CONTENT = true;
490
- /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
491
- * of importing it into a new Document and returning a sanitized copy */
492
- let IN_PLACE = false;
493
- /* Allow usage of profiles like html, svg and mathMl */
494
- let USE_PROFILES = {};
495
- /* Tags to ignore content of when KEEP_CONTENT is true */
496
- let FORBID_CONTENTS = null;
497
- const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
498
- /* Tags that are safe for data: URIs */
499
- let DATA_URI_TAGS = null;
500
- const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
501
- /* Attributes safe for values like "javascript:" */
502
- let URI_SAFE_ATTRIBUTES = null;
503
- const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
504
- const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
505
- const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
506
- const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
507
- /* Document namespace */
508
- let NAMESPACE = HTML_NAMESPACE;
509
- let IS_EMPTY_INPUT = false;
510
- /* Allowed XHTML+XML namespaces */
511
- let ALLOWED_NAMESPACES = null;
512
- const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
513
- let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
514
- let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);
515
- // Certain elements are allowed in both SVG and HTML
516
- // namespace. We need to specify them explicitly
517
- // so that they don't get erroneously deleted from
518
- // HTML namespace.
519
- const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
520
- /* Parsing of strict XHTML documents */
521
- let PARSER_MEDIA_TYPE = null;
522
- const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
523
- const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
524
- let transformCaseFunc = null;
525
- /* Keep a reference to config to pass to hooks */
526
- let CONFIG = null;
527
- /* Ideally, do not touch anything below this line */
528
- /* ______________________________________________ */
529
- const formElement = document.createElement('form');
530
- const isRegexOrFunction = function isRegexOrFunction(testValue) {
531
- return testValue instanceof RegExp || testValue instanceof Function;
532
- };
533
- /**
534
- * _parseConfig
535
- *
536
- * @param cfg optional config literal
537
- */
538
- // eslint-disable-next-line complexity
539
- const _parseConfig = function _parseConfig() {
540
- let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
541
- if (CONFIG && CONFIG === cfg) {
542
- return;
543
- }
544
- /* Shield configuration object from tampering */
545
- if (!cfg || typeof cfg !== 'object') {
546
- cfg = {};
547
- }
548
- /* Shield configuration object from prototype pollution */
549
- cfg = clone(cfg);
550
- PARSER_MEDIA_TYPE =
551
- // eslint-disable-next-line unicorn/prefer-includes
552
- SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
553
- // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
554
- transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
555
- /* Set configuration parameters */
556
- ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
557
- ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
558
- ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
559
- URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
560
- DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
561
- FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
562
- FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
563
- FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
564
- USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;
565
- ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
566
- ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
567
- ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
568
- ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true
569
- SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
570
- SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true
571
- WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
572
- RETURN_DOM = cfg.RETURN_DOM || false; // Default false
573
- RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
574
- RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
575
- FORCE_BODY = cfg.FORCE_BODY || false; // Default false
576
- SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
577
- SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
578
- KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
579
- IN_PLACE = cfg.IN_PLACE || false; // Default false
580
- IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
581
- NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
582
- MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
583
- HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
584
- CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
585
- if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
586
- CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
587
- }
588
- if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
589
- CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
590
- }
591
- if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
592
- CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
593
- }
594
- if (SAFE_FOR_TEMPLATES) {
595
- ALLOW_DATA_ATTR = false;
596
- }
597
- if (RETURN_DOM_FRAGMENT) {
598
- RETURN_DOM = true;
599
- }
600
- /* Parse profile info */
601
- if (USE_PROFILES) {
602
- ALLOWED_TAGS = addToSet({}, text);
603
- ALLOWED_ATTR = create(null);
604
- if (USE_PROFILES.html === true) {
605
- addToSet(ALLOWED_TAGS, html$1);
606
- addToSet(ALLOWED_ATTR, html);
607
- }
608
- if (USE_PROFILES.svg === true) {
609
- addToSet(ALLOWED_TAGS, svg$1);
610
- addToSet(ALLOWED_ATTR, svg);
611
- addToSet(ALLOWED_ATTR, xml);
612
- }
613
- if (USE_PROFILES.svgFilters === true) {
614
- addToSet(ALLOWED_TAGS, svgFilters);
615
- addToSet(ALLOWED_ATTR, svg);
616
- addToSet(ALLOWED_ATTR, xml);
617
- }
618
- if (USE_PROFILES.mathMl === true) {
619
- addToSet(ALLOWED_TAGS, mathMl$1);
620
- addToSet(ALLOWED_ATTR, mathMl);
621
- addToSet(ALLOWED_ATTR, xml);
622
- }
623
- }
624
- /* Prevent function-based ADD_ATTR / ADD_TAGS from leaking across calls */
625
- if (!objectHasOwnProperty(cfg, 'ADD_TAGS')) {
626
- EXTRA_ELEMENT_HANDLING.tagCheck = null;
627
- }
628
- if (!objectHasOwnProperty(cfg, 'ADD_ATTR')) {
629
- EXTRA_ELEMENT_HANDLING.attributeCheck = null;
630
- }
631
- /* Merge configuration parameters */
632
- if (cfg.ADD_TAGS) {
633
- if (typeof cfg.ADD_TAGS === 'function') {
634
- EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
635
- } else {
636
- if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
637
- ALLOWED_TAGS = clone(ALLOWED_TAGS);
638
- }
639
- addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
640
- }
641
- }
642
- if (cfg.ADD_ATTR) {
643
- if (typeof cfg.ADD_ATTR === 'function') {
644
- EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
645
- } else {
646
- if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
647
- ALLOWED_ATTR = clone(ALLOWED_ATTR);
648
- }
649
- addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
650
- }
651
- }
652
- if (cfg.ADD_URI_SAFE_ATTR) {
653
- addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
654
- }
655
- if (cfg.FORBID_CONTENTS) {
656
- if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
657
- FORBID_CONTENTS = clone(FORBID_CONTENTS);
658
- }
659
- addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
660
- }
661
- if (cfg.ADD_FORBID_CONTENTS) {
662
- if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
663
- FORBID_CONTENTS = clone(FORBID_CONTENTS);
664
- }
665
- addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);
666
- }
667
- /* Add #text in case KEEP_CONTENT is set to true */
668
- if (KEEP_CONTENT) {
669
- ALLOWED_TAGS['#text'] = true;
670
- }
671
- /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
672
- if (WHOLE_DOCUMENT) {
673
- addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
674
- }
675
- /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
676
- if (ALLOWED_TAGS.table) {
677
- addToSet(ALLOWED_TAGS, ['tbody']);
678
- delete FORBID_TAGS.tbody;
679
- }
680
- if (cfg.TRUSTED_TYPES_POLICY) {
681
- if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {
682
- throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
683
- }
684
- if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
685
- throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
686
- }
687
- // Overwrite existing TrustedTypes policy.
688
- trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
689
- // Sign local variables required by `sanitize`.
690
- emptyHTML = trustedTypesPolicy.createHTML('');
691
- } else {
692
- // Uninitialized policy, attempt to initialize the internal dompurify policy.
693
- if (trustedTypesPolicy === undefined) {
694
- trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
695
- }
696
- // If creating the internal policy succeeded sign internal variables.
697
- if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {
698
- emptyHTML = trustedTypesPolicy.createHTML('');
699
- }
700
- }
701
- // Prevent further manipulation of configuration.
702
- // Not available in IE8, Safari 5, etc.
703
- if (freeze) {
704
- freeze(cfg);
705
- }
706
- CONFIG = cfg;
707
- };
708
- /* Keep track of all possible SVG and MathML tags
709
- * so that we can perform the namespace checks
710
- * correctly. */
711
- const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
712
- const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
713
- /**
714
- * @param element a DOM element whose namespace is being checked
715
- * @returns Return false if the element has a
716
- * namespace that a spec-compliant parser would never
717
- * return. Return true otherwise.
718
- */
719
- const _checkValidNamespace = function _checkValidNamespace(element) {
720
- let parent = getParentNode(element);
721
- // In JSDOM, if we're inside shadow DOM, then parentNode
722
- // can be null. We just simulate parent in this case.
723
- if (!parent || !parent.tagName) {
724
- parent = {
725
- namespaceURI: NAMESPACE,
726
- tagName: 'template'
727
- };
728
- }
729
- const tagName = stringToLowerCase(element.tagName);
730
- const parentTagName = stringToLowerCase(parent.tagName);
731
- if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
732
- return false;
733
- }
734
- if (element.namespaceURI === SVG_NAMESPACE) {
735
- // The only way to switch from HTML namespace to SVG
736
- // is via <svg>. If it happens via any other tag, then
737
- // it should be killed.
738
- if (parent.namespaceURI === HTML_NAMESPACE) {
739
- return tagName === 'svg';
740
- }
741
- // The only way to switch from MathML to SVG is via`
742
- // svg if parent is either <annotation-xml> or MathML
743
- // text integration points.
744
- if (parent.namespaceURI === MATHML_NAMESPACE) {
745
- return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
746
- }
747
- // We only allow elements that are defined in SVG
748
- // spec. All others are disallowed in SVG namespace.
749
- return Boolean(ALL_SVG_TAGS[tagName]);
750
- }
751
- if (element.namespaceURI === MATHML_NAMESPACE) {
752
- // The only way to switch from HTML namespace to MathML
753
- // is via <math>. If it happens via any other tag, then
754
- // it should be killed.
755
- if (parent.namespaceURI === HTML_NAMESPACE) {
756
- return tagName === 'math';
757
- }
758
- // The only way to switch from SVG to MathML is via
759
- // <math> and HTML integration points
760
- if (parent.namespaceURI === SVG_NAMESPACE) {
761
- return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
762
- }
763
- // We only allow elements that are defined in MathML
764
- // spec. All others are disallowed in MathML namespace.
765
- return Boolean(ALL_MATHML_TAGS[tagName]);
766
- }
767
- if (element.namespaceURI === HTML_NAMESPACE) {
768
- // The only way to switch from SVG to HTML is via
769
- // HTML integration points, and from MathML to HTML
770
- // is via MathML text integration points
771
- if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
772
- return false;
773
- }
774
- if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
775
- return false;
776
- }
777
- // We disallow tags that are specific for MathML
778
- // or SVG and should never appear in HTML namespace
779
- return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
780
- }
781
- // For XHTML and XML documents that support custom namespaces
782
- if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
783
- return true;
784
- }
785
- // The code should never reach this place (this means
786
- // that the element somehow got namespace that is not
787
- // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
788
- // Return false just in case.
789
- return false;
790
- };
791
- /**
792
- * _forceRemove
793
- *
794
- * @param node a DOM node
795
- */
796
- const _forceRemove = function _forceRemove(node) {
797
- arrayPush(DOMPurify.removed, {
798
- element: node
799
- });
800
- try {
801
- // eslint-disable-next-line unicorn/prefer-dom-node-remove
802
- getParentNode(node).removeChild(node);
803
- } catch (_) {
804
- remove(node);
805
- }
806
- };
807
- /**
808
- * _removeAttribute
809
- *
810
- * @param name an Attribute name
811
- * @param element a DOM node
812
- */
813
- const _removeAttribute = function _removeAttribute(name, element) {
814
- try {
815
- arrayPush(DOMPurify.removed, {
816
- attribute: element.getAttributeNode(name),
817
- from: element
818
- });
819
- } catch (_) {
820
- arrayPush(DOMPurify.removed, {
821
- attribute: null,
822
- from: element
823
- });
824
- }
825
- element.removeAttribute(name);
826
- // We void attribute values for unremovable "is" attributes
827
- if (name === 'is') {
828
- if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
829
- try {
830
- _forceRemove(element);
831
- } catch (_) {}
832
- } else {
833
- try {
834
- element.setAttribute(name, '');
835
- } catch (_) {}
836
- }
837
- }
838
- };
839
- /**
840
- * _initDocument
841
- *
842
- * @param dirty - a string of dirty markup
843
- * @return a DOM, filled with the dirty markup
844
- */
845
- const _initDocument = function _initDocument(dirty) {
846
- /* Create a HTML document */
847
- let doc = null;
848
- let leadingWhitespace = null;
849
- if (FORCE_BODY) {
850
- dirty = '<remove></remove>' + dirty;
851
- } else {
852
- /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
853
- const matches = stringMatch(dirty, /^[\r\n\t ]+/);
854
- leadingWhitespace = matches && matches[0];
855
- }
856
- if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {
857
- // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
858
- dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
859
- }
860
- const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
861
- /*
862
- * Use the DOMParser API by default, fallback later if needs be
863
- * DOMParser not work for svg when has multiple root element.
864
- */
865
- if (NAMESPACE === HTML_NAMESPACE) {
866
- try {
867
- doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
868
- } catch (_) {}
869
- }
870
- /* Use createHTMLDocument in case DOMParser is not available */
871
- if (!doc || !doc.documentElement) {
872
- doc = implementation.createDocument(NAMESPACE, 'template', null);
873
- try {
874
- doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
875
- } catch (_) {
876
- // Syntax error if dirtyPayload is invalid xml
877
- }
878
- }
879
- const body = doc.body || doc.documentElement;
880
- if (dirty && leadingWhitespace) {
881
- body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
882
- }
883
- /* Work on whole document or just its body */
884
- if (NAMESPACE === HTML_NAMESPACE) {
885
- return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
886
- }
887
- return WHOLE_DOCUMENT ? doc.documentElement : body;
888
- };
889
- /**
890
- * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
891
- *
892
- * @param root The root element or node to start traversing on.
893
- * @return The created NodeIterator
894
- */
895
- const _createNodeIterator = function _createNodeIterator(root) {
896
- return createNodeIterator.call(root.ownerDocument || root, root,
897
- // eslint-disable-next-line no-bitwise
898
- NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
899
- };
900
- /**
901
- * _isClobbered
902
- *
903
- * @param element element to check for clobbering attacks
904
- * @return true if clobbered, false if safe
905
- */
906
- const _isClobbered = function _isClobbered(element) {
907
- return element instanceof HTMLFormElement && (typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function');
908
- };
909
- /**
910
- * Checks whether the given object is a DOM node.
911
- *
912
- * @param value object to check whether it's a DOM node
913
- * @return true is object is a DOM node
914
- */
915
- const _isNode = function _isNode(value) {
916
- return typeof Node === 'function' && value instanceof Node;
917
- };
918
- function _executeHooks(hooks, currentNode, data) {
919
- arrayForEach(hooks, hook => {
920
- hook.call(DOMPurify, currentNode, data, CONFIG);
921
- });
922
- }
923
- /**
924
- * _sanitizeElements
925
- *
926
- * @protect nodeName
927
- * @protect textContent
928
- * @protect removeChild
929
- * @param currentNode to check for permission to exist
930
- * @return true if node was killed, false if left alive
931
- */
932
- const _sanitizeElements = function _sanitizeElements(currentNode) {
933
- let content = null;
934
- /* Execute a hook if present */
935
- _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
936
- /* Check if element is clobbered or can clobber */
937
- if (_isClobbered(currentNode)) {
938
- _forceRemove(currentNode);
939
- return true;
940
- }
941
- /* Now let's check the element's type and name */
942
- const tagName = transformCaseFunc(currentNode.nodeName);
943
- /* Execute a hook if present */
944
- _executeHooks(hooks.uponSanitizeElement, currentNode, {
945
- tagName,
946
- allowedTags: ALLOWED_TAGS
947
- });
948
- /* Detect mXSS attempts abusing namespace confusion */
949
- if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
950
- _forceRemove(currentNode);
951
- return true;
952
- }
953
- /* Remove any occurrence of processing instructions */
954
- if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
955
- _forceRemove(currentNode);
956
- return true;
957
- }
958
- /* Remove any kind of possibly harmful comments */
959
- if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
960
- _forceRemove(currentNode);
961
- return true;
962
- }
963
- /* Remove element if anything forbids its presence */
964
- if (!(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName])) {
965
- /* Check if we have a custom element to handle */
966
- if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
967
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
968
- return false;
969
- }
970
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
971
- return false;
972
- }
973
- }
974
- /* Keep content except for bad-listed elements */
975
- if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
976
- const parentNode = getParentNode(currentNode) || currentNode.parentNode;
977
- const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
978
- if (childNodes && parentNode) {
979
- const childCount = childNodes.length;
980
- for (let i = childCount - 1; i >= 0; --i) {
981
- const childClone = cloneNode(childNodes[i], true);
982
- childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
983
- parentNode.insertBefore(childClone, getNextSibling(currentNode));
984
- }
985
- }
986
- }
987
- _forceRemove(currentNode);
988
- return true;
989
- }
990
- /* Check whether element has a valid namespace */
991
- if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
992
- _forceRemove(currentNode);
993
- return true;
994
- }
995
- /* Make sure that older browsers don't get fallback-tag mXSS */
996
- if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
997
- _forceRemove(currentNode);
998
- return true;
999
- }
1000
- /* Sanitize element content to be template-safe */
1001
- if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
1002
- /* Get the element's text content */
1003
- content = currentNode.textContent;
1004
- arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1005
- content = stringReplace(content, expr, ' ');
1006
- });
1007
- if (currentNode.textContent !== content) {
1008
- arrayPush(DOMPurify.removed, {
1009
- element: currentNode.cloneNode()
1010
- });
1011
- currentNode.textContent = content;
1012
- }
1013
- }
1014
- /* Execute a hook if present */
1015
- _executeHooks(hooks.afterSanitizeElements, currentNode, null);
1016
- return false;
1017
- };
1018
- /**
1019
- * _isValidAttribute
1020
- *
1021
- * @param lcTag Lowercase tag name of containing element.
1022
- * @param lcName Lowercase attribute name.
1023
- * @param value Attribute value.
1024
- * @return Returns true if `value` is valid, otherwise false.
1025
- */
1026
- // eslint-disable-next-line complexity
1027
- const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
1028
- /* FORBID_ATTR must always win, even if ADD_ATTR predicate would allow it */
1029
- if (FORBID_ATTR[lcName]) {
1030
- return false;
1031
- }
1032
- /* Make sure attribute cannot clobber */
1033
- if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
1034
- return false;
1035
- }
1036
- /* Allow valid data-* attributes: At least one character after "-"
1037
- (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
1038
- XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
1039
- We don't need to check the value; it's always URI safe. */
1040
- if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
1041
- if (
1042
- // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1043
- // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1044
- // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1045
- _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) ||
1046
- // Alternative, second condition checks if it's an `is`-attribute, AND
1047
- // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1048
- lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {
1049
- return false;
1050
- }
1051
- /* Check value is safe. First, is attr inert? If so, is safe */
1052
- } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {
1053
- return false;
1054
- } else ;
1055
- return true;
1056
- };
1057
- /**
1058
- * _isBasicCustomElement
1059
- * checks if at least one dash is included in tagName, and it's not the first char
1060
- * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
1061
- *
1062
- * @param tagName name of the tag of the node to sanitize
1063
- * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
1064
- */
1065
- const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
1066
- return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);
1067
- };
1068
- /**
1069
- * _sanitizeAttributes
1070
- *
1071
- * @protect attributes
1072
- * @protect nodeName
1073
- * @protect removeAttribute
1074
- * @protect setAttribute
1075
- *
1076
- * @param currentNode to sanitize
1077
- */
1078
- const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
1079
- /* Execute a hook if present */
1080
- _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
1081
- const {
1082
- attributes
1083
- } = currentNode;
1084
- /* Check if we have attributes; if not we might have a text node */
1085
- if (!attributes || _isClobbered(currentNode)) {
1086
- return;
1087
- }
1088
- const hookEvent = {
1089
- attrName: '',
1090
- attrValue: '',
1091
- keepAttr: true,
1092
- allowedAttributes: ALLOWED_ATTR,
1093
- forceKeepAttr: undefined
1094
- };
1095
- let l = attributes.length;
1096
- /* Go backwards over all attributes; safely remove bad ones */
1097
- while (l--) {
1098
- const attr = attributes[l];
1099
- const {
1100
- name,
1101
- namespaceURI,
1102
- value: attrValue
1103
- } = attr;
1104
- const lcName = transformCaseFunc(name);
1105
- const initValue = attrValue;
1106
- let value = name === 'value' ? initValue : stringTrim(initValue);
1107
- /* Execute a hook if present */
1108
- hookEvent.attrName = lcName;
1109
- hookEvent.attrValue = value;
1110
- hookEvent.keepAttr = true;
1111
- hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
1112
- _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
1113
- value = hookEvent.attrValue;
1114
- /* Full DOM Clobbering protection via namespace isolation,
1115
- * Prefix id and name attributes with `user-content-`
1116
- */
1117
- if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {
1118
- // Remove the attribute with this value
1119
- _removeAttribute(name, currentNode);
1120
- // Prefix the value and later re-create the attribute with the sanitized value
1121
- value = SANITIZE_NAMED_PROPS_PREFIX + value;
1122
- }
1123
- /* Work around a security issue with comments inside attributes */
1124
- if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
1125
- _removeAttribute(name, currentNode);
1126
- continue;
1127
- }
1128
- /* Make sure we cannot easily use animated hrefs, even if animations are allowed */
1129
- if (lcName === 'attributename' && stringMatch(value, 'href')) {
1130
- _removeAttribute(name, currentNode);
1131
- continue;
1132
- }
1133
- /* Did the hooks approve of the attribute? */
1134
- if (hookEvent.forceKeepAttr) {
1135
- continue;
1136
- }
1137
- /* Did the hooks approve of the attribute? */
1138
- if (!hookEvent.keepAttr) {
1139
- _removeAttribute(name, currentNode);
1140
- continue;
1141
- }
1142
- /* Work around a security issue in jQuery 3.0 */
1143
- if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
1144
- _removeAttribute(name, currentNode);
1145
- continue;
1146
- }
1147
- /* Sanitize attribute content to be template-safe */
1148
- if (SAFE_FOR_TEMPLATES) {
1149
- arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1150
- value = stringReplace(value, expr, ' ');
1151
- });
1152
- }
1153
- /* Is `value` valid for this attribute? */
1154
- const lcTag = transformCaseFunc(currentNode.nodeName);
1155
- if (!_isValidAttribute(lcTag, lcName, value)) {
1156
- _removeAttribute(name, currentNode);
1157
- continue;
1158
- }
1159
- /* Handle attributes that require Trusted Types */
1160
- if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {
1161
- if (namespaceURI) ; else {
1162
- switch (trustedTypes.getAttributeType(lcTag, lcName)) {
1163
- case 'TrustedHTML':
1164
- {
1165
- value = trustedTypesPolicy.createHTML(value);
1166
- break;
1167
- }
1168
- case 'TrustedScriptURL':
1169
- {
1170
- value = trustedTypesPolicy.createScriptURL(value);
1171
- break;
1172
- }
1173
- }
1174
- }
1175
- }
1176
- /* Handle invalid data-* attribute set by try-catching it */
1177
- if (value !== initValue) {
1178
- try {
1179
- if (namespaceURI) {
1180
- currentNode.setAttributeNS(namespaceURI, name, value);
1181
- } else {
1182
- /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
1183
- currentNode.setAttribute(name, value);
1184
- }
1185
- if (_isClobbered(currentNode)) {
1186
- _forceRemove(currentNode);
1187
- } else {
1188
- arrayPop(DOMPurify.removed);
1189
- }
1190
- } catch (_) {
1191
- _removeAttribute(name, currentNode);
1192
- }
1193
- }
1194
- }
1195
- /* Execute a hook if present */
1196
- _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
1197
- };
1198
- /**
1199
- * _sanitizeShadowDOM
1200
- *
1201
- * @param fragment to iterate over recursively
1202
- */
1203
- const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
1204
- let shadowNode = null;
1205
- const shadowIterator = _createNodeIterator(fragment);
1206
- /* Execute a hook if present */
1207
- _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
1208
- while (shadowNode = shadowIterator.nextNode()) {
1209
- /* Execute a hook if present */
1210
- _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
1211
- /* Sanitize tags and elements */
1212
- _sanitizeElements(shadowNode);
1213
- /* Check attributes next */
1214
- _sanitizeAttributes(shadowNode);
1215
- /* Deep shadow DOM detected */
1216
- if (shadowNode.content instanceof DocumentFragment) {
1217
- _sanitizeShadowDOM(shadowNode.content);
1218
- }
1219
- }
1220
- /* Execute a hook if present */
1221
- _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
1222
- };
1223
- // eslint-disable-next-line complexity
1224
- DOMPurify.sanitize = function (dirty) {
1225
- let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1226
- let body = null;
1227
- let importedNode = null;
1228
- let currentNode = null;
1229
- let returnNode = null;
1230
- /* Make sure we have a string to sanitize.
1231
- DO NOT return early, as this will return the wrong type if
1232
- the user has requested a DOM object rather than a string */
1233
- IS_EMPTY_INPUT = !dirty;
1234
- if (IS_EMPTY_INPUT) {
1235
- dirty = '<!-->';
1236
- }
1237
- /* Stringify, in case dirty is an object */
1238
- if (typeof dirty !== 'string' && !_isNode(dirty)) {
1239
- if (typeof dirty.toString === 'function') {
1240
- dirty = dirty.toString();
1241
- if (typeof dirty !== 'string') {
1242
- throw typeErrorCreate('dirty is not a string, aborting');
1243
- }
1244
- } else {
1245
- throw typeErrorCreate('toString is not a function');
1246
- }
1247
- }
1248
- /* Return dirty HTML if DOMPurify cannot run */
1249
- if (!DOMPurify.isSupported) {
1250
- return dirty;
1251
- }
1252
- /* Assign config vars */
1253
- if (!SET_CONFIG) {
1254
- _parseConfig(cfg);
1255
- }
1256
- /* Clean up removed elements */
1257
- DOMPurify.removed = [];
1258
- /* Check if dirty is correctly typed for IN_PLACE */
1259
- if (typeof dirty === 'string') {
1260
- IN_PLACE = false;
1261
- }
1262
- if (IN_PLACE) {
1263
- /* Do some early pre-sanitization to avoid unsafe root nodes */
1264
- if (dirty.nodeName) {
1265
- const tagName = transformCaseFunc(dirty.nodeName);
1266
- if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
1267
- throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
1268
- }
1269
- }
1270
- } else if (dirty instanceof Node) {
1271
- /* If dirty is a DOM element, append to an empty document to avoid
1272
- elements being stripped by the parser */
1273
- body = _initDocument('<!---->');
1274
- importedNode = body.ownerDocument.importNode(dirty, true);
1275
- if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {
1276
- /* Node is already a body, use as is */
1277
- body = importedNode;
1278
- } else if (importedNode.nodeName === 'HTML') {
1279
- body = importedNode;
1280
- } else {
1281
- // eslint-disable-next-line unicorn/prefer-dom-node-append
1282
- body.appendChild(importedNode);
1283
- }
1284
- } else {
1285
- /* Exit directly if we have nothing to do */
1286
- if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
1287
- // eslint-disable-next-line unicorn/prefer-includes
1288
- dirty.indexOf('<') === -1) {
1289
- return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
1290
- }
1291
- /* Initialize the document to work on */
1292
- body = _initDocument(dirty);
1293
- /* Check we have a DOM node from the data */
1294
- if (!body) {
1295
- return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
1296
- }
1297
- }
1298
- /* Remove first element node (ours) if FORCE_BODY is set */
1299
- if (body && FORCE_BODY) {
1300
- _forceRemove(body.firstChild);
1301
- }
1302
- /* Get node iterator */
1303
- const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
1304
- /* Now start iterating over the created document */
1305
- while (currentNode = nodeIterator.nextNode()) {
1306
- /* Sanitize tags and elements */
1307
- _sanitizeElements(currentNode);
1308
- /* Check attributes next */
1309
- _sanitizeAttributes(currentNode);
1310
- /* Shadow DOM detected, sanitize it */
1311
- if (currentNode.content instanceof DocumentFragment) {
1312
- _sanitizeShadowDOM(currentNode.content);
1313
- }
1314
- }
1315
- /* If we sanitized `dirty` in-place, return it. */
1316
- if (IN_PLACE) {
1317
- return dirty;
1318
- }
1319
- /* Return sanitized string or DOM */
1320
- if (RETURN_DOM) {
1321
- if (RETURN_DOM_FRAGMENT) {
1322
- returnNode = createDocumentFragment.call(body.ownerDocument);
1323
- while (body.firstChild) {
1324
- // eslint-disable-next-line unicorn/prefer-dom-node-append
1325
- returnNode.appendChild(body.firstChild);
1326
- }
1327
- } else {
1328
- returnNode = body;
1329
- }
1330
- if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
1331
- /*
1332
- AdoptNode() is not used because internal state is not reset
1333
- (e.g. the past names map of a HTMLFormElement), this is safe
1334
- in theory but we would rather not risk another attack vector.
1335
- The state that is cloned by importNode() is explicitly defined
1336
- by the specs.
1337
- */
1338
- returnNode = importNode.call(originalDocument, returnNode, true);
1339
- }
1340
- return returnNode;
1341
- }
1342
- let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
1343
- /* Serialize doctype if allowed */
1344
- if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
1345
- serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
1346
- }
1347
- /* Sanitize final string template-safe */
1348
- if (SAFE_FOR_TEMPLATES) {
1349
- arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1350
- serializedHTML = stringReplace(serializedHTML, expr, ' ');
1351
- });
1352
- }
1353
- return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
1354
- };
1355
- DOMPurify.setConfig = function () {
1356
- let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1357
- _parseConfig(cfg);
1358
- SET_CONFIG = true;
1359
- };
1360
- DOMPurify.clearConfig = function () {
1361
- CONFIG = null;
1362
- SET_CONFIG = false;
1363
- };
1364
- DOMPurify.isValidAttribute = function (tag, attr, value) {
1365
- /* Initialize shared config vars if necessary. */
1366
- if (!CONFIG) {
1367
- _parseConfig({});
1368
- }
1369
- const lcTag = transformCaseFunc(tag);
1370
- const lcName = transformCaseFunc(attr);
1371
- return _isValidAttribute(lcTag, lcName, value);
1372
- };
1373
- DOMPurify.addHook = function (entryPoint, hookFunction) {
1374
- if (typeof hookFunction !== 'function') {
1375
- return;
1376
- }
1377
- arrayPush(hooks[entryPoint], hookFunction);
1378
- };
1379
- DOMPurify.removeHook = function (entryPoint, hookFunction) {
1380
- if (hookFunction !== undefined) {
1381
- const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
1382
- return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];
1383
- }
1384
- return arrayPop(hooks[entryPoint]);
1385
- };
1386
- DOMPurify.removeHooks = function (entryPoint) {
1387
- hooks[entryPoint] = [];
1388
- };
1389
- DOMPurify.removeAllHooks = function () {
1390
- hooks = _createHooksMap();
1391
- };
1392
- return DOMPurify;
1393
- }
1394
- var purify = createDOMPurify();
1395
-
1396
- const pdsComboboxCss = ":host{display:block}:host([aria-disabled=true]) .pds-combobox__input-icon{color:var(--pine-color-text-disabled);pointer-events:none}.pds-combobox{position:relative}.pds-combobox__label{color:var(--pine-color-text-label);display:block;font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-combobox__input-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;position:relative;width:100%}.pds-combobox__input{background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-125);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text-strong);-ms-flex:1;flex:1;font:var(--pine-typography-body-medium);padding:var(--pine-dimension-xs) var(--pine-dimension-450) var(--pine-dimension-xs) var(--pine-dimension-150);-webkit-transition:border-color var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease;width:100%}.pds-combobox__input:hover:not(:disabled){border-color:var(--pine-color-border-hover)}.pds-combobox__input:disabled{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-combobox__input:disabled::-webkit-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::-moz-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled:-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:focus-visible{border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-combobox__input::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input-icon{color:var(--pine-color-text-secondary);inset-inline-end:var(--pine-dimension-150);pointer-events:none;position:absolute;z-index:var(--pine-z-index-raised)}.pds-combobox__listbox{background:var(--pine-color-background-overlay);border:0;border-radius:var(--pine-dimension-125);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);list-style:none;margin:0;min-width:220px;overflow-y:auto;padding:var(--pine-dimension-xs);position:absolute;z-index:var(--pine-z-index-raised)}.pds-combobox__option{-ms-flex-align:center;align-items:center;background:transparent;border-radius:var(--pine-dimension-125);color:var(--pine-color-text-secondary);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);-ms-flex-pack:justify;justify-content:space-between;padding:var(--pine-dimension-xs) var(--pine-dimension-sm);position:relative;-webkit-transition:background 0.15s;transition:background 0.15s}.pds-combobox__option[aria-selected=true]{background:var(--pine-color-background-muted)}.pds-combobox__option:focus-visible{outline:0}.pds-combobox__option.pds-combobox__option--layout .pds-combobox__option-layout-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__option.pds-combobox__option--chip .pds-combobox__option-chip{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__option:last-child{-webkit-margin-after:0;margin-block-end:0}.pds-combobox__option--highlighted,.pds-combobox__option[selected],.pds-combobox__option--selected{background:var(--pine-color-background-muted)}.pds-combobox__option-check{color:currentColor;font-size:var(--pine-dimension-150);-webkit-margin-start:var(--pine-dimension-150);margin-inline-start:var(--pine-dimension-150)}.pds-combobox__group-label{color:var(--pine-color-text-tertiary);cursor:default;font:var(--pine-typography-heading-caption);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-150);margin-block-start:var(--pine-dimension-150);padding:var(--pine-dimension-2xs) var(--pine-dimension-sm);text-transform:uppercase}.pds-combobox__group-label:first-child{-webkit-margin-before:0;margin-block-start:0}.pds-combobox__loading{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-150)}.pds-combobox__empty{color:var(--pine-color-text-tertiary);padding:var(--pine-dimension-150) var(--pine-dimension-sm);text-align:center}.pds-combobox__load-more{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-150)}.pds-combobox__button-trigger{-ms-flex-align:center;align-items:center;background:var(--color-background-default, var(--pine-color-secondary));border:var(--pine-border);border-radius:var(--pine-border-radius-full);color:var(--color-text-default, var(--pine-color-text-inverse-emphasis));cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);-ms-flex-pack:justify;justify-content:space-between;min-height:var(--pine-dimension-450);outline:none;padding:0 var(--pine-dimension-sm);-webkit-transition:border-color 0.15s, background 0.15s, -webkit-box-shadow 0.15s;transition:border-color 0.15s, background 0.15s, -webkit-box-shadow 0.15s;transition:border-color 0.15s, box-shadow 0.15s, background 0.15s;transition:border-color 0.15s, box-shadow 0.15s, background 0.15s, -webkit-box-shadow 0.15s;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.pds-combobox__button-trigger .pds-combobox__button-trigger-layout-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}.pds-combobox__button-trigger .trigger-content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__button-trigger:focus-visible{border-color:var(--color-border-focus, var(--pine-color-border));-webkit-box-shadow:0 0 0 2px var(--color-outline, var(--pine-color-focus-ring));box-shadow:0 0 0 2px var(--color-outline, var(--pine-color-focus-ring))}.pds-combobox__button-trigger:hover{background:var(--color-background-hover, var(--pine-color-secondary-hover));border-color:var(--color-border-hover, var(--pine-color-border-hover))}.pds-combobox__button-trigger[aria-disabled=true],.pds-combobox__button-trigger:disabled{background:var(--color-background-disabled, var(--pine-color-secondary-disabled));border-color:var(--color-border-disabled, var(--pine-color-border-disabled));color:var(--color-text-disabled, var(--pine-color-text-secondary-disabled));cursor:not-allowed;opacity:0.6}.pds-combobox__button-trigger-label{color:inherit;-ms-flex:1 1 auto;flex:1 1 auto;text-align:start}.pds-combobox__button-trigger--input-shape{border-radius:var(--pine-dimension-125);min-height:var(--pine-dimension-500)}.pds-combobox__button-trigger-chevron{color:currentColor;-webkit-margin-start:var(--pine-dimension-150);margin-inline-start:var(--pine-dimension-150)}.pds-combobox__button-trigger--primary{--color-background-default:var(--pine-color-primary);--color-background-hover:var(--pine-color-primary-hover);--color-background-disabled:var(--pine-color-primary-disabled);--color-border-default:var(--pine-color-primary);--color-border-hover:var(--pine-color-primary-hover);--color-border-disabled:var(--pine-color-primary-disabled);--color-border-focus:var(--pine-color-primary);--color-text-default:var(--pine-color-text-primary);--color-text-disabled:var(--pine-color-text-primary-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--accent{--color-background-default:var(--pine-color-accent);--color-background-hover:var(--pine-color-accent-hover);--color-background-disabled:var(--pine-color-accent-disabled);--color-border-default:var(--pine-color-accent);--color-border-hover:var(--pine-color-accent-hover);--color-border-disabled:var(--pine-color-accent-disabled);--color-border-focus:var(--pine-color-accent);--color-text-default:var(--pine-color-white);--color-text-disabled:var(--pine-color-text-accent-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--secondary{--color-background-default:var(--pine-color-secondary);--color-background-hover:var(--pine-color-secondary-hover);--color-background-disabled:var(--pine-color-secondary-disabled);--color-border-default:var(--pine-color-border);--color-border-hover:var(--pine-color-border-hover);--color-border-disabled:var(--pine-color-border-disabled);--color-border-focus:var(--pine-color-border);--color-text-default:var(--pine-color-text-secondary);--color-text-disabled:var(--pine-color-text-secondary-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--destructive{--color-background-default:var(--pine-color-danger);--color-background-hover:var(--pine-color-danger-hover);--color-background-disabled:var(--pine-color-danger-disabled);--color-border-default:var(--pine-color-danger);--color-border-hover:var(--pine-color-danger-hover);--color-border-disabled:var(--pine-color-danger-disabled);--color-border-focus:var(--pine-color-danger);--color-text-default:var(--pine-color-white);--color-text-disabled:var(--pine-color-text-danger-disabled);--color-outline:var(--pine-color-focus-ring-danger)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}[data-layout]{border-radius:var(--pine-dimension-125);padding-block:var(--pine-dimension-xs)}.pds-combobox__chip-trigger{-ms-flex-align:center;align-items:center;border-radius:var(--pine-dimension-sm);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;font:var(--pine-typography-body-medium);-ms-flex-pack:justify;justify-content:space-between;outline:none;padding-block:var(--pine-dimension-025);padding-inline:var(--pine-dimension-150);-webkit-transition:all 0.15s ease;transition:all 0.15s ease;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.pds-combobox__chip-trigger .pds-combobox__chip-trigger-layout-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}.pds-combobox__chip-trigger .trigger-content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__chip-trigger:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-combobox__chip-trigger[aria-disabled=true]{cursor:not-allowed;opacity:0.6}.pds-combobox__chip-trigger-label{color:inherit;-ms-flex:1 1 auto;flex:1 1 auto;text-align:start}.pds-combobox__chip-trigger-chevron{color:currentColor;-webkit-margin-start:var(--pine-dimension-150);margin-inline-start:var(--pine-dimension-150)}.pds-combobox__chip-trigger-icon{-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs)}.pds-combobox__chip-trigger--neutral,.pds-combobox__chip-trigger--accent,.pds-combobox__chip-trigger--success,.pds-combobox__chip-trigger--warning,.pds-combobox__chip-trigger--danger,.pds-combobox__chip-trigger--info{background:var(--chip-bg);border:var(--pine-border-width) solid var(--chip-border);color:var(--chip-text)}.pds-combobox__chip-trigger--neutral:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--accent:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--success:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--warning:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--danger:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--info:hover:not([aria-disabled=true]){background:var(--chip-bg-hover)}.pds-combobox__chip-trigger--neutral:focus-visible,.pds-combobox__chip-trigger--accent:focus-visible,.pds-combobox__chip-trigger--success:focus-visible,.pds-combobox__chip-trigger--warning:focus-visible,.pds-combobox__chip-trigger--danger:focus-visible,.pds-combobox__chip-trigger--info:focus-visible{border-color:var(--chip-border)}.pds-combobox__chip-trigger--neutral{--chip-bg:var(--pine-chip-color-neutral);--chip-bg-hover:var(--pine-chip-color-neutral-hover);--chip-border:var(--pine-chip-color-neutral-hover);--chip-text:var(--pine-color-text-neutral)}.pds-combobox__chip-trigger--accent{--chip-bg:var(--pine-chip-color-accent);--chip-bg-hover:var(--pine-chip-color-accent-hover);--chip-border:var(--pine-chip-color-accent-hover);--chip-text:var(--pine-color-text-accent)}.pds-combobox__chip-trigger--success{--chip-bg:var(--pine-chip-color-success);--chip-bg-hover:var(--pine-chip-color-success-hover);--chip-border:var(--pine-chip-color-success-hover);--chip-text:var(--pine-color-text-success)}.pds-combobox__chip-trigger--warning{--chip-bg:var(--pine-chip-color-warning);--chip-bg-hover:var(--pine-chip-color-warning-hover);--chip-border:var(--pine-chip-color-warning-hover);--chip-text:var(--pine-color-text-warning)}.pds-combobox__chip-trigger--danger{--chip-bg:var(--pine-chip-color-danger);--chip-bg-hover:var(--pine-chip-color-danger-hover);--chip-border:var(--pine-chip-color-danger-hover);--chip-text:var(--pine-color-text-danger)}.pds-combobox__chip-trigger--info{--chip-bg:var(--pine-chip-color-info);--chip-bg-hover:var(--pine-chip-color-info-hover);--chip-border:var(--pine-chip-color-info-hover);--chip-text:var(--pine-color-text-info)}.pds-combobox__chip-trigger--brand{background:-webkit-gradient(linear, left top, right top, from(#FF3E14), to(#6B62F2));background:linear-gradient(90deg, #FF3E14 0%, #6B62F2 100%);border:0;color:var(--pine-color-text-neutral);padding:1px;position:relative}.pds-combobox__chip-trigger--brand .pds-combobox__chip-trigger-label{background:rgba(255, 255, 255, 0.9);border-radius:calc(var(--pine-dimension-sm) - 1px);color:var(--pine-color-text-neutral);font-weight:var(--pine-font-weight-medium);padding:var(--pine-dimension-025) var(--pine-dimension-150);position:relative;z-index:1}.pds-combobox__chip-trigger--brand .pds-combobox__chip-trigger-chevron{position:relative;z-index:1}.pds-combobox__chip-trigger--brand:hover:not([aria-disabled=true]) .pds-combobox__chip-trigger-label{background:rgba(255, 255, 255, 0.8)}.pds-combobox__chip-trigger--dropdown:not(.pds-combobox__chip-trigger--brand){padding:var(--pine-dimension-none)}.pds-combobox__chip-trigger--dropdown:not(.pds-combobox__chip-trigger--brand) .pds-combobox__chip-trigger-label{padding:var(--pine-dimension-025) var(--pine-dimension-150)}.pds-combobox__chip-trigger--large .pds-combobox__chip-trigger-label{font-family:var(--pine-font-family-heading);font-size:var(--pine-font-size-heading-6);font-weight:var(--pine-font-weight-medium);letter-spacing:var(--pine-letter-spacing-heading-6)}.pds-combobox__chip-trigger--dot .pds-combobox__chip-trigger-label::before{border:var(--pine-border-width) solid transparent;border-radius:var(--pine-border-radius-full);content:\"\";display:inline-block;height:var(--pine-dimension-2xs);-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs);width:var(--pine-dimension-2xs)}";
1397
-
1398
- const PdsCombobox$1 = /*@__PURE__*/ proxyCustomElement(class PdsCombobox extends HTMLElement {
1399
- constructor(registerHost) {
1400
- super();
1401
- if (registerHost !== false) {
1402
- this.__registerHost();
1403
- }
1404
- this.__attachShadow();
1405
- this.pdsComboboxChange = createEvent(this, "pdsComboboxChange", 7);
1406
- this.pdsComboboxSearch = createEvent(this, "pdsComboboxSearch", 7);
1407
- this.pdsComboboxLoadOptions = createEvent(this, "pdsComboboxLoadOptions", 7);
1408
- /**
1409
- * Enable custom layout content for options. Options with data-layout attribute will render their HTML content.
1410
- * ⚠️ Security Warning: Only use with trusted content. Basic XSS protection is applied, but avoid user-generated content.
1411
- * @default false
1412
- */
1413
- this.customOptionLayouts = false;
1414
- /**
1415
- * Enable custom layout content for the button trigger via the trigger-content slot.
1416
- * When true, uses slot content for initial state but updates dynamically with selected option layout.
1417
- * ⚠️ Security Warning: Only use with trusted content. Basic XSS protection is applied, but avoid user-generated content.
1418
- * @default false
1419
- */
1420
- this.customTriggerContent = false;
1421
- /**
1422
- * If true, the combobox is disabled.
1423
- */
1424
- this.disabled = false;
1425
- /**
1426
- * Placement of the dropdown relative to the trigger.
1427
- * @default 'bottom-start'
1428
- */
1429
- this.dropdownPlacement = 'bottom-start';
1430
- /**
1431
- * Width of the dropdown. Any valid CSS width value.
1432
- * @default '236px'
1433
- */
1434
- this.dropdownWidth = '236px';
1435
- /**
1436
- * Where to mount the dropdown listbox (`host` or `body`, sometimes called “append to body”).
1437
- * Use `body` inside scrollable containers (for example modals) so the list is not clipped by
1438
- * `overflow: hidden` ancestors. The portal is appended to the nearest `<dialog>` when present
1439
- * (including `pds-modal` / `showModal()`), using a composed ascent so shadow DOM and slot
1440
- * boundaries do not hide the dialog from discovery; otherwise it is appended to `document.body`.
1441
- * Keyboard focus remains on the trigger via
1442
- * `aria-activedescendant` so modal focus traps continue to work. Custom `empty` and `loading`
1443
- * slots are not supported when `body` is used; the default empty and loading content is shown instead.
1444
- * @default 'host'
1445
- */
1446
- this.dropdownMount = 'host';
1447
- /**
1448
- * Visually hides the label text for instances where only the combobox should be displayed.
1449
- * The visible `<label>` is omitted (same pattern as `pds-select`) so label spacing does not reserve layout;
1450
- * the trigger uses `aria-label` so the name stays available to assistive technology.
1451
- */
1452
- this.hideLabel = false;
1453
- /**
1454
- * Determines the combobox mode: 'filter' (filter options as you type) or 'select-only' (show all options).
1455
- * In filter mode, reopening the menu while the input still shows the label of the selected option temporarily lists
1456
- * all options until you type (so you can switch to a different choice without clearing the field first).
1457
- * @default 'filter'
1458
- */
1459
- this.mode = 'filter';
1460
- /**
1461
- * Determines the combobox trigger: 'input' (editable input), 'button' (button-like, non-editable), or 'chip' (chip-like, non-editable).
1462
- * @default 'input'
1463
- */
1464
- this.trigger = 'input';
1465
- /**
1466
- * Width of the trigger (button or input). Any valid CSS width value.
1467
- * @default 'fit-content'
1468
- */
1469
- this.triggerWidth = 'fit-content';
1470
- /**
1471
- * The visual variant for the button trigger. Matches Pine button variants.
1472
- * @default 'secondary'
1473
- */
1474
- this.triggerVariant = 'secondary';
1475
- /**
1476
- * The shape of the button trigger. Use 'input' to render the trigger with input-like styling
1477
- * (subtle border radius, input height) for use in form or filter rows alongside PdsSelect and PdsMultiselect.
1478
- * @default 'pill'
1479
- */
1480
- this.triggerShape = 'pill';
1481
- /**
1482
- * The sentiment for the chip trigger. Matches Pine chip sentiments.
1483
- * @default 'neutral'
1484
- */
1485
- this.chipSentiment = 'neutral';
1486
- /**
1487
- * Whether the chip trigger should be displayed in a larger size.
1488
- * @default false
1489
- */
1490
- this.chipLarge = false;
1491
- /**
1492
- * Whether a dot should be displayed on the chip trigger.
1493
- * @default false
1494
- */
1495
- this.chipDot = false;
1496
- /**
1497
- * The value of the combobox input.
1498
- */
1499
- this.value = '';
1500
- /**
1501
- * HTTP method for async requests.
1502
- */
1503
- this.asyncMethod = 'GET';
1504
- /**
1505
- * Debounce delay in milliseconds for search/fetch.
1506
- */
1507
- this.debounce = 300;
1508
- /**
1509
- * Timeout in milliseconds for async fetch requests.
1510
- */
1511
- this.fetchTimeout = 30000;
1512
- /**
1513
- * Whether the component is currently loading async options.
1514
- */
1515
- this.loading = false;
1516
- /**
1517
- * Internal state for the display text shown in the input/trigger
1518
- */
1519
- this.displayText = '';
1520
- /**
1521
- * Internal state for filtered options and group labels
1522
- */
1523
- this.filteredItems = [];
1524
- /**
1525
- * Internal state for the currently highlighted option index
1526
- */
1527
- this.highlightedIndex = -1;
1528
- /**
1529
- * Internal state for dropdown open/close
1530
- */
1531
- this.isOpen = false;
1532
- /**
1533
- * Internal state for the currently selected option
1534
- */
1535
- this.selectedOption = null;
1536
- /**
1537
- * Internal state for the sanitized layout content of the selected option
1538
- */
1539
- this.selectedOptionLayoutContent = '';
1540
- /**
1541
- * Internal state to track chip properties for automatic rendering
1542
- */
1543
- this.selectedOptionChipProps = null;
1544
- /**
1545
- * Internal state for async options.
1546
- */
1547
- this.internalOptions = [];
1548
- /**
1549
- * Internal state for current page (pagination).
1550
- */
1551
- this.currentPage = 1;
1552
- /**
1553
- * Internal state for hasMore (pagination).
1554
- */
1555
- this.hasMore = false;
1556
- this.optionEls = [];
1557
- this.allItems = [];
1558
- this.portalEl = null;
1559
- this.bodyPortalAutoUpdateActive = false;
1560
- this.isUpdatingFromSelection = false;
1561
- /**
1562
- * In filter mode, after choosing an option the input still shows the label and would
1563
- * otherwise filter the list to matching substrings only. While this flag is true,
1564
- * the list shows every option until the user types (then normal filtering applies).
1565
- */
1566
- this.expandFilterListWhileOpen = false;
1567
- this.handleInput = (e) => {
1568
- const target = e.target;
1569
- this.clearExpandFilterList();
1570
- this.displayText = target.value;
1571
- this.isOpen = true;
1572
- this.filterOptions();
1573
- // Emit search event for consumer-managed async
1574
- this.pdsComboboxSearch.emit({ query: this.displayText });
1575
- // Fetch from async URL if configured
1576
- if (this.asyncUrl) {
1577
- this.debouncedFetchAsyncOptions(this.displayText, 1);
1578
- }
1579
- setTimeout(() => this.openDropdownPositioning(), 0);
1580
- };
1581
- this.handleInputClick = () => {
1582
- // Open dropdown when input is clicked (but not when tabbed into)
1583
- if (!this.isOpen) {
1584
- this.isOpen = true;
1585
- this.prepareExpandFilterListOnOpen();
1586
- this.filterOptions();
1587
- // Trigger initial fetch if async and no options loaded yet
1588
- if (this.asyncUrl && this.internalOptions.length === 0) {
1589
- this.debouncedFetchAsyncOptions(this.displayText, 1);
1590
- }
1591
- this.setInitialHighlightedIndex();
1592
- setTimeout(() => {
1593
- this.openDropdownPositioning();
1594
- if (this.trigger === 'input' && this.expandFilterListWhileOpen && this.inputEl) {
1595
- this.inputEl.select();
1596
- }
1597
- }, 0);
1598
- }
1599
- };
1600
- this.handleKeyDown = (e) => {
1601
- if (!this.isOpen && (e.key === 'ArrowDown' || e.key === 'ArrowUp' || (e.altKey && e.key === 'ArrowDown'))) {
1602
- e.preventDefault();
1603
- this.isOpen = true;
1604
- this.prepareExpandFilterListOnOpen();
1605
- this.filterOptions();
1606
- // Set highlighted index immediately for testing
1607
- this.setInitialHighlightedIndex();
1608
- setTimeout(() => {
1609
- this.openDropdownPositioning();
1610
- // For input trigger, keep focus on input and use aria-activedescendant
1611
- // For button trigger, move focus to first option for keyboard navigation
1612
- if (this.trigger === 'input') {
1613
- this.focusFirstOption();
1614
- }
1615
- else {
1616
- this.focusFirstOptionForArrowKeys();
1617
- }
1618
- }, 0);
1619
- return;
1620
- }
1621
- if (!this.isOpen) {
1622
- return;
1623
- }
1624
- // Get only the option elements (skip group labels) for navigation
1625
- const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
1626
- switch (e.key) {
1627
- case 'ArrowDown':
1628
- e.preventDefault();
1629
- // If no option is highlighted and we have options, start at 0
1630
- if (this.highlightedIndex < 0 && selectableOptions.length > 0) {
1631
- this.highlightedIndex = 0;
1632
- }
1633
- else {
1634
- this.highlightedIndex = Math.min(this.highlightedIndex + 1, selectableOptions.length - 1);
1635
- }
1636
- this.updateOptionFocus();
1637
- break;
1638
- case 'ArrowUp':
1639
- e.preventDefault();
1640
- // If no option is highlighted and we have options, start at last option
1641
- if (this.highlightedIndex < 0 && selectableOptions.length > 0) {
1642
- this.highlightedIndex = selectableOptions.length - 1;
1643
- }
1644
- else {
1645
- this.highlightedIndex = Math.max(this.highlightedIndex - 1, 0);
1646
- }
1647
- this.updateOptionFocus();
1648
- break;
1649
- case 'Home':
1650
- e.preventDefault();
1651
- if (selectableOptions.length > 0) {
1652
- this.highlightedIndex = 0;
1653
- this.updateOptionFocus();
1654
- }
1655
- break;
1656
- case 'End':
1657
- e.preventDefault();
1658
- if (selectableOptions.length > 0) {
1659
- this.highlightedIndex = selectableOptions.length - 1;
1660
- this.updateOptionFocus();
1661
- }
1662
- break;
1663
- case 'PageDown':
1664
- e.preventDefault();
1665
- if (selectableOptions.length > 0) {
1666
- const nextIndex = Math.min(this.highlightedIndex + 10, selectableOptions.length - 1);
1667
- this.highlightedIndex = nextIndex;
1668
- this.updateOptionFocus();
1669
- }
1670
- break;
1671
- case 'PageUp':
1672
- e.preventDefault();
1673
- if (selectableOptions.length > 0) {
1674
- const prevIndex = Math.max(this.highlightedIndex - 10, 0);
1675
- this.highlightedIndex = prevIndex;
1676
- this.updateOptionFocus();
1677
- }
1678
- break;
1679
- case 'Enter':
1680
- e.preventDefault();
1681
- if (this.highlightedIndex >= 0 && this.highlightedIndex < selectableOptions.length) {
1682
- this.handleOptionClick(selectableOptions[this.highlightedIndex]);
1683
- this.restoreFocusToTrigger();
1684
- }
1685
- break;
1686
- case ' ':
1687
- e.preventDefault();
1688
- if (this.highlightedIndex >= 0 && this.highlightedIndex < selectableOptions.length) {
1689
- this.handleOptionClick(selectableOptions[this.highlightedIndex]);
1690
- this.restoreFocusToTrigger();
1691
- }
1692
- break;
1693
- case 'Escape':
1694
- e.preventDefault();
1695
- this.isOpen = false;
1696
- this.highlightedIndex = -1;
1697
- this.clearExpandFilterList();
1698
- this.isArrowKeyNavigationMode = false; // Reset arrow-key navigation mode
1699
- this.restoreFocusToTrigger();
1700
- break;
1701
- case 'Tab':
1702
- // Allow normal tab behavior to close dropdown and move focus
1703
- this.isOpen = false;
1704
- this.highlightedIndex = -1;
1705
- this.clearExpandFilterList();
1706
- this.isArrowKeyNavigationMode = false; // Reset arrow-key navigation mode
1707
- break;
1708
- }
1709
- };
1710
- // Track if we're in arrow-key navigation mode (focus should move between options)
1711
- this.isArrowKeyNavigationMode = false;
1712
- // Event handler for option click
1713
- this.onOptionClick = (event) => {
1714
- const idx = Number(event.currentTarget.getAttribute('data-option-index'));
1715
- const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
1716
- const option = selectableOptions[idx];
1717
- this.handleOptionClick(option);
1718
- };
1719
- // Event handler for mouse enter on option
1720
- this.onOptionMouseEnter = (event) => {
1721
- const idx = Number(event.currentTarget.getAttribute('data-option-index'));
1722
- this.highlightedIndex = idx;
1723
- };
1724
- // Prevent blur on mousedown
1725
- this.onOptionMouseDown = (event) => {
1726
- event.preventDefault();
1727
- };
1728
- // Event handler for option keyboard events
1729
- this.onOptionKeyDown = (event) => {
1730
- // Delegate to main keyboard handler
1731
- this.handleKeyDown(event);
1732
- };
1733
- // Handler for button trigger click
1734
- this.onButtonTriggerClick = () => {
1735
- this.isOpen = !this.isOpen;
1736
- if (this.isOpen) {
1737
- this.prepareExpandFilterListOnOpen();
1738
- this.filterOptions();
1739
- // Trigger initial fetch if async and no options loaded yet
1740
- if (this.asyncUrl && this.internalOptions.length === 0) {
1741
- this.debouncedFetchAsyncOptions(this.displayText, 1);
1742
- }
1743
- // Set highlighted index and prepare for keyboard navigation
1744
- this.setInitialHighlightedIndex();
1745
- // For button trigger, prepare for arrow-key navigation mode
1746
- this.isArrowKeyNavigationMode = true;
1747
- setTimeout(() => this.openDropdownPositioning(), 0);
1748
- }
1749
- else {
1750
- // Reset navigation mode when closing
1751
- this.clearExpandFilterList();
1752
- this.isArrowKeyNavigationMode = false;
1753
- }
1754
- };
1755
- // Handler for button trigger keyboard events
1756
- this.onButtonTriggerKeyDown = (e) => {
1757
- if ((e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowDown' || e.key === 'ArrowUp') && !this.isOpen) {
1758
- e.preventDefault();
1759
- e.stopPropagation(); // Prevent the event from bubbling and triggering click
1760
- this.isOpen = true;
1761
- this.prepareExpandFilterListOnOpen();
1762
- this.filterOptions();
1763
- // Set highlighted index immediately
1764
- this.setInitialHighlightedIndex();
1765
- setTimeout(() => {
1766
- this.openDropdownPositioning();
1767
- // For all button trigger keyboard opening, focus the first option so subsequent navigation works
1768
- this.focusFirstOptionForArrowKeys();
1769
- }, 0);
1770
- }
1771
- else if (e.key === 'Escape') {
1772
- e.preventDefault();
1773
- if (this.isOpen) {
1774
- this.isOpen = false;
1775
- this.highlightedIndex = -1;
1776
- this.clearExpandFilterList();
1777
- this.updateAriaActiveDescendant(); // Clear aria-activedescendant
1778
- this.restoreFocusToTrigger();
1779
- }
1780
- }
1781
- else if (this.isOpen) {
1782
- // Delegate other keys to main keyboard handler when dropdown is open
1783
- this.handleKeyDown(e);
1784
- }
1785
- };
1786
- // Handler for button trigger keyup events - prevents space key from triggering synthetic click
1787
- this.onButtonTriggerKeyUp = (e) => {
1788
- if (e.key === ' ') {
1789
- e.preventDefault();
1790
- e.stopPropagation();
1791
- }
1792
- };
1793
- // Close dropdown when focus leaves the combobox
1794
- this.onComboboxFocusOut = (event) => {
1795
- var _a, _b;
1796
- const relatedTarget = event.relatedTarget;
1797
- const isRelatedTargetInListbox = relatedTarget &&
1798
- (((_a = this.listboxEl) === null || _a === void 0 ? void 0 : _a.contains(relatedTarget)) || ((_b = this.portalEl) === null || _b === void 0 ? void 0 : _b.contains(relatedTarget)));
1799
- const isRelatedTargetInCombobox = this.el.contains(relatedTarget);
1800
- // Don't close if focus is moving to an option in the listbox or staying within the combobox
1801
- if (!isRelatedTargetInCombobox && !isRelatedTargetInListbox) {
1802
- this.isOpen = false;
1803
- this.highlightedIndex = -1;
1804
- this.clearExpandFilterList();
1805
- this.isArrowKeyNavigationMode = false; // Reset arrow-key navigation mode
1806
- this.updateAriaActiveDescendant(); // Clear aria-activedescendant
1807
- // If there's a selected option but the display text doesn't match, restore the selected option's display text
1808
- if (this.selectedOption && this.displayText !== this.getOptionLabel(this.selectedOption)) {
1809
- this.displayText = this.getOptionLabel(this.selectedOption);
1810
- // The @Watch('selectedOption') will handle value and form internals if needed
1811
- }
1812
- }
1813
- };
1814
- this.handleScroll = (e) => {
1815
- if (!this.asyncUrl || !this.hasMore || this.loading)
1816
- return;
1817
- const target = e.target;
1818
- const scrollBottom = target.scrollHeight - target.scrollTop - target.clientHeight;
1819
- // Load more when near bottom (within 50px)
1820
- if (scrollBottom < 50) {
1821
- this.pdsComboboxLoadOptions.emit({
1822
- query: this.displayText,
1823
- page: this.currentPage + 1,
1824
- });
1825
- this.debouncedFetchAsyncOptions(this.displayText, this.currentPage + 1);
1826
- }
1827
- };
1828
- }
1829
- connectedCallback() {
1830
- // Initialize ElementInternals for form association (only once per element instance)
1831
- if (this.el.attachInternals && !this.internals) {
1832
- this.internals = this.el.attachInternals();
1833
- }
1834
- }
1835
- componentWillLoad() {
1836
- this.originalSearchEmitter = this.pdsComboboxSearch;
1837
- this.updateOptions();
1838
- }
1839
- componentDidLoad() {
1840
- var _a, _b, _c;
1841
- this.setupDebounce();
1842
- // Check for value-based preselection if no option is selected yet
1843
- if (!this.selectedOption && this.value && this.optionEls.length > 0) {
1844
- const matchingOption = this.optionEls.find(opt => opt.value === this.value);
1845
- if (matchingOption) {
1846
- this.setSelectedOption(matchingOption);
1847
- // Update the display text to show the option's text content
1848
- this.displayText = this.getOptionLabel(matchingOption);
1849
- // Keep this.value as the actual option value
1850
- // this.value remains unchanged (already matches matchingOption.value)
1851
- }
1852
- }
1853
- // Initialize form value with current value
1854
- this.updateFormValue((_c = (_b = (_a = this.selectedOption) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : this.value) !== null && _c !== void 0 ? _c : '');
1855
- }
1856
- disconnectedCallback() {
1857
- var _a;
1858
- if (this.deferredPortalTeardownId !== undefined) {
1859
- clearTimeout(this.deferredPortalTeardownId);
1860
- this.deferredPortalTeardownId = undefined;
1861
- }
1862
- (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
1863
- this.clearAsyncFetchState();
1864
- this.removeBodyPortal();
1865
- }
1866
- componentDidRender() {
1867
- if (this.usesBodyPortal && this.isOpen) {
1868
- this.syncBodyPortal();
1869
- }
1870
- }
1871
- isOpenChanged(isOpen) {
1872
- if (isOpen && this.deferredPortalTeardownId !== undefined) {
1873
- clearTimeout(this.deferredPortalTeardownId);
1874
- this.deferredPortalTeardownId = undefined;
1875
- }
1876
- if (isOpen && this.usesBodyPortal) {
1877
- // Rapid reopen can cancel deferred teardown while the portal still holds the previous
1878
- // listbox node; clear portal state before the next render attaches the new listbox, and
1879
- // reset Floating UI autoUpdate bookkeeping.
1880
- this.removeBodyPortal();
1881
- }
1882
- if (!isOpen && this.usesBodyPortal) {
1883
- if (this.deferredPortalTeardownId !== undefined) {
1884
- clearTimeout(this.deferredPortalTeardownId);
1885
- }
1886
- this.deferredPortalTeardownId = setTimeout(() => {
1887
- this.deferredPortalTeardownId = undefined;
1888
- if (!this.el.isConnected) {
1889
- return;
1890
- }
1891
- if (!this.isOpen) {
1892
- this.removeBodyPortal();
1893
- }
1894
- }, 0);
1895
- return;
1896
- }
1897
- if (!isOpen) {
1898
- this.removeBodyPortal();
1899
- }
1900
- }
1901
- get usesBodyPortal() {
1902
- return this.dropdownMount === 'body';
1903
- }
1904
- get listboxId() {
1905
- return `${this.componentId}-listbox`;
1906
- }
1907
- optionDomId(optionIndex) {
1908
- return `${this.componentId}-option-${optionIndex}`;
1909
- }
1910
- setupDebounce() {
1911
- const { pdsComboboxSearch, debounce, originalSearchEmitter } = this;
1912
- this.pdsComboboxSearch = debounce === undefined
1913
- ? originalSearchEmitter !== null && originalSearchEmitter !== void 0 ? originalSearchEmitter : pdsComboboxSearch
1914
- : debounceEvent(pdsComboboxSearch, debounce);
1915
- }
1916
- optionsChanged() {
1917
- if (this.options) {
1918
- this.internalOptions = [...this.options];
1919
- this.updateOptionsFromAsync();
1920
- }
1921
- }
1922
- handleValueChange() {
1923
- this.filterOptions();
1924
- // Sync with form internals for form association
1925
- this.updateFormValue(this.value);
1926
- // Find and select option that matches the value (for external value changes)
1927
- // Only do this if we're not already updating from a selection
1928
- if (!this.isUpdatingFromSelection && this.value && this.optionEls.length > 0) {
1929
- const currentSelectedValue = this.selectedOption ? this.selectedOption.value : null;
1930
- // If the value doesn't match the currently selected option's value, we need to update
1931
- if (this.value !== currentSelectedValue) {
1932
- const matchingOption = this.optionEls.find(opt => opt.value === this.value);
1933
- if (matchingOption) {
1934
- this.isUpdatingFromSelection = true;
1935
- this.setSelectedOption(matchingOption);
1936
- // Update the display text to show the option's text content
1937
- this.displayText = this.getOptionLabel(matchingOption);
1938
- // Keep this.value as the actual option value (already correct)
1939
- this.isUpdatingFromSelection = false;
1940
- }
1941
- }
1942
- }
1943
- }
1944
- handleSelectedOptionChange() {
1945
- // Update the layout content when selected option changes
1946
- this.selectedOptionLayoutContent = this.selectedOption && this.isOptionLayout(this.selectedOption)
1947
- ? this.getOptionLayoutContent(this.selectedOption)
1948
- : '';
1949
- // Update chip properties for automatic rendering when selected option changes
1950
- this.selectedOptionChipProps = this.selectedOption && this.isOptionChip(this.selectedOption)
1951
- ? this.getOptionChipProps(this.selectedOption)
1952
- : null;
1953
- // Update display text when selected option changes
1954
- if (this.selectedOption) {
1955
- this.displayText = this.getOptionLabel(this.selectedOption);
1956
- this.value = this.selectedOption.value;
1957
- // Update form internals with the actual option value
1958
- this.updateFormValue(this.selectedOption.value);
1959
- }
1960
- else {
1961
- this.displayText = '';
1962
- this.value = '';
1963
- this.updateFormValue('');
1964
- }
1965
- }
1966
- updateFormValue(value) {
1967
- if (isSpecTest())
1968
- return;
1969
- if (this.internals && this.internals.setFormValue) {
1970
- this.internals.setFormValue(value);
1971
- }
1972
- }
1973
- clearAsyncFetchState() {
1974
- var _a;
1975
- if (this.fetchDebounceTimer !== undefined) {
1976
- window.clearTimeout(this.fetchDebounceTimer);
1977
- this.fetchDebounceTimer = undefined;
1978
- }
1979
- if (this.fetchTimeoutTimer !== undefined) {
1980
- window.clearTimeout(this.fetchTimeoutTimer);
1981
- this.fetchTimeoutTimer = undefined;
1982
- }
1983
- (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
1984
- this.abortController = undefined;
1985
- }
1986
- debouncedFetchAsyncOptions(query, page = 1) {
1987
- var _a;
1988
- if (!this.asyncUrl)
1989
- return;
1990
- if (this.fetchDebounceTimer !== undefined) {
1991
- window.clearTimeout(this.fetchDebounceTimer);
1992
- }
1993
- const delay = Math.max(0, (_a = this.debounce) !== null && _a !== void 0 ? _a : 0);
1994
- this.fetchDebounceTimer = window.setTimeout(() => {
1995
- this.fetchDebounceTimer = undefined;
1996
- this.fetchOptions(query, page);
1997
- }, delay);
1998
- }
1999
- async fetchOptions(query, page = 1) {
2000
- var _a;
2001
- if (!this.asyncUrl)
2002
- return;
2003
- // Abort any pending request and clear existing timeout
2004
- (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
2005
- if (this.fetchTimeoutTimer !== undefined) {
2006
- window.clearTimeout(this.fetchTimeoutTimer);
2007
- this.fetchTimeoutTimer = undefined;
2008
- }
2009
- this.abortController = new AbortController();
2010
- this.loading = true;
2011
- // Set up timeout for fetch request
2012
- this.fetchTimeoutTimer = window.setTimeout(() => {
2013
- var _a;
2014
- (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
2015
- this.fetchTimeoutTimer = undefined;
2016
- }, this.fetchTimeout);
2017
- try {
2018
- // Guard against malformed asyncUrl
2019
- let url;
2020
- try {
2021
- url = new URL(this.asyncUrl, window.location.origin);
2022
- }
2023
- catch (urlError) {
2024
- throw new TypeError(`Invalid asyncUrl: ${this.asyncUrl}`);
2025
- }
2026
- if (this.asyncMethod === 'GET') {
2027
- url.searchParams.set('search', query);
2028
- url.searchParams.set('page', String(page));
2029
- }
2030
- const response = await fetch(url.toString(), Object.assign({ method: this.asyncMethod, signal: this.abortController.signal, headers: {
2031
- 'Content-Type': 'application/json',
2032
- 'Accept': 'application/json',
2033
- } }, (this.asyncMethod === 'POST' && {
2034
- body: JSON.stringify({ search: query, page }),
2035
- })));
2036
- // Clear timeout on successful response
2037
- if (this.fetchTimeoutTimer !== undefined) {
2038
- window.clearTimeout(this.fetchTimeoutTimer);
2039
- this.fetchTimeoutTimer = undefined;
2040
- }
2041
- if (!response.ok)
2042
- throw new Error('Failed to fetch options');
2043
- const data = await response.json();
2044
- const formattedResults = data.results.map(item => {
2045
- // If formatResult is provided, use it
2046
- if (this.formatResult) {
2047
- return this.formatResult(item);
2048
- }
2049
- // Defensive check: ensure item is an object before spreading
2050
- if (typeof item === 'object' && item !== null) {
2051
- return Object.assign({ id: item.id, text: item.text }, item);
2052
- }
2053
- // Handle primitives by converting to safe shape
2054
- return {
2055
- id: String(item),
2056
- text: String(item),
2057
- };
2058
- });
2059
- if (page === 1) {
2060
- this.internalOptions = formattedResults;
2061
- }
2062
- else {
2063
- this.internalOptions = [...this.internalOptions, ...formattedResults];
2064
- }
2065
- this.hasMore = data.totalCount ? this.internalOptions.length < data.totalCount : false;
2066
- this.currentPage = page;
2067
- // Update DOM options from async data
2068
- this.updateOptionsFromAsync();
2069
- }
2070
- catch (error) {
2071
- // Clear timeout on error
2072
- if (this.fetchTimeoutTimer !== undefined) {
2073
- window.clearTimeout(this.fetchTimeoutTimer);
2074
- this.fetchTimeoutTimer = undefined;
2075
- }
2076
- if (error.name !== 'AbortError') {
2077
- console.error('PdsCombobox: Failed to fetch options', error);
2078
- }
2079
- }
2080
- finally {
2081
- this.loading = false;
2082
- }
2083
- }
2084
- updateOptionsFromAsync() {
2085
- if (!this.asyncUrl && !this.options)
2086
- return;
2087
- // Clear existing slot-based options when using async
2088
- this.optionEls = [];
2089
- this.allItems = [];
2090
- // Create option elements from async data
2091
- const asyncOptions = this.options || this.internalOptions;
2092
- asyncOptions.forEach(opt => {
2093
- const optionEl = document.createElement('option');
2094
- optionEl.value = String(opt.id);
2095
- optionEl.textContent = opt.text;
2096
- this.optionEls.push(optionEl);
2097
- this.allItems.push(optionEl);
2098
- });
2099
- // Re-apply preselection if a value is set but no option has been selected yet.
2100
- // This handles the case where `value` is set before async options have loaded.
2101
- if (this.value && !this.selectedOption) {
2102
- const matchingOption = this.optionEls.find(opt => opt.value === this.value);
2103
- if (matchingOption) {
2104
- this.setSelectedOption(matchingOption);
2105
- }
2106
- }
2107
- this.filterOptions();
2108
- }
2109
- updateOptions() {
2110
- var _a;
2111
- // Skip slot-based options if using async
2112
- if (this.asyncUrl || this.options) {
2113
- this.updateOptionsFromAsync();
2114
- return;
2115
- }
2116
- // Get all elements from the slot
2117
- const slot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot[name="option"], slot:not([name])');
2118
- if (slot) {
2119
- const allElements = slot.assignedElements({ flatten: true });
2120
- // Separate options from group labels and flatten optgroups
2121
- this.allItems = [];
2122
- this.optionEls = [];
2123
- allElements.forEach(el => {
2124
- if (el.tagName === 'OPTION') {
2125
- this.optionEls.push(el);
2126
- this.allItems.push(el);
2127
- }
2128
- else if (el.tagName === 'OPTGROUP') {
2129
- const optgroup = el;
2130
- this.allItems.push(optgroup);
2131
- // Add optgroup children (options)
2132
- Array.from(optgroup.children).forEach(child => {
2133
- if (child.tagName === 'OPTION') {
2134
- this.optionEls.push(child);
2135
- this.allItems.push(child);
2136
- }
2137
- });
2138
- }
2139
- else if (el.tagName === 'PDS-TEXT') {
2140
- this.allItems.push(el);
2141
- }
2142
- });
2143
- // Set initial selected option based on value property
2144
- let initialSelected = null;
2145
- // Check if value property matches any option
2146
- if (this.value) {
2147
- initialSelected = this.optionEls.find(opt => opt.value === this.value) || null;
2148
- if (initialSelected) {
2149
- // Update the display text to show the option's text content
2150
- this.displayText = this.getOptionLabel(initialSelected);
2151
- // Keep this.value as the actual option value (already correct)
2152
- }
2153
- }
2154
- // For chip triggers, ensure we always have a selected option
2155
- if (!initialSelected && this.trigger === 'chip' && this.optionEls.length > 0) {
2156
- initialSelected = this.optionEls[0]; // Select first option as default
2157
- this.value = initialSelected.value;
2158
- this.displayText = this.getOptionLabel(initialSelected);
2159
- console.warn('PDS Combobox: Chip triggers should always have a selected option. Automatically selected the first option.');
2160
- }
2161
- // Update selection if we found a different selected option or if we don't have one
2162
- if (initialSelected && initialSelected !== this.selectedOption) {
2163
- this.setSelectedOption(initialSelected);
2164
- }
2165
- else if (!this.selectedOption && initialSelected) {
2166
- this.setSelectedOption(initialSelected);
2167
- }
2168
- this.filterOptions();
2169
- }
2170
- }
2171
- // Helper method to get option label, falling back to text content if no label attribute
2172
- getOptionLabel(option) {
2173
- return option.label || option.textContent || '';
2174
- }
2175
- // Helper method to get option layout content
2176
- getOptionLayoutContent(option) {
2177
- return this.sanitizeHtml(option.innerHTML || '');
2178
- }
2179
- // HTML sanitization using DOMPurify library to prevent XSS attacks
2180
- sanitizeHtml(html) {
2181
- // Configure DOMPurify to allow Pine Design System components while removing dangerous content
2182
- const config = {
2183
- // Allow all custom elements (including pds-* components)
2184
- CUSTOM_ELEMENT_HANDLING: {
2185
- tagNameCheck: (tagName) => {
2186
- // Allow all pds-* tags and standard safe HTML tags
2187
- return tagName.startsWith('pds-') || /^[a-z]+$/i.test(tagName);
2188
- },
2189
- attributeNameCheck: (attr) => {
2190
- // Allow standard HTML attributes, data-* attributes, and Pine component attributes
2191
- return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(attr) || attr.startsWith('data-') || attr.startsWith('aria-');
2192
- },
2193
- allowCustomizedBuiltInElements: false,
2194
- },
2195
- // Allow standard safe attributes
2196
- ALLOW_DATA_ATTR: true,
2197
- ALLOW_ARIA_ATTR: true,
2198
- // Specifically forbid dangerous tags
2199
- FORBID_TAGS: ['script', 'iframe', 'object', 'embed', 'form', 'input', 'textarea', 'select', 'button', 'style'],
2200
- // Forbid all event handler attributes
2201
- FORBID_ATTR: [
2202
- 'onerror', 'onload', 'onclick', 'onmouseover', 'onmouseout', 'onmousemove',
2203
- 'onfocus', 'onblur', 'onchange', 'onsubmit', 'onkeydown', 'onkeyup', 'onkeypress',
2204
- 'onmousedown', 'onmouseup', 'ondblclick', 'oncontextmenu', 'onscroll'
2205
- ],
2206
- // Safe protocol whitelist
2207
- ALLOWED_URI_REGEXP: /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,
2208
- };
2209
- return purify.sanitize(html, config);
2210
- }
2211
- // Helper method to check if option should render as layout
2212
- isOptionLayout(option) {
2213
- return this.customOptionLayouts && option.hasAttribute('data-layout');
2214
- }
2215
- // Helper method to check if option has chip attributes (new automatic approach)
2216
- isOptionChip(option) {
2217
- return option.hasAttribute('chip-sentiment') ||
2218
- option.hasAttribute('chip-large') ||
2219
- option.hasAttribute('chip-icon') ||
2220
- option.hasAttribute('chip-dot');
2221
- }
2222
- // Helper method to get chip properties from option attributes
2223
- getOptionChipProps(option) {
2224
- return {
2225
- sentiment: option.getAttribute('chip-sentiment') || 'neutral',
2226
- large: option.hasAttribute('chip-large'),
2227
- icon: option.getAttribute('chip-icon') || undefined,
2228
- dot: option.hasAttribute('chip-dot')
2229
- };
2230
- }
2231
- // Helper method to check if option is selected (single source of truth)
2232
- isOptionSelected(option) {
2233
- return this.selectedOption === option;
2234
- }
2235
- // Helper method to set selected option (centralized state management)
2236
- setSelectedOption(option) {
2237
- this.selectedOption = option;
2238
- // Immediately update chip properties for automatic rendering to ensure reactivity
2239
- if (option && this.isOptionChip(option)) {
2240
- this.selectedOptionChipProps = this.getOptionChipProps(option);
2241
- }
2242
- else {
2243
- this.selectedOptionChipProps = null;
2244
- }
2245
- }
2246
- filterOptions() {
2247
- // Ensure allItems includes optionEls if not already populated (for edge cases)
2248
- if (this.allItems.length === 0 && this.optionEls.length > 0) {
2249
- this.allItems = [...this.optionEls];
2250
- }
2251
- if (this.mode === 'select-only' || this.expandFilterListWhileOpen) {
2252
- this.filteredItems = [...this.allItems];
2253
- }
2254
- else {
2255
- const val = this.displayText.toLowerCase();
2256
- const filteredOptions = this.optionEls.filter(option => {
2257
- // For layout options, search both text content and data-search-text attribute
2258
- if (this.isOptionLayout(option)) {
2259
- const searchText = option.getAttribute('data-search-text') || option.textContent || '';
2260
- return searchText.toLowerCase().includes(val);
2261
- }
2262
- return this.getOptionLabel(option).toLowerCase().includes(val);
2263
- });
2264
- // Rebuild filtered items maintaining group structure - simplified approach
2265
- this.filteredItems = [];
2266
- let currentGroupLabel = null;
2267
- this.allItems.forEach(item => {
2268
- if (item.tagName === 'OPTGROUP' || item.tagName === 'PDS-TEXT') {
2269
- currentGroupLabel = item;
2270
- }
2271
- else if (item.tagName === 'OPTION' && filteredOptions.includes(item)) {
2272
- const optionEl = item;
2273
- const parent = optionEl.parentElement;
2274
- let labelToUse = null;
2275
- if (parent && parent.tagName === 'OPTGROUP') {
2276
- // Only use the actual parent optgroup as label
2277
- labelToUse = parent;
2278
- }
2279
- else if (currentGroupLabel && currentGroupLabel.tagName === 'PDS-TEXT') {
2280
- // Allow pds-text to label subsequent top-level options until another label appears
2281
- labelToUse = currentGroupLabel;
2282
- }
2283
- if (labelToUse && !this.filteredItems.includes(labelToUse)) {
2284
- this.filteredItems.push(labelToUse);
2285
- }
2286
- this.filteredItems.push(optionEl);
2287
- }
2288
- });
2289
- }
2290
- this.highlightedIndex = -1;
2291
- }
2292
- clearExpandFilterList() {
2293
- this.expandFilterListWhileOpen = false;
2294
- }
2295
- /**
2296
- * When reopening the dropdown in filter mode with the input still showing the
2297
- * committed selection label, show the full option list until the user edits the query.
2298
- */
2299
- prepareExpandFilterListOnOpen() {
2300
- if (this.mode === 'filter' &&
2301
- this.selectedOption &&
2302
- this.displayText === this.getOptionLabel(this.selectedOption)) {
2303
- this.expandFilterListWhileOpen = true;
2304
- }
2305
- else {
2306
- this.expandFilterListWhileOpen = false;
2307
- }
2308
- }
2309
- positionDropdown() {
2310
- if (!this.triggerEl || !this.listboxEl) {
2311
- return;
2312
- }
2313
- const strategy = this.usesBodyPortal ? 'fixed' : 'absolute';
2314
- const zIndex = this.usesBodyPortal
2315
- ? 'var(--pine-z-index-priority)'
2316
- : 'var(--pine-z-index-raised)';
2317
- this.listboxEl.style.width = this.dropdownWidth;
2318
- if (this.maxHeight) {
2319
- this.listboxEl.style.maxHeight = this.maxHeight;
2320
- this.listboxEl.style.overflowY = 'auto';
2321
- }
2322
- return computePosition(this.triggerEl, this.listboxEl, {
2323
- placement: this.dropdownPlacement,
2324
- strategy,
2325
- middleware: [offset(12), flip(), shift({ padding: 5 })],
2326
- }).then(({ x, y }) => {
2327
- if (!this.listboxEl) {
2328
- return;
2329
- }
2330
- Object.assign(this.listboxEl.style, {
2331
- left: `${x}px`,
2332
- top: `${y}px`,
2333
- position: strategy,
2334
- zIndex,
2335
- });
2336
- });
2337
- }
2338
- openDropdownPositioning() {
2339
- if (!this.triggerEl || !this.listboxEl) {
2340
- return;
2341
- }
2342
- void this.positionDropdown();
2343
- }
2344
- startBodyPortalAutoUpdate() {
2345
- if (this.bodyPortalAutoUpdateActive || !this.triggerEl || !this.listboxEl) {
2346
- return;
2347
- }
2348
- this.cleanupPositionAutoUpdate = autoUpdate(this.triggerEl, this.listboxEl, () => {
2349
- void this.positionDropdown();
2350
- });
2351
- this.bodyPortalAutoUpdateActive = true;
2352
- }
2353
- stopBodyPortalAutoUpdate() {
2354
- var _a;
2355
- (_a = this.cleanupPositionAutoUpdate) === null || _a === void 0 ? void 0 : _a.call(this);
2356
- this.cleanupPositionAutoUpdate = undefined;
2357
- this.bodyPortalAutoUpdateActive = false;
2358
- }
2359
- getPortalMountRoot() {
2360
- var _a;
2361
- return (_a = this.findNearestDialogForPortal(this.el)) !== null && _a !== void 0 ? _a : document.body;
2362
- }
2363
- /**
2364
- * Resolves the native `<dialog>` to host the portaled listbox so it stays in the same top layer
2365
- * as `showModal()`. `Element.closest('dialog')` stops at shadow boundaries and can miss a
2366
- * dialog that only wraps slotted content; this walks assigned slots and shadow hosts, and
2367
- * falls back to `pds-modal`'s dialog when the combobox lives inside that subtree.
2368
- */
2369
- findNearestDialogForPortal(from) {
2370
- const seen = new Set();
2371
- let current = from;
2372
- while (current && !seen.has(current)) {
2373
- seen.add(current);
2374
- if (current.nodeType === Node.ELEMENT_NODE && current.localName === 'dialog') {
2375
- return current;
2376
- }
2377
- if (current.nodeType === Node.ELEMENT_NODE) {
2378
- const assigned = current.assignedSlot;
2379
- if (assigned) {
2380
- current = assigned;
2381
- continue;
2382
- }
2383
- }
2384
- const parent = current.parentNode;
2385
- if (parent) {
2386
- current = parent instanceof ShadowRoot ? parent.host : parent;
2387
- continue;
2388
- }
2389
- break;
2390
- }
2391
- const pineModal = from.closest('pds-modal');
2392
- if (pineModal) {
2393
- const pineDialog = pineModal.querySelector('dialog');
2394
- if (pineDialog) {
2395
- return pineDialog;
2396
- }
2397
- }
2398
- return null;
2399
- }
2400
- ensureBodyPortal() {
2401
- if (this.portalEl !== null) {
2402
- const target = this.getPortalMountRoot();
2403
- if (this.portalEl.parentElement !== target) {
2404
- target.appendChild(this.portalEl);
2405
- }
2406
- return this.portalEl;
2407
- }
2408
- this.portalEl = document.createElement('div');
2409
- this.portalEl.className = 'pds-combobox-dropdown-portal';
2410
- this.getPortalMountRoot().appendChild(this.portalEl);
2411
- return this.portalEl;
2412
- }
2413
- syncBodyPortal() {
2414
- if (!this.listboxEl) {
2415
- return;
2416
- }
2417
- const portal = this.ensureBodyPortal();
2418
- for (const stale of Array.from(portal.children)) {
2419
- if (stale !== this.listboxEl) {
2420
- stale.remove();
2421
- }
2422
- }
2423
- if (this.listboxEl.parentElement !== portal) {
2424
- portal.appendChild(this.listboxEl);
2425
- void this.positionDropdown();
2426
- this.startBodyPortalAutoUpdate();
2427
- }
2428
- }
2429
- removeBodyPortal() {
2430
- var _a;
2431
- this.stopBodyPortalAutoUpdate();
2432
- if ((_a = this.portalEl) === null || _a === void 0 ? void 0 : _a.parentNode) {
2433
- this.portalEl.parentNode.removeChild(this.portalEl);
2434
- }
2435
- this.portalEl = null;
2436
- if (this.listboxEl && !this.listboxEl.isConnected) {
2437
- this.listboxEl = undefined;
2438
- }
2439
- }
2440
- /**
2441
- * Sets focus on the native input element.
2442
- */
2443
- async setFocus() {
2444
- var _a;
2445
- if (this.inputEl) {
2446
- this.inputEl.focus();
2447
- }
2448
- else {
2449
- (_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.focus();
2450
- }
2451
- }
2452
- /**
2453
- * Sets the initial highlighted index when dropdown opens.
2454
- * If there's a selected option, highlight it. Otherwise, highlight the first option.
2455
- */
2456
- setInitialHighlightedIndex() {
2457
- const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
2458
- if (selectableOptions.length === 0) {
2459
- this.highlightedIndex = -1;
2460
- return;
2461
- }
2462
- // If there's a selected option, find its index in the filtered options
2463
- if (this.selectedOption) {
2464
- const selectedIndex = selectableOptions.findIndex(option => option === this.selectedOption);
2465
- if (selectedIndex >= 0) {
2466
- this.highlightedIndex = selectedIndex;
2467
- return;
2468
- }
2469
- }
2470
- // No selected option or selected option not in filtered results, highlight first option
2471
- this.highlightedIndex = 0;
2472
- }
2473
- /**
2474
- * Focus management helper - moves focus to the first option when dropdown opens
2475
- */
2476
- focusFirstOption() {
2477
- if (this.isOpen) {
2478
- const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
2479
- if (selectableOptions.length > 0) {
2480
- this.setInitialHighlightedIndex();
2481
- // DON'T focus the option elements - keep focus on trigger and use aria-activedescendant
2482
- // This prevents the focusout event that was closing the dropdown
2483
- // But still call updateOptionFocus for scrolling
2484
- if (this.listboxEl) {
2485
- this.updateOptionFocus();
2486
- }
2487
- }
2488
- }
2489
- }
2490
- /**
2491
- * Focus management helper - actually focuses the first option when opened via arrow keys
2492
- */
2493
- focusFirstOptionForArrowKeys() {
2494
- if (!this.isOpen) {
2495
- return;
2496
- }
2497
- // Body-mounted listboxes stay outside modal focus traps; keep focus on the trigger.
2498
- if (this.usesBodyPortal) {
2499
- this.isArrowKeyNavigationMode = true;
2500
- this.focusFirstOption();
2501
- return;
2502
- }
2503
- this.isArrowKeyNavigationMode = true;
2504
- const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
2505
- if (selectableOptions.length > 0) {
2506
- this.setInitialHighlightedIndex();
2507
- if (this.listboxEl) {
2508
- const optionElements = this.listboxEl.querySelectorAll('[role="option"]');
2509
- const highlightedOption = optionElements[this.highlightedIndex];
2510
- if (highlightedOption) {
2511
- optionElements.forEach(option => {
2512
- option.setAttribute('tabindex', '-1');
2513
- });
2514
- highlightedOption.setAttribute('tabindex', '0');
2515
- highlightedOption.focus();
2516
- highlightedOption.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
2517
- }
2518
- }
2519
- this.updateAriaActiveDescendant();
2520
- }
2521
- }
2522
- /**
2523
- * Focus management helper - updates visual state and scrolling for the currently highlighted option
2524
- * Note: We don't actually focus the option to prevent focusout events that close the dropdown
2525
- */
2526
- updateOptionFocus() {
2527
- if (!this.listboxEl || this.highlightedIndex < 0)
2528
- return;
2529
- const optionElements = this.listboxEl.querySelectorAll('[role="option"]');
2530
- const currentOption = optionElements[this.highlightedIndex];
2531
- if (currentOption) {
2532
- // Check if any option currently has focus OR if we're in arrow-key navigation mode
2533
- const hasOptionFocus = Array.from(optionElements).some(el => el === document.activeElement);
2534
- const shouldFocusOption = !this.usesBodyPortal && (hasOptionFocus || this.isArrowKeyNavigationMode);
2535
- if (shouldFocusOption) {
2536
- optionElements.forEach(option => {
2537
- option.setAttribute('tabindex', '-1');
2538
- });
2539
- currentOption.setAttribute('tabindex', '0');
2540
- currentOption.focus();
2541
- }
2542
- // Always scroll the option into view
2543
- currentOption.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
2544
- }
2545
- // Always update aria-activedescendant on the trigger element
2546
- this.updateAriaActiveDescendant();
2547
- }
2548
- /**
2549
- * Updates aria-activedescendant on the trigger element
2550
- */
2551
- updateAriaActiveDescendant() {
2552
- if (this.triggerEl && this.highlightedIndex >= 0) {
2553
- this.triggerEl.setAttribute('aria-activedescendant', this.optionDomId(this.highlightedIndex));
2554
- }
2555
- else if (this.triggerEl) {
2556
- this.triggerEl.removeAttribute('aria-activedescendant');
2557
- }
2558
- }
2559
- /**
2560
- * Focus management helper - restores focus to the trigger element
2561
- */
2562
- restoreFocusToTrigger() {
2563
- setTimeout(() => {
2564
- if (this.inputEl) {
2565
- this.inputEl.focus();
2566
- }
2567
- else if (this.triggerEl) {
2568
- this.triggerEl.focus();
2569
- }
2570
- }, 0);
2571
- }
2572
- /**
2573
- * Gets the value of the currently selected option.
2574
- */
2575
- async getSelectedValue() {
2576
- return this.selectedOption ? this.selectedOption.value : null;
2577
- }
2578
- // Get the label of the selected option
2579
- get selectedLabel() {
2580
- return this.displayText || '';
2581
- }
2582
- // Get the layout content of the selected option for button trigger
2583
- get selectedLayoutContent() {
2584
- return this.selectedOptionLayoutContent;
2585
- }
2586
- // Check if selected option has layout
2587
- get selectedHasLayout() {
2588
- return this.selectedOption ? this.isOptionLayout(this.selectedOption) : false;
2589
- }
2590
- // Extract chip sentiment from selected option's attributes, layout content, or slotted trigger content
2591
- get selectedChipSentiment() {
2592
- // First priority: Check selected option's chip attributes (new automatic approach)
2593
- if (this.selectedOption && this.isOptionChip(this.selectedOption)) {
2594
- const sentiment = this.selectedOption.getAttribute('chip-sentiment');
2595
- if (sentiment)
2596
- return sentiment;
2597
- }
2598
- // Second priority: Check selected option's layout content (existing custom layout approach)
2599
- if (this.selectedOption && this.isOptionLayout(this.selectedOption)) {
2600
- const chipElement = this.selectedOption.querySelector('pds-chip');
2601
- const sentiment = chipElement === null || chipElement === void 0 ? void 0 : chipElement.getAttribute('sentiment');
2602
- if (sentiment)
2603
- return sentiment;
2604
- }
2605
- // Third priority: Check if we have custom trigger content with a chip (initial state)
2606
- if (this.customTriggerContent) {
2607
- const slottedChip = this.el.querySelector('pds-chip[slot="trigger-content"]');
2608
- if (slottedChip) {
2609
- const sentiment = slottedChip.getAttribute('sentiment');
2610
- if (sentiment)
2611
- return sentiment;
2612
- }
2613
- }
2614
- // Fallback: Use component props
2615
- return this.chipSentiment;
2616
- }
2617
- // Extract chip large from selected option's attributes, layout content, or slotted trigger content
2618
- get selectedChipLarge() {
2619
- // First priority: Check selected option's chip attributes (new automatic approach)
2620
- if (this.selectedOption && this.isOptionChip(this.selectedOption)) {
2621
- if (this.selectedOption.hasAttribute('chip-large'))
2622
- return true;
2623
- }
2624
- // Second priority: Check selected option's layout content (existing custom layout approach)
2625
- if (this.selectedOption && this.isOptionLayout(this.selectedOption)) {
2626
- const chipElement = this.selectedOption.querySelector('pds-chip');
2627
- if (chipElement === null || chipElement === void 0 ? void 0 : chipElement.hasAttribute('large'))
2628
- return true;
2629
- }
2630
- // Third priority: Check if we have custom trigger content with a chip (initial state)
2631
- if (this.customTriggerContent) {
2632
- const slottedChip = this.el.querySelector('pds-chip[slot="trigger-content"]');
2633
- if (slottedChip && slottedChip.hasAttribute('large')) {
2634
- return true;
2635
- }
2636
- }
2637
- // Fallback: Use component props
2638
- return this.chipLarge;
2639
- }
2640
- // Extract chip icon from selected option's attributes, layout content, or slotted trigger content
2641
- get selectedChipIcon() {
2642
- // First priority: Check selected option's chip attributes (new automatic approach)
2643
- if (this.selectedOption && this.isOptionChip(this.selectedOption)) {
2644
- const icon = this.selectedOption.getAttribute('chip-icon');
2645
- if (icon)
2646
- return icon;
2647
- }
2648
- // Second priority: Check selected option's layout content (existing custom layout approach)
2649
- if (this.selectedOption && this.isOptionLayout(this.selectedOption)) {
2650
- const chipElement = this.selectedOption.querySelector('pds-chip');
2651
- const icon = chipElement === null || chipElement === void 0 ? void 0 : chipElement.getAttribute('icon');
2652
- if (icon)
2653
- return icon;
2654
- }
2655
- // Third priority: Check if we have custom trigger content with a chip (initial state)
2656
- if (this.customTriggerContent) {
2657
- const slottedChip = this.el.querySelector('pds-chip[slot="trigger-content"]');
2658
- if (slottedChip) {
2659
- const icon = slottedChip.getAttribute('icon');
2660
- if (icon)
2661
- return icon;
2662
- }
2663
- }
2664
- // Fallback: Use component props
2665
- return this.chipIcon;
2666
- }
2667
- // Extract chip dot from selected option's attributes, layout content, or slotted trigger content
2668
- get selectedChipDot() {
2669
- // First priority: Check selected option's chip attributes (new automatic approach)
2670
- if (this.selectedOption && this.isOptionChip(this.selectedOption)) {
2671
- if (this.selectedOption.hasAttribute('chip-dot'))
2672
- return true;
2673
- }
2674
- // Second priority: Check selected option's layout content (existing custom layout approach)
2675
- if (this.selectedOption && this.isOptionLayout(this.selectedOption)) {
2676
- const chipElement = this.selectedOption.querySelector('pds-chip');
2677
- if (chipElement === null || chipElement === void 0 ? void 0 : chipElement.hasAttribute('dot'))
2678
- return true;
2679
- }
2680
- // Third priority: Check if we have custom trigger content with a chip (initial state)
2681
- if (this.customTriggerContent) {
2682
- const slottedChip = this.el.querySelector('pds-chip[slot="trigger-content"]');
2683
- if (slottedChip && slottedChip.hasAttribute('dot')) {
2684
- return true;
2685
- }
2686
- }
2687
- // Fallback: Use component props
2688
- return this.chipDot;
2689
- }
2690
- handleOptionClick(option) {
2691
- // Update reactive state - single source of truth
2692
- // The @Watch('selectedOption') will handle displayText, value, and form internals
2693
- this.setSelectedOption(option);
2694
- this.isOpen = false;
2695
- this.clearExpandFilterList();
2696
- this.pdsComboboxChange.emit({ value: option.value });
2697
- }
2698
- renderDropdown() {
2699
- if (!this.isOpen) {
2700
- return null;
2701
- }
2702
- const hasSlottedEmpty = !this.usesBodyPortal && !!this.el.querySelector('[slot="empty"]');
2703
- const hasSlottedLoading = !this.usesBodyPortal && !!this.el.querySelector('[slot="loading"]');
2704
- let optionIndex = 0;
2705
- const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
2706
- return (h("ul", { class: "pds-combobox__listbox", role: "listbox", id: this.listboxId, "aria-label": this.label || 'Options', "aria-multiselectable": "false", ref: el => (this.listboxEl = el), onScroll: this.handleScroll }, this.loading && (h("li", { class: "pds-combobox__loading", role: "presentation" }, hasSlottedLoading ? (h("slot", { name: "loading" })) : (h("pds-loader", { size: "small" })))), !this.loading && this.filteredItems.length === 0 && (h("li", { class: "pds-combobox__empty", role: "presentation" }, hasSlottedEmpty ? (h("slot", { name: "empty" })) : (h("span", null, "No options found")))), this.filteredItems.map((item, itemIdx) => {
2707
- if (item.tagName === 'OPTGROUP') {
2708
- const optgroup = item;
2709
- return (h("li", { key: `optgroup-${itemIdx}`, class: "pds-combobox__group-label", role: "presentation", "aria-label": optgroup.label }, optgroup.label));
2710
- }
2711
- else if (item.tagName === 'PDS-TEXT') {
2712
- const pdsText = item;
2713
- return (h("li", { key: `pds-text-${itemIdx}`, class: "pds-combobox__group-label", role: "presentation" }, pdsText.textContent));
2714
- }
2715
- else if (item.tagName === 'OPTION') {
2716
- const option = item;
2717
- const isSelected = this.isOptionSelected(option);
2718
- const isHighlighted = this.highlightedIndex === optionIndex;
2719
- const isLayout = this.isOptionLayout(option);
2720
- const isChip = this.isOptionChip(option);
2721
- const currentOptionIndex = optionIndex++;
2722
- return (h("li", { key: option.value, id: this.optionDomId(currentOptionIndex), role: "option", "aria-selected": isSelected ? 'true' : 'false', "aria-setsize": selectableOptions.length, "aria-posinset": currentOptionIndex + 1, "aria-label": isLayout || isChip ? option.getAttribute('aria-label') || this.getOptionLabel(option) : undefined, tabindex: this.usesBodyPortal ? '-1' : isHighlighted ? '0' : '-1', class: {
2723
- 'pds-combobox__option': true,
2724
- 'pds-combobox__option--highlighted': isHighlighted,
2725
- 'pds-combobox__option--layout': isLayout,
2726
- 'pds-combobox__option--chip': isChip,
2727
- }, "data-option-index": currentOptionIndex, onMouseDown: this.onOptionMouseDown, onClick: this.onOptionClick, onMouseEnter: this.onOptionMouseEnter, onKeyDown: this.onOptionKeyDown }, isLayout ? (h("pds-box", { class: "pds-combobox__option-layout-wrapper", innerHTML: this.getOptionLayoutContent(option) })) : isChip ? (this.renderOptionChip(option)) : (this.getOptionLabel(option)), isSelected && h("pds-icon", { icon: "check", size: "regular", class: "pds-combobox__option-check" })));
2728
- }
2729
- return null;
2730
- }), this.hasMore && !this.loading && (h("li", { class: "pds-combobox__load-more", role: "presentation" }, h("pds-loader", { size: "small" })))));
2731
- }
2732
- // Helper method to render the caret icon
2733
- renderCaretIcon() {
2734
- return h("pds-icon", { icon: "caret-down", "aria-hidden": "true", class: "pds-combobox__button-trigger-chevron" });
2735
- }
2736
- // Helper method to render layout content
2737
- renderLayoutContent() {
2738
- return (h("div", { class: "pds-combobox__button-trigger-layout-wrapper", innerHTML: this.selectedLayoutContent }));
2739
- }
2740
- // Helper method to render default text content
2741
- renderDefaultContent() {
2742
- return (h("span", { class: "pds-combobox__button-trigger-label" }, this.selectedLabel || this.placeholder));
2743
- }
2744
- // Helper method to check if we should show layout content
2745
- shouldShowLayoutContent() {
2746
- return this.selectedHasLayout && !!this.selectedLayoutContent;
2747
- }
2748
- // Helper method to build chip trigger CSS classes
2749
- getChipTriggerClass() {
2750
- const classes = ['pds-combobox__chip-trigger'];
2751
- // Add sentiment class
2752
- classes.push(`pds-combobox__chip-trigger--${this.selectedChipSentiment}`);
2753
- // Always use dropdown variant for chip triggers
2754
- classes.push('pds-combobox__chip-trigger--dropdown');
2755
- // Add large class if needed
2756
- if (this.selectedChipLarge) {
2757
- classes.push('pds-combobox__chip-trigger--large');
2758
- }
2759
- // Add dot class if needed
2760
- if (this.selectedChipDot) {
2761
- classes.push('pds-combobox__chip-trigger--dot');
2762
- }
2763
- return classes.join(' ');
2764
- }
2765
- renderButtonTriggerContent() {
2766
- // Case 1: Custom trigger content with layout priority
2767
- if (this.customTriggerContent) {
2768
- if (this.shouldShowLayoutContent()) {
2769
- return [this.renderLayoutContent(), this.renderCaretIcon()];
2770
- }
2771
- // Fall back to slot content when no layout is available
2772
- return h("slot", { name: "trigger-content" });
2773
- }
2774
- // Case 2: Standard mode with layout content
2775
- if (this.shouldShowLayoutContent()) {
2776
- return [this.renderLayoutContent(), this.renderCaretIcon()];
2777
- }
2778
- // Case 3: Standard mode with default text content
2779
- return [this.renderDefaultContent(), this.renderCaretIcon()];
2780
- }
2781
- renderChipTriggerContent() {
2782
- // Case 1: Custom trigger content with layout priority
2783
- if (this.customTriggerContent) {
2784
- if (this.shouldShowLayoutContent()) {
2785
- // When using custom layouts, the chip handles its own dropdown arrow
2786
- return this.renderChipTriggerLayoutContent();
2787
- }
2788
- // Fall back to slot content when no layout is available - chip handles its own dropdown arrow
2789
- return h("slot", { name: "trigger-content" });
2790
- }
2791
- // Case 2: Standard mode with layout content
2792
- if (this.shouldShowLayoutContent()) {
2793
- // When using custom layouts, the chip handles its own dropdown arrow
2794
- return this.renderChipTriggerLayoutContent();
2795
- }
2796
- // Case 3: Automatic chip mode - selected option has chip attributes
2797
- if (this.selectedOption && this.selectedOptionChipProps) {
2798
- // Render as chip automatically - chip handles its own dropdown arrow
2799
- return this.renderSelectedOptionAsChip();
2800
- }
2801
- // Case 4: Standard mode with default text content
2802
- return [
2803
- this.renderChipTriggerDefaultContent(),
2804
- this.renderCaretIcon()
2805
- ];
2806
- }
2807
- // Helper method to render selected option as chip for trigger (automatic approach)
2808
- renderSelectedOptionAsChip() {
2809
- if (!this.selectedOption || !this.selectedOptionChipProps)
2810
- return null;
2811
- return (h("pds-chip", { sentiment: this.selectedOptionChipProps.sentiment, variant: "dropdown" // Always use dropdown variant for triggers
2812
- ,
2813
- large: this.selectedOptionChipProps.large, icon: this.selectedOptionChipProps.icon, dot: this.selectedOptionChipProps.dot, class: "pds-combobox__chip-trigger-auto" }, this.getOptionLabel(this.selectedOption)));
2814
- }
2815
- // Helper method to render chip trigger layout content
2816
- renderChipTriggerLayoutContent() {
2817
- return (h("div", { class: "pds-combobox__chip-trigger-layout-wrapper", innerHTML: this.getModifiedLayoutContentForTrigger() }));
2818
- }
2819
- // Helper method to modify layout content for trigger use (ensure dropdown variant)
2820
- getModifiedLayoutContentForTrigger() {
2821
- let content = this.selectedLayoutContent;
2822
- // If the content contains a pds-chip, ensure it has variant="dropdown"
2823
- if (content.includes('<pds-chip')) {
2824
- // Use a temporary div to parse and modify the HTML
2825
- const tempDiv = document.createElement('div');
2826
- tempDiv.innerHTML = content;
2827
- const chipElement = tempDiv.querySelector('pds-chip');
2828
- if (chipElement) {
2829
- chipElement.setAttribute('variant', 'dropdown');
2830
- content = tempDiv.innerHTML;
2831
- }
2832
- }
2833
- return content;
2834
- }
2835
- // Helper method to render chip trigger default content
2836
- renderChipTriggerDefaultContent() {
2837
- return (h("span", { class: "pds-combobox__chip-trigger-label" }, this.selectedChipIcon && h("pds-icon", { icon: this.selectedChipIcon, class: "pds-combobox__chip-trigger-icon" }), this.selectedLabel || this.placeholder));
2838
- }
2839
- // Helper method to render option as chip (new automatic approach)
2840
- renderOptionChip(option) {
2841
- const chipProps = this.getOptionChipProps(option);
2842
- return (h("pds-chip", { sentiment: chipProps.sentiment, variant: "text" // Dropdown options use text variant, not dropdown
2843
- ,
2844
- large: chipProps.large, icon: chipProps.icon, dot: chipProps.dot, class: "pds-combobox__option-chip" }, this.getOptionLabel(option)));
2845
- }
2846
- render() {
2847
- const triggerClass = [
2848
- 'pds-combobox__button-trigger',
2849
- `pds-combobox__button-trigger--${this.triggerVariant}`,
2850
- this.triggerShape === 'input' && 'pds-combobox__button-trigger--input-shape',
2851
- ]
2852
- .filter(Boolean)
2853
- .join(' ');
2854
- return (h(Host, { key: '3de5711e53460545e3cb962d446880a99edcd44c', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: 'cce16999fc6be08b99a113ae58cb2be0fbe9c577', class: "pds-combobox", tabIndex: -1, onFocusout: this.onComboboxFocusOut, part: "combobox" }, this.label && !this.hideLabel && (h("label", { key: '355650eba712d6c91694752daed4cf18008a920d', htmlFor: this.componentId, class: "pds-combobox__label" }, this.label)), this.trigger === 'input' ? (h("div", { class: "pds-combobox__input-wrapper", style: { width: this.triggerWidth } }, h("input", { ref: el => {
2855
- this.inputEl = el;
2856
- this.triggerEl = el;
2857
- }, class: "pds-combobox__input", type: "text", role: "combobox", "aria-autocomplete": "list", "aria-controls": this.listboxId, "aria-activedescendant": this.isOpen && this.highlightedIndex >= 0 ? this.optionDomId(this.highlightedIndex) : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.hideLabel ? this.label : undefined, id: this.componentId, value: this.displayText, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput, onClick: this.handleInputClick, onKeyDown: this.handleKeyDown, autocomplete: "off", part: "input" }), h("pds-icon", { icon: "enlarge", "aria-hidden": "true", class: "pds-combobox__input-icon" }))) : this.trigger === 'chip' ? (h("div", { class: this.getChipTriggerClass(), style: { width: this.triggerWidth }, role: "combobox", "aria-haspopup": "listbox", "aria-controls": this.listboxId, "aria-activedescendant": this.isOpen && this.highlightedIndex >= 0 ? this.optionDomId(this.highlightedIndex) : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.hideLabel ? this.label : undefined, id: this.componentId, tabIndex: this.disabled ? -1 : 0, onClick: this.onButtonTriggerClick, "data-layout": this.customTriggerContent, onKeyDown: this.onButtonTriggerKeyDown, onKeyUp: this.onButtonTriggerKeyUp, ref: el => (this.triggerEl = el), part: "chip-trigger" }, this.renderChipTriggerContent())) : (h("div", { class: triggerClass, style: { width: this.triggerWidth }, role: "combobox", "aria-haspopup": "listbox", "aria-controls": this.listboxId, "aria-activedescendant": this.isOpen && this.highlightedIndex >= 0 ? this.optionDomId(this.highlightedIndex) : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.hideLabel ? this.label : undefined, id: this.componentId, tabIndex: this.disabled ? -1 : 0, onClick: this.onButtonTriggerClick, "data-layout": this.customTriggerContent, onKeyDown: this.onButtonTriggerKeyDown, onKeyUp: this.onButtonTriggerKeyUp, ref: el => (this.triggerEl = el), part: "button-trigger" }, this.renderButtonTriggerContent())), h("div", { key: '87ffd9a2472b7459343daf4c0f7d46f260365180', style: { display: 'none' } }, h("slot", { key: 'fd0e21c876fbf21761ad63c9529a304912aecd1d', onSlotchange: () => this.updateOptions() })), this.renderDropdown())));
2858
- }
2859
- static get formAssociated() { return true; }
2860
- get el() { return this; }
2861
- static get watchers() { return {
2862
- "isOpen": ["isOpenChanged"],
2863
- "debounce": ["setupDebounce"],
2864
- "options": ["optionsChanged"],
2865
- "value": ["handleValueChange"],
2866
- "selectedOption": ["handleSelectedOptionChange"]
2867
- }; }
2868
- static get style() { return pdsComboboxCss; }
2869
- }, [321, "pds-combobox", {
2870
- "componentId": [1, "component-id"],
2871
- "name": [513],
2872
- "customOptionLayouts": [4, "custom-option-layouts"],
2873
- "customTriggerContent": [4, "custom-trigger-content"],
2874
- "disabled": [4],
2875
- "dropdownPlacement": [1, "dropdown-placement"],
2876
- "dropdownWidth": [1, "dropdown-width"],
2877
- "dropdownMount": [1, "dropdown-mount"],
2878
- "hideLabel": [4, "hide-label"],
2879
- "label": [1],
2880
- "maxHeight": [1, "max-height"],
2881
- "mode": [1],
2882
- "placeholder": [1],
2883
- "trigger": [1],
2884
- "triggerWidth": [1, "trigger-width"],
2885
- "triggerVariant": [1, "trigger-variant"],
2886
- "triggerShape": [1, "trigger-shape"],
2887
- "chipSentiment": [1, "chip-sentiment"],
2888
- "chipLarge": [4, "chip-large"],
2889
- "chipIcon": [1, "chip-icon"],
2890
- "chipDot": [4, "chip-dot"],
2891
- "value": [1025],
2892
- "asyncUrl": [1, "async-url"],
2893
- "asyncMethod": [1, "async-method"],
2894
- "debounce": [2],
2895
- "fetchTimeout": [2, "fetch-timeout"],
2896
- "loading": [1028],
2897
- "options": [16],
2898
- "formatResult": [16],
2899
- "displayText": [32],
2900
- "filteredItems": [32],
2901
- "highlightedIndex": [32],
2902
- "isOpen": [32],
2903
- "selectedOption": [32],
2904
- "selectedOptionLayoutContent": [32],
2905
- "selectedOptionChipProps": [32],
2906
- "internalOptions": [32],
2907
- "currentPage": [32],
2908
- "hasMore": [32],
2909
- "setFocus": [64],
2910
- "getSelectedValue": [64]
2911
- }, undefined, {
2912
- "isOpen": ["isOpenChanged"],
2913
- "debounce": ["setupDebounce"],
2914
- "options": ["optionsChanged"],
2915
- "value": ["handleValueChange"],
2916
- "selectedOption": ["handleSelectedOptionChange"]
2917
- }]);
2918
- function defineCustomElement$1() {
2919
- if (typeof customElements === "undefined") {
2920
- return;
2921
- }
2922
- const components = ["pds-combobox", "pds-box", "pds-chip", "pds-icon", "pds-loader"];
2923
- components.forEach(tagName => { switch (tagName) {
2924
- case "pds-combobox":
2925
- if (!customElements.get(tagName)) {
2926
- customElements.define(tagName, PdsCombobox$1);
2927
- }
2928
- break;
2929
- case "pds-box":
2930
- if (!customElements.get(tagName)) {
2931
- defineCustomElement$5();
2932
- }
2933
- break;
2934
- case "pds-chip":
2935
- if (!customElements.get(tagName)) {
2936
- defineCustomElement$4();
2937
- }
2938
- break;
2939
- case "pds-icon":
2940
- if (!customElements.get(tagName)) {
2941
- defineCustomElement$3();
2942
- }
2943
- break;
2944
- case "pds-loader":
2945
- if (!customElements.get(tagName)) {
2946
- defineCustomElement$2();
2947
- }
2948
- break;
2949
- } });
2950
- }
2951
-
2952
- const PdsCombobox = PdsCombobox$1;
2953
- const defineCustomElement = defineCustomElement$1;
2954
-
2955
- export { PdsCombobox, defineCustomElement };
2956
- //# sourceMappingURL=pds-combobox.js.map
2957
-
2958
- //# sourceMappingURL=pds-combobox.js.map
1
+ import{proxyCustomElement as t,HTMLElement as i,createEvent as e,h as o,Host as r,transformTag as n}from"@stencil/core/internal/client";import{i as s}from"./form.js";import{c as a,a as l,o as c,f as d,s as h}from"./floating-ui.dom.js";import{d as p}from"./utils.js";import{d as u}from"./pds-box2.js";import{d as b}from"./pds-chip2.js";import{d as m}from"./pds-icon2.js";import{d as g}from"./pds-loader2.js";
2
+ /*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:f,setPrototypeOf:v,isFrozen:x,getPrototypeOf:_,getOwnPropertyDescriptor:y}=Object;let{freeze:w,seal:k,create:T}=Object,{apply:O,construct:A}="undefined"!=typeof Reflect&&Reflect;w||(w=function(t){return t}),k||(k=function(t){return t}),O||(O=function(t,i){for(var e=arguments.length,o=Array(e>2?e-2:0),r=2;r<e;r++)o[r-2]=arguments[r];return t.apply(i,o)}),A||(A=function(t){for(var i=arguments.length,e=Array(i>1?i-1:0),o=1;o<i;o++)e[o-1]=arguments[o];return new t(...e)});const S=B(Array.prototype.forEach),E=B(Array.prototype.lastIndexOf),C=B(Array.prototype.pop),D=B(Array.prototype.push),z=B(Array.prototype.splice),P=B(String.prototype.toLowerCase),R=B(String.prototype.toString),L=B(String.prototype.match),I=B(String.prototype.replace),F=B(String.prototype.indexOf),M=B(String.prototype.trim),N=B(Object.prototype.hasOwnProperty),j=B(RegExp.prototype.test),U=function(t){return function(){for(var i=arguments.length,e=Array(i),o=0;o<i;o++)e[o]=arguments[o];return A(t,e)}}(TypeError);function B(t){return function(i){i instanceof RegExp&&(i.lastIndex=0);for(var e=arguments.length,o=Array(e>1?e-1:0),r=1;r<e;r++)o[r-1]=arguments[r];return O(t,i,o)}}function H(t,i){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:P;v&&v(t,null);let o=i.length;for(;o--;){let r=i[o];if("string"==typeof r){const t=e(r);t!==r&&(x(i)||(i[o]=t),r=t)}t[r]=!0}return t}function W(t){for(let i=0;i<t.length;i++)N(t,i)||(t[i]=null);return t}function G(t){const i=T(null);for(const[e,o]of f(t))N(t,e)&&(i[e]=Array.isArray(o)?W(o):o&&"object"==typeof o&&o.constructor===Object?G(o):o);return i}function X(t,i){for(;null!==t;){const e=y(t,i);if(e){if(e.get)return B(e.get);if("function"==typeof e.value)return B(e.value)}t=_(t)}return function(){return null}}const $=w(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),q=w(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),K=w(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),V=w(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Y=w(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Z=w(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),J=w(["#text"]),Q=w(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),tt=w(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),it=w(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),et=w(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ot=k(/\{\{[\w\W]*|[\w\W]*\}\}/gm),rt=k(/<%[\w\W]*|[\w\W]*%>/gm),nt=k(/\$\{[\w\W]*/gm),st=k(/^data-[\-\w.\u00B7-\uFFFF]+$/),at=k(/^aria-[\-\w]+$/),lt=k(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ct=k(/^(?:\w+script|data):/i),dt=k(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ht=k(/^html$/i),pt=k(/^[a-z][.\w]*(-[.\w]+)+$/i);var ut=Object.freeze({__proto__:null,ARIA_ATTR:at,ATTR_WHITESPACE:dt,CUSTOM_ELEMENT:pt,DATA_ATTR:st,DOCTYPE_NAME:ht,ERB_EXPR:rt,IS_ALLOWED_URI:lt,IS_SCRIPT_OR_DATA:ct,MUSTACHE_EXPR:ot,TMPLIT_EXPR:nt});const bt=function(){return"undefined"==typeof window?null:window};var mt=function t(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bt();const e=i=>t(i);if(e.version="3.3.3",e.removed=[],!i||!i.document||9!==i.document.nodeType||!i.Element)return e.isSupported=!1,e;let{document:o}=i;const r=o,n=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:l,Element:c,NodeFilter:d,NamedNodeMap:h=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:p,DOMParser:u,trustedTypes:b}=i,m=c.prototype,g=X(m,"cloneNode"),v=X(m,"remove"),x=X(m,"nextSibling"),_=X(m,"childNodes"),y=X(m,"parentNode");if("function"==typeof a){const t=o.createElement("template");t.content&&t.content.ownerDocument&&(o=t.content.ownerDocument)}let k,O="";const{implementation:A,createNodeIterator:B,createDocumentFragment:W,getElementsByTagName:ot}=o,{importNode:rt}=r;let nt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};e.isSupported="function"==typeof f&&"function"==typeof y&&A&&void 0!==A.createHTMLDocument;const{MUSTACHE_EXPR:st,ERB_EXPR:at,TMPLIT_EXPR:ct,DATA_ATTR:dt,ARIA_ATTR:pt,IS_SCRIPT_OR_DATA:mt,ATTR_WHITESPACE:gt,CUSTOM_ELEMENT:ft}=ut;let{IS_ALLOWED_URI:vt}=ut,xt=null;const _t=H({},[...$,...q,...K,...Y,...J]);let yt=null;const wt=H({},[...Q,...tt,...it,...et]);let kt=Object.seal(T(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Tt=null,Ot=null;const At=Object.seal(T(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let St=!0,Et=!0,Ct=!1,Dt=!0,zt=!1,Pt=!0,Rt=!1,Lt=!1,It=!1,Ft=!1,Mt=!1,Nt=!1,jt=!0,Ut=!1,Bt=!0,Ht=!1,Wt={},Gt=null;const Xt=H({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $t=null;const qt=H({},["audio","video","img","source","image","track"]);let Kt=null;const Vt=H({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Yt="http://www.w3.org/1998/Math/MathML",Zt="http://www.w3.org/2000/svg",Jt="http://www.w3.org/1999/xhtml";let Qt=Jt,ti=!1,ii=null;const ei=H({},[Yt,Zt,Jt],R);let oi=H({},["mi","mo","mn","ms","mtext"]),ri=H({},["annotation-xml"]);const ni=H({},["title","style","font","a","script"]);let si=null;const ai=["application/xhtml+xml","text/html"];let li=null,ci=null;const di=o.createElement("form"),hi=function(t){return t instanceof RegExp||t instanceof Function},pi=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ci||ci!==t){if(t&&"object"==typeof t||(t={}),t=G(t),si=-1===ai.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,li="application/xhtml+xml"===si?R:P,xt=N(t,"ALLOWED_TAGS")?H({},t.ALLOWED_TAGS,li):_t,yt=N(t,"ALLOWED_ATTR")?H({},t.ALLOWED_ATTR,li):wt,ii=N(t,"ALLOWED_NAMESPACES")?H({},t.ALLOWED_NAMESPACES,R):ei,Kt=N(t,"ADD_URI_SAFE_ATTR")?H(G(Vt),t.ADD_URI_SAFE_ATTR,li):Vt,$t=N(t,"ADD_DATA_URI_TAGS")?H(G(qt),t.ADD_DATA_URI_TAGS,li):qt,Gt=N(t,"FORBID_CONTENTS")?H({},t.FORBID_CONTENTS,li):Xt,Tt=N(t,"FORBID_TAGS")?H({},t.FORBID_TAGS,li):G({}),Ot=N(t,"FORBID_ATTR")?H({},t.FORBID_ATTR,li):G({}),Wt=!!N(t,"USE_PROFILES")&&t.USE_PROFILES,St=!1!==t.ALLOW_ARIA_ATTR,Et=!1!==t.ALLOW_DATA_ATTR,Ct=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Dt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,zt=t.SAFE_FOR_TEMPLATES||!1,Pt=!1!==t.SAFE_FOR_XML,Rt=t.WHOLE_DOCUMENT||!1,Ft=t.RETURN_DOM||!1,Mt=t.RETURN_DOM_FRAGMENT||!1,Nt=t.RETURN_TRUSTED_TYPE||!1,It=t.FORCE_BODY||!1,jt=!1!==t.SANITIZE_DOM,Ut=t.SANITIZE_NAMED_PROPS||!1,Bt=!1!==t.KEEP_CONTENT,Ht=t.IN_PLACE||!1,vt=t.ALLOWED_URI_REGEXP||lt,Qt=t.NAMESPACE||Jt,oi=t.MATHML_TEXT_INTEGRATION_POINTS||oi,ri=t.HTML_INTEGRATION_POINTS||ri,kt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&hi(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(kt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&hi(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(kt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(kt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),zt&&(Et=!1),Mt&&(Ft=!0),Wt&&(xt=H({},J),yt=T(null),!0===Wt.html&&(H(xt,$),H(yt,Q)),!0===Wt.svg&&(H(xt,q),H(yt,tt),H(yt,et)),!0===Wt.svgFilters&&(H(xt,K),H(yt,tt),H(yt,et)),!0===Wt.mathMl&&(H(xt,Y),H(yt,it),H(yt,et))),N(t,"ADD_TAGS")||(At.tagCheck=null),N(t,"ADD_ATTR")||(At.attributeCheck=null),t.ADD_TAGS&&("function"==typeof t.ADD_TAGS?At.tagCheck=t.ADD_TAGS:(xt===_t&&(xt=G(xt)),H(xt,t.ADD_TAGS,li))),t.ADD_ATTR&&("function"==typeof t.ADD_ATTR?At.attributeCheck=t.ADD_ATTR:(yt===wt&&(yt=G(yt)),H(yt,t.ADD_ATTR,li))),t.ADD_URI_SAFE_ATTR&&H(Kt,t.ADD_URI_SAFE_ATTR,li),t.FORBID_CONTENTS&&(Gt===Xt&&(Gt=G(Gt)),H(Gt,t.FORBID_CONTENTS,li)),t.ADD_FORBID_CONTENTS&&(Gt===Xt&&(Gt=G(Gt)),H(Gt,t.ADD_FORBID_CONTENTS,li)),Bt&&(xt["#text"]=!0),Rt&&H(xt,["html","head","body"]),xt.table&&(H(xt,["tbody"]),delete Tt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw U('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw U('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=t.TRUSTED_TYPES_POLICY,O=k.createHTML("")}else void 0===k&&(k=function(t,i){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let e=null;const o="data-tt-policy-suffix";i&&i.hasAttribute(o)&&(e=i.getAttribute(o));const r="dompurify"+(e?"#"+e:"");try{return t.createPolicy(r,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(b,n)),null!==k&&"string"==typeof O&&(O=k.createHTML(""));w&&w(t),ci=t}},ui=H({},[...q,...K,...V]),bi=H({},[...Y,...Z]),mi=function(t){D(e.removed,{element:t});try{y(t).removeChild(t)}catch(i){v(t)}},gi=function(t,i){try{D(e.removed,{attribute:i.getAttributeNode(t),from:i})}catch(t){D(e.removed,{attribute:null,from:i})}if(i.removeAttribute(t),"is"===t)if(Ft||Mt)try{mi(i)}catch(t){}else try{i.setAttribute(t,"")}catch(t){}},fi=function(t){let i=null,e=null;if(It)t="<remove></remove>"+t;else{const i=L(t,/^[\r\n\t ]+/);e=i&&i[0]}"application/xhtml+xml"===si&&Qt===Jt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const r=k?k.createHTML(t):t;if(Qt===Jt)try{i=(new u).parseFromString(r,si)}catch(t){}if(!i||!i.documentElement){i=A.createDocument(Qt,"template",null);try{i.documentElement.innerHTML=ti?O:r}catch(t){}}const n=i.body||i.documentElement;return t&&e&&n.insertBefore(o.createTextNode(e),n.childNodes[0]||null),Qt===Jt?ot.call(i,Rt?"html":"body")[0]:Rt?i.documentElement:n},vi=function(t){return B.call(t.ownerDocument||t,t,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},xi=function(t){return t instanceof p&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof h)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},_i=function(t){return"function"==typeof l&&t instanceof l};function yi(t,i,o){S(t,(t=>{t.call(e,i,o,ci)}))}const wi=function(t){let i=null;if(yi(nt.beforeSanitizeElements,t,null),xi(t))return mi(t),!0;const o=li(t.nodeName);if(yi(nt.uponSanitizeElement,t,{tagName:o,allowedTags:xt}),Pt&&t.hasChildNodes()&&!_i(t.firstElementChild)&&j(/<[/\w!]/g,t.innerHTML)&&j(/<[/\w!]/g,t.textContent))return mi(t),!0;if(7===t.nodeType)return mi(t),!0;if(Pt&&8===t.nodeType&&j(/<[/\w]/g,t.data))return mi(t),!0;if(!(At.tagCheck instanceof Function&&At.tagCheck(o))&&(!xt[o]||Tt[o])){if(!Tt[o]&&Ti(o)){if(kt.tagNameCheck instanceof RegExp&&j(kt.tagNameCheck,o))return!1;if(kt.tagNameCheck instanceof Function&&kt.tagNameCheck(o))return!1}if(Bt&&!Gt[o]){const i=y(t)||t.parentNode,e=_(t)||t.childNodes;if(e&&i)for(let o=e.length-1;o>=0;--o){const r=g(e[o],!0);r.__removalCount=(t.__removalCount||0)+1,i.insertBefore(r,x(t))}}return mi(t),!0}return t instanceof c&&!function(t){let i=y(t);i&&i.tagName||(i={namespaceURI:Qt,tagName:"template"});const e=P(t.tagName),o=P(i.tagName);return!!ii[t.namespaceURI]&&(t.namespaceURI===Zt?i.namespaceURI===Jt?"svg"===e:i.namespaceURI===Yt?"svg"===e&&("annotation-xml"===o||oi[o]):!!ui[e]:t.namespaceURI===Yt?i.namespaceURI===Jt?"math"===e:i.namespaceURI===Zt?"math"===e&&ri[o]:!!bi[e]:t.namespaceURI===Jt?!(i.namespaceURI===Zt&&!ri[o])&&!(i.namespaceURI===Yt&&!oi[o])&&!bi[e]&&(ni[e]||!ui[e]):!("application/xhtml+xml"!==si||!ii[t.namespaceURI]))}(t)?(mi(t),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!j(/<\/no(script|embed|frames)/i,t.innerHTML)?(zt&&3===t.nodeType&&(i=t.textContent,S([st,at,ct],(t=>{i=I(i,t," ")})),t.textContent!==i&&(D(e.removed,{element:t.cloneNode()}),t.textContent=i)),yi(nt.afterSanitizeElements,t,null),!1):(mi(t),!0)},ki=function(t,i,e){if(Ot[i])return!1;if(jt&&("id"===i||"name"===i)&&(e in o||e in di))return!1;if(Et&&!Ot[i]&&j(dt,i));else if(St&&j(pt,i));else if(At.attributeCheck instanceof Function&&At.attributeCheck(i,t));else if(!yt[i]||Ot[i]){if(!(Ti(t)&&(kt.tagNameCheck instanceof RegExp&&j(kt.tagNameCheck,t)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(t))&&(kt.attributeNameCheck instanceof RegExp&&j(kt.attributeNameCheck,i)||kt.attributeNameCheck instanceof Function&&kt.attributeNameCheck(i,t))||"is"===i&&kt.allowCustomizedBuiltInElements&&(kt.tagNameCheck instanceof RegExp&&j(kt.tagNameCheck,e)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(e))))return!1}else if(Kt[i]);else if(j(vt,I(e,gt,"")));else if("src"!==i&&"xlink:href"!==i&&"href"!==i||"script"===t||0!==F(e,"data:")||!$t[t])if(Ct&&!j(mt,I(e,gt,"")));else if(e)return!1;return!0},Ti=function(t){return"annotation-xml"!==t&&L(t,ft)},Oi=function(t){yi(nt.beforeSanitizeAttributes,t,null);const{attributes:i}=t;if(!i||xi(t))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:yt,forceKeepAttr:void 0};let r=i.length;for(;r--;){const n=i[r],{name:s,namespaceURI:a,value:l}=n,c=li(s),d=l;let h="value"===s?d:M(d);if(o.attrName=c,o.attrValue=h,o.keepAttr=!0,o.forceKeepAttr=void 0,yi(nt.uponSanitizeAttribute,t,o),h=o.attrValue,!Ut||"id"!==c&&"name"!==c||(gi(s,t),h="user-content-"+h),Pt&&j(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,h)){gi(s,t);continue}if("attributename"===c&&L(h,"href")){gi(s,t);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){gi(s,t);continue}if(!Dt&&j(/\/>/i,h)){gi(s,t);continue}zt&&S([st,at,ct],(t=>{h=I(h,t," ")}));const p=li(t.nodeName);if(ki(p,c,h)){if(k&&"object"==typeof b&&"function"==typeof b.getAttributeType)if(a);else switch(b.getAttributeType(p,c)){case"TrustedHTML":h=k.createHTML(h);break;case"TrustedScriptURL":h=k.createScriptURL(h)}if(h!==d)try{a?t.setAttributeNS(a,s,h):t.setAttribute(s,h),xi(t)?mi(t):C(e.removed)}catch(i){gi(s,t)}}else gi(s,t)}yi(nt.afterSanitizeAttributes,t,null)},Ai=function t(i){let e=null;const o=vi(i);for(yi(nt.beforeSanitizeShadowDOM,i,null);e=o.nextNode();)yi(nt.uponSanitizeShadowNode,e,null),wi(e),Oi(e),e.content instanceof s&&t(e.content);yi(nt.afterSanitizeShadowDOM,i,null)};return e.sanitize=function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,n=null,a=null,c=null;if(ti=!t,ti&&(t="\x3c!--\x3e"),"string"!=typeof t&&!_i(t)){if("function"!=typeof t.toString)throw U("toString is not a function");if("string"!=typeof(t=""+t))throw U("dirty is not a string, aborting")}if(!e.isSupported)return t;if(Lt||pi(i),e.removed=[],"string"==typeof t&&(Ht=!1),Ht){if(t.nodeName){const i=li(t.nodeName);if(!xt[i]||Tt[i])throw U("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)o=fi("\x3c!----\x3e"),n=o.ownerDocument.importNode(t,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?o=n:o.appendChild(n);else{if(!Ft&&!zt&&!Rt&&-1===t.indexOf("<"))return k&&Nt?k.createHTML(t):t;if(o=fi(t),!o)return Ft?null:Nt?O:""}o&&It&&mi(o.firstChild);const d=vi(Ht?t:o);for(;a=d.nextNode();)wi(a),Oi(a),a.content instanceof s&&Ai(a.content);if(Ht)return t;if(Ft){if(Mt)for(c=W.call(o.ownerDocument);o.firstChild;)c.appendChild(o.firstChild);else c=o;return(yt.shadowroot||yt.shadowrootmode)&&(c=rt.call(r,c,!0)),c}let h=Rt?o.outerHTML:o.innerHTML;return Rt&&xt["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&j(ht,o.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+h),zt&&S([st,at,ct],(t=>{h=I(h,t," ")})),k&&Nt?k.createHTML(h):h},e.setConfig=function(){pi(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Lt=!0},e.clearConfig=function(){ci=null,Lt=!1},e.isValidAttribute=function(t,i,e){ci||pi({});const o=li(t),r=li(i);return ki(o,r,e)},e.addHook=function(t,i){"function"==typeof i&&D(nt[t],i)},e.removeHook=function(t,i){if(void 0!==i){const e=E(nt[t],i);return-1===e?void 0:z(nt[t],e,1)[0]}return C(nt[t])},e.removeHooks=function(t){nt[t]=[]},e.removeAllHooks=function(){nt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},e}();const gt=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.pdsComboboxChange=e(this,"pdsComboboxChange",7),this.pdsComboboxSearch=e(this,"pdsComboboxSearch",7),this.pdsComboboxLoadOptions=e(this,"pdsComboboxLoadOptions",7),this.customOptionLayouts=!1,this.customTriggerContent=!1,this.disabled=!1,this.dropdownPlacement="bottom-start",this.dropdownWidth="236px",this.dropdownMount="host",this.hideLabel=!1,this.mode="filter",this.trigger="input",this.triggerWidth="fit-content",this.triggerVariant="secondary",this.triggerShape="pill",this.chipSentiment="neutral",this.chipLarge=!1,this.chipDot=!1,this.value="",this.asyncMethod="GET",this.debounce=300,this.fetchTimeout=3e4,this.loading=!1,this.displayText="",this.filteredItems=[],this.highlightedIndex=-1,this.isOpen=!1,this.selectedOption=null,this.selectedOptionLayoutContent="",this.selectedOptionChipProps=null,this.internalOptions=[],this.currentPage=1,this.hasMore=!1,this.optionEls=[],this.allItems=[],this.portalEl=null,this.bodyPortalAutoUpdateActive=!1,this.isUpdatingFromSelection=!1,this.expandFilterListWhileOpen=!1,this.handleInput=t=>{const i=t.target;this.clearExpandFilterList(),this.displayText=i.value,this.isOpen=!0,this.filterOptions(),this.pdsComboboxSearch.emit({query:this.displayText}),this.asyncUrl&&this.debouncedFetchAsyncOptions(this.displayText,1),setTimeout((()=>this.openDropdownPositioning()),0)},this.handleInputClick=()=>{this.isOpen||(this.isOpen=!0,this.prepareExpandFilterListOnOpen(),this.filterOptions(),this.asyncUrl&&0===this.internalOptions.length&&this.debouncedFetchAsyncOptions(this.displayText,1),this.setInitialHighlightedIndex(),setTimeout((()=>{this.openDropdownPositioning(),"input"===this.trigger&&this.expandFilterListWhileOpen&&this.inputEl&&this.inputEl.select()}),0))},this.handleKeyDown=t=>{if(!this.isOpen&&("ArrowDown"===t.key||"ArrowUp"===t.key||t.altKey&&"ArrowDown"===t.key))return t.preventDefault(),this.isOpen=!0,this.prepareExpandFilterListOnOpen(),this.filterOptions(),this.setInitialHighlightedIndex(),void setTimeout((()=>{this.openDropdownPositioning(),"input"===this.trigger?this.focusFirstOption():this.focusFirstOptionForArrowKeys()}),0);if(!this.isOpen)return;const i=this.filteredItems.filter((t=>"OPTION"===t.tagName));switch(t.key){case"ArrowDown":t.preventDefault(),this.highlightedIndex=this.highlightedIndex<0&&i.length>0?0:Math.min(this.highlightedIndex+1,i.length-1),this.updateOptionFocus();break;case"ArrowUp":t.preventDefault(),this.highlightedIndex=this.highlightedIndex<0&&i.length>0?i.length-1:Math.max(this.highlightedIndex-1,0),this.updateOptionFocus();break;case"Home":t.preventDefault(),i.length>0&&(this.highlightedIndex=0,this.updateOptionFocus());break;case"End":t.preventDefault(),i.length>0&&(this.highlightedIndex=i.length-1,this.updateOptionFocus());break;case"PageDown":t.preventDefault(),i.length>0&&(this.highlightedIndex=Math.min(this.highlightedIndex+10,i.length-1),this.updateOptionFocus());break;case"PageUp":t.preventDefault(),i.length>0&&(this.highlightedIndex=Math.max(this.highlightedIndex-10,0),this.updateOptionFocus());break;case"Enter":case" ":t.preventDefault(),this.highlightedIndex>=0&&this.highlightedIndex<i.length&&(this.handleOptionClick(i[this.highlightedIndex]),this.restoreFocusToTrigger());break;case"Escape":t.preventDefault(),this.isOpen=!1,this.highlightedIndex=-1,this.clearExpandFilterList(),this.isArrowKeyNavigationMode=!1,this.restoreFocusToTrigger();break;case"Tab":this.isOpen=!1,this.highlightedIndex=-1,this.clearExpandFilterList(),this.isArrowKeyNavigationMode=!1}},this.isArrowKeyNavigationMode=!1,this.onOptionClick=t=>{const i=Number(t.currentTarget.getAttribute("data-option-index")),e=this.filteredItems.filter((t=>"OPTION"===t.tagName));this.handleOptionClick(e[i])},this.onOptionMouseEnter=t=>{const i=Number(t.currentTarget.getAttribute("data-option-index"));this.highlightedIndex=i},this.onOptionMouseDown=t=>{t.preventDefault()},this.onOptionKeyDown=t=>{this.handleKeyDown(t)},this.onButtonTriggerClick=()=>{this.isOpen=!this.isOpen,this.isOpen?(this.prepareExpandFilterListOnOpen(),this.filterOptions(),this.asyncUrl&&0===this.internalOptions.length&&this.debouncedFetchAsyncOptions(this.displayText,1),this.setInitialHighlightedIndex(),this.isArrowKeyNavigationMode=!0,setTimeout((()=>this.openDropdownPositioning()),0)):(this.clearExpandFilterList(),this.isArrowKeyNavigationMode=!1)},this.onButtonTriggerKeyDown=t=>{"Enter"!==t.key&&" "!==t.key&&"ArrowDown"!==t.key&&"ArrowUp"!==t.key||this.isOpen?"Escape"===t.key?(t.preventDefault(),this.isOpen&&(this.isOpen=!1,this.highlightedIndex=-1,this.clearExpandFilterList(),this.updateAriaActiveDescendant(),this.restoreFocusToTrigger())):this.isOpen&&this.handleKeyDown(t):(t.preventDefault(),t.stopPropagation(),this.isOpen=!0,this.prepareExpandFilterListOnOpen(),this.filterOptions(),this.setInitialHighlightedIndex(),setTimeout((()=>{this.openDropdownPositioning(),this.focusFirstOptionForArrowKeys()}),0))},this.onButtonTriggerKeyUp=t=>{" "===t.key&&(t.preventDefault(),t.stopPropagation())},this.onComboboxFocusOut=t=>{var i,e;const o=t.relatedTarget,r=o&&((null===(i=this.listboxEl)||void 0===i?void 0:i.contains(o))||(null===(e=this.portalEl)||void 0===e?void 0:e.contains(o)));this.el.contains(o)||r||(this.isOpen=!1,this.highlightedIndex=-1,this.clearExpandFilterList(),this.isArrowKeyNavigationMode=!1,this.updateAriaActiveDescendant(),this.selectedOption&&this.displayText!==this.getOptionLabel(this.selectedOption)&&(this.displayText=this.getOptionLabel(this.selectedOption)))},this.handleScroll=t=>{if(!this.asyncUrl||!this.hasMore||this.loading)return;const i=t.target;i.scrollHeight-i.scrollTop-i.clientHeight<50&&(this.pdsComboboxLoadOptions.emit({query:this.displayText,page:this.currentPage+1}),this.debouncedFetchAsyncOptions(this.displayText,this.currentPage+1))}}connectedCallback(){this.el.attachInternals&&!this.internals&&(this.internals=this.el.attachInternals())}componentWillLoad(){this.originalSearchEmitter=this.pdsComboboxSearch,this.updateOptions()}componentDidLoad(){var t,i,e;if(this.setupDebounce(),!this.selectedOption&&this.value&&this.optionEls.length>0){const t=this.optionEls.find((t=>t.value===this.value));t&&(this.setSelectedOption(t),this.displayText=this.getOptionLabel(t))}this.updateFormValue(null!==(e=null!==(i=null===(t=this.selectedOption)||void 0===t?void 0:t.value)&&void 0!==i?i:this.value)&&void 0!==e?e:"")}disconnectedCallback(){var t;void 0!==this.deferredPortalTeardownId&&(clearTimeout(this.deferredPortalTeardownId),this.deferredPortalTeardownId=void 0),null===(t=this.observer)||void 0===t||t.disconnect(),this.clearAsyncFetchState(),this.removeBodyPortal()}componentDidRender(){this.usesBodyPortal&&this.isOpen&&this.syncBodyPortal()}isOpenChanged(t){if(t&&void 0!==this.deferredPortalTeardownId&&(clearTimeout(this.deferredPortalTeardownId),this.deferredPortalTeardownId=void 0),t&&this.usesBodyPortal&&this.removeBodyPortal(),!t&&this.usesBodyPortal)return void 0!==this.deferredPortalTeardownId&&clearTimeout(this.deferredPortalTeardownId),void(this.deferredPortalTeardownId=setTimeout((()=>{this.deferredPortalTeardownId=void 0,this.el.isConnected&&(this.isOpen||this.removeBodyPortal())}),0));t||this.removeBodyPortal()}get usesBodyPortal(){return"body"===this.dropdownMount}get listboxId(){return this.componentId+"-listbox"}optionDomId(t){return`${this.componentId}-option-${t}`}setupDebounce(){const{pdsComboboxSearch:t,debounce:i,originalSearchEmitter:e}=this;this.pdsComboboxSearch=void 0===i?null!=e?e:t:p(t,i)}optionsChanged(){this.options&&(this.internalOptions=[...this.options],this.updateOptionsFromAsync())}handleValueChange(){if(this.filterOptions(),this.updateFormValue(this.value),!this.isUpdatingFromSelection&&this.value&&this.optionEls.length>0&&this.value!==(this.selectedOption?this.selectedOption.value:null)){const t=this.optionEls.find((t=>t.value===this.value));t&&(this.isUpdatingFromSelection=!0,this.setSelectedOption(t),this.displayText=this.getOptionLabel(t),this.isUpdatingFromSelection=!1)}}handleSelectedOptionChange(){this.selectedOptionLayoutContent=this.selectedOption&&this.isOptionLayout(this.selectedOption)?this.getOptionLayoutContent(this.selectedOption):"",this.selectedOptionChipProps=this.selectedOption&&this.isOptionChip(this.selectedOption)?this.getOptionChipProps(this.selectedOption):null,this.selectedOption?(this.displayText=this.getOptionLabel(this.selectedOption),this.value=this.selectedOption.value,this.updateFormValue(this.selectedOption.value)):(this.displayText="",this.value="",this.updateFormValue(""))}updateFormValue(t){s()||this.internals&&this.internals.setFormValue&&this.internals.setFormValue(t)}clearAsyncFetchState(){var t;void 0!==this.fetchDebounceTimer&&(window.clearTimeout(this.fetchDebounceTimer),this.fetchDebounceTimer=void 0),void 0!==this.fetchTimeoutTimer&&(window.clearTimeout(this.fetchTimeoutTimer),this.fetchTimeoutTimer=void 0),null===(t=this.abortController)||void 0===t||t.abort(),this.abortController=void 0}debouncedFetchAsyncOptions(t,i=1){var e;if(!this.asyncUrl)return;void 0!==this.fetchDebounceTimer&&window.clearTimeout(this.fetchDebounceTimer);const o=Math.max(0,null!==(e=this.debounce)&&void 0!==e?e:0);this.fetchDebounceTimer=window.setTimeout((()=>{this.fetchDebounceTimer=void 0,this.fetchOptions(t,i)}),o)}async fetchOptions(t,i=1){var e;if(this.asyncUrl){null===(e=this.abortController)||void 0===e||e.abort(),void 0!==this.fetchTimeoutTimer&&(window.clearTimeout(this.fetchTimeoutTimer),this.fetchTimeoutTimer=void 0),this.abortController=new AbortController,this.loading=!0,this.fetchTimeoutTimer=window.setTimeout((()=>{var t;null===(t=this.abortController)||void 0===t||t.abort(),this.fetchTimeoutTimer=void 0}),this.fetchTimeout);try{let e;try{e=new URL(this.asyncUrl,window.location.origin)}catch(t){throw new TypeError("Invalid asyncUrl: "+this.asyncUrl)}"GET"===this.asyncMethod&&(e.searchParams.set("search",t),e.searchParams.set("page",i+""));const o=await fetch(""+e,Object.assign({method:this.asyncMethod,signal:this.abortController.signal,headers:{"Content-Type":"application/json",Accept:"application/json"}},"POST"===this.asyncMethod&&{body:JSON.stringify({search:t,page:i})}));if(void 0!==this.fetchTimeoutTimer&&(window.clearTimeout(this.fetchTimeoutTimer),this.fetchTimeoutTimer=void 0),!o.ok)throw Error("Failed to fetch options");const r=await o.json(),n=r.results.map((t=>this.formatResult?this.formatResult(t):"object"==typeof t&&null!==t?Object.assign({id:t.id,text:t.text},t):{id:t+"",text:t+""}));this.internalOptions=1===i?n:[...this.internalOptions,...n],this.hasMore=!!r.totalCount&&this.internalOptions.length<r.totalCount,this.currentPage=i,this.updateOptionsFromAsync()}catch(t){void 0!==this.fetchTimeoutTimer&&(window.clearTimeout(this.fetchTimeoutTimer),this.fetchTimeoutTimer=void 0),"AbortError"!==t.name&&console.error("PdsCombobox: Failed to fetch options",t)}finally{this.loading=!1}}}updateOptionsFromAsync(){if(this.asyncUrl||this.options){if(this.optionEls=[],this.allItems=[],(this.options||this.internalOptions).forEach((t=>{const i=document.createElement("option");i.value=t.id+"",i.textContent=t.text,this.optionEls.push(i),this.allItems.push(i)})),this.value&&!this.selectedOption){const t=this.optionEls.find((t=>t.value===this.value));t&&this.setSelectedOption(t)}this.filterOptions()}}updateOptions(){var t;if(this.asyncUrl||this.options)return void this.updateOptionsFromAsync();const i=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.querySelector('slot[name="option"], slot:not([name])');if(i){const t=i.assignedElements({flatten:!0});this.allItems=[],this.optionEls=[],t.forEach((t=>{if("OPTION"===t.tagName)this.optionEls.push(t),this.allItems.push(t);else if("OPTGROUP"===t.tagName){const i=t;this.allItems.push(i),Array.from(i.children).forEach((t=>{"OPTION"===t.tagName&&(this.optionEls.push(t),this.allItems.push(t))}))}else"PDS-TEXT"===t.tagName&&this.allItems.push(t)}));let e=null;this.value&&(e=this.optionEls.find((t=>t.value===this.value))||null,e&&(this.displayText=this.getOptionLabel(e))),!e&&"chip"===this.trigger&&this.optionEls.length>0&&(e=this.optionEls[0],this.value=e.value,this.displayText=this.getOptionLabel(e),console.warn("PDS Combobox: Chip triggers should always have a selected option. Automatically selected the first option.")),(e&&e!==this.selectedOption||!this.selectedOption&&e)&&this.setSelectedOption(e),this.filterOptions()}}getOptionLabel(t){return t.label||t.textContent||""}getOptionLayoutContent(t){return this.sanitizeHtml(t.innerHTML||"")}sanitizeHtml(t){return mt.sanitize(t,{CUSTOM_ELEMENT_HANDLING:{tagNameCheck:t=>t.startsWith("pds-")||/^[a-z]+$/i.test(t),attributeNameCheck:t=>/^[a-zA-Z][a-zA-Z0-9-]*$/.test(t)||t.startsWith("data-")||t.startsWith("aria-"),allowCustomizedBuiltInElements:!1},ALLOW_DATA_ATTR:!0,ALLOW_ARIA_ATTR:!0,FORBID_TAGS:["script","iframe","object","embed","form","input","textarea","select","button","style"],FORBID_ATTR:["onerror","onload","onclick","onmouseover","onmouseout","onmousemove","onfocus","onblur","onchange","onsubmit","onkeydown","onkeyup","onkeypress","onmousedown","onmouseup","ondblclick","oncontextmenu","onscroll"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i})}isOptionLayout(t){return this.customOptionLayouts&&t.hasAttribute("data-layout")}isOptionChip(t){return t.hasAttribute("chip-sentiment")||t.hasAttribute("chip-large")||t.hasAttribute("chip-icon")||t.hasAttribute("chip-dot")}getOptionChipProps(t){return{sentiment:t.getAttribute("chip-sentiment")||"neutral",large:t.hasAttribute("chip-large"),icon:t.getAttribute("chip-icon")||void 0,dot:t.hasAttribute("chip-dot")}}isOptionSelected(t){return this.selectedOption===t}setSelectedOption(t){this.selectedOption=t,this.selectedOptionChipProps=t&&this.isOptionChip(t)?this.getOptionChipProps(t):null}filterOptions(){if(0===this.allItems.length&&this.optionEls.length>0&&(this.allItems=[...this.optionEls]),"select-only"===this.mode||this.expandFilterListWhileOpen)this.filteredItems=[...this.allItems];else{const t=this.displayText.toLowerCase(),i=this.optionEls.filter((i=>this.isOptionLayout(i)?(i.getAttribute("data-search-text")||i.textContent||"").toLowerCase().includes(t):this.getOptionLabel(i).toLowerCase().includes(t)));this.filteredItems=[];let e=null;this.allItems.forEach((t=>{if("OPTGROUP"===t.tagName||"PDS-TEXT"===t.tagName)e=t;else if("OPTION"===t.tagName&&i.includes(t)){const i=t,o=i.parentElement;let r=null;o&&"OPTGROUP"===o.tagName?r=o:e&&"PDS-TEXT"===e.tagName&&(r=e),r&&!this.filteredItems.includes(r)&&this.filteredItems.push(r),this.filteredItems.push(i)}}))}this.highlightedIndex=-1}clearExpandFilterList(){this.expandFilterListWhileOpen=!1}prepareExpandFilterListOnOpen(){this.expandFilterListWhileOpen=!("filter"!==this.mode||!this.selectedOption||this.displayText!==this.getOptionLabel(this.selectedOption))}positionDropdown(){if(!this.triggerEl||!this.listboxEl)return;const t=this.usesBodyPortal?"fixed":"absolute",i=this.usesBodyPortal?"var(--pine-z-index-priority)":"var(--pine-z-index-raised)";return this.listboxEl.style.width=this.dropdownWidth,this.maxHeight&&(this.listboxEl.style.maxHeight=this.maxHeight,this.listboxEl.style.overflowY="auto"),a(this.triggerEl,this.listboxEl,{placement:this.dropdownPlacement,strategy:t,middleware:[c(12),d(),h({padding:5})]}).then((({x:e,y:o})=>{this.listboxEl&&Object.assign(this.listboxEl.style,{left:e+"px",top:o+"px",position:t,zIndex:i})}))}openDropdownPositioning(){this.triggerEl&&this.listboxEl&&this.positionDropdown()}startBodyPortalAutoUpdate(){!this.bodyPortalAutoUpdateActive&&this.triggerEl&&this.listboxEl&&(this.cleanupPositionAutoUpdate=l(this.triggerEl,this.listboxEl,(()=>{this.positionDropdown()})),this.bodyPortalAutoUpdateActive=!0)}stopBodyPortalAutoUpdate(){var t;null===(t=this.cleanupPositionAutoUpdate)||void 0===t||t.call(this),this.cleanupPositionAutoUpdate=void 0,this.bodyPortalAutoUpdateActive=!1}getPortalMountRoot(){var t;return null!==(t=this.findNearestDialogForPortal(this.el))&&void 0!==t?t:document.body}findNearestDialogForPortal(t){const i=new Set;let e=t;for(;e&&!i.has(e);){if(i.add(e),e.nodeType===Node.ELEMENT_NODE&&"dialog"===e.localName)return e;if(e.nodeType===Node.ELEMENT_NODE){const t=e.assignedSlot;if(t){e=t;continue}}const t=e.parentNode;if(!t)break;e=t instanceof ShadowRoot?t.host:t}const o=t.closest("pds-modal");if(o){const t=o.querySelector("dialog");if(t)return t}return null}ensureBodyPortal(){if(null!==this.portalEl){const t=this.getPortalMountRoot();return this.portalEl.parentElement!==t&&t.appendChild(this.portalEl),this.portalEl}return this.portalEl=document.createElement("div"),this.portalEl.className="pds-combobox-dropdown-portal",this.getPortalMountRoot().appendChild(this.portalEl),this.portalEl}syncBodyPortal(){if(!this.listboxEl)return;const t=this.ensureBodyPortal();for(const i of Array.from(t.children))i!==this.listboxEl&&i.remove();this.listboxEl.parentElement!==t&&(t.appendChild(this.listboxEl),this.positionDropdown(),this.startBodyPortalAutoUpdate())}removeBodyPortal(){var t;this.stopBodyPortalAutoUpdate(),(null===(t=this.portalEl)||void 0===t?void 0:t.parentNode)&&this.portalEl.parentNode.removeChild(this.portalEl),this.portalEl=null,this.listboxEl&&!this.listboxEl.isConnected&&(this.listboxEl=void 0)}async setFocus(){var t;this.inputEl?this.inputEl.focus():null===(t=this.triggerEl)||void 0===t||t.focus()}setInitialHighlightedIndex(){const t=this.filteredItems.filter((t=>"OPTION"===t.tagName));if(0!==t.length){if(this.selectedOption){const i=t.findIndex((t=>t===this.selectedOption));if(i>=0)return void(this.highlightedIndex=i)}this.highlightedIndex=0}else this.highlightedIndex=-1}focusFirstOption(){this.isOpen&&this.filteredItems.filter((t=>"OPTION"===t.tagName)).length>0&&(this.setInitialHighlightedIndex(),this.listboxEl&&this.updateOptionFocus())}focusFirstOptionForArrowKeys(){if(this.isOpen){if(this.usesBodyPortal)return this.isArrowKeyNavigationMode=!0,void this.focusFirstOption();if(this.isArrowKeyNavigationMode=!0,this.filteredItems.filter((t=>"OPTION"===t.tagName)).length>0){if(this.setInitialHighlightedIndex(),this.listboxEl){const t=this.listboxEl.querySelectorAll('[role="option"]'),i=t[this.highlightedIndex];i&&(t.forEach((t=>{t.setAttribute("tabindex","-1")})),i.setAttribute("tabindex","0"),i.focus(),i.scrollIntoView({block:"nearest",behavior:"smooth"}))}this.updateAriaActiveDescendant()}}}updateOptionFocus(){if(!this.listboxEl||this.highlightedIndex<0)return;const t=this.listboxEl.querySelectorAll('[role="option"]'),i=t[this.highlightedIndex];if(i){const e=Array.from(t).some((t=>t===document.activeElement));!this.usesBodyPortal&&(e||this.isArrowKeyNavigationMode)&&(t.forEach((t=>{t.setAttribute("tabindex","-1")})),i.setAttribute("tabindex","0"),i.focus()),i.scrollIntoView({block:"nearest",behavior:"smooth"})}this.updateAriaActiveDescendant()}updateAriaActiveDescendant(){this.triggerEl&&this.highlightedIndex>=0?this.triggerEl.setAttribute("aria-activedescendant",this.optionDomId(this.highlightedIndex)):this.triggerEl&&this.triggerEl.removeAttribute("aria-activedescendant")}restoreFocusToTrigger(){setTimeout((()=>{this.inputEl?this.inputEl.focus():this.triggerEl&&this.triggerEl.focus()}),0)}async getSelectedValue(){return this.selectedOption?this.selectedOption.value:null}get selectedLabel(){return this.displayText||""}get selectedLayoutContent(){return this.selectedOptionLayoutContent}get selectedHasLayout(){return!!this.selectedOption&&this.isOptionLayout(this.selectedOption)}get selectedChipSentiment(){if(this.selectedOption&&this.isOptionChip(this.selectedOption)){const t=this.selectedOption.getAttribute("chip-sentiment");if(t)return t}if(this.selectedOption&&this.isOptionLayout(this.selectedOption)){const t=this.selectedOption.querySelector("pds-chip"),i=null==t?void 0:t.getAttribute("sentiment");if(i)return i}if(this.customTriggerContent){const t=this.el.querySelector('pds-chip[slot="trigger-content"]');if(t){const i=t.getAttribute("sentiment");if(i)return i}}return this.chipSentiment}get selectedChipLarge(){if(this.selectedOption&&this.isOptionChip(this.selectedOption)&&this.selectedOption.hasAttribute("chip-large"))return!0;if(this.selectedOption&&this.isOptionLayout(this.selectedOption)){const t=this.selectedOption.querySelector("pds-chip");if(null==t?void 0:t.hasAttribute("large"))return!0}if(this.customTriggerContent){const t=this.el.querySelector('pds-chip[slot="trigger-content"]');if(t&&t.hasAttribute("large"))return!0}return this.chipLarge}get selectedChipIcon(){if(this.selectedOption&&this.isOptionChip(this.selectedOption)){const t=this.selectedOption.getAttribute("chip-icon");if(t)return t}if(this.selectedOption&&this.isOptionLayout(this.selectedOption)){const t=this.selectedOption.querySelector("pds-chip"),i=null==t?void 0:t.getAttribute("icon");if(i)return i}if(this.customTriggerContent){const t=this.el.querySelector('pds-chip[slot="trigger-content"]');if(t){const i=t.getAttribute("icon");if(i)return i}}return this.chipIcon}get selectedChipDot(){if(this.selectedOption&&this.isOptionChip(this.selectedOption)&&this.selectedOption.hasAttribute("chip-dot"))return!0;if(this.selectedOption&&this.isOptionLayout(this.selectedOption)){const t=this.selectedOption.querySelector("pds-chip");if(null==t?void 0:t.hasAttribute("dot"))return!0}if(this.customTriggerContent){const t=this.el.querySelector('pds-chip[slot="trigger-content"]');if(t&&t.hasAttribute("dot"))return!0}return this.chipDot}handleOptionClick(t){this.setSelectedOption(t),this.isOpen=!1,this.clearExpandFilterList(),this.pdsComboboxChange.emit({value:t.value})}renderDropdown(){if(!this.isOpen)return null;const t=!this.usesBodyPortal&&!!this.el.querySelector('[slot="empty"]'),i=!this.usesBodyPortal&&!!this.el.querySelector('[slot="loading"]');let e=0;const r=this.filteredItems.filter((t=>"OPTION"===t.tagName));return o("ul",{class:"pds-combobox__listbox",role:"listbox",id:this.listboxId,"aria-label":this.label||"Options","aria-multiselectable":"false",ref:t=>this.listboxEl=t,onScroll:this.handleScroll},this.loading&&o("li",{class:"pds-combobox__loading",role:"presentation"},i?o("slot",{name:"loading"}):o("pds-loader",{size:"small"})),!this.loading&&0===this.filteredItems.length&&o("li",{class:"pds-combobox__empty",role:"presentation"},t?o("slot",{name:"empty"}):o("span",null,"No options found")),this.filteredItems.map(((t,i)=>{if("OPTGROUP"===t.tagName)return o("li",{key:"optgroup-"+i,class:"pds-combobox__group-label",role:"presentation","aria-label":t.label},t.label);if("PDS-TEXT"===t.tagName)return o("li",{key:"pds-text-"+i,class:"pds-combobox__group-label",role:"presentation"},t.textContent);if("OPTION"===t.tagName){const i=t,n=this.isOptionSelected(i),s=this.highlightedIndex===e,a=this.isOptionLayout(i),l=this.isOptionChip(i),c=e++;return o("li",{key:i.value,id:this.optionDomId(c),role:"option","aria-selected":n?"true":"false","aria-setsize":r.length,"aria-posinset":c+1,"aria-label":a||l?i.getAttribute("aria-label")||this.getOptionLabel(i):void 0,tabindex:this.usesBodyPortal?"-1":s?"0":"-1",class:{"pds-combobox__option":!0,"pds-combobox__option--highlighted":s,"pds-combobox__option--layout":a,"pds-combobox__option--chip":l},"data-option-index":c,onMouseDown:this.onOptionMouseDown,onClick:this.onOptionClick,onMouseEnter:this.onOptionMouseEnter,onKeyDown:this.onOptionKeyDown},a?o("pds-box",{class:"pds-combobox__option-layout-wrapper",innerHTML:this.getOptionLayoutContent(i)}):l?this.renderOptionChip(i):this.getOptionLabel(i),n&&o("pds-icon",{icon:"check",size:"regular",class:"pds-combobox__option-check"}))}return null})),this.hasMore&&!this.loading&&o("li",{class:"pds-combobox__load-more",role:"presentation"},o("pds-loader",{size:"small"})))}renderCaretIcon(){return o("pds-icon",{icon:"caret-down","aria-hidden":"true",class:"pds-combobox__button-trigger-chevron"})}renderLayoutContent(){return o("div",{class:"pds-combobox__button-trigger-layout-wrapper",innerHTML:this.selectedLayoutContent})}renderDefaultContent(){return o("span",{class:"pds-combobox__button-trigger-label"},this.selectedLabel||this.placeholder)}shouldShowLayoutContent(){return this.selectedHasLayout&&!!this.selectedLayoutContent}getChipTriggerClass(){const t=["pds-combobox__chip-trigger"];return t.push("pds-combobox__chip-trigger--"+this.selectedChipSentiment),t.push("pds-combobox__chip-trigger--dropdown"),this.selectedChipLarge&&t.push("pds-combobox__chip-trigger--large"),this.selectedChipDot&&t.push("pds-combobox__chip-trigger--dot"),t.join(" ")}renderButtonTriggerContent(){return this.customTriggerContent?this.shouldShowLayoutContent()?[this.renderLayoutContent(),this.renderCaretIcon()]:o("slot",{name:"trigger-content"}):this.shouldShowLayoutContent()?[this.renderLayoutContent(),this.renderCaretIcon()]:[this.renderDefaultContent(),this.renderCaretIcon()]}renderChipTriggerContent(){return this.customTriggerContent?this.shouldShowLayoutContent()?this.renderChipTriggerLayoutContent():o("slot",{name:"trigger-content"}):this.shouldShowLayoutContent()?this.renderChipTriggerLayoutContent():this.selectedOption&&this.selectedOptionChipProps?this.renderSelectedOptionAsChip():[this.renderChipTriggerDefaultContent(),this.renderCaretIcon()]}renderSelectedOptionAsChip(){return this.selectedOption&&this.selectedOptionChipProps?o("pds-chip",{sentiment:this.selectedOptionChipProps.sentiment,variant:"dropdown",large:this.selectedOptionChipProps.large,icon:this.selectedOptionChipProps.icon,dot:this.selectedOptionChipProps.dot,class:"pds-combobox__chip-trigger-auto"},this.getOptionLabel(this.selectedOption)):null}renderChipTriggerLayoutContent(){return o("div",{class:"pds-combobox__chip-trigger-layout-wrapper",innerHTML:this.getModifiedLayoutContentForTrigger()})}getModifiedLayoutContentForTrigger(){let t=this.selectedLayoutContent;if(t.includes("<pds-chip")){const i=document.createElement("div");i.innerHTML=t;const e=i.querySelector("pds-chip");e&&(e.setAttribute("variant","dropdown"),t=i.innerHTML)}return t}renderChipTriggerDefaultContent(){return o("span",{class:"pds-combobox__chip-trigger-label"},this.selectedChipIcon&&o("pds-icon",{icon:this.selectedChipIcon,class:"pds-combobox__chip-trigger-icon"}),this.selectedLabel||this.placeholder)}renderOptionChip(t){const i=this.getOptionChipProps(t);return o("pds-chip",{sentiment:i.sentiment,variant:"text",large:i.large,icon:i.icon,dot:i.dot,class:"pds-combobox__option-chip"},this.getOptionLabel(t))}render(){const t=["pds-combobox__button-trigger","pds-combobox__button-trigger--"+this.triggerVariant,"input"===this.triggerShape&&"pds-combobox__button-trigger--input-shape"].filter(Boolean).join(" ");return o(r,{key:"3de5711e53460545e3cb962d446880a99edcd44c","aria-disabled":this.disabled?"true":null},o("div",{key:"cce16999fc6be08b99a113ae58cb2be0fbe9c577",class:"pds-combobox",tabIndex:-1,onFocusout:this.onComboboxFocusOut,part:"combobox"},this.label&&!this.hideLabel&&o("label",{key:"355650eba712d6c91694752daed4cf18008a920d",htmlFor:this.componentId,class:"pds-combobox__label"},this.label),"input"===this.trigger?o("div",{class:"pds-combobox__input-wrapper",style:{width:this.triggerWidth}},o("input",{ref:t=>{this.inputEl=t,this.triggerEl=t},class:"pds-combobox__input",type:"text",role:"combobox","aria-autocomplete":"list","aria-controls":this.listboxId,"aria-activedescendant":this.isOpen&&this.highlightedIndex>=0?this.optionDomId(this.highlightedIndex):void 0,"aria-expanded":this.isOpen?"true":"false","aria-disabled":this.disabled?"true":"false","aria-label":this.hideLabel?this.label:void 0,id:this.componentId,value:this.displayText,placeholder:this.placeholder,disabled:this.disabled,onInput:this.handleInput,onClick:this.handleInputClick,onKeyDown:this.handleKeyDown,autocomplete:"off",part:"input"}),o("pds-icon",{icon:"enlarge","aria-hidden":"true",class:"pds-combobox__input-icon"})):"chip"===this.trigger?o("div",{class:this.getChipTriggerClass(),style:{width:this.triggerWidth},role:"combobox","aria-haspopup":"listbox","aria-controls":this.listboxId,"aria-activedescendant":this.isOpen&&this.highlightedIndex>=0?this.optionDomId(this.highlightedIndex):void 0,"aria-expanded":this.isOpen?"true":"false","aria-disabled":this.disabled?"true":"false","aria-label":this.hideLabel?this.label:void 0,id:this.componentId,tabIndex:this.disabled?-1:0,onClick:this.onButtonTriggerClick,"data-layout":this.customTriggerContent,onKeyDown:this.onButtonTriggerKeyDown,onKeyUp:this.onButtonTriggerKeyUp,ref:t=>this.triggerEl=t,part:"chip-trigger"},this.renderChipTriggerContent()):o("div",{class:t,style:{width:this.triggerWidth},role:"combobox","aria-haspopup":"listbox","aria-controls":this.listboxId,"aria-activedescendant":this.isOpen&&this.highlightedIndex>=0?this.optionDomId(this.highlightedIndex):void 0,"aria-expanded":this.isOpen?"true":"false","aria-disabled":this.disabled?"true":"false","aria-label":this.hideLabel?this.label:void 0,id:this.componentId,tabIndex:this.disabled?-1:0,onClick:this.onButtonTriggerClick,"data-layout":this.customTriggerContent,onKeyDown:this.onButtonTriggerKeyDown,onKeyUp:this.onButtonTriggerKeyUp,ref:t=>this.triggerEl=t,part:"button-trigger"},this.renderButtonTriggerContent()),o("div",{key:"87ffd9a2472b7459343daf4c0f7d46f260365180",style:{display:"none"}},o("slot",{key:"fd0e21c876fbf21761ad63c9529a304912aecd1d",onSlotchange:()=>this.updateOptions()})),this.renderDropdown()))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{isOpen:[{isOpenChanged:0}],debounce:[{setupDebounce:0}],options:[{optionsChanged:0}],value:[{handleValueChange:0}],selectedOption:[{handleSelectedOptionChange:0}]}}static get style(){return':host{display:block}:host([aria-disabled=true]) .pds-combobox__input-icon{color:var(--pine-color-text-disabled);pointer-events:none}.pds-combobox{position:relative}.pds-combobox__label{color:var(--pine-color-text-label);display:block;font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-combobox__input-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;position:relative;width:100%}.pds-combobox__input{background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-125);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text-strong);-ms-flex:1;flex:1;font:var(--pine-typography-body-medium);padding:var(--pine-dimension-xs) var(--pine-dimension-450) var(--pine-dimension-xs) var(--pine-dimension-150);-webkit-transition:border-color var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease;width:100%}.pds-combobox__input:hover:not(:disabled){border-color:var(--pine-color-border-hover)}.pds-combobox__input:disabled{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-combobox__input:disabled::-webkit-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::-moz-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled:-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:focus-visible{border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-combobox__input::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input-icon{color:var(--pine-color-text-secondary);inset-inline-end:var(--pine-dimension-150);pointer-events:none;position:absolute;z-index:var(--pine-z-index-raised)}.pds-combobox__listbox{background:var(--pine-color-background-overlay);border:0;border-radius:var(--pine-dimension-125);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);list-style:none;margin:0;min-width:220px;overflow-y:auto;padding:var(--pine-dimension-xs);position:absolute;z-index:var(--pine-z-index-raised)}.pds-combobox__option{-ms-flex-align:center;align-items:center;background:transparent;border-radius:var(--pine-dimension-125);color:var(--pine-color-text-secondary);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);-ms-flex-pack:justify;justify-content:space-between;padding:var(--pine-dimension-xs) var(--pine-dimension-sm);position:relative;-webkit-transition:background 0.15s;transition:background 0.15s}.pds-combobox__option[aria-selected=true]{background:var(--pine-color-background-muted)}.pds-combobox__option:focus-visible{outline:0}.pds-combobox__option.pds-combobox__option--layout .pds-combobox__option-layout-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__option.pds-combobox__option--chip .pds-combobox__option-chip{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__option:last-child{-webkit-margin-after:0;margin-block-end:0}.pds-combobox__option--highlighted,.pds-combobox__option[selected],.pds-combobox__option--selected{background:var(--pine-color-background-muted)}.pds-combobox__option-check{color:currentColor;font-size:var(--pine-dimension-150);-webkit-margin-start:var(--pine-dimension-150);margin-inline-start:var(--pine-dimension-150)}.pds-combobox__group-label{color:var(--pine-color-text-tertiary);cursor:default;font:var(--pine-typography-heading-caption);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-150);margin-block-start:var(--pine-dimension-150);padding:var(--pine-dimension-2xs) var(--pine-dimension-sm);text-transform:uppercase}.pds-combobox__group-label:first-child{-webkit-margin-before:0;margin-block-start:0}.pds-combobox__loading{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-150)}.pds-combobox__empty{color:var(--pine-color-text-tertiary);padding:var(--pine-dimension-150) var(--pine-dimension-sm);text-align:center}.pds-combobox__load-more{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-150)}.pds-combobox__button-trigger{-ms-flex-align:center;align-items:center;background:var(--color-background-default, var(--pine-color-secondary));border:var(--pine-border);border-radius:var(--pine-border-radius-full);color:var(--color-text-default, var(--pine-color-text-inverse-emphasis));cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);-ms-flex-pack:justify;justify-content:space-between;min-height:var(--pine-dimension-450);outline:none;padding:0 var(--pine-dimension-sm);-webkit-transition:border-color 0.15s, background 0.15s, -webkit-box-shadow 0.15s;transition:border-color 0.15s, background 0.15s, -webkit-box-shadow 0.15s;transition:border-color 0.15s, box-shadow 0.15s, background 0.15s;transition:border-color 0.15s, box-shadow 0.15s, background 0.15s, -webkit-box-shadow 0.15s;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.pds-combobox__button-trigger .pds-combobox__button-trigger-layout-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}.pds-combobox__button-trigger .trigger-content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__button-trigger:focus-visible{border-color:var(--color-border-focus, var(--pine-color-border));-webkit-box-shadow:0 0 0 2px var(--color-outline, var(--pine-color-focus-ring));box-shadow:0 0 0 2px var(--color-outline, var(--pine-color-focus-ring))}.pds-combobox__button-trigger:hover{background:var(--color-background-hover, var(--pine-color-secondary-hover));border-color:var(--color-border-hover, var(--pine-color-border-hover))}.pds-combobox__button-trigger[aria-disabled=true],.pds-combobox__button-trigger:disabled{background:var(--color-background-disabled, var(--pine-color-secondary-disabled));border-color:var(--color-border-disabled, var(--pine-color-border-disabled));color:var(--color-text-disabled, var(--pine-color-text-secondary-disabled));cursor:not-allowed;opacity:0.6}.pds-combobox__button-trigger-label{color:inherit;-ms-flex:1 1 auto;flex:1 1 auto;text-align:start}.pds-combobox__button-trigger--input-shape{border-radius:var(--pine-dimension-125);min-height:var(--pine-dimension-500)}.pds-combobox__button-trigger-chevron{color:currentColor;-webkit-margin-start:var(--pine-dimension-150);margin-inline-start:var(--pine-dimension-150)}.pds-combobox__button-trigger--primary{--color-background-default:var(--pine-color-primary);--color-background-hover:var(--pine-color-primary-hover);--color-background-disabled:var(--pine-color-primary-disabled);--color-border-default:var(--pine-color-primary);--color-border-hover:var(--pine-color-primary-hover);--color-border-disabled:var(--pine-color-primary-disabled);--color-border-focus:var(--pine-color-primary);--color-text-default:var(--pine-color-text-primary);--color-text-disabled:var(--pine-color-text-primary-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--accent{--color-background-default:var(--pine-color-accent);--color-background-hover:var(--pine-color-accent-hover);--color-background-disabled:var(--pine-color-accent-disabled);--color-border-default:var(--pine-color-accent);--color-border-hover:var(--pine-color-accent-hover);--color-border-disabled:var(--pine-color-accent-disabled);--color-border-focus:var(--pine-color-accent);--color-text-default:var(--pine-color-white);--color-text-disabled:var(--pine-color-text-accent-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--secondary{--color-background-default:var(--pine-color-secondary);--color-background-hover:var(--pine-color-secondary-hover);--color-background-disabled:var(--pine-color-secondary-disabled);--color-border-default:var(--pine-color-border);--color-border-hover:var(--pine-color-border-hover);--color-border-disabled:var(--pine-color-border-disabled);--color-border-focus:var(--pine-color-border);--color-text-default:var(--pine-color-text-secondary);--color-text-disabled:var(--pine-color-text-secondary-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--destructive{--color-background-default:var(--pine-color-danger);--color-background-hover:var(--pine-color-danger-hover);--color-background-disabled:var(--pine-color-danger-disabled);--color-border-default:var(--pine-color-danger);--color-border-hover:var(--pine-color-danger-hover);--color-border-disabled:var(--pine-color-danger-disabled);--color-border-focus:var(--pine-color-danger);--color-text-default:var(--pine-color-white);--color-text-disabled:var(--pine-color-text-danger-disabled);--color-outline:var(--pine-color-focus-ring-danger)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}[data-layout]{border-radius:var(--pine-dimension-125);padding-block:var(--pine-dimension-xs)}.pds-combobox__chip-trigger{-ms-flex-align:center;align-items:center;border-radius:var(--pine-dimension-sm);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;font:var(--pine-typography-body-medium);-ms-flex-pack:justify;justify-content:space-between;outline:none;padding-block:var(--pine-dimension-025);padding-inline:var(--pine-dimension-150);-webkit-transition:all 0.15s ease;transition:all 0.15s ease;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.pds-combobox__chip-trigger .pds-combobox__chip-trigger-layout-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}.pds-combobox__chip-trigger .trigger-content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__chip-trigger:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-combobox__chip-trigger[aria-disabled=true]{cursor:not-allowed;opacity:0.6}.pds-combobox__chip-trigger-label{color:inherit;-ms-flex:1 1 auto;flex:1 1 auto;text-align:start}.pds-combobox__chip-trigger-chevron{color:currentColor;-webkit-margin-start:var(--pine-dimension-150);margin-inline-start:var(--pine-dimension-150)}.pds-combobox__chip-trigger-icon{-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs)}.pds-combobox__chip-trigger--neutral,.pds-combobox__chip-trigger--accent,.pds-combobox__chip-trigger--success,.pds-combobox__chip-trigger--warning,.pds-combobox__chip-trigger--danger,.pds-combobox__chip-trigger--info{background:var(--chip-bg);border:var(--pine-border-width) solid var(--chip-border);color:var(--chip-text)}.pds-combobox__chip-trigger--neutral:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--accent:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--success:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--warning:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--danger:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--info:hover:not([aria-disabled=true]){background:var(--chip-bg-hover)}.pds-combobox__chip-trigger--neutral:focus-visible,.pds-combobox__chip-trigger--accent:focus-visible,.pds-combobox__chip-trigger--success:focus-visible,.pds-combobox__chip-trigger--warning:focus-visible,.pds-combobox__chip-trigger--danger:focus-visible,.pds-combobox__chip-trigger--info:focus-visible{border-color:var(--chip-border)}.pds-combobox__chip-trigger--neutral{--chip-bg:var(--pine-chip-color-neutral);--chip-bg-hover:var(--pine-chip-color-neutral-hover);--chip-border:var(--pine-chip-color-neutral-hover);--chip-text:var(--pine-color-text-neutral)}.pds-combobox__chip-trigger--accent{--chip-bg:var(--pine-chip-color-accent);--chip-bg-hover:var(--pine-chip-color-accent-hover);--chip-border:var(--pine-chip-color-accent-hover);--chip-text:var(--pine-color-text-accent)}.pds-combobox__chip-trigger--success{--chip-bg:var(--pine-chip-color-success);--chip-bg-hover:var(--pine-chip-color-success-hover);--chip-border:var(--pine-chip-color-success-hover);--chip-text:var(--pine-color-text-success)}.pds-combobox__chip-trigger--warning{--chip-bg:var(--pine-chip-color-warning);--chip-bg-hover:var(--pine-chip-color-warning-hover);--chip-border:var(--pine-chip-color-warning-hover);--chip-text:var(--pine-color-text-warning)}.pds-combobox__chip-trigger--danger{--chip-bg:var(--pine-chip-color-danger);--chip-bg-hover:var(--pine-chip-color-danger-hover);--chip-border:var(--pine-chip-color-danger-hover);--chip-text:var(--pine-color-text-danger)}.pds-combobox__chip-trigger--info{--chip-bg:var(--pine-chip-color-info);--chip-bg-hover:var(--pine-chip-color-info-hover);--chip-border:var(--pine-chip-color-info-hover);--chip-text:var(--pine-color-text-info)}.pds-combobox__chip-trigger--brand{background:-webkit-gradient(linear, left top, right top, from(#FF3E14), to(#6B62F2));background:linear-gradient(90deg, #FF3E14 0%, #6B62F2 100%);border:0;color:var(--pine-color-text-neutral);padding:1px;position:relative}.pds-combobox__chip-trigger--brand .pds-combobox__chip-trigger-label{background:rgba(255, 255, 255, 0.9);border-radius:calc(var(--pine-dimension-sm) - 1px);color:var(--pine-color-text-neutral);font-weight:var(--pine-font-weight-medium);padding:var(--pine-dimension-025) var(--pine-dimension-150);position:relative;z-index:1}.pds-combobox__chip-trigger--brand .pds-combobox__chip-trigger-chevron{position:relative;z-index:1}.pds-combobox__chip-trigger--brand:hover:not([aria-disabled=true]) .pds-combobox__chip-trigger-label{background:rgba(255, 255, 255, 0.8)}.pds-combobox__chip-trigger--dropdown:not(.pds-combobox__chip-trigger--brand){padding:var(--pine-dimension-none)}.pds-combobox__chip-trigger--dropdown:not(.pds-combobox__chip-trigger--brand) .pds-combobox__chip-trigger-label{padding:var(--pine-dimension-025) var(--pine-dimension-150)}.pds-combobox__chip-trigger--large .pds-combobox__chip-trigger-label{font-family:var(--pine-font-family-heading);font-size:var(--pine-font-size-heading-6);font-weight:var(--pine-font-weight-medium);letter-spacing:var(--pine-letter-spacing-heading-6)}.pds-combobox__chip-trigger--dot .pds-combobox__chip-trigger-label::before{border:var(--pine-border-width) solid transparent;border-radius:var(--pine-border-radius-full);content:"";display:inline-block;height:var(--pine-dimension-2xs);-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs);width:var(--pine-dimension-2xs)}'}},[321,"pds-combobox",{componentId:[1,"component-id"],name:[513],customOptionLayouts:[4,"custom-option-layouts"],customTriggerContent:[4,"custom-trigger-content"],disabled:[4],dropdownPlacement:[1,"dropdown-placement"],dropdownWidth:[1,"dropdown-width"],dropdownMount:[1,"dropdown-mount"],hideLabel:[4,"hide-label"],label:[1],maxHeight:[1,"max-height"],mode:[1],placeholder:[1],trigger:[1],triggerWidth:[1,"trigger-width"],triggerVariant:[1,"trigger-variant"],triggerShape:[1,"trigger-shape"],chipSentiment:[1,"chip-sentiment"],chipLarge:[4,"chip-large"],chipIcon:[1,"chip-icon"],chipDot:[4,"chip-dot"],value:[1025],asyncUrl:[1,"async-url"],asyncMethod:[1,"async-method"],debounce:[2],fetchTimeout:[2,"fetch-timeout"],loading:[1028],options:[16],formatResult:[16],displayText:[32],filteredItems:[32],highlightedIndex:[32],isOpen:[32],selectedOption:[32],selectedOptionLayoutContent:[32],selectedOptionChipProps:[32],internalOptions:[32],currentPage:[32],hasMore:[32],setFocus:[64],getSelectedValue:[64]},void 0,{isOpen:[{isOpenChanged:0}],debounce:[{setupDebounce:0}],options:[{optionsChanged:0}],value:[{handleValueChange:0}],selectedOption:[{handleSelectedOptionChange:0}]}]),ft=gt,vt=function(){"undefined"!=typeof customElements&&["pds-combobox","pds-box","pds-chip","pds-icon","pds-loader"].forEach((t=>{switch(t){case"pds-combobox":customElements.get(n(t))||customElements.define(n(t),gt);break;case"pds-box":customElements.get(n(t))||u();break;case"pds-chip":customElements.get(n(t))||b();break;case"pds-icon":customElements.get(n(t))||m();break;case"pds-loader":customElements.get(n(t))||g()}}))};export{ft as PdsCombobox,vt as defineCustomElement}