@mgdis/mg-components 6.2.0 → 6.4.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 (238) hide show
  1. package/dist/cjs/{index-52d5f3d4.js → index-911898e4.js} +410 -266
  2. package/dist/cjs/index-911898e4.js.map +1 -0
  3. package/dist/cjs/{index-cc11af95.js → index-a3269bfc.js} +3 -3
  4. package/dist/cjs/{index-cc11af95.js.map → index-a3269bfc.js.map} +1 -1
  5. package/dist/cjs/{index.es-ac7c22e3.js → index.es-325100d7.js} +47 -47
  6. package/dist/cjs/index.es-325100d7.js.map +1 -0
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/mg-action-more_36.cjs.entry.js +1414 -983
  9. package/dist/cjs/mg-action-more_36.cjs.entry.js.map +1 -1
  10. package/dist/cjs/mg-alert.cjs.entry.js +17 -12
  11. package/dist/cjs/mg-alert.cjs.entry.js.map +1 -1
  12. package/dist/cjs/mg-components.cjs.js +3 -3
  13. package/dist/cjs/mg-components.cjs.js.map +1 -1
  14. package/dist/cjs/mg-loader.cjs.entry.js +6 -8
  15. package/dist/cjs/mg-loader.cjs.entry.js.map +1 -1
  16. package/dist/cjs/mg-progress.cjs.entry.js +27 -12
  17. package/dist/cjs/mg-progress.cjs.entry.js.map +1 -1
  18. package/dist/collection/collection-manifest.json +2 -2
  19. package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +10 -3
  20. package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js.map +1 -1
  21. package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +15 -4
  22. package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js.map +1 -1
  23. package/dist/collection/components/atoms/mg-badge/mg-badge.js +15 -4
  24. package/dist/collection/components/atoms/mg-badge/mg-badge.js.map +1 -1
  25. package/dist/collection/components/atoms/mg-button/mg-button.conf.js +4 -0
  26. package/dist/collection/components/atoms/mg-button/mg-button.conf.js.map +1 -1
  27. package/dist/collection/components/atoms/mg-button/mg-button.js +112 -12
  28. package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -1
  29. package/dist/collection/components/atoms/mg-card/mg-card.js +1 -1
  30. package/dist/collection/components/atoms/mg-divider/mg-divider.js +9 -1
  31. package/dist/collection/components/atoms/mg-divider/mg-divider.js.map +1 -1
  32. package/dist/collection/components/atoms/mg-icon/mg-icon.js +22 -6
  33. package/dist/collection/components/atoms/mg-icon/mg-icon.js.map +1 -1
  34. package/dist/collection/components/atoms/mg-tag/mg-tag.js +14 -4
  35. package/dist/collection/components/atoms/mg-tag/mg-tag.js.map +1 -1
  36. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +3 -4
  37. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js.map +1 -1
  38. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +28 -6
  39. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
  40. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +50 -13
  41. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js.map +1 -1
  42. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +29 -11
  43. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +1 -1
  44. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +106 -33
  45. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
  46. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +99 -36
  47. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
  48. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +130 -35
  49. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
  50. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +87 -25
  51. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
  52. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +86 -26
  53. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +1 -1
  54. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +92 -30
  55. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
  56. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +109 -32
  57. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
  58. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +109 -29
  59. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
  60. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +67 -21
  61. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
  62. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +16 -70
  63. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js.map +1 -1
  64. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +101 -89
  65. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js.map +1 -1
  66. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +194 -157
  67. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js.map +1 -1
  68. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +19 -8
  69. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -1
  70. package/dist/collection/components/molecules/mg-alert/mg-alert.js +31 -6
  71. package/dist/collection/components/molecules/mg-alert/mg-alert.js.map +1 -1
  72. package/dist/collection/components/molecules/mg-details/mg-details.js +17 -5
  73. package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -1
  74. package/dist/collection/components/molecules/mg-form/mg-form.js +48 -16
  75. package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
  76. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +13 -3
  77. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js.map +1 -1
  78. package/dist/collection/components/molecules/mg-loader/mg-loader.js +5 -5
  79. package/dist/collection/components/molecules/mg-loader/mg-loader.js.map +1 -1
  80. package/dist/collection/components/molecules/mg-message/mg-message.js +22 -6
  81. package/dist/collection/components/molecules/mg-message/mg-message.js.map +1 -1
  82. package/dist/collection/components/molecules/mg-modal/mg-modal.js +54 -11
  83. package/dist/collection/components/molecules/mg-modal/mg-modal.js.map +1 -1
  84. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +28 -9
  85. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js.map +1 -1
  86. package/dist/collection/components/molecules/mg-panel/mg-panel.js +48 -13
  87. package/dist/collection/components/molecules/mg-panel/mg-panel.js.map +1 -1
  88. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +10 -2
  89. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js.map +1 -1
  90. package/dist/collection/components/molecules/mg-popover/mg-popover.js +61 -7
  91. package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
  92. package/dist/collection/components/molecules/mg-progress/mg-progress.js +26 -1
  93. package/dist/collection/components/molecules/mg-progress/mg-progress.js.map +1 -1
  94. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +3 -2
  95. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js.map +1 -1
  96. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +28 -8
  97. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js.map +1 -1
  98. package/dist/collection/utils/behaviors.utils.js +44 -107
  99. package/dist/collection/utils/behaviors.utils.js.map +1 -1
  100. package/dist/components/index.es.js +42 -42
  101. package/dist/components/index.es.js.map +1 -1
  102. package/dist/components/index2.js +2 -2
  103. package/dist/components/mg-action-more.js +15 -12
  104. package/dist/components/mg-action-more.js.map +1 -1
  105. package/dist/components/mg-alert.js +15 -10
  106. package/dist/components/mg-alert.js.map +1 -1
  107. package/dist/components/mg-badge2.js +13 -10
  108. package/dist/components/mg-badge2.js.map +1 -1
  109. package/dist/components/mg-button2.js +77 -16
  110. package/dist/components/mg-button2.js.map +1 -1
  111. package/dist/components/mg-card2.js +1 -1
  112. package/dist/components/mg-character-left2.js +8 -7
  113. package/dist/components/mg-character-left2.js.map +1 -1
  114. package/dist/components/mg-details.js +11 -7
  115. package/dist/components/mg-details.js.map +1 -1
  116. package/dist/components/mg-divider2.js +7 -1
  117. package/dist/components/mg-divider2.js.map +1 -1
  118. package/dist/components/mg-form.js +35 -21
  119. package/dist/components/mg-form.js.map +1 -1
  120. package/dist/components/mg-icon2.js +17 -11
  121. package/dist/components/mg-icon2.js.map +1 -1
  122. package/dist/components/mg-illustrated-message.js +10 -4
  123. package/dist/components/mg-illustrated-message.js.map +1 -1
  124. package/dist/components/mg-input-checkbox-paginated2.js +14 -10
  125. package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
  126. package/dist/components/mg-input-checkbox.js +73 -40
  127. package/dist/components/mg-input-checkbox.js.map +1 -1
  128. package/dist/components/mg-input-date.js +77 -46
  129. package/dist/components/mg-input-date.js.map +1 -1
  130. package/dist/components/mg-input-numeric.js +90 -45
  131. package/dist/components/mg-input-numeric.js.map +1 -1
  132. package/dist/components/mg-input-password.js +56 -28
  133. package/dist/components/mg-input-password.js.map +1 -1
  134. package/dist/components/mg-input-radio.js +59 -31
  135. package/dist/components/mg-input-radio.js.map +1 -1
  136. package/dist/components/mg-input-select2.js +60 -36
  137. package/dist/components/mg-input-select2.js.map +1 -1
  138. package/dist/components/mg-input-text2.js +71 -40
  139. package/dist/components/mg-input-text2.js.map +1 -1
  140. package/dist/components/mg-input-textarea.js +72 -36
  141. package/dist/components/mg-input-textarea.js.map +1 -1
  142. package/dist/components/mg-input-title2.js +11 -8
  143. package/dist/components/mg-input-title2.js.map +1 -1
  144. package/dist/components/mg-input-toggle.js +43 -25
  145. package/dist/components/mg-input-toggle.js.map +1 -1
  146. package/dist/components/mg-input2.js +37 -20
  147. package/dist/components/mg-input2.js.map +1 -1
  148. package/dist/components/mg-item-more2.js +146 -270
  149. package/dist/components/mg-item-more2.js.map +1 -1
  150. package/dist/components/mg-loader.js +4 -6
  151. package/dist/components/mg-loader.js.map +1 -1
  152. package/dist/components/mg-menu-item2.js +193 -149
  153. package/dist/components/mg-menu-item2.js.map +1 -1
  154. package/dist/components/mg-message2.js +21 -9
  155. package/dist/components/mg-message2.js.map +1 -1
  156. package/dist/components/mg-modal.js +36 -17
  157. package/dist/components/mg-modal.js.map +1 -1
  158. package/dist/components/mg-pagination2.js +21 -14
  159. package/dist/components/mg-pagination2.js.map +1 -1
  160. package/dist/components/mg-panel.js +37 -20
  161. package/dist/components/mg-panel.js.map +1 -1
  162. package/dist/components/mg-popover-content2.js +9 -3
  163. package/dist/components/mg-popover-content2.js.map +1 -1
  164. package/dist/components/mg-popover2.js +38 -10
  165. package/dist/components/mg-popover2.js.map +1 -1
  166. package/dist/components/mg-progress.js +26 -11
  167. package/dist/components/mg-progress.js.map +1 -1
  168. package/dist/components/mg-skip-links.js +2 -3
  169. package/dist/components/mg-skip-links.js.map +1 -1
  170. package/dist/components/mg-tabs.js +27 -17
  171. package/dist/components/mg-tabs.js.map +1 -1
  172. package/dist/components/mg-tag.js +12 -8
  173. package/dist/components/mg-tag.js.map +1 -1
  174. package/dist/components/mg-tooltip-content2.js +1 -2
  175. package/dist/components/mg-tooltip-content2.js.map +1 -1
  176. package/dist/components/mg-tooltip2.js +24 -12
  177. package/dist/components/mg-tooltip2.js.map +1 -1
  178. package/dist/esm/{index-81752ffe.js → index-1f32332a.js} +410 -266
  179. package/dist/esm/index-1f32332a.js.map +1 -0
  180. package/dist/esm/{index-f3d3fb70.js → index-9bd10f5d.js} +3 -3
  181. package/dist/esm/{index-f3d3fb70.js.map → index-9bd10f5d.js.map} +1 -1
  182. package/dist/esm/{index.es-940821a9.js → index.es-a2587b72.js} +43 -43
  183. package/dist/esm/index.es-a2587b72.js.map +1 -0
  184. package/dist/esm/loader.js +3 -3
  185. package/dist/esm/mg-action-more_36.entry.js +1414 -983
  186. package/dist/esm/mg-action-more_36.entry.js.map +1 -1
  187. package/dist/esm/mg-alert.entry.js +17 -12
  188. package/dist/esm/mg-alert.entry.js.map +1 -1
  189. package/dist/esm/mg-components.js +4 -4
  190. package/dist/esm/mg-components.js.map +1 -1
  191. package/dist/esm/mg-loader.entry.js +6 -8
  192. package/dist/esm/mg-loader.entry.js.map +1 -1
  193. package/dist/esm/mg-progress.entry.js +27 -12
  194. package/dist/esm/mg-progress.entry.js.map +1 -1
  195. package/dist/mg-components/mg-components.esm.js +1 -1
  196. package/dist/mg-components/mg-components.esm.js.map +1 -1
  197. package/dist/mg-components/p-0ead5317.entry.js +2 -0
  198. package/dist/mg-components/{p-31e6c1a7.entry.js.map → p-0ead5317.entry.js.map} +1 -1
  199. package/dist/mg-components/p-35898742.js +3 -0
  200. package/dist/mg-components/p-35898742.js.map +1 -0
  201. package/dist/mg-components/p-3b052ac0.entry.js +2 -0
  202. package/dist/mg-components/p-3b052ac0.entry.js.map +1 -0
  203. package/dist/mg-components/p-6810a565.entry.js +2 -0
  204. package/dist/mg-components/p-6810a565.entry.js.map +1 -0
  205. package/dist/mg-components/{p-ee51ec5e.js → p-b986c107.js} +2 -2
  206. package/dist/mg-components/p-b986c107.js.map +1 -0
  207. package/dist/mg-components/{p-a49e2b74.js → p-dc436f3c.js} +2 -2
  208. package/dist/mg-components/p-f48d964f.entry.js +2 -0
  209. package/dist/mg-components/p-f48d964f.entry.js.map +1 -0
  210. package/dist/types/components/atoms/mg-button/mg-button.conf.d.ts +9 -1
  211. package/dist/types/components/atoms/mg-button/mg-button.d.ts +11 -1
  212. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +6 -0
  213. package/dist/types/components/molecules/internals/mg-item-more/mg-item-more.d.ts +1 -15
  214. package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +14 -30
  215. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +46 -37
  216. package/dist/types/components/molecules/mg-alert/mg-alert.d.ts +4 -0
  217. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +4 -0
  218. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +4 -0
  219. package/dist/types/components.d.ts +33 -15
  220. package/dist/types/utils/behaviors.utils.d.ts +15 -44
  221. package/ide/intellij/web-types.json +39 -11
  222. package/ide/vscode/html-custom-data.json +28 -6
  223. package/package.json +27 -37
  224. package/dist/cjs/index-52d5f3d4.js.map +0 -1
  225. package/dist/cjs/index.es-ac7c22e3.js.map +0 -1
  226. package/dist/esm/index-81752ffe.js.map +0 -1
  227. package/dist/esm/index.es-940821a9.js.map +0 -1
  228. package/dist/mg-components/p-2298352f.js +0 -3
  229. package/dist/mg-components/p-2298352f.js.map +0 -1
  230. package/dist/mg-components/p-31e6c1a7.entry.js +0 -2
  231. package/dist/mg-components/p-67c9be27.entry.js +0 -2
  232. package/dist/mg-components/p-67c9be27.entry.js.map +0 -1
  233. package/dist/mg-components/p-95895169.entry.js +0 -2
  234. package/dist/mg-components/p-95895169.entry.js.map +0 -1
  235. package/dist/mg-components/p-abddacc2.entry.js +0 -2
  236. package/dist/mg-components/p-abddacc2.entry.js.map +0 -1
  237. package/dist/mg-components/p-ee51ec5e.js.map +0 -1
  238. /package/dist/mg-components/{p-a49e2b74.js.map → p-dc436f3c.js.map} +0 -0
@@ -1,17 +1,11 @@
1
1
  /**
2
- * MgItemMore type guard
3
- * @param element - element to control type
4
- * @returns truthy if element is mg-item-more
2
+ *
5
3
  */
