@feugene/granularity 0.9.4 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/dist/chunks/{config-d386uO3O.js.map → config-58Mj2rGH.js.map} +1 -1
  2. package/dist/chunks/{config-D4s_QWVP.js.map → config-8f8624RN.js.map} +1 -1
  3. package/dist/chunks/{config-B_nSBc7W.js.map → config-A-iei0Ux.js.map} +1 -1
  4. package/dist/chunks/{config-CFf7xaG1.js → config-B0uUCaJW.js} +1 -1
  5. package/dist/chunks/{config-CFf7xaG1.js.map → config-B0uUCaJW.js.map} +1 -1
  6. package/dist/chunks/{config-Dcb7xK-C.js.map → config-B3dn-gdC.js.map} +1 -1
  7. package/dist/chunks/{config-D6Oe3blW2.js.map → config-BLa1TEGm2.js.map} +1 -1
  8. package/dist/chunks/{config-Dzd6BzIN2.js.map → config-BeBsN0c12.js.map} +1 -1
  9. package/dist/chunks/{config-BU0olrvr.js.map → config-Bh4NWWsQ.js.map} +1 -1
  10. package/dist/chunks/{config-BeQuykDk2.js.map → config-BuoIngj32.js.map} +1 -1
  11. package/dist/chunks/{config-BbKroFtR.js.map → config-C5-ujXCI.js.map} +1 -1
  12. package/dist/chunks/{config-BY81UKv0.js → config-C8MM2Dg0.js} +1 -1
  13. package/dist/chunks/{config-BY81UKv0.js.map → config-C8MM2Dg0.js.map} +1 -1
  14. package/dist/chunks/{config-DF_RlCIO.js.map → config-CPSdAjUi.js.map} +1 -1
  15. package/dist/chunks/{config-iuMz79Mg.js.map → config-CWTfyPNI.js.map} +1 -1
  16. package/dist/chunks/{config-Br_qI3Za.js → config-C_egzT_K.js} +2 -2
  17. package/dist/chunks/config-C_egzT_K.js.map +1 -0
  18. package/dist/chunks/{config-Ci9nXGUV.js.map → config-C_q_4FrU.js.map} +1 -1
  19. package/dist/chunks/{config-O1_FTqD3.js.map → config-CzgNEHKi.js.map} +1 -1
  20. package/dist/chunks/{config-Bcf-8XlK2.js.map → config-DDUPnue12.js.map} +1 -1
  21. package/dist/chunks/{config-DmjwIqx1.js.map → config-DDwBSoc_.js.map} +1 -1
  22. package/dist/chunks/{config-C5OwJM3-.js → config-DRpkoSvq.js} +1 -1
  23. package/dist/chunks/{config-C5OwJM3-.js.map → config-DRpkoSvq.js.map} +1 -1
  24. package/dist/chunks/{config-DaHI5bD_2.js.map → config-DZrlovR42.js.map} +1 -1
  25. package/dist/chunks/{config-72sW9Bag2.js.map → config-D_Pafsjq2.js.map} +1 -1
  26. package/dist/chunks/{config-B1kFmhpM.js.map → config-DhQc1TRY.js.map} +1 -1
  27. package/dist/chunks/{config-CetsgpaZ2.js.map → config-DkeLkzxj2.js.map} +1 -1
  28. package/dist/chunks/{config-BOdu-O_B.js.map → config-Dl5aZ5VR.js.map} +1 -1
  29. package/dist/chunks/{config-CvGdaXvH.js.map → config-Doa_gU40.js.map} +1 -1
  30. package/dist/chunks/{config-CdJpnjDj.js.map → config-DvDNney3.js.map} +1 -1
  31. package/dist/chunks/{config-CpMYmvVT.js.map → config-NkbzVFZo.js.map} +1 -1
  32. package/dist/chunks/{config-_3De4HFf.js.map → config-RjfJFv1Y.js.map} +1 -1
  33. package/dist/chunks/{config-DoBk_CzG.js.map → config-VJuoznpH.js.map} +1 -1
  34. package/dist/chunks/{config-BnWSHTEU.js.map → config-XspHtPsU.js.map} +1 -1
  35. package/dist/chunks/{config-B2YTEe_h.js.map → config-hSlCXHoG.js.map} +1 -1
  36. package/dist/chunks/{config-DSBlHQVa.js.map → config-lMDE_8A5.js.map} +1 -1
  37. package/dist/chunks/{config-Cp_XHsze.js.map → config-nrOj9p6I.js.map} +1 -1
  38. package/dist/chunks/{en-foQA8imU.js → en-B_fSdoTi.js} +9 -2
  39. package/dist/chunks/en-B_fSdoTi.js.map +1 -0
  40. package/dist/chunks/{es-Bx3Kuy6z.js → es-CISK11Nv.js} +3 -3
  41. package/dist/chunks/{es-Bx3Kuy6z.js.map → es-CISK11Nv.js.map} +1 -1
  42. package/dist/chunks/{es-DZFSojYL.js → es-DKP6fLir.js} +9 -2
  43. package/dist/chunks/es-DKP6fLir.js.map +1 -0
  44. package/dist/chunks/{grDropdownStyles-B41mVR1H.js → grDropdownStyles-Bqx9hOzU.js} +10 -7
  45. package/dist/chunks/grDropdownStyles-Bqx9hOzU.js.map +1 -0
  46. package/dist/chunks/{grModalStyles-DS1Vl6EW.js → grModalStyles-FgaKqx50.js} +1 -1
  47. package/dist/chunks/grModalStyles-FgaKqx50.js.map +1 -0
  48. package/dist/chunks/{grSelectStyles-pUt19VGy.js.map → grSelectStyles-AjWWl007.js.map} +1 -1
  49. package/dist/chunks/{grStyle-CUaTmpyW.js.map → grStyle-D-gPHdyW.js.map} +1 -1
  50. package/dist/chunks/{granularityI18n-LcJ88Vce.js → granularityI18n-D_7jowK2.js} +17 -2
  51. package/dist/chunks/granularityI18n-D_7jowK2.js.map +1 -0
  52. package/dist/chunks/{ru-LhkPpPIl.js → ru-S6VlnurJ.js} +9 -2
  53. package/dist/chunks/ru-S6VlnurJ.js.map +1 -0
  54. package/dist/chunks/{shared-BiqXd5MW.js → shared-DpjTvFno.js} +34 -34
  55. package/dist/chunks/{shared-BiqXd5MW.js.map → shared-DpjTvFno.js.map} +1 -1
  56. package/dist/chunks/useFloating-CLtbU7eD.js +1234 -0
  57. package/dist/chunks/useFloating-CLtbU7eD.js.map +1 -0
  58. package/dist/components/GrConfirmDialog/chunks/{GrConfirmDialog-Br6WJkLE.js → GrConfirmDialog-Bi2KLumL.js} +2 -2
  59. package/dist/components/GrConfirmDialog/chunks/{GrConfirmDialog-Br6WJkLE.js.map → GrConfirmDialog-Bi2KLumL.js.map} +1 -1
  60. package/dist/components/GrConfirmDialog/index.js +1 -1
  61. package/dist/components/GrDialog/chunks/{GrDialog-C7XLxp8e.js → GrDialog-CxK4Lj4F.js} +1 -1
  62. package/dist/components/GrDialog/chunks/{GrDialog-C7XLxp8e.js.map → GrDialog-CxK4Lj4F.js.map} +1 -1
  63. package/dist/components/GrDialog/index.js +1 -1
  64. package/dist/components/GrDropdown/chunks/{GrDropdown-DOvHKnih.js → GrDropdown-BGKeEfZ1.js} +13 -59
  65. package/dist/components/GrDropdown/chunks/GrDropdown-BGKeEfZ1.js.map +1 -0
  66. package/dist/components/GrDropdown/index.js +2 -2
  67. package/dist/components/GrDropdownMenu/chunks/{GrDropdownMenu-CLPwbiyG.js → GrDropdownMenu-CJom_-c2.js} +1 -1
  68. package/dist/components/GrDropdownMenu/chunks/{GrDropdownMenu-CLPwbiyG.js.map → GrDropdownMenu-CJom_-c2.js.map} +1 -1
  69. package/dist/components/GrDropdownMenu/index.js +2 -2
  70. package/dist/components/GrEmptyState/chunks/{GrEmptyState-Dj2V5GaX.js.map → GrEmptyState-yOuZW7-t.js.map} +1 -1
  71. package/dist/components/GrEmptyState/index.js +2 -2
  72. package/dist/components/GrFileUpload/chunks/{GrFileUpload-BEKNB1RM.js → GrFileUpload-CBKK3dgC.js} +1 -1
  73. package/dist/components/GrFileUpload/chunks/{GrFileUpload-BEKNB1RM.js.map → GrFileUpload-CBKK3dgC.js.map} +1 -1
  74. package/dist/components/GrFileUpload/index.js +2 -2
  75. package/dist/components/GrFormField/index.js +1 -1
  76. package/dist/components/GrFormFile/chunks/{GrFormFile-CIleXnfr.js.map → GrFormFile-CkR6cYqf.js.map} +1 -1
  77. package/dist/components/GrFormFile/index.js +2 -2
  78. package/dist/components/GrFormSection/chunks/{GrFormSection-DpGhY7MX.js.map → GrFormSection-dbyzqxYk.js.map} +1 -1
  79. package/dist/components/GrFormSection/index.js +2 -2
  80. package/dist/components/GrImageViewer/chunks/{GrImageViewer-CsvXQHM9.js.map → GrImageViewer-BG40DsHa.js.map} +1 -1
  81. package/dist/components/GrImageViewer/index.js +2 -2
  82. package/dist/components/GrInput/index.js +1 -1
  83. package/dist/components/GrInputTag/chunks/{GrInputTag-Dcj3F6rQ.js → GrInputTag-g-KdUI_Z.js} +1 -1
  84. package/dist/components/GrInputTag/chunks/{GrInputTag-Dcj3F6rQ.js.map → GrInputTag-g-KdUI_Z.js.map} +1 -1
  85. package/dist/components/GrInputTag/index.js +2 -2
  86. package/dist/components/GrLink/chunks/{GrLink-BMwn2iJ9.js → GrLink-KSTmk9Yq.js} +1 -1
  87. package/dist/components/GrLink/chunks/{GrLink-BMwn2iJ9.js.map → GrLink-KSTmk9Yq.js.map} +1 -1
  88. package/dist/components/GrLink/index.js +2 -2
  89. package/dist/components/GrList/chunks/{GrList-D8nM1FuV.js.map → GrList-CUW2sRm_.js.map} +1 -1
  90. package/dist/components/GrList/index.js +2 -2
  91. package/dist/components/GrLoading/index.js +1 -1
  92. package/dist/components/GrModal/chunks/{GrModal-lh0lOmoi.js → GrModal-CSOL3fHQ.js} +1 -1
  93. package/dist/components/GrModal/chunks/{GrModal-lh0lOmoi.js.map → GrModal-CSOL3fHQ.js.map} +1 -1
  94. package/dist/components/GrModal/index.js +3 -3
  95. package/dist/components/GrNavbar/chunks/{GrNavbar-BH7XiF9q.js → GrNavbar-CHxwtFIR.js} +1 -1
  96. package/dist/components/GrNavbar/chunks/{GrNavbar-BH7XiF9q.js.map → GrNavbar-CHxwtFIR.js.map} +1 -1
  97. package/dist/components/GrNavbar/index.js +2 -2
  98. package/dist/components/GrNumberInput/chunks/{GrNumberInput-YIWhV85S.js → GrNumberInput-ClPBwkxx.js} +1 -1
  99. package/dist/components/GrNumberInput/chunks/{GrNumberInput-YIWhV85S.js.map → GrNumberInput-ClPBwkxx.js.map} +1 -1
  100. package/dist/components/GrNumberInput/index.js +2 -2
  101. package/dist/components/GrPagination/chunks/{GrPagination-BNDEqM8_.js → GrPagination-D2GS0ShQ.js} +4 -4
  102. package/dist/components/GrPagination/chunks/GrPagination-D2GS0ShQ.js.map +1 -0
  103. package/dist/components/GrPagination/index.js +2 -2
  104. package/dist/components/GrProgressBar/chunks/{GrProgressBar-C2HdYjp4.js → GrProgressBar-BBSFpVEq.js} +1 -1
  105. package/dist/components/GrProgressBar/chunks/{GrProgressBar-C2HdYjp4.js.map → GrProgressBar-BBSFpVEq.js.map} +1 -1
  106. package/dist/components/GrProgressBar/index.js +2 -2
  107. package/dist/components/GrPromptDialog/chunks/{GrPromptDialog-BV4EW3XO.js → GrPromptDialog-D_TFqKsF.js} +2 -2
  108. package/dist/components/GrPromptDialog/chunks/{GrPromptDialog-BV4EW3XO.js.map → GrPromptDialog-D_TFqKsF.js.map} +1 -1
  109. package/dist/components/GrPromptDialog/index.js +2 -2
  110. package/dist/components/GrRadio/chunks/{GrRadio-IFU9Hiu2.js → GrRadio-CSbTnrom.js} +1 -1
  111. package/dist/components/GrRadio/chunks/{GrRadio-IFU9Hiu2.js.map → GrRadio-CSbTnrom.js.map} +1 -1
  112. package/dist/components/GrRadio/index.js +2 -2
  113. package/dist/components/GrRadioGroup/chunks/{GrRadioGroup-C8IcJuuF.js → GrRadioGroup-DsrnTygR.js} +1 -1
  114. package/dist/components/GrRadioGroup/chunks/{GrRadioGroup-C8IcJuuF.js.map → GrRadioGroup-DsrnTygR.js.map} +1 -1
  115. package/dist/components/GrRadioGroup/index.js +2 -2
  116. package/dist/components/GrResponseErrorBanner/chunks/{GrResponseErrorBanner-BMvXREcv.js → GrResponseErrorBanner-K1uZ1mYD.js} +1 -1
  117. package/dist/components/GrResponseErrorBanner/chunks/{GrResponseErrorBanner-BMvXREcv.js.map → GrResponseErrorBanner-K1uZ1mYD.js.map} +1 -1
  118. package/dist/components/GrResponseErrorBanner/chunks/{GrResponseErrorBanner-CzdTh4gd.js → GrResponseErrorBanner-bM8FC_Bw.js} +1 -1
  119. package/dist/components/GrResponseErrorBanner/chunks/{GrResponseErrorBanner-CzdTh4gd.js.map → GrResponseErrorBanner-bM8FC_Bw.js.map} +1 -1
  120. package/dist/components/GrResponseErrorBanner/index.js +2 -2
  121. package/dist/components/GrSegmented/chunks/{GrSegmented-BRmwBsEG.js → GrSegmented-DpZGs4VX.js} +1 -1
  122. package/dist/components/GrSegmented/chunks/{GrSegmented-BRmwBsEG.js.map → GrSegmented-DpZGs4VX.js.map} +1 -1
  123. package/dist/components/GrSegmented/index.js +2 -2
  124. package/dist/components/GrSelect/chunks/{GrSelect-CnHdbPlf.js → GrSelect-DSz7jvUb.js} +25 -51
  125. package/dist/components/GrSelect/chunks/GrSelect-DSz7jvUb.js.map +1 -0
  126. package/dist/components/GrSelect/index.js +2 -2
  127. package/dist/components/GrSidebar/chunks/{GrSidebar-BpBtAGBs.js.map → GrSidebar-BW8LRMZ-.js.map} +1 -1
  128. package/dist/components/GrSidebar/index.js +2 -2
  129. package/dist/components/GrSkeleton/chunks/{GrSkeleton-URyMkBqI.js.map → GrSkeleton-B05K0QKh.js.map} +1 -1
  130. package/dist/components/GrSkeleton/index.js +2 -2
  131. package/dist/components/GrSwitch/chunks/{GrSwitch-29h0QhMO.js → GrSwitch-CSRtcN5-.js} +1 -1
  132. package/dist/components/GrSwitch/chunks/{GrSwitch-29h0QhMO.js.map → GrSwitch-CSRtcN5-.js.map} +1 -1
  133. package/dist/components/GrSwitch/index.js +2 -2
  134. package/dist/components/GrTable/index.js +1 -1
  135. package/dist/components/GrTabs/chunks/{GrTabs-D3ntDdtg.js.map → GrTabs-BfeVNMFJ.js.map} +1 -1
  136. package/dist/components/GrTabs/index.js +2 -2
  137. package/dist/components/GrTextarea/chunks/{GrTextarea-Cv6r2GuC.js → GrTextarea-CBBzpF2S.js} +1 -1
  138. package/dist/components/GrTextarea/chunks/{GrTextarea-Cv6r2GuC.js.map → GrTextarea-CBBzpF2S.js.map} +1 -1
  139. package/dist/components/GrTextarea/index.js +2 -2
  140. package/dist/components/GrToaster/chunks/{GrToaster-DluJmR5D.js → GrToaster-C6_iHk2J.js} +4 -3
  141. package/dist/components/GrToaster/chunks/GrToaster-C6_iHk2J.js.map +1 -0
  142. package/dist/components/GrToaster/index.js +2 -2
  143. package/dist/components/GrTooltip/chunks/GrTooltip-BC-40SA5.js +109 -0
  144. package/dist/components/GrTooltip/chunks/GrTooltip-BC-40SA5.js.map +1 -0
  145. package/dist/components/GrTooltip/index.js +2 -2
  146. package/dist/components/GrTree/chunks/{GrTree-B2SMU5Py.js.map → GrTree-uZr5SyQI.js.map} +1 -1
  147. package/dist/components/GrTree/index.js +2 -2
  148. package/dist/components/GrTreeSelect/chunks/{GrTreeSelect-C1abr5uH.js → GrTreeSelect-CytivcCa.js} +9 -37
  149. package/dist/components/GrTreeSelect/chunks/GrTreeSelect-CytivcCa.js.map +1 -0
  150. package/dist/components/GrTreeSelect/index.js +2 -2
  151. package/dist/granular-provider-node.js +2 -2
  152. package/dist/granular-provider.js +1 -1
  153. package/dist/i18n/all.js +1 -1
  154. package/dist/i18n/index.js +1 -1
  155. package/dist/index.js +67 -67
  156. package/dist/types/src/components/GrDropdown/grDropdownStyles.d.ts +3 -2
  157. package/dist/types/src/components/GrDropdownMenu/GrDropdownMenu.vue.d.ts +2 -2
  158. package/dist/types/src/components/GrDropdownMenu/GrDropdownMenuGroup.vue.d.ts +1 -1
  159. package/dist/types/src/components/GrDropdownMenu/GrDropdownMenuList.vue.d.ts +2 -2
  160. package/dist/types/src/components/GrFileUpload/GrFileUpload.vue.d.ts +1 -1
  161. package/dist/types/src/components/GrLink/GrLink.vue.d.ts +1 -1
  162. package/dist/types/src/components/GrModal/grModalStyles.d.ts +1 -1
  163. package/dist/types/src/components/GrSegmented/GrSegmented.vue.d.ts +1 -1
  164. package/dist/types/src/components/GrSelect/GrSelect.vue.d.ts +6 -6
  165. package/dist/types/src/composables/internal/useFloating.d.ts +53 -0
  166. package/dist/types/src/i18n/messages/en.d.ts +12 -0
  167. package/dist/types/src/i18n/messages/es.d.ts +12 -0
  168. package/dist/types/src/i18n/messages/ru.d.ts +12 -0
  169. package/package.json +9 -1
  170. package/dist/chunks/config-Br_qI3Za.js.map +0 -1
  171. package/dist/chunks/en-foQA8imU.js.map +0 -1
  172. package/dist/chunks/es-DZFSojYL.js.map +0 -1
  173. package/dist/chunks/grDropdownStyles-B41mVR1H.js.map +0 -1
  174. package/dist/chunks/grModalStyles-DS1Vl6EW.js.map +0 -1
  175. package/dist/chunks/granularityI18n-LcJ88Vce.js.map +0 -1
  176. package/dist/chunks/ru-LhkPpPIl.js.map +0 -1
  177. package/dist/components/GrDropdown/chunks/GrDropdown-DOvHKnih.js.map +0 -1
  178. package/dist/components/GrPagination/chunks/GrPagination-BNDEqM8_.js.map +0 -1
  179. package/dist/components/GrSelect/chunks/GrSelect-CnHdbPlf.js.map +0 -1
  180. package/dist/components/GrToaster/chunks/GrToaster-DluJmR5D.js.map +0 -1
  181. package/dist/components/GrTooltip/chunks/GrTooltip-B7I1AVIC.js +0 -55
  182. package/dist/components/GrTooltip/chunks/GrTooltip-B7I1AVIC.js.map +0 -1
  183. package/dist/components/GrTreeSelect/chunks/GrTreeSelect-C1abr5uH.js.map +0 -1
  184. /package/dist/chunks/{config-d386uO3O.js → config-58Mj2rGH.js} +0 -0
  185. /package/dist/chunks/{config-D4s_QWVP.js → config-8f8624RN.js} +0 -0
  186. /package/dist/chunks/{config-B_nSBc7W.js → config-A-iei0Ux.js} +0 -0
  187. /package/dist/chunks/{config-Dcb7xK-C.js → config-B3dn-gdC.js} +0 -0
  188. /package/dist/chunks/{config-D6Oe3blW2.js → config-BLa1TEGm2.js} +0 -0
  189. /package/dist/chunks/{config-Dzd6BzIN2.js → config-BeBsN0c12.js} +0 -0
  190. /package/dist/chunks/{config-BU0olrvr.js → config-Bh4NWWsQ.js} +0 -0
  191. /package/dist/chunks/{config-BeQuykDk2.js → config-BuoIngj32.js} +0 -0
  192. /package/dist/chunks/{config-BbKroFtR.js → config-C5-ujXCI.js} +0 -0
  193. /package/dist/chunks/{config-DF_RlCIO.js → config-CPSdAjUi.js} +0 -0
  194. /package/dist/chunks/{config-iuMz79Mg.js → config-CWTfyPNI.js} +0 -0
  195. /package/dist/chunks/{config-Ci9nXGUV.js → config-C_q_4FrU.js} +0 -0
  196. /package/dist/chunks/{config-O1_FTqD3.js → config-CzgNEHKi.js} +0 -0
  197. /package/dist/chunks/{config-Bcf-8XlK2.js → config-DDUPnue12.js} +0 -0
  198. /package/dist/chunks/{config-DmjwIqx1.js → config-DDwBSoc_.js} +0 -0
  199. /package/dist/chunks/{config-DaHI5bD_2.js → config-DZrlovR42.js} +0 -0
  200. /package/dist/chunks/{config-72sW9Bag2.js → config-D_Pafsjq2.js} +0 -0
  201. /package/dist/chunks/{config-B1kFmhpM.js → config-DhQc1TRY.js} +0 -0
  202. /package/dist/chunks/{config-CetsgpaZ2.js → config-DkeLkzxj2.js} +0 -0
  203. /package/dist/chunks/{config-BOdu-O_B.js → config-Dl5aZ5VR.js} +0 -0
  204. /package/dist/chunks/{config-CvGdaXvH.js → config-Doa_gU40.js} +0 -0
  205. /package/dist/chunks/{config-CdJpnjDj.js → config-DvDNney3.js} +0 -0
  206. /package/dist/chunks/{config-CpMYmvVT.js → config-NkbzVFZo.js} +0 -0
  207. /package/dist/chunks/{config-_3De4HFf.js → config-RjfJFv1Y.js} +0 -0
  208. /package/dist/chunks/{config-DoBk_CzG.js → config-VJuoznpH.js} +0 -0
  209. /package/dist/chunks/{config-BnWSHTEU.js → config-XspHtPsU.js} +0 -0
  210. /package/dist/chunks/{config-B2YTEe_h.js → config-hSlCXHoG.js} +0 -0
  211. /package/dist/chunks/{config-DSBlHQVa.js → config-lMDE_8A5.js} +0 -0
  212. /package/dist/chunks/{config-Cp_XHsze.js → config-nrOj9p6I.js} +0 -0
  213. /package/dist/chunks/{grSelectStyles-pUt19VGy.js → grSelectStyles-AjWWl007.js} +0 -0
  214. /package/dist/chunks/{grStyle-CUaTmpyW.js → grStyle-D-gPHdyW.js} +0 -0
  215. /package/dist/components/GrEmptyState/chunks/{GrEmptyState-Dj2V5GaX.js → GrEmptyState-yOuZW7-t.js} +0 -0
  216. /package/dist/components/GrFormFile/chunks/{GrFormFile-CIleXnfr.js → GrFormFile-CkR6cYqf.js} +0 -0
  217. /package/dist/components/GrFormSection/chunks/{GrFormSection-DpGhY7MX.js → GrFormSection-dbyzqxYk.js} +0 -0
  218. /package/dist/components/GrImageViewer/chunks/{GrImageViewer-CsvXQHM9.js → GrImageViewer-BG40DsHa.js} +0 -0
  219. /package/dist/components/GrList/chunks/{GrList-D8nM1FuV.js → GrList-CUW2sRm_.js} +0 -0
  220. /package/dist/components/GrSidebar/chunks/{GrSidebar-BpBtAGBs.js → GrSidebar-BW8LRMZ-.js} +0 -0
  221. /package/dist/components/GrSkeleton/chunks/{GrSkeleton-URyMkBqI.js → GrSkeleton-B05K0QKh.js} +0 -0
  222. /package/dist/components/GrTabs/chunks/{GrTabs-D3ntDdtg.js → GrTabs-BfeVNMFJ.js} +0 -0
  223. /package/dist/components/GrTree/chunks/{GrTree-B2SMU5Py.js → GrTree-uZr5SyQI.js} +0 -0
