wcs-core 3.0.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (334) hide show
  1. package/README.md +7 -0
  2. package/dist/cjs/{grid-pagination-ff65e0ff.js → grid-pagination-4b55c908.js} +1 -2
  3. package/dist/cjs/grid-pagination-4b55c908.js.map +1 -0
  4. package/dist/cjs/{helpers-11518d4f.js → helpers-4a14051a.js} +41 -1
  5. package/dist/cjs/helpers-4a14051a.js.map +1 -0
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/wcs-action-bar.cjs.entry.js.map +1 -1
  8. package/dist/cjs/wcs-app.cjs.entry.js +0 -1
  9. package/dist/cjs/wcs-app.cjs.entry.js.map +1 -1
  10. package/dist/cjs/wcs-button.cjs.entry.js +17 -3
  11. package/dist/cjs/wcs-button.cjs.entry.js.map +1 -1
  12. package/dist/cjs/wcs-checkbox.cjs.entry.js +0 -1
  13. package/dist/cjs/wcs-checkbox.cjs.entry.js.map +1 -1
  14. package/dist/cjs/wcs-com-nav-category.cjs.entry.js +1 -1
  15. package/dist/cjs/wcs-com-nav-category.cjs.entry.js.map +1 -1
  16. package/dist/cjs/wcs-com-nav-submenu.cjs.entry.js +1 -1
  17. package/dist/cjs/wcs-com-nav-submenu.cjs.entry.js.map +1 -1
  18. package/dist/cjs/wcs-com-nav.cjs.entry.js.map +1 -1
  19. package/dist/cjs/wcs-counter.cjs.entry.js +130 -0
  20. package/dist/cjs/wcs-counter.cjs.entry.js.map +1 -0
  21. package/dist/cjs/wcs-dropdown-item.cjs.entry.js +1 -1
  22. package/dist/cjs/wcs-dropdown.cjs.entry.js +1 -1
  23. package/dist/cjs/wcs-dropdown.cjs.entry.js.map +1 -1
  24. package/dist/cjs/wcs-editable-field.cjs.entry.js +16 -3
  25. package/dist/cjs/wcs-editable-field.cjs.entry.js.map +1 -1
  26. package/dist/cjs/wcs-error_2.cjs.entry.js +1 -1
  27. package/dist/cjs/wcs-error_2.cjs.entry.js.map +1 -1
  28. package/dist/cjs/wcs-field.cjs.entry.js.map +1 -1
  29. package/dist/cjs/wcs-footer.cjs.entry.js.map +1 -1
  30. package/dist/cjs/wcs-galactic-menu.cjs.entry.js +1 -1
  31. package/dist/cjs/wcs-galactic-menu.cjs.entry.js.map +1 -1
  32. package/dist/cjs/wcs-galactic.cjs.entry.js +0 -1
  33. package/dist/cjs/wcs-galactic.cjs.entry.js.map +1 -1
  34. package/dist/cjs/wcs-grid-column.cjs.entry.js.map +1 -1
  35. package/dist/cjs/wcs-grid-pagination.cjs.entry.js +1 -1
  36. package/dist/cjs/wcs-grid.cjs.entry.js +1 -1
  37. package/dist/cjs/wcs-grid.cjs.entry.js.map +1 -1
  38. package/dist/cjs/wcs-header.cjs.entry.js.map +1 -1
  39. package/dist/cjs/wcs-hint.cjs.entry.js +3 -3
  40. package/dist/cjs/wcs-hint.cjs.entry.js.map +1 -1
  41. package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js +0 -1
  42. package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js.map +1 -1
  43. package/dist/cjs/wcs-input.cjs.entry.js +14 -4
  44. package/dist/cjs/wcs-input.cjs.entry.js.map +1 -1
  45. package/dist/cjs/wcs-native-select.cjs.entry.js +102 -0
  46. package/dist/cjs/wcs-native-select.cjs.entry.js.map +1 -0
  47. package/dist/cjs/wcs-nav-item.cjs.entry.js +1 -1
  48. package/dist/cjs/wcs-radio-group.cjs.entry.js.map +1 -1
  49. package/dist/cjs/wcs-radio.cjs.entry.js +3 -3
  50. package/dist/cjs/wcs-radio.cjs.entry.js.map +1 -1
  51. package/dist/cjs/wcs-select_2.cjs.entry.js +229 -72
  52. package/dist/cjs/wcs-select_2.cjs.entry.js.map +1 -1
  53. package/dist/cjs/wcs-switch.cjs.entry.js +0 -1
  54. package/dist/cjs/wcs-switch.cjs.entry.js.map +1 -1
  55. package/dist/cjs/wcs-tab.cjs.entry.js.map +1 -1
  56. package/dist/cjs/wcs-tabs.cjs.entry.js.map +1 -1
  57. package/dist/cjs/wcs-textarea.cjs.entry.js +5 -3
  58. package/dist/cjs/wcs-textarea.cjs.entry.js.map +1 -1
  59. package/dist/cjs/wcs-tooltip.cjs.entry.js.map +1 -1
  60. package/dist/cjs/wcs.cjs.js +1 -1
  61. package/dist/collection/collection-manifest.json +2 -0
  62. package/dist/collection/components/action-bar/action-bar.js.map +1 -1
  63. package/dist/collection/components/app/app.js +0 -1
  64. package/dist/collection/components/app/app.js.map +1 -1
  65. package/dist/collection/components/button/button-interface.js +5 -1
  66. package/dist/collection/components/button/button-interface.js.map +1 -1
  67. package/dist/collection/components/button/button.css +28 -20
  68. package/dist/collection/components/button/button.js +54 -5
  69. package/dist/collection/components/button/button.js.map +1 -1
  70. package/dist/collection/components/checkbox/checkbox.js +0 -1
  71. package/dist/collection/components/checkbox/checkbox.js.map +1 -1
  72. package/dist/collection/components/com-nav/com-nav.js.map +1 -1
  73. package/dist/collection/components/com-nav-category/com-nav-category.js.map +1 -1
  74. package/dist/collection/components/com-nav-submenu/com-nav-submenu.js.map +1 -1
  75. package/dist/collection/components/counter/counter-interface.js +6 -0
  76. package/dist/collection/components/counter/counter-interface.js.map +1 -0
  77. package/dist/collection/components/counter/counter.css +93 -0
  78. package/dist/collection/components/counter/counter.js +293 -0
  79. package/dist/collection/components/counter/counter.js.map +1 -0
  80. package/dist/collection/components/dropdown/dropdown.js +1 -1
  81. package/dist/collection/components/dropdown/dropdown.js.map +1 -1
  82. package/dist/collection/components/editable-field/editable-field-interface.js +5 -1
  83. package/dist/collection/components/editable-field/editable-field-interface.js.map +1 -1
  84. package/dist/collection/components/editable-field/editable-field.css +21 -6
  85. package/dist/collection/components/editable-field/editable-field.js +33 -2
  86. package/dist/collection/components/editable-field/editable-field.js.map +1 -1
  87. package/dist/collection/components/field/field.js +4 -0
  88. package/dist/collection/components/field/field.js.map +1 -1
  89. package/dist/collection/components/footer/footer.js +5 -0
  90. package/dist/collection/components/footer/footer.js.map +1 -1
  91. package/dist/collection/components/form-field/form-field.js +1 -1
  92. package/dist/collection/components/form-field/form-field.js.map +1 -1
  93. package/dist/collection/components/galactic/galactic.js +0 -1
  94. package/dist/collection/components/galactic/galactic.js.map +1 -1
  95. package/dist/collection/components/galactic-menu/galactic-menu.js.map +1 -1
  96. package/dist/collection/components/grid/grid.js.map +1 -1
  97. package/dist/collection/components/grid-column/grid-column.js.map +1 -1
  98. package/dist/collection/components/grid-pagination/grid-pagination.js +0 -1
  99. package/dist/collection/components/grid-pagination/grid-pagination.js.map +1 -1
  100. package/dist/collection/components/header/header.js +5 -0
  101. package/dist/collection/components/header/header.js.map +1 -1
  102. package/dist/collection/components/hint/hint.js +2 -2
  103. package/dist/collection/components/hint/hint.js.map +1 -1
  104. package/dist/collection/components/horizontal-stepper/horizontal-stepper.js +0 -2
  105. package/dist/collection/components/horizontal-stepper/horizontal-stepper.js.map +1 -1
  106. package/dist/collection/components/input/input-interface.js +5 -1
  107. package/dist/collection/components/input/input-interface.js.map +1 -1
  108. package/dist/collection/components/input/input.css +21 -4
  109. package/dist/collection/components/input/input.js +30 -19
  110. package/dist/collection/components/input/input.js.map +1 -1
  111. package/dist/collection/components/native-select/native-select.component.js +153 -0
  112. package/dist/collection/components/native-select/native-select.component.js.map +1 -0
  113. package/dist/collection/components/native-select/native-select.css +78 -0
  114. package/dist/collection/components/radio/radio.component.js +1 -1
  115. package/dist/collection/components/radio/radio.component.js.map +1 -1
  116. package/dist/collection/components/radio/radio.css +15 -4
  117. package/dist/collection/components/radio-group/radio-group.js.map +1 -1
  118. package/dist/collection/components/select/select-interface.js +5 -1
  119. package/dist/collection/components/select/select-interface.js.map +1 -1
  120. package/dist/collection/components/select/select.css +41 -37
  121. package/dist/collection/components/select/select.js +233 -68
  122. package/dist/collection/components/select/select.js.map +1 -1
  123. package/dist/collection/components/select-option/select-option.css +3 -0
  124. package/dist/collection/components/select-option/select-option.js +25 -3
  125. package/dist/collection/components/select-option/select-option.js.map +1 -1
  126. package/dist/collection/components/switch/switch.js +0 -1
  127. package/dist/collection/components/switch/switch.js.map +1 -1
  128. package/dist/collection/components/tab/tab.js.map +1 -1
  129. package/dist/collection/components/tabs/tabs.js.map +1 -1
  130. package/dist/collection/components/textarea/textarea.css +3 -1
  131. package/dist/collection/components/textarea/textarea.js +23 -1
  132. package/dist/collection/components/textarea/textarea.js.map +1 -1
  133. package/dist/collection/components/tooltip/tooltip.js.map +1 -1
  134. package/dist/collection/index.js +3 -0
  135. package/dist/collection/index.js.map +1 -0
  136. package/dist/collection/shared-types.js +2 -0
  137. package/dist/collection/shared-types.js.map +1 -0
  138. package/dist/collection/utils/helpers.js +30 -0
  139. package/dist/collection/utils/helpers.js.map +1 -1
  140. package/dist/esm/{grid-pagination-62f9fbbc.js → grid-pagination-41354861.js} +2 -3
  141. package/dist/esm/grid-pagination-41354861.js.map +1 -0
  142. package/dist/esm/{helpers-e9b73aad.js → helpers-1f7170dd.js} +32 -2
  143. package/dist/esm/helpers-1f7170dd.js.map +1 -0
  144. package/dist/esm/loader.js +1 -1
  145. package/dist/esm/wcs-action-bar.entry.js.map +1 -1
  146. package/dist/esm/wcs-app.entry.js +1 -2
  147. package/dist/esm/wcs-app.entry.js.map +1 -1
  148. package/dist/esm/wcs-button.entry.js +17 -3
  149. package/dist/esm/wcs-button.entry.js.map +1 -1
  150. package/dist/esm/wcs-checkbox.entry.js +1 -2
  151. package/dist/esm/wcs-checkbox.entry.js.map +1 -1
  152. package/dist/esm/wcs-com-nav-category.entry.js +1 -1
  153. package/dist/esm/wcs-com-nav-category.entry.js.map +1 -1
  154. package/dist/esm/wcs-com-nav-submenu.entry.js +1 -1
  155. package/dist/esm/wcs-com-nav-submenu.entry.js.map +1 -1
  156. package/dist/esm/wcs-com-nav.entry.js.map +1 -1
  157. package/dist/esm/wcs-counter.entry.js +126 -0
  158. package/dist/esm/wcs-counter.entry.js.map +1 -0
  159. package/dist/esm/wcs-dropdown-item.entry.js +1 -1
  160. package/dist/esm/wcs-dropdown.entry.js +1 -1
  161. package/dist/esm/wcs-dropdown.entry.js.map +1 -1
  162. package/dist/esm/wcs-editable-field.entry.js +16 -3
  163. package/dist/esm/wcs-editable-field.entry.js.map +1 -1
  164. package/dist/esm/wcs-error_2.entry.js +1 -1
  165. package/dist/esm/wcs-error_2.entry.js.map +1 -1
  166. package/dist/esm/wcs-field.entry.js.map +1 -1
  167. package/dist/esm/wcs-footer.entry.js.map +1 -1
  168. package/dist/esm/wcs-galactic-menu.entry.js +1 -1
  169. package/dist/esm/wcs-galactic-menu.entry.js.map +1 -1
  170. package/dist/esm/wcs-galactic.entry.js +1 -2
  171. package/dist/esm/wcs-galactic.entry.js.map +1 -1
  172. package/dist/esm/wcs-grid-column.entry.js.map +1 -1
  173. package/dist/esm/wcs-grid-pagination.entry.js +1 -1
  174. package/dist/esm/wcs-grid.entry.js +1 -1
  175. package/dist/esm/wcs-grid.entry.js.map +1 -1
  176. package/dist/esm/wcs-header.entry.js.map +1 -1
  177. package/dist/esm/wcs-hint.entry.js +3 -3
  178. package/dist/esm/wcs-hint.entry.js.map +1 -1
  179. package/dist/esm/wcs-horizontal-stepper.entry.js +0 -1
  180. package/dist/esm/wcs-horizontal-stepper.entry.js.map +1 -1
  181. package/dist/esm/wcs-input.entry.js +14 -4
  182. package/dist/esm/wcs-input.entry.js.map +1 -1
  183. package/dist/esm/wcs-native-select.entry.js +98 -0
  184. package/dist/esm/wcs-native-select.entry.js.map +1 -0
  185. package/dist/esm/wcs-nav-item.entry.js +1 -1
  186. package/dist/esm/wcs-radio-group.entry.js.map +1 -1
  187. package/dist/esm/wcs-radio.entry.js +3 -3
  188. package/dist/esm/wcs-radio.entry.js.map +1 -1
  189. package/dist/esm/wcs-select_2.entry.js +229 -72
  190. package/dist/esm/wcs-select_2.entry.js.map +1 -1
  191. package/dist/esm/wcs-switch.entry.js +1 -2
  192. package/dist/esm/wcs-switch.entry.js.map +1 -1
  193. package/dist/esm/wcs-tab.entry.js.map +1 -1
  194. package/dist/esm/wcs-tabs.entry.js.map +1 -1
  195. package/dist/esm/wcs-textarea.entry.js +5 -3
  196. package/dist/esm/wcs-textarea.entry.js.map +1 -1
  197. package/dist/esm/wcs-tooltip.entry.js.map +1 -1
  198. package/dist/esm/wcs.js +1 -1
  199. package/dist/types/components/action-bar/action-bar.d.ts +2 -2
  200. package/dist/types/components/app/app.d.ts +0 -1
  201. package/dist/types/components/button/button-interface.d.ts +5 -1
  202. package/dist/types/components/button/button.d.ts +16 -7
  203. package/dist/types/components/checkbox/checkbox.d.ts +0 -1
  204. package/dist/types/components/com-nav/com-nav.d.ts +4 -4
  205. package/dist/types/components/com-nav-category/com-nav-category.d.ts +2 -2
  206. package/dist/types/components/com-nav-submenu/com-nav-submenu.d.ts +2 -2
  207. package/dist/types/components/counter/counter-interface.d.ts +7 -0
  208. package/dist/types/components/counter/counter.d.ts +67 -0
  209. package/dist/types/components/dropdown/dropdown.d.ts +2 -2
  210. package/dist/types/components/editable-field/editable-field-interface.d.ts +4 -0
  211. package/dist/types/components/editable-field/editable-field.d.ts +10 -13
  212. package/dist/types/components/field/field.d.ts +4 -0
  213. package/dist/types/components/footer/footer.d.ts +5 -0
  214. package/dist/types/components/form-field/form-field.d.ts +4 -4
  215. package/dist/types/components/galactic/galactic.d.ts +0 -1
  216. package/dist/types/components/galactic-menu/galactic-menu.d.ts +2 -2
  217. package/dist/types/components/grid/grid.d.ts +4 -4
  218. package/dist/types/components/grid-column/grid-column.d.ts +1 -1
  219. package/dist/types/components/grid-pagination/grid-pagination.d.ts +0 -1
  220. package/dist/types/components/header/header.d.ts +5 -0
  221. package/dist/types/components/hint/hint.d.ts +4 -1
  222. package/dist/types/components/horizontal-stepper/horizontal-stepper.d.ts +2 -4
  223. package/dist/types/components/input/input-interface.d.ts +4 -0
  224. package/dist/types/components/input/input.d.ts +8 -8
  225. package/dist/types/components/native-select/native-select.component.d.ts +56 -0
  226. package/dist/types/components/radio/radio.component.d.ts +1 -1
  227. package/dist/types/components/radio-group/radio-group.d.ts +1 -1
  228. package/dist/types/components/select/select-interface.d.ts +4 -0
  229. package/dist/types/components/select/select.d.ts +32 -20
  230. package/dist/types/components/select-option/select-option.d.ts +9 -3
  231. package/dist/types/components/switch/switch.d.ts +0 -1
  232. package/dist/types/components/tabs/tabs.d.ts +3 -3
  233. package/dist/types/components/textarea/textarea.d.ts +10 -2
  234. package/dist/types/components/tooltip/tooltip.d.ts +1 -2
  235. package/dist/types/components.d.ts +242 -22
  236. package/dist/types/index.d.ts +2 -0
  237. package/dist/types/shared-types.d.ts +10 -0
  238. package/dist/types/utils/helpers.d.ts +10 -0
  239. package/dist/wcs/p-029eb12a.entry.js +2 -0
  240. package/dist/wcs/p-029eb12a.entry.js.map +1 -0
  241. package/dist/wcs/p-069555a1.entry.js.map +1 -1
  242. package/dist/wcs/p-07b8cd36.entry.js.map +1 -1
  243. package/dist/wcs/p-12ac2547.js +2 -0
  244. package/dist/wcs/p-12ac2547.js.map +1 -0
  245. package/dist/wcs/p-1e43122f.entry.js.map +1 -1
  246. package/dist/wcs/p-26c4c983.entry.js +2 -0
  247. package/dist/wcs/p-26c4c983.entry.js.map +1 -0
  248. package/dist/wcs/p-26e7de5c.entry.js +16 -0
  249. package/dist/wcs/p-26e7de5c.entry.js.map +1 -0
  250. package/dist/wcs/p-31a8d23f.entry.js +2 -0
  251. package/dist/wcs/{p-d11c66d4.entry.js.map → p-31a8d23f.entry.js.map} +1 -1
  252. package/dist/wcs/p-463667c9.entry.js +2 -0
  253. package/dist/wcs/p-475ac7c5.js +2 -0
  254. package/dist/wcs/p-475ac7c5.js.map +1 -0
  255. package/dist/wcs/p-47d8ece5.entry.js.map +1 -1
  256. package/dist/wcs/p-4a9f8e94.entry.js.map +1 -1
  257. package/dist/wcs/p-4b2d8a6d.entry.js +2 -0
  258. package/dist/wcs/p-4b2d8a6d.entry.js.map +1 -0
  259. package/dist/wcs/{p-c7b42bae.entry.js → p-4b4d53e2.entry.js} +2 -2
  260. package/dist/wcs/p-50dce764.entry.js.map +1 -1
  261. package/dist/wcs/{p-8762cf93.entry.js → p-554ca93c.entry.js} +2 -2
  262. package/dist/wcs/p-627bbb6a.entry.js.map +1 -1
  263. package/dist/wcs/p-64dd7356.entry.js.map +1 -1
  264. package/dist/wcs/p-6acbf38a.entry.js +2 -0
  265. package/dist/wcs/{p-7d7472e2.entry.js.map → p-6acbf38a.entry.js.map} +1 -1
  266. package/dist/wcs/{p-6f921d57.entry.js → p-732b2faa.entry.js} +2 -2
  267. package/dist/wcs/p-732b2faa.entry.js.map +1 -0
  268. package/dist/wcs/{p-587fea23.entry.js → p-966a241e.entry.js} +2 -2
  269. package/dist/wcs/p-966a241e.entry.js.map +1 -0
  270. package/dist/wcs/p-9ecdeaf9.entry.js +2 -0
  271. package/dist/wcs/p-9ecdeaf9.entry.js.map +1 -0
  272. package/dist/wcs/p-a24fa4f4.entry.js +2 -0
  273. package/dist/wcs/p-a24fa4f4.entry.js.map +1 -0
  274. package/dist/wcs/p-a5cd4c07.entry.js +2 -0
  275. package/dist/wcs/{p-8bb19e58.entry.js.map → p-a5cd4c07.entry.js.map} +1 -1
  276. package/dist/wcs/p-b229a91c.entry.js +2 -0
  277. package/dist/wcs/p-b229a91c.entry.js.map +1 -0
  278. package/dist/wcs/{p-d998e112.entry.js → p-b6cd196d.entry.js} +2 -2
  279. package/dist/wcs/{p-d998e112.entry.js.map → p-b6cd196d.entry.js.map} +1 -1
  280. package/dist/wcs/p-b856f2f6.entry.js +2 -0
  281. package/dist/wcs/p-b856f2f6.entry.js.map +1 -0
  282. package/dist/wcs/{p-274232e6.entry.js → p-bcb8b731.entry.js} +2 -2
  283. package/dist/wcs/p-bcb8b731.entry.js.map +1 -0
  284. package/dist/wcs/p-d2da0c9f.entry.js +2 -0
  285. package/dist/wcs/p-d2da0c9f.entry.js.map +1 -0
  286. package/dist/wcs/p-d3f1cafe.entry.js.map +1 -1
  287. package/dist/wcs/p-d6b3f742.entry.js +2 -0
  288. package/dist/wcs/p-d6b3f742.entry.js.map +1 -0
  289. package/dist/wcs/p-ee453b6e.entry.js +2 -0
  290. package/dist/wcs/p-ee453b6e.entry.js.map +1 -0
  291. package/dist/wcs/p-f386bb8b.entry.js.map +1 -1
  292. package/dist/wcs/{p-e4dcd310.entry.js → p-f82e7a61.entry.js} +2 -2
  293. package/dist/wcs/{p-e4dcd310.entry.js.map → p-f82e7a61.entry.js.map} +1 -1
  294. package/dist/wcs/p-fc3f5b53.entry.js.map +1 -1
  295. package/dist/wcs/wcs.css +1 -1
  296. package/dist/wcs/wcs.esm.js +1 -1
  297. package/dist/wcs/wcs.esm.js.map +1 -1
  298. package/package.json +17 -12
  299. package/dist/cjs/grid-pagination-ff65e0ff.js.map +0 -1
  300. package/dist/cjs/helpers-11518d4f.js.map +0 -1
  301. package/dist/esm/grid-pagination-62f9fbbc.js.map +0 -1
  302. package/dist/esm/helpers-e9b73aad.js.map +0 -1
  303. package/dist/wcs/p-111ae1af.entry.js +0 -2
  304. package/dist/wcs/p-111ae1af.entry.js.map +0 -1
  305. package/dist/wcs/p-14e04d5e.entry.js +0 -2
  306. package/dist/wcs/p-14e04d5e.entry.js.map +0 -1
  307. package/dist/wcs/p-274232e6.entry.js.map +0 -1
  308. package/dist/wcs/p-2920b759.entry.js +0 -16
  309. package/dist/wcs/p-2920b759.entry.js.map +0 -1
  310. package/dist/wcs/p-3e370f48.entry.js +0 -2
  311. package/dist/wcs/p-49e66081.entry.js +0 -2
  312. package/dist/wcs/p-49e66081.entry.js.map +0 -1
  313. package/dist/wcs/p-504fb24e.entry.js +0 -2
  314. package/dist/wcs/p-504fb24e.entry.js.map +0 -1
  315. package/dist/wcs/p-5140269d.entry.js +0 -2
  316. package/dist/wcs/p-5140269d.entry.js.map +0 -1
  317. package/dist/wcs/p-587fea23.entry.js.map +0 -1
  318. package/dist/wcs/p-62db1219.js +0 -2
  319. package/dist/wcs/p-62db1219.js.map +0 -1
  320. package/dist/wcs/p-6f921d57.entry.js.map +0 -1
  321. package/dist/wcs/p-7d7472e2.entry.js +0 -2
  322. package/dist/wcs/p-89b3550b.entry.js +0 -2
  323. package/dist/wcs/p-89b3550b.entry.js.map +0 -1
  324. package/dist/wcs/p-8bb19e58.entry.js +0 -2
  325. package/dist/wcs/p-9157466f.entry.js +0 -2
  326. package/dist/wcs/p-9157466f.entry.js.map +0 -1
  327. package/dist/wcs/p-d11c66d4.entry.js +0 -2
  328. package/dist/wcs/p-d218509e.entry.js +0 -2
  329. package/dist/wcs/p-d218509e.entry.js.map +0 -1
  330. package/dist/wcs/p-dc57a5f7.js +0 -2
  331. package/dist/wcs/p-dc57a5f7.js.map +0 -1
  332. /package/dist/wcs/{p-3e370f48.entry.js.map → p-463667c9.entry.js.map} +0 -0
  333. /package/dist/wcs/{p-c7b42bae.entry.js.map → p-4b4d53e2.entry.js.map} +0 -0
  334. /package/dist/wcs/{p-8762cf93.entry.js.map → p-554ca93c.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["tabsCss","Tabs","selectedIndexChanged","newValue","this","currentActiveTabIndex","selectedTabkeyChanged","updateCurrentActiveIndexByTabKey","emitActiveTabChange","tabChange","emit","tabName","headers","tabIndex","selectedKey","tabs","itemKey","i","length","tab","onTabLoaded","refreshHeaders","componentDidLoad","putTabsInCorrectDivIfTheyAreNot","selectedIndex","tabDiv","el","shadowRoot","querySelector","Array","from","querySelectorAll","filter","node","parentNode","forEach","parentElement","isEqualNode","removeChild","appendChild","handleKeyDown","ev","target","key","preventDefault","_a","previousElementSibling","classList","contains","focus","_b","nextElementSibling","x","push","getAttribute","tabsEl","assignedElements","selectTabAndEmitChangeEvent","index","componentWillUpdate","headersOnly","updateTabVisibility","hideAllTabsContent","idx","setAttribute","render","h","Host","class","map","header","onClick","onKeyDown","evt","name"],"sources":["./src/components/tabs/tabs.scss?tag=wcs-tabs&encapsulation=shadow","./src/components/tabs/tabs.tsx"],"sourcesContent":["@import '../../style/focus-outline.scss';\n\n:host {\n --wcs-tabs-padding-bottom: 16px;\n}\n\n:host([align=start]) .wcs-tabs-headers {\n justify-content: start;\n}\n\n:host([align=end]) .wcs-tabs-headers {\n justify-content: end;\n}\n\n:host([align=center]) .wcs-tabs-headers {\n justify-content: center;\n}\n\n.wcs-tabs-headers {\n padding-top: 4px;\n overflow-x: auto;\n display: flex;\n position: relative;\n}\n\n:host([gutter]) {\n .wcs-tabs-headers {\n border-bottom: var(--wcs-tabs-headers-border-bottom);\n }\n}\n\n.wcs-tab-header {\n padding: 8px 24px 16px 0;\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n outline: none;\n\n span {\n text-align: center;\n color: var(--wcs-text-disabled);\n font-size: 1rem;\n font-weight: 400;\n }\n\n\n &:focus,\n &:hover {\n span {\n color: var(--wcs-primary);\n }\n }\n\n &:focus-visible > span {\n @include focus-outline;\n }\n}\n\n\n.active {\n span {\n font-weight: 500;\n color: var(--wcs-primary);\n position: relative;\n }\n\n span::after {\n position: absolute;\n bottom: calc(var(--wcs-tabs-padding-bottom) * -1);\n left: 0;\n width: 100%;\n height: 0.3125rem;\n content: \"\";\n background-color: var(--wcs-primary);\n border-radius: 3px;\n }\n}\n","import {\n Component,\n Prop,\n Element,\n State,\n ComponentInterface,\n Event,\n EventEmitter,\n Watch,\n h,\n Host,\n Listen\n} from '@stencil/core';\n\nimport { WcsTabsAlignment, WcsTabChangeEvent } from './tabs-interface';\n\n/**\n * Tabs component to switch between tab content.\n * Use in conjuction with `wcs-tab`.\n *\n * @example\n * ```html\n * <wcs-tabs>\n * <wcs-tab header=\"One\">The content !</wcs-tab>\n * <wcs-tab header=\"Two\">More content !</wcs-tab>\n * </wcs-tabs>\n * ```\n */\n@Component({\n tag: 'wcs-tabs',\n styleUrl: 'tabs.scss',\n shadow: true,\n})\nexport class Tabs implements ComponentInterface {\n /**\n * Tab headers alignment.\n */\n @Prop({reflect: true}) align: WcsTabsAlignment = 'start';\n\n /**\n * Current selected tab index.\n * Starts at 0.\n */\n @Prop() selectedIndex: number = 0;\n\n @Prop() selectedKey: any;\n\n /**\n * Whether to skip rendering the tabpanel with the content of the selected tab. Use this prop if you plan to\n * separately render the tab content.\n */\n @Prop() headersOnly: boolean = false;\n /** Determines if tabs header should have a border at the bottom */\n @Prop() gutter: boolean;\n\n /**\n *\n * Emitted when the selected tab change.\n */\n @Event() tabChange!: EventEmitter<WcsTabChangeEvent>;\n\n @Element() el!: HTMLWcsTabsElement;\n\n @State() headers: string[] = [];\n\n @State() currentActiveTabIndex = 0;\n\n @Watch('selectedIndex')\n selectedIndexChanged(newValue: number) {\n this.currentActiveTabIndex = newValue;\n }\n\n @Watch('selectedKey')\n selectedTabkeyChanged(newValue: any) {\n this.updateCurrentActiveIndexByTabKey(newValue);\n }\n\n private emitActiveTabChange() {\n this.tabChange.emit({\n tabName: this.headers[this.currentActiveTabIndex],\n tabIndex: this.currentActiveTabIndex,\n selectedKey: this.tabs[this.currentActiveTabIndex].itemKey\n });\n }\n\n private updateCurrentActiveIndexByTabKey(newValue: any) {\n for (let i = 0; i < this.tabs.length; i++) {\n const tab = this.tabs[i];\n if (tab.itemKey === newValue) {\n this.currentActiveTabIndex = i;\n }\n }\n }\n\n @Listen('tabLoaded')\n onTabLoaded() {\n this.refreshHeaders();\n }\n\n componentDidLoad() {\n this.putTabsInCorrectDivIfTheyAreNot();\n this.refreshHeaders();\n if (this.selectedIndex) {\n this.currentActiveTabIndex = this.selectedIndex;\n }\n if (this.selectedKey) {\n this.updateCurrentActiveIndexByTabKey(this.selectedKey);\n }\n }\n\n // XXX: Firefox < 63\n private putTabsInCorrectDivIfTheyAreNot() {\n const tabDiv = this.el.shadowRoot.querySelector('.wcs-tabs');\n if (tabDiv.querySelector('slot') === null) {\n Array.from(this.el.querySelectorAll('wcs-tab'))\n .filter(node => node.parentNode !== tabDiv)\n .forEach(tab => {\n if (tab.parentElement.isEqualNode(this.el)) {\n this.el.removeChild(tab);\n tabDiv.appendChild(tab);\n }\n });\n }\n }\n\n handleKeyDown(ev: KeyboardEvent, tabIndex: number) {\n const target = ev.target as HTMLDivElement;\n switch (ev.key) {\n case ' ':\n case 'Enter': {\n this.currentActiveTabIndex = tabIndex;\n this.emitActiveTabChange();\n ev.preventDefault();\n break;\n }\n case 'ArrowLeft': {\n if (target.previousElementSibling?.classList.contains('wcs-tab-header')) {\n (target.previousElementSibling as HTMLDivElement).focus();\n ev.preventDefault();\n }\n break;\n }\n case 'ArrowRight': {\n if (target.nextElementSibling?.classList.contains('wcs-tab-header')) {\n (target.nextElementSibling as HTMLDivElement).focus();\n ev.preventDefault();\n }\n break;\n }\n }\n }\n\n private refreshHeaders() {\n this.headers = [];\n this.tabs\n .forEach(x => {\n this.headers.push(x.getAttribute('header'));\n });\n }\n\n private get tabs() {\n const tabsEl = this.el.shadowRoot.querySelector('.wcs-tabs');\n // FIXME: problem with this selector being too greedy in ff < 63\n const tabs = this.el.shadowRoot.querySelectorAll('.wcs-tabs > wcs-tab');\n\n return tabs.length !== 0\n ? tabs\n : tabsEl?.querySelector('slot')\n ? tabsEl?.querySelector('slot')?.assignedElements() as unknown as NodeListOf<HTMLWcsTabElement>\n : [];\n }\n\n private selectTabAndEmitChangeEvent(index: number) {\n this.currentActiveTabIndex = index;\n this.emitActiveTabChange()\n }\n\n componentWillUpdate() {\n if (!this.headersOnly) {\n this.updateTabVisibility();\n } else {\n this.hideAllTabsContent();\n }\n }\n\n private updateTabVisibility() {\n this.tabs.forEach((el: HTMLWcsTabElement, idx: number) => {\n if (idx !== this.currentActiveTabIndex) {\n el.setAttribute('style', 'display: none;');\n } else {\n el.setAttribute('style', 'display: block;');\n }\n });\n }\n\n private hideAllTabsContent() {\n this.tabs.forEach((el: HTMLWcsTabElement) => el.setAttribute('style', 'display: none;'));\n }\n\n render() {\n return (\n <Host>\n <div class=\"wcs-tabs-headers\">\n {this.headers.map((header, idx) =>\n <div class={'wcs-tab-header ' + (this.currentActiveTabIndex === idx ? 'active' : '')}\n onClick={() => this.selectTabAndEmitChangeEvent(idx)}\n onKeyDown={evt => this.handleKeyDown(evt, idx)}\n tabIndex={this.currentActiveTabIndex === idx ? 0 : -1}\n >\n <span>{header}</span>\n </div>\n )}\n </div>\n <div class=\"wcs-tabs\">\n <slot name=\"wcs-tab\"/>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"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"}
1
+ {"version":3,"names":["tabsCss","Tabs","selectedIndexChanged","newValue","this","currentActiveTabIndex","selectedTabkeyChanged","updateCurrentActiveIndexByTabKey","emitActiveTabChange","tabChange","emit","tabName","headers","tabIndex","selectedKey","tabs","itemKey","i","length","tab","onTabLoaded","refreshHeaders","componentDidLoad","putTabsInCorrectDivIfTheyAreNot","selectedIndex","tabDiv","el","shadowRoot","querySelector","Array","from","querySelectorAll","filter","node","parentNode","forEach","parentElement","isEqualNode","removeChild","appendChild","handleKeyDown","ev","target","key","preventDefault","_a","previousElementSibling","classList","contains","focus","_b","nextElementSibling","x","push","getAttribute","tabsEl","assignedElements","selectTabAndEmitChangeEvent","index","componentWillUpdate","headersOnly","updateTabVisibility","hideAllTabsContent","idx","setAttribute","render","h","Host","class","map","header","onClick","onKeyDown","evt","name"],"sources":["./src/components/tabs/tabs.scss?tag=wcs-tabs&encapsulation=shadow","./src/components/tabs/tabs.tsx"],"sourcesContent":["@import '../../style/focus-outline.scss';\n\n:host {\n --wcs-tabs-padding-bottom: 16px;\n}\n\n:host([align=start]) .wcs-tabs-headers {\n justify-content: start;\n}\n\n:host([align=end]) .wcs-tabs-headers {\n justify-content: end;\n}\n\n:host([align=center]) .wcs-tabs-headers {\n justify-content: center;\n}\n\n.wcs-tabs-headers {\n padding-top: 4px;\n overflow-x: auto;\n display: flex;\n position: relative;\n}\n\n:host([gutter]) {\n .wcs-tabs-headers {\n border-bottom: var(--wcs-tabs-headers-border-bottom);\n }\n}\n\n.wcs-tab-header {\n padding: 8px 24px 16px 0;\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n outline: none;\n\n span {\n text-align: center;\n color: var(--wcs-text-disabled);\n font-size: 1rem;\n font-weight: 400;\n }\n\n\n &:focus,\n &:hover {\n span {\n color: var(--wcs-primary);\n }\n }\n\n &:focus-visible > span {\n @include focus-outline;\n }\n}\n\n\n.active {\n span {\n font-weight: 500;\n color: var(--wcs-primary);\n position: relative;\n }\n\n span::after {\n position: absolute;\n bottom: calc(var(--wcs-tabs-padding-bottom) * -1);\n left: 0;\n width: 100%;\n height: 0.3125rem;\n content: \"\";\n background-color: var(--wcs-primary);\n border-radius: 3px;\n }\n}\n","import {\n Component,\n Prop,\n Element,\n State,\n ComponentInterface,\n Event,\n EventEmitter,\n Watch,\n h,\n Host,\n Listen\n} from '@stencil/core';\n\nimport { WcsTabsAlignment, WcsTabChangeEvent } from './tabs-interface';\n\n/**\n * Tabs component to switch between tab content.\n * Use in conjuction with `wcs-tab`.\n *\n * @example\n * ```html\n * <wcs-tabs>\n * <wcs-tab header=\"One\">The content !</wcs-tab>\n * <wcs-tab header=\"Two\">More content !</wcs-tab>\n * </wcs-tabs>\n * ```\n */\n@Component({\n tag: 'wcs-tabs',\n styleUrl: 'tabs.scss',\n shadow: true,\n})\nexport class Tabs implements ComponentInterface {\n /**\n * Tab headers alignment.\n */\n @Prop({reflect: true}) align: WcsTabsAlignment = 'start';\n\n /**\n * Current selected tab index.\n * Starts at 0.\n */\n @Prop() selectedIndex: number = 0;\n\n @Prop() selectedKey: any;\n\n /**\n * Whether to skip rendering the tabpanel with the content of the selected tab. Use this prop if you plan to\n * separately render the tab content.\n */\n @Prop() headersOnly: boolean = false;\n /** Determines if tabs header should have a border at the bottom */\n @Prop() gutter: boolean;\n\n /**\n *\n * Emitted when the selected tab change.\n */\n @Event() tabChange!: EventEmitter<WcsTabChangeEvent>;\n\n @Element() private el!: HTMLWcsTabsElement;\n\n @State() private headers: string[] = [];\n\n @State() private currentActiveTabIndex = 0;\n\n @Watch('selectedIndex')\n selectedIndexChanged(newValue: number) {\n this.currentActiveTabIndex = newValue;\n }\n\n @Watch('selectedKey')\n selectedTabkeyChanged(newValue: any) {\n this.updateCurrentActiveIndexByTabKey(newValue);\n }\n\n private emitActiveTabChange() {\n this.tabChange.emit({\n tabName: this.headers[this.currentActiveTabIndex],\n tabIndex: this.currentActiveTabIndex,\n selectedKey: this.tabs[this.currentActiveTabIndex].itemKey\n });\n }\n\n private updateCurrentActiveIndexByTabKey(newValue: any) {\n for (let i = 0; i < this.tabs.length; i++) {\n const tab = this.tabs[i];\n if (tab.itemKey === newValue) {\n this.currentActiveTabIndex = i;\n }\n }\n }\n\n @Listen('tabLoaded')\n onTabLoaded() {\n this.refreshHeaders();\n }\n\n componentDidLoad() {\n this.putTabsInCorrectDivIfTheyAreNot();\n this.refreshHeaders();\n if (this.selectedIndex) {\n this.currentActiveTabIndex = this.selectedIndex;\n }\n if (this.selectedKey) {\n this.updateCurrentActiveIndexByTabKey(this.selectedKey);\n }\n }\n\n // XXX: Firefox < 63\n private putTabsInCorrectDivIfTheyAreNot() {\n const tabDiv = this.el.shadowRoot.querySelector('.wcs-tabs');\n if (tabDiv.querySelector('slot') === null) {\n Array.from(this.el.querySelectorAll('wcs-tab'))\n .filter(node => node.parentNode !== tabDiv)\n .forEach(tab => {\n if (tab.parentElement.isEqualNode(this.el)) {\n this.el.removeChild(tab);\n tabDiv.appendChild(tab);\n }\n });\n }\n }\n\n handleKeyDown(ev: KeyboardEvent, tabIndex: number) {\n const target = ev.target as HTMLDivElement;\n switch (ev.key) {\n case ' ':\n case 'Enter': {\n this.currentActiveTabIndex = tabIndex;\n this.emitActiveTabChange();\n ev.preventDefault();\n break;\n }\n case 'ArrowLeft': {\n if (target.previousElementSibling?.classList.contains('wcs-tab-header')) {\n (target.previousElementSibling as HTMLDivElement).focus();\n ev.preventDefault();\n }\n break;\n }\n case 'ArrowRight': {\n if (target.nextElementSibling?.classList.contains('wcs-tab-header')) {\n (target.nextElementSibling as HTMLDivElement).focus();\n ev.preventDefault();\n }\n break;\n }\n }\n }\n\n private refreshHeaders() {\n this.headers = [];\n this.tabs\n .forEach(x => {\n this.headers.push(x.getAttribute('header'));\n });\n }\n\n private get tabs() {\n const tabsEl = this.el.shadowRoot.querySelector('.wcs-tabs');\n // FIXME: problem with this selector being too greedy in ff < 63\n const tabs = this.el.shadowRoot.querySelectorAll('.wcs-tabs > wcs-tab');\n\n return tabs.length !== 0\n ? tabs\n : tabsEl?.querySelector('slot')\n ? tabsEl?.querySelector('slot')?.assignedElements() as unknown as NodeListOf<HTMLWcsTabElement>\n : [];\n }\n\n private selectTabAndEmitChangeEvent(index: number) {\n this.currentActiveTabIndex = index;\n this.emitActiveTabChange()\n }\n\n componentWillUpdate() {\n if (!this.headersOnly) {\n this.updateTabVisibility();\n } else {\n this.hideAllTabsContent();\n }\n }\n\n private updateTabVisibility() {\n this.tabs.forEach((el: HTMLWcsTabElement, idx: number) => {\n if (idx !== this.currentActiveTabIndex) {\n el.setAttribute('style', 'display: none;');\n } else {\n el.setAttribute('style', 'display: block;');\n }\n });\n }\n\n private hideAllTabsContent() {\n this.tabs.forEach((el: HTMLWcsTabElement) => el.setAttribute('style', 'display: none;'));\n }\n\n render() {\n return (\n <Host>\n <div class=\"wcs-tabs-headers\">\n {this.headers.map((header, idx) =>\n <div class={'wcs-tab-header ' + (this.currentActiveTabIndex === idx ? 'active' : '')}\n onClick={() => this.selectTabAndEmitChangeEvent(idx)}\n onKeyDown={evt => this.handleKeyDown(evt, idx)}\n tabIndex={this.currentActiveTabIndex === idx ? 0 : -1}\n >\n <span>{header}</span>\n </div>\n )}\n </div>\n <div class=\"wcs-tabs\">\n <slot name=\"wcs-tab\"/>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ function n(n){return"clientWidth"in n&&"clientHeight"in n}function t(n){return!!n.shadowRoot&&!!n.attachShadow}const r=(n,t)=>{const r=n._original||n;return{_original:n,emit:e(r.emit.bind(r),t)}};const e=(n,t=0)=>{let r;return(...e)=>{clearTimeout(r);r=setTimeout(n,t,...e)}};const o=(n,t=[])=>{const r={};t.forEach((t=>{if(n.hasAttribute(t)){const e=n.getAttribute(t);if(e!==null){r[t]=n.getAttribute(t)}n.removeAttribute(t)}}));return r};const u=n=>{const t=n.closest("wcs-form-field");if(t){return t.querySelector("wcs-label")}return null};const i=n=>{if(typeof __zone_symbol__requestAnimationFrame==="function"){return __zone_symbol__requestAnimationFrame(n)}if(typeof requestAnimationFrame==="function"){return requestAnimationFrame(n)}return setTimeout(n)};const s=(n,t)=>n.x>=t.getBoundingClientRect().x&&n.x<=t.getBoundingClientRect().x+t.getBoundingClientRect().width&&n.y>=t.getBoundingClientRect().y&&n.y<=t.getBoundingClientRect().y+t.getBoundingClientRect().height;const a=(n,t)=>n.target instanceof Node&&t.contains(n.target);function c(n){return n+"-"+Math.random().toString(36)}function f(n){return n.code==="ArrowUp"}function m(n){return n.code==="ArrowDown"}function l(n){return n.code==="Escape"}function w(n){return n.code==="Space"}function _(n){return n.key==="Enter"}function A(n){return n.code==="Home"}function p(n){return n.code==="End"}function g(n){return n.key==="ArrowUp"}function b(n){return n.key==="ArrowDown"}function d(n){return n.key==="ArrowLeft"}function h(n){return n.key==="ArrowRight"}function q(n){return n.key==="PageDown"}function y(n){return n.key==="PageUp"}function F(n){return n.key==="Tab"}export{_ as a,l as b,f as c,m as d,A as e,p as f,a as g,s as h,w as i,r as j,o as k,u as l,c as m,b as n,h as o,g as p,d as q,i as r,q as s,y as t,F as u,n as v,t as w};
2
+ //# sourceMappingURL=p-12ac2547.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isElement","element","hasShadowDom","el","shadowRoot","attachShadow","debounceEvent","event","wait","original","_original","emit","debounce","bind","func","timer","args","clearTimeout","setTimeout","inheritAttributes","attributes","attributeObject","forEach","attr","hasAttribute","value","getAttribute","removeAttribute","findItemLabel","componentEl","itemEl","closest","querySelector","raf","h","__zone_symbol__requestAnimationFrame","requestAnimationFrame","clickInsideElement","x","getBoundingClientRect","width","y","height","clickTargetIsElementOrChildren","mouseEvent","target","Node","contains","generateUniqueId","componentName","Math","random","toString","isKeyup","evt","code","isKeydown","isEscapeKey","isSpaceKey","isEnterKey","key","isHomeKey","isEndKey","isUpArrowKey","isDownArrowKey","isLeftArrowKey","isRightArrowKey","isPageDownKey","isPageUpKey","isTabKey"],"sources":["./src/utils/helpers.ts"],"sourcesContent":["import { EventEmitter } from '@stencil/core';\n\nexport function isElement(element: any): element is Element {\n return 'clientWidth' in element\n && 'clientHeight' in element;\n}\n\nexport function hasShadowDom(el: HTMLElement) {\n return !!el.shadowRoot && !!(el as any).attachShadow;\n}\n\nexport const debounceEvent = (event: EventEmitter, wait: number): EventEmitter => {\n const original = (event as any)._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait)\n } as EventEmitter;\n};\n\nexport const debounce = (func: (...args: any[]) => void, wait = 0) => {\n let timer: any;\n return (...args: any[]): any => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n\n/**\n * Elements inside of web components sometimes need to inherit global attributes\n * set on the host. For example, the inner input in `wcs-input` should inherit\n * the `title` attribute that developers set directly on `ion-input`. This\n * helper function should be called in componentWillLoad and assigned to a variable\n * that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (el: HTMLElement, attributes: string[] = []) => {\n const attributeObject: { [k: string]: any } = {};\n\n attributes.forEach(attr => {\n if (el.hasAttribute(attr)) {\n const value = el.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = el.getAttribute(attr);\n }\n el.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n}\n\nexport const findItemLabel = (componentEl: HTMLElement): HTMLWcsLabelElement | null => {\n const itemEl = componentEl.closest('wcs-form-field');\n if (itemEl) {\n return itemEl.querySelector('wcs-label');\n }\n return null;\n};\n\ndeclare const __zone_symbol__requestAnimationFrame: any;\n\n/**\n * Patched version of requestAnimationFrame that avoids ngzone\n * Use only when you know ngzone should not run\n */\nexport const raf = (h: any) => {\n if (typeof __zone_symbol__requestAnimationFrame === 'function') {\n return __zone_symbol__requestAnimationFrame(h);\n }\n if (typeof requestAnimationFrame === 'function') {\n return requestAnimationFrame(h);\n }\n return setTimeout(h);\n};\n\n/**\n * Return true if the mouseEvent click is inside the given HTML element\n */\nexport const clickInsideElement = (event: MouseEvent, element: HTMLElement): boolean => {\n return event.x >= element.getBoundingClientRect().x && event.x <= element.getBoundingClientRect().x + element.getBoundingClientRect().width\n && event.y >= element.getBoundingClientRect().y && event.y <= element.getBoundingClientRect().y + element.getBoundingClientRect().height;\n}\n\n\nexport const clickTargetIsElementOrChildren = (mouseEvent: MouseEvent, element: HTMLElement) => {\n return mouseEvent.target instanceof Node\n && element.contains(mouseEvent.target);\n}\n\nexport function generateUniqueId(componentName: string): string {\n return componentName + \"-\" + Math.random().toString(36);\n}\n\nexport function isKeyup(evt: KeyboardEvent) {\n return evt.code === 'ArrowUp';\n}\n\nexport function isKeydown(evt: KeyboardEvent) {\n return evt.code === 'ArrowDown';\n}\n\nexport function isEscapeKey(evt: KeyboardEvent) {\n return evt.code === 'Escape';\n}\n\nexport function isSpaceKey(evt: KeyboardEvent) {\n return evt.code === 'Space';\n}\n\nexport function isEnterKey(evt: KeyboardEvent) {\n return evt.key === 'Enter';\n}\n\nexport function isHomeKey(evt: KeyboardEvent) {\n return evt.code === 'Home';\n}\n\nexport function isEndKey(evt: KeyboardEvent) {\n return evt.code === 'End';\n}\n\nexport function isUpArrowKey(evt: KeyboardEvent) {\n return evt.key === 'ArrowUp';\n}\n\nexport function isDownArrowKey(evt: KeyboardEvent) {\n return evt.key === 'ArrowDown';\n}\n\nexport function isLeftArrowKey(evt: KeyboardEvent) {\n return evt.key === 'ArrowLeft';\n}\n\nexport function isRightArrowKey(evt: KeyboardEvent) {\n return evt.key === 'ArrowRight';\n}\n\nexport function isPageDownKey(evt: KeyboardEvent) {\n return evt.key === 'PageDown';\n}\n\nexport function isPageUpKey(evt: KeyboardEvent) {\n return evt.key === 'PageUp';\n}\n\nexport function isTabKey(evt: KeyboardEvent) {\n return evt.key === 'Tab';\n}\n"],"mappings":"SAEgBA,EAAUC,GACtB,MAAO,gBAAiBA,GACjB,iBAAkBA,CAC7B,C,SAEgBC,EAAaC,GACzB,QAASA,EAAGC,cAAiBD,EAAWE,YAC5C,C,MAEaC,EAAgB,CAACC,EAAqBC,KAC/C,MAAMC,EAAYF,EAAcG,WAAaH,EAC7C,MAAO,CACHG,UAAWH,EACXI,KAAMC,EAASH,EAASE,KAAKE,KAAKJ,GAAWD,GAChC,EAGd,MAAMI,EAAW,CAACE,EAAgCN,EAAO,KAC5D,IAAIO,EACJ,MAAO,IAAIC,KACPC,aAAaF,GACbA,EAAQG,WAAWJ,EAAMN,KAASQ,EAAK,CAC1C,E,MAaQG,EAAoB,CAAChB,EAAiBiB,EAAuB,MACtE,MAAMC,EAAwC,GAE9CD,EAAWE,SAAQC,IACf,GAAIpB,EAAGqB,aAAaD,GAAO,CACvB,MAAME,EAAQtB,EAAGuB,aAAaH,GAC9B,GAAIE,IAAU,KAAM,CAChBJ,EAAgBE,GAAQpB,EAAGuB,aAAaH,E,CAE5CpB,EAAGwB,gBAAgBJ,E,KAI3B,OAAOF,CAAe,E,MAGbO,EAAiBC,IAC1B,MAAMC,EAASD,EAAYE,QAAQ,kBACnC,GAAID,EAAQ,CACR,OAAOA,EAAOE,cAAc,Y,CAEhC,OAAO,IAAI,E,MASFC,EAAOC,IAChB,UAAWC,uCAAyC,WAAY,CAC5D,OAAOA,qCAAqCD,E,CAEhD,UAAWE,wBAA0B,WAAY,CAC7C,OAAOA,sBAAsBF,E,CAEjC,OAAOhB,WAAWgB,EAAE,E,MAMXG,EAAqB,CAAC9B,EAAmBN,IAC3CM,EAAM+B,GAAKrC,EAAQsC,wBAAwBD,GAAK/B,EAAM+B,GAAKrC,EAAQsC,wBAAwBD,EAAIrC,EAAQsC,wBAAwBC,OAC/HjC,EAAMkC,GAAKxC,EAAQsC,wBAAwBE,GAAKlC,EAAMkC,GAAKxC,EAAQsC,wBAAwBE,EAAIxC,EAAQsC,wBAAwBG,O,MAI7HC,EAAiC,CAACC,EAAwB3C,IAC5D2C,EAAWC,kBAAkBC,MAC7B7C,EAAQ8C,SAASH,EAAWC,Q,SAGvBG,EAAiBC,GAC7B,OAAOA,EAAgB,IAAMC,KAAKC,SAASC,SAAS,GACxD,C,SAEgBC,EAAQC,GACpB,OAAOA,EAAIC,OAAS,SACxB,C,SAEgBC,EAAUF,GACtB,OAAOA,EAAIC,OAAS,WACxB,C,SAEgBE,EAAYH,GACxB,OAAOA,EAAIC,OAAS,QACxB,C,SAEgBG,EAAWJ,GACvB,OAAOA,EAAIC,OAAS,OACxB,C,SAEgBI,EAAWL,GACvB,OAAOA,EAAIM,MAAQ,OACvB,C,SAEgBC,EAAUP,GACtB,OAAOA,EAAIC,OAAS,MACxB,C,SAEgBO,EAASR,GACrB,OAAOA,EAAIC,OAAS,KACxB,C,SAEgBQ,EAAaT,GACzB,OAAOA,EAAIM,MAAQ,SACvB,C,SAEgBI,EAAeV,GAC3B,OAAOA,EAAIM,MAAQ,WACvB,C,SAEgBK,EAAeX,GAC3B,OAAOA,EAAIM,MAAQ,WACvB,C,SAEgBM,EAAgBZ,GAC5B,OAAOA,EAAIM,MAAQ,YACvB,C,SAEgBO,EAAcb,GAC1B,OAAOA,EAAIM,MAAQ,UACvB,C,SAEgBQ,EAAYd,GACxB,OAAOA,EAAIM,MAAQ,QACvB,C,SAEgBS,EAASf,GACrB,OAAOA,EAAIM,MAAQ,KACvB,Q"}
@@ -1 +1 @@
1
- {"version":3,"names":["footerCss","Footer","render","h","Host","class","name"],"sources":["./src/components/footer/footer.scss?tag=wcs-footer&encapsulation=shadow","./src/components/footer/footer.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n background-color: var(--wcs-gray);\n color: white;\n\n .end {\n margin-top: calc(2*var(--wcs-base-margin));\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n align-items: baseline;\n gap: var(--wcs-base-margin);\n\n .end-left, .end-right {\n display: flex;\n flex-wrap: wrap;\n }\n\n @media only screen and (max-width:1024px) {\n .end-left, .end-right {\n flex-direction: column;\n }\n }\n\n slot[name=end-left]::slotted(a) {\n color: var(--wcs-text-disabled);\n text-decoration: none;\n font-size: 14px;\n font-weight: 500;\n margin-right: 35px;\n }\n\n slot[name=end-left]::slotted(a:hover) {\n color: var(--wcs-white);\n }\n\n }\n\n .container {\n margin: 0 auto;\n max-width: var(--wcs-com-content-max-width);\n display: flex;\n flex-direction: column;\n padding: 20px;\n }\n\n}\n","import { Component, ComponentInterface, h, Host } from '@stencil/core';\n\n@Component({\n tag: 'wcs-footer',\n styleUrl: 'footer.scss',\n shadow: true,\n})\nexport class Footer implements ComponentInterface {\n render(): any {\n return (\n <Host>\n <div class=\"container\">\n <div>\n <slot />\n </div>\n <div class=\"end\">\n <div class=\"end-left\">\n <slot name=\"end-left\"/>\n </div>\n <div class=\"end-right\">\n <slot name=\"end-right\"/>\n </div>\n </div>\n </div>\n </Host>\n )\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAY,iwB,MCOLC,EAAM,M,yBACfC,SACI,OACIC,EAACC,EAAI,KACDD,EAAA,OAAKE,MAAM,aACPF,EAAA,WACIA,EAAA,cAEJA,EAAA,OAAKE,MAAM,OACPF,EAAA,OAAKE,MAAM,YACPF,EAAA,QAAMG,KAAK,cAEfH,EAAA,OAAKE,MAAM,aACPF,EAAA,QAAMG,KAAK,iB"}
1
+ {"version":3,"names":["footerCss","Footer","render","h","Host","class","name"],"sources":["./src/components/footer/footer.scss?tag=wcs-footer&encapsulation=shadow","./src/components/footer/footer.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n background-color: var(--wcs-gray);\n color: white;\n\n .end {\n margin-top: calc(2*var(--wcs-base-margin));\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n align-items: baseline;\n gap: var(--wcs-base-margin);\n\n .end-left, .end-right {\n display: flex;\n flex-wrap: wrap;\n }\n\n @media only screen and (max-width:1024px) {\n .end-left, .end-right {\n flex-direction: column;\n }\n }\n\n slot[name=end-left]::slotted(a) {\n color: var(--wcs-text-disabled);\n text-decoration: none;\n font-size: 14px;\n font-weight: 500;\n margin-right: 35px;\n }\n\n slot[name=end-left]::slotted(a:hover) {\n color: var(--wcs-white);\n }\n\n }\n\n .container {\n margin: 0 auto;\n max-width: var(--wcs-com-content-max-width);\n display: flex;\n flex-direction: column;\n padding: 20px;\n }\n\n}\n","import { Component, ComponentInterface, h, Host } from '@stencil/core';\n\n/**\n * @slot <no-name> Main container slot\n * @slot end-left Bottom-left part of the footer\n * @slot end-right Bottom-right part of the footer\n */\n@Component({\n tag: 'wcs-footer',\n styleUrl: 'footer.scss',\n shadow: true,\n})\nexport class Footer implements ComponentInterface {\n render(): any {\n return (\n <Host>\n <div class=\"container\">\n <div>\n <slot />\n </div>\n <div class=\"end\">\n <div class=\"end-left\">\n <slot name=\"end-left\"/>\n </div>\n <div class=\"end-right\">\n <slot name=\"end-right\"/>\n </div>\n </div>\n </div>\n </Host>\n )\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAY,iwB,MCYLC,EAAM,M,yBACfC,SACI,OACIC,EAACC,EAAI,KACDD,EAAA,OAAKE,MAAM,aACPF,EAAA,WACIA,EAAA,cAEJA,EAAA,OAAKE,MAAM,OACPF,EAAA,OAAKE,MAAM,YACPF,EAAA,QAAMG,KAAK,cAEfH,EAAA,OAAKE,MAAM,aACPF,EAAA,QAAMG,KAAK,iB"}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as s,a as i,h as e,H as a,g as r}from"./p-a2df3a49.js";import{j as h,k as n,r as o,l as d}from"./p-12ac2547.js";const c=":host{--wcs-textarea-icon-color:var(--wcs-text-medium);--wcs-internal-textarea-border-radius-left:var(--wcs-textarea-border-radius-left, var(--wcs-border-radius));--wcs-internal-textarea-border-radius-right:var(--wcs-textarea-border-radius-right, var(--wcs-border-radius));--wcs-internal-textarea-border-width:2px;--wcs-textarea-max-height:unset;display:flex;flex-direction:row;width:100%;border-radius:var(--wcs-internal-textarea-border-radius-left) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-left);background-color:var(--wcs-light);border:var(--wcs-internal-textarea-border-width) solid var(--wcs-light);background-clip:padding-box}:host ::placeholder{font-weight:400;font-style:italic}:host textarea{overflow:auto;flex:1;width:100%;box-sizing:border-box;min-height:var(--wcs-size-m);max-height:var(--wcs-textarea-max-height);background-color:transparent;font-family:var(--wcs-font-sans-serif);color:var(--wcs-primary);font-weight:var(--wcs-font-weight-form-value) !important;border:none;padding:calc(var(--wcs-padding) / 2 - var(--wcs-internal-textarea-border-width) / 2) calc(var(--wcs-padding) - var(--wcs-internal-textarea-border-width));font-size:1rem;line-height:1.5}:host textarea:focus{box-shadow:none;outline:0}:host wcs-mat-icon{position:relative;margin-top:7px;margin-left:8px;margin-right:-8px}:host([disabled]) textarea{color:var(--wcs-text-disabled);cursor:not-allowed}:host([state=error]){border-color:var(--wcs-red) !important}:host(:focus-within){border:dashed var(--wcs-internal-textarea-border-width) var(--wcs-primary)}:host(:focus-within) wcs-mat-icon{color:var(--wcs-primary)}";const l=class{constructor(i){t(this,i);this.wcsChange=s(this,"wcsChange",7);this.wcsInput=s(this,"wcsInput",7);this.wcsBlur=s(this,"wcsBlur",7);this.wcsFocus=s(this,"wcsFocus",7);this.inputId=`wcs-textarea-${u++}`;this.didBlurAfterEdit=false;this.inheritedAttributes={};this.onInput=t=>{if(this.nativeInput){this.value=this.nativeInput.value}this.wcsInput.emit(t)};this.onFocus=t=>{this.hasFocus=true;this.focusChange();if(this.fireFocusEvents){this.wcsFocus.emit(t)}};this.onBlur=t=>{this.hasFocus=false;this.focusChange();if(this.fireFocusEvents){this.wcsBlur.emit(t)}};this.onKeyDown=()=>{this.checkClearOnEdit()};this.fireFocusEvents=true;this.hasFocus=false;this.autocapitalize="none";this.autofocus=false;this.clearOnEdit=false;this.debounce=0;this.disabled=false;this.icon=undefined;this.inputmode=undefined;this.enterkeyhint=undefined;this.maxlength=undefined;this.minlength=undefined;this.name=this.inputId;this.placeholder=undefined;this.readonly=false;this.required=false;this.spellcheck=false;this.state="initial";this.cols=undefined;this.rows=undefined;this.wrap=undefined;this.autoGrow=false;this.value="";this.resize=undefined}debounceChanged(){this.wcsChange=h(this.wcsChange,this.debounce)}valueChanged(){const t=this.nativeInput;const s=this.getValue();if(t&&t.value!==s){t.value=s}this.runAutoGrow();this.wcsChange.emit({value:s})}connectedCallback(){this.debounceChanged();{document.dispatchEvent(new CustomEvent("wcsInputDidLoad",{detail:this.el}))}}disconnectedCallback(){{document.dispatchEvent(new CustomEvent("wcsInputDidUnload",{detail:this.el}))}}componentWillLoad(){this.inheritedAttributes=n(this.el,["title"])}componentDidLoad(){o((()=>this.runAutoGrow()))}runAutoGrow(){const t=this.nativeInput;if(t&&this.autoGrow){i((()=>{t.style.height="auto";t.style.height=t.scrollHeight+"px"}))}}async fitContent(){o((()=>this.runAutoGrow()))}async setFocus(){if(this.nativeInput){this.nativeInput.focus()}}async setBlur(){if(this.nativeInput){this.nativeInput.blur()}}getInputElement(){return Promise.resolve(this.nativeInput)}checkClearOnEdit(){if(!this.clearOnEdit){return}if(this.didBlurAfterEdit&&this.hasValue()){this.value=""}this.didBlurAfterEdit=false}focusChange(){if(this.clearOnEdit&&!this.hasFocus&&this.hasValue()){this.didBlurAfterEdit=true}}hasValue(){return this.getValue()!==""}getValue(){return this.value||""}render(){const t=this.getValue();const s=this.inputId+"-lbl";const i=d(this.el);if(i){i.id=s}const r=Object.assign({},this.resize&&{resize:this.resize});return e(a,{"aria-disabled":this.disabled?"true":null},this.icon?e("wcs-mat-icon",{icon:this.icon,size:"m"}):null,e("textarea",Object.assign({class:"native-textarea","aria-labelledby":i?s:null,ref:t=>this.nativeInput=t,autoCapitalize:this.autocapitalize,autoFocus:this.autofocus,enterKeyHint:this.enterkeyhint,inputMode:this.inputmode,disabled:this.disabled,maxLength:this.maxlength,minLength:this.minlength,name:this.name,placeholder:this.placeholder||"",readOnly:this.readonly,required:this.required,spellcheck:this.spellcheck,cols:this.cols,rows:this.rows,wrap:this.wrap,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,style:r},this.inheritedAttributes),t))}get el(){return r(this)}static get watchers(){return{debounce:["debounceChanged"],value:["valueChanged"]}}};let u=0;l.style=c;export{l as wcs_textarea};
2
+ //# sourceMappingURL=p-26c4c983.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["textareaCss","Textarea","this","inputId","textareaIds","didBlurAfterEdit","inheritedAttributes","onInput","ev","nativeInput","value","wcsInput","emit","onFocus","hasFocus","focusChange","fireFocusEvents","wcsFocus","onBlur","wcsBlur","onKeyDown","checkClearOnEdit","debounceChanged","wcsChange","debounceEvent","debounce","valueChanged","getValue","runAutoGrow","connectedCallback","document","dispatchEvent","CustomEvent","detail","el","disconnectedCallback","componentWillLoad","inheritAttributes","componentDidLoad","raf","autoGrow","readTask","style","height","scrollHeight","async","focus","blur","getInputElement","Promise","resolve","clearOnEdit","hasValue","render","labelId","label","findItemLabel","id","Object","assign","resize","h","Host","disabled","icon","size","class","ref","autoCapitalize","autocapitalize","autoFocus","autofocus","enterKeyHint","enterkeyhint","inputMode","inputmode","maxLength","maxlength","minLength","minlength","name","placeholder","readOnly","readonly","required","spellcheck","cols","rows","wrap"],"sources":["./src/components/textarea/textarea.scss?tag=wcs-textarea&encapsulation=shadow","./src/components/textarea/textarea.tsx"],"sourcesContent":["@import '../../style/focus-outline.scss';\n\n:host {\n --wcs-textarea-icon-color: var(--wcs-text-medium);\n --wcs-internal-textarea-border-radius-left: var(--wcs-textarea-border-radius-left, var(--wcs-border-radius));\n --wcs-internal-textarea-border-radius-right: var(--wcs-textarea-border-radius-right, var(--wcs-border-radius));\n --wcs-internal-textarea-border-width: 2px;\n --wcs-textarea-max-height: unset;\n display: flex;\n flex-direction: row;\n width: 100%;\n border-radius: var(--wcs-internal-textarea-border-radius-left) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-left);\n background-color: var(--wcs-light);\n border: var(--wcs-internal-textarea-border-width) solid var(--wcs-light);\n background-clip: padding-box;\n\n ::placeholder {\n font-weight: 400;\n font-style: italic;\n }\n\n textarea {\n overflow: auto;\n flex: 1;\n width: 100%;\n box-sizing: border-box;\n min-height: var(--wcs-size-m);\n max-height: var(--wcs-textarea-max-height);\n background-color: transparent;\n font-family: var(--wcs-font-sans-serif);\n color: var(--wcs-primary);\n font-weight: var(--wcs-font-weight-form-value) !important;\n border: none;\n // On divise --wcs-internal-input-border-width par deux car la valeur du padding est appliquée en haut et en bas\n padding: calc(calc(var(--wcs-padding) / 2) - calc(var(--wcs-internal-textarea-border-width) / 2)) calc(var(--wcs-padding) - var(--wcs-internal-textarea-border-width));\n font-size: 1rem;\n line-height: 1.5;\n }\n\n textarea:focus {\n box-shadow: none;\n outline: 0;\n }\n\n wcs-mat-icon {\n position: relative;\n margin-top: 7px;\n margin-left: 8px;\n margin-right: -8px;\n }\n}\n\n:host([disabled]) {\n textarea {\n color: var(--wcs-text-disabled);\n cursor: not-allowed;\n }\n}\n\n:host([state=error]) {\n border-color: var(--wcs-red) !important;\n}\n\n:host(:focus-within) {\n border: dashed var(--wcs-internal-textarea-border-width) var(--wcs-primary);\n\n wcs-mat-icon {\n color: var(--wcs-primary);\n }\n}\n","import {\n Component,\n ComponentInterface,\n Method,\n Prop,\n State,\n Watch,\n h,\n Host,\n EventEmitter,\n Element,\n Event,\n Build,\n readTask\n} from '@stencil/core';\nimport { debounceEvent, findItemLabel, inheritAttributes, raf } from '../../utils/helpers';\nimport { TextareaChangeEventDetail } from './textarea-interface';\n\n/**\n * Mainly inspired from Ionic Textarea Component\n *\n * @cssprop --wcs-textarea-max-height - Max height of the text area component\n *\n */\n@Component({\n tag: 'wcs-textarea',\n styleUrl: 'textarea.scss',\n shadow: true,\n})\nexport class Textarea implements ComponentInterface {\n private nativeInput?: HTMLTextAreaElement;\n private inputId = `wcs-textarea-${textareaIds++}`;\n private didBlurAfterEdit = false;\n private inheritedAttributes: { [k: string]: any } = {};\n\n /**\n * This is required for a WebKit bug which requires us to\n * blur and focus an input to properly focus the input in\n * an item with delegatesFocus. It will no longer be needed\n * with iOS 14.\n *\n * @internal\n */\n @Prop() fireFocusEvents = true;\n\n @Element() private el!: HTMLElement;\n\n @State() private hasFocus = false;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n */\n @Prop() autocapitalize = 'none';\n\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `\"password\"`, `false` for all other types.\n */\n @Prop({mutable: true}) clearOnEdit = false;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `wcsChange` event after each keystroke. This also impacts form bindings such as `ngModel` or `v-model`.\n */\n @Prop() debounce = 0;\n\n @Watch('debounce')\n protected debounceChanged() {\n this.wcsChange = debounceEvent(this.wcsChange, this.debounce);\n }\n\n /**\n * If `true`, the user cannot interact with the textarea.\n */\n @Prop() disabled = false;\n\n /**\n * Name of the material icon to add to the input\n */\n @Prop() icon: string;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';\n\n /**\n * A hint to the browser for which enter key to display.\n * Possible values: `\"enter\"`, `\"done\"`, `\"go\"`, `\"next\"`,\n * `\"previous\"`, `\"search\"`, and `\"send\"`.\n */\n @Prop() enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.\n */\n @Prop() minlength?: number;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * Instructional text that shows before the input has a value.\n */\n @Prop() placeholder?: string | null;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop() readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n @Prop() spellcheck = false;\n\n /**\n * Specifies the state of the input. By default the input is in an initial state but you can set it to 'error' state if the data given by the user is not valid.\n */\n @Prop({reflect: true}) state: 'initial' | 'error' = 'initial';\n\n /**\n * The visible width of the text control, in average character widths. If it is specified, it must be a positive integer.\n */\n @Prop() cols?: number;\n\n /**\n * The number of visible text lines for the control.\n */\n @Prop() rows?: number;\n\n /**\n * Indicates how the control wraps text.\n */\n @Prop() wrap?: 'hard' | 'soft' | 'off';\n\n /**\n * If `true`, the element height will increase based on the value.\n */\n @Prop() autoGrow = false;\n\n /**\n * The value of the textarea.\n */\n @Prop({mutable: true}) value?: string | null = '';\n\n /**\n * Indicates how the textarea should be resizable.\n * Possible values 'both' | 'none' | 'vertical' | 'horizontal'\n */\n @Prop({reflect: true}) resize?: 'both' | 'none' | 'vertical' | 'horizontal';\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n const nativeInput = this.nativeInput;\n const value = this.getValue();\n if (nativeInput && nativeInput.value !== value) {\n nativeInput.value = value;\n }\n this.runAutoGrow();\n this.wcsChange.emit({value});\n }\n\n /**\n * Emitted when the input value has changed.\n */\n @Event() wcsChange!: EventEmitter<TextareaChangeEventDetail>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() wcsInput!: EventEmitter<KeyboardEvent>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() wcsBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() wcsFocus!: EventEmitter<FocusEvent>;\n\n connectedCallback() {\n this.debounceChanged();\n if (Build.isBrowser) {\n document.dispatchEvent(new CustomEvent('wcsInputDidLoad', {\n detail: this.el\n }));\n }\n }\n\n disconnectedCallback() {\n if (Build.isBrowser) {\n document.dispatchEvent(new CustomEvent('wcsInputDidUnload', {\n detail: this.el\n }));\n }\n }\n\n componentWillLoad() {\n this.inheritedAttributes = inheritAttributes(this.el, ['title']);\n }\n\n componentDidLoad() {\n raf(() => this.runAutoGrow());\n }\n\n private runAutoGrow() {\n const nativeInput = this.nativeInput;\n if (nativeInput && this.autoGrow) {\n readTask(() => {\n nativeInput.style.height = 'auto';\n nativeInput.style.height = nativeInput.scrollHeight + 'px';\n });\n }\n }\n\n /**\n * This method make the textarea automatically adopt the size of the content without a scroll bar\n */\n @Method()\n async fitContent() {\n raf(() => this.runAutoGrow());\n }\n\n /**\n * Sets focus on the native `textarea` in `wcs-textarea`. Use this method instead of the global\n * `textarea.focus()`.\n */\n @Method()\n async setFocus() {\n if (this.nativeInput) {\n this.nativeInput.focus();\n }\n }\n\n /**\n * Sets blur on the native `textarea` in `wcs-textarea`. Use this method instead of the global\n * `textarea.blur()`.\n * @internal\n */\n @Method()\n async setBlur() {\n if (this.nativeInput) {\n this.nativeInput.blur();\n }\n }\n\n /**\n * Returns the native `<textarea>` element used under the hood.\n */\n @Method()\n getInputElement(): Promise<HTMLTextAreaElement> {\n // tslint:disable-next-line:no-non-null-assertion\n return Promise.resolve(this.nativeInput!);\n }\n\n /**\n * Check if we need to clear the text input if clearOnEdit is enabled\n */\n private checkClearOnEdit() {\n if (!this.clearOnEdit) {\n return;\n }\n\n // Did the input value change after it was blurred and edited?\n if (this.didBlurAfterEdit && this.hasValue()) {\n // Clear the input\n this.value = '';\n }\n\n // Reset the flag\n this.didBlurAfterEdit = false;\n }\n\n private focusChange() {\n // If clearOnEdit is enabled and the input blurred but has a value, set a flag\n if (this.clearOnEdit && !this.hasFocus && this.hasValue()) {\n this.didBlurAfterEdit = true;\n }\n }\n\n private hasValue(): boolean {\n return this.getValue() !== '';\n }\n\n private getValue(): string {\n return this.value || '';\n }\n\n private onInput = (ev: Event) => {\n if (this.nativeInput) {\n this.value = this.nativeInput.value;\n }\n this.wcsInput.emit(ev as KeyboardEvent);\n }\n\n private onFocus = (ev: FocusEvent) => {\n this.hasFocus = true;\n this.focusChange();\n\n if (this.fireFocusEvents) {\n this.wcsFocus.emit(ev);\n }\n }\n\n private onBlur = (ev: FocusEvent) => {\n this.hasFocus = false;\n this.focusChange();\n\n if (this.fireFocusEvents) {\n this.wcsBlur.emit(ev);\n }\n }\n\n private onKeyDown = () => {\n this.checkClearOnEdit();\n }\n\n render() {\n const value = this.getValue();\n const labelId = this.inputId + '-lbl';\n const label = findItemLabel(this.el);\n if (label) {\n label.id = labelId;\n }\n const style = {\n ...(this.resize && {'resize': this.resize})\n }\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n >\n {this.icon ? (<wcs-mat-icon icon={this.icon} size=\"m\"></wcs-mat-icon>) : null}\n <textarea\n class=\"native-textarea\"\n aria-labelledby={label ? labelId : null}\n ref={el => this.nativeInput = el}\n autoCapitalize={this.autocapitalize}\n autoFocus={this.autofocus}\n enterKeyHint={this.enterkeyhint}\n inputMode={this.inputmode}\n disabled={this.disabled}\n maxLength={this.maxlength}\n minLength={this.minlength}\n name={this.name}\n placeholder={this.placeholder || ''}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n cols={this.cols}\n rows={this.rows}\n wrap={this.wrap}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onKeyDown={this.onKeyDown}\n style={style}\n {...this.inheritedAttributes}\n >\n {value}\n </textarea>\n </Host>\n );\n }\n}\n\nlet textareaIds = 0;\n"],"mappings":"gIAAA,MAAMA,EAAc,oqD,MC6BPC,EAAQ,M,qKAETC,KAAAC,QAAU,gBAAgBC,MAC1BF,KAAAG,iBAAmB,MACnBH,KAAAI,oBAA4C,GAsR5CJ,KAAAK,QAAWC,IACf,GAAIN,KAAKO,YAAa,CAClBP,KAAKQ,MAAQR,KAAKO,YAAYC,K,CAElCR,KAAKS,SAASC,KAAKJ,EAAoB,EAGnCN,KAAAW,QAAWL,IACfN,KAAKY,SAAW,KAChBZ,KAAKa,cAEL,GAAIb,KAAKc,gBAAiB,CACtBd,KAAKe,SAASL,KAAKJ,E,GAInBN,KAAAgB,OAAUV,IACdN,KAAKY,SAAW,MAChBZ,KAAKa,cAEL,GAAIb,KAAKc,gBAAiB,CACtBd,KAAKiB,QAAQP,KAAKJ,E,GAIlBN,KAAAkB,UAAY,KAChBlB,KAAKmB,kBAAkB,E,qBAtSD,K,cAIE,M,oBAKH,O,eAKL,M,iBAKiB,M,cAKlB,E,cAUA,M,qIAkCInB,KAAKC,Q,yCAUT,M,cAKA,M,gBAKE,M,WAK+B,U,0EAoBjC,M,WAK4B,G,sBA3FrCmB,kBACNpB,KAAKqB,UAAYC,EAActB,KAAKqB,UAAWrB,KAAKuB,S,CAsG9CC,eACN,MAAMjB,EAAcP,KAAKO,YACzB,MAAMC,EAAQR,KAAKyB,WACnB,GAAIlB,GAAeA,EAAYC,QAAUA,EAAO,CAC5CD,EAAYC,MAAQA,C,CAExBR,KAAK0B,cACL1B,KAAKqB,UAAUX,KAAK,CAACF,S,CAuBzBmB,oBACI3B,KAAKoB,kBACgB,CACjBQ,SAASC,cAAc,IAAIC,YAAY,kBAAmB,CACtDC,OAAQ/B,KAAKgC,K,EAKzBC,uBACyB,CACjBL,SAASC,cAAc,IAAIC,YAAY,oBAAqB,CACxDC,OAAQ/B,KAAKgC,K,EAKzBE,oBACIlC,KAAKI,oBAAsB+B,EAAkBnC,KAAKgC,GAAI,CAAC,S,CAG3DI,mBACIC,GAAI,IAAMrC,KAAK0B,e,CAGXA,cACJ,MAAMnB,EAAcP,KAAKO,YACzB,GAAIA,GAAeP,KAAKsC,SAAU,CAC9BC,GAAS,KACLhC,EAAYiC,MAAMC,OAAS,OAC3BlC,EAAYiC,MAAMC,OAASlC,EAAYmC,aAAe,IAAI,G,EAStEC,mBACIN,GAAI,IAAMrC,KAAK0B,e,CAQnBiB,iBACI,GAAI3C,KAAKO,YAAa,CAClBP,KAAKO,YAAYqC,O,EAUzBD,gBACI,GAAI3C,KAAKO,YAAa,CAClBP,KAAKO,YAAYsC,M,EAQzBC,kBAEI,OAAOC,QAAQC,QAAQhD,KAAKO,Y,CAMxBY,mBACJ,IAAKnB,KAAKiD,YAAa,CACnB,M,CAIJ,GAAIjD,KAAKG,kBAAoBH,KAAKkD,WAAY,CAE1ClD,KAAKQ,MAAQ,E,CAIjBR,KAAKG,iBAAmB,K,CAGpBU,cAEJ,GAAIb,KAAKiD,cAAgBjD,KAAKY,UAAYZ,KAAKkD,WAAY,CACvDlD,KAAKG,iBAAmB,I,EAIxB+C,WACJ,OAAOlD,KAAKyB,aAAe,E,CAGvBA,WACJ,OAAOzB,KAAKQ,OAAS,E,CAgCzB2C,SACI,MAAM3C,EAAQR,KAAKyB,WACnB,MAAM2B,EAAUpD,KAAKC,QAAU,OAC/B,MAAMoD,EAAQC,EAActD,KAAKgC,IACjC,GAAIqB,EAAO,CACPA,EAAME,GAAKH,C,CAEf,MAAMZ,EAAKgB,OAAAC,OAAA,GACHzD,KAAK0D,QAAU,CAACA,OAAU1D,KAAK0D,SAGvC,OACIC,EAACC,EAAI,iBACc5D,KAAK6D,SAAW,OAAS,MAEvC7D,KAAK8D,KAAQH,EAAA,gBAAcG,KAAM9D,KAAK8D,KAAMC,KAAK,MAAuB,KACzEJ,EAAA,WAAAH,OAAAC,OAAA,CACIO,MAAM,kBAAiB,kBACNX,EAAQD,EAAU,KACnCa,IAAKjC,GAAMhC,KAAKO,YAAcyB,EAC9BkC,eAAgBlE,KAAKmE,eACrBC,UAAWpE,KAAKqE,UAChBC,aAActE,KAAKuE,aACnBC,UAAWxE,KAAKyE,UAChBZ,SAAU7D,KAAK6D,SACfa,UAAW1E,KAAK2E,UAChBC,UAAW5E,KAAK6E,UAChBC,KAAM9E,KAAK8E,KACXC,YAAa/E,KAAK+E,aAAe,GACjCC,SAAUhF,KAAKiF,SACfC,SAAUlF,KAAKkF,SACfC,WAAYnF,KAAKmF,WACjBC,KAAMpF,KAAKoF,KACXC,KAAMrF,KAAKqF,KACXC,KAAMtF,KAAKsF,KACXjF,QAASL,KAAKK,QACdW,OAAQhB,KAAKgB,OACbL,QAASX,KAAKW,QACdO,UAAWlB,KAAKkB,UAChBsB,MAAOA,GACHxC,KAAKI,qBAEhBI,G,6GAOb,IAAIN,EAAc,E"}
@@ -0,0 +1,16 @@
1
+ import{h as t,r,c as e,H as i,g as n}from"./p-a2df3a49.js";import{l as s}from"./p-adef7aaf.js";import{S as a}from"./p-d6c3e615.js";import{m as o,l as c,a as f,n as u,i as l,o as d,p as h,q as p,s as v,t as m,e as y,b as g,u as w,v as b}from"./p-12ac2547.js";import{c as x}from"./p-314d3097.js";import{M as O}from"./p-04ad2b73.js";
2
+ /*! *****************************************************************************
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
15
+ ***************************************************************************** */var S=function(){S=Object.assign||function t(r){for(var e,i=1,n=arguments.length;i<n;i++){e=arguments[i];for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s))r[s]=e[s]}return r};return S.apply(this,arguments)};function k(t,r){var e={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&r.indexOf(i)<0)e[i]=t[i];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var n=0,i=Object.getOwnPropertySymbols(t);n<i.length;n++){if(r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n]))e[i[n]]=t[i[n]]}return e}function j(t){var r=typeof Symbol==="function"&&Symbol.iterator,e=r&&t[r],i=0;if(e)return e.call(t);if(t&&typeof t.length==="number")return{next:function(){if(t&&i>=t.length)t=void 0;return{value:t&&t[i++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function z(t,r){var e=typeof Symbol==="function"&&t[Symbol.iterator];if(!e)return t;var i=e.call(t),n,s=[],a;try{while((r===void 0||r-- >0)&&!(n=i.next()).done)s.push(n.value)}catch(t){a={error:t}}finally{try{if(n&&!n.done&&(e=i["return"]))e.call(i)}finally{if(a)throw a.error}}return s}function E(t,r,e){if(e||arguments.length===2)for(var i=0,n=r.length,s;i<n;i++){if(s||!(i in r)){if(!s)s=Array.prototype.slice.call(r,0,i);s[i]=r[i]}}return t.concat(s||Array.prototype.slice.call(r))}var C;(function(t){t["Start"]="xstate.start";t["Stop"]="xstate.stop";t["Raise"]="xstate.raise";t["Send"]="xstate.send";t["Cancel"]="xstate.cancel";t["NullEvent"]="";t["Assign"]="xstate.assign";t["After"]="xstate.after";t["DoneState"]="done.state";t["DoneInvoke"]="done.invoke";t["Log"]="xstate.log";t["Init"]="xstate.init";t["Invoke"]="xstate.invoke";t["ErrorExecution"]="error.execution";t["ErrorCommunication"]="error.communication";t["ErrorPlatform"]="error.platform";t["ErrorCustom"]="xstate.error";t["Update"]="xstate.update";t["Pure"]="xstate.pure";t["Choose"]="xstate.choose"})(C||(C={}));var _;(function(t){t["Parent"]="#_parent";t["Internal"]="#_internal"})(_||(_={}));var T=C.Start;var L=C.Stop;var N=C.Raise;var A=C.Send;var I=C.Cancel;var M=C.NullEvent;var D=C.Assign;var P=C.Log;var V=C.Init;var B=C.Invoke;var $=C.ErrorPlatform;var F=C.ErrorCustom;var J=C.Update;var U=C.Choose;var W=C.Pure;var K=".";var R={};var q="xstate.guard";var H="";var G;function Q(t,r,e){if(e===void 0){e=K}var i=tt(t,e);var n=tt(r,e);if(bt(n)){if(bt(i)){return n===i}return false}if(bt(i)){return i in n}return Object.keys(i).every((function(t){if(!(t in n)){return false}return Q(i[t],n[t])}))}function X(t){try{return bt(t)||typeof t==="number"?"".concat(t):t.type}catch(t){throw new Error("Events must be strings or objects with a string event.type property.")}}function Y(t,r){try{if(gt(t)){return t}return t.toString().split(r)}catch(r){throw new Error("'".concat(t,"' is not a valid state path."))}}function Z(t){return typeof t==="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function tt(t,r){if(Z(t)){return t.value}if(gt(t)){return rt(t)}if(typeof t!=="string"){return t}var e=Y(t,r);return rt(e)}function rt(t){if(t.length===1){return t[0]}var r={};var e=r;for(var i=0;i<t.length-1;i++){if(i===t.length-2){e[t[i]]=t[i+1]}else{e[t[i]]={};e=e[t[i]]}}return r}function et(t,r){var e={};var i=Object.keys(t);for(var n=0;n<i.length;n++){var s=i[n];e[s]=r(t[s],s,t,n)}return e}function it(t,r,e){var i,n;var s={};try{for(var a=j(Object.keys(t)),o=a.next();!o.done;o=a.next()){var c=o.value;var f=t[c];if(!e(f)){continue}s[c]=r(f,c,t)}}catch(t){i={error:t}}finally{try{if(o&&!o.done&&(n=a.return))n.call(a)}finally{if(i)throw i.error}}return s}var nt=function(t){return function(r){var e,i;var n=r;try{for(var s=j(t),a=s.next();!a.done;a=s.next()){var o=a.value;n=n[o]}}catch(t){e={error:t}}finally{try{if(a&&!a.done&&(i=s.return))i.call(s)}finally{if(e)throw e.error}}return n}};function st(t,r){return function(e){var i,n;var s=e;try{for(var a=j(t),o=a.next();!o.done;o=a.next()){var c=o.value;s=s[r][c]}}catch(t){i={error:t}}finally{try{if(o&&!o.done&&(n=a.return))n.call(a)}finally{if(i)throw i.error}}return s}}function at(t){if(!t){return[[]]}if(bt(t)){return[[t]]}var r=ot(Object.keys(t).map((function(r){var e=t[r];if(typeof e!=="string"&&(!e||!Object.keys(e).length)){return[[r]]}return at(t[r]).map((function(t){return[r].concat(t)}))})));return r}function ot(t){var r;return(r=[]).concat.apply(r,E([],z(t),false))}function ct(t){if(gt(t)){return t}return[t]}function ft(t){if(t===undefined){return[]}return ct(t)}function ut(t,r,e){var i,n;if(wt(t)){return t(r,e.data)}var s={};try{for(var a=j(Object.keys(t)),o=a.next();!o.done;o=a.next()){var c=o.value;var f=t[c];if(wt(f)){s[c]=f(r,e.data)}else{s[c]=f}}}catch(t){i={error:t}}finally{try{if(o&&!o.done&&(n=a.return))n.call(a)}finally{if(i)throw i.error}}return s}function lt(t){return/^(done|error)\./.test(t)}function dt(t){if(t instanceof Promise){return true}if(t!==null&&(wt(t)||typeof t==="object")&&wt(t.then)){return true}return false}function ht(t){return t!==null&&typeof t==="object"&&"transition"in t&&typeof t.transition==="function"}function pt(t,r){var e,i;var n=z([[],[]],2),s=n[0],a=n[1];try{for(var o=j(t),c=o.next();!c.done;c=o.next()){var f=c.value;if(r(f)){s.push(f)}else{a.push(f)}}}catch(t){e={error:t}}finally{try{if(c&&!c.done&&(i=o.return))i.call(o)}finally{if(e)throw e.error}}return[s,a]}function vt(t,r){return et(t.states,(function(t,e){if(!t){return undefined}var i=(bt(r)?undefined:r[e])||(t?t.current:undefined);if(!i){return undefined}return{current:i,states:vt(t,i)}}))}function mt(t,r){return{current:r,states:vt(t,r)}}function yt(t,r,e,i){var n=t?e.reduce((function(t,e){var n,s;var a=e.assignment;var o={state:i,action:e,_event:r};var c={};if(wt(a)){c=a(t,r.data,o)}else{try{for(var f=j(Object.keys(a)),u=f.next();!u.done;u=f.next()){var l=u.value;var d=a[l];c[l]=wt(d)?d(t,r.data,o):d}}catch(t){n={error:t}}finally{try{if(u&&!u.done&&(s=f.return))s.call(f)}finally{if(n)throw n.error}}}return Object.assign({},t,c)}),t):t;return n}function gt(t){return Array.isArray(t)}function wt(t){return typeof t==="function"}function bt(t){return typeof t==="string"}function xt(t,r){if(!t){return undefined}if(bt(t)){return{type:q,name:t,predicate:r?r[t]:undefined}}if(wt(t)){return{type:q,name:t.name,predicate:t}}return t}function Ot(t){try{return"subscribe"in t&&wt(t.subscribe)}catch(t){return false}}var St=function(){return typeof Symbol==="function"&&Symbol.observable||"@@observable"}();G={},G[St]=function(){return this},G[Symbol.observable]=function(){return this},G;function kt(t){return!!t&&"__xstatenode"in t}function jt(t){return!!t&&typeof t.send==="function"}function zt(t,r){if(bt(t)||typeof t==="number"){return S({type:t},r)}return t}function Et(t,r){if(!bt(t)&&"$$type"in t&&t.$$type==="scxml"){return t}var e=zt(t);return S({name:e.type,data:e,$$type:"scxml",type:"external"},r)}function Ct(t,r){var e=ct(r).map((function(r){if(typeof r==="undefined"||typeof r==="string"||kt(r)){return{target:r,event:t}}return S(S({},r),{event:t})}));return e}function _t(t){if(t===undefined||t===H){return undefined}return ft(t)}function Tt(t,r,e,i,n){var s=t.options.guards;var a={state:n,cond:r,_event:i};if(r.type===q){return((s===null||s===void 0?void 0:s[r.name])||r.predicate)(e,i.data,a)}var o=s===null||s===void 0?void 0:s[r.type];if(!o){throw new Error("Guard '".concat(r.type,"' is not implemented on machine '").concat(t.id,"'."))}return o(e,i.data,a)}function Lt(t){if(typeof t==="string"){return{type:t}}return t}function Nt(t,r,e){var i=function(){};var n=typeof t==="object";var s=n?t:null;return{next:((n?t.next:t)||i).bind(s),error:((n?t.error:r)||i).bind(s),complete:((n?t.complete:e)||i).bind(s)}}function At(t,r){return"".concat(t,":invocation[").concat(r,"]")}function It(t){return(t.type===N||t.type===A&&t.to===_.Internal)&&typeof t.delay!=="number"}var Mt=Et({type:V});function Dt(t,r){return r?r[t]||undefined:undefined}function Pt(t,r){var e;if(bt(t)||typeof t==="number"){var i=Dt(t,r);if(wt(i)){e={type:t,exec:i}}else if(i){e=i}else{e={type:t,exec:undefined}}}else if(wt(t)){e={type:t.name||t.toString(),exec:t}}else{var i=Dt(t.type,r);if(wt(i)){e=S(S({},t),{exec:i})}else if(i){var n=i.type||t.type;e=S(S(S({},i),t),{type:n})}else{e=t}}return e}var Vt=function(t,r){if(!t){return[]}var e=gt(t)?t:[t];return e.map((function(t){return Pt(t,r)}))};function Bt(t){var r=Pt(t);return S(S({id:bt(t)?t:r.id},r),{type:r.type})}function $t(t,r){return{type:N,event:typeof t==="function"?t:zt(t),delay:r?r.delay:undefined,id:r===null||r===void 0?void 0:r.id}}function Ft(t,r,e,i){var n={_event:e};var s=Et(wt(t.event)?t.event(r,e.data,n):t.event);var a;if(bt(t.delay)){var o=i&&i[t.delay];a=wt(o)?o(r,e.data,n):o}else{a=wt(t.delay)?t.delay(r,e.data,n):t.delay}return S(S({},t),{type:N,_event:s,delay:a})}function Jt(t,r){return{to:r?r.to:undefined,type:A,event:wt(t)?t:zt(t),delay:r?r.delay:undefined,id:r&&r.id!==undefined?r.id:wt(t)?t.name:X(t)}}function Ut(t,r,e,i){var n={_event:e};var s=Et(wt(t.event)?t.event(r,e.data,n):t.event);var a;if(bt(t.delay)){var o=i&&i[t.delay];a=wt(o)?o(r,e.data,n):o}else{a=wt(t.delay)?t.delay(r,e.data,n):t.delay}var c=wt(t.to)?t.to(r,e.data,n):t.to;return S(S({},t),{to:c,_event:s,event:s.data,delay:a})}var Wt=function(t,r,e){return S(S({},t),{value:bt(t.expr)?t.expr:t.expr(r,e.data,{_event:e})})};var Kt=function(t){return{type:I,sendId:t}};function Rt(t){var r=Bt(t);return{type:C.Start,activity:r,exec:undefined}}function qt(t){var r=wt(t)?t:Bt(t);return{type:C.Stop,activity:r,exec:undefined}}function Ht(t,r,e){var i=wt(t.activity)?t.activity(r,e.data):t.activity;var n=typeof i==="string"?{id:i}:i;var s={type:C.Stop,activity:n};return s}function Gt(t,r){var e=r?"#".concat(r):"";return"".concat(C.After,"(").concat(t,")").concat(e)}function Qt(t,r){var e="".concat(C.DoneState,".").concat(t);var i={type:e,data:r};i.toString=function(){return e};return i}function Xt(t,r){var e="".concat(C.DoneInvoke,".").concat(t);var i={type:e,data:r};i.toString=function(){return e};return i}function Yt(t,r){var e="".concat(C.ErrorPlatform,".").concat(t);var i={type:e,data:r};i.toString=function(){return e};return i}var Zt=function(t){var r,e;var i=[];try{for(var n=j(t),s=n.next();!s.done;s=n.next()){var a=s.value;var o=0;while(o<a.actions.length){if(a.actions[o].type===D){i.push(a.actions[o]);a.actions.splice(o,1);continue}o++}}}catch(t){r={error:t}}finally{try{if(s&&!s.done&&(e=n.return))e.call(n)}finally{if(r)throw r.error}}return i};function tr(t,r,e,i,n,s,a){if(a===void 0){a=false}var o=a?[]:Zt(n);var c=o.length?yt(e,i,o,r):e;var f=a?[e]:undefined;var u=[];function l(n,o){var l;switch(o.type){case N:{var d=Ft(o,c,i,t.options.delays);if(s&&typeof d.delay==="number"){s(d,c,i)}return d}case A:var h=Ut(o,c,i,t.options.delays);if(s&&h.to!==_.Internal){if(n==="entry"){u.push(h)}else{s(h,c,i)}}return h;case P:{var p=Wt(o,c,i);s===null||s===void 0?void 0:s(p,c,i);return p}case U:{var v=o;var m=(l=v.conds.find((function(e){var n=xt(e.cond,t.options.guards);return!n||Tt(t,n,c,i,!s?r:undefined)})))===null||l===void 0?void 0:l.actions;if(!m){return[]}var y=z(tr(t,r,c,i,[{type:n,actions:Vt(ft(m),t.options.actions)}],s,a),2),g=y[0],w=y[1];c=w;f===null||f===void 0?void 0:f.push(c);return g}case W:{var m=o.get(c,i.data);if(!m){return[]}var b=z(tr(t,r,c,i,[{type:n,actions:Vt(ft(m),t.options.actions)}],s,a),2),x=b[0],O=b[1];c=O;f===null||f===void 0?void 0:f.push(c);return x}case L:{var p=Ht(o,c,i);s===null||s===void 0?void 0:s(p,e,i);return p}case D:{c=yt(c,i,[o],!s?r:undefined);f===null||f===void 0?void 0:f.push(c);break}default:var k=Pt(o,t.options.actions);var j=k.exec;if(s){s(k,c,i)}else if(j&&f){var C=f.length-1;var T=S(S({},k),{exec:function(t){var r=[];for(var e=1;e<arguments.length;e++){r[e-1]=arguments[e]}j.apply(void 0,E([f[C]],z(r),false))}});k=T}return k}}function d(t){var r,e;var n=[];try{for(var a=j(t.actions),o=a.next();!o.done;o=a.next()){var f=o.value;var d=l(t.type,f);if(d){n=n.concat(d)}}}catch(t){r={error:t}}finally{try{if(o&&!o.done&&(e=a.return))e.call(a)}finally{if(r)throw r.error}}u.forEach((function(t){s(t,c,i)}));u.length=0;return n}var h=ot(n.map(d));return[h,c]}var rr=function(t,r){var e=r(t);return e};function er(t){var r;return r={id:t,send:function(){return void 0},subscribe:function(){return{unsubscribe:function(){return void 0}}},getSnapshot:function(){return undefined},toJSON:function(){return{id:t}}},r[St]=function(){return this},r}function ir(t,r,e,i){var n;var s=Lt(t.src);var a=(n=r===null||r===void 0?void 0:r.options.services)===null||n===void 0?void 0:n[s.type];var o=t.data?ut(t.data,e,i):undefined;var c=a?nr(a,t.id,o):er(t.id);c.meta=t;return c}function nr(t,r,e){var i=er(r);i.deferred=true;if(kt(t)){var n=i.state=rr(undefined,(function(){return(e?t.withContext(e):t).initialState}));i.getSnapshot=function(){return n}}return i}function sr(t){try{return typeof t.send==="function"}catch(t){return false}}function ar(t){return sr(t)&&"id"in t}function or(t){var r;return S((r={subscribe:function(){return{unsubscribe:function(){return void 0}}},id:"anonymous",getSnapshot:function(){return undefined}},r[St]=function(){return this},r),t)}var cr=function(t){return t.type==="atomic"||t.type==="final"};function fr(t){return Object.keys(t.states).map((function(r){return t.states[r]}))}function ur(t){return fr(t).filter((function(t){return t.type!=="history"}))}function lr(t){var r=[t];if(cr(t)){return r}return r.concat(ot(ur(t).map(lr)))}function dr(t,r){var e,i,n,s,a,o,c,f;var u=new Set(t);var l=pr(u);var d=new Set(r);try{for(var h=j(d),p=h.next();!p.done;p=h.next()){var v=p.value;var m=v.parent;while(m&&!d.has(m)){d.add(m);m=m.parent}}}catch(t){e={error:t}}finally{try{if(p&&!p.done&&(i=h.return))i.call(h)}finally{if(e)throw e.error}}var y=pr(d);try{for(var g=j(d),w=g.next();!w.done;w=g.next()){var v=w.value;if(v.type==="compound"&&(!y.get(v)||!y.get(v).length)){if(l.get(v)){l.get(v).forEach((function(t){return d.add(t)}))}else{v.initialStateNodes.forEach((function(t){return d.add(t)}))}}else{if(v.type==="parallel"){try{for(var b=(a=void 0,j(ur(v))),x=b.next();!x.done;x=b.next()){var O=x.value;if(!d.has(O)){d.add(O);if(l.get(O)){l.get(O).forEach((function(t){return d.add(t)}))}else{O.initialStateNodes.forEach((function(t){return d.add(t)}))}}}}catch(t){a={error:t}}finally{try{if(x&&!x.done&&(o=b.return))o.call(b)}finally{if(a)throw a.error}}}}}}catch(t){n={error:t}}finally{try{if(w&&!w.done&&(s=g.return))s.call(g)}finally{if(n)throw n.error}}try{for(var S=j(d),k=S.next();!k.done;k=S.next()){var v=k.value;var m=v.parent;while(m&&!d.has(m)){d.add(m);m=m.parent}}}catch(t){c={error:t}}finally{try{if(k&&!k.done&&(f=S.return))f.call(S)}finally{if(c)throw c.error}}return d}function hr(t,r){var e=r.get(t);if(!e){return{}}if(t.type==="compound"){var i=e[0];if(i){if(cr(i)){return i.key}}else{return{}}}var n={};e.forEach((function(t){n[t.key]=hr(t,r)}));return n}function pr(t){var r,e;var i=new Map;try{for(var n=j(t),s=n.next();!s.done;s=n.next()){var a=s.value;if(!i.has(a)){i.set(a,[])}if(a.parent){if(!i.has(a.parent)){i.set(a.parent,[])}i.get(a.parent).push(a)}}}catch(t){r={error:t}}finally{try{if(s&&!s.done&&(e=n.return))e.call(n)}finally{if(r)throw r.error}}return i}function vr(t,r){var e=dr([t],r);return hr(t,pr(e))}function mr(t,r){if(Array.isArray(t)){return t.some((function(t){return t===r}))}if(t instanceof Set){return t.has(r)}return false}function yr(t){return E([],z(new Set(ot(E([],z(t.map((function(t){return t.ownEvents}))),false)))),false)}function gr(t,r){if(r.type==="compound"){return ur(r).some((function(r){return r.type==="final"&&mr(t,r)}))}if(r.type==="parallel"){return ur(r).every((function(r){return gr(t,r)}))}return false}function wr(t){if(t===void 0){t=[]}return t.reduce((function(t,r){if(r.meta!==undefined){t[r.id]=r.meta}return t}),{})}function br(t){return new Set(ot(t.map((function(t){return t.tags}))))}function xr(t,r){if(t===r){return true}if(t===undefined||r===undefined){return false}if(bt(t)||bt(r)){return t===r}var e=Object.keys(t);var i=Object.keys(r);return e.length===i.length&&e.every((function(e){return xr(t[e],r[e])}))}function Or(t){if(typeof t!=="object"||t===null){return false}return"value"in t&&"_event"in t}function Sr(t,r){var e=t.exec;var i=S(S({},t),{exec:e!==undefined?function(){return e(r.context,r.event,{action:t,state:r,_event:r._event})}:undefined});return i}var kr=function(){function t(t){var r=this;var e;this.actions=[];this.activities=R;this.meta={};this.events=[];this.value=t.value;this.context=t.context;this._event=t._event;this._sessionid=t._sessionid;this.event=this._event.data;this.historyValue=t.historyValue;this.history=t.history;this.actions=t.actions||[];this.activities=t.activities||R;this.meta=wr(t.configuration);this.events=t.events||[];this.matches=this.matches.bind(this);this.toStrings=this.toStrings.bind(this);this.configuration=t.configuration;this.transitions=t.transitions;this.children=t.children;this.done=!!t.done;this.tags=(e=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&e!==void 0?e:new Set;this.machine=t.machine;Object.defineProperty(this,"nextEvents",{get:function(){return yr(r.configuration)}})}t.from=function(r,e){if(r instanceof t){if(r.context!==e){return new t({value:r.value,context:e,_event:r._event,_sessionid:null,historyValue:r.historyValue,history:r.history,actions:[],activities:r.activities,meta:{},events:[],configuration:[],transitions:[],children:{}})}return r}var i=Mt;return new t({value:r,context:e,_event:i,_sessionid:null,historyValue:undefined,history:undefined,actions:[],activities:undefined,meta:undefined,events:[],configuration:[],transitions:[],children:{}})};t.create=function(r){return new t(r)};t.inert=function(r,e){if(r instanceof t){if(!r.actions.length){return r}var i=Mt;return new t({value:r.value,context:e,_event:i,_sessionid:null,historyValue:r.historyValue,history:r.history,activities:r.activities,configuration:r.configuration,transitions:[],children:{}})}return t.from(r,e)};t.prototype.toStrings=function(t,r){var e=this;if(t===void 0){t=this.value}if(r===void 0){r="."}if(bt(t)){return[t]}var i=Object.keys(t);return i.concat.apply(i,E([],z(i.map((function(i){return e.toStrings(t[i],r).map((function(t){return i+r+t}))}))),false))};t.prototype.toJSON=function(){var t=this;var r=t.tags;var e=k(t,["configuration","transitions","tags","machine"]);return S(S({},e),{tags:Array.from(r)})};t.prototype.matches=function(t){return Q(t,this.value)};t.prototype.hasTag=function(t){return this.tags.has(t)};t.prototype.can=function(t){var r;var e=(r=this.machine)===null||r===void 0?void 0:r.getTransitionData(this,t);return!!(e===null||e===void 0?void 0:e.transitions.length)&&e.transitions.some((function(t){return t.target!==undefined||t.actions.length}))};return t}();var jr={deferEvents:false};var zr=function(){function t(t){this.processingEvent=false;this.queue=[];this.initialized=false;this.options=S(S({},jr),t)}t.prototype.initialize=function(t){this.initialized=true;if(t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()};t.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0){throw new Error("Event queue should be empty when it is not processing events")}this.process(t);this.flushEvents()};t.prototype.clear=function(){this.queue=[]};t.prototype.flushEvents=function(){var t=this.queue.shift();while(t){this.process(t);t=this.queue.shift()}};t.prototype.process=function(t){this.processingEvent=true;try{t()}catch(t){this.clear();throw t}finally{this.processingEvent=false}};return t}();var Er=new Map;var Cr=0;var _r={bookId:function(){return"x:".concat(Cr++)},register:function(t,r){Er.set(t,r);return t},get:function(t){return Er.get(t)},free:function(t){Er.delete(t)}};function Tr(){if(typeof globalThis!=="undefined"){return globalThis}if(typeof self!=="undefined"){return self}if(typeof window!=="undefined"){return window}if(typeof global!=="undefined"){return global}}function Lr(){var t=Tr();if(t&&"__xstate__"in t){return t.__xstate__}return undefined}function Nr(t){if(!Tr()){return}var r=Lr();if(r){r.register(t)}}function Ar(t,r){if(r===void 0){r={}}var e=t.initialState;var i=new Set;var n=[];var s=false;var a=function(){if(s){return}s=true;while(n.length>0){var r=n.shift();e=t.transition(e,r,c);i.forEach((function(t){return t.next(e)}))}s=false};var o=or({id:r.id,send:function(t){n.push(t);a()},getSnapshot:function(){return e},subscribe:function(t,r,n){var s=Nt(t,r,n);i.add(s);s.next(e);return{unsubscribe:function(){i.delete(s)}}}});var c={parent:r.parent,self:o,id:r.id||"anonymous",observers:i};e=t.start?t.start(c):e;return o}var Ir={sync:false,autoForward:false};var Mr;(function(t){t[t["NotStarted"]=0]="NotStarted";t[t["Running"]=1]="Running";t[t["Stopped"]=2]="Stopped"})(Mr||(Mr={}));var Dr=function(){function t(r,e){if(e===void 0){e=t.defaultOptions}var i=this;this.machine=r;this.delayedEventsMap={};this.listeners=new Set;this.contextListeners=new Set;this.stopListeners=new Set;this.doneListeners=new Set;this.eventListeners=new Set;this.sendListeners=new Set;this.initialized=false;this.status=Mr.NotStarted;this.children=new Map;this.forwardTo=new Set;this._outgoingQueue=[];this.init=this.start;this.send=function(t,r){if(gt(t)){i.batch(t);return i.state}var e=Et(zt(t,r));if(i.status===Mr.Stopped){return i.state}if(i.status!==Mr.Running&&!i.options.deferEvents){throw new Error('Event "'.concat(e.name,'" was sent to uninitialized service "').concat(i.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(e.data)))}i.scheduler.schedule((function(){i.forward(e);var t=i._nextState(e);i.update(t,e)}));return i._state};this.sendTo=function(t,r,e){var n=i.parent&&(r===_.Parent||i.parent.id===r);var s=n?i.parent:bt(r)?r===_.Internal?i:i.children.get(r)||_r.get(r):jt(r)?r:undefined;if(!s){if(!n){throw new Error("Unable to send event to child '".concat(r,"' from service '").concat(i.id,"'."))}return}if("machine"in s){if(i.status!==Mr.Stopped||i.parent!==s||i.state.done){var a=S(S({},t),{name:t.name===F?"".concat(Yt(i.id)):t.name,origin:i.sessionId});if(!e&&i.machine.config.predictableActionArguments){i._outgoingQueue.push([s,a])}else{s.send(a)}}}else{if(!e&&i.machine.config.predictableActionArguments){i._outgoingQueue.push([s,t.data])}else{s.send(t.data)}}};this._exec=function(t,r,e,n){if(n===void 0){n=i.machine.options.actions}var s=t.exec||Dt(t.type,n);var a=wt(s)?s:s?s.exec:t.exec;if(a){try{return a(r,e.data,!i.machine.config.predictableActionArguments?{action:t,state:i.state,_event:e}:{action:t,_event:e})}catch(t){if(i.parent){i.parent.send({type:"xstate.error",data:t})}throw t}}switch(t.type){case N:{var o=t;i.defer(o);break}case A:var c=t;if(typeof c.delay==="number"){i.defer(c);return}else{if(c.to){i.sendTo(c._event,c.to,e===Mt)}else{i.send(c._event)}}break;case I:i.cancel(t.sendId);break;case T:{if(i.status!==Mr.Running){return}var f=t.activity;if(!i.machine.config.predictableActionArguments&&!i.state.activities[f.id||f.type]){break}if(f.type===C.Invoke){var u=Lt(f.src);var l=i.machine.options.services?i.machine.options.services[u.type]:undefined;var d=f.id,h=f.data;var p="autoForward"in f?f.autoForward:!!f.forward;if(!l){return}var v=h?ut(h,r,e):undefined;if(typeof l==="string"){return}var m=wt(l)?l(r,e.data,{data:v,src:u,meta:f.meta}):l;if(!m){return}var y=void 0;if(kt(m)){m=v?m.withContext(v):m;y={autoForward:p}}i.spawn(m,d,y)}else{i.spawnActivity(f)}break}case L:{i.stopChild(t.activity.id);break}case P:var g=t,w=g.label,b=g.value;if(w){i.logger(w,b)}else{i.logger(b)}break}};var n=S(S({},t.defaultOptions),e);var s=n.clock,a=n.logger,o=n.parent,c=n.id;var f=c!==undefined?c:r.id;this.id=f;this.logger=a;this.clock=s;this.parent=o;this.options=n;this.scheduler=new zr({deferEvents:this.options.deferEvents});this.sessionId=_r.bookId()}Object.defineProperty(t.prototype,"initialState",{get:function(){var t=this;if(this._initialState){return this._initialState}return rr(this,(function(){t._initialState=t.machine.initialState;return t._initialState}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:false,configurable:true});t.prototype.execute=function(t,r){var e,i;try{for(var n=j(t.actions),s=n.next();!s.done;s=n.next()){var a=s.value;this.exec(a,t,r)}}catch(t){e={error:t}}finally{try{if(s&&!s.done&&(i=n.return))i.call(n)}finally{if(e)throw e.error}}};t.prototype.update=function(t,r){var e,i,n,s,a,o,c,f;var u=this;t._sessionid=this.sessionId;this._state=t;if((!this.machine.config.predictableActionArguments||r===Mt)&&this.options.execute){this.execute(this.state)}else{var l=void 0;while(l=this._outgoingQueue.shift()){l[0].send(l[1])}}this.children.forEach((function(t){u.state.children[t.id]=t}));if(this.devTools){this.devTools.send(r.data,t)}if(t.event){try{for(var d=j(this.eventListeners),h=d.next();!h.done;h=d.next()){var p=h.value;p(t.event)}}catch(t){e={error:t}}finally{try{if(h&&!h.done&&(i=d.return))i.call(d)}finally{if(e)throw e.error}}}try{for(var v=j(this.listeners),m=v.next();!m.done;m=v.next()){var p=m.value;p(t,t.event)}}catch(t){n={error:t}}finally{try{if(m&&!m.done&&(s=v.return))s.call(v)}finally{if(n)throw n.error}}try{for(var y=j(this.contextListeners),g=y.next();!g.done;g=y.next()){var w=g.value;w(this.state.context,this.state.history?this.state.history.context:undefined)}}catch(t){a={error:t}}finally{try{if(g&&!g.done&&(o=y.return))o.call(y)}finally{if(a)throw a.error}}if(this.state.done){var b=t.configuration.find((function(t){return t.type==="final"&&t.parent===u.machine}));var x=b&&b.doneData?ut(b.doneData,t.context,r):undefined;this._doneEvent=Xt(this.id,x);try{for(var O=j(this.doneListeners),S=O.next();!S.done;S=O.next()){var p=S.value;p(this._doneEvent)}}catch(t){c={error:t}}finally{try{if(S&&!S.done&&(f=O.return))f.call(O)}finally{if(c)throw c.error}}this._stop();this._stopChildren();_r.free(this.sessionId)}};t.prototype.onTransition=function(t){this.listeners.add(t);if(this.status===Mr.Running){t(this.state,this.state.event)}return this};t.prototype.subscribe=function(t,r,e){var i=this;var n=Nt(t,r,e);this.listeners.add(n.next);if(this.status!==Mr.NotStarted){n.next(this.state)}var s=function(){i.doneListeners.delete(s);i.stopListeners.delete(s);n.complete()};if(this.status===Mr.Stopped){n.complete()}else{this.onDone(s);this.onStop(s)}return{unsubscribe:function(){i.listeners.delete(n.next);i.doneListeners.delete(s);i.stopListeners.delete(s)}}};t.prototype.onEvent=function(t){this.eventListeners.add(t);return this};t.prototype.onSend=function(t){this.sendListeners.add(t);return this};t.prototype.onChange=function(t){this.contextListeners.add(t);return this};t.prototype.onStop=function(t){this.stopListeners.add(t);return this};t.prototype.onDone=function(t){if(this.status===Mr.Stopped&&this._doneEvent){t(this._doneEvent)}else{this.doneListeners.add(t)}return this};t.prototype.off=function(t){this.listeners.delete(t);this.eventListeners.delete(t);this.sendListeners.delete(t);this.stopListeners.delete(t);this.doneListeners.delete(t);this.contextListeners.delete(t);return this};t.prototype.start=function(t){var r=this;if(this.status===Mr.Running){return this}this.machine._init();_r.register(this.sessionId,this);this.initialized=true;this.status=Mr.Running;var e=t===undefined?this.initialState:rr(this,(function(){return Or(t)?r.machine.resolveState(t):r.machine.resolveState(kr.from(t,r.machine.context))}));if(this.options.devTools){this.attachDev()}this.scheduler.initialize((function(){r.update(e,Mt)}));return this};t.prototype._stopChildren=function(){this.children.forEach((function(t){if(wt(t.stop)){t.stop()}}));this.children.clear()};t.prototype._stop=function(){var t,r,e,i,n,s,a,o,c,f;try{for(var u=j(this.listeners),l=u.next();!l.done;l=u.next()){var d=l.value;this.listeners.delete(d)}}catch(r){t={error:r}}finally{try{if(l&&!l.done&&(r=u.return))r.call(u)}finally{if(t)throw t.error}}try{for(var h=j(this.stopListeners),p=h.next();!p.done;p=h.next()){var d=p.value;d();this.stopListeners.delete(d)}}catch(t){e={error:t}}finally{try{if(p&&!p.done&&(i=h.return))i.call(h)}finally{if(e)throw e.error}}try{for(var v=j(this.contextListeners),m=v.next();!m.done;m=v.next()){var d=m.value;this.contextListeners.delete(d)}}catch(t){n={error:t}}finally{try{if(m&&!m.done&&(s=v.return))s.call(v)}finally{if(n)throw n.error}}try{for(var y=j(this.doneListeners),g=y.next();!g.done;g=y.next()){var d=g.value;this.doneListeners.delete(d)}}catch(t){a={error:t}}finally{try{if(g&&!g.done&&(o=y.return))o.call(y)}finally{if(a)throw a.error}}if(!this.initialized){return this}this.initialized=false;this.status=Mr.Stopped;this._initialState=undefined;try{for(var w=j(Object.keys(this.delayedEventsMap)),b=w.next();!b.done;b=w.next()){var x=b.value;this.clock.clearTimeout(this.delayedEventsMap[x])}}catch(t){c={error:t}}finally{try{if(b&&!b.done&&(f=w.return))f.call(w)}finally{if(c)throw c.error}}this.scheduler.clear();this.scheduler=new zr({deferEvents:this.options.deferEvents})};t.prototype.stop=function(){var t=this;var r=this.scheduler;this._stop();r.schedule((function(){var r=Et({type:"xstate.stop"});var e=rr(t,(function(){var e=ot(E([],z(t.state.configuration),false).sort((function(t,r){return r.order-t.order})).map((function(r){return Vt(r.onExit,t.machine.options.actions)})));var i=z(tr(t.machine,t.state,t.state.context,r,[{type:"exit",actions:e}],t.machine.config.predictableActionArguments?t._exec:undefined,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),n=i[0],s=i[1];var a=new kr({value:t.state.value,context:s,_event:r,_sessionid:t.sessionId,historyValue:undefined,history:t.state,actions:n.filter((function(t){return!It(t)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});a.changed=true;return a}));t.update(e,r);t._stopChildren();_r.free(t.sessionId)}));return this};t.prototype.batch=function(t){var r=this;if(this.status===Mr.NotStarted&&this.options.deferEvents);else if(this.status!==Mr.Running){throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'))}if(!t.length){return}var e=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule((function(){var i,n;var s=r.state;var a=false;var o=[];var c=function(t){var i=Et(t);r.forward(i);s=rr(r,(function(){return r.machine.transition(s,i,undefined,e||undefined)}));o.push.apply(o,E([],z(r.machine.config.predictableActionArguments?s.actions:s.actions.map((function(t){return Sr(t,s)}))),false));a=a||!!s.changed};try{for(var f=j(t),u=f.next();!u.done;u=f.next()){var l=u.value;c(l)}}catch(t){i={error:t}}finally{try{if(u&&!u.done&&(n=f.return))n.call(f)}finally{if(i)throw i.error}}s.changed=a;s.actions=o;r.update(s,Et(t[t.length-1]))}))};t.prototype.sender=function(t){return this.send.bind(this,t)};t.prototype._nextState=function(t,r){var e=this;if(r===void 0){r=!!this.machine.config.predictableActionArguments&&this._exec}var i=Et(t);if(i.name.indexOf($)===0&&!this.state.nextEvents.some((function(t){return t.indexOf($)===0}))){throw i.data.data}var n=rr(this,(function(){return e.machine.transition(e.state,i,undefined,r||undefined)}));return n};t.prototype.nextState=function(t){return this._nextState(t,false)};t.prototype.forward=function(t){var r,e;try{for(var i=j(this.forwardTo),n=i.next();!n.done;n=i.next()){var s=n.value;var a=this.children.get(s);if(!a){throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(s,"'."))}a.send(t)}}catch(t){r={error:t}}finally{try{if(n&&!n.done&&(e=i.return))e.call(i)}finally{if(r)throw r.error}}};t.prototype.defer=function(t){var r=this;var e=this.clock.setTimeout((function(){if("to"in t&&t.to){r.sendTo(t._event,t.to,true)}else{r.send(t._event)}}),t.delay);if(t.id){this.delayedEventsMap[t.id]=e}};t.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]);delete this.delayedEventsMap[t]};t.prototype.exec=function(t,r,e){if(e===void 0){e=this.machine.options.actions}this._exec(t,r.context,r._event,e)};t.prototype.removeChild=function(t){var r;this.children.delete(t);this.forwardTo.delete(t);(r=this.state)===null||r===void 0?true:delete r.children[t]};t.prototype.stopChild=function(t){var r=this.children.get(t);if(!r){return}this.removeChild(t);if(wt(r.stop)){r.stop()}};t.prototype.spawn=function(t,r,e){if(this.status!==Mr.Running){return nr(t,r)}if(dt(t)){return this.spawnPromise(Promise.resolve(t),r)}else if(wt(t)){return this.spawnCallback(t,r)}else if(ar(t)){return this.spawnActor(t,r)}else if(Ot(t)){return this.spawnObservable(t,r)}else if(kt(t)){return this.spawnMachine(t,S(S({},e),{id:r}))}else if(ht(t)){return this.spawnBehavior(t,r)}else{throw new Error('Unable to spawn entity "'.concat(r,'" of type "').concat(typeof t,'".'))}};t.prototype.spawnMachine=function(r,e){var i=this;if(e===void 0){e={}}var n=new t(r,S(S({},this.options),{parent:this,id:e.id||r.id}));var s=S(S({},Ir),e);if(s.sync){n.onTransition((function(t){i.send(J,{state:t,id:n.id})}))}var a=n;this.children.set(n.id,a);if(s.autoForward){this.forwardTo.add(n.id)}n.onDone((function(t){i.removeChild(n.id);i.send(Et(t,{origin:n.id}))})).start();return a};t.prototype.spawnBehavior=function(t,r){var e=Ar(t,{id:r,parent:this});this.children.set(r,e);return e};t.prototype.spawnPromise=function(t,r){var e;var i=this;var n=false;var s;t.then((function(t){if(!n){s=t;i.removeChild(r);i.send(Et(Xt(r,t),{origin:r}))}}),(function(t){if(!n){i.removeChild(r);var e=Yt(r,t);try{i.send(Et(e,{origin:r}))}catch(t){if(i.devTools){i.devTools.send(e,i.state)}if(i.machine.strict){i.stop()}}}}));var a=(e={id:r,send:function(){return void 0},subscribe:function(r,e,i){var n=Nt(r,e,i);var s=false;t.then((function(t){if(s){return}n.next(t);if(s){return}n.complete()}),(function(t){if(s){return}n.error(t)}));return{unsubscribe:function(){return s=true}}},stop:function(){n=true},toJSON:function(){return{id:r}},getSnapshot:function(){return s}},e[St]=function(){return this},e);this.children.set(r,a);return a};t.prototype.spawnCallback=function(t,r){var e;var i=this;var n=false;var s=new Set;var a=new Set;var o;var c=function(t){o=t;a.forEach((function(r){return r(t)}));if(n){return}i.send(Et(t,{origin:r}))};var f;try{f=t(c,(function(t){s.add(t)}))}catch(t){this.send(Yt(r,t))}if(dt(f)){return this.spawnPromise(f,r)}var u=(e={id:r,send:function(t){return s.forEach((function(r){return r(t)}))},subscribe:function(t){var r=Nt(t);a.add(r.next);return{unsubscribe:function(){a.delete(r.next)}}},stop:function(){n=true;if(wt(f)){f()}},toJSON:function(){return{id:r}},getSnapshot:function(){return o}},e[St]=function(){return this},e);this.children.set(r,u);return u};t.prototype.spawnObservable=function(t,r){var e;var i=this;var n;var s=t.subscribe((function(t){n=t;i.send(Et(t,{origin:r}))}),(function(t){i.removeChild(r);i.send(Et(Yt(r,t),{origin:r}))}),(function(){i.removeChild(r);i.send(Et(Xt(r),{origin:r}))}));var a=(e={id:r,send:function(){return void 0},subscribe:function(r,e,i){return t.subscribe(r,e,i)},stop:function(){return s.unsubscribe()},getSnapshot:function(){return n},toJSON:function(){return{id:r}}},e[St]=function(){return this},e);this.children.set(r,a);return a};t.prototype.spawnActor=function(t,r){this.children.set(r,t);return t};t.prototype.spawnActivity=function(t){var r=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:undefined;if(!r){return}var e=r(this.state.context,t);this.spawnEffect(t.id,e)};t.prototype.spawnEffect=function(t,r){var e;this.children.set(t,(e={id:t,send:function(){return void 0},subscribe:function(){return{unsubscribe:function(){return void 0}}},stop:r||undefined,getSnapshot:function(){return undefined},toJSON:function(){return{id:t}}},e[St]=function(){return this},e))};t.prototype.attachDev=function(){var t=Tr();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var r=typeof this.options.devTools==="object"?this.options.devTools:undefined;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(S(S({name:this.id,autoPause:true,stateSanitizer:function(t){return{value:t.value,context:t.context,actions:t.actions}}},r),{features:S({jump:false,skip:false},r?r.features:undefined)}),this.machine);this.devTools.init(this.state)}Nr(this)}};t.prototype.toJSON=function(){return{id:this.id}};t.prototype[St]=function(){return this};t.prototype.getSnapshot=function(){if(this.status===Mr.NotStarted){return this.initialState}return this._state};t.defaultOptions={execute:true,deferEvents:true,clock:{setTimeout:function(t,r){return setTimeout(t,r)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:false};t.interpret=Pr;return t}();function Pr(t,r){var e=new Dr(t,r);return e}function Vr(t){if(typeof t==="string"){var r={type:t};r.toString=function(){return t};return r}return t}function Br(t){return S(S({type:B},t),{toJSON:function(){var r=k(t,["onDone","onError"]);return S(S({},r),{type:B,src:Vr(t.src)})}})}var $r="";var Fr="#";var Jr="*";var Ur={};var Wr=function(t){return t[0]===Fr};var Kr=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}};var Rr=function(){function t(r,e,i,n){if(i===void 0){i="context"in r?r.context:undefined}var s=this;var a;this.config=r;this._context=i;this.order=-1;this.__xstatenode=true;this.__cache={events:undefined,relativeValue:new Map,initialStateValue:undefined,initialState:undefined,on:undefined,transitions:undefined,candidates:{},delayedTransitions:undefined};this.idMap={};this.tags=[];this.options=Object.assign(Kr(),e);this.parent=n===null||n===void 0?void 0:n.parent;this.key=this.config.key||(n===null||n===void 0?void 0:n.key)||this.config.id||"(machine)";this.machine=this.parent?this.parent.machine:this;this.path=this.parent?this.parent.path.concat(this.key):[];this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:K);this.id=this.config.id||E([this.machine.key],z(this.path),false).join(this.delimiter);this.version=this.parent?this.parent.version:this.config.version;this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic");this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{};this.description=this.config.description;this.initial=this.config.initial;this.states=this.config.states?et(this.config.states,(function(r,e){var i;var n=new t(r,{},undefined,{parent:s,key:e});Object.assign(s.idMap,S((i={},i[n.id]=n,i),n.idMap));return n})):Ur;var o=0;function c(t){var r,e;t.order=o++;try{for(var i=j(fr(t)),n=i.next();!n.done;n=i.next()){var s=n.value;c(s)}}catch(t){r={error:t}}finally{try{if(n&&!n.done&&(e=i.return))e.call(i)}finally{if(r)throw r.error}}}c(this);this.history=this.config.history===true?"shallow":this.config.history||false;this._transient=!!this.config.always||(!this.config.on?false:Array.isArray(this.config.on)?this.config.on.some((function(t){var r=t.event;return r===$r})):$r in this.config.on);this.strict=!!this.config.strict;this.onEntry=ft(this.config.entry||this.config.onEntry).map((function(t){return Pt(t)}));this.onExit=ft(this.config.exit||this.config.onExit).map((function(t){return Pt(t)}));this.meta=this.config.meta;this.doneData=this.type==="final"?this.config.data:undefined;this.invoke=ft(this.config.invoke).map((function(t,r){var e,i;if(kt(t)){var n=At(s.id,r);s.machine.options.services=S((e={},e[n]=t,e),s.machine.options.services);return Br({src:n,id:n})}else if(bt(t.src)){var n=t.id||At(s.id,r);return Br(S(S({},t),{id:n,src:t.src}))}else if(kt(t.src)||wt(t.src)){var n=t.id||At(s.id,r);s.machine.options.services=S((i={},i[n]=t.src,i),s.machine.options.services);return Br(S(S({id:n},t),{src:n}))}else{var a=t.src;return Br(S(S({id:At(s.id,r)},t),{src:a}))}}));this.activities=ft(this.config.activities).concat(this.invoke).map((function(t){return Bt(t)}));this.transition=this.transition.bind(this);this.tags=ft(this.config.tags)}t.prototype._init=function(){if(this.__cache.transitions){return}lr(this).forEach((function(t){return t.on}))};t.prototype.withConfig=function(r,e){var i=this.options,n=i.actions,s=i.activities,a=i.guards,o=i.services,c=i.delays;return new t(this.config,{actions:S(S({},n),r.actions),activities:S(S({},s),r.activities),guards:S(S({},a),r.guards),services:S(S({},o),r.services),delays:S(S({},c),r.delays)},e!==null&&e!==void 0?e:this.context)};t.prototype.withContext=function(r){return new t(this.config,this.options,r)};Object.defineProperty(t.prototype,"context",{get:function(){return wt(this._context)?this._context():this._context},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:et(this.states,(function(t){return t.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:false,configurable:true});t.prototype.toJSON=function(){return this.definition};Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on){return this.__cache.on}var t=this.transitions;return this.__cache.on=t.reduce((function(t,r){t[r.eventType]=t[r.eventType]||[];t[r.eventType].push(r);return t}),{})},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:false,configurable:true});t.prototype.getCandidates=function(t){if(this.__cache.candidates[t]){return this.__cache.candidates[t]}var r=t===$r;var e=this.transitions.filter((function(e){var i=e.eventType===t;return r?i:i||e.eventType===Jr}));this.__cache.candidates[t]=e;return e};t.prototype.getDelayedTransitions=function(){var t=this;var r=this.config.after;if(!r){return[]}var e=function(r,e){var i=wt(r)?"".concat(t.id,":delay[").concat(e,"]"):r;var n=Gt(i,t.id);t.onEntry.push(Jt(n,{delay:r}));t.onExit.push(Kt(n));return n};var i=gt(r)?r.map((function(t,r){var i=e(t.delay,r);return S(S({},t),{event:i})})):ot(Object.keys(r).map((function(t,i){var n=r[t];var s=bt(n)?{target:n}:n;var a=!isNaN(+t)?+t:t;var o=e(a,i);return ft(s).map((function(t){return S(S({},t),{event:o,delay:a})}))})));return i.map((function(r){var e=r.delay;return S(S({},t.formatTransition(r)),{delay:e})}))};t.prototype.getStateNodes=function(t){var r;var e=this;if(!t){return[]}var i=t instanceof kr?t.value:tt(t,this.delimiter);if(bt(i)){var n=this.getStateNode(i).initial;return n!==undefined?this.getStateNodes((r={},r[i]=n,r)):[this,this.states[i]]}var s=Object.keys(i);var a=[this];a.push.apply(a,E([],z(ot(s.map((function(t){return e.getStateNode(t).getStateNodes(i[t])})))),false));return a};t.prototype.handles=function(t){var r=X(t);return this.events.includes(r)};t.prototype.resolveState=function(t){var r=t instanceof kr?t:kr.create(t);var e=Array.from(dr([],this.getStateNodes(r.value)));return new kr(S(S({},r),{value:this.resolve(r.value),configuration:e,done:gr(e,this),tags:br(e),machine:this.machine}))};t.prototype.transitionLeafNode=function(t,r,e){var i=this.getStateNode(t);var n=i.next(r,e);if(!n||!n.transitions.length){return this.next(r,e)}return n};t.prototype.transitionCompoundNode=function(t,r,e){var i=Object.keys(t);var n=this.getStateNode(i[0]);var s=n._transition(t[i[0]],r,e);if(!s||!s.transitions.length){return this.next(r,e)}return s};t.prototype.transitionParallelNode=function(t,r,e){var i,n;var s={};try{for(var a=j(Object.keys(t)),o=a.next();!o.done;o=a.next()){var c=o.value;var f=t[c];if(!f){continue}var u=this.getStateNode(c);var l=u._transition(f,r,e);if(l){s[c]=l}}}catch(t){i={error:t}}finally{try{if(o&&!o.done&&(n=a.return))n.call(a)}finally{if(i)throw i.error}}var d=Object.keys(s).map((function(t){return s[t]}));var h=ot(d.map((function(t){return t.transitions})));var p=d.some((function(t){return t.transitions.length>0}));if(!p){return this.next(r,e)}var v=ot(Object.keys(s).map((function(t){return s[t].configuration})));return{transitions:h,exitSet:ot(d.map((function(t){return t.exitSet}))),configuration:v,source:r,actions:ot(Object.keys(s).map((function(t){return s[t].actions})))}};t.prototype._transition=function(t,r,e){if(bt(t)){return this.transitionLeafNode(t,r,e)}if(Object.keys(t).length===1){return this.transitionCompoundNode(t,r,e)}return this.transitionParallelNode(t,r,e)};t.prototype.getTransitionData=function(t,r){return this._transition(t.value,t,Et(r))};t.prototype.next=function(t,r){var e,i;var n=this;var s=r.name;var a=[];var o=[];var c;try{for(var f=j(this.getCandidates(s)),u=f.next();!u.done;u=f.next()){var l=u.value;var d=l.cond,h=l.in;var p=t.context;var v=h?bt(h)&&Wr(h)?t.matches(tt(this.getStateNodeById(h).path,this.delimiter)):Q(tt(h,this.delimiter),nt(this.path.slice(0,-2))(t.value)):true;var m=false;try{m=!d||Tt(this.machine,d,p,r,t)}catch(t){throw new Error("Unable to evaluate guard '".concat(d.name||d.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,"':\n").concat(t.message))}if(m&&v){if(l.target!==undefined){o=l.target}a.push.apply(a,E([],z(l.actions),false));c=l;break}}}catch(t){e={error:t}}finally{try{if(u&&!u.done&&(i=f.return))i.call(f)}finally{if(e)throw e.error}}if(!c){return undefined}if(!o.length){return{transitions:[c],exitSet:[],configuration:t.value?[this]:[],source:t,actions:a}}var y=ot(o.map((function(r){return n.getRelativeStateNodes(r,t.historyValue)})));var g=!!c.internal;return{transitions:[c],exitSet:g?[]:ot(o.map((function(t){return n.getPotentiallyReenteringNodes(t)}))),configuration:y,source:t,actions:a}};t.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order){return[this]}var r=[];var e=this;var i=t;while(e&&e!==i){r.push(e);e=e.parent}if(e!==i){return[]}r.push(i);return r};t.prototype.getActions=function(t,r,e,i,n,s,a){var o,c,f,u;var l=this;var d=s?dr([],this.getStateNodes(s.value)):[];var h=new Set;try{for(var p=j(Array.from(t).sort((function(t,r){return t.order-r.order}))),v=p.next();!v.done;v=p.next()){var m=v.value;if(!mr(d,m)||mr(e.exitSet,m)||m.parent&&h.has(m.parent)){h.add(m)}}}catch(t){o={error:t}}finally{try{if(v&&!v.done&&(c=p.return))c.call(p)}finally{if(o)throw o.error}}try{for(var y=j(d),g=y.next();!g.done;g=y.next()){var m=g.value;if(!mr(t,m)||mr(e.exitSet,m.parent)){e.exitSet.push(m)}}}catch(t){f={error:t}}finally{try{if(g&&!g.done&&(u=y.return))u.call(y)}finally{if(f)throw f.error}}e.exitSet.sort((function(t,r){return r.order-t.order}));var w=Array.from(h).sort((function(t,r){return t.order-r.order}));var b=new Set(e.exitSet);var x=ot(w.map((function(t){var r=[];if(t.type!=="final"){return r}var s=t.parent;if(!s.parent){return r}r.push(Qt(t.id,t.doneData),Qt(s.id,t.doneData?ut(t.doneData,i,n):undefined));var a=s.parent;if(a.type==="parallel"){if(ur(a).every((function(t){return gr(e.configuration,t)}))){r.push(Qt(a.id))}}return r})));var O=w.map((function(t){var r=t.onEntry;var e=t.activities.map((function(t){return Rt(t)}));return{type:"entry",actions:Vt(a?E(E([],z(r),false),z(e),false):E(E([],z(e),false),z(r),false),l.machine.options.actions)}})).concat({type:"state_done",actions:x.map((function(t){return $t(t)}))});var S=Array.from(b).map((function(t){return{type:"exit",actions:Vt(E(E([],z(t.onExit),false),z(t.activities.map((function(t){return qt(t)}))),false),l.machine.options.actions)}}));var k=S.concat({type:"transition",actions:Vt(e.actions,this.machine.options.actions)}).concat(O);if(r){var C=Vt(ot(E([],z(t),false).sort((function(t,r){return r.order-t.order})).map((function(t){return t.onExit}))),this.machine.options.actions).filter((function(t){return!It(t)}));return k.concat({type:"stop",actions:C})}return k};t.prototype.transition=function(t,r,e,i){if(t===void 0){t=this.initialState}var n=Et(r);var s;if(t instanceof kr){s=e===undefined?t:this.resolveState(kr.from(t,e))}else{var a=bt(t)?this.resolve(rt(this.getResolvedPath(t))):this.resolve(t);var o=e!==null&&e!==void 0?e:this.machine.context;s=this.resolveState(kr.from(a,o))}if(this.strict){if(!this.events.includes(n.name)&&!lt(n.name)){throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(n.name,"'"))}}var c=this._transition(s.value,s,n)||{transitions:[],configuration:[],exitSet:[],source:s,actions:[]};var f=dr([],this.getStateNodes(s.value));var u=c.configuration.length?dr(f,c.configuration):f;c.configuration=E([],z(u),false);return this.resolveTransition(c,s,s.context,i,n)};t.prototype.resolveRaisedTransition=function(t,r,e,i){var n;var s=t.actions;t=this.transition(t,r,undefined,i);t._event=e;t.event=e.data;(n=t.actions).unshift.apply(n,E([],z(s),false));return t};t.prototype.resolveTransition=function(t,r,e,i,n){var s,a,o,c;var f=this;if(n===void 0){n=Mt}var u=t.configuration;var l=!r||t.transitions.length>0;var d=l?t.configuration:r?r.configuration:[];var h=gr(d,this);var p=l?vr(this.machine,u):undefined;var v=r?r.historyValue?r.historyValue:t.source?this.machine.historyValue(r.value):undefined:undefined;var m=this.getActions(new Set(d),h,t,e,n,r,i);var y=r?S({},r.activities):{};try{for(var g=j(m),w=g.next();!w.done;w=g.next()){var b=w.value;try{for(var x=(o=void 0,j(b.actions)),O=x.next();!O.done;O=x.next()){var k=O.value;if(k.type===T){y[k.activity.id||k.activity.type]=k}else if(k.type===L){y[k.activity.id||k.activity.type]=false}}}catch(t){o={error:t}}finally{try{if(O&&!O.done&&(c=x.return))c.call(x)}finally{if(o)throw o.error}}}}catch(t){s={error:t}}finally{try{if(w&&!w.done&&(a=g.return))a.call(g)}finally{if(s)throw s.error}}var E=z(tr(this,r,e,n,m,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),C=E[0],_=E[1];var N=z(pt(C,It),2),A=N[0],I=N[1];var D=C.filter((function(t){var r;return t.type===T&&((r=t.activity)===null||r===void 0?void 0:r.type)===B}));var P=D.reduce((function(t,r){t[r.activity.id]=ir(r.activity,f.machine,_,n);return t}),r?S({},r.children):{});var V=new kr({value:p||r.value,context:_,_event:n,_sessionid:r?r._sessionid:null,historyValue:p?v?mt(v,p):undefined:r?r.historyValue:undefined,history:!p||t.source?r:undefined,actions:p?I:[],activities:p?y:r?r.activities:{},events:[],configuration:d,transitions:t.transitions,children:P,done:h,tags:br(d),machine:this});var $=e!==_;V.changed=n.name===J||$;var F=V.history;if(F){delete F.history}var U=!h&&(this._transient||u.some((function(t){return t._transient})));if(!l&&(!U||n.name===$r)){return V}var W=V;if(!h){if(U){W=this.resolveRaisedTransition(W,{type:M},n,i)}while(A.length){var K=A.shift();W=this.resolveRaisedTransition(W,K._event,n,i)}}var R=W.changed||(F?!!W.actions.length||$||typeof F.value!==typeof W.value||!xr(W.value,F.value):undefined);W.changed=R;W.history=F;return W};t.prototype.getStateNode=function(t){if(Wr(t)){return this.machine.getStateNodeById(t)}if(!this.states){throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."))}var r=this.states[t];if(!r){throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"))}return r};t.prototype.getStateNodeById=function(t){var r=Wr(t)?t.slice(Fr.length):t;if(r===this.id){return this}var e=this.machine.idMap[r];if(!e){throw new Error("Child state node '#".concat(r,"' does not exist on machine '").concat(this.id,"'"))}return e};t.prototype.getStateNodeByPath=function(t){if(typeof t==="string"&&Wr(t)){try{return this.getStateNodeById(t.slice(1))}catch(t){}}var r=Y(t,this.delimiter).slice();var e=this;while(r.length){var i=r.shift();if(!i.length){break}e=e.getStateNode(i)}return e};t.prototype.resolve=function(t){var r;var e=this;if(!t){return this.initialStateValue||Ur}switch(this.type){case"parallel":return et(this.initialStateValue,(function(r,i){return r?e.getStateNode(i).resolve(t[i]||r):Ur}));case"compound":if(bt(t)){var i=this.getStateNode(t);if(i.type==="parallel"||i.type==="compound"){return r={},r[t]=i.initialStateValue,r}return t}if(!Object.keys(t).length){return this.initialStateValue||{}}return et(t,(function(t,r){return t?e.getStateNode(r).resolve(t):Ur}));default:return t||Ur}};t.prototype.getResolvedPath=function(t){if(Wr(t)){var r=this.machine.idMap[t.slice(Fr.length)];if(!r){throw new Error("Unable to find state node '".concat(t,"'"))}return r.path}return Y(t,this.delimiter)};Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue){return this.__cache.initialStateValue}var r;if(this.type==="parallel"){r=it(this.states,(function(t){return t.initialStateValue||Ur}),(function(t){return!(t.type==="history")}))}else if(this.initial!==undefined){if(!this.states[this.initial]){throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"))}r=cr(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else{r={}}this.__cache.initialStateValue=r;return this.__cache.initialStateValue},enumerable:false,configurable:true});t.prototype.getInitialState=function(t,r){this._init();var e=this.getStateNodes(t);return this.resolveTransition({configuration:e,exitSet:[],transitions:[],source:undefined,actions:[]},undefined,r!==null&&r!==void 0?r:this.machine.context,undefined)};Object.defineProperty(t.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t){throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."))}return this.getInitialState(t)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"target",{get:function(){var t;if(this.type==="history"){var r=this.config;if(bt(r.target)){t=Wr(r.target)?rt(this.machine.getStateNodeById(r.target).path.slice(this.path.length-1)):r.target}else{t=r.target}}return t},enumerable:false,configurable:true});t.prototype.getRelativeStateNodes=function(t,r,e){if(e===void 0){e=true}return e?t.type==="history"?t.resolveHistory(r):t.initialStateNodes:[t]};Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var t=this;if(cr(this)){return[this]}if(this.type==="compound"&&!this.initial){return[this]}var r=at(this.initialStateValue);return ot(r.map((function(r){return t.getFromRelativePath(r)})))},enumerable:false,configurable:true});t.prototype.getFromRelativePath=function(t){if(!t.length){return[this]}var r=z(t),e=r[0],i=r.slice(1);if(!this.states){throw new Error("Cannot retrieve subPath '".concat(e,"' from node with no states"))}var n=this.getStateNode(e);if(n.type==="history"){return n.resolveHistory()}if(!this.states[e]){throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"))}return this.states[e].getFromRelativePath(i)};t.prototype.historyValue=function(t){if(!Object.keys(this.states).length){return undefined}return{current:t||this.initialStateValue,states:it(this.states,(function(r,e){if(!t){return r.historyValue()}var i=bt(t)?undefined:t[e];return r.historyValue(i||r.initialStateValue)}),(function(t){return!t.history}))}};t.prototype.resolveHistory=function(t){var r=this;if(this.type!=="history"){return[this]}var e=this.parent;if(!t){var i=this.target;return i?ot(at(i).map((function(t){return e.getFromRelativePath(t)}))):e.initialStateNodes}var n=st(e.path,"states")(t).current;if(bt(n)){return[e.getStateNode(n)]}return ot(at(n).map((function(t){return r.history==="deep"?e.getFromRelativePath(t):[e.states[t[0]]]})))};Object.defineProperty(t.prototype,"stateIds",{get:function(){var t=this;var r=ot(Object.keys(this.states).map((function(r){return t.states[r].stateIds})));return[this.id].concat(r)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"events",{get:function(){var t,r,e,i;if(this.__cache.events){return this.__cache.events}var n=this.states;var s=new Set(this.ownEvents);if(n){try{for(var a=j(Object.keys(n)),o=a.next();!o.done;o=a.next()){var c=o.value;var f=n[c];if(f.states){try{for(var u=(e=void 0,j(f.events)),l=u.next();!l.done;l=u.next()){var d=l.value;s.add("".concat(d))}}catch(t){e={error:t}}finally{try{if(l&&!l.done&&(i=u.return))i.call(u)}finally{if(e)throw e.error}}}}}catch(r){t={error:r}}finally{try{if(o&&!o.done&&(r=a.return))r.call(a)}finally{if(t)throw t.error}}}return this.__cache.events=Array.from(s)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter((function(t){return!(!t.target&&!t.actions.length&&t.internal)})).map((function(t){return t.eventType})));return Array.from(t)},enumerable:false,configurable:true});t.prototype.resolveTarget=function(t){var r=this;if(t===undefined){return undefined}return t.map((function(t){if(!bt(t)){return t}var e=t[0]===r.delimiter;if(e&&!r.parent){return r.getStateNodeByPath(t.slice(1))}var i=e?r.key+t:t;if(r.parent){try{var n=r.parent.getStateNodeByPath(i);return n}catch(t){throw new Error("Invalid transition definition for state node '".concat(r.id,"':\n").concat(t.message))}}else{return r.getStateNodeByPath(i)}}))};t.prototype.formatTransition=function(t){var r=this;var e=_t(t.target);var i="internal"in t?t.internal:e?e.some((function(t){return bt(t)&&t[0]===r.delimiter})):true;var n=this.machine.options.guards;var s=this.resolveTarget(e);var a=S(S({},t),{actions:Vt(ft(t.actions)),cond:xt(t.cond,n),target:s,source:this,internal:i,eventType:t.event,toJSON:function(){return S(S({},a),{target:a.target?a.target.map((function(t){return"#".concat(t.id)})):undefined,source:"#".concat(r.id)})}});return a};t.prototype.formatTransitions=function(){var t,r;var e=this;var i;if(!this.config.on){i=[]}else if(Array.isArray(this.config.on)){i=this.config.on}else{var n=this.config.on,s=Jr,a=n[s],o=a===void 0?[]:a,c=k(n,[typeof s==="symbol"?s:s+""]);i=ot(Object.keys(c).map((function(t){var r=Ct(t,c[t]);return r})).concat(Ct(Jr,o)))}var f=this.config.always?Ct("",this.config.always):[];var u=this.config.onDone?Ct(String(Qt(this.id)),this.config.onDone):[];var l=ot(this.invoke.map((function(t){var r=[];if(t.onDone){r.push.apply(r,E([],z(Ct(String(Xt(t.id)),t.onDone)),false))}if(t.onError){r.push.apply(r,E([],z(Ct(String(Yt(t.id)),t.onError)),false))}return r})));var d=this.after;var h=ot(E(E(E(E([],z(u),false),z(l),false),z(i),false),z(f),false).map((function(t){return ft(t).map((function(t){return e.formatTransition(t)}))})));try{for(var p=j(d),v=p.next();!v.done;v=p.next()){var m=v.value;h.push(m)}}catch(r){t={error:r}}finally{try{if(v&&!v.done&&(r=p.return))r.call(p)}finally{if(t)throw t.error}}return h};return t}();function qr(t,r,e){if(e===void 0){e=t.context}return new Rr(t,r,e)}const Hr=["m","l"];function Gr(t){return Hr.includes(t)}const Qr=({disabled:r,option:e,onRemove:i})=>{const n={};if(e.chipColor){n["color"]=e.chipColor}if(e.chipBackgroundColor){n["background-color"]=e.chipBackgroundColor}return t("label",{class:"wcs-select-chip",style:n,onClick:t=>t.stopImmediatePropagation()},t("div",null,e.displayText),r?null:t("div",{onClick:()=>i(e)},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"12",viewBox:"0 0 20 12",class:"chip"},t("path",{d:"M2,0 6,4 10,0 12,2 8,6 12,10 10,12 6,8 2,12 0,10 4,6 0,2 2,0",fill:e.chipColor,transform:"translate(8 0)"}))))};const Xr='@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}:host{--wcs-select-ligther-percentage:40;--wcs-select-border-radius:var(--wcs-border-radius);--wcs-select-background-color:var(--wcs-light);--wcs-select-placeholder-color:var(--wcs-text-medium);--wcs-select-value-color:var(--wcs-primary);--wcs-select-border-color:transparent;--wcs-select-overlay-max-height:360px;--wcs-select-option-height:var(--wcs-size-m);--wcs-select-border-width:1px;display:block;position:relative;outline:none;user-select:none;box-sizing:border-box}:host svg{flex-shrink:0}:host .arrow{fill:var(--wcs-select-value-color)}:host .chip{fill:var(--wcs-contrast);opacity:calc((100 - var(--wcs-select-ligther-percentage)) / 100)}:host .chip:hover{opacity:100}:host(.expanded){--wcs-select-border-color:var(--wcs-text-light)}:host(.expanded) .wcs-select-options{display:block}:host(:not(.expanded):focus) .wcs-select-control{border:var(--wcs-primary) solid 1px}:host(:not(.expanded):focus-visible) .wcs-select-control{outline:2px dashed var(--wcs-primary);outline-offset:4px;border-radius:var(--wcs-select-border-radius)}:host([disabled]){cursor:not-allowed}:host([disabled]) .wcs-select-control,:host([disabled]) label{cursor:default;pointer-events:none}:host([disabled]) label{color:var(--wcs-text-disabled)}:host([disabled]) .arrow{fill:var(--wcs-text-medium)}label{padding-left:calc(var(--wcs-padding) - var(--wcs-select-border-width));padding-right:calc(var(--wcs-padding) - var(--wcs-select-border-width));font-weight:500;cursor:pointer;color:var(--wcs-select-color);transition:color 125ms ease-in;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host([size=m]){min-height:var(--wcs-size-m);--wcs-select-font-size:1rem}:host([size=m]) .wcs-select-control{min-height:var(--wcs-size-m)}:host([size=l]){min-height:var(--wcs-size-l);--wcs-select-font-size:1.0625rem}:host([size=l]) .wcs-select-control{min-height:var(--wcs-size-l)}:host([chips]) .wcs-select-control{flex-wrap:wrap}.wcs-select-control{box-sizing:border-box;--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity;overflow:hidden;display:flex;align-items:center;padding-right:var(--wcs-text-padding);background-color:var(--wcs-select-background-color);border-radius:var(--wcs-select-border-radius);border:var(--wcs-select-border-color) solid var(--wcs-select-border-width);font-size:var(--wcs-select-font-size, 1rem);line-height:1.5;cursor:pointer}.wcs-select-control::before,.wcs-select-control::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.wcs-select-control::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.wcs-select-control::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.wcs-select-control.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.wcs-select-control.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.wcs-select-control.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.wcs-select-control.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.wcs-select-control.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.wcs-select-control::before,.wcs-select-control::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.wcs-select-control.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.wcs-select-control::before,.wcs-select-control::after{background-color:#999;background-color:var(--mdc-ripple-color, #999)}.wcs-select-control:hover::before,.wcs-select-control.mdc-ripple-surface--hover::before{opacity:0.1;opacity:var(--mdc-ripple-hover-opacity, 0.1)}.wcs-select-control.mdc-ripple-upgraded--background-focused::before,.wcs-select-control:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.wcs-select-control:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.wcs-select-control:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.3;opacity:var(--mdc-ripple-press-opacity, 0.3)}.wcs-select-control.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.3)}.wcs-select-placeholder{color:var(--wcs-select-placeholder-color);font-style:italic;font-weight:400}.wcs-select-value{color:var(--wcs-select-value-color);font-weight:var(--wcs-font-weight-form-value)}.wcs-select-value-container{margin-top:4px;margin-bottom:4px;margin-left:calc(var(--wcs-margin) / 2);max-width:calc(100% - (24px + var(--wcs-base-margin)));display:flex;flex-direction:row;gap:4px;align-items:center;flex-wrap:wrap}.wcs-select-chip{line-height:1.375;color:var(--wcs-contrast);background-color:var(--wcs-base);border-radius:0.75rem;display:flex;align-items:center;padding:calc((var(--wcs-padding) - 8px) / 2) var(--wcs-padding);overflow:initial}.wcs-select-options{display:none;position:absolute;z-index:999999999;border:solid var(--wcs-select-border-width) var(--wcs-select-border-color);border-radius:var(--wcs-select-border-radius);max-height:var(--wcs-select-overlay-max-height);overflow-y:auto;width:calc(100% - 2 * var(--wcs-select-border-width));background-color:var(--wcs-white);color:var(--wcs-text-medium)}';const Yr={key:"select",initial:"closed",states:{closed:{entry:["close"],on:{CLICK:"opened",OPEN:"opened",OPTION_SELECTED:{actions:["selectOption"]}}},opened:{entry:["open"],on:{CLICK:"closed",CLOSE:"closed",OPTION_SELECTED:{actions:["selectOption"]}}}}};const Zr=class{constructor(t){r(this,t);this.wcsChange=e(this,"wcsChange",7);this.wcsFocus=e(this,"wcsFocus",7);this.wcsBlur=e(this,"wcsBlur",7);this.selectId=`wcs-select-${te++}`;this.optionsId=o("OPTIONS");this.expanded=false;this.size="m";this.hasLoaded=false;this.displayText=undefined;this.focused=undefined;this.value=undefined;this.placeholder=undefined;this.disabled=false;this.multiple=false;this.chips=false;this.name=undefined;this.compareWith=(t,r)=>s.isEqual(t,r);this.overlayDirection="bottom"}async open(){this.stateService.send("OPEN")}async close(){this.stateService.send("CLOSE")}onValueChangeHandler(t){this.updateSelectedValue(t);this.emitChange(this.value)}updateSelectedValue(t){if(!t){this.reset()}if(this.multiple){if(!Array.isArray(t)){t=[t]}this.values=[];this.options.forEach((r=>{const e=t?t.findIndex((t=>this.compareWith(r.value,t)))!==-1:false;if(e){this.values.push({value:r.value,displayText:r.innerText,chipColor:r.chipColor,chipBackgroundColor:r.chipBackgroundColor})}r.selected=e}));this.displayText=this.values.length!==0?this.values.map((t=>t.displayText)).join(", "):undefined}else{this.options.forEach((r=>{const e=this.compareWith(r.value,t);if(e){this.displayText=r.innerText}r.selected=e}))}}reset(){this.values=[];this.displayText=undefined;this.options.forEach((t=>{t.selected=false}))}componentDidLoad(){this.optionsEl=this.el.shadowRoot.querySelector(".wcs-select-options");this.controlEl=this.el.shadowRoot.querySelector(".wcs-select-control");const t=qr(Yr,this.initMachineOptions());this.stateService=Pr(t);if(this.multiple){this.values=[]}this.addRippleEffect();this.stateService.start();if(this.optionsEl.querySelector("slot")===null){this.replaceOptions_firefoxBefore63();this.listenDomUpdate_firefoxBefore63()}if(this.value!==undefined){this.updateSelectedValue(this.value)}this.popper=this.createPopperInstance();this.labelElement=c(this.el);if(this.labelElement){this.labelElement.id=this.selectId+"-lbl"}this.hasLoaded=true}createPopperInstance(){return x(this.controlEl,this.optionsEl,{placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,4]}}]})}emitChange(t){this.wcsChange.emit({value:t})}replaceOptions_firefoxBefore63(){Array.from(this.el.querySelectorAll("wcs-select-option")).forEach((t=>{if(t.parentNode===this.el){this.el.removeChild(t);this.optionsEl.appendChild(t)}}))}listenDomUpdate_firefoxBefore63(){const t=new MutationObserver((t=>{for(const r of t){if(r.type==="childList"){this.replaceOptions_firefoxBefore63()}}}));t.observe(this.el,{childList:true})}componentWillLoad(){if(!Gr(this.size)){console.error(`Invalid size value for wcs-select : "${this.size}". Must be one of "${Hr.join(", ")}"`);this.size="m"}}componentWillUpdate(){if(this.multiple){this.options.forEach((t=>t.multiple=true))}}get options(){var t;const r=(t=this.el)===null||t===void 0?void 0:t.querySelectorAll("wcs-select-option");if(r&&r.length!==0){return r}return[]}get notDisabledOptions(){var t;const r=(t=this.el)===null||t===void 0?void 0:t.querySelectorAll("wcs-select-option:not([disabled])");if(r&&r.length!==0){return r}return[]}initMachineOptions(){return{actions:{open:()=>{var t;if(!this.disabled){this.expanded=true;this.focused=false;if(this.notDisabledOptions.length>0){this.lastFocusedOptionElement=(t=this.lastSelectedOptionElement)!==null&&t!==void 0?t:this.notDisabledOptions[0];requestAnimationFrame((()=>{var t;(t=this.lastFocusedOptionElement)===null||t===void 0?void 0:t.focus()}))}}},close:(t,r)=>{var e,i;if(r.type==="CLOSE"){if((e=r.value)===null||e===void 0?void 0:e.shouldBlur){(i=this.el.closest("wcs-select"))===null||i===void 0?void 0:i.focus();this.focused=false}else{this.el.focus();this.focused=true}}this.expanded=false},selectOption:(t,r)=>{if(r.type==="OPTION_SELECTED"){this.handleClickEvent(r.value)}}},guards:{enabled:()=>!this.disabled}}}handleClickEvent(t){if(this.multiple){this.handleClickOnMultiple(t)}else{this.handleNormalClick(t)}}handleClickOnMultiple(t){const r=this.values.findIndex((r=>r.value===t.value));if(r===-1){const{value:r,displayText:e,chipColor:i,chipBackgroundColor:n}=t;this.values.push({value:r,displayText:e,chipColor:i,chipBackgroundColor:n});t.source.selected=true;this.lastSelectedOptionElement=t.source}else{t.source.selected=false;this.values.splice(r,1);if(this.lastSelectedOptionElement===t.source)this.lastSelectedOptionElement=null}this.updateValueWithValues()}updateValueWithValues(){this.value=this.values.map((t=>t.value));this.displayText=this.values.length!==0?this.values.map((t=>t.displayText)).join(", "):undefined}handleNormalClick(t){this.options.forEach((t=>{if(t.selected)t.selected=false}));t.source.selected=true;this.value=t.value;this.displayText=t.displayText;this.lastSelectedOptionElement=t.source;this.stateService.send("CLOSE")}disconnectedCallback(){var t;(t=this.stateService)===null||t===void 0?void 0:t.stop()}addRippleEffect(){const t=new O(this.controlEl);t.unbounded=false}get hasValue(){return this.displayText!==undefined}onMouseDown(t){const r=b(t.target)&&(t.offsetX>t.target.clientWidth||t.offsetY>t.target.clientHeight||t.offsetY<0);const e=t.composedPath().filter((t=>{const r=t;return r.nodeName==="svg"&&r.classList.contains("chip")})).length>0;if(!r&&!e){this.stateService.send("CLICK")}}onWindowClickEvent(t){const r=t.composedPath().filter((t=>t.nodeName==="WCS-SELECT"))[0];const e=r===this.el;if(this.expanded&&!e){this.stateService.send("CLOSE")}}onKeyDown(t){if(this.stateService.getSnapshot().matches("closed")){if(f(t)||t.altKey&&u(t)||l(t)){t.preventDefault();t.stopPropagation();this.stateService.send("OPEN");return}if(this.multiple){if(u(t)){this.stateService.send("OPEN")}}else{if(u(t)||d(t)){t.preventDefault();this.selectClosestOption("next")}if(h(t)||p(t)){t.preventDefault();this.selectClosestOption("previous")}else if(v(t)){t.preventDefault();this.selectLastOption()}else if(m(t)||y(t)){t.preventDefault();this.selectFirstOption()}}}else if(this.stateService.getSnapshot().matches("opened")){if(g(t)||t.altKey&&h(t)){this.stateService.send({type:"CLOSE",value:{shouldBlur:false}})}else if(w(t)||t.shiftKey&&w(t)){this.stateService.send({type:"CLOSE",value:{shouldBlur:true}})}else if(u(t)){t.preventDefault();this.focusClosestOption("next")}else if(h(t)){t.preventDefault();this.focusClosestOption("previous")}else if(m(t)||y(t)){t.preventDefault();this.focusFirstOption()}else if(v(t)){t.preventDefault();this.focusLastOption()}}}getClosestActiveOptionIndexForState(t,r){let e=Array.from(this.notDisabledOptions).indexOf(r==="focused"?this.lastFocusedOptionElement:this.lastSelectedOptionElement);if(t==="next"&&e<this.notDisabledOptions.length-1){e++}else if(t==="previous"&&e>0){e--}else{return"nothing"}return e}selectOption(t){this.lastSelectedOptionElement=this.notDisabledOptions[t];this.lastSelectedOptionElement.selected=true;this.sendOptionSelectedToStateMachine({source:this.lastSelectedOptionElement,value:this.value,displayText:this.lastSelectedOptionElement.innerText})}selectClosestOption(t){const r=this.getClosestActiveOptionIndexForState(t,"selected");if(r==="nothing")return;this.selectOption(r)}selectFirstOption(){if(this.notDisabledOptions.length<1){return}this.selectOption(0)}selectLastOption(){if(this.notDisabledOptions.length<1){return}this.selectOption(this.notDisabledOptions.length-1)}focusOption(t){var r;this.lastFocusedOptionElement=this.notDisabledOptions[t];(r=this.lastFocusedOptionElement)===null||r===void 0?void 0:r.focus();this.el.setAttribute("aria-activedescendant",this.lastFocusedOptionElement.id)}focusClosestOption(t){const r=this.getClosestActiveOptionIndexForState(t,"focused");if(r==="nothing")return;this.focusOption(r)}focusFirstOption(){this.focusOption(0)}focusLastOption(){this.focusOption(this.notDisabledOptions.length-1)}selectedOptionChanged(t){this.sendOptionSelectedToStateMachine(t.detail)}sendOptionSelectedToStateMachine(t){this.stateService.send({type:"OPTION_SELECTED",value:t})}onSlotchange(){this.updateSelectedValue(this.value)}removeChip(t){this.options.forEach((r=>{if(r.value===t.value){this.sendOptionSelectedToStateMachine(Object.assign(Object.assign({},t),{source:r}))}}))}componentDidRender(){var t;(t=this.popper)===null||t===void 0?void 0:t.update()}render(){const r=`${this.labelElement?this.labelElement.innerText:""} ${this.hasValue?this.displayText:""}`.trimEnd();return t(i,Object.assign({class:this.expanded?"expanded ":"",overlayDirection:this.overlayDirection},this.focusedAttributes(),{role:"combobox","aria-haspopup":"listbox","aria-disabled":this.disabled?"true":null,"aria-expanded":this.expanded?"true":"false","aria-controls":this.optionsId,"aria-owns":this.optionsId,"aria-multiselectable":this.multiple?"true":"false","aria-label":r}),t("div",{class:"wcs-select-control"},t("div",{class:"wcs-select-value-container"},this.hasValue?this.chips?this.values.map((r=>t(Qr,{disabled:this.disabled,option:r,onRemove:this.removeChip.bind(this)}))):t("label",{class:"wcs-select-value"},this.displayText):t("label",{class:"wcs-select-placeholder"},this.placeholder)),t(a,{up:this.expanded})),t("div",{class:"wcs-select-options",id:this.optionsId,role:"listbox"},t("slot",{name:"wcs-select-option",onSlotchange:this.onSlotchange.bind(this)})))}focusedAttributes(){return!this.disabled?{tabIndex:0}:{}}get el(){return n(this)}static get watchers(){return{value:["onValueChangeHandler"]}}};let te=0;Zr.style=Xr;const re='@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}wcs-select-option{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity;overflow:hidden;display:flex;padding:0 var(--wcs-padding);height:var(--wcs-select-option-height);line-height:42px;cursor:pointer;user-select:none;font-weight:500;font-size:1rem;color:var(--wcs-black)}wcs-select-option::before,wcs-select-option::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}wcs-select-option::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}wcs-select-option::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}wcs-select-option.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}wcs-select-option.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}wcs-select-option.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}wcs-select-option.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}wcs-select-option.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}wcs-select-option::before,wcs-select-option::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}wcs-select-option.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}wcs-select-option::before,wcs-select-option::after{background-color:#999;background-color:var(--mdc-ripple-color, #999)}wcs-select-option:hover::before,wcs-select-option.mdc-ripple-surface--hover::before{opacity:0.1;opacity:var(--mdc-ripple-hover-opacity, 0.1)}wcs-select-option.mdc-ripple-upgraded--background-focused::before,wcs-select-option:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}wcs-select-option:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}wcs-select-option:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.3;opacity:var(--mdc-ripple-press-opacity, 0.3)}wcs-select-option.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.3)}wcs-select-option:hover{color:var(--wcs-primary);background-color:var(--wcs-light)}wcs-select-option:focus{outline:none}wcs-select-option[disabled]{cursor:not-allowed;pointer-events:none;color:var(--wcs-text-disabled)}wcs-select-option[selected]{color:var(--wcs-primary);background-color:var(--wcs-light)}wcs-select-option[multiple] wcs-checkbox{pointer-events:none;margin-right:10px}wcs-select-option[multiple]:hover wcs-checkbox{--wcs-checkbox-border-color:var(--wcs-primary)}';const ee=class{constructor(t){r(this,t);this.wcsSelectOptionClick=e(this,"wcsSelectOptionClick",7);this.selectOptionId=o(this.el.tagName);this.disabled=false;this.selected=false;this.value=undefined;this.chipColor=undefined;this.chipBackgroundColor=undefined;this.multiple=false}componentWillLoad(){if(this.value===undefined){this.value=this.el.innerText||""}}componentDidLoad(){this.mdcRipple=new O(this.el)}chooseOption(t){if(!this.disabled){t.stopPropagation();const r=this.el.innerText;this.wcsSelectOptionClick.emit({source:this.el,value:this.value,displayText:r})}}onMouseDown(t){this.chooseOption(t)}handleKeydown(t){if(f(t)||l(t)){this.chooseOption(t);t.preventDefault();t.stopPropagation()}}render(){return t(i,{id:this.selectOptionId,"aria-selected":this.selected?"true":"false",slot:"wcs-select-option",role:"option",tabindex:"-1"},this.multiple&&t("wcs-checkbox",{tabindex:"-1",checked:this.selected}),t("slot",null))}get el(){return n(this)}};ee.style=re;export{Zr as wcs_select,ee as wcs_select_option};
16
+ //# sourceMappingURL=p-26e7de5c.entry.js.map