@govbr-ds/webcomponents 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (858) hide show
  1. package/cem/custom-elements.json +63 -63
  2. package/dist/cjs/app-globals-DcqHuMBv.js +9 -0
  3. package/dist/cjs/br-avatar.cjs.entry.js +248 -0
  4. package/dist/cjs/br-breadcrumb-item.cjs.entry.js +45 -0
  5. package/dist/cjs/br-breadcrumb.cjs.entry.js +443 -0
  6. package/dist/cjs/br-button_2.cjs.entry.js +280 -0
  7. package/dist/cjs/br-card.cjs.entry.js +111 -0
  8. package/dist/cjs/br-carousel-page.cjs.entry.js +80 -0
  9. package/dist/cjs/br-carousel.cjs.entry.js +565 -0
  10. package/dist/cjs/br-checkbox-group.cjs.entry.js +118 -0
  11. package/dist/cjs/br-checkbox.cjs.entry.js +288 -0
  12. package/dist/cjs/br-checkgroup.cjs.entry.js +20 -0
  13. package/dist/cjs/br-collapse_2.cjs.entry.js +683 -0
  14. package/dist/cjs/br-cookiebar-cookie.cjs.entry.js +83 -0
  15. package/dist/cjs/br-cookiebar-group.cjs.entry.js +309 -0
  16. package/dist/cjs/br-cookiebar-header.cjs.entry.js +39 -0
  17. package/dist/cjs/br-cookiebar-link.cjs.entry.js +54 -0
  18. package/dist/cjs/br-cookiebar-note-group.cjs.entry.js +70 -0
  19. package/dist/cjs/br-cookiebar-note.cjs.entry.js +25 -0
  20. package/dist/cjs/br-cookiebar.cjs.entry.js +758 -0
  21. package/dist/cjs/br-crumb.cjs.entry.js +51 -0
  22. package/dist/cjs/br-date-picker_3.cjs.entry.js +2446 -0
  23. package/dist/cjs/br-datetime-picker.cjs.entry.js +1887 -0
  24. package/dist/cjs/br-divider.cjs.entry.js +225 -0
  25. package/dist/cjs/br-dropdown_2.cjs.entry.js +1856 -0
  26. package/dist/cjs/br-footer-category.cjs.entry.js +102 -0
  27. package/dist/cjs/br-footer-item.cjs.entry.js +52 -0
  28. package/dist/cjs/br-footer-legal.cjs.entry.js +41 -0
  29. package/dist/cjs/br-footer-logo.cjs.entry.js +104 -0
  30. package/dist/cjs/br-footer-social.cjs.entry.js +71 -0
  31. package/dist/cjs/br-footer.cjs.entry.js +92 -0
  32. package/dist/cjs/br-header-function.cjs.entry.js +142 -0
  33. package/dist/cjs/br-header-link.cjs.entry.js +60 -0
  34. package/dist/cjs/br-header-list.cjs.entry.js +279 -0
  35. package/dist/cjs/br-header-logo.cjs.entry.js +177 -0
  36. package/dist/cjs/br-header.cjs.entry.js +642 -0
  37. package/dist/cjs/br-icon.cjs.entry.js +485 -0
  38. package/dist/cjs/br-input.cjs.entry.js +599 -0
  39. package/dist/cjs/br-item.cjs.entry.js +356 -0
  40. package/dist/cjs/br-link.cjs.entry.js +132 -0
  41. package/dist/cjs/br-loading.cjs.entry.js +505 -0
  42. package/dist/cjs/br-magic-button.cjs.entry.js +92 -0
  43. package/dist/cjs/br-menu-group.cjs.entry.js +23 -0
  44. package/dist/cjs/br-menu-header.cjs.entry.js +47 -0
  45. package/dist/cjs/br-menu-info.cjs.entry.js +38 -0
  46. package/dist/cjs/br-menu-item.cjs.entry.js +79 -0
  47. package/dist/cjs/br-menu-link.cjs.entry.js +55 -0
  48. package/dist/cjs/br-menu-list.cjs.entry.js +149 -0
  49. package/dist/cjs/br-menu-logo.cjs.entry.js +75 -0
  50. package/dist/cjs/br-menu-social.cjs.entry.js +65 -0
  51. package/dist/cjs/br-menu.cjs.entry.js +993 -0
  52. package/dist/cjs/br-modal.cjs.entry.js +496 -0
  53. package/dist/cjs/br-notification-body.cjs.entry.js +71 -0
  54. package/dist/cjs/br-notification-header.cjs.entry.js +48 -0
  55. package/dist/cjs/br-notification-item.cjs.entry.js +110 -0
  56. package/dist/cjs/br-notification.cjs.entry.js +334 -0
  57. package/dist/cjs/br-pagination.cjs.entry.js +884 -0
  58. package/dist/cjs/br-radio-group.cjs.entry.js +428 -0
  59. package/dist/cjs/br-radio.cjs.entry.js +357 -0
  60. package/dist/cjs/br-scrim.cjs.entry.js +1336 -0
  61. package/dist/cjs/br-select-input_3.cjs.entry.js +954 -0
  62. package/dist/cjs/br-sign-in.cjs.entry.js +125 -0
  63. package/dist/cjs/br-skip-link-item.cjs.entry.js +20 -0
  64. package/dist/cjs/br-skip-link.cjs.entry.js +362 -0
  65. package/dist/cjs/br-skiplink-item.cjs.entry.js +192 -0
  66. package/dist/cjs/br-slider.cjs.entry.js +688 -0
  67. package/dist/cjs/br-step_2.cjs.entry.js +628 -0
  68. package/dist/cjs/br-switch.cjs.entry.js +245 -0
  69. package/dist/cjs/br-tab-item.cjs.entry.js +185 -0
  70. package/dist/cjs/br-tab.cjs.entry.js +397 -0
  71. package/dist/cjs/br-table-body.cjs.entry.js +37 -0
  72. package/dist/cjs/br-table-cell.cjs.entry.js +184 -0
  73. package/dist/cjs/br-table-header-cell.cjs.entry.js +173 -0
  74. package/dist/cjs/br-table-header.cjs.entry.js +37 -0
  75. package/dist/cjs/br-table-row.cjs.entry.js +81 -0
  76. package/dist/cjs/br-table.cjs.entry.js +680 -0
  77. package/dist/cjs/br-tag.cjs.entry.js +494 -0
  78. package/dist/cjs/br-textarea.cjs.entry.js +306 -0
  79. package/dist/cjs/br-tooltip.cjs.entry.js +627 -0
  80. package/dist/cjs/br-upload.cjs.entry.js +582 -0
  81. package/dist/cjs/br-wizard-panel.cjs.entry.js +54 -0
  82. package/dist/cjs/br-wizard.cjs.entry.js +708 -0
  83. package/dist/cjs/breakpoint-observer-P8veqXg7.js +144 -0
  84. package/dist/cjs/clamp-Co_hWptd.js +25 -0
  85. package/dist/cjs/cookiebar.utils-CB1gQwZ4.js +18 -0
  86. package/dist/cjs/datetime-picker-constants-B5pWeOn1.js +3827 -0
  87. package/dist/cjs/event-CmVdNHxl.js +56 -0
  88. package/dist/cjs/floating-surface-dismiss-ccdiD0KF.js +63 -0
  89. package/dist/cjs/floating-ui-MBI1osio.js +136 -0
  90. package/dist/cjs/floating-ui.dom-BUSTaaxR.js +1715 -0
  91. package/dist/cjs/focus-DuywwJPR.js +30 -0
  92. package/dist/cjs/getNextElement-R9l3JtM9.js +31 -0
  93. package/dist/cjs/iconify-icon-DfODV9bf.js +2307 -0
  94. package/dist/cjs/id-CjRFMzf6.js +20 -0
  95. package/dist/cjs/index-C92n55ch.js +678 -0
  96. package/dist/cjs/index-CRdcutym.js +3287 -0
  97. package/dist/cjs/index.cjs.js +12 -0
  98. package/dist/cjs/isNil-DO5zWc3l.js +19 -0
  99. package/dist/cjs/isValid-Fu3kaWNn.js +3694 -0
  100. package/dist/cjs/loader.cjs.js +17 -0
  101. package/dist/cjs/native-dialog--Ewqm4w0.js +49 -0
  102. package/dist/cjs/navigation-AbzwcRCU.js +25 -0
  103. package/dist/cjs/parts-D5K3ae2C.js +19 -0
  104. package/dist/cjs/props-CScmBvKd.js +24 -0
  105. package/dist/cjs/raf-batcher-yc87a4dS.js +55 -0
  106. package/dist/cjs/slot-DAllytTj.js +48 -0
  107. package/dist/cjs/swipe-BU8_XE9f.js +345 -0
  108. package/dist/cjs/table-constants-BOPSay0B.js +183 -0
  109. package/dist/cjs/validator-CTCajtT9.js +123 -0
  110. package/dist/cjs/webcomponents.cjs.js +50 -0
  111. package/dist/collection/assets/icon-search.svg +6 -0
  112. package/dist/collection/assets/logo-negative.svg +1 -0
  113. package/dist/collection/assets/logo-positive.svg +1 -0
  114. package/dist/collection/assets/wc.svg +1 -0
  115. package/dist/collection/collection-manifest.json +113 -0
  116. package/dist/collection/components/avatar/avatar.css +1 -0
  117. package/dist/collection/components/avatar/avatar.js +589 -0
  118. package/dist/collection/components/avatar/avatar.types.js +1 -0
  119. package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js +166 -0
  120. package/dist/collection/components/breadcrumb/breadcrumb.css +1 -0
  121. package/dist/collection/components/breadcrumb/breadcrumb.js +619 -0
  122. package/dist/collection/components/breadcrumb/breadcrumb.types.js +1 -0
  123. package/dist/collection/components/breadcrumb/crumb/crumb.js +175 -0
  124. package/dist/collection/components/button/button.css +1 -0
  125. package/dist/collection/components/button/button.js +546 -0
  126. package/dist/collection/components/button/button.types.js +1 -0
  127. package/dist/collection/components/card/card.css +1 -0
  128. package/dist/collection/components/card/card.js +225 -0
  129. package/dist/collection/components/carousel/carousel-page/carousel-page.css +1 -0
  130. package/dist/collection/components/carousel/carousel-page/carousel-page.js +195 -0
  131. package/dist/collection/components/carousel/carousel.css +1 -0
  132. package/dist/collection/components/carousel/carousel.js +1217 -0
  133. package/dist/collection/components/carousel/carousel.types.js +1 -0
  134. package/dist/collection/components/checkbox/checkbox.css +1 -0
  135. package/dist/collection/components/checkbox/checkbox.js +823 -0
  136. package/dist/collection/components/checkbox/checkbox.types.js +1 -0
  137. package/dist/collection/components/checkbox-group/checkbox-group.css +1 -0
  138. package/dist/collection/components/checkbox-group/checkbox-group.js +268 -0
  139. package/dist/collection/components/checkgroup/checkgroup.js +166 -0
  140. package/dist/collection/components/collapse/collapse.css +1 -0
  141. package/dist/collection/components/collapse/collapse.js +642 -0
  142. package/dist/collection/components/collapse/collapse.types.js +1 -0
  143. package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.css +1 -0
  144. package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.js +529 -0
  145. package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.css +1 -0
  146. package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.js +628 -0
  147. package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.css +1 -0
  148. package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.js +165 -0
  149. package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.css +1 -0
  150. package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.js +200 -0
  151. package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.css +1 -0
  152. package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.js +100 -0
  153. package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.css +1 -0
  154. package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.js +172 -0
  155. package/dist/collection/components/cookiebar/cookiebar.css +1 -0
  156. package/dist/collection/components/cookiebar/cookiebar.js +1419 -0
  157. package/dist/collection/components/cookiebar/cookiebar.types.js +1 -0
  158. package/dist/collection/components/cookiebar/cookiebar.utils.js +14 -0
  159. package/dist/collection/components/datetime-picker/date-picker/date-picker-locale.js +94 -0
  160. package/dist/collection/components/datetime-picker/date-picker/date-picker-props-validation.js +57 -0
  161. package/dist/collection/components/datetime-picker/date-picker/date-picker.css +1 -0
  162. package/dist/collection/components/datetime-picker/date-picker/date-picker.js +913 -0
  163. package/dist/collection/components/datetime-picker/datetime-input/datetime-input-props-validation.js +65 -0
  164. package/dist/collection/components/datetime-picker/datetime-input/datetime-input.css +1 -0
  165. package/dist/collection/components/datetime-picker/datetime-input/datetime-input.js +825 -0
  166. package/dist/collection/components/datetime-picker/datetime-picker-constants.js +36 -0
  167. package/dist/collection/components/datetime-picker/datetime-picker-form-associated.js +112 -0
  168. package/dist/collection/components/datetime-picker/datetime-picker-props-validation.js +202 -0
  169. package/dist/collection/components/datetime-picker/datetime-picker.css +1 -0
  170. package/dist/collection/components/datetime-picker/datetime-picker.js +1925 -0
  171. package/dist/collection/components/datetime-picker/datetime-picker.types.js +1 -0
  172. package/dist/collection/components/datetime-picker/datetime-picker.utils.js +250 -0
  173. package/dist/collection/components/datetime-picker/time-picker/time-picker-constants.js +13 -0
  174. package/dist/collection/components/datetime-picker/time-picker/time-picker.css +1 -0
  175. package/dist/collection/components/datetime-picker/time-picker/time-picker.js +456 -0
  176. package/dist/collection/components/divider/divider.css +1 -0
  177. package/dist/collection/components/divider/divider.js +537 -0
  178. package/dist/collection/components/divider/divider.types.js +1 -0
  179. package/dist/collection/components/dropdown/dropdown.css +1 -0
  180. package/dist/collection/components/dropdown/dropdown.js +939 -0
  181. package/dist/collection/components/dropdown/dropdown.types.js +1 -0
  182. package/dist/collection/components/footer/footer-category/footer-category.css +1 -0
  183. package/dist/collection/components/footer/footer-category/footer-category.js +160 -0
  184. package/dist/collection/components/footer/footer-item/footer-item.css +1 -0
  185. package/dist/collection/components/footer/footer-item/footer-item.js +154 -0
  186. package/dist/collection/components/footer/footer-legal/footer-legal.css +1 -0
  187. package/dist/collection/components/footer/footer-legal/footer-legal.js +75 -0
  188. package/dist/collection/components/footer/footer-logo/footer-logo.css +1 -0
  189. package/dist/collection/components/footer/footer-logo/footer-logo.js +342 -0
  190. package/dist/collection/components/footer/footer-logo/footer-logo.types.js +1 -0
  191. package/dist/collection/components/footer/footer-social/footer-social.css +1 -0
  192. package/dist/collection/components/footer/footer-social/footer-social.js +239 -0
  193. package/dist/collection/components/footer/footer.css +1 -0
  194. package/dist/collection/components/footer/footer.js +245 -0
  195. package/dist/collection/components/footer/footer.types.js +1 -0
  196. package/dist/collection/components/global.types.js +1 -0
  197. package/dist/collection/components/header/header-function/header-function.css +1 -0
  198. package/dist/collection/components/header/header-function/header-function.js +311 -0
  199. package/dist/collection/components/header/header-link/header-link.css +1 -0
  200. package/dist/collection/components/header/header-link/header-link.js +189 -0
  201. package/dist/collection/components/header/header-list/header-list.css +1 -0
  202. package/dist/collection/components/header/header-list/header-list.js +452 -0
  203. package/dist/collection/components/header/header-logo/header-logo.css +1 -0
  204. package/dist/collection/components/header/header-logo/header-logo.js +420 -0
  205. package/dist/collection/components/header/header.css +1 -0
  206. package/dist/collection/components/header/header.js +1131 -0
  207. package/dist/collection/components/header/header.types.js +1 -0
  208. package/dist/collection/components/icon/default-icons-cache.js +233 -0
  209. package/dist/collection/components/icon/icon.css +1 -0
  210. package/dist/collection/components/icon/icon.js +598 -0
  211. package/dist/collection/components/icon/icon.types.js +1 -0
  212. package/dist/collection/components/icon/icon.utils.js +33 -0
  213. package/dist/collection/components/input/input.css +1 -0
  214. package/dist/collection/components/input/input.js +1642 -0
  215. package/dist/collection/components/input/input.types.js +1 -0
  216. package/dist/collection/components/item/item.css +1 -0
  217. package/dist/collection/components/item/item.js +906 -0
  218. package/dist/collection/components/item/item.types.js +1 -0
  219. package/dist/collection/components/link/link.css +1 -0
  220. package/dist/collection/components/link/link.js +698 -0
  221. package/dist/collection/components/list/list.css +1 -0
  222. package/dist/collection/components/list/list.js +728 -0
  223. package/dist/collection/components/loading/loading.css +1 -0
  224. package/dist/collection/components/loading/loading.js +1169 -0
  225. package/dist/collection/components/loading/loading.types.js +1 -0
  226. package/dist/collection/components/magic-button/magic-button.css +1 -0
  227. package/dist/collection/components/magic-button/magic-button.js +237 -0
  228. package/dist/collection/components/menu/menu-group/menu-group.css +1 -0
  229. package/dist/collection/components/menu/menu-group/menu-group.js +77 -0
  230. package/dist/collection/components/menu/menu-header/menu-header.css +1 -0
  231. package/dist/collection/components/menu/menu-header/menu-header.js +161 -0
  232. package/dist/collection/components/menu/menu-info/menu-info.css +1 -0
  233. package/dist/collection/components/menu/menu-info/menu-info.js +94 -0
  234. package/dist/collection/components/menu/menu-item/menu-item.css +1 -0
  235. package/dist/collection/components/menu/menu-item/menu-item.js +306 -0
  236. package/dist/collection/components/menu/menu-item/menu-item.types.js +1 -0
  237. package/dist/collection/components/menu/menu-link/menu-link.css +1 -0
  238. package/dist/collection/components/menu/menu-link/menu-link.js +259 -0
  239. package/dist/collection/components/menu/menu-list/menu-list.css +1 -0
  240. package/dist/collection/components/menu/menu-list/menu-list.js +311 -0
  241. package/dist/collection/components/menu/menu-logo/menu-logo.css +1 -0
  242. package/dist/collection/components/menu/menu-logo/menu-logo.js +230 -0
  243. package/dist/collection/components/menu/menu-social/menu-social.css +1 -0
  244. package/dist/collection/components/menu/menu-social/menu-social.js +263 -0
  245. package/dist/collection/components/menu/menu.css +1 -0
  246. package/dist/collection/components/menu/menu.js +1372 -0
  247. package/dist/collection/components/menu/menu.types.js +1 -0
  248. package/dist/collection/components/menu/menu.utils.js +279 -0
  249. package/dist/collection/components/message/message.css +1 -0
  250. package/dist/collection/components/message/message.js +508 -0
  251. package/dist/collection/components/modal/modal.css +1 -0
  252. package/dist/collection/components/modal/modal.js +842 -0
  253. package/dist/collection/components/modal/modal.types.js +1 -0
  254. package/dist/collection/components/notification/notification-body/notification-body.css +1 -0
  255. package/dist/collection/components/notification/notification-body/notification-body.js +153 -0
  256. package/dist/collection/components/notification/notification-header/notification-header.css +1 -0
  257. package/dist/collection/components/notification/notification-header/notification-header.js +181 -0
  258. package/dist/collection/components/notification/notification-item/notification-item.css +1 -0
  259. package/dist/collection/components/notification/notification-item/notification-item.js +351 -0
  260. package/dist/collection/components/notification/notification-item/notification-item.types.js +1 -0
  261. package/dist/collection/components/notification/notification.css +1 -0
  262. package/dist/collection/components/notification/notification.js +838 -0
  263. package/dist/collection/components/notification/notification.types.js +1 -0
  264. package/dist/collection/components/pagination/pagination.css +1 -0
  265. package/dist/collection/components/pagination/pagination.js +1470 -0
  266. package/dist/collection/components/pagination/pagination.types.js +1 -0
  267. package/dist/collection/components/radio/radio.css +1 -0
  268. package/dist/collection/components/radio/radio.js +847 -0
  269. package/dist/collection/components/radio/radio.types.js +1 -0
  270. package/dist/collection/components/radio-group/radio-group.css +1 -0
  271. package/dist/collection/components/radio-group/radio-group.js +862 -0
  272. package/dist/collection/components/radio-group/radio-group.types.js +1 -0
  273. package/dist/collection/components/scrim/scrim.css +1 -0
  274. package/dist/collection/components/scrim/scrim.js +1825 -0
  275. package/dist/collection/components/scrim/scrim.types.js +1 -0
  276. package/dist/collection/components/scrim/scrim.utils.js +132 -0
  277. package/dist/collection/components/select/select-input/select-input.css +1 -0
  278. package/dist/collection/components/select/select-input/select-input.js +585 -0
  279. package/dist/collection/components/select/select-list/select-list.css +1 -0
  280. package/dist/collection/components/select/select-list/select-list.js +1147 -0
  281. package/dist/collection/components/select/select-option/select-option.css +1 -0
  282. package/dist/collection/components/select/select-option/select-option.js +543 -0
  283. package/dist/collection/components/select/select.constants.js +6 -0
  284. package/dist/collection/components/select/select.css +1 -0
  285. package/dist/collection/components/select/select.js +2575 -0
  286. package/dist/collection/components/select/select.types.js +1 -0
  287. package/dist/collection/components/sign-in/sign-in.css +1 -0
  288. package/dist/collection/components/sign-in/sign-in.js +400 -0
  289. package/dist/collection/components/sign-in/sign-in.types.js +1 -0
  290. package/dist/collection/components/skip-link/skip-link-item/skip-link-item-alias.js +103 -0
  291. package/dist/collection/components/skip-link/skip-link-item/skip-link-item.css +1 -0
  292. package/dist/collection/components/skip-link/skip-link-item/skip-link-item.js +450 -0
  293. package/dist/collection/components/skip-link/skip-link.css +1 -0
  294. package/dist/collection/components/skip-link/skip-link.js +699 -0
  295. package/dist/collection/components/skip-link/skip-link.types.js +1 -0
  296. package/dist/collection/components/slider/slider.css +1 -0
  297. package/dist/collection/components/slider/slider.js +1325 -0
  298. package/dist/collection/components/slider/slider.types.js +1 -0
  299. package/dist/collection/components/step/step-item/step-item.css +1 -0
  300. package/dist/collection/components/step/step-item/step-item.js +604 -0
  301. package/dist/collection/components/step/step-item/step-item.types.js +1 -0
  302. package/dist/collection/components/step/step.css +1 -0
  303. package/dist/collection/components/step/step.js +896 -0
  304. package/dist/collection/components/step/step.types.js +1 -0
  305. package/dist/collection/components/switch/switch.css +1 -0
  306. package/dist/collection/components/switch/switch.js +715 -0
  307. package/dist/collection/components/switch/switch.types.js +1 -0
  308. package/dist/collection/components/tab/tab-item/tab-item.css +1 -0
  309. package/dist/collection/components/tab/tab-item/tab-item.js +425 -0
  310. package/dist/collection/components/tab/tab.css +1 -0
  311. package/dist/collection/components/tab/tab.js +724 -0
  312. package/dist/collection/components/tab/tab.types.js +1 -0
  313. package/dist/collection/components/table/table-body/table-body.css +1 -0
  314. package/dist/collection/components/table/table-body/table-body.js +51 -0
  315. package/dist/collection/components/table/table-cell/table-cell.css +1 -0
  316. package/dist/collection/components/table/table-cell/table-cell.js +373 -0
  317. package/dist/collection/components/table/table-constants.js +171 -0
  318. package/dist/collection/components/table/table-header/table-header.css +1 -0
  319. package/dist/collection/components/table/table-header/table-header.js +51 -0
  320. package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -0
  321. package/dist/collection/components/table/table-header-cell/table-header-cell.js +402 -0
  322. package/dist/collection/components/table/table-row/table-row.css +1 -0
  323. package/dist/collection/components/table/table-row/table-row.js +261 -0
  324. package/dist/collection/components/table/table-tokens.js +50 -0
  325. package/dist/collection/components/table/table-types.js +1 -0
  326. package/dist/collection/components/table/table-utils.js +44 -0
  327. package/dist/collection/components/table/table.css +1 -0
  328. package/dist/collection/components/table/table.js +1030 -0
  329. package/dist/collection/components/tag/tag.css +1 -0
  330. package/dist/collection/components/tag/tag.js +1153 -0
  331. package/dist/collection/components/tag/tag.types.js +1 -0
  332. package/dist/collection/components/textarea/textarea.css +1 -0
  333. package/dist/collection/components/textarea/textarea.js +985 -0
  334. package/dist/collection/components/textarea/textarea.types.js +1 -0
  335. package/dist/collection/components/tooltip/tooltip.css +1 -0
  336. package/dist/collection/components/tooltip/tooltip.js +1024 -0
  337. package/dist/collection/components/tooltip/tooltip.types.js +1 -0
  338. package/dist/collection/components/upload/upload.css +1 -0
  339. package/dist/collection/components/upload/upload.js +1315 -0
  340. package/dist/collection/components/upload/upload.types.js +1 -0
  341. package/dist/collection/components/wizard/wizard-panel/wizard-panel.css +1 -0
  342. package/dist/collection/components/wizard/wizard-panel/wizard-panel.js +167 -0
  343. package/dist/collection/components/wizard/wizard.css +1 -0
  344. package/dist/collection/components/wizard/wizard.js +1228 -0
  345. package/dist/collection/index.js +14 -0
  346. package/dist/collection/pages/components/cookiebar/index.js +26 -0
  347. package/dist/collection/pages/components/link/index.js +29 -0
  348. package/dist/collection/pages/components/pagination/index.js +12 -0
  349. package/dist/collection/pages/components/slider/index.js +18 -0
  350. package/dist/collection/pages/scripts/code-editor.js +101 -0
  351. package/dist/collection/pages/scripts/component-controls.js +591 -0
  352. package/dist/collection/pages/scripts/dev-event-console.js +47 -0
  353. package/dist/collection/pages/scripts/menu.js +183 -0
  354. package/dist/collection/pages/scripts/pageLoader.js +1420 -0
  355. package/dist/collection/shared/utils/assetsPath.js +75 -0
  356. package/dist/collection/shared/utils/breakpoint-observer.js +139 -0
  357. package/dist/collection/shared/utils/clamp.js +21 -0
  358. package/dist/collection/shared/utils/css-variables.js +12 -0
  359. package/dist/collection/shared/utils/cssVariables.js +37 -0
  360. package/dist/collection/shared/utils/date.js +405 -0
  361. package/dist/collection/shared/utils/debounce.js +39 -0
  362. package/dist/collection/shared/utils/event.js +55 -0
  363. package/dist/collection/shared/utils/floating-surface-dismiss.js +59 -0
  364. package/dist/collection/shared/utils/floating-ui.js +131 -0
  365. package/dist/collection/shared/utils/focus.js +24 -0
  366. package/dist/collection/shared/utils/form.js +82 -0
  367. package/dist/collection/shared/utils/format-bytes.js +20 -0
  368. package/dist/collection/shared/utils/getNextElement.js +30 -0
  369. package/dist/collection/shared/utils/getRandom.js +27 -0
  370. package/dist/collection/shared/utils/helpers.js +31 -0
  371. package/dist/collection/shared/utils/id.js +16 -0
  372. package/dist/collection/shared/utils/index.js +60 -0
  373. package/dist/collection/shared/utils/interfaces.js +1 -0
  374. package/dist/collection/shared/utils/isClient.js +14 -0
  375. package/dist/collection/shared/utils/isDefined.js +19 -0
  376. package/dist/collection/shared/utils/isEmpty.js +30 -0
  377. package/dist/collection/shared/utils/isHTMLElement.js +16 -0
  378. package/dist/collection/shared/utils/isNil.js +15 -0
  379. package/dist/collection/shared/utils/isString.js +20 -0
  380. package/dist/collection/shared/utils/native-dialog.js +44 -0
  381. package/dist/collection/shared/utils/navigation.js +21 -0
  382. package/dist/collection/shared/utils/parts.js +15 -0
  383. package/dist/collection/shared/utils/prop-warning.js +7 -0
  384. package/dist/collection/shared/utils/props.js +37 -0
  385. package/dist/collection/shared/utils/raf-batcher.js +51 -0
  386. package/dist/collection/shared/utils/scrollLock.js +141 -0
  387. package/dist/collection/shared/utils/setRafTimeout.js +38 -0
  388. package/dist/collection/shared/utils/slot.js +113 -0
  389. package/dist/collection/shared/utils/ssr-date.js +33 -0
  390. package/dist/collection/shared/utils/stringToArray.js +29 -0
  391. package/dist/collection/shared/utils/swipe.js +342 -0
  392. package/dist/collection/shared/utils/transition.js +127 -0
  393. package/dist/collection/shared/utils/types.js +1 -0
  394. package/dist/collection/shared/utils/validator.js +51 -0
  395. package/dist/collection/value-accessors/angular-value-accessor-config.js +41 -0
  396. package/dist/collection/value-accessors/index.js +6 -0
  397. package/dist/collection/value-accessors/vue-model-config.js +43 -0
  398. package/dist/components/br-avatar.d.ts +11 -0
  399. package/dist/components/br-avatar.js +5 -0
  400. package/dist/components/br-breadcrumb-item.d.ts +11 -0
  401. package/dist/components/br-breadcrumb-item.js +5 -0
  402. package/dist/components/br-breadcrumb.d.ts +11 -0
  403. package/dist/components/br-breadcrumb.js +5 -0
  404. package/dist/components/br-button.d.ts +11 -0
  405. package/dist/components/br-button.js +5 -0
  406. package/dist/components/br-card.d.ts +11 -0
  407. package/dist/components/br-card.js +5 -0
  408. package/dist/components/br-carousel-page.d.ts +11 -0
  409. package/dist/components/br-carousel-page.js +5 -0
  410. package/dist/components/br-carousel.d.ts +11 -0
  411. package/dist/components/br-carousel.js +5 -0
  412. package/dist/components/br-checkbox-group.d.ts +11 -0
  413. package/dist/components/br-checkbox-group.js +5 -0
  414. package/dist/components/br-checkbox.d.ts +11 -0
  415. package/dist/components/br-checkbox.js +5 -0
  416. package/dist/components/br-checkgroup.d.ts +11 -0
  417. package/dist/components/br-checkgroup.js +5 -0
  418. package/dist/components/br-collapse.d.ts +11 -0
  419. package/dist/components/br-collapse.js +5 -0
  420. package/dist/components/br-cookiebar-cookie.d.ts +11 -0
  421. package/dist/components/br-cookiebar-cookie.js +5 -0
  422. package/dist/components/br-cookiebar-group.d.ts +11 -0
  423. package/dist/components/br-cookiebar-group.js +5 -0
  424. package/dist/components/br-cookiebar-header.d.ts +11 -0
  425. package/dist/components/br-cookiebar-header.js +5 -0
  426. package/dist/components/br-cookiebar-link.d.ts +11 -0
  427. package/dist/components/br-cookiebar-link.js +5 -0
  428. package/dist/components/br-cookiebar-note-group.d.ts +11 -0
  429. package/dist/components/br-cookiebar-note-group.js +5 -0
  430. package/dist/components/br-cookiebar-note.d.ts +11 -0
  431. package/dist/components/br-cookiebar-note.js +5 -0
  432. package/dist/components/br-cookiebar.d.ts +11 -0
  433. package/dist/components/br-cookiebar.js +5 -0
  434. package/dist/components/br-crumb.d.ts +11 -0
  435. package/dist/components/br-crumb.js +5 -0
  436. package/dist/components/br-date-picker.d.ts +11 -0
  437. package/dist/components/br-date-picker.js +5 -0
  438. package/dist/components/br-datetime-input.d.ts +11 -0
  439. package/dist/components/br-datetime-input.js +5 -0
  440. package/dist/components/br-datetime-picker.d.ts +11 -0
  441. package/dist/components/br-datetime-picker.js +5 -0
  442. package/dist/components/br-divider.d.ts +11 -0
  443. package/dist/components/br-divider.js +5 -0
  444. package/dist/components/br-dropdown.d.ts +11 -0
  445. package/dist/components/br-dropdown.js +5 -0
  446. package/dist/components/br-footer-category.d.ts +11 -0
  447. package/dist/components/br-footer-category.js +5 -0
  448. package/dist/components/br-footer-item.d.ts +11 -0
  449. package/dist/components/br-footer-item.js +5 -0
  450. package/dist/components/br-footer-legal.d.ts +11 -0
  451. package/dist/components/br-footer-legal.js +5 -0
  452. package/dist/components/br-footer-logo.d.ts +11 -0
  453. package/dist/components/br-footer-logo.js +5 -0
  454. package/dist/components/br-footer-social.d.ts +11 -0
  455. package/dist/components/br-footer-social.js +5 -0
  456. package/dist/components/br-footer.d.ts +11 -0
  457. package/dist/components/br-footer.js +5 -0
  458. package/dist/components/br-header-function.d.ts +11 -0
  459. package/dist/components/br-header-function.js +5 -0
  460. package/dist/components/br-header-link.d.ts +11 -0
  461. package/dist/components/br-header-link.js +5 -0
  462. package/dist/components/br-header-list.d.ts +11 -0
  463. package/dist/components/br-header-list.js +5 -0
  464. package/dist/components/br-header-logo.d.ts +11 -0
  465. package/dist/components/br-header-logo.js +5 -0
  466. package/dist/components/br-header.d.ts +11 -0
  467. package/dist/components/br-header.js +5 -0
  468. package/dist/components/br-icon.d.ts +11 -0
  469. package/dist/components/br-icon.js +5 -0
  470. package/dist/components/br-input.d.ts +11 -0
  471. package/dist/components/br-input.js +5 -0
  472. package/dist/components/br-item.d.ts +11 -0
  473. package/dist/components/br-item.js +5 -0
  474. package/dist/components/br-link.d.ts +11 -0
  475. package/dist/components/br-link.js +5 -0
  476. package/dist/components/br-list.d.ts +11 -0
  477. package/dist/components/br-list.js +5 -0
  478. package/dist/components/br-loading.d.ts +11 -0
  479. package/dist/components/br-loading.js +5 -0
  480. package/dist/components/br-magic-button.d.ts +11 -0
  481. package/dist/components/br-magic-button.js +5 -0
  482. package/dist/components/br-menu-group.d.ts +11 -0
  483. package/dist/components/br-menu-group.js +5 -0
  484. package/dist/components/br-menu-header.d.ts +11 -0
  485. package/dist/components/br-menu-header.js +5 -0
  486. package/dist/components/br-menu-info.d.ts +11 -0
  487. package/dist/components/br-menu-info.js +5 -0
  488. package/dist/components/br-menu-item.d.ts +11 -0
  489. package/dist/components/br-menu-item.js +5 -0
  490. package/dist/components/br-menu-link.d.ts +11 -0
  491. package/dist/components/br-menu-link.js +5 -0
  492. package/dist/components/br-menu-list.d.ts +11 -0
  493. package/dist/components/br-menu-list.js +5 -0
  494. package/dist/components/br-menu-logo.d.ts +11 -0
  495. package/dist/components/br-menu-logo.js +5 -0
  496. package/dist/components/br-menu-social.d.ts +11 -0
  497. package/dist/components/br-menu-social.js +5 -0
  498. package/dist/components/br-menu.d.ts +11 -0
  499. package/dist/components/br-menu.js +5 -0
  500. package/dist/components/br-message.d.ts +11 -0
  501. package/dist/components/br-message.js +5 -0
  502. package/dist/components/br-modal.d.ts +11 -0
  503. package/dist/components/br-modal.js +5 -0
  504. package/dist/components/br-notification-body.d.ts +11 -0
  505. package/dist/components/br-notification-body.js +5 -0
  506. package/dist/components/br-notification-header.d.ts +11 -0
  507. package/dist/components/br-notification-header.js +5 -0
  508. package/dist/components/br-notification-item.d.ts +11 -0
  509. package/dist/components/br-notification-item.js +5 -0
  510. package/dist/components/br-notification.d.ts +11 -0
  511. package/dist/components/br-notification.js +5 -0
  512. package/dist/components/br-pagination.d.ts +11 -0
  513. package/dist/components/br-pagination.js +5 -0
  514. package/dist/components/br-radio-group.d.ts +11 -0
  515. package/dist/components/br-radio-group.js +5 -0
  516. package/dist/components/br-radio.d.ts +11 -0
  517. package/dist/components/br-radio.js +5 -0
  518. package/dist/components/br-scrim.d.ts +11 -0
  519. package/dist/components/br-scrim.js +5 -0
  520. package/dist/components/br-select-input.d.ts +11 -0
  521. package/dist/components/br-select-input.js +5 -0
  522. package/dist/components/br-select-list.d.ts +11 -0
  523. package/dist/components/br-select-list.js +5 -0
  524. package/dist/components/br-select-option.d.ts +11 -0
  525. package/dist/components/br-select-option.js +5 -0
  526. package/dist/components/br-select.d.ts +11 -0
  527. package/dist/components/br-select.js +5 -0
  528. package/dist/components/br-sign-in.d.ts +11 -0
  529. package/dist/components/br-sign-in.js +5 -0
  530. package/dist/components/br-skip-link-item.d.ts +11 -0
  531. package/dist/components/br-skip-link-item.js +5 -0
  532. package/dist/components/br-skip-link.d.ts +11 -0
  533. package/dist/components/br-skip-link.js +5 -0
  534. package/dist/components/br-skiplink-item.d.ts +11 -0
  535. package/dist/components/br-skiplink-item.js +5 -0
  536. package/dist/components/br-slider.d.ts +11 -0
  537. package/dist/components/br-slider.js +5 -0
  538. package/dist/components/br-step-item.d.ts +11 -0
  539. package/dist/components/br-step-item.js +5 -0
  540. package/dist/components/br-step.d.ts +11 -0
  541. package/dist/components/br-step.js +5 -0
  542. package/dist/components/br-switch.d.ts +11 -0
  543. package/dist/components/br-switch.js +5 -0
  544. package/dist/components/br-tab-item.d.ts +11 -0
  545. package/dist/components/br-tab-item.js +5 -0
  546. package/dist/components/br-tab.d.ts +11 -0
  547. package/dist/components/br-tab.js +5 -0
  548. package/dist/components/br-table-body.d.ts +11 -0
  549. package/dist/components/br-table-body.js +5 -0
  550. package/dist/components/br-table-cell.d.ts +11 -0
  551. package/dist/components/br-table-cell.js +5 -0
  552. package/dist/components/br-table-header-cell.d.ts +11 -0
  553. package/dist/components/br-table-header-cell.js +5 -0
  554. package/dist/components/br-table-header.d.ts +11 -0
  555. package/dist/components/br-table-header.js +5 -0
  556. package/dist/components/br-table-row.d.ts +11 -0
  557. package/dist/components/br-table-row.js +5 -0
  558. package/dist/components/br-table.d.ts +11 -0
  559. package/dist/components/br-table.js +5 -0
  560. package/dist/components/br-tag.d.ts +11 -0
  561. package/dist/components/br-tag.js +5 -0
  562. package/dist/components/br-textarea.d.ts +11 -0
  563. package/dist/components/br-textarea.js +5 -0
  564. package/dist/components/br-time-picker.d.ts +11 -0
  565. package/dist/components/br-time-picker.js +5 -0
  566. package/dist/components/br-tooltip.d.ts +11 -0
  567. package/dist/components/br-tooltip.js +5 -0
  568. package/dist/components/br-upload.d.ts +11 -0
  569. package/dist/components/br-upload.js +5 -0
  570. package/dist/components/br-wizard-panel.d.ts +11 -0
  571. package/dist/components/br-wizard-panel.js +5 -0
  572. package/dist/components/br-wizard.d.ts +11 -0
  573. package/dist/components/br-wizard.js +5 -0
  574. package/dist/components/index.d.ts +213 -0
  575. package/dist/components/index.js +5 -0
  576. package/dist/components/p-0IYmyaTi.js +5 -0
  577. package/dist/components/p-41XwlWiS.js +5 -0
  578. package/dist/components/p-5z6jgH1D.js +5 -0
  579. package/dist/components/p-6OdfnwnK.js +5 -0
  580. package/dist/components/p-9S9bgUT0.js +5 -0
  581. package/dist/components/p-B-qLmYZC.js +5 -0
  582. package/dist/components/p-B-sbd1_h.js +5 -0
  583. package/dist/components/p-B55qsau4.js +5 -0
  584. package/dist/components/p-BC7f6MK8.js +5 -0
  585. package/dist/components/p-BPJpHGOW.js +5 -0
  586. package/dist/components/p-BW0_ORNA.js +5 -0
  587. package/dist/components/p-BWXfdbQH.js +5 -0
  588. package/dist/components/p-Bb-nLtTG.js +5 -0
  589. package/dist/components/p-BkS6ujyf.js +5 -0
  590. package/dist/components/p-Bm0ECvfB.js +5 -0
  591. package/dist/components/p-C1yRmdso.js +5 -0
  592. package/dist/components/p-C3LQSQpc.js +5 -0
  593. package/dist/components/p-C98-mHmV.js +5 -0
  594. package/dist/components/p-CDZFuUlU.js +5 -0
  595. package/dist/components/p-CRfi23Rd.js +5 -0
  596. package/dist/components/p-CUI5zWGf.js +5 -0
  597. package/dist/components/p-CXMwM9m4.js +5 -0
  598. package/dist/components/p-CdDwqbBv.js +5 -0
  599. package/dist/components/p-CxviDiCr.js +5 -0
  600. package/dist/components/p-D3usVJE2.js +16 -0
  601. package/dist/components/p-D6zroLx5.js +5 -0
  602. package/dist/components/p-D9SpD3Ay.js +5 -0
  603. package/dist/components/p-DA5GS53D.js +5 -0
  604. package/dist/components/p-DBP6K_aq.js +5 -0
  605. package/dist/components/p-DBmwzG9E.js +5 -0
  606. package/dist/components/p-DCrVo-8T.js +5 -0
  607. package/dist/components/p-DIK54tTj.js +5 -0
  608. package/dist/components/p-DQRSHR-D.js +5 -0
  609. package/dist/components/p-DRVMm1Py.js +5 -0
  610. package/dist/components/p-DWPmUV72.js +5 -0
  611. package/dist/components/p-DYA74R1r.js +5 -0
  612. package/dist/components/p-DYnkGWii.js +5 -0
  613. package/dist/components/p-D_CSvOY9.js +5 -0
  614. package/dist/components/p-DaeGwqw0.js +5 -0
  615. package/dist/components/p-Dkg2scYZ.js +5 -0
  616. package/dist/components/p-Dmfk7eEe.js +5 -0
  617. package/dist/components/p-DoXNfcTT.js +5 -0
  618. package/dist/components/p-DvrdmqoQ.js +5 -0
  619. package/dist/components/p-DxZJrIyL.js +5 -0
  620. package/dist/components/p-LmeJrLxH.js +5 -0
  621. package/dist/components/p-TFWd_UBV.js +5 -0
  622. package/dist/components/p-aF8bGN3t.js +5 -0
  623. package/dist/components/p-bhULC15U.js +5 -0
  624. package/dist/components/p-cF3ia5e9.js +5 -0
  625. package/dist/components/p-cfPt-vKA.js +5 -0
  626. package/dist/components/p-gvnfuTjd.js +5 -0
  627. package/dist/components/p-nJOJGpyl.js +5 -0
  628. package/dist/components/p-ttI0nvv_.js +5 -0
  629. package/dist/esm/app-globals-DVjNHTTs.js +7 -0
  630. package/dist/esm/br-avatar.entry.js +246 -0
  631. package/dist/esm/br-breadcrumb-item.entry.js +43 -0
  632. package/dist/esm/br-breadcrumb.entry.js +441 -0
  633. package/dist/esm/br-button_2.entry.js +277 -0
  634. package/dist/esm/br-card.entry.js +109 -0
  635. package/dist/esm/br-carousel-page.entry.js +78 -0
  636. package/dist/esm/br-carousel.entry.js +563 -0
  637. package/dist/esm/br-checkbox-group.entry.js +116 -0
  638. package/dist/esm/br-checkbox.entry.js +286 -0
  639. package/dist/esm/br-checkgroup.entry.js +18 -0
  640. package/dist/esm/br-collapse_2.entry.js +680 -0
  641. package/dist/esm/br-cookiebar-cookie.entry.js +81 -0
  642. package/dist/esm/br-cookiebar-group.entry.js +307 -0
  643. package/dist/esm/br-cookiebar-header.entry.js +37 -0
  644. package/dist/esm/br-cookiebar-link.entry.js +52 -0
  645. package/dist/esm/br-cookiebar-note-group.entry.js +68 -0
  646. package/dist/esm/br-cookiebar-note.entry.js +23 -0
  647. package/dist/esm/br-cookiebar.entry.js +756 -0
  648. package/dist/esm/br-crumb.entry.js +49 -0
  649. package/dist/esm/br-date-picker_3.entry.js +2442 -0
  650. package/dist/esm/br-datetime-picker.entry.js +1885 -0
  651. package/dist/esm/br-divider.entry.js +223 -0
  652. package/dist/esm/br-dropdown_2.entry.js +1853 -0
  653. package/dist/esm/br-footer-category.entry.js +100 -0
  654. package/dist/esm/br-footer-item.entry.js +50 -0
  655. package/dist/esm/br-footer-legal.entry.js +39 -0
  656. package/dist/esm/br-footer-logo.entry.js +102 -0
  657. package/dist/esm/br-footer-social.entry.js +69 -0
  658. package/dist/esm/br-footer.entry.js +90 -0
  659. package/dist/esm/br-header-function.entry.js +140 -0
  660. package/dist/esm/br-header-link.entry.js +58 -0
  661. package/dist/esm/br-header-list.entry.js +277 -0
  662. package/dist/esm/br-header-logo.entry.js +175 -0
  663. package/dist/esm/br-header.entry.js +640 -0
  664. package/dist/esm/br-icon.entry.js +483 -0
  665. package/dist/esm/br-input.entry.js +597 -0
  666. package/dist/esm/br-item.entry.js +354 -0
  667. package/dist/esm/br-link.entry.js +130 -0
  668. package/dist/esm/br-loading.entry.js +503 -0
  669. package/dist/esm/br-magic-button.entry.js +90 -0
  670. package/dist/esm/br-menu-group.entry.js +21 -0
  671. package/dist/esm/br-menu-header.entry.js +45 -0
  672. package/dist/esm/br-menu-info.entry.js +36 -0
  673. package/dist/esm/br-menu-item.entry.js +77 -0
  674. package/dist/esm/br-menu-link.entry.js +53 -0
  675. package/dist/esm/br-menu-list.entry.js +147 -0
  676. package/dist/esm/br-menu-logo.entry.js +73 -0
  677. package/dist/esm/br-menu-social.entry.js +63 -0
  678. package/dist/esm/br-menu.entry.js +991 -0
  679. package/dist/esm/br-modal.entry.js +494 -0
  680. package/dist/esm/br-notification-body.entry.js +69 -0
  681. package/dist/esm/br-notification-header.entry.js +46 -0
  682. package/dist/esm/br-notification-item.entry.js +108 -0
  683. package/dist/esm/br-notification.entry.js +332 -0
  684. package/dist/esm/br-pagination.entry.js +882 -0
  685. package/dist/esm/br-radio-group.entry.js +426 -0
  686. package/dist/esm/br-radio.entry.js +355 -0
  687. package/dist/esm/br-scrim.entry.js +1334 -0
  688. package/dist/esm/br-select-input_3.entry.js +950 -0
  689. package/dist/esm/br-sign-in.entry.js +123 -0
  690. package/dist/esm/br-skip-link-item.entry.js +18 -0
  691. package/dist/esm/br-skip-link.entry.js +360 -0
  692. package/dist/esm/br-skiplink-item.entry.js +190 -0
  693. package/dist/esm/br-slider.entry.js +686 -0
  694. package/dist/esm/br-step_2.entry.js +625 -0
  695. package/dist/esm/br-switch.entry.js +243 -0
  696. package/dist/esm/br-tab-item.entry.js +183 -0
  697. package/dist/esm/br-tab.entry.js +395 -0
  698. package/dist/esm/br-table-body.entry.js +35 -0
  699. package/dist/esm/br-table-cell.entry.js +182 -0
  700. package/dist/esm/br-table-header-cell.entry.js +171 -0
  701. package/dist/esm/br-table-header.entry.js +35 -0
  702. package/dist/esm/br-table-row.entry.js +79 -0
  703. package/dist/esm/br-table.entry.js +678 -0
  704. package/dist/esm/br-tag.entry.js +492 -0
  705. package/dist/esm/br-textarea.entry.js +304 -0
  706. package/dist/esm/br-tooltip.entry.js +625 -0
  707. package/dist/esm/br-upload.entry.js +580 -0
  708. package/dist/esm/br-wizard-panel.entry.js +52 -0
  709. package/dist/esm/br-wizard.entry.js +706 -0
  710. package/dist/esm/breakpoint-observer-DBmwzG9E.js +141 -0
  711. package/dist/esm/clamp-gvnfuTjd.js +23 -0
  712. package/dist/esm/cookiebar.utils-DYA74R1r.js +16 -0
  713. package/dist/esm/datetime-picker-constants-Bfm58jO6.js +3798 -0
  714. package/dist/esm/event-DFN_so7I.js +48 -0
  715. package/dist/esm/floating-surface-dismiss-BWXfdbQH.js +61 -0
  716. package/dist/esm/floating-ui-BavFwMnx.js +134 -0
  717. package/dist/esm/floating-ui.dom-DIK54tTj.js +1707 -0
  718. package/dist/esm/focus-DxZJrIyL.js +26 -0
  719. package/dist/esm/getNextElement-9S9bgUT0.js +28 -0
  720. package/dist/esm/iconify-icon-D3usVJE2.js +2303 -0
  721. package/dist/esm/id-BkS6ujyf.js +18 -0
  722. package/dist/esm/index-Bo-2igoO.js +671 -0
  723. package/dist/esm/index-C2RBydfd.js +3258 -0
  724. package/dist/esm/index.js +6 -0
  725. package/dist/esm/isNil-B-qLmYZC.js +17 -0
  726. package/dist/esm/isValid-DIUZX1qS.js +3684 -0
  727. package/dist/esm/loader.js +15 -0
  728. package/dist/esm/native-dialog-B55qsau4.js +46 -0
  729. package/dist/esm/navigation-bhULC15U.js +23 -0
  730. package/dist/esm/parts-Bb5vVlCC.js +17 -0
  731. package/dist/esm/props-DRVMm1Py.js +22 -0
  732. package/dist/esm/raf-batcher-cF3ia5e9.js +53 -0
  733. package/dist/esm/slot-BIG-yees.js +44 -0
  734. package/dist/esm/swipe-Dmfk7eEe.js +343 -0
  735. package/dist/esm/table-constants-CXMwM9m4.js +170 -0
  736. package/dist/esm/validator-D3tVP32U.js +113 -0
  737. package/dist/esm/webcomponents.js +46 -0
  738. package/dist/hydrate/index.d.ts +287 -0
  739. package/dist/hydrate/index.js +67323 -0
  740. package/dist/hydrate/index.mjs +67313 -0
  741. package/dist/hydrate/package.json +12 -0
  742. package/dist/index.cjs.js +1 -0
  743. package/dist/index.js +1 -0
  744. package/dist/loader/cdn.js +5 -0
  745. package/dist/loader/index.cjs.js +5 -0
  746. package/dist/loader/index.d.ts +24 -0
  747. package/dist/loader/index.es2017.js +5 -0
  748. package/dist/loader/index.js +6 -0
  749. package/dist/webcomponents/index.esm.js +5 -0
  750. package/dist/webcomponents/p-0196804a.entry.js +5 -0
  751. package/dist/webcomponents/p-0410186a.entry.js +5 -0
  752. package/dist/webcomponents/p-0415ef22.entry.js +5 -0
  753. package/dist/webcomponents/p-059c3d6c.entry.js +5 -0
  754. package/dist/webcomponents/p-0b8f39bc.entry.js +5 -0
  755. package/dist/webcomponents/p-0caa4d12.entry.js +5 -0
  756. package/dist/webcomponents/p-0d4f718d.entry.js +5 -0
  757. package/dist/webcomponents/p-0e84c9e8.entry.js +5 -0
  758. package/dist/webcomponents/p-12286e73.entry.js +5 -0
  759. package/dist/webcomponents/p-147ac8d3.entry.js +5 -0
  760. package/dist/webcomponents/p-1580beee.entry.js +5 -0
  761. package/dist/webcomponents/p-1b138f1c.entry.js +5 -0
  762. package/dist/webcomponents/p-1bca4499.entry.js +5 -0
  763. package/dist/webcomponents/p-1d6b0b6f.entry.js +5 -0
  764. package/dist/webcomponents/p-1d8cb8fd.entry.js +5 -0
  765. package/dist/webcomponents/p-22443c08.entry.js +5 -0
  766. package/dist/webcomponents/p-224daaac.entry.js +5 -0
  767. package/dist/webcomponents/p-28426d2a.entry.js +5 -0
  768. package/dist/webcomponents/p-2abd2da0.entry.js +5 -0
  769. package/dist/webcomponents/p-2fdc51ae.entry.js +5 -0
  770. package/dist/webcomponents/p-30c428b6.entry.js +5 -0
  771. package/dist/webcomponents/p-36bbea4e.entry.js +5 -0
  772. package/dist/webcomponents/p-3907ebfa.entry.js +5 -0
  773. package/dist/webcomponents/p-39a16f9d.entry.js +5 -0
  774. package/dist/webcomponents/p-3ebbd2f5.entry.js +5 -0
  775. package/dist/webcomponents/p-3ef7eac8.entry.js +5 -0
  776. package/dist/webcomponents/p-45356e9a.entry.js +5 -0
  777. package/dist/webcomponents/p-46513db4.entry.js +5 -0
  778. package/dist/webcomponents/p-4fe12a72.entry.js +5 -0
  779. package/dist/webcomponents/p-52df61cb.entry.js +5 -0
  780. package/dist/webcomponents/p-569134cf.entry.js +5 -0
  781. package/dist/webcomponents/p-5b257a4b.entry.js +5 -0
  782. package/dist/webcomponents/p-5ce7db4a.entry.js +5 -0
  783. package/dist/webcomponents/p-5f373708.entry.js +5 -0
  784. package/dist/webcomponents/p-5f6afb79.entry.js +5 -0
  785. package/dist/webcomponents/p-5fc7ba4c.entry.js +5 -0
  786. package/dist/webcomponents/p-60cc820c.entry.js +5 -0
  787. package/dist/webcomponents/p-66006312.entry.js +5 -0
  788. package/dist/webcomponents/p-66b13fd9.entry.js +5 -0
  789. package/dist/webcomponents/p-6OdfnwnK.js +5 -0
  790. package/dist/webcomponents/p-6c5f6cb6.entry.js +5 -0
  791. package/dist/webcomponents/p-6f1c4425.entry.js +5 -0
  792. package/dist/webcomponents/p-750799b7.entry.js +5 -0
  793. package/dist/webcomponents/p-756ff2ad.entry.js +5 -0
  794. package/dist/webcomponents/p-765bfe27.entry.js +5 -0
  795. package/dist/webcomponents/p-7ab96c11.entry.js +5 -0
  796. package/dist/webcomponents/p-7c2ff8b4.entry.js +5 -0
  797. package/dist/webcomponents/p-7cf9f4e5.entry.js +5 -0
  798. package/dist/webcomponents/p-7e1856e4.entry.js +5 -0
  799. package/dist/webcomponents/p-7f7506f0.entry.js +5 -0
  800. package/dist/webcomponents/p-7fb03a49.entry.js +5 -0
  801. package/dist/webcomponents/p-82200563.entry.js +5 -0
  802. package/dist/webcomponents/p-85f8063b.entry.js +5 -0
  803. package/dist/webcomponents/p-8b558233.entry.js +5 -0
  804. package/dist/webcomponents/p-8e6c2767.entry.js +5 -0
  805. package/dist/webcomponents/p-966ad32f.entry.js +5 -0
  806. package/dist/webcomponents/p-9679d230.entry.js +5 -0
  807. package/dist/webcomponents/p-96dd663b.entry.js +5 -0
  808. package/dist/webcomponents/p-98843fa3.entry.js +5 -0
  809. package/dist/webcomponents/p-9S9bgUT0.js +5 -0
  810. package/dist/webcomponents/p-9a375eff.entry.js +5 -0
  811. package/dist/webcomponents/p-9b358cff.entry.js +5 -0
  812. package/dist/webcomponents/p-9f7558c7.entry.js +5 -0
  813. package/dist/webcomponents/p-B-qLmYZC.js +5 -0
  814. package/dist/webcomponents/p-B55qsau4.js +5 -0
  815. package/dist/webcomponents/p-BIG-yees.js +5 -0
  816. package/dist/webcomponents/p-BWXfdbQH.js +5 -0
  817. package/dist/webcomponents/p-Bb5vVlCC.js +5 -0
  818. package/dist/webcomponents/p-Bfm58jO6.js +5 -0
  819. package/dist/webcomponents/p-BhMVJQ4-.js +5 -0
  820. package/dist/webcomponents/p-BkS6ujyf.js +5 -0
  821. package/dist/webcomponents/p-C2RBydfd.js +6 -0
  822. package/dist/webcomponents/p-CO5cOQQU.js +5 -0
  823. package/dist/webcomponents/p-CXMwM9m4.js +5 -0
  824. package/dist/webcomponents/p-D3tVP32U.js +5 -0
  825. package/dist/webcomponents/p-D3usVJE2.js +16 -0
  826. package/dist/webcomponents/p-DBmwzG9E.js +5 -0
  827. package/dist/webcomponents/p-DFN_so7I.js +5 -0
  828. package/dist/webcomponents/p-DIK54tTj.js +5 -0
  829. package/dist/webcomponents/p-DRVMm1Py.js +5 -0
  830. package/dist/webcomponents/p-DVjNHTTs.js +5 -0
  831. package/dist/webcomponents/p-DYA74R1r.js +5 -0
  832. package/dist/webcomponents/p-Dmfk7eEe.js +5 -0
  833. package/dist/webcomponents/p-DxZJrIyL.js +5 -0
  834. package/dist/webcomponents/p-a382e115.entry.js +5 -0
  835. package/dist/webcomponents/p-a9ff7c25.entry.js +5 -0
  836. package/dist/webcomponents/p-bba9fc09.entry.js +5 -0
  837. package/dist/webcomponents/p-bhULC15U.js +5 -0
  838. package/dist/webcomponents/p-c0b0f531.entry.js +5 -0
  839. package/dist/webcomponents/p-c211af17.entry.js +5 -0
  840. package/dist/webcomponents/p-c492d926.entry.js +5 -0
  841. package/dist/webcomponents/p-c4cfe599.entry.js +5 -0
  842. package/dist/webcomponents/p-c846e784.entry.js +5 -0
  843. package/dist/webcomponents/p-cF3ia5e9.js +5 -0
  844. package/dist/webcomponents/p-cedb8eea.entry.js +5 -0
  845. package/dist/webcomponents/p-d1e899cd.entry.js +5 -0
  846. package/dist/webcomponents/p-d38d82cc.entry.js +5 -0
  847. package/dist/webcomponents/p-dba376cb.entry.js +5 -0
  848. package/dist/webcomponents/p-e0ce536a.entry.js +5 -0
  849. package/dist/webcomponents/p-e1331288.entry.js +5 -0
  850. package/dist/webcomponents/p-e360a463.entry.js +5 -0
  851. package/dist/webcomponents/p-e80a1eb0.entry.js +5 -0
  852. package/dist/webcomponents/p-f078f972.entry.js +5 -0
  853. package/dist/webcomponents/p-f6318e94.entry.js +5 -0
  854. package/dist/webcomponents/p-fcd4ae48.entry.js +5 -0
  855. package/dist/webcomponents/p-gvnfuTjd.js +5 -0
  856. package/dist/webcomponents/webcomponents.esm.js +5 -0
  857. package/package.json +1 -1
  858. package/cem/.gitkeep +0 -0
