bitboss-ui 2.0.13 → 2.0.14

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 (216) hide show
  1. package/dist/index107.js +5 -5
  2. package/dist/index115.js +1 -1
  3. package/dist/index117.js +3 -3
  4. package/dist/index119.js +1 -1
  5. package/dist/index123.js +1 -1
  6. package/dist/index125.js +1 -1
  7. package/dist/index127.js +1 -1
  8. package/dist/index129.js +2 -2
  9. package/dist/index130.js +1 -1
  10. package/dist/index14.js +1 -1
  11. package/dist/index16.js +3 -3
  12. package/dist/index18.js +2 -2
  13. package/dist/index199.js +2 -81
  14. package/dist/index199.js.map +1 -1
  15. package/dist/index20.js +14 -14
  16. package/dist/index200.js +158 -2
  17. package/dist/index200.js.map +1 -1
  18. package/dist/index201.js +84 -4
  19. package/dist/index201.js.map +1 -1
  20. package/dist/index203.js +5 -2
  21. package/dist/index203.js.map +1 -1
  22. package/dist/index204.js +16 -5
  23. package/dist/index204.js.map +1 -1
  24. package/dist/index205.js +10 -10
  25. package/dist/index205.js.map +1 -1
  26. package/dist/index206.js +18 -15
  27. package/dist/index206.js.map +1 -1
  28. package/dist/index207.js +18 -18
  29. package/dist/index207.js.map +1 -1
  30. package/dist/index208.js +22 -14
  31. package/dist/index208.js.map +1 -1
  32. package/dist/index209.js +3 -27
  33. package/dist/index209.js.map +1 -1
  34. package/dist/index210.js +2 -3
  35. package/dist/index210.js.map +1 -1
  36. package/dist/index211.js +8 -2
  37. package/dist/index211.js.map +1 -1
  38. package/dist/index212.js +247 -6
  39. package/dist/index212.js.map +1 -1
  40. package/dist/index213.js +42 -239
  41. package/dist/index213.js.map +1 -1
  42. package/dist/index214.js +35 -43
  43. package/dist/index214.js.map +1 -1
  44. package/dist/index215.js +5 -44
  45. package/dist/index215.js.map +1 -1
  46. package/dist/index216.js +49 -5
  47. package/dist/index216.js.map +1 -1
  48. package/dist/index217.js +80 -48
  49. package/dist/index217.js.map +1 -1
  50. package/dist/index218.js +1 -1
  51. package/dist/index219.js +2 -2
  52. package/dist/index22.js +13 -13
  53. package/dist/index222.js +2 -44
  54. package/dist/index222.js.map +1 -1
  55. package/dist/index223.js +7 -0
  56. package/dist/index223.js.map +1 -0
  57. package/dist/index224.js +2 -13
  58. package/dist/index224.js.map +1 -1
  59. package/dist/index225.js +43 -125
  60. package/dist/index225.js.map +1 -1
  61. package/dist/index227.js +13 -2
  62. package/dist/index227.js.map +1 -1
  63. package/dist/index228.js +3 -174
  64. package/dist/index228.js.map +1 -1
  65. package/dist/index229.js +126 -5
  66. package/dist/index229.js.map +1 -1
  67. package/dist/index230.js +120 -366
  68. package/dist/index230.js.map +1 -1
  69. package/dist/index231.js +2 -158
  70. package/dist/index231.js.map +1 -1
  71. package/dist/index232.js +174 -84
  72. package/dist/index232.js.map +1 -1
  73. package/dist/index233.js +8 -0
  74. package/dist/index233.js.map +1 -0
  75. package/dist/index234.js +369 -3
  76. package/dist/index234.js.map +1 -1
  77. package/dist/index235.js +2 -106
  78. package/dist/index235.js.map +1 -1
  79. package/dist/{index240.js → index236.js} +1 -1
  80. package/dist/{index240.js.map → index236.js.map} +1 -1
  81. package/dist/index237.js +53 -47
  82. package/dist/index237.js.map +1 -1
  83. package/dist/index239.js +100 -2
  84. package/dist/index239.js.map +1 -1
  85. package/dist/index24.js +1 -1
  86. package/dist/index244.js +3 -4
  87. package/dist/index244.js.map +1 -1
  88. package/dist/index245.js +9 -3
  89. package/dist/index245.js.map +1 -1
  90. package/dist/index246.js +23 -9
  91. package/dist/index246.js.map +1 -1
  92. package/dist/index247.js +6 -23
  93. package/dist/index247.js.map +1 -1
  94. package/dist/index248.js +16 -281
  95. package/dist/index248.js.map +1 -1
  96. package/dist/index249.js +3 -6
  97. package/dist/index249.js.map +1 -1
  98. package/dist/index250.js +12 -2
  99. package/dist/index250.js.map +1 -1
  100. package/dist/index251.js +9 -2
  101. package/dist/index251.js.map +1 -1
  102. package/dist/index252.js +9 -2
  103. package/dist/index252.js.map +1 -1
  104. package/dist/index253.js +17 -2
  105. package/dist/index253.js.map +1 -1
  106. package/dist/index254.js +9 -2
  107. package/dist/index254.js.map +1 -1
  108. package/dist/index255.js +281 -2
  109. package/dist/index255.js.map +1 -1
  110. package/dist/index256.js +6 -2
  111. package/dist/index256.js.map +1 -1
  112. package/dist/index257.js +2 -2
  113. package/dist/index258.js +2 -2
  114. package/dist/index259.js +2 -2
  115. package/dist/index26.js +1 -1
  116. package/dist/index260.js +2 -28
  117. package/dist/index260.js.map +1 -1
  118. package/dist/index261.js +2 -22
  119. package/dist/index261.js.map +1 -1
  120. package/dist/index262.js +5 -0
  121. package/dist/index262.js.map +1 -0
  122. package/dist/index263.js +2 -7
  123. package/dist/index263.js.map +1 -1
  124. package/dist/index264.js +1 -5
  125. package/dist/index264.js.map +1 -1
  126. package/dist/index265.js +2 -16
  127. package/dist/index265.js.map +1 -1
  128. package/dist/index266.js +2 -9
  129. package/dist/index266.js.map +1 -1
  130. package/dist/index267.js +24 -427
  131. package/dist/index267.js.map +1 -1
  132. package/dist/index268.js +22 -89
  133. package/dist/index268.js.map +1 -1
  134. package/dist/index270.js +7 -3
  135. package/dist/index270.js.map +1 -1
  136. package/dist/index271.js +434 -0
  137. package/dist/index271.js.map +1 -0
  138. package/dist/index272.js +89 -2
  139. package/dist/index272.js.map +1 -1
  140. package/dist/index273.js +67 -7
  141. package/dist/index273.js.map +1 -1
  142. package/dist/index274.js +4 -2
  143. package/dist/index274.js.map +1 -1
  144. package/dist/index275.js +2 -126
  145. package/dist/index275.js.map +1 -1
  146. package/dist/index276.js +5 -22
  147. package/dist/index276.js.map +1 -1
  148. package/dist/{index269.js → index277.js} +1 -1
  149. package/dist/{index269.js.map → index277.js.map} +1 -1
  150. package/dist/index278.js +1 -1
  151. package/dist/index28.js +3 -3
  152. package/dist/index280.js +223 -8
  153. package/dist/index280.js.map +1 -1
  154. package/dist/index281.js +2 -17
  155. package/dist/index281.js.map +1 -1
  156. package/dist/index282.js +120 -218
  157. package/dist/index282.js.map +1 -1
  158. package/dist/index283.js +21 -435
  159. package/dist/index283.js.map +1 -1
  160. package/dist/index285.js +434 -67
  161. package/dist/index285.js.map +1 -1
  162. package/dist/index286.js +127 -5
  163. package/dist/index286.js.map +1 -1
  164. package/dist/index287.js +1 -1
  165. package/dist/index288.js +1 -1
  166. package/dist/index289.js +2 -2
  167. package/dist/index290.js +79 -15
  168. package/dist/index290.js.map +1 -1
  169. package/dist/index292.js +4 -4
  170. package/dist/index292.js.map +1 -1
  171. package/dist/index293.js +4 -59
  172. package/dist/index293.js.map +1 -1
  173. package/dist/index294.js +57 -77
  174. package/dist/index294.js.map +1 -1
  175. package/dist/index295.js +18 -0
  176. package/dist/index295.js.map +1 -0
  177. package/dist/index296.js +10 -6
  178. package/dist/index296.js.map +1 -1
  179. package/dist/index299.js +6 -34
  180. package/dist/index299.js.map +1 -1
  181. package/dist/index30.js +2 -2
  182. package/dist/index300.js +2 -47
  183. package/dist/index300.js.map +1 -1
  184. package/dist/index301.js +35 -2
  185. package/dist/index301.js.map +1 -1
  186. package/dist/index302.js +46 -10
  187. package/dist/index302.js.map +1 -1
  188. package/dist/index303.js +1 -1
  189. package/dist/index32.js +2 -2
  190. package/dist/index34.js +3 -3
  191. package/dist/index36.js +12 -12
  192. package/dist/index38.js +3 -3
  193. package/dist/index40.js +2 -2
  194. package/dist/index42.js +2 -2
  195. package/dist/index44.js +6 -6
  196. package/dist/index46.js +2 -2
  197. package/dist/index48.js +2 -2
  198. package/dist/index54.js +1 -1
  199. package/dist/index56.js +1 -1
  200. package/dist/index72.js +21 -21
  201. package/dist/index72.js.map +1 -1
  202. package/dist/index76.js +2 -2
  203. package/dist/index83.js +1 -1
  204. package/dist/index85.js +1 -1
  205. package/dist/index87.js +1 -1
  206. package/package.json +2 -2
  207. package/dist/index202.js +0 -5
  208. package/dist/index202.js.map +0 -1
  209. package/dist/index226.js +0 -126
  210. package/dist/index226.js.map +0 -1
  211. package/dist/index279.js +0 -15
  212. package/dist/index279.js.map +0 -1
  213. package/dist/index284.js +0 -130
  214. package/dist/index284.js.map +0 -1
  215. package/dist/index291.js +0 -7
  216. package/dist/index291.js.map +0 -1
