publishing_platform_publishing_components 0.1.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 (259) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +22 -0
  3. data/README.md +2 -0
  4. data/Rakefile +41 -0
  5. data/app/assets/builds/gemkeep +0 -0
  6. data/app/assets/config/publishing_platform_publishing_components_manifest.js +2 -0
  7. data/app/assets/images/publishing_platform_publishing_components/gemkeep +0 -0
  8. data/app/assets/stylesheets/publishing_platform_publishing_components/_all_components.scss +3 -0
  9. data/app/assets/stylesheets/publishing_platform_publishing_components/components/_attachment.scss +117 -0
  10. data/app/assets/stylesheets/publishing_platform_publishing_components/components/_summary-list.scss +169 -0
  11. data/app/controllers/publishing_platform_publishing_components/application_controller.rb +4 -0
  12. data/app/helpers/publishing_platform_publishing_components/application_helper.rb +4 -0
  13. data/app/models/publishing_platform_publishing_components/component_doc.rb +90 -0
  14. data/app/models/publishing_platform_publishing_components/component_docs.rb +57 -0
  15. data/app/models/publishing_platform_publishing_components/component_example.rb +104 -0
  16. data/app/models/publishing_platform_publishing_components/shared_accessibility_criteria.rb +37 -0
  17. data/app/views/publishing_platform_publishing_components/component_doc/_component_output.html.erb +15 -0
  18. data/app/views/publishing_platform_publishing_components/components/_attachment.html.erb +91 -0
  19. data/app/views/publishing_platform_publishing_components/components/_error_summary.html.erb +38 -0
  20. data/app/views/publishing_platform_publishing_components/components/_summary_list.html.erb +135 -0
  21. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_document.html.erb +3 -0
  22. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_external.html.erb +3 -0
  23. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_generic.html.erb +4 -0
  24. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_html.html.erb +3 -0
  25. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_pdf.html.erb +3 -0
  26. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_spreadsheet.html.erb +5 -0
  27. data/app/views/publishing_platform_publishing_components/components/docs/attachment.yml +104 -0
  28. data/app/views/publishing_platform_publishing_components/components/docs/error_summary.yml +51 -0
  29. data/app/views/publishing_platform_publishing_components/components/docs/summary_list.yml +137 -0
  30. data/config/initializers/assets.rb +24 -0
  31. data/config/routes.rb +2 -0
  32. data/lib/publishing_platform_publishing_components/config.rb +25 -0
  33. data/lib/publishing_platform_publishing_components/engine.rb +5 -0
  34. data/lib/publishing_platform_publishing_components/presenters/attachment_helper.rb +176 -0
  35. data/lib/publishing_platform_publishing_components/presenters/component_wrapper_helper.rb +290 -0
  36. data/lib/publishing_platform_publishing_components/presenters/shared_helper.rb +24 -0
  37. data/lib/publishing_platform_publishing_components/version.rb +3 -0
  38. data/lib/publishing_platform_publishing_components.rb +10 -0
  39. data/lib/tasks/publishing_platform_publishing_components_tasks.rake +4 -0
  40. data/node_modules/bootstrap/LICENSE +21 -0
  41. data/node_modules/bootstrap/README.md +246 -0
  42. data/node_modules/bootstrap/dist/css/bootstrap-grid.css +4085 -0
  43. data/node_modules/bootstrap/dist/css/bootstrap-grid.css.map +1 -0
  44. data/node_modules/bootstrap/dist/css/bootstrap-grid.min.css +6 -0
  45. data/node_modules/bootstrap/dist/css/bootstrap-grid.min.css.map +1 -0
  46. data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.css +4084 -0
  47. data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.css.map +1 -0
  48. data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.min.css +6 -0
  49. data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map +1 -0
  50. data/node_modules/bootstrap/dist/css/bootstrap-reboot.css +601 -0
  51. data/node_modules/bootstrap/dist/css/bootstrap-reboot.css.map +1 -0
  52. data/node_modules/bootstrap/dist/css/bootstrap-reboot.min.css +6 -0
  53. data/node_modules/bootstrap/dist/css/bootstrap-reboot.min.css.map +1 -0
  54. data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.css +598 -0
  55. data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.css.map +1 -0
  56. data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.min.css +6 -0
  57. data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map +1 -0
  58. data/node_modules/bootstrap/dist/css/bootstrap-utilities.css +5406 -0
  59. data/node_modules/bootstrap/dist/css/bootstrap-utilities.css.map +1 -0
  60. data/node_modules/bootstrap/dist/css/bootstrap-utilities.min.css +6 -0
  61. data/node_modules/bootstrap/dist/css/bootstrap-utilities.min.css.map +1 -0
  62. data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.css +5397 -0
  63. data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.css.map +1 -0
  64. data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.min.css +6 -0
  65. data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map +1 -0
  66. data/node_modules/bootstrap/dist/css/bootstrap.css +12048 -0
  67. data/node_modules/bootstrap/dist/css/bootstrap.css.map +1 -0
  68. data/node_modules/bootstrap/dist/css/bootstrap.min.css +6 -0
  69. data/node_modules/bootstrap/dist/css/bootstrap.min.css.map +1 -0
  70. data/node_modules/bootstrap/dist/css/bootstrap.rtl.css +12021 -0
  71. data/node_modules/bootstrap/dist/css/bootstrap.rtl.css.map +1 -0
  72. data/node_modules/bootstrap/dist/css/bootstrap.rtl.min.css +6 -0
  73. data/node_modules/bootstrap/dist/css/bootstrap.rtl.min.css.map +1 -0
  74. data/node_modules/bootstrap/dist/js/bootstrap.bundle.js +6312 -0
  75. data/node_modules/bootstrap/dist/js/bootstrap.bundle.js.map +1 -0
  76. data/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js +7 -0
  77. data/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js.map +1 -0
  78. data/node_modules/bootstrap/dist/js/bootstrap.esm.js +4447 -0
  79. data/node_modules/bootstrap/dist/js/bootstrap.esm.js.map +1 -0
  80. data/node_modules/bootstrap/dist/js/bootstrap.esm.min.js +7 -0
  81. data/node_modules/bootstrap/dist/js/bootstrap.esm.min.js.map +1 -0
  82. data/node_modules/bootstrap/dist/js/bootstrap.js +4494 -0
  83. data/node_modules/bootstrap/dist/js/bootstrap.js.map +1 -0
  84. data/node_modules/bootstrap/dist/js/bootstrap.min.js +7 -0
  85. data/node_modules/bootstrap/dist/js/bootstrap.min.js.map +1 -0
  86. data/node_modules/bootstrap/js/dist/alert.js +90 -0
  87. data/node_modules/bootstrap/js/dist/alert.js.map +1 -0
  88. data/node_modules/bootstrap/js/dist/base-component.js +86 -0
  89. data/node_modules/bootstrap/js/dist/base-component.js.map +1 -0
  90. data/node_modules/bootstrap/js/dist/button.js +79 -0
  91. data/node_modules/bootstrap/js/dist/button.js.map +1 -0
  92. data/node_modules/bootstrap/js/dist/carousel.js +388 -0
  93. data/node_modules/bootstrap/js/dist/carousel.js.map +1 -0
  94. data/node_modules/bootstrap/js/dist/collapse.js +249 -0
  95. data/node_modules/bootstrap/js/dist/collapse.js.map +1 -0
  96. data/node_modules/bootstrap/js/dist/dom/data.js +63 -0
  97. data/node_modules/bootstrap/js/dist/dom/data.js.map +1 -0
  98. data/node_modules/bootstrap/js/dist/dom/event-handler.js +237 -0
  99. data/node_modules/bootstrap/js/dist/dom/event-handler.js.map +1 -0
  100. data/node_modules/bootstrap/js/dist/dom/manipulator.js +72 -0
  101. data/node_modules/bootstrap/js/dist/dom/manipulator.js.map +1 -0
  102. data/node_modules/bootstrap/js/dist/dom/selector-engine.js +104 -0
  103. data/node_modules/bootstrap/js/dist/dom/selector-engine.js.map +1 -0
  104. data/node_modules/bootstrap/js/dist/dropdown.js +402 -0
  105. data/node_modules/bootstrap/js/dist/dropdown.js.map +1 -0
  106. data/node_modules/bootstrap/js/dist/modal.js +320 -0
  107. data/node_modules/bootstrap/js/dist/modal.js.map +1 -0
  108. data/node_modules/bootstrap/js/dist/offcanvas.js +246 -0
  109. data/node_modules/bootstrap/js/dist/offcanvas.js.map +1 -0
  110. data/node_modules/bootstrap/js/dist/popover.js +96 -0
  111. data/node_modules/bootstrap/js/dist/popover.js.map +1 -0
  112. data/node_modules/bootstrap/js/dist/scrollspy.js +275 -0
  113. data/node_modules/bootstrap/js/dist/scrollspy.js.map +1 -0
  114. data/node_modules/bootstrap/js/dist/tab.js +285 -0
  115. data/node_modules/bootstrap/js/dist/tab.js.map +1 -0
  116. data/node_modules/bootstrap/js/dist/toast.js +198 -0
  117. data/node_modules/bootstrap/js/dist/toast.js.map +1 -0
  118. data/node_modules/bootstrap/js/dist/tooltip.js +546 -0
  119. data/node_modules/bootstrap/js/dist/tooltip.js.map +1 -0
  120. data/node_modules/bootstrap/js/dist/util/backdrop.js +139 -0
  121. data/node_modules/bootstrap/js/dist/util/backdrop.js.map +1 -0
  122. data/node_modules/bootstrap/js/dist/util/component-functions.js +42 -0
  123. data/node_modules/bootstrap/js/dist/util/component-functions.js.map +1 -0
  124. data/node_modules/bootstrap/js/dist/util/config.js +68 -0
  125. data/node_modules/bootstrap/js/dist/util/config.js.map +1 -0
  126. data/node_modules/bootstrap/js/dist/util/focustrap.js +113 -0
  127. data/node_modules/bootstrap/js/dist/util/focustrap.js.map +1 -0
  128. data/node_modules/bootstrap/js/dist/util/index.js +281 -0
  129. data/node_modules/bootstrap/js/dist/util/index.js.map +1 -0
  130. data/node_modules/bootstrap/js/dist/util/sanitizer.js +113 -0
  131. data/node_modules/bootstrap/js/dist/util/sanitizer.js.map +1 -0
  132. data/node_modules/bootstrap/js/dist/util/scrollbar.js +113 -0
  133. data/node_modules/bootstrap/js/dist/util/scrollbar.js.map +1 -0
  134. data/node_modules/bootstrap/js/dist/util/swipe.js +135 -0
  135. data/node_modules/bootstrap/js/dist/util/swipe.js.map +1 -0
  136. data/node_modules/bootstrap/js/dist/util/template-factory.js +151 -0
  137. data/node_modules/bootstrap/js/dist/util/template-factory.js.map +1 -0
  138. data/node_modules/bootstrap/js/index.esm.js +19 -0
  139. data/node_modules/bootstrap/js/index.umd.js +34 -0
  140. data/node_modules/bootstrap/js/src/alert.js +87 -0
  141. data/node_modules/bootstrap/js/src/base-component.js +86 -0
  142. data/node_modules/bootstrap/js/src/button.js +72 -0
  143. data/node_modules/bootstrap/js/src/carousel.js +474 -0
  144. data/node_modules/bootstrap/js/src/collapse.js +297 -0
  145. data/node_modules/bootstrap/js/src/dom/data.js +55 -0
  146. data/node_modules/bootstrap/js/src/dom/event-handler.js +317 -0
  147. data/node_modules/bootstrap/js/src/dom/manipulator.js +71 -0
  148. data/node_modules/bootstrap/js/src/dom/selector-engine.js +126 -0
  149. data/node_modules/bootstrap/js/src/dropdown.js +455 -0
  150. data/node_modules/bootstrap/js/src/modal.js +378 -0
  151. data/node_modules/bootstrap/js/src/offcanvas.js +282 -0
  152. data/node_modules/bootstrap/js/src/popover.js +97 -0
  153. data/node_modules/bootstrap/js/src/scrollspy.js +296 -0
  154. data/node_modules/bootstrap/js/src/tab.js +315 -0
  155. data/node_modules/bootstrap/js/src/toast.js +224 -0
  156. data/node_modules/bootstrap/js/src/tooltip.js +633 -0
  157. data/node_modules/bootstrap/js/src/util/backdrop.js +151 -0
  158. data/node_modules/bootstrap/js/src/util/component-functions.js +35 -0
  159. data/node_modules/bootstrap/js/src/util/config.js +65 -0
  160. data/node_modules/bootstrap/js/src/util/focustrap.js +115 -0
  161. data/node_modules/bootstrap/js/src/util/index.js +306 -0
  162. data/node_modules/bootstrap/js/src/util/sanitizer.js +116 -0
  163. data/node_modules/bootstrap/js/src/util/scrollbar.js +114 -0
  164. data/node_modules/bootstrap/js/src/util/swipe.js +146 -0
  165. data/node_modules/bootstrap/js/src/util/template-factory.js +160 -0
  166. data/node_modules/bootstrap/package.json +210 -0
  167. data/node_modules/bootstrap/scss/_accordion.scss +153 -0
  168. data/node_modules/bootstrap/scss/_alert.scss +68 -0
  169. data/node_modules/bootstrap/scss/_badge.scss +38 -0
  170. data/node_modules/bootstrap/scss/_breadcrumb.scss +40 -0
  171. data/node_modules/bootstrap/scss/_button-group.scss +147 -0
  172. data/node_modules/bootstrap/scss/_buttons.scss +216 -0
  173. data/node_modules/bootstrap/scss/_card.scss +238 -0
  174. data/node_modules/bootstrap/scss/_carousel.scss +226 -0
  175. data/node_modules/bootstrap/scss/_close.scss +66 -0
  176. data/node_modules/bootstrap/scss/_containers.scss +41 -0
  177. data/node_modules/bootstrap/scss/_dropdown.scss +250 -0
  178. data/node_modules/bootstrap/scss/_forms.scss +9 -0
  179. data/node_modules/bootstrap/scss/_functions.scss +302 -0
  180. data/node_modules/bootstrap/scss/_grid.scss +39 -0
  181. data/node_modules/bootstrap/scss/_helpers.scss +12 -0
  182. data/node_modules/bootstrap/scss/_images.scss +42 -0
  183. data/node_modules/bootstrap/scss/_list-group.scss +199 -0
  184. data/node_modules/bootstrap/scss/_maps.scss +174 -0
  185. data/node_modules/bootstrap/scss/_mixins.scss +42 -0
  186. data/node_modules/bootstrap/scss/_modal.scss +240 -0
  187. data/node_modules/bootstrap/scss/_nav.scss +197 -0
  188. data/node_modules/bootstrap/scss/_navbar.scss +289 -0
  189. data/node_modules/bootstrap/scss/_offcanvas.scss +147 -0
  190. data/node_modules/bootstrap/scss/_pagination.scss +109 -0
  191. data/node_modules/bootstrap/scss/_placeholders.scss +51 -0
  192. data/node_modules/bootstrap/scss/_popover.scss +196 -0
  193. data/node_modules/bootstrap/scss/_progress.scss +68 -0
  194. data/node_modules/bootstrap/scss/_reboot.scss +617 -0
  195. data/node_modules/bootstrap/scss/_root.scss +187 -0
  196. data/node_modules/bootstrap/scss/_spinners.scss +86 -0
  197. data/node_modules/bootstrap/scss/_tables.scss +171 -0
  198. data/node_modules/bootstrap/scss/_toasts.scss +73 -0
  199. data/node_modules/bootstrap/scss/_tooltip.scss +119 -0
  200. data/node_modules/bootstrap/scss/_transitions.scss +27 -0
  201. data/node_modules/bootstrap/scss/_type.scss +106 -0
  202. data/node_modules/bootstrap/scss/_utilities.scss +806 -0
  203. data/node_modules/bootstrap/scss/_variables-dark.scss +102 -0
  204. data/node_modules/bootstrap/scss/_variables.scss +1753 -0
  205. data/node_modules/bootstrap/scss/bootstrap-grid.scss +62 -0
  206. data/node_modules/bootstrap/scss/bootstrap-reboot.scss +10 -0
  207. data/node_modules/bootstrap/scss/bootstrap-utilities.scss +19 -0
  208. data/node_modules/bootstrap/scss/bootstrap.scss +52 -0
  209. data/node_modules/bootstrap/scss/forms/_floating-labels.scss +97 -0
  210. data/node_modules/bootstrap/scss/forms/_form-check.scss +189 -0
  211. data/node_modules/bootstrap/scss/forms/_form-control.scss +214 -0
  212. data/node_modules/bootstrap/scss/forms/_form-range.scss +91 -0
  213. data/node_modules/bootstrap/scss/forms/_form-select.scss +80 -0
  214. data/node_modules/bootstrap/scss/forms/_form-text.scss +11 -0
  215. data/node_modules/bootstrap/scss/forms/_input-group.scss +132 -0
  216. data/node_modules/bootstrap/scss/forms/_labels.scss +36 -0
  217. data/node_modules/bootstrap/scss/forms/_validation.scss +12 -0
  218. data/node_modules/bootstrap/scss/helpers/_clearfix.scss +3 -0
  219. data/node_modules/bootstrap/scss/helpers/_color-bg.scss +7 -0
  220. data/node_modules/bootstrap/scss/helpers/_colored-links.scss +30 -0
  221. data/node_modules/bootstrap/scss/helpers/_focus-ring.scss +5 -0
  222. data/node_modules/bootstrap/scss/helpers/_icon-link.scss +25 -0
  223. data/node_modules/bootstrap/scss/helpers/_position.scss +36 -0
  224. data/node_modules/bootstrap/scss/helpers/_ratio.scss +26 -0
  225. data/node_modules/bootstrap/scss/helpers/_stacks.scss +15 -0
  226. data/node_modules/bootstrap/scss/helpers/_stretched-link.scss +15 -0
  227. data/node_modules/bootstrap/scss/helpers/_text-truncation.scss +7 -0
  228. data/node_modules/bootstrap/scss/helpers/_visually-hidden.scss +8 -0
  229. data/node_modules/bootstrap/scss/helpers/_vr.scss +8 -0
  230. data/node_modules/bootstrap/scss/mixins/_alert.scss +18 -0
  231. data/node_modules/bootstrap/scss/mixins/_backdrop.scss +14 -0
  232. data/node_modules/bootstrap/scss/mixins/_banner.scss +7 -0
  233. data/node_modules/bootstrap/scss/mixins/_border-radius.scss +78 -0
  234. data/node_modules/bootstrap/scss/mixins/_box-shadow.scss +24 -0
  235. data/node_modules/bootstrap/scss/mixins/_breakpoints.scss +127 -0
  236. data/node_modules/bootstrap/scss/mixins/_buttons.scss +70 -0
  237. data/node_modules/bootstrap/scss/mixins/_caret.scss +69 -0
  238. data/node_modules/bootstrap/scss/mixins/_clearfix.scss +9 -0
  239. data/node_modules/bootstrap/scss/mixins/_color-mode.scss +21 -0
  240. data/node_modules/bootstrap/scss/mixins/_color-scheme.scss +7 -0
  241. data/node_modules/bootstrap/scss/mixins/_container.scss +11 -0
  242. data/node_modules/bootstrap/scss/mixins/_deprecate.scss +10 -0
  243. data/node_modules/bootstrap/scss/mixins/_forms.scss +163 -0
  244. data/node_modules/bootstrap/scss/mixins/_gradients.scss +47 -0
  245. data/node_modules/bootstrap/scss/mixins/_grid.scss +151 -0
  246. data/node_modules/bootstrap/scss/mixins/_image.scss +16 -0
  247. data/node_modules/bootstrap/scss/mixins/_list-group.scss +26 -0
  248. data/node_modules/bootstrap/scss/mixins/_lists.scss +7 -0
  249. data/node_modules/bootstrap/scss/mixins/_pagination.scss +10 -0
  250. data/node_modules/bootstrap/scss/mixins/_reset-text.scss +17 -0
  251. data/node_modules/bootstrap/scss/mixins/_resize.scss +6 -0
  252. data/node_modules/bootstrap/scss/mixins/_table-variants.scss +24 -0
  253. data/node_modules/bootstrap/scss/mixins/_text-truncate.scss +8 -0
  254. data/node_modules/bootstrap/scss/mixins/_transition.scss +26 -0
  255. data/node_modules/bootstrap/scss/mixins/_utilities.scss +97 -0
  256. data/node_modules/bootstrap/scss/mixins/_visually-hidden.scss +38 -0
  257. data/node_modules/bootstrap/scss/utilities/_api.scss +47 -0
  258. data/node_modules/bootstrap/scss/vendor/_rfs.scss +348 -0
  259. metadata +448 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-handler.js","sources":["../../src/dom/event-handler.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { getjQuery } from '../util/index.js'\n\n/**\n * Constants\n */\n\nconst namespaceRegex = /[^.]*(?=\\..*)\\.|.*/\nconst stripNameRegex = /\\..*/\nconst stripUidRegex = /::\\d+$/\nconst eventRegistry = {} // Events storage\nlet uidEvent = 1\nconst customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n}\n\nconst nativeEvents = new Set([\n 'click',\n 'dblclick',\n 'mouseup',\n 'mousedown',\n 'contextmenu',\n 'mousewheel',\n 'DOMMouseScroll',\n 'mouseover',\n 'mouseout',\n 'mousemove',\n 'selectstart',\n 'selectend',\n 'keydown',\n 'keypress',\n 'keyup',\n 'orientationchange',\n 'touchstart',\n 'touchmove',\n 'touchend',\n 'touchcancel',\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointerleave',\n 'pointercancel',\n 'gesturestart',\n 'gesturechange',\n 'gestureend',\n 'focus',\n 'blur',\n 'change',\n 'reset',\n 'select',\n 'submit',\n 'focusin',\n 'focusout',\n 'load',\n 'unload',\n 'beforeunload',\n 'resize',\n 'move',\n 'DOMContentLoaded',\n 'readystatechange',\n 'error',\n 'abort',\n 'scroll'\n])\n\n/**\n * Private methods\n */\n\nfunction makeEventUid(element, uid) {\n return (uid && `${uid}::${uidEvent++}`) || element.uidEvent || uidEvent++\n}\n\nfunction getElementEvents(element) {\n const uid = makeEventUid(element)\n\n element.uidEvent = uid\n eventRegistry[uid] = eventRegistry[uid] || {}\n\n return eventRegistry[uid]\n}\n\nfunction bootstrapHandler(element, fn) {\n return function handler(event) {\n hydrateObj(event, { delegateTarget: element })\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn)\n }\n\n return fn.apply(element, [event])\n }\n}\n\nfunction bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector)\n\n for (let { target } = event; target && target !== this; target = target.parentNode) {\n for (const domElement of domElements) {\n if (domElement !== target) {\n continue\n }\n\n hydrateObj(event, { delegateTarget: target })\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, selector, fn)\n }\n\n return fn.apply(target, [event])\n }\n }\n }\n}\n\nfunction findHandler(events, callable, delegationSelector = null) {\n return Object.values(events)\n .find(event => event.callable === callable && event.delegationSelector === delegationSelector)\n}\n\nfunction normalizeParameters(originalTypeEvent, handler, delegationFunction) {\n const isDelegated = typeof handler === 'string'\n // TODO: tooltip passes `false` instead of selector, so we need to check\n const callable = isDelegated ? delegationFunction : (handler || delegationFunction)\n let typeEvent = getTypeEvent(originalTypeEvent)\n\n if (!nativeEvents.has(typeEvent)) {\n typeEvent = originalTypeEvent\n }\n\n return [isDelegated, callable, typeEvent]\n}\n\nfunction addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return\n }\n\n let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction)\n\n // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position\n // this prevents the handler from being dispatched the same way as mouseover or mouseout does\n if (originalTypeEvent in customEvents) {\n const wrapFunction = fn => {\n return function (event) {\n if (!event.relatedTarget || (event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget))) {\n return fn.call(this, event)\n }\n }\n }\n\n callable = wrapFunction(callable)\n }\n\n const events = getElementEvents(element)\n const handlers = events[typeEvent] || (events[typeEvent] = {})\n const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null)\n\n if (previousFunction) {\n previousFunction.oneOff = previousFunction.oneOff && oneOff\n\n return\n }\n\n const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''))\n const fn = isDelegated ?\n bootstrapDelegationHandler(element, handler, callable) :\n bootstrapHandler(element, callable)\n\n fn.delegationSelector = isDelegated ? handler : null\n fn.callable = callable\n fn.oneOff = oneOff\n fn.uidEvent = uid\n handlers[uid] = fn\n\n element.addEventListener(typeEvent, fn, isDelegated)\n}\n\nfunction removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector)\n\n if (!fn) {\n return\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector))\n delete events[typeEvent][fn.uidEvent]\n}\n\nfunction removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {}\n\n for (const [handlerKey, event] of Object.entries(storeElementEvent)) {\n if (handlerKey.includes(namespace)) {\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector)\n }\n }\n}\n\nfunction getTypeEvent(event) {\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n event = event.replace(stripNameRegex, '')\n return customEvents[event] || event\n}\n\nconst EventHandler = {\n on(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, false)\n },\n\n one(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, true)\n },\n\n off(element, originalTypeEvent, handler, delegationFunction) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return\n }\n\n const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction)\n const inNamespace = typeEvent !== originalTypeEvent\n const events = getElementEvents(element)\n const storeElementEvent = events[typeEvent] || {}\n const isNamespace = originalTypeEvent.startsWith('.')\n\n if (typeof callable !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!Object.keys(storeElementEvent).length) {\n return\n }\n\n removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null)\n return\n }\n\n if (isNamespace) {\n for (const elementEvent of Object.keys(events)) {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1))\n }\n }\n\n for (const [keyHandlers, event] of Object.entries(storeElementEvent)) {\n const handlerKey = keyHandlers.replace(stripUidRegex, '')\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector)\n }\n }\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null\n }\n\n const $ = getjQuery()\n const typeEvent = getTypeEvent(event)\n const inNamespace = event !== typeEvent\n\n let jQueryEvent = null\n let bubbles = true\n let nativeDispatch = true\n let defaultPrevented = false\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args)\n\n $(element).trigger(jQueryEvent)\n bubbles = !jQueryEvent.isPropagationStopped()\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped()\n defaultPrevented = jQueryEvent.isDefaultPrevented()\n }\n\n const evt = hydrateObj(new Event(event, { bubbles, cancelable: true }), args)\n\n if (defaultPrevented) {\n evt.preventDefault()\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt)\n }\n\n if (evt.defaultPrevented && jQueryEvent) {\n jQueryEvent.preventDefault()\n }\n\n return evt\n }\n}\n\nfunction hydrateObj(obj, meta = {}) {\n for (const [key, value] of Object.entries(meta)) {\n try {\n obj[key] = value\n } catch {\n Object.defineProperty(obj, key, {\n configurable: true,\n get() {\n return value\n }\n })\n }\n }\n\n return obj\n}\n\nexport default EventHandler\n"],"names":["namespaceRegex","stripNameRegex","stripUidRegex","eventRegistry","uidEvent","customEvents","mouseenter","mouseleave","nativeEvents","Set","makeEventUid","element","uid","getElementEvents","bootstrapHandler","fn","handler","event","hydrateObj","delegateTarget","oneOff","EventHandler","off","type","apply","bootstrapDelegationHandler","selector","domElements","querySelectorAll","target","parentNode","domElement","findHandler","events","callable","delegationSelector","Object","values","find","normalizeParameters","originalTypeEvent","delegationFunction","isDelegated","typeEvent","getTypeEvent","has","addHandler","wrapFunction","relatedTarget","contains","call","handlers","previousFunction","replace","addEventListener","removeHandler","removeEventListener","Boolean","removeNamespacedHandlers","namespace","storeElementEvent","handlerKey","entries","includes","on","one","inNamespace","isNamespace","startsWith","keys","length","elementEvent","slice","keyHandlers","trigger","args","$","getjQuery","jQueryEvent","bubbles","nativeDispatch","defaultPrevented","Event","isPropagationStopped","isImmediatePropagationStopped","isDefaultPrevented","evt","cancelable","preventDefault","dispatchEvent","obj","meta","key","value","_unused","defineProperty","configurable","get"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAIA;EACA;EACA;;EAEA,MAAMA,cAAc,GAAG,oBAAoB;EAC3C,MAAMC,cAAc,GAAG,MAAM;EAC7B,MAAMC,aAAa,GAAG,QAAQ;EAC9B,MAAMC,aAAa,GAAG,EAAE,CAAA;EACxB,IAAIC,QAAQ,GAAG,CAAC;EAChB,MAAMC,YAAY,GAAG;EACnBC,EAAAA,UAAU,EAAE,WAAW;EACvBC,EAAAA,UAAU,EAAE;EACd,CAAC;EAED,MAAMC,YAAY,GAAG,IAAIC,GAAG,CAAC,CAC3B,OAAO,EACP,UAAU,EACV,SAAS,EACT,WAAW,EACX,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,WAAW,EACX,aAAa,EACb,WAAW,EACX,SAAS,EACT,UAAU,EACV,OAAO,EACP,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,UAAU,EACV,aAAa,EACb,aAAa,EACb,aAAa,EACb,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,eAAe,EACf,YAAY,EACZ,OAAO,EACP,MAAM,EACN,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,UAAU,EACV,MAAM,EACN,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,MAAM,EACN,kBAAkB,EAClB,kBAAkB,EAClB,OAAO,EACP,OAAO,EACP,QAAQ,CACT,CAAC;;EAEF;EACA;EACA;;EAEA,SAASC,YAAYA,CAACC,OAAO,EAAEC,GAAG,EAAE;EAClC,EAAA,OAAQA,GAAG,IAAI,CAAA,EAAGA,GAAG,KAAKR,QAAQ,EAAE,CA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AC/C,IAAI;EACFD,MAAAA,GAAG,CAACE,GAAG,CAAC,GAAGC,KAAK;MAClB,CAAC,CAAC,OAAAC,OAAA,EAAM;EACN1D,MAAAA,MAAM,CAAC2D,cAAc,CAACL,GAAG,EAAEE,GAAG,EAAE;EAC9BI,QAAAA,YAAY,EAAE,IAAI;EAClBC,QAAAA,GAAGA,GAAG;EACJ,UAAA,OAAOJ,KAAK;EACd,QAAA;EACF,OAAC,CAAC;EACJ,IAAA;EACF,EAAA;EAEA,EAAA,OAAOH,GAAG;EACZ;;;;;;;;"}
