@trintel/zooy 1.0.1-beta.0 → 1.0.1

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 (284) hide show
  1. package/README.md +284 -339
  2. package/dist/chunks/{16-ChlL35BX.js → 16-BXti8Tu-.js} +6 -6
  3. package/dist/chunks/16-CMCRqVYz.js +1 -0
  4. package/dist/chunks/{20-CZPIOG-A.js → 20-CQLnFcRb.js} +9 -9
  5. package/dist/chunks/20-Df0dXwyx.js +1 -0
  6. package/dist/chunks/button-B1jzfT-Z.js +272 -0
  7. package/dist/chunks/button-C-oX8EmF.js +66 -0
  8. package/dist/chunks/button-skeleton-CK3BHdja.js +21 -0
  9. package/dist/chunks/{button-skeleton-COf2kCDL.js → button-skeleton-DoCp6sBb.js} +10 -9
  10. package/dist/chunks/checkbox-CgFjYxQ_.js +201 -0
  11. package/dist/chunks/checkbox-t3G-H1NN.js +40 -0
  12. package/dist/chunks/{class-map-BfNAkUL_.js → class-map-D6tjF27Y.js} +2 -2
  13. package/dist/chunks/{class-map-DEHG4tmw.js → class-map-FWQBIzSx.js} +1 -1
  14. package/dist/chunks/collection-helpers-Bk68Vaau.js +7 -0
  15. package/dist/chunks/collection-helpers-afBvMQaC.js +1 -0
  16. package/dist/chunks/content-switcher-item-CedjjtvP.js +351 -0
  17. package/dist/chunks/content-switcher-item-c4WBWz31.js +27 -0
  18. package/dist/chunks/defs-C88lSWuJ.js +1 -0
  19. package/dist/chunks/defs-Do0OvCKd.js +1165 -0
  20. package/dist/chunks/dropdown-item-C0SHr4st.js +69 -0
  21. package/dist/chunks/dropdown-item-Dh5IEXDr.js +621 -0
  22. package/dist/chunks/{focus-rQSNiwy7.js → focus-B3iymVyL.js} +1 -1
  23. package/dist/chunks/{focus-B9JYe97T.js → focus-WnKGH_xB.js} +1 -1
  24. package/dist/chunks/{icon-loader-Dk_AU26w.js → icon-loader-CJxyg-lp.js} +1 -1
  25. package/dist/chunks/{icon-loader-o_JYDmJX.js → icon-loader-ChKeNR4s.js} +1 -1
  26. package/dist/chunks/{icon-loader-utils-BEOGXn0q.js → icon-loader-utils-BwViqIXz.js} +23 -23
  27. package/dist/chunks/icon-loader-utils-DK8DViXt.js +5 -0
  28. package/dist/chunks/if-defined-DYWhlnlE.js +5 -0
  29. package/dist/chunks/{if-defined-C0yJsxi2.js → if-defined-eJcDYClo.js} +1 -1
  30. package/dist/chunks/{if-non-empty-DTGflHtA.js → if-non-empty-COTeEFkK.js} +1 -1
  31. package/dist/chunks/if-non-empty-CxMysAQW.js +1 -0
  32. package/dist/chunks/index-0AElqkkj.js +12 -0
  33. package/dist/chunks/{index-B3mXrMt1.js → index-4WNeLsiw.js} +4 -3
  34. package/dist/chunks/{index-BXczHDk-.js → index-4XJJobHw.js} +12 -11
  35. package/dist/chunks/index-7cXLLw89.js +881 -0
  36. package/dist/chunks/index-9fmHblh5.js +121 -0
  37. package/dist/chunks/{index-BwIoRMDI.js → index-B0nToMRj.js} +7 -6
  38. package/dist/chunks/index-B4SxU_Hu.js +87 -0
  39. package/dist/chunks/index-B5DpS-cb.js +2 -0
  40. package/dist/chunks/{index-CzTjJ8lP.js → index-B5GB0rQW.js} +47 -37
  41. package/dist/chunks/index-B8Ze9ISK.js +17 -0
  42. package/dist/chunks/index-BAAA4wkE.js +45 -0
  43. package/dist/chunks/index-BBWp83R-.js +160 -0
  44. package/dist/chunks/index-BBap1uCI.js +1 -0
  45. package/dist/chunks/index-BGGDxbLL.js +368 -0
  46. package/dist/chunks/index-BMquNDkd.js +381 -0
  47. package/dist/chunks/index-BQnyeVHX.js +1 -0
  48. package/dist/chunks/index-BRnzFxjk.js +25 -0
  49. package/dist/chunks/index-BbJQIwkY.js +452 -0
  50. package/dist/chunks/{index-hLI0Bnyb.js → index-Bb_1S0pr.js} +7 -6
  51. package/dist/chunks/index-BeMnerDj.js +111 -0
  52. package/dist/chunks/index-Bff6B9vY.js +254 -0
  53. package/dist/chunks/index-Bi9WliCA.js +683 -0
  54. package/dist/chunks/{index-D0xRAPD5.js → index-Bls8zdHV.js} +6 -5
  55. package/dist/chunks/index-Bo2QmpPO.js +1 -0
  56. package/dist/chunks/index-BseD7Jzt.js +75 -0
  57. package/dist/chunks/index-Bt7v-zqV.js +77 -0
  58. package/dist/chunks/index-Bunat0DP.js +337 -0
  59. package/dist/chunks/index-BvdNKhJw.js +19 -0
  60. package/dist/chunks/index-BwFE4R87.js +30 -0
  61. package/dist/chunks/index-BwRxBdeg.js +158 -0
  62. package/dist/chunks/index-Bymsj9gH.js +1 -0
  63. package/dist/chunks/index-C-pfDP7B.js +1 -0
  64. package/dist/chunks/index-C2oV5vU3.js +4 -0
  65. package/dist/chunks/index-C3n83pM3.js +103 -0
  66. package/dist/chunks/index-C572_UKV.js +22 -0
  67. package/dist/chunks/index-C6bOvXSf.js +129 -0
  68. package/dist/chunks/{index-CByffhPq.js → index-CBICHiFD.js} +147 -134
  69. package/dist/chunks/index-CEy6bu7P.js +79 -0
  70. package/dist/chunks/index-CFqKkC5Z.js +36 -0
  71. package/dist/chunks/index-CIZ3Gnmm.js +8 -0
  72. package/dist/chunks/index-CIiIAqrQ.js +414 -0
  73. package/dist/chunks/index-CJdEJ8pY.js +15 -0
  74. package/dist/chunks/index-CKYRBtLC.js +79 -0
  75. package/dist/chunks/index-CQl4NaPS.js +65 -0
  76. package/dist/chunks/index-CR3DrmQi.js +235 -0
  77. package/dist/chunks/index-CTsGb3mD.js +364 -0
  78. package/dist/chunks/{index-rwBsdvh6.js → index-CV7TVQ4T.js} +9 -8
  79. package/dist/chunks/index-CWlg_Hu2.js +150 -0
  80. package/dist/chunks/{index-Bwix1iwB.js → index-CYIcfuAW.js} +6 -5
  81. package/dist/chunks/{index-WNXgzThF.js → index-CkxGsCJy.js} +181 -181
  82. package/dist/chunks/index-ClE0uX_c.js +27 -0
  83. package/dist/chunks/index-Cnsy7Qk3.js +511 -0
  84. package/dist/chunks/index-CoAT1iC6.js +12 -0
  85. package/dist/chunks/index-Cp3P3KaW.js +45 -0
  86. package/dist/chunks/index-CqQZpHti.js +3 -0
  87. package/dist/chunks/index-CsjJntyD.js +23 -0
  88. package/dist/chunks/{index-BIaF1Dfx.js → index-Ctna95NT.js} +5 -4
  89. package/dist/chunks/index-Cu1u3Mjn.js +150 -0
  90. package/dist/chunks/index-Cv6qE9qP.js +22 -0
  91. package/dist/chunks/index-Cwb1pbm9.js +252 -0
  92. package/dist/chunks/{index-BSgHSOVT.js → index-CzAwJhyQ.js} +4 -3
  93. package/dist/chunks/index-D8LE8G2j.js +81 -0
  94. package/dist/chunks/{index-C_K070Kn.js → index-D9sRIKMQ.js} +9 -8
  95. package/dist/chunks/index-DBsASlZI.js +15 -0
  96. package/dist/chunks/{index-DurPWBYc.js → index-DGw1TVFB.js} +3 -2
  97. package/dist/chunks/index-DIsXKJDH.js +4 -0
  98. package/dist/chunks/{index-CT43RMOu.js → index-DNWjc2SJ.js} +3 -2
  99. package/dist/chunks/index-DSOPjl5x.js +563 -0
  100. package/dist/chunks/index-DUtoSCTU.js +455 -0
  101. package/dist/chunks/index-DWjrCygZ.js +49 -0
  102. package/dist/chunks/index-DYvD9xjl.js +4 -0
  103. package/dist/chunks/index-DZabSr3s.js +36 -0
  104. package/dist/chunks/index-DbAeG1nY.js +1 -0
  105. package/dist/chunks/index-Dc51G1mo.js +26 -0
  106. package/dist/chunks/index-Dd9iSSXa.js +260 -0
  107. package/dist/chunks/{index-C8LyfVmf.js → index-DfFx1Jz3.js} +6 -5
  108. package/dist/chunks/index-Dh4LYLg5.js +1604 -0
  109. package/dist/chunks/index-Dk3tlz8Q.js +15 -0
  110. package/dist/chunks/index-Do1DszoZ.js +1 -0
  111. package/dist/chunks/index-DrDKdYFJ.js +58 -0
  112. package/dist/chunks/index-DyO3Wdy_.js +37 -0
  113. package/dist/chunks/index-DyyLrVDY.js +188 -0
  114. package/dist/chunks/{index-45EApaFs.js → index-GDVDUQtg.js} +14 -13
  115. package/dist/chunks/index-GbWz6fuF.js +243 -0
  116. package/dist/chunks/index-JWULDURW.js +89 -0
  117. package/dist/chunks/index-MgWriQfr.js +35 -0
  118. package/dist/chunks/index-OgL1A9Rm.js +42 -0
  119. package/dist/chunks/{index-DdNZTQw1.js → index-QzojJs5M.js} +3 -2
  120. package/dist/chunks/index-TJL02uup.js +291 -0
  121. package/dist/chunks/index-Z4ar01y-.js +259 -0
  122. package/dist/chunks/{index-BSh7UYcP.js → index-_xRytR0j.js} +3 -3
  123. package/dist/chunks/index-cuMoh7qn.js +1 -0
  124. package/dist/chunks/index-du3RQU31.js +62 -0
  125. package/dist/chunks/{index-DFA4_spk.js → index-hH_m653R.js} +9 -8
  126. package/dist/chunks/index-hn76Yo-L.js +1 -0
  127. package/dist/chunks/index-i4heE-wx.js +71 -0
  128. package/dist/chunks/index-i9jyrFc9.js +19 -0
  129. package/dist/chunks/index-lFqOe0IJ.js +46 -0
  130. package/dist/chunks/index-pS6-humH.js +74 -0
  131. package/dist/chunks/index-pc36PiDY.js +57 -0
  132. package/dist/chunks/index-qgl9W8eF.js +52 -0
  133. package/dist/chunks/{index-BUxB7aWd.js → index-uwN33H1P.js} +9 -8
  134. package/dist/chunks/index-uxZPrL2m.js +406 -0
  135. package/dist/chunks/index-yzFU-E6F.js +22 -0
  136. package/dist/chunks/{loading-icon-DhJR6LyV.js → loading-icon-CPvmJvpZ.js} +2 -2
  137. package/dist/chunks/loading-icon-DdwpAk8-.js +24 -0
  138. package/dist/chunks/main-BGOPab-5.js +4041 -0
  139. package/dist/chunks/main-Bx21zlkN.js +65 -0
  140. package/dist/chunks/{property-pT1z5CCa.js → property-BkjBVRuu.js} +1 -1
  141. package/dist/chunks/property-DAFv3PCb.js +5 -0
  142. package/dist/chunks/register-BCEOkbXG.js +1583 -0
  143. package/dist/chunks/{register-BK21_Wkj.js → register-Bkr1UKav.js} +1 -1
  144. package/dist/chunks/{register-BMNs2hNG.js → register-DTXmg-gw.js} +1 -1
  145. package/dist/chunks/register-D_CXtGy1.js +1 -0
  146. package/dist/chunks/search-DDFN8-Mz.js +30 -0
  147. package/dist/chunks/search-npG8ywjx.js +240 -0
  148. package/dist/chunks/select-CFy3MvH6.js +76 -0
  149. package/dist/chunks/select-DkCpQORs.js +357 -0
  150. package/dist/chunks/settings-Bgpv8zuU.js +62 -0
  151. package/dist/chunks/settings-jvP7vP60.js +66 -0
  152. package/dist/chunks/{state-FnSmMH94.js → state-BdgD82MZ.js} +1 -1
  153. package/dist/chunks/{state-Bpmgn27B.js → state-uF7CZaP5.js} +1 -1
  154. package/dist/chunks/text-input-BUdM-ojg.js +68 -0
  155. package/dist/chunks/text-input-DVdkm07X.js +372 -0
  156. package/dist/chunks/tooltip-content-BXcBmMsV.js +3 -0
  157. package/dist/chunks/tooltip-content-CWRE_NqH.js +135 -0
  158. package/dist/chunks/{unsafe-html-D49sIpJ5.js → unsafe-html-Bg0eM3hS.js} +5 -5
  159. package/dist/chunks/{unsafe-html-C_MKAcuC.js → unsafe-html-CpAqmPyx.js} +1 -1
  160. package/dist/zooy.cjs.js +1 -1
  161. package/dist/zooy.es.js +20 -2
  162. package/package.json +3 -4
  163. package/src/sass/carbon.scss +117 -0
  164. package/src/sass/main.scss +1 -1
  165. package/src/sass/panels.scss +268 -359
  166. package/src/sass/split.scss +1 -0
  167. package/dist/chunks/16-41wFkj7S.js +0 -1
  168. package/dist/chunks/20-gmyNFvDv.js +0 -1
  169. package/dist/chunks/button-DdJepOoE.js +0 -271
  170. package/dist/chunks/button-skeleton-rf3WDPTZ.js +0 -21
  171. package/dist/chunks/button-zHEPxpXa.js +0 -66
  172. package/dist/chunks/checkbox-B5mHvx0J.js +0 -200
  173. package/dist/chunks/checkbox-BRPCg-DN.js +0 -40
  174. package/dist/chunks/collection-helpers-BwUB2CEz.js +0 -8
  175. package/dist/chunks/collection-helpers-CYLIiyii.js +0 -1
  176. package/dist/chunks/content-switcher-item-DeGjVRQY.js +0 -350
  177. package/dist/chunks/content-switcher-item-DucclV1b.js +0 -27
  178. package/dist/chunks/defs-DMmigODC.js +0 -1077
  179. package/dist/chunks/defs-DPD20sPK.js +0 -1
  180. package/dist/chunks/dropdown-item-BgLQ1VLo.js +0 -69
  181. package/dist/chunks/dropdown-item-DPdwOION.js +0 -620
  182. package/dist/chunks/icon-loader-utils-BBjK16O-.js +0 -5
  183. package/dist/chunks/if-defined-BdZRLDJ6.js +0 -5
  184. package/dist/chunks/if-non-empty-CEHK-hqx.js +0 -1
  185. package/dist/chunks/index-16wphaSo.js +0 -4
  186. package/dist/chunks/index-27oFQaOS.js +0 -37
  187. package/dist/chunks/index-5jmZyISW.js +0 -1
  188. package/dist/chunks/index-B1vQ44Hl.js +0 -363
  189. package/dist/chunks/index-B3CDjjXh.js +0 -214
  190. package/dist/chunks/index-B7mGUQhz.js +0 -79
  191. package/dist/chunks/index-BBNaYDog.js +0 -22
  192. package/dist/chunks/index-BBt9OmO5.js +0 -12
  193. package/dist/chunks/index-BJAuRs3y.js +0 -75
  194. package/dist/chunks/index-BJKftWYn.js +0 -89
  195. package/dist/chunks/index-BLjNrhkN.js +0 -4
  196. package/dist/chunks/index-BOTu9u-3.js +0 -86
  197. package/dist/chunks/index-BPVpH8ll.js +0 -160
  198. package/dist/chunks/index-BRuvyoCz.js +0 -15
  199. package/dist/chunks/index-BXIxcS00.js +0 -22
  200. package/dist/chunks/index-BaVyBv2V.js +0 -25
  201. package/dist/chunks/index-BgbqX0uv.js +0 -234
  202. package/dist/chunks/index-BjQlt8g2.js +0 -451
  203. package/dist/chunks/index-BoNLj7PW.js +0 -44
  204. package/dist/chunks/index-BxVW3p3I.js +0 -258
  205. package/dist/chunks/index-ByKyGGzb.js +0 -3
  206. package/dist/chunks/index-ByTSSU1x.js +0 -1
  207. package/dist/chunks/index-CBbsFlsv.js +0 -290
  208. package/dist/chunks/index-CIbRjtWm.js +0 -32
  209. package/dist/chunks/index-CIzeMGQv.js +0 -81
  210. package/dist/chunks/index-CLGxSjLW.js +0 -62
  211. package/dist/chunks/index-CMF5Cawn.js +0 -70
  212. package/dist/chunks/index-CO-A2KY9.js +0 -562
  213. package/dist/chunks/index-CONgwvp0.js +0 -12
  214. package/dist/chunks/index-CUgiXqyk.js +0 -4
  215. package/dist/chunks/index-C_ttE2g9.js +0 -16
  216. package/dist/chunks/index-CcgnA1uu.js +0 -29
  217. package/dist/chunks/index-Cd7aoWrX.js +0 -336
  218. package/dist/chunks/index-Ce-pMzBC.js +0 -19
  219. package/dist/chunks/index-CgYZ66P_.js +0 -187
  220. package/dist/chunks/index-ChcHMeAS.js +0 -35
  221. package/dist/chunks/index-Cixdzvwd.js +0 -682
  222. package/dist/chunks/index-Clq0Fl19.js +0 -15
  223. package/dist/chunks/index-CtxTJnIm.js +0 -58
  224. package/dist/chunks/index-Cv1hWa_y.js +0 -242
  225. package/dist/chunks/index-D25buhRm.js +0 -79
  226. package/dist/chunks/index-D4DqJG5_.js +0 -16
  227. package/dist/chunks/index-D5GGFPcS.js +0 -251
  228. package/dist/chunks/index-D5kiHJpX.js +0 -413
  229. package/dist/chunks/index-DEjRiv5B.js +0 -1
  230. package/dist/chunks/index-DFZsXFsx.js +0 -19
  231. package/dist/chunks/index-DGauWNwV.js +0 -156
  232. package/dist/chunks/index-DIR0jr3f.js +0 -127
  233. package/dist/chunks/index-DNeagy5a.js +0 -65
  234. package/dist/chunks/index-DO0fmDR9.js +0 -2
  235. package/dist/chunks/index-DSitHBEh.js +0 -36
  236. package/dist/chunks/index-DW7ST0tB.js +0 -1
  237. package/dist/chunks/index-DWfFgEXE.js +0 -110
  238. package/dist/chunks/index-DX6WAtmo.js +0 -874
  239. package/dist/chunks/index-DaPfSuLu.js +0 -393
  240. package/dist/chunks/index-DbKlVm7y.js +0 -74
  241. package/dist/chunks/index-Dgi-m1K-.js +0 -1
  242. package/dist/chunks/index-Dh4uigJs.js +0 -454
  243. package/dist/chunks/index-DnYNK1mz.js +0 -8
  244. package/dist/chunks/index-DnierBep.js +0 -510
  245. package/dist/chunks/index-DnpSGM23.js +0 -213
  246. package/dist/chunks/index-DntY4deR.js +0 -41
  247. package/dist/chunks/index-Dp4A8k6C.js +0 -103
  248. package/dist/chunks/index-Dphpk5r2.js +0 -1
  249. package/dist/chunks/index-DrBrgF-v.js +0 -49
  250. package/dist/chunks/index-Dr_cqQ-_.js +0 -77
  251. package/dist/chunks/index-Dt-nBtrQ.js +0 -26
  252. package/dist/chunks/index-DwTj7cFr.js +0 -57
  253. package/dist/chunks/index-DyZVAYLv.js +0 -52
  254. package/dist/chunks/index-Hh597Yu6.js +0 -121
  255. package/dist/chunks/index-LxkAuMAA.js +0 -1
  256. package/dist/chunks/index-OaQhvPR1.js +0 -46
  257. package/dist/chunks/index-UPr2EvBX.js +0 -149
  258. package/dist/chunks/index-WvrCPen2.js +0 -367
  259. package/dist/chunks/index-cTXIVcWI.js +0 -45
  260. package/dist/chunks/index-caLn8cu1.js +0 -1603
  261. package/dist/chunks/index-jBse-XgU.js +0 -35
  262. package/dist/chunks/index-oTjafsfN.js +0 -25
  263. package/dist/chunks/index-qNmuI3RB.js +0 -149
  264. package/dist/chunks/index-qiqzy9MI.js +0 -23
  265. package/dist/chunks/index-siqJUhKa.js +0 -1
  266. package/dist/chunks/index-w-G9CFId.js +0 -1
  267. package/dist/chunks/index-x6SeA7x7.js +0 -405
  268. package/dist/chunks/loading-icon-DJQIjg97.js +0 -23
  269. package/dist/chunks/main-DUusfqrI.js +0 -18
  270. package/dist/chunks/main-Dp7wHHgP.js +0 -2882
  271. package/dist/chunks/property-DCYiZTFF.js +0 -5
  272. package/dist/chunks/register-Cc9zkA5F.js +0 -1
  273. package/dist/chunks/register-JwwMwdRf.js +0 -1273
  274. package/dist/chunks/search-C3raqgOD.js +0 -30
  275. package/dist/chunks/search-CIhxkVjj.js +0 -239
  276. package/dist/chunks/select-item-4aISXm0r.js +0 -76
  277. package/dist/chunks/select-item-DjoxYopL.js +0 -356
  278. package/dist/chunks/settings-BPOpwVkr.js +0 -594
  279. package/dist/chunks/settings-CK2vhfPu.js +0 -78
  280. package/dist/chunks/text-input-BygzMjjc.js +0 -371
  281. package/dist/chunks/text-input-cjcnMXO-.js +0 -68
  282. package/dist/chunks/tooltip-content-BjdZJ_Ui.js +0 -134
  283. package/dist/chunks/tooltip-content-DHyDYyOH.js +0 -3
  284. package/src/sass/carbon-icons.scss +0 -46