package/dist/index72.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as Q, defineAsyncComponent as W, computed as A, ref as g, openBlock as $, createElementBlock as D, mergeProps as B, createElementVNode as O, renderSlot as w, normalizeProps as X, guardReactiveProps as Y, unref as h, createBlock as Z, withCtx as K, normalizeStyle as _, Fragment as P, renderList as x, createVNode as ee, createCommentVNode as te } from "vue";
2
- import { findRightIndex as H } from "./index246.js";
2
+ import { findRightIndex as H } from "./index245.js";
3
3
  import { useId as ne } from "./index9.js";
4
4
  import { wait as oe } from "./index128.js";
5
5
  import { useIntersectionObserver as ae } from "./index129.js";
6
6
  import le from "./index14.js";
7
7
  /* empty css */
8
- import N from "./index247.js";
8
+ import N from "./index246.js";
9
9
  const me = /* @__PURE__ */ Q({
10
10
  __name: "BbDropdown",
11
11
  props: {
@@ -24,7 +24,7 @@ const me = /* @__PURE__ */ Q({
24
24
  },
25
25
  setup(V) {
26
26
  const j = W(
27
- () => import("./index245.js")
27
+ () => import("./index244.js")
28
28
  ), r = V, d = r.id ?? `bb_${ne().id.value}`, m = A(() => {
29
29
  let e = r.items.findIndex((t) => !t.disabled), o = H(
30
30
  r.items,
@@ -183,20 +183,20 @@ const me = /* @__PURE__ */ Q({
183
183
  wrapper: v.value
184
184
  }, {
185
185
  default: K(() => [
186
- w(e.$slots, "prepend", {
187
- closed: p.value,
188
- closing: f.value,
189
- disabled: e.disabled,
190
- open: l.value,
191
- opening: c.value,
192
- placement: e.placement
193
- }),
194
186
  O("span", {
195
187
  ref_key: "content",
196
188
  ref: a,
197
189
  class: "bb-dropdown__items-container",
198
190
  style: _({ width: `${e.width}px` })
199
191
  }, [
192
+ w(e.$slots, "prepend", {
193
+ closed: p.value,
194
+ closing: f.value,
195
+ disabled: e.disabled,
196
+ open: l.value,
197
+ opening: c.value,
198
+ placement: e.placement
199
+ }),
200
200
  ($(!0), D(P, null, x(m.value, (t, n) => ($(), D(P, {
201
201
  key: t.key
202
202
  }, [
@@ -258,16 +258,16 @@ const me = /* @__PURE__ */ Q({
258
258
  placement: e.placement,
259
259
  text: t.text
260
260
  })
261
- ], 64))), 128))
262
- ], 4),
263
- w(e.$slots, "append", {
264
- closed: p.value,
265
- closing: f.value,
266
- disabled: e.disabled,
267
- open: l.value,
268
- opening: c.value,
269
- placement: e.placement
270
- })
261
+ ], 64))), 128)),
262
+ w(e.$slots, "append", {
263
+ closed: p.value,
264
+ closing: f.value,
265
+ disabled: e.disabled,
266
+ open: l.value,
267
+ opening: c.value,
268
+ placement: e.placement
269
+ })
270
+ ], 4)
271
271
  ]),
272
272
  _: 3
273
273
  }, 8, ["arrow-padding", "container-attributes", "eager", "offset", "open", "padding", "placement", "theme", "transition-duration", "wrapper"])) : te("", !0)
