bromcom-ui 2.12.3-rc.0 → 2.12.3-rc.2-test.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 (195) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/{p-4786edf8.entry.js → p-053dc717.entry.js} +1 -1
  3. package/dist/bromcom-ui/{p-78a62251.entry.js → p-06a548ce.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-8828bbde.js → p-170cf07d.js} +2 -2
  5. package/dist/bromcom-ui/{p-3a98282f.entry.js → p-1b645ef9.entry.js} +1 -1
  6. package/dist/bromcom-ui/{p-ea9ddaed.entry.js → p-1c801d0c.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-92ada041.entry.js → p-1c9314bd.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-74dbd9f5.entry.js → p-1fcdb8ee.entry.js} +1 -1
  9. package/dist/bromcom-ui/{p-f0ffa605.entry.js → p-20a3d051.entry.js} +2 -2
  10. package/dist/bromcom-ui/{p-3a5afdde.entry.js → p-228c74e9.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-ca806d4e.entry.js → p-2747bf2a.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-b17acffb.entry.js → p-2aaeb247.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-0bda558d.js → p-2d0ff35e.js} +1 -1
  14. package/dist/bromcom-ui/{p-413e4bb5.js → p-37cd0612.js} +1 -1
  15. package/dist/bromcom-ui/{p-c168b4ec.js → p-3ba6c610.js} +1 -1
  16. package/dist/bromcom-ui/{p-e989d53d.entry.js → p-4233e5f7.entry.js} +1 -1
  17. package/dist/bromcom-ui/{p-c62bb5c8.entry.js → p-43c4d268.entry.js} +1 -1
  18. package/dist/bromcom-ui/{p-53c8aabd.js → p-43c578cf.js} +1 -1
  19. package/dist/bromcom-ui/{p-8d658561.entry.js → p-510d5aa8.entry.js} +1 -1
  20. package/dist/bromcom-ui/{p-4e60da7b.entry.js → p-594a57c3.entry.js} +1 -1
  21. package/dist/bromcom-ui/{p-84ac7b5c.entry.js → p-5dbe699b.entry.js} +1 -1
  22. package/dist/bromcom-ui/{p-5244fb1e.entry.js → p-5dea2654.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-e5a7cb21.entry.js → p-626b805d.entry.js} +1 -1
  24. package/dist/bromcom-ui/{p-3a20c2da.entry.js → p-67343ad8.entry.js} +1 -1
  25. package/dist/bromcom-ui/{p-0e7c65a4.entry.js → p-69260d36.entry.js} +1 -1
  26. package/dist/bromcom-ui/{p-28beec31.js → p-74e6d2b6.js} +1 -1
  27. package/dist/bromcom-ui/{p-23de0f81.entry.js → p-7c5763cc.entry.js} +1 -1
  28. package/dist/bromcom-ui/{p-3ce81521.entry.js → p-7d18ce0e.entry.js} +1 -1
  29. package/dist/bromcom-ui/{p-d7bf2666.entry.js → p-7d2993dc.entry.js} +1 -1
  30. package/dist/bromcom-ui/p-8255b154.entry.js +5 -0
  31. package/dist/bromcom-ui/{p-ddc0734e.entry.js → p-87558819.entry.js} +1 -1
  32. package/dist/bromcom-ui/{p-2f241754.entry.js → p-8c5ed9b1.entry.js} +1 -1
  33. package/dist/bromcom-ui/{p-ce3a95cf.js → p-8e683b32.js} +1 -1
  34. package/dist/bromcom-ui/{p-55aeb18f.js → p-9850cbce.js} +1 -1
  35. package/dist/bromcom-ui/{p-fc15e3a1.entry.js → p-9b0ba7ad.entry.js} +1 -1
  36. package/dist/bromcom-ui/{p-5b96cd07.js → p-9ba753bf.js} +1 -1
  37. package/dist/bromcom-ui/{p-acc118dd.entry.js → p-9df8995e.entry.js} +1 -1
  38. package/dist/bromcom-ui/p-a1e2fa92.entry.js +5 -0
  39. package/dist/bromcom-ui/{p-b0842aa0.entry.js → p-a400b4c4.entry.js} +1 -1
  40. package/dist/bromcom-ui/p-a50a79c9.entry.js +5 -0
  41. package/dist/bromcom-ui/{p-6b5d687e.entry.js → p-aabb32f3.entry.js} +1 -1
  42. package/dist/bromcom-ui/{p-e8d69fae.entry.js → p-ae57f046.entry.js} +1 -1
  43. package/dist/bromcom-ui/p-b93361f4.js +5 -0
  44. package/dist/bromcom-ui/{p-77b01aeb.entry.js → p-ba9eff2a.entry.js} +1 -1
  45. package/dist/bromcom-ui/{p-e323f35d.entry.js → p-bdc78a44.entry.js} +1 -1
  46. package/dist/bromcom-ui/{p-4b94e74a.entry.js → p-bddc9310.entry.js} +1 -1
  47. package/dist/bromcom-ui/p-bddce313.js +5 -0
  48. package/dist/bromcom-ui/{p-a2aaaa6d.entry.js → p-c812208d.entry.js} +1 -1
  49. package/dist/bromcom-ui/{p-190f60ff.js → p-cbbc036b.js} +1 -1
  50. package/dist/bromcom-ui/{p-9195ef01.entry.js → p-cd1b099c.entry.js} +1 -1
  51. package/dist/bromcom-ui/{p-4eff4c1f.entry.js → p-d551a51d.entry.js} +1 -1
  52. package/dist/bromcom-ui/{p-35f2e15a.js → p-d65bc842.js} +1 -1
  53. package/dist/bromcom-ui/{p-d49e9044.entry.js → p-daeda8d3.entry.js} +1 -1
  54. package/dist/bromcom-ui/{p-7d2009fb.entry.js → p-e0223a0f.entry.js} +1 -1
  55. package/dist/bromcom-ui/{p-9b77878c.entry.js → p-e2cdea59.entry.js} +1 -1
  56. package/dist/bromcom-ui/{p-a5c650c3.entry.js → p-e94abd6c.entry.js} +1 -1
  57. package/dist/bromcom-ui/{p-dddd0430.entry.js → p-ece578ef.entry.js} +1 -1
  58. package/dist/bromcom-ui/{p-513f0687.entry.js → p-eedcbbc4.entry.js} +1 -1
  59. package/dist/bromcom-ui/{p-adb1df77.entry.js → p-f0e30624.entry.js} +1 -1
  60. package/dist/bromcom-ui/{p-16eba042.entry.js → p-f151ffce.entry.js} +1 -1
  61. package/dist/cjs/bcm-accordion_63.cjs.entry.js +44 -32
  62. package/dist/cjs/bcm-alert.cjs.entry.js +5 -5
  63. package/dist/cjs/bcm-attendance-actions-comment.cjs.entry.js +6 -6
  64. package/dist/cjs/bcm-attendance-actions-dropdown.cjs.entry.js +6 -6
  65. package/dist/cjs/bcm-autocomplete.cjs.entry.js +1 -1
  66. package/dist/cjs/bcm-box.cjs.entry.js +1 -1
  67. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +3 -3
  68. package/dist/cjs/bcm-caption.cjs.entry.js +7 -7
  69. package/dist/cjs/bcm-card.cjs.entry.js +5 -5
  70. package/dist/cjs/bcm-chip-group.cjs.entry.js +11 -11
  71. package/dist/cjs/bcm-colorpicker.cjs.entry.js +1 -1
  72. package/dist/cjs/bcm-content.cjs.entry.js +1 -1
  73. package/dist/cjs/bcm-date-picker.cjs.entry.js +4 -4
  74. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +7 -7
  75. package/dist/cjs/bcm-default.cjs.entry.js +3 -3
  76. package/dist/cjs/bcm-error-layout.cjs.entry.js +1 -1
  77. package/dist/cjs/bcm-form-2.cjs.entry.js +5 -5
  78. package/dist/cjs/bcm-form-group.cjs.entry.js +1 -1
  79. package/dist/cjs/bcm-input-2.cjs.entry.js +5 -5
  80. package/dist/cjs/bcm-input-custom.cjs.entry.js +3 -3
  81. package/dist/cjs/bcm-input-dropdown.cjs.entry.js +7 -7
  82. package/dist/cjs/bcm-message.cjs.entry.js +1 -1
  83. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +6 -6
  84. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +6 -6
  85. package/dist/cjs/bcm-modal-2.cjs.entry.js +6 -6
  86. package/dist/cjs/bcm-notification.cjs.entry.js +1 -1
  87. package/dist/cjs/bcm-number-input.cjs.entry.js +7 -7
  88. package/dist/cjs/bcm-overlay_2.cjs.entry.js +1 -1
  89. package/dist/cjs/bcm-popover.cjs.entry.js +6 -6
  90. package/dist/cjs/bcm-range.cjs.entry.js +3 -3
  91. package/dist/cjs/bcm-react-number.cjs.entry.js +1 -1
  92. package/dist/cjs/bcm-result.cjs.entry.js +1 -1
  93. package/dist/cjs/bcm-select-group.cjs.entry.js +1 -1
  94. package/dist/cjs/bcm-select-option.cjs.entry.js +1 -1
  95. package/dist/cjs/bcm-skeleton.cjs.entry.js +6 -6
  96. package/dist/cjs/bcm-tab-pane.cjs.entry.js +1 -1
  97. package/dist/cjs/bcm-table.cjs.entry.js +6 -6
  98. package/dist/cjs/bcm-tabs-content.cjs.entry.js +1 -1
  99. package/dist/cjs/bcm-tag.cjs.entry.js +4 -4
  100. package/dist/cjs/bcm-time-picker.cjs.entry.js +4 -4
  101. package/dist/cjs/bcm-timeline-item.cjs.entry.js +1 -1
  102. package/dist/cjs/bcm-timeline.cjs.entry.js +1 -1
  103. package/dist/cjs/bcm-toast.cjs.entry.js +4 -4
  104. package/dist/cjs/bcm-treeview-group.cjs.entry.js +1 -1
  105. package/dist/cjs/bromcom-ui.cjs.js +3 -3
  106. package/dist/cjs/{caption-template-9f135978.js → caption-template-85a18b6d.js} +1 -1
  107. package/dist/cjs/{generate-07ef0a10.js → generate-69d5c345.js} +1 -1
  108. package/dist/cjs/{global-7bcdc5b1.js → global-7e2d5892.js} +2 -2
  109. package/dist/cjs/{index-bb6ac306.js → index-c591ecec.js} +0 -3
  110. package/dist/cjs/{index-7db051e3.js → index-d321de96.js} +1 -1
  111. package/dist/cjs/{is-load-decorator-60805e8b.js → is-load-decorator-15036f37.js} +1 -1
  112. package/dist/cjs/{label-template-8ba82507.js → label-template-e83447b5.js} +1 -1
  113. package/dist/cjs/loader.cjs.js +3 -3
  114. package/dist/cjs/{number-helper-8b8695ec.js → number-helper-a60b43f9.js} +1 -1
  115. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +6 -6
  116. package/dist/cjs/old-bcm-popover.cjs.entry.js +3 -3
  117. package/dist/cjs/{package-5542841a.js → package-6a1205fc.js} +1 -1
  118. package/dist/cjs/{popover-placement-d1aa81f0.js → popover-placement-02e6101b.js} +1 -1
  119. package/dist/cjs/{slot-template-0e8feeb4.js → slot-template-df7b5b59.js} +2 -2
  120. package/dist/cjs/{string-helper-1ee6dc21.js → string-helper-9cdfb273.js} +2 -4
  121. package/dist/cjs/{validators-b4487059.js → validators-cd8eedf1.js} +1 -1
  122. package/dist/collection/components/molecules/menu/menu.js +14 -0
  123. package/dist/collection/helper/string-helper.js +2 -4
  124. package/dist/collection/templates/list-item-template.js +2 -3
  125. package/dist/components/generate.js +1 -1
  126. package/dist/components/list.js +2 -3
  127. package/dist/components/menu.js +14 -0
  128. package/dist/components/string-helper.js +2 -4
  129. package/dist/esm/bcm-accordion_63.entry.js +44 -32
  130. package/dist/esm/bcm-alert.entry.js +5 -5
  131. package/dist/esm/bcm-attendance-actions-comment.entry.js +6 -6
  132. package/dist/esm/bcm-attendance-actions-dropdown.entry.js +6 -6
  133. package/dist/esm/bcm-autocomplete.entry.js +1 -1
  134. package/dist/esm/bcm-box.entry.js +1 -1
  135. package/dist/esm/bcm-breadcrumb.entry.js +3 -3
  136. package/dist/esm/bcm-caption.entry.js +7 -7
  137. package/dist/esm/bcm-card.entry.js +5 -5
  138. package/dist/esm/bcm-chip-group.entry.js +11 -11
  139. package/dist/esm/bcm-colorpicker.entry.js +1 -1
  140. package/dist/esm/bcm-content.entry.js +1 -1
  141. package/dist/esm/bcm-date-picker.entry.js +4 -4
  142. package/dist/esm/bcm-datetime-picker.entry.js +7 -7
  143. package/dist/esm/bcm-default.entry.js +3 -3
  144. package/dist/esm/bcm-error-layout.entry.js +1 -1
  145. package/dist/esm/bcm-form-2.entry.js +5 -5
  146. package/dist/esm/bcm-form-group.entry.js +1 -1
  147. package/dist/esm/bcm-input-2.entry.js +5 -5
  148. package/dist/esm/bcm-input-custom.entry.js +3 -3
  149. package/dist/esm/bcm-input-dropdown.entry.js +7 -7
  150. package/dist/esm/bcm-message.entry.js +1 -1
  151. package/dist/esm/bcm-modal-2-footer.entry.js +6 -6
  152. package/dist/esm/bcm-modal-2-header.entry.js +6 -6
  153. package/dist/esm/bcm-modal-2.entry.js +6 -6
  154. package/dist/esm/bcm-notification.entry.js +1 -1
  155. package/dist/esm/bcm-number-input.entry.js +7 -7
  156. package/dist/esm/bcm-overlay_2.entry.js +1 -1
  157. package/dist/esm/bcm-popover.entry.js +6 -6
  158. package/dist/esm/bcm-range.entry.js +3 -3
  159. package/dist/esm/bcm-react-number.entry.js +1 -1
  160. package/dist/esm/bcm-result.entry.js +1 -1
  161. package/dist/esm/bcm-select-group.entry.js +1 -1
  162. package/dist/esm/bcm-select-option.entry.js +1 -1
  163. package/dist/esm/bcm-skeleton.entry.js +6 -6
  164. package/dist/esm/bcm-tab-pane.entry.js +1 -1
  165. package/dist/esm/bcm-table.entry.js +6 -6
  166. package/dist/esm/bcm-tabs-content.entry.js +1 -1
  167. package/dist/esm/bcm-tag.entry.js +4 -4
  168. package/dist/esm/bcm-time-picker.entry.js +4 -4
  169. package/dist/esm/bcm-timeline-item.entry.js +1 -1
  170. package/dist/esm/bcm-timeline.entry.js +1 -1
  171. package/dist/esm/bcm-toast.entry.js +4 -4
  172. package/dist/esm/bcm-treeview-group.entry.js +1 -1
  173. package/dist/esm/bromcom-ui.js +4 -4
  174. package/dist/esm/{caption-template-8fb16bc5.js → caption-template-3cd42c3b.js} +1 -1
  175. package/dist/esm/{generate-456c9a95.js → generate-172feaa1.js} +1 -1
  176. package/dist/esm/{global-d8c395e1.js → global-dd4e5618.js} +2 -2
  177. package/dist/esm/{index-2b2668ab.js → index-0615c2b8.js} +1 -3
  178. package/dist/esm/{index-6ef67209.js → index-7e71bbc8.js} +1 -1
  179. package/dist/esm/{is-load-decorator-0f334092.js → is-load-decorator-8277e3b8.js} +1 -1
  180. package/dist/esm/{label-template-cc2646d1.js → label-template-ef97aadb.js} +1 -1
  181. package/dist/esm/loader.js +4 -4
  182. package/dist/esm/{number-helper-de819805.js → number-helper-75b39b91.js} +1 -1
  183. package/dist/esm/old-bcm-popover-box.entry.js +6 -6
  184. package/dist/esm/old-bcm-popover.entry.js +3 -3
  185. package/dist/esm/{package-dec1fb78.js → package-4ae730ba.js} +1 -1
  186. package/dist/esm/{popover-placement-1b15cc99.js → popover-placement-2bf3a181.js} +1 -1
  187. package/dist/esm/{slot-template-42240428.js → slot-template-d3ae9f27.js} +2 -2
  188. package/dist/esm/{string-helper-b4602002.js → string-helper-69203215.js} +2 -4
  189. package/dist/esm/{validators-e95cb184.js → validators-c89525d2.js} +1 -1
  190. package/package.json +1 -1
  191. package/dist/bromcom-ui/p-163e9e9f.entry.js +0 -5
  192. package/dist/bromcom-ui/p-1774cf8d.js +0 -5
  193. package/dist/bromcom-ui/p-491fa9dc.js +0 -5
  194. package/dist/bromcom-ui/p-ca72ffc3.entry.js +0 -5
  195. package/dist/bromcom-ui/p-d4f95f24.entry.js +0 -5
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{s as f}from"./p-5b96cd07.js";class a{}a.compareTwoArrayIsSame=(a,d)=>f((()=>a.length===d.length&&a.every(((f,a)=>f===d[a])))),a.isEmailValid=f=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(f),a.isUrlValid=f=>/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/\S*)?$/i.test(f),a.isNumberValid=f=>/^[+-]?\d+$/.test(f),a.isNumberFloatValid=f=>/^\d+(\.\d+)?$/.test(f),a.isPhoneValid=f=>/^(?=.*[0-9])[- +()0-9]+$/.test(f),a.pattern=(f,a)=>new RegExp(a).test(f),a.isValidate=(f,d)=>{switch(d){case"email":return a.isEmailValid(f);case"url":return a.isUrlValid(f);case"number":return a.isNumberValid(f)||a.isNumberFloatValid(f);case"phone":return a.isPhoneValid(f);default:return!0}};export{a as V}
5
+ import{s as f}from"./p-9ba753bf.js";class a{}a.compareTwoArrayIsSame=(a,d)=>f((()=>a.length===d.length&&a.every(((f,a)=>f===d[a])))),a.isEmailValid=f=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(f),a.isUrlValid=f=>/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/\S*)?$/i.test(f),a.isNumberValid=f=>/^[+-]?\d+$/.test(f),a.isNumberFloatValid=f=>/^\d+(\.\d+)?$/.test(f),a.isPhoneValid=f=>/^(?=.*[0-9])[- +()0-9]+$/.test(f),a.pattern=(f,a)=>new RegExp(a).test(f),a.isValidate=(f,d)=>{switch(d){case"email":return a.isEmailValid(f);case"url":return a.isUrlValid(f);case"number":return a.isNumberValid(f)||a.isNumberFloatValid(f);case"phone":return a.isPhoneValid(f);default:return!0}};export{a as V}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as t,c as s,h as i,H as e,g as a}from"./p-8828bbde.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as o}from"./p-5b96cd07.js";import"./p-1774cf8d.js";import"./p-35f2e15a.js";import"./p-190f60ff.js";import"./p-6f861fed.js";import{d as h}from"./p-6f2e4c9b.js";import{B as r}from"./p-a313fba6.js";import{c as l}from"./p-64fad38b.js";import"./p-436364c8.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-c168b4ec.js";const c=class{constructor(i){t(this,i),this.modalClose=s(this,"bcm-modal-close",7),this.modalOpen=s(this,"bcm-modal-open",7),this.modalBeforeClose=s(this,"bcm-modal-before-close",7),this.modalBeforeOpen=s(this,"bcm-modal-before-open",7),this._id=o.UID(),this.isShow=!1,this.center=!1,this.zIndex="10400",this.size=r.Size.medium,this.backdrop=!0,this.fullWidth=!1,this.fullScreen=!1,this.overflow=!0,this.isShowModal=!1,this.shake=!1}handleClick(t){const s=o.findEventPathHasAttribute(t,"data-dismiss"),i=t.target.attributes.getNamedItem("is-click-overlay");i&&"static"===this.backdrop?this.shakeModal():(s||i)&&(this.hide(),t.preventDefault(),t.stopPropagation())}handleKeyDown(t){Array.from(document.querySelectorAll("bcm-modal-2[is-show]")).pop()===this.el&&"Escape"===t.key&&("static"===this.backdrop?this.shakeModal():this.hide(),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}shakeModal(){this.shake=!0,setTimeout((()=>this.shake=!1),300)}async hide(){this.modalBeforeClose.emit()}async hideModal(t){t.defaultPrevented||t.target===this.el&&(this.isShowModal=!1,await h(150),this.isShow=!1,this.modalClose.emit())}async show(){this.modalBeforeOpen.emit()}async showModal(t){t.defaultPrevented||t.target===this.el&&(this.isShow=!0,await h(50),this.isShowModal=!0,document.body.appendChild(this.el),this.modalOpen.emit())}getWidth(t){return{small:"576px",medium:"768px",large:"992px",xlarge:"1024px",xxlarge:"1200px",xxxlarge:"1700px"}[t]||t}setSize(){const{fullScreen:t,fullWidth:s,size:i,overflow:e}=this;let a="auto",o="auto",h=s?"100%":this.getWidth(i);return t&&(o=e?"100vh":"auto",h="100vw",a="100vh"),{width:h,minHeight:a,height:o}}render(){return i(e,{class:{"tw-hidden":!this.isShow}},i("bcm-overlay",{"z-index":+this.zIndex-1,opacity:this.isShowModal?"0.5":"0"}),i("div",{class:l("tw-fixed tw-inset-0","tw-flex tw-h-full tw-w-full tw-items-start tw-justify-center","tw-overflow-y-scroll tw-overscroll-contain tw-font-sans",this.center?"tw-items-center":""),style:{zIndex:this.zIndex},"is-click-overlay":!0},i("div",{class:l("tw-flex tw-w-full tw-flex-col","tw-relative tw-z-modal tw-bg-white","tw--translate-y-[20px] tw-transform tw-opacity-0 tw-transition tw-duration-300 tw-ease-in-out",this.fullScreen?"":`tw-m-4 tw-rounded-lg ${this.overflow?"tw-max-h-[90vh]":""} `,this.shake?"tw-animate-shake":""),style:Object.assign(Object.assign({},this.setSize()),this.isShowModal?{transform:"translateY(0)",opacity:"1"}:{})},i("slot",{name:"header"}),i("bcm-scroll-area",{"is-disabled":!this.overflow},i("slot",null)),i("slot",{name:"footer"}))))}get el(){return a(this)}};export{c as bcm_modal_2}
5
+ import{r as t,c as s,h as i,H as e,g as a}from"./p-170cf07d.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as o}from"./p-9ba753bf.js";import"./p-b93361f4.js";import"./p-d65bc842.js";import"./p-cbbc036b.js";import"./p-6f861fed.js";import{d as h}from"./p-6f2e4c9b.js";import{B as r}from"./p-a313fba6.js";import{c as l}from"./p-64fad38b.js";import"./p-436364c8.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-3ba6c610.js";const c=class{constructor(i){t(this,i),this.modalClose=s(this,"bcm-modal-close",7),this.modalOpen=s(this,"bcm-modal-open",7),this.modalBeforeClose=s(this,"bcm-modal-before-close",7),this.modalBeforeOpen=s(this,"bcm-modal-before-open",7),this._id=o.UID(),this.isShow=!1,this.center=!1,this.zIndex="10400",this.size=r.Size.medium,this.backdrop=!0,this.fullWidth=!1,this.fullScreen=!1,this.overflow=!0,this.isShowModal=!1,this.shake=!1}handleClick(t){const s=o.findEventPathHasAttribute(t,"data-dismiss"),i=t.target.attributes.getNamedItem("is-click-overlay");i&&"static"===this.backdrop?this.shakeModal():(s||i)&&(this.hide(),t.preventDefault(),t.stopPropagation())}handleKeyDown(t){Array.from(document.querySelectorAll("bcm-modal-2[is-show]")).pop()===this.el&&"Escape"===t.key&&("static"===this.backdrop?this.shakeModal():this.hide(),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}shakeModal(){this.shake=!0,setTimeout((()=>this.shake=!1),300)}async hide(){this.modalBeforeClose.emit()}async hideModal(t){t.defaultPrevented||t.target===this.el&&(this.isShowModal=!1,await h(150),this.isShow=!1,this.modalClose.emit())}async show(){this.modalBeforeOpen.emit()}async showModal(t){t.defaultPrevented||t.target===this.el&&(this.isShow=!0,await h(50),this.isShowModal=!0,document.body.appendChild(this.el),this.modalOpen.emit())}getWidth(t){return{small:"576px",medium:"768px",large:"992px",xlarge:"1024px",xxlarge:"1200px",xxxlarge:"1700px"}[t]||t}setSize(){const{fullScreen:t,fullWidth:s,size:i,overflow:e}=this;let a="auto",o="auto",h=s?"100%":this.getWidth(i);return t&&(o=e?"100vh":"auto",h="100vw",a="100vh"),{width:h,minHeight:a,height:o}}render(){return i(e,{class:{"tw-hidden":!this.isShow}},i("bcm-overlay",{"z-index":+this.zIndex-1,opacity:this.isShowModal?"0.5":"0"}),i("div",{class:l("tw-fixed tw-inset-0","tw-flex tw-h-full tw-w-full tw-items-start tw-justify-center","tw-overflow-y-scroll tw-overscroll-contain tw-font-sans",this.center?"tw-items-center":""),style:{zIndex:this.zIndex},"is-click-overlay":!0},i("div",{class:l("tw-flex tw-w-full tw-flex-col","tw-relative tw-z-modal tw-bg-white","tw--translate-y-[20px] tw-transform tw-opacity-0 tw-transition tw-duration-300 tw-ease-in-out",this.fullScreen?"":`tw-m-4 tw-rounded-lg ${this.overflow?"tw-max-h-[90vh]":""} `,this.shake?"tw-animate-shake":""),style:Object.assign(Object.assign({},this.setSize()),this.isShowModal?{transform:"translateY(0)",opacity:"1"}:{})},i("slot",{name:"header"}),i("bcm-scroll-area",{"is-disabled":!this.overflow},i("slot",null)),i("slot",{name:"footer"}))))}get el(){return a(this)}};export{c as bcm_modal_2}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as e,h as t,H as i,g as n}from"./p-8828bbde.js";import{c as l}from"./p-64fad38b.js";import"./p-85eedabc.js";const p=class{constructor(t){e(this,t),this.even=!1,this.first=!1,this.last=!1,this.icon=void 0,this.timelineType="left",this.hidden=!1}render(){const e=l("timeline-item",[this.timelineType],{even:this.even,first:this.first,last:this.last,icon:this.icon}),n=l(this.hidden?"hidden":null);return t(i,{class:n},t("div",{class:e},this.icon&&t("bcm-icon",{icon:this.icon}),t("slot",null)))}get el(){return n(this)}};p.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:block}:host(.hidden){display:none}.timeline-item{position:relative;font-size:14px;line-height:22px;padding:8px 8px 8px 30px}.timeline-item:after{content:"";position:absolute;left:0;top:14px;width:9px;height:9px;border-radius:100px;background-color:#ffffff;border:2px solid #4293CF;box-sizing:border-box}.timeline-item:before{content:"";position:absolute;top:30px;left:3px;width:2px;height:calc(100% - 23px);background-color:#e8e8e8}.timeline-item.last:before{display:none}.timeline-item.icon:after{display:none}bcm-icon{position:absolute;top:10px;left:-4px}.timeline-item.right{text-align:right;padding-left:8px;padding-right:30px}.timeline-item.right:after{left:inherit;right:0}.timeline-item.right:before{left:inherit;right:3px}.timeline-item.right bcm-icon{left:inherit;right:-4px}:host-context(.timeline.alternate){flex:0 0 50% !important;max-width:50% !important}:host-context(.timeline.alternate) .timeline-item.even{text-align:right;padding-left:8px;padding-right:30px}:host-context(.timeline.alternate) .timeline-item.even:after{left:inherit;right:-5px}:host-context(.timeline.alternate) .timeline-item.even:before{left:inherit;right:-1px}:host-context(.timeline.alternate) .timeline-item.even bcm-icon{left:inherit;right:-8px}:host-context(.timeline.alternate) .timeline-item:not(.even):after{left:-3px}:host-context(.timeline.alternate) .timeline-item:not(.even):before{left:0px}:host-context(.timeline.alternate) .timeline-item:not(.even) bcm-icon{left:-7px}@media screen and (min-width: 576px){:host-context(.timeline.alternate){flex:1 1 100% !important;max-width:100% !important;margin-left:inherit !important}:host-context(.timeline.alternate) .timeline-item.even{text-align:left;padding-left:30px;padding-right:8px}:host-context(.timeline.alternate) .timeline-item.even:after{left:-5px;right:inherit}:host-context(.timeline.alternate) .timeline-item.even:before{left:-1px;right:inherit}:host-context(.timeline.alternate) .timeline-item.even bcm-icon{left:-8px;right:inherit}}';export{p as bcm_timeline_item}
5
+ import{r as e,h as t,H as i,g as n}from"./p-170cf07d.js";import{c as l}from"./p-64fad38b.js";import"./p-85eedabc.js";const p=class{constructor(t){e(this,t),this.even=!1,this.first=!1,this.last=!1,this.icon=void 0,this.timelineType="left",this.hidden=!1}render(){const e=l("timeline-item",[this.timelineType],{even:this.even,first:this.first,last:this.last,icon:this.icon}),n=l(this.hidden?"hidden":null);return t(i,{class:n},t("div",{class:e},this.icon&&t("bcm-icon",{icon:this.icon}),t("slot",null)))}get el(){return n(this)}};p.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:block}:host(.hidden){display:none}.timeline-item{position:relative;font-size:14px;line-height:22px;padding:8px 8px 8px 30px}.timeline-item:after{content:"";position:absolute;left:0;top:14px;width:9px;height:9px;border-radius:100px;background-color:#ffffff;border:2px solid #4293CF;box-sizing:border-box}.timeline-item:before{content:"";position:absolute;top:30px;left:3px;width:2px;height:calc(100% - 23px);background-color:#e8e8e8}.timeline-item.last:before{display:none}.timeline-item.icon:after{display:none}bcm-icon{position:absolute;top:10px;left:-4px}.timeline-item.right{text-align:right;padding-left:8px;padding-right:30px}.timeline-item.right:after{left:inherit;right:0}.timeline-item.right:before{left:inherit;right:3px}.timeline-item.right bcm-icon{left:inherit;right:-4px}:host-context(.timeline.alternate){flex:0 0 50% !important;max-width:50% !important}:host-context(.timeline.alternate) .timeline-item.even{text-align:right;padding-left:8px;padding-right:30px}:host-context(.timeline.alternate) .timeline-item.even:after{left:inherit;right:-5px}:host-context(.timeline.alternate) .timeline-item.even:before{left:inherit;right:-1px}:host-context(.timeline.alternate) .timeline-item.even bcm-icon{left:inherit;right:-8px}:host-context(.timeline.alternate) .timeline-item:not(.even):after{left:-3px}:host-context(.timeline.alternate) .timeline-item:not(.even):before{left:0px}:host-context(.timeline.alternate) .timeline-item:not(.even) bcm-icon{left:-7px}@media screen and (min-width: 576px){:host-context(.timeline.alternate){flex:1 1 100% !important;max-width:100% !important;margin-left:inherit !important}:host-context(.timeline.alternate) .timeline-item.even{text-align:left;padding-left:30px;padding-right:8px}:host-context(.timeline.alternate) .timeline-item.even:after{left:-5px;right:inherit}:host-context(.timeline.alternate) .timeline-item.even:before{left:-1px;right:inherit}:host-context(.timeline.alternate) .timeline-item.even bcm-icon{left:-8px;right:inherit}}';export{p as bcm_timeline_item}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{a as e}from"./p-a313fba6.js";import{c as a,a as r}from"./p-85eedabc.js";var n=a((function(e){var a;e.exports=(a=function(){var e=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E\'","Ը":"Y\'","Թ":"T\'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C\'","Կ":"K","Հ":"H","Ձ":"D\'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R\'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P\'","Ք":"Q\'","Օ":"O\'\'","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}'),a=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function r(r,n){if("string"!=typeof r)throw new Error("slugify: string argument expected");var o=a[(n="string"==typeof n?{replacement:n}:n||{}).locale]||{},t=void 0===n.replacement?"-":n.replacement,i=void 0===n.trim||n.trim,u=r.normalize().split("").reduce((function(a,r){var i=o[r];return void 0===i&&(i=e[r]),void 0===i&&(i=r),i===t&&(i=" "),a+i.replace(n.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")}),"");return n.strict&&(u=u.replace(/[^A-Za-z0-9\s]/g,"")),i&&(u=u.trim()),u=u.replace(/\s+/g,t),n.lower&&(u=u.toLowerCase()),u}return r.extend=function(a){Object.assign(e,a)},r})(),e.exports.default=a()}));class o{}o.lowercase=e=>e.toLowerCase(),o.uppercase=e=>e.toUpperCase(),o.capitalize=e=>e.charAt(0).toUpperCase()+e.slice(1),o.camelCase=e=>e.replace(/\s(.)/g,(function(e){return e.toUpperCase()})).replace(/\s/g,""),o.kebabCase=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o.snakeCase=e=>e.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase(),o.titleCase=e=>e.replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})),o.trim=e=>e&&e.trim(),o.trimLeft=e=>e.trimLeft(),o.trimRight=e=>e.trimRight(),o.trimAll=e=>e.trim().replace(/\s+/g," "),o.replace=(e,a,r)=>e.replace(a,r),o.remove=(e,a)=>e.replace(a,""),o.isNullOrEmpty=e=>null==e||""===e,o.localizationMessage=(e,a)=>e.replace(/{(\d+)}/g,((e,r)=>void 0!==a[r]?a[r]:e)),o.getMessage=(a,r)=>o.localizationMessage(e.FormErrorMessages[a],r),o.split=(e,a)=>e.split(a),o.textContains=(e,a)=>e&&-1!==e.indexOf(a),o.textLimitter=(e,a,r=!1)=>(e&&e.length>a?`${e.substring(0,a)}...`:e)+""+(r?" <br /> ":""),o.slugify=e=>n(e,{replacement:" ",remove:void 0,lower:!0,strict:!1,locale:"vi",trim:!1}),o.highlight=(e,a)=>{let r=e;r=r.replace(/(&lt;mark&gt;|&lt;\/mark&gt;)/gim,"");const n=a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),o=new RegExp(n,"gi");return r.replace(o,"&lt;mark&gt;$&&lt;/mark&gt;")},o.templateParser=(e,a)=>e.replace(/\{{(\w+)\}}/g,((e,r)=>a[r]||"")),o.parseStringToBoolean=e=>"true"===e,o.elementBooleanCheck=e=>{const a=JSON.parse(JSON.stringify(e));if(null!=a){if(a.length>0){if("true"==a)return!0;if("false"==a)return!1}return!0}return!1},o.htmlEntities=e=>String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");export{o as S}
5
+ import{a as e}from"./p-a313fba6.js";import{c as a,a as r}from"./p-85eedabc.js";var n=a((function(e){var a;e.exports=(a=function(){var e=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E\'","Ը":"Y\'","Թ":"T\'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C\'","Կ":"K","Հ":"H","Ձ":"D\'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R\'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P\'","Ք":"Q\'","Օ":"O\'\'","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}'),a=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function r(r,n){if("string"!=typeof r)throw new Error("slugify: string argument expected");var o=a[(n="string"==typeof n?{replacement:n}:n||{}).locale]||{},i=void 0===n.replacement?"-":n.replacement,t=void 0===n.trim||n.trim,u=r.normalize().split("").reduce((function(a,r){var t=o[r];return void 0===t&&(t=e[r]),void 0===t&&(t=r),t===i&&(t=" "),a+t.replace(n.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")}),"");return n.strict&&(u=u.replace(/[^A-Za-z0-9\s]/g,"")),t&&(u=u.trim()),u=u.replace(/\s+/g,i),n.lower&&(u=u.toLowerCase()),u}return r.extend=function(a){Object.assign(e,a)},r})(),e.exports.default=a()}));class o{}o.lowercase=e=>e.toLowerCase(),o.uppercase=e=>e.toUpperCase(),o.capitalize=e=>e.charAt(0).toUpperCase()+e.slice(1),o.camelCase=e=>e.replace(/\s(.)/g,(function(e){return e.toUpperCase()})).replace(/\s/g,""),o.kebabCase=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o.snakeCase=e=>e.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase(),o.titleCase=e=>e.replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})),o.trim=e=>e&&e.trim(),o.trimLeft=e=>e.trimLeft(),o.trimRight=e=>e.trimRight(),o.trimAll=e=>e.trim().replace(/\s+/g," "),o.replace=(e,a,r)=>e.replace(a,r),o.remove=(e,a)=>e.replace(a,""),o.isNullOrEmpty=e=>null==e||""===e,o.localizationMessage=(e,a)=>e.replace(/{(\d+)}/g,((e,r)=>void 0!==a[r]?a[r]:e)),o.getMessage=(a,r)=>o.localizationMessage(e.FormErrorMessages[a],r),o.split=(e,a)=>e.split(a),o.textContains=(e,a)=>e&&-1!==e.indexOf(a),o.textLimitter=(e,a,r=!1)=>(e&&e.length>a?`${e.substring(0,a)}...`:e)+""+(r?" <br /> ":""),o.slugify=e=>n(e,{replacement:" ",remove:void 0,lower:!0,strict:!1,locale:"vi",trim:!1}),o.highlight=(e,a)=>{let r=e;r=r.replace(/(<mark>|<\/mark>)/gim,"");const n=a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),o=new RegExp(n,"gi");return r.replace(o,"<mark>$&</mark>")},o.templateParser=(e,a)=>e.replace(/\{{(\w+)\}}/g,((e,r)=>a[r]||"")),o.parseStringToBoolean=e=>"true"===e,o.elementBooleanCheck=e=>{const a=JSON.parse(JSON.stringify(e));if(null!=a){if(a.length>0){if("true"==a)return!0;if("false"==a)return!1}return!0}return!1},o.htmlEntities=e=>String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");export{o as S}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as e,h as i,H as t,g as p}from"./p-8828bbde.js";import{c as a}from"./p-64fad38b.js";import{C as r}from"./p-499d8454.js";import{G as s}from"./p-5b96cd07.js";import{S as o}from"./p-35f2e15a.js";import{S as n}from"./p-491fa9dc.js";import"./p-85eedabc.js";import"./p-436364c8.js";import"./p-6f2e4c9b.js";import"./p-a2df6c19.js";import"./p-c168b4ec.js";import"./p-a313fba6.js";const x=class{constructor(i){e(this,i),this.modalSlots={},this._id=s.UID(),this.hidden=!1,this.color="slate",this.header=void 0,this.footer=void 0}connectedCallback(){const e=this.el.querySelectorAll("bcm-card-header, bcm-card-footer");e&&e.forEach((e=>{let i=o.lowercase(o.split(e.nodeName,"-").pop());if(e.slot=i,"header"===i){let i=e.getAttribute("color");i&&(i="white"==i?i:i+"-50",e.setAttribute("style",`background-color: ${r.dsColor(i)}`))}e.classList.add(`bcm-card__${i}`),this.modalSlots[i]=e}))}render(){const e=a("bcm-card",this.hidden?"hidden":null);return i(t,{class:e},i((()=>this.modalSlots.header&&i("slot",{name:"header"})),null),i("div",{class:"bcm-card__body"},i(n,null)),i((()=>this.modalSlots.footer&&i("slot",{name:"footer"})),null))}get el(){return p(this)}};x.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-card{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:block;width:100%;background-color:var(--bcm-new-ds-color-white);border-radius:8px;box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1);box-sizing:border-box}.bcm-card__header,.bcm-card__body,.bcm-card__footer{display:block;width:100%}.bcm-card__header{border-radius:8px 8px 0 0;padding:12px 24px;color:var(--bcm-new-ds-color-slate-700);font-weight:600}.bcm-card__body{padding:12px 24px}.bcm-card__footer{padding:12px 24px;border-radius:0 0 8px 8px}';export{x as bcm_card}
5
+ import{r as e,h as i,H as t,g as p}from"./p-170cf07d.js";import{c as a}from"./p-64fad38b.js";import{C as r}from"./p-499d8454.js";import{G as s}from"./p-9ba753bf.js";import{S as o}from"./p-d65bc842.js";import{S as n}from"./p-bddce313.js";import"./p-85eedabc.js";import"./p-436364c8.js";import"./p-6f2e4c9b.js";import"./p-a2df6c19.js";import"./p-3ba6c610.js";import"./p-a313fba6.js";const x=class{constructor(i){e(this,i),this.modalSlots={},this._id=s.UID(),this.hidden=!1,this.color="slate",this.header=void 0,this.footer=void 0}connectedCallback(){const e=this.el.querySelectorAll("bcm-card-header, bcm-card-footer");e&&e.forEach((e=>{let i=o.lowercase(o.split(e.nodeName,"-").pop());if(e.slot=i,"header"===i){let i=e.getAttribute("color");i&&(i="white"==i?i:i+"-50",e.setAttribute("style",`background-color: ${r.dsColor(i)}`))}e.classList.add(`bcm-card__${i}`),this.modalSlots[i]=e}))}render(){const e=a("bcm-card",this.hidden?"hidden":null);return i(t,{class:e},i((()=>this.modalSlots.header&&i("slot",{name:"header"})),null),i("div",{class:"bcm-card__body"},i(n,null)),i((()=>this.modalSlots.footer&&i("slot",{name:"footer"})),null))}get el(){return p(this)}};x.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-card{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:block;width:100%;background-color:var(--bcm-new-ds-color-white);border-radius:8px;box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1);box-sizing:border-box}.bcm-card__header,.bcm-card__body,.bcm-card__footer{display:block;width:100%}.bcm-card__header{border-radius:8px 8px 0 0;padding:12px 24px;color:var(--bcm-new-ds-color-slate-700);font-weight:600}.bcm-card__body{padding:12px 24px}.bcm-card__footer{padding:12px 24px;border-radius:0 0 8px 8px}';export{x as bcm_card}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as e,c as t,h as i,H as s,g as a}from"./p-8828bbde.js";import{G as r,s as o,S as l,T as p}from"./p-5b96cd07.js";import{c as n}from"./p-64fad38b.js";import{c}from"./p-28beec31.js";import{S as h}from"./p-35f2e15a.js";import"./p-c168b4ec.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-a313fba6.js";const{state:m}=c({value:new Map,setData:{},removeData:{}}),d=class{constructor(i){e(this,i),this.alertdismissible=t(this,"bcm-alert-dismissible",7),this.hidden=!1,this._id=r.UID(),this._title=void 0,this.description=void 0,this.status=l.info,this.type=p.basic,this.dismissible=void 0,this.icon=!1,this.bigIcon=!1,this.fullWidth=!1}componentWillRender(){if(null!=this.dismissible)if(""==this.dismissible)this.dismissible=!0;else{if(("string"!=typeof this.dismissible||"false"!=this.dismissible)&&"true"!=this.dismissible)return;this.dismissible=h.elementBooleanCheck(this.dismissible)}this.setData()}dismiss(e){this.alertdismissible.emit(e),this.el.remove()}getStateData(){return e=this._id,o((()=>m.value.get(e)),{});var e}setData(){const{status:e,type:t,bigIcon:i}=this;(e=>{const t=Object.assign(Object.assign(Object.assign({},e),{size:e.bigIcon?"medium":14,iconType:e.bigIcon?"outlined":"fill"}),r.getIconAttrWithStatusType(e.status));m.value.set(t.id,t)})({id:this._id,status:e,type:t,bigIcon:i})}render(){const{fullWidth:e,status:t,type:a,icon:r,bigIcon:o,_title:l,hidden:p,dismissible:c,description:h}=this,m=n("bcm-alert","bcm-alert__type-"+a,"bcm-alert__status-"+t,{"full-width":e,hidden:p}),d=n("bcm-alert__header-message",h?"size-3":"size-2"),x=this.getStateData();return i(s,{class:m},i("span",{hidden:!0},i("slot",null)),i("header",{class:"bcm-alert__header"},i("span",{class:d},(o||r)&&i("bcm-icon",{icon:x.icon}),l),c&&i("span",{class:"bcm-alert__header-dismiss",onClick:e=>this.dismiss(e)},"string"==typeof c?c:i("bcm-icon",{icon:"fal fa-times"}))),i("main",{class:"bcm-alert__content size-2"},h&&i("p",null,h),i("slot",null)))}get el(){return a(this)}};d.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-alert{display:block;width:100%;max-width:400px;box-sizing:border-box;padding:8px 16px;box-shadow:0px 2px 4px rgba(0, 0, 0, 0.15);border-radius:2px;position:relative;grid-gap:8px}.bcm-alert.hidden{display:none}.bcm-alert.full-width{max-width:100%}.bcm-alert__status-info{border:1px solid var(--bcm-color-blue-3);background-color:var(--bcm-color-blue-1)}.bcm-alert__status-error{border:1px solid var(--bcm-color-red-3);background-color:var(--bcm-color-red-1)}.bcm-alert__status-warning{border:1px solid var(--bcm-color-warmyellow-3);background-color:var(--bcm-color-warmyellow-1)}.bcm-alert__status-success{border:1px solid var(--bcm-color-green-3);background-color:var(--bcm-color-green-1)}.bcm-alert__type-banner{border:none}.bcm-alert__header{display:flex;align-items:center;justify-content:space-between;padding:4px 0}.bcm-alert__header-message{display:flex;align-items:center;grid-gap:8px;color:var(--bcm-color-grey-8)}.bcm-alert__header-dismiss{display:flex;position:absolute;top:-1px;right:0;padding:16px;color:var(--bcm-color-grey-8)}.bcm-alert__header-dismiss:hover{cursor:pointer;color:var(--bcm-color-grey-9)}.bcm-alert__content{color:var(--bcm-color-grey-8)}.bcm-alert__content p{margin:0;padding:0}';export{d as bcm_alert}
5
+ import{r as e,c as t,h as i,H as s,g as a}from"./p-170cf07d.js";import{G as r,s as o,S as l,T as p}from"./p-9ba753bf.js";import{c as n}from"./p-64fad38b.js";import{c}from"./p-74e6d2b6.js";import{S as h}from"./p-d65bc842.js";import"./p-3ba6c610.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-a313fba6.js";const{state:m}=c({value:new Map,setData:{},removeData:{}}),d=class{constructor(i){e(this,i),this.alertdismissible=t(this,"bcm-alert-dismissible",7),this.hidden=!1,this._id=r.UID(),this._title=void 0,this.description=void 0,this.status=l.info,this.type=p.basic,this.dismissible=void 0,this.icon=!1,this.bigIcon=!1,this.fullWidth=!1}componentWillRender(){if(null!=this.dismissible)if(""==this.dismissible)this.dismissible=!0;else{if(("string"!=typeof this.dismissible||"false"!=this.dismissible)&&"true"!=this.dismissible)return;this.dismissible=h.elementBooleanCheck(this.dismissible)}this.setData()}dismiss(e){this.alertdismissible.emit(e),this.el.remove()}getStateData(){return e=this._id,o((()=>m.value.get(e)),{});var e}setData(){const{status:e,type:t,bigIcon:i}=this;(e=>{const t=Object.assign(Object.assign(Object.assign({},e),{size:e.bigIcon?"medium":14,iconType:e.bigIcon?"outlined":"fill"}),r.getIconAttrWithStatusType(e.status));m.value.set(t.id,t)})({id:this._id,status:e,type:t,bigIcon:i})}render(){const{fullWidth:e,status:t,type:a,icon:r,bigIcon:o,_title:l,hidden:p,dismissible:c,description:h}=this,m=n("bcm-alert","bcm-alert__type-"+a,"bcm-alert__status-"+t,{"full-width":e,hidden:p}),d=n("bcm-alert__header-message",h?"size-3":"size-2"),x=this.getStateData();return i(s,{class:m},i("span",{hidden:!0},i("slot",null)),i("header",{class:"bcm-alert__header"},i("span",{class:d},(o||r)&&i("bcm-icon",{icon:x.icon}),l),c&&i("span",{class:"bcm-alert__header-dismiss",onClick:e=>this.dismiss(e)},"string"==typeof c?c:i("bcm-icon",{icon:"fal fa-times"}))),i("main",{class:"bcm-alert__content size-2"},h&&i("p",null,h),i("slot",null)))}get el(){return a(this)}};d.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-alert{display:block;width:100%;max-width:400px;box-sizing:border-box;padding:8px 16px;box-shadow:0px 2px 4px rgba(0, 0, 0, 0.15);border-radius:2px;position:relative;grid-gap:8px}.bcm-alert.hidden{display:none}.bcm-alert.full-width{max-width:100%}.bcm-alert__status-info{border:1px solid var(--bcm-color-blue-3);background-color:var(--bcm-color-blue-1)}.bcm-alert__status-error{border:1px solid var(--bcm-color-red-3);background-color:var(--bcm-color-red-1)}.bcm-alert__status-warning{border:1px solid var(--bcm-color-warmyellow-3);background-color:var(--bcm-color-warmyellow-1)}.bcm-alert__status-success{border:1px solid var(--bcm-color-green-3);background-color:var(--bcm-color-green-1)}.bcm-alert__type-banner{border:none}.bcm-alert__header{display:flex;align-items:center;justify-content:space-between;padding:4px 0}.bcm-alert__header-message{display:flex;align-items:center;grid-gap:8px;color:var(--bcm-color-grey-8)}.bcm-alert__header-dismiss{display:flex;position:absolute;top:-1px;right:0;padding:16px;color:var(--bcm-color-grey-8)}.bcm-alert__header-dismiss:hover{cursor:pointer;color:var(--bcm-color-grey-9)}.bcm-alert__content{color:var(--bcm-color-grey-8)}.bcm-alert__content p{margin:0;padding:0}';export{d as bcm_alert}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as t,c as e,f as i,h as s,H as a,g as n}from"./p-8828bbde.js";import{D as h,E as r}from"./p-6f861fed.js";import{c as o}from"./p-64fad38b.js";import{D as c}from"./p-626a65e9.js";import{d as l}from"./p-6f2e4c9b.js";import{G as d}from"./p-5b96cd07.js";import{a as m}from"./p-a313fba6.js";import{g as p,s as u}from"./p-0bda558d.js";import{L as b}from"./p-53c8aabd.js";import{I as g}from"./p-55aeb18f.js";import"./p-85eedabc.js";import"./p-c168b4ec.js";import"./p-a2df6c19.js";import"./p-35f2e15a.js";var f,x,y;!function(t){t.january="january",t.february="february",t.march="march",t.april="april",t.may="may",t.june="june",t.july="july",t.august="august",t.september="september",t.october="october",t.november="november",t.december="december"}(f||(f={})),function(t){t.sunday="sunday",t.monday="monday",t.tuesday="tuesday",t.wednesday="wednesday",t.thursday="thursday",t.friday="friday",t.saturday="saturday"}(x||(x={})),function(t){t.datetime="datetime",t.range="range",t.date="date",t.time="time"}(y||(y={}));const v=JSON.stringify,w=class{constructor(i){t(this,i),this.load=e(this,"bcm-load",7),this.change=e(this,"bcm-change",7),this.bcmOpen=e(this,"bcm-open",7),this.inputId=null,this.emptyState=!1,this.initialized=!1,this.disabledDatesList={min:null,max:null,dates:[]},this.dayNumbers=[],this.valueText=null,this.dataIsValid=!1,this._id=d.UID(),this.date=new Date,this.endDate=null,this.type=y.datetime,this.disabled=!1,this.disabledDates="",this.value=null,this._open=!1,this.hidden=!1,this.name=void 0,this.fullWidth=!1,this.required=!1,this.label=void 0,this.placeholder=void 0,this.minYear=1900,this.maxYear=2200,this.noCaption=!1,this.noMargin=!1,this.captionError=void 0,this.caption="",this.captionType="default",this.alignment=void 0,this.placement=m.Placement["bottom-start"],this.linkedComponent=void 0,this.clearable=!1,this.years=[],this.hours=[],this.minutes=[],this.hasDateModule=!1,this.hasTimeModule=!1,this.renderDate=void 0,this.selectedDate=void 0,this.selectedEndDate=void 0,this.error=!1,this.errorText="",this.tick={}}markForCheck(){this.tick=d.UID()}openChanged(){this.bcmOpen.emit(this._open)}componentWillLoad(){if(this.inputId="picker-input-"+this._id,this.hasDateModule=this.type===y.datetime||this.type===y.date||this.type===y.range,this.hasTimeModule=this.type===y.datetime||this.type===y.time,this.prepareDisabledDates(),this.setData(),!this.initialized){for(let t=this.minYear;t<=this.maxYear;t++)this.years.push(t);for(let t=0;t<=23;t++)this.hours.push(t);for(let t=0;t<=59;t++)this.minutes.push(t);this.load.emit()}this.initialized=!0}componentDidRender(){this.hasDateModule&&!this.yearsDragger&&(this.createDragSelection("years",this.yearsElement,this.yearsWrapperElement,this.yearsStripElement,h.y),this.createWheelChange("years",this.yearsWrapperElement,this.yearsStripElement),this.setDragSelection("years",this.currentDate.year)),this.hasTimeModule&&!this.hoursDragger&&(this.createDragSelection("hours",this.hoursElement,this.hoursWrapperElement,this.timeStripElement,h.y),this.createWheelChange("hours",this.hoursWrapperElement,this.timeStripElement),this.setDragSelection("hours",this.currentDate.hour)),this.hasTimeModule&&!this.minutesDragger&&(this.createDragSelection("minutes",this.minutesElement,this.minutesWrapperElement,this.timeStripElement,h.y),this.createWheelChange("minutes",this.minutesWrapperElement,this.timeStripElement),this.setDragSelection("minutes",this.currentDate.minute))}renderDateChange(){this.initialized&&(this.setData(),this.hasDateModule&&this.setDragSelection("years",this.currentDate.year))}openChange(t){t&&(this.calculateLocation(),this.hasDateModule&&(this.createDragSelection("years",this.yearsElement,this.yearsWrapperElement,this.yearsStripElement,h.y),this.createWheelChange("years",this.yearsWrapperElement,this.yearsStripElement),this.setDragSelection("years",this.currentDate.year)),this.hasTimeModule&&(this.createDragSelection("hours",this.hoursElement,this.hoursWrapperElement,this.timeStripElement,h.y),this.createWheelChange("hours",this.hoursWrapperElement,this.timeStripElement),this.setDragSelection("hours",this.currentDate.hour,!0)),this.hasTimeModule&&(this.createDragSelection("minutes",this.minutesElement,this.minutesWrapperElement,this.timeStripElement,h.y),this.createWheelChange("minutes",this.minutesWrapperElement,this.timeStripElement),this.setDragSelection("minutes",this.currentDate.minute,!0)),this.markForCheck(),i(this.el))}valueChange(t,e){const i={isValid:!1,value:this.valueText};if(t)if(this.type!==y.range&&this.error)this.change.emit({isValid:!1,value:this.inputElement.value});else try{if((e&&v(t.dateObject)!==v(e.dateObject)||!e&&t)&&(this.type!==y.date&&this.type!==y.datetime||this.change.emit(t),this.type===y.time&&this.change.emit(t),this.type===y.range)){const e=t.dateObject;e.start.date&&e.end.date?t.isValid&&this.change.emit({isValid:t.isValid,value:t.value,start:e.start,end:e.end}):this.change.emit(i)}}catch(t){}else this.change.emit()}disabledDatesChange(t){t&&this.prepareDisabledDates()}stringToDate(t){return t.getMonth?t:new Date(Date.parse(this.switchDDMM(t)))}dateToString(t){if(!(t instanceof Date))return!1}switchDDMM(t){if(!t)return;const e=t.split("/");return-1===t.indexOf("/")||3!==e.length?t:`${e[1]}/${e[0]}/${e[2]}`}setData(){this.date=this.stringToDate(this.date),this.initialized||this.renderDate||(this.renderDate=this.date&&this.date||new Date),!this.initialized&&this.endDate&&(this.selectedEndDate=this.stringToDate(this.endDate));const t=this.renderDate;if(this.currentDate=this.createDateObject(t),this.dayNumbers=this.getMonthDayNumbers(t).map((e=>({day:e,thisMonth:!0,isWeekend:this.getDayIsWeekend(t,e),today:this.getIsCurrentDate(t,e),date:this.getTargetDayDate(t,e)}))),this.currentDate.year>this.minYear){let e=new Date(new Date(t).setMonth(this.currentDate.month-1,1)),i=this.getMonthDayNumbers(e).reverse(),s=this.currentDate.monthFirstDay;for(let t=1;t<(0===s?7:s);t++){const s=i[t-1];this.dayNumbers.unshift({day:s,prevMonth:!0,isWeekend:this.getDayIsWeekend(e,s),date:this.getTargetDayDate(e,s)})}}if(this.currentDate.year<this.maxYear){let e=new Date(new Date(t).setMonth(this.currentDate.month+1)),i=this.getMonthDayNumbers(e),s=42-this.dayNumbers.length;for(let t=0;t<s;t++){const s=i[t];this.dayNumbers.push({day:s,nextMonth:!0,isWeekend:this.getDayIsWeekend(e,s),date:this.getTargetDayDate(e,s)})}}this.emptyState||(this.valueText=this.getValueText()),i(this.el)}prepareDisabledDates(){if(!this.disabledDates)return;let t=null;if("string"==typeof this.disabledDates)try{t=JSON.parse(this.disabledDates)}catch(t){return}else t=this.disabledDates;if(t.dates&&t.dates.length&&t.dates.length){const e=t.dates.map((t=>{const e=new Date(t);return"invalid date"===e.toString().toLowerCase()?null:e})).filter((t=>t));this.disabledDatesList.dates=e}if(t.min&&t.max&&(t.min.getTime()>t.max.getTime()||t.max.getTime()<t.min.getTime()))return;t.min&&t.min instanceof Date?this.disabledDatesList.min=new Date(t.min.toDateString()):delete this.disabledDatesList.min,t.max&&t.max instanceof Date?this.disabledDatesList.max=new Date(t.max.toDateString()):delete this.disabledDatesList.max;const e=this.inputElement&&this.inputElement.value;e&&this.setDataFromText(e)}createWheelChange(t,e,i){e.addEventListener("wheel",(e=>{const s=e.deltaY>0,a=this[t+"Dragger"].getOffset().top,n=this.getTargetChildByDragPosition({y:a},i);let h=s?n+1:n-1;h<0?h=0:void 0===this[t][h]&&(h=this[t].length-1),"time"!=this.type||this.selectedDate||this.setTime(),this.setDragSelection(t,this[t][h],!0,!0)}))}createDragSelection(t,e,i,s,a){const n=t+"Dragger";this[n]=new r({target:e,trigger:i,direction:a,useTransform:!0,limit:{y:{max:s.offsetTop-s.offsetHeight/2,min:-1*(e.offsetHeight-(s.offsetTop+s.offsetHeight/2))}}}),this[n].on("end",(e=>{const i=this.getTargetChildByDragPosition(e,s);this.selectTargetChildByDragIdx(i,s,this[n]),this.setDragSelection(t,this[t][i],!1)}))}getTargetChildByDragPosition({y:t},e){const i=e.offsetHeight,s=i/2;return Math.floor(-(t-(e.offsetTop-s)-s)/i)}selectTargetChildByDragIdx(t,e,i,s=!0){i.setPosition({y:e.offsetHeight/2+e.offsetTop-(t+1)*e.offsetHeight,anim:s})}setDragSelection(t,e,i=!0,s=!1){const a=this[t].findIndex((t=>t===e));switch(i&&this.selectTargetChildByDragIdx(a,this["years"===t?t+"StripElement":"timeStripElement"],this[t+"Dragger"],s),t){case"years":this.date.setFullYear(e);break;case"hours":this.date.setHours(e);break;case"minutes":this.date.setMinutes(e)}this.renderDate=this.date,this.setData(),this.selectedDate&&this.setValue()}getHours12(){const t=(this.date.getHours()+24)%12||12;return t>12?t-12:t}createDateObject(t,{excludeTime:e=!1,exactMonthNumber:i=!1}={}){const s=t.getFullYear();return Object.assign(Object.assign({year:s>=this.maxYear?this.maxYear:s<=this.minYear?this.minYear:s,day:t.getDate(),month:t.getMonth()+(i?1:0),dayOfWeek:t.getDay(),monthFirstDay:new Date(new Date(t).setDate(1)).getDay()},!e&&{hour:t.getHours()}),!e&&{minute:t.getMinutes()})}generateDaysArrayFromMax(t){return Array.from(Array(t+1).keys()).slice(1)}getMonthDayNumbers(t){const e=this.getDaysInMonth(t.getMonth(),t.getFullYear());return this.generateDaysArrayFromMax(e)}getTargetDayDate(t,e){return new Date(new Date(t).setDate(e))}getDayIsWeekend(t,e){const i=new Date(new Date(t).setDate(e)).getDay();return 6===i||0===i}getClock(t){return{hours:(t=t||new Date).getHours(),minutes:t.getMinutes(),seconds:t.getSeconds(),milis:t.getMilliseconds()}}setValue(t){var e,i,s;const a=new Date(this.date.setHours(Number(this.currentDate.hour),Number(this.currentDate.minute)));if(t)this.value=null;else{if(this.dataIsValid=!0,this.type===y.datetime){const t=Object.assign({},this.currentDate);t.month+=1,(null===(e=this.value)||void 0===e?void 0:e.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),dateObject:t,value:this.valueText})}if(this.type===y.date){const t=Object.assign({},this.currentDate);delete t.hour,delete t.minute,t.month+=1,(null===(i=this.value)||void 0===i?void 0:i.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),dateObject:t,value:this.valueText})}if(this.type===y.time){const t=this.getTimeText(),e=Object.assign({},this.currentDate);e.month+=1,this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),time:t,dateObject:e,timeObject:{hours:this.currentDate.hour,minutes:this.currentDate.minute},value:t},this.inputElement.value=t}this.type===y.range&&(null===(s=this.value)||void 0===s?void 0:s.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,dateObject:{start:Object.assign({},this.selectedDate&&{date:this.selectedDate,timestamp:this.selectedDate.getTime(),detail:this.createDateObject(this.selectedDate,{excludeTime:!0,exactMonthNumber:!0})}),end:Object.assign({},this.selectedEndDate&&{date:this.selectedEndDate,timestamp:this.selectedEndDate.getTime(),detail:this.createDateObject(this.selectedEndDate,{excludeTime:!0,exactMonthNumber:!0})})},value:this.valueText})}}setMonth(t){this.renderDate.setDate(1),this.renderDate=new Date(this.renderDate.setMonth(t)),this.setDragSelection("years",this.currentDate.year)}checkRangeValidation({popupClosing:t=!1}={}){return this.type!==y.range||(t&&(!this.selectedDate||this.selectedDate&&!this.selectedEndDate)?(this.setError(!0,"date range invalid"),!1):(t||this.setError(!1),!0))}pad(t,e){return t<e?"0":""}isInputClearable(){return!(!this.inputElement||!this.inputElement.value)}isDisabledDate(t){if(this.disabledDatesList.dates.map((e=>this.isSameDate(e,t))).filter((t=>t)).length)return!0;if(this.disabledDatesList.min){const e=new Date(this.disabledDatesList.min);if(e&&e.getTime()>t.getTime())return!0}if(this.disabledDatesList.max){const e=new Date(this.disabledDatesList.max);if(e&&new Date(e.setDate(e.getDate()+1)).getTime()<t.getTime())return!0}}setDate(t,e,i=!1){const s=this.type===y.range,a=!!this.selectedEndDate;if((this.type!==y.date&&this.type!==y.datetime||!this.isDisabledDate(t))&&(this.emptyState=!1,(!s||s&&!a)&&(this.date=new Date(t.setHours(this.currentDate.hour,this.currentDate.minute))),s&&this.checkRangeValidation(),s&&this.selectedDate&&this.selectedEndDate&&(this.selectedDate=null,this.selectedEndDate=null),e)){const e=new Date(t);s&&this.selectedDate?this.selectedDate.getTime()>e.getTime()?(this.selectedEndDate=this.selectedDate)&&(this.selectedDate=e):this.selectedEndDate=e:this.selectedDate=e,!s&&(this._open=i),this.renderDate=this.date,this.valueText=this.getValueText(),this.setValue();const a=this.valueText.split("/"),n=this.valueText?this.changeFormat(new Date(a[1]+"/"+a[0]+"/"+a[2])):"";this.inputElement.value=n}}setDataFromText(t,e=!1,i=!0){let s=!1,a="";const n=this.parse(t);if(this.type!==y.date&&this.type!==y.datetime||!this.isDisabledDate(n.date)||(n.dateIsValid=!1,a="disabled-date"),this.type===y.datetime&&n.dateIsValid&&n.timeIsValid&&(e&&this.setDate(n.date,!0,i),e&&this.setTime(n.timeSections[0],n.timeSections[1]),s=!0),this.type===y.date&&n.dateIsValid&&(e&&this.setDate(n.date,!0,i),s=!0),this.type===y.time&&n.timeIsValid&&(e&&this.setTime(n.timeSections[0],n.timeSections[1]),s=!0),this.type===y.range&&(n.dateIsValid&&!this.selectedDate&&(e&&this.setDate(n.date,!0,i),s=!0),n.date2IsValid&&!this.selectedEndDate&&(e&&this.setDate(n.date2,!0,i),s=!0),this.selectedDate&&this.selectedEndDate&&n.rangeIsValid&&(this.isSameDate(n.date2,this.selectedEndDate)&&!this.isSameDate(n.date,this.selectedDate)&&(this.selectedDate=null,e&&this.setDate(n.date,!0,i),s=!0),this.isSameDate(n.date,this.selectedDate)&&!this.isSameDate(n.date2,this.selectedEndDate)&&(this.selectedEndDate=null,e&&this.setDate(n.date2,!0,i),s=!0)),this.selectedDate&&this.selectedEndDate&&!n.rangeIsValid&&e&&(this.selectedDate=null,this.selectedEndDate=null)),s)e&&(this.renderDate=this.date),this.setError(!1);else{this.type===y.range&&this.selectedDate&&this.selectedEndDate&&n.rangeIsValid?this.setError(!1):a?this.setError(!0,"disabled-date"===a&&"selected date is not allowed"):(t&&this.setError(!0,(this.type===y.datetime?"invalid date or time":this.type===y.range&&"invalid date range")||this.type===y.date&&"The selected date is not allowed."||this.type===y.time&&"invalid time"),this.setValue(!0));const e=t.split("/"),i=t&&!this.error?this.changeFormat(new Date(e[1]+"/"+e[0]+"/"+e[2])):"";this.inputElement.value=i}}setDateToday(){const t=new Date;this.type===y.range&&(this.selectedDate=null,this.selectedEndDate=null),this.setDate(t,!0,!1)}HourContentDblClick(t){const e=d.findEventPathWithNodeName(t,"SPAN");e&&e.classList.contains("selected")&&(this.setValue(),this._open=!1)}setTime(t,e){this.renderDate=new Date(this.date.setHours(Number(t||this.getClock().hours),Number(e||this.getClock().minutes))),this.type===y.time&&(this.selectedDate=this.date);const i=this.currentDate.hour||(new Date).getHours(),s=0==this.currentDate.minute?0:this.currentDate.minute||(new Date).getMinutes();this.setDragSelection("hours",i,!0,!0),this.setDragSelection("minutes",s,!0,!0)}setError(t=!1,e=""){this.error=t,this.errorText=t?e:""}getError(){const{error:t,errorText:e}=this;return{valid:!t,error:t,errorText:e}}getDaysInMonth(t,e){return new Date(e,t+1,0).getDate()}getIsCurrentDate(t,e){const i=new Date;return i.getDate()===e&&i.getMonth()===t.getMonth()&&i.getFullYear()===t.getFullYear()}isSameDate(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}getSelected(t,e=!1){const i=new Date(this["selected"+(e?"EndDate":"Date")]),s=i.getFullYear(),a=i.getMonth(),n=i.getDate();return t.getDate()===n&&t.getMonth()===a&&t.getFullYear()===s}getDateIsInRange(t){if(this.type!==y.range||!this.selectedDate||!this.selectedEndDate)return;const e=t.getTime(),i=this.selectedDate.getTime(),s=this.selectedEndDate.getTime();return e>i&&e<s}getMonthText(){return Object.values(f)[this.renderDate.getMonth()]}getCurrentDateText(){const t=Object.values(x)[this.currentDate.dayOfWeek],e=Object.values(f)[this.currentDate.month];return`${t}, ${this.currentDate.day}th ${e} ${this.currentDate.year}`}getTimeText(){const{hour:t,minute:e}=this.currentDate;return`${t<10?"0"+t:t}:${e<10?"0"+e:e}`}getValueText(){if(!this.selectedDate)return"";const t=this.selectedDate,e=t.getFullYear(),i=t.getDate(),s=t.getMonth()+1;let a="";if(this.type!==y.date&&this.type!==y.datetime||(a=`${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`),this.type===y.time&&(a=this.getTimeText()),this.type===y.datetime&&(a=`${a} ${this.getTimeText()}`),this.type===y.range&&(a=`${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`),this.type===y.range&&this.selectedEndDate){const t=this.selectedEndDate,e=t.getFullYear(),i=t.getDate(),s=t.getMonth()+1;a+=`-${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`}return this.setDataFromText(a),a}parseDate(t){var e=t.split("/"),i=parseInt(e[0],10),s=parseInt(e[1],10)-1,a=parseInt(e[2],10);if(isNaN(i)||isNaN(s)||isNaN(a))return"invalid date";var n=new Date(a,s,i);return n.getDate()!==i||n.getMonth()!==s||n.getFullYear()!==a?"invalid date":n}parse(t){const e=t.split(this.type===y.range?"-":" "),i=this.switchDDMM(e[0]),s=this.switchDDMM(e[1]),a=this.type===y.datetime?e[1]:e[0],n=new Date(i),h=new Date(s),r="invalid date"!==n.toString().toLowerCase()&&"invalid date"!==this.parseDate(t),o="invalid date"!==h.toString().toLowerCase(),c=/^((0?[1-9]|1[0-2])(-|\/)(0?[1-9]|[12]\d|3[01])(-|\/)[12]\d{3})$/,l=c.test(i),d=c.test(s),m=/\b([01][0-9]|2[0-3]):([0-5][0-9])\b/.test(a),p=r&&l,u=o&&d;return{date:n,date2:h,timeSections:m?a.split(":"):"",dateIsValid:p,date2IsValid:u,rangeIsValid:p&&u,timeIsValid:m}}getPrevMonth(){this.setMonth(this.renderDate.getMonth()-1)}getNextMonth(){this.setMonth(this.renderDate.getMonth()+1)}yearClick(t){this.yearsDragger.busy||this.setDragSelection("years",this.years[t],!0,!0)}hourClick(t){this.hoursDragger.busy||(this.selectedDate||this.setTime(),this.setDragSelection("hours",this.hours[t],!0,!0))}minuteClick(t){this.minutesDragger.busy||(this.selectedDate||this.setTime(),this.setDragSelection("minutes",this.minutes[t],!0,!0))}openPicker(){this.disabled||!this._open&&(this._open=!0)}handleDayNumber(t){this.type===y.range&&this.selectedDate&&!this.selectedEndDate&&this.isSameDate(this.selectedDate,t)||this.setDate(t,!0)}handleInputInput(t){this.setDataFromText(t,!0)}handleInputChange(t){this.setDataFromText(this.inputElement.value,!0,!1),t.stopPropagation()}async handleInputClear(){return this.selectedDate=null,this.selectedEndDate=null,this.emptyState=!0,this.renderDate=new Date,this._open=!1,this.setValue(!0),this.setError(),this.getValueText(),await this.inputElement.setClear(),await l(10),Promise.resolve()}handleWheel(t){t.preventDefault()}handleWindowClick(t){if(this._open){const e=document.getElementById(`picker-vp-${this._id}`),i=d.findEventPath(t,this.el),s=!!e&&d.findEventPath(t,e);i||s||(this._open=!1)}}openToggle(){this.disabled||(this._open=!this._open)}async open(){await l(50),this.openToggle()}async close(){this._open=!1}async getValue(){return this.value}async setDisabled(t){this.disabled=t}changeFormat(t,e=!1){if(!t)return;const i=t=>t<10?`0${t}`:t,s=i(new Date(t).getDate()),a=i(new Date(t).getMonth()+1),n=new Date(t).getFullYear(),h=i(new Date(t).getHours()),r=i(new Date(t).getMinutes());return"range"==this.type||"date"==this.type?e?`${a}/${s}/${n}`:`${s}/${a}/${n}`:e?`${a}/${s}/${n} ${h}:${r}`:`${s}/${a}/${n} ${h}:${r}`}isTime(t){return/^([0-1]?[0-9]|2[0-4]):([0-5][0-9])(:[0-5][0-9])?$/.test(t)}getHHMM(t){if(!t)return;const e=t=>t<10?`0${t}`:t;return`${e(new Date(t).getHours())}:${e(new Date(t).getMinutes())}`}async set(t){if(t)if("number"==typeof t&&(t=new Date(t)),"time"==this.type){let e=t;this.isTime(t)||(e=this.getHHMM(t)),this.setDataFromText(e,!0,!1)}else{const i=t.toString().split("-"),s=Date.parse(i[0]);if(i[0]&&!isNaN(s)){var e=this.changeFormat(c.convertTimeStampToDate(new Date(i[0]).getTime()));i[1]&&!isNaN(Date.parse(i[1]))&&(e=e+"-"+this.changeFormat(c.convertTimeStampToDate(new Date(i[1]).getTime()))),this.setDataFromText(e,!0,!1)}else this.setDataFromText("",!0,!1)}else this.setClear()}async get(){var t;return(null===(t=this.value)||void 0===t?void 0:t.timestamp)||null}async setClear(){return await this.handleInputClear(),Promise.resolve()}async getInput(){return this.inputElement}async isValid(){return this.getError()}async resetCaption(){return await l(10),await this.inputElement.resetCaption(),this.captionType="default",this.captionError=null,await l(10),Promise.resolve()}addZeroBefore(t){return(t<10?"0":"")+t}formatDate(t,e){const i={mm:this.addZeroBefore(t.getMonth()+1),dd:this.addZeroBefore(t.getDate()),yyyy:this.addZeroBefore(t.getFullYear()),hh:this.addZeroBefore(t.getHours()),mi:this.addZeroBefore(t.getMinutes())};return e.replace(/mm|dd|yyyy|hh|mi/gi,(t=>i[t]))}handleResize(){this.calculateLocation()}handleWheels(t){if(this._open){const e=document.querySelector(`#picker-vp-${this._id}`);e&&d.findEventPath(t,e)?this.calculateLocation():this._open=!1}}componentDidLoad(){const t=this.el.shadowRoot.querySelector(`#picker-vp-${this._id}`);t&&(document.body.appendChild(t),this.calculateLocation())}disconnectedCallback(){this.el.innerHTML="";const t=document.getElementById(`picker-vp-${this._id}`);t&&t.remove()}async calculateLocation(){const t=document.getElementById(`picker-vp-${this._id}`),e=this.placement.split("-");this.alignment&&(this.placement=e[0]+("right"==this.alignment?"-end":"-start"));var i=this.placement;const s=document.getElementById(this.linkedComponent?this.linkedComponent:this._id);if(s){const e=this.linkedComponent?s:s.shadowRoot.querySelector(`#picker-input-${this._id}`)||s.shadowRoot.querySelector("bcm-datetime-picker").shadowRoot.querySelector(`#picker-input-${this._id}`);if(t&&e){p(t,e,i,(t=>i=t)),await l(10);let s=u(i,e),a=this.noCaption?0:20,n=0;switch(p(t,e,i,(t=>i=t)),await l(10),s=u(i,e),t.style.top=this.linkedComponent?("top"==i.split("-")[0]?s[0]-t.offsetHeight:s[0])+"px":("top"==i.split("-")[0]?s[0]-t.offsetHeight+n:s[0]-a)+"px",i.split("-")[1]){case"start":t.style.left=s[1]+"px";break;case"center":t.style.left=s[1]-t.offsetWidth/2+"px";break;case"end":t.style.left=s[1]-t.offsetWidth+"px"}t.classList.toggle("bcm-list--top","top"==i.split("-")[0])}}}handleKeyDown(t){(t.keyCode||t.which)===m.KeyCode.escape&&this._open&&(this._open=!1,t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.markForCheck())}render(){const t=o("day-numbers"),e=o("datetime-picker","datetime-picker-wrapper",{open:this._open,"no-caption":this.noCaption}),i=o(this.hidden?"hidden":null,{"full-width":this.fullWidth,"linked-component":this.linkedComponent,"no-margin":this.noMargin}),n=o("toggle",{disabled:this.disabled}),h="time"==this.type?'<svg style="fill: #595959; width: 14px; height: 14px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z"/></svg>':'<svg style="fill: #595959; width: 14px; height: 14px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"/></svg>';return s(a,{class:i,"bcm-internal-id":this.inputId},this.label&&s("div",{class:"picker-label",onClick:()=>this.openToggle()},s(b,{size:"medium",type:this.captionType,value:this.label,required:this.required,htmlFor:this._id})),s("bcm-old-input",{ref:t=>this.inputElement=t,placeholder:this.placeholder||"Select "+(this.type===y.datetime?"date and time":"")+(this.type===y.date?"date":"")+(this.type===y.time?"time":"")+(this.type===y.range?"date range":""),value:this.valueText,required:this.required,fullWidth:this.fullWidth,disabled:this.disabled,name:this.name,id:this.inputId,clearable:this.clearable,onClick:()=>this.openPicker(),"no-margin":!0,disableWatchValue:!0,"on-bcm-clear":()=>this.handleInputClear(),"on-bcm-change":t=>this.handleInputChange(t),noCaption:this.noCaption,captionError:this.captionError,caption:this.caption,captionType:this.captionType},this.error&&s("span",{slot:"suffix"},s("span",{id:"error-icon",class:n,innerHTML:'<svg style="fill: #ef4444; width: 14px; height: 14px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm42-104c0 23.2-18.8 42-42 42s-42-18.8-42-42 18.8-42 42-42 42 18.8 42 42zm-81.4-211.4l6.8 136c.3 6.4 5.6 11.4 12 11.4h41.2c6.4 0 11.7-5.1 12-11.4l6.8-136c.3-6.9-5.1-12.6-12-12.6h-54.8c-6.9 0-12.4 5.7-12 12.6z"/></svg>',title:this.errorText})),s("span",{slot:"suffix",onClick:()=>this.openPicker()},s("span",{id:"calender-icon",class:n,innerHTML:h}))),s("div",{id:"picker-vp-"+this._id,class:e,onWheel:t=>this.handleWheel(t)},s("div",{class:"modules"},this.hasDateModule&&s("div",{class:"date-container"},s("div",{class:"bcm-datetime-picker__header"},s("span",null),s("div",{class:"month-year"},s("button",{onClick:()=>this.getPrevMonth()},s("bcm-icon",{icon:"far fa-chevron-left"})),s("div",{class:"month-year-wrapper"},s("span",{class:"month"},this.getMonthText()),",",s("span",{class:"year"},this.date.getFullYear())),s("button",{onClick:()=>this.getNextMonth()},s("bcm-icon",{icon:"far fa-chevron-right"}))),s("span",{class:"today",onClick:()=>this.setDateToday()},"Today")),s("div",{class:"bcm-datetime-picker__content"},s("div",{class:"years",ref:t=>this.yearsWrapperElement=t},s("div",{class:"items",ref:t=>this.yearsElement=t},this.years.map(((t,e)=>s("span",{onClick:()=>this.yearClick(e)},t)))),s("div",{class:"select-strip",ref:t=>this.yearsStripElement=t})),s("div",{class:"days"},s("div",{class:"day-labels"},s("span",null,"Mo"),s("span",null,"Tu"),s("span",null,"We"),s("span",null,"Th"),s("span",null,"Fr"),s("span",null,"Sa"),s("span",null,"Su")),s("div",{class:t},this.dayNumbers.map((t=>s("span",{class:{"is-disabled-date":(this.type===y.date||this.type===y.datetime)&&this.isDisabledDate(t.date),"not-this-month":!t.thisMonth,"is-weekend":t.isWeekend,today:t.today,selected:this.getSelected(t.date),"selected-start":this.getSelected(t.date)&&this.selectedEndDate&&this.type===y.range,"selected-end":this.getSelected(t.date,!0)&&this.type===y.range,range:this.getDateIsInRange(t.date)&&this.type===y.range},onClick:()=>this.handleDayNumber(t.date)},s("span",{class:"number"},t.day)))))))),this.hasTimeModule&&s("div",{class:"time-container"},s("div",{class:"bcm-datetime-picker__header"},s("div",{class:"month-year"},s("span",{class:"month"},this.getTimeText())),s("span",{class:"now",onClick:()=>{this.setTime(),"time"==this.type&&(this._open=!1)}},"Now")),s("div",{class:"bcm-datetime-picker__content",onDblClick:t=>{this.HourContentDblClick(t)}},s("div",{class:"hours",ref:t=>this.hoursWrapperElement=t},s("div",{class:"items",ref:t=>this.hoursElement=t},this.hours.map(((t,e)=>s("span",{class:this.currentDate.hour===t?"selected":"",onClick:()=>this.hourClick(e)},(t<10&&"0")+t))))),s("div",{class:"minutes",ref:t=>this.minutesWrapperElement=t},s("div",{class:"items",ref:t=>this.minutesElement=t},this.minutes.map(((t,e)=>s("span",{class:this.currentDate.minute===t?"selected":"",onClick:()=>this.minuteClick(e)},(t<10&&"0")+t))))),s("div",{class:"select-strip",ref:t=>this.timeStripElement=t}))))))}get el(){return n(this)}static get watchers(){return{_open:["openChanged","openChange"],renderDate:["renderDateChange"],value:["valueChange"],disabledDates:["disabledDatesChange"]}}};(function(t,e,i,s){var a,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(h=(n<3?a(h):n>3?a(e,i,h):a(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)})([g()],w.prototype,"el",void 0),w.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}:host{display:inline-flex;flex-direction:column;position:relative;width:100%;max-width:256px;margin:0;margin-bottom:8px}:host(.full-width){max-width:100%}:host(.no-margin){margin:0}:host(.hidden){display:none}:host(.linked-component){display:none}.toggle{cursor:pointer}.toggle.disabled{cursor:not-allowed}.modules{display:flex}.picker-label{user-select:none;line-height:1}.datetime-picker{position:absolute;top:-1000px;display:inline-flex;flex-direction:column;box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);opacity:0;visibility:hidden;transition:transform 0.2s ease, opacity 0.3s ease;transform:scale(0.8) translateY(-100px);background-color:#ffffff;min-height:356px;max-height:356px;box-sizing:border-box;z-index:-1000}.datetime-picker.alignment-left{left:0}.datetime-picker.alignment-right{right:0}.datetime-picker.open{top:calc(100% - 28px);z-index:10000;opacity:1;visibility:visible;transform:scale(1) translateY(0)}.datetime-picker.open.no-caption{top:100%}.actions{display:flex;align-items:center;justify-content:space-between;padding:8px;margin-top:auto;border-top:1px solid var(--bcm-color-grey-6)}.actions .current-date{font-size:14px;line-height:22px;color:var(--bcm-color-prime-blue-6);text-transform:capitalize}.date-container+.time-container{border-left:1px solid #cecece}.time-container{width:185px}.time-container .bcm-datetime-picker__header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;max-height:60px;border-bottom:1px solid var(--bcm-color-grey-4)}.time-container .bcm-datetime-picker__header .now{font-size:14px;line-height:22px;cursor:pointer;color:var(--bcm-color-prime-blue-6);user-select:none}.time-container .bcm-datetime-picker__content{position:relative;display:flex}.time-container .hours,.time-container .minutes,.time-container .time-period{position:relative;flex:1 1 100%;max-width:100%;height:280px;overflow:hidden}.time-container .hours .items>span,.time-container .minutes .items>span,.time-container .time-period .items>span{font-size:14px;color:var(--bcm-color-grey-8)}.time-container .hours .items>span.selected,.time-container .minutes .items>span.selected,.time-container .time-period .items>span.selected{color:var(--bcm-color-prime-blue-6)}.date-container{width:364px;}.date-container .bcm-datetime-picker__header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;max-height:60px;border-bottom:1px solid var(--bcm-color-grey-4)}.date-container .bcm-datetime-picker__header .month-year-wrapper{display:flex;align-items:center;justify-content:center;margin:0 4px;min-width:125px}.date-container .bcm-datetime-picker__header .month-year{font-size:16px;line-height:24px}.date-container .bcm-datetime-picker__header .month-year{display:flex;align-items:center}.date-container .bcm-datetime-picker__header .month-year button{display:flex;align-items:center;box-shadow:none;background:transparent;outline:none;appearance:none;border:none;color:var(--bcm-color-prime-blue-6);cursor:pointer}.date-container .bcm-datetime-picker__header .month{text-transform:capitalize}.date-container .bcm-datetime-picker__header .year{padding-left:4px}.date-container .bcm-datetime-picker__header .today{font-size:14px;line-height:22px;cursor:pointer;color:var(--bcm-color-prime-blue-6);user-select:none}.date-container .bcm-datetime-picker__content{display:flex}.date-container .years{position:relative;flex:0 0 70px;max-width:70px;height:280px;overflow:hidden;background-color:var(--bcm-color-grey-2)}.date-container .days{width:100%}.date-container .day-numbers,.date-container .day-labels{display:grid;grid-template-columns:repeat(7, 1fr)}.date-container .day-numbers{padding:24px 24px}.date-container .day-numbers>span,.date-container .day-labels span{text-align:center}.date-container .day-numbers>span{position:relative;padding-bottom:100%;cursor:pointer}.date-container .day-numbers>span.not-this-month{color:var(--bcm-color-grey-4)}.date-container .day-numbers>span.is-weekend{color:var(--bcm-color-prime-blue-3)}.date-container .day-numbers>span.is-disabled-date:not(.today){color:var(--bcm-color-grey-4);cursor:not-allowed}.date-container .day-numbers>span.is-disabled-date:not(.today):before{opacity:0 !important}.date-container .day-numbers>span.today{color:var(--bcm-color-prime-blue-6)}.date-container .day-numbers>span.today:before{opacity:1;background-color:var(--bcm-color-prime-blue-2);border:1px solid var(--bcm-color-prime-blue-6)}.date-container .day-numbers>span.selected-start{background:linear-gradient(90deg, white 50%, #8abde2 50%) !important}.date-container .day-numbers>span.selected-end{background:linear-gradient(90deg, #8abde2 50%, white 50%) !important}.date-container .day-numbers>span.range{background:#8abde2}.date-container .day-numbers>span.range:not(.today){color:#ffffff}.date-container .day-numbers>span.range:not(.today):before{background-color:var(--bcm-color-prime-blue-6)}.date-container .day-numbers>span.range.is-weekend:not(.today){color:var(--bcm-color-prime-blue-2)}.date-container .day-numbers>span.selected,.date-container .day-numbers>span.selected-end{color:#ffffff}.date-container .day-numbers>span.selected:before,.date-container .day-numbers>span.selected-end:before{opacity:1;background-color:var(--bcm-color-prime-blue-6)}.date-container .day-numbers.start-1>span:first-child{grid-column:1}.date-container .day-numbers.start-2>span:first-child{grid-column:2}.date-container .day-numbers.start-3>span:first-child{grid-column:3}.date-container .day-numbers.start-4>span:first-child{grid-column:4}.date-container .day-numbers.start-5>span:first-child{grid-column:5}.date-container .day-numbers.start-6>span:first-child{grid-column:6}.date-container .day-numbers.start-7>span:first-child{grid-column:7}.date-container .day-numbers>span:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;border-radius:50%;background-color:var(--bcm-color-grey-4);opacity:0;box-sizing:border-box}.date-container .day-numbers>span:hover.not-this-month:not(.is-weekend){color:var(--bcm-color-grey-6)}.date-container .day-numbers>span:hover:before{opacity:1}.date-container .day-numbers .number{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.date-container .day-labels{padding:24px 40px 0 40px}.date-container .day-labels span{font-size:12px;color:var(--bcm-color-grey-6)}.date-container .day-labels span:nth-child(7n+6),.date-container .day-labels span:nth-child(7n+7){color:var(--bcm-color-prime-blue-3)}.years .items,.hours .items,.minutes .items,.time-period .items{position:relative;display:flex;flex-direction:column;z-index:0;transform:translateY(0);scroll-behavior:smooth}.years .items>span,.hours .items>span,.minutes .items>span,.time-period .items>span{text-align:center;font-size:12px;min-height:26px;max-height:26px;line-height:26px;color:var(--bcm-color-grey-8);user-select:none}.years:before,.years:after,.hours:before,.hours:after,.minutes:before,.minutes:after,.time-period:before,.time-period:after{content:"";position:absolute;left:0;width:100%;height:40px}.years:before,.hours:before,.minutes:before,.time-period:before{top:-40px;box-shadow:0 10px 100px 70px #ffffff;z-index:1}.years:after,.hours:after,.minutes:after,.time-period:after{bottom:-40px;box-shadow:0 -10px 100px 70px #ffffff;z-index:2}.select-strip{position:absolute;width:100%;top:50%;left:0;transform:translateY(-50%);min-height:26px;max-height:26px;border:1px solid var(--bcm-color-grey-5);border-left:0;border-right:0;pointer-events:none;box-sizing:border-box}.bcm-label{font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-bottom:4px;font-weight:500;color:#475569}.bcm-label.tw-text-1{font-size:10px;line-height:18px}.bcm-label.tw-text-2{font-size:12px;line-height:20px}.bcm-label.tw-text-3{font-size:14px;line-height:22px}.bcm-caption-area{color:#dc2626;font-weight:400;justify-content:space-between;align-items:flex-start;flex-direction:row;min-height:20px;display:flex;margin-top:4px;font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.bcm-caption-area.tw-text-1{font-size:10px;line-height:18px}.bcm-caption-area.tw-text-2{font-size:12px;line-height:20px}.bcm-caption-area.tw-text-3{font-size:14px;line-height:22px}.picker-input-container{display:flex;flex-direction:column;align-items:flex-start;justify-content:stretch}';export{w as bcm_datetime_picker}
5
+ import{r as t,c as e,f as i,h as s,H as a,g as n}from"./p-170cf07d.js";import{D as h,E as r}from"./p-6f861fed.js";import{c as o}from"./p-64fad38b.js";import{D as c}from"./p-626a65e9.js";import{d as l}from"./p-6f2e4c9b.js";import{G as d}from"./p-9ba753bf.js";import{a as m}from"./p-a313fba6.js";import{g as p,s as u}from"./p-2d0ff35e.js";import{L as b}from"./p-43c578cf.js";import{I as g}from"./p-9850cbce.js";import"./p-85eedabc.js";import"./p-3ba6c610.js";import"./p-a2df6c19.js";import"./p-d65bc842.js";var f,x,y;!function(t){t.january="january",t.february="february",t.march="march",t.april="april",t.may="may",t.june="june",t.july="july",t.august="august",t.september="september",t.october="october",t.november="november",t.december="december"}(f||(f={})),function(t){t.sunday="sunday",t.monday="monday",t.tuesday="tuesday",t.wednesday="wednesday",t.thursday="thursday",t.friday="friday",t.saturday="saturday"}(x||(x={})),function(t){t.datetime="datetime",t.range="range",t.date="date",t.time="time"}(y||(y={}));const v=JSON.stringify,w=class{constructor(i){t(this,i),this.load=e(this,"bcm-load",7),this.change=e(this,"bcm-change",7),this.bcmOpen=e(this,"bcm-open",7),this.inputId=null,this.emptyState=!1,this.initialized=!1,this.disabledDatesList={min:null,max:null,dates:[]},this.dayNumbers=[],this.valueText=null,this.dataIsValid=!1,this._id=d.UID(),this.date=new Date,this.endDate=null,this.type=y.datetime,this.disabled=!1,this.disabledDates="",this.value=null,this._open=!1,this.hidden=!1,this.name=void 0,this.fullWidth=!1,this.required=!1,this.label=void 0,this.placeholder=void 0,this.minYear=1900,this.maxYear=2200,this.noCaption=!1,this.noMargin=!1,this.captionError=void 0,this.caption="",this.captionType="default",this.alignment=void 0,this.placement=m.Placement["bottom-start"],this.linkedComponent=void 0,this.clearable=!1,this.years=[],this.hours=[],this.minutes=[],this.hasDateModule=!1,this.hasTimeModule=!1,this.renderDate=void 0,this.selectedDate=void 0,this.selectedEndDate=void 0,this.error=!1,this.errorText="",this.tick={}}markForCheck(){this.tick=d.UID()}openChanged(){this.bcmOpen.emit(this._open)}componentWillLoad(){if(this.inputId="picker-input-"+this._id,this.hasDateModule=this.type===y.datetime||this.type===y.date||this.type===y.range,this.hasTimeModule=this.type===y.datetime||this.type===y.time,this.prepareDisabledDates(),this.setData(),!this.initialized){for(let t=this.minYear;t<=this.maxYear;t++)this.years.push(t);for(let t=0;t<=23;t++)this.hours.push(t);for(let t=0;t<=59;t++)this.minutes.push(t);this.load.emit()}this.initialized=!0}componentDidRender(){this.hasDateModule&&!this.yearsDragger&&(this.createDragSelection("years",this.yearsElement,this.yearsWrapperElement,this.yearsStripElement,h.y),this.createWheelChange("years",this.yearsWrapperElement,this.yearsStripElement),this.setDragSelection("years",this.currentDate.year)),this.hasTimeModule&&!this.hoursDragger&&(this.createDragSelection("hours",this.hoursElement,this.hoursWrapperElement,this.timeStripElement,h.y),this.createWheelChange("hours",this.hoursWrapperElement,this.timeStripElement),this.setDragSelection("hours",this.currentDate.hour)),this.hasTimeModule&&!this.minutesDragger&&(this.createDragSelection("minutes",this.minutesElement,this.minutesWrapperElement,this.timeStripElement,h.y),this.createWheelChange("minutes",this.minutesWrapperElement,this.timeStripElement),this.setDragSelection("minutes",this.currentDate.minute))}renderDateChange(){this.initialized&&(this.setData(),this.hasDateModule&&this.setDragSelection("years",this.currentDate.year))}openChange(t){t&&(this.calculateLocation(),this.hasDateModule&&(this.createDragSelection("years",this.yearsElement,this.yearsWrapperElement,this.yearsStripElement,h.y),this.createWheelChange("years",this.yearsWrapperElement,this.yearsStripElement),this.setDragSelection("years",this.currentDate.year)),this.hasTimeModule&&(this.createDragSelection("hours",this.hoursElement,this.hoursWrapperElement,this.timeStripElement,h.y),this.createWheelChange("hours",this.hoursWrapperElement,this.timeStripElement),this.setDragSelection("hours",this.currentDate.hour,!0)),this.hasTimeModule&&(this.createDragSelection("minutes",this.minutesElement,this.minutesWrapperElement,this.timeStripElement,h.y),this.createWheelChange("minutes",this.minutesWrapperElement,this.timeStripElement),this.setDragSelection("minutes",this.currentDate.minute,!0)),this.markForCheck(),i(this.el))}valueChange(t,e){const i={isValid:!1,value:this.valueText};if(t)if(this.type!==y.range&&this.error)this.change.emit({isValid:!1,value:this.inputElement.value});else try{if((e&&v(t.dateObject)!==v(e.dateObject)||!e&&t)&&(this.type!==y.date&&this.type!==y.datetime||this.change.emit(t),this.type===y.time&&this.change.emit(t),this.type===y.range)){const e=t.dateObject;e.start.date&&e.end.date?t.isValid&&this.change.emit({isValid:t.isValid,value:t.value,start:e.start,end:e.end}):this.change.emit(i)}}catch(t){}else this.change.emit()}disabledDatesChange(t){t&&this.prepareDisabledDates()}stringToDate(t){return t.getMonth?t:new Date(Date.parse(this.switchDDMM(t)))}dateToString(t){if(!(t instanceof Date))return!1}switchDDMM(t){if(!t)return;const e=t.split("/");return-1===t.indexOf("/")||3!==e.length?t:`${e[1]}/${e[0]}/${e[2]}`}setData(){this.date=this.stringToDate(this.date),this.initialized||this.renderDate||(this.renderDate=this.date&&this.date||new Date),!this.initialized&&this.endDate&&(this.selectedEndDate=this.stringToDate(this.endDate));const t=this.renderDate;if(this.currentDate=this.createDateObject(t),this.dayNumbers=this.getMonthDayNumbers(t).map((e=>({day:e,thisMonth:!0,isWeekend:this.getDayIsWeekend(t,e),today:this.getIsCurrentDate(t,e),date:this.getTargetDayDate(t,e)}))),this.currentDate.year>this.minYear){let e=new Date(new Date(t).setMonth(this.currentDate.month-1,1)),i=this.getMonthDayNumbers(e).reverse(),s=this.currentDate.monthFirstDay;for(let t=1;t<(0===s?7:s);t++){const s=i[t-1];this.dayNumbers.unshift({day:s,prevMonth:!0,isWeekend:this.getDayIsWeekend(e,s),date:this.getTargetDayDate(e,s)})}}if(this.currentDate.year<this.maxYear){let e=new Date(new Date(t).setMonth(this.currentDate.month+1)),i=this.getMonthDayNumbers(e),s=42-this.dayNumbers.length;for(let t=0;t<s;t++){const s=i[t];this.dayNumbers.push({day:s,nextMonth:!0,isWeekend:this.getDayIsWeekend(e,s),date:this.getTargetDayDate(e,s)})}}this.emptyState||(this.valueText=this.getValueText()),i(this.el)}prepareDisabledDates(){if(!this.disabledDates)return;let t=null;if("string"==typeof this.disabledDates)try{t=JSON.parse(this.disabledDates)}catch(t){return}else t=this.disabledDates;if(t.dates&&t.dates.length&&t.dates.length){const e=t.dates.map((t=>{const e=new Date(t);return"invalid date"===e.toString().toLowerCase()?null:e})).filter((t=>t));this.disabledDatesList.dates=e}if(t.min&&t.max&&(t.min.getTime()>t.max.getTime()||t.max.getTime()<t.min.getTime()))return;t.min&&t.min instanceof Date?this.disabledDatesList.min=new Date(t.min.toDateString()):delete this.disabledDatesList.min,t.max&&t.max instanceof Date?this.disabledDatesList.max=new Date(t.max.toDateString()):delete this.disabledDatesList.max;const e=this.inputElement&&this.inputElement.value;e&&this.setDataFromText(e)}createWheelChange(t,e,i){e.addEventListener("wheel",(e=>{const s=e.deltaY>0,a=this[t+"Dragger"].getOffset().top,n=this.getTargetChildByDragPosition({y:a},i);let h=s?n+1:n-1;h<0?h=0:void 0===this[t][h]&&(h=this[t].length-1),"time"!=this.type||this.selectedDate||this.setTime(),this.setDragSelection(t,this[t][h],!0,!0)}))}createDragSelection(t,e,i,s,a){const n=t+"Dragger";this[n]=new r({target:e,trigger:i,direction:a,useTransform:!0,limit:{y:{max:s.offsetTop-s.offsetHeight/2,min:-1*(e.offsetHeight-(s.offsetTop+s.offsetHeight/2))}}}),this[n].on("end",(e=>{const i=this.getTargetChildByDragPosition(e,s);this.selectTargetChildByDragIdx(i,s,this[n]),this.setDragSelection(t,this[t][i],!1)}))}getTargetChildByDragPosition({y:t},e){const i=e.offsetHeight,s=i/2;return Math.floor(-(t-(e.offsetTop-s)-s)/i)}selectTargetChildByDragIdx(t,e,i,s=!0){i.setPosition({y:e.offsetHeight/2+e.offsetTop-(t+1)*e.offsetHeight,anim:s})}setDragSelection(t,e,i=!0,s=!1){const a=this[t].findIndex((t=>t===e));switch(i&&this.selectTargetChildByDragIdx(a,this["years"===t?t+"StripElement":"timeStripElement"],this[t+"Dragger"],s),t){case"years":this.date.setFullYear(e);break;case"hours":this.date.setHours(e);break;case"minutes":this.date.setMinutes(e)}this.renderDate=this.date,this.setData(),this.selectedDate&&this.setValue()}getHours12(){const t=(this.date.getHours()+24)%12||12;return t>12?t-12:t}createDateObject(t,{excludeTime:e=!1,exactMonthNumber:i=!1}={}){const s=t.getFullYear();return Object.assign(Object.assign({year:s>=this.maxYear?this.maxYear:s<=this.minYear?this.minYear:s,day:t.getDate(),month:t.getMonth()+(i?1:0),dayOfWeek:t.getDay(),monthFirstDay:new Date(new Date(t).setDate(1)).getDay()},!e&&{hour:t.getHours()}),!e&&{minute:t.getMinutes()})}generateDaysArrayFromMax(t){return Array.from(Array(t+1).keys()).slice(1)}getMonthDayNumbers(t){const e=this.getDaysInMonth(t.getMonth(),t.getFullYear());return this.generateDaysArrayFromMax(e)}getTargetDayDate(t,e){return new Date(new Date(t).setDate(e))}getDayIsWeekend(t,e){const i=new Date(new Date(t).setDate(e)).getDay();return 6===i||0===i}getClock(t){return{hours:(t=t||new Date).getHours(),minutes:t.getMinutes(),seconds:t.getSeconds(),milis:t.getMilliseconds()}}setValue(t){var e,i,s;const a=new Date(this.date.setHours(Number(this.currentDate.hour),Number(this.currentDate.minute)));if(t)this.value=null;else{if(this.dataIsValid=!0,this.type===y.datetime){const t=Object.assign({},this.currentDate);t.month+=1,(null===(e=this.value)||void 0===e?void 0:e.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),dateObject:t,value:this.valueText})}if(this.type===y.date){const t=Object.assign({},this.currentDate);delete t.hour,delete t.minute,t.month+=1,(null===(i=this.value)||void 0===i?void 0:i.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),dateObject:t,value:this.valueText})}if(this.type===y.time){const t=this.getTimeText(),e=Object.assign({},this.currentDate);e.month+=1,this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),time:t,dateObject:e,timeObject:{hours:this.currentDate.hour,minutes:this.currentDate.minute},value:t},this.inputElement.value=t}this.type===y.range&&(null===(s=this.value)||void 0===s?void 0:s.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,dateObject:{start:Object.assign({},this.selectedDate&&{date:this.selectedDate,timestamp:this.selectedDate.getTime(),detail:this.createDateObject(this.selectedDate,{excludeTime:!0,exactMonthNumber:!0})}),end:Object.assign({},this.selectedEndDate&&{date:this.selectedEndDate,timestamp:this.selectedEndDate.getTime(),detail:this.createDateObject(this.selectedEndDate,{excludeTime:!0,exactMonthNumber:!0})})},value:this.valueText})}}setMonth(t){this.renderDate.setDate(1),this.renderDate=new Date(this.renderDate.setMonth(t)),this.setDragSelection("years",this.currentDate.year)}checkRangeValidation({popupClosing:t=!1}={}){return this.type!==y.range||(t&&(!this.selectedDate||this.selectedDate&&!this.selectedEndDate)?(this.setError(!0,"date range invalid"),!1):(t||this.setError(!1),!0))}pad(t,e){return t<e?"0":""}isInputClearable(){return!(!this.inputElement||!this.inputElement.value)}isDisabledDate(t){if(this.disabledDatesList.dates.map((e=>this.isSameDate(e,t))).filter((t=>t)).length)return!0;if(this.disabledDatesList.min){const e=new Date(this.disabledDatesList.min);if(e&&e.getTime()>t.getTime())return!0}if(this.disabledDatesList.max){const e=new Date(this.disabledDatesList.max);if(e&&new Date(e.setDate(e.getDate()+1)).getTime()<t.getTime())return!0}}setDate(t,e,i=!1){const s=this.type===y.range,a=!!this.selectedEndDate;if((this.type!==y.date&&this.type!==y.datetime||!this.isDisabledDate(t))&&(this.emptyState=!1,(!s||s&&!a)&&(this.date=new Date(t.setHours(this.currentDate.hour,this.currentDate.minute))),s&&this.checkRangeValidation(),s&&this.selectedDate&&this.selectedEndDate&&(this.selectedDate=null,this.selectedEndDate=null),e)){const e=new Date(t);s&&this.selectedDate?this.selectedDate.getTime()>e.getTime()?(this.selectedEndDate=this.selectedDate)&&(this.selectedDate=e):this.selectedEndDate=e:this.selectedDate=e,!s&&(this._open=i),this.renderDate=this.date,this.valueText=this.getValueText(),this.setValue();const a=this.valueText.split("/"),n=this.valueText?this.changeFormat(new Date(a[1]+"/"+a[0]+"/"+a[2])):"";this.inputElement.value=n}}setDataFromText(t,e=!1,i=!0){let s=!1,a="";const n=this.parse(t);if(this.type!==y.date&&this.type!==y.datetime||!this.isDisabledDate(n.date)||(n.dateIsValid=!1,a="disabled-date"),this.type===y.datetime&&n.dateIsValid&&n.timeIsValid&&(e&&this.setDate(n.date,!0,i),e&&this.setTime(n.timeSections[0],n.timeSections[1]),s=!0),this.type===y.date&&n.dateIsValid&&(e&&this.setDate(n.date,!0,i),s=!0),this.type===y.time&&n.timeIsValid&&(e&&this.setTime(n.timeSections[0],n.timeSections[1]),s=!0),this.type===y.range&&(n.dateIsValid&&!this.selectedDate&&(e&&this.setDate(n.date,!0,i),s=!0),n.date2IsValid&&!this.selectedEndDate&&(e&&this.setDate(n.date2,!0,i),s=!0),this.selectedDate&&this.selectedEndDate&&n.rangeIsValid&&(this.isSameDate(n.date2,this.selectedEndDate)&&!this.isSameDate(n.date,this.selectedDate)&&(this.selectedDate=null,e&&this.setDate(n.date,!0,i),s=!0),this.isSameDate(n.date,this.selectedDate)&&!this.isSameDate(n.date2,this.selectedEndDate)&&(this.selectedEndDate=null,e&&this.setDate(n.date2,!0,i),s=!0)),this.selectedDate&&this.selectedEndDate&&!n.rangeIsValid&&e&&(this.selectedDate=null,this.selectedEndDate=null)),s)e&&(this.renderDate=this.date),this.setError(!1);else{this.type===y.range&&this.selectedDate&&this.selectedEndDate&&n.rangeIsValid?this.setError(!1):a?this.setError(!0,"disabled-date"===a&&"selected date is not allowed"):(t&&this.setError(!0,(this.type===y.datetime?"invalid date or time":this.type===y.range&&"invalid date range")||this.type===y.date&&"The selected date is not allowed."||this.type===y.time&&"invalid time"),this.setValue(!0));const e=t.split("/"),i=t&&!this.error?this.changeFormat(new Date(e[1]+"/"+e[0]+"/"+e[2])):"";this.inputElement.value=i}}setDateToday(){const t=new Date;this.type===y.range&&(this.selectedDate=null,this.selectedEndDate=null),this.setDate(t,!0,!1)}HourContentDblClick(t){const e=d.findEventPathWithNodeName(t,"SPAN");e&&e.classList.contains("selected")&&(this.setValue(),this._open=!1)}setTime(t,e){this.renderDate=new Date(this.date.setHours(Number(t||this.getClock().hours),Number(e||this.getClock().minutes))),this.type===y.time&&(this.selectedDate=this.date);const i=this.currentDate.hour||(new Date).getHours(),s=0==this.currentDate.minute?0:this.currentDate.minute||(new Date).getMinutes();this.setDragSelection("hours",i,!0,!0),this.setDragSelection("minutes",s,!0,!0)}setError(t=!1,e=""){this.error=t,this.errorText=t?e:""}getError(){const{error:t,errorText:e}=this;return{valid:!t,error:t,errorText:e}}getDaysInMonth(t,e){return new Date(e,t+1,0).getDate()}getIsCurrentDate(t,e){const i=new Date;return i.getDate()===e&&i.getMonth()===t.getMonth()&&i.getFullYear()===t.getFullYear()}isSameDate(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}getSelected(t,e=!1){const i=new Date(this["selected"+(e?"EndDate":"Date")]),s=i.getFullYear(),a=i.getMonth(),n=i.getDate();return t.getDate()===n&&t.getMonth()===a&&t.getFullYear()===s}getDateIsInRange(t){if(this.type!==y.range||!this.selectedDate||!this.selectedEndDate)return;const e=t.getTime(),i=this.selectedDate.getTime(),s=this.selectedEndDate.getTime();return e>i&&e<s}getMonthText(){return Object.values(f)[this.renderDate.getMonth()]}getCurrentDateText(){const t=Object.values(x)[this.currentDate.dayOfWeek],e=Object.values(f)[this.currentDate.month];return`${t}, ${this.currentDate.day}th ${e} ${this.currentDate.year}`}getTimeText(){const{hour:t,minute:e}=this.currentDate;return`${t<10?"0"+t:t}:${e<10?"0"+e:e}`}getValueText(){if(!this.selectedDate)return"";const t=this.selectedDate,e=t.getFullYear(),i=t.getDate(),s=t.getMonth()+1;let a="";if(this.type!==y.date&&this.type!==y.datetime||(a=`${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`),this.type===y.time&&(a=this.getTimeText()),this.type===y.datetime&&(a=`${a} ${this.getTimeText()}`),this.type===y.range&&(a=`${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`),this.type===y.range&&this.selectedEndDate){const t=this.selectedEndDate,e=t.getFullYear(),i=t.getDate(),s=t.getMonth()+1;a+=`-${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`}return this.setDataFromText(a),a}parseDate(t){var e=t.split("/"),i=parseInt(e[0],10),s=parseInt(e[1],10)-1,a=parseInt(e[2],10);if(isNaN(i)||isNaN(s)||isNaN(a))return"invalid date";var n=new Date(a,s,i);return n.getDate()!==i||n.getMonth()!==s||n.getFullYear()!==a?"invalid date":n}parse(t){const e=t.split(this.type===y.range?"-":" "),i=this.switchDDMM(e[0]),s=this.switchDDMM(e[1]),a=this.type===y.datetime?e[1]:e[0],n=new Date(i),h=new Date(s),r="invalid date"!==n.toString().toLowerCase()&&"invalid date"!==this.parseDate(t),o="invalid date"!==h.toString().toLowerCase(),c=/^((0?[1-9]|1[0-2])(-|\/)(0?[1-9]|[12]\d|3[01])(-|\/)[12]\d{3})$/,l=c.test(i),d=c.test(s),m=/\b([01][0-9]|2[0-3]):([0-5][0-9])\b/.test(a),p=r&&l,u=o&&d;return{date:n,date2:h,timeSections:m?a.split(":"):"",dateIsValid:p,date2IsValid:u,rangeIsValid:p&&u,timeIsValid:m}}getPrevMonth(){this.setMonth(this.renderDate.getMonth()-1)}getNextMonth(){this.setMonth(this.renderDate.getMonth()+1)}yearClick(t){this.yearsDragger.busy||this.setDragSelection("years",this.years[t],!0,!0)}hourClick(t){this.hoursDragger.busy||(this.selectedDate||this.setTime(),this.setDragSelection("hours",this.hours[t],!0,!0))}minuteClick(t){this.minutesDragger.busy||(this.selectedDate||this.setTime(),this.setDragSelection("minutes",this.minutes[t],!0,!0))}openPicker(){this.disabled||!this._open&&(this._open=!0)}handleDayNumber(t){this.type===y.range&&this.selectedDate&&!this.selectedEndDate&&this.isSameDate(this.selectedDate,t)||this.setDate(t,!0)}handleInputInput(t){this.setDataFromText(t,!0)}handleInputChange(t){this.setDataFromText(this.inputElement.value,!0,!1),t.stopPropagation()}async handleInputClear(){return this.selectedDate=null,this.selectedEndDate=null,this.emptyState=!0,this.renderDate=new Date,this._open=!1,this.setValue(!0),this.setError(),this.getValueText(),await this.inputElement.setClear(),await l(10),Promise.resolve()}handleWheel(t){t.preventDefault()}handleWindowClick(t){if(this._open){const e=document.getElementById(`picker-vp-${this._id}`),i=d.findEventPath(t,this.el),s=!!e&&d.findEventPath(t,e);i||s||(this._open=!1)}}openToggle(){this.disabled||(this._open=!this._open)}async open(){await l(50),this.openToggle()}async close(){this._open=!1}async getValue(){return this.value}async setDisabled(t){this.disabled=t}changeFormat(t,e=!1){if(!t)return;const i=t=>t<10?`0${t}`:t,s=i(new Date(t).getDate()),a=i(new Date(t).getMonth()+1),n=new Date(t).getFullYear(),h=i(new Date(t).getHours()),r=i(new Date(t).getMinutes());return"range"==this.type||"date"==this.type?e?`${a}/${s}/${n}`:`${s}/${a}/${n}`:e?`${a}/${s}/${n} ${h}:${r}`:`${s}/${a}/${n} ${h}:${r}`}isTime(t){return/^([0-1]?[0-9]|2[0-4]):([0-5][0-9])(:[0-5][0-9])?$/.test(t)}getHHMM(t){if(!t)return;const e=t=>t<10?`0${t}`:t;return`${e(new Date(t).getHours())}:${e(new Date(t).getMinutes())}`}async set(t){if(t)if("number"==typeof t&&(t=new Date(t)),"time"==this.type){let e=t;this.isTime(t)||(e=this.getHHMM(t)),this.setDataFromText(e,!0,!1)}else{const i=t.toString().split("-"),s=Date.parse(i[0]);if(i[0]&&!isNaN(s)){var e=this.changeFormat(c.convertTimeStampToDate(new Date(i[0]).getTime()));i[1]&&!isNaN(Date.parse(i[1]))&&(e=e+"-"+this.changeFormat(c.convertTimeStampToDate(new Date(i[1]).getTime()))),this.setDataFromText(e,!0,!1)}else this.setDataFromText("",!0,!1)}else this.setClear()}async get(){var t;return(null===(t=this.value)||void 0===t?void 0:t.timestamp)||null}async setClear(){return await this.handleInputClear(),Promise.resolve()}async getInput(){return this.inputElement}async isValid(){return this.getError()}async resetCaption(){return await l(10),await this.inputElement.resetCaption(),this.captionType="default",this.captionError=null,await l(10),Promise.resolve()}addZeroBefore(t){return(t<10?"0":"")+t}formatDate(t,e){const i={mm:this.addZeroBefore(t.getMonth()+1),dd:this.addZeroBefore(t.getDate()),yyyy:this.addZeroBefore(t.getFullYear()),hh:this.addZeroBefore(t.getHours()),mi:this.addZeroBefore(t.getMinutes())};return e.replace(/mm|dd|yyyy|hh|mi/gi,(t=>i[t]))}handleResize(){this.calculateLocation()}handleWheels(t){if(this._open){const e=document.querySelector(`#picker-vp-${this._id}`);e&&d.findEventPath(t,e)?this.calculateLocation():this._open=!1}}componentDidLoad(){const t=this.el.shadowRoot.querySelector(`#picker-vp-${this._id}`);t&&(document.body.appendChild(t),this.calculateLocation())}disconnectedCallback(){this.el.innerHTML="";const t=document.getElementById(`picker-vp-${this._id}`);t&&t.remove()}async calculateLocation(){const t=document.getElementById(`picker-vp-${this._id}`),e=this.placement.split("-");this.alignment&&(this.placement=e[0]+("right"==this.alignment?"-end":"-start"));var i=this.placement;const s=document.getElementById(this.linkedComponent?this.linkedComponent:this._id);if(s){const e=this.linkedComponent?s:s.shadowRoot.querySelector(`#picker-input-${this._id}`)||s.shadowRoot.querySelector("bcm-datetime-picker").shadowRoot.querySelector(`#picker-input-${this._id}`);if(t&&e){p(t,e,i,(t=>i=t)),await l(10);let s=u(i,e),a=this.noCaption?0:20,n=0;switch(p(t,e,i,(t=>i=t)),await l(10),s=u(i,e),t.style.top=this.linkedComponent?("top"==i.split("-")[0]?s[0]-t.offsetHeight:s[0])+"px":("top"==i.split("-")[0]?s[0]-t.offsetHeight+n:s[0]-a)+"px",i.split("-")[1]){case"start":t.style.left=s[1]+"px";break;case"center":t.style.left=s[1]-t.offsetWidth/2+"px";break;case"end":t.style.left=s[1]-t.offsetWidth+"px"}t.classList.toggle("bcm-list--top","top"==i.split("-")[0])}}}handleKeyDown(t){(t.keyCode||t.which)===m.KeyCode.escape&&this._open&&(this._open=!1,t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.markForCheck())}render(){const t=o("day-numbers"),e=o("datetime-picker","datetime-picker-wrapper",{open:this._open,"no-caption":this.noCaption}),i=o(this.hidden?"hidden":null,{"full-width":this.fullWidth,"linked-component":this.linkedComponent,"no-margin":this.noMargin}),n=o("toggle",{disabled:this.disabled}),h="time"==this.type?'<svg style="fill: #595959; width: 14px; height: 14px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z"/></svg>':'<svg style="fill: #595959; width: 14px; height: 14px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"/></svg>';return s(a,{class:i,"bcm-internal-id":this.inputId},this.label&&s("div",{class:"picker-label",onClick:()=>this.openToggle()},s(b,{size:"medium",type:this.captionType,value:this.label,required:this.required,htmlFor:this._id})),s("bcm-old-input",{ref:t=>this.inputElement=t,placeholder:this.placeholder||"Select "+(this.type===y.datetime?"date and time":"")+(this.type===y.date?"date":"")+(this.type===y.time?"time":"")+(this.type===y.range?"date range":""),value:this.valueText,required:this.required,fullWidth:this.fullWidth,disabled:this.disabled,name:this.name,id:this.inputId,clearable:this.clearable,onClick:()=>this.openPicker(),"no-margin":!0,disableWatchValue:!0,"on-bcm-clear":()=>this.handleInputClear(),"on-bcm-change":t=>this.handleInputChange(t),noCaption:this.noCaption,captionError:this.captionError,caption:this.caption,captionType:this.captionType},this.error&&s("span",{slot:"suffix"},s("span",{id:"error-icon",class:n,innerHTML:'<svg style="fill: #ef4444; width: 14px; height: 14px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm42-104c0 23.2-18.8 42-42 42s-42-18.8-42-42 18.8-42 42-42 42 18.8 42 42zm-81.4-211.4l6.8 136c.3 6.4 5.6 11.4 12 11.4h41.2c6.4 0 11.7-5.1 12-11.4l6.8-136c.3-6.9-5.1-12.6-12-12.6h-54.8c-6.9 0-12.4 5.7-12 12.6z"/></svg>',title:this.errorText})),s("span",{slot:"suffix",onClick:()=>this.openPicker()},s("span",{id:"calender-icon",class:n,innerHTML:h}))),s("div",{id:"picker-vp-"+this._id,class:e,onWheel:t=>this.handleWheel(t)},s("div",{class:"modules"},this.hasDateModule&&s("div",{class:"date-container"},s("div",{class:"bcm-datetime-picker__header"},s("span",null),s("div",{class:"month-year"},s("button",{onClick:()=>this.getPrevMonth()},s("bcm-icon",{icon:"far fa-chevron-left"})),s("div",{class:"month-year-wrapper"},s("span",{class:"month"},this.getMonthText()),",",s("span",{class:"year"},this.date.getFullYear())),s("button",{onClick:()=>this.getNextMonth()},s("bcm-icon",{icon:"far fa-chevron-right"}))),s("span",{class:"today",onClick:()=>this.setDateToday()},"Today")),s("div",{class:"bcm-datetime-picker__content"},s("div",{class:"years",ref:t=>this.yearsWrapperElement=t},s("div",{class:"items",ref:t=>this.yearsElement=t},this.years.map(((t,e)=>s("span",{onClick:()=>this.yearClick(e)},t)))),s("div",{class:"select-strip",ref:t=>this.yearsStripElement=t})),s("div",{class:"days"},s("div",{class:"day-labels"},s("span",null,"Mo"),s("span",null,"Tu"),s("span",null,"We"),s("span",null,"Th"),s("span",null,"Fr"),s("span",null,"Sa"),s("span",null,"Su")),s("div",{class:t},this.dayNumbers.map((t=>s("span",{class:{"is-disabled-date":(this.type===y.date||this.type===y.datetime)&&this.isDisabledDate(t.date),"not-this-month":!t.thisMonth,"is-weekend":t.isWeekend,today:t.today,selected:this.getSelected(t.date),"selected-start":this.getSelected(t.date)&&this.selectedEndDate&&this.type===y.range,"selected-end":this.getSelected(t.date,!0)&&this.type===y.range,range:this.getDateIsInRange(t.date)&&this.type===y.range},onClick:()=>this.handleDayNumber(t.date)},s("span",{class:"number"},t.day)))))))),this.hasTimeModule&&s("div",{class:"time-container"},s("div",{class:"bcm-datetime-picker__header"},s("div",{class:"month-year"},s("span",{class:"month"},this.getTimeText())),s("span",{class:"now",onClick:()=>{this.setTime(),"time"==this.type&&(this._open=!1)}},"Now")),s("div",{class:"bcm-datetime-picker__content",onDblClick:t=>{this.HourContentDblClick(t)}},s("div",{class:"hours",ref:t=>this.hoursWrapperElement=t},s("div",{class:"items",ref:t=>this.hoursElement=t},this.hours.map(((t,e)=>s("span",{class:this.currentDate.hour===t?"selected":"",onClick:()=>this.hourClick(e)},(t<10&&"0")+t))))),s("div",{class:"minutes",ref:t=>this.minutesWrapperElement=t},s("div",{class:"items",ref:t=>this.minutesElement=t},this.minutes.map(((t,e)=>s("span",{class:this.currentDate.minute===t?"selected":"",onClick:()=>this.minuteClick(e)},(t<10&&"0")+t))))),s("div",{class:"select-strip",ref:t=>this.timeStripElement=t}))))))}get el(){return n(this)}static get watchers(){return{_open:["openChanged","openChange"],renderDate:["renderDateChange"],value:["valueChange"],disabledDates:["disabledDatesChange"]}}};(function(t,e,i,s){var a,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(h=(n<3?a(h):n>3?a(e,i,h):a(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)})([g()],w.prototype,"el",void 0),w.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}:host{display:inline-flex;flex-direction:column;position:relative;width:100%;max-width:256px;margin:0;margin-bottom:8px}:host(.full-width){max-width:100%}:host(.no-margin){margin:0}:host(.hidden){display:none}:host(.linked-component){display:none}.toggle{cursor:pointer}.toggle.disabled{cursor:not-allowed}.modules{display:flex}.picker-label{user-select:none;line-height:1}.datetime-picker{position:absolute;top:-1000px;display:inline-flex;flex-direction:column;box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);opacity:0;visibility:hidden;transition:transform 0.2s ease, opacity 0.3s ease;transform:scale(0.8) translateY(-100px);background-color:#ffffff;min-height:356px;max-height:356px;box-sizing:border-box;z-index:-1000}.datetime-picker.alignment-left{left:0}.datetime-picker.alignment-right{right:0}.datetime-picker.open{top:calc(100% - 28px);z-index:10000;opacity:1;visibility:visible;transform:scale(1) translateY(0)}.datetime-picker.open.no-caption{top:100%}.actions{display:flex;align-items:center;justify-content:space-between;padding:8px;margin-top:auto;border-top:1px solid var(--bcm-color-grey-6)}.actions .current-date{font-size:14px;line-height:22px;color:var(--bcm-color-prime-blue-6);text-transform:capitalize}.date-container+.time-container{border-left:1px solid #cecece}.time-container{width:185px}.time-container .bcm-datetime-picker__header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;max-height:60px;border-bottom:1px solid var(--bcm-color-grey-4)}.time-container .bcm-datetime-picker__header .now{font-size:14px;line-height:22px;cursor:pointer;color:var(--bcm-color-prime-blue-6);user-select:none}.time-container .bcm-datetime-picker__content{position:relative;display:flex}.time-container .hours,.time-container .minutes,.time-container .time-period{position:relative;flex:1 1 100%;max-width:100%;height:280px;overflow:hidden}.time-container .hours .items>span,.time-container .minutes .items>span,.time-container .time-period .items>span{font-size:14px;color:var(--bcm-color-grey-8)}.time-container .hours .items>span.selected,.time-container .minutes .items>span.selected,.time-container .time-period .items>span.selected{color:var(--bcm-color-prime-blue-6)}.date-container{width:364px;}.date-container .bcm-datetime-picker__header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;max-height:60px;border-bottom:1px solid var(--bcm-color-grey-4)}.date-container .bcm-datetime-picker__header .month-year-wrapper{display:flex;align-items:center;justify-content:center;margin:0 4px;min-width:125px}.date-container .bcm-datetime-picker__header .month-year{font-size:16px;line-height:24px}.date-container .bcm-datetime-picker__header .month-year{display:flex;align-items:center}.date-container .bcm-datetime-picker__header .month-year button{display:flex;align-items:center;box-shadow:none;background:transparent;outline:none;appearance:none;border:none;color:var(--bcm-color-prime-blue-6);cursor:pointer}.date-container .bcm-datetime-picker__header .month{text-transform:capitalize}.date-container .bcm-datetime-picker__header .year{padding-left:4px}.date-container .bcm-datetime-picker__header .today{font-size:14px;line-height:22px;cursor:pointer;color:var(--bcm-color-prime-blue-6);user-select:none}.date-container .bcm-datetime-picker__content{display:flex}.date-container .years{position:relative;flex:0 0 70px;max-width:70px;height:280px;overflow:hidden;background-color:var(--bcm-color-grey-2)}.date-container .days{width:100%}.date-container .day-numbers,.date-container .day-labels{display:grid;grid-template-columns:repeat(7, 1fr)}.date-container .day-numbers{padding:24px 24px}.date-container .day-numbers>span,.date-container .day-labels span{text-align:center}.date-container .day-numbers>span{position:relative;padding-bottom:100%;cursor:pointer}.date-container .day-numbers>span.not-this-month{color:var(--bcm-color-grey-4)}.date-container .day-numbers>span.is-weekend{color:var(--bcm-color-prime-blue-3)}.date-container .day-numbers>span.is-disabled-date:not(.today){color:var(--bcm-color-grey-4);cursor:not-allowed}.date-container .day-numbers>span.is-disabled-date:not(.today):before{opacity:0 !important}.date-container .day-numbers>span.today{color:var(--bcm-color-prime-blue-6)}.date-container .day-numbers>span.today:before{opacity:1;background-color:var(--bcm-color-prime-blue-2);border:1px solid var(--bcm-color-prime-blue-6)}.date-container .day-numbers>span.selected-start{background:linear-gradient(90deg, white 50%, #8abde2 50%) !important}.date-container .day-numbers>span.selected-end{background:linear-gradient(90deg, #8abde2 50%, white 50%) !important}.date-container .day-numbers>span.range{background:#8abde2}.date-container .day-numbers>span.range:not(.today){color:#ffffff}.date-container .day-numbers>span.range:not(.today):before{background-color:var(--bcm-color-prime-blue-6)}.date-container .day-numbers>span.range.is-weekend:not(.today){color:var(--bcm-color-prime-blue-2)}.date-container .day-numbers>span.selected,.date-container .day-numbers>span.selected-end{color:#ffffff}.date-container .day-numbers>span.selected:before,.date-container .day-numbers>span.selected-end:before{opacity:1;background-color:var(--bcm-color-prime-blue-6)}.date-container .day-numbers.start-1>span:first-child{grid-column:1}.date-container .day-numbers.start-2>span:first-child{grid-column:2}.date-container .day-numbers.start-3>span:first-child{grid-column:3}.date-container .day-numbers.start-4>span:first-child{grid-column:4}.date-container .day-numbers.start-5>span:first-child{grid-column:5}.date-container .day-numbers.start-6>span:first-child{grid-column:6}.date-container .day-numbers.start-7>span:first-child{grid-column:7}.date-container .day-numbers>span:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;border-radius:50%;background-color:var(--bcm-color-grey-4);opacity:0;box-sizing:border-box}.date-container .day-numbers>span:hover.not-this-month:not(.is-weekend){color:var(--bcm-color-grey-6)}.date-container .day-numbers>span:hover:before{opacity:1}.date-container .day-numbers .number{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.date-container .day-labels{padding:24px 40px 0 40px}.date-container .day-labels span{font-size:12px;color:var(--bcm-color-grey-6)}.date-container .day-labels span:nth-child(7n+6),.date-container .day-labels span:nth-child(7n+7){color:var(--bcm-color-prime-blue-3)}.years .items,.hours .items,.minutes .items,.time-period .items{position:relative;display:flex;flex-direction:column;z-index:0;transform:translateY(0);scroll-behavior:smooth}.years .items>span,.hours .items>span,.minutes .items>span,.time-period .items>span{text-align:center;font-size:12px;min-height:26px;max-height:26px;line-height:26px;color:var(--bcm-color-grey-8);user-select:none}.years:before,.years:after,.hours:before,.hours:after,.minutes:before,.minutes:after,.time-period:before,.time-period:after{content:"";position:absolute;left:0;width:100%;height:40px}.years:before,.hours:before,.minutes:before,.time-period:before{top:-40px;box-shadow:0 10px 100px 70px #ffffff;z-index:1}.years:after,.hours:after,.minutes:after,.time-period:after{bottom:-40px;box-shadow:0 -10px 100px 70px #ffffff;z-index:2}.select-strip{position:absolute;width:100%;top:50%;left:0;transform:translateY(-50%);min-height:26px;max-height:26px;border:1px solid var(--bcm-color-grey-5);border-left:0;border-right:0;pointer-events:none;box-sizing:border-box}.bcm-label{font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-bottom:4px;font-weight:500;color:#475569}.bcm-label.tw-text-1{font-size:10px;line-height:18px}.bcm-label.tw-text-2{font-size:12px;line-height:20px}.bcm-label.tw-text-3{font-size:14px;line-height:22px}.bcm-caption-area{color:#dc2626;font-weight:400;justify-content:space-between;align-items:flex-start;flex-direction:row;min-height:20px;display:flex;margin-top:4px;font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.bcm-caption-area.tw-text-1{font-size:10px;line-height:18px}.bcm-caption-area.tw-text-2{font-size:12px;line-height:20px}.bcm-caption-area.tw-text-3{font-size:14px;line-height:22px}.picker-input-container{display:flex;flex-direction:column;align-items:flex-start;justify-content:stretch}';export{w as bcm_datetime_picker}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as i,c as t,h as s,H as h,g as a}from"./p-8828bbde.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as e}from"./p-5b96cd07.js";import"./p-1774cf8d.js";import{S as l}from"./p-35f2e15a.js";import"./p-190f60ff.js";import"./p-6f861fed.js";import{d as o}from"./p-6f2e4c9b.js";import{B as r}from"./p-a313fba6.js";import{C as n}from"./p-ce3a95cf.js";import{c}from"./p-64fad38b.js";import"./p-3fac58f7.js";import"./p-2e73d572.js";import{i as d}from"./p-d1298c40.js";import"./p-436364c8.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-c168b4ec.js";import"./p-08c75801.js";const u=class{constructor(s){i(this,s),this.focus=t(this,"bcm-focus",3),this.blur=t(this,"bcm-blur",3),this.clear=t(this,"bcm-clear",3),this.change=t(this,"bcm-change",7),this.input=t(this,"bcm-input",3),this.beforeClear=t(this,"bcm-input-before-clear",3),this._onChange=t(this,"bcm-onchange",3),this.inValid=!1,this.onInput=()=>{var i;null===(i=this.inputElement)||void 0===i||i.addEventListener("input",(i=>{this.input.emit(i)}))},this.onChange=()=>{var i;null===(i=this.inputElement)||void 0===i||i.addEventListener("change",(i=>{this.change.emit(i)}))},this.onFocus=()=>{var i;null===(i=this.inputElement)||void 0===i||i.addEventListener("focus",(i=>{this.isFocus=!0,this.focus.emit(i)}))},this.onBlur=()=>{var i;null===(i=this.inputElement)||void 0===i||i.addEventListener("blur",(i=>{this.isFocus=!1,this.blur.emit(i)}))},this.onKeydown=()=>{var i;null===(i=this.inputElement)||void 0===i||i.addEventListener("keydown",(i=>{"ArrowUp"===i.key&&(i.preventDefault(),this.up()),"ArrowDown"===i.key&&(i.preventDefault(),this.down())}))},this.listener=()=>{this.onInput(),this.onChange(),this.onFocus(),this.onBlur(),this.onKeydown()},this._id=e.UID(),this.value="",this.defaultValue=void 0,this._prefix=void 0,this._suffix=void 0,this.size="medium",this.min=void 0,this.max=void 0,this.step=1,this.label=void 0,this.name=void 0,this.fullWidth=!1,this.clearable=!1,this.readonly=!1,this.disabled=!1,this.required=!1,this.mode="none",this.placeholder=void 0,this.thousandSeparator=!1,this.decimalSeparator=void 0,this.decimalScale=void 0,this.fixedDecimalScale=!1,this.allowNegative=!0,this.allowLeadingZeros=!1,this.unitPrefix=void 0,this.unitSuffix=void 0,this.caption=void 0,this.noCaption=!1,this.captionType=r.Status.default,this.captionError=void 0,this.customErrorMessage=void 0,this.isFocus=!1,this.captionCache=void 0,this.captionTypeCache=void 0,this.valueCache=""}connectedCallback(){this.defaultValue&&(this.value=+this.defaultValue),this.valueCache=this.value,this.captionCache=this.caption,this.captionTypeCache=this.captionType}componentDidLoad(){this.listener()}up(){this.disabled||(this.value||(this.value=Number(0)),this.value=+this.value+ +this.step,"strict"===this.mode&&this.max&&+this.value>+this.max&&(this.value=this.max))}down(){this.disabled||(this.value||(this.value=Number(0)),this.value=+this.value-+this.step,"strict"===this.mode&&this.min&&+this.value<+this.min&&(this.value=this.min))}handleClear(i){this.disabled||this.beforeClear.emit(i).defaultPrevented||(this.value="",this.clear.emit(i))}checkLength(){const{min:i,max:t,value:s}=this,h=i,a=t;let e=null==s?void 0:s.toString();i&&t?+e<+i||+e>+t?(this.setCaption(l.getMessage("betweenlength",[h,a]),"error"),this.inValid=!0):(this.setCaption(),this.inValid=!1):h?+e<+h?(this.setCaption(l.getMessage("minlength",[h]),"error"),this.inValid=!0):(this.setCaption(),this.inValid=!1):a&&(e>a?(this.setCaption(l.getMessage("maxlength",[a]),"error"),this.inValid=!0):(this.setCaption(),this.inValid=!1))}watchValue(){this.checkLength()}async onBcmFocus(){this.inputElement.focus()}async onBcmBlur(){this.inputElement.blur()}async onBcmSelect(){this.inputElement.select()}async set(i){await this.setValue(i)}async get(){return this.value||null}async setValue(i){this.value=i}async setClear(){return this.value=null,await o(10),Promise.resolve()}async resetCaption(){return await o(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,this.inValid=!1,await o(10),Promise.resolve()}setCaption(i=null,t=null){return this.caption=i||this.captionCache,this.captionType=t||this.captionTypeCache,this.captionError="error"==t?i:null,Promise.resolve()}disconnectedCallback(){var i,t,s,h,a;null===(i=this.inputElement)||void 0===i||i.removeEventListener("input",this.onInput.bind(this)),null===(t=this.inputElement)||void 0===t||t.removeEventListener("change",this.onChange.bind(this)),null===(s=this.inputElement)||void 0===s||s.removeEventListener("focus",this.onFocus.bind(this)),null===(h=this.inputElement)||void 0===h||h.removeEventListener("blur",this.onBlur.bind(this)),null===(a=this.inputElement)||void 0===a||a.removeEventListener("keydown",this.onKeydown.bind(this))}render(){const{_prefix:i,_suffix:t,noCaption:a,captionType:e,captionError:l,caption:o,required:r,_id:u,label:p,size:m,fullWidth:b,clearable:f,value:v,placeholder:j,thousandSeparator:w,decimalSeparator:g,decimalScale:x,fixedDecimalScale:y,allowNegative:C,allowLeadingZeros:S,unitPrefix:B,unitSuffix:k,min:D,max:V,step:L,defaultValue:N,disabled:_,mode:P}=this,T=(null==v?void 0:v.toString().length)>0&&f,z="error"==this.captionType||this.inValid,{host:E,inputContainer:H,slotClass:M,clearButton:O,controls:q,controlsBtn:A,controlsBtnDown:F,controlsBtnUp:I,controlsDivider:U,input:W}=d({size:m,fullWidth:b,clearable:T,disabled:_,invalid:z}),Z={placeholder:j,thousandSeparator:w,decimalSeparator:g,decimalScale:x,fixedDecimalScale:y,allowNegative:C,allowLeadingZeros:S,prefix:B,suffix:k},G={min:D,max:V,step:L,value:v,defaultValue:N},R=Object.assign(Object.assign(Object.assign({id:u+"-base-input",name:this.name,disabled:_,mode:P,"aria-label":p,"aria-labelledby":u+"-label",getInputRef:i=>{this.inputElement=i},className:W()},Z),G),{onValueChange:i=>{const{floatValue:t}=i;this.value=t,this._onChange.emit(i)}});return s(h,{class:E()},p&&s("bcm-label",{size:m,type:e,value:p,required:r,htmlFor:u+"-base-input",id:u+"-label"}),s("div",{class:H()},s("div",{class:M()},s("slot",{name:"prefix"},i&&i.length>0&&s("span",{innerHTML:i}))),s("bcm-react-number",{disabled:_,class:"tw-flex-1",options:R}),s("div",{class:M()},!_&&T&&s("button",{class:O(),onClick:i=>this.handleClear(i)},s("i",{class:"far fa-times"})),s("slot",{name:"suffix"},t&&t.length>0&&s("span",{innerHTML:t})),s("div",{class:q()},s("button",{type:"button",disabled:_,class:c(A(),I()),onClick:this.up.bind(this),"aria-label":"Increase value"},s("i",{class:"fas fa-caret-up"})),s("div",{class:U()}),s("button",{type:"button",disabled:_,class:c(A(),F()),onClick:this.down.bind(this),"aria-label":"Decrease value"},s("i",{class:"fas fa-caret-down"}))))),s(n,{noCaption:a,captionType:e,captionError:l,caption:o,customErrorMessage:this.customErrorMessage}))}get el(){return a(this)}static get watchers(){return{value:["watchValue"]}}};export{u as bcm_number_input}
5
+ import{r as i,c as t,h as s,H as h,g as a}from"./p-170cf07d.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as e}from"./p-9ba753bf.js";import"./p-b93361f4.js";import{S as l}from"./p-d65bc842.js";import"./p-cbbc036b.js";import"./p-6f861fed.js";import{d as o}from"./p-6f2e4c9b.js";import{B as r}from"./p-a313fba6.js";import{C as n}from"./p-8e683b32.js";import{c}from"./p-64fad38b.js";import"./p-3fac58f7.js";import"./p-2e73d572.js";import{i as d}from"./p-d1298c40.js";import"./p-436364c8.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-3ba6c610.js";import"./p-08c75801.js";const u=class{constructor(s){i(this,s),this.focus=t(this,"bcm-focus",3),this.blur=t(this,"bcm-blur",3),this.clear=t(this,"bcm-clear",3),this.change=t(this,"bcm-change",7),this.input=t(this,"bcm-input",3),this.beforeClear=t(this,"bcm-input-before-clear",3),this._onChange=t(this,"bcm-onchange",3),this.inValid=!1,this.onInput=()=>{var i;null===(i=this.inputElement)||void 0===i||i.addEventListener("input",(i=>{this.input.emit(i)}))},this.onChange=()=>{var i;null===(i=this.inputElement)||void 0===i||i.addEventListener("change",(i=>{this.change.emit(i)}))},this.onFocus=()=>{var i;null===(i=this.inputElement)||void 0===i||i.addEventListener("focus",(i=>{this.isFocus=!0,this.focus.emit(i)}))},this.onBlur=()=>{var i;null===(i=this.inputElement)||void 0===i||i.addEventListener("blur",(i=>{this.isFocus=!1,this.blur.emit(i)}))},this.onKeydown=()=>{var i;null===(i=this.inputElement)||void 0===i||i.addEventListener("keydown",(i=>{"ArrowUp"===i.key&&(i.preventDefault(),this.up()),"ArrowDown"===i.key&&(i.preventDefault(),this.down())}))},this.listener=()=>{this.onInput(),this.onChange(),this.onFocus(),this.onBlur(),this.onKeydown()},this._id=e.UID(),this.value="",this.defaultValue=void 0,this._prefix=void 0,this._suffix=void 0,this.size="medium",this.min=void 0,this.max=void 0,this.step=1,this.label=void 0,this.name=void 0,this.fullWidth=!1,this.clearable=!1,this.readonly=!1,this.disabled=!1,this.required=!1,this.mode="none",this.placeholder=void 0,this.thousandSeparator=!1,this.decimalSeparator=void 0,this.decimalScale=void 0,this.fixedDecimalScale=!1,this.allowNegative=!0,this.allowLeadingZeros=!1,this.unitPrefix=void 0,this.unitSuffix=void 0,this.caption=void 0,this.noCaption=!1,this.captionType=r.Status.default,this.captionError=void 0,this.customErrorMessage=void 0,this.isFocus=!1,this.captionCache=void 0,this.captionTypeCache=void 0,this.valueCache=""}connectedCallback(){this.defaultValue&&(this.value=+this.defaultValue),this.valueCache=this.value,this.captionCache=this.caption,this.captionTypeCache=this.captionType}componentDidLoad(){this.listener()}up(){this.disabled||(this.value||(this.value=Number(0)),this.value=+this.value+ +this.step,"strict"===this.mode&&this.max&&+this.value>+this.max&&(this.value=this.max))}down(){this.disabled||(this.value||(this.value=Number(0)),this.value=+this.value-+this.step,"strict"===this.mode&&this.min&&+this.value<+this.min&&(this.value=this.min))}handleClear(i){this.disabled||this.beforeClear.emit(i).defaultPrevented||(this.value="",this.clear.emit(i))}checkLength(){const{min:i,max:t,value:s}=this,h=i,a=t;let e=null==s?void 0:s.toString();i&&t?+e<+i||+e>+t?(this.setCaption(l.getMessage("betweenlength",[h,a]),"error"),this.inValid=!0):(this.setCaption(),this.inValid=!1):h?+e<+h?(this.setCaption(l.getMessage("minlength",[h]),"error"),this.inValid=!0):(this.setCaption(),this.inValid=!1):a&&(e>a?(this.setCaption(l.getMessage("maxlength",[a]),"error"),this.inValid=!0):(this.setCaption(),this.inValid=!1))}watchValue(){this.checkLength()}async onBcmFocus(){this.inputElement.focus()}async onBcmBlur(){this.inputElement.blur()}async onBcmSelect(){this.inputElement.select()}async set(i){await this.setValue(i)}async get(){return this.value||null}async setValue(i){this.value=i}async setClear(){return this.value=null,await o(10),Promise.resolve()}async resetCaption(){return await o(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,this.inValid=!1,await o(10),Promise.resolve()}setCaption(i=null,t=null){return this.caption=i||this.captionCache,this.captionType=t||this.captionTypeCache,this.captionError="error"==t?i:null,Promise.resolve()}disconnectedCallback(){var i,t,s,h,a;null===(i=this.inputElement)||void 0===i||i.removeEventListener("input",this.onInput.bind(this)),null===(t=this.inputElement)||void 0===t||t.removeEventListener("change",this.onChange.bind(this)),null===(s=this.inputElement)||void 0===s||s.removeEventListener("focus",this.onFocus.bind(this)),null===(h=this.inputElement)||void 0===h||h.removeEventListener("blur",this.onBlur.bind(this)),null===(a=this.inputElement)||void 0===a||a.removeEventListener("keydown",this.onKeydown.bind(this))}render(){const{_prefix:i,_suffix:t,noCaption:a,captionType:e,captionError:l,caption:o,required:r,_id:u,label:p,size:m,fullWidth:b,clearable:v,value:f,placeholder:j,thousandSeparator:w,decimalSeparator:g,decimalScale:x,fixedDecimalScale:y,allowNegative:C,allowLeadingZeros:S,unitPrefix:B,unitSuffix:k,min:D,max:V,step:L,defaultValue:N,disabled:_,mode:P}=this,T=(null==f?void 0:f.toString().length)>0&&v,z="error"==this.captionType||this.inValid,{host:E,inputContainer:H,slotClass:M,clearButton:O,controls:q,controlsBtn:A,controlsBtnDown:F,controlsBtnUp:I,controlsDivider:U,input:W}=d({size:m,fullWidth:b,clearable:T,disabled:_,invalid:z}),Z={placeholder:j,thousandSeparator:w,decimalSeparator:g,decimalScale:x,fixedDecimalScale:y,allowNegative:C,allowLeadingZeros:S,prefix:B,suffix:k},G={min:D,max:V,step:L,value:f,defaultValue:N},R=Object.assign(Object.assign(Object.assign({id:u+"-base-input",name:this.name,disabled:_,mode:P,"aria-label":p,"aria-labelledby":u+"-label",getInputRef:i=>{this.inputElement=i},className:W()},Z),G),{onValueChange:i=>{const{floatValue:t}=i;this.value=t,this._onChange.emit(i)}});return s(h,{class:E()},p&&s("bcm-label",{size:m,type:e,value:p,required:r,htmlFor:u+"-base-input",id:u+"-label"}),s("div",{class:H()},s("div",{class:M()},s("slot",{name:"prefix"},i&&i.length>0&&s("span",{innerHTML:i}))),s("bcm-react-number",{disabled:_,class:"tw-flex-1",options:R}),s("div",{class:M()},!_&&T&&s("button",{class:O(),onClick:i=>this.handleClear(i)},s("i",{class:"far fa-times"})),s("slot",{name:"suffix"},t&&t.length>0&&s("span",{innerHTML:t})),s("div",{class:q()},s("button",{type:"button",disabled:_,class:c(A(),I()),onClick:this.up.bind(this),"aria-label":"Increase value"},s("i",{class:"fas fa-caret-up"})),s("div",{class:U()}),s("button",{type:"button",disabled:_,class:c(A(),F()),onClick:this.down.bind(this),"aria-label":"Decrease value"},s("i",{class:"fas fa-caret-down"}))))),s(n,{noCaption:a,captionType:e,captionError:l,caption:o,customErrorMessage:this.customErrorMessage}))}get el(){return a(this)}static get watchers(){return{value:["watchValue"]}}};export{u as bcm_number_input}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as e,h as i,H as t,g as n}from"./p-8828bbde.js";import{c as s}from"./p-64fad38b.js";import"./p-85eedabc.js";const a={success:{icon:"far fa-check-circle",color:"green-6"},info:{icon:"far fa-info-circle",color:"blue-6"},warning:{icon:"far fa-warning",color:"warmyellow-6"},error:{icon:"far fa-times-circle",color:"grey-10"}},p=class{constructor(i){e(this,i),this.status=null,this.heading=void 0,this.description=void 0,this.hidden=!1,this.footerArea=void 0,this.footerHtml=void 0}getIcon(){if(null!=this.status)return i("div",{class:"icon"},i("bcm-icon",{icon:a[this.status].icon}))}componentDidRender(){this.el.shadowRoot.querySelector("slot").assignedElements().map((e=>{"bcm-result-footer"===String(e.tagName).toLowerCase()&&(e.slot="footer",this.footerArea=!0,this.footerHtml=e.innerHTML,e.innerHTML="")}))}render(){const e=s(this.hidden?"hidden":null);return i(t,{class:e},i("div",{class:"result"},this.getIcon(),i("div",{class:"content"},i("span",{class:"heading size-5 weight-semibold"},this.heading),i("span",{class:"desc size-2"},this.description),i("div",{class:"extra"},i("slot",null)),this.footerArea&&i("div",{class:"buttons",innerHTML:this.footerHtml}))))}get el(){return n(this)}};p.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:block}:host(.hidden){display:none}.result{display:flex;flex-direction:column;align-items:center;padding:32px 24px}.result .content{margin-top:24px}.result .content .heading{margin-bottom:8px}.result .content .heading,.result .content .desc{display:block;text-align:center}.result .content .extra{background-color:#F5F5F5;padding:24px 24px;margin:32px 0}@media screen and (min-width: 576px){.result .content .extra{padding:24px 40px}}.result .content .buttons{display:flex;justify-content:center;grid-gap:8px;flex-wrap:wrap}';export{p as bcm_result}
5
+ import{r as e,h as i,H as t,g as n}from"./p-170cf07d.js";import{c as s}from"./p-64fad38b.js";import"./p-85eedabc.js";const a={success:{icon:"far fa-check-circle",color:"green-6"},info:{icon:"far fa-info-circle",color:"blue-6"},warning:{icon:"far fa-warning",color:"warmyellow-6"},error:{icon:"far fa-times-circle",color:"grey-10"}},p=class{constructor(i){e(this,i),this.status=null,this.heading=void 0,this.description=void 0,this.hidden=!1,this.footerArea=void 0,this.footerHtml=void 0}getIcon(){if(null!=this.status)return i("div",{class:"icon"},i("bcm-icon",{icon:a[this.status].icon}))}componentDidRender(){this.el.shadowRoot.querySelector("slot").assignedElements().map((e=>{"bcm-result-footer"===String(e.tagName).toLowerCase()&&(e.slot="footer",this.footerArea=!0,this.footerHtml=e.innerHTML,e.innerHTML="")}))}render(){const e=s(this.hidden?"hidden":null);return i(t,{class:e},i("div",{class:"result"},this.getIcon(),i("div",{class:"content"},i("span",{class:"heading size-5 weight-semibold"},this.heading),i("span",{class:"desc size-2"},this.description),i("div",{class:"extra"},i("slot",null)),this.footerArea&&i("div",{class:"buttons",innerHTML:this.footerHtml}))))}get el(){return n(this)}};p.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:block}:host(.hidden){display:none}.result{display:flex;flex-direction:column;align-items:center;padding:32px 24px}.result .content{margin-top:24px}.result .content .heading{margin-bottom:8px}.result .content .heading,.result .content .desc{display:block;text-align:center}.result .content .extra{background-color:#F5F5F5;padding:24px 24px;margin:32px 0}@media screen and (min-width: 576px){.result .content .extra{padding:24px 40px}}.result .content .buttons{display:flex;justify-content:center;grid-gap:8px;flex-wrap:wrap}';export{p as bcm_result}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as t,c as s,h as e,H as i,g as o}from"./p-8828bbde.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as a}from"./p-5b96cd07.js";import"./p-1774cf8d.js";import"./p-35f2e15a.js";import"./p-190f60ff.js";import"./p-6f861fed.js";import{F as r}from"./p-6e5f5f36.js";import{B as p}from"./p-a313fba6.js";import{c as w}from"./p-64fad38b.js";import{c as m}from"./p-08c75801.js";import"./p-436364c8.js";import"./p-6f2e4c9b.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-c168b4ec.js";const c=m({slots:{host:["tw-w-fit","tw-absolute tw-left-0 tw-right-0 tw-z-tooltip tw-opacity-100 tw-transition-opacity tw-duration-300","tw-overscroll-contain tw-scroll-smooth tw-rounded tw-bg-white tw-shadow tw-max-h-64 tw-overflow-y-auto","bcm-ui-element bcm-attendance-actions tw-flex tw-flex-col tw-items-start tw-justify-start tw-p-2 tw-font-medium tw-text-slate-700"],dataItem:["tw-flex tw-w-full tw-cursor-pointer tw-flex-row tw-items-start tw-justify-start tw-gap-2 tw-rounded hover:tw-bg-blue-100"],key:["tw-font-mono tw-text-slate-600"],selectedItem:["tw-bg-blue-100"]},variants:{size:{small:{dataItem:["tw-text-2.5 tw-px-2.5 tw-py-2"]},medium:{dataItem:["tw-text-3 tw-px-3 tw-py-2"]},large:{dataItem:["tw-text-4 tw-px-4 tw-py-2"]}}},defaultVariants:{size:"medium"}}),n=class{constructor(e){t(this,e),this.change=s(this,"bcm-attendance-actions-dropdown-change",3),this._id=a.UID(),this.size=p.Size.medium,this.disabled=!1,this.selectedKey=null,this.targetId=null,this.isShow=!1,this.data=[]}handleSelectItem(t){this.selectedKey=t.key,this.change.emit(t)}async show(){const t=document.getElementById(this.targetId);r({ref:t,floating:this.el,placement:"bottom-end",offset:4}),this.isShow=!0}async hide(){this.isShow&&this.el.remove()}handleClickOutside(){this.hide()}render(){const{size:t}=this,{host:s,dataItem:o,selectedItem:a,key:r}=c({size:t});return e(i,{class:s()},this.data.map((t=>e("div",{class:w(o(),this.selectedKey===t.key&&a()),onClick:()=>this.handleSelectItem(t)},e("span",{class:r()},t.key," - "),e("span",null,t.value)))))}get el(){return o(this)}};export{n as bcm_attendance_actions_dropdown}
5
+ import{r as t,c as s,h as e,H as i,g as o}from"./p-170cf07d.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as a}from"./p-9ba753bf.js";import"./p-b93361f4.js";import"./p-d65bc842.js";import"./p-cbbc036b.js";import"./p-6f861fed.js";import{F as r}from"./p-6e5f5f36.js";import{B as p}from"./p-a313fba6.js";import{c as w}from"./p-64fad38b.js";import{c as m}from"./p-08c75801.js";import"./p-436364c8.js";import"./p-6f2e4c9b.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-3ba6c610.js";const c=m({slots:{host:["tw-w-fit","tw-absolute tw-left-0 tw-right-0 tw-z-tooltip tw-opacity-100 tw-transition-opacity tw-duration-300","tw-overscroll-contain tw-scroll-smooth tw-rounded tw-bg-white tw-shadow tw-max-h-64 tw-overflow-y-auto","bcm-ui-element bcm-attendance-actions tw-flex tw-flex-col tw-items-start tw-justify-start tw-p-2 tw-font-medium tw-text-slate-700"],dataItem:["tw-flex tw-w-full tw-cursor-pointer tw-flex-row tw-items-start tw-justify-start tw-gap-2 tw-rounded hover:tw-bg-blue-100"],key:["tw-font-mono tw-text-slate-600"],selectedItem:["tw-bg-blue-100"]},variants:{size:{small:{dataItem:["tw-text-2.5 tw-px-2.5 tw-py-2"]},medium:{dataItem:["tw-text-3 tw-px-3 tw-py-2"]},large:{dataItem:["tw-text-4 tw-px-4 tw-py-2"]}}},defaultVariants:{size:"medium"}}),n=class{constructor(e){t(this,e),this.change=s(this,"bcm-attendance-actions-dropdown-change",3),this._id=a.UID(),this.size=p.Size.medium,this.disabled=!1,this.selectedKey=null,this.targetId=null,this.isShow=!1,this.data=[]}handleSelectItem(t){this.selectedKey=t.key,this.change.emit(t)}async show(){const t=document.getElementById(this.targetId);r({ref:t,floating:this.el,placement:"bottom-end",offset:4}),this.isShow=!0}async hide(){this.isShow&&this.el.remove()}handleClickOutside(){this.hide()}render(){const{size:t}=this,{host:s,dataItem:o,selectedItem:a,key:r}=c({size:t});return e(i,{class:s()},this.data.map((t=>e("div",{class:w(o(),this.selectedKey===t.key&&a()),onClick:()=>this.handleSelectItem(t)},e("span",{class:r()},t.key," - "),e("span",null,t.value)))))}get el(){return o(this)}};export{n as bcm_attendance_actions_dropdown}