@@ -0,0 +1,1234 @@
1
+ import { nextTick, onBeforeUnmount, ref, watch } from "vue";
2
+ //#region ../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
3
+ var min = Math.min;
4
+ var max = Math.max;
5
+ var round = Math.round;
6
+ var floor = Math.floor;
7
+ var createCoords = (v) => ({
8
+ x: v,
9
+ y: v
10
+ });
11
+ var oppositeSideMap = {
12
+ left: "right",
13
+ right: "left",
14
+ bottom: "top",
15
+ top: "bottom"
16
+ };
17
+ function clamp(start, value, end) {
18
+ return max(start, min(value, end));
19
+ }
20
+ function evaluate(value, param) {
21
+ return typeof value === "function" ? value(param) : value;
22
+ }
23
+ function getSide(placement) {
24
+ return placement.split("-")[0];
25
+ }
26
+ function getAlignment(placement) {
27
+ return placement.split("-")[1];
28
+ }
29
+ function getOppositeAxis(axis) {
30
+ return axis === "x" ? "y" : "x";
31
+ }
32
+ function getAxisLength(axis) {
33
+ return axis === "y" ? "height" : "width";
34
+ }
35
+ function getSideAxis(placement) {
36
+ const firstChar = placement[0];
37
+ return firstChar === "t" || firstChar === "b" ? "y" : "x";
38
+ }
39
+ function getAlignmentAxis(placement) {
40
+ return getOppositeAxis(getSideAxis(placement));
41
+ }
42
+ function getAlignmentSides(placement, rects, rtl) {
43
+ if (rtl === void 0) rtl = false;
44
+ const alignment = getAlignment(placement);
45
+ const alignmentAxis = getAlignmentAxis(placement);
46
+ const length = getAxisLength(alignmentAxis);
47
+ let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
48
+ if (rects.reference[length] > rects.floating[length]) mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
49
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
50
+ }
51
+ function getExpandedPlacements(placement) {
52
+ const oppositePlacement = getOppositePlacement(placement);
53
+ return [
54
+ getOppositeAlignmentPlacement(placement),
55
+ oppositePlacement,
56
+ getOppositeAlignmentPlacement(oppositePlacement)
57
+ ];
58
+ }
59
+ function getOppositeAlignmentPlacement(placement) {
60
+ return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
61
+ }
62
+ var lrPlacement = ["left", "right"];
63
+ var rlPlacement = ["right", "left"];
64
+ var tbPlacement = ["top", "bottom"];
65
+ var btPlacement = ["bottom", "top"];
66
+ function getSideList(side, isStart, rtl) {
67
+ switch (side) {
68
+ case "top":
69
+ case "bottom":
70
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
71
+ return isStart ? lrPlacement : rlPlacement;
72
+ case "left":
73
+ case "right": return isStart ? tbPlacement : btPlacement;
74
+ default: return [];
75
+ }
76
+ }
77
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
78
+ const alignment = getAlignment(placement);
79
+ let list = getSideList(getSide(placement), direction === "start", rtl);
80
+ if (alignment) {
81
+ list = list.map((side) => side + "-" + alignment);
82
+ if (flipAlignment) list = list.concat(list.map(getOppositeAlignmentPlacement));
83
+ }
84
+ return list;
85
+ }
86
+ function getOppositePlacement(placement) {
87
+ const side = getSide(placement);
88
+ return oppositeSideMap[side] + placement.slice(side.length);
89
+ }
90
+ function expandPaddingObject(padding) {
91
+ var _padding$top, _padding$right, _padding$bottom, _padding$left;
92
+ return {
93
+ top: (_padding$top = padding.top) != null ? _padding$top : 0,
94
+ right: (_padding$right = padding.right) != null ? _padding$right : 0,
95
+ bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
96
+ left: (_padding$left = padding.left) != null ? _padding$left : 0
97
+ };
98
+ }
99
+ function getPaddingObject(padding) {
100
+ return typeof padding !== "number" ? expandPaddingObject(padding) : {
101
+ top: padding,
102
+ right: padding,
103
+ bottom: padding,
104
+ left: padding
105
+ };
106
+ }
107
+ function rectToClientRect(rect) {
108
+ const { x, y, width, height } = rect;
109
+ return {
110
+ width,
111
+ height,
112
+ top: y,
113
+ left: x,
114
+ right: x + width,
115
+ bottom: y + height,
116
+ x,
117
+ y
118
+ };
119
+ }
120
+ //#endregion
121
+ //#region ../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs
122
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
123
+ let { reference, floating } = _ref;
124
+ const sideAxis = getSideAxis(placement);
125
+ const alignmentAxis = getAlignmentAxis(placement);
126
+ const alignLength = getAxisLength(alignmentAxis);
127
+ const side = getSide(placement);
128
+ const isVertical = sideAxis === "y";
129
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
130
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
131
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
132
+ let coords;
133
+ switch (side) {
134
+ case "top":
135
+ coords = {
136
+ x: commonX,
137
+ y: reference.y - floating.height
138
+ };
139
+ break;
140
+ case "bottom":
141
+ coords = {
142
+ x: commonX,
143
+ y: reference.y + reference.height
144
+ };
145
+ break;
146
+ case "right":
147
+ coords = {
148
+ x: reference.x + reference.width,
149
+ y: commonY
150
+ };
151
+ break;
152
+ case "left":
153
+ coords = {
154
+ x: reference.x - floating.width,
155
+ y: commonY
156
+ };
157
+ break;
158
+ default: coords = {
159
+ x: reference.x,
160
+ y: reference.y
161
+ };
162
+ }
163
+ const alignment = getAlignment(placement);
164
+ if (alignment) coords[alignmentAxis] += commonAlign * (alignment === "end" ? 1 : -1) * (rtl && isVertical ? -1 : 1);
165
+ return coords;
166
+ }
167
+ /**
168
+ * Resolves with an object of overflow side offsets that determine how much the
169
+ * element is overflowing a given clipping boundary on each side.
170
+ * - positive = overflowing the boundary by that number of pixels
171
+ * - negative = how many pixels left before it will overflow
172
+ * - 0 = lies flush with the boundary
173
+ * @see https://floating-ui.com/docs/detectOverflow
174
+ */
175
+ async function detectOverflow(state, options) {
176
+ var _await$platform$isEle;
177
+ if (options === void 0) options = {};
178
+ const { x, y, platform, rects, elements, strategy } = state;
179
+ const { boundary = "clippingAncestors", rootBoundary = "viewport", elementContext = "floating", altBoundary = false, padding = 0 } = evaluate(options, state);
180
+ const paddingObject = getPaddingObject(padding);
181
+ const element = elements[altBoundary ? elementContext === "floating" ? "reference" : "floating" : elementContext];
182
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
183
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)),
184
+ boundary,
185
+ rootBoundary,
186
+ strategy
187
+ }));
188
+ const rect = elementContext === "floating" ? {
189
+ x,
190
+ y,
191
+ width: rects.floating.width,
192
+ height: rects.floating.height
193
+ } : rects.reference;
194
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
195
+ const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) && await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || {
196
+ x: 1,
197
+ y: 1
198
+ };
199
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
200
+ elements,
201
+ rect,
202
+ offsetParent,
203
+ strategy
204
+ }) : rect);
205
+ return {
206
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
207
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
208
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
209
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
210
+ };
211
+ }
212
+ var MAX_RESET_COUNT = 50;
213
+ /**
214
+ * Computes the `x` and `y` coordinates that will place the floating element
215
+ * next to a given reference element.
216
+ *
217
+ * This export does not have any `platform` interface logic. You will need to
218
+ * write one for the platform you are using Floating UI with.
219
+ */
220
+ var computePosition$1 = async (reference, floating, config) => {
221
+ const { placement = "bottom", strategy = "absolute", middleware = [], platform } = config;
222
+ const platformWithDetectOverflow = platform.detectOverflow ? platform : {
223
+ ...platform,
224
+ detectOverflow
225
+ };
226
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
227
+ let rects = await platform.getElementRects({
228
+ reference,
229
+ floating,
230
+ strategy
231
+ });
232
+ let { x, y } = computeCoordsFromPlacement(rects, placement, rtl);
233
+ let statefulPlacement = placement;
234
+ let resetCount = 0;
235
+ const middlewareData = {};
236
+ for (let i = 0; i < middleware.length; i++) {
237
+ const currentMiddleware = middleware[i];
238
+ if (!currentMiddleware) continue;
239
+ const { name, fn } = currentMiddleware;
240
+ const { x: nextX, y: nextY, data, reset } = await fn({
241
+ x,
242
+ y,
243
+ initialPlacement: placement,
244
+ placement: statefulPlacement,
245
+ strategy,
246
+ middlewareData,
247
+ rects,
248
+ platform: platformWithDetectOverflow,
249
+ elements: {
250
+ reference,
251
+ floating
252
+ }
253
+ });
254
+ x = nextX != null ? nextX : x;
255
+ y = nextY != null ? nextY : y;
256
+ middlewareData[name] = {
257
+ ...middlewareData[name],
258
+ ...data
259
+ };
260
+ if (reset && resetCount < MAX_RESET_COUNT) {
261
+ resetCount++;
262
+ if (typeof reset === "object") {
263
+ if (reset.placement) statefulPlacement = reset.placement;
264
+ if (reset.rects) rects = reset.rects === true ? await platform.getElementRects({
265
+ reference,
266
+ floating,
267
+ strategy
268
+ }) : reset.rects;
269
+ ({x, y} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
270
+ }
271
+ i = -1;
272
+ }
273
+ }
274
+ return {
275
+ x,
276
+ y,
277
+ placement: statefulPlacement,
278
+ strategy,
279
+ middlewareData
280
+ };
281
+ };
282
+ /**
283
+ * Optimizes the visibility of the floating element by flipping the `placement`
284
+ * in order to keep it in view when the preferred placement(s) will overflow the
285
+ * clipping boundary. Alternative to `autoPlacement`.
286
+ * @see https://floating-ui.com/docs/flip
287
+ */
288
+ var flip$1 = function(options) {
289
+ if (options === void 0) options = {};
290
+ return {
291
+ name: "flip",
292
+ options,
293
+ async fn(state) {
294
+ var _middlewareData$arrow, _middlewareData$flip;
295
+ const { placement, middlewareData, rects, initialPlacement, platform, elements } = state;
296
+ const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy = "bestFit", fallbackAxisSideDirection = "none", flipAlignment = true, ...detectOverflowOptions } = evaluate(options, state);
297
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
298
+ const side = getSide(placement);
299
+ const initialSideAxis = getSideAxis(initialPlacement);
300
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
301
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
302
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
303
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
304
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
305
+ const placements = [initialPlacement, ...fallbackPlacements];
306
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
307
+ const overflows = [];
308
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
309
+ if (checkMainAxis) overflows.push(overflow[side]);
310
+ if (checkCrossAxis) {
311
+ const sides = getAlignmentSides(placement, rects, rtl);
312
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
313
+ }
314
+ overflowsData = [...overflowsData, {
315
+ placement,
316
+ overflows
317
+ }];
318
+ if (!overflows.every((side) => side <= 0)) {
319
+ var _middlewareData$flip2, _overflowsData$filter;
320
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
321
+ const nextPlacement = placements[nextIndex];
322
+ if (nextPlacement) {
323
+ if (!(checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false) || overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) return {
324
+ data: {
325
+ index: nextIndex,
326
+ overflows: overflowsData
327
+ },
328
+ reset: { placement: nextPlacement }
329
+ };
330
+ }
331
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
332
+ if (!resetPlacement) switch (fallbackStrategy) {
333
+ case "bestFit": {
334
+ var _overflowsData$filter2;
335
+ const placement = (_overflowsData$filter2 = overflowsData.filter((d) => {
336
+ if (hasFallbackAxisSideDirection) {
337
+ const currentSideAxis = getSideAxis(d.placement);
338
+ return currentSideAxis === initialSideAxis || currentSideAxis === "y";
339
+ }
340
+ return true;
341
+ }).map((d) => [d.placement, d.overflows.filter((overflow) => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
342
+ if (placement) resetPlacement = placement;
343
+ break;
344
+ }
345
+ case "initialPlacement":
346
+ resetPlacement = initialPlacement;
347
+ break;
348
+ }
349
+ if (placement !== resetPlacement) return { reset: { placement: resetPlacement } };
350
+ }
351
+ return {};
352
+ }
353
+ };
354
+ };
355
+ var originSides = /* @__PURE__ */ new Set(["left", "top"]);
356
+ async function convertValueToCoords(state, options) {
357
+ const { placement, platform, elements } = state;
358
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
359
+ const side = getSide(placement);
360
+ const alignment = getAlignment(placement);
361
+ const isVertical = getSideAxis(placement) === "y";
362
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
363
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
364
+ const rawValue = evaluate(options, state);
365
+ let { mainAxis, crossAxis, alignmentAxis } = typeof rawValue === "number" ? {
366
+ mainAxis: rawValue,
367
+ crossAxis: 0,
368
+ alignmentAxis: null
369
+ } : {
370
+ mainAxis: rawValue.mainAxis || 0,
371
+ crossAxis: rawValue.crossAxis || 0,
372
+ alignmentAxis: rawValue.alignmentAxis
373
+ };
374
+ if (alignment && typeof alignmentAxis === "number") crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
375
+ return isVertical ? {
376
+ x: crossAxis * crossAxisMulti,
377
+ y: mainAxis * mainAxisMulti
378
+ } : {
379
+ x: mainAxis * mainAxisMulti,
380
+ y: crossAxis * crossAxisMulti
381
+ };
382
+ }
383
+ /**
384
+ * Modifies the placement by translating the floating element along the
385
+ * specified axes.
386
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
387
+ * object may be passed.
388
+ * @see https://floating-ui.com/docs/offset
389
+ */
390
+ var offset$1 = function(options) {
391
+ if (options === void 0) options = 0;
392
+ return {
393
+ name: "offset",
394
+ options,
395
+ async fn(state) {
396
+ var _middlewareData$offse, _middlewareData$arrow;
397
+ const { x, y, placement, middlewareData } = state;
398
+ const diffCoords = await convertValueToCoords(state, options);
399
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
400
+ return {
401
+ x: x + diffCoords.x,
402
+ y: y + diffCoords.y,
403
+ data: {
404
+ ...diffCoords,
405
+ placement
406
+ }
407
+ };
408
+ }
409
+ };
410
+ };
411
+ /**
412
+ * Optimizes the visibility of the floating element by shifting it in order to
413
+ * keep it in view when it will overflow the clipping boundary.
414
+ * @see https://floating-ui.com/docs/shift
415
+ */
416
+ var shift$1 = function(options) {
417
+ if (options === void 0) options = {};
418
+ return {
419
+ name: "shift",
420
+ options,
421
+ async fn(state) {
422
+ const { x, y, placement, platform } = state;
423
+ const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter = { fn: (_ref) => {
424
+ let { x, y } = _ref;
425
+ return {
426
+ x,
427
+ y
428
+ };
429
+ } }, ...detectOverflowOptions } = evaluate(options, state);
430
+ const coords = {
431
+ x,
432
+ y
433
+ };
434
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
435
+ const crossAxis = getSideAxis(placement);
436
+ const mainAxis = getOppositeAxis(crossAxis);
437
+ let mainAxisCoord = coords[mainAxis];
438
+ let crossAxisCoord = coords[crossAxis];
439
+ const clampCoord = (axis, coord) => clamp(coord + overflow[axis === "y" ? "top" : "left"], coord, coord - overflow[axis === "y" ? "bottom" : "right"]);
440
+ if (checkMainAxis) mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
441
+ if (checkCrossAxis) crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
442
+ const limitedCoords = limiter.fn({
443
+ ...state,
444
+ [mainAxis]: mainAxisCoord,
445
+ [crossAxis]: crossAxisCoord
446
+ });
447
+ return {
448
+ ...limitedCoords,
449
+ data: {
450
+ x: limitedCoords.x - x,
451
+ y: limitedCoords.y - y,
452
+ enabled: {
453
+ [mainAxis]: checkMainAxis,
454
+ [crossAxis]: checkCrossAxis
455
+ }
456
+ }
457
+ };
458
+ }
459
+ };
460
+ };
461
+ /**
462
+ * Provides data that allows you to change the size of the floating element —
463
+ * for instance, prevent it from overflowing the clipping boundary or match the
464
+ * width of the reference element.
465
+ * @see https://floating-ui.com/docs/size
466
+ */
467
+ var size$1 = function(options) {
468
+ if (options === void 0) options = {};
469
+ return {
470
+ name: "size",
471
+ options,
472
+ async fn(state) {
473
+ const { placement, rects, platform, elements } = state;
474
+ const { apply = () => {}, ...detectOverflowOptions } = evaluate(options, state);
475
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
476
+ const side = getSide(placement);
477
+ const alignment = getAlignment(placement);
478
+ const isYAxis = getSideAxis(placement) === "y";
479
+ const { width, height } = rects.floating;
480
+ let heightSide;
481
+ let widthSide;
482
+ if (side === "top" || side === "bottom") {
483
+ heightSide = side;
484
+ widthSide = alignment === (await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
485
+ } else {
486
+ widthSide = side;
487
+ heightSide = alignment === "end" ? "top" : "bottom";
488
+ }
489
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
490
+ const maximumClippingWidth = width - overflow.left - overflow.right;
491
+ const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
492
+ const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
493
+ const shiftData = state.middlewareData.shift;
494
+ const noShift = !shiftData;
495
+ let availableHeight = overflowAvailableHeight;
496
+ let availableWidth = overflowAvailableWidth;
497
+ if (shiftData != null && shiftData.enabled.x) availableWidth = maximumClippingWidth;
498
+ if (shiftData != null && shiftData.enabled.y) availableHeight = maximumClippingHeight;
499
+ if (noShift && !alignment) if (isYAxis) availableWidth = width - 2 * max(overflow.left, overflow.right);
500
+ else availableHeight = height - 2 * max(overflow.top, overflow.bottom);
501
+ await apply({
502
+ ...state,
503
+ availableWidth,
504
+ availableHeight
505
+ });
506
+ const nextDimensions = await platform.getDimensions(elements.floating);
507
+ if (width !== nextDimensions.width || height !== nextDimensions.height) return { reset: { rects: true } };
508
+ return {};
509
+ }
510
+ };
511
+ };
512
+ //#endregion
513
+ //#region ../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
514
+ function hasWindow() {
515
+ return typeof window !== "undefined";
516
+ }
517
+ function getNodeName(node) {
518
+ if (isNode(node)) return (node.nodeName || "").toLowerCase();
519
+ return "#document";
520
+ }
521
+ function getWindow(node) {
522
+ var _node$ownerDocument;
523
+ return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
524
+ }
525
+ function getDocumentElement(node) {
526
+ var _ref;
527
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
528
+ }
529
+ function isNode(value) {
530
+ if (!hasWindow()) return false;
531
+ return value instanceof Node || value instanceof getWindow(value).Node;
532
+ }
533
+ function isElement(value) {
534
+ if (!hasWindow()) return false;
535
+ return value instanceof Element || value instanceof getWindow(value).Element;
536
+ }
537
+ function isHTMLElement(value) {
538
+ if (!hasWindow()) return false;
539
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
540
+ }
541
+ function isShadowRoot(value) {
542
+ if (!hasWindow() || typeof ShadowRoot === "undefined") return false;
543
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
544
+ }
545
+ function isOverflowElement(element) {
546
+ const { overflow, overflowX, overflowY, display } = getComputedStyle$1(element);
547
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
548
+ }
549
+ function isTableElement(element) {
550
+ return /^(table|td|th)$/.test(getNodeName(element));
551
+ }
552
+ function isTopLayer(element) {
553
+ try {
554
+ if (element.matches(":popover-open")) return true;
555
+ } catch (_e) {}
556
+ try {
557
+ return element.matches(":modal");
558
+ } catch (_e) {
559
+ return false;
560
+ }
561
+ }
562
+ var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
563
+ var containRe = /paint|layout|strict|content/;
564
+ var isNotNone = (value) => !!value && value !== "none";
565
+ var isWebKitValue;
566
+ function isContainingBlock(elementOrCss) {
567
+ const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
568
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
569
+ }
570
+ function getContainingBlock(element) {
571
+ let currentNode = getParentNode(element);
572
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
573
+ if (isContainingBlock(currentNode)) return currentNode;
574
+ else if (isTopLayer(currentNode)) return null;
575
+ currentNode = getParentNode(currentNode);
576
+ }
577
+ return null;
578
+ }
579
+ function isWebKit() {
580
+ if (isWebKitValue == null) isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
581
+ return isWebKitValue;
582
+ }
583
+ function isLastTraversableNode(node) {
584
+ return /^(html|body|#document)$/.test(getNodeName(node));
585
+ }
586
+ function getComputedStyle$1(element) {
587
+ return getWindow(element).getComputedStyle(element);
588
+ }
589
+ function getNodeScroll(element) {
590
+ if (isElement(element)) return {
591
+ scrollLeft: element.scrollLeft,
592
+ scrollTop: element.scrollTop
593
+ };
594
+ return {
595
+ scrollLeft: element.scrollX,
596
+ scrollTop: element.scrollY
597
+ };
598
+ }
599
+ function getParentNode(node) {
600
+ if (getNodeName(node) === "html") return node;
601
+ const result = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
602
+ return isShadowRoot(result) ? result.host : result;
603
+ }
604
+ function getNearestOverflowAncestor(node) {
605
+ const parentNode = getParentNode(node);
606
+ if (isLastTraversableNode(parentNode)) return (node.ownerDocument || node).body;
607
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) return parentNode;
608
+ return getNearestOverflowAncestor(parentNode);
609
+ }
610
+ function getOverflowAncestors(node, list, traverseIframes) {
611
+ var _node$ownerDocument2;
612
+ if (list === void 0) list = [];
613
+ if (traverseIframes === void 0) traverseIframes = true;
614
+ const scrollableAncestor = getNearestOverflowAncestor(node);
615
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
616
+ const win = getWindow(scrollableAncestor);
617
+ if (isBody) {
618
+ const frameElement = getFrameElement(win);
619
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
620
+ } else return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
621
+ }
622
+ function getFrameElement(win) {
623
+ return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
624
+ }
625
+ //#endregion
626
+ //#region ../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
627
+ function getCssDimensions(element) {
628
+ const css = getComputedStyle$1(element);
629
+ let width = parseFloat(css.width) || 0;
630
+ let height = parseFloat(css.height) || 0;
631
+ const hasOffset = isHTMLElement(element);
632
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
633
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
634
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
635
+ if (shouldFallback) {
636
+ width = offsetWidth;
637
+ height = offsetHeight;
638
+ }
639
+ return {
640
+ width,
641
+ height,
642
+ $: shouldFallback
643
+ };
644
+ }
645
+ function unwrapElement(element) {
646
+ return !isElement(element) ? element.contextElement : element;
647
+ }
648
+ function getScale(element) {
649
+ const domElement = unwrapElement(element);
650
+ if (!isHTMLElement(domElement)) return createCoords(1);
651
+ const rect = domElement.getBoundingClientRect();
652
+ const { width, height, $ } = getCssDimensions(domElement);
653
+ let x = ($ ? round(rect.width) : rect.width) / width;
654
+ let y = ($ ? round(rect.height) : rect.height) / height;
655
+ if (!x || !Number.isFinite(x)) x = 1;
656
+ if (!y || !Number.isFinite(y)) y = 1;
657
+ return {
658
+ x,
659
+ y
660
+ };
661
+ }
662
+ var noOffsets = /* @__PURE__ */ createCoords(0);
663
+ function getVisualOffsets(element) {
664
+ const win = getWindow(element);
665
+ if (!isWebKit() || !win.visualViewport) return noOffsets;
666
+ return {
667
+ x: win.visualViewport.offsetLeft,
668
+ y: win.visualViewport.offsetTop
669
+ };
670
+ }
671
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
672
+ if (isFixed === void 0) isFixed = false;
673
+ return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
674
+ }
675
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
676
+ if (includeScale === void 0) includeScale = false;
677
+ if (isFixedStrategy === void 0) isFixedStrategy = false;
678
+ const clientRect = element.getBoundingClientRect();
679
+ const domElement = unwrapElement(element);
680
+ let scale = createCoords(1);
681
+ if (includeScale) if (offsetParent) {
682
+ if (isElement(offsetParent)) scale = getScale(offsetParent);
683
+ } else scale = getScale(element);
684
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
685
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
686
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
687
+ let width = clientRect.width / scale.x;
688
+ let height = clientRect.height / scale.y;
689
+ if (domElement && offsetParent) {
690
+ const win = getWindow(domElement);
691
+ const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
692
+ let currentWin = win;
693
+ let currentIFrame = getFrameElement(currentWin);
694
+ while (currentIFrame && offsetWin !== currentWin) {
695
+ const iframeScale = getScale(currentIFrame);
696
+ const iframeRect = currentIFrame.getBoundingClientRect();
697
+ const css = getComputedStyle$1(currentIFrame);
698
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
699
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
700
+ x *= iframeScale.x;
701
+ y *= iframeScale.y;
702
+ width *= iframeScale.x;
703
+ height *= iframeScale.y;
704
+ x += left;
705
+ y += top;
706
+ currentWin = getWindow(currentIFrame);
707
+ currentIFrame = getFrameElement(currentWin);
708
+ }
709
+ }
710
+ return rectToClientRect({
711
+ width,
712
+ height,
713
+ x,
714
+ y
715
+ });
716
+ }
717
+ function getWindowScrollBarX(element, rect) {
718
+ const leftScroll = getNodeScroll(element).scrollLeft;
719
+ if (!rect) return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
720
+ return rect.left + leftScroll;
721
+ }
722
+ function getHTMLOffset(documentElement, scroll) {
723
+ const htmlRect = documentElement.getBoundingClientRect();
724
+ return {
725
+ x: htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect),
726
+ y: htmlRect.top + scroll.scrollTop
727
+ };
728
+ }
729
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
730
+ let { elements, rect, offsetParent, strategy } = _ref;
731
+ const isFixed = strategy === "fixed";
732
+ const documentElement = getDocumentElement(offsetParent);
733
+ const topLayer = elements ? isTopLayer(elements.floating) : false;
734
+ if (offsetParent === documentElement || topLayer && isFixed) return rect;
735
+ let scroll = {
736
+ scrollLeft: 0,
737
+ scrollTop: 0
738
+ };
739
+ let scale = createCoords(1);
740
+ const offsets = createCoords(0);
741
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
742
+ if (isOffsetParentAnElement || !isFixed) {
743
+ if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
744
+ if (isOffsetParentAnElement) {
745
+ const offsetRect = getBoundingClientRect(offsetParent);
746
+ scale = getScale(offsetParent);
747
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
748
+ offsets.y = offsetRect.y + offsetParent.clientTop;
749
+ }
750
+ }
751
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
752
+ return {
753
+ width: rect.width * scale.x,
754
+ height: rect.height * scale.y,
755
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
756
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
757
+ };
758
+ }
759
+ function getClientRects(element) {
760
+ return element.getClientRects ? Array.from(element.getClientRects()) : [];
761
+ }
762
+ function getDocumentRect(html) {
763
+ const scroll = getNodeScroll(html);
764
+ const body = html.ownerDocument.body;
765
+ const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
766
+ const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
767
+ let x = -scroll.scrollLeft + getWindowScrollBarX(html);
768
+ const y = -scroll.scrollTop;
769
+ if (getComputedStyle$1(body).direction === "rtl") x += max(html.clientWidth, body.clientWidth) - width;
770
+ return {
771
+ width,
772
+ height,
773
+ x,
774
+ y
775
+ };
776
+ }
777
+ var SCROLLBAR_MAX = 25;
778
+ function getViewportRect(element, strategy, rootBoundary) {
779
+ if (rootBoundary === void 0) rootBoundary = "viewport";
780
+ const isLayoutViewport = rootBoundary === "layoutViewport";
781
+ const win = getWindow(element);
782
+ const html = getDocumentElement(element);
783
+ const visualViewport = win.visualViewport;
784
+ let width = html.clientWidth;
785
+ let height = html.clientHeight;
786
+ let x = 0;
787
+ let y = 0;
788
+ if (visualViewport) {
789
+ const layoutRelativeClientCoords = !isWebKit() || strategy === "fixed";
790
+ if (isLayoutViewport) {
791
+ if (!layoutRelativeClientCoords) {
792
+ x = -visualViewport.offsetLeft;
793
+ y = -visualViewport.offsetTop;
794
+ }
795
+ } else {
796
+ width = visualViewport.width;
797
+ height = visualViewport.height;
798
+ if (layoutRelativeClientCoords) {
799
+ x = visualViewport.offsetLeft;
800
+ y = visualViewport.offsetTop;
801
+ }
802
+ }
803
+ }
804
+ if (getWindowScrollBarX(html) <= 0) {
805
+ const doc = html.ownerDocument;
806
+ const body = doc.body;
807
+ const bodyStyles = getComputedStyle(body);
808
+ const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
809
+ const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
810
+ const gutter = getComputedStyle(html).scrollbarGutter === "stable both-edges" ? reservedWidth / 2 : reservedWidth;
811
+ if (gutter <= SCROLLBAR_MAX) width -= gutter;
812
+ }
813
+ return {
814
+ width,
815
+ height,
816
+ x,
817
+ y
818
+ };
819
+ }
820
+ function getInnerBoundingClientRect(element, strategy) {
821
+ const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
822
+ const top = clientRect.top + element.clientTop;
823
+ const left = clientRect.left + element.clientLeft;
824
+ const scale = getScale(element);
825
+ return {
826
+ width: element.clientWidth * scale.x,
827
+ height: element.clientHeight * scale.y,
828
+ x: left * scale.x,
829
+ y: top * scale.y
830
+ };
831
+ }
832
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
833
+ let rect;
834
+ if (clippingAncestor === "viewport" || clippingAncestor === "layoutViewport") rect = getViewportRect(element, strategy, clippingAncestor);
835
+ else if (clippingAncestor === "document") rect = getDocumentRect(getDocumentElement(element));
836
+ else if (isElement(clippingAncestor)) rect = getInnerBoundingClientRect(clippingAncestor, strategy);
837
+ else {
838
+ const visualOffsets = getVisualOffsets(element);
839
+ rect = {
840
+ x: clippingAncestor.x - visualOffsets.x,
841
+ y: clippingAncestor.y - visualOffsets.y,
842
+ width: clippingAncestor.width,
843
+ height: clippingAncestor.height
844
+ };
845
+ }
846
+ return rectToClientRect(rect);
847
+ }
848
+ function getClippingElementAncestors(element, cache) {
849
+ const cachedResult = cache.get(element);
850
+ if (cachedResult) return cachedResult;
851
+ let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
852
+ let lastKeptComputedStyle = null;
853
+ const elementIsFixed = getComputedStyle$1(element).position === "fixed";
854
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
855
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
856
+ const computedStyle = getComputedStyle$1(currentNode);
857
+ const currentNodeIsContaining = isContainingBlock(currentNode);
858
+ const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? "fixed" : "";
859
+ if (!currentNodeIsContaining && (lastPosition === "fixed" || lastPosition === "absolute" && computedStyle.position === "static")) result = result.filter((ancestor) => ancestor !== currentNode);
860
+ else lastKeptComputedStyle = computedStyle;
861
+ currentNode = getParentNode(currentNode);
862
+ }
863
+ cache.set(element, result);
864
+ return result;
865
+ }
866
+ function getClippingRect(_ref) {
867
+ let { element, boundary, rootBoundary, strategy } = _ref;
868
+ const clippingAncestors = [...boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary), rootBoundary];
869
+ const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
870
+ let top = firstRect.top;
871
+ let right = firstRect.right;
872
+ let bottom = firstRect.bottom;
873
+ let left = firstRect.left;
874
+ for (let i = 1; i < clippingAncestors.length; i++) {
875
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
876
+ top = max(rect.top, top);
877
+ right = min(rect.right, right);
878
+ bottom = min(rect.bottom, bottom);
879
+ left = max(rect.left, left);
880
+ }
881
+ return {
882
+ width: right - left,
883
+ height: bottom - top,
884
+ x: left,
885
+ y: top
886
+ };
887
+ }
888
+ function getDimensions(element) {
889
+ const { width, height } = getCssDimensions(element);
890
+ return {
891
+ width,
892
+ height
893
+ };
894
+ }
895
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
896
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
897
+ const documentElement = getDocumentElement(offsetParent);
898
+ const isFixed = strategy === "fixed";
899
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
900
+ let scroll = {
901
+ scrollLeft: 0,
902
+ scrollTop: 0
903
+ };
904
+ const offsets = createCoords(0);
905
+ if (isOffsetParentAnElement || !isFixed) {
906
+ if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
907
+ if (isOffsetParentAnElement) {
908
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
909
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
910
+ offsets.y = offsetRect.y + offsetParent.clientTop;
911
+ }
912
+ }
913
+ if (!isOffsetParentAnElement && documentElement) offsets.x = getWindowScrollBarX(documentElement);
914
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
915
+ return {
916
+ x: rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x,
917
+ y: rect.top + scroll.scrollTop - offsets.y - htmlOffset.y,
918
+ width: rect.width,
919
+ height: rect.height
920
+ };
921
+ }
922
+ function isStaticPositioned(element) {
923
+ return getComputedStyle$1(element).position === "static";
924
+ }
925
+ function getTrueOffsetParent(element, polyfill) {
926
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") return null;
927
+ if (polyfill) return polyfill(element);
928
+ let rawOffsetParent = element.offsetParent;
929
+ if (getDocumentElement(element) === rawOffsetParent) rawOffsetParent = rawOffsetParent.ownerDocument.body;
930
+ return rawOffsetParent;
931
+ }
932
+ function getOffsetParent(element, polyfill) {
933
+ const win = getWindow(element);
934
+ if (isTopLayer(element)) return win;
935
+ if (!isHTMLElement(element)) {
936
+ let svgOffsetParent = getParentNode(element);
937
+ while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
938
+ if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) return svgOffsetParent;
939
+ svgOffsetParent = getParentNode(svgOffsetParent);
940
+ }
941
+ return win;
942
+ }
943
+ let offsetParent = getTrueOffsetParent(element, polyfill);
944
+ while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) offsetParent = getTrueOffsetParent(offsetParent, polyfill);
945
+ if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) return win;
946
+ return offsetParent || getContainingBlock(element) || win;
947
+ }
948
+ var getElementRects = async function(data) {
949
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
950
+ const getDimensionsFn = this.getDimensions;
951
+ const floatingDimensions = await getDimensionsFn(data.floating);
952
+ return {
953
+ reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
954
+ floating: {
955
+ x: 0,
956
+ y: 0,
957
+ width: floatingDimensions.width,
958
+ height: floatingDimensions.height
959
+ }
960
+ };
961
+ };
962
+ function isRTL(element) {
963
+ return getComputedStyle$1(element).direction === "rtl";
964
+ }
965
+ var platform = {
966
+ convertOffsetParentRelativeRectToViewportRelativeRect,
967
+ getDocumentElement,
968
+ getClippingRect,
969
+ getOffsetParent,
970
+ getElementRects,
971
+ getClientRects,
972
+ getDimensions,
973
+ getScale,
974
+ isElement,
975
+ isRTL
976
+ };
977
+ function rectsAreEqual(a, b) {
978
+ return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
979
+ }
980
+ function observeMove(element, onMove, ancestorResize) {
981
+ let io = null;
982
+ let timeoutId;
983
+ const root = getDocumentElement(element);
984
+ function cleanup() {
985
+ var _io;
986
+ clearTimeout(timeoutId);
987
+ (_io = io) == null || _io.disconnect();
988
+ io = null;
989
+ }
990
+ function refresh(skip, threshold) {
991
+ if (skip === void 0) skip = false;
992
+ if (threshold === void 0) threshold = 1;
993
+ cleanup();
994
+ const elementRectForRootMargin = element.getBoundingClientRect();
995
+ const { left, top, width, height } = elementRectForRootMargin;
996
+ if (!skip) onMove();
997
+ if (!width || !height) return;
998
+ const insetTop = floor(top);
999
+ const insetRight = floor(root.clientWidth - (left + width));
1000
+ const insetBottom = floor(root.clientHeight - (top + height));
1001
+ const insetLeft = floor(left);
1002
+ const options = {
1003
+ rootMargin: -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px",
1004
+ threshold: max(0, min(1, threshold)) || 1
1005
+ };
1006
+ let isFirstUpdate = true;
1007
+ function handleObserve(entries) {
1008
+ const ratio = entries[0].intersectionRatio;
1009
+ if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) return refresh();
1010
+ if (ratio !== threshold) {
1011
+ if (!isFirstUpdate) return refresh();
1012
+ if (!ratio) timeoutId = setTimeout(() => {
1013
+ refresh(false, 1e-7);
1014
+ }, 1e3);
1015
+ else refresh(false, ratio);
1016
+ }
1017
+ isFirstUpdate = false;
1018
+ }
1019
+ try {
1020
+ io = new IntersectionObserver(handleObserve, {
1021
+ ...options,
1022
+ root: root.ownerDocument
1023
+ });
1024
+ } catch (_e) {
1025
+ io = new IntersectionObserver(handleObserve, options);
1026
+ }
1027
+ io.observe(element);
1028
+ }
1029
+ const win = getWindow(element);
1030
+ const handleResize = () => refresh(ancestorResize);
1031
+ win.addEventListener("resize", handleResize);
1032
+ refresh(true);
1033
+ return () => {
1034
+ win.removeEventListener("resize", handleResize);
1035
+ cleanup();
1036
+ };
1037
+ }
1038
+ /**
1039
+ * Automatically updates the position of the floating element when necessary.
1040
+ * Should only be called when the floating element is mounted on the DOM or
1041
+ * visible on the screen.
1042
+ * @returns cleanup function that should be invoked when the floating element is
1043
+ * removed from the DOM or hidden from the screen.
1044
+ * @see https://floating-ui.com/docs/autoUpdate
1045
+ */
1046
+ function autoUpdate(reference, floating, update, options) {
1047
+ if (options === void 0) options = {};
1048
+ const { ancestorScroll = true, ancestorResize = true, elementResize = typeof ResizeObserver === "function", layoutShift = typeof IntersectionObserver === "function", animationFrame = false } = options;
1049
+ const referenceEl = unwrapElement(reference);
1050
+ const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
1051
+ ancestors.forEach((ancestor) => {
1052
+ ancestorScroll && ancestor.addEventListener("scroll", update);
1053
+ ancestorResize && ancestor.addEventListener("resize", update);
1054
+ });
1055
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update, ancestorResize) : null;
1056
+ let reobserveFrame = -1;
1057
+ let resizeObserver = null;
1058
+ if (elementResize) {
1059
+ resizeObserver = new ResizeObserver((_ref) => {
1060
+ let [firstEntry] = _ref;
1061
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
1062
+ resizeObserver.unobserve(floating);
1063
+ cancelAnimationFrame(reobserveFrame);
1064
+ reobserveFrame = requestAnimationFrame(() => {
1065
+ var _resizeObserver;
1066
+ (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
1067
+ });
1068
+ }
1069
+ update();
1070
+ });
1071
+ if (referenceEl && !animationFrame) resizeObserver.observe(referenceEl);
1072
+ if (floating) resizeObserver.observe(floating);
1073
+ }
1074
+ let frameId;
1075
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
1076
+ if (animationFrame) frameLoop();
1077
+ function frameLoop() {
1078
+ const nextRefRect = getBoundingClientRect(reference);
1079
+ if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) update();
1080
+ prevRefRect = nextRefRect;
1081
+ frameId = requestAnimationFrame(frameLoop);
1082
+ }
1083
+ update();
1084
+ return () => {
1085
+ var _resizeObserver2;
1086
+ ancestors.forEach((ancestor) => {
1087
+ ancestorScroll && ancestor.removeEventListener("scroll", update);
1088
+ ancestorResize && ancestor.removeEventListener("resize", update);
1089
+ });
1090
+ cleanupIo?.();
1091
+ (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
1092
+ resizeObserver = null;
1093
+ if (animationFrame) cancelAnimationFrame(frameId);
1094
+ };
1095
+ }
1096
+ /**
1097
+ * Modifies the placement by translating the floating element along the
1098
+ * specified axes.
1099
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
1100
+ * object may be passed.
1101
+ * @see https://floating-ui.com/docs/offset
1102
+ */
1103
+ var offset = offset$1;
1104
+ /**
1105
+ * Optimizes the visibility of the floating element by shifting it in order to
1106
+ * keep it in view when it will overflow the clipping boundary.
1107
+ * @see https://floating-ui.com/docs/shift
1108
+ */
1109
+ var shift = shift$1;
1110
+ /**
1111
+ * Optimizes the visibility of the floating element by flipping the `placement`
1112
+ * in order to keep it in view when the preferred placement(s) will overflow the
1113
+ * clipping boundary. Alternative to `autoPlacement`.
1114
+ * @see https://floating-ui.com/docs/flip
1115
+ */
1116
+ var flip = flip$1;
1117
+ /**
1118
+ * Provides data that allows you to change the size of the floating element —
1119
+ * for instance, prevent it from overflowing the clipping boundary or match the
1120
+ * width of the reference element.
1121
+ * @see https://floating-ui.com/docs/size
1122
+ */
1123
+ var size = size$1;
1124
+ /**
1125
+ * Computes the `x` and `y` coordinates that will place the floating element
1126
+ * next to a given reference element.
1127
+ */
1128
+ var computePosition = (reference, floating, options) => {
1129
+ const cache = /* @__PURE__ */ new Map();
1130
+ const mergedOptions = options != null ? options : {};
1131
+ const platformWithCache = {
1132
+ ...platform,
1133
+ ...mergedOptions.platform,
1134
+ _c: cache
1135
+ };
1136
+ return computePosition$1(reference, floating, {
1137
+ ...mergedOptions,
1138
+ platform: platformWithCache
1139
+ });
1140
+ };
1141
+ //#endregion
1142
+ //#region src/composables/internal/useFloating.ts
1143
+ /**
1144
+ * Единый движок позиционирования floating-панелей (Dropdown/Select/TreeSelect/Tooltip)
1145
+ * поверх `@floating-ui/dom`: flip (переворот при нехватке места), shift (клэмп к границам
1146
+ * viewport), опциональный `size`-мидлвар для растягивания по ширине триггера.
1147
+ *
1148
+ * Пересчёт положения при скролле/ресайзе делает `autoUpdate` из `@floating-ui/dom` —
1149
+ * он сам использует `ResizeObserver`/`IntersectionObserver` и пассивные слушатели вместо
1150
+ * наивного враппера на каждый `scroll`/`resize`, поэтому отдельный rAF-throttling здесь
1151
+ * не нужен (в отличие от прежней ручной реализации в `GrSelect`/`GrDropdown`).
1152
+ *
1153
+ * Требует, чтобы `floatingEl` был примонтирован в DOM на момент открытия (обычно —
1154
+ * `<teleport to="body">` + `v-show`, а не `v-if`): позиционирование не может измерить
1155
+ * элемент, которого нет в дереве.
1156
+ */
1157
+ function useFloating(referenceEl, floatingEl, open, options = {}) {
1158
+ const floatingStyle = ref({
1159
+ position: "fixed",
1160
+ top: "0px",
1161
+ left: "0px"
1162
+ });
1163
+ function resolveRequestedPlacement() {
1164
+ return typeof options.placement === "function" ? options.placement() : options.placement ?? "bottom-start";
1165
+ }
1166
+ function resolveMatchWidth() {
1167
+ return typeof options.matchWidth === "function" ? options.matchWidth() : options.matchWidth ?? false;
1168
+ }
1169
+ const resolvedPlacement = ref(resolveRequestedPlacement());
1170
+ let stopAutoUpdate = null;
1171
+ async function update() {
1172
+ const reference = referenceEl.value;
1173
+ const floating = floatingEl.value;
1174
+ if (!reference || !floating) return;
1175
+ const middleware = [
1176
+ offset(options.offsetPx ?? 8),
1177
+ flip({ padding: options.boundaryPadding ?? 8 }),
1178
+ shift({ padding: options.boundaryPadding ?? 8 })
1179
+ ];
1180
+ const matchWidth = resolveMatchWidth();
1181
+ if (matchWidth) middleware.push(size({ apply({ rects, elements }) {
1182
+ if (matchWidth === "min") {
1183
+ Object.assign(elements.floating.style, {
1184
+ width: "max-content",
1185
+ minWidth: `${rects.reference.width}px`
1186
+ });
1187
+ return;
1188
+ }
1189
+ Object.assign(elements.floating.style, {
1190
+ width: `${rects.reference.width}px`,
1191
+ minWidth: ""
1192
+ });
1193
+ } }));
1194
+ const { x, y, placement } = await computePosition(reference, floating, {
1195
+ placement: resolveRequestedPlacement(),
1196
+ strategy: "fixed",
1197
+ middleware
1198
+ });
1199
+ resolvedPlacement.value = placement;
1200
+ floatingStyle.value = {
1201
+ position: "fixed",
1202
+ left: `${x}px`,
1203
+ top: `${y}px`,
1204
+ zIndex: `var(${options.zIndexVar ?? "--gr-z-dropdown"})`
1205
+ };
1206
+ }
1207
+ function stop() {
1208
+ stopAutoUpdate?.();
1209
+ stopAutoUpdate = null;
1210
+ }
1211
+ function start() {
1212
+ stop();
1213
+ const reference = referenceEl.value;
1214
+ const floating = floatingEl.value;
1215
+ if (!reference || !floating) return;
1216
+ update();
1217
+ stopAutoUpdate = autoUpdate(reference, floating, () => void update());
1218
+ }
1219
+ watch(open, (isOpen) => {
1220
+ if (!isOpen) {
1221
+ stop();
1222
+ return;
1223
+ }
1224
+ nextTick(() => start());
1225
+ }, { immediate: true });
1226
+ onBeforeUnmount(stop);
1227
+ return {
1228
+ floatingStyle,
1229
+ resolvedPlacement,
1230
+ update: () => void update()
1231
+ };
1232
+ }
1233
+ //#endregion
1234
+ export { useFloating as t };