@@ -1 +1 @@
1
- {"version":3,"file":"index72.js","sources":["../src/components/BbDropdown/BbDropdown.vue"],"sourcesContent":["<template>\n\t<span class=\"bb-dropdown\" v-bind=\"attributes\">\n\t\t<span ref=\"wrapper\" class=\"bb-dropdown__wrapper\">\n\t\t\t<slot\n\t\t\t\tname=\"activator\"\n\t\t\t\tv-bind=\"{\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t'aria-expanded': open,\n\t\t\t\t\t\t'aria-controls': `menu_${id}`,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tonClick,\n\t\t\t\t\t\tonKeydown,\n\t\t\t\t\t\tdisabled,\n\t\t\t\t\t},\n\t\t\t\t\tclosed: closed,\n\t\t\t\t\tclosing: closing,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\topen: open,\n\t\t\t\t\topening: opening,\n\t\t\t\t\tplacement: placement,\n\t\t\t\t}\"\n\t\t\t></slot>\n\t\t</span>\n\t\t<CommonFloating\n\t\t\tv-if=\"hasOpenedOnce || eager\"\n\t\t\t:arrow-padding=\"arrowPadding\"\n\t\t\tbase-class=\"bb-dropdown\"\n\t\t\t:container-attributes=\"{\n\t\t\t\tid: `menu_${id}`,\n\t\t\t\t'aria-labelledby': id,\n\t\t\t\t'aria-role': 'menu',\n\t\t\t}\"\n\t\t\t:eager=\"eager\"\n\t\t\t:offset=\"offset\"\n\t\t\t:open=\"open\"\n\t\t\t:padding=\"padding\"\n\t\t\t:placement=\"placement\"\n\t\t\t:theme=\"theme\"\n\t\t\t:transition-duration=\"transitionDuration\"\n\t\t\t:wrapper=\"wrapper\"\n\t\t>\n\t\t\t<slot\n\t\t\t\t:closed=\"closed\"\n\t\t\t\t:closing=\"closing\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\tname=\"prepend\"\n\t\t\t\t:open=\"open\"\n\t\t\t\t:opening=\"opening\"\n\t\t\t\t:placement=\"placement\"\n\t\t\t></slot>\n\t\t\t<span\n\t\t\t\tref=\"content\"\n\t\t\t\tclass=\"bb-dropdown__items-container\"\n\t\t\t\t:style=\"{ width: `${width}px` }\"\n\t\t\t>\n\t\t\t\t<template v-for=\"(item, index) in mappedItems\" :key=\"item.key\">\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t\t:name=\"`item:prepend`\"\n\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t></slot>\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\t:aria-role=\"'menuitem'\"\n\t\t\t\t\t\tclass=\"bb-dropdown__item\"\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-dropdown__item--first': index === 0,\n\t\t\t\t\t\t\t'bb-dropdown__item--last': index === items.length - 1,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t:data-dropdown-item=\"true\"\n\t\t\t\t\t\tv-bind=\"item\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t\t:item=\"item\"\n\t\t\t\t\t\t\t:name=\"item.key\"\n\t\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t\t\t:item=\"item\"\n\t\t\t\t\t\t\t\tname=\"item\"\n\t\t\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t\t\t></slot>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t\t:name=\"`item:append`\"\n\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t></slot>\n\t\t\t\t</template>\n\t\t\t</span>\n\t\t\t<slot\n\t\t\t\t:closed=\"closed\"\n\t\t\t\t:closing=\"closing\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\tname=\"append\"\n\t\t\t\t:open=\"open\"\n\t\t\t\t:opening=\"opening\"\n\t\t\t\t:placement=\"placement\"\n\t\t\t></slot>\n\t\t</CommonFloating>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, defineAsyncComponent, ref } from 'vue';\nimport { findRightIndex } from '@/utilities/functions/findRightIndex';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport { useIntersectionObserver } from '@vueuse/core';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport selectors from 'focusable-selectors';\nimport type { BaseButtonProps } from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\n\nconst CommonFloating = defineAsyncComponent(\n\t() => import('../CommonFloating.vue')\n);\n\nexport type BbDropdownProps = Pick<\n\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'id'\n\t| 'offset'\n\t| 'padding'\n\t| 'placement'\n\t| 'theme'\n\t| 'transitionDuration'\n> & {\n\t/**\n\t * Array used to render each dropdown button.\n\t * They can act as `button`, as `a`, or as `router-link`\n\t * as they are based on the functionality provided by\n\t * `BaseButton`\n\t */\n\titems: Item[];\n\t/**\n\t * Width of the dropdown in pixels.\n\t */\n\twidth?: number;\n};\n\ndefineSlots<\n\t{\n\t\tactivator?: (props: {\n\t\t\tprops: {\n\t\t\t\t'aria-expanded': boolean;\n\t\t\t\t'aria-controls': string;\n\t\t\t\tid: string;\n\t\t\t\tonClick: MappedItem['onClick'];\n\t\t\t\tonKeydown: MappedItem['onKeydown'];\n\t\t\t\tdisabled?: BbDropdownProps['disabled'];\n\t\t\t};\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t\tprepend?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t\t'item:prepend'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\titem?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\t'item:append'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\tappend?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t} & {\n\t\t[key: string]: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t}\n>();\n\nexport type Item = Omit<BaseButtonProps, 'block' | 'tag' | 'type'> & {\n\t/**\n\t * Click handler of the item.\n\t */\n\tonClick?: (...args: any[]) => any;\n\t/**\n\t * Key used to identify the element.\n\t */\n\tkey: string;\n};\n\nexport type MappedItem = Item & {\n\t/**\n\t * Identifier of the element among it's siblings.\n\t */\n\tid: string;\n\t/**\n\t * Keydown event used to handle accessibility.\n\t */\n\tonKeydown: (event: KeyboardEvent) => void;\n};\n\nconst props = withDefaults(defineProps<BbDropdownProps>(), {\n\tarrowPadding: 10,\n\tplacement: 'bottom',\n\ttheme: 'default',\n\ttransitionDuration: 300,\n\twidth: 200,\n\tpadding: 6,\n\toffset: 3,\n});\n\nconst id = props.id ?? `bb_${useId().id.value}`;\n\nconst mappedItems = computed<MappedItem[]>(() => {\n\tlet firstFocusableIndex: number = props.items.findIndex((el) => !el.disabled);\n\tlet lastFocusableIndex: number = findRightIndex(\n\t\tprops.items,\n\t\t(item) => !item.disabled\n\t);\n\n\treturn props.items.map((item, index) => {\n\t\tconst itemid = `${id}-item-${item.key}`;\n\t\tconst { onClick: handler, ...rest } = item;\n\n\t\t/* Id a click handler has been passed close the dropdown\n\t\t * return focus and run the handler\n\t\t */\n\t\tconst onClick = async () => {\n\t\t\tawait closeDropdown();\n\t\t\tconst nextElement = document.querySelector(`#${id}`);\n\t\t\tif (!nextElement) return;\n\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\tnextElement.focus();\n\t\t\t}\n\t\t\tif (handler) handler();\n\t\t};\n\n\t\t/**\n\t\t * On keydown\n\t\t * arrow down move to the next focusable element if it's not the last\n\t\t * arrow up move to the previous focusable element if it's not the first\n\t\t * on tab search the next focusable element after the button that opens the dropdown\n\t\t * if an element is found focus on that\n\t\t * (the menu is attached to body so it's not in order)\n\t\t */\n\t\tconst onKeydown = (event: KeyboardEvent) => {\n\t\t\tif (\n\t\t\t\tevent.target instanceof HTMLElement &&\n\t\t\t\tevent.target.dataset['dropdownItem']\n\t\t\t) {\n\t\t\t\tif (!content.value) return;\n\t\t\t\tif (event.key === 'ArrowDown') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (content.value && index !== lastFocusableIndex) {\n\t\t\t\t\t\tconst option = content.value.querySelector(\n\t\t\t\t\t\t\tselectors.map((selector) => `#${itemid} ~ ${selector}`).join(',')\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\t\t\toption.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (event.key === 'ArrowUp') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (content.value && index !== firstFocusableIndex) {\n\t\t\t\t\t\tconst indexOfPrevious = findRightIndex(props.items, (item, i) => {\n\t\t\t\t\t\t\treturn i < index && !item.disabled;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tconst options = Array.from(\n\t\t\t\t\t\t\tcontent.value.querySelectorAll(`.bb-dropdown__item`)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tconst option = options[indexOfPrevious];\n\n\t\t\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\t\t\toption.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (event.key === 'Tab') {\n\t\t\t\t\tif (index === lastFocusableIndex && !event.shiftKey) {\n\t\t\t\t\t\tconst selector = selectors.join(',');\n\t\t\t\t\t\tconst focusableElements = Array.from(\n\t\t\t\t\t\t\tdocument.querySelectorAll(selector)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst indexOfButton = focusableElements.findIndex(\n\t\t\t\t\t\t\t(el) => el.id === id\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst nextElement = focusableElements[indexOfButton + 1];\n\t\t\t\t\t\tif (!nextElement) return;\n\t\t\t\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tcloseDropdown();\n\t\t\t\t\t\t\tnextElement.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (index === firstFocusableIndex && event.shiftKey) {\n\t\t\t\t\t\tconst nextElement = document.querySelector(`#${id}`);\n\t\t\t\t\t\tif (!nextElement) return;\n\t\t\t\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tnextElement.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\treturn {\n\t\t\t...rest,\n\t\t\tdisabled: rest.disabled || props.disabled,\n\t\t\tid: itemid,\n\t\t\tonClick,\n\t\t\tonKeydown,\n\t\t};\n\t});\n});\n\nconst wrapper = ref<any>();\nconst content = ref<HTMLElement>();\n\nuseIntersectionObserver(\n\twrapper,\n\t([{ intersectionRatio }]) => {\n\t\tif (intersectionRatio !== 1 && open.value) closeDropdown();\n\t},\n\t{ threshold: [0, 1] }\n);\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\n/* On click of the trigger attach elements */\nconst onClick = () => {\n\tif (opening.value || closing.value) return;\n\tif (open.value) {\n\t\tcloseDropdown();\n\t} else {\n\t\topenDropdown();\n\t}\n};\n\nconst onKeydown = async (event: KeyboardEvent) => {\n\tlet firstFocusableIndex: number = props.items.findIndex((el) => !el.disabled);\n\tlet lastFocusableIndex: number = findRightIndex(\n\t\tprops.items,\n\t\t(item) => !item.disabled\n\t);\n\tif (event.key === 'ArrowDown') {\n\t\tevent.preventDefault();\n\t\tif (closing.value || opening.value) return;\n\t\tif (closed.value) {\n\t\t\tawait openDropdown();\n\t\t}\n\t\tif (\n\t\t\tcontent.value &&\n\t\t\tmappedItems.value.length &&\n\t\t\tfirstFocusableIndex !== -1\n\t\t) {\n\t\t\tconst idToFocus = mappedItems.value[firstFocusableIndex].id;\n\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\toption.focus();\n\t\t\t}\n\t\t}\n\t} else if (event.key === 'ArrowUp') {\n\t\tevent.preventDefault();\n\t\tif (closing.value || opening.value) return;\n\t\tif (closed.value) {\n\t\t\tawait openDropdown();\n\t\t}\n\t\tif (\n\t\t\tcontent.value &&\n\t\t\tmappedItems.value.length &&\n\t\t\tlastFocusableIndex !== -1\n\t\t) {\n\t\t\tconst idToFocus = mappedItems.value[lastFocusableIndex].id;\n\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\toption.focus();\n\t\t\t}\n\t\t}\n\t} else if (event.key === 'Tab') {\n\t\tif (open.value && !event.shiftKey) {\n\t\t\tevent.preventDefault();\n\t\t\tif (\n\t\t\t\tcontent.value &&\n\t\t\t\tmappedItems.value.length &&\n\t\t\t\tfirstFocusableIndex !== -1\n\t\t\t) {\n\t\t\t\tconst idToFocus = mappedItems.value[firstFocusableIndex].id;\n\t\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\toption.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst onClickDocument = (event: Event) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\n\nconst onEsc = (event: KeyboardEvent) => {\n\tif (open.value) {\n\t\tif (event.key === 'Escape') {\n\t\t\tif (document.activeElement?.id !== id) {\n\t\t\t\tconst button = document.querySelector(`#${id}`);\n\t\t\t\tif (button instanceof HTMLElement) {\n\t\t\t\t\tbutton.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\nconst hasOpenedOnce = ref(false);\nconst openDropdown = async () => {\n\thasOpenedOnce.value = true;\n\tawait wait(50);\n\topen.value = true;\n\t/* Attach listeners to document so we don't have to track them one by one */\n\tdocument.addEventListener('click', onClickDocument, { passive: true });\n\tdocument.addEventListener('focusin', onDocumentFocus, { passive: true });\n\tdocument.addEventListener('keydown', onEsc, { passive: true });\n};\n\nconst closeDropdown = async () => {\n\topen.value = false;\n\tdocument.removeEventListener('click', onClickDocument);\n\tdocument.removeEventListener('focusin', onDocumentFocus);\n\tdocument.removeEventListener('keydown', onEsc);\n};\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-dropdown--block': props.block,\n\t\t[`bb-dropdown--theme-${props.theme}`]: props.theme,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbDropdown';\n</style>\n"],"names":["CommonFloating","defineAsyncComponent","props","__props","id","useId","mappedItems","computed","firstFocusableIndex","el","lastFocusableIndex","findRightIndex","item","index","itemid","handler","rest","onClick","closeDropdown","nextElement","onKeydown","event","content","option","selectors","selector","indexOfPrevious","i","focusableElements","indexOfButton","wrapper","ref","useIntersectionObserver","intersectionRatio","open","opening","closing","closed","openDropdown","idToFocus","onClickDocument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,WAAWG,GAAiB,EAAE,SAAS,IAAM,GACvE,SAAS,iBAAiB,WAAWC,GAAO,EAAE,SAAS,IAAM;AAAA,IAAA,GAGxD1B,IAAgB,YAAY;AACjC,MAAAgB,EAAK,QAAQ,IACJ,SAAA,oBAAoB,SAASM,CAAe,GAC5C,SAAA,oBAAoB,WAAWG,CAAe,GAC9C,SAAA,oBAAoB,WAAWC,CAAK;AAAA,IAAA,GAGxCK,IAAa1C,EAAS,OAKpB;AAAA,MACN,OALe;AAAA,QACf,sBAAsBL,EAAM;AAAA,QAC5B,CAAC,sBAAsBA,EAAM,KAAK,EAAE,GAAGA,EAAM;AAAA,MAAA;AAAA,IAGtC,EAER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index72.js","sources":["../src/components/BbDropdown/BbDropdown.vue"],"sourcesContent":["<template>\n\t<span class=\"bb-dropdown\" v-bind=\"attributes\">\n\t\t<span ref=\"wrapper\" class=\"bb-dropdown__wrapper\">\n\t\t\t<slot\n\t\t\t\tname=\"activator\"\n\t\t\t\tv-bind=\"{\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t'aria-expanded': open,\n\t\t\t\t\t\t'aria-controls': `menu_${id}`,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tonClick,\n\t\t\t\t\t\tonKeydown,\n\t\t\t\t\t\tdisabled,\n\t\t\t\t\t},\n\t\t\t\t\tclosed: closed,\n\t\t\t\t\tclosing: closing,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\topen: open,\n\t\t\t\t\topening: opening,\n\t\t\t\t\tplacement: placement,\n\t\t\t\t}\"\n\t\t\t></slot>\n\t\t</span>\n\t\t<CommonFloating\n\t\t\tv-if=\"hasOpenedOnce || eager\"\n\t\t\t:arrow-padding=\"arrowPadding\"\n\t\t\tbase-class=\"bb-dropdown\"\n\t\t\t:container-attributes=\"{\n\t\t\t\tid: `menu_${id}`,\n\t\t\t\t'aria-labelledby': id,\n\t\t\t\t'aria-role': 'menu',\n\t\t\t}\"\n\t\t\t:eager=\"eager\"\n\t\t\t:offset=\"offset\"\n\t\t\t:open=\"open\"\n\t\t\t:padding=\"padding\"\n\t\t\t:placement=\"placement\"\n\t\t\t:theme=\"theme\"\n\t\t\t:transition-duration=\"transitionDuration\"\n\t\t\t:wrapper=\"wrapper\"\n\t\t>\n\t\t\t<span\n\t\t\t\tref=\"content\"\n\t\t\t\tclass=\"bb-dropdown__items-container\"\n\t\t\t\t:style=\"{ width: `${width}px` }\"\n\t\t\t>\n\t\t\t\t<slot\n\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\tname=\"prepend\"\n\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t></slot>\n\t\t\t\t<template v-for=\"(item, index) in mappedItems\" :key=\"item.key\">\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t\t:name=\"`item:prepend`\"\n\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t></slot>\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\t:aria-role=\"'menuitem'\"\n\t\t\t\t\t\tclass=\"bb-dropdown__item\"\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-dropdown__item--first': index === 0,\n\t\t\t\t\t\t\t'bb-dropdown__item--last': index === items.length - 1,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t:data-dropdown-item=\"true\"\n\t\t\t\t\t\tv-bind=\"item\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t\t:item=\"item\"\n\t\t\t\t\t\t\t:name=\"item.key\"\n\t\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t\t\t:item=\"item\"\n\t\t\t\t\t\t\t\tname=\"item\"\n\t\t\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t\t\t></slot>\n\t\t\t\t\t\t</slot> </BaseButton\n\t\t\t\t\t><slot\n\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t\t:name=\"`item:append`\"\n\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t></slot>\n\t\t\t\t</template>\n\t\t\t\t<slot\n\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\tname=\"append\"\n\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t></slot>\n\t\t\t</span>\n\t\t</CommonFloating>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, defineAsyncComponent, ref } from 'vue';\nimport { findRightIndex } from '@/utilities/functions/findRightIndex';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport { useIntersectionObserver } from '@vueuse/core';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport selectors from 'focusable-selectors';\nimport type { BaseButtonProps } from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\n\nconst CommonFloating = defineAsyncComponent(\n\t() => import('../CommonFloating.vue')\n);\n\nexport type BbDropdownProps = Pick<\n\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'id'\n\t| 'offset'\n\t| 'padding'\n\t| 'placement'\n\t| 'theme'\n\t| 'transitionDuration'\n> & {\n\t/**\n\t * Array used to render each dropdown button.\n\t * They can act as `button`, as `a`, or as `router-link`\n\t * as they are based on the functionality provided by\n\t * `BaseButton`\n\t */\n\titems: Item[];\n\t/**\n\t * Width of the dropdown in pixels.\n\t */\n\twidth?: number;\n};\n\ndefineSlots<\n\t{\n\t\tactivator?: (props: {\n\t\t\tprops: {\n\t\t\t\t'aria-expanded': boolean;\n\t\t\t\t'aria-controls': string;\n\t\t\t\tid: string;\n\t\t\t\tonClick: MappedItem['onClick'];\n\t\t\t\tonKeydown: MappedItem['onKeydown'];\n\t\t\t\tdisabled?: BbDropdownProps['disabled'];\n\t\t\t};\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t\tprepend?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t\t'item:prepend'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\titem?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\t'item:append'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\tappend?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t} & {\n\t\t[key: string]: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t}\n>();\n\nexport type Item = Omit<BaseButtonProps, 'block' | 'tag' | 'type'> & {\n\t/**\n\t * Click handler of the item.\n\t */\n\tonClick?: (...args: any[]) => any;\n\t/**\n\t * Key used to identify the element.\n\t */\n\tkey: string;\n};\n\nexport type MappedItem = Item & {\n\t/**\n\t * Identifier of the element among it's siblings.\n\t */\n\tid: string;\n\t/**\n\t * Keydown event used to handle accessibility.\n\t */\n\tonKeydown: (event: KeyboardEvent) => void;\n};\n\nconst props = withDefaults(defineProps<BbDropdownProps>(), {\n\tarrowPadding: 10,\n\tplacement: 'bottom',\n\ttheme: 'default',\n\ttransitionDuration: 300,\n\twidth: 200,\n\tpadding: 6,\n\toffset: 3,\n});\n\nconst id = props.id ?? `bb_${useId().id.value}`;\n\nconst mappedItems = computed<MappedItem[]>(() => {\n\tlet firstFocusableIndex: number = props.items.findIndex((el) => !el.disabled);\n\tlet lastFocusableIndex: number = findRightIndex(\n\t\tprops.items,\n\t\t(item) => !item.disabled\n\t);\n\n\treturn props.items.map((item, index) => {\n\t\tconst itemid = `${id}-item-${item.key}`;\n\t\tconst { onClick: handler, ...rest } = item;\n\n\t\t/* Id a click handler has been passed close the dropdown\n\t\t * return focus and run the handler\n\t\t */\n\t\tconst onClick = async () => {\n\t\t\tawait closeDropdown();\n\t\t\tconst nextElement = document.querySelector(`#${id}`);\n\t\t\tif (!nextElement) return;\n\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\tnextElement.focus();\n\t\t\t}\n\t\t\tif (handler) handler();\n\t\t};\n\n\t\t/**\n\t\t * On keydown\n\t\t * arrow down move to the next focusable element if it's not the last\n\t\t * arrow up move to the previous focusable element if it's not the first\n\t\t * on tab search the next focusable element after the button that opens the dropdown\n\t\t * if an element is found focus on that\n\t\t * (the menu is attached to body so it's not in order)\n\t\t */\n\t\tconst onKeydown = (event: KeyboardEvent) => {\n\t\t\tif (\n\t\t\t\tevent.target instanceof HTMLElement &&\n\t\t\t\tevent.target.dataset['dropdownItem']\n\t\t\t) {\n\t\t\t\tif (!content.value) return;\n\t\t\t\tif (event.key === 'ArrowDown') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (content.value && index !== lastFocusableIndex) {\n\t\t\t\t\t\tconst option = content.value.querySelector(\n\t\t\t\t\t\t\tselectors.map((selector) => `#${itemid} ~ ${selector}`).join(',')\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\t\t\toption.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (event.key === 'ArrowUp') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (content.value && index !== firstFocusableIndex) {\n\t\t\t\t\t\tconst indexOfPrevious = findRightIndex(props.items, (item, i) => {\n\t\t\t\t\t\t\treturn i < index && !item.disabled;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tconst options = Array.from(\n\t\t\t\t\t\t\tcontent.value.querySelectorAll(`.bb-dropdown__item`)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tconst option = options[indexOfPrevious];\n\n\t\t\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\t\t\toption.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (event.key === 'Tab') {\n\t\t\t\t\tif (index === lastFocusableIndex && !event.shiftKey) {\n\t\t\t\t\t\tconst selector = selectors.join(',');\n\t\t\t\t\t\tconst focusableElements = Array.from(\n\t\t\t\t\t\t\tdocument.querySelectorAll(selector)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst indexOfButton = focusableElements.findIndex(\n\t\t\t\t\t\t\t(el) => el.id === id\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst nextElement = focusableElements[indexOfButton + 1];\n\t\t\t\t\t\tif (!nextElement) return;\n\t\t\t\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tcloseDropdown();\n\t\t\t\t\t\t\tnextElement.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (index === firstFocusableIndex && event.shiftKey) {\n\t\t\t\t\t\tconst nextElement = document.querySelector(`#${id}`);\n\t\t\t\t\t\tif (!nextElement) return;\n\t\t\t\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tnextElement.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\treturn {\n\t\t\t...rest,\n\t\t\tdisabled: rest.disabled || props.disabled,\n\t\t\tid: itemid,\n\t\t\tonClick,\n\t\t\tonKeydown,\n\t\t};\n\t});\n});\n\nconst wrapper = ref<any>();\nconst content = ref<HTMLElement>();\n\nuseIntersectionObserver(\n\twrapper,\n\t([{ intersectionRatio }]) => {\n\t\tif (intersectionRatio !== 1 && open.value) closeDropdown();\n\t},\n\t{ threshold: [0, 1] }\n);\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\n/* On click of the trigger attach elements */\nconst onClick = () => {\n\tif (opening.value || closing.value) return;\n\tif (open.value) {\n\t\tcloseDropdown();\n\t} else {\n\t\topenDropdown();\n\t}\n};\n\nconst onKeydown = async (event: KeyboardEvent) => {\n\tlet firstFocusableIndex: number = props.items.findIndex((el) => !el.disabled);\n\tlet lastFocusableIndex: number = findRightIndex(\n\t\tprops.items,\n\t\t(item) => !item.disabled\n\t);\n\tif (event.key === 'ArrowDown') {\n\t\tevent.preventDefault();\n\t\tif (closing.value || opening.value) return;\n\t\tif (closed.value) {\n\t\t\tawait openDropdown();\n\t\t}\n\t\tif (\n\t\t\tcontent.value &&\n\t\t\tmappedItems.value.length &&\n\t\t\tfirstFocusableIndex !== -1\n\t\t) {\n\t\t\tconst idToFocus = mappedItems.value[firstFocusableIndex].id;\n\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\toption.focus();\n\t\t\t}\n\t\t}\n\t} else if (event.key === 'ArrowUp') {\n\t\tevent.preventDefault();\n\t\tif (closing.value || opening.value) return;\n\t\tif (closed.value) {\n\t\t\tawait openDropdown();\n\t\t}\n\t\tif (\n\t\t\tcontent.value &&\n\t\t\tmappedItems.value.length &&\n\t\t\tlastFocusableIndex !== -1\n\t\t) {\n\t\t\tconst idToFocus = mappedItems.value[lastFocusableIndex].id;\n\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\toption.focus();\n\t\t\t}\n\t\t}\n\t} else if (event.key === 'Tab') {\n\t\tif (open.value && !event.shiftKey) {\n\t\t\tevent.preventDefault();\n\t\t\tif (\n\t\t\t\tcontent.value &&\n\t\t\t\tmappedItems.value.length &&\n\t\t\t\tfirstFocusableIndex !== -1\n\t\t\t) {\n\t\t\t\tconst idToFocus = mappedItems.value[firstFocusableIndex].id;\n\t\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\toption.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst onClickDocument = (event: Event) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\n\nconst onEsc = (event: KeyboardEvent) => {\n\tif (open.value) {\n\t\tif (event.key === 'Escape') {\n\t\t\tif (document.activeElement?.id !== id) {\n\t\t\t\tconst button = document.querySelector(`#${id}`);\n\t\t\t\tif (button instanceof HTMLElement) {\n\t\t\t\t\tbutton.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\nconst hasOpenedOnce = ref(false);\nconst openDropdown = async () => {\n\thasOpenedOnce.value = true;\n\tawait wait(50);\n\topen.value = true;\n\t/* Attach listeners to document so we don't have to track them one by one */\n\tdocument.addEventListener('click', onClickDocument, { passive: true });\n\tdocument.addEventListener('focusin', onDocumentFocus, { passive: true });\n\tdocument.addEventListener('keydown', onEsc, { passive: true });\n};\n\nconst closeDropdown = async () => {\n\topen.value = false;\n\tdocument.removeEventListener('click', onClickDocument);\n\tdocument.removeEventListener('focusin', onDocumentFocus);\n\tdocument.removeEventListener('keydown', onEsc);\n};\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-dropdown--block': props.block,\n\t\t[`bb-dropdown--theme-${props.theme}`]: props.theme,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbDropdown';\n</style>\n"],"names":["CommonFloating","defineAsyncComponent","props","__props","id","useId","mappedItems","computed","firstFocusableIndex","el","lastFocusableIndex","findRightIndex","item","index","itemid","handler","rest","onClick","closeDropdown","nextElement","onKeydown","event","content","option","selectors","selector","indexOfPrevious","i","focusableElements","indexOfButton","wrapper","ref","useIntersectionObserver","intersectionRatio","open","opening","closing","closed","openDropdown","idToFocus","onClickDocument","target","isOutside","onDocumentFocus","onEsc","_a","button","hasOpenedOnce","wait","attributes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA6IA,UAAMA,IAAiBC;AAAA,MACtB,MAAM,OAAO,eAAuB;AAAA,IAAA,GAqI/BC,IAAQC,GAURC,IAAKF,EAAM,MAAM,MAAMG,KAAQ,GAAG,KAAK,IAEvCC,IAAcC,EAAuB,MAAM;AAC5C,UAAAC,IAA8BN,EAAM,MAAM,UAAU,CAACO,MAAO,CAACA,EAAG,QAAQ,GACxEC,IAA6BC;AAAA,QAChCT,EAAM;AAAA,QACN,CAACU,MAAS,CAACA,EAAK;AAAA,MAAA;AAGjB,aAAOV,EAAM,MAAM,IAAI,CAACU,GAAMC,MAAU;AACvC,cAAMC,IAAS,GAAGV,CAAE,SAASQ,EAAK,GAAG,IAC/B,EAAE,SAASG,GAAS,GAAGC,MAASJ,GAKhCK,IAAU,YAAY;AAC3B,gBAAMC,EAAc;AACpB,gBAAMC,IAAc,SAAS,cAAc,IAAIf,CAAE,EAAE;AACnD,cAAKe,EAAa,CACTA,aAAuB,eAC/BA,EAAY,MAAM;AAAA,cAFD;AAIlB,UAAIJ,KAAiBA;QAAA,GAWhBK,IAAY,CAACC,MAAyB;AAC3C,cACCA,EAAM,kBAAkB,eACxBA,EAAM,OAAO,QAAQ,cACpB;AACG,gBAAA,CAACC,EAAQ,MAAO;AAChB,gBAAAD,EAAM,QAAQ;AAEb,kBADJA,EAAM,eAAe,GACjBC,EAAQ,SAAST,MAAUH,GAAoB;AAC5C,sBAAAa,IAASD,EAAQ,MAAM;AAAA,kBAC5BE,EAAU,IAAI,CAACC,MAAa,IAAIX,CAAM,MAAMW,CAAQ,EAAE,EAAE,KAAK,GAAG;AAAA,gBAAA;AAE7D,gBAAAF,KAAUA,aAAkB,eAC/BA,EAAO,MAAM;AAAA,cAEf;AAAA,uBACUF,EAAM,QAAQ;AAEpB,kBADJA,EAA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,EAAE,SAAS,IAAM,GACrE,SAAS,iBAAiB,WAAWG,GAAiB,EAAE,SAAS,IAAM,GACvE,SAAS,iBAAiB,WAAWC,GAAO,EAAE,SAAS,IAAM;AAAA,IAAA,GAGxD1B,IAAgB,YAAY;AACjC,MAAAgB,EAAK,QAAQ,IACJ,SAAA,oBAAoB,SAASM,CAAe,GAC5C,SAAA,oBAAoB,WAAWG,CAAe,GAC9C,SAAA,oBAAoB,WAAWC,CAAK;AAAA,IAAA,GAGxCK,IAAa1C,EAAS,OAKpB;AAAA,MACN,OALe;AAAA,QACf,sBAAsBL,EAAM;AAAA,QAC5B,CAAC,sBAAsBA,EAAM,KAAK,EAAE,GAAGA,EAAM;AAAA,MAAA;AAAA,IAGtC,EAER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index76.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as j, ref as g, watch as x, computed as m, openBlock as V, createBlock as G, resolveDynamicComponent as K, normalizeClass as O, withCtx as M, createElementVNode as c, withModifiers as y, renderSlot as U, normalizeProps as Y, guardReactiveProps as Z, createTextVNode as J, unref as Q, createVNode as W, createElementBlock as F, Fragment as X, renderList as ee, toDisplayString as te } from "vue";
2
- import { findInTree as ae } from "./index265.js";
2
+ import { findInTree as ae } from "./index248.js";
3
3
  import { useId as re } from "./index9.js";
4
4
  import oe from "./index124.js";
5
5
  /* empty css */
@@ -56,7 +56,7 @@ const le = ["accept", "autofocus", "disabled", "multiple"], se = {
56
56
  const r = t.accept[a];
57
57
  if (r.includes("/")) e.push(r);
58
58
  else {
59
- b || (b = (await import("./index264.js")).default);
59
+ b || (b = (await import("./index247.js")).default);
60
60
  const o = b.getType(r);
61
61
  if (!o)
62
62
  throw new Error(
package/dist/index83.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as W, computed as y, ref as c, onMounted as w, onBeforeUnmount as R, openBlock as k, createElementBlock as V, normalizeClass as C, createElementVNode as o, createVNode as v, unref as g, withCtx as S, renderSlot as m, Fragment as F, renderList as L, toDisplayString as M, nextTick as N } from "vue";
2
- import { debounce as T } from "./index266.js";
2
+ import { debounce as T } from "./index254.js";
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  /* empty css */
package/dist/index85.js CHANGED
@@ -35,7 +35,7 @@ const K = /* @__PURE__ */ c("span", { class: "bb-popover__close-label sr-only" }
35
35
  emits: ["shown", "hidden"],
36
36
  setup($, { emit: T }) {
37
37
  const B = S(
38
- () => import("./index245.js")
38
+ () => import("./index244.js")
39
39
  ), t = $, s = T, { id: P } = R(), p = `bbp_${P.value}`, r = n(), i = n(), { activate: N, deactivate: D } = z(i, {
40
40
  /**
41
41
  * This traps all clicks outside so we are pressing
package/dist/index87.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as r, computed as a, openBlock as l, createElementBlock as s, normalizeClass as m, createElementVNode as n, normalizeStyle as c } from "vue";
2
- import { clamp as p } from "./index203.js";
2
+ import { clamp as p } from "./index199.js";
3
3
  import { getAsPercentageBetween as i } from "./index127.js";
4
4
  const _ = /* @__PURE__ */ r({
5
5
  __name: "BbProgress",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitboss-ui",
3
- "version": "2.0.13",
3
+ "version": "2.0.14",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "scripts": {
@@ -89,4 +89,4 @@
89
89
  "lint-staged": {
90
90
  "*.{js,css,md,html,json,vue,ts}": "prettier --write"
91
91
  }
92
- }
92
+ }
package/dist/index202.js DELETED
@@ -1,5 +0,0 @@
1
- const o = (e) => typeof e == "boolean" ? e : e === "true";
2
- export {
3
- o as booleanishToBoolean
4
- };
5
- //# sourceMappingURL=index202.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index202.js","sources":["../src/utilities/functions/booleanishToBoolean.ts"],"sourcesContent":["/**\n * Accepts a booleanish input and returns a boolean value\n * @param input booleanish input\n * @returns\n */\nexport const booleanishToBoolean = (input: boolean | 'true' | 'false') => {\n\tif (typeof input === 'boolean') return input;\n\telse return input === 'true';\n};\n"],"names":["booleanishToBoolean","input"],"mappings":"AAKa,MAAAA,IAAsB,CAACC,MAC/B,OAAOA,KAAU,YAAkBA,IAC3BA,MAAU;"}
package/dist/index226.js DELETED
@@ -1,126 +0,0 @@
1
- import { getDefaultExportFromCjs as R, commonjsGlobal as W } from "./index249.js";
2
- import { __module as G } from "./index274.js";
3
- (function(V, rt) {
4
- (function(b, Z) {
5
- V.exports = Z();
6
- })(W, function() {
7
- var b = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, Z = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, $ = /\d\d/, i = /\d\d?/, y = /\d*[^-_:/,()\s\d]+/, m = {}, U = function(t) {
8
- return (t = +t) + (t > 68 ? 1900 : 2e3);
9
- }, o = function(t) {
10
- return function(r) {
11
- this[t] = +r;
12
- };
13
- }, j = [/[+-]\d\d:?(\d\d)?|Z/, function(t) {
14
- (this.zone || (this.zone = {})).offset = function(r) {
15
- if (!r || r === "Z") return 0;
16
- var n = r.match(/([+-]|\d\d)/g), e = 60 * n[1] + (+n[2] || 0);
17
- return e === 0 ? 0 : n[0] === "+" ? -e : e;
18
- }(t);
19
- }], F = function(t) {
20
- var r = m[t];
21
- return r && (r.indexOf ? r : r.s.concat(r.f));
22
- }, k = function(t, r) {
23
- var n, e = m.meridiem;
24
- if (e) {
25
- for (var c = 1; c <= 24; c += 1) if (t.indexOf(e(c, 0, r)) > -1) {
26
- n = c > 12;
27
- break;
28
- }
29
- } else n = t === (r ? "pm" : "PM");
30
- return n;
31
- }, q = { A: [y, function(t) {
32
- this.afternoon = k(t, !1);
33
- }], a: [y, function(t) {
34
- this.afternoon = k(t, !0);
35
- }], S: [/\d/, function(t) {
36
- this.milliseconds = 100 * +t;
37
- }], SS: [$, function(t) {
38
- this.milliseconds = 10 * +t;
39
- }], SSS: [/\d{3}/, function(t) {
40
- this.milliseconds = +t;
41
- }], s: [i, o("seconds")], ss: [i, o("seconds")], m: [i, o("minutes")], mm: [i, o("minutes")], H: [i, o("hours")], h: [i, o("hours")], HH: [i, o("hours")], hh: [i, o("hours")], D: [i, o("day")], DD: [$, o("day")], Do: [y, function(t) {
42
- var r = m.ordinal, n = t.match(/\d+/);
43
- if (this.day = n[0], r) for (var e = 1; e <= 31; e += 1) r(e).replace(/\[|\]/g, "") === t && (this.day = e);
44
- }], M: [i, o("month")], MM: [$, o("month")], MMM: [y, function(t) {
45
- var r = F("months"), n = (F("monthsShort") || r.map(function(e) {
46
- return e.slice(0, 3);
47
- })).indexOf(t) + 1;
48
- if (n < 1) throw new Error();
49
- this.month = n % 12 || n;
50
- }], MMMM: [y, function(t) {
51
- var r = F("months").indexOf(t) + 1;
52
- if (r < 1) throw new Error();
53
- this.month = r % 12 || r;
54
- }], Y: [/[+-]?\d+/, o("year")], YY: [$, function(t) {
55
- this.year = U(t);
56
- }], YYYY: [/\d{4}/, o("year")], Z: j, ZZ: j };
57
- function B(t) {
58
- var r, n;
59
- r = t, n = m && m.formats;
60
- for (var e = (t = r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(v, l, f) {
61
- var a = f && f.toUpperCase();
62
- return l || n[f] || b[f] || n[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(M, Y, D) {
63
- return Y || D.slice(1);
64
- });
65
- })).match(Z), c = e.length, h = 0; h < c; h += 1) {
66
- var w = e[h], p = q[w], u = p && p[0], d = p && p[1];
67
- e[h] = d ? { regex: u, parser: d } : w.replace(/^\[|\]$/g, "");
68
- }
69
- return function(v) {
70
- for (var l = {}, f = 0, a = 0; f < c; f += 1) {
71
- var M = e[f];
72
- if (typeof M == "string") a += M.length;
73
- else {
74
- var Y = M.regex, D = M.parser, S = v.slice(a), g = Y.exec(S)[0];
75
- D.call(l, g), v = v.replace(g, "");
76
- }
77
- }
78
- return function(L) {
79
- var s = L.afternoon;
80
- if (s !== void 0) {
81
- var x = L.hours;
82
- s ? x < 12 && (L.hours += 12) : x === 12 && (L.hours = 0), delete L.afternoon;
83
- }
84
- }(l), l;
85
- };
86
- }
87
- return function(t, r, n) {
88
- n.p.customParseFormat = !0, t && t.parseTwoDigitYear && (U = t.parseTwoDigitYear);
89
- var e = r.prototype, c = e.parse;
90
- e.parse = function(h) {
91
- var w = h.date, p = h.utc, u = h.args;
92
- this.$u = p;
93
- var d = u[1];
94
- if (typeof d == "string") {
95
- var v = u[2] === !0, l = u[3] === !0, f = v || l, a = u[2];
96
- l && (a = u[2]), m = this.$locale(), !v && a && (m = n.Ls[a]), this.$d = function(S, g, L) {
97
- try {
98
- if (["x", "X"].indexOf(g) > -1) return new Date((g === "X" ? 1e3 : 1) * S);
99
- var s = B(g)(S), x = s.year, A = s.month, I = s.day, J = s.hours, K = s.minutes, N = s.seconds, Q = s.milliseconds, X = s.zone, H = /* @__PURE__ */ new Date(), O = I || (x || A ? 1 : H.getDate()), P = x || H.getFullYear(), T = 0;
100
- x && !A || (T = A > 0 ? A - 1 : H.getMonth());
101
- var z = J || 0, C = K || 0, E = N || 0, _ = Q || 0;
102
- return X ? new Date(Date.UTC(P, T, O, z, C, E, _ + 60 * X.offset * 1e3)) : L ? new Date(Date.UTC(P, T, O, z, C, E, _)) : new Date(P, T, O, z, C, E, _);
103
- } catch {
104
- return /* @__PURE__ */ new Date("");
105
- }
106
- }(w, d, p), this.init(), a && a !== !0 && (this.$L = this.locale(a).$L), f && w != this.format(d) && (this.$d = /* @__PURE__ */ new Date("")), m = {};
107
- } else if (d instanceof Array) for (var M = d.length, Y = 1; Y <= M; Y += 1) {
108
- u[1] = d[Y - 1];
109
- var D = n.apply(this, u);
110
- if (D.isValid()) {
111
- this.$d = D.$d, this.$L = D.$L, this.init();
112
- break;
113
- }
114
- Y === M && (this.$d = /* @__PURE__ */ new Date(""));
115
- }
116
- else c.call(this, h);
117
- };
118
- };
119
- });
120
- })(G);
121
- var tt = G.exports;
122
- const at = /* @__PURE__ */ R(tt);
123
- export {
124
- at as default
125
- };
126
- //# sourceMappingURL=index226.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index226.js","sources":["../node_modules/dayjs/plugin/customParseFormat.js"],"sourcesContent":["!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},t=/(\\[[^[]*\\])|([-_:/.,()\\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\\d\\d/,r=/\\d\\d?/,i=/\\d*[^-_:/,()\\s\\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)};var a=function(e){return function(t){this[e]=+t}},f=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if(\"Z\"===e)return 0;var t=e.match(/([+-]|\\d\\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:\"+\"===t[0]?-n:n}(e)}],h=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?\"pm\":\"PM\");return n},d={A:[i,function(e){this.afternoon=u(e,!1)}],a:[i,function(e){this.afternoon=u(e,!0)}],S:[/\\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\\d{3}/,function(e){this.milliseconds=+e}],s:[r,a(\"seconds\")],ss:[r,a(\"seconds\")],m:[r,a(\"minutes\")],mm:[r,a(\"minutes\")],H:[r,a(\"hours\")],h:[r,a(\"hours\")],HH:[r,a(\"hours\")],hh:[r,a(\"hours\")],D:[r,a(\"day\")],DD:[n,a(\"day\")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\\[|\\]/g,\"\")===e&&(this.day=r)}],M:[r,a(\"month\")],MM:[n,a(\"month\")],MMM:[i,function(e){var t=h(\"months\"),n=(h(\"monthsShort\")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=h(\"months\").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\\d+/,a(\"year\")],YY:[n,function(e){this.year=s(e)}],YYYY:[/\\d{4}/,a(\"year\")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,f=0;f<a;f+=1){var h=s[f],u=d[h],c=u&&u[0],l=u&&u[1];s[f]=l?{regex:c,parser:l}:h.replace(/^\\[|\\]$/g,\"\")}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=s[n];if(\"string\"==typeof i)r+=i.length;else{var o=i.regex,f=i.parser,h=e.slice(r),u=o.exec(h)[0];f.call(t,u),e=e.replace(u,\"\")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,s=e.args;this.$u=r;var a=s[1];if(\"string\"==typeof a){var f=!0===s[2],h=!0===s[3],u=f||h,d=s[2];h&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(e,t,n){try{if([\"x\",\"X\"].indexOf(t)>-1)return new Date((\"X\"===t?1e3:1)*e);var r=c(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,h=r.seconds,u=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=h||0,g=u||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(e){return new Date(\"\")}}(t,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date(\"\")),o={}}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(\"\"))}else i.call(this,e)}}}));"],"names":["e","t","module","this","n","r","i","o","s","a","f","h","u","d","c","l","m","M","Y","p","v","D","g"],"mappings":";;;AAAA,GAAC,SAASA,GAAEC,GAAE;AAAsD,IAAAC,EAAA,UAAeD,EAA4I;AAAA,EAAA,GAAEE,GAAM,WAAU;AAAc,QAAIH,IAAE,EAAC,KAAI,aAAY,IAAG,UAAS,GAAE,cAAa,IAAG,gBAAe,K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L,OAAS,KAAK,KAAG,KAAK,OAAOA,CAAC,EAAE,KAAID,KAAGX,KAAG,KAAK,OAAOQ,CAAC,MAAI,KAAK,KAAG,oBAAI,KAAK,EAAE,IAAGF,IAAE,CAAA;AAAA,QAAE,WAASE,aAAa,MAAM,UAAQM,IAAEN,EAAE,QAAOO,IAAE,GAAEA,KAAGD,GAAEC,KAAG,GAAE;AAAC,UAAAR,EAAE,CAAC,IAAEC,EAAEO,IAAE,CAAC;AAAE,cAAIC,IAAE,EAAE,MAAM,MAAKT,CAAC;AAAE,cAAGS,EAAE,QAAO,GAAG;AAAC,iBAAK,KAAGA,EAAE,IAAG,KAAK,KAAGA,EAAE,IAAG,KAAK,KAAM;AAAC;AAAA,UAAK;AAAC,UAAAD,MAAID,MAAI,KAAK,KAAG,oBAAI,KAAK,EAAE;AAAA,QAAE;AAAA,YAAM,CAAAT,EAAE,KAAK,MAAKN,CAAC;AAAA,MAAC;AAAA,IAAC;AAAA,EAAC,CAAC;;;;","x_google_ignoreList":[0]}
package/dist/index279.js DELETED
@@ -1,15 +0,0 @@
1
- import { ref as t } from "vue";
2
- const n = () => {
3
- const e = t([]);
4
- return { array: e, set: (...r) => {
5
- e.value = r;
6
- }, add: (...r) => {
7
- e.value.push(...r);
8
- }, remove: (r) => {
9
- e.value = e.value.filter(r);
10
- } };
11
- };
12
- export {
13
- n as useArray
14
- };
15
- //# sourceMappingURL=index279.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index279.js","sources":["../src/composables/useArray.ts"],"sourcesContent":["import { ref, type Ref } from 'vue';\n\nexport const useArray = <T>() => {\n\tconst array = ref<T[]>([]) as Ref<T[]>;\n\n\tconst set = (...items: T[]) => {\n\t\tarray.value = items;\n\t};\n\tconst add = (...items: T[]) => {\n\t\tarray.value.push(...items);\n\t};\n\tconst remove = (iteratee: (option: T) => boolean) => {\n\t\tarray.value = array.value.filter(iteratee);\n\t};\n\n\treturn { array, set, add, remove };\n};\n"],"names":["useArray","array","ref","items","iteratee"],"mappings":";AAEO,MAAMA,IAAW,MAAS;AAC1B,QAAAC,IAAQC,EAAS,CAAA,CAAE;AAYzB,SAAO,EAAE,OAAAD,GAAO,KAVJ,IAAIE,MAAe;AAC9B,IAAAF,EAAM,QAAQE;AAAA,EAAA,GASM,KAPT,IAAIA,MAAe;AACxB,IAAAF,EAAA,MAAM,KAAK,GAAGE,CAAK;AAAA,EAAA,GAMA,QAJX,CAACC,MAAqC;AACpD,IAAAH,EAAM,QAAQA,EAAM,MAAM,OAAOG,CAAQ;AAAA,EAAA,EAGT;AAClC;"}
package/dist/index284.js DELETED
@@ -1,130 +0,0 @@
1
- const P = ["top", "right", "bottom", "left"], l = Math.min, m = Math.max, M = Math.round, O = Math.floor, S = (t) => ({
2
- x: t,
3
- y: t
4
- }), p = {
5
- left: "right",
6
- right: "left",
7
- bottom: "top",
8
- top: "bottom"
9
- }, a = {
10
- start: "end",
11
- end: "start"
12
- };
13
- function w(t, n, e) {
14
- return m(t, l(n, e));
15
- }
16
- function j(t, n) {
17
- return typeof t == "function" ? t(n) : t;
18
- }
19
- function u(t) {
20
- return t.split("-")[0];
21
- }
22
- function g(t) {
23
- return t.split("-")[1];
24
- }
25
- function h(t) {
26
- return t === "x" ? "y" : "x";
27
- }
28
- function b(t) {
29
- return t === "y" ? "height" : "width";
30
- }
31
- function x(t) {
32
- return ["top", "bottom"].includes(u(t)) ? "y" : "x";
33
- }
34
- function d(t) {
35
- return h(x(t));
36
- }
37
- function C(t, n, e) {
38
- e === void 0 && (e = !1);
39
- const r = g(t), o = d(t), i = b(o);
40
- let c = o === "x" ? r === (e ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
41
- return n.reference[i] > n.floating[i] && (c = f(c)), [c, f(c)];
42
- }
43
- function L(t) {
44
- const n = f(t);
45
- return [s(t), n, s(n)];
46
- }
47
- function s(t) {
48
- return t.replace(/start|end/g, (n) => a[n]);
49
- }
50
- function A(t, n, e) {
51
- const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], c = ["bottom", "top"];
52
- switch (t) {
53
- case "top":
54
- case "bottom":
55
- return e ? n ? o : r : n ? r : o;
56
- case "left":
57
- case "right":
58
- return n ? i : c;
59
- default:
60
- return [];
61
- }
62
- }
63
- function E(t, n, e, r) {
64
- const o = g(t);
65
- let i = A(u(t), e === "start", r);
66
- return o && (i = i.map((c) => c + "-" + o), n && (i = i.concat(i.map(s)))), i;
67
- }
68
- function f(t) {
69
- return t.replace(/left|right|bottom|top/g, (n) => p[n]);
70
- }
71
- function y(t) {
72
- return {
73
- top: 0,
74
- right: 0,
75
- bottom: 0,
76
- left: 0,
77
- ...t
78
- };
79
- }
80
- function R(t) {
81
- return typeof t != "number" ? y(t) : {
82
- top: t,
83
- right: t,
84
- bottom: t,
85
- left: t
86
- };
87
- }
88
- function T(t) {
89
- const {
90
- x: n,
91
- y: e,
92
- width: r,
93
- height: o
94
- } = t;
95
- return {
96
- width: r,
97
- height: o,
98
- top: e,
99
- left: n,
100
- right: n + r,
101
- bottom: e + o,
102
- x: n,
103
- y: e
104
- };
105
- }
106
- export {
107
- w as clamp,
108
- S as createCoords,
109
- j as evaluate,
110
- y as expandPaddingObject,
111
- O as floor,
112
- g as getAlignment,
113
- d as getAlignmentAxis,
114
- C as getAlignmentSides,
115
- b as getAxisLength,
116
- L as getExpandedPlacements,
117
- s as getOppositeAlignmentPlacement,
118
- h as getOppositeAxis,
119
- E as getOppositeAxisPlacements,
120
- f as getOppositePlacement,
121
- R as getPaddingObject,
122
- u as getSide,
123
- x as getSideAxis,
124
- m as max,
125
- l as min,
126
- T as rectToClientRect,
127
- M as round,
128
- P as sides
129
- };
130
- //# sourceMappingURL=index284.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index284.js","sources":["../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs"],"sourcesContent":["/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = ['left', 'right'];\n const rl = ['right', 'left'];\n const tb = ['top', 'bottom'];\n const bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n"],"names":["sides","min","max","round","floor","createCoords","v","oppositeSideMap","oppositeAlignmentMap","clamp","start","value","end","evaluate","param","getSide","placement","getAlignment","getOppositeAxis","axis","getAxisLength","getSideAxis","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","length","mainAlignmentSide","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","getSideList","side","isStart","lr","rl","tb","bt","getOppositeAxisPlacements","flipAlignment","direction","list","expandPaddingObject","padding","getPaddingObject","rectToClientRect","rect","x","y","width","height"],"mappings":"AAKK,MAACA,IAAQ,CAAC,OAAO,SAAS,UAAU,MAAM,GAGzCC,IAAM,KAAK,KACXC,IAAM,KAAK,KACXC,IAAQ,KAAK,OACbC,IAAQ,KAAK,OACbC,IAAe,CAAAC,OAAM;AAAA,EACzB,GAAGA;AAAA,EACH,GAAGA;AACL,IACMC,IAAkB;AAAA,EACtB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AACP,GACMC,IAAuB;AAAA,EAC3B,OAAO;AAAA,EACP,KAAK;AACP;AACA,SAASC,EAAMC,GAAOC,GAAOC,GAAK;AAChC,SAAOV,EAAIQ,GAAOT,EAAIU,GAAOC,CAAG,CAAC;AACnC;AACA,SAASC,EAASF,GAAOG,GAAO;AAC9B,SAAO,OAAOH,KAAU,aAAaA,EAAMG,CAAK,IAAIH;AACtD;AACA,SAASI,EAAQC,GAAW;AAC1B,SAAOA,EAAU,MAAM,GAAG,EAAE,CAAC;AAC/B;AACA,SAASC,EAAaD,GAAW;AAC/B,SAAOA,EAAU,MAAM,GAAG,EAAE,CAAC;AAC/B;AACA,SAASE,EAAgBC,GAAM;AAC7B,SAAOA,MAAS,MAAM,MAAM;AAC9B;AACA,SAASC,EAAcD,GAAM;AAC3B,SAAOA,MAAS,MAAM,WAAW;AACnC;AACA,SAASE,EAAYL,GAAW;AAC9B,SAAO,CAAC,OAAO,QAAQ,EAAE,SAASD,EAAQC,CAAS,CAAC,IAAI,MAAM;AAChE;AACA,SAASM,EAAiBN,GAAW;AACnC,SAAOE,EAAgBG,EAAYL,CAAS,CAAC;AAC/C;AACA,SAASO,EAAkBP,GAAWQ,GAAOC,GAAK;AAChD,EAAIA,MAAQ,WACVA,IAAM;AAER,QAAMC,IAAYT,EAAaD,CAAS,GAClCW,IAAgBL,EAAiBN,CAAS,GAC1CY,IAASR,EAAcO,CAAa;AAC1C,MAAIE,I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