@@ -0,0 +1,1887 @@
1
+ /*!
2
+ * Construído por SERPRO
3
+ * © https://serpro.gov.br/ - MIT License.
4
+ */
5
+ 'use strict';
6
+
7
+ var index = require('./index-CRdcutym.js');
8
+ var isValid = require('./isValid-Fu3kaWNn.js');
9
+ var event = require('./event-CmVdNHxl.js');
10
+ var validator = require('./validator-CTCajtT9.js');
11
+ var slot = require('./slot-DAllytTj.js');
12
+ var datetimePickerConstants = require('./datetime-picker-constants-B5pWeOn1.js');
13
+
14
+ var isMatch = {};
15
+
16
+ var hasRequiredIsMatch;
17
+
18
+ function requireIsMatch () {
19
+ if (hasRequiredIsMatch) return isMatch;
20
+ hasRequiredIsMatch = 1;
21
+ isMatch.isMatch = isMatch$1;
22
+ var _index = /*@__PURE__*/ datetimePickerConstants.requireIsValid();
23
+ var _index2 = /*@__PURE__*/ isValid.requireParse();
24
+
25
+ /**
26
+ * The {@link isMatch} function options.
27
+ */
28
+
29
+ /**
30
+ * @name isMatch
31
+ * @category Common Helpers
32
+ * @summary validates the date string against given formats
33
+ *
34
+ * @description
35
+ * Return the true if given date is string correct against the given format else
36
+ * will return false.
37
+ *
38
+ * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
39
+ * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
40
+ *
41
+ * The characters in the format string wrapped between two single quotes characters (') are escaped.
42
+ * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
43
+ *
44
+ * Format of the format string is based on Unicode Technical Standard #35:
45
+ * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
46
+ * with a few additions (see note 5 below the table).
47
+ *
48
+ * Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited
49
+ * and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception:
50
+ *
51
+ * ```javascript
52
+ * isMatch('23 AM', 'HH a')
53
+ * //=> RangeError: The format string mustn't contain `HH` and `a` at the same time
54
+ * ```
55
+ *
56
+ * See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true
57
+ *
58
+ * Accepted format string patterns:
59
+ * | Unit |Prior| Pattern | Result examples | Notes |
60
+ * |---------------------------------|-----|---------|-----------------------------------|-------|
61
+ * | Era | 140 | G..GGG | AD, BC | |
62
+ * | | | GGGG | Anno Domini, Before Christ | 2 |
63
+ * | | | GGGGG | A, B | |
64
+ * | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 |
65
+ * | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 |
66
+ * | | | yy | 44, 01, 00, 17 | 4 |
67
+ * | | | yyy | 044, 001, 123, 999 | 4 |
68
+ * | | | yyyy | 0044, 0001, 1900, 2017 | 4 |
69
+ * | | | yyyyy | ... | 2,4 |
70
+ * | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 |
71
+ * | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 |
72
+ * | | | YY | 44, 01, 00, 17 | 4,6 |
73
+ * | | | YYY | 044, 001, 123, 999 | 4 |
74
+ * | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 |
75
+ * | | | YYYYY | ... | 2,4 |
76
+ * | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 |
77
+ * | | | RR | -43, 01, 00, 17 | 4,5 |
78
+ * | | | RRR | -043, 001, 123, 999, -999 | 4,5 |
79
+ * | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 |
80
+ * | | | RRRRR | ... | 2,4,5 |
81
+ * | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 |
82
+ * | | | uu | -43, 01, 99, -99 | 4 |
83
+ * | | | uuu | -043, 001, 123, 999, -999 | 4 |
84
+ * | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 |
85
+ * | | | uuuuu | ... | 2,4 |
86
+ * | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | |
87
+ * | | | Qo | 1st, 2nd, 3rd, 4th | 5 |
88
+ * | | | QQ | 01, 02, 03, 04 | |
89
+ * | | | QQQ | Q1, Q2, Q3, Q4 | |
90
+ * | | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
91
+ * | | | QQQQQ | 1, 2, 3, 4 | 4 |
92
+ * | Quarter (stand-alone) | 120 | q | 1, 2, 3, 4 | |
93
+ * | | | qo | 1st, 2nd, 3rd, 4th | 5 |
94
+ * | | | qq | 01, 02, 03, 04 | |
95
+ * | | | qqq | Q1, Q2, Q3, Q4 | |
96
+ * | | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
97
+ * | | | qqqqq | 1, 2, 3, 4 | 3 |
98
+ * | Month (formatting) | 110 | M | 1, 2, ..., 12 | |
99
+ * | | | Mo | 1st, 2nd, ..., 12th | 5 |
100
+ * | | | MM | 01, 02, ..., 12 | |
101
+ * | | | MMM | Jan, Feb, ..., Dec | |
102
+ * | | | MMMM | January, February, ..., December | 2 |
103
+ * | | | MMMMM | J, F, ..., D | |
104
+ * | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | |
105
+ * | | | Lo | 1st, 2nd, ..., 12th | 5 |
106
+ * | | | LL | 01, 02, ..., 12 | |
107
+ * | | | LLL | Jan, Feb, ..., Dec | |
108
+ * | | | LLLL | January, February, ..., December | 2 |
109
+ * | | | LLLLL | J, F, ..., D | |
110
+ * | Local week of year | 100 | w | 1, 2, ..., 53 | |
111
+ * | | | wo | 1st, 2nd, ..., 53th | 5 |
112
+ * | | | ww | 01, 02, ..., 53 | |
113
+ * | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 |
114
+ * | | | Io | 1st, 2nd, ..., 53th | 5 |
115
+ * | | | II | 01, 02, ..., 53 | 5 |
116
+ * | Day of month | 90 | d | 1, 2, ..., 31 | |
117
+ * | | | do | 1st, 2nd, ..., 31st | 5 |
118
+ * | | | dd | 01, 02, ..., 31 | |
119
+ * | Day of year | 90 | D | 1, 2, ..., 365, 366 | 7 |
120
+ * | | | Do | 1st, 2nd, ..., 365th, 366th | 5 |
121
+ * | | | DD | 01, 02, ..., 365, 366 | 7 |
122
+ * | | | DDD | 001, 002, ..., 365, 366 | |
123
+ * | | | DDDD | ... | 2 |
124
+ * | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Su | |
125
+ * | | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
126
+ * | | | EEEEE | M, T, W, T, F, S, S | |
127
+ * | | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
128
+ * | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 |
129
+ * | | | io | 1st, 2nd, ..., 7th | 5 |
130
+ * | | | ii | 01, 02, ..., 07 | 5 |
131
+ * | | | iii | Mon, Tue, Wed, ..., Su | 5 |
132
+ * | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 |
133
+ * | | | iiiii | M, T, W, T, F, S, S | 5 |
134
+ * | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 |
135
+ * | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | |
136
+ * | | | eo | 2nd, 3rd, ..., 1st | 5 |
137
+ * | | | ee | 02, 03, ..., 01 | |
138
+ * | | | eee | Mon, Tue, Wed, ..., Su | |
139
+ * | | | eeee | Monday, Tuesday, ..., Sunday | 2 |
140
+ * | | | eeeee | M, T, W, T, F, S, S | |
141
+ * | | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
142
+ * | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | |
143
+ * | | | co | 2nd, 3rd, ..., 1st | 5 |
144
+ * | | | cc | 02, 03, ..., 01 | |
145
+ * | | | ccc | Mon, Tue, Wed, ..., Su | |
146
+ * | | | cccc | Monday, Tuesday, ..., Sunday | 2 |
147
+ * | | | ccccc | M, T, W, T, F, S, S | |
148
+ * | | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
149
+ * | AM, PM | 80 | a..aaa | AM, PM | |
150
+ * | | | aaaa | a.m., p.m. | 2 |
151
+ * | | | aaaaa | a, p | |
152
+ * | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | |
153
+ * | | | bbbb | a.m., p.m., noon, midnight | 2 |
154
+ * | | | bbbbb | a, p, n, mi | |
155
+ * | Flexible day period | 80 | B..BBB | at night, in the morning, ... | |
156
+ * | | | BBBB | at night, in the morning, ... | 2 |
157
+ * | | | BBBBB | at night, in the morning, ... | |
158
+ * | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | |
159
+ * | | | ho | 1st, 2nd, ..., 11th, 12th | 5 |
160
+ * | | | hh | 01, 02, ..., 11, 12 | |
161
+ * | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | |
162
+ * | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 |
163
+ * | | | HH | 00, 01, 02, ..., 23 | |
164
+ * | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | |
165
+ * | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 |
166
+ * | | | KK | 01, 02, ..., 11, 00 | |
167
+ * | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | |
168
+ * | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 |
169
+ * | | | kk | 24, 01, 02, ..., 23 | |
170
+ * | Minute | 60 | m | 0, 1, ..., 59 | |
171
+ * | | | mo | 0th, 1st, ..., 59th | 5 |
172
+ * | | | mm | 00, 01, ..., 59 | |
173
+ * | Second | 50 | s | 0, 1, ..., 59 | |
174
+ * | | | so | 0th, 1st, ..., 59th | 5 |
175
+ * | | | ss | 00, 01, ..., 59 | |
176
+ * | Seconds timestamp | 40 | t | 512969520 | |
177
+ * | | | tt | ... | 2 |
178
+ * | Fraction of second | 30 | S | 0, 1, ..., 9 | |
179
+ * | | | SS | 00, 01, ..., 99 | |
180
+ * | | | SSS | 000, 001, ..., 999 | |
181
+ * | | | SSSS | ... | 2 |
182
+ * | Milliseconds timestamp | 20 | T | 512969520900 | |
183
+ * | | | TT | ... | 2 |
184
+ * | Timezone (ISO-8601 w/ Z) | 10 | X | -08, +0530, Z | |
185
+ * | | | XX | -0800, +0530, Z | |
186
+ * | | | XXX | -08:00, +05:30, Z | |
187
+ * | | | XXXX | -0800, +0530, Z, +123456 | 2 |
188
+ * | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
189
+ * | Timezone (ISO-8601 w/o Z) | 10 | x | -08, +0530, +00 | |
190
+ * | | | xx | -0800, +0530, +0000 | |
191
+ * | | | xxx | -08:00, +05:30, +00:00 | 2 |
192
+ * | | | xxxx | -0800, +0530, +0000, +123456 | |
193
+ * | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
194
+ * | Long localized date | NA | P | 05/29/1453 | 5,8 |
195
+ * | | | PP | May 29, 1453 | |
196
+ * | | | PPP | May 29th, 1453 | |
197
+ * | | | PPPP | Sunday, May 29th, 1453 | 2,5,8 |
198
+ * | Long localized time | NA | p | 12:00 AM | 5,8 |
199
+ * | | | pp | 12:00:00 AM | |
200
+ * | Combination of date and time | NA | Pp | 05/29/1453, 12:00 AM | |
201
+ * | | | PPpp | May 29, 1453, 12:00:00 AM | |
202
+ * | | | PPPpp | May 29th, 1453 at ... | |
203
+ * | | | PPPPpp | Sunday, May 29th, 1453 at ... | 2,5,8 |
204
+ * Notes:
205
+ * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
206
+ * are the same as "stand-alone" units, but are different in some languages.
207
+ * "Formatting" units are declined according to the rules of the language
208
+ * in the context of a date. "Stand-alone" units are always nominative singular.
209
+ * In `format` function, they will produce different result:
210
+ *
211
+ * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
212
+ *
213
+ * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
214
+ *
215
+ * `isMatch` will try to match both formatting and stand-alone units interchangeably.
216
+ *
217
+ * 2. Any sequence of the identical letters is a pattern, unless it is escaped by
218
+ * the single quote characters (see below).
219
+ * If the sequence is longer than listed in table:
220
+ * - for numerical units (`yyyyyyyy`) `isMatch` will try to match a number
221
+ * as wide as the sequence
222
+ * - for text units (`MMMMMMMM`) `isMatch` will try to match the widest variation of the unit.
223
+ * These variations are marked with "2" in the last column of the table.
224
+ *
225
+ * 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
226
+ * These tokens represent the shortest form of the quarter.
227
+ *
228
+ * 4. The main difference between `y` and `u` patterns are B.C. years:
229
+ *
230
+ * | Year | `y` | `u` |
231
+ * |------|-----|-----|
232
+ * | AC 1 | 1 | 1 |
233
+ * | BC 1 | 1 | 0 |
234
+ * | BC 2 | 2 | -1 |
235
+ *
236
+ * Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`:
237
+ *
238
+ * `isMatch('50', 'yy') //=> true`
239
+ *
240
+ * `isMatch('75', 'yy') //=> true`
241
+ *
242
+ * while `uu` will use the year as is:
243
+ *
244
+ * `isMatch('50', 'uu') //=> true`
245
+ *
246
+ * `isMatch('75', 'uu') //=> true`
247
+ *
248
+ * The same difference is true for local and ISO week-numbering years (`Y` and `R`),
249
+ * except local week-numbering years are dependent on `options.weekStartsOn`
250
+ * and `options.firstWeekContainsDate` (compare [setISOWeekYear](https://date-fns.org/docs/setISOWeekYear)
251
+ * and [setWeekYear](https://date-fns.org/docs/setWeekYear)).
252
+ *
253
+ * 5. These patterns are not in the Unicode Technical Standard #35:
254
+ * - `i`: ISO day of week
255
+ * - `I`: ISO week of year
256
+ * - `R`: ISO week-numbering year
257
+ * - `o`: ordinal number modifier
258
+ * - `P`: long localized date
259
+ * - `p`: long localized time
260
+ *
261
+ * 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
262
+ * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
263
+ *
264
+ * 7. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
265
+ * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
266
+ *
267
+ * 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based
268
+ * on the given locale.
269
+ *
270
+ * using `en-US` locale: `P` => `MM/dd/yyyy`
271
+ * using `en-US` locale: `p` => `hh:mm a`
272
+ * using `pt-BR` locale: `P` => `dd/MM/yyyy`
273
+ * using `pt-BR` locale: `p` => `HH:mm`
274
+ *
275
+ * Values will be checked in the descending order of its unit's priority.
276
+ * Units of an equal priority overwrite each other in the order of appearance.
277
+ *
278
+ * If no values of higher priority are matched (e.g. when matching string 'January 1st' without a year),
279
+ * the values will be taken from today's using `new Date()` date which works as a context of parsing.
280
+ *
281
+ * The result may vary by locale.
282
+ *
283
+ * If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned.
284
+ *
285
+ * @param dateStr - The date string to verify
286
+ * @param format - The string of tokens
287
+ * @param options - An object with options.
288
+ * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
289
+ * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
290
+ *
291
+ * @returns Is format string a match for date string?
292
+ *
293
+ * @throws `options.locale` must contain `match` property
294
+ * @throws use `yyyy` instead of `YYYY` for formatting years; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
295
+ * @throws use `yy` instead of `YY` for formatting years; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
296
+ * @throws use `d` instead of `D` for formatting days of the month; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
297
+ * @throws use `dd` instead of `DD` for formatting days of the month; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
298
+ * @throws format string contains an unescaped latin alphabet character
299
+ *
300
+ * @example
301
+ * // Match 11 February 2014 from middle-endian format:
302
+ * const result = isMatch('02/11/2014', 'MM/dd/yyyy')
303
+ * //=> true
304
+ *
305
+ * @example
306
+ * // Match 28th of February in Esperanto locale in the context of 2010 year:
307
+ * import eo from 'date-fns/locale/eo'
308
+ * const result = isMatch('28-a de februaro', "do 'de' MMMM", {
309
+ * locale: eo
310
+ * })
311
+ * //=> true
312
+ */
313
+ function isMatch$1(dateStr, formatStr, options) {
314
+ return (0, _index.isValid)(
315
+ (0, _index2.parse)(dateStr, formatStr, new Date(), options),
316
+ );
317
+ }
318
+ return isMatch;
319
+ }
320
+
321
+ var isMatchExports = /*@__PURE__*/ requireIsMatch();
322
+
323
+ var parseISO = {};
324
+
325
+ var hasRequiredParseISO;
326
+
327
+ function requireParseISO () {
328
+ if (hasRequiredParseISO) return parseISO;
329
+ hasRequiredParseISO = 1;
330
+ parseISO.parseISO = parseISO$1;
331
+ var _index = /*@__PURE__*/ datetimePickerConstants.requireConstants();
332
+
333
+ var _index2 = /*@__PURE__*/ datetimePickerConstants.requireConstructFrom();
334
+ var _index3 = /*@__PURE__*/ datetimePickerConstants.requireToDate();
335
+
336
+ /**
337
+ * The {@link parseISO} function options.
338
+ */
339
+
340
+ /**
341
+ * @name parseISO
342
+ * @category Common Helpers
343
+ * @summary Parse ISO string
344
+ *
345
+ * @description
346
+ * Parse the given string in ISO 8601 format and return an instance of Date.
347
+ *
348
+ * Function accepts complete ISO 8601 formats as well as partial implementations.
349
+ * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601
350
+ *
351
+ * If the argument isn't a string, the function cannot parse the string or
352
+ * the values are invalid, it returns Invalid Date.
353
+ *
354
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
355
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
356
+ *
357
+ * @param argument - The value to convert
358
+ * @param options - An object with options
359
+ *
360
+ * @returns The parsed date in the local time zone
361
+ *
362
+ * @example
363
+ * // Convert string '2014-02-11T11:30:30' to date:
364
+ * const result = parseISO('2014-02-11T11:30:30')
365
+ * //=> Tue Feb 11 2014 11:30:30
366
+ *
367
+ * @example
368
+ * // Convert string '+02014101' to date,
369
+ * // if the additional number of digits in the extended year format is 1:
370
+ * const result = parseISO('+02014101', { additionalDigits: 1 })
371
+ * //=> Fri Apr 11 2014 00:00:00
372
+ */
373
+ function parseISO$1(argument, options) {
374
+ const invalidDate = () => (0, _index2.constructFrom)(options?.in, NaN);
375
+
376
+ const additionalDigits = options?.additionalDigits ?? 2;
377
+ const dateStrings = splitDateString(argument);
378
+
379
+ let date;
380
+ if (dateStrings.date) {
381
+ const parseYearResult = parseYear(dateStrings.date, additionalDigits);
382
+ date = parseDate(parseYearResult.restDateString, parseYearResult.year);
383
+ }
384
+
385
+ if (!date || isNaN(+date)) return invalidDate();
386
+
387
+ const timestamp = +date;
388
+ let time = 0;
389
+ let offset;
390
+
391
+ if (dateStrings.time) {
392
+ time = parseTime(dateStrings.time);
393
+ if (isNaN(time)) return invalidDate();
394
+ }
395
+
396
+ if (dateStrings.timezone) {
397
+ offset = parseTimezone(dateStrings.timezone);
398
+ if (isNaN(offset)) return invalidDate();
399
+ } else {
400
+ const tmpDate = new Date(timestamp + time);
401
+ const result = (0, _index3.toDate)(0, options?.in);
402
+ result.setFullYear(
403
+ tmpDate.getUTCFullYear(),
404
+ tmpDate.getUTCMonth(),
405
+ tmpDate.getUTCDate(),
406
+ );
407
+ result.setHours(
408
+ tmpDate.getUTCHours(),
409
+ tmpDate.getUTCMinutes(),
410
+ tmpDate.getUTCSeconds(),
411
+ tmpDate.getUTCMilliseconds(),
412
+ );
413
+ return result;
414
+ }
415
+
416
+ return (0, _index3.toDate)(timestamp + time + offset, options?.in);
417
+ }
418
+
419
+ const patterns = {
420
+ dateTimeDelimiter: /[T ]/,
421
+ timeZoneDelimiter: /[Z ]/i,
422
+ timezone: /([Z+-].*)$/,
423
+ };
424
+
425
+ const dateRegex =
426
+ /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/;
427
+ const timeRegex =
428
+ /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/;
429
+ const timezoneRegex = /^([+-])(\d{2})(?::?(\d{2}))?$/;
430
+
431
+ function splitDateString(dateString) {
432
+ const dateStrings = {};
433
+ const array = dateString.split(patterns.dateTimeDelimiter);
434
+ let timeString;
435
+
436
+ // The regex match should only return at maximum two array elements.
437
+ // [date], [time], or [date, time].
438
+ if (array.length > 2) {
439
+ return dateStrings;
440
+ }
441
+
442
+ if (/:/.test(array[0])) {
443
+ timeString = array[0];
444
+ } else {
445
+ dateStrings.date = array[0];
446
+ timeString = array[1];
447
+ if (patterns.timeZoneDelimiter.test(dateStrings.date)) {
448
+ dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0];
449
+ timeString = dateString.substr(
450
+ dateStrings.date.length,
451
+ dateString.length,
452
+ );
453
+ }
454
+ }
455
+
456
+ if (timeString) {
457
+ const token = patterns.timezone.exec(timeString);
458
+ if (token) {
459
+ dateStrings.time = timeString.replace(token[1], "");
460
+ dateStrings.timezone = token[1];
461
+ } else {
462
+ dateStrings.time = timeString;
463
+ }
464
+ }
465
+
466
+ return dateStrings;
467
+ }
468
+
469
+ function parseYear(dateString, additionalDigits) {
470
+ const regex = new RegExp(
471
+ "^(?:(\\d{4}|[+-]\\d{" +
472
+ (4 + additionalDigits) +
473
+ "})|(\\d{2}|[+-]\\d{" +
474
+ (2 + additionalDigits) +
475
+ "})$)",
476
+ );
477
+
478
+ const captures = dateString.match(regex);
479
+ // Invalid ISO-formatted year
480
+ if (!captures) return { year: NaN, restDateString: "" };
481
+
482
+ const year = captures[1] ? parseInt(captures[1]) : null;
483
+ const century = captures[2] ? parseInt(captures[2]) : null;
484
+
485
+ // either year or century is null, not both
486
+ return {
487
+ year: century === null ? year : century * 100,
488
+ restDateString: dateString.slice((captures[1] || captures[2]).length),
489
+ };
490
+ }
491
+
492
+ function parseDate(dateString, year) {
493
+ // Invalid ISO-formatted year
494
+ if (year === null) return new Date(NaN);
495
+
496
+ const captures = dateString.match(dateRegex);
497
+ // Invalid ISO-formatted string
498
+ if (!captures) return new Date(NaN);
499
+
500
+ const isWeekDate = !!captures[4];
501
+ const dayOfYear = parseDateUnit(captures[1]);
502
+ const month = parseDateUnit(captures[2]) - 1;
503
+ const day = parseDateUnit(captures[3]);
504
+ const week = parseDateUnit(captures[4]);
505
+ const dayOfWeek = parseDateUnit(captures[5]) - 1;
506
+
507
+ if (isWeekDate) {
508
+ if (!validateWeekDate(year, week, dayOfWeek)) {
509
+ return new Date(NaN);
510
+ }
511
+ return dayOfISOWeekYear(year, week, dayOfWeek);
512
+ } else {
513
+ const date = new Date(0);
514
+ if (
515
+ !validateDate(year, month, day) ||
516
+ !validateDayOfYearDate(year, dayOfYear)
517
+ ) {
518
+ return new Date(NaN);
519
+ }
520
+ date.setUTCFullYear(year, month, Math.max(dayOfYear, day));
521
+ return date;
522
+ }
523
+ }
524
+
525
+ function parseDateUnit(value) {
526
+ return value ? parseInt(value) : 1;
527
+ }
528
+
529
+ function parseTime(timeString) {
530
+ const captures = timeString.match(timeRegex);
531
+ if (!captures) return NaN; // Invalid ISO-formatted time
532
+
533
+ const hours = parseTimeUnit(captures[1]);
534
+ const minutes = parseTimeUnit(captures[2]);
535
+ const seconds = parseTimeUnit(captures[3]);
536
+
537
+ if (!validateTime(hours, minutes, seconds)) {
538
+ return NaN;
539
+ }
540
+
541
+ return (
542
+ hours * _index.millisecondsInHour +
543
+ minutes * _index.millisecondsInMinute +
544
+ seconds * 1000
545
+ );
546
+ }
547
+
548
+ function parseTimeUnit(value) {
549
+ return (value && parseFloat(value.replace(",", "."))) || 0;
550
+ }
551
+
552
+ function parseTimezone(timezoneString) {
553
+ if (timezoneString === "Z") return 0;
554
+
555
+ const captures = timezoneString.match(timezoneRegex);
556
+ if (!captures) return 0;
557
+
558
+ const sign = captures[1] === "+" ? -1 : 1;
559
+ const hours = parseInt(captures[2]);
560
+ const minutes = (captures[3] && parseInt(captures[3])) || 0;
561
+
562
+ if (!validateTimezone(hours, minutes)) {
563
+ return NaN;
564
+ }
565
+
566
+ return (
567
+ sign *
568
+ (hours * _index.millisecondsInHour + minutes * _index.millisecondsInMinute)
569
+ );
570
+ }
571
+
572
+ function dayOfISOWeekYear(isoWeekYear, week, day) {
573
+ const date = new Date(0);
574
+ date.setUTCFullYear(isoWeekYear, 0, 4);
575
+ const fourthOfJanuaryDay = date.getUTCDay() || 7;
576
+ const diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay;
577
+ date.setUTCDate(date.getUTCDate() + diff);
578
+ return date;
579
+ }
580
+
581
+ // Validation functions
582
+
583
+ // February is null to handle the leap year (using ||)
584
+ const daysInMonths = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
585
+
586
+ function isLeapYearIndex(year) {
587
+ return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0);
588
+ }
589
+
590
+ function validateDate(year, month, date) {
591
+ return (
592
+ month >= 0 &&
593
+ month <= 11 &&
594
+ date >= 1 &&
595
+ date <= (daysInMonths[month] || (isLeapYearIndex(year) ? 29 : 28))
596
+ );
597
+ }
598
+
599
+ function validateDayOfYearDate(year, dayOfYear) {
600
+ return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex(year) ? 366 : 365);
601
+ }
602
+
603
+ function validateWeekDate(_year, week, day) {
604
+ return week >= 1 && week <= 53 && day >= 0 && day <= 6;
605
+ }
606
+
607
+ function validateTime(hours, minutes, seconds) {
608
+ if (hours === 24) {
609
+ return minutes === 0 && seconds === 0;
610
+ }
611
+
612
+ return (
613
+ seconds >= 0 &&
614
+ seconds < 60 &&
615
+ minutes >= 0 &&
616
+ minutes < 60 &&
617
+ hours >= 0 &&
618
+ hours < 25
619
+ );
620
+ }
621
+
622
+ function validateTimezone(_hours, minutes) {
623
+ return minutes >= 0 && minutes <= 59;
624
+ }
625
+ return parseISO;
626
+ }
627
+
628
+ var parseISOExports = /*@__PURE__*/ requireParseISO();
629
+
630
+ /** Serializa o valor atual para envio em FormData conforme o modo ativo. */
631
+ function serializeDatetimePickerFormValue(value, context) {
632
+ if (isDateRangeMode(context)) {
633
+ return serializeRangeFormValue(context.rangeStart, context.rangeEnd);
634
+ }
635
+ if (value === null) {
636
+ return null;
637
+ }
638
+ switch (context.mode) {
639
+ case datetimePickerConstants.DATETIME_PICKER_MODE.DATE:
640
+ return serializeDate(value);
641
+ case datetimePickerConstants.DATETIME_PICKER_MODE.TIME:
642
+ return datetimePickerConstants.formatExports.format(value, 'HH:mm');
643
+ default:
644
+ // Para submissão em formulários, no modo datetime retornamos a ISO completa
645
+ // incluindo o deslocamento de fuso local em vez de UTC (Z).
646
+ return datetimePickerConstants.formatExports.format(value, "yyyy-MM-dd'T'HH:mm:ssXXX");
647
+ }
648
+ }
649
+ /** Analisa um valor serializado de formulário para Date respeitando o modo atual. */
650
+ function parseDatetimePickerSerializedValue(value, mode, referenceDate) {
651
+ if (isBlankValue(value)) {
652
+ return null;
653
+ }
654
+ switch (mode) {
655
+ case datetimePickerConstants.DATETIME_PICKER_MODE.DATE:
656
+ return parseDate(value);
657
+ case datetimePickerConstants.DATETIME_PICKER_MODE.TIME:
658
+ return parseTimeValue(value, referenceDate);
659
+ default:
660
+ return parseIsoDate(value);
661
+ }
662
+ }
663
+ /** Analisa intervalo serializado no formato YYYY-MM-DD/YYYY-MM-DD. */
664
+ function parseDatetimePickerSerializedRange(value) {
665
+ const [startRaw, endRaw] = value.split('/');
666
+ if (startRaw === undefined || endRaw === undefined) {
667
+ return null;
668
+ }
669
+ const start = parseDate(startRaw);
670
+ const end = parseDate(endRaw);
671
+ if (start === null || end === null) {
672
+ return null;
673
+ }
674
+ return { start, end };
675
+ }
676
+ /** Informa se o componente deve sinalizar valueMissing na validação nativa. */
677
+ function hasDatetimePickerMissingValue(context) {
678
+ const { required, disabled, value } = context;
679
+ if (!required || disabled) {
680
+ return false;
681
+ }
682
+ const isRangeIncomplete = isDateRangeMode(context) && (context.rangeStart === null || context.rangeEnd === null);
683
+ return value === null || isRangeIncomplete;
684
+ }
685
+ function isBlankValue(value) {
686
+ return value.trim() === '';
687
+ }
688
+ function isDateRangeMode(context) {
689
+ return context.selectionMode === 'range' && context.mode === datetimePickerConstants.DATETIME_PICKER_MODE.DATE;
690
+ }
691
+ function serializeRangeFormValue(rangeStart, rangeEnd) {
692
+ if (rangeStart === null || rangeEnd === null) {
693
+ return null;
694
+ }
695
+ return `${serializeDate(rangeStart)}/${serializeDate(rangeEnd)}`;
696
+ }
697
+ function parseTimeValue(value, referenceDate) {
698
+ if (!isMatchExports.isMatch(value, 'HH:mm')) {
699
+ return null;
700
+ }
701
+ const parsedTime = isValid.parseExports.parse(value, 'HH:mm', new Date());
702
+ if (!isValid.isValidExports.isValid(parsedTime)) {
703
+ return null;
704
+ }
705
+ const baseDate = isValid.toDateExports.toDate(referenceDate);
706
+ baseDate.setHours(parsedTime.getHours(), parsedTime.getMinutes(), 0, 0);
707
+ return baseDate;
708
+ }
709
+ function parseIsoDate(value) {
710
+ const parsedDate = parseISOExports.parseISO(value);
711
+ return isValid.isValidExports.isValid(parsedDate) ? parsedDate : null;
712
+ }
713
+ function parseDate(value) {
714
+ if (!isMatchExports.isMatch(value, 'yyyy-MM-dd')) {
715
+ return null;
716
+ }
717
+ const parsedDate = isValid.parseExports.parse(value, 'yyyy-MM-dd', new Date());
718
+ if (!isValid.isValidExports.isValid(parsedDate)) {
719
+ return null;
720
+ }
721
+ // Garante aderência estrita ao formato/calendário evitando rollover silencioso.
722
+ if (datetimePickerConstants.formatExports.format(parsedDate, 'yyyy-MM-dd') !== value) {
723
+ return null;
724
+ }
725
+ parsedDate.setHours(0, 0, 0, 0);
726
+ return parsedDate;
727
+ }
728
+ function serializeDate(value) {
729
+ return datetimePickerConstants.formatExports.format(value, 'yyyy-MM-dd');
730
+ }
731
+
732
+ const VALID_WEEK_START_DAYS = [0, 1, 2, 3, 4, 5, 6];
733
+ const INITIAL_MOMENT_DATE_FORMATS = ['dd/MM/yyyy HH:mm', 'dd/MM/yyyy', 'yyyy-MM-dd HH:mm', 'yyyy-MM-dd'];
734
+ function parseInitialMomentString(value) {
735
+ const trimmedValue = value.trim();
736
+ if (trimmedValue === '') {
737
+ return null;
738
+ }
739
+ const isoDate = parseISOExports.parseISO(trimmedValue);
740
+ if (isValid.isValidExports.isValid(isoDate)) {
741
+ return isoDate;
742
+ }
743
+ for (const formatPattern of INITIAL_MOMENT_DATE_FORMATS) {
744
+ const parsedDate = isValid.parseExports.parse(trimmedValue, formatPattern, new Date());
745
+ if (isValid.isValidExports.isValid(parsedDate)) {
746
+ return parsedDate;
747
+ }
748
+ }
749
+ return null;
750
+ }
751
+ function normalizeDateCandidate(value) {
752
+ if (value instanceof Date) {
753
+ if (!Number.isNaN(value.getTime())) {
754
+ return new Date(value);
755
+ }
756
+ return null;
757
+ }
758
+ if (typeof value === 'string') {
759
+ return parseInitialMomentString(value);
760
+ }
761
+ return null;
762
+ }
763
+ function tokenizeDisabledDatesString(value) {
764
+ return value
765
+ .trim()
766
+ .split(/\s+/)
767
+ .filter((token) => token.length > 0);
768
+ }
769
+ /**
770
+ * Verifica se o valor informado corresponde a um modo suportado pelo componente.
771
+ *
772
+ * @param value - Valor recebido via prop ou atributo.
773
+ * @returns `true` quando o valor pertence ao conjunto aceito de modos.
774
+ */
775
+ function isValidDatetimePickerMode(value) {
776
+ return Object.values(datetimePickerConstants.DATETIME_PICKER_MODE).includes(value);
777
+ }
778
+ /**
779
+ * Normaliza o modo informado e aplica o valor padrão quando necessário.
780
+ *
781
+ * @param value - Valor bruto recebido do consumidor do componente.
782
+ * @returns O modo válido correspondente, ou o valor padrão quando o input for inválido.
783
+ */
784
+ function normalizeDatetimePickerMode(value) {
785
+ if (isValidDatetimePickerMode(value))
786
+ return value;
787
+ isValid.warnInvalidPropValue('br-datetime-picker', 'mode', value, datetimePickerConstants.DATETIME_PICKER_MODE.DEFAULT);
788
+ return datetimePickerConstants.DATETIME_PICKER_MODE.DEFAULT;
789
+ }
790
+ /**
791
+ * Verifica se o valor representa um modo de seleção suportado.
792
+ *
793
+ * @param value - Valor bruto recebido via prop.
794
+ * @returns `true` quando o valor é `'single'` ou `'range'`.
795
+ */
796
+ function isValidDatetimePickerSelectionMode(value) {
797
+ return value === 'single' || value === 'range';
798
+ }
799
+ /**
800
+ * Normaliza o modo de seleção informado e aplica o valor padrão quando necessário.
801
+ *
802
+ * @param value - Valor bruto recebido do consumidor do componente.
803
+ * @returns O modo de seleção válido correspondente, ou `'single'` quando o input for inválido.
804
+ */
805
+ function normalizeDatetimePickerSelectionMode(value) {
806
+ if (isValidDatetimePickerSelectionMode(value))
807
+ return value;
808
+ isValid.warnInvalidPropValue('br-datetime-picker', 'selectionMode', value, 'single');
809
+ return 'single';
810
+ }
811
+ /**
812
+ * Normaliza a seleção inicial para um valor aplicável pelo componente.
813
+ *
814
+ * @param value - Valor bruto recebido via prop.
815
+ * @returns `'now'`, `Date` normalizada ou `null` quando inválido.
816
+ */
817
+ function normalizeDatetimePickerInitialMoment(value) {
818
+ if (value === null)
819
+ return null;
820
+ if (value === 'now')
821
+ return 'now';
822
+ const normalizedDate = normalizeDateCandidate(value);
823
+ if (normalizedDate !== null) {
824
+ return normalizedDate;
825
+ }
826
+ isValid.warnInvalidPropValue('br-datetime-picker', 'initialMoment', value, 'null');
827
+ return null;
828
+ }
829
+ /**
830
+ * Normaliza a lista de datas desabilitadas para uma coleção de `Date` válidas.
831
+ *
832
+ * @param value - Valor bruto recebido via prop.
833
+ * @returns Lista normalizada de datas; retorna array vazio quando inválido.
834
+ */
835
+ function normalizeDatetimePickerDisabledDates(value) {
836
+ if (value === null) {
837
+ return [];
838
+ }
839
+ if (typeof value === 'string') {
840
+ const tokens = tokenizeDisabledDatesString(value);
841
+ if (tokens.length === 0) {
842
+ isValid.warnInvalidPropValue('br-datetime-picker', 'disabledDates', value, '[]');
843
+ return [];
844
+ }
845
+ const normalizedDates = tokens
846
+ .map((dateCandidate) => normalizeDateCandidate(dateCandidate))
847
+ .filter((dateCandidate) => dateCandidate !== null);
848
+ if (normalizedDates.length !== tokens.length) {
849
+ isValid.warnInvalidPropValue('br-datetime-picker', 'disabledDates', value, '[]');
850
+ }
851
+ return normalizedDates;
852
+ }
853
+ if (!Array.isArray(value)) {
854
+ isValid.warnInvalidPropValue('br-datetime-picker', 'disabledDates', value, '[]');
855
+ return [];
856
+ }
857
+ const normalizedDates = value
858
+ .map((dateCandidate) => normalizeDateCandidate(dateCandidate))
859
+ .filter((dateCandidate) => dateCandidate !== null);
860
+ if (normalizedDates.length !== value.length) {
861
+ isValid.warnInvalidPropValue('br-datetime-picker', 'disabledDates', value, '[]');
862
+ }
863
+ return normalizedDates;
864
+ }
865
+ /**
866
+ * Verifica se o valor informado representa um índice válido de início da semana.
867
+ *
868
+ * @param value - Valor bruto recebido via prop.
869
+ * @returns `true` quando o valor está entre `0` e `6`.
870
+ */
871
+ function isValidDatetimePickerWeekStartsOn(value) {
872
+ return VALID_WEEK_START_DAYS.includes(value);
873
+ }
874
+ /**
875
+ * Normaliza o índice de início da semana e aplica `0` quando o valor é inválido.
876
+ *
877
+ * @param value - Valor bruto recebido do consumidor do componente.
878
+ * @returns Índice normalizado para o primeiro dia da semana.
879
+ */
880
+ function normalizeDatetimePickerWeekStartsOn(value) {
881
+ const numericValue = typeof value === 'string' ? Number(value) : value;
882
+ if (typeof numericValue === 'number' &&
883
+ Number.isInteger(numericValue) &&
884
+ isValidDatetimePickerWeekStartsOn(numericValue)) {
885
+ return numericValue;
886
+ }
887
+ isValid.warnInvalidPropValue('br-datetime-picker', 'weekStartsOn', String(value), '0');
888
+ return 0;
889
+ }
890
+
891
+ const datetimePickerCss = () => `*,*::before,*::after{box-sizing:border-box}:host{line-height:var(--font-line-height-medium);-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}main{display:block}hr{box-sizing:content-box;height:0;overflow:visible}a{background-color:rgba(0,0,0,0)}b,strong{font-weight:bolder}code{font-family:monospace;font-size:1em}small{font-size:80%}img{border-style:none}button,input,select,textarea{font-family:inherit;font-size:100%;line-height:var(--font-line-height-medium);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{appearance:none}::-webkit-file-upload-button{appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.d-none{display:none !important}@media (min-width: 576px){.d-sm-block{display:block !important}.d-sm-flex{display:flex !important}}[data-toggle=dropdown]+*{position:absolute}.dropdown{position:relative}.dropdown [data-toggle=dropdown]+*{box-shadow:var(--surface-shadow-sm);left:0;position:absolute;top:100%}.dropdown>.br-notification{left:auto;right:0}.dropdown .br-item{--color:var(--color-light);--color-rgb:var(--color-light-rgb);--text-color:var(--color-light);--interactive:var(--interactive-light);--interactive-rgb:var(--color-rgb);--visited:var(--visited-light);--hover:var(--hover-light);--pressed:var(--pressed-light);--focus-color:var(--focus-color-light);--focus:var(--focus-color-light);--item-padding-y:var(--spacing-scale-2x);background-color:var(--background-light);color:var(--color)}.dropdown .br-item:not(:last-child){border-bottom:1px solid var(--border-color)}.dropdown .br-item.selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}.justify-content-start{justify-content:flex-start !important}.justify-content-end{justify-content:flex-end !important}.justify-content-center{justify-content:center !important}.align-items-center{align-items:center !important}.col,[class*=col-]{padding-left:calc(var(--grid-gutter)*.5);padding-right:calc(var(--grid-gutter)*.5);width:100%}.col{flex:1 0 0%;min-width:8.3333333333%}.col-auto{flex:0 0 auto;width:auto}.col-2{flex-basis:16.6666666667%;max-width:16.6666666667%}.container,.container-fluid,.container-lg{--grid-margin:var(--grid-portrait-margin);--grid-maxwidth:var(--grid-portrait-maxwidth);margin-left:auto;margin-right:auto;max-width:var(--grid-maxwidth);padding-left:var(--grid-margin);padding-right:var(--grid-margin);width:100%}.row{--grid-gutter:var(--grid-portrait-gutter);display:flex;flex-wrap:wrap;margin-left:calc(var(--grid-gutter)*-0.5);margin-right:calc(var(--grid-gutter)*-0.5)}@media (min-width: 576px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-sm) - var(--grid-tablet-margin))}}@media (min-width: 992px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-md) - var(--grid-tablet-margin))}}@media (min-width: 1280px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-desktop-margin)}.row{--grid-gutter:var(--grid-desktop-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-lg) - var(--grid-desktop-margin))}}@media (min-width: 1600px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tv-margin)}.row{--grid-gutter:var(--grid-tv-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-xl) - var(--grid-tv-margin))}}.ease{animation-timing-function:cubic-bezier(0.25, 0.1, 0.25, 1)}.ease-in-out{animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.mt-1{margin-top:var(--spacing-scale-half) !important}.mr-1{margin-right:var(--spacing-scale-half) !important}.mb-1{margin-bottom:var(--spacing-scale-half) !important}.ml-1{margin-left:var(--spacing-scale-half) !important}.mx-3{margin-left:var(--spacing-scale-2x) !important;margin-right:var(--spacing-scale-2x) !important}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.ml-auto{margin-left:auto !important}.pt-half{padding-top:var(--spacing-scale-half) !important}@media (min-width: 576px){.ml-sm-0{margin-left:var(--spacing-scale-default) !important}}.highlight{background:var(--status-highlight-background) linear-gradient(var(--status-highlight-overlay), var(--status-highlight-overlay));color:var(--status-highlight-text);padding:0 var(--spacing-scale-half)}[disabled],.disabled{cursor:not-allowed;opacity:var(--disabled)}[disabled] *,.disabled *{pointer-events:none}.text-center{text-align:center !important}.text-right{text-align:right !important}.text-nowrap{white-space:nowrap !important}.text-uppercase{text-transform:uppercase !important}.text-bold{font-weight:700 !important}.text-base{font-size:var(--font-size-scale-base) !important}.text-down-01{font-size:var(--font-size-scale-down-01) !important}@media (min-width: 576px){.text-sm-center{text-align:center !important}.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}}p{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-2x);margin-top:0}p a{text-decoration:underline}@media (min-width: 576px){p{font-size:var(--font-size-scale-up-01)}}a{--focus-offset:var(--spacing-scale-half)}a:focus{outline:none}a.focus-visible,a:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}a:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}a:not(:disabled):active{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--pressed)), rgba(var(--interactive-rgb), var(--pressed)))}a{color:var(--interactive);text-decoration:none}.main-content a{text-decoration:underline}button{cursor:pointer}img{max-width:100%;vertical-align:middle}h2,.h2{color:var(--color);font-size:var(--font-size-scale-up-03);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2xh);margin-top:var(--spacing-scale-3xh);padding-bottom:var(--spacing-scale-2xh)}@media (min-width: 576px){.h2,h2{font-size:var(--font-size-scale-up-05);font-weight:var(--font-weight-regular)}}ul,ol{margin-bottom:var(--spacing-scale-2x);margin-top:0;padding:0 0 0 var(--spacing-scale-5x)}table{--table-background:var(--background);--table-color:var(--color);--table-border-color:var(--gray-20);--table-border-style:solid;--table-border-width:1px;--table-hover:var(--color-rgb);--table-padding:var(--spacing-scale-3x);--table-font-weight:var(--font-weight-medium);--table-th-background:var(--background-alternative);--table-th-font-weight:var(--font-weight-semi-bold);--table-row-size:var(--spacing-scale-2x);border-collapse:collapse;width:100%}tr.selected,tr.is-selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}label,.label{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half)}fieldset,.fieldset{border:var(--surface-width-none);margin-bottom:var(--spacing-scale-5x);margin-top:0;padding:0}legend,.legend{color:var(--color);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2x);margin-top:var(--spacing-scale-2x)}::placeholder,.placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}input,textarea,.input{color:var(--color-light);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-half)}.help{font-size:var(--font-size-scale-base)}code,.code{background:var(--gray-5);border-radius:4px;color:var(--gray-80);display:inline-block;font-family:monospace;font-size:var(--font-size-scale-base);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);padding:var(--spacing-scale-half)}*[data-toggle=collapse]:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}*[data-toggle=collapse]:focus{outline:none}*[data-toggle=collapse].focus-visible,*[data-toggle=collapse]:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}:host{display:inline-block;margin-bottom:var(--spacing-scale-base);position:relative;width:var(--br-datetime-picker-width, 304px)}:host([mode=time]){width:var(--br-datetime-picker-time-width, 144px)}:host([mode=date]){width:var(--br-datetime-picker-date-width, 304px)}:host([mode=datetime]){width:var(--br-datetime-picker-datetime-width, 304px)}.br-datetime-picker{width:100%}.br-datetime-picker br-datetime-input,.br-datetime-picker br-card{display:block;width:100%}.br-datetime-picker br-card{font-size:var(--font-size-scale-base)}`;
892
+
893
+ const DatetimePicker = class {
894
+ constructor(hostRef) {
895
+ index.registerInstance(this, hostRef);
896
+ this.dateStateChange = index.createEvent(this, "dateStateChange", 7);
897
+ this.valueChange = index.createEvent(this, "valueChange", 7);
898
+ this.brDatetimePickerValidationChange = index.createEvent(this, "brDatetimePickerValidationChange", 7);
899
+ if (hostRef.$hostElement$["s-ei"]) {
900
+ this.elementInternals = hostRef.$hostElement$["s-ei"];
901
+ }
902
+ else {
903
+ this.elementInternals = hostRef.$hostElement$.attachInternals();
904
+ hostRef.$hostElement$["s-ei"] = this.elementInternals;
905
+ }
906
+ /**
907
+ * Controla se o conteúdo do picker está visível.
908
+ */
909
+ this.isPickerOpen = false;
910
+ this.formDisabled = false;
911
+ this.hasFeedbackSlot = false;
912
+ this.customValidationMessage = '';
913
+ this.validatorMessage = null;
914
+ this.isValidating = false;
915
+ this.feedbackId = `br-datetime-picker-feedback-${datetimePickerId++}`;
916
+ /** Lista normalizada de datas indisponíveis para seleção. */
917
+ this.normalizedDisabledDates = [];
918
+ /** Data final selecionada no modo de intervalo. */
919
+ this.rangeEnd = null;
920
+ /** Data inicial selecionada no modo de intervalo. */
921
+ this.rangeStart = null;
922
+ /**
923
+ * Mantém a data de referência que orienta a navegação visual do calendário.
924
+ */
925
+ this.referenceDate = new Date();
926
+ /**
927
+ * Define o modo de seleção exibido pelo componente: data, horário ou ambos.
928
+ *
929
+ * Valores aceitos: `date`, `time` ou `datetime`.
930
+ * Valores inválidos são corrigidos automaticamente para o valor padrão,
931
+ * mantendo o atributo refletido sempre consistente com o modo exibido.
932
+ *
933
+ * @default 'datetime'
934
+ */
935
+ this.mode = datetimePickerConstants.DATETIME_PICKER_MODE.DEFAULT;
936
+ /**
937
+ * Define o locale usado pelos subcomponentes para formatar datas e rótulos.
938
+ *
939
+ * @default 'pt-BR'
940
+ */
941
+ this.locale = datetimePickerConstants.DATETIME_PICKER_LOCALE.DEFAULT;
942
+ /**
943
+ * Define o placeholder exibido no campo de entrada do datetime picker.
944
+ *
945
+ * @default ''
946
+ */
947
+ this.placeholder = '';
948
+ /** Nome do campo para submissão em formulários nativos. */
949
+ this.name = '';
950
+ /** Indica se o campo deve ter valor antes do envio do formulário. */
951
+ this.required = false;
952
+ /** Menor data/horário aceito, interpretado conforme `mode`. */
953
+ this.min = null;
954
+ /** Maior data/horário aceito, interpretado conforme `mode`. */
955
+ this.max = null;
956
+ /**
957
+ * Define o tipo de seleção de datas para o calendário: única ou intervalo.
958
+ *
959
+ * `range` só funciona em conjunto com `mode="date"`.
960
+ * Se `selectionMode="range"` for informado, o componente ajusta automaticamente
961
+ * `mode` para `date`. Se `mode` mudar para `time` ou `datetime`, o componente
962
+ * normaliza `selectionMode` para `single` quando necessário.
963
+ */
964
+ this.selectionMode = 'single';
965
+ /**
966
+ * Define o dia inicial da semana exibida no calendário.
967
+ *
968
+ * Valores suportados: 0 (domingo) a 6 (sábado).
969
+ *
970
+ * @default 0
971
+ */
972
+ this.weekStartsOn = 0;
973
+ /**
974
+ * Define a seleção inicial do componente.
975
+ *
976
+ * Aceita:
977
+ * - `'now'`: seleciona o momento atual.
978
+ * - `Date` ou `string`: seleciona uma data arbitrária.
979
+ * - `null`: inicia sem seleção.
980
+ *
981
+ * Reativo em runtime: mudanças na prop atualizam estado e subcomponentes.
982
+ *
983
+ * @default null
984
+ */
985
+ this.initialMoment = null;
986
+ /**
987
+ * Valor selecionado pelo usuário. Pode ser controlado externamente e é atualizado
988
+ * pelo evento `valueChange`.
989
+ */
990
+ this.value = null;
991
+ /**
992
+ * Desabilita toda a interação do componente.
993
+ *
994
+ * Quando `true`, impede abrir o picker, alterar valores e navegar entre datas/horários.
995
+ *
996
+ * @default false
997
+ */
998
+ this.disabled = false;
999
+ /**
1000
+ * Define um conjunto de datas indisponíveis para seleção.
1001
+ *
1002
+ * Aceita uma lista de `Date` e/ou strings analisáveis, ou uma string com datas
1003
+ * separadas por espaço em branco. Datas inválidas são ignoradas com warning.
1004
+ * A comparação considera apenas o dia (ano/mês/dia), ignorando hora.
1005
+ *
1006
+ * @default null
1007
+ */
1008
+ this.disabledDates = null;
1009
+ /**
1010
+ * Define se o calendário deve manter um número fixo de linhas (6 semanas = 42 dias)
1011
+ * ou variar conforme o mês.
1012
+ *
1013
+ * Quando `true`, o calendário sempre exibe 6 semanas completas.
1014
+ * Quando `false`, o calendário adapta-se ao mês, exibindo apenas as semanas necessárias.
1015
+ *
1016
+ * @default false
1017
+ */
1018
+ this.fixedRowCount = false;
1019
+ /** Snapshot da seleção inicial usada para restaurar em reset de formulário. */
1020
+ this.initialFormValue = null;
1021
+ this.validationRunId = 0;
1022
+ this.isInitialized = false;
1023
+ this.syncingCanonicalValues = false;
1024
+ /** Mapeia cada modo para a função responsável por renderizar seu conteúdo. */
1025
+ this.modeRendererMap = {
1026
+ [datetimePickerConstants.DATETIME_PICKER_MODE.DATE]: () => this.renderDatePicker(),
1027
+ [datetimePickerConstants.DATETIME_PICKER_MODE.TIME]: () => this.renderTimePicker(),
1028
+ [datetimePickerConstants.DATETIME_PICKER_MODE.DATETIME]: () => this.renderDateTimePicker(),
1029
+ };
1030
+ /**
1031
+ * Sincroniza o estado local com a emissão dos subcomponentes de data e horário.
1032
+ *
1033
+ * @param event - Evento com a data de referência e o valor selecionado.
1034
+ */
1035
+ this.handleDateStateChange = (event) => {
1036
+ // Evita que o evento interno dos subcomponentes vaze para fora do host.
1037
+ event.stopPropagation();
1038
+ if (this.isDisabled()) {
1039
+ return;
1040
+ }
1041
+ const { referenceDate, value, range } = event.detail;
1042
+ const selectedDate = this.resolveSelectedDateFromEvent(range, value);
1043
+ if (selectedDate !== null && this.isDateDisabled(selectedDate)) {
1044
+ return;
1045
+ }
1046
+ this.referenceDate = isValid.toDateExports.toDate(referenceDate);
1047
+ const shouldEmitPublicEvent = this.resolvePublicEventEmissionForRange(range);
1048
+ this.setComponentValue(value === null ? null : isValid.toDateExports.toDate(value), shouldEmitPublicEvent && this.isInitialized);
1049
+ };
1050
+ /**
1051
+ * Alterna visibilidade do picker quando o input solicita.
1052
+ */
1053
+ this.handleTogglePicker = (event) => {
1054
+ if (this.isDisabled()) {
1055
+ return;
1056
+ }
1057
+ event.stopPropagation();
1058
+ const willOpen = !this.isPickerOpen;
1059
+ if (willOpen) {
1060
+ this.referenceDate = this.value === null ? isValid.toDateExports.toDate(new Date()) : isValid.toDateExports.toDate(this.value);
1061
+ }
1062
+ this.isPickerOpen = willOpen;
1063
+ };
1064
+ /**
1065
+ * Fecha o picker quando o clique acontece fora do host.
1066
+ */
1067
+ this.handleOutsideClick = (event) => {
1068
+ const eventPath = event.composedPath();
1069
+ if (eventPath.includes(this.el)) {
1070
+ return;
1071
+ }
1072
+ this.isPickerOpen = false;
1073
+ };
1074
+ this.outsideClickListenerAttached = false;
1075
+ /**
1076
+ * Fecha o picker ao pressionar Escape, devolvendo o foco ao input interno.
1077
+ *
1078
+ * @param event - Evento de teclado disparado em qualquer descendente do componente.
1079
+ */
1080
+ this.handlePickerKeydown = (event) => {
1081
+ if (event.key !== 'Escape' || !this.isPickerOpen)
1082
+ return;
1083
+ event.stopPropagation();
1084
+ this.isPickerOpen = false;
1085
+ this.getNativeInputElement()?.focus();
1086
+ };
1087
+ }
1088
+ formDisabledCallback(disabled) {
1089
+ this.formDisabled = disabled;
1090
+ }
1091
+ /** API nativa de reset de form-associated custom elements. */
1092
+ formResetCallback() {
1093
+ this.customValidationMessage = '';
1094
+ this.validatorMessage = null;
1095
+ this.validationRunId++;
1096
+ this.restoreSelection(this.initialFormValue);
1097
+ }
1098
+ /** API nativa de restauração de estado (histórico/autofill) do formulário. */
1099
+ formStateRestoreCallback(state) {
1100
+ if (typeof state !== 'string') {
1101
+ this.restoreSelection(null);
1102
+ return;
1103
+ }
1104
+ if (this.isRangeRestoreMode()) {
1105
+ this.restoreRangeStateFromSerialized(state);
1106
+ return;
1107
+ }
1108
+ this.restoreSingleStateFromSerialized(state);
1109
+ }
1110
+ /**
1111
+ * Revalida o modo sempre que a prop mudar.
1112
+ *
1113
+ * @param newValue - Valor recebido via atributo/prop.
1114
+ */
1115
+ handleModeChange(newValue) {
1116
+ this.ensureValidMode(newValue);
1117
+ if (this.selectionMode === 'range' && this.mode !== datetimePickerConstants.DATETIME_PICKER_MODE.DATE) {
1118
+ this.selectionMode = 'single';
1119
+ return;
1120
+ }
1121
+ this.updateFormInternals();
1122
+ }
1123
+ /** Revalida o estado do formulário quando required mudar. */
1124
+ handleRequiredChange() {
1125
+ this.updateFormInternals();
1126
+ }
1127
+ handleConstraintChange() {
1128
+ this.updateFormInternals();
1129
+ }
1130
+ /** Exclui o valor do FormData enquanto o componente estiver desabilitado. */
1131
+ handleDisabledChange() {
1132
+ this.updateFormInternals();
1133
+ }
1134
+ /** Reage a mudanças no modo de seleção e limpa intervalo quando necessário. */
1135
+ handleSelectionModeChange(newValue) {
1136
+ this.ensureValidSelectionMode(newValue);
1137
+ if (this.selectionMode === 'range' && this.mode !== datetimePickerConstants.DATETIME_PICKER_MODE.DATE) {
1138
+ this.mode = datetimePickerConstants.DATETIME_PICKER_MODE.DATE;
1139
+ return;
1140
+ }
1141
+ if (this.selectionMode === 'single') {
1142
+ this.clearRangeState();
1143
+ return;
1144
+ }
1145
+ this.updateFormInternals();
1146
+ }
1147
+ /** Revalida o dia inicial da semana sempre que a prop mudar. */
1148
+ handleWeekStartsOnChange(newValue) {
1149
+ this.ensureValidWeekStartsOn(newValue);
1150
+ }
1151
+ /**
1152
+ * Aplica ou limpa a seleção da data atual conforme o novo valor da prop.
1153
+ *
1154
+ * @param newValue - Novo estado da prop.
1155
+ */
1156
+ handleInitialMomentChange(newValue) {
1157
+ this.applyInitialMoment(newValue, this.isInitialized);
1158
+ this.initialFormValue = this.cloneDate(this.value);
1159
+ }
1160
+ /** Sincroniza alterações externas do valor com o estado visual e o formulário nativo. */
1161
+ handleValueChange(newValue) {
1162
+ const normalizedValue = newValue instanceof Date && !Number.isNaN(newValue.getTime()) ? isValid.toDateExports.toDate(newValue) : null;
1163
+ if (newValue !== null && normalizedValue === null) {
1164
+ this.value = null;
1165
+ return;
1166
+ }
1167
+ if (normalizedValue !== null) {
1168
+ this.referenceDate = normalizedValue;
1169
+ }
1170
+ this.syncCanonicalValues();
1171
+ this.updateFormInternals();
1172
+ }
1173
+ /** Converte alterações externas no valor serializado sem mudar o tipo da prop legada `value`. */
1174
+ handleSerializedValueChange(newValue) {
1175
+ if (this.syncingCanonicalValues || newValue === undefined)
1176
+ return;
1177
+ this.restoreSerializedValue(newValue);
1178
+ }
1179
+ /** Mantém `valueAsDate` e a prop legada `value` apontando para o mesmo estado observável. */
1180
+ handleValueAsDateChange(newValue) {
1181
+ if (this.syncingCanonicalValues || newValue === undefined)
1182
+ return;
1183
+ const normalizedValue = newValue instanceof Date && !Number.isNaN(newValue.getTime()) ? isValid.toDateExports.toDate(newValue) : null;
1184
+ if (this.sameDate(this.value, normalizedValue))
1185
+ return;
1186
+ this.value = normalizedValue;
1187
+ }
1188
+ handlePickerOpenChange(isOpen) {
1189
+ if (isOpen) {
1190
+ this.attachOutsideClickListener();
1191
+ }
1192
+ else {
1193
+ this.detachOutsideClickListener();
1194
+ }
1195
+ }
1196
+ /**
1197
+ * Recalcula a lista de datas desabilitadas quando a prop mudar.
1198
+ *
1199
+ * @param newValue - Nova configuração recebida via prop.
1200
+ */
1201
+ handleDisabledDatesChange(newValue) {
1202
+ this.syncDisabledDates(newValue);
1203
+ }
1204
+ handleRangeValueChange(newValue) {
1205
+ if (!newValue || this.selectionMode !== 'range')
1206
+ return;
1207
+ this.rangeStart = this.cloneDate(newValue.start);
1208
+ this.rangeEnd = this.cloneDate(newValue.end);
1209
+ const nextValue = newValue.end ?? newValue.start;
1210
+ this.referenceDate = nextValue ? isValid.toDateExports.toDate(nextValue) : this.referenceDate;
1211
+ this.setComponentValue(nextValue);
1212
+ }
1213
+ /** Registra o listener global somente enquanto o picker está aberto. */
1214
+ connectedCallback() {
1215
+ if (this.isPickerOpen)
1216
+ this.attachOutsideClickListener();
1217
+ }
1218
+ /** Remove o listener global para evitar vazamento de eventos ao desmontar. */
1219
+ disconnectedCallback() {
1220
+ this.detachOutsideClickListener();
1221
+ }
1222
+ /**
1223
+ * Normaliza o modo antes da primeira renderização e aplica a data atual quando solicitado.
1224
+ */
1225
+ componentWillLoad() {
1226
+ this.referenceDate = isValid.resolveSsrLocalDate(this.el, this.referenceDate);
1227
+ this.initializeMode();
1228
+ this.initializeSelectionMode();
1229
+ this.initializeWeekStartsOn();
1230
+ this.initializeDisabledDates();
1231
+ this.initializeDefaultValue();
1232
+ if (this.serializedValue !== undefined) {
1233
+ this.restoreSerializedValue(this.serializedValue);
1234
+ }
1235
+ else if (this.valueAsDate !== undefined) {
1236
+ this.handleValueAsDateChange(this.valueAsDate);
1237
+ }
1238
+ this.initialFormValue = this.cloneDate(this.value);
1239
+ this.syncCanonicalValues();
1240
+ this.updateFormInternals();
1241
+ }
1242
+ componentDidLoad() {
1243
+ this.isInitialized = true;
1244
+ this.hasFeedbackSlot = this.el.querySelector('[slot="feedback"]') !== null;
1245
+ }
1246
+ /**
1247
+ * Define programaticamente as datas desabilitadas por meio de array.
1248
+ *
1249
+ * Útil quando o componente é usado via HTML e o consumidor precisa enviar
1250
+ * uma lista tipada em runtime.
1251
+ *
1252
+ * @param dates - Lista de datas (Date|string) a bloquear.
1253
+ */
1254
+ async setDisabledDates(dates) {
1255
+ this.syncDisabledDates(dates);
1256
+ }
1257
+ /** Define o valor atual de forma imperativa aceitando Date, string serializada ou null. */
1258
+ async setValue(value) {
1259
+ if (this.isDisabled()) {
1260
+ return;
1261
+ }
1262
+ const nextValue = this.parseMethodValue(value, this.mode);
1263
+ if (nextValue !== null && this.isDateDisabled(nextValue)) {
1264
+ this.setComponentValue(null);
1265
+ return;
1266
+ }
1267
+ if (this.selectionMode === 'single') {
1268
+ this.rangeStart = null;
1269
+ this.rangeEnd = null;
1270
+ }
1271
+ this.referenceDate = nextValue === null ? isValid.toDateExports.toDate(new Date()) : isValid.toDateExports.toDate(nextValue);
1272
+ this.setComponentValue(nextValue);
1273
+ }
1274
+ /** Retorna uma cópia do valor selecionado atualmente. */
1275
+ async getValue() {
1276
+ return this.cloneDate(this.value);
1277
+ }
1278
+ /** Limpa valor e intervalo selecionados. */
1279
+ async clear() {
1280
+ this.rangeStart = null;
1281
+ this.rangeEnd = null;
1282
+ this.referenceDate = isValid.toDateExports.toDate(new Date());
1283
+ this.setComponentValue(null);
1284
+ }
1285
+ /** Abre o picker quando o componente estiver habilitado. */
1286
+ async open() {
1287
+ if (this.isDisabled()) {
1288
+ return;
1289
+ }
1290
+ this.referenceDate = this.value === null ? isValid.toDateExports.toDate(new Date()) : isValid.toDateExports.toDate(this.value);
1291
+ this.isPickerOpen = true;
1292
+ }
1293
+ /** Fecha o picker. */
1294
+ async close() {
1295
+ this.isPickerOpen = false;
1296
+ }
1297
+ /** Alterna o estado de abertura do picker. */
1298
+ async toggle() {
1299
+ if (this.isPickerOpen) {
1300
+ await this.close();
1301
+ return;
1302
+ }
1303
+ await this.open();
1304
+ }
1305
+ /** Move o foco para o input nativo interno. */
1306
+ async focusInput() {
1307
+ this.getNativeInputElement()?.focus();
1308
+ }
1309
+ /** Define intervalo de datas de forma imperativa, forçando modo date e selectionMode range. */
1310
+ async setRange(start, end) {
1311
+ if (this.isDisabled()) {
1312
+ return;
1313
+ }
1314
+ this.selectionMode = 'range';
1315
+ this.mode = datetimePickerConstants.DATETIME_PICKER_MODE.DATE;
1316
+ const normalizedStart = this.parseMethodValue(start, datetimePickerConstants.DATETIME_PICKER_MODE.DATE);
1317
+ const normalizedEnd = this.parseMethodValue(end, datetimePickerConstants.DATETIME_PICKER_MODE.DATE);
1318
+ if ((normalizedStart !== null && this.isDateDisabled(normalizedStart)) ||
1319
+ (normalizedEnd !== null && this.isDateDisabled(normalizedEnd))) {
1320
+ this.clearRangeState();
1321
+ return;
1322
+ }
1323
+ this.rangeStart = this.cloneDate(normalizedStart);
1324
+ this.rangeEnd = this.cloneDate(normalizedEnd);
1325
+ const nextValue = normalizedEnd ?? normalizedStart;
1326
+ this.referenceDate = nextValue === null ? isValid.toDateExports.toDate(new Date()) : isValid.toDateExports.toDate(nextValue);
1327
+ this.setComponentValue(nextValue);
1328
+ }
1329
+ /**
1330
+ * Retorna o intervalo de datas selecionado quando em modo `selectionMode="range"`.
1331
+ *
1332
+ * @returns Objeto com datas `start` e `end`, ou `null` se não estiver em modo range.
1333
+ */
1334
+ async getRange() {
1335
+ if (this.selectionMode !== 'range' || this.mode !== datetimePickerConstants.DATETIME_PICKER_MODE.DATE) {
1336
+ return null;
1337
+ }
1338
+ return {
1339
+ start: this.cloneDate(this.rangeStart),
1340
+ end: this.cloneDate(this.rangeEnd),
1341
+ };
1342
+ }
1343
+ /**
1344
+ * Consulta se o picker está atualmente aberto.
1345
+ *
1346
+ * @returns `true` se o picker está visível, `false` caso contrário.
1347
+ */
1348
+ async isOpen() {
1349
+ return this.isPickerOpen;
1350
+ }
1351
+ /** Restaura o estado inicial atualmente registrado para reset. */
1352
+ async resetToInitial() {
1353
+ this.restoreSelection(this.initialFormValue);
1354
+ }
1355
+ /** Permite que consumidores acionem validação nativa do formulário via host. */
1356
+ async checkValidity() {
1357
+ return this.elementInternals.checkValidity();
1358
+ }
1359
+ /** Permite exibir mensagens nativas de validação no host. */
1360
+ async reportValidity() {
1361
+ return this.elementInternals.reportValidity();
1362
+ }
1363
+ /** Define ou limpa uma mensagem de validade customizada. */
1364
+ async setCustomValidity(message) {
1365
+ this.customValidationMessage = message;
1366
+ this.syncFormValidity();
1367
+ }
1368
+ /** Executa o validator do picker e retorna se a seleção atual é válida. */
1369
+ async validate() {
1370
+ const validator$1 = validator.resolveFormValidator(this.validator);
1371
+ if (!validator$1 || this.isDisabled())
1372
+ return this.checkValidity();
1373
+ const runId = ++this.validationRunId;
1374
+ this.isValidating = true;
1375
+ this.validatorMessage = null;
1376
+ this.syncFormValidity();
1377
+ this.brDatetimePickerValidationChange.emit({ validating: true, valid: null, message: null });
1378
+ const value = this.selectionMode === 'range'
1379
+ ? { start: this.cloneDate(this.rangeStart), end: this.cloneDate(this.rangeEnd) }
1380
+ : this.cloneDate(this.value);
1381
+ const message = await validator.runFormValidator(validator$1, value);
1382
+ if (runId !== this.validationRunId)
1383
+ return false;
1384
+ this.validatorMessage = message;
1385
+ this.isValidating = false;
1386
+ this.syncFormValidity();
1387
+ const valid = message === null && (await this.checkValidity());
1388
+ this.brDatetimePickerValidationChange.emit({ validating: false, valid, message });
1389
+ return valid;
1390
+ }
1391
+ /** Retorna um snapshot serializável da Constraint Validation API. */
1392
+ async getValidationState() {
1393
+ return validator.getFormValidationState(this.elementInternals);
1394
+ }
1395
+ /**
1396
+ * Valida o modo de seleção e corrige para padrão se inválido.
1397
+ *
1398
+ * @param value - Modo informado pelo consumidor do componente.
1399
+ */
1400
+ ensureValidSelectionMode(value) {
1401
+ this.selectionMode = normalizeDatetimePickerSelectionMode(value);
1402
+ }
1403
+ /**
1404
+ * Normaliza o modo de seleção logo na inicialização.
1405
+ */
1406
+ initializeSelectionMode() {
1407
+ this.handleSelectionModeChange(this.selectionMode);
1408
+ }
1409
+ /** Normaliza o dia inicial da semana logo na inicialização. */
1410
+ initializeWeekStartsOn() {
1411
+ this.handleWeekStartsOnChange(this.weekStartsOn);
1412
+ }
1413
+ /** Valida o dia inicial da semana e corrige para padrão quando necessário. */
1414
+ ensureValidWeekStartsOn(value) {
1415
+ this.weekStartsOn = normalizeDatetimePickerWeekStartsOn(value);
1416
+ }
1417
+ /**
1418
+ * Limpa o estado do intervalo de datas ao mudar para modo single.
1419
+ */
1420
+ clearRangeState() {
1421
+ this.rangeStart = null;
1422
+ this.rangeEnd = null;
1423
+ this.updateFormInternals();
1424
+ }
1425
+ /** Indica quando o componente está operando em seleção de intervalo por data. */
1426
+ isRangeDateSelectionMode() {
1427
+ return this.selectionMode === 'range' && this.mode === datetimePickerConstants.DATETIME_PICKER_MODE.DATE;
1428
+ }
1429
+ /**
1430
+ * Resolve se o evento público deve ser emitido após um update vindo dos subcomponentes.
1431
+ *
1432
+ * No modo range, o evento externo só é emitido no clique final (quando `end` é definido).
1433
+ */
1434
+ resolvePublicEventEmissionForRange(range) {
1435
+ if (!this.isRangeDateSelectionMode()) {
1436
+ return true;
1437
+ }
1438
+ if (range === undefined) {
1439
+ return false;
1440
+ }
1441
+ const isFinalRangeClick = this.rangeEnd === null && range.end !== null;
1442
+ this.setRangeState(range);
1443
+ return isFinalRangeClick;
1444
+ }
1445
+ /** Resolve a data efetivamente selecionada no evento para validar bloqueio em single/range. */
1446
+ resolveSelectedDateFromEvent(range, value) {
1447
+ if (!this.isRangeDateSelectionMode() || range === undefined) {
1448
+ return value;
1449
+ }
1450
+ return range.end ?? range.start ?? value;
1451
+ }
1452
+ attachOutsideClickListener() {
1453
+ if (this.outsideClickListenerAttached)
1454
+ return;
1455
+ document.addEventListener('click', this.handleOutsideClick);
1456
+ this.outsideClickListenerAttached = true;
1457
+ }
1458
+ detachOutsideClickListener() {
1459
+ if (!this.outsideClickListenerAttached)
1460
+ return;
1461
+ document.removeEventListener('click', this.handleOutsideClick);
1462
+ this.outsideClickListenerAttached = false;
1463
+ }
1464
+ /**
1465
+ * Garante que o componente inicie com um modo suportado.
1466
+ */
1467
+ initializeMode() {
1468
+ this.ensureValidMode(this.mode);
1469
+ }
1470
+ /**
1471
+ * Normaliza a coleção de datas desabilitadas na inicialização.
1472
+ */
1473
+ initializeDisabledDates() {
1474
+ this.syncDisabledDates(this.disabledDates);
1475
+ }
1476
+ /**
1477
+ * Normaliza e aplica as datas desabilitadas, limpando valor atual quando necessário.
1478
+ *
1479
+ * @param value - Valor bruto recebido por prop/atributo ou método público.
1480
+ */
1481
+ syncDisabledDates(value) {
1482
+ this.normalizedDisabledDates = normalizeDatetimePickerDisabledDates(value);
1483
+ if (this.rangeStart !== null && this.isDateDisabled(this.rangeStart)) {
1484
+ this.rangeStart = null;
1485
+ }
1486
+ if (this.rangeEnd !== null && this.isDateDisabled(this.rangeEnd)) {
1487
+ this.rangeEnd = null;
1488
+ }
1489
+ if (this.value !== null && this.isDateDisabled(this.value)) {
1490
+ this.setComponentValue(null);
1491
+ }
1492
+ }
1493
+ /**
1494
+ * Aplica a seleção inicial configurada na prop.
1495
+ */
1496
+ initializeDefaultValue() {
1497
+ if (this.value instanceof Date && !Number.isNaN(this.value.getTime())) {
1498
+ this.referenceDate = isValid.toDateExports.toDate(this.value);
1499
+ return;
1500
+ }
1501
+ this.value = null;
1502
+ this.applyInitialMoment(this.initialMoment, false);
1503
+ }
1504
+ /**
1505
+ * Aplica a seleção inicial recebida, com normalização de valores inválidos.
1506
+ *
1507
+ * @param selection - Configuração de seleção inicial.
1508
+ */
1509
+ applyInitialMoment(selection, shouldEmitEvents = true) {
1510
+ if (this.isDisabled()) {
1511
+ return;
1512
+ }
1513
+ const normalizedSelection = normalizeDatetimePickerInitialMoment(selection);
1514
+ if (normalizedSelection === 'now') {
1515
+ const now = isValid.toDateExports.toDate(new Date());
1516
+ this.referenceDate = now;
1517
+ this.setComponentValue(now, shouldEmitEvents);
1518
+ return;
1519
+ }
1520
+ if (normalizedSelection === null) {
1521
+ this.rangeStart = null;
1522
+ this.rangeEnd = null;
1523
+ this.setComponentValue(null, shouldEmitEvents);
1524
+ return;
1525
+ }
1526
+ const selectedDate = isValid.toDateExports.toDate(normalizedSelection);
1527
+ if (this.isDateDisabled(selectedDate)) {
1528
+ this.setComponentValue(null, shouldEmitEvents);
1529
+ return;
1530
+ }
1531
+ this.referenceDate = selectedDate;
1532
+ this.rangeStart = null;
1533
+ this.rangeEnd = null;
1534
+ this.setComponentValue(selectedDate, shouldEmitEvents);
1535
+ }
1536
+ /** Indica se o estado serializado deve ser interpretado como intervalo. */
1537
+ isRangeRestoreMode() {
1538
+ return this.selectionMode === 'range' && this.mode === datetimePickerConstants.DATETIME_PICKER_MODE.DATE;
1539
+ }
1540
+ /** Restaura estado de intervalo a partir do valor serializado do formulário. */
1541
+ restoreRangeStateFromSerialized(serializedState) {
1542
+ const restoredRange = parseDatetimePickerSerializedRange(serializedState);
1543
+ if (restoredRange === null) {
1544
+ this.restoreSelection(null);
1545
+ return;
1546
+ }
1547
+ const { start, end } = restoredRange;
1548
+ this.rangeStart = start;
1549
+ this.rangeEnd = end;
1550
+ this.restoreSelection(end);
1551
+ }
1552
+ /** Restaura estado de seleção única a partir do valor serializado do formulário. */
1553
+ restoreSingleStateFromSerialized(serializedState) {
1554
+ const restoredValue = parseDatetimePickerSerializedValue(serializedState, this.mode, this.referenceDate);
1555
+ if (restoredValue !== null && this.isDateDisabled(restoredValue)) {
1556
+ this.restoreSelection(null);
1557
+ return;
1558
+ }
1559
+ this.restoreSelection(restoredValue);
1560
+ }
1561
+ /** Resolve Date|null a partir de valores aceitos pelos métodos públicos. */
1562
+ parseMethodValue(value, mode) {
1563
+ if (value === null) {
1564
+ return null;
1565
+ }
1566
+ if (value instanceof Date) {
1567
+ return Number.isNaN(value.getTime()) ? null : isValid.toDateExports.toDate(value);
1568
+ }
1569
+ return parseDatetimePickerSerializedValue(value, mode, this.referenceDate);
1570
+ }
1571
+ /** Aplica a ponte serializada usando os mesmos parsers já usados por restore de formulário. */
1572
+ restoreSerializedValue(serializedValue) {
1573
+ if (this.isRangeRestoreMode()) {
1574
+ this.restoreRangeStateFromSerialized(serializedValue);
1575
+ return;
1576
+ }
1577
+ this.restoreSingleStateFromSerialized(serializedValue);
1578
+ }
1579
+ /** Atualiza os nomes canônicos sem emitir eventos adicionais ou criar ciclos de watchers. */
1580
+ syncCanonicalValues() {
1581
+ const nextSerializedValue = this.getSerializedValue();
1582
+ const nextValueAsDate = this.cloneDate(this.value);
1583
+ if (this.serializedValue === nextSerializedValue && this.sameDate(this.valueAsDate ?? null, nextValueAsDate))
1584
+ return;
1585
+ this.syncingCanonicalValues = true;
1586
+ this.serializedValue = nextSerializedValue;
1587
+ this.valueAsDate = nextValueAsDate;
1588
+ this.syncingCanonicalValues = false;
1589
+ }
1590
+ /** Retorna o mesmo valor que será submetido pelo ElementInternals. */
1591
+ getSerializedValue() {
1592
+ const zero = (date) => (date === null ? null : isValid.setExports.set(date, { seconds: 0, milliseconds: 0 }));
1593
+ return (serializeDatetimePickerFormValue(this.value === null ? null : zero(this.value), {
1594
+ mode: this.mode,
1595
+ selectionMode: this.selectionMode,
1596
+ rangeStart: zero(this.rangeStart),
1597
+ rangeEnd: zero(this.rangeEnd),
1598
+ referenceDate: zero(this.referenceDate) ?? this.referenceDate,
1599
+ }) ?? '');
1600
+ }
1601
+ sameDate(left, right) {
1602
+ return left === right || (left !== null && right !== null && left.getTime() === right.getTime());
1603
+ }
1604
+ /** Busca o input nativo interno para ações imperativas de foco. */
1605
+ getNativeInputElement() {
1606
+ return this.el.shadowRoot
1607
+ ?.querySelector('br-datetime-input')
1608
+ ?.shadowRoot?.querySelector('br-input')
1609
+ ?.shadowRoot?.querySelector('input');
1610
+ }
1611
+ /** Atualiza estado interno, FormData e validação com uma única chamada. */
1612
+ setComponentValue(nextValue, shouldEmitPublicEvent = true) {
1613
+ this.value = this.cloneDate(nextValue);
1614
+ this.syncCanonicalValues();
1615
+ if (shouldEmitPublicEvent && this.isInitialized) {
1616
+ this.emitDateStateChange();
1617
+ void this.validate();
1618
+ }
1619
+ this.updateFormInternals();
1620
+ }
1621
+ /** Propaga o estado atual consolidado para consumidores externos do componente raiz. */
1622
+ emitDateStateChange() {
1623
+ const range = this.selectionMode === 'range' && this.mode === datetimePickerConstants.DATETIME_PICKER_MODE.DATE
1624
+ ? {
1625
+ start: this.cloneDate(this.rangeStart),
1626
+ end: this.cloneDate(this.rangeEnd),
1627
+ }
1628
+ : undefined;
1629
+ const rangeDates = range !== undefined && range.start !== null && range.end !== null
1630
+ ? this.buildRangeDatesState(range.start, range.end)
1631
+ : undefined;
1632
+ this.dateStateChange.emit({
1633
+ referenceDate: this.cloneDate(this.referenceDate),
1634
+ value: this.cloneDate(this.value),
1635
+ range,
1636
+ rangeDates,
1637
+ });
1638
+ if (range)
1639
+ this.rangeValue = range;
1640
+ this.valueChange.emit(this.cloneDate(this.value));
1641
+ event.dispatchNativeFormEvent(this.el, 'input');
1642
+ event.dispatchNativeFormEvent(this.el, 'change');
1643
+ }
1644
+ /** Expande o intervalo completo e marca quais dias estão desabilitados. */
1645
+ buildRangeDatesState(start, end) {
1646
+ const intervalStart = start.getTime() <= end.getTime() ? start : end;
1647
+ const intervalEnd = start.getTime() <= end.getTime() ? end : start;
1648
+ return isValid.eachDayOfIntervalExports.eachDayOfInterval({
1649
+ start: intervalStart,
1650
+ end: intervalEnd,
1651
+ }).map((date) => ({
1652
+ date: isValid.toDateExports.toDate(date),
1653
+ disabled: this.isDateDisabled(date),
1654
+ }));
1655
+ }
1656
+ /** Restaura seleção e data de referência a partir de uma data já validada. */
1657
+ restoreSelection(nextValue) {
1658
+ this.value = this.cloneDate(nextValue);
1659
+ if (this.selectionMode === 'single') {
1660
+ this.rangeStart = null;
1661
+ this.rangeEnd = null;
1662
+ }
1663
+ this.referenceDate = nextValue === null ? isValid.toDateExports.toDate(new Date()) : isValid.toDateExports.toDate(nextValue);
1664
+ this.syncCanonicalValues();
1665
+ this.updateFormInternals();
1666
+ }
1667
+ /** Atualiza o estado local de intervalo a partir do evento do calendário. */
1668
+ setRangeState(nextRange) {
1669
+ this.rangeStart = this.cloneDate(nextRange?.start ?? null);
1670
+ this.rangeEnd = this.cloneDate(nextRange?.end ?? null);
1671
+ }
1672
+ /** Mantém ElementInternals sincronizado com estado e regras do componente. */
1673
+ updateFormInternals() {
1674
+ this.syncFormValue();
1675
+ this.syncFormValidity();
1676
+ }
1677
+ /** Atualiza o valor submetido no FormData do form-associated custom element. */
1678
+ syncFormValue() {
1679
+ try {
1680
+ const zero = (d) => (d === null ? null : isValid.setExports.set(d, { seconds: 0, milliseconds: 0 }));
1681
+ const nextValue = this.isDisabled()
1682
+ ? null
1683
+ : serializeDatetimePickerFormValue(this.value === null ? null : zero(this.value), {
1684
+ mode: this.mode,
1685
+ selectionMode: this.selectionMode,
1686
+ rangeStart: zero(this.rangeStart),
1687
+ rangeEnd: zero(this.rangeEnd),
1688
+ referenceDate: zero(this.referenceDate) ?? this.referenceDate,
1689
+ });
1690
+ this.elementInternals.setFormValue(nextValue);
1691
+ }
1692
+ catch {
1693
+ // Ambientes de teste podem esconder attachInternals parcialmente.
1694
+ }
1695
+ }
1696
+ /** Espelha a regra de required no mecanismo nativo de validade. */
1697
+ // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: consolida flags nativos relacionados sem esconder a precedência das mensagens.
1698
+ syncFormValidity() {
1699
+ try {
1700
+ const missing = hasDatetimePickerMissingValue({
1701
+ required: this.required,
1702
+ disabled: this.isDisabled(),
1703
+ value: this.value,
1704
+ mode: this.mode,
1705
+ selectionMode: this.selectionMode,
1706
+ rangeStart: this.rangeStart,
1707
+ rangeEnd: this.rangeEnd});
1708
+ const min = this.parseConstraintValue(this.min);
1709
+ const max = this.parseConstraintValue(this.max);
1710
+ const values = this.selectionMode === 'range' ? [this.rangeStart, this.rangeEnd] : [this.value];
1711
+ const rangeUnderflow = min !== null && values.some((value) => value !== null && value.getTime() < min.getTime());
1712
+ const rangeOverflow = max !== null && values.some((value) => value !== null && value.getTime() > max.getTime());
1713
+ const invalidRange = this.selectionMode === 'range' &&
1714
+ this.rangeStart !== null &&
1715
+ this.rangeEnd !== null &&
1716
+ this.rangeStart.getTime() > this.rangeEnd.getTime();
1717
+ const flags = {
1718
+ customError: this.customValidationMessage !== '' || Boolean(this.validatorMessage) || invalidRange,
1719
+ rangeOverflow,
1720
+ rangeUnderflow,
1721
+ valueMissing: missing,
1722
+ };
1723
+ const message = this.customValidationMessage ||
1724
+ this.validatorMessage ||
1725
+ (missing
1726
+ ? 'Preencha este campo.'
1727
+ : invalidRange
1728
+ ? 'A data inicial deve anteceder a data final.'
1729
+ : rangeUnderflow
1730
+ ? 'Selecione uma data igual ou posterior ao mínimo.'
1731
+ : rangeOverflow
1732
+ ? 'Selecione uma data igual ou anterior ao máximo.'
1733
+ : '');
1734
+ validator.setFormValidity(this.elementInternals, flags, message, this.getNativeInputElement());
1735
+ }
1736
+ catch {
1737
+ // Ambientes sem ElementInternals completo não devem falhar.
1738
+ }
1739
+ }
1740
+ parseConstraintValue(value) {
1741
+ return value === null ? null : this.parseMethodValue(value, this.mode);
1742
+ }
1743
+ isDisabled() {
1744
+ return validator.isFormControlDisabled(this.disabled, this.formDisabled);
1745
+ }
1746
+ /** Duplica datas para evitar compartilhamento de referência mutável. */
1747
+ cloneDate(value) {
1748
+ return value === null ? null : isValid.toDateExports.toDate(value);
1749
+ }
1750
+ /**
1751
+ * Verifica se a data pertence ao conjunto de dias bloqueados.
1752
+ *
1753
+ * @param date - Data candidata à seleção.
1754
+ * @returns `true` quando o dia estiver desabilitado.
1755
+ */
1756
+ isDateDisabled(date) {
1757
+ return this.normalizedDisabledDates.some((disabledDate) => isValid.isSameDayExports.isSameDay(disabledDate, date));
1758
+ }
1759
+ /**
1760
+ * Corrige valores inválidos para o modo padrão, preservando a consistência do estado refletido.
1761
+ *
1762
+ * @param value - Modo informado pelo consumidor do componente.
1763
+ */
1764
+ ensureValidMode(value) {
1765
+ const normalizedMode = normalizeDatetimePickerMode(value);
1766
+ if (normalizedMode !== value) {
1767
+ this.mode = normalizedMode;
1768
+ }
1769
+ }
1770
+ /**
1771
+ * Resolve a função de renderização associada ao modo atual.
1772
+ *
1773
+ * @returns Função que renderiza o conteúdo interno do picker.
1774
+ */
1775
+ getModeRenderer() {
1776
+ return this.modeRendererMap[this.mode];
1777
+ }
1778
+ /** Retorna o conjunto de classes base aplicadas ao container do componente. */
1779
+ getCssClassMap() {
1780
+ return {
1781
+ 'br-datetime-picker': true,
1782
+ };
1783
+ }
1784
+ /**
1785
+ * Agrupa os bindings compartilhados para evitar divergência entre data e horário.
1786
+ */
1787
+ getSharedDateStateBindings() {
1788
+ return {
1789
+ referenceDate: this.referenceDate,
1790
+ value: this.value,
1791
+ selectionMode: this.selectionMode,
1792
+ rangeStart: this.rangeStart,
1793
+ rangeEnd: this.rangeEnd,
1794
+ onDateStateChange: this.handleDateStateChange,
1795
+ };
1796
+ }
1797
+ /** Renderiza o campo de entrada responsável por abrir e sincronizar o picker. */
1798
+ renderInputField() {
1799
+ return (index.h("br-datetime-input", { referenceDate: this.referenceDate, value: this.value, selectionMode: this.selectionMode, rangeStart: this.rangeStart, rangeEnd: this.rangeEnd, placeholder: this.placeholder, mode: this.mode, disabled: this.isDisabled(), onDateStateChange: this.handleDateStateChange, onTogglePicker: this.handleTogglePicker, exportparts: "container: input-container, input: input-field, icon: input-icon" }));
1800
+ }
1801
+ /** Renderiza apenas o seletor de data. */
1802
+ renderDatePicker() {
1803
+ const effectiveSelectionMode = this.mode === datetimePickerConstants.DATETIME_PICKER_MODE.DATE ? this.selectionMode : 'single';
1804
+ return (index.h("br-date-picker", { ...this.getSharedDateStateBindings(), selectionMode: effectiveSelectionMode, weekStartsOn: this.weekStartsOn, locale: this.locale, disabled: this.isDisabled(), disabledDates: this.normalizedDisabledDates, fixedRowCount: this.fixedRowCount }));
1805
+ }
1806
+ /** Renderiza apenas o seletor de hora. */
1807
+ renderTimePicker() {
1808
+ return index.h("br-time-picker", { ...this.getSharedDateStateBindings(), disabled: this.isDisabled() });
1809
+ }
1810
+ /**
1811
+ * Renderiza a combinação de data e horário no modo `datetime`.
1812
+ */
1813
+ renderDateTimePicker() {
1814
+ return (index.h(index.Fragment, null, this.renderDatePicker(), this.renderDivider(), this.renderTimePicker()));
1815
+ }
1816
+ /** Renderiza o separador visual entre data e hora no modo combinado. */
1817
+ renderDivider() {
1818
+ return index.h("br-divider", { thickness: "medium", color: "#e6e6e6", "margin-top": "10px", "margin-bottom": "10px" });
1819
+ }
1820
+ /**
1821
+ * Resolve o conteúdo interno conforme o modo atual do componente.
1822
+ */
1823
+ renderPickerContent() {
1824
+ if (!this.isPickerOpen) {
1825
+ return null;
1826
+ }
1827
+ const renderContent = this.getModeRenderer();
1828
+ return index.h("br-card", { part: "panel" }, renderContent());
1829
+ }
1830
+ /**
1831
+ * Renderização principal do componente.
1832
+ */
1833
+ render() {
1834
+ return (index.h(index.Host, { key: '3b5767a6ee82dfd10d095c4c3c4855d75f22bbd4', onKeyDown: this.handlePickerKeydown, "aria-busy": this.isValidating ? 'true' : null, "aria-describedby": this.hasFeedbackSlot || this.customValidationMessage || this.validatorMessage ? this.feedbackId : null, "aria-errormessage": this.customValidationMessage || this.validatorMessage || this.hasFeedbackSlot ? this.feedbackId : null }, index.h("div", { key: '7b7c74d3cea1c568d53c5be9d8a687d95472e568', class: this.getCssClassMap(), part: "container" }, this.renderInputField(), this.renderPickerContent()), index.h("div", { key: '442f9d5e82c126ee9c1527eb26d3bfca7141caf2', id: this.feedbackId, part: "feedback", hidden: !this.hasFeedbackSlot && !this.customValidationMessage && !this.validatorMessage }, index.h("slot", { key: '830105a39d1e42db3f13d091f88fd7313330dee7', name: "feedback", onSlotchange: (event) => (this.hasFeedbackSlot = slot.hasAssignedSlotContent(event.currentTarget)) }), !this.hasFeedbackSlot && (this.customValidationMessage || this.validatorMessage) ? (index.h("br-message", { state: "danger", message: this.customValidationMessage || this.validatorMessage })) : null)));
1835
+ }
1836
+ static get delegatesFocus() { return true; }
1837
+ static get formAssociated() { return true; }
1838
+ get el() { return index.getElement(this); }
1839
+ static get watchers() { return {
1840
+ "mode": [{
1841
+ "handleModeChange": 0
1842
+ }],
1843
+ "required": [{
1844
+ "handleRequiredChange": 0
1845
+ }],
1846
+ "min": [{
1847
+ "handleConstraintChange": 0
1848
+ }],
1849
+ "max": [{
1850
+ "handleConstraintChange": 0
1851
+ }],
1852
+ "disabled": [{
1853
+ "handleDisabledChange": 0
1854
+ }],
1855
+ "selectionMode": [{
1856
+ "handleSelectionModeChange": 0
1857
+ }],
1858
+ "weekStartsOn": [{
1859
+ "handleWeekStartsOnChange": 0
1860
+ }],
1861
+ "initialMoment": [{
1862
+ "handleInitialMomentChange": 0
1863
+ }],
1864
+ "value": [{
1865
+ "handleValueChange": 0
1866
+ }],
1867
+ "serializedValue": [{
1868
+ "handleSerializedValueChange": 0
1869
+ }],
1870
+ "valueAsDate": [{
1871
+ "handleValueAsDateChange": 0
1872
+ }],
1873
+ "isPickerOpen": [{
1874
+ "handlePickerOpenChange": 0
1875
+ }],
1876
+ "disabledDates": [{
1877
+ "handleDisabledDatesChange": 0
1878
+ }],
1879
+ "rangeValue": [{
1880
+ "handleRangeValueChange": 0
1881
+ }]
1882
+ }; }
1883
+ };
1884
+ let datetimePickerId = 0;
1885
+ DatetimePicker.style = datetimePickerCss();
1886
+
1887
+ exports.br_datetime_picker = DatetimePicker;