@@ -1,1077 +0,0 @@
1
- const j = Math.min, C = Math.max, nt = Math.round, et = Math.floor, E = (t) => ({
2
- x: t,
3
- y: t
4
- }), Mt = {
5
- left: "right",
6
- right: "left",
7
- bottom: "top",
8
- top: "bottom"
9
- }, _t = {
10
- start: "end",
11
- end: "start"
12
- };
13
- function zt(t, e, n) {
14
- return C(t, j(e, n));
15
- }
16
- function G(t, e) {
17
- return typeof t == "function" ? t(e) : t;
18
- }
19
- function V(t) {
20
- return t.split("-")[0];
21
- }
22
- function Z(t) {
23
- return t.split("-")[1];
24
- }
25
- function Xt(t) {
26
- return t === "x" ? "y" : "x";
27
- }
28
- function dt(t) {
29
- return t === "y" ? "height" : "width";
30
- }
31
- const Yt = /* @__PURE__ */ new Set(["top", "bottom"]);
32
- function Y(t) {
33
- return Yt.has(V(t)) ? "y" : "x";
34
- }
35
- function mt(t) {
36
- return Xt(Y(t));
37
- }
38
- function jt(t, e, n) {
39
- n === void 0 && (n = !1);
40
- const o = Z(t), i = mt(t), r = dt(i);
41
- let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
42
- return e.reference[r] > e.floating[r] && (s = ot(s)), [s, ot(s)];
43
- }
44
- function Ut(t) {
45
- const e = ot(t);
46
- return [ft(t), e, ft(e)];
47
- }
48
- function ft(t) {
49
- return t.replace(/start|end/g, (e) => _t[e]);
50
- }
51
- const wt = ["left", "right"], yt = ["right", "left"], qt = ["top", "bottom"], Vt = ["bottom", "top"];
52
- function Kt(t, e, n) {
53
- switch (t) {
54
- case "top":
55
- case "bottom":
56
- return n ? e ? yt : wt : e ? wt : yt;
57
- case "left":
58
- case "right":
59
- return e ? qt : Vt;
60
- default:
61
- return [];
62
- }
63
- }
64
- function Jt(t, e, n, o) {
65
- const i = Z(t);
66
- let r = Kt(V(t), n === "start", o);
67
- return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(ft)))), r;
68
- }
69
- function ot(t) {
70
- return t.replace(/left|right|bottom|top/g, (e) => Mt[e]);
71
- }
72
- function Qt(t) {
73
- return {
74
- top: 0,
75
- right: 0,
76
- bottom: 0,
77
- left: 0,
78
- ...t
79
- };
80
- }
81
- function Dt(t) {
82
- return typeof t != "number" ? Qt(t) : {
83
- top: t,
84
- right: t,
85
- bottom: t,
86
- left: t
87
- };
88
- }
89
- function it(t) {
90
- const {
91
- x: e,
92
- y: n,
93
- width: o,
94
- height: i
95
- } = t;
96
- return {
97
- width: o,
98
- height: i,
99
- top: n,
100
- left: e,
101
- right: e + o,
102
- bottom: n + i,
103
- x: e,
104
- y: n
105
- };
106
- }
107
- function xt(t, e, n) {
108
- let {
109
- reference: o,
110
- floating: i
111
- } = t;
112
- const r = Y(e), s = mt(e), l = dt(s), a = V(e), f = r === "y", u = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, m = o[l] / 2 - i[l] / 2;
113
- let c;
114
- switch (a) {
115
- case "top":
116
- c = {
117
- x: u,
118
- y: o.y - i.height
119
- };
120
- break;
121
- case "bottom":
122
- c = {
123
- x: u,
124
- y: o.y + o.height
125
- };
126
- break;
127
- case "right":
128
- c = {
129
- x: o.x + o.width,
130
- y: d
131
- };
132
- break;
133
- case "left":
134
- c = {
135
- x: o.x - i.width,
136
- y: d
137
- };
138
- break;
139
- default:
140
- c = {
141
- x: o.x,
142
- y: o.y
143
- };
144
- }
145
- switch (Z(e)) {
146
- case "start":
147
- c[s] -= m * (n && f ? -1 : 1);
148
- break;
149
- case "end":
150
- c[s] += m * (n && f ? -1 : 1);
151
- break;
152
- }
153
- return c;
154
- }
155
- const Zt = async (t, e, n) => {
156
- const {
157
- placement: o = "bottom",
158
- strategy: i = "absolute",
159
- middleware: r = [],
160
- platform: s
161
- } = n, l = r.filter(Boolean), a = await (s.isRTL == null ? void 0 : s.isRTL(e));
162
- let f = await s.getElementRects({
163
- reference: t,
164
- floating: e,
165
- strategy: i
166
- }), {
167
- x: u,
168
- y: d
169
- } = xt(f, o, a), m = o, c = {}, h = 0;
170
- for (let g = 0; g < l.length; g++) {
171
- const {
172
- name: w,
173
- fn: p
174
- } = l[g], {
175
- x: y,
176
- y: b,
177
- data: v,
178
- reset: x
179
- } = await p({
180
- x: u,
181
- y: d,
182
- initialPlacement: o,
183
- placement: m,
184
- strategy: i,
185
- middlewareData: c,
186
- rects: f,
187
- platform: s,
188
- elements: {
189
- reference: t,
190
- floating: e
191
- }
192
- });
193
- u = y ?? u, d = b ?? d, c = {
194
- ...c,
195
- [w]: {
196
- ...c[w],
197
- ...v
198
- }
199
- }, x && h <= 50 && (h++, typeof x == "object" && (x.placement && (m = x.placement), x.rects && (f = x.rects === !0 ? await s.getElementRects({
200
- reference: t,
201
- floating: e,
202
- strategy: i
203
- }) : x.rects), {
204
- x: u,
205
- y: d
206
- } = xt(f, m, a)), g = -1);
207
- }
208
- return {
209
- x: u,
210
- y: d,
211
- placement: m,
212
- strategy: i,
213
- middlewareData: c
214
- };
215
- };
216
- async function Ot(t, e) {
217
- var n;
218
- e === void 0 && (e = {});
219
- const {
220
- x: o,
221
- y: i,
222
- platform: r,
223
- rects: s,
224
- elements: l,
225
- strategy: a
226
- } = t, {
227
- boundary: f = "clippingAncestors",
228
- rootBoundary: u = "viewport",
229
- elementContext: d = "floating",
230
- altBoundary: m = !1,
231
- padding: c = 0
232
- } = G(e, t), h = Dt(c), w = l[m ? d === "floating" ? "reference" : "floating" : d], p = it(await r.getClippingRect({
233
- element: (n = await (r.isElement == null ? void 0 : r.isElement(w))) == null || n ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(l.floating)),
234
- boundary: f,
235
- rootBoundary: u,
236
- strategy: a
237
- })), y = d === "floating" ? {
238
- x: o,
239
- y: i,
240
- width: s.floating.width,
241
- height: s.floating.height
242
- } : s.reference, b = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)), v = await (r.isElement == null ? void 0 : r.isElement(b)) ? await (r.getScale == null ? void 0 : r.getScale(b)) || {
243
- x: 1,
244
- y: 1
245
- } : {
246
- x: 1,
247
- y: 1
248
- }, x = it(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
249
- elements: l,
250
- rect: y,
251
- offsetParent: b,
252
- strategy: a
253
- }) : y);
254
- return {
255
- top: (p.top - x.top + h.top) / v.y,
256
- bottom: (x.bottom - p.bottom + h.bottom) / v.y,
257
- left: (p.left - x.left + h.left) / v.x,
258
- right: (x.right - p.right + h.right) / v.x
259
- };
260
- }
261
- const It = (t) => ({
262
- name: "arrow",
263
- options: t,
264
- async fn(e) {
265
- const {
266
- x: n,
267
- y: o,
268
- placement: i,
269
- rects: r,
270
- platform: s,
271
- elements: l,
272
- middlewareData: a
273
- } = e, {
274
- element: f,
275
- padding: u = 0
276
- } = G(t, e) || {};
277
- if (f == null)
278
- return {};
279
- const d = Dt(u), m = {
280
- x: n,
281
- y: o
282
- }, c = mt(i), h = dt(c), g = await s.getDimensions(f), w = c === "y", p = w ? "top" : "left", y = w ? "bottom" : "right", b = w ? "clientHeight" : "clientWidth", v = r.reference[h] + r.reference[c] - m[c] - r.floating[h], x = m[c] - r.reference[c], R = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(f));
283
- let T = R ? R[b] : 0;
284
- (!T || !await (s.isElement == null ? void 0 : s.isElement(R))) && (T = l.floating[b] || r.floating[h]);
285
- const P = v / 2 - x / 2, B = T / 2 - g[h] / 2 - 1, D = j(d[p], B), _ = j(d[y], B), W = D, z = T - g[h] - _, S = T / 2 - g[h] / 2 + P, q = zt(W, S, z), M = !a.arrow && Z(i) != null && S !== q && r.reference[h] / 2 - (S < W ? D : _) - g[h] / 2 < 0, O = M ? S < W ? S - W : S - z : 0;
286
- return {
287
- [c]: m[c] + O,
288
- data: {
289
- [c]: q,
290
- centerOffset: S - q - O,
291
- ...M && {
292
- alignmentOffset: O
293
- }
294
- },
295
- reset: M
296
- };
297
- }
298
- }), Nt = function(t) {
299
- return t === void 0 && (t = {}), {
300
- name: "flip",
301
- options: t,
302
- async fn(e) {
303
- var n, o;
304
- const {
305
- placement: i,
306
- middlewareData: r,
307
- rects: s,
308
- initialPlacement: l,
309
- platform: a,
310
- elements: f
311
- } = e, {
312
- mainAxis: u = !0,
313
- crossAxis: d = !0,
314
- fallbackPlacements: m,
315
- fallbackStrategy: c = "bestFit",
316
- fallbackAxisSideDirection: h = "none",
317
- flipAlignment: g = !0,
318
- ...w
319
- } = G(t, e);
320
- if ((n = r.arrow) != null && n.alignmentOffset)
321
- return {};
322
- const p = V(i), y = Y(l), b = V(l) === l, v = await (a.isRTL == null ? void 0 : a.isRTL(f.floating)), x = m || (b || !g ? [ot(l)] : Ut(l)), R = h !== "none";
323
- !m && R && x.push(...Jt(l, g, h, v));
324
- const T = [l, ...x], P = await Ot(e, w), B = [];
325
- let D = ((o = r.flip) == null ? void 0 : o.overflows) || [];
326
- if (u && B.push(P[p]), d) {
327
- const S = jt(i, s, v);
328
- B.push(P[S[0]], P[S[1]]);
329
- }
330
- if (D = [...D, {
331
- placement: i,
332
- overflows: B
333
- }], !B.every((S) => S <= 0)) {
334
- var _, W;
335
- const S = (((_ = r.flip) == null ? void 0 : _.index) || 0) + 1, q = T[S];
336
- if (q && (!(d === "alignment" ? y !== Y(q) : !1) || // We leave the current main axis only if every placement on that axis
337
- // overflows the main axis.
338
- D.every((L) => Y(L.placement) === y ? L.overflows[0] > 0 : !0)))
339
- return {
340
- data: {
341
- index: S,
342
- overflows: D
343
- },
344
- reset: {
345
- placement: q
346
- }
347
- };
348
- let M = (W = D.filter((O) => O.overflows[0] <= 0).sort((O, L) => O.overflows[1] - L.overflows[1])[0]) == null ? void 0 : W.placement;
349
- if (!M)
350
- switch (c) {
351
- case "bestFit": {
352
- var z;
353
- const O = (z = D.filter((L) => {
354
- if (R) {
355
- const X = Y(L.placement);
356
- return X === y || // Create a bias to the `y` side axis due to horizontal
357
- // reading directions favoring greater width.
358
- X === "y";
359
- }
360
- return !0;
361
- }).map((L) => [L.placement, L.overflows.filter((X) => X > 0).reduce((X, Pt) => X + Pt, 0)]).sort((L, X) => L[1] - X[1])[0]) == null ? void 0 : z[0];
362
- O && (M = O);
363
- break;
364
- }
365
- case "initialPlacement":
366
- M = l;
367
- break;
368
- }
369
- if (i !== M)
370
- return {
371
- reset: {
372
- placement: M
373
- }
374
- };
375
- }
376
- return {};
377
- }
378
- };
379
- }, Gt = /* @__PURE__ */ new Set(["left", "top"]);
380
- async function te(t, e) {
381
- const {
382
- placement: n,
383
- platform: o,
384
- elements: i
385
- } = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = V(n), l = Z(n), a = Y(n) === "y", f = Gt.has(s) ? -1 : 1, u = r && a ? -1 : 1, d = G(e, t);
386
- let {
387
- mainAxis: m,
388
- crossAxis: c,
389
- alignmentAxis: h
390
- } = typeof d == "number" ? {
391
- mainAxis: d,
392
- crossAxis: 0,
393
- alignmentAxis: null
394
- } : {
395
- mainAxis: d.mainAxis || 0,
396
- crossAxis: d.crossAxis || 0,
397
- alignmentAxis: d.alignmentAxis
398
- };
399
- return l && typeof h == "number" && (c = l === "end" ? h * -1 : h), a ? {
400
- x: c * u,
401
- y: m * f
402
- } : {
403
- x: m * f,
404
- y: c * u
405
- };
406
- }
407
- const ee = function(t) {
408
- return t === void 0 && (t = 0), {
409
- name: "offset",
410
- options: t,
411
- async fn(e) {
412
- var n, o;
413
- const {
414
- x: i,
415
- y: r,
416
- placement: s,
417
- middlewareData: l
418
- } = e, a = await te(e, t);
419
- return s === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
420
- x: i + a.x,
421
- y: r + a.y,
422
- data: {
423
- ...a,
424
- placement: s
425
- }
426
- };
427
- }
428
- };
429
- }, ne = function(t) {
430
- return t === void 0 && (t = {}), {
431
- name: "size",
432
- options: t,
433
- async fn(e) {
434
- var n, o;
435
- const {
436
- placement: i,
437
- rects: r,
438
- platform: s,
439
- elements: l
440
- } = e, {
441
- apply: a = () => {
442
- },
443
- ...f
444
- } = G(t, e), u = await Ot(e, f), d = V(i), m = Z(i), c = Y(i) === "y", {
445
- width: h,
446
- height: g
447
- } = r.floating;
448
- let w, p;
449
- d === "top" || d === "bottom" ? (w = d, p = m === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (p = d, w = m === "end" ? "top" : "bottom");
450
- const y = g - u.top - u.bottom, b = h - u.left - u.right, v = j(g - u[w], y), x = j(h - u[p], b), R = !e.middlewareData.shift;
451
- let T = v, P = x;
452
- if ((n = e.middlewareData.shift) != null && n.enabled.x && (P = b), (o = e.middlewareData.shift) != null && o.enabled.y && (T = y), R && !m) {
453
- const D = C(u.left, 0), _ = C(u.right, 0), W = C(u.top, 0), z = C(u.bottom, 0);
454
- c ? P = h - 2 * (D !== 0 || _ !== 0 ? D + _ : C(u.left, u.right)) : T = g - 2 * (W !== 0 || z !== 0 ? W + z : C(u.top, u.bottom));
455
- }
456
- await a({
457
- ...e,
458
- availableWidth: P,
459
- availableHeight: T
460
- });
461
- const B = await s.getDimensions(l.floating);
462
- return h !== B.width || g !== B.height ? {
463
- reset: {
464
- rects: !0
465
- }
466
- } : {};
467
- }
468
- };
469
- };
470
- function st() {
471
- return typeof window < "u";
472
- }
473
- function I(t) {
474
- return Lt(t) ? (t.nodeName || "").toLowerCase() : "#document";
475
- }
476
- function A(t) {
477
- var e;
478
- return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
479
- }
480
- function $(t) {
481
- var e;
482
- return (e = (Lt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
483
- }
484
- function Lt(t) {
485
- return st() ? t instanceof Node || t instanceof A(t).Node : !1;
486
- }
487
- function F(t) {
488
- return st() ? t instanceof Element || t instanceof A(t).Element : !1;
489
- }
490
- function H(t) {
491
- return st() ? t instanceof HTMLElement || t instanceof A(t).HTMLElement : !1;
492
- }
493
- function bt(t) {
494
- return !st() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
495
- }
496
- const oe = /* @__PURE__ */ new Set(["inline", "contents"]);
497
- function tt(t) {
498
- const {
499
- overflow: e,
500
- overflowX: n,
501
- overflowY: o,
502
- display: i
503
- } = k(t);
504
- return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !oe.has(i);
505
- }
506
- const ie = /* @__PURE__ */ new Set(["table", "td", "th"]);
507
- function se(t) {
508
- return ie.has(I(t));
509
- }
510
- const re = [":popover-open", ":modal"];
511
- function rt(t) {
512
- return re.some((e) => {
513
- try {
514
- return t.matches(e);
515
- } catch {
516
- return !1;
517
- }
518
- });
519
- }
520
- const le = ["transform", "translate", "scale", "rotate", "perspective"], ce = ["transform", "translate", "scale", "rotate", "perspective", "filter"], ae = ["paint", "layout", "strict", "content"];
521
- function ht(t) {
522
- const e = gt(), n = F(t) ? k(t) : t;
523
- return le.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ce.some((o) => (n.willChange || "").includes(o)) || ae.some((o) => (n.contain || "").includes(o));
524
- }
525
- function fe(t) {
526
- let e = U(t);
527
- for (; H(e) && !Q(e); ) {
528
- if (ht(e))
529
- return e;
530
- if (rt(e))
531
- return null;
532
- e = U(e);
533
- }
534
- return null;
535
- }
536
- function gt() {
537
- return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
538
- }
539
- const ue = /* @__PURE__ */ new Set(["html", "body", "#document"]);
540
- function Q(t) {
541
- return ue.has(I(t));
542
- }
543
- function k(t) {
544
- return A(t).getComputedStyle(t);
545
- }
546
- function lt(t) {
547
- return F(t) ? {
548
- scrollLeft: t.scrollLeft,
549
- scrollTop: t.scrollTop
550
- } : {
551
- scrollLeft: t.scrollX,
552
- scrollTop: t.scrollY
553
- };
554
- }
555
- function U(t) {
556
- if (I(t) === "html")
557
- return t;
558
- const e = (
559
- // Step into the shadow DOM of the parent of a slotted node.
560
- t.assignedSlot || // DOM Element detected.
561
- t.parentNode || // ShadowRoot detected.
562
- bt(t) && t.host || // Fallback.
563
- $(t)
564
- );
565
- return bt(e) ? e.host : e;
566
- }
567
- function Ft(t) {
568
- const e = U(t);
569
- return Q(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : H(e) && tt(e) ? e : Ft(e);
570
- }
571
- function N(t, e, n) {
572
- var o;
573
- e === void 0 && (e = []), n === void 0 && (n = !0);
574
- const i = Ft(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = A(i);
575
- if (r) {
576
- const l = ut(s);
577
- return e.concat(s, s.visualViewport || [], tt(i) ? i : [], l && n ? N(l) : []);
578
- }
579
- return e.concat(i, N(i, [], n));
580
- }
581
- function ut(t) {
582
- return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
583
- }
584
- function kt(t) {
585
- const e = k(t);
586
- let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
587
- const i = H(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, l = nt(n) !== r || nt(o) !== s;
588
- return l && (n = r, o = s), {
589
- width: n,
590
- height: o,
591
- $: l
592
- };
593
- }
594
- function pt(t) {
595
- return F(t) ? t : t.contextElement;
596
- }
597
- function J(t) {
598
- const e = pt(t);
599
- if (!H(e))
600
- return E(1);
601
- const n = e.getBoundingClientRect(), {
602
- width: o,
603
- height: i,
604
- $: r
605
- } = kt(e);
606
- let s = (r ? nt(n.width) : n.width) / o, l = (r ? nt(n.height) : n.height) / i;
607
- return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
608
- x: s,
609
- y: l
610
- };
611
- }
612
- const de = /* @__PURE__ */ E(0);
613
- function Bt(t) {
614
- const e = A(t);
615
- return !gt() || !e.visualViewport ? de : {
616
- x: e.visualViewport.offsetLeft,
617
- y: e.visualViewport.offsetTop
618
- };
619
- }
620
- function me(t, e, n) {
621
- return e === void 0 && (e = !1), !n || e && n !== A(t) ? !1 : e;
622
- }
623
- function K(t, e, n, o) {
624
- e === void 0 && (e = !1), n === void 0 && (n = !1);
625
- const i = t.getBoundingClientRect(), r = pt(t);
626
- let s = E(1);
627
- e && (o ? F(o) && (s = J(o)) : s = J(t));
628
- const l = me(r, n, o) ? Bt(r) : E(0);
629
- let a = (i.left + l.x) / s.x, f = (i.top + l.y) / s.y, u = i.width / s.x, d = i.height / s.y;
630
- if (r) {
631
- const m = A(r), c = o && F(o) ? A(o) : o;
632
- let h = m, g = ut(h);
633
- for (; g && o && c !== h; ) {
634
- const w = J(g), p = g.getBoundingClientRect(), y = k(g), b = p.left + (g.clientLeft + parseFloat(y.paddingLeft)) * w.x, v = p.top + (g.clientTop + parseFloat(y.paddingTop)) * w.y;
635
- a *= w.x, f *= w.y, u *= w.x, d *= w.y, a += b, f += v, h = A(g), g = ut(h);
636
- }
637
- }
638
- return it({
639
- width: u,
640
- height: d,
641
- x: a,
642
- y: f
643
- });
644
- }
645
- function ct(t, e) {
646
- const n = lt(t).scrollLeft;
647
- return e ? e.left + n : K($(t)).left + n;
648
- }
649
- function Wt(t, e) {
650
- const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - ct(t, n), i = n.top + e.scrollTop;
651
- return {
652
- x: o,
653
- y: i
654
- };
655
- }
656
- function he(t) {
657
- let {
658
- elements: e,
659
- rect: n,
660
- offsetParent: o,
661
- strategy: i
662
- } = t;
663
- const r = i === "fixed", s = $(o), l = e ? rt(e.floating) : !1;
664
- if (o === s || l && r)
665
- return n;
666
- let a = {
667
- scrollLeft: 0,
668
- scrollTop: 0
669
- }, f = E(1);
670
- const u = E(0), d = H(o);
671
- if ((d || !d && !r) && ((I(o) !== "body" || tt(s)) && (a = lt(o)), H(o))) {
672
- const c = K(o);
673
- f = J(o), u.x = c.x + o.clientLeft, u.y = c.y + o.clientTop;
674
- }
675
- const m = s && !d && !r ? Wt(s, a) : E(0);
676
- return {
677
- width: n.width * f.x,
678
- height: n.height * f.y,
679
- x: n.x * f.x - a.scrollLeft * f.x + u.x + m.x,
680
- y: n.y * f.y - a.scrollTop * f.y + u.y + m.y
681
- };
682
- }
683
- function ge(t) {
684
- return Array.from(t.getClientRects());
685
- }
686
- function pe(t) {
687
- const e = $(t), n = lt(t), o = t.ownerDocument.body, i = C(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = C(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
688
- let s = -n.scrollLeft + ct(t);
689
- const l = -n.scrollTop;
690
- return k(o).direction === "rtl" && (s += C(e.clientWidth, o.clientWidth) - i), {
691
- width: i,
692
- height: r,
693
- x: s,
694
- y: l
695
- };
696
- }
697
- const vt = 25;
698
- function we(t, e) {
699
- const n = A(t), o = $(t), i = n.visualViewport;
700
- let r = o.clientWidth, s = o.clientHeight, l = 0, a = 0;
701
- if (i) {
702
- r = i.width, s = i.height;
703
- const u = gt();
704
- (!u || u && e === "fixed") && (l = i.offsetLeft, a = i.offsetTop);
705
- }
706
- const f = ct(o);
707
- if (f <= 0) {
708
- const u = o.ownerDocument, d = u.body, m = getComputedStyle(d), c = u.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, h = Math.abs(o.clientWidth - d.clientWidth - c);
709
- h <= vt && (r -= h);
710
- } else f <= vt && (r += f);
711
- return {
712
- width: r,
713
- height: s,
714
- x: l,
715
- y: a
716
- };
717
- }
718
- const ye = /* @__PURE__ */ new Set(["absolute", "fixed"]);
719
- function xe(t, e) {
720
- const n = K(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = H(t) ? J(t) : E(1), s = t.clientWidth * r.x, l = t.clientHeight * r.y, a = i * r.x, f = o * r.y;
721
- return {
722
- width: s,
723
- height: l,
724
- x: a,
725
- y: f
726
- };
727
- }
728
- function Tt(t, e, n) {
729
- let o;
730
- if (e === "viewport")
731
- o = we(t, n);
732
- else if (e === "document")
733
- o = pe($(t));
734
- else if (F(e))
735
- o = xe(e, n);
736
- else {
737
- const i = Bt(t);
738
- o = {
739
- x: e.x - i.x,
740
- y: e.y - i.y,
741
- width: e.width,
742
- height: e.height
743
- };
744
- }
745
- return it(o);
746
- }
747
- function Et(t, e) {
748
- const n = U(t);
749
- return n === e || !F(n) || Q(n) ? !1 : k(n).position === "fixed" || Et(n, e);
750
- }
751
- function be(t, e) {
752
- const n = e.get(t);
753
- if (n)
754
- return n;
755
- let o = N(t, [], !1).filter((l) => F(l) && I(l) !== "body"), i = null;
756
- const r = k(t).position === "fixed";
757
- let s = r ? U(t) : t;
758
- for (; F(s) && !Q(s); ) {
759
- const l = k(s), a = ht(s);
760
- !a && l.position === "fixed" && (i = null), (r ? !a && !i : !a && l.position === "static" && !!i && ye.has(i.position) || tt(s) && !a && Et(t, s)) ? o = o.filter((u) => u !== s) : i = l, s = U(s);
761
- }
762
- return e.set(t, o), o;
763
- }
764
- function ve(t) {
765
- let {
766
- element: e,
767
- boundary: n,
768
- rootBoundary: o,
769
- strategy: i
770
- } = t;
771
- const s = [...n === "clippingAncestors" ? rt(e) ? [] : be(e, this._c) : [].concat(n), o], l = s[0], a = s.reduce((f, u) => {
772
- const d = Tt(e, u, i);
773
- return f.top = C(d.top, f.top), f.right = j(d.right, f.right), f.bottom = j(d.bottom, f.bottom), f.left = C(d.left, f.left), f;
774
- }, Tt(e, l, i));
775
- return {
776
- width: a.right - a.left,
777
- height: a.bottom - a.top,
778
- x: a.left,
779
- y: a.top
780
- };
781
- }
782
- function Te(t) {
783
- const {
784
- width: e,
785
- height: n
786
- } = kt(t);
787
- return {
788
- width: e,
789
- height: n
790
- };
791
- }
792
- function Se(t, e, n) {
793
- const o = H(e), i = $(e), r = n === "fixed", s = K(t, !0, r, e);
794
- let l = {
795
- scrollLeft: 0,
796
- scrollTop: 0
797
- };
798
- const a = E(0);
799
- function f() {
800
- a.x = ct(i);
801
- }
802
- if (o || !o && !r)
803
- if ((I(e) !== "body" || tt(i)) && (l = lt(e)), o) {
804
- const c = K(e, !0, r, e);
805
- a.x = c.x + e.clientLeft, a.y = c.y + e.clientTop;
806
- } else i && f();
807
- r && !o && i && f();
808
- const u = i && !o && !r ? Wt(i, l) : E(0), d = s.left + l.scrollLeft - a.x - u.x, m = s.top + l.scrollTop - a.y - u.y;
809
- return {
810
- x: d,
811
- y: m,
812
- width: s.width,
813
- height: s.height
814
- };
815
- }
816
- function at(t) {
817
- return k(t).position === "static";
818
- }
819
- function St(t, e) {
820
- if (!H(t) || k(t).position === "fixed")
821
- return null;
822
- if (e)
823
- return e(t);
824
- let n = t.offsetParent;
825
- return $(t) === n && (n = n.ownerDocument.body), n;
826
- }
827
- function Ht(t, e) {
828
- const n = A(t);
829
- if (rt(t))
830
- return n;
831
- if (!H(t)) {
832
- let i = U(t);
833
- for (; i && !Q(i); ) {
834
- if (F(i) && !at(i))
835
- return i;
836
- i = U(i);
837
- }
838
- return n;
839
- }
840
- let o = St(t, e);
841
- for (; o && se(o) && at(o); )
842
- o = St(o, e);
843
- return o && Q(o) && at(o) && !ht(o) ? n : o || fe(t) || n;
844
- }
845
- const Re = async function(t) {
846
- const e = this.getOffsetParent || Ht, n = this.getDimensions, o = await n(t.floating);
847
- return {
848
- reference: Se(t.reference, await e(t.floating), t.strategy),
849
- floating: {
850
- x: 0,
851
- y: 0,
852
- width: o.width,
853
- height: o.height
854
- }
855
- };
856
- };
857
- function Ce(t) {
858
- return k(t).direction === "rtl";
859
- }
860
- const Ae = {
861
- convertOffsetParentRelativeRectToViewportRelativeRect: he,
862
- getDocumentElement: $,
863
- getClippingRect: ve,
864
- getOffsetParent: Ht,
865
- getElementRects: Re,
866
- getClientRects: ge,
867
- getDimensions: Te,
868
- getScale: J,
869
- isElement: F,
870
- isRTL: Ce
871
- };
872
- function $t(t, e) {
873
- return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
874
- }
875
- function De(t, e) {
876
- let n = null, o;
877
- const i = $(t);
878
- function r() {
879
- var l;
880
- clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
881
- }
882
- function s(l, a) {
883
- l === void 0 && (l = !1), a === void 0 && (a = 1), r();
884
- const f = t.getBoundingClientRect(), {
885
- left: u,
886
- top: d,
887
- width: m,
888
- height: c
889
- } = f;
890
- if (l || e(), !m || !c)
891
- return;
892
- const h = et(d), g = et(i.clientWidth - (u + m)), w = et(i.clientHeight - (d + c)), p = et(u), b = {
893
- rootMargin: -h + "px " + -g + "px " + -w + "px " + -p + "px",
894
- threshold: C(0, j(1, a)) || 1
895
- };
896
- let v = !0;
897
- function x(R) {
898
- const T = R[0].intersectionRatio;
899
- if (T !== a) {
900
- if (!v)
901
- return s();
902
- T ? s(!1, T) : o = setTimeout(() => {
903
- s(!1, 1e-7);
904
- }, 1e3);
905
- }
906
- T === 1 && !$t(f, t.getBoundingClientRect()) && s(), v = !1;
907
- }
908
- try {
909
- n = new IntersectionObserver(x, {
910
- ...b,
911
- // Handle <iframe>s
912
- root: i.ownerDocument
913
- });
914
- } catch {
915
- n = new IntersectionObserver(x, b);
916
- }
917
- n.observe(t);
918
- }
919
- return s(!0), r;
920
- }
921
- function Oe(t, e, n, o) {
922
- o === void 0 && (o = {});
923
- const {
924
- ancestorScroll: i = !0,
925
- ancestorResize: r = !0,
926
- elementResize: s = typeof ResizeObserver == "function",
927
- layoutShift: l = typeof IntersectionObserver == "function",
928
- animationFrame: a = !1
929
- } = o, f = pt(t), u = i || r ? [...f ? N(f) : [], ...N(e)] : [];
930
- u.forEach((p) => {
931
- i && p.addEventListener("scroll", n, {
932
- passive: !0
933
- }), r && p.addEventListener("resize", n);
934
- });
935
- const d = f && l ? De(f, n) : null;
936
- let m = -1, c = null;
937
- s && (c = new ResizeObserver((p) => {
938
- let [y] = p;
939
- y && y.target === f && c && (c.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
940
- var b;
941
- (b = c) == null || b.observe(e);
942
- })), n();
943
- }), f && !a && c.observe(f), c.observe(e));
944
- let h, g = a ? K(t) : null;
945
- a && w();
946
- function w() {
947
- const p = K(t);
948
- g && !$t(g, p) && n(), g = p, h = requestAnimationFrame(w);
949
- }
950
- return n(), () => {
951
- var p;
952
- u.forEach((y) => {
953
- i && y.removeEventListener("scroll", n), r && y.removeEventListener("resize", n);
954
- }), d?.(), (p = c) == null || p.disconnect(), c = null, a && cancelAnimationFrame(h);
955
- };
956
- }
957
- const Le = ee, Fe = Nt, Rt = ne, ke = It, Be = (t, e, n) => {
958
- const o = /* @__PURE__ */ new Map(), i = {
959
- platform: Ae,
960
- ...n
961
- }, r = {
962
- ...i.platform,
963
- _c: o
964
- };
965
- return Zt(t, e, {
966
- ...i,
967
- platform: r
968
- });
969
- };
970
- class We {
971
- /**
972
- * register with host component
973
- * @param host host component
974
- */
975
- constructor(e) {
976
- this.updatePlacement = () => {
977
- this.computePlacement();
978
- }, this.host = e, e.addController(this);
979
- }
980
- async setPlacement(e = this.options) {
981
- this.options = e;
982
- const { trigger: n, target: o } = e;
983
- this.cleanup = Oe(n, o, this.updatePlacement);
984
- }
985
- async computePlacement() {
986
- var e;
987
- const { arrowElement: n, alignment: o, caret: i, trigger: r, target: s, styleElement: l, matchWidth: a, open: f, flipArguments: u, alignmentAxisOffset: d } = this.options, m = l ?? s;
988
- if (!m)
989
- return;
990
- let c;
991
- switch (o) {
992
- case "top-left":
993
- c = "top-start";
994
- break;
995
- case "top-right":
996
- c = "top-end";
997
- break;
998
- case "bottom-left":
999
- c = "bottom-start";
1000
- break;
1001
- case "bottom-right":
1002
- c = "bottom-end";
1003
- break;
1004
- case "left-bottom":
1005
- c = "left-end";
1006
- break;
1007
- case "left-top":
1008
- c = "left-start";
1009
- break;
1010
- case "right-bottom":
1011
- c = "right-end";
1012
- break;
1013
- case "right-top":
1014
- c = "right-start";
1015
- break;
1016
- default:
1017
- c = o;
1018
- break;
1019
- }
1020
- const h = [
1021
- Fe(u),
1022
- Le((d ?? 0) + (i ? 10 : 0)),
1023
- ...i && n ? [ke({ element: n, padding: 15 })] : [],
1024
- ...a && (c === "bottom" || c === "top") ? [
1025
- Rt({
1026
- apply({ rects: g, elements: w }) {
1027
- w.floating.style.width = `${g.reference.width}px`;
1028
- }
1029
- })
1030
- ] : [
1031
- Rt({
1032
- apply({ elements: g }) {
1033
- g.floating.style.removeProperty("width");
1034
- }
1035
- })
1036
- ]
1037
- ];
1038
- if (f) {
1039
- const { x: g, y: w, placement: p, middlewareData: y, strategy: b } = await Be(r, m, {
1040
- strategy: "fixed",
1041
- middleware: h,
1042
- placement: c
1043
- });
1044
- if (m.style.left = `${g}px`, m.style.top = `${w}px`, m.style.position = `${b}`, n) {
1045
- const { x: v, y: x } = y.arrow, R = {
1046
- top: "bottom",
1047
- right: "left",
1048
- bottom: "top",
1049
- left: "right"
1050
- }[p.split("-")[0]];
1051
- n.style.left = v != null ? `${v}px` : "", n.style.top = x != null ? `${x}px` : "", n.style.right = "", n.style.bottom = "", n.style[R] = `${-n.offsetWidth / 2}px`;
1052
- }
1053
- (this.host.tagName === "CDS-AI-LABEL" || this.host.tagName === "CDS-SLUG") && ((e = this.host) === null || e === void 0 || e.setAttribute("alignment", p));
1054
- }
1055
- }
1056
- hostUpdated() {
1057
- var e;
1058
- this.host.hasAttribute("open") || ((e = this.cleanup) === null || e === void 0 || e.call(this), this.cleanup = void 0);
1059
- }
1060
- hostDisconnected() {
1061
- var e;
1062
- (e = this.cleanup) === null || e === void 0 || e.call(this), this.cleanup = void 0;
1063
- }
1064
- }
1065
- var Ct;
1066
- (function(t) {
1067
- t.TOP = "top", t.TOP_LEFT = "top-left", t.TOP_RIGHT = "top-right", t.TOP_START = "top-start", t.TOP_END = "top-end", t.BOTTOM = "bottom", t.BOTTOM_LEFT = "bottom-left", t.BOTTOM_RIGHT = "bottom-right", t.BOTTOM_START = "bottom-start", t.BOTTOM_END = "bottom-end", t.LEFT = "left", t.LEFT_BOTTOM = "left-bottom", t.LEFT_TOP = "left-top", t.LEFT_START = "left-start", t.LEFT_END = "left-end", t.RIGHT = "right", t.RIGHT_BOTTOM = "right-bottom", t.RIGHT_TOP = "right-top", t.RIGHT_START = "right-start", t.RIGHT_END = "right-end";
1068
- })(Ct || (Ct = {}));
1069
- var At;
1070
- (function(t) {
1071
- t.LAYER = "layer", t.BACKGROUND = "background";
1072
- })(At || (At = {}));
1073
- export {
1074
- We as F,
1075
- Ct as P,
1076
- At as a
1077
- };