@luzmo/lucero 1.0.1-alpha.15 → 1.0.1-alpha.16

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 (277) hide show
  1. package/components/accordion/index.cjs +183 -6
  2. package/components/accordion/index.js +136 -88
  3. package/components/action-bar/index.cjs +85 -4
  4. package/components/action-bar/index.js +72 -50
  5. package/components/action-button/index.cjs +205 -3
  6. package/components/action-button/index.js +167 -93
  7. package/components/action-group/index.cjs +7 -1
  8. package/components/action-group/index.js +12 -8
  9. package/components/action-group-DHp8RHDf.js +392 -0
  10. package/components/action-group-MPf19RPV.cjs +391 -0
  11. package/components/action-menu/index.cjs +91 -11
  12. package/components/action-menu/index.js +66 -47
  13. package/components/avatar/index.cjs +63 -3
  14. package/components/avatar/index.js +54 -42
  15. package/components/base-COw9n7UR.cjs +119 -0
  16. package/components/base-DmeVy0cq.js +120 -0
  17. package/components/button/index.cjs +134 -2
  18. package/components/button/index.js +106 -72
  19. package/components/button-base-7Ak55xFd.cjs +206 -0
  20. package/components/button-base-C3kf6BTK.js +207 -0
  21. package/components/button-group/index.cjs +45 -1
  22. package/components/button-group/index.js +37 -25
  23. package/components/calendar/index.cjs +632 -1
  24. package/components/calendar/index.js +637 -7
  25. package/components/checkbox/index.cjs +111 -4
  26. package/components/checkbox/index.js +98 -53
  27. package/components/checkbox-mixin-8cL-vfDy.js +84 -0
  28. package/components/checkbox-mixin-CE7dJj3J.cjs +83 -0
  29. package/components/clear-button-Co6oKSgl.js +59 -0
  30. package/components/clear-button-X_HDY2eH.cjs +58 -0
  31. package/components/close-button-DPBK6Kpu.cjs +59 -0
  32. package/components/close-button-Miw9ZjoJ.js +60 -0
  33. package/components/color-area/index.cjs +440 -13
  34. package/components/color-area/index.js +322 -187
  35. package/components/color-controller-BjDZaxhX.js +491 -0
  36. package/components/color-controller-C3c_vb2P.cjs +490 -0
  37. package/components/color-field/index.cjs +95 -2
  38. package/components/color-field/index.js +77 -41
  39. package/components/color-handle/index.cjs +64 -3
  40. package/components/color-handle/index.js +58 -37
  41. package/components/color-loupe/index.cjs +7 -1
  42. package/components/color-loupe/index.js +12 -8
  43. package/components/color-loupe-BQqNR8YD.cjs +88 -0
  44. package/components/color-loupe-B_DDFv8l.js +89 -0
  45. package/components/color-menu/index.cjs +217 -12
  46. package/components/color-menu/index.js +187 -93
  47. package/components/color-palette/index.cjs +89 -1
  48. package/components/color-palette/index.js +78 -51
  49. package/components/color-palette-group/index.cjs +259 -3
  50. package/components/color-palette-group/index.js +193 -105
  51. package/components/color-picker/index.cjs +114 -6
  52. package/components/color-picker/index.js +92 -72
  53. package/components/color-slider/index.cjs +585 -1
  54. package/components/color-slider/index.js +590 -7
  55. package/components/{directive-oAbCiebi.js → condition-attribute-with-id-Cn815e9W.js} +22 -22
  56. package/components/condition-attribute-with-id-DEc2Yjne.cjs +43 -0
  57. package/components/date-time-picker/index.cjs +1357 -31
  58. package/components/date-time-picker/index.js +951 -637
  59. package/components/dependency-manger-CcIE1uvQ.cjs +63 -0
  60. package/components/{dependency-manger-CEXvGQUV.js → dependency-manger-XHpQjFgK.js} +24 -14
  61. package/components/divider/index.cjs +54 -1
  62. package/components/divider/index.js +49 -30
  63. package/components/divider.module-Cm5LcDRV.cjs +20 -0
  64. package/components/divider.module-DauH6k2_.js +21 -0
  65. package/components/element-resolution-DCsrhGZO.cjs +112 -0
  66. package/components/element-resolution-nMlmW4Jy.js +113 -0
  67. package/components/field-group/index.cjs +7 -1
  68. package/components/field-group/index.js +12 -8
  69. package/components/field-group-DNmY8W9v.cjs +86 -0
  70. package/components/field-group-DVdAWCQF.js +87 -0
  71. package/components/field-label/index.cjs +7 -1
  72. package/components/field-label/index.js +12 -8
  73. package/components/field-label-CKH9EXpR.cjs +156 -0
  74. package/components/field-label-Dpsecoc6.js +157 -0
  75. package/components/focus-group-BqDAk9Is.js +337 -0
  76. package/components/focus-group-DFzOlalL.cjs +336 -0
  77. package/components/focus-visible-B-B8-P9R.cjs +104 -0
  78. package/components/focus-visible-BUPRWlsh.js +105 -0
  79. package/components/focusable-BPrTcZPd.cjs +262 -0
  80. package/components/focusable-ChCLg1k4.js +263 -0
  81. package/components/{directive-C7oCP5Bh.cjs → focusable-selectors-D0t_5P7C.cjs} +16 -5
  82. package/components/{focusable-selectors-B4YgbghQ.js → focusable-selectors-IltOAOd9.js} +7 -4
  83. package/components/icon/index.cjs +90 -1
  84. package/components/icon/index.js +74 -46
  85. package/components/index.cjs +174 -1
  86. package/components/index.js +174 -172
  87. package/components/infield-button/index.cjs +46 -2
  88. package/components/infield-button/index.js +41 -30
  89. package/components/label/index.cjs +37 -1
  90. package/components/label/index.js +36 -24
  91. package/components/{language-resolution-8yZa5r_P.js → language-resolution-BSGJAWiQ.js} +21 -16
  92. package/components/language-resolution-iN9EImbb.cjs +57 -0
  93. package/components/like-anchor-D62faRNG.cjs +79 -0
  94. package/components/like-anchor-v3cJ9RWM.js +80 -0
  95. package/components/manage-help-text-BYx84zZR.cjs +125 -0
  96. package/components/manage-help-text-DOuMTGht.js +126 -0
  97. package/components/menu/index.cjs +1297 -29
  98. package/components/menu/index.js +954 -499
  99. package/components/multi-language-field/index.cjs +132 -2
  100. package/components/multi-language-field/index.js +118 -88
  101. package/components/number-field/index.cjs +613 -10
  102. package/components/number-field/index.js +442 -243
  103. package/components/observe-slot-presence-9AwLGUQ_.cjs +78 -0
  104. package/components/observe-slot-presence-DcMdoumP.js +79 -0
  105. package/components/observe-slot-text-CSofZeeF.cjs +104 -0
  106. package/components/observe-slot-text-CjnkkBPn.js +105 -0
  107. package/components/options/index.cjs +693 -60
  108. package/components/options/index.js +519 -953
  109. package/components/overlay/index.cjs +367 -21
  110. package/components/overlay/index.js +273 -189
  111. package/components/overlay-CN8ISP1F.js +2485 -0
  112. package/components/overlay-LViy9VWM.cjs +2484 -0
  113. package/components/{pending-state-DTX7ggyF.js → pending-state-CXbe-Xul.js} +28 -13
  114. package/components/pending-state-e4RbXe9u.cjs +75 -0
  115. package/components/picker/index.cjs +9 -1
  116. package/components/picker/index.js +15 -11
  117. package/components/picker-DNde3awt.cjs +672 -0
  118. package/components/picker-PfUAF05y.js +673 -0
  119. package/components/picker-button/index.cjs +56 -4
  120. package/components/picker-button/index.js +45 -34
  121. package/components/platform-CxDar3Dn.cjs +68 -0
  122. package/components/platform-Cxn0WbyT.js +69 -0
  123. package/components/popover/index.cjs +7 -1
  124. package/components/popover/index.js +12 -8
  125. package/components/popover-BkbYhl3i.js +74 -0
  126. package/components/popover-BkgUf0kL.cjs +74 -0
  127. package/components/progress-circle/index.cjs +7 -1
  128. package/components/progress-circle/index.js +12 -8
  129. package/components/progress-circle-Hu_ivPHf.js +133 -0
  130. package/components/progress-circle-_Etqsj9f.cjs +132 -0
  131. package/components/radio/index.cjs +244 -2
  132. package/components/radio/index.js +192 -110
  133. package/components/{when-CDK1Tt5Y.js → random-id-BE6HA503.cjs} +7 -10
  134. package/components/{random-id-ByCz1xaq.js → random-id-BEc6QIUL.js} +3 -3
  135. package/components/roving-tabindex-AsmAh2In.cjs +95 -0
  136. package/components/roving-tabindex-DPF9NmrH.js +96 -0
  137. package/components/search/index.cjs +115 -8
  138. package/components/search/index.js +96 -66
  139. package/components/select/index.cjs +720 -51
  140. package/components/select/index.js +563 -347
  141. package/components/sized-mixin-DmkrNdWB.js +80 -0
  142. package/components/sized-mixin-UaTVa-AE.cjs +79 -0
  143. package/components/slider/index.cjs +119 -1
  144. package/components/slider/index.js +100 -1113
  145. package/components/{condition-attribute-with-id-Dv4lSRbe.js → slottable-request-event-CANixJnR.cjs} +15 -13
  146. package/components/{slottable-request-event-DggLA4Rx.js → slottable-request-event-D9WzrdWv.js} +12 -9
  147. package/components/strategies-DlMlaSJR.cjs +317 -0
  148. package/components/strategies-DlPQoTFE.js +318 -0
  149. package/components/streaming-listener-D4sHaMub.cjs +145 -0
  150. package/components/streaming-listener-cAz5zJyk.js +146 -0
  151. package/components/swatch/index.cjs +436 -7
  152. package/components/swatch/index.js +350 -205
  153. package/components/switch/index.cjs +61 -2
  154. package/components/switch/index.js +51 -34
  155. package/components/tabs/index.cjs +693 -26
  156. package/components/tabs/index.js +521 -388
  157. package/components/tags/index.cjs +201 -4
  158. package/components/tags/index.js +152 -87
  159. package/components/text-field/index.cjs +49 -3
  160. package/components/text-field/index.js +44 -30
  161. package/components/text-field-11tcnftU.cjs +338 -0
  162. package/components/text-field-Chi9J2Cz.js +339 -0
  163. package/components/text-field.module-CMBS0jSL.js +21 -0
  164. package/components/text-field.module-DIJdV_sA.cjs +20 -0
  165. package/components/toast/index.cjs +177 -12
  166. package/components/toast/index.js +145 -73
  167. package/components/tooltip/index.cjs +221 -6
  168. package/components/tooltip/index.js +155 -131
  169. package/components/tooltip/tooltip.d.ts +1 -12
  170. package/components/unit-input/index.cjs +232 -8
  171. package/components/unit-input/index.js +201 -108
  172. package/components/utils.cjs +25 -1
  173. package/components/utils.js +22 -22
  174. package/custom-elements.json +1 -1
  175. package/package.json +1 -1
  176. package/components/NumberFormatter-DewVDY5w.cjs +0 -18
  177. package/components/NumberFormatter-DgOUVrge.js +0 -136
  178. package/components/NumberParser-Dik4a0h-.cjs +0 -18
  179. package/components/NumberParser-ci9J5EKv.js +0 -173
  180. package/components/action-group-DBImibFn.js +0 -258
  181. package/components/action-group-DJGMcRHb.cjs +0 -20
  182. package/components/async-directive-BX1T1e1_.cjs +0 -22
  183. package/components/async-directive-BfcqVjDp.js +0 -82
  184. package/components/base-BjTwmyRF.cjs +0 -22
  185. package/components/base-CBCg3yyw.cjs +0 -40
  186. package/components/base-D76d76ww.js +0 -26
  187. package/components/base-WsynuqaS.js +0 -677
  188. package/components/button-base-DbkDzb71.js +0 -144
  189. package/components/button-base-XgPLmwP-.cjs +0 -25
  190. package/components/checkbox-mixin-BDN0dBtS.cjs +0 -27
  191. package/components/checkbox-mixin-Do7EgtpQ.js +0 -70
  192. package/components/class-map-Di1D_rCm.cjs +0 -22
  193. package/components/class-map-NbVXqBU0.js +0 -51
  194. package/components/clear-button-BbVqNU-g.js +0 -53
  195. package/components/clear-button-DYdeFsS8.cjs +0 -18
  196. package/components/close-button-CpfKibqg.cjs +0 -18
  197. package/components/close-button-DzOZZmkY.js +0 -51
  198. package/components/color-controller-B0uX6Zso.js +0 -3230
  199. package/components/color-controller-CoUL5f9K.cjs +0 -18
  200. package/components/color-loupe-CaA_Lfkk.cjs +0 -56
  201. package/components/color-loupe-CmMsXbjT.js +0 -81
  202. package/components/condition-attribute-with-id-DrQYZzFS.cjs +0 -18
  203. package/components/dependency-manger-C5HCkMMB.cjs +0 -18
  204. package/components/directive-helpers-Cm6gitnu.js +0 -62
  205. package/components/directive-helpers-DyIRTWwA.cjs +0 -22
  206. package/components/divider.module-DDvBo9zo.cjs +0 -18
  207. package/components/divider.module-DoQWQEIJ.js +0 -21
  208. package/components/element-resolution-BvRLGqIU.cjs +0 -18
  209. package/components/element-resolution-FCUT-wql.js +0 -91
  210. package/components/field-group-DXfBWrkO.js +0 -66
  211. package/components/field-group-DkGst3r5.cjs +0 -23
  212. package/components/field-label-CZ2zzChK.js +0 -106
  213. package/components/field-label-mO1AkUgR.cjs +0 -25
  214. package/components/flow-D-0MTYCm.js +0 -527
  215. package/components/flow-DM3dNAKs.cjs +0 -30
  216. package/components/focus-group-DHeTq18L.js +0 -218
  217. package/components/focus-group-DnxZUBhQ.cjs +0 -18
  218. package/components/focus-visible-B0P9aY_G.cjs +0 -18
  219. package/components/focus-visible-DBlJGoEW.js +0 -74
  220. package/components/focusable-BxtpnzWp.js +0 -153
  221. package/components/focusable-EbipgXRh.cjs +0 -18
  222. package/components/focusable-selectors-BgFlyFcY.cjs +0 -18
  223. package/components/if-defined-C9YGdo33.cjs +0 -22
  224. package/components/if-defined-DOaE2coe.js +0 -27
  225. package/components/index-BQoI8AD3.cjs +0 -113
  226. package/components/index-BwxgAdzi.cjs +0 -57
  227. package/components/index-Cb9zsiz6.js +0 -1490
  228. package/components/index-HjQa8tew.js +0 -1174
  229. package/components/language-resolution-DJzmyzZq.cjs +0 -18
  230. package/components/like-anchor-Bvn_vLQ8.js +0 -69
  231. package/components/like-anchor-sod1C1fR.cjs +0 -32
  232. package/components/luzmo-icons-D47EGj-3.cjs +0 -29
  233. package/components/luzmo-icons-NEyaMpEM.js +0 -229
  234. package/components/manage-help-text-DhgARkZX.cjs +0 -30
  235. package/components/manage-help-text-syYnjKGL.js +0 -92
  236. package/components/mutation-controller-DH7YOCyj.js +0 -52
  237. package/components/mutation-controller-DkOMCW-c.cjs +0 -22
  238. package/components/observe-slot-presence-CmVi0zTc.js +0 -68
  239. package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
  240. package/components/observe-slot-text-BPfIQQtz.js +0 -87
  241. package/components/observe-slot-text-Ceb7SvYT.cjs +0 -18
  242. package/components/overlay-Cig9r6uU.js +0 -2747
  243. package/components/overlay-KSKMzzkh.cjs +0 -47
  244. package/components/pending-state-CaH1si5b.cjs +0 -26
  245. package/components/picker-CAYj4hBD.js +0 -461
  246. package/components/picker-apS0Zrly.cjs +0 -123
  247. package/components/platform-BM-uMWpX.js +0 -69
  248. package/components/platform-BiXhwqk3.cjs +0 -18
  249. package/components/popover-DjX0aAnY.js +0 -67
  250. package/components/popover-KFfO0IYL.cjs +0 -30
  251. package/components/progress-circle-BvRJNuNo.cjs +0 -33
  252. package/components/progress-circle-DXH9z8-6.js +0 -97
  253. package/components/query-BL-TJj7K.cjs +0 -22
  254. package/components/query-D_KR_GUc.js +0 -51
  255. package/components/query-assigned-elements-DjfhL1cl.js +0 -36
  256. package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
  257. package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
  258. package/components/query-assigned-nodes-C76XVPWY.js +0 -36
  259. package/components/random-id-CqvckpWe.cjs +0 -18
  260. package/components/roving-tabindex-By_fCy_e.cjs +0 -18
  261. package/components/roving-tabindex-DOg4z6ZU.js +0 -66
  262. package/components/sized-mixin-CPxE5C96.cjs +0 -18
  263. package/components/sized-mixin-D4ACoVUr.js +0 -63
  264. package/components/slottable-request-event-BfUUt1Mh.cjs +0 -18
  265. package/components/state-D8JEtYqe.cjs +0 -22
  266. package/components/state-Deh-vKYE.js +0 -29
  267. package/components/strategies-9indNIEb.js +0 -195
  268. package/components/strategies-BACP6MhR.cjs +0 -18
  269. package/components/streaming-listener-B00MvALi.cjs +0 -18
  270. package/components/streaming-listener-CP-JE6Fa.js +0 -91
  271. package/components/style-map-CeilmSgs.cjs +0 -22
  272. package/components/style-map-IgqIKvlE.js +0 -53
  273. package/components/text-field-BYF2RHY8.cjs +0 -85
  274. package/components/text-field-PYafEYeO.js +0 -314
  275. package/components/text-field.module-C2KVUJcX.js +0 -21
  276. package/components/text-field.module-DXhFA9G-.cjs +0 -18
  277. package/components/when-CDZyJPvd.cjs +0 -22