@@ -0,0 +1,72 @@
1
+ /*!
2
+ * Bootstrap manipulator.js v5.3.8 (https://getbootstrap.com/)
3
+ * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
+ */
6
+ (function (global, factory) {
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
8
+ typeof define === 'function' && define.amd ? define(factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Manipulator = factory());
10
+ })(this, (function () { 'use strict';
11
+
12
+ /**
13
+ * --------------------------------------------------------------------------
14
+ * Bootstrap dom/manipulator.js
15
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
+ * --------------------------------------------------------------------------
17
+ */
18
+
19
+ function normalizeData(value) {
20
+ if (value === 'true') {
21
+ return true;
22
+ }
23
+ if (value === 'false') {
24
+ return false;
25
+ }
26
+ if (value === Number(value).toString()) {
27
+ return Number(value);
28
+ }
29
+ if (value === '' || value === 'null') {
30
+ return null;
31
+ }
32
+ if (typeof value !== 'string') {
33
+ return value;
34
+ }
35
+ try {
36
+ return JSON.parse(decodeURIComponent(value));
37
+ } catch (_unused) {
38
+ return value;
39
+ }
40
+ }
41
+ function normalizeDataKey(key) {
42
+ return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);
43
+ }
44
+ const Manipulator = {
45
+ setDataAttribute(element, key, value) {
46
+ element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);
47
+ },
48
+ removeDataAttribute(element, key) {
49
+ element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);
50
+ },
51
+ getDataAttributes(element) {
52
+ if (!element) {
53
+ return {};
54
+ }
55
+ const attributes = {};
56
+ const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'));
57
+ for (const key of bsKeys) {
58
+ let pureKey = key.replace(/^bs/, '');
59
+ pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1);
60
+ attributes[pureKey] = normalizeData(element.dataset[key]);
61
+ }
62
+ return attributes;
63
+ },
64
+ getDataAttribute(element, key) {
65
+ return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));
66
+ }
67
+ };
68
+
69
+ return Manipulator;
70
+
71
+ }));
72
+ //# sourceMappingURL=manipulator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(value) {\n if (value === 'true') {\n return true\n }\n\n if (value === 'false') {\n return false\n }\n\n if (value === Number(value).toString()) {\n return Number(value)\n }\n\n if (value === '' || value === 'null') {\n return null\n }\n\n if (typeof value !== 'string') {\n return value\n }\n\n try {\n return JSON.parse(decodeURIComponent(value))\n } catch {\n return value\n }\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'))\n\n for (const key of bsKeys) {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1)\n attributes[pureKey] = normalizeData(element.dataset[key])\n }\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","value","Number","toString","JSON","parse","decodeURIComponent","_unused","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","bsKeys","Object","keys","dataset","filter","startsWith","pureKey","charAt","slice","getDataAttribute","getAttribute"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA,SAASA,aAAaA,CAACC,KAAK,EAAE;IAC5B,IAAIA,KAAK,KAAK,MAAM,EAAE;EACpB,IAAA,OAAO,IAAI;EACb,EAAA;IAEA,IAAIA,KAAK,KAAK,OAAO,EAAE;EACrB,IAAA,OAAO,KAAK;EACd,EAAA;IAEA,IAAIA,KAAK,KAAKC,MAAM,CAACD,KAAK,CAAC,CAACE,QAAQ,EAAE,EAAE;MACtC,OAAOD,MAAM,CAACD,KAAK,CAAC;EACtB,EAAA;EAEA,EAAA,IAAIA,KAAK,KAAK,EAAE,IAAIA,KAAK,KAAK,MAAM,EAAE;EACpC,IAAA,OAAO,IAAI;EACb,EAAA;EAEA,EAAA,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;EAC7B,IAAA,OAAOA,KAAK;EACd,EAAA;IAEA,IAAI;MACF,OAAOG,IAAI,CAACC,KAAK,CAACC,kBAAkB,CAACL,KAAK,CAAC,CAAC;IAC9C,CAAC,CAAC,OAAAM,OAAA,EAAM;EACN,IAAA,OAAON,KAAK;EACd,EAAA;EACF;EAEA,SAASO,gB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;EAC3D,IAAA;EAEA,IAAA,OAAOW,UAAU;IACnB,CAAC;EAEDU,EAAAA,gBAAgBA,CAACf,OAAO,EAAEN,GAAG,EAAE;EAC7B,IAAA,OAAOT,aAAa,CAACe,OAAO,CAACgB,YAAY,CAAC,CAAA,QAAA,EAAWvB,gBAAgB,CAACC,GAAG,CAAC,CAAA,CAAE,CAAC,CAAC;EAChF,EAAA;EACF;;;;;;;;"}
@@ -0,0 +1,104 @@
1
+ /*!
2
+ * Bootstrap selector-engine.js v5.3.8 (https://getbootstrap.com/)
3
+ * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
+ */
6
+ (function (global, factory) {
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../util/index.js')) :
8
+ typeof define === 'function' && define.amd ? define(['../util/index'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.SelectorEngine = factory(global.Index));
10
+ })(this, (function (index_js) { 'use strict';
11
+
12
+ /**
13
+ * --------------------------------------------------------------------------
14
+ * Bootstrap dom/selector-engine.js
15
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
+ * --------------------------------------------------------------------------
17
+ */
18
+
19
+ const getSelector = element => {
20
+ let selector = element.getAttribute('data-bs-target');
21
+ if (!selector || selector === '#') {
22
+ let hrefAttribute = element.getAttribute('href');
23
+
24
+ // The only valid content that could double as a selector are IDs or classes,
25
+ // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
26
+ // `document.querySelector` will rightfully complain it is invalid.
27
+ // See https://github.com/twbs/bootstrap/issues/32273
28
+ if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {
29
+ return null;
30
+ }
31
+
32
+ // Just in case some CMS puts out a full URL with the anchor appended
33
+ if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {
34
+ hrefAttribute = `#${hrefAttribute.split('#')[1]}`;
35
+ }
36
+ selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;
37
+ }
38
+ return selector ? selector.split(',').map(sel => index_js.parseSelector(sel)).join(',') : null;
39
+ };
40
+ const SelectorEngine = {
41
+ find(selector, element = document.documentElement) {
42
+ return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
43
+ },
44
+ findOne(selector, element = document.documentElement) {
45
+ return Element.prototype.querySelector.call(element, selector);
46
+ },
47
+ children(element, selector) {
48
+ return [].concat(...element.children).filter(child => child.matches(selector));
49
+ },
50
+ parents(element, selector) {
51
+ const parents = [];
52
+ let ancestor = element.parentNode.closest(selector);
53
+ while (ancestor) {
54
+ parents.push(ancestor);
55
+ ancestor = ancestor.parentNode.closest(selector);
56
+ }
57
+ return parents;
58
+ },
59
+ prev(element, selector) {
60
+ let previous = element.previousElementSibling;
61
+ while (previous) {
62
+ if (previous.matches(selector)) {
63
+ return [previous];
64
+ }
65
+ previous = previous.previousElementSibling;
66
+ }
67
+ return [];
68
+ },
69
+ // TODO: this is now unused; remove later along with prev()
70
+ next(element, selector) {
71
+ let next = element.nextElementSibling;
72
+ while (next) {
73
+ if (next.matches(selector)) {
74
+ return [next];
75
+ }
76
+ next = next.nextElementSibling;
77
+ }
78
+ return [];
79
+ },
80
+ focusableChildren(element) {
81
+ const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(',');
82
+ return this.find(focusables, element).filter(el => !index_js.isDisabled(el) && index_js.isVisible(el));
83
+ },
84
+ getSelectorFromElement(element) {
85
+ const selector = getSelector(element);
86
+ if (selector) {
87
+ return SelectorEngine.findOne(selector) ? selector : null;
88
+ }
89
+ return null;
90
+ },
91
+ getElementFromSelector(element) {
92
+ const selector = getSelector(element);
93
+ return selector ? SelectorEngine.findOne(selector) : null;
94
+ },
95
+ getMultipleElementsFromSelector(element) {
96
+ const selector = getSelector(element);
97
+ return selector ? SelectorEngine.find(selector) : [];
98
+ }
99
+ };
100
+
101
+ return SelectorEngine;
102
+
103
+ }));
104
+ //# sourceMappingURL=selector-engine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selector-engine.js","sources":["../../src/dom/selector-engine.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { isDisabled, isVisible, parseSelector } from '../util/index.js'\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttribute = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttribute || (!hrefAttribute.includes('#') && !hrefAttribute.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {\n hrefAttribute = `#${hrefAttribute.split('#')[1]}`\n }\n\n selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null\n }\n\n return selector ? selector.split(',').map(sel => parseSelector(sel)).join(',') : null\n}\n\nconst SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector))\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector)\n },\n\n children(element, selector) {\n return [].concat(...element.children).filter(child => child.matches(selector))\n },\n\n parents(element, selector) {\n const parents = []\n let ancestor = element.parentNode.closest(selector)\n\n while (ancestor) {\n parents.push(ancestor)\n ancestor = ancestor.parentNode.closest(selector)\n }\n\n return parents\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous]\n }\n\n previous = previous.previousElementSibling\n }\n\n return []\n },\n // TODO: this is now unused; remove later along with prev()\n next(element, selector) {\n let next = element.nextElementSibling\n\n while (next) {\n if (next.matches(selector)) {\n return [next]\n }\n\n next = next.nextElementSibling\n }\n\n return []\n },\n\n focusableChildren(element) {\n const focusables = [\n 'a',\n 'button',\n 'input',\n 'textarea',\n 'select',\n 'details',\n '[tabindex]',\n '[contenteditable=\"true\"]'\n ].map(selector => `${selector}:not([tabindex^=\"-\"])`).join(',')\n\n return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el))\n },\n\n getSelectorFromElement(element) {\n const selector = getSelector(element)\n\n if (selector) {\n return SelectorEngine.findOne(selector) ? selector : null\n }\n\n return null\n },\n\n getElementFromSelector(element) {\n const selector = getSelector(element)\n\n return selector ? SelectorEngine.findOne(selector) : null\n },\n\n getMultipleElementsFromSelector(element) {\n const selector = getSelector(element)\n\n return selector ? SelectorEngine.find(selector) : []\n }\n}\n\nexport default SelectorEngine\n"],"names":["getSelector","element","selector","getAttribute","hrefAttribute","includes","startsWith","split","trim","map","sel","parseSelector","join","SelectorEngine","find","document","documentElement","concat","Element","prototype","querySelectorAll","call","findOne","querySelector","children","filter","child","matches","parents","ancestor","parentNode","closest","push","prev","previous","previousElementSibling","next","nextElementSibling","focusableChildren","focusables","el","isDisabled","isVisible","getSelectorFromElement","getElementFromSelector","getMultipleElementsFromSelector"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAIA,MAAMA,WAAW,GAAGC,OAAO,IAAI;EAC7B,EAAA,IAAIC,QAAQ,GAAGD,OAAO,CAACE,YAAY,CAAC,gBAAgB,CAAC;EAErD,EAAA,IAAI,CAACD,QAAQ,IAAIA,QAAQ,KAAK,GAAG,EAAE;EACjC,IAAA,IAAIE,aAAa,GAAGH,OAAO,CAACE,YAAY,CAAC,MAAM,CAAC;;EAEhD;EACA;EACA;EACA;EACA,IAAA,IAAI,CAACC,aAAa,IAAK,CAACA,aAAa,CAAC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U,EACV,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,0BAA0B,CAC3B,CAAC9B,GAAG,CAACP,QAAQ,IAAI,CAAA,EAAGA,QAAQ,CAAA,qBAAA,CAAuB,CAAC,CAACU,IAAI,CAAC,GAAG,CAAC;MAE/D,OAAO,IAAI,CAACE,IAAI,CAACyB,UAAU,EAAEtC,OAAO,CAAC,CAACwB,MAAM,CAACe,EAAE,IAAI,CAACC,mBAAU,CAACD,EAAE,CAAC,IAAIE,kBAAS,CAACF,EAAE,CAAC,CAAC;IACtF,CAAC;IAEDG,sBAAsBA,CAAC1C,OAAO,EAAE;EAC9B,IAAA,MAAMC,QAAQ,GAAGF,WAAW,CAACC,OAAO,CAAC;EAErC,IAAA,IAAIC,QAAQ,EAAE;QACZ,OAAOW,cAAc,CAACS,OAAO,CAACpB,QAAQ,CAAC,GAAGA,QAAQ,GAAG,IAAI;EAC3D,IAAA;EAEA,IAAA,OAAO,IAAI;IACb,CAAC;IAED0C,sBAAsBA,CAAC3C,OAAO,EAAE;EAC9B,IAAA,MAAMC,QAAQ,GAAGF,WAAW,CAACC,OAAO,CAAC;MAErC,OAAOC,QAAQ,GAAGW,cAAc,CAACS,OAAO,CAACpB,QAAQ,CAAC,GAAG,IAAI;IAC3D,CAAC;IAED2C,+BAA+BA,CAAC5C,OAAO,EAAE;EACvC,IAAA,MAAMC,QAAQ,GAAGF,WAAW,CAACC,OAAO,CAAC;MAErC,OAAOC,QAAQ,GAAGW,cAAc,CAACC,IAAI,CAACZ,QAAQ,CAAC,GAAG,EAAE;EACtD,EAAA;EACF;;;;;;;;"}
@@ -0,0 +1,402 @@
1
+ /*!
2
+ * Bootstrap dropdown.js v5.3.8 (https://getbootstrap.com/)
3
+ * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
+ */
6
+ (function (global, factory) {
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./base-component.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./util/index.js')) :
8
+ typeof define === 'function' && define.amd ? define(['@popperjs/core', './base-component', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './util/index'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global["@popperjs/core"], global.BaseComponent, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Index));
10
+ })(this, (function (Popper, BaseComponent, EventHandler, Manipulator, SelectorEngine, index_js) { 'use strict';
11
+
12
+ function _interopNamespaceDefault(e) {
13
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
14
+ if (e) {
15
+ for (const k in e) {
16
+ if (k !== 'default') {
17
+ const d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: () => e[k]
21
+ });
22
+ }
23
+ }
24
+ }
25
+ n.default = e;
26
+ return Object.freeze(n);
27
+ }
28
+
29
+ const Popper__namespace = /*#__PURE__*/_interopNamespaceDefault(Popper);
30
+
31
+ /**
32
+ * --------------------------------------------------------------------------
33
+ * Bootstrap dropdown.js
34
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
35
+ * --------------------------------------------------------------------------
36
+ */
37
+
38
+
39
+ /**
40
+ * Constants
41
+ */
42
+
43
+ const NAME = 'dropdown';
44
+ const DATA_KEY = 'bs.dropdown';
45
+ const EVENT_KEY = `.${DATA_KEY}`;
46
+ const DATA_API_KEY = '.data-api';
47
+ const ESCAPE_KEY = 'Escape';
48
+ const TAB_KEY = 'Tab';
49
+ const ARROW_UP_KEY = 'ArrowUp';
50
+ const ARROW_DOWN_KEY = 'ArrowDown';
51
+ const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button
52
+
53
+ const EVENT_HIDE = `hide${EVENT_KEY}`;
54
+ const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
55
+ const EVENT_SHOW = `show${EVENT_KEY}`;
56
+ const EVENT_SHOWN = `shown${EVENT_KEY}`;
57
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
58
+ const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`;
59
+ const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`;
60
+ const CLASS_NAME_SHOW = 'show';
61
+ const CLASS_NAME_DROPUP = 'dropup';
62
+ const CLASS_NAME_DROPEND = 'dropend';
63
+ const CLASS_NAME_DROPSTART = 'dropstart';
64
+ const CLASS_NAME_DROPUP_CENTER = 'dropup-center';
65
+ const CLASS_NAME_DROPDOWN_CENTER = 'dropdown-center';
66
+ const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)';
67
+ const SELECTOR_DATA_TOGGLE_SHOWN = `${SELECTOR_DATA_TOGGLE}.${CLASS_NAME_SHOW}`;
68
+ const SELECTOR_MENU = '.dropdown-menu';
69
+ const SELECTOR_NAVBAR = '.navbar';
70
+ const SELECTOR_NAVBAR_NAV = '.navbar-nav';
71
+ const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
72
+ const PLACEMENT_TOP = index_js.isRTL() ? 'top-end' : 'top-start';
73
+ const PLACEMENT_TOPEND = index_js.isRTL() ? 'top-start' : 'top-end';
74
+ const PLACEMENT_BOTTOM = index_js.isRTL() ? 'bottom-end' : 'bottom-start';
75
+ const PLACEMENT_BOTTOMEND = index_js.isRTL() ? 'bottom-start' : 'bottom-end';
76
+ const PLACEMENT_RIGHT = index_js.isRTL() ? 'left-start' : 'right-start';
77
+ const PLACEMENT_LEFT = index_js.isRTL() ? 'right-start' : 'left-start';
78
+ const PLACEMENT_TOPCENTER = 'top';
79
+ const PLACEMENT_BOTTOMCENTER = 'bottom';
80
+ const Default = {
81
+ autoClose: true,
82
+ boundary: 'clippingParents',
83
+ display: 'dynamic',
84
+ offset: [0, 2],
85
+ popperConfig: null,
86
+ reference: 'toggle'
87
+ };
88
+ const DefaultType = {
89
+ autoClose: '(boolean|string)',
90
+ boundary: '(string|element)',
91
+ display: 'string',
92
+ offset: '(array|string|function)',
93
+ popperConfig: '(null|object|function)',
94
+ reference: '(string|element|object)'
95
+ };
96
+
97
+ /**
98
+ * Class definition
99
+ */
100
+
101
+ class Dropdown extends BaseComponent {
102
+ constructor(element, config) {
103
+ super(element, config);
104
+ this._popper = null;
105
+ this._parent = this._element.parentNode; // dropdown wrapper
106
+ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
107
+ this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);
108
+ this._inNavbar = this._detectNavbar();
109
+ }
110
+
111
+ // Getters
112
+ static get Default() {
113
+ return Default;
114
+ }
115
+ static get DefaultType() {
116
+ return DefaultType;
117
+ }
118
+ static get NAME() {
119
+ return NAME;
120
+ }
121
+
122
+ // Public
123
+ toggle() {
124
+ return this._isShown() ? this.hide() : this.show();
125
+ }
126
+ show() {
127
+ if (index_js.isDisabled(this._element) || this._isShown()) {
128
+ return;
129
+ }
130
+ const relatedTarget = {
131
+ relatedTarget: this._element
132
+ };
133
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, relatedTarget);
134
+ if (showEvent.defaultPrevented) {
135
+ return;
136
+ }
137
+ this._createPopper();
138
+
139
+ // If this is a touch-enabled device we add extra
140
+ // empty mouseover listeners to the body's immediate children;
141
+ // only needed because of broken event delegation on iOS
142
+ // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
143
+ if ('ontouchstart' in document.documentElement && !this._parent.closest(SELECTOR_NAVBAR_NAV)) {
144
+ for (const element of [].concat(...document.body.children)) {
145
+ EventHandler.on(element, 'mouseover', index_js.noop);
146
+ }
147
+ }
148
+ this._element.focus();
149
+ this._element.setAttribute('aria-expanded', true);
150
+ this._menu.classList.add(CLASS_NAME_SHOW);
151
+ this._element.classList.add(CLASS_NAME_SHOW);
152
+ EventHandler.trigger(this._element, EVENT_SHOWN, relatedTarget);
153
+ }
154
+ hide() {
155
+ if (index_js.isDisabled(this._element) || !this._isShown()) {
156
+ return;
157
+ }
158
+ const relatedTarget = {
159
+ relatedTarget: this._element
160
+ };
161
+ this._completeHide(relatedTarget);
162
+ }
163
+ dispose() {
164
+ if (this._popper) {
165
+ this._popper.destroy();
166
+ }
167
+ super.dispose();
168
+ }
169
+ update() {
170
+ this._inNavbar = this._detectNavbar();
171
+ if (this._popper) {
172
+ this._popper.update();
173
+ }
174
+ }
175
+
176
+ // Private
177
+ _completeHide(relatedTarget) {
178
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE, relatedTarget);
179
+ if (hideEvent.defaultPrevented) {
180
+ return;
181
+ }
182
+
183
+ // If this is a touch-enabled device we remove the extra
184
+ // empty mouseover listeners we added for iOS support
185
+ if ('ontouchstart' in document.documentElement) {
186
+ for (const element of [].concat(...document.body.children)) {
187
+ EventHandler.off(element, 'mouseover', index_js.noop);
188
+ }
189
+ }
190
+ if (this._popper) {
191
+ this._popper.destroy();
192
+ }
193
+ this._menu.classList.remove(CLASS_NAME_SHOW);
194
+ this._element.classList.remove(CLASS_NAME_SHOW);
195
+ this._element.setAttribute('aria-expanded', 'false');
196
+ Manipulator.removeDataAttribute(this._menu, 'popper');
197
+ EventHandler.trigger(this._element, EVENT_HIDDEN, relatedTarget);
198
+ }
199
+ _getConfig(config) {
200
+ config = super._getConfig(config);
201
+ if (typeof config.reference === 'object' && !index_js.isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
202
+ // Popper virtual elements require a getBoundingClientRect method
203
+ throw new TypeError(`${NAME.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
204
+ }
205
+ return config;
206
+ }
207
+ _createPopper() {
208
+ if (typeof Popper__namespace === 'undefined') {
209
+ throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org/docs/v2/)');
210
+ }
211
+ let referenceElement = this._element;
212
+ if (this._config.reference === 'parent') {
213
+ referenceElement = this._parent;
214
+ } else if (index_js.isElement(this._config.reference)) {
215
+ referenceElement = index_js.getElement(this._config.reference);
216
+ } else if (typeof this._config.reference === 'object') {
217
+ referenceElement = this._config.reference;
218
+ }
219
+ const popperConfig = this._getPopperConfig();
220
+ this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig);
221
+ }
222
+ _isShown() {
223
+ return this._menu.classList.contains(CLASS_NAME_SHOW);
224
+ }
225
+ _getPlacement() {
226
+ const parentDropdown = this._parent;
227
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {
228
+ return PLACEMENT_RIGHT;
229
+ }
230
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {
231
+ return PLACEMENT_LEFT;
232
+ }
233
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)) {
234
+ return PLACEMENT_TOPCENTER;
235
+ }
236
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENTER)) {
237
+ return PLACEMENT_BOTTOMCENTER;
238
+ }
239
+
240
+ // We need to trim the value because custom properties can also include spaces
241
+ const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';
242
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
243
+ return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;
244
+ }
245
+ return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;
246
+ }
247
+ _detectNavbar() {
248
+ return this._element.closest(SELECTOR_NAVBAR) !== null;
249
+ }
250
+ _getOffset() {
251
+ const {
252
+ offset
253
+ } = this._config;
254
+ if (typeof offset === 'string') {
255
+ return offset.split(',').map(value => Number.parseInt(value, 10));
256
+ }
257
+ if (typeof offset === 'function') {
258
+ return popperData => offset(popperData, this._element);
259
+ }
260
+ return offset;
261
+ }
262
+ _getPopperConfig() {
263
+ const defaultBsPopperConfig = {
264
+ placement: this._getPlacement(),
265
+ modifiers: [{
266
+ name: 'preventOverflow',
267
+ options: {
268
+ boundary: this._config.boundary
269
+ }
270
+ }, {
271
+ name: 'offset',
272
+ options: {
273
+ offset: this._getOffset()
274
+ }
275
+ }]
276
+ };
277
+
278
+ // Disable Popper if we have a static display or Dropdown is in Navbar
279
+ if (this._inNavbar || this._config.display === 'static') {
280
+ Manipulator.setDataAttribute(this._menu, 'popper', 'static'); // TODO: v6 remove
281
+ defaultBsPopperConfig.modifiers = [{
282
+ name: 'applyStyles',
283
+ enabled: false
284
+ }];
285
+ }
286
+ return {
287
+ ...defaultBsPopperConfig,
288
+ ...index_js.execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])
289
+ };
290
+ }
291
+ _selectMenuItem({
292
+ key,
293
+ target
294
+ }) {
295
+ const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(element => index_js.isVisible(element));
296
+ if (!items.length) {
297
+ return;
298
+ }
299
+
300
+ // if target isn't included in items (e.g. when expanding the dropdown)
301
+ // allow cycling to get the last item in case key equals ARROW_UP_KEY
302
+ index_js.getNextActiveElement(items, target, key === ARROW_DOWN_KEY, !items.includes(target)).focus();
303
+ }
304
+
305
+ // Static
306
+ static jQueryInterface(config) {
307
+ return this.each(function () {
308
+ const data = Dropdown.getOrCreateInstance(this, config);
309
+ if (typeof config !== 'string') {
310
+ return;
311
+ }
312
+ if (typeof data[config] === 'undefined') {
313
+ throw new TypeError(`No method named "${config}"`);
314
+ }
315
+ data[config]();
316
+ });
317
+ }
318
+ static clearMenus(event) {
319
+ if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY) {
320
+ return;
321
+ }
322
+ const openToggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN);
323
+ for (const toggle of openToggles) {
324
+ const context = Dropdown.getInstance(toggle);
325
+ if (!context || context._config.autoClose === false) {
326
+ continue;
327
+ }
328
+ const composedPath = event.composedPath();
329
+ const isMenuTarget = composedPath.includes(context._menu);
330
+ if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
331
+ continue;
332
+ }
333
+
334
+ // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
335
+ if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY || /input|select|option|textarea|form/i.test(event.target.tagName))) {
336
+ continue;
337
+ }
338
+ const relatedTarget = {
339
+ relatedTarget: context._element
340
+ };
341
+ if (event.type === 'click') {
342
+ relatedTarget.clickEvent = event;
343
+ }
344
+ context._completeHide(relatedTarget);
345
+ }
346
+ }
347
+ static dataApiKeydownHandler(event) {
348
+ // If not an UP | DOWN | ESCAPE key => not a dropdown command
349
+ // If input/textarea && if key is other than ESCAPE => not a dropdown command
350
+
351
+ const isInput = /input|textarea/i.test(event.target.tagName);
352
+ const isEscapeEvent = event.key === ESCAPE_KEY;
353
+ const isUpOrDownEvent = [ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key);
354
+ if (!isUpOrDownEvent && !isEscapeEvent) {
355
+ return;
356
+ }
357
+ if (isInput && !isEscapeEvent) {
358
+ return;
359
+ }
360
+ event.preventDefault();
361
+
362
+ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
363
+ const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE, event.delegateTarget.parentNode);
364
+ const instance = Dropdown.getOrCreateInstance(getToggleButton);
365
+ if (isUpOrDownEvent) {
366
+ event.stopPropagation();
367
+ instance.show();
368
+ instance._selectMenuItem(event);
369
+ return;
370
+ }
371
+ if (instance._isShown()) {
372
+ // else is escape and we check if it is shown
373
+ event.stopPropagation();
374
+ instance.hide();
375
+ getToggleButton.focus();
376
+ }
377
+ }
378
+ }
379
+
380
+ /**
381
+ * Data API implementation
382
+ */
383
+
384
+ EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler);
385
+ EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
386
+ EventHandler.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus);
387
+ EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
388
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
389
+ event.preventDefault();
390
+ Dropdown.getOrCreateInstance(this).toggle();
391
+ });
392
+
393
+ /**
394
+ * jQuery
395
+ */
396
+
397
+ index_js.defineJQueryPlugin(Dropdown);
398
+
399
+ return Dropdown;
400
+
401
+ }));
402
+ //# sourceMappingURL=dropdown.js.map