6
- const isMgItemMore = (element) => element.nodeName === 'MG-ITEM-MORE';
7
- export const OverflowBehaviorElements = {
8
- BASE_INDEX: 'data-overflow-base-index',
9
- PROXY_INDEX: 'data-overflow-proxy-index',
10
- };
11
4
  export class OverflowBehavior {
12
- constructor(element, render) {
13
- this.element = element;
14
- this.render = render;
5
+ constructor(parentElement, itemMoreElement, itemMoreContainerElement) {
6
+ this.parentElement = parentElement;
7
+ this.itemMoreElement = itemMoreElement;
8
+ this.itemMoreContainerElement = itemMoreContainerElement;
15
9
  /**********
16
10
  * Public *
17
11
  **********/
@@ -25,116 +19,59 @@ export class OverflowBehavior {
25
19
  * Internal *
26
20
  ************/
27
21
  /**
28
- * run overflow behavior
29
- * @param width - width of the container. Optional.
30
- */
31
- this.run = (width) => {
32
- if (this._moreElement === undefined) {
33
- // set moreElement
34
- this._moreElement = this.render();
35
- // set children
36
- this._baseChildren = this.getInteractiveItems(this.element);
37
- if (isMgItemMore(this._moreElement)) {
38
- this._proxyChildren = this.getInteractiveItems(this._moreElement.shadowRoot.querySelector('mg-menu'));
39
- }
40
- // update children
41
- this._baseChildren.forEach((child, index) => {
42
- child.setAttribute(OverflowBehaviorElements.BASE_INDEX, `${index}`);
43
- // set moreElement children
44
- this._proxyChildren[index].setAttribute(OverflowBehaviorElements.PROXY_INDEX, `${index}`);
45
- });
46
- }
47
- if (width !== undefined)
48
- this.updateDisplayedItems(width);
49
- };
50
- /**
51
- * Get interactive children filtred by authorized nodeName ['MG-MENU-ITEM', 'MG-BUTTON']
52
- * @param element - element to parse
53
- * @returns children
54
- */
55
- this.getInteractiveItems = (element) => { var _a; return (((_a = element.children) === null || _a === void 0 ? void 0 : _a.length) > 0 ? Array.from(element.children) : []).filter(element => ['MG-MENU-ITEM', 'MG-BUTTON'].includes(element.nodeName)); };
56
- /**
57
- * Update displayed items in container from a given available space
58
- * @param availableWidth - available width in container to display child items
22
+ * Utility method to know if element is HTMLMgItemMoreElement
23
+ * @param element - element to match with 'MORE' element
24
+ * @returns truthy if element is the 'MORE' element
59
25
  */
60
- this.updateDisplayedItems = (availableWidth) => {
61
- this.restoreItems();
62
- const acc = { accWidth: 0, previousItem: null };
63
- [...this._baseChildren, this._moreElement].forEach((child) => {
64
- acc.accWidth += child.offsetWidth;
65
- const hasPreviuosItem = acc.previousItem !== null;
66
- const isPreviousItemHidden = hasPreviuosItem && acc.previousItem.hasAttribute('hidden');
67
- // if previous item is hidden AND is NOT more element we hide current
68
- // OR if item has an overflow we hide current
69
- // OR if current item is more element AND have NOT previous hidden items, current more element item is an hidden item
70
- // ELSE current is a display item
71
- this.toggleItem(child, (isPreviousItemHidden && !this.isMoreElement(child)) || this.isOverflowElement(acc.accWidth, child, availableWidth) || (this.isMoreElement(child) && !isPreviousItemHidden));
72
- // update previous item with current item
73
- acc.previousItem = child;
74
- });
75
- };
26
+ this.isMoreElement = (element) => element === this.itemMoreElement;
76
27
  /**
77
28
  * Utility method to know if item overflow partialy or totaly in the container
78
29
  * @param cumulateWidth - previous sibling elements cumulate width + item width
79
30
  * @param item - item HTML element
80
- * @param availableWidth - container available width
81
31
  * @returns truthy if element is overflow
82
32
  */
83
- this.isOverflowElement = (cumulateWidth, item, availableWidth) => {
84
- if (item.previousElementSibling === null || this.isMoreElement(item))
85
- return false;
86
- else if (!this.isMoreElement(item.nextElementSibling))
87
- return cumulateWidth + this._moreElement.offsetWidth > availableWidth;
88
- else
89
- return cumulateWidth > availableWidth;
90
- };
91
- /**
92
- * Utility method to know if a given element is the 'MORE' element
93
- * @param element - element to match with 'MORE' element
94
- * @returns truthy if element is the 'MORE' element
95
- */
96
- this.isMoreElement = (element) => element.nodeName === 'MG-ITEM-MORE';
97
- /**
98
- * Toggle display item element
99
- * @param item - item to control
100
- * @param isHidden - is item hidden
101
- */
102
- this.toggleItem = (item, isHidden) => {
103
- const mgActionMenuindex = Number(item.getAttribute(OverflowBehaviorElements.BASE_INDEX));
104
- if (this.isMoreElement(item))
105
- this.toggleElement(this._moreElement, isHidden);
106
- else if (mgActionMenuindex >= 0) {
107
- this.toggleElement(item, isHidden);
108
- this.toggleElement(this._proxyChildren[mgActionMenuindex], !isHidden);
33
+ this.isOverflowElement = (cumulateWidth, item) => {
34
+ const displayMgItemMore = this.itemMoreContainerElement.children.length > 0;
35
+ if (!this.isMoreElement(item)) {
36
+ if (item.nextElementSibling.nodeName !== 'MG-ITEM-MORE' && !displayMgItemMore)
37
+ return cumulateWidth + this.itemMoreElement.offsetWidth > this._availableWidth;
38
+ else
39
+ return cumulateWidth > this._availableWidth;
109
40
  }
110
- };
111
- /**
112
- * Toggle element's hide attribute
113
- * @param element - element to toggle
114
- * @param isHidden - element is hidden
115
- */
116
- this.toggleElement = (element, isHidden) => {
117
- if (isHidden)
118
- element.setAttribute('hidden', '');
119
41
  else
120
- element.removeAttribute('hidden');
42
+ return !displayMgItemMore;
121
43
  };
122
44
  /**
123
- * Remove hidden attributes on all items
45
+ * Toogle item from isHidden condition
46
+ * @param item - item to update
47
+ * @param isHidden - item is hidden
124
48
  */
125
- this.restoreItems = () => {
126
- [...this._baseChildren, this._moreElement].forEach(item => item.removeAttribute('hidden'));
49
+ this.toggleItem = (item, isHidden) => {
50
+ if (this.isMoreElement(item) && isHidden)
51
+ item.setAttribute('hidden', '');
52
+ else if (this.isMoreElement(item) && !isHidden)
53
+ item.removeAttribute('hidden');
54
+ else if (!this.isMoreElement(item) && isHidden)
55
+ this.itemMoreContainerElement.appendChild(item);
56
+ else if (!this.isMoreElement(item) && item.parentElement !== this.parentElement)
57
+ this.parentElement.insertBefore(item, this.itemMoreElement);
127
58
  };
128
- if (this._resizeObserver === undefined) {
129
- // add resize observer
130
- this._resizeObserver = new ResizeObserver(entries => {
131
- entries.forEach(entry => {
132
- this.run(entry.contentRect.width);
133
- });
134
- });
135
- this._resizeObserver.observe(this.element);
59
+ if (!this.parentElement || !this.itemMoreElement || !this.itemMoreContainerElement) {
60
+ throw new Error('OverflowBehavior - all construtor params are required');
136
61
  }
137
- this.run();
62
+ const items = Array.from(this.parentElement.children);
63
+ this._resizeObserver = new ResizeObserver(entries => {
64
+ this._availableWidth = entries.map(entry => entry.contentRect.width).sort((a, b) => a - b).shift();
65
+ // reset items
66
+ items.forEach(item => this.toggleItem(item, false));
67
+ let accWidth = 0;
68
+ items.forEach((item, index) => {
69
+ accWidth += item.offsetWidth;
70
+ if (index)
71
+ this.toggleItem(item, this.isOverflowElement(accWidth, item));
72
+ });
73
+ });
74
+ this._resizeObserver.observe(this.parentElement);
138
75
  }
139
76
  }
140
77
  //# sourceMappingURL=behaviors.utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"behaviors.utils.js","sourceRoot":"","sources":["../../src/utils/behaviors.utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,YAAY,GAAG,CAAC,OAAoB,EAAoC,EAAE,CAAC,OAAO,CAAC,QAAQ,KAAK,cAAc,CAAC;AAErH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,UAAU,EAAE,0BAA0B;IACtC,WAAW,EAAE,2BAA2B;CACzC,CAAC;AAEF,MAAM,OAAO,gBAAgB;IAO3B,YACU,OAAgB,EAChB,MAAyB;QADzB,YAAO,GAAP,OAAO,CAAS;QAChB,WAAM,GAAN,MAAM,CAAmB;QAcnC;;oBAEY;QAEZ;;WAEG;QACI,eAAU,GAAG,GAAS,EAAE;YAC7B,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC;QACpC,CAAC,CAAC;QAEF;;sBAEc;QAEd;;;WAGG;QACK,QAAG,GAAG,CAAC,KAAc,EAAQ,EAAE;YACrC,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;gBACpC,kBAAkB;gBAClB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;gBAElC,eAAe;gBACf,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAC5D,IAAI,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;oBACpC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAA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;QAC7C,CAAC;QACD,IAAI,CAAC,GAAG,EAAE,CAAC;IACb,CAAC;CA8HF","sourcesContent":["/**\n * MgItemMore type guard\n * @param element - element to control type\n * @returns truthy if element is mg-item-more\n */\nconst isMgItemMore = (element: HTMLElement): element is HTMLMgItemMoreElement => element.nodeName === 'MG-ITEM-MORE';\n\nexport const OverflowBehaviorElements = {\n BASE_INDEX: 'data-overflow-base-index',\n PROXY_INDEX: 'data-overflow-proxy-index',\n};\n\nexport class OverflowBehavior {\n // variables\n private _resizeObserver: ResizeObserver;\n private _moreElement: HTMLElement;\n private _baseChildren: Element[];\n private _proxyChildren: Element[];\n\n constructor(\n private element: Element,\n private render: () => HTMLElement,\n ) {\n if (this._resizeObserver === undefined) {\n // add resize observer\n this._resizeObserver = new ResizeObserver(entries => {\n entries.forEach(entry => {\n this.run(entry.contentRect.width);\n });\n });\n this._resizeObserver.observe(this.element);\n }\n this.run();\n }\n\n /**********\n * Public *\n **********/\n\n /**\n * Disconnect ResizeObserver\n */\n public disconnect = (): void => {\n this._resizeObserver.disconnect();\n };\n\n /************\n * Internal *\n ************/\n\n /**\n * run overflow behavior\n * @param width - width of the container. Optional.\n */\n private run = (width?: number): void => {\n if (this._moreElement === undefined) {\n // set moreElement\n this._moreElement = this.render();\n\n // set children\n this._baseChildren = this.getInteractiveItems(this.element);\n if (isMgItemMore(this._moreElement)) {\n this._proxyChildren = this.getInteractiveItems(this._moreElement.shadowRoot.querySelector('mg-menu'));\n }\n\n // update children\n this._baseChildren.forEach((child, index) => {\n child.setAttribute(OverflowBehaviorElements.BASE_INDEX, `${index}`);\n // set moreElement children\n this._proxyChildren[index].setAttribute(OverflowBehaviorElements.PROXY_INDEX, `${index}`);\n });\n }\n\n if (width !== undefined) this.updateDisplayedItems(width);\n };\n\n /**\n * Get interactive children filtred by authorized nodeName ['MG-MENU-ITEM', 'MG-BUTTON']\n * @param element - element to parse\n * @returns children\n */\n private getInteractiveItems = (element: Element) =>\n (element.children?.length > 0 ? Array.from(element.children) : []).filter(element => ['MG-MENU-ITEM', 'MG-BUTTON'].includes(element.nodeName));\n\n /**\n * Update displayed items in container from a given available space\n * @param availableWidth - available width in container to display child items\n */\n private updateDisplayedItems = (availableWidth: number): void => {\n this.restoreItems();\n const acc = { accWidth: 0, previousItem: null };\n [...this._baseChildren, this._moreElement].forEach((child: HTMLMgMenuItemElement | HTMLMgItemMoreElement) => {\n acc.accWidth += child.offsetWidth;\n const hasPreviuosItem = acc.previousItem !== null;\n const isPreviousItemHidden = hasPreviuosItem && acc.previousItem.hasAttribute('hidden');\n // if previous item is hidden AND is NOT more element we hide current\n // OR if item has an overflow we hide current\n // OR if current item is more element AND have NOT previous hidden items, current more element item is an hidden item\n // ELSE current is a display item\n this.toggleItem(\n child,\n (isPreviousItemHidden && !this.isMoreElement(child)) || this.isOverflowElement(acc.accWidth, child, availableWidth) || (this.isMoreElement(child) && !isPreviousItemHidden),\n );\n\n // update previous item with current item\n acc.previousItem = child;\n });\n };\n\n /**\n * Utility method to know if item overflow partialy or totaly in the container\n * @param cumulateWidth - previous sibling elements cumulate width + item width\n * @param item - item HTML element\n * @param availableWidth - container available width\n * @returns truthy if element is overflow\n */\n private isOverflowElement = (cumulateWidth: number, item: HTMLElement, availableWidth: number): boolean => {\n if (item.previousElementSibling === null || this.isMoreElement(item)) return false;\n else if (!this.isMoreElement(item.nextElementSibling)) return cumulateWidth + this._moreElement.offsetWidth > availableWidth;\n else return cumulateWidth > availableWidth;\n };\n\n /**\n * Utility method to know if a given element is the 'MORE' element\n * @param element - element to match with 'MORE' element\n * @returns truthy if element is the 'MORE' element\n */\n private isMoreElement = (element: Element): boolean => element.nodeName === 'MG-ITEM-MORE';\n\n /**\n * Toggle display item element\n * @param item - item to control\n * @param isHidden - is item hidden\n */\n private toggleItem = (item: HTMLElement, isHidden: boolean): void => {\n const mgActionMenuindex = Number(item.getAttribute(OverflowBehaviorElements.BASE_INDEX));\n if (this.isMoreElement(item)) this.toggleElement(this._moreElement, isHidden);\n else if (mgActionMenuindex >= 0) {\n this.toggleElement(item, isHidden);\n this.toggleElement(this._proxyChildren[mgActionMenuindex], !isHidden);\n }\n };\n\n /**\n * Toggle element's hide attribute\n * @param element - element to toggle\n * @param isHidden - element is hidden\n */\n private toggleElement = (element: Element, isHidden: boolean): void => {\n if (isHidden) element.setAttribute('hidden', '');\n else element.removeAttribute('hidden');\n };\n\n /**\n * Remove hidden attributes on all items\n */\n private restoreItems = (): void => {\n [...this._baseChildren, this._moreElement].forEach(item => item.removeAttribute('hidden'));\n };\n}\n"]}
1
+ {"version":3,"file":"behaviors.utils.js","sourceRoot":"","sources":["../../src/utils/behaviors.utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAK3B,YACU,aAA0B,EAC1B,eAA6B,EAC7B,wBAAqC;QAFrC,kBAAa,GAAb,aAAa,CAAa;QAC1B,oBAAe,GAAf,eAAe,CAAc;QAC7B,6BAAwB,GAAxB,wBAAwB,CAAa;QAuB/C;;oBAEY;QAEZ;;WAEG;QACI,eAAU,GAAG,GAAS,EAAE;YAC7B,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC;QACpC,CAAC,CAAC;QAEF;;sBAEc;QAEd;;;;WAIG;QACK,kBAAa,GAAG,CAAC,OAAoB,EAAoC,EAAE,CAAC,OAAO,KAAK,IAAI,CAAC,eAAe,CAAC;QAErH;;;;;WAKG;QACK,sBAAiB,GAAG,CAAC,aAAqB,EAAE,IAAiB,EAAW,EAAE;YAChF,MAAM,iBAAiB,GAAG,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAA;YAC3E,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC9B,IAAI,IAAI,CAAC,kBAAkB,CAAC,QAAQ,KAAK,cAAc,IAAI,CAAC,iBAAiB;oBAAE,OAAO,aAAa,GAAG,IAAI,CAAC,eAAe,CAAC,WAAW,GAAG,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AAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;YACnG,cAAc;YACd,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;YAEpD,IAAI,QAAQ,GAAG,CAAC,CAAC;YAEjB,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;gBAC5B,QAAQ,IAAI,IAAI,CAAC,WAAW,CAAC;gBAC7B,IAAG,KAAK;oBAAE,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAA;YACzE,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACnD,CAAC;CAkDF","sourcesContent":["/**\n * \n */\nexport class OverflowBehavior {\n // variables\n private _resizeObserver: ResizeObserver;\n private _availableWidth: number;\n\n constructor(\n private parentElement: HTMLElement,\n private itemMoreElement: HTMLElement,\n private itemMoreContainerElement: HTMLElement\n ) {\n if(!this.parentElement || !this.itemMoreElement || !this.itemMoreContainerElement) {\n throw new Error('OverflowBehavior - all construtor params are required')\n }\n\n const items = Array.from(this.parentElement.children) as HTMLElement[]\n\n this._resizeObserver = new ResizeObserver(entries => {\n this._availableWidth = entries.map(entry => entry.contentRect.width).sort((a, b) => a - b).shift();\n // reset items\n items.forEach(item => this.toggleItem(item, false));\n \n let accWidth = 0;\n\n items.forEach((item, index) => {\n accWidth += item.offsetWidth;\n if(index) this.toggleItem(item, this.isOverflowElement(accWidth, item))\n });\n });\n this._resizeObserver.observe(this.parentElement);\n }\n\n /**********\n * Public *\n **********/\n\n /**\n * Disconnect ResizeObserver\n */\n public disconnect = (): void => {\n this._resizeObserver.disconnect();\n };\n\n /************\n * Internal *\n ************/\n\n /**\n * Utility method to know if element is HTMLMgItemMoreElement\n * @param element - element to match with 'MORE' element\n * @returns truthy if element is the 'MORE' element\n */\n private isMoreElement = (element: HTMLElement): element is HTMLMgItemMoreElement => element === this.itemMoreElement;\n\n /**\n * Utility method to know if item overflow partialy or totaly in the container\n * @param cumulateWidth - previous sibling elements cumulate width + item width\n * @param item - item HTML element\n * @returns truthy if element is overflow\n */\n private isOverflowElement = (cumulateWidth: number, item: HTMLElement): boolean => {\n const displayMgItemMore = this.itemMoreContainerElement.children.length > 0\n if (!this.isMoreElement(item)) {\n if (item.nextElementSibling.nodeName !== 'MG-ITEM-MORE' && !displayMgItemMore) return cumulateWidth + this.itemMoreElement.offsetWidth > this._availableWidth;\n else return cumulateWidth > this._availableWidth;\n }\n else return !displayMgItemMore;\n };\n\n /**\n * Toogle item from isHidden condition\n * @param item - item to update\n * @param isHidden - item is hidden\n */\n private toggleItem = (item: HTMLElement, isHidden: boolean):void => {\n if (this.isMoreElement(item) && isHidden) item.setAttribute('hidden', '');\n else if(this.isMoreElement(item) && !isHidden) item.removeAttribute('hidden');\n else if (!this.isMoreElement(item) && isHidden) this.itemMoreContainerElement.appendChild(item)\n else if(!this.isMoreElement(item) && item.parentElement !== this.parentElement) this.parentElement.insertBefore(item, this.itemMoreElement)\n }\n}\n"]}
@@ -1,13 +1,13 @@
1
- var ve = Object.defineProperty;
2
- var he = (e, t, s) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
- var g = (e, t, s) => he(e, typeof t != "symbol" ? t + "" : t, s);
4
- const qe = (e = "", t = 10) => {
1
+ var pe = Object.defineProperty;
2
+ var ge = (e, t, s) => t in e ? pe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var g = (e, t, s) => ge(e, typeof t != "symbol" ? t + "" : t, s);
4
+ const ze = (e = "", t = 10) => {
5
5
  const s = new Uint8Array(t);
6
6
  crypto.getRandomValues(s);
7
- const r = Array.from(s).map((o) => o.toString(16).padStart(2, "0")).join("").slice(0, t);
7
+ const r = Array.from(s).map((n) => n.toString(16).padStart(2, "0")).join("").slice(0, t);
8
8
  return e !== "" ? `${e}-${r}` : r;
9
- }, Ge = (e) => me(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;
10
- class Xe {
9
+ }, Ie = (e) => ye(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;
10
+ class Ge {
11
11
  constructor(t = []) {
12
12
  /**
13
13
  * Available classes
@@ -42,89 +42,89 @@ class Xe {
42
42
  this.classes = t;
43
43
  }
44
44
  }
45
- const Je = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Ke = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Qe = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', Ze = (e) => {
46
- const t = te(e), s = se(e);
45
+ const Xe = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Ke = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Qe = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', Ze = (e) => {
46
+ const t = V(e), s = ee(e);
47
47
  return [e, ...t, ...s];
48
- }, te = (e, t = []) => {
48
+ }, V = (e, t = []) => {
49
49
  if (e.self !== e.top)
50
50
  try {
51
51
  const s = e.parent;
52
- return s ? (t.push(s), te(s, t)) : t;
52
+ return s ? (t.push(s), V(s, t)) : t;
53
53
  } catch (s) {
54
54
  return console.error("Different hosts between iframes:", s), t;
55
55
  }
56
56
  return t;
57
- }, se = (e, t = []) => {
57
+ }, ee = (e, t = []) => {
58
58
  if (e.frames.length > 0)
59
59
  for (const s of Array.from(e.frames))
60
- t.push(s), se(s, t);
60
+ t.push(s), ee(s, t);
61
61
  return t;
62
- }, me = (e) => typeof e == "string" && e.trim() !== "", Ye = (e) => typeof e == "object" ? JSON.stringify(e) : `${e}`, Ve = (e) => typeof e == "number" && !Number.isNaN(e), et = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, tt = async (e) => e();
63
- var be = Object.defineProperty, Se = (e, t) => {
62
+ }, ye = (e) => typeof e == "string" && e.trim() !== "", Je = (e) => typeof e == "object" ? JSON.stringify(e) : `${e}`, Ye = (e) => typeof e == "number" && !Number.isNaN(e), Ve = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, et = async (e) => e();
63
+ var ve = Object.defineProperty, me = (e, t) => {
64
64
  for (var s in t)
65
- be(e, s, { get: t[s], enumerable: !0 });
65
+ ve(e, s, { get: t[s], enumerable: !0 });
66
66
  };
67
- var Ae = {};
68
- Se(Ae, {
69
- err: () => oe,
70
- map: () => Ee,
71
- ok: () => U,
72
- unwrap: () => je,
73
- unwrapErr: () => Re
67
+ var Te = {};
68
+ me(Te, {
69
+ err: () => se,
70
+ map: () => xe,
71
+ ok: () => P,
72
+ unwrap: () => Ae,
73
+ unwrapErr: () => Ee
74
74
  });
75
- var U = (e) => ({
75
+ var P = (e) => ({
76
76
  isOk: !0,
77
77
  isErr: !1,
78
78
  value: e
79
- }), oe = (e) => ({
79
+ }), se = (e) => ({
80
80
  isOk: !1,
81
81
  isErr: !0,
82
82
  value: e
83
83
  });
84
- function Ee(e, t) {
84
+ function xe(e, t) {
85
85
  if (e.isOk) {
86
86
  const s = t(e.value);
87
- return s instanceof Promise ? s.then((r) => U(r)) : U(s);
87
+ return s instanceof Promise ? s.then((r) => P(r)) : P(s);
88
88
  }
89
89
  if (e.isErr) {
90
90
  const s = e.value;
91
- return oe(s);
91
+ return se(s);
92
92
  }
93
93
  throw "should never get here";
94
94
  }
95
- var je = (e) => {
95
+ var Ae = (e) => {
96
96
  if (e.isOk)
97
97
  return e.value;
98
98
  throw e.value;
99
- }, Re = (e) => {
99
+ }, Ee = (e) => {
100
100
  if (e.isErr)
101
101
  return e.value;
102
102
  throw e.value;
103
103
  };
104
- const ct = (e) => {
104
+ const at = (e) => {
105
105
  const t = { value: "2023", pattern: "yyyy" }, s = { value: "12", pattern: "mm" }, r = { value: "24", pattern: "dd" };
106
- return ze([t.value, s.value, r.value].join("-"), e, { timeZone: "UTC" }).replace(t.value, t.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);
107
- }, ft = (e) => e.toISOString().split("T")[0], We = (e, t, s) => {
108
- const r = e.closest("[lang]"), o = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), n = o.length > 0 && typeof o[0] == "string" ? o[0] : navigator.language || s, i = n.split("-").shift();
106
+ return Pe([t.value, s.value, r.value].join("-"), e, { timeZone: "UTC" }).replace(t.value, t.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);
107
+ }, ct = (e) => e.toISOString().split("T")[0], He = (e, t, s) => {
108
+ const r = e.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), o = n.length > 0 && typeof n[0] == "string" ? n[0] : navigator.language || s, i = o.split("-").shift();
109
109
  return Object.keys(t).length === 0 ? {
110
- locale: n,
110
+ locale: o,
111
111
  messages: { lang: s }
112
112
  } : {
113
- locale: n,
113
+ locale: o,
114
114
  messages: t[i] || t[s] || { lang: s }
115
115
  };
116
- }, ut = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), $t = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), dt = (e, t, s = 0) => new Intl.NumberFormat(t, {
116
+ }, ft = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), ut = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), dt = (e, t, s = 0) => new Intl.NumberFormat(t, {
117
117
  style: "percent",
118
118
  minimumFractionDigits: s,
119
119
  maximumFractionDigits: s
120
- }).format(e), pt = (e, t, s, r = "short", o = 0) => new Intl.NumberFormat(t, {
120
+ }).format(e), $t = (e, t, s, r = "short", n = 0) => new Intl.NumberFormat(t, {
121
121
  style: "unit",
122
122
  unit: s,
123
123
  unitDisplay: r,
124
- minimumFractionDigits: o,
125
- maximumFractionDigits: o
126
- }).format(e), He = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, ze = (e, t, s) => typeof e != "string" || e === "" || !He.test(e) ? "" : new Intl.DateTimeFormat(t, s).format(new Date(e)), gt = (e, t) => (s) => We(s, e, t);
124
+ minimumFractionDigits: n,
125
+ maximumFractionDigits: n
126
+ }).format(e), Be = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, Pe = (e, t, s) => typeof e != "string" || e === "" || !Be.test(e) ? "" : new Intl.DateTimeFormat(t, s).format(new Date(e)), pt = (e, t) => (s) => He(s, e, t);
127
127
 
128
- export { $t as $, Ge as G, He as H, Je as J, Ke as K, Qe as Q, Ve as V, Xe as X, Ye as Y, Ze as Z, ct as c, dt as d, et as e, ft as f, gt as g, me as m, pt as p, qe as q, tt as t, ut as u, ze as z };
128
+ export { $t as $, Be as B, Ge as G, Ie as I, Je as J, Ke as K, Pe as P, Qe as Q, Ve as V, Xe as X, Ye as Y, Ze as Z, at as a, ct as c, dt as d, et as e, ft as f, pt as p, ut as u, ye as y, ze as z };
129
129
 
130
130
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"file":"index.es.js","mappings":"AAAA,IAAI,EAAE,GAAG,MAAM,CAAC,cAAc,CAAC;AAI/B,IAAI,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC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AC1B,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,+CAA+C,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,QAAQ,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;;;;","names":[],"sources":["../stencil-helpers/dist/index.es.js"],"sourcesContent":["var ve = Object.defineProperty;\nvar X = (e) => {\n throw TypeError(e);\n};\nvar he = (e, t, s) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;\nvar g = (e, t, s) => he(e, typeof t != \"symbol\" ? t + \"\" : t, s), ye = (e, t, s) => t.has(e) || X(\"Cannot \" + s);\nvar k = (e, t, s) => (ye(e, t, \"read from private field\"), s ? s.call(e) : t.get(e)), P = (e, t, s) => t.has(e) ? X(\"Cannot add the same private member more than once\") : t instanceof WeakSet ? t.add(e) : t.set(e, s);\nconst qe = (e = \"\", t = 10) => {\n const s = new Uint8Array(t);\n crypto.getRandomValues(s);\n const r = Array.from(s).map((o) => o.toString(16).padStart(2, \"0\")).join(\"\").slice(0, t);\n return e !== \"\" ? `${e}-${r}` : r;\n}, Ge = (e) => me(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;\nclass Xe {\n constructor(t = []) {\n /**\n * Available classes\n */\n g(this, \"classes\");\n /**\n * Add class\n * @param className - class name to add\n */\n g(this, \"add\", (t) => {\n this.has(t) || this.classes.push(t);\n });\n /**\n * Delete class\n * @param className - class name to delete\n */\n g(this, \"delete\", (t) => {\n const s = this.classes.indexOf(t);\n s > -1 && this.classes.splice(s, 1);\n });\n /**\n * Check if class exist in list\n * @param className - class name to check\n * @returns class name is in the list\n */\n g(this, \"has\", (t) => this.classes.includes(t));\n /**\n * Join classes seperated by spaces\n * @returns joined values\n */\n g(this, \"join\", () => this.classes.join(\" \"));\n this.classes = t;\n }\n}\nconst Je = (e) => Array.isArray(e) && e.every((t) => typeof t == \"string\"), Ke = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Qe = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]), [identifier], mg-button', Ze = (e) => {\n const t = te(e), s = se(e);\n return [e, ...t, ...s];\n}, te = (e, t = []) => {\n if (e.self !== e.top)\n try {\n const s = e.parent;\n return s ? (t.push(s), te(s, t)) : t;\n } catch (s) {\n return console.error(\"Different hosts between iframes:\", s), t;\n }\n return t;\n}, se = (e, t = []) => {\n if (e.frames.length > 0)\n for (const s of Array.from(e.frames))\n t.push(s), se(s, t);\n return t;\n}, me = (e) => typeof e == \"string\" && e.trim() !== \"\", Ye = (e) => typeof e == \"object\" ? JSON.stringify(e) : `${e}`, Ve = (e) => typeof e == \"number\" && !Number.isNaN(e), et = (e) => typeof e == \"string\" ? e.toLocaleLowerCase().normalize(\"NFD\").replaceAll(/[\\u0300-\\u036f]/g, \"\") : e, tt = async (e) => e();\nvar E = {\n allRenderFn: !1,\n cmpDidLoad: !0,\n cmpDidUnload: !1,\n cmpDidUpdate: !0,\n cmpDidRender: !0,\n cmpWillLoad: !0,\n cmpWillUpdate: !0,\n cmpWillRender: !0,\n connectedCallback: !0,\n disconnectedCallback: !0,\n element: !0,\n event: !0,\n hasRenderFn: !0,\n lifecycle: !0,\n hostListener: !0,\n hostListenerTargetWindow: !0,\n hostListenerTargetDocument: !0,\n hostListenerTargetBody: !0,\n hostListenerTargetParent: !1,\n hostListenerTarget: !0,\n member: !0,\n method: !0,\n mode: !0,\n observeAttribute: !0,\n prop: !0,\n propMutable: !0,\n reflect: !0,\n scoped: !0,\n shadowDom: !0,\n slot: !0,\n cssAnnotations: !0,\n state: !0,\n style: !0,\n formAssociated: !1,\n svg: !0,\n updatable: !0,\n vdomAttribute: !0,\n vdomXlink: !0,\n vdomClass: !0,\n vdomFunctional: !0,\n vdomKey: !0,\n vdomListener: !0,\n vdomRef: !0,\n vdomPropOrAttr: !0,\n vdomRender: !0,\n vdomStyle: !0,\n vdomText: !0,\n watchCallback: !0,\n taskQueue: !0,\n hotModuleReplacement: !1,\n isDebug: !1,\n isDev: !1,\n isTesting: !1,\n hydrateServerSide: !1,\n hydrateClientSide: !1,\n lifecycleDOMEvents: !1,\n lazyLoad: !1,\n profile: !1,\n slotRelocation: !0,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n appendChildSlotFix: !1,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n cloneNodeFix: !1,\n hydratedAttribute: !1,\n hydratedClass: !0,\n // TODO(STENCIL-1305): remove this option\n scriptDataOpts: !1,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n scopedSlotTextContentFix: !1,\n // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field\n shadowDomShim: !1,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n slotChildNodesFix: !1,\n invisiblePrehydration: !0,\n propBoolean: !0,\n propNumber: !0,\n propString: !0,\n constructableCSS: !0,\n cmpShouldUpdate: !0,\n devTools: !1,\n shadowDelegatesFocus: !0,\n initializeNextTick: !1,\n asyncLoading: !0,\n asyncQueue: !1,\n transformTagName: !1,\n attachStyles: !0,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n experimentalSlotFixes: !1\n}, be = Object.defineProperty, Se = (e, t) => {\n for (var s in t)\n be(e, s, { get: t[s], enumerable: !0 });\n}, J = (e, t) => t in e, K = \"http://www.w3.org/1999/xlink\", B = typeof window < \"u\" ? window : {}, M = B.document || { head: {} };\nB.HTMLElement;\nvar j = {\n $flags$: 0,\n $resourcesUrl$: \"\",\n jmp: (e) => e(),\n raf: (e) => requestAnimationFrame(e),\n ael: (e, t, s, r) => e.addEventListener(t, s, r),\n rel: (e, t, s, r) => e.removeEventListener(t, s, r),\n ce: (e, t) => new CustomEvent(e, t)\n}, Q = {}, Te = \"http://www.w3.org/2000/svg\", ke = \"http://www.w3.org/1999/xhtml\", xe = (e) => e != null, re = (e) => (e = typeof e, e === \"object\" || e === \"function\"), Ae = {};\nSe(Ae, {\n err: () => oe,\n map: () => Ee,\n ok: () => U,\n unwrap: () => je,\n unwrapErr: () => Re\n});\nvar U = (e) => ({\n isOk: !0,\n isErr: !1,\n value: e\n}), oe = (e) => ({\n isOk: !1,\n isErr: !0,\n value: e\n});\nfunction Ee(e, t) {\n if (e.isOk) {\n const s = t(e.value);\n return s instanceof Promise ? s.then((r) => U(r)) : U(s);\n }\n if (e.isErr) {\n const s = e.value;\n return oe(s);\n }\n throw \"should never get here\";\n}\nvar je = (e) => {\n if (e.isOk)\n return e.value;\n throw e.value;\n}, Re = (e) => {\n if (e.isErr)\n return e.value;\n throw e.value;\n}, Le = (e, t, ...s) => {\n let r = null, o = null, n = null, i = !1, a = !1;\n const c = [], d = (l) => {\n for (let $ = 0; $ < l.length; $++)\n r = l[$], Array.isArray(r) ? d(r) : r != null && typeof r != \"boolean\" && ((i = !re(r)) && (r = String(r)), i && a ? c[c.length - 1].$text$ += r : c.push(i ? W(null, r) : r), a = i);\n };\n d(s);\n const f = W(e, null);\n return f.$attrs$ = t, c.length > 0 && (f.$children$ = c), f.$key$ = o, f.$name$ = n, f;\n}, W = (e, t) => {\n const s = {\n $flags$: 0,\n $tag$: e,\n $text$: t,\n $elm$: null,\n $children$: null\n };\n return s.$attrs$ = null, s.$key$ = null, s.$name$ = null, s;\n}, Oe = {}, Ne = (e) => e && e.$tag$ === Oe, Z = (e, t, s, r, o, n) => {\n if (s !== r) {\n let i = J(e, t), a = t.toLowerCase();\n if (t === \"class\") {\n const c = e.classList, d = Y(s), f = Y(r);\n c.remove(...d.filter((l) => l && !f.includes(l))), c.add(...f.filter((l) => l && !d.includes(l)));\n } else if (t === \"style\") {\n for (const c in s)\n (!r || r[c] == null) && (c.includes(\"-\") ? e.style.removeProperty(c) : e.style[c] = \"\");\n for (const c in r)\n (!s || r[c] !== s[c]) && (c.includes(\"-\") ? e.style.setProperty(c, r[c]) : e.style[c] = r[c]);\n } else if (t !== \"key\") if (t === \"ref\")\n r && r(e);\n else if (!e.__lookupSetter__(t) && t[0] === \"o\" && t[1] === \"n\") {\n if (t[2] === \"-\" ? t = t.slice(3) : J(B, a) ? t = a.slice(2) : t = a[2] + t.slice(3), s || r) {\n const c = t.endsWith(ne);\n t = t.replace(Fe, \"\"), s && j.rel(e, t, s, c), r && j.ael(e, t, r, c);\n }\n } else {\n const c = re(r);\n if ((i || c && r !== null) && !o)\n try {\n if (e.tagName.includes(\"-\"))\n e[t] = r;\n else {\n const f = r ?? \"\";\n t === \"list\" ? i = !1 : (s == null || e[t] != f) && (typeof e.__lookupSetter__(t) == \"function\" ? e[t] = f : e.setAttribute(t, f));\n }\n } catch {\n }\n let d = !1;\n a !== (a = a.replace(/^xlink\\:?/, \"\")) && (t = a, d = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === \"\") && (d ? e.removeAttributeNS(K, t) : e.removeAttribute(t)) : (!i || n & 4 || o) && !c && (r = r === !0 ? \"\" : r, d ? e.setAttributeNS(K, t, r) : e.setAttribute(t, r));\n }\n }\n}, Me = /\\s/, Y = (e) => e ? e.split(Me) : [], ne = \"Capture\", Fe = new RegExp(ne + \"$\"), ie = (e, t, s) => {\n const r = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, o = e && e.$attrs$ || Q, n = t.$attrs$ || Q;\n for (const i of V(Object.keys(o)))\n i in n || Z(r, i, o[i], void 0, s, t.$flags$);\n for (const i of V(Object.keys(n)))\n Z(r, i, o[i], n[i], s, t.$flags$);\n};\nfunction V(e) {\n return e.includes(\"ref\") ? (\n // we need to sort these to ensure that `'ref'` is the last attr\n [...e.filter((t) => t !== \"ref\"), \"ref\"]\n ) : (\n // no need to sort, return the original array\n e\n );\n}\nvar x, H, R, F = !1, _ = !1, I = !1, h = !1, D = (e, t, s, r) => {\n var o;\n const n = t.$children$[s];\n let i = 0, a, c, d;\n if (F || (I = !0, n.$tag$ === \"slot\" && (x && r.classList.add(x + \"-s\"), n.$flags$ |= n.$children$ ? (\n // slot element has fallback content\n // still create an element that \"mocks\" the slot element\n 2\n ) : (\n // slot element does not have fallback content\n // create an html comment we'll use to always reference\n // where actual slot content should sit next to\n 1\n ))), n.$text$ !== null)\n a = n.$elm$ = M.createTextNode(n.$text$);\n else if (n.$flags$ & 1)\n a = n.$elm$ = M.createTextNode(\"\");\n else {\n if (h || (h = n.$tag$ === \"svg\"), a = n.$elm$ = M.createElementNS(\n h ? Te : ke,\n !F && E.slotRelocation && n.$flags$ & 2 ? \"slot-fb\" : n.$tag$\n ), h && n.$tag$ === \"foreignObject\" && (h = !1), ie(null, n, h), !!a.getRootNode().querySelector(\"body\") && E.scoped && xe(x) && a[\"s-si\"] !== x && a.classList.add(a[\"s-si\"] = x), G(a, r), n.$children$)\n for (i = 0; i < n.$children$.length; ++i)\n c = D(e, n, i, a), c && a.appendChild(c);\n n.$tag$ === \"svg\" ? h = !1 : a.tagName === \"foreignObject\" && (h = !0);\n }\n return a[\"s-hn\"] = R, n.$flags$ & 3 && (a[\"s-sr\"] = !0, a[\"s-cr\"] = H, a[\"s-sn\"] = n.$name$ || \"\", a[\"s-rf\"] = (o = n.$attrs$) == null ? void 0 : o.ref, d = e && e.$children$ && e.$children$[s], d && d.$tag$ === n.$tag$ && e.$elm$ && L(e.$elm$, !1)), a;\n}, L = (e, t) => {\n j.$flags$ |= 1;\n const s = Array.from(e.childNodes);\n if (e[\"s-sr\"] && E.experimentalSlotFixes) {\n let r = e;\n for (; r = r.nextSibling; )\n r && r[\"s-sn\"] === e[\"s-sn\"] && r[\"s-sh\"] === R && s.push(r);\n }\n for (let r = s.length - 1; r >= 0; r--) {\n const o = s[r];\n o[\"s-hn\"] !== R && o[\"s-ol\"] && (T(ce(o), o, q(o)), o[\"s-ol\"].remove(), o[\"s-ol\"] = void 0, o[\"s-sh\"] = void 0, I = !0), t && L(o, t);\n }\n j.$flags$ &= -2;\n}, le = (e, t, s, r, o, n) => {\n let i = e[\"s-cr\"] && e[\"s-cr\"].parentNode || e, a;\n for (i.shadowRoot && i.tagName === R && (i = i.shadowRoot); o <= n; ++o)\n r[o] && (a = D(null, s, o, e), a && (r[o].$elm$ = a, T(i, a, q(t))));\n}, ae = (e, t, s) => {\n for (let r = t; r <= s; ++r) {\n const o = e[r];\n if (o) {\n const n = o.$elm$;\n $e(o), n && (_ = !0, n[\"s-ol\"] ? n[\"s-ol\"].remove() : L(n, !0), n.remove());\n }\n }\n}, _e = (e, t, s, r, o = !1) => {\n let n = 0, i = 0, a = 0, c = 0, d = t.length - 1, f = t[0], l = t[d], $ = r.length - 1, u = r[0], p = r[$], m, y;\n for (; n <= d && i <= $; )\n if (f == null)\n f = t[++n];\n else if (l == null)\n l = t[--d];\n else if (u == null)\n u = r[++i];\n else if (p == null)\n p = r[--$];\n else if (N(f, u, o))\n A(f, u, o), f = t[++n], u = r[++i];\n else if (N(l, p, o))\n A(l, p, o), l = t[--d], p = r[--$];\n else if (N(f, p, o))\n (f.$tag$ === \"slot\" || p.$tag$ === \"slot\") && L(f.$elm$.parentNode, !1), A(f, p, o), T(e, f.$elm$, l.$elm$.nextSibling), f = t[++n], p = r[--$];\n else if (N(l, u, o))\n (f.$tag$ === \"slot\" || p.$tag$ === \"slot\") && L(l.$elm$.parentNode, !1), A(l, u, o), T(e, l.$elm$, f.$elm$), l = t[--d], u = r[++i];\n else {\n for (a = -1, c = n; c <= d; ++c)\n if (t[c] && t[c].$key$ !== null && t[c].$key$ === u.$key$) {\n a = c;\n break;\n }\n a >= 0 ? (y = t[a], y.$tag$ !== u.$tag$ ? m = D(t && t[i], s, a, e) : (A(y, u, o), t[a] = void 0, m = y.$elm$), u = r[++i]) : (m = D(t && t[i], s, i, e), u = r[++i]), m && T(ce(f.$elm$), m, q(f.$elm$));\n }\n n > d ? le(\n e,\n r[$ + 1] == null ? null : r[$ + 1].$elm$,\n s,\n r,\n i,\n $\n ) : i > $ && ae(t, n, d);\n}, N = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === \"slot\" ? (\n // The component gets hydrated and no VDOM has been initialized.\n // Here the comparison can't happen as $name$ property is not set for `leftNode`.\n \"$nodeId$\" in e && s && // `leftNode` is not from type HTMLComment which would cause many\n // hydration comments to be removed\n e.$elm$.nodeType !== 8 ? !1 : e.$name$ === t.$name$\n) : s ? !0 : e.$key$ === t.$key$ : !1, q = (e) => e && e[\"s-ol\"] || e, ce = (e) => (e[\"s-ol\"] ? e[\"s-ol\"] : e).parentNode, A = (e, t, s = !1) => {\n const r = t.$elm$ = e.$elm$, o = e.$children$, n = t.$children$, i = t.$tag$, a = t.$text$;\n let c;\n a === null ? (h = i === \"svg\" ? !0 : i === \"foreignObject\" ? !1 : h, i === \"slot\" && !F || ie(e, t, h), o !== null && n !== null ? _e(r, o, t, n, s) : n !== null ? (e.$text$ !== null && (r.textContent = \"\"), le(r, null, t, n, 0, n.length - 1)) : (\n // don't do this on initial render as it can cause non-hydrated content to be removed\n !s && E.updatable && o !== null && ae(o, 0, o.length - 1)\n ), h && i === \"svg\" && (h = !1)) : (c = r[\"s-cr\"]) ? c.parentNode.textContent = a : e.$text$ !== a && (r.data = a);\n}, fe = (e) => {\n const t = e.childNodes;\n for (const s of t)\n if (s.nodeType === 1) {\n if (s[\"s-sr\"]) {\n const r = s[\"s-sn\"];\n s.hidden = !1;\n for (const o of t)\n if (o !== s) {\n if (o[\"s-hn\"] !== s[\"s-hn\"] || r !== \"\") {\n if (o.nodeType === 1 && (r === o.getAttribute(\"slot\") || r === o[\"s-sn\"]) || o.nodeType === 3 && r === o[\"s-sn\"]) {\n s.hidden = !0;\n break;\n }\n } else if (o.nodeType === 1 || o.nodeType === 3 && o.textContent.trim() !== \"\") {\n s.hidden = !0;\n break;\n }\n }\n }\n fe(s);\n }\n}, b = [], ue = (e) => {\n let t, s, r;\n for (const o of e.childNodes) {\n if (o[\"s-sr\"] && (t = o[\"s-cr\"]) && t.parentNode) {\n s = t.parentNode.childNodes;\n const n = o[\"s-sn\"];\n for (r = s.length - 1; r >= 0; r--)\n if (t = s[r], !t[\"s-cn\"] && !t[\"s-nr\"] && t[\"s-hn\"] !== o[\"s-hn\"] && !E.experimentalSlotFixes)\n if (ee(t, n)) {\n let i = b.find((a) => a.$nodeToRelocate$ === t);\n _ = !0, t[\"s-sn\"] = t[\"s-sn\"] || n, i ? (i.$nodeToRelocate$[\"s-sh\"] = o[\"s-hn\"], i.$slotRefNode$ = o) : (t[\"s-sh\"] = o[\"s-hn\"], b.push({\n $slotRefNode$: o,\n $nodeToRelocate$: t\n })), t[\"s-sr\"] && b.map((a) => {\n ee(a.$nodeToRelocate$, t[\"s-sn\"]) && (i = b.find((c) => c.$nodeToRelocate$ === t), i && !a.$slotRefNode$ && (a.$slotRefNode$ = i.$slotRefNode$));\n });\n } else b.some((i) => i.$nodeToRelocate$ === t) || b.push({\n $nodeToRelocate$: t\n });\n }\n o.nodeType === 1 && ue(o);\n }\n}, ee = (e, t) => e.nodeType === 1 ? e.getAttribute(\"slot\") === null && t === \"\" || e.getAttribute(\"slot\") === t : e[\"s-sn\"] === t ? !0 : t === \"\", $e = (e) => {\n e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map($e);\n}, T = (e, t, s) => {\n const r = e == null ? void 0 : e.insertBefore(t, s);\n return G(t, e), r;\n}, de = (e) => {\n const t = [];\n return e && t.push(\n ...e[\"s-scs\"] || [],\n e[\"s-si\"],\n e[\"s-sc\"],\n ...de(e.parentElement)\n ), t;\n}, G = (e, t, s = !1) => {\n var r;\n if (e && t && e.nodeType === 1) {\n const o = new Set(de(t).filter(Boolean));\n if (o.size && ((r = e.classList) == null || r.add(...e[\"s-scs\"] = [...o]), e[\"s-ol\"] || s))\n for (const n of Array.from(e.childNodes))\n G(n, e, !0);\n }\n}, De = (e, t, s = !1) => {\n var r, o, n, i, a;\n const c = e.$hostElement$, d = e.$cmpMeta$, f = e.$vnode$ || W(null, null), l = Ne(t) ? t : Le(null, null, t);\n if (R = c.tagName, d.$attrsToReflect$ && (l.$attrs$ = l.$attrs$ || {}, d.$attrsToReflect$.map(\n ([$, u]) => l.$attrs$[u] = c[$]\n )), s && l.$attrs$)\n for (const $ of Object.keys(l.$attrs$))\n c.hasAttribute($) && ![\"key\", \"ref\", \"style\", \"class\"].includes($) && (l.$attrs$[$] = c[$]);\n l.$tag$ = null, l.$flags$ |= 4, e.$vnode$ = l, l.$elm$ = f.$elm$ = c.shadowRoot || c, x = c[\"s-sc\"], F = (d.$flags$ & 1) !== 0, H = c[\"s-cr\"], _ = !1, A(f, l, s);\n {\n if (j.$flags$ |= 1, I) {\n ue(l.$elm$);\n for (const $ of b) {\n const u = $.$nodeToRelocate$;\n if (!u[\"s-ol\"]) {\n const p = M.createTextNode(\"\");\n p[\"s-nr\"] = u, T(u.parentNode, u[\"s-ol\"] = p, u);\n }\n }\n for (const $ of b) {\n const u = $.$nodeToRelocate$, p = $.$slotRefNode$;\n if (p) {\n const m = p.parentNode;\n let y = p.nextSibling;\n {\n let O = (r = u[\"s-ol\"]) == null ? void 0 : r.previousSibling;\n for (; O; ) {\n let v = (o = O[\"s-nr\"]) != null ? o : null;\n if (v && v[\"s-sn\"] === u[\"s-sn\"] && m === v.parentNode) {\n for (v = v.nextSibling; v === u || v != null && v[\"s-sr\"]; )\n v = v == null ? void 0 : v.nextSibling;\n if (!v || !v[\"s-nr\"]) {\n y = v;\n break;\n }\n }\n O = O.previousSibling;\n }\n }\n (!y && m !== u.parentNode || u.nextSibling !== y) && u !== y && (!u[\"s-hn\"] && u[\"s-ol\"] && (u[\"s-hn\"] = u[\"s-ol\"].parentNode.nodeName), T(m, u, y), u.nodeType === 1 && (u.hidden = (n = u[\"s-ih\"]) != null ? n : !1)), u && typeof p[\"s-rf\"] == \"function\" && p[\"s-rf\"](u);\n } else\n u.nodeType === 1 && (s && (u[\"s-ih\"] = (i = u.hidden) != null ? i : !1), u.hidden = !0);\n }\n }\n _ && fe(l.$elm$), j.$flags$ &= -2, b.length = 0;\n }\n if (E.experimentalScopedSlotChanges && d.$flags$ & 2)\n for (const $ of l.$elm$.childNodes)\n $[\"s-hn\"] !== R && !$[\"s-sh\"] && (s && $[\"s-ih\"] == null && ($[\"s-ih\"] = (a = $.hidden) != null ? a : !1), $.hidden = !0);\n H = void 0;\n};\nconst Ce = (e, t, s) => {\n [null, void 0, \"\", !1].includes(s) || [\"innerHTML\", \"style\"].includes(t) || e.setAttribute(t, [\"object\", \"function\"].includes(typeof s) ? \"/!\\\\ Object props are not rendered in the code example\" : s);\n}, pe = (e, t, s, r, o) => {\n if (t && typeof t == \"string\") {\n const n = document.createElement(t);\n Object.keys(s || {}).forEach((i) => {\n Ce(n, i, s[i]);\n }), r == null || r.forEach((i) => {\n pe(n, i.$tag$, i.$attrs$, i.$children$, i.$text$);\n }), s != null && s.innerHTML && (n.innerHTML = s.innerHTML), e.appendChild(n);\n }\n o && (e.innerHTML = o);\n}, st = (e, t) => {\n const s = {};\n if (typeof e != \"object\")\n throw new Error(\"filterArgs - args isn't an object.\");\n for (const r in e)\n if (!r.startsWith(\"slot\")) {\n const o = e[r], n = r.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n (!t || !Object.keys(t).includes(r) || t[r] !== o) && (s[n] = o);\n }\n return s;\n}, rt = (e, t) => {\n var r, o;\n const s = document.getElementById(\"storybook-root\");\n if (s !== null)\n return (o = document.querySelector(\"[lang]\")) == null || o.setAttribute(\"lang\", ((r = t.globals) == null ? void 0 : r.locale) || \"en\"), De(\n {\n $ancestorComponent$: void 0,\n $flags$: 0,\n $modeName$: void 0,\n $cmpMeta$: {\n $flags$: 0,\n $tagName$: s.tagName\n },\n $hostElement$: s\n },\n e(t)\n ), s.children[s.children.length - 1];\n}, ot = ({ $tag$: e, $attrs$: t, $children$: s, $text$: r }) => {\n const o = document.createElement(\"div\");\n return pe(o, e, t, s, r), o.innerHTML;\n}, C = (e, t) => {\n if (!t)\n return;\n const s = t.split(\"/\");\n return `${e}${s.slice(2, s.length - 1).join(\"-\")}--docs`;\n};\nvar S, w;\nclass nt {\n constructor(t) {\n /**\n * JsonDocs\n */\n g(this, \"jsonDoc\");\n /**\n * Get component data from the jsonDoc\n * @param tagName - tag name we want to get the data from\n * @returns component data\n */\n P(this, S, (t) => this.jsonDoc.components.find((s) => s.tag === t));\n /**\n * Get the control for the given prop\n * Based on https://storybook.js.org/docs/api/arg-types#controltype\n * @param prop - prop to get control for\n * @returns control type and options if applicable\n */\n P(this, w, (t) => {\n const s = t.type.replace(/\"([^\"]+)\"/g, \"$1\").replace(/\\s/g, \"\").replace(/\\(.*?\\)/g, (r) => r.replace(/\\|/g, \" OR \")).split(\"|\").map((r) => r.trim().replace(/ OR /g, \"|\"));\n return t.type === \"string\" ? { control: { type: \"text\" } } : t.type === \"number\" ? { control: { type: \"number\" } } : t.type === \"boolean\" ? { control: { type: \"boolean\" } } : t.type.startsWith(\"{\") && t.type.endsWith(\"}\") ? { control: { type: \"object\" } } : s.length > 1 ? s.includes(\"string\") ? { control: { type: \"text\" } } : s.every((r) => r == null ? void 0 : r.includes(\"[]\")) ? { control: { type: \"object\" } } : (s.unshift(void 0), { control: { type: \"select\" }, options: s }) : { control: { type: \"object\" } };\n });\n /**\n * Extract component arg types from the component data\n * @param tagName - tag name we want to extract the arg types from\n * @returns component arg types\n */\n g(this, \"extractArgTypes\", (t) => {\n const s = k(this, S).call(this, t), r = s == null ? void 0 : s.props.reduce((f, l) => {\n const { control: $, options: u } = k(this, w).call(this, l);\n return {\n ...f,\n [l.name]: {\n name: l.attr || l.name,\n description: l.docs,\n type: { required: l.required },\n table: {\n category: \"props\",\n type: { summary: l.type },\n defaultValue: { summary: l.default }\n },\n control: $,\n options: u\n }\n };\n }, {}), o = s == null ? void 0 : s.events.reduce(\n (f, l) => ({\n ...f,\n [l.event]: {\n name: l.event,\n description: l.docs,\n table: {\n category: \"events\",\n type: { summary: l.detail }\n }\n }\n }),\n {}\n ), n = s == null ? void 0 : s.methods.reduce(\n (f, l) => ({\n ...f,\n [l.name]: {\n name: l.name,\n description: l.docs,\n table: {\n category: \"methods\",\n type: { summary: l.signature }\n }\n }\n }),\n {}\n ), i = s == null ? void 0 : s.slots.reduce(\n (f, l) => ({\n ...f,\n [l.name]: {\n name: l.name !== \"\" ? l.name : \"default\",\n // default slot are unnamed\n description: l.docs,\n table: {\n category: \"slots\",\n type: { summary: void 0 }\n }\n }\n }),\n {}\n ), a = s == null ? void 0 : s.styles.reduce(\n (f, l) => ({\n ...f,\n [l.name]: {\n name: l.name,\n description: l.docs,\n table: {\n category: \"custom properties\",\n type: { summary: void 0 }\n }\n }\n }),\n {}\n ), c = s == null ? void 0 : s.dependencies.reduce((f, l) => {\n const $ = k(this, S).call(this, l);\n return {\n ...f,\n [l]: {\n name: l,\n description: `<a href=\"./?path=/docs/${C(\"\", $ == null ? void 0 : $.filePath)}\">View Component Documentation</a>`,\n table: {\n category: \"depends on\",\n type: { summary: void 0 }\n }\n }\n };\n }, {}), d = s == null ? void 0 : s.dependents.reduce((f, l) => {\n const $ = k(this, S).call(this, l);\n return {\n ...f,\n [l]: {\n name: l,\n description: `<a href=\"./?path=/docs/${C(\"\", $ == null ? void 0 : $.filePath)}\">View Component Documentation</a>`,\n table: {\n category: \"used by\",\n type: { summary: void 0 }\n }\n }\n };\n }, {});\n return {\n ...r,\n ...o,\n ...n,\n ...i,\n ...a,\n ...c,\n ...d\n };\n });\n /**\n * Extract component description from the component data\n * @param tagName - tag name we want to extract the description from\n * @returns component description\n */\n g(this, \"extractComponentDescription\", (t) => {\n const s = k(this, S).call(this, t);\n return (s == null ? void 0 : s.readme) || (s == null ? void 0 : s.docs);\n });\n this.jsonDoc = t;\n }\n}\nS = new WeakMap(), w = new WeakMap();\nconst we = (e, t) => {\n if (t)\n return `${e}${t}`;\n}, ge = (e) => {\n let t = e.overview ? `${e.overview}\n\n` : \"\";\n const s = e.props.filter(({ attr: o }) => o !== void 0);\n s.length && (t += `Attributes:\n`, t += s.map(({ attr: o, docs: n }) => `- \\`${o}\\`: ${n}\n`).join(\"\"), t += `\n`);\n const r = e.props.filter(({ attr: o }) => o === void 0);\n return r.length && (t += `Properties:\n`, t += r.map(({ name: o, docs: n }) => `- \\`${o}\\`: ${n}\n`).join(\"\"), t += `\n`), e.methods.length && (t += `Methods:\n`, t += e.methods.map(({ name: o, docs: n }) => `- \\`${o}\\`: ${n}\n`).join(\"\"), t += `\n`), e.events.length && (t += `Events:\n`, t += e.events.map(({ event: o, docs: n }) => `- \\`${o}\\`: ${n}\n`).join(\"\"), t += `\n`), e.listeners.length && (t += `Listeners:\n`, t += e.listeners.map(({ event: o }) => `- \\`${o}\\`\n`).join(\"\"), t += `\n`), e.slots.length && (t += `Slots:\n`, t += e.slots.map(({ name: o, docs: n }) => `- \\`${o}\\`: ${n}\n`).join(\"\"), t += `\n`), t;\n}, z = (e) => `${e.docs}\n\nType: \\`${e.type}\\``, it = (e, t, s, r) => ({\n $schema: \"https://json.schemastore.org/web-types\",\n name: e,\n version: t,\n \"description-markup\": \"markdown\",\n contributions: {\n html: {\n elements: s.components.map((o) => {\n const n = C(r, o.filePath);\n return {\n name: o.tag,\n description: ge(o),\n \"doc-url\": n,\n attributes: o.props.filter((i) => i.attr).map((i) => ({\n name: i.attr,\n description: z(i),\n \"doc-url\": n,\n value: {\n type: i.type,\n default: i.default,\n required: i.required\n }\n })),\n js: {\n properties: o.props.map((i) => ({\n name: i.name,\n description: z(i),\n \"doc-url\": n,\n value: {\n type: i.type,\n default: i.default,\n required: i.required\n }\n })),\n events: o.events.map((i) => ({\n name: i.event,\n description: i.docs\n }))\n },\n css: {\n properties: o.styles.map((i) => ({\n name: i.name,\n description: i.docs\n }))\n }\n };\n })\n }\n }\n}), Pe = (e, t, s) => [\n { name: \"Storybook\", url: C(e, s) },\n { name: \"Sources\", url: we(t, s) }\n], Ue = (e) => {\n if (!e.values.some(({ value: t }) => t === void 0))\n return e.values.map(({ value: t }) => ({ name: t }));\n}, lt = (e, t, s) => ({\n version: 1.1,\n tags: e.components.map((r) => {\n const o = Pe(t, s, r.filePath);\n return {\n name: r.tag,\n description: ge(r),\n attributes: r.props.map((n) => ({\n name: n.attr || n.name,\n description: z(n),\n values: Ue(n),\n references: o\n })),\n references: o\n };\n }),\n globalAttributes: [],\n valueSets: []\n}), at = (e) => ({\n version: 1.1,\n properties: e.components.flatMap(\n (t) => t.styles.map((s) => ({\n name: s.name,\n description: s.docs\n }))\n )\n}), ct = (e) => {\n const t = { value: \"2023\", pattern: \"yyyy\" }, s = { value: \"12\", pattern: \"mm\" }, r = { value: \"24\", pattern: \"dd\" };\n return ze([t.value, s.value, r.value].join(\"-\"), e, { timeZone: \"UTC\" }).replace(t.value, t.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);\n}, ft = (e) => e.toISOString().split(\"T\")[0], We = (e, t, s) => {\n const r = e.closest(\"[lang]\"), o = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), n = o.length > 0 && typeof o[0] == \"string\" ? o[0] : navigator.language || s, i = n.split(\"-\").shift();\n return Object.keys(t).length === 0 ? {\n locale: n,\n messages: { lang: s }\n } : {\n locale: n,\n messages: t[i] || t[s] || { lang: s }\n };\n}, ut = (e, t, s) => new Intl.NumberFormat(t, { style: \"currency\", currency: s }).format(e), $t = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), dt = (e, t, s = 0) => new Intl.NumberFormat(t, {\n style: \"percent\",\n minimumFractionDigits: s,\n maximumFractionDigits: s\n}).format(e), pt = (e, t, s, r = \"short\", o = 0) => new Intl.NumberFormat(t, {\n style: \"unit\",\n unit: s,\n unitDisplay: r,\n minimumFractionDigits: o,\n maximumFractionDigits: o\n}).format(e), He = /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$/, ze = (e, t, s) => typeof e != \"string\" || e === \"\" || !He.test(e) ? \"\" : new Intl.DateTimeFormat(t, s).format(new Date(e)), gt = (e, t) => (s) => We(s, e, t), vt = ({ disconnect: e, observe: t, takeRecords: s }) => {\n class r {\n constructor(n) {\n /**\n *\n */\n g(this, \"disconnect\", e);\n /**\n *\n */\n g(this, \"observe\", t);\n /**\n *\n */\n g(this, \"takeRecords\", s);\n /**\n *\n */\n g(this, \"cb\");\n this.cb = n;\n }\n }\n return [window, global].forEach((o) => {\n Object.defineProperty(o, \"MutationObserver\", {\n writable: !0,\n configurable: !0,\n value: r\n });\n }), r;\n}, ht = ({ disconnect: e, observe: t }) => {\n class s {\n constructor(o) {\n /**\n *\n */\n g(this, \"disconnect\", e);\n /**\n *\n */\n g(this, \"observe\", t);\n /**\n *\n */\n g(this, \"unobserve\");\n /**\n *\n */\n g(this, \"cb\");\n this.cb = o;\n }\n }\n return [window, global].forEach((r) => {\n Object.defineProperty(r, \"ResizeObserver\", {\n writable: !0,\n configurable: !0,\n value: s\n });\n }), s;\n};\nclass Be extends Event {\n constructor() {\n super(...arguments);\n /**\n *\n */\n g(this, \"detail\");\n }\n // eslint-disable-line @typescript-eslint/no-explicit-any\n}\nconst yt = () => {\n class e extends Be {\n }\n return [window, global].forEach((t) => {\n Object.defineProperty(t, \"SubmitEvent\", {\n writable: !0,\n configurable: !0,\n value: e\n });\n }), e;\n};\nexport {\n Xe as ClassList,\n nt as StorybookPreview,\n Je as allItemsAreString,\n et as cleanString,\n qe as createID,\n He as dateRegExp,\n ft as dateToString,\n gt as defineLocales,\n st as filterArgs,\n Qe as focusableElements,\n ct as getLocaleDatePattern,\n te as getParentWindows,\n ot as getStoryHTML,\n C as getStorybookUrl,\n Ze as getWindows,\n Ke as isTagName,\n Ve as isValidNumber,\n me as isValidString,\n Ge as isValideID,\n ut as localeCurrency,\n ze as localeDate,\n $t as localeNumber,\n dt as localePercent,\n pt as localeUnit,\n tt as nextTick,\n vt as setupMutationObserverMock,\n ht as setupResizeObserverMock,\n yt as setupSubmitEventMock,\n rt as stencilWrapper,\n Ye as toString,\n at as vsCodeCssGenerator,\n lt as vsCodeGenerator,\n it as webTypesGenerator\n};\n//# sourceMappingURL=index.es.js.map\n"],"version":3}
1
+ {"file":"index.es.js","mappings":"AAAA,IAAI,EAAE,GAAG,MAAM,CAAC,cAAc,CAAC;AAI/B,IAAI,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAC9G,IAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,IAAI,QAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAiD;AAE5G,MAAC,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK;AAC/B,EAAE,MAAM,CAAC,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;AAC9B,EAAE,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;AAC5B,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC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{ enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;\nvar g = (e, t, s) => ge(e, typeof t != \"symbol\" ? t + \"\" : t, s), he = (e, t, s) => t.has(e) || G(\"Cannot \" + s);\nvar T = (e, t, s) => (he(e, t, \"read from private field\"), s ? s.call(e) : t.get(e)), B = (e, t, s) => t.has(e) ? G(\"Cannot add the same private member more than once\") : t instanceof WeakSet ? t.add(e) : t.set(e, s);\nconst ze = (e = \"\", t = 10) => {\n const s = new Uint8Array(t);\n crypto.getRandomValues(s);\n const r = Array.from(s).map((n) => n.toString(16).padStart(2, \"0\")).join(\"\").slice(0, t);\n return e !== \"\" ? `${e}-${r}` : r;\n}, Ie = (e) => ye(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;\nclass Ge {\n constructor(t = []) {\n /**\n * Available classes\n */\n g(this, \"classes\");\n /**\n * Add class\n * @param className - class name to add\n */\n g(this, \"add\", (t) => {\n this.has(t) || this.classes.push(t);\n });\n /**\n * Delete class\n * @param className - class name to delete\n */\n g(this, \"delete\", (t) => {\n const s = this.classes.indexOf(t);\n s > -1 && this.classes.splice(s, 1);\n });\n /**\n * Check if class exist in list\n * @param className - class name to check\n * @returns class name is in the list\n */\n g(this, \"has\", (t) => this.classes.includes(t));\n /**\n * Join classes seperated by spaces\n * @returns joined values\n */\n g(this, \"join\", () => this.classes.join(\" \"));\n this.classes = t;\n }\n}\nconst Xe = (e) => Array.isArray(e) && e.every((t) => typeof t == \"string\"), Ke = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Qe = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]), [identifier], mg-button', Ze = (e) => {\n const t = V(e), s = ee(e);\n return [e, ...t, ...s];\n}, V = (e, t = []) => {\n if (e.self !== e.top)\n try {\n const s = e.parent;\n return s ? (t.push(s), V(s, t)) : t;\n } catch (s) {\n return console.error(\"Different hosts between iframes:\", s), t;\n }\n return t;\n}, ee = (e, t = []) => {\n if (e.frames.length > 0)\n for (const s of Array.from(e.frames))\n t.push(s), ee(s, t);\n return t;\n}, ye = (e) => typeof e == \"string\" && e.trim() !== \"\", Je = (e) => typeof e == \"object\" ? JSON.stringify(e) : `${e}`, Ye = (e) => typeof e == \"number\" && !Number.isNaN(e), Ve = (e) => typeof e == \"string\" ? e.toLocaleLowerCase().normalize(\"NFD\").replaceAll(/[\\u0300-\\u036f]/g, \"\") : e, et = async (e) => e();\nvar H = {\n allRenderFn: !1,\n cmpDidLoad: !0,\n cmpDidUnload: !1,\n cmpDidUpdate: !0,\n cmpDidRender: !0,\n cmpWillLoad: !0,\n cmpWillUpdate: !0,\n cmpWillRender: !0,\n connectedCallback: !0,\n disconnectedCallback: !0,\n element: !0,\n event: !0,\n hasRenderFn: !0,\n lifecycle: !0,\n hostListener: !0,\n hostListenerTargetWindow: !0,\n hostListenerTargetDocument: !0,\n hostListenerTargetBody: !0,\n hostListenerTargetParent: !1,\n hostListenerTarget: !0,\n member: !0,\n method: !0,\n mode: !0,\n observeAttribute: !0,\n prop: !0,\n propMutable: !0,\n reflect: !0,\n scoped: !0,\n shadowDom: !0,\n slot: !0,\n cssAnnotations: !0,\n state: !0,\n style: !0,\n formAssociated: !1,\n svg: !0,\n updatable: !0,\n vdomAttribute: !0,\n vdomXlink: !0,\n vdomClass: !0,\n vdomFunctional: !0,\n vdomKey: !0,\n vdomListener: !0,\n vdomRef: !0,\n vdomPropOrAttr: !0,\n vdomRender: !0,\n vdomStyle: !0,\n vdomText: !0,\n watchCallback: !0,\n taskQueue: !0,\n hotModuleReplacement: !1,\n isDebug: !1,\n isDev: !1,\n isTesting: !1,\n hydrateServerSide: !1,\n hydrateClientSide: !1,\n lifecycleDOMEvents: !1,\n lazyLoad: !1,\n profile: !1,\n slotRelocation: !0,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n appendChildSlotFix: !1,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n cloneNodeFix: !1,\n hydratedAttribute: !1,\n hydratedClass: !0,\n // TODO(STENCIL-1305): remove this option\n scriptDataOpts: !1,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n scopedSlotTextContentFix: !1,\n // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field\n shadowDomShim: !1,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n slotChildNodesFix: !1,\n invisiblePrehydration: !0,\n propBoolean: !0,\n propNumber: !0,\n propString: !0,\n constructableCSS: !0,\n cmpShouldUpdate: !0,\n devTools: !1,\n shadowDelegatesFocus: !0,\n initializeNextTick: !1,\n asyncLoading: !0,\n asyncQueue: !1,\n transformTagName: !1,\n attachStyles: !0,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n experimentalSlotFixes: !1\n}, ve = Object.defineProperty, me = (e, t) => {\n for (var s in t)\n ve(e, s, { get: t[s], enumerable: !0 });\n}, be = \"http://www.w3.org/2000/svg\", Se = \"http://www.w3.org/1999/xhtml\", X = (e, t) => t in e, K = \"http://www.w3.org/1999/xlink\", z = typeof window < \"u\" ? window : {}, R = z.document || { head: {} };\nz.HTMLElement;\nvar A = {\n $flags$: 0,\n $resourcesUrl$: \"\",\n jmp: (e) => e(),\n raf: (e) => requestAnimationFrame(e),\n ael: (e, t, s, r) => e.addEventListener(t, s, r),\n rel: (e, t, s, r) => e.removeEventListener(t, s, r),\n ce: (e, t) => new CustomEvent(e, t)\n}, ke = (e) => e != null && e !== void 0, te = (e) => (e = typeof e, e === \"object\" || e === \"function\"), Te = {};\nme(Te, {\n err: () => se,\n map: () => xe,\n ok: () => P,\n unwrap: () => Ae,\n unwrapErr: () => Ee\n});\nvar P = (e) => ({\n isOk: !0,\n isErr: !1,\n value: e\n}), se = (e) => ({\n isOk: !1,\n isErr: !0,\n value: e\n});\nfunction xe(e, t) {\n if (e.isOk) {\n const s = t(e.value);\n return s instanceof Promise ? s.then((r) => P(r)) : P(s);\n }\n if (e.isErr) {\n const s = e.value;\n return se(s);\n }\n throw \"should never get here\";\n}\nvar Ae = (e) => {\n if (e.isOk)\n return e.value;\n throw e.value;\n}, Ee = (e) => {\n if (e.isErr)\n return e.value;\n throw e.value;\n}, re = (e) => {\n const t = e.__childNodes || e.childNodes;\n e.tagName && e.tagName.includes(\"-\") && e[\"s-cr\"] && e.tagName !== \"SLOT-FB\" && ne(t, e.tagName).forEach((s) => {\n var r;\n s.nodeType === 1 && s.tagName === \"SLOT-FB\" && ((r = je(s, s[\"s-sn\"], !1)) != null && r.length ? s.hidden = !0 : s.hidden = !1);\n });\n for (const s of t)\n s.nodeType === 1 && (s.__childNodes || s.childNodes).length && re(s);\n}, ne = (e, t, s) => {\n let r = 0, n = [], o;\n for (; r < e.length; r++)\n o = e[r], o[\"s-sr\"] && o[\"s-hn\"] === t && n.push(o), n = [...n, ...ne(o.childNodes, t)];\n return n;\n}, je = (e, t, s = !0) => {\n const r = [];\n for ((s && e[\"s-sr\"] || !e[\"s-sr\"]) && r.push(e); (e = e.nextSibling) && e[\"s-sn\"] === t; )\n r.push(e);\n return r;\n}, Q = (e, t) => e.nodeType === 1 ? e.getAttribute(\"slot\") === null && t === \"\" || e.getAttribute(\"slot\") === t : e[\"s-sn\"] === t ? !0 : t === \"\", _e = (e, t, ...s) => {\n let r = null, n = null, o = null, i = !1, u = !1;\n const a = [], $ = (l) => {\n for (let d = 0; d < l.length; d++)\n r = l[d], Array.isArray(r) ? $(r) : r != null && typeof r != \"boolean\" && ((i = !te(r)) && (r = String(r)), i && u ? a[a.length - 1].$text$ += r : a.push(i ? W(null, r) : r), u = i);\n };\n $(s);\n const f = W(e, null);\n return f.$attrs$ = t, a.length > 0 && (f.$children$ = a), f.$key$ = n, f.$name$ = o, f;\n}, W = (e, t) => {\n const s = {\n $flags$: 0,\n $tag$: e,\n $text$: t,\n $elm$: null,\n $children$: null\n };\n return s.$attrs$ = null, s.$key$ = null, s.$name$ = null, s;\n}, Le = {}, Oe = (e) => e && e.$tag$ === Le, Z = (e, t, s, r, n, o) => {\n if (s !== r) {\n let i = X(e, t), u = t.toLowerCase();\n if (t === \"class\") {\n const a = e.classList, $ = J(s);\n let f = J(r);\n e[\"s-si\"] ? (f.push(e[\"s-si\"]), $.forEach((l) => {\n l.startsWith(e[\"s-si\"]) && f.push(l);\n }), f = [...new Set(f)], a.add(...f), delete e[\"s-si\"]) : (a.remove(...$.filter((l) => l && !f.includes(l))), a.add(...f.filter((l) => l && !$.includes(l))));\n } else if (t === \"style\") {\n for (const a in s)\n (!r || r[a] == null) && (a.includes(\"-\") ? e.style.removeProperty(a) : e.style[a] = \"\");\n for (const a in r)\n (!s || r[a] !== s[a]) && (a.includes(\"-\") ? e.style.setProperty(a, r[a]) : e.style[a] = r[a]);\n } else if (t !== \"key\") if (t === \"ref\")\n r && r(e);\n else if (!e.__lookupSetter__(t) && t[0] === \"o\" && t[1] === \"n\") {\n if (t[2] === \"-\" ? t = t.slice(3) : X(z, u) ? t = u.slice(2) : t = u[2] + t.slice(3), s || r) {\n const a = t.endsWith(ie);\n t = t.replace(Fe, \"\"), s && A.rel(e, t, s, a), r && A.ael(e, t, r, a);\n }\n } else {\n const a = te(r);\n if ((i || a && r !== null) && !n)\n try {\n if (e.tagName.includes(\"-\"))\n e[t] = r;\n else {\n const f = r ?? \"\";\n t === \"list\" ? i = !1 : (s == null || e[t] != f) && (typeof e.__lookupSetter__(t) == \"function\" ? e[t] = f : e.setAttribute(t, f));\n }\n } catch {\n }\n let $ = !1;\n u !== (u = u.replace(/^xlink\\:?/, \"\")) && (t = u, $ = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === \"\") && ($ ? e.removeAttributeNS(K, t) : e.removeAttribute(t)) : (!i || o & 4 || n) && !a && (r = r === !0 ? \"\" : r, $ ? e.setAttributeNS(K, t, r) : e.setAttribute(t, r));\n }\n }\n}, Re = /\\s/, J = (e) => (typeof e == \"object\" && \"baseVal\" in e && (e = e.baseVal), e ? e.split(Re) : []), ie = \"Capture\", Fe = new RegExp(ie + \"$\"), oe = (e, t, s) => {\n const r = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, n = e && e.$attrs$ || {}, o = t.$attrs$ || {};\n for (const i of Y(Object.keys(n)))\n i in o || Z(r, i, n[i], void 0, s, t.$flags$);\n for (const i of Y(Object.keys(o)))\n Z(r, i, n[i], o[i], s, t.$flags$);\n};\nfunction Y(e) {\n return e.includes(\"ref\") ? (\n // we need to sort these to ensure that `'ref'` is the last attr\n [...e.filter((t) => t !== \"ref\"), \"ref\"]\n ) : (\n // no need to sort, return the original array\n e\n );\n}\nvar F, N, E, M = !1, D = !1, I = !1, y = !1, C = (e, t, s) => {\n var r;\n const n = t.$children$[s];\n let o = 0, i, u, a;\n if (M || (I = !0, n.$tag$ === \"slot\" && (n.$flags$ |= n.$children$ ? (\n // slot element has fallback content\n // still create an element that \"mocks\" the slot element\n 2\n ) : (\n // slot element does not have fallback content\n // create an html comment we'll use to always reference\n // where actual slot content should sit next to\n 1\n ))), n.$text$ !== null)\n i = n.$elm$ = R.createTextNode(n.$text$);\n else if (n.$flags$ & 1)\n i = n.$elm$ = R.createTextNode(\"\");\n else {\n if (y || (y = n.$tag$ === \"svg\"), i = n.$elm$ = R.createElementNS(\n y ? be : Se,\n !M && H.slotRelocation && n.$flags$ & 2 ? \"slot-fb\" : n.$tag$\n ), y && n.$tag$ === \"foreignObject\" && (y = !1), oe(null, n, y), ke(F) && i[\"s-si\"] !== F && i.classList.add(i[\"s-si\"] = F), n.$children$)\n for (o = 0; o < n.$children$.length; ++o)\n u = C(e, n, o), u && i.appendChild(u);\n n.$tag$ === \"svg\" ? y = !1 : i.tagName === \"foreignObject\" && (y = !0);\n }\n return i[\"s-hn\"] = E, n.$flags$ & 3 && (i[\"s-sr\"] = !0, i[\"s-cr\"] = N, i[\"s-sn\"] = n.$name$ || \"\", i[\"s-rf\"] = (r = n.$attrs$) == null ? void 0 : r.ref, a = e && e.$children$ && e.$children$[s], a && a.$tag$ === n.$tag$ && e.$elm$ && j(e.$elm$, !1), ue(N, i, t.$elm$, e == null ? void 0 : e.$elm$)), i;\n}, j = (e, t) => {\n A.$flags$ |= 1;\n const s = Array.from(e.__childNodes || e.childNodes);\n e[\"s-sr\"] && H.experimentalSlotFixes;\n for (let r = s.length - 1; r >= 0; r--) {\n const n = s[r];\n n[\"s-hn\"] !== E && n[\"s-ol\"] && (k(_(n).parentNode, n, _(n)), n[\"s-ol\"].remove(), n[\"s-ol\"] = void 0, n[\"s-sh\"] = void 0, I = !0), t && j(n, t);\n }\n A.$flags$ &= -2;\n}, le = (e, t, s, r, n, o) => {\n let i = e[\"s-cr\"] && e[\"s-cr\"].parentNode || e, u;\n for (i.shadowRoot && i.tagName === E && (i = i.shadowRoot); n <= o; ++n)\n r[n] && (u = C(null, s, n), u && (r[n].$elm$ = u, k(i, u, _(t))));\n}, ae = (e, t, s) => {\n for (let r = t; r <= s; ++r) {\n const n = e[r];\n if (n) {\n const o = n.$elm$;\n fe(n), o && (D = !0, o[\"s-ol\"] ? o[\"s-ol\"].remove() : j(o, !0), o.remove());\n }\n }\n}, Ne = (e, t, s, r, n = !1) => {\n let o = 0, i = 0, u = 0, a = 0, $ = t.length - 1, f = t[0], l = t[$], d = r.length - 1, c = r[0], p = r[d], m, v;\n for (; o <= $ && i <= d; )\n if (f == null)\n f = t[++o];\n else if (l == null)\n l = t[--$];\n else if (c == null)\n c = r[++i];\n else if (p == null)\n p = r[--d];\n else if (O(f, c, n))\n x(f, c, n), f = t[++o], c = r[++i];\n else if (O(l, p, n))\n x(l, p, n), l = t[--$], p = r[--d];\n else if (O(f, p, n))\n (f.$tag$ === \"slot\" || p.$tag$ === \"slot\") && j(f.$elm$.parentNode, !1), x(f, p, n), k(e, f.$elm$, l.$elm$.nextSibling), f = t[++o], p = r[--d];\n else if (O(l, c, n))\n (f.$tag$ === \"slot\" || p.$tag$ === \"slot\") && j(l.$elm$.parentNode, !1), x(l, c, n), k(e, l.$elm$, f.$elm$), l = t[--$], c = r[++i];\n else {\n for (u = -1, a = o; a <= $; ++a)\n if (t[a] && t[a].$key$ !== null && t[a].$key$ === c.$key$) {\n u = a;\n break;\n }\n u >= 0 ? (v = t[u], v.$tag$ !== c.$tag$ ? m = C(t && t[i], s, u) : (x(v, c, n), t[u] = void 0, m = v.$elm$), c = r[++i]) : (m = C(t && t[i], s, i), c = r[++i]), m && k(\n _(f.$elm$).parentNode,\n m,\n _(f.$elm$)\n );\n }\n o > $ ? le(\n e,\n r[d + 1] == null ? null : r[d + 1].$elm$,\n s,\n r,\n i,\n d\n ) : i > d && ae(t, o, $);\n}, O = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === \"slot\" ? e.$name$ === t.$name$ : s ? (s && !e.$key$ && t.$key$ && (e.$key$ = t.$key$), !0) : e.$key$ === t.$key$ : !1, _ = (e) => e && e[\"s-ol\"] || e, x = (e, t, s = !1) => {\n const r = t.$elm$ = e.$elm$, n = e.$children$, o = t.$children$, i = t.$tag$, u = t.$text$;\n let a;\n u === null ? (y = i === \"svg\" ? !0 : i === \"foreignObject\" ? !1 : y, i === \"slot\" && !M || oe(e, t, y), n !== null && o !== null ? Ne(r, n, t, o, s) : o !== null ? (e.$text$ !== null && (r.textContent = \"\"), le(r, null, t, o, 0, o.length - 1)) : (\n // don't do this on initial render as it can cause non-hydrated content to be removed\n !s && H.updatable && n !== null && ae(n, 0, n.length - 1)\n ), y && i === \"svg\" && (y = !1)) : (a = r[\"s-cr\"]) ? a.parentNode.textContent = u : e.$text$ !== u && (r.data = u);\n}, b = [], ce = (e) => {\n let t, s, r;\n const n = e.__childNodes || e.childNodes;\n for (const o of n) {\n if (o[\"s-sr\"] && (t = o[\"s-cr\"]) && t.parentNode) {\n s = t.parentNode.__childNodes || t.parentNode.childNodes;\n const i = o[\"s-sn\"];\n for (r = s.length - 1; r >= 0; r--)\n if (t = s[r], !t[\"s-cn\"] && !t[\"s-nr\"] && t[\"s-hn\"] !== o[\"s-hn\"])\n if (Q(t, i)) {\n let u = b.find((a) => a.$nodeToRelocate$ === t);\n D = !0, t[\"s-sn\"] = t[\"s-sn\"] || i, u ? (u.$nodeToRelocate$[\"s-sh\"] = o[\"s-hn\"], u.$slotRefNode$ = o) : (t[\"s-sh\"] = o[\"s-hn\"], b.push({\n $slotRefNode$: o,\n $nodeToRelocate$: t\n })), t[\"s-sr\"] && b.map((a) => {\n Q(a.$nodeToRelocate$, t[\"s-sn\"]) && (u = b.find(($) => $.$nodeToRelocate$ === t), u && !a.$slotRefNode$ && (a.$slotRefNode$ = u.$slotRefNode$));\n });\n } else b.some((u) => u.$nodeToRelocate$ === t) || b.push({\n $nodeToRelocate$: t\n });\n }\n o.nodeType === 1 && ce(o);\n }\n}, fe = (e) => {\n e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(fe);\n}, k = (e, t, s) => (typeof t[\"s-sn\"] == \"string\" && t[\"s-sr\"] && t[\"s-cr\"] && ue(t[\"s-cr\"], t, e, t.parentElement), e == null ? void 0 : e.insertBefore(t, s));\nfunction ue(e, t, s, r) {\n var n;\n let o;\n if (e && typeof t[\"s-sn\"] == \"string\" && t[\"s-sr\"] && e.parentNode && e.parentNode[\"s-sc\"] && (o = t[\"s-si\"] || e.parentNode[\"s-sc\"])) {\n const i = t[\"s-sn\"], u = t[\"s-hn\"];\n if ((n = s.classList) == null || n.add(o + \"-s\"), r && r.classList.contains(o + \"-s\")) {\n let a = (r.__childNodes || r.childNodes)[0], $ = !1;\n for (; a; ) {\n if (a[\"s-sn\"] !== i && a[\"s-hn\"] === u && a[\"s-sr\"]) {\n $ = !0;\n break;\n }\n a = a.nextSibling;\n }\n $ || r.classList.remove(o + \"-s\");\n }\n }\n}\nvar Me = (e, t, s = !1) => {\n var r, n, o, i, u;\n const a = e.$hostElement$, $ = e.$cmpMeta$, f = e.$vnode$ || W(null, null), l = Oe(t) ? t : _e(null, null, t);\n if (E = a.tagName, $.$attrsToReflect$ && (l.$attrs$ = l.$attrs$ || {}, $.$attrsToReflect$.map(\n ([d, c]) => l.$attrs$[c] = a[d]\n )), s && l.$attrs$)\n for (const d of Object.keys(l.$attrs$))\n a.hasAttribute(d) && ![\"key\", \"ref\", \"style\", \"class\"].includes(d) && (l.$attrs$[d] = a[d]);\n l.$tag$ = null, l.$flags$ |= 4, e.$vnode$ = l, l.$elm$ = f.$elm$ = a.shadowRoot || a, F = a[\"s-sc\"], M = ($.$flags$ & 1) !== 0, N = a[\"s-cr\"], D = !1, x(f, l, s);\n {\n if (A.$flags$ |= 1, I) {\n ce(l.$elm$);\n for (const d of b) {\n const c = d.$nodeToRelocate$;\n if (!c[\"s-ol\"]) {\n const p = R.createTextNode(\"\");\n p[\"s-nr\"] = c, k(c.parentNode, c[\"s-ol\"] = p, c);\n }\n }\n for (const d of b) {\n const c = d.$nodeToRelocate$, p = d.$slotRefNode$;\n if (p) {\n const m = p.parentNode;\n let v = p.nextSibling;\n {\n let L = (r = c[\"s-ol\"]) == null ? void 0 : r.previousSibling;\n for (; L; ) {\n let h = (n = L[\"s-nr\"]) != null ? n : null;\n if (h && h[\"s-sn\"] === c[\"s-sn\"] && m === h.parentNode) {\n for (h = h.nextSibling; h === c || h != null && h[\"s-sr\"]; )\n h = h == null ? void 0 : h.nextSibling;\n if (!h || !h[\"s-nr\"]) {\n v = h;\n break;\n }\n }\n L = L.previousSibling;\n }\n }\n (!v && m !== c.parentNode || c.nextSibling !== v) && c !== v && (!c[\"s-hn\"] && c[\"s-ol\"] && (c[\"s-hn\"] = c[\"s-ol\"].parentNode.nodeName), k(m, c, v), c.nodeType === 1 && c.tagName !== \"SLOT-FB\" && (c.hidden = (o = c[\"s-ih\"]) != null ? o : !1)), c && typeof p[\"s-rf\"] == \"function\" && p[\"s-rf\"](c);\n } else\n c.nodeType === 1 && (s && (c[\"s-ih\"] = (i = c.hidden) != null ? i : !1), c.hidden = !0);\n }\n }\n D && re(l.$elm$), A.$flags$ &= -2, b.length = 0;\n }\n if (H.experimentalScopedSlotChanges && $.$flags$ & 2) {\n const d = l.$elm$.__childNodes || l.$elm$.childNodes;\n for (const c of d)\n c[\"s-hn\"] !== E && !c[\"s-sh\"] && (s && c[\"s-ih\"] == null && (c[\"s-ih\"] = (u = c.hidden) != null ? u : !1), c.hidden = !0);\n }\n N = void 0;\n};\nconst De = (e, t, s) => {\n [null, void 0, \"\", !1].includes(s) || [\"innerHTML\", \"style\"].includes(t) || e.setAttribute(t, [\"object\", \"function\"].includes(typeof s) ? \"/!\\\\ Object props are not rendered in the code example\" : s);\n}, de = (e, t, s, r, n) => {\n if (t && typeof t == \"string\") {\n const o = document.createElement(t);\n Object.keys(s || {}).forEach((i) => {\n De(o, i, s[i]);\n }), r == null || r.forEach((i) => {\n de(o, i.$tag$, i.$attrs$, i.$children$, i.$text$);\n }), s != null && s.innerHTML && (o.innerHTML = s.innerHTML), e.appendChild(o);\n }\n n && (e.innerHTML = n);\n}, tt = (e, t) => {\n const s = {};\n if (typeof e != \"object\")\n throw new Error(\"filterArgs - args isn't an object.\");\n for (const r in e)\n if (!r.startsWith(\"slot\")) {\n const n = e[r], o = r.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n (!t || !Object.keys(t).includes(r) || t[r] !== n) && (s[o] = n);\n }\n return s;\n}, st = (e, t) => {\n var r, n;\n const s = document.getElementById(\"storybook-root\");\n if (s !== null)\n return (n = document.querySelector(\"[lang]\")) == null || n.setAttribute(\"lang\", ((r = t.globals) == null ? void 0 : r.locale) || \"en\"), Me(\n {\n $ancestorComponent$: void 0,\n $flags$: 0,\n $modeName$: void 0,\n $cmpMeta$: {\n $flags$: 0,\n $tagName$: s.tagName\n },\n $hostElement$: s\n },\n e(t)\n ), s.children[s.children.length - 1];\n}, rt = ({ $tag$: e, $attrs$: t, $children$: s, $text$: r }) => {\n const n = document.createElement(\"div\");\n return de(n, e, t, s, r), n.innerHTML;\n}, U = (e, t) => {\n if (!t)\n return;\n const s = t.split(\"/\");\n return `${e}${s.slice(2, s.length - 1).join(\"-\")}--docs`;\n};\nvar S, w;\nclass nt {\n constructor(t) {\n /**\n * JsonDocs\n */\n g(this, \"jsonDoc\");\n /**\n * Get component data from the jsonDoc\n * @param tagName - tag name we want to get the data from\n * @returns component data\n */\n B(this, S, (t) => this.jsonDoc.components.find((s) => s.tag === t));\n /**\n * Get the control for the given prop\n * Based on https://storybook.js.org/docs/api/arg-types#controltype\n * @param prop - prop to get control for\n * @returns control type and options if applicable\n */\n B(this, w, (t) => {\n const s = t.type.replace(/\"([^\"]+)\"/g, \"$1\").replace(/\\s/g, \"\").replace(/\\(.*?\\)/g, (r) => r.replace(/\\|/g, \" OR \")).split(\"|\").map((r) => r.trim().replace(/ OR /g, \"|\"));\n return t.type === \"string\" ? { control: { type: \"text\" } } : t.type === \"number\" ? { control: { type: \"number\" } } : t.type === \"boolean\" ? { control: { type: \"boolean\" } } : t.type.startsWith(\"{\") && t.type.endsWith(\"}\") ? { control: { type: \"object\" } } : s.length > 1 ? s.includes(\"string\") ? { control: { type: \"text\" } } : s.every((r) => r == null ? void 0 : r.includes(\"[]\")) ? { control: { type: \"object\" } } : (s.unshift(void 0), { control: { type: \"select\" }, options: s }) : { control: { type: \"object\" } };\n });\n /**\n * Extract component arg types from the component data\n * @param tagName - tag name we want to extract the arg types from\n * @returns component arg types\n */\n g(this, \"extractArgTypes\", (t) => {\n const s = T(this, S).call(this, t), r = s == null ? void 0 : s.props.reduce((f, l) => {\n const { control: d, options: c } = T(this, w).call(this, l);\n return {\n ...f,\n [l.name]: {\n name: l.attr || l.name,\n description: l.docs,\n type: { required: l.required },\n table: {\n category: \"props\",\n type: { summary: l.type },\n defaultValue: { summary: l.default }\n },\n control: d,\n options: c\n }\n };\n }, {}), n = s == null ? void 0 : s.events.reduce(\n (f, l) => ({\n ...f,\n [l.event]: {\n name: l.event,\n description: l.docs,\n table: {\n category: \"events\",\n type: { summary: l.detail }\n }\n }\n }),\n {}\n ), o = s == null ? void 0 : s.methods.reduce(\n (f, l) => ({\n ...f,\n [l.name]: {\n name: l.name,\n description: l.docs,\n table: {\n category: \"methods\",\n type: { summary: l.signature }\n }\n }\n }),\n {}\n ), i = s == null ? void 0 : s.slots.reduce(\n (f, l) => ({\n ...f,\n [l.name]: {\n name: l.name !== \"\" ? l.name : \"default\",\n // default slot are unnamed\n description: l.docs,\n table: {\n category: \"slots\",\n type: { summary: void 0 }\n }\n }\n }),\n {}\n ), u = s == null ? void 0 : s.styles.reduce(\n (f, l) => ({\n ...f,\n [l.name]: {\n name: l.name,\n description: l.docs,\n table: {\n category: \"custom properties\",\n type: { summary: void 0 }\n }\n }\n }),\n {}\n ), a = s == null ? void 0 : s.dependencies.reduce((f, l) => {\n const d = T(this, S).call(this, l);\n return {\n ...f,\n [l]: {\n name: l,\n description: `<a href=\"./?path=/docs/${U(\"\", d == null ? void 0 : d.filePath)}\">View Component Documentation</a>`,\n table: {\n category: \"depends on\",\n type: { summary: void 0 }\n }\n }\n };\n }, {}), $ = s == null ? void 0 : s.dependents.reduce((f, l) => {\n const d = T(this, S).call(this, l);\n return {\n ...f,\n [l]: {\n name: l,\n description: `<a href=\"./?path=/docs/${U(\"\", d == null ? void 0 : d.filePath)}\">View Component Documentation</a>`,\n table: {\n category: \"used by\",\n type: { summary: void 0 }\n }\n }\n };\n }, {});\n return {\n ...r,\n ...n,\n ...o,\n ...i,\n ...u,\n ...a,\n ...$\n };\n });\n /**\n * Extract component description from the component data\n * @param tagName - tag name we want to extract the description from\n * @returns component description\n */\n g(this, \"extractComponentDescription\", (t) => {\n const s = T(this, S).call(this, t);\n return (s == null ? void 0 : s.readme) || (s == null ? void 0 : s.docs);\n });\n this.jsonDoc = t;\n }\n}\nS = new WeakMap(), w = new WeakMap();\nconst Ce = (e, t) => {\n if (t)\n return `${e}${t}`;\n}, $e = (e) => {\n let t = e.overview ? `${e.overview}\n\n` : \"\";\n const s = e.props.filter(({ attr: n }) => n !== void 0);\n s.length && (t += `Attributes:\n`, t += s.map(({ attr: n, docs: o }) => `- \\`${n}\\`: ${o}\n`).join(\"\"), t += `\n`);\n const r = e.props.filter(({ attr: n }) => n === void 0);\n return r.length && (t += `Properties:\n`, t += r.map(({ name: n, docs: o }) => `- \\`${n}\\`: ${o}\n`).join(\"\"), t += `\n`), e.methods.length && (t += `Methods:\n`, t += e.methods.map(({ name: n, docs: o }) => `- \\`${n}\\`: ${o}\n`).join(\"\"), t += `\n`), e.events.length && (t += `Events:\n`, t += e.events.map(({ event: n, docs: o }) => `- \\`${n}\\`: ${o}\n`).join(\"\"), t += `\n`), e.listeners.length && (t += `Listeners:\n`, t += e.listeners.map(({ event: n }) => `- \\`${n}\\`\n`).join(\"\"), t += `\n`), e.slots.length && (t += `Slots:\n`, t += e.slots.map(({ name: n, docs: o }) => `- \\`${n}\\`: ${o}\n`).join(\"\"), t += `\n`), t;\n}, q = (e) => `${e.docs}\n\nType: \\`${e.type}\\``, it = (e, t, s, r) => ({\n $schema: \"https://json.schemastore.org/web-types\",\n name: e,\n version: t,\n \"description-markup\": \"markdown\",\n contributions: {\n html: {\n elements: s.components.map((n) => {\n const o = U(r, n.filePath);\n return {\n name: n.tag,\n description: $e(n),\n \"doc-url\": o,\n attributes: n.props.filter((i) => i.attr).map((i) => ({\n name: i.attr,\n description: q(i),\n \"doc-url\": o,\n value: {\n type: i.type,\n default: i.default,\n required: i.required\n }\n })),\n js: {\n properties: n.props.map((i) => ({\n name: i.name,\n description: q(i),\n \"doc-url\": o,\n value: {\n type: i.type,\n default: i.default,\n required: i.required\n }\n })),\n events: n.events.map((i) => ({\n name: i.event,\n description: i.docs\n }))\n },\n css: {\n properties: n.styles.map((i) => ({\n name: i.name,\n description: i.docs\n }))\n }\n };\n })\n }\n }\n}), Ue = (e, t, s) => [\n { name: \"Storybook\", url: U(e, s) },\n { name: \"Sources\", url: Ce(t, s) }\n], we = (e) => {\n if (!e.values.some(({ value: t }) => t === void 0))\n return e.values.map(({ value: t }) => ({ name: t }));\n}, ot = (e, t, s) => ({\n version: 1.1,\n tags: e.components.map((r) => {\n const n = Ue(t, s, r.filePath);\n return {\n name: r.tag,\n description: $e(r),\n attributes: r.props.map((o) => ({\n name: o.attr || o.name,\n description: q(o),\n values: we(o),\n references: n\n })),\n references: n\n };\n }),\n globalAttributes: [],\n valueSets: []\n}), lt = (e) => ({\n version: 1.1,\n properties: e.components.flatMap(\n (t) => t.styles.map((s) => ({\n name: s.name,\n description: s.docs\n }))\n )\n}), at = (e) => {\n const t = { value: \"2023\", pattern: \"yyyy\" }, s = { value: \"12\", pattern: \"mm\" }, r = { value: \"24\", pattern: \"dd\" };\n return Pe([t.value, s.value, r.value].join(\"-\"), e, { timeZone: \"UTC\" }).replace(t.value, t.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);\n}, ct = (e) => e.toISOString().split(\"T\")[0], He = (e, t, s) => {\n const r = e.closest(\"[lang]\"), n = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), o = n.length > 0 && typeof n[0] == \"string\" ? n[0] : navigator.language || s, i = o.split(\"-\").shift();\n return Object.keys(t).length === 0 ? {\n locale: o,\n messages: { lang: s }\n } : {\n locale: o,\n messages: t[i] || t[s] || { lang: s }\n };\n}, ft = (e, t, s) => new Intl.NumberFormat(t, { style: \"currency\", currency: s }).format(e), ut = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), dt = (e, t, s = 0) => new Intl.NumberFormat(t, {\n style: \"percent\",\n minimumFractionDigits: s,\n maximumFractionDigits: s\n}).format(e), $t = (e, t, s, r = \"short\", n = 0) => new Intl.NumberFormat(t, {\n style: \"unit\",\n unit: s,\n unitDisplay: r,\n minimumFractionDigits: n,\n maximumFractionDigits: n\n}).format(e), Be = /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$/, Pe = (e, t, s) => typeof e != \"string\" || e === \"\" || !Be.test(e) ? \"\" : new Intl.DateTimeFormat(t, s).format(new Date(e)), pt = (e, t) => (s) => He(s, e, t), gt = ({ disconnect: e, observe: t, takeRecords: s }) => {\n class r {\n constructor(o) {\n /**\n *\n */\n g(this, \"disconnect\", e);\n /**\n *\n */\n g(this, \"observe\", t);\n /**\n *\n */\n g(this, \"takeRecords\", s);\n /**\n *\n */\n g(this, \"cb\");\n this.cb = o;\n }\n }\n return [window, global].forEach((n) => {\n Object.defineProperty(n, \"MutationObserver\", {\n writable: !0,\n configurable: !0,\n value: r\n });\n }), r;\n}, ht = ({ disconnect: e, observe: t }) => {\n class s {\n constructor(n) {\n /**\n *\n */\n g(this, \"disconnect\", e);\n /**\n *\n */\n g(this, \"observe\", t);\n /**\n *\n */\n g(this, \"unobserve\");\n /**\n *\n */\n g(this, \"cb\");\n this.cb = n;\n }\n }\n return [window, global].forEach((r) => {\n Object.defineProperty(r, \"ResizeObserver\", {\n writable: !0,\n configurable: !0,\n value: s\n });\n }), s;\n};\nclass We extends Event {\n constructor() {\n super(...arguments);\n /**\n *\n */\n g(this, \"detail\");\n }\n // eslint-disable-line @typescript-eslint/no-explicit-any\n}\nconst yt = () => {\n class e extends We {\n }\n return [window, global].forEach((t) => {\n Object.defineProperty(t, \"SubmitEvent\", {\n writable: !0,\n configurable: !0,\n value: e\n });\n }), e;\n}, vt = (e) => {\n const t = (s) => (setTimeout(s, 1), e(), 0);\n return [window, global].forEach((s) => {\n Object.defineProperty(s, \"requestAnimationFrame\", {\n writable: !0,\n configurable: !0,\n value: t\n });\n }), t;\n};\nexport {\n Ge as ClassList,\n nt as StorybookPreview,\n Xe as allItemsAreString,\n Ve as cleanString,\n ze as createID,\n Be as dateRegExp,\n ct as dateToString,\n pt as defineLocales,\n tt as filterArgs,\n Qe as focusableElements,\n at as getLocaleDatePattern,\n V as getParentWindows,\n rt as getStoryHTML,\n U as getStorybookUrl,\n Ze as getWindows,\n Ke as isTagName,\n Ye as isValidNumber,\n ye as isValidString,\n Ie as isValideID,\n ft as localeCurrency,\n Pe as localeDate,\n ut as localeNumber,\n dt as localePercent,\n $t as localeUnit,\n et as nextTick,\n vt as setUpRequestAnimationFrameMock,\n gt as setupMutationObserverMock,\n ht as setupResizeObserverMock,\n yt as setupSubmitEventMock,\n st as stencilWrapper,\n Je as toString,\n lt as vsCodeCssGenerator,\n ot as vsCodeGenerator,\n it as webTypesGenerator\n};\n//# sourceMappingURL=index.es.js.map\n"],"version":3}
@@ -1,4 +1,4 @@
1
- import { g as gt } from './index.es.js';
1
+ import { p as pt } from './index.es.js';
2
2
 
3
3
  const errors$1 = {
4
4
  required: "This field is required.",
@@ -249,7 +249,7 @@ const messages = { en, fr };
249
249
  * @param element - element we need to get the language
250
250
  * @returns messages object
251
251
  */
252
- const initLocales = gt(messages, defaultLocale);
252
+ const initLocales = pt(messages, defaultLocale);
253
253
 
254
254
  export { initLocales as i };
255
255