@@ -15,31 +15,944 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../index-BQoI8AD3.cjs"),R=require("../NumberParser-Dik4a0h-.cjs"),u=require("../base-CBCg3yyw.cjs"),P=require("../state-D8JEtYqe.cjs"),A=require("../query-BL-TJj7K.cjs"),j=require("../class-map-Di1D_rCm.cjs"),S=require("../if-defined-C9YGdo33.cjs"),W=require("../style-map-CeilmSgs.cjs"),L=require("../when-CDZyJPvd.cjs"),G=require("../focusable-EbipgXRh.cjs"),I=require("../sized-mixin-CPxE5C96.cjs"),O=require("../luzmo-icons-D47EGj-3.cjs");require("../icon/index.cjs");require("../overlay/index.cjs");require("../picker-button/index.cjs");require("../popover/index.cjs");const K=require("../manage-help-text-DhgARkZX.cjs"),B=require("../NumberFormatter-DewVDY5w.cjs"),X=require("../text-field.module-DXhFA9G-.cjs"),o={Year:"year",Month:"month",Day:"day",Hour:"hour",Minute:"minute",Second:"second",Millisecond:"fractionalSecond",DayPeriod:"dayPeriod",Literal:"literal"},J={[o.Year]:"––––",[o.Month]:"––",[o.Day]:"––",[o.Hour]:"––",[o.Minute]:"––",[o.Second]:"––",[o.Millisecond]:"–––",[o.DayPeriod]:"––"},v={Day:"day",Hour:"hour",Minute:"minute",Second:"second",Millisecond:"millisecond"},V=0,D=12,H=2e3,Q=31;function x(n){return typeof n=="number"}function _(n){return n instanceof c.$35ea8db9cb2ccb90$export$d3b7288e7994edea}function C(n){return n instanceof c.$35ea8db9cb2ccb90$export$ca871e8dbb80966f}function F(n){return n instanceof c.$35ea8db9cb2ccb90$export$99faa760c7908e4f}function N(n,e){return n=n%D+e}function Z(n){return n>=D?D:V}function E(n,e){return n.length===e.length&&n.every((t,i)=>t===e[i])}function U(n){return F(n)?new Date(n.year,n.month-1,n.day):new Date(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond)}class ${constructor(e,t,i){this.type=e,this.formatted=t,this.label=i,this.placeholder=J[e]}increment(e){this.value===void 0?this.value=this.minValue:(this.value=this.value+1,this.value>this.maxValue&&(this.value=this.minValue))}decrement(e){this.value===void 0?this.value=this.maxValue:(this.value=this.value-1,this.value<this.minValue&&(this.value=this.maxValue))}setValueFromDate(e){this.type==="fractionalSecond"?this.value=e.millisecond:this.type!==o.DayPeriod&&(this.value=e[this.type])}clear(){this.value=void 0}handleInput(e,t){const i=t.parse(e);if(Number.isNaN(i))return;const a=t.parse(`${this.value??""}${i}`);if(this.isInputValueCompliant(a)){this.value=a;return}this.isInputValueCompliant(i)&&(this.value=i)}isInputValueCompliant(e){const{minValue:t,maxValue:i}=this.inputValidationLimits;return e>=t&&e<=i}get inputValidationLimits(){return{minValue:this.minValue,maxValue:this.maxValue}}updateValueToLimits(){this.value!==void 0&&(this.value<this.minValue&&(this.value=this.minValue),this.value>this.maxValue&&(this.value=this.maxValue))}}class Y extends ${constructor(e,t){super(o.Year,e,t),this.minValue=1,this.maxValue=9999}setLimits(e){this.minValue=1,this.maxValue=e.calendar.getYearsInEra(e),this.updateValueToLimits()}increment(e){this.value===void 0?this.value=e.year:super.increment()}decrement(e){this.value===void 0?this.value=e.year:super.decrement()}clear(){if(this.value===void 0)return;const e=Math.floor(this.value/10);this.value=e>0?e:void 0}}class M{constructor(e){this.segments=e}get all(){return this.segments}get editableValues(){return this.all.filter(e=>e instanceof $).map(e=>e.value)}get year(){const e=this.getByType(o.Year);if(e&&e instanceof Y)return e}get month(){const e=this.getByType(o.Month);if(e)return e}get day(){const e=this.getByType(o.Day);if(e)return e}get hour(){const e=this.getByType(o.Hour);if(e)return e}get minute(){const e=this.getByType(o.Minute);if(e)return e}get second(){const e=this.getByType(o.Second);if(e)return e}get millisecond(){const e=this.getByType(o.Millisecond);if(e)return e}get dayPeriod(){const e=this.getByType(o.DayPeriod);if(e)return e}getByType(e){return this.segments.find(t=>t.type===e)}getFormattedDate(e=v.Day){var d,g,b,k,f,z,y;const t=(d=this.year)==null?void 0:d.value,i=(g=this.month)==null?void 0:g.value,a=(b=this.day)==null?void 0:b.value;if(!x(t)||!x(i)||!x(a))return;if(e===v.Day)return new c.$35ea8db9cb2ccb90$export$99faa760c7908e4f(t,i,a);let r=(k=this.hour)==null?void 0:k.value;if(!x(r))return;if(this.dayPeriod){const w=this.dayPeriod.value;if(!x(w))return;r=N(r,w)}if(e===v.Hour)return new c.$35ea8db9cb2ccb90$export$ca871e8dbb80966f(t,i,a,r);const s=(f=this.minute)==null?void 0:f.value;if(!x(s))return;if(e===v.Minute)return new c.$35ea8db9cb2ccb90$export$ca871e8dbb80966f(t,i,a,r,s);const l=(z=this.second)==null?void 0:z.value;if(!x(l))return;if(e===v.Second)return new c.$35ea8db9cb2ccb90$export$ca871e8dbb80966f(t,i,a,r,s,l);const h=(y=this.millisecond)==null?void 0:y.value;if(x(h))return new c.$35ea8db9cb2ccb90$export$ca871e8dbb80966f(t,i,a,r,s,l,h)}}class ee{constructor(e,t){this.dateFormatter=e,this.currentDate=t,this.numberFormatter=new B.$488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(this.dateFormatter.resolvedOptions().locale,{useGrouping:!1})}format(e){if(!e.year||!e.month||!e.day)return e;const t=this.getDateInfoWithDefaults(e);return t&&(this.setSegmentsFormatted(e,t),this.padSegmentsFormatted(e)),e}setSegmentsFormatted(e,t){var f;e=new M(e.all);const{year:i,month:a,day:r,hour:s,minute:l,second:h,millisecond:d}=t,g=new Date(i,a-1,r,s,l,h,d);if(!e.year)return;e.year.formatted=this.numberFormatter.format(i);const b=[o.Month,o.Day,o.Hour,o.Minute,o.Second,o.DayPeriod],k=this.dateFormatter.formatToParts(g);for(const z of b){const y=e[z];if(!y)continue;const w=(f=k.find(q=>q.type===z))==null?void 0:f.value;w&&(y.formatted=w)}}padSegmentsFormatted(e){if(!e.hour)return;const t=[o.Month,o.Day,o.Hour,o.Minute,o.Second];for(const i of t){const a=e[i];a&&(a.formatted=a.formatted.padStart(2,this.numberFormatter.format(0)))}}getDateInfoWithDefaults(e){var g,b,k,f,z;if(!e.year||!e.month||!e.day)return;const t=e.day.value??c.$14e0f24ef4ac5c92$export$b2f4953d301981d5(this.currentDate),i=e.month.value??c.$14e0f24ef4ac5c92$export$5412ac11713b72ad(this.currentDate),a=e.year.value??H,r=(g=e.dayPeriod)==null?void 0:g.value;let s=(b=e.hour)==null?void 0:b.value;x(s)?x(r)&&(s=N(s,r)):s=x(r)?r:this.currentDate.hour;const l=((k=e.minute)==null?void 0:k.value)??this.currentDate.minute,h=((f=e.second)==null?void 0:f.value)??this.currentDate.second,d=((z=e.millisecond)==null?void 0:z.value)??this.currentDate.millisecond;return{year:a,month:i,day:t,hour:s,minute:l,second:h,millisecond:d}}}class T{constructor(e){const{dateFormatter:t,segments:i,currentDate:a}=e;this.segments=new M(i.all),this.dateFormatter=t,this.currentDate=a}modify(e){const t=this.segments.getByType(e);if(!t)return this.segments;this.modifySegment(t),this.updateSegmentsLimits(e);const i=new ee(this.dateFormatter,this.currentDate);return this.segments=i.format(this.segments),this.segments}updateSegmentsLimits(e){const t=e===o.Year,i=e===o.Month,a=this.segments.year,r=this.segments.month,s=this.segments.day;t&&(r==null||r.setLimits(this.currentDate),s==null||s.setLimits(this.currentDate,r==null?void 0:r.value,a==null?void 0:a.value)),i&&(s==null||s.setLimits(this.currentDate,r==null?void 0:r.value,a==null?void 0:a.value))}}class te extends T{modifySegment(e){e.clear()}}class ie extends T{modifySegment(e){e.decrement(this.currentDate)}}class ae extends T{modifySegment(e){e.increment(this.currentDate)}}class re extends T{constructor(e){const{dateFormatter:t,segments:i,currentDate:a}=e;super({dateFormatter:t,segments:i,currentDate:a}),this.eventData=e.eventData,this.numberParser=e.numberParser}modifySegment(e){this.eventData!==null&&e.handleInput(this.eventData,this.numberParser)}}class oe extends ${constructor(e,t){super(o.Day,e,t),this.minValue=1,this.maxValue=31}setLimits(e,t,i){if(!x(t)){this.minValue=1,this.maxValue=Q;return}x(i)||(i=H);const a=new c.$35ea8db9cb2ccb90$export$99faa760c7908e4f(i,t,1);this.maxValue=e.calendar.getDaysInMonth(a),this.minValue=c.$14e0f24ef4ac5c92$export$b2f4953d301981d5(a),this.updateValueToLimits()}}class ne extends ${constructor(e,t){super(o.Month,e,t),this.minValue=1,this.maxValue=12}setLimits(e){this.minValue=c.$14e0f24ef4ac5c92$export$5412ac11713b72ad(e),this.maxValue=e.calendar.getMonthsInYear(e),this.updateValueToLimits()}}class se{constructor(e){this.formatted=e,this.type=o.Literal}}class ce extends ${constructor(e,t){super(o.DayPeriod,e,t),this.minValue=V,this.maxValue=D,this.localizedMinValue="AM",this.localizedMaxValue="PM"}toggleAmPm(){this.value=this.value===V?D:V}increment(){this.value===void 0?this.value=this.minValue:this.toggleAmPm()}decrement(){this.value===void 0?this.value=this.maxValue:this.toggleAmPm()}setValueFromDate(e){this.value=Z(e.hour)}handleInput(e){const t=e.toLowerCase(),i=this.localizedMinValue.toLowerCase().includes(t),a=this.localizedMaxValue.toLowerCase().includes(t);i&&a||(i&&(this.value=V),a&&(this.value=D))}setLocalizedLimits(e){const t=new Date(0,0,0,this.minValue,0),i=new Date(0,0,0,this.maxValue,0),[a,r]=[t,i].map(this.getDayPeriodFromDate.bind(this,e));a&&(this.localizedMinValue=a),r&&(this.localizedMaxValue=r)}getDayPeriodFromDate(e,t){var i;return(i=e.formatToParts(t).find(a=>a.type===this.type))==null?void 0:i.value}}class le extends ${constructor(e,t){super(o.Hour,e,t),this.minValue=0,this.maxValue=23}setLimits(e){this.minValue=0,this.maxValue=23,e&&(this.minValue=0,this.maxValue=11),this.updateValueToLimits()}setValueFromDate(e,t){t?this.value=e.hour-Z(e.hour):super.setValueFromDate(e)}get inputValidationLimits(){const e=this.maxValue===11;return{minValue:e?1:0,maxValue:e?12:23}}}class de extends ${constructor(e,t){super(o.Millisecond,e,t),this.minValue=0,this.maxValue=999}}class ue extends ${constructor(e,t){super(o.Minute,e,t),this.minValue=0,this.maxValue=59}}class me extends ${constructor(e,t){super(o.Second,e,t),this.minValue=0,this.maxValue=59}}class he{constructor(e){this.dateFormatter=e;const t=this.dateFormatter.resolvedOptions().locale;this.numberFormatter=new B.$488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(t,{useGrouping:!1}),this.dateTimeFieldDisplayNames=new Intl.DisplayNames([t],{type:"dateTimeField"})}createSegments(e,t=!1){const i=U(e),a=this.dateFormatter.formatToParts(i).map(y=>{const w=y.type;let q=y.value;return w==="year"&&(q=this.numberFormatter.format(e.year)),this.createSegment(w,q)}),r=new M(a),s=r.year,l=r.month,h=r.day;s.setLimits(e),l.setLimits(e),t&&(s.setValueFromDate(e),l.setValueFromDate(e)),h.setLimits(e,l.value,s.value),t&&h.setValueFromDate(e);const d=r.hour,g=r.minute,b=r.second,k=r.millisecond,f=r.dayPeriod;if(f&&f.setLocalizedLimits(this.dateFormatter),!d)return r;const z=!!f;if(d.setLimits(z),t){if(d.setValueFromDate(e,z),z&&r.dayPeriod.setValueFromDate(e),!g||(g.setValueFromDate(e),!b)||(b.setValueFromDate(e),!k))return r;k.setValueFromDate(e)}return r}createSegment(e,t){if(e===o.Literal)return new se(t);const i=this.displayNameOfType(e);switch(e){case o.Year:return new Y(t,i);case o.Month:return new ne(t,i);case o.Day:return new oe(t,i);case o.Hour:return new le(t,i);case o.Minute:return new ue(t,i);case o.Second:return new me(t,i);case o.Millisecond:return new de(t,i);case o.DayPeriod:return new ce(t,i)}}displayNameOfType(e){const t=e==="fractionalSecond"?"millisecond":this.dateTimeFieldDisplayNames.of(e);return t?t.charAt(0).toUpperCase()+t.slice(1):""}}const pe='@charset "UTF-8";:host{font-family:var(--luzmo-font-family);--date-time-picker-border-radius: var( --luzmo-date-time-picker-border-radius, var(--luzmo-border-radius) );--date-time-picker-border-radius-quiet: var( --luzmo-date-time-picker-border-radius-quiet, 0 );--date-time-picker-border-width: var(--luzmo-border-width);--date-time-picker-button-border-color: var( --highcontrast-datepicker-pickerbutton-border-color, var( --luzmo-date-time-picker-pickerbutton-border-color, var(--luzmo-border-color) ) );--date-time-picker-button-border-color-focus: var( --highcontrast-datepicker-pickerbutton-border-color, var( --luzmo-date-time-picker-pickerbutton-border-color-focus, var(--luzmo-primary) ) );--date-time-picker-button-border-color-invalid: var( --highcontrast-datepicker-pickerbutton-border-color, var( --luzmo-date-time-picker-pickerbutton-border-color-invalid, var(--luzmo-negative-color) ) );--date-time-picker-button-width: calc( var(--date-time-picker-edge-to-disclosure-icon) * 2 + var(--date-time-picker-icon-size) );--date-time-picker-quiet-button-offset: var( --luzmo-date-time-picker-quiet-button-offset, var(--date-time-picker-text-to-visual) );--date-time-picker-icon-to-text: var(--date-time-picker-edge-to-text);--date-time-picker-button-width-quiet: calc( var(--date-time-picker-button-width) - var( --date-time-picker-quiet-button-offset ) );--date-time-picker-focus-ring-gap: var( --luzmo-date-time-picker-focus-ring-gap, var(--luzmo-indicator-gap) );--date-time-picker-focus-thickness: var( --luzmo-date-time-picker-focus-thickness, var(--luzmo-indicator-width) );--date-time-picker-focus-animation: var( --luzmo-date-time-picker-focus-animation, var(--luzmo-animation-duration) );--date-time-picker-focus-ring-width: var( --luzmo-date-time-picker-focus-ring-width, var(--luzmo-border-width) );--date-time-picker-focus-ring-color: var( --highcontrast-datepicker-focus-ring-color, var(--luzmo-date-time-picker-focus-ring-color, var(--luzmo-indicator-color)) );--date-time-picker-focus-line-gap: var( --luzmo-date-time-picker-focus-line-gap, var(--luzmo-spacing-2) );--date-time-picker-invalid-quiet-color: var( --luzmo-date-time-picker-invalid-quiet-color, var(--luzmo-negative-color) );--date-time-picker-quiet-border-color-hover: var( --luzmo-date-time-picker-quiet-border-color-hover, var(--luzmo-border-color-hover) );--date-time-picker-border-color-disabled: var( --luzmo-date-time-picker-border-color-disabled, var(--luzmo-border-color-disabled) );--date-time-picker-dash-font-size: var( --luzmo-date-time-picker-dash-font-size, var(--date-time-picker-dash-font-size) );--date-time-picker-dash-color: var( --highcontrast-datepicker-dash-color, var(--luzmo-date-time-picker-dash-color, var(--luzmo-font-color)) );--date-time-picker-range-dash-padding-top: var( --luzmo-date-time-picker-range-dash-padding-top, 0 );--date-time-picker-range-dash-margin-inline-start: var( --luzmo-date-time-picker-range-dash-margin-left, calc(var(--date-time-picker-dash-font-size) * -.5) );--date-time-picker-range-input-width-first: var( --luzmo-date-time-picker-range-input-width-first, calc( var(--date-time-picker-initial-width) - var( --date-time-picker-generic-padding ) * 2 ) );--date-time-picker-input-width-base: calc( var(--date-time-picker-range-input-width-first) + var(--date-time-picker-icon-size) );--date-time-picker-input-width: var( --luzmo-date-time-picker-input-width, calc( var(--date-time-picker-input-width-base) + var(--date-time-picker-initial-height) ) );--date-time-picker-range-input-width-quiet-first: var( --luzmo-date-time-picker-range-input-width-quiet-first, calc( var(--date-time-picker-width-quiet-first) + var(--date-time-picker-width-quiet-second) ) );--date-time-picker-input-width-quiet: var( --luzmo-date-time-picker-input-width-quiet, calc( var(--date-time-picker-range-input-width-quiet-first) + var(--date-time-picker-icon-size) + var(--date-time-picker-initial-height) ) );--date-time-picker-datetime-input-width-first: var( --luzmo-date-time-picker-datetime-input-width-first, calc( var(--date-time-picker-input-width-base) + var(--date-time-picker-datetime-width-first) ) );--date-time-picker-datetime-input-width: var( --luzmo-date-time-picker-datetime-input-width, calc( var(--date-time-picker-datetime-input-width-first) + var(--date-time-picker-icon-size) + var(--date-time-picker-initial-height) ) );--date-time-picker-datetime-quiet-input-width-first: var( --luzmo-date-time-picker-datetime-quiet-input-width-first, calc( var(--date-time-picker-input-width-base) + var(--date-time-picker-input-datetime-width) ) );--date-time-picker-datetime-quiet-input-width: var( --luzmo-date-time-picker-datetime-quiet-input-width, calc( var(--date-time-picker-datetime-quiet-input-width-first) + var(--date-time-picker-icon-size) + var(--date-time-picker-initial-height) ) );--date-time-picker-padding-inline-end: var( --luzmo-date-time-picker-padding-inline, calc( var(--date-time-picker-button-width) + var(--date-time-picker-edge-to-text) - var( --date-time-picker-border-width ) * 2 ) );--date-time-picker-padding-inline-end-quiet: var( --luzmo-date-time-picker-padding-inline-quiet, calc( var(--date-time-picker-button-width) + var(--date-time-picker-edge-to-text) - var( --date-time-picker-quiet-button-offset ) ) );--date-time-picker-padding-inline-end-invalid-quiet: var( --luzmo-date-time-picker-padding-inline-end-invalid-quiet, calc( var(--date-time-picker-button-width-quiet) + var(--date-time-picker-icon-size) + var(--date-time-picker-icon-to-text) ) );min-inline-size:var(--luzmo-date-time-picker-min-width, var(--date-time-picker-min-width));border-radius:var(--date-time-picker-border-radius);flex-flow:row;display:inline-flex;position:relative}:host([disabled]) luzmo-picker-button{cursor:default}:host([disabled]){--luzmo-date-time-picker-dash-color: var( --luzmo-date-time-picker-dash-color-disabled, var(--disabled-content-color) );--luzmo-text-field-border-color-disabled: transparent}:host([invalid]),:host([invalid]) #text-field .icon{--luzmo-text-field-icon-spacing-inline-end-invalid: calc( var(--date-time-picker-button-width) + var(--date-time-picker-invalid-icon-to-button) );--luzmo-text-field-icon-spacing-inline-end-quiet-invalid: calc( var(--date-time-picker-button-width-quiet) + var(--date-time-picker-invalid-icon-to-button-quiet) )}:host(:not([quiet])){inline-size:var(--luzmo-date-time-picker-width, var(--date-time-picker-width))}:host([quiet]){inline-size:var(--luzmo-date-time-picker-width-quiet, var(--date-time-picker-width-quiet, var(--date-time-picker-width)))}:host(:not([quiet],[disabled])){--luzmo-picker-button-border-color: var( --date-time-picker-button-border-color )}:host([focused]),:host([focused]:not([quiet],[disabled])){--luzmo-picker-button-border-color: var( --date-time-picker-button-border-color-focus )}:host([invalid]:not([quiet],[disabled])){--luzmo-picker-button-border-color: var( --date-time-picker-button-border-color-invalid )}.input{inline-size:100%;flex:1;padding-inline-end:var(--date-time-picker-padding-inline-end);border-color:var(--luzmo-date-time-picker-border-color, var(--datepicker-border-color))}:host .input:read-only{border-color:var(--luzmo-date-time-picker-border-color, var(--datepicker-border-color))}.input.luzmo-DatePicker-startField{border-inline-end:0;border-start-end-radius:0;border-end-end-radius:0;padding-inline-end:var(--luzmo-date-time-picker-generic-padding, var(--date-time-picker-generic-padding))}.input.luzmo-DatePicker-endField{border-inline-start:0;border-start-start-radius:0;border-end-start-radius:0;padding-inline-start:var(--luzmo-date-time-picker-generic-padding, var(--date-time-picker-generic-padding))}luzmo-picker-button{cursor:pointer;position:absolute;inset-inline-end:0}.luzmo-DatePicker-rangeDash{color:var(--date-time-picker-dash-color);line-height:var(--luzmo-date-time-picker-dash-line-height, var(--date-time-picker-dash-line-height));flex:initial;inline-size:0;z-index:1;padding-block-start:var(--date-time-picker-range-dash-padding-top)}.luzmo-DatePicker-rangeDash:before{content:"–";margin-block:0;margin-inline:var(--date-time-picker-range-dash-margin-inline-start);text-align:center;vertical-align:middle;inline-size:var(--date-time-picker-dash-font-size);display:inline-block;overflow:hidden}:host([quiet]){--luzmo-date-time-picker-border-radius: var( --date-time-picker-border-radius-quiet );--luzmo-date-time-picker-padding-inline: var( --date-time-picker-padding-inline-end-quiet );--luzmo-picker-button-border-color-disabled: var( --date-time-picker-border-color-disabled );--luzmo-picker-button-background-color-hover-disabled: var( --date-time-picker-border-color-disabled )}:host([quiet][disabled]){--luzmo-text-field-border-color-disabled: var( --date-time-picker-border-color-disabled )}:host([quiet][invalid]) .input:not(.luzmo-DatePicker-startField){padding-inline-end:var(--date-time-picker-padding-inline-end-invalid-quiet)}@media (hover: hover){:host(:hover):not([focused],[disabled],[invalid]){--luzmo-picker-button-border-color: var( --date-time-picker-quiet-border-color-hover )}}:host([quiet][invalid]){--luzmo-picker-button-border-color: var( --date-time-picker-invalid-quiet-color )}:host([quiet]) luzmo-picker-button{inline-size:auto;inset-inline-end:calc(var(--date-time-picker-quiet-button-offset) * -1)}:host([quiet]) luzmo-picker-button:not(.is-open){--luzmo-picker-button-border-color-disabled: transparent}:host([quiet]) luzmo-picker-button:not(:disabled,.is-open){--luzmo-picker-button-background-color: transparent}.luzmo-DatePicker--range{--luzmo-date-time-picker-border-radius: var(--date-time-picker-border-radius)}.luzmo-DatePicker--range:after{pointer-events:none;content:"";margin:calc(var(--date-time-picker-focus-ring-gap) * -1);border-radius:calc(var(--date-time-picker-border-radius) + var(--date-time-picker-focus-ring-gap));transition:box-shadow var(--date-time-picker-focus-animation) ease-in-out,border-color var(--date-time-picker-focus-animation) ease-in-out;border-color:#0000;position:absolute;top:0;right:0;bottom:0;left:0}:host([focused]) .luzmo-DatePicker--range:not(.luzmo-DatePicker--quiet):after{box-shadow:0 0 0 var(--date-time-picker-focus-ring-width) var(--date-time-picker-focus-ring-color)}:host([focused]) .luzmo-DatePicker--range:not(.luzmo-DatePicker--quiet) #text-field:after{display:none}:host([quiet]) .luzmo-DatePicker--range{--luzmo-date-time-picker-border-radius: var( --date-time-picker-border-radius-quiet )}:host([quiet][focused]) .luzmo-DatePicker--range:after{box-shadow:none;border-block-end:var(--date-time-picker-focus-thickness) solid var(--date-time-picker-focus-ring-color);border-radius:0;margin:0;inset-block-end:calc(var(--date-time-picker-focus-line-gap) * -1)}:host([quiet]) .luzmo-DatePicker--range #text-field{min-inline-size:0;inline-size:var(--date-time-picker-input-width-quiet)}:host([quiet]) .luzmo-DatePicker--range #text-field:first-of-type{inline-size:var(--date-time-picker-range-input-width-quiet-first)}.luzmo-DatePicker--range.luzmo-DatePicker--datetimeRange #text-field{inline-size:var(--date-time-picker-datetime-input-width);min-inline-size:0}.luzmo-DatePicker--range.luzmo-DatePicker--datetimeRange #text-field:first-of-type{inline-size:var(--date-time-picker-datetime-input-width-first)}:host([quiet]) .luzmo-DatePicker--range.luzmo-DatePicker--datetimeRange #text-field{inline-size:var(--date-time-picker-datetime-quiet-input-width)}:host([quiet]) .luzmo-DatePicker--range.luzmo-DatePicker--datetimeRange #text-field:first-of-type{inline-size:var(--date-time-picker-datetime-quiet-input-width-first)}.luzmo-DatePicker--range #text-field{flex:initial;min-inline-size:0;inline-size:var(--date-time-picker-input-width)}.luzmo-DatePicker--range #text-field:first-of-type{inline-size:var(--date-time-picker-range-input-width-first)}@media (forced-colors: active){:host{--highcontrast-datepicker-dash-color: CanvasText;--highcontrast-datepicker-focus-ring-color: Highlight;--highcontrast-datepicker-pickerbutton-border-color: Highlight}:host([disabled]){--highcontrast-datepicker-dash-color: GrayText}:host([quiet][invalid]){--highcontrast-datepicker-pickerbutton-border-color: Highlight}}:host{--date-time-picker-width: auto;--date-time-picker-initial-height: var(--system-date-picker-initial-height);--date-time-picker-font-color-default: var(--luzmo-font-color);--datepicker-border-color: var(--luzmo-border-color);--date-time-picker-button-indicator-color: var(--luzmo-indicator-color);--text-field-focus-indicator-color: var(--luzmo-background-color-highlight);--date-time-picker-initial-width: 120px;--date-time-picker-min-width: 160px;--date-time-picker-calendar-padding: var(--luzmo-spacing-4);--date-time-picker-icon-size: 18px;--date-time-picker-dash-font-size: var(--luzmo-font-size);--date-time-picker-text-to-visual: var(--luzmo-spacing-3);--date-time-picker-edge-to-disclosure-icon: var(--luzmo-spacing-3);--date-time-picker-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-icon-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-invalid-icon-to-button: var(--luzmo-spacing-3);--date-time-picker-generic-padding: var(--luzmo-spacing-4)}:host([size=s]){--date-time-picker-min-width: 140px;--date-time-picker-calendar-padding: var(--luzmo-spacing-3);--date-time-picker-icon-size: 16px;--date-time-picker-dash-font-size: var(--luzmo-font-size-s);--date-time-picker-text-to-visual: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--date-time-picker-edge-to-disclosure-icon: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--date-time-picker-edge-to-text: var(--luzmo-spacing-3);--date-time-picker-invalid-icon-to-button: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--date-time-picker-icon-to-text: var(--luzmo-spacing-3)}:host([invalid][size=s]){--text-field-icon-spacing-block-invalid: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) )}:host([size=m]){--date-time-picker-min-width: 160px;--date-time-picker-calendar-padding: var(--luzmo-spacing-4);--date-time-picker-icon-size: 18px;--date-time-picker-dash-font-size: var(--luzmo-font-size-m);--date-time-picker-text-to-visual: var(--luzmo-spacing-3);--date-time-picker-edge-to-disclosure-icon: var(--luzmo-spacing-3);--date-time-picker-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-invalid-icon-to-button: var(--luzmo-spacing-3);--date-time-picker-icon-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) )}:host([size=l]){--date-time-picker-min-width: 180px;--date-time-picker-calendar-padding: var(--luzmo-spacing-5);--date-time-picker-icon-size: 20px;--date-time-picker-dash-font-size: var(--luzmo-font-size-l);--date-time-picker-text-to-visual: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-edge-to-disclosure-icon: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-edge-to-text: var(--luzmo-spacing-4);--date-time-picker-invalid-icon-to-button: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-icon-to-text: var(--luzmo-spacing-4)}:host([size=xl]){--date-time-picker-min-width: 200px;--date-time-picker-calendar-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--date-time-picker-icon-size: 22px;--date-time-picker-dash-font-size: var(--luzmo-font-size-xl);--date-time-picker-text-to-visual: var(--luzmo-spacing-4);--date-time-picker-edge-to-disclosure-icon: var(--luzmo-spacing-4);--date-time-picker-edge-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--date-time-picker-invalid-icon-to-button: var(--luzmo-spacing-4);--date-time-picker-icon-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) )}:host{--status-icon-size: var( --luzmo-text-field-icon-size-invalid, var(--text-field-icon-size-invalid) );--picker-button-size: var( --luzmo-text-field-height, var(--text-field-height) );--input-spacing: var( --luzmo-text-field-spacing-inline, var(--text-field-spacing-inline) );--input-border-width: var( --luzmo-text-field-border-width, var(--luzmo-border-width) );--text-to-icon: var( --luzmo-text-field-icon-spacing-inline-start-invalid, var(--text-field-icon-spacing-inline-start-invalid) );--date-time-picker-input-width: var(--date-time-picker-width);flex-wrap:wrap}:host #text-field{display:inline-block}:host #text-field .input,:host([quiet]) #text-field .input,:host([valid]) #text-field .input,:host([invalid]) #text-field .input{inline-size:100%}:host #text-field .input,:host([quiet]) #text-field .input{padding-inline-end:calc(var(--picker-button-size) + var(--input-spacing) - var(--input-border-width))}:host([valid]) #text-field .input,:host([invalid]) #text-field .input{inline-size:100%;padding-inline-end:calc(var(--status-icon-size) + var(--picker-button-size) + var(--input-spacing) - var(--input-border-width) + var(--text-to-icon))}@media (hover: hover){:host([invalid]) #text-field:hover .input,:host([focused][invalid]) .input:hover,:host([focused][invalid]) #text-field:hover .input{border-color:var(--highcontrast-text-field-border-color-invalid-default, var(--luzmo-text-field-border-color-invalid-default, var(--luzmo-negative-color-hover)))}}luzmo-picker-button:focus-visible{outline:none}luzmo-popover{overflow-y:auto}luzmo-popover .popover-content{padding:var(--luzmo-date-time-picker-calendar-padding, var(--date-time-picker-calendar-padding))}.input-content{display:flex;align-items:center;height:100%;overflow:auto hidden;scrollbar-width:none;line-height:normal}.input-content::-webkit-scrollbar{display:none;width:0;height:0}.literal-segment,.editable-segment{display:inline-block;color:var(--luzmo-date-time-picker-font-color-default, var(--date-time-picker-font-color-default))}.editable-segment{padding:0 .15em;font-variant-numeric:tabular-nums;text-align:end;white-space:nowrap;caret-color:transparent;outline:none}[dir=ltr] .editable-segment{text-align:start}.literal-segment{white-space:pre;user-select:none;-webkit-user-select:none}.is-placeholder,.is-placeholder+.literal-segment{color:var(--luzmo-font-color-disabled)}.editable-segment:focus-visible{color:var(--white);background-color:var(--highcontrast-text-field-focus-indicator-color, var(--luzmo-text-field-focus-indicator-color, var(--text-field-focus-indicator-color)))}.editable-segment::selection{background-color:transparent}';var fe=Object.defineProperty,ve=Object.getOwnPropertyDescriptor,p=(n,e,t,i)=>{for(var a=i>1?void 0:i?ve(e,t):e,r=n.length-1,s;r>=0;r--)(s=n[r])&&(a=(i?s(e,t,a):s(a))||a);return i&&a&&fe(e,t,a),a};class m extends K.ManageHelpText(I.SizedMixin(G.Focusable,{validSizes:Object.values(I.ElementSizes)})){constructor(){super(),this._precision=v.Minute,this.isUserSetPrecision=!1,this.invalid=!1,this.readonly=!1,this.quiet=!1,this.placement="bottom",this.language="en",this.labels={previous:"Previous",next:"Next",today:"Today",selected:"Selected",empty:"Empty",calendar:"Calendar"},this.focused=!1,this.segments=new M([]),this.isCalendarOpen=!1,this._timeZone=this.timeZone??c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2(),this.cachedLocalTime=c.$14e0f24ef4ac5c92$export$461939dd4422153(this._timeZone),this.setNumberParser(),this.setDateFormatter(),this.setAriaDateFormatter(),this.addEventListener("focusin",()=>this.previousCommitedValue=this._value),this.addEventListener("focusout",()=>this.commitValue())}static get styles(){return[u.r(pe),u.r(X.textFieldStyles)]}get precision(){return this._precision}set precision(e){this.isUserSetPrecision=!0;const t=this._precision;e!==t&&(this._precision=e,this.requestUpdate("precision",t))}get _language(){try{return this.language?new Intl.Locale(this.language).language:"en"}catch{return"en"}}get focusElement(){return this.firstEditableSegment}get currentDate(){return this._value?c.$11d87f3f76e88657$export$84c95a83c799e074(this._value,this._timeZone):this.cachedLocalTime}get includesTime(){return[v.Hour,v.Minute,v.Second,v.Millisecond].includes(this.precision)}clear(){this._value=void 0,this.setSegments()}willUpdate(e){const t=e.has("value"),i=e.has("timeZone"),a=e.has("min"),r=e.has("max"),s=e.has("language"),l=e.has("dateFormat"),h=e.has("dateSeparator"),d=e.has("precision"),g=e.has("segments"),b=e.has("disabled");if(s&&this.setNumberParser(),(s||d)&&(this.setDateFormatter(),this.setAriaDateFormatter()),t||a||r||i){this._value=this.value?c.$fae977aafc393c5c$export$5adfdab05168c219(new Date(this.value).toISOString(),"UTC"):void 0,this._min=this.min?c.$fae977aafc393c5c$export$5adfdab05168c219(new Date(this.min).toISOString(),"UTC"):void 0,this._max=this.max?c.$fae977aafc393c5c$export$5adfdab05168c219(new Date(this.max).toISOString(),"UTC"):void 0;const f=this.mostSpecificDateValue;f&&(this.convertDatePropsToMatch(f),this.checkDatePropsCompliance(a||r),this.updateDateProps(),this.updateDefaultPrecision())}(t||s||d||l||i||h)&&this.setSegments(),g&&this.setValueFromSegments(),b&&this.isCalendarOpen&&(this.isCalendarOpen=!1);const k=this._value&&this.labels.selected+": "+this.ariaDateFormatter.format(U(this._value));this.setAttribute("aria-label",k??this.labels.empty)}get mostSpecificDateValue(){const e=[this._value,this._min,this._max].filter(r=>r!==void 0);if(e.length===0)return;const t=e.filter(r=>_(r));if(t.length>0)return t[0];const i=e.filter(r=>C(r));return i.length>0?i[0]:e.find(r=>F(r))}convertDatePropsToMatch(e){if(_(e)){this._timeZone=this.timeZone??e.timeZone,this._value=this._value&&c.$11d87f3f76e88657$export$84c95a83c799e074(this._value,this._timeZone),this._min=this._min&&c.$11d87f3f76e88657$export$84c95a83c799e074(this._min,this._timeZone),this._max=this._max&&c.$11d87f3f76e88657$export$84c95a83c799e074(this._max,this._timeZone);return}if(this._timeZone=this.timeZone??c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2(),C(e)){this._value=this._value&&c.$11d87f3f76e88657$export$b21e0b124e224484(this._value),this._min=this._min&&c.$11d87f3f76e88657$export$b21e0b124e224484(this._min),this._max=this._max&&c.$11d87f3f76e88657$export$b21e0b124e224484(this._max);return}this._value=this._value&&c.$11d87f3f76e88657$export$93522d1a439f3617(this._value),this._min=this._min&&c.$11d87f3f76e88657$export$93522d1a439f3617(this._min),this._max=this._max&&c.$11d87f3f76e88657$export$93522d1a439f3617(this._max)}checkDatePropsCompliance(e){e&&this._min&&this._max&&(this._min.compare(this._max)<0||(console.warn(this,`<${this.localName}> expects the 'min' to be less than 'max'. Please ensure that 'min' property's date is earlier than 'max' property's date.`),this._min=void 0,this._max=void 0)),this.isNonCompliantValue()&&(console.warn(this,`<${this.localName}> expects the preselected value to comply with the min and max constraints. Please ensure that 'value' property's date is in between the dates for the 'min' and 'max' properties.`),this._value=void 0),!this._min&&!this._max&&!this._value&&(this._timeZone=c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())}isNonCompliantValue(){return this._value===void 0?!1:!!(this._min&&this._value.compare(this._min)<0||this._max&&this._value.compare(this._max)>0)}updateDateProps(){const e=this.mostSpecificDateValue;if(!e||!this.isUserSetPrecision)return;this.includesTime&&F(e)&&this.convertDatePropsToMatch(c.$11d87f3f76e88657$export$b21e0b124e224484(e))}updateDefaultPrecision(){if(this.isUserSetPrecision)return;const e=this.mostSpecificDateValue;e&&(this._precision=F(e)?v.Day:v.Minute)}render(){return u.x`
18
+ "use strict";
19
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
20
+ const date = require("@internationalized/date");
21
+ const number = require("@internationalized/number");
22
+ const lit = require("lit");
23
+ const decorators_js = require("lit/decorators.js");
24
+ const classMap_js = require("lit/directives/class-map.js");
25
+ const ifDefined_js = require("lit/directives/if-defined.js");
26
+ const styleMap_js = require("lit/directives/style-map.js");
27
+ const when_js = require("lit/directives/when.js");
28
+ const focusable = require("../focusable-BPrTcZPd.cjs");
29
+ const sizedMixin = require("../sized-mixin-UaTVa-AE.cjs");
30
+ const icons = require("@luzmo/icons");
31
+ require("../calendar/index.cjs");
32
+ require("../icon/index.cjs");
33
+ require("../overlay/index.cjs");
34
+ require("../picker-button/index.cjs");
35
+ require("../popover/index.cjs");
36
+ const manageHelpText = require("../manage-help-text-BYx84zZR.cjs");
37
+ const textField_module = require("../text-field.module-DIJdV_sA.cjs");
38
+ const SegmentTypes = {
39
+ Year: "year",
40
+ Month: "month",
41
+ Day: "day",
42
+ Hour: "hour",
43
+ Minute: "minute",
44
+ Second: "second",
45
+ Millisecond: "fractionalSecond",
46
+ DayPeriod: "dayPeriod",
47
+ Literal: "literal"
48
+ };
49
+ const SegmentPlaceholders = {
50
+ [SegmentTypes.Year]: "––––",
51
+ [SegmentTypes.Month]: "––",
52
+ [SegmentTypes.Day]: "––",
53
+ [SegmentTypes.Hour]: "––",
54
+ [SegmentTypes.Minute]: "––",
55
+ [SegmentTypes.Second]: "––",
56
+ [SegmentTypes.Millisecond]: "–––",
57
+ [SegmentTypes.DayPeriod]: "––"
58
+ };
59
+ const Precisions = {
60
+ Day: "day",
61
+ Hour: "hour",
62
+ Minute: "minute",
63
+ Second: "second",
64
+ Millisecond: "millisecond"
65
+ };
66
+ const AM = 0;
67
+ const PM = 12;
68
+ const DEFAULT_LEAP_YEAR = 2e3;
69
+ const MAX_DAYS_PER_MONTH = 31;
70
+ function isNumber(value) {
71
+ return typeof value === "number";
72
+ }
73
+ function isZonedDateTime(date$1) {
74
+ return date$1 instanceof date.ZonedDateTime;
75
+ }
76
+ function isCalendarDateTime(date$1) {
77
+ return date$1 instanceof date.CalendarDateTime;
78
+ }
79
+ function isCalendarDate(date$1) {
80
+ return date$1 instanceof date.CalendarDate;
81
+ }
82
+ function convertHourTo24hFormat(hour, dayPeriod) {
83
+ return hour = hour % PM + dayPeriod;
84
+ }
85
+ function getDayPeriodModifier(hour) {
86
+ return hour >= PM ? PM : AM;
87
+ }
88
+ function equalSegmentValues(a, b) {
89
+ return a.length === b.length && a.every((value, index) => value === b[index]);
90
+ }
91
+ function dateValueToDate(dateValue) {
92
+ if (isCalendarDate(dateValue)) {
93
+ return new Date(dateValue.year, dateValue.month - 1, dateValue.day);
94
+ }
95
+ return new Date(
96
+ dateValue.year,
97
+ dateValue.month - 1,
98
+ dateValue.day,
99
+ dateValue.hour,
100
+ dateValue.minute,
101
+ dateValue.second,
102
+ dateValue.millisecond
103
+ );
104
+ }
105
+ class EditableSegment {
106
+ constructor(type, formatted, label) {
107
+ this.type = type;
108
+ this.formatted = formatted;
109
+ this.label = label;
110
+ this.placeholder = SegmentPlaceholders[type];
111
+ }
112
+ increment(_value) {
113
+ if (this.value === void 0) this.value = this.minValue;
114
+ else {
115
+ this.value = this.value + 1;
116
+ if (this.value > this.maxValue) this.value = this.minValue;
117
+ }
118
+ }
119
+ decrement(_value) {
120
+ if (this.value === void 0) this.value = this.maxValue;
121
+ else {
122
+ this.value = this.value - 1;
123
+ if (this.value < this.minValue) this.value = this.maxValue;
124
+ }
125
+ }
126
+ setValueFromDate(currentDate) {
127
+ if (this.type === "fractionalSecond") {
128
+ this.value = currentDate.millisecond;
129
+ } else if (this.type !== SegmentTypes.DayPeriod) {
130
+ this.value = currentDate[this.type];
131
+ }
132
+ }
133
+ clear() {
134
+ this.value = void 0;
135
+ }
136
+ handleInput(eventData, numberParser) {
137
+ const typedValue = numberParser.parse(eventData);
138
+ if (Number.isNaN(typedValue)) return;
139
+ const newValue = numberParser.parse(
140
+ `${this.value ?? ""}${typedValue}`
141
+ );
142
+ if (this.isInputValueCompliant(newValue)) {
143
+ this.value = newValue;
144
+ return;
145
+ }
146
+ if (this.isInputValueCompliant(typedValue)) this.value = typedValue;
147
+ }
148
+ isInputValueCompliant(value) {
149
+ const { minValue, maxValue } = this.inputValidationLimits;
150
+ return value >= minValue && value <= maxValue;
151
+ }
152
+ get inputValidationLimits() {
153
+ return {
154
+ minValue: this.minValue,
155
+ maxValue: this.maxValue
156
+ };
157
+ }
158
+ updateValueToLimits() {
159
+ if (this.value === void 0) return;
160
+ if (this.value < this.minValue) this.value = this.minValue;
161
+ if (this.value > this.maxValue) this.value = this.maxValue;
162
+ }
163
+ }
164
+ class YearSegment extends EditableSegment {
165
+ constructor(formatted, label) {
166
+ super(SegmentTypes.Year, formatted, label);
167
+ this.minValue = 1;
168
+ this.maxValue = 9999;
169
+ }
170
+ setLimits(currentDate) {
171
+ this.minValue = 1;
172
+ this.maxValue = currentDate.calendar.getYearsInEra(currentDate);
173
+ this.updateValueToLimits();
174
+ }
175
+ increment(currentDate) {
176
+ if (this.value === void 0) this.value = currentDate.year;
177
+ else super.increment();
178
+ }
179
+ decrement(currentDate) {
180
+ if (this.value === void 0) this.value = currentDate.year;
181
+ else super.decrement();
182
+ }
183
+ clear() {
184
+ if (this.value === void 0) return;
185
+ const newValue = Math.floor(this.value / 10);
186
+ this.value = newValue > 0 ? newValue : void 0;
187
+ }
188
+ }
189
+ class DateTimeSegments {
190
+ constructor(segments) {
191
+ this.segments = segments;
192
+ }
193
+ get all() {
194
+ return this.segments;
195
+ }
196
+ get editableValues() {
197
+ return this.all.filter((segment) => segment instanceof EditableSegment).map((segment) => segment.value);
198
+ }
199
+ get year() {
200
+ const yearSegment = this.getByType(SegmentTypes.Year);
201
+ if (yearSegment && yearSegment instanceof YearSegment) return yearSegment;
202
+ return void 0;
203
+ }
204
+ get month() {
205
+ const monthSegment = this.getByType(SegmentTypes.Month);
206
+ if (monthSegment) return monthSegment;
207
+ return;
208
+ }
209
+ get day() {
210
+ const daySegment = this.getByType(SegmentTypes.Day);
211
+ if (daySegment) return daySegment;
212
+ return;
213
+ }
214
+ get hour() {
215
+ const hourSegment = this.getByType(SegmentTypes.Hour);
216
+ if (hourSegment) return hourSegment;
217
+ return;
218
+ }
219
+ get minute() {
220
+ const minuteSegment = this.getByType(SegmentTypes.Minute);
221
+ if (minuteSegment) return minuteSegment;
222
+ return;
223
+ }
224
+ get second() {
225
+ const secondSegment = this.getByType(SegmentTypes.Second);
226
+ if (secondSegment) return secondSegment;
227
+ return;
228
+ }
229
+ get millisecond() {
230
+ const millisecondSegment = this.getByType(SegmentTypes.Millisecond);
231
+ if (millisecondSegment) return millisecondSegment;
232
+ return;
233
+ }
234
+ get dayPeriod() {
235
+ const dayPeriodSegment = this.getByType(SegmentTypes.DayPeriod);
236
+ if (dayPeriodSegment) return dayPeriodSegment;
237
+ return;
238
+ }
239
+ getByType(type) {
240
+ return this.segments.find(
241
+ (segment) => segment.type === type
242
+ );
243
+ }
244
+ /**
245
+ * Returns a `CalendarDate` object with the year, month and day values of the segments if they are all defined. The time values
246
+ * are checked and included based on the precision provided, returning a `CalendarDateTime` instead.
247
+ *
248
+ * @param precision - The precision to use when creating the date object
249
+ */
250
+ getFormattedDate(precision = Precisions.Day) {
251
+ var _a, _b, _c, _d, _e, _f, _g;
252
+ const year = (_a = this.year) == null ? void 0 : _a.value;
253
+ const month = (_b = this.month) == null ? void 0 : _b.value;
254
+ const day = (_c = this.day) == null ? void 0 : _c.value;
255
+ if (!isNumber(year) || !isNumber(month) || !isNumber(day)) return;
256
+ if (precision === Precisions.Day) return new date.CalendarDate(year, month, day);
257
+ let hour = (_d = this.hour) == null ? void 0 : _d.value;
258
+ if (!isNumber(hour)) return;
259
+ if (this.dayPeriod) {
260
+ const dayPeriod = this.dayPeriod.value;
261
+ if (!isNumber(dayPeriod)) return;
262
+ hour = convertHourTo24hFormat(hour, dayPeriod);
263
+ }
264
+ if (precision === Precisions.Hour)
265
+ return new date.CalendarDateTime(year, month, day, hour);
266
+ const minute = (_e = this.minute) == null ? void 0 : _e.value;
267
+ if (!isNumber(minute)) return;
268
+ if (precision === Precisions.Minute)
269
+ return new date.CalendarDateTime(year, month, day, hour, minute);
270
+ const second = (_f = this.second) == null ? void 0 : _f.value;
271
+ if (!isNumber(second)) return;
272
+ if (precision === Precisions.Second)
273
+ return new date.CalendarDateTime(year, month, day, hour, minute, second);
274
+ const millisecond = (_g = this.millisecond) == null ? void 0 : _g.value;
275
+ if (!isNumber(millisecond)) return;
276
+ return new date.CalendarDateTime(
277
+ year,
278
+ month,
279
+ day,
280
+ hour,
281
+ minute,
282
+ second,
283
+ millisecond
284
+ );
285
+ }
286
+ }
287
+ class SegmentsFormatter {
288
+ constructor(dateFormatter, currentDate) {
289
+ this.dateFormatter = dateFormatter;
290
+ this.currentDate = currentDate;
291
+ this.numberFormatter = new number.NumberFormatter(
292
+ this.dateFormatter.resolvedOptions().locale,
293
+ { useGrouping: false }
294
+ );
295
+ }
296
+ /**
297
+ * Formats all the `DateTimeSegments` to have the formatted property based on the value property, according to the date formatter.
298
+ * @param segments - `DateTimeSegments` to format
299
+ * @returns Formatted DateTimeSegments
300
+ */
301
+ format(segments) {
302
+ if (!segments.year || !segments.month || !segments.day) return segments;
303
+ const dateInfo = this.getDateInfoWithDefaults(segments);
304
+ if (!dateInfo) return segments;
305
+ this.setSegmentsFormatted(segments, dateInfo);
306
+ this.padSegmentsFormatted(segments);
307
+ return segments;
308
+ }
309
+ setSegmentsFormatted(segments, dateInfo) {
310
+ var _a;
311
+ segments = new DateTimeSegments(segments.all);
312
+ const { year, month, day, hour, minute, second, millisecond } = dateInfo;
313
+ const date2 = new Date(
314
+ year,
315
+ month - 1,
316
+ day,
317
+ hour,
318
+ minute,
319
+ second,
320
+ millisecond
321
+ );
322
+ if (!segments.year) return;
323
+ segments.year.formatted = this.numberFormatter.format(year);
324
+ const segmentTypesToFormat = [
325
+ SegmentTypes.Month,
326
+ SegmentTypes.Day,
327
+ SegmentTypes.Hour,
328
+ SegmentTypes.Minute,
329
+ SegmentTypes.Second,
330
+ SegmentTypes.DayPeriod
331
+ ];
332
+ const formattedDateParts = this.dateFormatter.formatToParts(date2);
333
+ for (const segmentType of segmentTypesToFormat) {
334
+ const segment = segments[segmentType];
335
+ if (!segment) continue;
336
+ const formattedPart = (_a = formattedDateParts.find(
337
+ (part) => part.type === segmentType
338
+ )) == null ? void 0 : _a.value;
339
+ if (!formattedPart) continue;
340
+ segment.formatted = formattedPart;
341
+ }
342
+ }
343
+ padSegmentsFormatted(segments) {
344
+ if (!segments.hour) return;
345
+ const segmentTypesToPad = [
346
+ SegmentTypes.Month,
347
+ SegmentTypes.Day,
348
+ SegmentTypes.Hour,
349
+ SegmentTypes.Minute,
350
+ SegmentTypes.Second
351
+ ];
352
+ for (const segmentType of segmentTypesToPad) {
353
+ const segment = segments[segmentType];
354
+ if (!segment) continue;
355
+ segment.formatted = segment.formatted.padStart(
356
+ 2,
357
+ this.numberFormatter.format(0)
358
+ );
359
+ }
360
+ }
361
+ getDateInfoWithDefaults(segments) {
362
+ var _a, _b, _c, _d, _e;
363
+ if (!segments.year || !segments.month || !segments.day) return;
364
+ const day = segments.day.value ?? date.getMinimumDayInMonth(this.currentDate);
365
+ const month = segments.month.value ?? date.getMinimumMonthInYear(this.currentDate);
366
+ const year = segments.year.value ?? DEFAULT_LEAP_YEAR;
367
+ const dayPeriod = (_a = segments.dayPeriod) == null ? void 0 : _a.value;
368
+ let hour = (_b = segments.hour) == null ? void 0 : _b.value;
369
+ if (!isNumber(hour)) {
370
+ hour = isNumber(dayPeriod) ? dayPeriod : this.currentDate.hour;
371
+ } else if (isNumber(dayPeriod)) {
372
+ hour = convertHourTo24hFormat(hour, dayPeriod);
373
+ }
374
+ const minute = ((_c = segments.minute) == null ? void 0 : _c.value) ?? this.currentDate.minute;
375
+ const second = ((_d = segments.second) == null ? void 0 : _d.value) ?? this.currentDate.second;
376
+ const millisecond = ((_e = segments.millisecond) == null ? void 0 : _e.value) ?? this.currentDate.millisecond;
377
+ return { year, month, day, hour, minute, second, millisecond };
378
+ }
379
+ }
380
+ class SegmentsModifier {
381
+ constructor(params) {
382
+ const { dateFormatter, segments, currentDate } = params;
383
+ this.segments = new DateTimeSegments(segments.all);
384
+ this.dateFormatter = dateFormatter;
385
+ this.currentDate = currentDate;
386
+ }
387
+ modify(segmentType) {
388
+ const segment = this.segments.getByType(segmentType);
389
+ if (!segment) return this.segments;
390
+ this.modifySegment(segment);
391
+ this.updateSegmentsLimits(segmentType);
392
+ const segmentsFormatter = new SegmentsFormatter(
393
+ this.dateFormatter,
394
+ this.currentDate
395
+ );
396
+ this.segments = segmentsFormatter.format(this.segments);
397
+ return this.segments;
398
+ }
399
+ updateSegmentsLimits(modifiedSegmentType) {
400
+ const changedYear = modifiedSegmentType === SegmentTypes.Year;
401
+ const changedMonth = modifiedSegmentType === SegmentTypes.Month;
402
+ const year = this.segments.year;
403
+ const month = this.segments.month;
404
+ const day = this.segments.day;
405
+ if (changedYear) {
406
+ month == null ? void 0 : month.setLimits(this.currentDate);
407
+ day == null ? void 0 : day.setLimits(this.currentDate, month == null ? void 0 : month.value, year == null ? void 0 : year.value);
408
+ }
409
+ if (changedMonth)
410
+ day == null ? void 0 : day.setLimits(this.currentDate, month == null ? void 0 : month.value, year == null ? void 0 : year.value);
411
+ }
412
+ }
413
+ class ClearModifier extends SegmentsModifier {
414
+ modifySegment(segment) {
415
+ segment.clear();
416
+ }
417
+ }
418
+ class DecrementModifier extends SegmentsModifier {
419
+ modifySegment(segment) {
420
+ segment.decrement(this.currentDate);
421
+ }
422
+ }
423
+ class IncrementModifier extends SegmentsModifier {
424
+ modifySegment(segment) {
425
+ segment.increment(this.currentDate);
426
+ }
427
+ }
428
+ class InputModifier extends SegmentsModifier {
429
+ constructor(params) {
430
+ const { dateFormatter, segments, currentDate } = params;
431
+ super({ dateFormatter, segments, currentDate });
432
+ this.eventData = params.eventData;
433
+ this.numberParser = params.numberParser;
434
+ }
435
+ modifySegment(segment) {
436
+ if (this.eventData === null) return;
437
+ segment.handleInput(this.eventData, this.numberParser);
438
+ }
439
+ }
440
+ class DaySegment extends EditableSegment {
441
+ constructor(formatted, label) {
442
+ super(SegmentTypes.Day, formatted, label);
443
+ this.minValue = 1;
444
+ this.maxValue = 31;
445
+ }
446
+ setLimits(currentDate, month, year) {
447
+ if (!isNumber(month)) {
448
+ this.minValue = 1;
449
+ this.maxValue = MAX_DAYS_PER_MONTH;
450
+ return;
451
+ }
452
+ if (!isNumber(year)) year = DEFAULT_LEAP_YEAR;
453
+ const dateToUse = new date.CalendarDate(year, month, 1);
454
+ this.maxValue = currentDate.calendar.getDaysInMonth(dateToUse);
455
+ this.minValue = date.getMinimumDayInMonth(dateToUse);
456
+ this.updateValueToLimits();
457
+ }
458
+ }
459
+ class MonthSegment extends EditableSegment {
460
+ constructor(formatted, label) {
461
+ super(SegmentTypes.Month, formatted, label);
462
+ this.minValue = 1;
463
+ this.maxValue = 12;
464
+ }
465
+ setLimits(currentDate) {
466
+ this.minValue = date.getMinimumMonthInYear(currentDate);
467
+ this.maxValue = currentDate.calendar.getMonthsInYear(currentDate);
468
+ this.updateValueToLimits();
469
+ }
470
+ }
471
+ class LiteralSegment {
472
+ constructor(formatted) {
473
+ this.formatted = formatted;
474
+ this.type = SegmentTypes.Literal;
475
+ }
476
+ }
477
+ class DayPeriodSegment extends EditableSegment {
478
+ constructor(formatted, label) {
479
+ super(SegmentTypes.DayPeriod, formatted, label);
480
+ this.minValue = AM;
481
+ this.maxValue = PM;
482
+ this.localizedMinValue = "AM";
483
+ this.localizedMaxValue = "PM";
484
+ }
485
+ toggleAmPm() {
486
+ this.value = this.value === AM ? PM : AM;
487
+ }
488
+ increment() {
489
+ if (this.value === void 0) this.value = this.minValue;
490
+ else this.toggleAmPm();
491
+ }
492
+ decrement() {
493
+ if (this.value === void 0) this.value = this.maxValue;
494
+ else this.toggleAmPm();
495
+ }
496
+ setValueFromDate(currentDate) {
497
+ this.value = getDayPeriodModifier(currentDate.hour);
498
+ }
499
+ handleInput(eventData) {
500
+ const charTypedIn = eventData.toLowerCase();
501
+ const isCharFromAM = this.localizedMinValue.toLowerCase().includes(charTypedIn);
502
+ const isCharFromPM = this.localizedMaxValue.toLowerCase().includes(charTypedIn);
503
+ if (isCharFromAM && isCharFromPM) return;
504
+ if (isCharFromAM) this.value = AM;
505
+ if (isCharFromPM) this.value = PM;
506
+ return;
507
+ }
508
+ setLocalizedLimits(dateFormatter) {
509
+ const amDate = new Date(0, 0, 0, this.minValue, 0);
510
+ const pmDate = new Date(0, 0, 0, this.maxValue, 0);
511
+ const [am, pm] = [amDate, pmDate].map(
512
+ this.getDayPeriodFromDate.bind(this, dateFormatter)
513
+ );
514
+ if (am) this.localizedMinValue = am;
515
+ if (pm) this.localizedMaxValue = pm;
516
+ }
517
+ getDayPeriodFromDate(dateFormatter, date2) {
518
+ var _a;
519
+ return (_a = dateFormatter.formatToParts(date2).find((part) => part.type === this.type)) == null ? void 0 : _a.value;
520
+ }
521
+ }
522
+ class HourSegment extends EditableSegment {
523
+ constructor(formatted, label) {
524
+ super(SegmentTypes.Hour, formatted, label);
525
+ this.minValue = 0;
526
+ this.maxValue = 23;
527
+ }
528
+ setLimits(is12HourClock) {
529
+ this.minValue = 0;
530
+ this.maxValue = 23;
531
+ if (is12HourClock) {
532
+ this.minValue = 0;
533
+ this.maxValue = 11;
534
+ }
535
+ this.updateValueToLimits();
536
+ }
537
+ setValueFromDate(currentDate, is12HourClock) {
538
+ if (is12HourClock)
539
+ this.value = currentDate.hour - getDayPeriodModifier(currentDate.hour);
540
+ else super.setValueFromDate(currentDate);
541
+ }
542
+ /**
543
+ * Returns the limits used to validate a user typed-in value.
544
+ *
545
+ * Different limits are needed when the user is typing in the hour segment and the clock is in 12-hour format due to the fact that
546
+ * the hour value of 0 should be displayed as 12. Therefore, in the 12h format, the user should be able to type in "12" but not "00",
547
+ * for the 00 time, which is represented by the value of 0 of the hour segment.
548
+ */
549
+ get inputValidationLimits() {
550
+ const isAmPm = this.maxValue === 11;
551
+ return {
552
+ minValue: isAmPm ? 1 : 0,
553
+ maxValue: isAmPm ? 12 : 23
554
+ };
555
+ }
556
+ }
557
+ class MillisecondSegment extends EditableSegment {
558
+ constructor(formatted, label) {
559
+ super(SegmentTypes.Millisecond, formatted, label);
560
+ this.minValue = 0;
561
+ this.maxValue = 999;
562
+ }
563
+ }
564
+ class MinuteSegment extends EditableSegment {
565
+ constructor(formatted, label) {
566
+ super(SegmentTypes.Minute, formatted, label);
567
+ this.minValue = 0;
568
+ this.maxValue = 59;
569
+ }
570
+ }
571
+ class SecondSegment extends EditableSegment {
572
+ constructor(formatted, label) {
573
+ super(SegmentTypes.Second, formatted, label);
574
+ this.minValue = 0;
575
+ this.maxValue = 59;
576
+ }
577
+ }
578
+ class SegmentsFactory {
579
+ constructor(dateFormatter) {
580
+ this.dateFormatter = dateFormatter;
581
+ const locale = this.dateFormatter.resolvedOptions().locale;
582
+ this.numberFormatter = new number.NumberFormatter(locale, {
583
+ useGrouping: false
584
+ });
585
+ this.dateTimeFieldDisplayNames = new Intl.DisplayNames([locale], {
586
+ type: "dateTimeField"
587
+ });
588
+ }
589
+ /**
590
+ * Creates the `DateTimeSegments` needed for the DateTimePicker
591
+ * @param currentDate - The date to create the segments from. This is used to set the limits and values of the segments.
592
+ * @param setValues - If true, the segments will have their values set from the currentDate. If false, the segments will have no values.
593
+ */
594
+ createSegments(currentDate, setValues = false) {
595
+ const date2 = dateValueToDate(currentDate);
596
+ const createdSegments = this.dateFormatter.formatToParts(date2).map((part) => {
597
+ const type = part.type;
598
+ let formatted = part.value;
599
+ if (type === "year")
600
+ formatted = this.numberFormatter.format(currentDate.year);
601
+ return this.createSegment(type, formatted);
602
+ });
603
+ const segments = new DateTimeSegments(createdSegments);
604
+ const year = segments.year;
605
+ const month = segments.month;
606
+ const day = segments.day;
607
+ year.setLimits(currentDate);
608
+ month.setLimits(currentDate);
609
+ if (setValues) {
610
+ year.setValueFromDate(currentDate);
611
+ month.setValueFromDate(currentDate);
612
+ }
613
+ day.setLimits(currentDate, month.value, year.value);
614
+ if (setValues) day.setValueFromDate(currentDate);
615
+ const hour = segments.hour;
616
+ const minute = segments.minute;
617
+ const second = segments.second;
618
+ const millisecond = segments.millisecond;
619
+ const dayPeriod = segments.dayPeriod;
620
+ if (dayPeriod) dayPeriod.setLocalizedLimits(this.dateFormatter);
621
+ if (!hour) return segments;
622
+ const is12HourFormat = Boolean(dayPeriod);
623
+ hour.setLimits(is12HourFormat);
624
+ if (setValues) {
625
+ hour.setValueFromDate(currentDate, is12HourFormat);
626
+ if (is12HourFormat) {
627
+ const dayPeriodSegment = segments.dayPeriod;
628
+ dayPeriodSegment.setValueFromDate(currentDate);
629
+ }
630
+ if (!minute) return segments;
631
+ minute.setValueFromDate(currentDate);
632
+ if (!second) return segments;
633
+ second.setValueFromDate(currentDate);
634
+ if (!millisecond) return segments;
635
+ millisecond.setValueFromDate(currentDate);
636
+ }
637
+ return segments;
638
+ }
639
+ createSegment(type, formatted) {
640
+ if (type === SegmentTypes.Literal) return new LiteralSegment(formatted);
641
+ const label = this.displayNameOfType(type);
642
+ switch (type) {
643
+ case SegmentTypes.Year: {
644
+ return new YearSegment(formatted, label);
645
+ }
646
+ case SegmentTypes.Month: {
647
+ return new MonthSegment(formatted, label);
648
+ }
649
+ case SegmentTypes.Day: {
650
+ return new DaySegment(formatted, label);
651
+ }
652
+ case SegmentTypes.Hour: {
653
+ return new HourSegment(formatted, label);
654
+ }
655
+ case SegmentTypes.Minute: {
656
+ return new MinuteSegment(formatted, label);
657
+ }
658
+ case SegmentTypes.Second: {
659
+ return new SecondSegment(formatted, label);
660
+ }
661
+ case SegmentTypes.Millisecond: {
662
+ return new MillisecondSegment(formatted, label);
663
+ }
664
+ case SegmentTypes.DayPeriod: {
665
+ return new DayPeriodSegment(formatted, label);
666
+ }
667
+ }
668
+ }
669
+ displayNameOfType(type) {
670
+ const label = type === "fractionalSecond" ? "millisecond" : this.dateTimeFieldDisplayNames.of(type);
671
+ if (!label) return "";
672
+ return label.charAt(0).toUpperCase() + label.slice(1);
673
+ }
674
+ }
675
+ const dateTimePickerStyles = '@charset "UTF-8";:host{font-family:var(--luzmo-font-family);--date-time-picker-border-radius: var( --luzmo-date-time-picker-border-radius, var(--luzmo-border-radius) );--date-time-picker-border-radius-quiet: var( --luzmo-date-time-picker-border-radius-quiet, 0 );--date-time-picker-border-width: var(--luzmo-border-width);--date-time-picker-button-border-color: var( --highcontrast-datepicker-pickerbutton-border-color, var( --luzmo-date-time-picker-pickerbutton-border-color, var(--luzmo-border-color) ) );--date-time-picker-button-border-color-focus: var( --highcontrast-datepicker-pickerbutton-border-color, var( --luzmo-date-time-picker-pickerbutton-border-color-focus, var(--luzmo-primary) ) );--date-time-picker-button-border-color-invalid: var( --highcontrast-datepicker-pickerbutton-border-color, var( --luzmo-date-time-picker-pickerbutton-border-color-invalid, var(--luzmo-negative-color) ) );--date-time-picker-button-width: calc( var(--date-time-picker-edge-to-disclosure-icon) * 2 + var(--date-time-picker-icon-size) );--date-time-picker-quiet-button-offset: var( --luzmo-date-time-picker-quiet-button-offset, var(--date-time-picker-text-to-visual) );--date-time-picker-icon-to-text: var(--date-time-picker-edge-to-text);--date-time-picker-button-width-quiet: calc( var(--date-time-picker-button-width) - var( --date-time-picker-quiet-button-offset ) );--date-time-picker-focus-ring-gap: var( --luzmo-date-time-picker-focus-ring-gap, var(--luzmo-indicator-gap) );--date-time-picker-focus-thickness: var( --luzmo-date-time-picker-focus-thickness, var(--luzmo-indicator-width) );--date-time-picker-focus-animation: var( --luzmo-date-time-picker-focus-animation, var(--luzmo-animation-duration) );--date-time-picker-focus-ring-width: var( --luzmo-date-time-picker-focus-ring-width, var(--luzmo-border-width) );--date-time-picker-focus-ring-color: var( --highcontrast-datepicker-focus-ring-color, var(--luzmo-date-time-picker-focus-ring-color, var(--luzmo-indicator-color)) );--date-time-picker-focus-line-gap: var( --luzmo-date-time-picker-focus-line-gap, var(--luzmo-spacing-2) );--date-time-picker-invalid-quiet-color: var( --luzmo-date-time-picker-invalid-quiet-color, var(--luzmo-negative-color) );--date-time-picker-quiet-border-color-hover: var( --luzmo-date-time-picker-quiet-border-color-hover, var(--luzmo-border-color-hover) );--date-time-picker-border-color-disabled: var( --luzmo-date-time-picker-border-color-disabled, var(--luzmo-border-color-disabled) );--date-time-picker-dash-font-size: var( --luzmo-date-time-picker-dash-font-size, var(--date-time-picker-dash-font-size) );--date-time-picker-dash-color: var( --highcontrast-datepicker-dash-color, var(--luzmo-date-time-picker-dash-color, var(--luzmo-font-color)) );--date-time-picker-range-dash-padding-top: var( --luzmo-date-time-picker-range-dash-padding-top, 0 );--date-time-picker-range-dash-margin-inline-start: var( --luzmo-date-time-picker-range-dash-margin-left, calc(var(--date-time-picker-dash-font-size) * -.5) );--date-time-picker-range-input-width-first: var( --luzmo-date-time-picker-range-input-width-first, calc( var(--date-time-picker-initial-width) - var( --date-time-picker-generic-padding ) * 2 ) );--date-time-picker-input-width-base: calc( var(--date-time-picker-range-input-width-first) + var(--date-time-picker-icon-size) );--date-time-picker-input-width: var( --luzmo-date-time-picker-input-width, calc( var(--date-time-picker-input-width-base) + var(--date-time-picker-initial-height) ) );--date-time-picker-range-input-width-quiet-first: var( --luzmo-date-time-picker-range-input-width-quiet-first, calc( var(--date-time-picker-width-quiet-first) + var(--date-time-picker-width-quiet-second) ) );--date-time-picker-input-width-quiet: var( --luzmo-date-time-picker-input-width-quiet, calc( var(--date-time-picker-range-input-width-quiet-first) + var(--date-time-picker-icon-size) + var(--date-time-picker-initial-height) ) );--date-time-picker-datetime-input-width-first: var( --luzmo-date-time-picker-datetime-input-width-first, calc( var(--date-time-picker-input-width-base) + var(--date-time-picker-datetime-width-first) ) );--date-time-picker-datetime-input-width: var( --luzmo-date-time-picker-datetime-input-width, calc( var(--date-time-picker-datetime-input-width-first) + var(--date-time-picker-icon-size) + var(--date-time-picker-initial-height) ) );--date-time-picker-datetime-quiet-input-width-first: var( --luzmo-date-time-picker-datetime-quiet-input-width-first, calc( var(--date-time-picker-input-width-base) + var(--date-time-picker-input-datetime-width) ) );--date-time-picker-datetime-quiet-input-width: var( --luzmo-date-time-picker-datetime-quiet-input-width, calc( var(--date-time-picker-datetime-quiet-input-width-first) + var(--date-time-picker-icon-size) + var(--date-time-picker-initial-height) ) );--date-time-picker-padding-inline-end: var( --luzmo-date-time-picker-padding-inline, calc( var(--date-time-picker-button-width) + var(--date-time-picker-edge-to-text) - var( --date-time-picker-border-width ) * 2 ) );--date-time-picker-padding-inline-end-quiet: var( --luzmo-date-time-picker-padding-inline-quiet, calc( var(--date-time-picker-button-width) + var(--date-time-picker-edge-to-text) - var( --date-time-picker-quiet-button-offset ) ) );--date-time-picker-padding-inline-end-invalid-quiet: var( --luzmo-date-time-picker-padding-inline-end-invalid-quiet, calc( var(--date-time-picker-button-width-quiet) + var(--date-time-picker-icon-size) + var(--date-time-picker-icon-to-text) ) );min-inline-size:var(--luzmo-date-time-picker-min-width, var(--date-time-picker-min-width));border-radius:var(--date-time-picker-border-radius);flex-flow:row;display:inline-flex;position:relative}:host([disabled]) luzmo-picker-button{cursor:default}:host([disabled]){--luzmo-date-time-picker-dash-color: var( --luzmo-date-time-picker-dash-color-disabled, var(--disabled-content-color) );--luzmo-text-field-border-color-disabled: transparent}:host([invalid]),:host([invalid]) #text-field .icon{--luzmo-text-field-icon-spacing-inline-end-invalid: calc( var(--date-time-picker-button-width) + var(--date-time-picker-invalid-icon-to-button) );--luzmo-text-field-icon-spacing-inline-end-quiet-invalid: calc( var(--date-time-picker-button-width-quiet) + var(--date-time-picker-invalid-icon-to-button-quiet) )}:host(:not([quiet])){inline-size:var(--luzmo-date-time-picker-width, var(--date-time-picker-width))}:host([quiet]){inline-size:var(--luzmo-date-time-picker-width-quiet, var(--date-time-picker-width-quiet, var(--date-time-picker-width)))}:host(:not([quiet],[disabled])){--luzmo-picker-button-border-color: var( --date-time-picker-button-border-color )}:host([focused]),:host([focused]:not([quiet],[disabled])){--luzmo-picker-button-border-color: var( --date-time-picker-button-border-color-focus )}:host([invalid]:not([quiet],[disabled])){--luzmo-picker-button-border-color: var( --date-time-picker-button-border-color-invalid )}.input{inline-size:100%;flex:1;padding-inline-end:var(--date-time-picker-padding-inline-end);border-color:var(--luzmo-date-time-picker-border-color, var(--datepicker-border-color))}:host .input:read-only{border-color:var(--luzmo-date-time-picker-border-color, var(--datepicker-border-color))}.input.luzmo-DatePicker-startField{border-inline-end:0;border-start-end-radius:0;border-end-end-radius:0;padding-inline-end:var(--luzmo-date-time-picker-generic-padding, var(--date-time-picker-generic-padding))}.input.luzmo-DatePicker-endField{border-inline-start:0;border-start-start-radius:0;border-end-start-radius:0;padding-inline-start:var(--luzmo-date-time-picker-generic-padding, var(--date-time-picker-generic-padding))}luzmo-picker-button{cursor:pointer;position:absolute;inset-inline-end:0}.luzmo-DatePicker-rangeDash{color:var(--date-time-picker-dash-color);line-height:var(--luzmo-date-time-picker-dash-line-height, var(--date-time-picker-dash-line-height));flex:initial;inline-size:0;z-index:1;padding-block-start:var(--date-time-picker-range-dash-padding-top)}.luzmo-DatePicker-rangeDash:before{content:"–";margin-block:0;margin-inline:var(--date-time-picker-range-dash-margin-inline-start);text-align:center;vertical-align:middle;inline-size:var(--date-time-picker-dash-font-size);display:inline-block;overflow:hidden}:host([quiet]){--luzmo-date-time-picker-border-radius: var( --date-time-picker-border-radius-quiet );--luzmo-date-time-picker-padding-inline: var( --date-time-picker-padding-inline-end-quiet );--luzmo-picker-button-border-color-disabled: var( --date-time-picker-border-color-disabled );--luzmo-picker-button-background-color-hover-disabled: var( --date-time-picker-border-color-disabled )}:host([quiet][disabled]){--luzmo-text-field-border-color-disabled: var( --date-time-picker-border-color-disabled )}:host([quiet][invalid]) .input:not(.luzmo-DatePicker-startField){padding-inline-end:var(--date-time-picker-padding-inline-end-invalid-quiet)}@media (hover: hover){:host(:hover):not([focused],[disabled],[invalid]){--luzmo-picker-button-border-color: var( --date-time-picker-quiet-border-color-hover )}}:host([quiet][invalid]){--luzmo-picker-button-border-color: var( --date-time-picker-invalid-quiet-color )}:host([quiet]) luzmo-picker-button{inline-size:auto;inset-inline-end:calc(var(--date-time-picker-quiet-button-offset) * -1)}:host([quiet]) luzmo-picker-button:not(.is-open){--luzmo-picker-button-border-color-disabled: transparent}:host([quiet]) luzmo-picker-button:not(:disabled,.is-open){--luzmo-picker-button-background-color: transparent}.luzmo-DatePicker--range{--luzmo-date-time-picker-border-radius: var(--date-time-picker-border-radius)}.luzmo-DatePicker--range:after{pointer-events:none;content:"";margin:calc(var(--date-time-picker-focus-ring-gap) * -1);border-radius:calc(var(--date-time-picker-border-radius) + var(--date-time-picker-focus-ring-gap));transition:box-shadow var(--date-time-picker-focus-animation) ease-in-out,border-color var(--date-time-picker-focus-animation) ease-in-out;border-color:#0000;position:absolute;top:0;right:0;bottom:0;left:0}:host([focused]) .luzmo-DatePicker--range:not(.luzmo-DatePicker--quiet):after{box-shadow:0 0 0 var(--date-time-picker-focus-ring-width) var(--date-time-picker-focus-ring-color)}:host([focused]) .luzmo-DatePicker--range:not(.luzmo-DatePicker--quiet) #text-field:after{display:none}:host([quiet]) .luzmo-DatePicker--range{--luzmo-date-time-picker-border-radius: var( --date-time-picker-border-radius-quiet )}:host([quiet][focused]) .luzmo-DatePicker--range:after{box-shadow:none;border-block-end:var(--date-time-picker-focus-thickness) solid var(--date-time-picker-focus-ring-color);border-radius:0;margin:0;inset-block-end:calc(var(--date-time-picker-focus-line-gap) * -1)}:host([quiet]) .luzmo-DatePicker--range #text-field{min-inline-size:0;inline-size:var(--date-time-picker-input-width-quiet)}:host([quiet]) .luzmo-DatePicker--range #text-field:first-of-type{inline-size:var(--date-time-picker-range-input-width-quiet-first)}.luzmo-DatePicker--range.luzmo-DatePicker--datetimeRange #text-field{inline-size:var(--date-time-picker-datetime-input-width);min-inline-size:0}.luzmo-DatePicker--range.luzmo-DatePicker--datetimeRange #text-field:first-of-type{inline-size:var(--date-time-picker-datetime-input-width-first)}:host([quiet]) .luzmo-DatePicker--range.luzmo-DatePicker--datetimeRange #text-field{inline-size:var(--date-time-picker-datetime-quiet-input-width)}:host([quiet]) .luzmo-DatePicker--range.luzmo-DatePicker--datetimeRange #text-field:first-of-type{inline-size:var(--date-time-picker-datetime-quiet-input-width-first)}.luzmo-DatePicker--range #text-field{flex:initial;min-inline-size:0;inline-size:var(--date-time-picker-input-width)}.luzmo-DatePicker--range #text-field:first-of-type{inline-size:var(--date-time-picker-range-input-width-first)}@media (forced-colors: active){:host{--highcontrast-datepicker-dash-color: CanvasText;--highcontrast-datepicker-focus-ring-color: Highlight;--highcontrast-datepicker-pickerbutton-border-color: Highlight}:host([disabled]){--highcontrast-datepicker-dash-color: GrayText}:host([quiet][invalid]){--highcontrast-datepicker-pickerbutton-border-color: Highlight}}:host{--date-time-picker-width: auto;--date-time-picker-initial-height: var(--system-date-picker-initial-height);--date-time-picker-font-color-default: var(--luzmo-font-color);--datepicker-border-color: var(--luzmo-border-color);--date-time-picker-button-indicator-color: var(--luzmo-indicator-color);--text-field-focus-indicator-color: var(--luzmo-background-color-highlight);--date-time-picker-initial-width: 120px;--date-time-picker-min-width: 160px;--date-time-picker-calendar-padding: var(--luzmo-spacing-4);--date-time-picker-icon-size: 18px;--date-time-picker-dash-font-size: var(--luzmo-font-size);--date-time-picker-text-to-visual: var(--luzmo-spacing-3);--date-time-picker-edge-to-disclosure-icon: var(--luzmo-spacing-3);--date-time-picker-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-icon-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-invalid-icon-to-button: var(--luzmo-spacing-3);--date-time-picker-generic-padding: var(--luzmo-spacing-4)}:host([size=s]){--date-time-picker-min-width: 140px;--date-time-picker-calendar-padding: var(--luzmo-spacing-3);--date-time-picker-icon-size: 16px;--date-time-picker-dash-font-size: var(--luzmo-font-size-s);--date-time-picker-text-to-visual: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--date-time-picker-edge-to-disclosure-icon: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--date-time-picker-edge-to-text: var(--luzmo-spacing-3);--date-time-picker-invalid-icon-to-button: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--date-time-picker-icon-to-text: var(--luzmo-spacing-3)}:host([invalid][size=s]){--text-field-icon-spacing-block-invalid: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) )}:host([size=m]){--date-time-picker-min-width: 160px;--date-time-picker-calendar-padding: var(--luzmo-spacing-4);--date-time-picker-icon-size: 18px;--date-time-picker-dash-font-size: var(--luzmo-font-size-m);--date-time-picker-text-to-visual: var(--luzmo-spacing-3);--date-time-picker-edge-to-disclosure-icon: var(--luzmo-spacing-3);--date-time-picker-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-invalid-icon-to-button: var(--luzmo-spacing-3);--date-time-picker-icon-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) )}:host([size=l]){--date-time-picker-min-width: 180px;--date-time-picker-calendar-padding: var(--luzmo-spacing-5);--date-time-picker-icon-size: 20px;--date-time-picker-dash-font-size: var(--luzmo-font-size-l);--date-time-picker-text-to-visual: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-edge-to-disclosure-icon: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-edge-to-text: var(--luzmo-spacing-4);--date-time-picker-invalid-icon-to-button: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-icon-to-text: var(--luzmo-spacing-4)}:host([size=xl]){--date-time-picker-min-width: 200px;--date-time-picker-calendar-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--date-time-picker-icon-size: 22px;--date-time-picker-dash-font-size: var(--luzmo-font-size-xl);--date-time-picker-text-to-visual: var(--luzmo-spacing-4);--date-time-picker-edge-to-disclosure-icon: var(--luzmo-spacing-4);--date-time-picker-edge-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--date-time-picker-invalid-icon-to-button: var(--luzmo-spacing-4);--date-time-picker-icon-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) )}:host{--status-icon-size: var( --luzmo-text-field-icon-size-invalid, var(--text-field-icon-size-invalid) );--picker-button-size: var( --luzmo-text-field-height, var(--text-field-height) );--input-spacing: var( --luzmo-text-field-spacing-inline, var(--text-field-spacing-inline) );--input-border-width: var( --luzmo-text-field-border-width, var(--luzmo-border-width) );--text-to-icon: var( --luzmo-text-field-icon-spacing-inline-start-invalid, var(--text-field-icon-spacing-inline-start-invalid) );--date-time-picker-input-width: var(--date-time-picker-width);flex-wrap:wrap}:host #text-field{display:inline-block}:host #text-field .input,:host([quiet]) #text-field .input,:host([valid]) #text-field .input,:host([invalid]) #text-field .input{inline-size:100%}:host #text-field .input,:host([quiet]) #text-field .input{padding-inline-end:calc(var(--picker-button-size) + var(--input-spacing) - var(--input-border-width))}:host([valid]) #text-field .input,:host([invalid]) #text-field .input{inline-size:100%;padding-inline-end:calc(var(--status-icon-size) + var(--picker-button-size) + var(--input-spacing) - var(--input-border-width) + var(--text-to-icon))}@media (hover: hover){:host([invalid]) #text-field:hover .input,:host([focused][invalid]) .input:hover,:host([focused][invalid]) #text-field:hover .input{border-color:var(--highcontrast-text-field-border-color-invalid-default, var(--luzmo-text-field-border-color-invalid-default, var(--luzmo-negative-color-hover)))}}luzmo-picker-button:focus-visible{outline:none}luzmo-popover{overflow-y:auto}luzmo-popover .popover-content{padding:var(--luzmo-date-time-picker-calendar-padding, var(--date-time-picker-calendar-padding))}.input-content{display:flex;align-items:center;height:100%;overflow:auto hidden;scrollbar-width:none;line-height:normal}.input-content::-webkit-scrollbar{display:none;width:0;height:0}.literal-segment,.editable-segment{display:inline-block;color:var(--luzmo-date-time-picker-font-color-default, var(--date-time-picker-font-color-default))}.editable-segment{padding:0 .15em;font-variant-numeric:tabular-nums;text-align:end;white-space:nowrap;caret-color:transparent;outline:none}[dir=ltr] .editable-segment{text-align:start}.literal-segment{white-space:pre;user-select:none;-webkit-user-select:none}.is-placeholder,.is-placeholder+.literal-segment{color:var(--luzmo-font-color-disabled)}.editable-segment:focus-visible{color:var(--white);background-color:var(--highcontrast-text-field-focus-indicator-color, var(--luzmo-text-field-focus-indicator-color, var(--text-field-focus-indicator-color)))}.editable-segment::selection{background-color:transparent}';
676
+ var __defProp = Object.defineProperty;
677
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
678
+ var __decorateClass = (decorators, target, key, kind) => {
679
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
680
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
681
+ if (decorator = decorators[i])
682
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
683
+ if (kind && result) __defProp(target, key, result);
684
+ return result;
685
+ };
686
+ class LuzmoDateTimePicker extends manageHelpText.ManageHelpText(
687
+ sizedMixin.SizedMixin(focusable.Focusable, {
688
+ validSizes: Object.values(sizedMixin.ElementSizes)
689
+ })
690
+ ) {
691
+ constructor() {
692
+ super();
693
+ this._precision = Precisions.Minute;
694
+ this.isUserSetPrecision = false;
695
+ this.invalid = false;
696
+ this.readonly = false;
697
+ this.quiet = false;
698
+ this.placement = "bottom";
699
+ this.language = "en";
700
+ this.labels = {
701
+ previous: "Previous",
702
+ next: "Next",
703
+ today: "Today",
704
+ selected: "Selected",
705
+ empty: "Empty",
706
+ calendar: "Calendar"
707
+ };
708
+ this.focused = false;
709
+ this.segments = new DateTimeSegments([]);
710
+ this.isCalendarOpen = false;
711
+ this._timeZone = this.timeZone ?? date.getLocalTimeZone();
712
+ this.cachedLocalTime = date.now(this._timeZone);
713
+ this.setNumberParser();
714
+ this.setDateFormatter();
715
+ this.setAriaDateFormatter();
716
+ this.addEventListener(
717
+ "focusin",
718
+ () => this.previousCommitedValue = this._value
719
+ );
720
+ this.addEventListener("focusout", () => this.commitValue());
721
+ }
722
+ /**
723
+ * The styles of the calendar
724
+ * @internal
725
+ */
726
+ static get styles() {
727
+ return [lit.unsafeCSS(dateTimePickerStyles), lit.unsafeCSS(textField_module.textFieldStyles)];
728
+ }
729
+ get precision() {
730
+ return this._precision;
731
+ }
732
+ set precision(value) {
733
+ this.isUserSetPrecision = true;
734
+ const oldValue = this._precision;
735
+ if (value === oldValue) return;
736
+ this._precision = value;
737
+ this.requestUpdate("precision", oldValue);
738
+ }
739
+ /**
740
+ * The language used to format the dates and weekdays.
741
+ * @internal
742
+ */
743
+ get _language() {
744
+ try {
745
+ if (this.language) {
746
+ const locale = new Intl.Locale(this.language);
747
+ return locale.language;
748
+ }
749
+ return "en";
750
+ } catch {
751
+ return "en";
752
+ }
753
+ }
754
+ /**
755
+ * The focus element of the component
756
+ * @internal
757
+ */
758
+ get focusElement() {
759
+ return this.firstEditableSegment;
760
+ }
761
+ /**
762
+ * The current date of the component
763
+ * @internal
764
+ */
765
+ get currentDate() {
766
+ if (this._value) return date.toZoned(this._value, this._timeZone);
767
+ return this.cachedLocalTime;
768
+ }
769
+ /**
770
+ * @return Whether the component's precision includes time segments (hour, minute, second, millisecond)
771
+ * @internal
772
+ */
773
+ get includesTime() {
774
+ const timePrecisions = [
775
+ Precisions.Hour,
776
+ Precisions.Minute,
777
+ Precisions.Second,
778
+ Precisions.Millisecond
779
+ ];
780
+ return timePrecisions.includes(this.precision);
781
+ }
782
+ /**
783
+ * Resets the component's value and segments
784
+ */
785
+ clear() {
786
+ this._value = void 0;
787
+ this.setSegments();
788
+ }
789
+ willUpdate(changedProperties) {
790
+ const changesValue = changedProperties.has("value");
791
+ const changesTimeZone = changedProperties.has("timeZone");
792
+ const changesMin = changedProperties.has("min");
793
+ const changesMax = changedProperties.has("max");
794
+ const changesLocale = changedProperties.has("language");
795
+ const changesDateFormat = changedProperties.has("dateFormat");
796
+ const changesDateSeparator = changedProperties.has("dateSeparator");
797
+ const changesPrecision = changedProperties.has("precision");
798
+ const changesSegments = changedProperties.has("segments");
799
+ const changesDisabled = changedProperties.has("disabled");
800
+ if (changesLocale) this.setNumberParser();
801
+ if (changesLocale || changesPrecision) {
802
+ this.setDateFormatter();
803
+ this.setAriaDateFormatter();
804
+ }
805
+ if (changesValue || changesMin || changesMax || changesTimeZone) {
806
+ this._value = this.value ? date.parseAbsolute(new Date(this.value).toISOString(), "UTC") : void 0;
807
+ this._min = this.min ? date.parseAbsolute(new Date(this.min).toISOString(), "UTC") : void 0;
808
+ this._max = this.max ? date.parseAbsolute(new Date(this.max).toISOString(), "UTC") : void 0;
809
+ const mostSpecificDateValue = this.mostSpecificDateValue;
810
+ if (mostSpecificDateValue) {
811
+ this.convertDatePropsToMatch(mostSpecificDateValue);
812
+ this.checkDatePropsCompliance(changesMin || changesMax);
813
+ this.updateDateProps();
814
+ this.updateDefaultPrecision();
815
+ }
816
+ }
817
+ if (changesValue || changesLocale || changesPrecision || changesDateFormat || changesTimeZone || changesDateSeparator)
818
+ this.setSegments();
819
+ if (changesSegments) this.setValueFromSegments();
820
+ if (changesDisabled && this.isCalendarOpen) this.isCalendarOpen = false;
821
+ const selectedDateLabel = this._value && this.labels.selected + ": " + this.ariaDateFormatter.format(dateValueToDate(this._value));
822
+ this.setAttribute("aria-label", selectedDateLabel ?? this.labels.empty);
823
+ }
824
+ /**
825
+ * Computes the component's most precise date property (min, max or value) or undefined if none is defined.
826
+ * The order of precedence is: ZonedDateTime, CalendarDateTime, CalendarDate.
827
+ * @internal
828
+ */
829
+ get mostSpecificDateValue() {
830
+ const dateValuesDefined = [this._value, this._min, this._max].filter(
831
+ (date2) => date2 !== void 0
832
+ );
833
+ if (dateValuesDefined.length === 0) return;
834
+ const zonedDateTimes = dateValuesDefined.filter((d) => isZonedDateTime(d));
835
+ if (zonedDateTimes.length > 0) return zonedDateTimes[0];
836
+ const dateTimes = dateValuesDefined.filter((d) => isCalendarDateTime(d));
837
+ if (dateTimes.length > 0) return dateTimes[0];
838
+ const mostSpecificDate = dateValuesDefined.find((d) => isCalendarDate(d));
839
+ return mostSpecificDate;
840
+ }
841
+ /**
842
+ * Converts the DateTimePicker's date properties (min, max and value) to match the provided date's type.
843
+ *
844
+ * @param dateValue - The date value to be used as a reference for the conversion
845
+ */
846
+ convertDatePropsToMatch(dateValue) {
847
+ if (isZonedDateTime(dateValue)) {
848
+ this._timeZone = this.timeZone ?? dateValue.timeZone;
849
+ this._value = this._value && date.toZoned(this._value, this._timeZone);
850
+ this._min = this._min && date.toZoned(this._min, this._timeZone);
851
+ this._max = this._max && date.toZoned(this._max, this._timeZone);
852
+ return;
853
+ }
854
+ this._timeZone = this.timeZone ?? date.getLocalTimeZone();
855
+ if (isCalendarDateTime(dateValue)) {
856
+ this._value = this._value && date.toCalendarDateTime(this._value);
857
+ this._min = this._min && date.toCalendarDateTime(this._min);
858
+ this._max = this._max && date.toCalendarDateTime(this._max);
859
+ return;
860
+ }
861
+ this._value = this._value && date.toCalendarDate(this._value);
862
+ this._min = this._min && date.toCalendarDate(this._min);
863
+ this._max = this._max && date.toCalendarDate(this._max);
864
+ }
865
+ /**
866
+ * Validates the component's date properties (min, max and value) compliance with one another.
867
+ * If the [min, max] constraint interval is invalid, both properties are reset.
868
+ * If the value is not within the [min, max] (valid) interval, it is reset.
869
+ *
870
+ * @param checkInterval - Whether to check the [min, max] interval
871
+ */
872
+ checkDatePropsCompliance(checkInterval) {
873
+ if (checkInterval && this._min && this._max) {
874
+ const isValidInterval = this._min.compare(this._max) < 0;
875
+ if (!isValidInterval) {
876
+ console.warn(
877
+ this,
878
+ `<${this.localName}> expects the 'min' to be less than 'max'. Please ensure that 'min' property's date is earlier than 'max' property's date.`
879
+ );
880
+ this._min = void 0;
881
+ this._max = void 0;
882
+ }
883
+ }
884
+ if (this.isNonCompliantValue()) {
885
+ console.warn(
886
+ this,
887
+ `<${this.localName}> expects the preselected value to comply with the min and max constraints. Please ensure that 'value' property's date is in between the dates for the 'min' and 'max' properties.`
888
+ );
889
+ this._value = void 0;
890
+ }
891
+ if (!this._min && !this._max && !this._value)
892
+ this._timeZone = date.getLocalTimeZone();
893
+ }
894
+ isNonCompliantValue() {
895
+ if (this._value === void 0) return false;
896
+ return Boolean(
897
+ this._min && this._value.compare(this._min) < 0 || this._max && this._value.compare(this._max) > 0
898
+ );
899
+ }
900
+ /**
901
+ * Update the component's date properties' types to include the provided precision.
902
+ */
903
+ updateDateProps() {
904
+ const mostSpecificDateValue = this.mostSpecificDateValue;
905
+ if (!mostSpecificDateValue || !this.isUserSetPrecision) return;
906
+ const shouldConvertToDateTime = this.includesTime && isCalendarDate(mostSpecificDateValue);
907
+ if (shouldConvertToDateTime)
908
+ this.convertDatePropsToMatch(date.toCalendarDateTime(mostSpecificDateValue));
909
+ }
910
+ /**
911
+ * Changes the component's default precision according to the most specific date property (min, max or value).
912
+ */
913
+ updateDefaultPrecision() {
914
+ if (this.isUserSetPrecision) return;
915
+ const mostSpecificDateValue = this.mostSpecificDateValue;
916
+ if (!mostSpecificDateValue) return;
917
+ this._precision = isCalendarDate(mostSpecificDateValue) ? Precisions.Day : Precisions.Minute;
918
+ }
919
+ render() {
920
+ return lit.html`
19
921
  <div id="text-field">
20
922
  ${this.renderStateIcons()} ${this.renderInputContent()}
21
923
  </div>
22
924
  ${this.renderHelpText(this.invalid)}${this.renderPicker()}
23
- `}renderStateIcons(){return this.invalid?u.x`
925
+ `;
926
+ }
927
+ renderStateIcons() {
928
+ if (this.invalid)
929
+ return lit.html`
24
930
  <luzmo-icon
25
- .icon=${O.$}
931
+ .icon=${icons.luzmoAlert}
26
932
  .size=${this.size}
27
933
  id="invalid"
28
934
  class="icon"
29
935
  ></luzmo-icon>
30
- `:u.E}renderPicker(){if(this.readonly)return u.E;const e=()=>this.isCalendarOpen=!1,t=()=>this.isCalendarOpen=!0;return u.x`
936
+ `;
937
+ return lit.nothing;
938
+ }
939
+ renderPicker() {
940
+ if (this.readonly) return lit.nothing;
941
+ const closeCalendar = () => this.isCalendarOpen = false;
942
+ const openCalendar = () => this.isCalendarOpen = true;
943
+ return lit.html`
31
944
  <luzmo-picker-button
32
945
  ?open=${this.isCalendarOpen}
33
946
  ?quiet=${this.quiet}
34
947
  ?invalid=${this.invalid}
35
948
  ?disabled=${this.disabled}
36
949
  .size=${this.size}
37
- @click=${t}
950
+ @click=${openCalendar}
38
951
  label=${this.labels.calendar}
39
952
  >
40
953
  <slot name="calendar-icon" slot="icon">
41
954
  <luzmo-icon
42
- .icon=${O.o0}
955
+ .icon=${icons.luzmoCalendar}
43
956
  .size=${this.size}
44
957
  block
45
958
  ></luzmo-icon>
@@ -49,17 +962,20 @@
49
962
  <luzmo-overlay
50
963
  .triggerElement=${this.input}
51
964
  type="modal"
52
- placement=${this.placement??"bottom"}
965
+ placement=${this.placement ?? "bottom"}
53
966
  offset="0"
54
967
  ?open=${this.isCalendarOpen}
55
- @luzmo-closed=${e}
968
+ @luzmo-closed=${closeCalendar}
56
969
  >
57
970
  <luzmo-popover>
58
971
  <div class="popover-content">
59
972
  <luzmo-calendar
60
- .value=${this._value?this._value.toString().slice(0,10):void 0}
61
- .min=${this._min?this._min.toString():void 0}
62
- .max=${this._max?this._max.toString():void 0}
973
+ .value=${this._value ? (
974
+ // TODO: check if this is the correct way to handle the value with TZ
975
+ this._value.toString().slice(0, 10)
976
+ ) : void 0}
977
+ .min=${this._min ? this._min.toString() : void 0}
978
+ .max=${this._max ? this._max.toString() : void 0}
63
979
  .labels=${this.labels}
64
980
  .size=${this.size}
65
981
  .language=${this.language}
@@ -68,38 +984,448 @@
68
984
  </div>
69
985
  </luzmo-popover>
70
986
  </luzmo-overlay>
71
- `}handleChange(e){var i,a,r,s,l,h,d;e.stopPropagation(),this.isCalendarOpen=!1,(i=e.target)!=null&&i.value&&(this.value=(a=e.target)==null?void 0:a.value);const t=c.$fae977aafc393c5c$export$6b862160d295c8e(((r=e.target)==null?void 0:r.value)??"");if(this.includesTime){const g=((s=this.segments.hour)==null?void 0:s.value)??0,b=((l=this.segments.minute)==null?void 0:l.value)??0,k=((h=this.segments.second)==null?void 0:h.value)??0,f=((d=this.segments.millisecond)==null?void 0:d.value)??0,z=new c.$35ea8db9cb2ccb90$export$680ea196effce5f(g,b,k,f),y=this.mostSpecificDateValue;this._value=c.$11d87f3f76e88657$export$b21e0b124e224484(t,z),y&&_(y)&&(this._value=c.$11d87f3f76e88657$export$84c95a83c799e074(this._value,this._timeZone))}else this._value=t;this.commitValue()}renderInputContent(){const e=()=>this.focused=!this.readonly,t=()=>this.focused=!1;return u.x`
987
+ `;
988
+ }
989
+ handleChange(event) {
990
+ var _a, _b, _c, _d, _e, _f, _g;
991
+ event.stopPropagation();
992
+ this.isCalendarOpen = false;
993
+ if ((_a = event.target) == null ? void 0 : _a.value) {
994
+ this.value = (_b = event.target) == null ? void 0 : _b.value;
995
+ }
996
+ const calendarValue = date.parseDate(
997
+ ((_c = event.target) == null ? void 0 : _c.value) ?? ""
998
+ );
999
+ if (this.includesTime) {
1000
+ const hour = ((_d = this.segments.hour) == null ? void 0 : _d.value) ?? 0;
1001
+ const minute = ((_e = this.segments.minute) == null ? void 0 : _e.value) ?? 0;
1002
+ const second = ((_f = this.segments.second) == null ? void 0 : _f.value) ?? 0;
1003
+ const millisecond = ((_g = this.segments.millisecond) == null ? void 0 : _g.value) ?? 0;
1004
+ const time = new date.Time(hour, minute, second, millisecond);
1005
+ const mostSpecificDateValue = this.mostSpecificDateValue;
1006
+ this._value = date.toCalendarDateTime(calendarValue, time);
1007
+ if (mostSpecificDateValue && isZonedDateTime(mostSpecificDateValue))
1008
+ this._value = date.toZoned(this._value, this._timeZone);
1009
+ } else {
1010
+ this._value = calendarValue;
1011
+ }
1012
+ this.commitValue();
1013
+ }
1014
+ renderInputContent() {
1015
+ const focusIn = () => this.focused = !this.readonly;
1016
+ const focusOut = () => this.focused = false;
1017
+ return lit.html`
72
1018
  <div class="input">
73
1019
  <span
74
1020
  class="input-content"
75
- @focusin=${e}
76
- @focusout=${t}
1021
+ @focusin=${focusIn}
1022
+ @focusout=${focusOut}
77
1023
  @keydown=${this.handleKeydown}
78
1024
  @input=${this.handleInput}
79
1025
  >
80
1026
  ${this.renderSegments()}
81
1027
  </span>
82
1028
  </div>
83
- `}renderSegments(){return this.segments.all.map(e=>L.n(e.type===o.Literal,()=>this.renderLiteralSegment(e),()=>this.renderEditableSegment(e)))}renderLiteralSegment(e){return u.x`
1029
+ `;
1030
+ }
1031
+ renderSegments() {
1032
+ return this.segments.all.map(
1033
+ (segment) => when_js.when(
1034
+ segment.type === SegmentTypes.Literal,
1035
+ () => this.renderLiteralSegment(segment),
1036
+ () => this.renderEditableSegment(segment)
1037
+ )
1038
+ );
1039
+ }
1040
+ renderLiteralSegment(segment) {
1041
+ return lit.html`
84
1042
  <span
85
1043
  class="literal-segment"
86
- data-test-id=${e.type}
1044
+ data-test-id=${segment.type}
87
1045
  aria-hidden="true"
88
- >${e.formatted}</span>
89
- `}renderEditableSegment(e){const t=!this.disabled&&!this.readonly,i=e.value===void 0,a=e.type===o.DayPeriod?"text":"numeric",r={"editable-segment":!0,"is-placeholder":i},s=e.type!==o.Year&&String(e.maxValue).length>0,l={minWidth:s?`${s}ch`:void 0};return u.x`
1046
+ >${segment.formatted}</span>
1047
+ `;
1048
+ }
1049
+ renderEditableSegment(segment) {
1050
+ const isActive = !this.disabled && !this.readonly;
1051
+ const usePlaceholder = segment.value === void 0;
1052
+ const inputMode = segment.type === SegmentTypes.DayPeriod ? "text" : "numeric";
1053
+ const segmentClasses = {
1054
+ "editable-segment": true,
1055
+ "is-placeholder": usePlaceholder
1056
+ };
1057
+ const minWidth = segment.type !== SegmentTypes.Year && String(segment.maxValue).length > 0;
1058
+ const segmentStyles = {
1059
+ minWidth: minWidth ? `${minWidth}ch` : void 0
1060
+ };
1061
+ return lit.html`
90
1062
  <div
91
1063
  role="spinbutton"
92
- aria-valuenow=${S.o(e.value)}
93
- aria-valuemin=${e.minValue}
94
- aria-valuemax=${e.maxValue}
95
- aria-label=${e.label}
96
- aria-valuetext=${S.o(e.value===void 0?this.labels.empty:e.formatted)}
97
- contenteditable=${S.o(t?!0:void 0)}
98
- inputmode=${S.o(t?a:void 0)}
99
- tabindex=${S.o(t?"0":void 0)}
100
- class=${j.e(r)}
101
- style=${W.o(l)}
102
- data-type=${e.type}
103
- .innerText=${this.renderSegmentText(e)}
1064
+ aria-valuenow=${ifDefined_js.ifDefined(segment.value)}
1065
+ aria-valuemin=${segment.minValue}
1066
+ aria-valuemax=${segment.maxValue}
1067
+ aria-label=${segment.label}
1068
+ aria-valuetext=${ifDefined_js.ifDefined(
1069
+ segment.value === void 0 ? this.labels.empty : segment.formatted
1070
+ )}
1071
+ contenteditable=${ifDefined_js.ifDefined(isActive ? true : void 0)}
1072
+ inputmode=${ifDefined_js.ifDefined(isActive ? inputMode : void 0)}
1073
+ tabindex=${ifDefined_js.ifDefined(isActive ? "0" : void 0)}
1074
+ class=${classMap_js.classMap(segmentClasses)}
1075
+ style=${styleMap_js.styleMap(segmentStyles)}
1076
+ data-type=${segment.type}
1077
+ .innerText=${this.renderSegmentText(segment)}
104
1078
  ></div>
105
- `}renderSegmentText(e){const t=e.value===void 0;return L.n(t,()=>e.placeholder??"",()=>e.formatted??"")}handleKeydown(e){var a;const t=e.target,i=t.dataset.type;if(i)switch(e.code){case"ArrowUp":{this.incrementValue(i);break}case"ArrowDown":{this.decrementValue(i);break}case"ArrowRight":{this.focusSegment(t,"next");break}case"ArrowLeft":{this.focusSegment(t,"previous");break}case"Enter":case"Space":{this.commitValue();break}case"Backspace":case"Delete":{e.preventDefault(),((a=this.segments.getByType(i))==null?void 0:a.value)===void 0?this.focusSegment(t,"previous"):this.clearSegmentContent(i);break}}}get modifierParams(){return{dateFormatter:this.dateFormatter,segments:this.segments,currentDate:this.currentDate}}incrementValue(e){const t=new ae(this.modifierParams);this.segments=t.modify(e),this.dispatchInput()}decrementValue(e){const t=new ie(this.modifierParams);this.segments=t.modify(e),this.dispatchInput()}focusSegment(e,t){let i=!1,a=e;for(;!i;){const r=t==="previous"?a.previousElementSibling:a.nextElementSibling;if(!r)break;r.getAttribute("contenteditable")&&(r.focus(),i=!0),a=r}}commitValue(){if(!(this._value&&this.previousCommitedValue&&this._value.compare(this.previousCommitedValue)===0)){if(this._value===void 0&&this.previousCommitedValue===void 0){const e=this.segments.editableValues.every(t=>t===void 0);this.invalid=!e;return}this.invalid=!!(this._value===void 0||this.isNonCompliantValue()),this.previousCommitedValue=this._value,this.dispatchChange()}}clearSegmentContent(e){const t=this.segments.editableValues,i=new te(this.modifierParams);this.segments=i.modify(e);const a=this.segments.editableValues;E(t,a)||this.dispatchInput()}handleInput(e){e.stopPropagation();const t=e.target.dataset.type,i=this.segments.editableValues,a=new re({...this.modifierParams,eventData:e.data,numberParser:this.numberParser});this.segments=a.modify(t),this.updateSegmentContent(this.segments.getByType(t),e.target);const r=this.segments.editableValues;E(i,r)||this.dispatchInput()}updateSegmentContent(e,t){t.textContent=e.value===void 0?e.placeholder:e.formatted}createOutputString(e){return e?_(e)?this._value.toAbsoluteString():new Date(this._value.toString()).toISOString():""}dispatchChange(){const e=this.createOutputString(this._value);this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:e}}))}dispatchInput(){const e=this.createOutputString(this._value);this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:e}}))}setValueFromSegments(){const e=this.segments.getFormattedDate(this.precision);if(!e){this._value&&this.dispatchChange(),this._value=void 0;return}this._value===void 0&&this.dispatchChange();const t=this.mostSpecificDateValue;t?_(t)?this._value=c.$11d87f3f76e88657$export$84c95a83c799e074(e,this._timeZone):C(t)?this._value=c.$11d87f3f76e88657$export$b21e0b124e224484(e):this._value=c.$11d87f3f76e88657$export$93522d1a439f3617(e):this._value=e}setSegments(){var i,a,r,s;const t=new he(this.dateFormatter).createSegments(this.currentDate,this._value!==void 0);if(this.dateFormat){const l=t.all.findIndex(d=>d.type===o.Month),h=t.all.findIndex(d=>d.type===o.Day);if(l!==-1&&h!==-1){if(this.dateFormat==="mmdd"&&l>h){const d=t.all[l];t.all[l]=t.all[h],t.all[h]=d}else if(this.dateFormat==="ddmm"&&h>l){const d=t.all[h];t.all[h]=t.all[l],t.all[l]=d}}}typeof this.dateSeparator=="string"&&this.dateSeparator&&(((a=(i=t.all)==null?void 0:i[1])==null?void 0:a.type)===o.Literal&&(t.all[1].formatted=this.dateSeparator),((s=(r=t.all)==null?void 0:r[3])==null?void 0:s.type)===o.Literal&&(t.all[3].formatted=this.dateSeparator)),this.segments=t}setNumberParser(){this.numberParser=new R.$6c7bd7858deea686$export$cd11ab140839f11d(this._language,{maximumFractionDigits:0})}setDateFormatter(){this.dateFormatter=new c.$fb18d541ea1ad717$export$ad991b66133851cf(this._language,{day:"2-digit",month:"2-digit",year:"numeric",...this.getTimeOptions("2-digit")})}setAriaDateFormatter(){this.ariaDateFormatter=new c.$fb18d541ea1ad717$export$ad991b66133851cf(this._language,{day:"numeric",month:"long",year:"numeric",...this.getTimeOptions("numeric")})}getTimeOptions(e){switch(this.precision){case v.Millisecond:return{hour:e,minute:e,second:e,fractionalSecondDigits:3};case v.Second:return{hour:e,minute:e,second:e};case v.Minute:return{hour:e,minute:e};case v.Hour:return{hour:e};default:return{}}}}p([u.n({type:String,reflect:!0})],m.prototype,"value",2);p([u.n({type:String,reflect:!0})],m.prototype,"min",2);p([u.n({type:String,reflect:!0})],m.prototype,"max",2);p([u.n({type:String,attribute:"date-format",reflect:!0})],m.prototype,"dateFormat",2);p([u.n({type:String,attribute:"date-separator",reflect:!0})],m.prototype,"dateSeparator",2);p([u.n({type:String,reflect:!0})],m.prototype,"precision",1);p([u.n({type:Boolean,reflect:!0})],m.prototype,"invalid",2);p([u.n({type:Boolean,reflect:!0})],m.prototype,"readonly",2);p([u.n({type:Boolean,reflect:!0})],m.prototype,"quiet",2);p([u.n({type:String,reflect:!0})],m.prototype,"placement",2);p([u.n({type:String,attribute:"time-zone",reflect:!0})],m.prototype,"timeZone",2);p([u.n({type:String,reflect:!0})],m.prototype,"language",2);p([u.n({attribute:!1})],m.prototype,"labels",2);p([u.n({type:Boolean,reflect:!0})],m.prototype,"focused",2);p([P.r()],m.prototype,"_value",2);p([P.r()],m.prototype,"_min",2);p([P.r()],m.prototype,"_max",2);p([P.r()],m.prototype,"segments",2);p([P.r()],m.prototype,"isCalendarOpen",2);p([A.e(".editable-segment")],m.prototype,"firstEditableSegment",2);p([A.e(".input")],m.prototype,"input",2);customElements.get("luzmo-date-time-picker")||customElements.define("luzmo-date-time-picker",m);exports.LuzmoDateTimePicker=m;
1079
+ `;
1080
+ }
1081
+ renderSegmentText(segment) {
1082
+ const usePlaceholder = segment.value === void 0;
1083
+ return when_js.when(
1084
+ usePlaceholder,
1085
+ () => segment.placeholder ?? "",
1086
+ () => segment.formatted ?? ""
1087
+ );
1088
+ }
1089
+ handleKeydown(event) {
1090
+ var _a;
1091
+ const segmentElement = event.target;
1092
+ const segmentType = segmentElement.dataset.type;
1093
+ if (!segmentType) return;
1094
+ switch (event.code) {
1095
+ case "ArrowUp": {
1096
+ this.incrementValue(segmentType);
1097
+ break;
1098
+ }
1099
+ case "ArrowDown": {
1100
+ this.decrementValue(segmentType);
1101
+ break;
1102
+ }
1103
+ case "ArrowRight": {
1104
+ this.focusSegment(segmentElement, "next");
1105
+ break;
1106
+ }
1107
+ case "ArrowLeft": {
1108
+ this.focusSegment(segmentElement, "previous");
1109
+ break;
1110
+ }
1111
+ case "Enter":
1112
+ case "Space": {
1113
+ this.commitValue();
1114
+ break;
1115
+ }
1116
+ case "Backspace":
1117
+ case "Delete": {
1118
+ event.preventDefault();
1119
+ if (((_a = this.segments.getByType(segmentType)) == null ? void 0 : _a.value) === void 0)
1120
+ this.focusSegment(segmentElement, "previous");
1121
+ else this.clearSegmentContent(segmentType);
1122
+ break;
1123
+ }
1124
+ }
1125
+ }
1126
+ /**
1127
+ * The modifier parameters of the component
1128
+ * @internal
1129
+ */
1130
+ get modifierParams() {
1131
+ return {
1132
+ dateFormatter: this.dateFormatter,
1133
+ segments: this.segments,
1134
+ currentDate: this.currentDate
1135
+ };
1136
+ }
1137
+ incrementValue(segmentType) {
1138
+ const incrementModifier = new IncrementModifier(this.modifierParams);
1139
+ this.segments = incrementModifier.modify(segmentType);
1140
+ this.dispatchInput();
1141
+ }
1142
+ decrementValue(segmentType) {
1143
+ const decrementModifier = new DecrementModifier(this.modifierParams);
1144
+ this.segments = decrementModifier.modify(segmentType);
1145
+ this.dispatchInput();
1146
+ }
1147
+ /**
1148
+ * Focuses the segment according to the direction, if there is one to focus on
1149
+ *
1150
+ * @param segment - Segment on which the event was triggered (the segment being changed)
1151
+ * @param elementToFocus - Defines which element will be focused: is it the previous one or the next one?
1152
+ */
1153
+ focusSegment(segment, elementToFocus) {
1154
+ let segmentFound = false;
1155
+ let currentSegment = segment;
1156
+ while (!segmentFound) {
1157
+ const siblingSegment = elementToFocus === "previous" ? currentSegment.previousElementSibling : currentSegment.nextElementSibling;
1158
+ if (!siblingSegment) {
1159
+ break;
1160
+ }
1161
+ if (siblingSegment.getAttribute("contenteditable")) {
1162
+ siblingSegment.focus();
1163
+ segmentFound = true;
1164
+ }
1165
+ currentSegment = siblingSegment;
1166
+ }
1167
+ }
1168
+ /**
1169
+ * Mark the user intent to commit the selected value. If the current value
1170
+ * is different from the previous commited value, dispatch a change event.
1171
+ */
1172
+ commitValue() {
1173
+ if (this._value && this.previousCommitedValue && this._value.compare(this.previousCommitedValue) === 0)
1174
+ return;
1175
+ if (this._value === void 0 && this.previousCommitedValue === void 0) {
1176
+ const allSegmentsEmpty = this.segments.editableValues.every(
1177
+ (value) => value === void 0
1178
+ );
1179
+ this.invalid = allSegmentsEmpty ? false : true;
1180
+ return;
1181
+ }
1182
+ this.invalid = this._value === void 0 || this.isNonCompliantValue() ? true : false;
1183
+ this.previousCommitedValue = this._value;
1184
+ this.dispatchChange();
1185
+ }
1186
+ clearSegmentContent(segmentType) {
1187
+ const valuesBefore = this.segments.editableValues;
1188
+ const clearModifier = new ClearModifier(this.modifierParams);
1189
+ this.segments = clearModifier.modify(segmentType);
1190
+ const valuesAfter = this.segments.editableValues;
1191
+ if (!equalSegmentValues(valuesBefore, valuesAfter)) this.dispatchInput();
1192
+ }
1193
+ handleInput(event) {
1194
+ event.stopPropagation();
1195
+ const segmentType = event.target.dataset.type;
1196
+ const valuesBefore = this.segments.editableValues;
1197
+ const inputModifier = new InputModifier({
1198
+ ...this.modifierParams,
1199
+ eventData: event.data,
1200
+ numberParser: this.numberParser
1201
+ });
1202
+ this.segments = inputModifier.modify(segmentType);
1203
+ this.updateSegmentContent(
1204
+ this.segments.getByType(segmentType),
1205
+ event.target
1206
+ );
1207
+ const valuesAfter = this.segments.editableValues;
1208
+ if (!equalSegmentValues(valuesBefore, valuesAfter)) this.dispatchInput();
1209
+ }
1210
+ /**
1211
+ * Updates the content of the segments by binding it to the `.innerText` property of the element,
1212
+ * instead of using string interpolation. This allows to not show user typed characters, but
1213
+ * only the formatted content of the segment, needed for the 'contenteditable' elements.
1214
+ *
1215
+ * @param segment - Segment on which the event was triggered (the segment being changed)
1216
+ * @param event - Triggered event details
1217
+ */
1218
+ updateSegmentContent(segment, segmentElement) {
1219
+ segmentElement.textContent = segment.value === void 0 ? segment.placeholder : segment.formatted;
1220
+ }
1221
+ createOutputString(value) {
1222
+ if (value) {
1223
+ if (isZonedDateTime(value))
1224
+ return this._value.toAbsoluteString();
1225
+ return new Date(this._value.toString()).toISOString();
1226
+ }
1227
+ return "";
1228
+ }
1229
+ dispatchChange() {
1230
+ const value = this.createOutputString(this._value);
1231
+ this.dispatchEvent(
1232
+ new CustomEvent("change", {
1233
+ bubbles: true,
1234
+ composed: true,
1235
+ cancelable: true,
1236
+ detail: {
1237
+ value
1238
+ }
1239
+ })
1240
+ );
1241
+ }
1242
+ dispatchInput() {
1243
+ const value = this.createOutputString(this._value);
1244
+ this.dispatchEvent(
1245
+ new CustomEvent("input", {
1246
+ bubbles: true,
1247
+ composed: true,
1248
+ cancelable: true,
1249
+ detail: {
1250
+ value
1251
+ }
1252
+ })
1253
+ );
1254
+ }
1255
+ setValueFromSegments() {
1256
+ const formattedDate = this.segments.getFormattedDate(this.precision);
1257
+ if (!formattedDate) {
1258
+ if (this._value) this.dispatchChange();
1259
+ this._value = void 0;
1260
+ return;
1261
+ }
1262
+ if (this._value === void 0) this.dispatchChange();
1263
+ const mostSpecificDateValue = this.mostSpecificDateValue;
1264
+ if (mostSpecificDateValue) {
1265
+ if (isZonedDateTime(mostSpecificDateValue))
1266
+ this._value = date.toZoned(formattedDate, this._timeZone);
1267
+ else if (isCalendarDateTime(mostSpecificDateValue))
1268
+ this._value = date.toCalendarDateTime(formattedDate);
1269
+ else this._value = date.toCalendarDate(formattedDate);
1270
+ } else {
1271
+ this._value = formattedDate;
1272
+ }
1273
+ }
1274
+ setSegments() {
1275
+ var _a, _b, _c, _d;
1276
+ const segmentsFactory = new SegmentsFactory(this.dateFormatter);
1277
+ const segments = segmentsFactory.createSegments(
1278
+ this.currentDate,
1279
+ this._value !== void 0
1280
+ );
1281
+ if (this.dateFormat) {
1282
+ const monthIndex = segments.all.findIndex(
1283
+ (d) => d.type === SegmentTypes.Month
1284
+ );
1285
+ const dayIndex = segments.all.findIndex(
1286
+ (d) => d.type === SegmentTypes.Day
1287
+ );
1288
+ if (monthIndex !== -1 && dayIndex !== -1) {
1289
+ if (this.dateFormat === "mmdd" && monthIndex > dayIndex) {
1290
+ const temp = segments.all[monthIndex];
1291
+ segments.all[monthIndex] = segments.all[dayIndex];
1292
+ segments.all[dayIndex] = temp;
1293
+ } else if (this.dateFormat === "ddmm" && dayIndex > monthIndex) {
1294
+ const temp = segments.all[dayIndex];
1295
+ segments.all[dayIndex] = segments.all[monthIndex];
1296
+ segments.all[monthIndex] = temp;
1297
+ }
1298
+ }
1299
+ }
1300
+ if (typeof this.dateSeparator === "string" && this.dateSeparator) {
1301
+ if (((_b = (_a = segments.all) == null ? void 0 : _a[1]) == null ? void 0 : _b.type) === SegmentTypes.Literal) {
1302
+ segments.all[1].formatted = this.dateSeparator;
1303
+ }
1304
+ if (((_d = (_c = segments.all) == null ? void 0 : _c[3]) == null ? void 0 : _d.type) === SegmentTypes.Literal) {
1305
+ segments.all[3].formatted = this.dateSeparator;
1306
+ }
1307
+ }
1308
+ this.segments = segments;
1309
+ }
1310
+ setNumberParser() {
1311
+ this.numberParser = new number.NumberParser(this._language, {
1312
+ maximumFractionDigits: 0
1313
+ });
1314
+ }
1315
+ setDateFormatter() {
1316
+ this.dateFormatter = new date.DateFormatter(this._language, {
1317
+ day: "2-digit",
1318
+ month: "2-digit",
1319
+ year: "numeric",
1320
+ ...this.getTimeOptions("2-digit")
1321
+ });
1322
+ }
1323
+ setAriaDateFormatter() {
1324
+ this.ariaDateFormatter = new date.DateFormatter(this._language, {
1325
+ day: "numeric",
1326
+ month: "long",
1327
+ year: "numeric",
1328
+ ...this.getTimeOptions("numeric")
1329
+ });
1330
+ }
1331
+ getTimeOptions(digitType) {
1332
+ switch (this.precision) {
1333
+ case Precisions.Millisecond: {
1334
+ return {
1335
+ hour: digitType,
1336
+ minute: digitType,
1337
+ second: digitType,
1338
+ fractionalSecondDigits: 3
1339
+ };
1340
+ }
1341
+ case Precisions.Second: {
1342
+ return {
1343
+ hour: digitType,
1344
+ minute: digitType,
1345
+ second: digitType
1346
+ };
1347
+ }
1348
+ case Precisions.Minute: {
1349
+ return {
1350
+ hour: digitType,
1351
+ minute: digitType
1352
+ };
1353
+ }
1354
+ case Precisions.Hour: {
1355
+ return {
1356
+ hour: digitType
1357
+ };
1358
+ }
1359
+ default: {
1360
+ return {};
1361
+ }
1362
+ }
1363
+ }
1364
+ }
1365
+ __decorateClass([
1366
+ decorators_js.property({ type: String, reflect: true })
1367
+ ], LuzmoDateTimePicker.prototype, "value", 2);
1368
+ __decorateClass([
1369
+ decorators_js.property({ type: String, reflect: true })
1370
+ ], LuzmoDateTimePicker.prototype, "min", 2);
1371
+ __decorateClass([
1372
+ decorators_js.property({ type: String, reflect: true })
1373
+ ], LuzmoDateTimePicker.prototype, "max", 2);
1374
+ __decorateClass([
1375
+ decorators_js.property({ type: String, attribute: "date-format", reflect: true })
1376
+ ], LuzmoDateTimePicker.prototype, "dateFormat", 2);
1377
+ __decorateClass([
1378
+ decorators_js.property({ type: String, attribute: "date-separator", reflect: true })
1379
+ ], LuzmoDateTimePicker.prototype, "dateSeparator", 2);
1380
+ __decorateClass([
1381
+ decorators_js.property({ type: String, reflect: true })
1382
+ ], LuzmoDateTimePicker.prototype, "precision", 1);
1383
+ __decorateClass([
1384
+ decorators_js.property({ type: Boolean, reflect: true })
1385
+ ], LuzmoDateTimePicker.prototype, "invalid", 2);
1386
+ __decorateClass([
1387
+ decorators_js.property({ type: Boolean, reflect: true })
1388
+ ], LuzmoDateTimePicker.prototype, "readonly", 2);
1389
+ __decorateClass([
1390
+ decorators_js.property({ type: Boolean, reflect: true })
1391
+ ], LuzmoDateTimePicker.prototype, "quiet", 2);
1392
+ __decorateClass([
1393
+ decorators_js.property({ type: String, reflect: true })
1394
+ ], LuzmoDateTimePicker.prototype, "placement", 2);
1395
+ __decorateClass([
1396
+ decorators_js.property({ type: String, attribute: "time-zone", reflect: true })
1397
+ ], LuzmoDateTimePicker.prototype, "timeZone", 2);
1398
+ __decorateClass([
1399
+ decorators_js.property({ type: String, reflect: true })
1400
+ ], LuzmoDateTimePicker.prototype, "language", 2);
1401
+ __decorateClass([
1402
+ decorators_js.property({ attribute: false })
1403
+ ], LuzmoDateTimePicker.prototype, "labels", 2);
1404
+ __decorateClass([
1405
+ decorators_js.property({ type: Boolean, reflect: true })
1406
+ ], LuzmoDateTimePicker.prototype, "focused", 2);
1407
+ __decorateClass([
1408
+ decorators_js.state()
1409
+ ], LuzmoDateTimePicker.prototype, "_value", 2);
1410
+ __decorateClass([
1411
+ decorators_js.state()
1412
+ ], LuzmoDateTimePicker.prototype, "_min", 2);
1413
+ __decorateClass([
1414
+ decorators_js.state()
1415
+ ], LuzmoDateTimePicker.prototype, "_max", 2);
1416
+ __decorateClass([
1417
+ decorators_js.state()
1418
+ ], LuzmoDateTimePicker.prototype, "segments", 2);
1419
+ __decorateClass([
1420
+ decorators_js.state()
1421
+ ], LuzmoDateTimePicker.prototype, "isCalendarOpen", 2);
1422
+ __decorateClass([
1423
+ decorators_js.query(".editable-segment")
1424
+ ], LuzmoDateTimePicker.prototype, "firstEditableSegment", 2);
1425
+ __decorateClass([
1426
+ decorators_js.query(".input")
1427
+ ], LuzmoDateTimePicker.prototype, "input", 2);
1428
+ if (!customElements.get("luzmo-date-time-picker")) {
1429
+ customElements.define("luzmo-date-time-picker", LuzmoDateTimePicker);
1430
+ }
1431
+ exports.LuzmoDateTimePicker = LuzmoDateTimePicker;