bitboss-ui 2.0.7 → 2.0.9

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 (413) hide show
  1. package/dist/index.js +139 -138
  2. package/dist/index.js.map +1 -1
  3. package/dist/index10.js +7 -78
  4. package/dist/index10.js.map +1 -1
  5. package/dist/{index100.js → index101.js} +3 -3
  6. package/dist/{index100.js.map → index101.js.map} +1 -1
  7. package/dist/{index102.js → index103.js} +3 -3
  8. package/dist/{index102.js.map → index103.js.map} +1 -1
  9. package/dist/{index104.js → index105.js} +8 -8
  10. package/dist/{index104.js.map → index105.js.map} +1 -1
  11. package/dist/{index106.js → index107.js} +9 -9
  12. package/dist/{index106.js.map → index107.js.map} +1 -1
  13. package/dist/{index108.js → index109.js} +3 -3
  14. package/dist/{index108.js.map → index109.js.map} +1 -1
  15. package/dist/index11.js +74 -35
  16. package/dist/index11.js.map +1 -1
  17. package/dist/{index110.js → index111.js} +3 -3
  18. package/dist/{index110.js.map → index111.js.map} +1 -1
  19. package/dist/{index112.js → index113.js} +3 -3
  20. package/dist/{index112.js.map → index113.js.map} +1 -1
  21. package/dist/{index114.js → index115.js} +3 -3
  22. package/dist/{index114.js.map → index115.js.map} +1 -1
  23. package/dist/{index116.js → index117.js} +8 -8
  24. package/dist/{index116.js.map → index117.js.map} +1 -1
  25. package/dist/{index118.js → index119.js} +2 -2
  26. package/dist/{index118.js.map → index119.js.map} +1 -1
  27. package/dist/index12.js +36 -189
  28. package/dist/index12.js.map +1 -1
  29. package/dist/index121.js +34 -38
  30. package/dist/index121.js.map +1 -1
  31. package/dist/index122.js +38 -38
  32. package/dist/index122.js.map +1 -1
  33. package/dist/index123.js +39 -42
  34. package/dist/index123.js.map +1 -1
  35. package/dist/index124.js +43 -31
  36. package/dist/index124.js.map +1 -1
  37. package/dist/index125.js +35 -2
  38. package/dist/index125.js.map +1 -1
  39. package/dist/index126.js +2 -21
  40. package/dist/index126.js.map +1 -1
  41. package/dist/index127.js +21 -2
  42. package/dist/index127.js.map +1 -1
  43. package/dist/index128.js +2 -312
  44. package/dist/index128.js.map +1 -1
  45. package/dist/index129.js +309 -21
  46. package/dist/index129.js.map +1 -1
  47. package/dist/index13.js +189 -78
  48. package/dist/index13.js.map +1 -1
  49. package/dist/index130.js +24 -2
  50. package/dist/index130.js.map +1 -1
  51. package/dist/index131.js +2 -5
  52. package/dist/index131.js.map +1 -1
  53. package/dist/index132.js +5 -9
  54. package/dist/index132.js.map +1 -1
  55. package/dist/index133.js +8 -5
  56. package/dist/index133.js.map +1 -1
  57. package/dist/index134.js +6 -3
  58. package/dist/index134.js.map +1 -1
  59. package/dist/index135.js +1 -1
  60. package/dist/index136.js +1 -1
  61. package/dist/index137.js +1 -1
  62. package/dist/index138.js +1 -1
  63. package/dist/index139.js +1 -1
  64. package/dist/index14.js +85 -0
  65. package/dist/index14.js.map +1 -0
  66. package/dist/index140.js +1 -1
  67. package/dist/index141.js +1 -1
  68. package/dist/index142.js +1 -1
  69. package/dist/index143.js +1 -1
  70. package/dist/index144.js +1 -1
  71. package/dist/index145.js +1 -1
  72. package/dist/index146.js +1 -1
  73. package/dist/index147.js +1 -1
  74. package/dist/index148.js +1 -1
  75. package/dist/index149.js +1 -1
  76. package/dist/index150.js +1 -1
  77. package/dist/index151.js +1 -1
  78. package/dist/index152.js +1 -1
  79. package/dist/index153.js +1 -1
  80. package/dist/index154.js +1 -1
  81. package/dist/index155.js +1 -1
  82. package/dist/index156.js +1 -1
  83. package/dist/index157.js +1 -1
  84. package/dist/index158.js +1 -1
  85. package/dist/index159.js +1 -1
  86. package/dist/{index15.js → index16.js} +4 -4
  87. package/dist/{index15.js.map → index16.js.map} +1 -1
  88. package/dist/index160.js +2 -2
  89. package/dist/{index162.js → index161.js} +1 -1
  90. package/dist/index161.js.map +1 -0
  91. package/dist/index163.js +6 -0
  92. package/dist/index163.js.map +1 -0
  93. package/dist/index165.js +1 -1
  94. package/dist/index166.js +1 -1
  95. package/dist/index167.js +1 -1
  96. package/dist/index168.js +1 -1
  97. package/dist/index169.js +1 -1
  98. package/dist/index170.js +2 -2
  99. package/dist/index171.js +6 -0
  100. package/dist/index171.js.map +1 -0
  101. package/dist/index173.js +2 -3
  102. package/dist/index173.js.map +1 -1
  103. package/dist/index174.js +1 -1
  104. package/dist/index175.js +1 -1
  105. package/dist/index176.js +1 -1
  106. package/dist/index177.js +1 -1
  107. package/dist/index178.js +1 -1
  108. package/dist/index179.js +1 -1
  109. package/dist/{index17.js → index18.js} +4 -4
  110. package/dist/{index17.js.map → index18.js.map} +1 -1
  111. package/dist/index180.js +1 -1
  112. package/dist/index181.js +1 -1
  113. package/dist/index182.js +1 -1
  114. package/dist/index183.js +1 -1
  115. package/dist/index184.js +1 -1
  116. package/dist/{index186.js → index185.js} +1 -1
  117. package/dist/index185.js.map +1 -0
  118. package/dist/index187.js +6 -0
  119. package/dist/index187.js.map +1 -0
  120. package/dist/index189.js +1 -1
  121. package/dist/index190.js +1 -1
  122. package/dist/index191.js +1 -1
  123. package/dist/index192.js +1 -1
  124. package/dist/index193.js +1 -1
  125. package/dist/index194.js +1 -1
  126. package/dist/index195.js +1 -1
  127. package/dist/index196.js +1 -1
  128. package/dist/index197.js +1 -1
  129. package/dist/index198.js +3 -81
  130. package/dist/index198.js.map +1 -1
  131. package/dist/{index19.js → index20.js} +19 -18
  132. package/dist/{index19.js.map → index20.js.map} +1 -1
  133. package/dist/index200.js +126 -2
  134. package/dist/index200.js.map +1 -1
  135. package/dist/index201.js +5 -4
  136. package/dist/index201.js.map +1 -1
  137. package/dist/index202.js +123 -2
  138. package/dist/index202.js.map +1 -1
  139. package/dist/index203.js +19 -8
  140. package/dist/index203.js.map +1 -1
  141. package/dist/index204.js +14 -124
  142. package/dist/index204.js.map +1 -1
  143. package/dist/index205.js +16 -5
  144. package/dist/index205.js.map +1 -1
  145. package/dist/index206.js +2 -123
  146. package/dist/index206.js.map +1 -1
  147. package/dist/index207.js +2 -19
  148. package/dist/index207.js.map +1 -1
  149. package/dist/index208.js +35 -16
  150. package/dist/index208.js.map +1 -1
  151. package/dist/index209.js +172 -14
  152. package/dist/index209.js.map +1 -1
  153. package/dist/index210.js +6 -2
  154. package/dist/index210.js.map +1 -1
  155. package/dist/index211.js +44 -2
  156. package/dist/index211.js.map +1 -1
  157. package/dist/index213.js +12 -173
  158. package/dist/index213.js.map +1 -1
  159. package/dist/index214.js +5 -6
  160. package/dist/index214.js.map +1 -1
  161. package/dist/index215.js +369 -43
  162. package/dist/index215.js.map +1 -1
  163. package/dist/index216.js +161 -0
  164. package/dist/index216.js.map +1 -0
  165. package/dist/index217.js +84 -13
  166. package/dist/index217.js.map +1 -1
  167. package/dist/index219.js +67 -355
  168. package/dist/index219.js.map +1 -1
  169. package/dist/{index21.js → index22.js} +21 -21
  170. package/dist/{index21.js.map → index22.js.map} +1 -1
  171. package/dist/index220.js +8 -19
  172. package/dist/index220.js.map +1 -1
  173. package/dist/index221.js +3 -27
  174. package/dist/index221.js.map +1 -1
  175. package/dist/index222.js +2 -3
  176. package/dist/index222.js.map +1 -1
  177. package/dist/index223.js +4 -249
  178. package/dist/index223.js.map +1 -1
  179. package/dist/index224.js +2 -52
  180. package/dist/index224.js.map +1 -1
  181. package/dist/index225.js +3 -44
  182. package/dist/index225.js.map +1 -1
  183. package/dist/index226.js +7 -5
  184. package/dist/index226.js.map +1 -1
  185. package/dist/index227.js +19 -49
  186. package/dist/index227.js.map +1 -1
  187. package/dist/index228.js +27 -3
  188. package/dist/index228.js.map +1 -1
  189. package/dist/index229.js +3 -3
  190. package/dist/index229.js.map +1 -1
  191. package/dist/index230.js +249 -7
  192. package/dist/index230.js.map +1 -1
  193. package/dist/index231.js +50 -156
  194. package/dist/index231.js.map +1 -1
  195. package/dist/index232.js +38 -78
  196. package/dist/index232.js.map +1 -1
  197. package/dist/index233.js +8 -0
  198. package/dist/index233.js.map +1 -0
  199. package/dist/index234.js +49 -2
  200. package/dist/index234.js.map +1 -1
  201. package/dist/index235.js +2 -18
  202. package/dist/index235.js.map +1 -1
  203. package/dist/index236.js +2 -106
  204. package/dist/index236.js.map +1 -1
  205. package/dist/index237.js +21 -0
  206. package/dist/index237.js.map +1 -0
  207. package/dist/index238.js +53 -47
  208. package/dist/index238.js.map +1 -1
  209. package/dist/{index23.js → index24.js} +8 -8
  210. package/dist/{index23.js.map → index24.js.map} +1 -1
  211. package/dist/index240.js +100 -2
  212. package/dist/index240.js.map +1 -1
  213. package/dist/index242.js +9 -2
  214. package/dist/index242.js.map +1 -1
  215. package/dist/index243.js +2 -3
  216. package/dist/index243.js.map +1 -1
  217. package/dist/index244.js +3 -6
  218. package/dist/index244.js.map +1 -1
  219. package/dist/index245.js +12 -16
  220. package/dist/index245.js.map +1 -1
  221. package/dist/index246.js +8 -8
  222. package/dist/index246.js.map +1 -1
  223. package/dist/index247.js +9 -23
  224. package/dist/index247.js.map +1 -1
  225. package/dist/index248.js +17 -9
  226. package/dist/index248.js.map +1 -1
  227. package/dist/index257.js +1 -1
  228. package/dist/index258.js +1 -1
  229. package/dist/{index25.js → index26.js} +6 -6
  230. package/dist/{index25.js.map → index26.js.map} +1 -1
  231. package/dist/index263.js +224 -2
  232. package/dist/index263.js.map +1 -1
  233. package/dist/index264.js +4 -2
  234. package/dist/index264.js.map +1 -1
  235. package/dist/index265.js +9 -2
  236. package/dist/index265.js.map +1 -1
  237. package/dist/index266.js +5 -1
  238. package/dist/index266.js.map +1 -1
  239. package/dist/index267.js +16 -2
  240. package/dist/index267.js.map +1 -1
  241. package/dist/index268.js +9 -2
  242. package/dist/index268.js.map +1 -1
  243. package/dist/index269.js +23 -28
  244. package/dist/index269.js.map +1 -1
  245. package/dist/index270.js +199 -21
  246. package/dist/index270.js.map +1 -1
  247. package/dist/index271.js +439 -0
  248. package/dist/index271.js.map +1 -0
  249. package/dist/index272.js +121 -218
  250. package/dist/index272.js.map +1 -1
  251. package/dist/index274.js +5 -200
  252. package/dist/index274.js.map +1 -1
  253. package/dist/index275.js +2 -436
  254. package/dist/index275.js.map +1 -1
  255. package/dist/index276.js +2 -127
  256. package/dist/index276.js.map +1 -1
  257. package/dist/index277.js +2 -5
  258. package/dist/index277.js.map +1 -1
  259. package/dist/index278.js +2 -2
  260. package/dist/index278.js.map +1 -1
  261. package/dist/index279.js +2 -9
  262. package/dist/index279.js.map +1 -1
  263. package/dist/{index27.js → index28.js} +3 -3
  264. package/dist/{index27.js.map → index28.js.map} +1 -1
  265. package/dist/index280.js +2 -69
  266. package/dist/index280.js.map +1 -1
  267. package/dist/index281.js +28 -3
  268. package/dist/index281.js.map +1 -1
  269. package/dist/index282.js +22 -12
  270. package/dist/index282.js.map +1 -1
  271. package/dist/index284.js +2 -17
  272. package/dist/index284.js.map +1 -1
  273. package/dist/index285.js +68 -2
  274. package/dist/index285.js.map +1 -1
  275. package/dist/index287.js +3 -211
  276. package/dist/index287.js.map +1 -1
  277. package/dist/index288.js +211 -15
  278. package/dist/index288.js.map +1 -1
  279. package/dist/index289.js +15 -4
  280. package/dist/index289.js.map +1 -1
  281. package/dist/index290.js +11 -4
  282. package/dist/index290.js.map +1 -1
  283. package/dist/index291.js +34 -58
  284. package/dist/index291.js.map +1 -1
  285. package/dist/index292.js +4 -35
  286. package/dist/index292.js.map +1 -1
  287. package/dist/index293.js +4 -7
  288. package/dist/index293.js.map +1 -1
  289. package/dist/index294.js +57 -17
  290. package/dist/index294.js.map +1 -1
  291. package/dist/index295.js +2 -7
  292. package/dist/index295.js.map +1 -1
  293. package/dist/index296.js +7 -2
  294. package/dist/index296.js.map +1 -1
  295. package/dist/index297.js +6 -10
  296. package/dist/index297.js.map +1 -1
  297. package/dist/index298.js +17 -45
  298. package/dist/index298.js.map +1 -1
  299. package/dist/index299.js +50 -0
  300. package/dist/index299.js.map +1 -0
  301. package/dist/{index29.js → index30.js} +3 -3
  302. package/dist/{index29.js.map → index30.js.map} +1 -1
  303. package/dist/index301.js +416 -42
  304. package/dist/index301.js.map +1 -1
  305. package/dist/index302.js +50 -0
  306. package/dist/index302.js.map +1 -0
  307. package/dist/{index31.js → index32.js} +4 -4
  308. package/dist/{index31.js.map → index32.js.map} +1 -1
  309. package/dist/{index33.js → index34.js} +5 -5
  310. package/dist/{index33.js.map → index34.js.map} +1 -1
  311. package/dist/{index35.js → index36.js} +23 -22
  312. package/dist/{index35.js.map → index36.js.map} +1 -1
  313. package/dist/{index37.js → index38.js} +7 -7
  314. package/dist/{index37.js.map → index38.js.map} +1 -1
  315. package/dist/{index39.js → index40.js} +3 -3
  316. package/dist/{index39.js.map → index40.js.map} +1 -1
  317. package/dist/{index41.js → index42.js} +4 -4
  318. package/dist/{index41.js.map → index42.js.map} +1 -1
  319. package/dist/{index43.js → index44.js} +12 -11
  320. package/dist/{index43.js.map → index44.js.map} +1 -1
  321. package/dist/{index45.js → index46.js} +4 -4
  322. package/dist/{index45.js.map → index46.js.map} +1 -1
  323. package/dist/{index47.js → index48.js} +3 -3
  324. package/dist/{index47.js.map → index48.js.map} +1 -1
  325. package/dist/index5.js +14 -40
  326. package/dist/index5.js.map +1 -1
  327. package/dist/{index49.js → index50.js} +4 -4
  328. package/dist/{index49.js.map → index50.js.map} +1 -1
  329. package/dist/{index51.js → index52.js} +3 -3
  330. package/dist/{index51.js.map → index52.js.map} +1 -1
  331. package/dist/{index53.js → index54.js} +3 -3
  332. package/dist/{index53.js.map → index54.js.map} +1 -1
  333. package/dist/{index55.js → index56.js} +3 -3
  334. package/dist/{index55.js.map → index56.js.map} +1 -1
  335. package/dist/{index57.js → index58.js} +2 -2
  336. package/dist/{index57.js.map → index58.js.map} +1 -1
  337. package/dist/index6.js +38 -76
  338. package/dist/index6.js.map +1 -1
  339. package/dist/{index59.js → index60.js} +14 -13
  340. package/dist/{index59.js.map → index60.js.map} +1 -1
  341. package/dist/{index61.js → index62.js} +3 -3
  342. package/dist/{index61.js.map → index62.js.map} +1 -1
  343. package/dist/{index63.js → index64.js} +3 -3
  344. package/dist/{index63.js.map → index64.js.map} +1 -1
  345. package/dist/{index65.js → index66.js} +5 -5
  346. package/dist/{index65.js.map → index66.js.map} +1 -1
  347. package/dist/{index67.js → index68.js} +3 -3
  348. package/dist/{index67.js.map → index68.js.map} +1 -1
  349. package/dist/index7.js +78 -62
  350. package/dist/index7.js.map +1 -1
  351. package/dist/{index69.js → index70.js} +2 -2
  352. package/dist/{index69.js.map → index70.js.map} +1 -1
  353. package/dist/{index71.js → index72.js} +9 -9
  354. package/dist/{index71.js.map → index72.js.map} +1 -1
  355. package/dist/{index73.js → index74.js} +3 -3
  356. package/dist/{index73.js.map → index74.js.map} +1 -1
  357. package/dist/{index75.js → index76.js} +5 -5
  358. package/dist/{index75.js.map → index76.js.map} +1 -1
  359. package/dist/index78.js +37 -120
  360. package/dist/index78.js.map +1 -1
  361. package/dist/index79.js +130 -0
  362. package/dist/index79.js.map +1 -0
  363. package/dist/index8.js +60 -18
  364. package/dist/index8.js.map +1 -1
  365. package/dist/{index80.js → index81.js} +5 -5
  366. package/dist/{index80.js.map → index81.js.map} +1 -1
  367. package/dist/{index82.js → index83.js} +25 -24
  368. package/dist/{index82.js.map → index83.js.map} +1 -1
  369. package/dist/{index84.js → index85.js} +7 -7
  370. package/dist/{index84.js.map → index85.js.map} +1 -1
  371. package/dist/{index86.js → index87.js} +2 -2
  372. package/dist/{index86.js.map → index87.js.map} +1 -1
  373. package/dist/{index88.js → index89.js} +3 -3
  374. package/dist/{index88.js.map → index89.js.map} +1 -1
  375. package/dist/index9.js +19 -7
  376. package/dist/index9.js.map +1 -1
  377. package/dist/{index90.js → index91.js} +3 -3
  378. package/dist/{index90.js.map → index91.js.map} +1 -1
  379. package/dist/{index92.js → index93.js} +3 -3
  380. package/dist/{index92.js.map → index93.js.map} +1 -1
  381. package/dist/{index94.js → index95.js} +1 -1
  382. package/dist/index95.js.map +1 -0
  383. package/dist/{index96.js → index97.js} +3 -3
  384. package/dist/{index96.js.map → index97.js.map} +1 -1
  385. package/dist/{index98.js → index99.js} +3 -3
  386. package/dist/{index98.js.map → index99.js.map} +1 -1
  387. package/dist/style.css +1 -1
  388. package/package.json +1 -1
  389. package/dist/index120.js +0 -43
  390. package/dist/index120.js.map +0 -1
  391. package/dist/index162.js.map +0 -1
  392. package/dist/index164.js +0 -6
  393. package/dist/index164.js.map +0 -1
  394. package/dist/index172.js +0 -5
  395. package/dist/index172.js.map +0 -1
  396. package/dist/index186.js.map +0 -1
  397. package/dist/index188.js +0 -6
  398. package/dist/index188.js.map +0 -1
  399. package/dist/index212.js +0 -38
  400. package/dist/index212.js.map +0 -1
  401. package/dist/index218.js +0 -8
  402. package/dist/index218.js.map +0 -1
  403. package/dist/index241.js +0 -13
  404. package/dist/index241.js.map +0 -1
  405. package/dist/index283.js +0 -12
  406. package/dist/index283.js.map +0 -1
  407. package/dist/index300.js +0 -424
  408. package/dist/index300.js.map +0 -1
  409. package/dist/index4.js +0 -17
  410. package/dist/index4.js.map +0 -1
  411. package/dist/index77.js +0 -47
  412. package/dist/index77.js.map +0 -1
  413. package/dist/index94.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index23.js","sources":["../src/components/BaseDialog/BaseDialog.vue"],"sourcesContent":["<template>\n\t<teleport to=\"body\">\n\t\t<div v-bind=\"overlayAttributes\" ref=\"overlay\">\n\t\t\t<div v-bind=\"panelAttributes\" ref=\"panel\">\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"hasRenderedAtLeastOnce\"\n\t\t\t\t\tref=\"content\"\n\t\t\t\t\tclass=\"bb-base-dialog__content\"\n\t\t\t\t>\n\t\t\t\t\t<div ref=\"header\" class=\"bb-base-dialog__header\">\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:close=\"onCloseClick\"\n\t\t\t\t\t\t\tname=\"header\"\n\t\t\t\t\t\t\t:title=\"title\"\n\t\t\t\t\t\t\t:title-id=\"titleId\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span :id=\"titleId\" class=\"bb-base-dialog__title\">\n\t\t\t\t\t\t\t\t<slot name=\"title\" :text=\"title\">{{ title }}</slot>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class=\"bb-base-dialog-close\">\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\tv-if=\"showClose\"\n\t\t\t\t\t\t\t\t\t:aria-label=\"closeLabel\"\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t@click=\"onCloseClick\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<slot name=\"close\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"bb-base-dialog-close__icon\"\n\t\t\t\t\t\t\t\t\t\t\t><svg\n\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\td=\"M23 23L1 1M23 1L1 23\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div ref=\"body\" class=\"bb-base-dialog__body\">\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:description-id=\"descriptionId\"\n\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t:text=\"description\"\n\t\t\t\t\t\t\t><div\n\t\t\t\t\t\t\t\tv-if=\"description\"\n\t\t\t\t\t\t\t\t:id=\"descriptionId\"\n\t\t\t\t\t\t\t\tclass=\"bb-base-dialog__description sr-only\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{{ description }}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style=\"flex: 10000 10000 0%\"></div>\n\t\t\t\t\t<div ref=\"footer\" class=\"bb-base-dialog__footer\">\n\t\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</teleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n\tcomputed,\n\tonBeforeUnmount,\n\tonMounted,\n\tref,\n\tuseAttrs,\n\tnextTick,\n\tgetCurrentInstance,\n\twatch,\n} from 'vue';\nimport { throttle } from '@/utilities/functions/throttle';\nimport { useFocusTrap } from '@vueuse/integrations/useFocusTrap';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport { waitFor } from '@/utilities/functions/waitFor';\nimport type { CommonProps, Size } from '@/types/CommonProps';\nimport { useModalsState } from '@/composables/useModalsState';\nimport { useLogger } from '@/composables/useLogger';\n\nexport type Sizes = {\n\tsm: number;\n\tmd: number;\n\tlg: number;\n};\n\nexport type BaseDialogProps = Pick<\n\tCommonProps,\n\t| 'closeLabel'\n\t| 'compact'\n\t| 'disabled'\n\t| 'eager'\n\t| 'panelClasses'\n\t| 'overlayClasses'\n\t| 'persistent'\n\t| 'showClose'\n\t| 'title'\n\t| 'transition'\n\t| 'transitionDuration'\n> &\n\tSize<Sizes> & {\n\t\t/**\n\t\t * Description of the content of the modal. Extremely useful for accessibility reasons.\n\t\t */\n\t\tdescription?: string;\n\t\t/**\n\t\t * Elements that obtains focus immediately after opening the dialog.\n\t\t * By default it's the first tabbable item.\n\t\t */\n\t\tfocusTarget?: string;\n\t\t/**\n\t\t * Displays the modala as fulscreen with no margin to the page\n\t\t */\n\t\tfullscreen?: boolean;\n\t\t/**\n\t\t * Defines the state open / closed of the modal.\n\t\t */\n\t\tmodelValue?: boolean | null;\n\t};\n\nconst props = withDefaults(defineProps<BaseDialogProps>(), {\n\tcloseLabel: 'Chiudi modale',\n\tshowClose: true,\n\tsize: 'sm',\n\ttransition: 'fade',\n\ttransitionDuration: 350,\n\tpanelClasses: () => [],\n\toverlayClasses: () => [],\n});\n\nexport type BaseDialogSlots = {\n\theader?: (props: {\n\t\ttitleId: typeof titleId;\n\t\tclose: typeof onCloseClick;\n\t\ttitle: BaseDialogProps['title'];\n\t}) => any;\n\ttitle?: (props: { text: BaseDialogProps['title'] }) => any;\n\tclose?: (props: object) => any;\n\tdescription?: (props: {\n\t\tdescriptionId: typeof descriptionId;\n\t\ttext: BaseDialogProps['description'];\n\t}) => any;\n\tdefault?: (props: object) => any;\n\tfooter?: (props: object) => any;\n};\n\ndefineSlots<BaseDialogSlots>();\n\nexport type BaseDialogEvents = {\n\t(e: 'shown'): void;\n\t(e: 'hidden'): void;\n\t(e: 'update:modelValue', value: boolean): void;\n};\n\nconst emit = defineEmits<BaseDialogEvents>();\n\nconst titleId = `title_${useId().id.value}`;\nconst descriptionId = `description_${useId().id.value}`;\n\nconst observer = ref<ResizeObserver | null>(null);\nconst overlay = ref<HTMLElement | null>(null);\nconst panel = ref<HTMLElement | null>(null);\nconst content = ref<HTMLElement | null>(null);\nconst header = ref<HTMLElement | null>(null);\nconst body = ref<HTMLElement | null>(null);\nconst footer = ref<HTMLElement | null>(null);\nconst height = ref<number | null>(null);\n\n// @ts-expect-error possibly undef\nconst isNuxt = !!getCurrentInstance()?.proxy?.$nuxt;\n\nconst orderInStack = ref(0);\nconst isCurrent = computed(() => {\n\tconst { openedModals } = useModalsState();\n\treturn openedModals.value && openedModals.value === orderInStack.value;\n});\n\nconst { activate, deactivate } = useFocusTrap(panel, {\n\tinitialFocus: props.focusTarget ?? undefined,\n\tclickOutsideDeactivates: (event) => {\n\t\t// This is used when other teleports are running.\n\t\t// eg if you have a select inside a modal it will be in fact outside of the modal because of teleport\n\t\treturn event.target === overlay.value;\n\t},\n\tallowOutsideClick: true,\n\t/* On esc deactivate the trap, return focus and then close the modal */\n\tescapeDeactivates: () => {\n\t\tnextTick(() => {\n\t\t\temit('update:modelValue', false);\n\t\t});\n\t\treturn true;\n\t},\n});\n\nconst attrs = useAttrs();\n\nconst closeLabel = computed(() => props.closeLabel);\n\nonMounted(async () => {\n\tif (body.value) {\n\t\tobserver.value = new ResizeObserver(onContentGrow);\n\t\tobserver.value.observe(body.value);\n\t}\n\twindow.addEventListener('resize', onContentGrow);\n\n\tonContentGrow();\n\tif (!props.modelValue && !hasRenderedAtLeastOnce.value) return;\n\tif (isNuxt && !globalThis.document) return;\n\talignToModelValue();\n});\nonBeforeUnmount(() => {\n\twindow.removeEventListener('resize', onContentGrow);\n});\n\nconst open = ref(false);\nconst opening = ref(false);\nconst closed = ref(true);\nconst closing = ref(false);\nconst hasRenderedAtLeastOnce = ref(props.eager || props.modelValue);\n\nconst busy = computed(() => opening.value || closing.value);\n\nconst restrictBody = () => {\n\tif (!globalThis.document) return;\n\tconst scrollBarWidth =\n\t\twindow.innerWidth - document.documentElement.clientWidth;\n\tdocument.body.style.overflow = 'hidden';\n\tdocument.body.style.paddingRight = `${scrollBarWidth}px`;\n};\nconst releaseBody = () => {\n\tif (!globalThis.document) return;\n\tdocument.body.style.overflow = 'auto';\n\tdocument.body.style.paddingRight = '0px';\n};\n\nonBeforeUnmount(() => {\n\tif (props.modelValue) {\n\t\tconst { openedModals, modalHasClosed } = useModalsState();\n\t\tif (openedModals.value) {\n\t\t\tmodalHasClosed();\n\t\t\torderInStack.value = 0;\n\t\t\treleaseBody();\n\t\t}\n\t}\n});\n\n/**\n * When modelValue becomes true if the component wasn't rendered render it\n * and wait for it to be on the page (or transitions would not work).\n * Stash the latest focused element so we can return it later when it closes.\n * Focus on the panel upon opening.\n * ---\n * Notice all interactions update modelValue and then this function aligns the display to it\n */\nconst alignToModelValue = async () => {\n\tif (props.modelValue) {\n\t\tif (!hasRenderedAtLeastOnce.value) {\n\t\t\thasRenderedAtLeastOnce.value = true;\n\t\t\tawait waitFor(() => !!body.value);\n\t\t\tawait nextTick();\n\t\t\tif (body.value) {\n\t\t\t\tobserver.value = new ResizeObserver(onContentGrow);\n\t\t\t\tobserver.value.observe(body.value);\n\t\t\t}\n\t\t}\n\n\t\tclosed.value = false;\n\t\tclosing.value = false;\n\t\topening.value = true;\n\n\t\t// This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n\t\tconst { modalHasOpened, openedModals } = useModalsState();\n\t\tmodalHasOpened();\n\t\torderInStack.value = openedModals.value;\n\t\trestrictBody();\n\n\t\tawait wait(props.transitionDuration);\n\t\topening.value = false;\n\t\topen.value = true;\n\t\temit('shown');\n\t\tactivate();\n\t} else {\n\t\tdeactivate();\n\t\topening.value = false;\n\t\topen.value = false;\n\t\tclosing.value = true;\n\n\t\tawait wait(props.transitionDuration);\n\n\t\tclosing.value = false;\n\t\tclosed.value = true;\n\t\tconst { modalHasClosed, openedModals } = useModalsState();\n\t\tmodalHasClosed();\n\t\torderInStack.value = 0;\n\t\tif (!openedModals.value) {\n\t\t\treleaseBody();\n\t\t}\n\t\temit('hidden');\n\t}\n};\n/**\n * Every time modelValue changes align the display to it\n */\nwatch(\n\t() => props.modelValue,\n\t() => {\n\t\tif (!props.modelValue && !hasRenderedAtLeastOnce.value) return;\n\t\tif (isNuxt && !globalThis.document) return;\n\t\talignToModelValue();\n\t},\n\t{ flush: 'post' }\n);\n\n/**\n * Disable scrolling\n */\nconst onOverlayScroll = (event: Event) => {\n\tif (event.target === overlay.value) {\n\t\tevent.preventDefault();\n\t}\n};\n\n/**\n * Close the modal on overlay click if not persistent\n */\nconst onOverlayClick = (event: MouseEvent) => {\n\tif (props.disabled || busy.value) return;\n\tif (overlay.value) {\n\t\tif (event.target === overlay.value) {\n\t\t\tif (!props.persistent) {\n\t\t\t\temit('update:modelValue', false);\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * On click on the X button\n */\nconst onCloseClick = () => {\n\tif (props.disabled || busy.value) return;\n\tdeactivate();\n\temit('update:modelValue', false);\n};\n\nconst overlayAttributes = computed(() => {\n\tconst classes = [\n\t\t{\n\t\t\t'bb-base-dialog bb-base-dialog__overlay': true,\n\t\t\t'bb-base-dialog--fullscreen': props.fullscreen,\n\t\t\t'bb-base-dialog--faded': !isCurrent.value,\n\t\t\t'bb-base-dialog--open': open.value,\n\t\t\t'bb-base-dialog--opening': opening.value,\n\t\t\t'bb-base-dialog--closed': closed.value,\n\t\t\t'bb-base-dialog--closing': closing.value,\n\t\t\t[`bb-base-dialog--transition-${props.transition}`]: true,\n\t\t},\n\t\tprops.overlayClasses,\n\t].flat();\n\tconst eventListeners = {\n\t\tonClick: onOverlayClick,\n\t\tonScroll: onOverlayScroll,\n\t\tonTouchmove: onOverlayScroll,\n\t\tonWheel: onOverlayScroll,\n\t\tonKeydown: onOverlayScroll,\n\t};\n\n\tconst style = {\n\t\ttransitionDuration: props.transitionDuration / 1000 + 's',\n\t};\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t\t...eventListeners,\n\t\t...attrs,\n\t};\n});\n\nconst panelAttributes = computed(() => {\n\tconst classes = [\n\t\t{\n\t\t\t'bb-base-dialog__panel': true,\n\t\t\t'bb-base-dialog__panel--compact': props.compact,\n\t\t},\n\t\tprops.panelClasses,\n\t].flat();\n\n\tconst accessibilityAttrs: {\n\t\t[key: string]: string | boolean;\n\t} = {\n\t\trole: 'dialog',\n\t\t'aria-modal': true,\n\t};\n\n\tif (hasRenderedAtLeastOnce.value) {\n\t\tif (props.title) {\n\t\t\taccessibilityAttrs['aria-labelledby'] = titleId;\n\t\t}\n\n\t\tif (props.description)\n\t\t\taccessibilityAttrs['aria-describedby'] = descriptionId;\n\t}\n\n\tlet maxWidth;\n\tconst sizes: Sizes = {\n\t\tsm: 384,\n\t\tmd: 652,\n\t\tlg: 896,\n\t};\n\tif (props.fullscreen) maxWidth = '100%';\n\telse if (typeof props.size === 'number') maxWidth = props.size + 'px';\n\telse if (props.size in sizes)\n\t\tmaxWidth = sizes[props.size as keyof Sizes] + 'px';\n\telse maxWidth = props.size + 'px';\n\n\tconst style = {\n\t\tmaxWidth,\n\t\ttransitionDuration: props.transitionDuration / 1000 + 's',\n\t};\n\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t\t...accessibilityAttrs,\n\t};\n});\n\nlet calledGrowTimes = 0;\n\n/**\n * This is called when content inside body changes.\n * Gets the total height the panel needs to be\n * It could be called numerous times so throttle every 300ms\n */\nconst onContentGrow = throttle(\n\tasync () => {\n\t\tcalledGrowTimes++;\n\t\tif (calledGrowTimes === 100) {\n\t\t\tconst { error } = useLogger();\n\t\t\terror(\n\t\t\t\t'Dialog is updating its height too often. Please check the content is reliably sized.'\n\t\t\t);\n\t\t}\n\t\tif (props.fullscreen) {\n\t\t\theight.value = window.innerHeight;\n\t\t\treturn;\n\t\t}\n\t\tif (header.value && body.value && footer.value) {\n\t\t\tconst contentHeight =\n\t\t\t\theader.value.scrollHeight +\n\t\t\t\tbody.value.scrollHeight +\n\t\t\t\tfooter.value.scrollHeight +\n\t\t\t\t2;\n\t\t\t/* Add two so renderless elements at the bottom are not cut off */\n\t\t\tif (content.value) {\n\t\t\t\tcontent.value.style.height = '0px';\n\t\t\t\tcontent.value.style.height = `${contentHeight + 2}px`;\n\t\t\t\t/**\n\t\t\t\t * Run until all transitions inside have completed\n\t\t\t\t */\n\t\t\t\tawait wait(30);\n\t\t\t\tif (header.value && body.value && footer.value) {\n\t\t\t\t\tconst contentHeight2 =\n\t\t\t\t\t\theader.value.scrollHeight +\n\t\t\t\t\t\tbody.value.scrollHeight +\n\t\t\t\t\t\tfooter.value.scrollHeight +\n\t\t\t\t\t\t2;\n\t\t\t\t\tif (contentHeight !== contentHeight2) onContentGrow();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\t200,\n\t{ trailing: true }\n);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseDialog';\n</style>\n"],"names":["props","__props","emit","__emit","titleId","useId","descriptionId","observer","ref","overlay","panel","content","header","body","footer","height","isNuxt","_b","_a","getCurrentInstance","orderInStack","isCurrent","computed","openedModals","useModalsState","activate","deactivate","useFocusTrap","event","nextTick","attrs","useAttrs","closeLabel","onMounted","onContentGrow","hasRenderedAtLeastOnce","alignToModelValue","onBeforeUnmount","open","opening","closed","closing","busy","restrictBody","scrollBarWidth","releaseBody","modalHasClosed","waitFor","modalHasOpened","wait","watch","onOverlayScroll","onOverlayClick","onCloseClick","overlayAttributes","classes","eventListeners","style","panelAttributes","accessibilityAttrs","maxWidth","sizes","calledGrowTimes","throttle","error","useLogger","contentHeight","contentHeight2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoIA,UAAMA,IAAQC,GAkCRC,IAAOC,GAEPC,IAAU,SAASC,EAAM,EAAE,GAAG,KAAK,IACnCC,IAAgB,eAAeD,EAAM,EAAE,GAAG,KAAK,IAE/CE,IAAWC,EAA2B,IAAI,GAC1CC,IAAUD,EAAwB,IAAI,GACtCE,IAAQF,EAAwB,IAAI,GACpCG,IAAUH,EAAwB,IAAI,GACtCI,IAASJ,EAAwB,IAAI,GACrCK,IAAOL,EAAwB,IAAI,GACnCM,IAASN,EAAwB,IAAI,GACrCO,IAASP,EAAmB,IAAI,GAGhCQ,IAAS,CAAC,GAACC,KAAAC,IAAAC,GAAA,MAAA,gBAAAD,EAAsB,UAAtB,QAAAD,EAA6B,QAExCG,IAAeZ,EAAI,CAAC,GACpBa,IAAYC,EAAS,MAAM;AAC1B,YAAA,EAAE,cAAAC,MAAiBC;AACzB,aAAOD,EAAa,SAASA,EAAa,UAAUH,EAAa;AAAA,IAAA,CACjE,GAEK,E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AAAA,QAEF;AAAA,MACD;AAAA,MACA;AAAA,MACA,EAAE,UAAU,GAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index24.js","sources":["../src/components/BaseDialog/BaseDialog.vue"],"sourcesContent":["<template>\n\t<teleport to=\"body\">\n\t\t<div v-bind=\"overlayAttributes\" ref=\"overlay\">\n\t\t\t<div v-bind=\"panelAttributes\" ref=\"panel\">\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"hasRenderedAtLeastOnce\"\n\t\t\t\t\tref=\"content\"\n\t\t\t\t\tclass=\"bb-base-dialog__content\"\n\t\t\t\t>\n\t\t\t\t\t<div ref=\"header\" class=\"bb-base-dialog__header\">\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:close=\"onCloseClick\"\n\t\t\t\t\t\t\tname=\"header\"\n\t\t\t\t\t\t\t:title=\"title\"\n\t\t\t\t\t\t\t:title-id=\"titleId\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span :id=\"titleId\" class=\"bb-base-dialog__title\">\n\t\t\t\t\t\t\t\t<slot name=\"title\" :text=\"title\">{{ title }}</slot>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class=\"bb-base-dialog-close\">\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\tv-if=\"showClose\"\n\t\t\t\t\t\t\t\t\t:aria-label=\"closeLabel\"\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t@click=\"onCloseClick\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<slot name=\"close\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"bb-base-dialog-close__icon\"\n\t\t\t\t\t\t\t\t\t\t\t><svg\n\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\td=\"M23 23L1 1M23 1L1 23\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div ref=\"body\" class=\"bb-base-dialog__body\">\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:description-id=\"descriptionId\"\n\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t:text=\"description\"\n\t\t\t\t\t\t\t><div\n\t\t\t\t\t\t\t\tv-if=\"description\"\n\t\t\t\t\t\t\t\t:id=\"descriptionId\"\n\t\t\t\t\t\t\t\tclass=\"bb-base-dialog__description sr-only\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{{ description }}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style=\"flex: 10000 10000 0%\"></div>\n\t\t\t\t\t<div ref=\"footer\" class=\"bb-base-dialog__footer\">\n\t\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</teleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n\tcomputed,\n\tonBeforeUnmount,\n\tonMounted,\n\tref,\n\tuseAttrs,\n\tnextTick,\n\tgetCurrentInstance,\n\twatch,\n} from 'vue';\nimport { throttle } from '@/utilities/functions/throttle';\nimport { useFocusTrap } from '@vueuse/integrations/useFocusTrap';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport { waitFor } from '@/utilities/functions/waitFor';\nimport type { CommonProps, Size } from '@/types/CommonProps';\nimport { useModalsState } from '@/composables/useModalsState';\nimport { useLogger } from '@/composables/useLogger';\n\nexport type Sizes = {\n\tsm: number;\n\tmd: number;\n\tlg: number;\n};\n\nexport type BaseDialogProps = Pick<\n\tCommonProps,\n\t| 'closeLabel'\n\t| 'compact'\n\t| 'disabled'\n\t| 'eager'\n\t| 'panelClasses'\n\t| 'overlayClasses'\n\t| 'persistent'\n\t| 'showClose'\n\t| 'title'\n\t| 'transition'\n\t| 'transitionDuration'\n> &\n\tSize<Sizes> & {\n\t\t/**\n\t\t * Description of the content of the modal. Extremely useful for accessibility reasons.\n\t\t */\n\t\tdescription?: string;\n\t\t/**\n\t\t * Elements that obtains focus immediately after opening the dialog.\n\t\t * By default it's the first tabbable item.\n\t\t */\n\t\tfocusTarget?: string;\n\t\t/**\n\t\t * Displays the modala as fulscreen with no margin to the page\n\t\t */\n\t\tfullscreen?: boolean;\n\t\t/**\n\t\t * Defines the state open / closed of the modal.\n\t\t */\n\t\tmodelValue?: boolean | null;\n\t};\n\nconst props = withDefaults(defineProps<BaseDialogProps>(), {\n\tcloseLabel: 'Chiudi modale',\n\tshowClose: true,\n\tsize: 'sm',\n\ttransition: 'fade',\n\ttransitionDuration: 350,\n\tpanelClasses: () => [],\n\toverlayClasses: () => [],\n});\n\nexport type BaseDialogSlots = {\n\theader?: (props: {\n\t\ttitleId: typeof titleId;\n\t\tclose: typeof onCloseClick;\n\t\ttitle: BaseDialogProps['title'];\n\t}) => any;\n\ttitle?: (props: { text: BaseDialogProps['title'] }) => any;\n\tclose?: (props: object) => any;\n\tdescription?: (props: {\n\t\tdescriptionId: typeof descriptionId;\n\t\ttext: BaseDialogProps['description'];\n\t}) => any;\n\tdefault?: (props: object) => any;\n\tfooter?: (props: object) => any;\n};\n\ndefineSlots<BaseDialogSlots>();\n\nexport type BaseDialogEvents = {\n\t(e: 'shown'): void;\n\t(e: 'hidden'): void;\n\t(e: 'update:modelValue', value: boolean): void;\n};\n\nconst emit = defineEmits<BaseDialogEvents>();\n\nconst titleId = `title_${useId().id.value}`;\nconst descriptionId = `description_${useId().id.value}`;\n\nconst observer = ref<ResizeObserver | null>(null);\nconst overlay = ref<HTMLElement | null>(null);\nconst panel = ref<HTMLElement | null>(null);\nconst content = ref<HTMLElement | null>(null);\nconst header = ref<HTMLElement | null>(null);\nconst body = ref<HTMLElement | null>(null);\nconst footer = ref<HTMLElement | null>(null);\nconst height = ref<number | null>(null);\n\n// @ts-expect-error possibly undef\nconst isNuxt = !!getCurrentInstance()?.proxy?.$nuxt;\n\nconst orderInStack = ref(0);\nconst isCurrent = computed(() => {\n\tconst { openedModals } = useModalsState();\n\treturn openedModals.value && openedModals.value === orderInStack.value;\n});\n\nconst { activate, deactivate } = useFocusTrap(panel, {\n\tinitialFocus: props.focusTarget ?? undefined,\n\tclickOutsideDeactivates: (event) => {\n\t\t// This is used when other teleports are running.\n\t\t// eg if you have a select inside a modal it will be in fact outside of the modal because of teleport\n\t\treturn event.target === overlay.value;\n\t},\n\tallowOutsideClick: true,\n\t/* On esc deactivate the trap, return focus and then close the modal */\n\tescapeDeactivates: () => {\n\t\tnextTick(() => {\n\t\t\temit('update:modelValue', false);\n\t\t});\n\t\treturn true;\n\t},\n});\n\nconst attrs = useAttrs();\n\nconst closeLabel = computed(() => props.closeLabel);\n\nonMounted(async () => {\n\tif (body.value) {\n\t\tobserver.value = new ResizeObserver(onContentGrow);\n\t\tobserver.value.observe(body.value);\n\t}\n\twindow.addEventListener('resize', onContentGrow);\n\n\tonContentGrow();\n\tif (!props.modelValue && !hasRenderedAtLeastOnce.value) return;\n\tif (isNuxt && !globalThis.document) return;\n\talignToModelValue();\n});\nonBeforeUnmount(() => {\n\twindow.removeEventListener('resize', onContentGrow);\n});\n\nconst open = ref(false);\nconst opening = ref(false);\nconst closed = ref(true);\nconst closing = ref(false);\nconst hasRenderedAtLeastOnce = ref(props.eager || props.modelValue);\n\nconst busy = computed(() => opening.value || closing.value);\n\nconst restrictBody = () => {\n\tif (!globalThis.document) return;\n\tconst scrollBarWidth =\n\t\twindow.innerWidth - document.documentElement.clientWidth;\n\tdocument.body.style.overflow = 'hidden';\n\tdocument.body.style.paddingRight = `${scrollBarWidth}px`;\n};\nconst releaseBody = () => {\n\tif (!globalThis.document) return;\n\tdocument.body.style.overflow = 'auto';\n\tdocument.body.style.paddingRight = '0px';\n};\n\nonBeforeUnmount(() => {\n\tif (props.modelValue) {\n\t\tconst { openedModals, modalHasClosed } = useModalsState();\n\t\tif (openedModals.value) {\n\t\t\tmodalHasClosed();\n\t\t\torderInStack.value = 0;\n\t\t\treleaseBody();\n\t\t}\n\t}\n});\n\n/**\n * When modelValue becomes true if the component wasn't rendered render it\n * and wait for it to be on the page (or transitions would not work).\n * Stash the latest focused element so we can return it later when it closes.\n * Focus on the panel upon opening.\n * ---\n * Notice all interactions update modelValue and then this function aligns the display to it\n */\nconst alignToModelValue = async () => {\n\tif (props.modelValue) {\n\t\tif (!hasRenderedAtLeastOnce.value) {\n\t\t\thasRenderedAtLeastOnce.value = true;\n\t\t\tawait waitFor(() => !!body.value);\n\t\t\tawait nextTick();\n\t\t\tif (body.value) {\n\t\t\t\tobserver.value = new ResizeObserver(onContentGrow);\n\t\t\t\tobserver.value.observe(body.value);\n\t\t\t}\n\t\t}\n\n\t\tclosed.value = false;\n\t\tclosing.value = false;\n\t\topening.value = true;\n\n\t\t// This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n\t\tconst { modalHasOpened, openedModals } = useModalsState();\n\t\tmodalHasOpened();\n\t\torderInStack.value = openedModals.value;\n\t\trestrictBody();\n\n\t\tawait wait(props.transitionDuration);\n\t\topening.value = false;\n\t\topen.value = true;\n\t\temit('shown');\n\t\tactivate();\n\t} else {\n\t\tdeactivate();\n\t\topening.value = false;\n\t\topen.value = false;\n\t\tclosing.value = true;\n\n\t\tawait wait(props.transitionDuration);\n\n\t\tclosing.value = false;\n\t\tclosed.value = true;\n\t\tconst { modalHasClosed, openedModals } = useModalsState();\n\t\tmodalHasClosed();\n\t\torderInStack.value = 0;\n\t\tif (!openedModals.value) {\n\t\t\treleaseBody();\n\t\t}\n\t\temit('hidden');\n\t}\n};\n/**\n * Every time modelValue changes align the display to it\n */\nwatch(\n\t() => props.modelValue,\n\t() => {\n\t\tif (!props.modelValue && !hasRenderedAtLeastOnce.value) return;\n\t\tif (isNuxt && !globalThis.document) return;\n\t\talignToModelValue();\n\t},\n\t{ flush: 'post' }\n);\n\n/**\n * Disable scrolling\n */\nconst onOverlayScroll = (event: Event) => {\n\tif (event.target === overlay.value) {\n\t\tevent.preventDefault();\n\t}\n};\n\n/**\n * Close the modal on overlay click if not persistent\n */\nconst onOverlayClick = (event: MouseEvent) => {\n\tif (props.disabled || busy.value) return;\n\tif (overlay.value) {\n\t\tif (event.target === overlay.value) {\n\t\t\tif (!props.persistent) {\n\t\t\t\temit('update:modelValue', false);\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * On click on the X button\n */\nconst onCloseClick = () => {\n\tif (props.disabled || busy.value) return;\n\tdeactivate();\n\temit('update:modelValue', false);\n};\n\nconst overlayAttributes = computed(() => {\n\tconst classes = [\n\t\t{\n\t\t\t'bb-base-dialog bb-base-dialog__overlay': true,\n\t\t\t'bb-base-dialog--fullscreen': props.fullscreen,\n\t\t\t'bb-base-dialog--faded': !isCurrent.value,\n\t\t\t'bb-base-dialog--open': open.value,\n\t\t\t'bb-base-dialog--opening': opening.value,\n\t\t\t'bb-base-dialog--closed': closed.value,\n\t\t\t'bb-base-dialog--closing': closing.value,\n\t\t\t[`bb-base-dialog--transition-${props.transition}`]: true,\n\t\t},\n\t\tprops.overlayClasses,\n\t].flat();\n\tconst eventListeners = {\n\t\tonClick: onOverlayClick,\n\t\tonScroll: onOverlayScroll,\n\t\tonTouchmove: onOverlayScroll,\n\t\tonWheel: onOverlayScroll,\n\t\tonKeydown: onOverlayScroll,\n\t};\n\n\tconst style = {\n\t\ttransitionDuration: props.transitionDuration / 1000 + 's',\n\t};\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t\t...eventListeners,\n\t\t...attrs,\n\t};\n});\n\nconst panelAttributes = computed(() => {\n\tconst classes = [\n\t\t{\n\t\t\t'bb-base-dialog__panel': true,\n\t\t\t'bb-base-dialog__panel--compact': props.compact,\n\t\t},\n\t\tprops.panelClasses,\n\t].flat();\n\n\tconst accessibilityAttrs: {\n\t\t[key: string]: string | boolean;\n\t} = {\n\t\trole: 'dialog',\n\t\t'aria-modal': true,\n\t};\n\n\tif (hasRenderedAtLeastOnce.value) {\n\t\tif (props.title) {\n\t\t\taccessibilityAttrs['aria-labelledby'] = titleId;\n\t\t}\n\n\t\tif (props.description)\n\t\t\taccessibilityAttrs['aria-describedby'] = descriptionId;\n\t}\n\n\tlet maxWidth;\n\tconst sizes: Sizes = {\n\t\tsm: 384,\n\t\tmd: 652,\n\t\tlg: 896,\n\t};\n\tif (props.fullscreen) maxWidth = '100%';\n\telse if (typeof props.size === 'number') maxWidth = props.size + 'px';\n\telse if (props.size in sizes)\n\t\tmaxWidth = sizes[props.size as keyof Sizes] + 'px';\n\telse maxWidth = props.size + 'px';\n\n\tconst style = {\n\t\tmaxWidth,\n\t\ttransitionDuration: props.transitionDuration / 1000 + 's',\n\t};\n\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t\t...accessibilityAttrs,\n\t};\n});\n\nlet calledGrowTimes = 0;\n\n/**\n * This is called when content inside body changes.\n * Gets the total height the panel needs to be\n * It could be called numerous times so throttle every 300ms\n */\nconst onContentGrow = throttle(\n\tasync () => {\n\t\tcalledGrowTimes++;\n\t\tif (calledGrowTimes === 100) {\n\t\t\tconst { error } = useLogger();\n\t\t\terror(\n\t\t\t\t'Dialog is updating its height too often. Please check the content is reliably sized.'\n\t\t\t);\n\t\t}\n\t\tif (props.fullscreen) {\n\t\t\theight.value = window.innerHeight;\n\t\t\treturn;\n\t\t}\n\t\tif (header.value && body.value && footer.value) {\n\t\t\tconst contentHeight =\n\t\t\t\theader.value.scrollHeight +\n\t\t\t\tbody.value.scrollHeight +\n\t\t\t\tfooter.value.scrollHeight +\n\t\t\t\t2;\n\t\t\t/* Add two so renderless elements at the bottom are not cut off */\n\t\t\tif (content.value) {\n\t\t\t\tcontent.value.style.height = '0px';\n\t\t\t\tcontent.value.style.height = `${contentHeight + 2}px`;\n\t\t\t\t/**\n\t\t\t\t * Run until all transitions inside have completed\n\t\t\t\t */\n\t\t\t\tawait wait(30);\n\t\t\t\tif (header.value && body.value && footer.value) {\n\t\t\t\t\tconst contentHeight2 =\n\t\t\t\t\t\theader.value.scrollHeight +\n\t\t\t\t\t\tbody.value.scrollHeight +\n\t\t\t\t\t\tfooter.value.scrollHeight +\n\t\t\t\t\t\t2;\n\t\t\t\t\tif (contentHeight !== contentHeight2) onContentGrow();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\t200,\n\t{ trailing: true }\n);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseDialog';\n</style>\n"],"names":["props","__props","emit","__emit","titleId","useId","descriptionId","observer","ref","overlay","panel","content","header","body","footer","height","isNuxt","_b","_a","getCurrentInstance","orderInStack","isCurrent","computed","openedModals","useModalsState","activate","deactivate","useFocusTrap","event","nextTick","attrs","useAttrs","closeLabel","onMounted","onContentGrow","hasRenderedAtLeastOnce","alignToModelValue","onBeforeUnmount","open","opening","closed","closing","busy","restrictBody","scrollBarWidth","releaseBody","modalHasClosed","waitFor","modalHasOpened","wait","watch","onOverlayScroll","onOverlayClick","onCloseClick","overlayAttributes","classes","eventListeners","style","panelAttributes","accessibilityAttrs","maxWidth","sizes","calledGrowTimes","throttle","error","useLogger","contentHeight","contentHeight2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoIA,UAAMA,IAAQC,GAkCRC,IAAOC,GAEPC,IAAU,SAASC,EAAM,EAAE,GAAG,KAAK,IACnCC,IAAgB,eAAeD,EAAM,EAAE,GAAG,KAAK,IAE/CE,IAAWC,EAA2B,IAAI,GAC1CC,IAAUD,EAAwB,IAAI,GACtCE,IAAQF,EAAwB,IAAI,GACpCG,IAAUH,EAAwB,IAAI,GACtCI,IAASJ,EAAwB,IAAI,GACrCK,IAAOL,EAAwB,IAAI,GACnCM,IAASN,EAAwB,IAAI,GACrCO,IAASP,EAAmB,IAAI,GAGhCQ,IAAS,CAAC,GAACC,KAAAC,IAAAC,GAAA,MAAA,gBAAAD,EAAsB,UAAtB,QAAAD,EAA6B,QAExCG,IAAeZ,EAAI,CAAC,GACpBa,IAAYC,EAAS,MAAM;AAC1B,YAAA,EAAE,cAAAC,MAAiBC;AACzB,aAAOD,EAAa,SAASA,EAAa,UAAUH,EAAa;AAAA,IAAA,CACjE,GAEK,EAAE,UAAAK,GAAU,YAAAC,MAAeC,GAAajB,GAAO;AAAA,MACpD,cAAcV,EAAM,eAAe;AAAA,MACnC,yBAAyB,CAAC4B,MAGlBA,EAAM,WAAWnB,EAAQ;AAAA,MAEjC,mBAAmB;AAAA;AAAA,MAEnB,mBAAmB,OAClBoB,EAAS,MAAM;AACd,QAAA3B,EAAK,qBAAqB,EAAK;AAAA,MAAA,CAC/B,GACM;AAAA,IACR,CACA,GAEK4B,IAAQC,MAERC,IAAaV,EAAS,MAAMtB,EAAM,UAAU;AAElD,IAAAiC,GAAU,YAAY;AAQrB,MAPIpB,EAAK,UACCN,EAAA,QAAQ,IAAI,eAAe2B,CAAa,GACxC3B,EAAA,MAAM,QAAQM,EAAK,KAAK,IA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,MAAA;AAGhD,aAAA;AAAA,QACN,OAAOuD;AAAA,QACP,OAAAE;AAAA,QACA,GAAGE;AAAA,MAAA;AAAA,IACJ,CACA;AAED,QAAIG,IAAkB;AAOtB,UAAM5B,IAAgB6B;AAAA,MACrB,YAAY;AAEX,YADAD,KACIA,MAAoB,KAAK;AACtB,gBAAA,EAAE,OAAAE,MAAUC;AAClB,UAAAD;AAAA,YACC;AAAA,UAAA;AAAA,QAEF;AACA,YAAIhE,EAAM,YAAY;AACrB,UAAAe,EAAO,QAAQ,OAAO;AACtB;AAAA,QACD;AACA,YAAIH,EAAO,SAASC,EAAK,SAASC,EAAO,OAAO;AACzC,gBAAAoD,IACLtD,EAAO,MAAM,eACbC,EAAK,MAAM,eACXC,EAAO,MAAM,eACb;AAED,cAAIH,EAAQ,UACHA,EAAA,MAAM,MAAM,SAAS,OAC7BA,EAAQ,MAAM,MAAM,SAAS,GAAGuD,IAAgB,CAAC,MAIjD,MAAMjB,EAAK,EAAE,GACTrC,EAAO,SAASC,EAAK,SAASC,EAAO,QAAO;AACzC,kBAAAqD,IACLvD,EAAO,MAAM,eACbC,EAAK,MAAM,eACXC,EAAO,MAAM,eACb;AACG,YAAAoD,MAAkBC,KAA8BjC;UACrD;AAAA,QAEF;AAAA,MACD;AAAA,MACA;AAAA,MACA,EAAE,UAAU,GAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index240.js CHANGED
@@ -1,5 +1,103 @@
1
- const o = (e) => e[0];
1
+ import { defineComponent as F, ref as H, computed as L, watch as N, openBlock as d, createElementBlock as v, Fragment as S, renderList as A, normalizeClass as O, withModifiers as P, toDisplayString as V } from "vue";
2
+ import { hash as f } from "./index229.js";
3
+ import { isNil as i } from "./index126.js";
4
+ const z = ["text", "onClick:clear"], j = /* @__PURE__ */ F({
5
+ __name: "CommaBox",
6
+ props: {
7
+ options: {}
8
+ },
9
+ emits: ["option:unselected"],
10
+ setup(m, { expose: h, emit: x }) {
11
+ const t = m, a = x, n = H(null), l = L(() => t.options.some((e) => !e.disabled)), u = (e = 1) => {
12
+ const s = i(n.value) ? -1 : n.value;
13
+ let o = (s + e) % t.options.length;
14
+ for (; t.options[o].disabled && o !== s; )
15
+ o = u(e + 1);
16
+ return o;
17
+ }, b = () => {
18
+ if (!l.value) return;
19
+ const e = u();
20
+ n.value = e;
21
+ }, c = (e = 1) => {
22
+ const s = i(n.value) ? 0 : n.value;
23
+ let o = (s - e + t.options.length) % t.options.length;
24
+ for (; t.options[o].disabled && o !== s; )
25
+ o = c(e + 1);
26
+ return o;
27
+ }, w = async () => {
28
+ if (!l.value) return;
29
+ const e = c();
30
+ n.value = e;
31
+ }, I = () => {
32
+ if (!l.value) return;
33
+ let e = 0;
34
+ for (; t.options[e].disabled; )
35
+ e++;
36
+ n.value = e;
37
+ }, g = () => {
38
+ if (!l.value) return;
39
+ let e = t.options.length - 1;
40
+ for (; t.options[e].disabled && e !== 0; )
41
+ e--;
42
+ n.value = e;
43
+ }, k = () => {
44
+ if (!l.value) return;
45
+ let e = 0;
46
+ for (; !t.options[e].selected && t.options.length !== e; )
47
+ e++;
48
+ n.value = e;
49
+ }, _ = () => {
50
+ if (!l.value) return;
51
+ let e = t.options.length - 1;
52
+ for (; t.options[e].selected && e !== 0; )
53
+ e--;
54
+ n.value = e;
55
+ }, C = (e) => {
56
+ if (!l.value) return;
57
+ const s = t.options.findIndex(
58
+ (o) => o.valueHash === e
59
+ );
60
+ s >= 0 && (n.value = s);
61
+ }, r = () => {
62
+ n.value = null;
63
+ }, y = () => {
64
+ if (!n.value) return;
65
+ const e = t.options[n.value];
66
+ e.selected && a("option:unselected", e);
67
+ }, B = () => i(n.value) ? void 0 : t.options[n.value];
68
+ return N(
69
+ () => t.options,
70
+ (e, s) => {
71
+ f(e) !== f(s) && r();
72
+ },
73
+ {
74
+ flush: "post"
75
+ }
76
+ ), h({
77
+ focusNext: b,
78
+ focusPrevious: w,
79
+ focusFirst: I,
80
+ focusFirstSelected: k,
81
+ focusLast: g,
82
+ focusLastSelected: _,
83
+ blur: r,
84
+ confirmOption: y,
85
+ focusByHash: C,
86
+ getHighlighted: B
87
+ }), (e, s) => (d(!0), v(S, null, A(e.options, (o, p) => (d(), v("span", {
88
+ key: o.valueHash,
89
+ class: O({
90
+ "bb-commabox-item": !0,
91
+ "bb-commabox-item--focused": p === n.value,
92
+ "bb-commabox-item--has-comma": p !== e.options.length - 1
93
+ }),
94
+ clearable: !0,
95
+ text: o.text,
96
+ "onClick:clear": P((D) => a("option:unselected", o), ["stop"])
97
+ }, V(o.text), 43, z))), 128));
98
+ }
99
+ });
2
100
  export {
3
- o as head
101
+ j as default
4
102
  };
5
103
  //# sourceMappingURL=index240.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index240.js","sources":["../src/utilities/functions/head.ts"],"sourcesContent":["/** Takes an array and returns the first item in it */\nexport const head = <T>(arr: T[]) => arr[0];\n"],"names":["head","arr"],"mappings":"AACO,MAAMA,IAAO,CAAIC,MAAaA,EAAI,CAAC;"}
1
+ {"version":3,"file":"index240.js","sources":["../src/components/CommaBox.vue"],"sourcesContent":["<template>\n\t<span\n\t\tv-for=\"(item, index) in options\"\n\t\t:key=\"item.valueHash\"\n\t\t:class=\"{\n\t\t\t'bb-commabox-item': true,\n\t\t\t'bb-commabox-item--focused': index === focusedIndex,\n\t\t\t'bb-commabox-item--has-comma': index !== options.length - 1,\n\t\t}\"\n\t\t:clearable=\"true\"\n\t\t:text=\"item.text\"\n\t\t@click:clear.stop=\"emit('option:unselected', item)\"\n\t\t>{{ item.text }}</span\n\t>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { hash } from '@/utilities/functions/hash';\nimport { isNil } from '@/utilities/functions/isNil';\nimport { ref } from 'vue';\nimport { watch } from 'vue';\nimport type { Option } from '@/types/Option';\n\ntype Props = {\n\toptions: Option[];\n};\nconst props = defineProps<Props>();\n\nconst emit = defineEmits<{\n\t(e: 'option:unselected', option: Option): void;\n}>();\n\n/**\n * START FOCUS HANDLING\n */\n\nconst focusedIndex = ref<null | number>(null);\n\nconst canFocus = computed(() => props.options.some((o) => !o.disabled));\n\nconst findNextAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? -1 : focusedIndex.value!;\n\tlet newIndex = (initialValue + offset) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findNextAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\n\nconst focusNext = () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findNextAvailableIndex();\n\tfocusedIndex.value = newIndex;\n};\nconst findPreviousAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? 0 : focusedIndex.value!;\n\tlet newIndex =\n\t\t(initialValue - offset + props.options.length) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findPreviousAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\nconst focusPrevious = async () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findPreviousAvailableIndex();\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusFirst = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (props.options[newIndex].disabled) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusLast = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].disabled && newIndex !== 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex;\n};\nconst focusFirstSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (\n\t\t!props.options[newIndex].selected &&\n\t\tprops.options.length !== newIndex\n\t) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex;\n};\nconst focusLastSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].selected && newIndex !== 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusByHash = (hash: Option['valueHash']) => {\n\tif (!canFocus.value) return;\n\tconst linkedOptionIndex = props.options.findIndex(\n\t\t(o) => o.valueHash === hash\n\t);\n\tif (linkedOptionIndex >= 0) {\n\t\tfocusedIndex.value = linkedOptionIndex;\n\t}\n};\n\nconst blur = () => {\n\tfocusedIndex.value = null;\n};\n\n/**\n * END FOCUS HANDLING\n */\n\nconst confirmOption = () => {\n\tif (!focusedIndex.value) return;\n\tconst option = props.options[focusedIndex.value];\n\tif (option.selected) {\n\t\temit('option:unselected', option);\n\t}\n};\n\nconst getHighlighted = () => {\n\tif (isNil(focusedIndex.value)) return;\n\tconst option = props.options[focusedIndex.value!];\n\treturn option;\n};\n\nwatch(\n\t() => props.options,\n\t(value, previous) => {\n\t\tif (hash(value) !== hash(previous)) {\n\t\t\tblur();\n\t\t}\n\t},\n\t{\n\t\tflush: 'post',\n\t}\n);\n\ndefineExpose({\n\tfocusNext,\n\tfocusPrevious,\n\tfocusFirst,\n\tfocusFirstSelected,\n\tfocusLast,\n\tfocusLastSelected,\n\tblur,\n\tconfirmOption,\n\tfocusByHash,\n\tgetHighlighted,\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/CommaBox';\n</style>\n"],"names":["props","__props","emit","__emit","focusedIndex","ref","canFocus","computed","o","findNextAvailableIndex","offset","initialValue","isNil","newIndex","focusNext","findPreviousAvailableIndex","focusPrevious","focusFirst","focusLast","focusFirstSelected","focusLastSelected","focusByHash","hash","linkedOptionIndex","blur","confirmOption","option","getHighlighted","watch","value","previous","__expose"],"mappings":";;;;;;;;;;AA2BA,UAAMA,IAAQC,GAERC,IAAOC,GAQPC,IAAeC,EAAmB,IAAI,GAEtCC,IAAWC,EAAS,MAAMP,EAAM,QAAQ,KAAK,CAACQ,MAAM,CA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;;;"}
package/dist/index242.js CHANGED
@@ -1,6 +1,13 @@
1
- const o = () => {
1
+ const o = (t, r) => {
2
+ const e = {};
3
+ for (const c in t)
4
+ if (Object.prototype.hasOwnProperty.call(t, c)) {
5
+ const n = t[c];
6
+ r(n, c, t) && (e[c] = n);
7
+ }
8
+ return e;
2
9
  };
3
10
  export {
4
- o as noop
11
+ o as pickBy
5
12
  };
6
13
  //# sourceMappingURL=index242.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index242.js","sources":["../src/utilities/functions/noop.ts"],"sourcesContent":["/* \n This function is No-OP it does nothing\n*/\nexport const noop = () => {};\n"],"names":["noop"],"mappings":"AAGO,MAAMA,IAAO,MAAM;AAAC;"}
1
+ {"version":3,"file":"index242.js","sources":["../src/utilities/functions/pickBy.ts"],"sourcesContent":["export const pickBy = <T extends object>(\n\tobj: T,\n\titeratee: (value: T[keyof T], key: keyof T, object: T) => boolean\n): Partial<T> => {\n\tconst accumulator: Partial<T> = {};\n\tfor (const key in obj) {\n\t\tif (Object.prototype.hasOwnProperty.call(obj, key)) {\n\t\t\tconst element = obj[key];\n\t\t\tif (iteratee(element, key, obj)) accumulator[key] = element;\n\t\t}\n\t}\n\treturn accumulator;\n};\n"],"names":["pickBy","obj","iteratee","accumulator","key","element"],"mappings":"AAAa,MAAAA,IAAS,CACrBC,GACAC,MACgB;AAChB,QAAMC,IAA0B,CAAA;AAChC,aAAWC,KAAOH;AACjB,QAAI,OAAO,UAAU,eAAe,KAAKA,GAAKG,CAAG,GAAG;AAC7C,YAAAC,IAAUJ,EAAIG,CAAG;AACvB,MAAIF,EAASG,GAASD,GAAKH,CAAG,MAAGE,EAAYC,CAAG,IAAIC;AAAA,IACrD;AAEM,SAAAF;AACR;"}
package/dist/index243.js CHANGED
@@ -1,7 +1,6 @@
1
- const e = function(t) {
2
- return (...n) => n.length >= t.length ? t(...n) : e(t.bind(void 0, ...n));
1
+ const o = () => {
3
2
  };
4
3
  export {
5
- e as curry
4
+ o as noop
6
5
  };
7
6
  //# sourceMappingURL=index243.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index243.js","sources":["../src/utilities/functions/curry.ts"],"sourcesContent":["export type Curried<A extends any[], R> = <P extends Partial<A>>(\n\t...args: P\n) => P extends A\n\t? R\n\t: A extends [...SameLength<P>, ...infer S]\n\t\t? S extends any[]\n\t\t\t? Curried<S, R>\n\t\t\t: never\n\t\t: never;\n\ntype SameLength<T extends any[]> = Extract<{ [K in keyof T]: any }, any[]>;\n\nexport const curry = function <A extends any[], R>(\n\tfn: (...args: A) => R\n): Curried<A, R> {\n\treturn (...args: any[]): any =>\n\t\targs.length >= fn.length\n\t\t\t? fn(...(args as any))\n\t\t\t: curry((fn as any).bind(undefined, ...args));\n};\n"],"names":["curry","fn","args"],"mappings":"AAYa,MAAAA,IAAQ,SACpBC,GACgB;AAChB,SAAO,IAAIC,MACVA,EAAK,UAAUD,EAAG,SACfA,EAAG,GAAIC,CAAY,IACnBF,EAAOC,EAAW,KAAK,QAAW,GAAGC,CAAI,CAAC;AAC/C;"}
1
+ {"version":3,"file":"index243.js","sources":["../src/utilities/functions/noop.ts"],"sourcesContent":["/* \n This function is No-OP it does nothing\n*/\nexport const noop = () => {};\n"],"names":["noop"],"mappings":"AAGO,MAAMA,IAAO,MAAM;AAAC;"}
package/dist/index244.js CHANGED
@@ -1,9 +1,6 @@
1
- import e from "./index289.js";
2
- import r from "./index290.js";
3
- import o from "./index291.js";
4
- const f = new o(r, e)._freeze();
1
+ import o from "./index217.js";
2
+ /* empty css */
5
3
  export {
6
- o as Mime,
7
- f as default
4
+ o as default
8
5
  };
9
6
  //# sourceMappingURL=index244.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index244.js","sources":["../node_modules/mime/dist/src/index.js"],"sourcesContent":["import otherTypes from '../types/other.js';\nimport standardTypes from '../types/standard.js';\nimport Mime from './Mime.js';\nexport { default as Mime } from './Mime.js';\nexport default new Mime(standardTypes, otherTypes)._freeze();\n//# sourceMappingURL=index.js.map"],"names":["index","Mime","standardTypes","otherTypes"],"mappings":";;;AAIA,MAAeA,IAAA,IAAIC,EAAKC,GAAeC,CAAU,EAAE,QAAS;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index244.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
package/dist/index245.js CHANGED
@@ -1,19 +1,15 @@
1
- const e = (o, r, f) => o.reduce((t, n) => {
2
- if (t) return t;
3
- if (f(n))
4
- return n;
5
- if (r in n) {
6
- const i = e(
7
- [].concat(n[r]),
8
- r,
9
- f
10
- );
11
- if (i)
12
- return i;
13
- }
14
- return t;
15
- }, null);
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
+ };
16
12
  export {
17
- e as findInTree
13
+ n as useArray
18
14
  };
19
15
  //# sourceMappingURL=index245.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index245.js","sources":["../src/utilities/functions/findInTree.ts"],"sourcesContent":["/**\n * Find the eleemnt for which iteratee rfeturns true in a tree like structure\n */\nexport const findInTree = <T extends Record<string, any>>(\n\titems: T[],\n\tkeyName: keyof T,\n\titeratee: (item: T) => boolean\n): null | T => {\n\treturn items.reduce((acc: null | T, curr) => {\n\t\tif (acc) return acc;\n\t\tif (iteratee(curr)) {\n\t\t\treturn curr;\n\t\t}\n\n\t\tif (keyName in curr) {\n\t\t\tconst fromChildren = findInTree(\n\t\t\t\t[].concat(curr[keyName]),\n\t\t\t\tkeyName,\n\t\t\t\titeratee\n\t\t\t);\n\t\t\tif (fromChildren) {\n\t\t\t\treturn fromChildren;\n\t\t\t}\n\t\t}\n\t\treturn acc;\n\t}, null);\n};\n"],"names":["findInTree","items","keyName","iteratee","acc","curr","fromChildren"],"mappings":"AAGO,MAAMA,IAAa,CACzBC,GACAC,GACAC,MAEOF,EAAM,OAAO,CAACG,GAAeC,MAAS;AAC5C,MAAID,EAAY,QAAAA;AACZ,MAAAD,EAASE,CAAI;AACT,WAAAA;AAGR,MAAIH,KAAWG,GAAM;AACpB,UAAMC,IAAeN;AAAA,MACpB,CAAA,EAAG,OAAOK,EAAKH,CAAO,CAAC;AAAA,MACvBA;AAAA,MACAC;AAAA,IAAA;AAED,QAAIG;AACI,aAAAA;AAAA,EAET;AACO,SAAAF;GACL,IAAI;"}
1
+ {"version":3,"file":"index245.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/index246.js CHANGED
@@ -1,12 +1,12 @@
1
- const o = (n, t) => {
2
- for (let e = n.length - 1; e >= 0; e--) {
3
- const i = n[e];
4
- if (t(i, e, n))
5
- return e;
1
+ function u(e, i) {
2
+ const n = /* @__PURE__ */ new Set(), s = [];
3
+ for (let t = 0; t < e.length; t++) {
4
+ const o = e[t], c = i(o);
5
+ n.has(c) || (n.add(c), s.push(o));
6
6
  }
7
- return -1;
8
- };
7
+ return s;
8
+ }
9
9
  export {
10
- o as findRightIndex
10
+ u as uniqBy
11
11
  };
12
12
  //# sourceMappingURL=index246.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index246.js","sources":["../src/utilities/functions/findRightIndex.ts"],"sourcesContent":["/**\n * Same as find but from the end of an array\n */\nexport const findRightIndex = <T>(\n\tarr: T[],\n\titeratee: (value: T, index: number, arr: T[]) => boolean\n) => {\n\tfor (let index = arr.length - 1; index >= 0; index--) {\n\t\tconst element = arr[index];\n\t\tif (iteratee(element, index, arr)) {\n\t\t\treturn index;\n\t\t}\n\t}\n\treturn -1;\n};\n"],"names":["findRightIndex","arr","iteratee","index","element"],"mappings":"AAGa,MAAAA,IAAiB,CAC7BC,GACAC,MACI;AACJ,WAASC,IAAQF,EAAI,SAAS,GAAGE,KAAS,GAAGA,KAAS;AAC/C,UAAAC,IAAUH,EAAIE,CAAK;AACzB,QAAID,EAASE,GAASD,GAAOF,CAAG;AACxB,aAAAE;AAAA,EAET;AACO,SAAA;AACR;"}
1
+ {"version":3,"file":"index246.js","sources":["../src/utilities/functions/uniqBy.ts"],"sourcesContent":["export function uniqBy<T, K>(array: T[], keyFn: (item: T) => K): T[] {\n\tconst seen = new Set<K>();\n\tconst result: T[] = [];\n\n\tfor (let i = 0; i < array.length; i++) {\n\t\tconst item = array[i];\n\t\tconst key = keyFn(item);\n\t\tif (!seen.has(key)) {\n\t\t\tseen.add(key);\n\t\t\tresult.push(item);\n\t\t}\n\t}\n\n\treturn result;\n}\n"],"names":["uniqBy","array","keyFn","seen","result","i","item","key"],"mappings":"AAAgB,SAAAA,EAAaC,GAAYC,GAA4B;AAC9D,QAAAC,wBAAW,OACXC,IAAc,CAAA;AAEpB,WAASC,IAAI,GAAGA,IAAIJ,EAAM,QAAQI,KAAK;AAChC,UAAAC,IAAOL,EAAMI,CAAC,GACdE,IAAML,EAAMI,CAAI;AACtB,IAAKH,EAAK,IAAII,CAAG,MAChBJ,EAAK,IAAII,CAAG,GACZH,EAAO,KAAKE,CAAI;AAAA,EAElB;AAEO,SAAAF;AACR;"}
package/dist/index247.js CHANGED
@@ -1,26 +1,12 @@
1
- const e = {
2
- inert: ":not([inert]):not([inert] *)",
3
- negTabIndex: ':not([tabindex^="-"])',
4
- disabled: ":not(:disabled)"
5
- }, n = [
6
- `a[href]${e.inert}${e.negTabIndex}`,
7
- `area[href]${e.inert}${e.negTabIndex}`,
8
- `input:not([type="hidden"]):not([type="radio"])${e.inert}${e.negTabIndex}${e.disabled}`,
9
- `input[type="radio"]${e.inert}${e.negTabIndex}${e.disabled}`,
10
- `select${e.inert}${e.negTabIndex}${e.disabled}`,
11
- `textarea${e.inert}${e.negTabIndex}${e.disabled}`,
12
- `button${e.inert}${e.negTabIndex}${e.disabled}`,
13
- `details${e.inert} > summary:first-of-type${e.negTabIndex}`,
14
- // Discard until Firefox supports `:has()`
15
- // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
16
- // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
17
- `iframe${e.inert}${e.negTabIndex}`,
18
- `audio[controls]${e.inert}${e.negTabIndex}`,
19
- `video[controls]${e.inert}${e.negTabIndex}`,
20
- `[contenteditable]${e.inert}${e.negTabIndex}`,
21
- `[tabindex]${e.inert}${e.negTabIndex}`
22
- ];
1
+ import { get as o } from "./index290.js";
2
+ const e = () => ({
3
+ getItemValue(n, f) {
4
+ if (typeof f > "u") return n;
5
+ if (typeof f == "function") return f(n);
6
+ if (typeof f == "string") return o(n, f);
7
+ }
8
+ });
23
9
  export {
24
- n as default
10
+ e as useItemValue
25
11
  };
26
12
  //# sourceMappingURL=index247.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index247.js","sources":["../node_modules/focusable-selectors/index.js"],"sourcesContent":["const not = {\n inert: ':not([inert]):not([inert] *)',\n negTabIndex: ':not([tabindex^=\"-\"])',\n disabled: ':not(:disabled)',\n}\n\nexport default [\n `a[href]${not.inert}${not.negTabIndex}`,\n `area[href]${not.inert}${not.negTabIndex}`,\n `input:not([type=\"hidden\"]):not([type=\"radio\"])${not.inert}${not.negTabIndex}${not.disabled}`,\n `input[type=\"radio\"]${not.inert}${not.negTabIndex}${not.disabled}`,\n `select${not.inert}${not.negTabIndex}${not.disabled}`,\n `textarea${not.inert}${not.negTabIndex}${not.disabled}`,\n `button${not.inert}${not.negTabIndex}${not.disabled}`,\n `details${not.inert} > summary:first-of-type${not.negTabIndex}`,\n // Discard until Firefox supports `:has()`\n // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12\n // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,\n `iframe${not.inert}${not.negTabIndex}`,\n `audio[controls]${not.inert}${not.negTabIndex}`,\n `video[controls]${not.inert}${not.negTabIndex}`,\n `[contenteditable]${not.inert}${not.negTabIndex}`,\n `[tabindex]${not.inert}${not.negTabIndex}`,\n]\n"],"names":["not","selectors"],"mappings":"AAAA,MAAMA,IAAM;AAAA,EACV,OAAO;AAAA,EACP,aAAa;AAAA,EACb,UAAU;AACZ,GAEeC,IAAA;AAAA,EACb,UAAUD,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EACrC,aAAaA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EACxC,iDAAiDA,EAAI,KAAK,GAAGA,EAAI,WAAW,GAAGA,EAAI,QAAQ;AAAA,EAC3F,sBAAsBA,EAAI,KAAK,GAAGA,EAAI,WAAW,GAAGA,EAAI,QAAQ;AAAA,EAChE,SAASA,EAAI,KAAK,GAAGA,EAAI,WAAW,GAAGA,EAAI,QAAQ;AAAA,EACnD,WAAWA,EAAI,KAAK,GAAGA,EAAI,WAAW,GAAGA,EAAI,QAAQ;AAAA,EACrD,SAASA,EAAI,KAAK,GAAGA,EAAI,WAAW,GAAGA,EAAI,QAAQ;AAAA,EACnD,UAAUA,EAAI,KAAK,2BAA2BA,EAAI,WAAW;AAAA;AAAA;AAAA;AAAA,EAI7D,SAASA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EACpC,kBAAkBA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EAC7C,kBAAkBA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EAC7C,oBAAoBA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EAC/C,aAAaA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAC1C;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index247.js","sources":["../src/composables/useItemValue.ts"],"sourcesContent":["import { get } from '@/utilities/functions/get';\n\nexport const useItemValue = () => ({\n\tgetItemValue<T>(item: T, getter?: string | ((item: T) => any)): any {\n\t\tif (typeof getter === 'undefined') return item;\n\t\tif (typeof getter === 'function') return getter(item);\n\t\tif (typeof getter === 'string') return get(item, getter as any);\n\t},\n});\n"],"names":["useItemValue","item","getter","get"],"mappings":";AAEO,MAAMA,IAAe,OAAO;AAAA,EAClC,aAAgBC,GAASC,GAA2C;AAC/D,QAAA,OAAOA,IAAW,IAAoB,QAAAD;AAC1C,QAAI,OAAOC,KAAW,WAAY,QAAOA,EAAOD,CAAI;AACpD,QAAI,OAAOC,KAAW,SAAiB,QAAAC,EAAIF,GAAMC,CAAa;AAAA,EAC/D;AACD;"}
package/dist/index248.js CHANGED
@@ -1,12 +1,20 @@
1
- function u(e, i) {
2
- let t;
3
- return function(...o) {
4
- t !== void 0 && clearTimeout(t), t = setTimeout(() => {
5
- e.apply(this, o);
6
- }, i);
7
- };
8
- }
1
+ import { get as t } from "./index290.js";
2
+ const o = () => ({
3
+ getItemText(r, n) {
4
+ if (typeof r == "string" && !n) return r;
5
+ if (n) {
6
+ if (typeof n == "function") {
7
+ let f = n(r);
8
+ return typeof f != "string" && (f = JSON.stringify(f)), f;
9
+ } else if (typeof n == "string") {
10
+ const f = t(r, n);
11
+ return typeof f == "string" ? f : JSON.stringify(f);
12
+ }
13
+ }
14
+ return JSON.stringify(r);
15
+ }
16
+ });
9
17
  export {
10
- u as debounce
18
+ o as useItemText
11
19
  };
12
20
  //# sourceMappingURL=index248.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index248.js","sources":["../src/utilities/functions/debounce.ts"],"sourcesContent":["export function debounce<T extends (...args: any[]) => any>(\n\tfunc: T,\n\twait: number\n): (...args: Parameters<T>) => void {\n\tlet timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n\treturn function (this: any, ...args: Parameters<T>) {\n\t\tif (timeoutId !== undefined) {\n\t\t\tclearTimeout(timeoutId);\n\t\t}\n\n\t\ttimeoutId = setTimeout(() => {\n\t\t\tfunc.apply(this, args);\n\t\t}, wait);\n\t};\n}\n"],"names":["debounce","func","wait","timeoutId","args"],"mappings":"AAAgB,SAAAA,EACfC,GACAC,GACmC;AAC/B,MAAAC;AAEJ,SAAO,YAAwBC,GAAqB;AACnD,IAAID,MAAc,UACjB,aAAaA,CAAS,GAGvBA,IAAY,WAAW,MAAM;AACvB,MAAAF,EAAA,MAAM,MAAMG,CAAI;AAAA,OACnBF,CAAI;AAAA,EAAA;AAET;"}
1
+ {"version":3,"file":"index248.js","sources":["../src/composables/useItemText.ts"],"sourcesContent":["import { get } from '@/utilities/functions/get';\n\ntype NestedKeyOf<ObjectType extends object> = {\n\t[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object\n\t\t? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}`\n\t\t: `${Key}`;\n}[keyof ObjectType & (string | number)];\n\nexport type Path<T> = T extends object\n\t?\n\t\t\t| NestedKeyOf<T>\n\t\t\t| ((item: T) => string | number)\n\t\t\t| undefined\n\t\t\t| (string & Record<never, never>)\n\t: undefined;\n\nexport const useItemText = () => ({\n\tgetItemText<T>(item: T, getter?: Path<T>): string {\n\t\tif (typeof item === 'string' && !getter) return item;\n\t\telse if (getter) {\n\t\t\tif (typeof getter === 'function') {\n\t\t\t\tlet found = getter(item);\n\t\t\t\tif (typeof found !== 'string') found = JSON.stringify(found);\n\t\t\t\treturn found;\n\t\t\t} else if (typeof getter === 'string') {\n\t\t\t\tconst found = get(item, getter as any);\n\t\t\t\tif (typeof found === 'string') return found;\n\t\t\t\telse return JSON.stringify(found);\n\t\t\t}\n\t\t}\n\t\treturn JSON.stringify(item);\n\t},\n});\n"],"names":["useItemText","item","getter","found","get"],"mappings":";AAgBO,MAAMA,IAAc,OAAO;AAAA,EACjC,YAAeC,GAASC,GAA0B;AACjD,QAAI,OAAOD,KAAS,YAAY,CAACC,EAAe,QAAAD;AAAA,QACvCC;AACJ,UAAA,OAAOA,KAAW,YAAY;AAC7B,YAAAC,IAAQD,EAAOD,CAAI;AACvB,eAAI,OAAOE,KAAU,aAAkBA,IAAA,KAAK,UAAUA,CAAK,IACpDA;AAAA,MAAA,WACG,OAAOD,KAAW,UAAU;AAChC,cAAAC,IAAQC,EAAIH,GAAMC,CAAa;AACjC,eAAA,OAAOC,KAAU,WAAiBA,IAC1B,KAAK,UAAUA,CAAK;AAAA,MACjC;AAAA;AAEM,WAAA,KAAK,UAAUF,CAAI;AAAA,EAC3B;AACD;"}
package/dist/index257.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isFocusable as G, tabbable as te, focusable as ae, isTabbable as T, getTabIndex as K } from "./index274.js";
1
+ import { isFocusable as G, tabbable as te, focusable as ae, isTabbable as T, getTabIndex as K } from "./index270.js";
2
2
  /*!
3
3
  * focus-trap 7.5.4
4
4
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
package/dist/index258.js CHANGED
@@ -1,4 +1,4 @@
1
- import o from "./index215.js";
1
+ import o from "./index211.js";
2
2
  /* empty css */
3
3
  export {
4
4
  o as default
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as S, computed as n, openBlock as r, createElementBlock as c, normalizeClass as T, createBlock as y, resolveDynamicComponent as B, normalizeProps as o, guardReactiveProps as l, withCtx as b, renderSlot as E, createTextVNode as V, toDisplayString as p, createElementVNode as d, unref as m, createVNode as P, Fragment as D, renderList as I } from "vue";
2
- import { deburr as N } from "./index228.js";
3
- import { getAsPercentage as $ } from "./index126.js";
4
- import { useId as F } from "./index8.js";
5
- import R from "./index121.js";
2
+ import { deburr as N } from "./index221.js";
3
+ import { getAsPercentage as $ } from "./index127.js";
4
+ import { useId as F } from "./index9.js";
5
+ import R from "./index122.js";
6
6
  /* empty css */
7
- import j from "./index123.js";
7
+ import j from "./index124.js";
8
8
  /* empty css */
9
9
  const q = ["id"], G = { class: "bb-base-input-container__errors" }, Y = /* @__PURE__ */ S({
10
10
  __name: "BaseInputContainer",
@@ -130,4 +130,4 @@ const q = ["id"], G = { class: "bb-base-input-container__errors" }, Y = /* @__PU
130
130
  export {
131
131
  Y as default
132
132
  };
133
- //# sourceMappingURL=index25.js.map
133
+ //# sourceMappingURL=index26.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index25.js","sources":["../src/components/BaseInputContainer/BaseInputContainer.vue"],"sourcesContent":["<template>\n\t<div\n\t\tclass=\"bb-base-input-outer-container\"\n\t\t:class=\"{\n\t\t\t'bb-base-input-outer-container--errors': hasErrors,\n\t\t\t'bb-base-input-outer-container--hint': showHint,\n\t\t}\"\n\t>\n\t\t<component :is=\"tag\" v-bind=\"containerAttributes\">\n\t\t\t<component :is=\"labelTag\" v-bind=\"labelAttributes\">\n\t\t\t\t<slot name=\"label\" v-bind=\"{ text: label, hasErrors }\">{{\n\t\t\t\t\tlabel\n\t\t\t\t}}</slot>\n\t\t\t</component>\n\t\t\t<div v-bind=\"inputAttributes\">\n\t\t\t\t<slot\n\t\t\t\t\tname=\"input\"\n\t\t\t\t\tv-bind=\"{ id, name, hasErrors, ariaDescribedby: hintId }\"\n\t\t\t\t></slot>\n\t\t\t</div>\n\t\t</component>\n\t\t<BbCollapsible\n\t\t\tclass=\"bb-base-input-container__hint-container\"\n\t\t\t:eager=\"true\"\n\t\t\t:model-value=\"showHint\"\n\t\t\t:tag=\"'span'\"\n\t\t\t:transition-duration=\"200\"\n\t\t>\n\t\t\t<span :id=\"hintId\" class=\"bb-base-input-container__hint\">{{ hint }}</span>\n\t\t</BbCollapsible>\n\t\t<span class=\"bb-base-input-container__errors\">\n\t\t\t<BbSmoothHeight tag=\"span\">\n\t\t\t\t<span\n\t\t\t\t\tv-for=\"error in computedErrors\"\n\t\t\t\t\t:key=\"error\"\n\t\t\t\t\tclass=\"bb-base-input-container__error\"\n\t\t\t\t\t>{{ error }}</span\n\t\t\t\t>\n\t\t\t</BbSmoothHeight>\n\t\t</span>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { deburr } from '@/utilities/functions/deburr';\nimport { getAsPercentage } from '@/utilities/functions/percentage';\nimport { noop } from '@/utilities/functions/noop';\nimport { useId } from '@/composables/useId';\nimport BbCollapsible from '../BbCollapsible/BbCollapsible.vue';\nimport BbSmoothHeight from '../BbSmoothHeight/BbSmoothHeight.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\nexport type BaseInputContainerProps = {\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * Text box to be displayed near the input, usually to indicate instructions.\n\t */\n\thint?: string;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the slignment of the input. Since inputs are inline block they can be aligned just as text can.\n\t */\n\tinputPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Defines the HTML tag of the label element.\n\t * Usually is a `label` but for certain component like checkboxes\n\t * that have their own label it should be a `legend`.\n\t * It is important for accessibility reasons.\n\t */\n\tlabelTag?: string;\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue?: any;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n\n\t/**\n\t * Displays the passed hint.\n\t */\n\tshowHint?: boolean;\n\n\t/**\n\t * HTML tag of the container, it is by default a `span` so\n\t * it can be used inline without breaking HTML validation.\n\t */\n\ttag?: string;\n};\n\nconst props = withDefaults(defineProps<BaseInputContainerProps>(), {\n\tdirection: 'vertical',\n\tinputPosition: 'right',\n\tlabelPosition: 'left',\n\tlabelTag: 'label',\n\treverse: false,\n\ttag: 'span',\n});\n\nexport type BaseInputContainerSlots = {\n\tinput?: (props: {\n\t\tid: string;\n\t\tname: string;\n\t\thasErrors: boolean;\n\t\tariaDescribedby: string | undefined;\n\t}) => any;\n\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n};\n\ndefineSlots<BaseInputContainerSlots>();\n\n// Always provide an id so that inputs can be focussed by clicking oin the label\nconst id = props.id || useId().id.value;\n\n/**\n * Hint management\n */\nconst hintId = props.hint ? `hint_${id}` : undefined;\nconst showHint = computed(() => props.showHint && !!props.hint);\n\n// If no name is passed use a normalized version of the label\nconst name = computed(() => {\n\tif (props.name) return props.name;\n\tlet noAccents = deburr(props.label);\n\tlet nospace = noAccents.replace(/\\s+/g, '');\n\treturn nospace.toLowerCase();\n});\n\nconst containerAttributes = computed(() => {\n\tconst initial: { [name: string]: any } = {\n\t\tclass: {\n\t\t\t'bb-base-input-container': true,\n\t\t\t'bb-base-input-container--hidden-label': props.reverse,\n\t\t\t'bb-base-input-container--horizontal': props.direction !== 'vertical',\n\t\t\t'bb-base-input-container--reverse': props.reverse,\n\t\t\t'bb-base-input-container--vertical': props.direction === 'vertical',\n\t\t\t'bb-base-input-container--errors': hasErrors.value,\n\t\t},\n\t};\n\tif (props.tag === 'label') initial.for = id;\n\treturn initial;\n});\n\nconst labelAttributes = computed(() => {\n\tlet initial: { [name: string]: any } = {\n\t\tclass: {\n\t\t\t'bb-base-input-container__label': true,\n\t\t\t'bb-base-input-container__label--hidden': props.hideLabel,\n\t\t\t[`bb-base-input-container__label--${props.labelPosition}`]:\n\t\t\t\tprops.labelPosition,\n\t\t},\n\t\tstyle: {\n\t\t\twidth: widths.value.label,\n\t\t},\n\t};\n\tif (props.labelTag === 'label') initial.for = id;\n\treturn initial;\n});\n\nconst inputAttributes = computed(() => {\n\tlet initial: { [name: string]: any } = {\n\t\tclass: {\n\t\t\t'bb-base-input-container__input': true,\n\t\t\t[`bb-base-input-container__input--${props.inputPosition}`]:\n\t\t\t\tprops.inputPosition,\n\t\t},\n\t\tstyle: {\n\t\t\twidth: widths.value.input,\n\t\t},\n\t};\n\treturn initial;\n});\n\nconst widths = computed(() => {\n\tlet initial: { [target: string]: string } = {\n\t\tlabel: 'auto',\n\t\tinput: 'auto',\n\t};\n\tif (props.direction === 'auto') {\n\t\tnoop();\n\t} else if (props.direction === 'vertical') {\n\t\tinitial.label = initial.input = 100 + '%';\n\t} else if (props.direction === 'horizontal') {\n\t\tinitial.label = initial.input = 50 + '%';\n\t} else if (/^[\\S]+\\s[\\S]+$/g.test(props.direction)) {\n\t\tconst [firstLength, secondLength] = props.direction\n\t\t\t.split(/\\s+/)\n\t\t\t.map((string) => string.length);\n\t\tconst first =\n\t\t\tgetAsPercentage(firstLength, firstLength + secondLength) + '%';\n\t\tconst second =\n\t\t\tgetAsPercentage(secondLength, secondLength + firstLength) + '%';\n\t\tif (props.reverse) {\n\t\t\tinitial.label = second;\n\t\t\tinitial.input = first;\n\t\t} else {\n\t\t\tinitial.label = first;\n\t\t\tinitial.input = second;\n\t\t}\n\t} else {\n\t\tthrow new Error('Horizontal pattern is malformed');\n\t}\n\treturn initial;\n});\n\nconst computedErrors = computed(() => {\n\treturn props.errors ? ([] as string[]).concat(props.errors) : [];\n});\n\nconst hasErrors = computed(\n\t() => Boolean(computedErrors.value.length) || props.hasErrors\n);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseInputContainer';\n</style>\n"],"names":["props","__props","id","useId","hintId","showHint","computed","name","deburr","containerAttributes","initial","hasErrors","labelAttributes","widths","inputAttributes","firstLength","secondLength","string","first","getAsPercentage","second","computedErrors"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuIA,UAAMA,IAAQC,GAsBRC,IAAKF,EAAM,MAAMG,IAAQ,GAAG,OAK5BC,IAASJ,EAAM,OAAO,QAAQE,CAAE,KAAK,QACrCG,IAAWC,EAAS,MAAMN,EAAM,YAAY,CAAC,CAACA,EAAM,IAAI,GAGxDO,IAAOD,EAAS,MACjBN,EAAM,OAAaA,EAAM,OACbQ,EAAOR,EAAM,KAAK,EACV,QAAQ,QAAQ,EAAE,EAC3B,aACf,GAEKS,IAAsBH,EAAS,MAAM;AAC1C,YAAMI,IAAmC;AAAA,QACxC,OAAO;AAAA,UACN,2BAA2B;AAAA,UAC3B,yCAAyCV,EAAM;AAAA,UAC/C,uCAAuCA,EAAM,cAAc;AAAA,UAC3D,oCAAoCA,EAAM;AAAA,UAC1C,qCAAqCA,EAAM,cAAc;AAAA,UACzD,mCAAmCW,EAAU;AAAA,QAC9C;AAAA,MAAA;AAED,aAAIX,EAAM,QAAQ,YAASU,EAAQ,MAAMR,IAClCQ;AAAA,IAAA,CACP,GAEKE,IAAkBN,EAAS,MAAM;AACtC,UAAII,IAAmC;AAAA,QACtC,OAAO;AAAA,UACN,kCAAkC;AAAA,UAClC,0CAA0CV,EAAM;AAAA,UAChD,CAAC,mCAAmCA,EAAM,aAAa,EAAE,GACxDA,EAAM;AAAA,QACR;AAAA,QACA,OAAO;AAAA,UACN,OAAOa,EAAO,MAAM;AAAA,QACrB;AAAA,MAAA;AAED,aAAIb,EAAM,aA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sourcesContent":["<template>\n\t<div\n\t\tclass=\"bb-base-input-outer-container\"\n\t\t:class=\"{\n\t\t\t'bb-base-input-outer-container--errors': hasErrors,\n\t\t\t'bb-base-input-outer-container--hint': showHint,\n\t\t}\"\n\t>\n\t\t<component :is=\"tag\" v-bind=\"containerAttributes\">\n\t\t\t<component :is=\"labelTag\" v-bind=\"labelAttributes\">\n\t\t\t\t<slot name=\"label\" v-bind=\"{ text: label, hasErrors }\">{{\n\t\t\t\t\tlabel\n\t\t\t\t}}</slot>\n\t\t\t</component>\n\t\t\t<div v-bind=\"inputAttributes\">\n\t\t\t\t<slot\n\t\t\t\t\tname=\"input\"\n\t\t\t\t\tv-bind=\"{ id, name, hasErrors, ariaDescribedby: hintId }\"\n\t\t\t\t></slot>\n\t\t\t</div>\n\t\t</component>\n\t\t<BbCollapsible\n\t\t\tclass=\"bb-base-input-container__hint-container\"\n\t\t\t:eager=\"true\"\n\t\t\t:model-value=\"showHint\"\n\t\t\t:tag=\"'span'\"\n\t\t\t:transition-duration=\"200\"\n\t\t>\n\t\t\t<span :id=\"hintId\" class=\"bb-base-input-container__hint\">{{ hint }}</span>\n\t\t</BbCollapsible>\n\t\t<span class=\"bb-base-input-container__errors\">\n\t\t\t<BbSmoothHeight tag=\"span\">\n\t\t\t\t<span\n\t\t\t\t\tv-for=\"error in computedErrors\"\n\t\t\t\t\t:key=\"error\"\n\t\t\t\t\tclass=\"bb-base-input-container__error\"\n\t\t\t\t\t>{{ error }}</span\n\t\t\t\t>\n\t\t\t</BbSmoothHeight>\n\t\t</span>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { deburr } from '@/utilities/functions/deburr';\nimport { getAsPercentage } from '@/utilities/functions/percentage';\nimport { noop } from '@/utilities/functions/noop';\nimport { useId } from '@/composables/useId';\nimport BbCollapsible from '../BbCollapsible/BbCollapsible.vue';\nimport BbSmoothHeight from '../BbSmoothHeight/BbSmoothHeight.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\nexport type BaseInputContainerProps = {\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * Text box to be displayed near the input, usually to indicate instructions.\n\t */\n\thint?: string;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the slignment of the input. Since inputs are inline block they can be aligned just as text can.\n\t */\n\tinputPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Defines the HTML tag of the label element.\n\t * Usually is a `label` but for certain component like checkboxes\n\t * that have their own label it should be a `legend`.\n\t * It is important for accessibility reasons.\n\t */\n\tlabelTag?: string;\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue?: any;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n\n\t/**\n\t * Displays the passed hint.\n\t */\n\tshowHint?: boolean;\n\n\t/**\n\t * HTML tag of the container, it is by default a `span` so\n\t * it can be used inline without breaking HTML validation.\n\t */\n\ttag?: string;\n};\n\nconst props = withDefaults(defineProps<BaseInputContainerProps>(), {\n\tdirection: 'vertical',\n\tinputPosition: 'right',\n\tlabelPosition: 'left',\n\tlabelTag: 'label',\n\treverse: false,\n\ttag: 'span',\n});\n\nexport type BaseInputContainerSlots = {\n\tinput?: (props: {\n\t\tid: string;\n\t\tname: string;\n\t\thasErrors: boolean;\n\t\tariaDescribedby: string | undefined;\n\t}) => any;\n\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n};\n\ndefineSlots<BaseInputContainerSlots>();\n\n// Always provide an id so that inputs can be focussed by clicking oin the label\nconst id = props.id || useId().id.value;\n\n/**\n * Hint management\n */\nconst hintId = props.hint ? `hint_${id}` : undefined;\nconst showHint = computed(() => props.showHint && !!props.hint);\n\n// If no name is passed use a normalized version of the label\nconst name = computed(() => {\n\tif (props.name) return props.name;\n\tlet noAccents = deburr(props.label);\n\tlet nospace = noAccents.replace(/\\s+/g, '');\n\treturn nospace.toLowerCase();\n});\n\nconst containerAttributes = computed(() => {\n\tconst initial: { [name: string]: any } = {\n\t\tclass: {\n\t\t\t'bb-base-input-container': true,\n\t\t\t'bb-base-input-container--hidden-label': props.reverse,\n\t\t\t'bb-base-input-container--horizontal': props.direction !== 'vertical',\n\t\t\t'bb-base-input-container--reverse': props.reverse,\n\t\t\t'bb-base-input-container--vertical': props.direction === 'vertical',\n\t\t\t'bb-base-input-container--errors': hasErrors.value,\n\t\t},\n\t};\n\tif (props.tag === 'label') initial.for = id;\n\treturn initial;\n});\n\nconst labelAttributes = computed(() => {\n\tlet initial: { [name: string]: any } = {\n\t\tclass: {\n\t\t\t'bb-base-input-container__label': true,\n\t\t\t'bb-base-input-container__label--hidden': props.hideLabel,\n\t\t\t[`bb-base-input-container__label--${props.labelPosition}`]:\n\t\t\t\tprops.labelPosition,\n\t\t},\n\t\tstyle: {\n\t\t\twidth: widths.value.label,\n\t\t},\n\t};\n\tif (props.labelTag === 'label') initial.for = id;\n\treturn initial;\n});\n\nconst inputAttributes = computed(() => {\n\tlet initial: { [name: string]: any } = {\n\t\tclass: {\n\t\t\t'bb-base-input-container__input': true,\n\t\t\t[`bb-base-input-container__input--${props.inputPosition}`]:\n\t\t\t\tprops.inputPosition,\n\t\t},\n\t\tstyle: {\n\t\t\twidth: widths.value.input,\n\t\t},\n\t};\n\treturn initial;\n});\n\nconst widths = computed(() => {\n\tlet initial: { [target: string]: string } = {\n\t\tlabel: 'auto',\n\t\tinput: 'auto',\n\t};\n\tif (props.direction === 'auto') {\n\t\tnoop();\n\t} else if (props.direction === 'vertical') {\n\t\tinitial.label = initial.input = 100 + '%';\n\t} else if (props.direction === 'horizontal') {\n\t\tinitial.label = initial.input = 50 + '%';\n\t} else if (/^[\\S]+\\s[\\S]+$/g.test(props.direction)) {\n\t\tconst [firstLength, secondLength] = props.direction\n\t\t\t.split(/\\s+/)\n\t\t\t.map((string) => string.length);\n\t\tconst first =\n\t\t\tgetAsPercentage(firstLength, firstLength + secondLength) + '%';\n\t\tconst second =\n\t\t\tgetAsPercentage(secondLength, secondLength + firstLength) + '%';\n\t\tif (props.reverse) {\n\t\t\tinitial.label = second;\n\t\t\tinitial.input = first;\n\t\t} else {\n\t\t\tinitial.label = first;\n\t\t\tinitial.input = second;\n\t\t}\n\t} else {\n\t\tthrow new Error('Horizontal pattern is malformed');\n\t}\n\treturn initial;\n});\n\nconst computedErrors = computed(() => {\n\treturn props.errors ? ([] as string[]).concat(props.errors) : [];\n});\n\nconst hasErrors = computed(\n\t() => Boolean(computedErrors.value.length) || props.hasErrors\n);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseInputContainer';\n</style>\n"],"names":["props","__props","id","useId","hintId","showHint","computed","name","deburr","containerAttributes","initial","hasErrors","labelAttributes","widths","inputAttributes","firstLength","secondLength","string","first","getAsPercentage","second","computedErrors"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuIA,UAAMA,IAAQC,GAsBRC,IAAKF,EAAM,MAAMG,IAAQ,GAAG,OAK5BC,IAASJ,EAAM,OAAO,QAAQE,CAAE,KAAK,QACrCG,IAAWC,EAAS,MAAMN,EAAM,YAAY,CAAC,CAACA,EAAM,IAAI,GAGxDO,IAAOD,EAAS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