@pubinfo/module-rbac 2.0.8 → 2.0.10

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 (339) hide show
  1. package/dist/ComponentSelect-ZLey_5w7.js +4 -0
  2. package/dist/ComponentSelect.vue_vue_type_style_index_0_lang-CMEO08Uz.js +3981 -0
  3. package/dist/DynamicRoutesForm-DzOGoyf3.js +4 -0
  4. package/dist/DynamicRoutesForm.vue_vue_type_script_setup_true_lang-lpCaLpPL.js +179 -0
  5. package/dist/HCheckList-Dkxhu1br.js +4 -0
  6. package/dist/HCheckList.vue_vue_type_script_setup_true_lang-n_QczT28.js +41 -0
  7. package/dist/HoverCard-DASfDgI1.js +4 -0
  8. package/dist/HoverCard.vue_vue_type_script_setup_true_lang-BqEarhzP.js +62 -0
  9. package/dist/IconSelect-CkqLR5Dg.js +4 -0
  10. package/dist/IconSelect.css +1 -1
  11. package/dist/IconSelect.vue_vue_type_script_setup_true_lang-BoGxAoNd.js +703 -0
  12. package/dist/ImportExport-BD8o7IvB.js +4 -0
  13. package/dist/ImportExport.vue_vue_type_script_setup_true_lang-BzdP0ADd.js +456 -0
  14. package/dist/MetaForm-DtlyvzoM.js +364 -0
  15. package/dist/OrgAndPosition-DjF_gcp6.js +4 -0
  16. package/dist/OrgAndPosition.vue_vue_type_script_setup_true_lang-CFSDHn40.js +195 -0
  17. package/dist/ResourceEdit-WpEdbzaw.js +4 -0
  18. package/dist/ResourceEdit.vue_vue_type_script_setup_true_lang-id6jZAko.js +392 -0
  19. package/dist/ResourceRelation-26FnHEfU.js +112 -0
  20. package/dist/ResourceRelation-DGiGYy6V.js +91 -0
  21. package/dist/ResourceRelation.css +1 -1
  22. package/dist/ResourceRelation2.css +1 -1
  23. package/dist/RoleRelation-BuqK0cnl.js +4 -0
  24. package/dist/RoleRelation.vue_vue_type_script_setup_true_lang-BjEOlM2g.js +93 -0
  25. package/dist/RoleSelector.vue_vue_type_script_setup_true_lang-ZwsINUBu.js +352 -0
  26. package/dist/TenantEdit-B24X5nND.js +4 -0
  27. package/dist/TenantEdit.vue_vue_type_script_setup_true_lang-Bu5HcJJv.js +307 -0
  28. package/dist/UserAuthorization-Co6JV0py.js +274 -0
  29. package/dist/UserEdit-DkNVPVA4.js +4 -0
  30. package/dist/UserEdit.vue_vue_type_script_setup_true_lang-CFs0SxVJ.js +330 -0
  31. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  32. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  33. package/dist/add-child-B9gDBQjZ.js +4 -0
  34. package/dist/animation_item-BZ1HNA6o.js +4 -0
  35. package/dist/animation_item.vue_vue_type_script_setup_true_lang-CmwThjHB.js +4858 -0
  36. package/dist/authority-B-0S66Fv.js +4 -0
  37. package/dist/authorize-DnyYvAo3.js +4 -0
  38. package/dist/blacklist-disable-DzVU8JLV.js +4 -0
  39. package/dist/blacklist-enable-BmWQR1i4.js +4 -0
  40. package/dist/browser-chrome-O9MASusF.js +4 -0
  41. package/dist/browser-edge-Dk6N_uRy.js +4 -0
  42. package/dist/browser-ie-Dtz7hQTC.js +4 -0
  43. package/dist/browser-other-Crzi8vov.js +4 -0
  44. package/dist/browser-safari-DF0pVlrn.js +4 -0
  45. package/dist/browserType-DQySszjD.js +4 -0
  46. package/dist/browserType.vue_vue_type_script_setup_true_lang-od1-AmrS.js +32 -0
  47. package/dist/cloneDeep-BOLZdR62.js +8 -0
  48. package/dist/createAndEditDataPermission-BhOLGGna.js +4 -0
  49. package/dist/createAndEditDataPermission.css +1 -1
  50. package/dist/createAndEditDataPermission.vue_vue_type_script_setup_true_lang-D5wInKwO.js +531 -0
  51. package/dist/dayjs.min-B2Yn1Frg.js +284 -0
  52. package/dist/drawerBlackWhiteList-Cr16yNs8.js +4 -0
  53. package/dist/drawerBlackWhiteList.vue_vue_type_script_setup_true_lang-BR6Yeiie.js +172 -0
  54. package/dist/drawerDictionary-BRGmcIFT.js +4 -0
  55. package/dist/drawerDictionary.vue_vue_type_script_setup_true_lang-0zsptmrP.js +146 -0
  56. package/dist/drawerDictionaryItem-CFBfyhEw.js +4 -0
  57. package/dist/drawerDictionaryItem.vue_vue_type_script_setup_true_lang-DeJblyyZ.js +158 -0
  58. package/dist/drawerGroup-Bs1Z8XPo.js +4 -0
  59. package/dist/drawerGroup.vue_vue_type_script_setup_true_lang-ClG-M0Ru.js +202 -0
  60. package/dist/drawerOrganization-Bs0YtPuo.js +4 -0
  61. package/dist/drawerOrganization.vue_vue_type_script_setup_true_lang-5YJaULAh.js +250 -0
  62. package/dist/drawerPosition-BYypSGoF.js +4 -0
  63. package/dist/drawerPosition.vue_vue_type_script_setup_true_lang-DcZ48XJV.js +181 -0
  64. package/dist/drawerRegion-BiIlYQ0Z.js +4 -0
  65. package/dist/drawerRegion.vue_vue_type_script_setup_true_lang-BwAj_RKw.js +233 -0
  66. package/dist/drawerRole-DHLv47_z.js +4 -0
  67. package/dist/drawerRole-DUWRM43j.js +4 -0
  68. package/dist/drawerRole-nmMTIQYS.js +4 -0
  69. package/dist/drawerRole.vue_vue_type_script_setup_true_lang-BET5ukoo.js +244 -0
  70. package/dist/drawerRole.vue_vue_type_script_setup_true_lang-BK3zjhop.js +197 -0
  71. package/dist/drawerRole.vue_vue_type_script_setup_true_lang-Surpf3ov.js +191 -0
  72. package/dist/edit-B69fMWPH.js +4 -0
  73. package/dist/enum-C9ihxJe7.js +4 -0
  74. package/dist/enum-CTUzwCYG.js +4 -0
  75. package/dist/enum-CjyX3J0o.js +18 -0
  76. package/dist/enum-DDKThkSw.js +24 -0
  77. package/dist/enum-DkSNwGbC.js +74 -0
  78. package/dist/gangweijiekou-Cs016LjQ.js +46 -0
  79. package/dist/icard-C4FaIC0V.js +4 -0
  80. package/dist/icon_animation-CfRxn8ne.js +4 -0
  81. package/dist/icon_breadcrumb-CAPCH16K.js +4 -0
  82. package/dist/icon_copyright-T9HuRtib.js +4 -0
  83. package/dist/icon_jt-BZgxEG_D.js +4 -0
  84. package/dist/icon_layout-BynQzkfn.js +4 -0
  85. package/dist/icon_mainpage-Bu_lyj_6.js +4 -0
  86. package/dist/icon_menu-D41hl_4p.js +4 -0
  87. package/dist/icon_page_size-Bioi61il.js +4 -0
  88. package/dist/icon_position_type-QpezzPDJ.js +4 -0
  89. package/dist/icon_safe_manage-ByWMOnwf.js +4 -0
  90. package/dist/icon_screen_scale-CuPyb7Ni.js +4 -0
  91. package/dist/icon_system_manage-BxRLv7Nw.js +4 -0
  92. package/dist/icon_tabbar-CetwmJHN.js +4 -0
  93. package/dist/icon_toolbar-DXt_LXp8.js +4 -0
  94. package/dist/icon_topbar-C186yIiC.js +4 -0
  95. package/dist/icon_watermark-DhaloO3m.js +4 -0
  96. package/dist/index-53oBz1jp.js +299 -0
  97. package/dist/index-B2tTTlBE.js +17698 -0
  98. package/dist/{toolbar_setting-rv8EGChc.js → index-BFx8F5lO.js} +144 -144
  99. package/dist/index-BIpmC999.js +169 -0
  100. package/dist/index-BUmMaC21.js +227 -0
  101. package/dist/index-BwWrE3dY.js +89 -0
  102. package/dist/index-C9hHp4Iw.js +197 -0
  103. package/dist/{watermark_setting-B_jC4rjv.js → index-CCw3ZJgQ.js} +254 -199
  104. package/dist/index-CJQB8KAz.js +186 -0
  105. package/dist/index-CLnFLvHy.js +193 -0
  106. package/dist/index-COWUocfL.js +119 -0
  107. package/dist/index-Cqkr8Rvk.js +189 -0
  108. package/dist/index-Csfu3kAr.js +171 -0
  109. package/dist/index-DECno0gv.js +196 -0
  110. package/dist/index-DVt5k9xh.js +145 -0
  111. package/dist/index-DdoOaWs-.js +269 -0
  112. package/dist/index-DfuGXjYh.js +169 -0
  113. package/dist/index-DoFuRlsc.js +181 -0
  114. package/dist/index-DwpOyfRe.js +152 -0
  115. package/dist/index-ZQuRR9fG.js +257 -0
  116. package/dist/index-ioZh8Qom.js +98 -0
  117. package/dist/index-rNYtJ7Om.js +195 -0
  118. package/dist/index-x9Iim2eD.js +247 -0
  119. package/dist/index-y9CQTo95.js +351 -0
  120. package/dist/index.css +1 -1
  121. package/dist/index.d.ts +1 -0
  122. package/dist/index.js +7154 -7048
  123. package/dist/index10.css +1 -0
  124. package/dist/index11.css +1 -0
  125. package/dist/index14.css +1 -0
  126. package/dist/index17.css +1 -0
  127. package/dist/index18.css +1 -0
  128. package/dist/index4.css +1 -0
  129. package/dist/index5.css +1 -0
  130. package/dist/index6.css +1 -0
  131. package/dist/index8.css +1 -0
  132. package/dist/index9.css +1 -0
  133. package/dist/itemlist-zTYJtoSs.js +172 -0
  134. package/dist/jiaosejiekou-p42Hm9h3.js +58 -0
  135. package/dist/log-center-Bw9UlmOq.js +4 -0
  136. package/dist/loginHistoryDetail-B6eI-TmJ.js +105 -0
  137. package/dist/login_history-B4Q1NCJn.js +222 -0
  138. package/dist/login_history.css +1 -1
  139. package/dist/not-data-BDuvYboz.js +4 -0
  140. package/dist/operateHistoryDetail-CLZ9lyua.js +123 -0
  141. package/dist/operate_history-KASZ7_JO.js +218 -0
  142. package/dist/operate_history.css +1 -1
  143. package/dist/org-main-DfWpX8Wv.js +4 -0
  144. package/dist/org-unmain-DrX63NH5.js +4 -0
  145. package/dist/remove-D2ES5tEr.js +4 -0
  146. package/dist/resource-app-1lqF6C6F.js +4 -0
  147. package/dist/resource-btn-Cfo6ddAY.js +4 -0
  148. package/dist/resource-dynamic-BAwkCWS4.js +4 -0
  149. package/dist/resource-index-BS4V5uy8.js +4 -0
  150. package/dist/resource-menu-CEWU8Iis.js +4 -0
  151. package/dist/resource-micro-9S0h5AlK.js +4 -0
  152. package/dist/resource-nonmenu-BZ9e4ynT.js +4 -0
  153. package/dist/setItem-BwMHXOUm.js +87 -0
  154. package/dist/setItem.css +1 -1
  155. package/dist/setting-manage-Xj_s0OoK.js +4 -0
  156. package/dist/shujuquanxianzhubiaokongzhiqi-SpN37fyO.js +65 -0
  157. package/dist/theme-check-mark-D58efagJ.js +4 -0
  158. package/dist/theme-title-CYUX2SBW.js +4 -0
  159. package/dist/useAppAndResource-38HCqYKa.js +55 -0
  160. package/dist/utils/dict.d.ts +6 -0
  161. package/dist/view-BCWU0JWM.js +4 -0
  162. package/dist/views/tenant/components/TenantEdit.vue.d.ts +1 -37
  163. package/dist/views/tenant/index.vue.d.ts +1 -37
  164. package/dist/xitongpeizhifuwu-BoCbGEk7.js +23 -0
  165. package/dist/zddata-DQP5Kx3c.js +4 -0
  166. package/dist/ziyuanjiekou-BC65-bFK.js +69 -0
  167. package/dist/zuzhijiaosebiaokongzhiqi-Cj4ZjkfZ.js +28 -0
  168. package/dist/zy_checked-Bb6zRsYe.js +4 -0
  169. package/dist/zy_default-BGjhoury.js +4 -0
  170. package/package.json +4 -4
  171. package/src/index.ts +1 -0
  172. package/src/utils/dict.ts +21 -0
  173. package/dist/ComponentSelect-HWE3OTC2.js +0 -2
  174. package/dist/ComponentSelect-lvLZA7v3.js +0 -3686
  175. package/dist/DynamicRoutesForm--yCRC-TS.js +0 -4
  176. package/dist/DynamicRoutesForm-CjrPnJvX.js +0 -169
  177. package/dist/HCheckList-CmS0Zgjk.js +0 -37
  178. package/dist/HCheckList-Cze_TkQp.js +0 -2
  179. package/dist/HoverCard-B79q5sly.js +0 -43
  180. package/dist/HoverCard-U5WTpvFy.js +0 -2
  181. package/dist/IconSelect-B0CeuV_a.js +0 -4
  182. package/dist/IconSelect-BRVj6gBy.js +0 -681
  183. package/dist/ImportExport-BNLVq0fU.js +0 -4
  184. package/dist/ImportExport-HsLm0AJH.js +0 -354
  185. package/dist/MetaForm-BSGuZXgj.js +0 -5
  186. package/dist/MetaForm-DErrpELP.js +0 -300
  187. package/dist/OrgAndPosition-CF7ZJtNB.js +0 -2
  188. package/dist/OrgAndPosition-vnBrq-fn.js +0 -188
  189. package/dist/ResourceEdit-DGiYedP0.js +0 -349
  190. package/dist/ResourceEdit-DZP72kyb.js +0 -11
  191. package/dist/ResourceRelation-BxGFnyVc.js +0 -78
  192. package/dist/ResourceRelation-DCjMjLpg.js +0 -3
  193. package/dist/ResourceRelation-DhML3AFe.js +0 -93
  194. package/dist/ResourceSelector-BAZ-oIRV.js +0 -247
  195. package/dist/ResourceSelector.css +0 -1
  196. package/dist/RoleRelation-Bxyd5aMn.js +0 -2
  197. package/dist/RoleRelation-CcgE6TEG.js +0 -79
  198. package/dist/RoleSelector-QpcO4KoV.js +0 -279
  199. package/dist/TenantEdit-CRhsWhhw.js +0 -253
  200. package/dist/TenantEdit-egH6GbbS.js +0 -6
  201. package/dist/UserAuthorization-B0lHeayD.js +0 -4
  202. package/dist/UserAuthorization-D-LcHhsj.js +0 -238
  203. package/dist/UserEdit-6MPOr7VK.js +0 -336
  204. package/dist/UserEdit-DGefh7mk.js +0 -4
  205. package/dist/_plugin-vue_export-helper-DziIhCOI.js +0 -6
  206. package/dist/add-child-BqjLtFNF.js +0 -2
  207. package/dist/animation_item-C3pkH-cB.js +0 -2
  208. package/dist/animation_item-Cg-CB3zX.js +0 -4536
  209. package/dist/authority-BCFCPQkb.js +0 -2
  210. package/dist/authorize-BykMzt1r.js +0 -2
  211. package/dist/blackWhiteList-CFnWvnIK.js +0 -213
  212. package/dist/blackWhiteList.css +0 -1
  213. package/dist/blacklist-disable-COoLZMSA.js +0 -2
  214. package/dist/blacklist-enable-LZep1trj.js +0 -2
  215. package/dist/breadcrumb_setting-BbdvbC4M.js +0 -111
  216. package/dist/browser-chrome-D0rex7Ir.js +0 -2
  217. package/dist/browser-edge-KCb_AIL5.js +0 -2
  218. package/dist/browser-ie-C1znjJM-.js +0 -2
  219. package/dist/browser-other-C4er8PkV.js +0 -2
  220. package/dist/browser-safari-BPRC1TV-.js +0 -2
  221. package/dist/browserType-BGl2j5RW.js +0 -2
  222. package/dist/browserType-E4RCiZfN.js +0 -26
  223. package/dist/chunk-B3eAFu3c.js +0 -11
  224. package/dist/cloneDeep-BnvyNhik.js +0 -7
  225. package/dist/components/OrgTree/index.vue.d.ts +0 -5
  226. package/dist/configData-DQOHeFW2.js +0 -86
  227. package/dist/createAndEditDataPermission-39GKHtzB.js +0 -443
  228. package/dist/createAndEditDataPermission-BBSBwjG4.js +0 -8
  229. package/dist/data-permission-35wTSMh2.js +0 -156
  230. package/dist/dayjs.min-CdDcH50N.js +0 -297
  231. package/dist/dictionary-BOuYUlfU.js +0 -180
  232. package/dist/drawerBlackWhiteList-BZccd_CZ.js +0 -125
  233. package/dist/drawerBlackWhiteList-Bz2trn-w.js +0 -3
  234. package/dist/drawerDictionary-C2tWu1lt.js +0 -130
  235. package/dist/drawerDictionary-Cx-QoHn4.js +0 -4
  236. package/dist/drawerDictionaryItem-C4mPbQEA.js +0 -142
  237. package/dist/drawerDictionaryItem-DhwinX1a.js +0 -4
  238. package/dist/drawerGroup-BUx0cx6i.js +0 -3
  239. package/dist/drawerGroup-DFeiJOBA.js +0 -188
  240. package/dist/drawerOrganization-BEdhq7Z2.js +0 -251
  241. package/dist/drawerOrganization-ijhmuc8a.js +0 -3
  242. package/dist/drawerPosition-shL7hfwJ.js +0 -3
  243. package/dist/drawerPosition-xI2PyE2x.js +0 -170
  244. package/dist/drawerRegion-BwWGUHaY.js +0 -187
  245. package/dist/drawerRegion-Dl1qXPXz.js +0 -3
  246. package/dist/drawerRole-C1I6-hhT.js +0 -159
  247. package/dist/drawerRole-CZpTYFS3.js +0 -172
  248. package/dist/drawerRole-CgTIHRCA.js +0 -3
  249. package/dist/drawerRole-Cmrob1UJ.js +0 -5
  250. package/dist/drawerRole-D2UxgYXQ.js +0 -215
  251. package/dist/drawerRole-DynkfVMp.js +0 -6
  252. package/dist/edit-C9HH0bNg.js +0 -2
  253. package/dist/enum-B1DCzyaW.js +0 -4
  254. package/dist/enum-BMY6bmPA.js +0 -54
  255. package/dist/enum-BWzxzuim.js +0 -23
  256. package/dist/enum-CYW8g64p.js +0 -61
  257. package/dist/enum-VH4_jOj5.js +0 -4
  258. package/dist/group-DOmpCW1J.js +0 -174
  259. package/dist/group.css +0 -1
  260. package/dist/icard-FW0Ro50-.js +0 -2
  261. package/dist/icon_animation-DuNUKCIP.js +0 -2
  262. package/dist/icon_breadcrumb-DrPNYW5B.js +0 -2
  263. package/dist/icon_copyright-Di3Yr0PZ.js +0 -2
  264. package/dist/icon_jt-C4rQLl9Y.js +0 -2
  265. package/dist/icon_layout-5L9E7uN2.js +0 -2
  266. package/dist/icon_mainpage-DMKqRgmE.js +0 -2
  267. package/dist/icon_menu-Cp7-Zght.js +0 -2
  268. package/dist/icon_page_size-Dc0zqT2W.js +0 -2
  269. package/dist/icon_position_type-DH2qxQQE.js +0 -2
  270. package/dist/icon_safe_manage-DXYWl1y-.js +0 -2
  271. package/dist/icon_screen_scale-DwC6qqx2.js +0 -2
  272. package/dist/icon_system_manage-BYTldLly.js +0 -2
  273. package/dist/icon_tabbar-CxffARwI.js +0 -2
  274. package/dist/icon_toolbar-CsxnTrNJ.js +0 -2
  275. package/dist/icon_topbar-DS-oEZFA.js +0 -2
  276. package/dist/icon_watermark-DDXsHlfQ.js +0 -2
  277. package/dist/itemlist-QBWRLjTd.js +0 -157
  278. package/dist/layout_setting-BZt_X9vU.js +0 -74
  279. package/dist/layout_setting.css +0 -1
  280. package/dist/log-center-BFjZ4IE1.js +0 -2
  281. package/dist/log-hgUXTuhy.js +0 -14
  282. package/dist/loginHistoryDetail-BAYuSqvw.js +0 -78
  283. package/dist/loginHistoryDetail-DiuNa6Sv.js +0 -4
  284. package/dist/login_history-NTSjr6e5.js +0 -196
  285. package/dist/menu_setting-CkoDAYJD.js +0 -158
  286. package/dist/not-data-Bw8FlpyB.js +0 -2
  287. package/dist/not-data-OpiacaSk.js +0 -2
  288. package/dist/operateHistoryDetail-DiuqMTkN.js +0 -90
  289. package/dist/operateHistoryDetail-r30ZBNqw.js +0 -4
  290. package/dist/operate_history-CXoZlYaT.js +0 -191
  291. package/dist/org-main-D5Isevbc.js +0 -2
  292. package/dist/org-unmain-BHBqSuCz.js +0 -2
  293. package/dist/organization-DmGbwqHI.js +0 -15605
  294. package/dist/organization.css +0 -1
  295. package/dist/other_setting-BqWwlJ2u.js +0 -220
  296. package/dist/other_setting.css +0 -1
  297. package/dist/page_animation_setting-g3bkn7vf.js +0 -117
  298. package/dist/page_animation_setting.css +0 -1
  299. package/dist/page_w_setting-Db9pP86g.js +0 -69
  300. package/dist/page_w_setting.css +0 -1
  301. package/dist/position-Bq4B3_PK.js +0 -168
  302. package/dist/region-DfxAE8eK.js +0 -185
  303. package/dist/remove-DKMMsJNq.js +0 -2
  304. package/dist/resource-app-DZwdNG6F.js +0 -2
  305. package/dist/resource-btn-DPX0oM2L.js +0 -2
  306. package/dist/resource-dynamic-Cb_vjMjt.js +0 -2
  307. package/dist/resource-index-ah4NpEob.js +0 -2
  308. package/dist/resource-menu-CzWI03EU.js +0 -2
  309. package/dist/resource-micro-Ca0NS7j_.js +0 -2
  310. package/dist/resource-nonmenu-Deitjo_5.js +0 -2
  311. package/dist/resource-rP8m6eP_.js +0 -273
  312. package/dist/role-DfWw95NS.js +0 -196
  313. package/dist/role_group-B4J4RWQt.js +0 -172
  314. package/dist/routeSystem-Dg0b6mAl.js +0 -2
  315. package/dist/safe_setting-uj9p_wW0.js +0 -232
  316. package/dist/setItem-C_jx_5fd.js +0 -5
  317. package/dist/setItem-DnJuD3C0.js +0 -77
  318. package/dist/setting-manage-B3vaM0w1.js +0 -2
  319. package/dist/stores-D6JJmBEU.js +0 -2
  320. package/dist/tabbar_setting-DBPggZ6Q.js +0 -142
  321. package/dist/tenant-Dbydqvrz.js +0 -183
  322. package/dist/theme-check-mark-BK7E8lqd.js +0 -2
  323. package/dist/theme-title-aqbHq846.js +0 -2
  324. package/dist/theme_setting-3l5L7tXt.js +0 -117
  325. package/dist/theme_setting.css +0 -1
  326. package/dist/useAppAndResource-CeMCjg2v.js +0 -57
  327. package/dist/user-DQE6N5EP.js +0 -345
  328. package/dist/view-C6Eo1zRL.js +0 -2
  329. package/dist/watermark_setting.css +0 -1
  330. package/dist/zddata-fjEtQ3lZ.js +0 -2
  331. package/dist/zy_checked-DTsDCC94.js +0 -2
  332. package/dist/zy_default-BaIuMKw-.js +0 -2
  333. /package/dist/{safe_setting.css → index12.css} +0 -0
  334. /package/dist/{tabbar_setting.css → index13.css} +0 -0
  335. /package/dist/{toolbar_setting.css → index15.css} +0 -0
  336. /package/dist/{user.css → index16.css} +0 -0
  337. /package/dist/{breadcrumb_setting.css → index2.css} +0 -0
  338. /package/dist/{data-permission.css → index3.css} +0 -0
  339. /package/dist/{menu_setting.css → index7.css} +0 -0
@@ -0,0 +1,3981 @@
1
+ import { Input as Vn, FormItemRest as jn, DirectoryTree as Wn, Empty as $n } from "ant-design-vue/es";
2
+ import { unref as M, onMounted as Hn, onBeforeUnmount as Gn, shallowRef as zn, onUnmounted as Kn, watchEffect as Un, watch as Lt, defineComponent as pt, createElementBlock as D, openBlock as F, createElementVNode as T, useModel as Le, useTemplateRef as Yn, useId as qn, computed as oe, ref as se, createBlock as J, normalizeProps as Xn, guardReactiveProps as Zn, createVNode as Pt, Teleport as Qn, createCommentVNode as Jn, mergeProps as Me, withCtx as ie, isRef as Re, normalizeClass as to } from "vue";
3
+ import { CaretDownOutlined as eo } from "@ant-design/icons-vue";
4
+ import { Empty as no } from "ant-design-vue";
5
+ import { useViewStore as oo } from "./index.js";
6
+ import './ComponentSelect.css';const so = ["top", "right", "bottom", "left"], ft = Math.min, _ = Math.max, Kt = Math.round, Wt = Math.floor, Y = (t) => ({
7
+ x: t,
8
+ y: t
9
+ }), io = {
10
+ left: "right",
11
+ right: "left",
12
+ bottom: "top",
13
+ top: "bottom"
14
+ }, ro = {
15
+ start: "end",
16
+ end: "start"
17
+ };
18
+ function he(t, e, n) {
19
+ return _(t, ft(e, n));
20
+ }
21
+ function st(t, e) {
22
+ return typeof t == "function" ? t(e) : t;
23
+ }
24
+ function it(t) {
25
+ return t.split("-")[0];
26
+ }
27
+ function kt(t) {
28
+ return t.split("-")[1];
29
+ }
30
+ function Ee(t) {
31
+ return t === "x" ? "y" : "x";
32
+ }
33
+ function Oe(t) {
34
+ return t === "y" ? "height" : "width";
35
+ }
36
+ const ao = /* @__PURE__ */ new Set(["top", "bottom"]);
37
+ function U(t) {
38
+ return ao.has(it(t)) ? "y" : "x";
39
+ }
40
+ function Ae(t) {
41
+ return Ee(U(t));
42
+ }
43
+ function co(t, e, n) {
44
+ n === void 0 && (n = !1);
45
+ const o = kt(t), s = Ae(t), i = Oe(s);
46
+ let r = s === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
47
+ return e.reference[i] > e.floating[i] && (r = Ut(r)), [r, Ut(r)];
48
+ }
49
+ function lo(t) {
50
+ const e = Ut(t);
51
+ return [pe(t), e, pe(e)];
52
+ }
53
+ function pe(t) {
54
+ return t.replace(/start|end/g, (e) => ro[e]);
55
+ }
56
+ const _e = ["left", "right"], Be = ["right", "left"], uo = ["top", "bottom"], fo = ["bottom", "top"];
57
+ function ho(t, e, n) {
58
+ switch (t) {
59
+ case "top":
60
+ case "bottom":
61
+ return n ? e ? Be : _e : e ? _e : Be;
62
+ case "left":
63
+ case "right":
64
+ return e ? uo : fo;
65
+ default:
66
+ return [];
67
+ }
68
+ }
69
+ function po(t, e, n, o) {
70
+ const s = kt(t);
71
+ let i = ho(it(t), n === "start", o);
72
+ return s && (i = i.map((r) => r + "-" + s), e && (i = i.concat(i.map(pe)))), i;
73
+ }
74
+ function Ut(t) {
75
+ return t.replace(/left|right|bottom|top/g, (e) => io[e]);
76
+ }
77
+ function go(t) {
78
+ return {
79
+ top: 0,
80
+ right: 0,
81
+ bottom: 0,
82
+ left: 0,
83
+ ...t
84
+ };
85
+ }
86
+ function hn(t) {
87
+ return typeof t != "number" ? go(t) : {
88
+ top: t,
89
+ right: t,
90
+ bottom: t,
91
+ left: t
92
+ };
93
+ }
94
+ function Yt(t) {
95
+ const {
96
+ x: e,
97
+ y: n,
98
+ width: o,
99
+ height: s
100
+ } = t;
101
+ return {
102
+ width: o,
103
+ height: s,
104
+ top: n,
105
+ left: e,
106
+ right: e + o,
107
+ bottom: n + s,
108
+ x: e,
109
+ y: n
110
+ };
111
+ }
112
+ function Ve(t, e, n) {
113
+ let {
114
+ reference: o,
115
+ floating: s
116
+ } = t;
117
+ const i = U(e), r = Ae(e), a = Oe(r), c = it(e), l = i === "y", f = o.x + o.width / 2 - s.width / 2, h = o.y + o.height / 2 - s.height / 2, u = o[a] / 2 - s[a] / 2;
118
+ let d;
119
+ switch (c) {
120
+ case "top":
121
+ d = {
122
+ x: f,
123
+ y: o.y - s.height
124
+ };
125
+ break;
126
+ case "bottom":
127
+ d = {
128
+ x: f,
129
+ y: o.y + o.height
130
+ };
131
+ break;
132
+ case "right":
133
+ d = {
134
+ x: o.x + o.width,
135
+ y: h
136
+ };
137
+ break;
138
+ case "left":
139
+ d = {
140
+ x: o.x - s.width,
141
+ y: h
142
+ };
143
+ break;
144
+ default:
145
+ d = {
146
+ x: o.x,
147
+ y: o.y
148
+ };
149
+ }
150
+ switch (kt(e)) {
151
+ case "start":
152
+ d[r] -= u * (n && l ? -1 : 1);
153
+ break;
154
+ case "end":
155
+ d[r] += u * (n && l ? -1 : 1);
156
+ break;
157
+ }
158
+ return d;
159
+ }
160
+ const mo = async (t, e, n) => {
161
+ const {
162
+ placement: o = "bottom",
163
+ strategy: s = "absolute",
164
+ middleware: i = [],
165
+ platform: r
166
+ } = n, a = i.filter(Boolean), c = await (r.isRTL == null ? void 0 : r.isRTL(e));
167
+ let l = await r.getElementRects({
168
+ reference: t,
169
+ floating: e,
170
+ strategy: s
171
+ }), {
172
+ x: f,
173
+ y: h
174
+ } = Ve(l, o, c), u = o, d = {}, p = 0;
175
+ for (let m = 0; m < a.length; m++) {
176
+ const {
177
+ name: w,
178
+ fn: g
179
+ } = a[m], {
180
+ x,
181
+ y: O,
182
+ data: P,
183
+ reset: y
184
+ } = await g({
185
+ x: f,
186
+ y: h,
187
+ initialPlacement: o,
188
+ placement: u,
189
+ strategy: s,
190
+ middlewareData: d,
191
+ rects: l,
192
+ platform: r,
193
+ elements: {
194
+ reference: t,
195
+ floating: e
196
+ }
197
+ });
198
+ f = x ?? f, h = O ?? h, d = {
199
+ ...d,
200
+ [w]: {
201
+ ...d[w],
202
+ ...P
203
+ }
204
+ }, y && p <= 50 && (p++, typeof y == "object" && (y.placement && (u = y.placement), y.rects && (l = y.rects === !0 ? await r.getElementRects({
205
+ reference: t,
206
+ floating: e,
207
+ strategy: s
208
+ }) : y.rects), {
209
+ x: f,
210
+ y: h
211
+ } = Ve(l, u, c)), m = -1);
212
+ }
213
+ return {
214
+ x: f,
215
+ y: h,
216
+ placement: u,
217
+ strategy: s,
218
+ middlewareData: d
219
+ };
220
+ };
221
+ async function Rt(t, e) {
222
+ var n;
223
+ e === void 0 && (e = {});
224
+ const {
225
+ x: o,
226
+ y: s,
227
+ platform: i,
228
+ rects: r,
229
+ elements: a,
230
+ strategy: c
231
+ } = t, {
232
+ boundary: l = "clippingAncestors",
233
+ rootBoundary: f = "viewport",
234
+ elementContext: h = "floating",
235
+ altBoundary: u = !1,
236
+ padding: d = 0
237
+ } = st(e, t), p = hn(d), w = a[u ? h === "floating" ? "reference" : "floating" : h], g = Yt(await i.getClippingRect({
238
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(w))) == null || n ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(a.floating)),
239
+ boundary: l,
240
+ rootBoundary: f,
241
+ strategy: c
242
+ })), x = h === "floating" ? {
243
+ x: o,
244
+ y: s,
245
+ width: r.floating.width,
246
+ height: r.floating.height
247
+ } : r.reference, O = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), P = await (i.isElement == null ? void 0 : i.isElement(O)) ? await (i.getScale == null ? void 0 : i.getScale(O)) || {
248
+ x: 1,
249
+ y: 1
250
+ } : {
251
+ x: 1,
252
+ y: 1
253
+ }, y = Yt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
254
+ elements: a,
255
+ rect: x,
256
+ offsetParent: O,
257
+ strategy: c
258
+ }) : x);
259
+ return {
260
+ top: (g.top - y.top + p.top) / P.y,
261
+ bottom: (y.bottom - g.bottom + p.bottom) / P.y,
262
+ left: (g.left - y.left + p.left) / P.x,
263
+ right: (y.right - g.right + p.right) / P.x
264
+ };
265
+ }
266
+ const yo = (t) => ({
267
+ name: "arrow",
268
+ options: t,
269
+ async fn(e) {
270
+ const {
271
+ x: n,
272
+ y: o,
273
+ placement: s,
274
+ rects: i,
275
+ platform: r,
276
+ elements: a,
277
+ middlewareData: c
278
+ } = e, {
279
+ element: l,
280
+ padding: f = 0
281
+ } = st(t, e) || {};
282
+ if (l == null)
283
+ return {};
284
+ const h = hn(f), u = {
285
+ x: n,
286
+ y: o
287
+ }, d = Ae(s), p = Oe(d), m = await r.getDimensions(l), w = d === "y", g = w ? "top" : "left", x = w ? "bottom" : "right", O = w ? "clientHeight" : "clientWidth", P = i.reference[p] + i.reference[d] - u[d] - i.floating[p], y = u[d] - i.reference[d], k = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l));
288
+ let b = k ? k[O] : 0;
289
+ (!b || !await (r.isElement == null ? void 0 : r.isElement(k))) && (b = a.floating[O] || i.floating[p]);
290
+ const v = P / 2 - y / 2, E = b / 2 - m[p] / 2 - 1, S = ft(h[g], E), C = ft(h[x], E), N = S, R = b - m[p] - C, I = b / 2 - m[p] / 2 + v, mt = he(N, I, R), Q = !c.arrow && kt(s) != null && I !== mt && i.reference[p] / 2 - (I < N ? S : C) - m[p] / 2 < 0, V = Q ? I < N ? I - N : I - R : 0;
291
+ return {
292
+ [d]: u[d] + V,
293
+ data: {
294
+ [d]: mt,
295
+ centerOffset: I - mt - V,
296
+ ...Q && {
297
+ alignmentOffset: V
298
+ }
299
+ },
300
+ reset: Q
301
+ };
302
+ }
303
+ }), bo = function(t) {
304
+ return t === void 0 && (t = {}), {
305
+ name: "flip",
306
+ options: t,
307
+ async fn(e) {
308
+ var n, o;
309
+ const {
310
+ placement: s,
311
+ middlewareData: i,
312
+ rects: r,
313
+ initialPlacement: a,
314
+ platform: c,
315
+ elements: l
316
+ } = e, {
317
+ mainAxis: f = !0,
318
+ crossAxis: h = !0,
319
+ fallbackPlacements: u,
320
+ fallbackStrategy: d = "bestFit",
321
+ fallbackAxisSideDirection: p = "none",
322
+ flipAlignment: m = !0,
323
+ ...w
324
+ } = st(t, e);
325
+ if ((n = i.arrow) != null && n.alignmentOffset)
326
+ return {};
327
+ const g = it(s), x = U(a), O = it(a) === a, P = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), y = u || (O || !m ? [Ut(a)] : lo(a)), k = p !== "none";
328
+ !u && k && y.push(...po(a, m, p, P));
329
+ const b = [a, ...y], v = await Rt(e, w), E = [];
330
+ let S = ((o = i.flip) == null ? void 0 : o.overflows) || [];
331
+ if (f && E.push(v[g]), h) {
332
+ const I = co(s, r, P);
333
+ E.push(v[I[0]], v[I[1]]);
334
+ }
335
+ if (S = [...S, {
336
+ placement: s,
337
+ overflows: E
338
+ }], !E.every((I) => I <= 0)) {
339
+ var C, N;
340
+ const I = (((C = i.flip) == null ? void 0 : C.index) || 0) + 1, mt = b[I];
341
+ if (mt && (!(h === "alignment" ? x !== U(mt) : !1) || // We leave the current main axis only if every placement on that axis
342
+ // overflows the main axis.
343
+ S.every((j) => j.overflows[0] > 0 && U(j.placement) === x)))
344
+ return {
345
+ data: {
346
+ index: I,
347
+ overflows: S
348
+ },
349
+ reset: {
350
+ placement: mt
351
+ }
352
+ };
353
+ let Q = (N = S.filter((V) => V.overflows[0] <= 0).sort((V, j) => V.overflows[1] - j.overflows[1])[0]) == null ? void 0 : N.placement;
354
+ if (!Q)
355
+ switch (d) {
356
+ case "bestFit": {
357
+ var R;
358
+ const V = (R = S.filter((j) => {
359
+ if (k) {
360
+ const rt = U(j.placement);
361
+ return rt === x || // Create a bias to the `y` side axis due to horizontal
362
+ // reading directions favoring greater width.
363
+ rt === "y";
364
+ }
365
+ return !0;
366
+ }).map((j) => [j.placement, j.overflows.filter((rt) => rt > 0).reduce((rt, Bn) => rt + Bn, 0)]).sort((j, rt) => j[1] - rt[1])[0]) == null ? void 0 : R[0];
367
+ V && (Q = V);
368
+ break;
369
+ }
370
+ case "initialPlacement":
371
+ Q = a;
372
+ break;
373
+ }
374
+ if (s !== Q)
375
+ return {
376
+ reset: {
377
+ placement: Q
378
+ }
379
+ };
380
+ }
381
+ return {};
382
+ }
383
+ };
384
+ };
385
+ function je(t, e) {
386
+ return {
387
+ top: t.top - e.height,
388
+ right: t.right - e.width,
389
+ bottom: t.bottom - e.height,
390
+ left: t.left - e.width
391
+ };
392
+ }
393
+ function We(t) {
394
+ return so.some((e) => t[e] >= 0);
395
+ }
396
+ const vo = function(t) {
397
+ return t === void 0 && (t = {}), {
398
+ name: "hide",
399
+ options: t,
400
+ async fn(e) {
401
+ const {
402
+ rects: n
403
+ } = e, {
404
+ strategy: o = "referenceHidden",
405
+ ...s
406
+ } = st(t, e);
407
+ switch (o) {
408
+ case "referenceHidden": {
409
+ const i = await Rt(e, {
410
+ ...s,
411
+ elementContext: "reference"
412
+ }), r = je(i, n.reference);
413
+ return {
414
+ data: {
415
+ referenceHiddenOffsets: r,
416
+ referenceHidden: We(r)
417
+ }
418
+ };
419
+ }
420
+ case "escaped": {
421
+ const i = await Rt(e, {
422
+ ...s,
423
+ altBoundary: !0
424
+ }), r = je(i, n.floating);
425
+ return {
426
+ data: {
427
+ escapedOffsets: r,
428
+ escaped: We(r)
429
+ }
430
+ };
431
+ }
432
+ default:
433
+ return {};
434
+ }
435
+ }
436
+ };
437
+ }, pn = /* @__PURE__ */ new Set(["left", "top"]);
438
+ async function wo(t, e) {
439
+ const {
440
+ placement: n,
441
+ platform: o,
442
+ elements: s
443
+ } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), r = it(n), a = kt(n), c = U(n) === "y", l = pn.has(r) ? -1 : 1, f = i && c ? -1 : 1, h = st(e, t);
444
+ let {
445
+ mainAxis: u,
446
+ crossAxis: d,
447
+ alignmentAxis: p
448
+ } = typeof h == "number" ? {
449
+ mainAxis: h,
450
+ crossAxis: 0,
451
+ alignmentAxis: null
452
+ } : {
453
+ mainAxis: h.mainAxis || 0,
454
+ crossAxis: h.crossAxis || 0,
455
+ alignmentAxis: h.alignmentAxis
456
+ };
457
+ return a && typeof p == "number" && (d = a === "end" ? p * -1 : p), c ? {
458
+ x: d * f,
459
+ y: u * l
460
+ } : {
461
+ x: u * l,
462
+ y: d * f
463
+ };
464
+ }
465
+ const xo = function(t) {
466
+ return t === void 0 && (t = 0), {
467
+ name: "offset",
468
+ options: t,
469
+ async fn(e) {
470
+ var n, o;
471
+ const {
472
+ x: s,
473
+ y: i,
474
+ placement: r,
475
+ middlewareData: a
476
+ } = e, c = await wo(e, t);
477
+ return r === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
478
+ x: s + c.x,
479
+ y: i + c.y,
480
+ data: {
481
+ ...c,
482
+ placement: r
483
+ }
484
+ };
485
+ }
486
+ };
487
+ }, Eo = function(t) {
488
+ return t === void 0 && (t = {}), {
489
+ name: "shift",
490
+ options: t,
491
+ async fn(e) {
492
+ const {
493
+ x: n,
494
+ y: o,
495
+ placement: s
496
+ } = e, {
497
+ mainAxis: i = !0,
498
+ crossAxis: r = !1,
499
+ limiter: a = {
500
+ fn: (w) => {
501
+ let {
502
+ x: g,
503
+ y: x
504
+ } = w;
505
+ return {
506
+ x: g,
507
+ y: x
508
+ };
509
+ }
510
+ },
511
+ ...c
512
+ } = st(t, e), l = {
513
+ x: n,
514
+ y: o
515
+ }, f = await Rt(e, c), h = U(it(s)), u = Ee(h);
516
+ let d = l[u], p = l[h];
517
+ if (i) {
518
+ const w = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", x = d + f[w], O = d - f[g];
519
+ d = he(x, d, O);
520
+ }
521
+ if (r) {
522
+ const w = h === "y" ? "top" : "left", g = h === "y" ? "bottom" : "right", x = p + f[w], O = p - f[g];
523
+ p = he(x, p, O);
524
+ }
525
+ const m = a.fn({
526
+ ...e,
527
+ [u]: d,
528
+ [h]: p
529
+ });
530
+ return {
531
+ ...m,
532
+ data: {
533
+ x: m.x - n,
534
+ y: m.y - o,
535
+ enabled: {
536
+ [u]: i,
537
+ [h]: r
538
+ }
539
+ }
540
+ };
541
+ }
542
+ };
543
+ }, Oo = function(t) {
544
+ return t === void 0 && (t = {}), {
545
+ options: t,
546
+ fn(e) {
547
+ const {
548
+ x: n,
549
+ y: o,
550
+ placement: s,
551
+ rects: i,
552
+ middlewareData: r
553
+ } = e, {
554
+ offset: a = 0,
555
+ mainAxis: c = !0,
556
+ crossAxis: l = !0
557
+ } = st(t, e), f = {
558
+ x: n,
559
+ y: o
560
+ }, h = U(s), u = Ee(h);
561
+ let d = f[u], p = f[h];
562
+ const m = st(a, e), w = typeof m == "number" ? {
563
+ mainAxis: m,
564
+ crossAxis: 0
565
+ } : {
566
+ mainAxis: 0,
567
+ crossAxis: 0,
568
+ ...m
569
+ };
570
+ if (c) {
571
+ const O = u === "y" ? "height" : "width", P = i.reference[u] - i.floating[O] + w.mainAxis, y = i.reference[u] + i.reference[O] - w.mainAxis;
572
+ d < P ? d = P : d > y && (d = y);
573
+ }
574
+ if (l) {
575
+ var g, x;
576
+ const O = u === "y" ? "width" : "height", P = pn.has(it(s)), y = i.reference[h] - i.floating[O] + (P && ((g = r.offset) == null ? void 0 : g[h]) || 0) + (P ? 0 : w.crossAxis), k = i.reference[h] + i.reference[O] + (P ? 0 : ((x = r.offset) == null ? void 0 : x[h]) || 0) - (P ? w.crossAxis : 0);
577
+ p < y ? p = y : p > k && (p = k);
578
+ }
579
+ return {
580
+ [u]: d,
581
+ [h]: p
582
+ };
583
+ }
584
+ };
585
+ }, Ao = function(t) {
586
+ return t === void 0 && (t = {}), {
587
+ name: "size",
588
+ options: t,
589
+ async fn(e) {
590
+ var n, o;
591
+ const {
592
+ placement: s,
593
+ rects: i,
594
+ platform: r,
595
+ elements: a
596
+ } = e, {
597
+ apply: c = () => {
598
+ },
599
+ ...l
600
+ } = st(t, e), f = await Rt(e, l), h = it(s), u = kt(s), d = U(s) === "y", {
601
+ width: p,
602
+ height: m
603
+ } = i.floating;
604
+ let w, g;
605
+ h === "top" || h === "bottom" ? (w = h, g = u === (await (r.isRTL == null ? void 0 : r.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (g = h, w = u === "end" ? "top" : "bottom");
606
+ const x = m - f.top - f.bottom, O = p - f.left - f.right, P = ft(m - f[w], x), y = ft(p - f[g], O), k = !e.middlewareData.shift;
607
+ let b = P, v = y;
608
+ if ((n = e.middlewareData.shift) != null && n.enabled.x && (v = O), (o = e.middlewareData.shift) != null && o.enabled.y && (b = x), k && !u) {
609
+ const S = _(f.left, 0), C = _(f.right, 0), N = _(f.top, 0), R = _(f.bottom, 0);
610
+ d ? v = p - 2 * (S !== 0 || C !== 0 ? S + C : _(f.left, f.right)) : b = m - 2 * (N !== 0 || R !== 0 ? N + R : _(f.top, f.bottom));
611
+ }
612
+ await c({
613
+ ...e,
614
+ availableWidth: v,
615
+ availableHeight: b
616
+ });
617
+ const E = await r.getDimensions(a.floating);
618
+ return p !== E.width || m !== E.height ? {
619
+ reset: {
620
+ rects: !0
621
+ }
622
+ } : {};
623
+ }
624
+ };
625
+ };
626
+ function Jt() {
627
+ return typeof window < "u";
628
+ }
629
+ function St(t) {
630
+ return gn(t) ? (t.nodeName || "").toLowerCase() : "#document";
631
+ }
632
+ function B(t) {
633
+ var e;
634
+ return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
635
+ }
636
+ function Z(t) {
637
+ var e;
638
+ return (e = (gn(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
639
+ }
640
+ function gn(t) {
641
+ return Jt() ? t instanceof Node || t instanceof B(t).Node : !1;
642
+ }
643
+ function G(t) {
644
+ return Jt() ? t instanceof Element || t instanceof B(t).Element : !1;
645
+ }
646
+ function X(t) {
647
+ return Jt() ? t instanceof HTMLElement || t instanceof B(t).HTMLElement : !1;
648
+ }
649
+ function $e(t) {
650
+ return !Jt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof B(t).ShadowRoot;
651
+ }
652
+ const ko = /* @__PURE__ */ new Set(["inline", "contents"]);
653
+ function Bt(t) {
654
+ const {
655
+ overflow: e,
656
+ overflowX: n,
657
+ overflowY: o,
658
+ display: s
659
+ } = z(t);
660
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !ko.has(s);
661
+ }
662
+ const So = /* @__PURE__ */ new Set(["table", "td", "th"]);
663
+ function To(t) {
664
+ return So.has(St(t));
665
+ }
666
+ const Po = [":popover-open", ":modal"];
667
+ function te(t) {
668
+ return Po.some((e) => {
669
+ try {
670
+ return t.matches(e);
671
+ } catch {
672
+ return !1;
673
+ }
674
+ });
675
+ }
676
+ const Co = ["transform", "translate", "scale", "rotate", "perspective"], No = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Fo = ["paint", "layout", "strict", "content"];
677
+ function ke(t) {
678
+ const e = Se(), n = G(t) ? z(t) : t;
679
+ return Co.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) || No.some((o) => (n.willChange || "").includes(o)) || Fo.some((o) => (n.contain || "").includes(o));
680
+ }
681
+ function Io(t) {
682
+ let e = ht(t);
683
+ for (; X(e) && !At(e); ) {
684
+ if (ke(e))
685
+ return e;
686
+ if (te(e))
687
+ return null;
688
+ e = ht(e);
689
+ }
690
+ return null;
691
+ }
692
+ function Se() {
693
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
694
+ }
695
+ const Do = /* @__PURE__ */ new Set(["html", "body", "#document"]);
696
+ function At(t) {
697
+ return Do.has(St(t));
698
+ }
699
+ function z(t) {
700
+ return B(t).getComputedStyle(t);
701
+ }
702
+ function ee(t) {
703
+ return G(t) ? {
704
+ scrollLeft: t.scrollLeft,
705
+ scrollTop: t.scrollTop
706
+ } : {
707
+ scrollLeft: t.scrollX,
708
+ scrollTop: t.scrollY
709
+ };
710
+ }
711
+ function ht(t) {
712
+ if (St(t) === "html")
713
+ return t;
714
+ const e = (
715
+ // Step into the shadow DOM of the parent of a slotted node.
716
+ t.assignedSlot || // DOM Element detected.
717
+ t.parentNode || // ShadowRoot detected.
718
+ $e(t) && t.host || // Fallback.
719
+ Z(t)
720
+ );
721
+ return $e(e) ? e.host : e;
722
+ }
723
+ function mn(t) {
724
+ const e = ht(t);
725
+ return At(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : X(e) && Bt(e) ? e : mn(e);
726
+ }
727
+ function _t(t, e, n) {
728
+ var o;
729
+ e === void 0 && (e = []), n === void 0 && (n = !0);
730
+ const s = mn(t), i = s === ((o = t.ownerDocument) == null ? void 0 : o.body), r = B(s);
731
+ if (i) {
732
+ const a = ge(r);
733
+ return e.concat(r, r.visualViewport || [], Bt(s) ? s : [], a && n ? _t(a) : []);
734
+ }
735
+ return e.concat(s, _t(s, [], n));
736
+ }
737
+ function ge(t) {
738
+ return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
739
+ }
740
+ const Lo = (t) => t.length === 0;
741
+ function xt(t) {
742
+ return t.replace(/([a-z\d])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
743
+ }
744
+ function Gt(t, e = []) {
745
+ return {
746
+ parts: (...n) => {
747
+ if (Lo(e)) return Gt(t, n);
748
+ throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?");
749
+ },
750
+ extendWith: (...n) => Gt(t, [...e, ...n]),
751
+ rename: (n) => Gt(n, e),
752
+ keys: () => e,
753
+ build: () => [...new Set(e)].reduce((n, o) => Object.assign(n, { [o]: {
754
+ selector: [`&[data-scope="${xt(t)}"][data-part="${xt(o)}"]`, `& [data-scope="${xt(t)}"][data-part="${xt(o)}"]`].join(", "),
755
+ attrs: {
756
+ "data-scope": xt(t),
757
+ "data-part": xt(o)
758
+ }
759
+ } }), {})
760
+ };
761
+ }
762
+ const ne = (t) => typeof t == "object" && t !== null, Mo = (t) => t ? "" : void 0, Ro = 1, _o = 9, Bo = 11;
763
+ function L(t) {
764
+ return ne(t) && t.nodeType === Ro && typeof t.nodeName == "string";
765
+ }
766
+ const Te = (t) => ne(t) && t.nodeType === _o, Vo = (t) => ne(t) && t === t.window;
767
+ function yn(t) {
768
+ return L(t) ? t.localName || "" : "#document";
769
+ }
770
+ function jo(t) {
771
+ return [
772
+ "html",
773
+ "body",
774
+ "#document"
775
+ ].includes(yn(t));
776
+ }
777
+ const Wo = (t) => ne(t) && t.nodeType !== void 0;
778
+ function qt(t) {
779
+ return Wo(t) && t.nodeType === Bo && "host" in t;
780
+ }
781
+ const $o = (t) => L(t) && t.localName === "input";
782
+ function Ho(t) {
783
+ return L(t) ? t.offsetWidth > 0 || t.offsetHeight > 0 || t.getClientRects().length > 0 : !1;
784
+ }
785
+ const Go = /(textarea|select)/;
786
+ function zo(t) {
787
+ if (t == null || !L(t)) return !1;
788
+ try {
789
+ return $o(t) && t.selectionStart != null || Go.test(t.localName) || t.isContentEditable || t.getAttribute("contenteditable") === "true" || t.getAttribute("contenteditable") === "";
790
+ } catch {
791
+ return !1;
792
+ }
793
+ }
794
+ function Xt(t, e) {
795
+ if (!t || !e || !L(t) || !L(e)) return !1;
796
+ const n = e.getRootNode?.();
797
+ if (t === e || t.contains(e)) return !0;
798
+ if (n && qt(n)) {
799
+ let o = e;
800
+ for (; o; ) {
801
+ if (t === o) return !0;
802
+ o = o.parentNode || o.host;
803
+ }
804
+ }
805
+ return !1;
806
+ }
807
+ function gt(t) {
808
+ return Te(t) ? t : Vo(t) ? t.document : t?.ownerDocument ?? document;
809
+ }
810
+ function Ko(t) {
811
+ return gt(t).documentElement;
812
+ }
813
+ function Tt(t) {
814
+ return qt(t) ? Tt(t.host) : Te(t) ? t.defaultView ?? window : L(t) ? t.ownerDocument?.defaultView ?? window : window;
815
+ }
816
+ function bn(t) {
817
+ let e = t.activeElement;
818
+ for (; e?.shadowRoot; ) {
819
+ const n = e.shadowRoot.activeElement;
820
+ if (n === e) break;
821
+ e = n;
822
+ }
823
+ return e;
824
+ }
825
+ function Uo(t) {
826
+ if (yn(t) === "html") return t;
827
+ const e = t.assignedSlot || t.parentNode || qt(t) && t.host || Ko(t);
828
+ return qt(e) ? e.host : e;
829
+ }
830
+ const re = /* @__PURE__ */ new WeakMap();
831
+ function Yo(t) {
832
+ return re.has(t) || re.set(t, Tt(t).getComputedStyle(t)), re.get(t);
833
+ }
834
+ const vn = () => typeof document < "u";
835
+ function qo() {
836
+ return navigator.userAgentData?.platform ?? navigator.platform;
837
+ }
838
+ const Pe = (t) => vn() && t.test(qo()), Xo = (t) => vn() && t.test(navigator.vendor), Zo = () => Pe(/^Mac/), Qo = () => Pe(/mac|iphone|ipad|ipod/i), Jo = () => Qo() && Xo(/apple/i), ts = () => Pe(/iP(hone|ad|od)|iOS/);
839
+ function es(t) {
840
+ return t.composedPath?.() ?? t.nativeEvent?.composedPath?.();
841
+ }
842
+ function ut(t) {
843
+ return es(t)?.[0] ?? t.target;
844
+ }
845
+ function ns(t) {
846
+ return t.button === 2 || Zo() && t.ctrlKey && t.button === 0;
847
+ }
848
+ function H(t, e, n, o) {
849
+ const s = typeof t == "function" ? t() : t;
850
+ return s?.addEventListener(e, n, o), () => {
851
+ s?.removeEventListener(e, n, o);
852
+ };
853
+ }
854
+ function os(t, e) {
855
+ const { type: n = "HTMLInputElement", property: o = "value" } = e, s = Tt(t)[n].prototype;
856
+ return Object.getOwnPropertyDescriptor(s, o) ?? {};
857
+ }
858
+ function ss(t) {
859
+ if (t.localName === "input") return "HTMLInputElement";
860
+ if (t.localName === "textarea") return "HTMLTextAreaElement";
861
+ if (t.localName === "select") return "HTMLSelectElement";
862
+ }
863
+ function is(t, e, n = "value") {
864
+ const o = ss(t);
865
+ o && os(t, {
866
+ type: o,
867
+ property: n
868
+ }).set?.call(t, e), t.setAttribute(n, e);
869
+ }
870
+ const wn = (t) => L(t) && t.tagName === "IFRAME", rs = (t) => !Number.isNaN(Number.parseInt(t.getAttribute("tabindex") || "0", 10)), as = (t) => Number.parseInt(t.getAttribute("tabindex") || "0", 10) < 0, Ce = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type";
871
+ function Ne(t, e = !1) {
872
+ if (!t) return [];
873
+ const n = Array.from(t.querySelectorAll(Ce));
874
+ (e === !0 || e === "if-empty" && n.length === 0) && L(t) && dt(t) && n.unshift(t);
875
+ const s = n.filter(dt);
876
+ return s.forEach((i, r) => {
877
+ if (wn(i) && i.contentDocument) {
878
+ const a = i.contentDocument.body;
879
+ s.splice(r, 1, ...Ne(a));
880
+ }
881
+ }), s;
882
+ }
883
+ function dt(t) {
884
+ return !t || t.closest("[inert]") ? !1 : t.matches(Ce) && Ho(t);
885
+ }
886
+ function Vt(t, e) {
887
+ if (!t) return [];
888
+ const n = Array.from(t.querySelectorAll(Ce)), o = n.filter(lt);
889
+ return e && lt(t) && o.unshift(t), o.forEach((s, i) => {
890
+ if (wn(s) && s.contentDocument) {
891
+ const r = s.contentDocument.body, a = Vt(r);
892
+ o.splice(i, 1, ...a);
893
+ }
894
+ }), !o.length && e ? n : o;
895
+ }
896
+ function lt(t) {
897
+ return t != null && t.tabIndex > 0 ? !0 : dt(t) && !as(t);
898
+ }
899
+ function cs(t, e) {
900
+ const n = Vt(t, e), o = n[0] || null, s = n[n.length - 1] || null;
901
+ return [o, s];
902
+ }
903
+ function ls(t, e) {
904
+ const n = Vt(t), o = t?.ownerDocument || document, s = e ?? o.activeElement;
905
+ if (!s) return null;
906
+ const i = n.indexOf(s);
907
+ return n[i + 1] || null;
908
+ }
909
+ function Ct(t) {
910
+ return t.tabIndex < 0 && (/^(audio|video|details)$/.test(t.localName) || zo(t)) && !rs(t) ? 0 : t.tabIndex;
911
+ }
912
+ function He(t) {
913
+ const { root: e, getInitialEl: n, filter: o, enabled: s = !0 } = t;
914
+ if (!s) return;
915
+ let i = null;
916
+ if (i ||= typeof n == "function" ? n() : n, i ||= e?.querySelector("[data-autofocus],[autofocus]"), !i) {
917
+ const r = Vt(e);
918
+ i = o ? r.filter(o)[0] : r[0];
919
+ }
920
+ return i || e || void 0;
921
+ }
922
+ function q(t) {
923
+ const e = globalThis.requestAnimationFrame(t);
924
+ return () => {
925
+ globalThis.cancelAnimationFrame(e);
926
+ };
927
+ }
928
+ function me(t) {
929
+ const e = Uo(t);
930
+ return jo(e) ? gt(e).body : L(e) && ds(e) ? e : me(e);
931
+ }
932
+ const us = /auto|scroll|overlay|hidden|clip/;
933
+ function ds(t) {
934
+ const e = Tt(t), { overflow: n, overflowX: o, overflowY: s, display: i } = e.getComputedStyle(t);
935
+ return us.test(n + s + o) && !["inline", "contents"].includes(i);
936
+ }
937
+ function fs(t, e = {}) {
938
+ const { triggerElement: n, onFocus: o } = e, s = t?.ownerDocument || document, i = s.body;
939
+ function r(a) {
940
+ if (a.key !== "Tab") return;
941
+ let c = null;
942
+ const [l, f] = cs(t, !0), h = !l && !f;
943
+ a.shiftKey && (s.activeElement === l || h) ? c = n : !a.shiftKey && s.activeElement === n ? c = l : !a.shiftKey && (s.activeElement === f || h) && (c = ls(i, n)), c && (a.preventDefault(), typeof o == "function" ? o(c) : c.focus());
944
+ }
945
+ return H(s, "keydown", r, !0);
946
+ }
947
+ function hs(t, e) {
948
+ const { defer: n, triggerElement: o, ...s } = e, i = n ? q : (a) => a(), r = [];
949
+ return r.push(i(() => {
950
+ const a = typeof t == "function" ? t() : t, c = typeof o == "function" ? o() : o;
951
+ r.push(fs(a, {
952
+ triggerElement: c,
953
+ ...s
954
+ }));
955
+ })), () => {
956
+ r.forEach((a) => a?.());
957
+ };
958
+ }
959
+ function ps(t) {
960
+ const e = {
961
+ getRootNode: (n) => n.getRootNode?.() ?? document,
962
+ getDoc: (n) => gt(e.getRootNode(n)),
963
+ getWin: (n) => e.getDoc(n).defaultView ?? window,
964
+ getActiveElement: (n) => bn(e.getRootNode(n)),
965
+ isActiveElement: (n, o) => o === e.getActiveElement(n),
966
+ getById: (n, o) => e.getRootNode(n).getElementById(o),
967
+ setValue: (n, o) => {
968
+ n == null || o == null || is(n, o.toString());
969
+ }
970
+ };
971
+ return {
972
+ ...e,
973
+ ...t
974
+ };
975
+ }
976
+ const ae = /* @__PURE__ */ new WeakMap();
977
+ function gs(t, e, n) {
978
+ ae.has(t) || ae.set(t, /* @__PURE__ */ new Map());
979
+ const o = ae.get(t), s = o.get(e);
980
+ if (!s)
981
+ return o.set(e, n()), () => {
982
+ o.get(e)?.(), o.delete(e);
983
+ };
984
+ const i = n(), r = () => {
985
+ i(), s(), o.delete(e);
986
+ };
987
+ return o.set(e, r), () => {
988
+ o.get(e) === r && (i(), o.set(e, s));
989
+ };
990
+ }
991
+ function ms(t, e) {
992
+ return t ? gs(t, "style", () => {
993
+ const o = t.style.cssText;
994
+ return Object.assign(t.style, e), () => {
995
+ t.style.cssText = o;
996
+ };
997
+ }) : () => {
998
+ };
999
+ }
1000
+ const ys = 1e3 / 60;
1001
+ function bs(t, e) {
1002
+ const n = t();
1003
+ if (L(n) && n.isConnected)
1004
+ return e(n), () => {
1005
+ };
1006
+ {
1007
+ const o = setInterval(() => {
1008
+ const s = t();
1009
+ L(s) && s.isConnected && (e(s), clearInterval(o));
1010
+ }, ys);
1011
+ return () => clearInterval(o);
1012
+ }
1013
+ }
1014
+ function vs(t, e) {
1015
+ const n = [];
1016
+ return t?.forEach((o) => {
1017
+ const s = bs(o, e);
1018
+ n.push(s);
1019
+ }), () => {
1020
+ n.forEach((o) => o());
1021
+ };
1022
+ }
1023
+ function ws(t) {
1024
+ for (; t.length > 0; ) t.pop();
1025
+ return t;
1026
+ }
1027
+ function ye(t, ...e) {
1028
+ return (typeof t == "function" ? t(...e) : t) ?? void 0;
1029
+ }
1030
+ const nt = (t) => t;
1031
+ function xn() {
1032
+ }
1033
+ function Ge(...t) {
1034
+ return (...e) => {
1035
+ t.forEach((n) => {
1036
+ n?.(...e);
1037
+ });
1038
+ };
1039
+ }
1040
+ const ze = /* @__PURE__ */ (() => {
1041
+ let t = 0;
1042
+ return () => (t++, t.toString(36));
1043
+ })(), Zt = (t) => Array.isArray(t), En = (t) => t != null && typeof t == "object", zt = (t) => En(t) && !Zt(t), xs = (t) => typeof t == "number" && !Number.isNaN(t), ot = (t) => typeof t == "string", Qt = (t) => typeof t == "function", Es = (t) => t == null;
1044
+ function On(t, e) {
1045
+ return Object.prototype.hasOwnProperty.call(t, e);
1046
+ }
1047
+ const Os = (t) => Object.prototype.toString.call(t), An = Function.prototype.toString, As = An.call(Object);
1048
+ function $t(t) {
1049
+ if (!En(t) || Os(t) !== "[object Object]") return !1;
1050
+ const e = Object.getPrototypeOf(t);
1051
+ if (e === null) return !0;
1052
+ const n = On(e, "constructor") && e.constructor;
1053
+ return typeof n == "function" && n instanceof n && An.call(n) === As;
1054
+ }
1055
+ function jt(t) {
1056
+ if (!ks(t) || t === void 0) return t;
1057
+ const e = Reflect.ownKeys(t).filter((o) => typeof o == "string"), n = {};
1058
+ for (const o of e) {
1059
+ const s = t[o];
1060
+ s !== void 0 && (n[o] = jt(s));
1061
+ }
1062
+ return n;
1063
+ }
1064
+ function ks(t) {
1065
+ return t && typeof t == "object" && t.constructor === Object;
1066
+ }
1067
+ function kn(t) {
1068
+ const e = z(t);
1069
+ let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
1070
+ const s = X(t), i = s ? t.offsetWidth : n, r = s ? t.offsetHeight : o, a = Kt(n) !== i || Kt(o) !== r;
1071
+ return a && (n = i, o = r), {
1072
+ width: n,
1073
+ height: o,
1074
+ $: a
1075
+ };
1076
+ }
1077
+ function Fe(t) {
1078
+ return G(t) ? t : t.contextElement;
1079
+ }
1080
+ function Ot(t) {
1081
+ const e = Fe(t);
1082
+ if (!X(e))
1083
+ return Y(1);
1084
+ const n = e.getBoundingClientRect(), {
1085
+ width: o,
1086
+ height: s,
1087
+ $: i
1088
+ } = kn(e);
1089
+ let r = (i ? Kt(n.width) : n.width) / o, a = (i ? Kt(n.height) : n.height) / s;
1090
+ return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
1091
+ x: r,
1092
+ y: a
1093
+ };
1094
+ }
1095
+ const Ss = /* @__PURE__ */ Y(0);
1096
+ function Sn(t) {
1097
+ const e = B(t);
1098
+ return !Se() || !e.visualViewport ? Ss : {
1099
+ x: e.visualViewport.offsetLeft,
1100
+ y: e.visualViewport.offsetTop
1101
+ };
1102
+ }
1103
+ function Ts(t, e, n) {
1104
+ return e === void 0 && (e = !1), !n || e && n !== B(t) ? !1 : e;
1105
+ }
1106
+ function wt(t, e, n, o) {
1107
+ e === void 0 && (e = !1), n === void 0 && (n = !1);
1108
+ const s = t.getBoundingClientRect(), i = Fe(t);
1109
+ let r = Y(1);
1110
+ e && (o ? G(o) && (r = Ot(o)) : r = Ot(t));
1111
+ const a = Ts(i, n, o) ? Sn(i) : Y(0);
1112
+ let c = (s.left + a.x) / r.x, l = (s.top + a.y) / r.y, f = s.width / r.x, h = s.height / r.y;
1113
+ if (i) {
1114
+ const u = B(i), d = o && G(o) ? B(o) : o;
1115
+ let p = u, m = ge(p);
1116
+ for (; m && o && d !== p; ) {
1117
+ const w = Ot(m), g = m.getBoundingClientRect(), x = z(m), O = g.left + (m.clientLeft + parseFloat(x.paddingLeft)) * w.x, P = g.top + (m.clientTop + parseFloat(x.paddingTop)) * w.y;
1118
+ c *= w.x, l *= w.y, f *= w.x, h *= w.y, c += O, l += P, p = B(m), m = ge(p);
1119
+ }
1120
+ }
1121
+ return Yt({
1122
+ width: f,
1123
+ height: h,
1124
+ x: c,
1125
+ y: l
1126
+ });
1127
+ }
1128
+ function Ie(t, e) {
1129
+ const n = ee(t).scrollLeft;
1130
+ return e ? e.left + n : wt(Z(t)).left + n;
1131
+ }
1132
+ function Tn(t, e, n) {
1133
+ n === void 0 && (n = !1);
1134
+ const o = t.getBoundingClientRect(), s = o.left + e.scrollLeft - (n ? 0 : (
1135
+ // RTL <body> scrollbar.
1136
+ Ie(t, o)
1137
+ )), i = o.top + e.scrollTop;
1138
+ return {
1139
+ x: s,
1140
+ y: i
1141
+ };
1142
+ }
1143
+ function Ps(t) {
1144
+ let {
1145
+ elements: e,
1146
+ rect: n,
1147
+ offsetParent: o,
1148
+ strategy: s
1149
+ } = t;
1150
+ const i = s === "fixed", r = Z(o), a = e ? te(e.floating) : !1;
1151
+ if (o === r || a && i)
1152
+ return n;
1153
+ let c = {
1154
+ scrollLeft: 0,
1155
+ scrollTop: 0
1156
+ }, l = Y(1);
1157
+ const f = Y(0), h = X(o);
1158
+ if ((h || !h && !i) && ((St(o) !== "body" || Bt(r)) && (c = ee(o)), X(o))) {
1159
+ const d = wt(o);
1160
+ l = Ot(o), f.x = d.x + o.clientLeft, f.y = d.y + o.clientTop;
1161
+ }
1162
+ const u = r && !h && !i ? Tn(r, c, !0) : Y(0);
1163
+ return {
1164
+ width: n.width * l.x,
1165
+ height: n.height * l.y,
1166
+ x: n.x * l.x - c.scrollLeft * l.x + f.x + u.x,
1167
+ y: n.y * l.y - c.scrollTop * l.y + f.y + u.y
1168
+ };
1169
+ }
1170
+ function Cs(t) {
1171
+ return Array.from(t.getClientRects());
1172
+ }
1173
+ function Ns(t) {
1174
+ const e = Z(t), n = ee(t), o = t.ownerDocument.body, s = _(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = _(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
1175
+ let r = -n.scrollLeft + Ie(t);
1176
+ const a = -n.scrollTop;
1177
+ return z(o).direction === "rtl" && (r += _(e.clientWidth, o.clientWidth) - s), {
1178
+ width: s,
1179
+ height: i,
1180
+ x: r,
1181
+ y: a
1182
+ };
1183
+ }
1184
+ function Fs(t, e) {
1185
+ const n = B(t), o = Z(t), s = n.visualViewport;
1186
+ let i = o.clientWidth, r = o.clientHeight, a = 0, c = 0;
1187
+ if (s) {
1188
+ i = s.width, r = s.height;
1189
+ const l = Se();
1190
+ (!l || l && e === "fixed") && (a = s.offsetLeft, c = s.offsetTop);
1191
+ }
1192
+ return {
1193
+ width: i,
1194
+ height: r,
1195
+ x: a,
1196
+ y: c
1197
+ };
1198
+ }
1199
+ function Is(t, e) {
1200
+ const n = wt(t, !0, e === "fixed"), o = n.top + t.clientTop, s = n.left + t.clientLeft, i = X(t) ? Ot(t) : Y(1), r = t.clientWidth * i.x, a = t.clientHeight * i.y, c = s * i.x, l = o * i.y;
1201
+ return {
1202
+ width: r,
1203
+ height: a,
1204
+ x: c,
1205
+ y: l
1206
+ };
1207
+ }
1208
+ function Ke(t, e, n) {
1209
+ let o;
1210
+ if (e === "viewport")
1211
+ o = Fs(t, n);
1212
+ else if (e === "document")
1213
+ o = Ns(Z(t));
1214
+ else if (G(e))
1215
+ o = Is(e, n);
1216
+ else {
1217
+ const s = Sn(t);
1218
+ o = {
1219
+ x: e.x - s.x,
1220
+ y: e.y - s.y,
1221
+ width: e.width,
1222
+ height: e.height
1223
+ };
1224
+ }
1225
+ return Yt(o);
1226
+ }
1227
+ function Pn(t, e) {
1228
+ const n = ht(t);
1229
+ return n === e || !G(n) || At(n) ? !1 : z(n).position === "fixed" || Pn(n, e);
1230
+ }
1231
+ function Ds(t, e) {
1232
+ const n = e.get(t);
1233
+ if (n)
1234
+ return n;
1235
+ let o = _t(t, [], !1).filter((a) => G(a) && St(a) !== "body"), s = null;
1236
+ const i = z(t).position === "fixed";
1237
+ let r = i ? ht(t) : t;
1238
+ for (; G(r) && !At(r); ) {
1239
+ const a = z(r), c = ke(r);
1240
+ !c && a.position === "fixed" && (s = null), (i ? !c && !s : !c && a.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || Bt(r) && !c && Pn(t, r)) ? o = o.filter((f) => f !== r) : s = a, r = ht(r);
1241
+ }
1242
+ return e.set(t, o), o;
1243
+ }
1244
+ function Ls(t) {
1245
+ let {
1246
+ element: e,
1247
+ boundary: n,
1248
+ rootBoundary: o,
1249
+ strategy: s
1250
+ } = t;
1251
+ const r = [...n === "clippingAncestors" ? te(e) ? [] : Ds(e, this._c) : [].concat(n), o], a = r[0], c = r.reduce((l, f) => {
1252
+ const h = Ke(e, f, s);
1253
+ return l.top = _(h.top, l.top), l.right = ft(h.right, l.right), l.bottom = ft(h.bottom, l.bottom), l.left = _(h.left, l.left), l;
1254
+ }, Ke(e, a, s));
1255
+ return {
1256
+ width: c.right - c.left,
1257
+ height: c.bottom - c.top,
1258
+ x: c.left,
1259
+ y: c.top
1260
+ };
1261
+ }
1262
+ function Ms(t) {
1263
+ const {
1264
+ width: e,
1265
+ height: n
1266
+ } = kn(t);
1267
+ return {
1268
+ width: e,
1269
+ height: n
1270
+ };
1271
+ }
1272
+ function Rs(t, e, n) {
1273
+ const o = X(e), s = Z(e), i = n === "fixed", r = wt(t, !0, i, e);
1274
+ let a = {
1275
+ scrollLeft: 0,
1276
+ scrollTop: 0
1277
+ };
1278
+ const c = Y(0);
1279
+ function l() {
1280
+ c.x = Ie(s);
1281
+ }
1282
+ if (o || !o && !i)
1283
+ if ((St(e) !== "body" || Bt(s)) && (a = ee(e)), o) {
1284
+ const d = wt(e, !0, i, e);
1285
+ c.x = d.x + e.clientLeft, c.y = d.y + e.clientTop;
1286
+ } else s && l();
1287
+ i && !o && s && l();
1288
+ const f = s && !o && !i ? Tn(s, a) : Y(0), h = r.left + a.scrollLeft - c.x - f.x, u = r.top + a.scrollTop - c.y - f.y;
1289
+ return {
1290
+ x: h,
1291
+ y: u,
1292
+ width: r.width,
1293
+ height: r.height
1294
+ };
1295
+ }
1296
+ function ce(t) {
1297
+ return z(t).position === "static";
1298
+ }
1299
+ function Ue(t, e) {
1300
+ if (!X(t) || z(t).position === "fixed")
1301
+ return null;
1302
+ if (e)
1303
+ return e(t);
1304
+ let n = t.offsetParent;
1305
+ return Z(t) === n && (n = n.ownerDocument.body), n;
1306
+ }
1307
+ function Cn(t, e) {
1308
+ const n = B(t);
1309
+ if (te(t))
1310
+ return n;
1311
+ if (!X(t)) {
1312
+ let s = ht(t);
1313
+ for (; s && !At(s); ) {
1314
+ if (G(s) && !ce(s))
1315
+ return s;
1316
+ s = ht(s);
1317
+ }
1318
+ return n;
1319
+ }
1320
+ let o = Ue(t, e);
1321
+ for (; o && To(o) && ce(o); )
1322
+ o = Ue(o, e);
1323
+ return o && At(o) && ce(o) && !ke(o) ? n : o || Io(t) || n;
1324
+ }
1325
+ const _s = async function(t) {
1326
+ const e = this.getOffsetParent || Cn, n = this.getDimensions, o = await n(t.floating);
1327
+ return {
1328
+ reference: Rs(t.reference, await e(t.floating), t.strategy),
1329
+ floating: {
1330
+ x: 0,
1331
+ y: 0,
1332
+ width: o.width,
1333
+ height: o.height
1334
+ }
1335
+ };
1336
+ };
1337
+ function Bs(t) {
1338
+ return z(t).direction === "rtl";
1339
+ }
1340
+ const Vs = {
1341
+ convertOffsetParentRelativeRectToViewportRelativeRect: Ps,
1342
+ getDocumentElement: Z,
1343
+ getClippingRect: Ls,
1344
+ getOffsetParent: Cn,
1345
+ getElementRects: _s,
1346
+ getClientRects: Cs,
1347
+ getDimensions: Ms,
1348
+ getScale: Ot,
1349
+ isElement: G,
1350
+ isRTL: Bs
1351
+ };
1352
+ function Nn(t, e) {
1353
+ return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1354
+ }
1355
+ function js(t, e) {
1356
+ let n = null, o;
1357
+ const s = Z(t);
1358
+ function i() {
1359
+ var a;
1360
+ clearTimeout(o), (a = n) == null || a.disconnect(), n = null;
1361
+ }
1362
+ function r(a, c) {
1363
+ a === void 0 && (a = !1), c === void 0 && (c = 1), i();
1364
+ const l = t.getBoundingClientRect(), {
1365
+ left: f,
1366
+ top: h,
1367
+ width: u,
1368
+ height: d
1369
+ } = l;
1370
+ if (a || e(), !u || !d)
1371
+ return;
1372
+ const p = Wt(h), m = Wt(s.clientWidth - (f + u)), w = Wt(s.clientHeight - (h + d)), g = Wt(f), O = {
1373
+ rootMargin: -p + "px " + -m + "px " + -w + "px " + -g + "px",
1374
+ threshold: _(0, ft(1, c)) || 1
1375
+ };
1376
+ let P = !0;
1377
+ function y(k) {
1378
+ const b = k[0].intersectionRatio;
1379
+ if (b !== c) {
1380
+ if (!P)
1381
+ return r();
1382
+ b ? r(!1, b) : o = setTimeout(() => {
1383
+ r(!1, 1e-7);
1384
+ }, 1e3);
1385
+ }
1386
+ b === 1 && !Nn(l, t.getBoundingClientRect()) && r(), P = !1;
1387
+ }
1388
+ try {
1389
+ n = new IntersectionObserver(y, {
1390
+ ...O,
1391
+ // Handle <iframe>s
1392
+ root: s.ownerDocument
1393
+ });
1394
+ } catch {
1395
+ n = new IntersectionObserver(y, O);
1396
+ }
1397
+ n.observe(t);
1398
+ }
1399
+ return r(!0), i;
1400
+ }
1401
+ function Ws(t, e, n, o) {
1402
+ o === void 0 && (o = {});
1403
+ const {
1404
+ ancestorScroll: s = !0,
1405
+ ancestorResize: i = !0,
1406
+ elementResize: r = typeof ResizeObserver == "function",
1407
+ layoutShift: a = typeof IntersectionObserver == "function",
1408
+ animationFrame: c = !1
1409
+ } = o, l = Fe(t), f = s || i ? [...l ? _t(l) : [], ..._t(e)] : [];
1410
+ f.forEach((g) => {
1411
+ s && g.addEventListener("scroll", n, {
1412
+ passive: !0
1413
+ }), i && g.addEventListener("resize", n);
1414
+ });
1415
+ const h = l && a ? js(l, n) : null;
1416
+ let u = -1, d = null;
1417
+ r && (d = new ResizeObserver((g) => {
1418
+ let [x] = g;
1419
+ x && x.target === l && d && (d.unobserve(e), cancelAnimationFrame(u), u = requestAnimationFrame(() => {
1420
+ var O;
1421
+ (O = d) == null || O.observe(e);
1422
+ })), n();
1423
+ }), l && !c && d.observe(l), d.observe(e));
1424
+ let p, m = c ? wt(t) : null;
1425
+ c && w();
1426
+ function w() {
1427
+ const g = wt(t);
1428
+ m && !Nn(m, g) && n(), m = g, p = requestAnimationFrame(w);
1429
+ }
1430
+ return n(), () => {
1431
+ var g;
1432
+ f.forEach((x) => {
1433
+ s && x.removeEventListener("scroll", n), i && x.removeEventListener("resize", n);
1434
+ }), h?.(), (g = d) == null || g.disconnect(), d = null, c && cancelAnimationFrame(p);
1435
+ };
1436
+ }
1437
+ const $s = xo, Hs = Eo, Gs = bo, zs = Ao, Ks = vo, Us = yo, Ys = Oo, qs = (t, e, n) => {
1438
+ const o = /* @__PURE__ */ new Map(), s = {
1439
+ platform: Vs,
1440
+ ...n
1441
+ }, i = {
1442
+ ...s.platform,
1443
+ _c: o
1444
+ };
1445
+ return mo(t, e, {
1446
+ ...s,
1447
+ platform: i
1448
+ });
1449
+ };
1450
+ function Ye(t = 0, e = 0, n = 0, o = 0) {
1451
+ if (typeof DOMRect == "function") return new DOMRect(t, e, n, o);
1452
+ const s = {
1453
+ x: t,
1454
+ y: e,
1455
+ width: n,
1456
+ height: o,
1457
+ top: e,
1458
+ right: t + n,
1459
+ bottom: e + o,
1460
+ left: t
1461
+ };
1462
+ return {
1463
+ ...s,
1464
+ toJSON: () => s
1465
+ };
1466
+ }
1467
+ function Xs(t) {
1468
+ if (!t) return Ye();
1469
+ const { x: e, y: n, width: o, height: s } = t;
1470
+ return Ye(e, n, o, s);
1471
+ }
1472
+ function Zs(t, e) {
1473
+ return {
1474
+ contextElement: L(t) ? t : void 0,
1475
+ getBoundingClientRect: () => {
1476
+ const n = t, o = e?.(n);
1477
+ return o || !n ? Xs(o) : n.getBoundingClientRect();
1478
+ }
1479
+ };
1480
+ }
1481
+ const Nt = (t) => ({
1482
+ variable: t,
1483
+ reference: `var(${t})`
1484
+ }), et = {
1485
+ arrowSize: Nt("--arrow-size"),
1486
+ arrowSizeHalf: Nt("--arrow-size-half"),
1487
+ arrowBg: Nt("--arrow-background"),
1488
+ transformOrigin: Nt("--transform-origin"),
1489
+ arrowOffset: Nt("--arrow-offset")
1490
+ };
1491
+ function Qs(t) {
1492
+ return {
1493
+ top: "bottom center",
1494
+ "top-start": t ? `${t.x}px bottom` : "left bottom",
1495
+ "top-end": t ? `${t.x}px bottom` : "right bottom",
1496
+ bottom: "top center",
1497
+ "bottom-start": t ? `${t.x}px top` : "top left",
1498
+ "bottom-end": t ? `${t.x}px top` : "top right",
1499
+ left: "right center",
1500
+ "left-start": t ? `right ${t.y}px` : "right top",
1501
+ "left-end": t ? `right ${t.y}px` : "right bottom",
1502
+ right: "left center",
1503
+ "right-start": t ? `left ${t.y}px` : "left top",
1504
+ "right-end": t ? `left ${t.y}px` : "left bottom"
1505
+ };
1506
+ }
1507
+ const Js = {
1508
+ name: "transformOrigin",
1509
+ fn({ placement: t, elements: e, middlewareData: n }) {
1510
+ const { arrow: o } = n, s = Qs(o)[t], { floating: i } = e;
1511
+ return i.style.setProperty(et.transformOrigin.variable, s), { data: { transformOrigin: s } };
1512
+ }
1513
+ }, ti = {
1514
+ name: "rects",
1515
+ fn({ rects: t }) {
1516
+ return { data: t };
1517
+ }
1518
+ };
1519
+ function ei(t) {
1520
+ if (t)
1521
+ return {
1522
+ name: "shiftArrow",
1523
+ fn({ placement: e, middlewareData: n }) {
1524
+ if (!n.arrow) return {};
1525
+ const { x: o, y: s } = n.arrow, i = e.split("-")[0];
1526
+ return Object.assign(t.style, {
1527
+ left: o != null ? `${o}px` : "",
1528
+ top: s != null ? `${s}px` : "",
1529
+ [i]: `calc(100% + ${et.arrowOffset.reference})`
1530
+ }), {};
1531
+ }
1532
+ };
1533
+ }
1534
+ function ni(t) {
1535
+ const [e, n] = t.split("-");
1536
+ return {
1537
+ side: e,
1538
+ align: n,
1539
+ hasAlign: n != null
1540
+ };
1541
+ }
1542
+ const oi = {
1543
+ strategy: "absolute",
1544
+ placement: "bottom",
1545
+ listeners: !0,
1546
+ gutter: 8,
1547
+ flip: !0,
1548
+ slide: !0,
1549
+ overlap: !1,
1550
+ sameWidth: !1,
1551
+ fitViewport: !1,
1552
+ overflowPadding: 8,
1553
+ arrowPadding: 4
1554
+ };
1555
+ function qe(t, e) {
1556
+ const n = t.devicePixelRatio || 1;
1557
+ return Math.round(e * n) / n;
1558
+ }
1559
+ function Fn(t) {
1560
+ return ye(t.boundary);
1561
+ }
1562
+ function si(t, e) {
1563
+ if (t)
1564
+ return Us({
1565
+ element: t,
1566
+ padding: e.arrowPadding
1567
+ });
1568
+ }
1569
+ function ii(t, e) {
1570
+ if (!Es(e.offset ?? e.gutter))
1571
+ return $s(({ placement: n }) => {
1572
+ const o = (t?.clientHeight || 0) / 2, s = e.offset?.mainAxis ?? e.gutter, i = typeof s == "number" ? s + o : s ?? o, { hasAlign: r } = ni(n), a = r ? void 0 : e.shift, c = e.offset?.crossAxis ?? a;
1573
+ return jt({
1574
+ crossAxis: c,
1575
+ mainAxis: i,
1576
+ alignmentAxis: e.shift
1577
+ });
1578
+ });
1579
+ }
1580
+ function ri(t) {
1581
+ if (t.flip)
1582
+ return Gs({
1583
+ boundary: Fn(t),
1584
+ padding: t.overflowPadding,
1585
+ fallbackPlacements: t.flip === !0 ? void 0 : t.flip
1586
+ });
1587
+ }
1588
+ function ai(t) {
1589
+ if (!(!t.slide && !t.overlap))
1590
+ return Hs({
1591
+ boundary: Fn(t),
1592
+ mainAxis: t.slide,
1593
+ crossAxis: t.overlap,
1594
+ padding: t.overflowPadding,
1595
+ limiter: Ys()
1596
+ });
1597
+ }
1598
+ function ci(t) {
1599
+ return zs({
1600
+ padding: t.overflowPadding,
1601
+ apply({ elements: e, rects: n, availableHeight: o, availableWidth: s }) {
1602
+ const i = e.floating, r = Math.round(n.reference.width);
1603
+ s = Math.floor(s), o = Math.floor(o), i.style.setProperty("--reference-width", `${r}px`), i.style.setProperty("--available-width", `${s}px`), i.style.setProperty("--available-height", `${o}px`);
1604
+ }
1605
+ });
1606
+ }
1607
+ function li(t) {
1608
+ if (t.hideWhenDetached)
1609
+ return Ks({
1610
+ strategy: "referenceHidden",
1611
+ boundary: t.boundary?.() ?? "clippingAncestors"
1612
+ });
1613
+ }
1614
+ function ui(t) {
1615
+ return t ? t === !0 ? {
1616
+ ancestorResize: !0,
1617
+ ancestorScroll: !0,
1618
+ elementResize: !0,
1619
+ layoutShift: !0
1620
+ } : t : {};
1621
+ }
1622
+ function di(t, e, n = {}) {
1623
+ const o = Zs(t, n.getAnchorRect);
1624
+ if (!e || !o) return;
1625
+ const s = Object.assign({}, oi, n), i = e.querySelector("[data-part=arrow]"), r = [
1626
+ ii(i, s),
1627
+ ri(s),
1628
+ ai(s),
1629
+ si(i, s),
1630
+ ei(i),
1631
+ Js,
1632
+ ci(s),
1633
+ li(s),
1634
+ ti
1635
+ ], { placement: a, strategy: c, onComplete: l, onPositioned: f } = s, h = async () => {
1636
+ if (!o || !e) return;
1637
+ const m = await qs(o, e, {
1638
+ placement: a,
1639
+ middleware: r,
1640
+ strategy: c
1641
+ });
1642
+ l?.(m), f?.({ placed: !0 });
1643
+ const w = Tt(e), g = qe(w, m.x), x = qe(w, m.y);
1644
+ e.style.setProperty("--x", `${g}px`), e.style.setProperty("--y", `${x}px`), s.hideWhenDetached && (m.middlewareData.hide?.referenceHidden ? (e.style.setProperty("visibility", "hidden"), e.style.setProperty("pointer-events", "none")) : (e.style.removeProperty("visibility"), e.style.removeProperty("pointer-events")));
1645
+ const O = e.firstElementChild;
1646
+ if (O) {
1647
+ const P = Yo(O);
1648
+ e.style.setProperty("--z-index", P.zIndex);
1649
+ }
1650
+ }, u = async () => {
1651
+ n.updatePosition ? (await n.updatePosition({ updatePosition: h }), f?.({ placed: !0 })) : await h();
1652
+ }, d = ui(s.listeners), p = s.listeners ? Ws(o, e, u, d) : xn;
1653
+ return u(), () => {
1654
+ p?.(), f?.({ placed: !1 });
1655
+ };
1656
+ }
1657
+ function Xe(t, e, n = {}) {
1658
+ const { defer: o, ...s } = n, i = o ? q : (a) => a(), r = [];
1659
+ return r.push(i(() => {
1660
+ const a = typeof t == "function" ? t() : t, c = typeof e == "function" ? e() : e;
1661
+ r.push(di(a, c, s));
1662
+ })), () => {
1663
+ r.forEach((a) => a?.());
1664
+ };
1665
+ }
1666
+ const fi = {
1667
+ bottom: "rotate(45deg)",
1668
+ left: "rotate(135deg)",
1669
+ top: "rotate(225deg)",
1670
+ right: "rotate(315deg)"
1671
+ };
1672
+ function hi(t = {}) {
1673
+ const { placement: e, sameWidth: n, fitViewport: o, strategy: s = "absolute" } = t;
1674
+ return {
1675
+ arrow: {
1676
+ position: "absolute",
1677
+ width: et.arrowSize.reference,
1678
+ height: et.arrowSize.reference,
1679
+ [et.arrowSizeHalf.variable]: `calc(${et.arrowSize.reference} / 2)`,
1680
+ [et.arrowOffset.variable]: `calc(${et.arrowSizeHalf.reference} * -1)`
1681
+ },
1682
+ arrowTip: {
1683
+ transform: e ? fi[e.split("-")[0]] : void 0,
1684
+ background: et.arrowBg.reference,
1685
+ top: "0",
1686
+ left: "0",
1687
+ width: "100%",
1688
+ height: "100%",
1689
+ position: "absolute",
1690
+ zIndex: "inherit"
1691
+ },
1692
+ floating: {
1693
+ position: s,
1694
+ isolation: "isolate",
1695
+ minWidth: n ? void 0 : "max-content",
1696
+ width: n ? "var(--reference-width)" : void 0,
1697
+ maxWidth: o ? "var(--available-width)" : void 0,
1698
+ maxHeight: o ? "var(--available-height)" : void 0,
1699
+ top: "0px",
1700
+ left: "0px",
1701
+ transform: e ? "translate3d(var(--x), var(--y), 0)" : "translate3d(0, -100vh, 0)",
1702
+ zIndex: "var(--z-index)"
1703
+ }
1704
+ };
1705
+ }
1706
+ let Et = /* @__PURE__ */ new WeakMap(), Ht = /* @__PURE__ */ new WeakMap(), le = {}, ue = 0;
1707
+ function In(t) {
1708
+ return t && (t.host || In(t.parentNode));
1709
+ }
1710
+ function pi(t, e) {
1711
+ return e.map((n) => {
1712
+ if (t.contains(n)) return n;
1713
+ const o = In(n);
1714
+ return o && t.contains(o) ? o : (console.error("[@destyler/aria-hidden] target", n, "in not contained inside", t, ". Doing nothing"), null);
1715
+ }).filter((n) => !!n);
1716
+ }
1717
+ function gi(t) {
1718
+ return t.localName === "next-route-announcer" || t.localName === "script" || t.hasAttribute("aria-live") ? !0 : t.matches("[data-live-announcer]");
1719
+ }
1720
+ function mi(t, e) {
1721
+ const { parentNode: n, markerName: o, controlAttribute: s, explicitBooleanValue: i } = e, r = pi(n, Array.isArray(t) ? t : [t]);
1722
+ le[o] ||= /* @__PURE__ */ new WeakMap();
1723
+ const a = le[o], c = [], l = /* @__PURE__ */ new Set(), f = new Set(r), h = (d) => {
1724
+ !d || l.has(d) || (l.add(d), h(d.parentNode));
1725
+ };
1726
+ r.forEach(h);
1727
+ const u = (d) => {
1728
+ !d || f.has(d) || Array.prototype.forEach.call(d.children, (p) => {
1729
+ if (l.has(p)) u(p);
1730
+ else try {
1731
+ if (gi(p)) return;
1732
+ const m = p.getAttribute(s), w = i ? m === "true" : m !== null && m !== "false", g = (Et.get(p) || 0) + 1, x = (a.get(p) || 0) + 1;
1733
+ Et.set(p, g), a.set(p, x), c.push(p), g === 1 && w && Ht.set(p, !0), x === 1 && p.setAttribute(o, ""), w || p.setAttribute(s, i ? "true" : "");
1734
+ } catch (m) {
1735
+ console.error("[@destyler/aria-hidden] cannot operate on ", p, m);
1736
+ }
1737
+ });
1738
+ };
1739
+ return u(n), l.clear(), ue++, () => {
1740
+ c.forEach((d) => {
1741
+ const p = Et.get(d) - 1, m = a.get(d) - 1;
1742
+ Et.set(d, p), a.set(d, m), p || (Ht.has(d) || d.removeAttribute(s), Ht.delete(d)), m || d.removeAttribute(o);
1743
+ }), ue--, ue || (Et = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), Ht = /* @__PURE__ */ new WeakMap(), le = {});
1744
+ };
1745
+ }
1746
+ function yi(t) {
1747
+ return (Array.isArray(t) ? t[0] : t).ownerDocument.body;
1748
+ }
1749
+ function bi(t, e = yi(t), n = "data-aria-hidden") {
1750
+ if (e)
1751
+ return mi(t, {
1752
+ parentNode: e,
1753
+ markerName: n,
1754
+ controlAttribute: "aria-hidden",
1755
+ explicitBooleanValue: !0
1756
+ });
1757
+ }
1758
+ function vi(t) {
1759
+ const e = requestAnimationFrame(() => t());
1760
+ return () => cancelAnimationFrame(e);
1761
+ }
1762
+ function wi(t, e = {}) {
1763
+ const { defer: n = !0 } = e, o = n ? vi : (i) => i(), s = [];
1764
+ return s.push(o(() => {
1765
+ const r = (typeof t == "function" ? t() : t).filter(Boolean);
1766
+ r.length !== 0 && s.push(bi(r));
1767
+ })), () => {
1768
+ s.forEach((i) => i?.());
1769
+ };
1770
+ }
1771
+ function xi(t) {
1772
+ const e = {
1773
+ each(n) {
1774
+ for (let o = 0; o < t.frames?.length; o += 1) {
1775
+ const s = t.frames[o];
1776
+ s && n(s);
1777
+ }
1778
+ },
1779
+ addEventListener(n, o, s) {
1780
+ return e.each((i) => {
1781
+ try {
1782
+ i.document.addEventListener(n, o, s);
1783
+ } catch {
1784
+ }
1785
+ }), () => {
1786
+ try {
1787
+ e.removeEventListener(n, o, s);
1788
+ } catch {
1789
+ }
1790
+ };
1791
+ },
1792
+ removeEventListener(n, o, s) {
1793
+ e.each((i) => {
1794
+ try {
1795
+ i.document.removeEventListener(n, o, s);
1796
+ } catch {
1797
+ }
1798
+ });
1799
+ }
1800
+ };
1801
+ return e;
1802
+ }
1803
+ function Ei(t) {
1804
+ const e = t.frameElement != null ? t.parent : null;
1805
+ return {
1806
+ addEventListener: (n, o, s) => {
1807
+ try {
1808
+ e?.addEventListener(n, o, s);
1809
+ } catch {
1810
+ }
1811
+ return () => {
1812
+ try {
1813
+ e?.removeEventListener(n, o, s);
1814
+ } catch {
1815
+ }
1816
+ };
1817
+ },
1818
+ removeEventListener: (n, o, s) => {
1819
+ try {
1820
+ e?.removeEventListener(n, o, s);
1821
+ } catch {
1822
+ }
1823
+ }
1824
+ };
1825
+ }
1826
+ const Ze = "pointerdown.outside", Qe = "focus.outside";
1827
+ function Oi(t) {
1828
+ for (const e of t) if (L(e) && dt(e)) return !0;
1829
+ return !1;
1830
+ }
1831
+ const Dn = (t) => "clientY" in t;
1832
+ function Ai(t, e) {
1833
+ if (!Dn(e) || !t) return !1;
1834
+ const n = t.getBoundingClientRect();
1835
+ return n.width === 0 || n.height === 0 ? !1 : n.top <= e.clientY && e.clientY <= n.top + n.height && n.left <= e.clientX && e.clientX <= n.left + n.width;
1836
+ }
1837
+ function ki(t, e) {
1838
+ return t.y <= e.y && e.y <= t.y + t.height && t.x <= e.x && e.x <= t.x + t.width;
1839
+ }
1840
+ function Je(t, e) {
1841
+ if (!e || !Dn(t)) return !1;
1842
+ const n = e.scrollHeight > e.clientHeight, o = n && t.clientX > e.offsetLeft + e.clientWidth, s = e.scrollWidth > e.clientWidth, i = s && t.clientY > e.offsetTop + e.clientHeight, r = {
1843
+ x: e.offsetLeft,
1844
+ y: e.offsetTop,
1845
+ width: e.clientWidth + (n ? 16 : 0),
1846
+ height: e.clientHeight + (s ? 16 : 0)
1847
+ }, a = {
1848
+ x: t.clientX,
1849
+ y: t.clientY
1850
+ };
1851
+ return ki(r, a) ? o || i : !1;
1852
+ }
1853
+ function Si(t, e) {
1854
+ const { exclude: n, onFocusOutside: o, onPointerDownOutside: s, onInteractOutside: i, defer: r } = e;
1855
+ if (!t) return;
1856
+ const a = gt(t), c = Tt(t), l = xi(c), f = Ei(c);
1857
+ function h(g) {
1858
+ const x = ut(g);
1859
+ if (!L(x) || !x.isConnected || Xt(t, x) || Ai(t, g)) return !1;
1860
+ const O = a.querySelector(`[aria-controls="${t.id}"]`);
1861
+ if (O) {
1862
+ const y = me(O);
1863
+ if (Je(g, y)) return !1;
1864
+ }
1865
+ const P = me(t);
1866
+ return Je(g, P) ? !1 : !n?.(x);
1867
+ }
1868
+ const u = /* @__PURE__ */ new Set();
1869
+ function d(g) {
1870
+ function x() {
1871
+ const O = r ? q : (y) => y(), P = g.composedPath?.() ?? [g.target];
1872
+ O(() => {
1873
+ if (!(!t || !h(g))) {
1874
+ if (s || i) {
1875
+ const y = Ge(s, i);
1876
+ t.addEventListener(Ze, y, { once: !0 });
1877
+ }
1878
+ tn(t, Ze, {
1879
+ bubbles: !1,
1880
+ cancelable: !0,
1881
+ detail: {
1882
+ originalEvent: g,
1883
+ contextmenu: ns(g),
1884
+ focusable: Oi(P)
1885
+ }
1886
+ });
1887
+ }
1888
+ });
1889
+ }
1890
+ g.pointerType === "touch" ? (u.forEach((O) => O()), u.add(H(a, "click", x, { once: !0 })), u.add(f.addEventListener("click", x, { once: !0 })), u.add(l.addEventListener("click", x, { once: !0 }))) : x();
1891
+ }
1892
+ const p = /* @__PURE__ */ new Set(), m = setTimeout(() => {
1893
+ p.add(H(a, "pointerdown", d, !0)), p.add(f.addEventListener("pointerdown", d, !0)), p.add(l.addEventListener("pointerdown", d, !0));
1894
+ }, 0);
1895
+ function w(g) {
1896
+ (r ? q : (O) => O())(() => {
1897
+ if (!(!t || !h(g))) {
1898
+ if (o || i) {
1899
+ const O = Ge(o, i);
1900
+ t.addEventListener(Qe, O, { once: !0 });
1901
+ }
1902
+ tn(t, Qe, {
1903
+ bubbles: !1,
1904
+ cancelable: !0,
1905
+ detail: {
1906
+ originalEvent: g,
1907
+ contextmenu: !1,
1908
+ focusable: dt(ut(g))
1909
+ }
1910
+ });
1911
+ }
1912
+ });
1913
+ }
1914
+ return p.add(H(a, "focusin", w, !0)), p.add(f.addEventListener("focusin", w, !0)), p.add(l.addEventListener("focusin", w, !0)), () => {
1915
+ clearTimeout(m), u.forEach((g) => g()), p.forEach((g) => g());
1916
+ };
1917
+ }
1918
+ function Ti(t, e) {
1919
+ const { defer: n } = e, o = n ? q : (i) => i(), s = [];
1920
+ return s.push(o(() => {
1921
+ const i = typeof t == "function" ? t() : t;
1922
+ s.push(Si(i, e));
1923
+ })), () => {
1924
+ s.forEach((i) => i?.());
1925
+ };
1926
+ }
1927
+ function tn(t, e, n) {
1928
+ const o = t.ownerDocument.defaultView || window, s = new o.CustomEvent(e, n);
1929
+ return t.dispatchEvent(s);
1930
+ }
1931
+ function Pi(t, e) {
1932
+ const n = (o) => {
1933
+ o.key === "Escape" && (o.isComposing || e?.(o));
1934
+ };
1935
+ return H(gt(t), "keydown", n, { capture: !0 });
1936
+ }
1937
+ const $ = {
1938
+ layers: [],
1939
+ branches: [],
1940
+ count() {
1941
+ return this.layers.length;
1942
+ },
1943
+ pointerBlockingLayers() {
1944
+ return this.layers.filter((t) => t.pointerBlocking);
1945
+ },
1946
+ topMostPointerBlockingLayer() {
1947
+ return [...this.pointerBlockingLayers()].slice(-1)[0];
1948
+ },
1949
+ hasPointerBlockingLayer() {
1950
+ return this.pointerBlockingLayers().length > 0;
1951
+ },
1952
+ isBelowPointerBlockingLayer(t) {
1953
+ const e = this.indexOf(t), n = this.topMostPointerBlockingLayer() ? this.indexOf(this.topMostPointerBlockingLayer()?.node) : -1;
1954
+ return e < n;
1955
+ },
1956
+ isTopMost(t) {
1957
+ return this.layers[this.count() - 1]?.node === t;
1958
+ },
1959
+ getNestedLayers(t) {
1960
+ return Array.from(this.layers).slice(this.indexOf(t) + 1);
1961
+ },
1962
+ isInNestedLayer(t, e) {
1963
+ return this.getNestedLayers(t).some((n) => Xt(n.node, e));
1964
+ },
1965
+ isInBranch(t) {
1966
+ return Array.from(this.branches).some((e) => Xt(e, t));
1967
+ },
1968
+ add(t) {
1969
+ const e = this.layers.push(t);
1970
+ t.node.style.setProperty("--layer-index", `${e}`);
1971
+ },
1972
+ addBranch(t) {
1973
+ this.branches.push(t);
1974
+ },
1975
+ remove(t) {
1976
+ const e = this.indexOf(t);
1977
+ e < 0 || (e < this.count() - 1 && this.getNestedLayers(t).forEach((o) => o.dismiss()), this.layers.splice(e, 1), t.style.removeProperty("--layer-index"));
1978
+ },
1979
+ removeBranch(t) {
1980
+ const e = this.branches.indexOf(t);
1981
+ e >= 0 && this.branches.splice(e, 1);
1982
+ },
1983
+ indexOf(t) {
1984
+ return this.layers.findIndex((e) => e.node === t);
1985
+ },
1986
+ dismiss(t) {
1987
+ this.layers[this.indexOf(t)]?.dismiss();
1988
+ },
1989
+ clear() {
1990
+ this.remove(this.layers[0].node);
1991
+ }
1992
+ };
1993
+ let en;
1994
+ function nn() {
1995
+ $.layers.forEach(({ node: t }) => {
1996
+ t.style.pointerEvents = $.isBelowPointerBlockingLayer(t) ? "none" : "auto";
1997
+ });
1998
+ }
1999
+ function Ci(t) {
2000
+ t.style.pointerEvents = "";
2001
+ }
2002
+ function Ni(t, e) {
2003
+ const n = gt(t), o = [];
2004
+ if ($.hasPointerBlockingLayer() && !n.body.hasAttribute("data-inert") && (en = document.body.style.pointerEvents, queueMicrotask(() => {
2005
+ n.body.style.pointerEvents = "none", n.body.setAttribute("data-inert", "");
2006
+ })), e) {
2007
+ const s = vs(e, (i) => {
2008
+ o.push(ms(i, { pointerEvents: "auto" }));
2009
+ });
2010
+ o.push(s);
2011
+ }
2012
+ return () => {
2013
+ $.hasPointerBlockingLayer() || (queueMicrotask(() => {
2014
+ n.body.style.pointerEvents = en, n.body.removeAttribute("data-inert"), n.body.style.length === 0 && n.body.removeAttribute("style");
2015
+ }), o.forEach((s) => s()));
2016
+ };
2017
+ }
2018
+ function Fi(t, e) {
2019
+ if (!t) throw new Error("[@destyler/dismissable] node is `null` or `undefined`");
2020
+ const { onDismiss: n, pointerBlocking: o, exclude: s, debug: i } = e, r = {
2021
+ dismiss: n,
2022
+ node: t,
2023
+ pointerBlocking: o
2024
+ };
2025
+ $.add(r), nn();
2026
+ function a(u) {
2027
+ const d = ut(u.detail.originalEvent);
2028
+ $.isBelowPointerBlockingLayer(t) || $.isInBranch(d) || (e.onPointerDownOutside?.(u), e.onInteractOutside?.(u), !u.defaultPrevented && (i && console.log("onPointerDownOutside:", u.detail.originalEvent), n?.()));
2029
+ }
2030
+ function c(u) {
2031
+ const d = ut(u.detail.originalEvent);
2032
+ $.isInBranch(d) || (e.onFocusOutside?.(u), e.onInteractOutside?.(u), !u.defaultPrevented && (i && console.log("onFocusOutside:", u.detail.originalEvent), n?.()));
2033
+ }
2034
+ function l(u) {
2035
+ $.isTopMost(t) && (e.onEscapeKeyDown?.(u), !u.defaultPrevented && n && (u.preventDefault(), n()));
2036
+ }
2037
+ function f(u) {
2038
+ if (!t) return !1;
2039
+ const d = typeof s == "function" ? s() : s, p = Array.isArray(d) ? d : [d], m = e.persistentElements?.map((w) => w()).filter(L);
2040
+ return m && p.push(...m), p.some((w) => Xt(w, u)) || $.isInNestedLayer(t, u);
2041
+ }
2042
+ const h = [
2043
+ o ? Ni(t, e.persistentElements) : void 0,
2044
+ Pi(t, l),
2045
+ Ti(t, {
2046
+ exclude: f,
2047
+ onFocusOutside: c,
2048
+ onPointerDownOutside: a,
2049
+ defer: e.defer
2050
+ })
2051
+ ];
2052
+ return () => {
2053
+ $.remove(t), nn(), Ci(t), h.forEach((u) => u?.());
2054
+ };
2055
+ }
2056
+ function Ii(t, e) {
2057
+ const { defer: n } = e, o = n ? q : (i) => i(), s = [];
2058
+ return s.push(o(() => {
2059
+ const i = Qt(t) ? t() : t;
2060
+ s.push(Fi(i, e));
2061
+ })), () => {
2062
+ s.forEach((i) => i?.());
2063
+ };
2064
+ }
2065
+ const Ft = (t) => t.key === "Tab", It = (t, ...e) => typeof t == "function" ? t(...e) : t, Di = (t) => !t.isComposing && t.key === "Escape", on = (t) => setTimeout(t, 0);
2066
+ function Li(t) {
2067
+ return t.localName === "input" && "select" in t && typeof t.select == "function";
2068
+ }
2069
+ const sn = {
2070
+ activateTrap(t, e) {
2071
+ if (t.length > 0) {
2072
+ const o = t[t.length - 1];
2073
+ o !== e && o.pause();
2074
+ }
2075
+ const n = t.indexOf(e);
2076
+ n === -1 || t.splice(n, 1), t.push(e);
2077
+ },
2078
+ deactivateTrap(t, e) {
2079
+ const n = t.indexOf(e);
2080
+ n !== -1 && t.splice(n, 1), t.length > 0 && t[t.length - 1].unpause();
2081
+ }
2082
+ }, Mi = [];
2083
+ var Ri = class {
2084
+ trapStack;
2085
+ config;
2086
+ doc;
2087
+ state = {
2088
+ containers: [],
2089
+ containerGroups: [],
2090
+ tabbableGroups: [],
2091
+ nodeFocusedBeforeActivation: null,
2092
+ mostRecentlyFocusedNode: null,
2093
+ active: !1,
2094
+ paused: !1,
2095
+ delayInitialFocusTimer: void 0,
2096
+ recentNavEvent: void 0
2097
+ };
2098
+ get active() {
2099
+ return this.state.active;
2100
+ }
2101
+ get paused() {
2102
+ return this.state.paused;
2103
+ }
2104
+ constructor(t, e) {
2105
+ this.trapStack = e.trapStack || Mi;
2106
+ const n = {
2107
+ returnFocusOnDeactivate: !0,
2108
+ escapeDeactivates: !0,
2109
+ delayInitialFocus: !0,
2110
+ isKeyForward(o) {
2111
+ return Ft(o) && !o.shiftKey;
2112
+ },
2113
+ isKeyBackward(o) {
2114
+ return Ft(o) && o.shiftKey;
2115
+ },
2116
+ ...e
2117
+ };
2118
+ this.doc = n.document || gt(Array.isArray(t) ? t[0] : t), this.config = n, this.updateContainerElements(t), this.setupMutationObserver();
2119
+ }
2120
+ findContainerIndex(t, e) {
2121
+ const n = typeof e?.composedPath == "function" ? e.composedPath() : void 0;
2122
+ return this.state.containerGroups.findIndex(({ container: o, tabbableNodes: s }) => o.contains(t) || n?.includes(o) || s.find((i) => i === t));
2123
+ }
2124
+ updateTabbableNodes() {
2125
+ if (this.state.containerGroups = this.state.containers.map((t) => {
2126
+ const e = Vt(t), n = Ne(t), o = e.length > 0 ? e[0] : void 0, s = e.length > 0 ? e[e.length - 1] : void 0, i = n.find((l) => lt(l)), r = n.slice().reverse().find((l) => lt(l)), a = !!e.find((l) => Ct(l) > 0);
2127
+ function c(l, f = !0) {
2128
+ const h = e.indexOf(l);
2129
+ return h < 0 ? f ? n.slice(n.indexOf(l) + 1).find((u) => lt(u)) : n.slice(0, n.indexOf(l)).reverse().find((u) => lt(u)) : e[h + (f ? 1 : -1)];
2130
+ }
2131
+ return {
2132
+ container: t,
2133
+ tabbableNodes: e,
2134
+ focusableNodes: n,
2135
+ posTabIndexesFound: a,
2136
+ firstTabbableNode: o,
2137
+ lastTabbableNode: s,
2138
+ firstDomTabbableNode: i,
2139
+ lastDomTabbableNode: r,
2140
+ nextTabbableNode: c
2141
+ };
2142
+ }), this.state.tabbableGroups = this.state.containerGroups.filter((t) => t.tabbableNodes.length > 0), this.state.tabbableGroups.length <= 0 && !this.getNodeForOption("fallbackFocus")) throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
2143
+ if (this.state.containerGroups.find((t) => t.posTabIndexesFound) && this.state.containerGroups.length > 1) throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
2144
+ }
2145
+ listenerCleanups = [];
2146
+ addListeners() {
2147
+ if (this.state.active)
2148
+ return sn.activateTrap(this.trapStack, this), this.state.delayInitialFocusTimer = this.config.delayInitialFocus ? on(() => {
2149
+ this.tryFocus(this.getInitialFocusNode());
2150
+ }) : this.tryFocus(this.getInitialFocusNode()), this.listenerCleanups.push(H(this.doc, "focusin", this.handleFocus, !0), H(this.doc, "mousedown", this.handlePointerDown, {
2151
+ capture: !0,
2152
+ passive: !1
2153
+ }), H(this.doc, "touchstart", this.handlePointerDown, {
2154
+ capture: !0,
2155
+ passive: !1
2156
+ }), H(this.doc, "click", this.handleClick, {
2157
+ capture: !0,
2158
+ passive: !1
2159
+ }), H(this.doc, "keydown", this.handleTabKey, {
2160
+ capture: !0,
2161
+ passive: !1
2162
+ }), H(this.doc, "keydown", this.handleEscapeKey)), this;
2163
+ }
2164
+ removeListeners() {
2165
+ if (this.state.active)
2166
+ return this.listenerCleanups.forEach((t) => t()), this.listenerCleanups = [], this;
2167
+ }
2168
+ handleFocus = (t) => {
2169
+ const e = ut(t), n = this.findContainerIndex(e, t) >= 0;
2170
+ if (n || Te(e))
2171
+ n && (this.state.mostRecentlyFocusedNode = e);
2172
+ else {
2173
+ t.stopImmediatePropagation();
2174
+ let o, s = !0;
2175
+ if (this.state.mostRecentlyFocusedNode)
2176
+ if (Ct(this.state.mostRecentlyFocusedNode) > 0) {
2177
+ const i = this.findContainerIndex(this.state.mostRecentlyFocusedNode), { tabbableNodes: r } = this.state.containerGroups[i];
2178
+ if (r.length > 0) {
2179
+ const a = r.findIndex((c) => c === this.state.mostRecentlyFocusedNode);
2180
+ a >= 0 && (this.config.isKeyForward(this.state.recentNavEvent) ? a + 1 < r.length && (o = r[a + 1], s = !1) : a - 1 >= 0 && (o = r[a - 1], s = !1));
2181
+ }
2182
+ } else this.state.containerGroups.some((i) => i.tabbableNodes.some((r) => Ct(r) > 0)) || (s = !1);
2183
+ else s = !1;
2184
+ s && (o = this.findNextNavNode({
2185
+ target: this.state.mostRecentlyFocusedNode,
2186
+ isBackward: this.config.isKeyBackward(this.state.recentNavEvent)
2187
+ })), o ? this.tryFocus(o) : this.tryFocus(this.state.mostRecentlyFocusedNode || this.getInitialFocusNode());
2188
+ }
2189
+ this.state.recentNavEvent = void 0;
2190
+ };
2191
+ handlePointerDown = (t) => {
2192
+ const e = ut(t);
2193
+ if (!(this.findContainerIndex(e, t) >= 0)) {
2194
+ if (It(this.config.clickOutsideDeactivates, t)) {
2195
+ this.deactivate({ returnFocus: this.config.returnFocusOnDeactivate });
2196
+ return;
2197
+ }
2198
+ It(this.config.allowOutsideClick, t) || t.preventDefault();
2199
+ }
2200
+ };
2201
+ handleClick = (t) => {
2202
+ const e = ut(t);
2203
+ this.findContainerIndex(e, t) >= 0 || It(this.config.clickOutsideDeactivates, t) || It(this.config.allowOutsideClick, t) || (t.preventDefault(), t.stopImmediatePropagation());
2204
+ };
2205
+ handleTabKey = (t) => {
2206
+ if (this.config.isKeyForward(t) || this.config.isKeyBackward(t)) {
2207
+ this.state.recentNavEvent = t;
2208
+ const e = this.config.isKeyBackward(t), n = this.findNextNavNode({
2209
+ event: t,
2210
+ isBackward: e
2211
+ });
2212
+ if (!n) return;
2213
+ Ft(t) && t.preventDefault(), this.tryFocus(n);
2214
+ }
2215
+ };
2216
+ handleEscapeKey = (t) => {
2217
+ Di(t) && It(this.config.escapeDeactivates, t) !== !1 && (t.preventDefault(), this.deactivate());
2218
+ };
2219
+ _mutationObserver;
2220
+ setupMutationObserver = () => {
2221
+ const t = this.doc.defaultView || window;
2222
+ this._mutationObserver = new t.MutationObserver((e) => {
2223
+ e.some((o) => Array.from(o.removedNodes).includes(this.state.mostRecentlyFocusedNode)) && this.tryFocus(this.getInitialFocusNode());
2224
+ });
2225
+ };
2226
+ updateObservedNodes = () => {
2227
+ this._mutationObserver?.disconnect(), this.state.active && !this.state.paused && this.state.containers.forEach((t) => {
2228
+ this._mutationObserver?.observe(t, {
2229
+ subtree: !0,
2230
+ childList: !0
2231
+ });
2232
+ });
2233
+ };
2234
+ getInitialFocusNode = () => {
2235
+ let t = this.getNodeForOption("initialFocus", { hasFallback: !0 });
2236
+ if (t === !1) return !1;
2237
+ if (t === void 0 || t && !dt(t)) if (this.findContainerIndex(this.doc.activeElement) >= 0) t = this.doc.activeElement;
2238
+ else {
2239
+ const e = this.state.tabbableGroups[0];
2240
+ t = e && e.firstTabbableNode || this.getNodeForOption("fallbackFocus");
2241
+ }
2242
+ else t === null && (t = this.getNodeForOption("fallbackFocus"));
2243
+ if (!t) throw new Error("Your focus-trap needs to have at least one focusable element");
2244
+ return t.isConnected || (t = this.getNodeForOption("fallbackFocus")), t;
2245
+ };
2246
+ tryFocus = (t) => {
2247
+ if (t !== !1 && t !== bn(this.doc)) {
2248
+ if (!t || !t.focus) {
2249
+ this.tryFocus(this.getInitialFocusNode());
2250
+ return;
2251
+ }
2252
+ t.focus({ preventScroll: !!this.config.preventScroll }), this.state.mostRecentlyFocusedNode = t, Li(t) && t.select();
2253
+ }
2254
+ };
2255
+ activate(t) {
2256
+ if (this.state.active) return this;
2257
+ const e = this.getOption(t, "onActivate"), n = this.getOption(t, "onPostActivate"), o = this.getOption(t, "checkCanFocusTrap");
2258
+ o || this.updateTabbableNodes(), this.state.active = !0, this.state.paused = !1, this.state.nodeFocusedBeforeActivation = this.doc.activeElement || null, e?.();
2259
+ const s = () => {
2260
+ o && this.updateTabbableNodes(), this.addListeners(), this.updateObservedNodes(), n?.();
2261
+ };
2262
+ return o ? (o(this.state.containers.concat()).then(s, s), this) : (s(), this);
2263
+ }
2264
+ deactivate = (t) => {
2265
+ if (!this.state.active) return this;
2266
+ const e = {
2267
+ onDeactivate: this.config.onDeactivate,
2268
+ onPostDeactivate: this.config.onPostDeactivate,
2269
+ checkCanReturnFocus: this.config.checkCanReturnFocus,
2270
+ ...t
2271
+ };
2272
+ clearTimeout(this.state.delayInitialFocusTimer), this.state.delayInitialFocusTimer = void 0, this.removeListeners(), this.state.active = !1, this.state.paused = !1, this.updateObservedNodes(), sn.deactivateTrap(this.trapStack, this);
2273
+ const n = this.getOption(e, "onDeactivate"), o = this.getOption(e, "onPostDeactivate"), s = this.getOption(e, "checkCanReturnFocus"), i = this.getOption(e, "returnFocus", "returnFocusOnDeactivate");
2274
+ n?.();
2275
+ const r = () => {
2276
+ on(() => {
2277
+ if (i) {
2278
+ const a = this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);
2279
+ this.tryFocus(a);
2280
+ }
2281
+ o?.();
2282
+ });
2283
+ };
2284
+ if (i && s) {
2285
+ const a = this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);
2286
+ return s(a).then(r, r), this;
2287
+ }
2288
+ return r(), this;
2289
+ };
2290
+ pause = (t) => {
2291
+ if (this.state.paused || !this.state.active) return this;
2292
+ const e = this.getOption(t, "onPause"), n = this.getOption(t, "onPostPause");
2293
+ return this.state.paused = !0, e?.(), this.removeListeners(), this.updateObservedNodes(), n?.(), this;
2294
+ };
2295
+ unpause = (t) => {
2296
+ if (!this.state.paused || !this.state.active) return this;
2297
+ const e = this.getOption(t, "onUnpause"), n = this.getOption(t, "onPostUnpause");
2298
+ return this.state.paused = !1, e?.(), this.updateTabbableNodes(), this.addListeners(), this.updateObservedNodes(), n?.(), this;
2299
+ };
2300
+ updateContainerElements = (t) => (this.state.containers = Array.isArray(t) ? t.filter(Boolean) : [t].filter(Boolean), this.state.active && this.updateTabbableNodes(), this.updateObservedNodes(), this);
2301
+ getReturnFocusNode = (t) => {
2302
+ const e = this.getNodeForOption("setReturnFocus", { params: [t] });
2303
+ return e || (e === !1 ? !1 : t);
2304
+ };
2305
+ getOption = (t, e, n) => t && t[e] !== void 0 ? t[e] : this.config[n || e];
2306
+ getNodeForOption = (t, { hasFallback: e = !1, params: n = [] } = {}) => {
2307
+ let o = this.config[t];
2308
+ if (typeof o == "function" && (o = o(...n)), o === !0 && (o = void 0), !o) {
2309
+ if (o === void 0 || o === !1) return o;
2310
+ throw new Error(`\`${t}\` was specified but was not a node, or did not return a node`);
2311
+ }
2312
+ let s = o;
2313
+ if (typeof o == "string") {
2314
+ try {
2315
+ s = this.doc.querySelector(o);
2316
+ } catch (i) {
2317
+ throw new Error(`\`${t}\` appears to be an invalid selector; error="${i.message}"`);
2318
+ }
2319
+ if (!s && !e)
2320
+ throw new Error(`\`${t}\` as selector refers to no known node`);
2321
+ }
2322
+ return s;
2323
+ };
2324
+ findNextNavNode = (t) => {
2325
+ const { event: e, isBackward: n = !1 } = t, o = t.target || ut(e);
2326
+ this.updateTabbableNodes();
2327
+ let s = null;
2328
+ if (this.state.tabbableGroups.length > 0) {
2329
+ const i = this.findContainerIndex(o, e), r = i >= 0 ? this.state.containerGroups[i] : void 0;
2330
+ if (i < 0) n ? s = this.state.tabbableGroups[this.state.tabbableGroups.length - 1].lastTabbableNode : s = this.state.tabbableGroups[0].firstTabbableNode;
2331
+ else if (n) {
2332
+ let a = this.state.tabbableGroups.findIndex(({ firstTabbableNode: c }) => o === c);
2333
+ if (a < 0 && (r?.container === o || dt(o) && !lt(o) && !r?.nextTabbableNode(o, !1)) && (a = i), a >= 0) {
2334
+ const c = a === 0 ? this.state.tabbableGroups.length - 1 : a - 1, l = this.state.tabbableGroups[c];
2335
+ s = Ct(o) >= 0 ? l.lastTabbableNode : l.lastDomTabbableNode;
2336
+ } else Ft(e) || (s = r?.nextTabbableNode(o, !1));
2337
+ } else {
2338
+ let a = this.state.tabbableGroups.findIndex(({ lastTabbableNode: c }) => o === c);
2339
+ if (a < 0 && (r?.container === o || dt(o) && !lt(o) && !r?.nextTabbableNode(o)) && (a = i), a >= 0) {
2340
+ const c = a === this.state.tabbableGroups.length - 1 ? 0 : a + 1, l = this.state.tabbableGroups[c];
2341
+ s = Ct(o) >= 0 ? l.firstTabbableNode : l.firstDomTabbableNode;
2342
+ } else Ft(e) || (s = r?.nextTabbableNode(o));
2343
+ }
2344
+ } else s = this.getNodeForOption("fallbackFocus");
2345
+ return s;
2346
+ };
2347
+ };
2348
+ function _i(t, e = {}) {
2349
+ let n;
2350
+ const o = q(() => {
2351
+ const s = typeof t == "function" ? t() : t;
2352
+ if (s) {
2353
+ n = new Ri(s, {
2354
+ escapeDeactivates: !1,
2355
+ allowOutsideClick: !0,
2356
+ preventScroll: !0,
2357
+ returnFocusOnDeactivate: !0,
2358
+ delayInitialFocus: !1,
2359
+ fallbackFocus: s,
2360
+ ...e,
2361
+ document: gt(s)
2362
+ });
2363
+ try {
2364
+ n.activate();
2365
+ } catch {
2366
+ }
2367
+ }
2368
+ });
2369
+ return function() {
2370
+ n?.deactivate(), o();
2371
+ };
2372
+ }
2373
+ const de = "data-scroll-lock";
2374
+ function rn(t, e) {
2375
+ if (!t) return;
2376
+ const n = Object.keys(e).reduce((o, s) => (o[s] = t.style.getPropertyValue(s), o), {});
2377
+ return Object.assign(t.style, e), () => {
2378
+ Object.assign(t.style, n);
2379
+ };
2380
+ }
2381
+ function Bi(t, e, n) {
2382
+ if (!t) return;
2383
+ const o = t.style.getPropertyValue(e);
2384
+ return t.style.setProperty(e, n), () => {
2385
+ o ? t.style.setProperty(e, o) : t.style.removeProperty(e);
2386
+ };
2387
+ }
2388
+ function Vi(t) {
2389
+ const e = t.getBoundingClientRect().left;
2390
+ return Math.round(e) + t.scrollLeft ? "paddingLeft" : "paddingRight";
2391
+ }
2392
+ function ji(t) {
2393
+ const e = t ?? document, n = e.defaultView ?? window, { documentElement: o, body: s } = e;
2394
+ if (s.hasAttribute(de)) return;
2395
+ s.setAttribute(de, "");
2396
+ const r = n.innerWidth - o.clientWidth, a = () => Bi(o, "--scrollbar-width", `${r}px`), c = Vi(o), l = () => rn(s, {
2397
+ overflow: "hidden",
2398
+ [c]: `${r}px`
2399
+ }), f = () => {
2400
+ const { scrollX: u, scrollY: d, visualViewport: p } = n, m = p?.offsetLeft ?? 0, w = p?.offsetTop ?? 0, g = rn(s, {
2401
+ position: "fixed",
2402
+ overflow: "hidden",
2403
+ top: `${-(d - Math.floor(w))}px`,
2404
+ left: `${-(u - Math.floor(m))}px`,
2405
+ right: "0",
2406
+ [c]: `${r}px`
2407
+ });
2408
+ return () => {
2409
+ g?.(), n.scrollTo({
2410
+ left: u,
2411
+ top: d,
2412
+ behavior: "instant"
2413
+ });
2414
+ };
2415
+ }, h = [a(), ts() ? f() : l()];
2416
+ return () => {
2417
+ h.forEach((u) => u?.()), s.removeAttribute(de);
2418
+ };
2419
+ }
2420
+ const Wi = Symbol(), an = Object.getPrototypeOf, be = /* @__PURE__ */ new WeakMap(), $i = (t) => t && (be.has(t) ? be.get(t) : an(t) === Object.prototype || an(t) === Array.prototype), Hi = (t) => $i(t) && t[Wi] || null, cn = (t, e = !0) => {
2421
+ be.set(t, e);
2422
+ };
2423
+ function Gi() {
2424
+ if (typeof globalThis < "u" || typeof globalThis < "u") return globalThis;
2425
+ if (typeof window < "u") return window;
2426
+ }
2427
+ function Ln(t, e) {
2428
+ const n = Gi();
2429
+ return n ? (n[t] ||= e(), n[t]) : e();
2430
+ }
2431
+ const Mt = Ln("__destyler__refSet", () => /* @__PURE__ */ new WeakSet()), zi = (t) => typeof t == "object" && t !== null && "$$typeof" in t && "props" in t, Ki = (t) => typeof t == "object" && t !== null && "__v_isVNode" in t;
2432
+ function Ui(t) {
2433
+ return typeof t == "object" && t !== null && "nodeType" in t && typeof t.nodeName == "string";
2434
+ }
2435
+ const Yi = (t) => zi(t) || Ki(t) || Ui(t), ve = (t) => t !== null && typeof t == "object";
2436
+ function we(t) {
2437
+ return ve(t) && !Mt.has(t) && (Array.isArray(t) || !(Symbol.iterator in t)) && !Yi(t) && !(t instanceof WeakMap) && !(t instanceof WeakSet) && !(t instanceof Error) && typeof t != "number" && !(t instanceof Date) && typeof t != "string" && !(t instanceof RegExp) && !(t instanceof ArrayBuffer) && !(t instanceof Promise);
2438
+ }
2439
+ function ln(t, e, n) {
2440
+ typeof n.value == "object" && !we(n.value) && (n.value = bt(n.value)), !n.enumerable || n.get || n.set || !n.configurable || !n.writable || e === "__proto__" ? Object.defineProperty(t, e, n) : t[e] = n.value;
2441
+ }
2442
+ function bt(t) {
2443
+ if (typeof t != "object") return t;
2444
+ let e = 0, n, o, s;
2445
+ const i = Object.prototype.toString.call(t);
2446
+ if (i === "[object Object]" ? s = Object.create(Object.getPrototypeOf(t) || null) : i === "[object Array]" ? s = Array.from({ length: t.length }) : i === "[object Set]" ? (s = /* @__PURE__ */ new Set(), t.forEach((r) => {
2447
+ s.add(bt(r));
2448
+ })) : i === "[object Map]" ? (s = /* @__PURE__ */ new Map(), t.forEach((r, a) => {
2449
+ s.set(bt(a), bt(r));
2450
+ })) : i === "[object Date]" ? s = /* @__PURE__ */ new Date(+t) : i === "[object RegExp]" ? s = new RegExp(t.source, t.flags) : i === "[object DataView]" ? s = new t.constructor(bt(t.buffer)) : i === "[object ArrayBuffer]" ? s = t.slice(0) : i === "[object Blob]" ? s = t.slice() : i.slice(-6) === "Array]" && (s = new t.constructor(t)), s) {
2451
+ for (o = Object.getOwnPropertySymbols(t); e < o.length; e++) ln(s, o[e], Object.getOwnPropertyDescriptor(t, o[e]));
2452
+ for (e = 0, o = Object.getOwnPropertyNames(t); e < o.length; e++)
2453
+ Object.hasOwnProperty.call(s, n = o[e]) && s[n] === t[n] || ln(s, n, Object.getOwnPropertyDescriptor(t, n));
2454
+ }
2455
+ return s || t;
2456
+ }
2457
+ const yt = Ln("__destyler__proxyStateMap", () => /* @__PURE__ */ new WeakMap());
2458
+ function qi(t = Object.is, e = (a, c) => new Proxy(a, c), n = /* @__PURE__ */ new WeakMap(), o = (a, c) => {
2459
+ const l = n.get(a);
2460
+ if (l?.[0] === c) return l[1];
2461
+ const f = Array.isArray(a) ? [] : Object.create(Object.getPrototypeOf(a));
2462
+ return cn(f, !0), n.set(a, [c, f]), Reflect.ownKeys(a).forEach((h) => {
2463
+ const u = Reflect.get(a, h);
2464
+ Mt.has(u) ? (cn(u, !1), f[h] = u) : yt.has(u) ? f[h] = vt(u) : f[h] = u;
2465
+ }), Object.freeze(f);
2466
+ }, s = /* @__PURE__ */ new WeakMap(), i = [1, 1], r = (a) => {
2467
+ if (!ve(a)) throw new Error("object required");
2468
+ const c = s.get(a);
2469
+ if (c) return c;
2470
+ let l = i[0];
2471
+ const f = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Map(), u = (b, v = ++i[0]) => {
2472
+ l !== v && (l = v, f.forEach((E) => E(b, v)));
2473
+ };
2474
+ let d = i[1];
2475
+ const p = (b = ++i[1]) => (d !== b && !f.size && (d = b, h.forEach(([v]) => {
2476
+ const E = v[1](b);
2477
+ E > l && (l = E);
2478
+ })), l), m = (b) => (v, E) => {
2479
+ const S = [...v];
2480
+ S[1] = [b, ...S[1]], u(S, E);
2481
+ }, w = (b, v) => {
2482
+ if (f.size) {
2483
+ const E = v[3](m(b));
2484
+ h.set(b, [v, E]);
2485
+ } else h.set(b, [v]);
2486
+ }, g = (b) => {
2487
+ const v = h.get(b);
2488
+ v && (h.delete(b), v[1]?.());
2489
+ }, x = (b) => (f.add(b), f.size === 1 && h.forEach(([E], S) => {
2490
+ const C = E[3](m(S));
2491
+ h.set(S, [E, C]);
2492
+ }), () => {
2493
+ f.delete(b), f.size === 0 && h.forEach(([E, S], C) => {
2494
+ S && (S(), h.set(C, [E]));
2495
+ });
2496
+ }), O = Array.isArray(a) ? [] : Object.create(Object.getPrototypeOf(a)), y = e(O, {
2497
+ deleteProperty(b, v) {
2498
+ const E = Reflect.get(b, v);
2499
+ g(v);
2500
+ const S = Reflect.deleteProperty(b, v);
2501
+ return S && u([
2502
+ "delete",
2503
+ [v],
2504
+ E
2505
+ ]), S;
2506
+ },
2507
+ set(b, v, E, S) {
2508
+ const C = Reflect.has(b, v), N = Reflect.get(b, v, S);
2509
+ if (C && (t(N, E) || s.has(E) && t(N, s.get(E)))) return !0;
2510
+ g(v), ve(E) && (E = Hi(E) || E);
2511
+ let R = E;
2512
+ if (!Object.getOwnPropertyDescriptor(b, v)?.set) {
2513
+ !yt.has(E) && we(E) && (R = De(E));
2514
+ const I = !Mt.has(R) && yt.get(R);
2515
+ I && w(v, I);
2516
+ }
2517
+ return Reflect.set(b, v, R, S), u([
2518
+ "set",
2519
+ [v],
2520
+ E,
2521
+ N
2522
+ ]), !0;
2523
+ }
2524
+ });
2525
+ s.set(a, y);
2526
+ const k = [
2527
+ O,
2528
+ p,
2529
+ o,
2530
+ x
2531
+ ];
2532
+ return yt.set(y, k), Reflect.ownKeys(a).forEach((b) => {
2533
+ const v = Object.getOwnPropertyDescriptor(a, b);
2534
+ v.get || v.set ? Object.defineProperty(O, b, v) : y[b] = a[b];
2535
+ }), y;
2536
+ }) {
2537
+ return [
2538
+ r,
2539
+ yt,
2540
+ Mt,
2541
+ t,
2542
+ e,
2543
+ we,
2544
+ n,
2545
+ o,
2546
+ s,
2547
+ i
2548
+ ];
2549
+ }
2550
+ const [Xi] = qi();
2551
+ function De(t = {}) {
2552
+ return Xi(t);
2553
+ }
2554
+ function xe(t, e, n) {
2555
+ const o = yt.get(t);
2556
+ let s;
2557
+ const i = [], r = o[3];
2558
+ let a = !1;
2559
+ const l = r((f) => {
2560
+ if (i.push(f), n) {
2561
+ e(i.splice(0));
2562
+ return;
2563
+ }
2564
+ s || (s = Promise.resolve().then(() => {
2565
+ s = void 0, a && e(i.splice(0));
2566
+ }));
2567
+ });
2568
+ return a = !0, () => {
2569
+ a = !1, l();
2570
+ };
2571
+ }
2572
+ function vt(t) {
2573
+ const e = yt.get(t), [n, o, s] = e;
2574
+ return s(n, o());
2575
+ }
2576
+ function un(t) {
2577
+ return Mt.add(t), t;
2578
+ }
2579
+ function Zi(t, e) {
2580
+ const n = Object.keys(e);
2581
+ n.forEach((s) => {
2582
+ if (Object.getOwnPropertyDescriptor(t, s)) throw new Error("object property already defined");
2583
+ });
2584
+ const o = De(t);
2585
+ return n.forEach((s) => {
2586
+ const i = e[s], { get: r, set: a } = typeof i == "function" ? { get: i } : i, c = {};
2587
+ c.get = () => r(vt(o)), a && (c.set = (l) => a(o, l)), Object.defineProperty(o, s, c);
2588
+ }), o;
2589
+ }
2590
+ function Mn(t, ...e) {
2591
+ if (!$t(t)) throw new TypeError("Source argument must be a plain object");
2592
+ const n = t;
2593
+ for (const o of e) {
2594
+ if (!$t(o)) continue;
2595
+ const s = jt(o);
2596
+ for (const i in s) {
2597
+ if (!Object.prototype.hasOwnProperty.call(s, i) || i === "__proto__" || i === "constructor" || i === "prototype") continue;
2598
+ const r = n[i], a = o[i];
2599
+ $t(a) ? n[i] = $t(r) ? Mn(r, a) : { ...a } : n[i] = a;
2600
+ }
2601
+ }
2602
+ return n;
2603
+ }
2604
+ function W(t) {
2605
+ return ot(t) ? { type: t } : t;
2606
+ }
2607
+ function ct(t) {
2608
+ return t ? Zt(t) ? t.slice() : [t] : [];
2609
+ }
2610
+ function Rn(t) {
2611
+ return zt(t) && t.predicate != null;
2612
+ }
2613
+ const Qi = () => !0;
2614
+ function _n(t, e) {
2615
+ return t = t ?? Qi, (n, o, s) => {
2616
+ if (ot(t)) {
2617
+ const i = e[t];
2618
+ return Qt(i) ? i(n, o, s) : i;
2619
+ }
2620
+ return Rn(t) ? t.predicate(e)(n, o, s) : t?.(n, o, s);
2621
+ };
2622
+ }
2623
+ function fe(t, e) {
2624
+ return (n, o, s) => Rn(t) ? t.predicate(e)(n, o, s) : t;
2625
+ }
2626
+ let at = /* @__PURE__ */ function(t) {
2627
+ return t.NotStarted = "Not Started", t.Running = "Running", t.Stopped = "Stopped", t;
2628
+ }({}), tt = /* @__PURE__ */ function(t) {
2629
+ return t.Start = "machine.start", t.Stop = "machine.stop", t.Created = "machine.created", t.Init = "machine.init", t;
2630
+ }({}), dn = /* @__PURE__ */ function(t) {
2631
+ return t.Machine = "machine", t.Actor = "machine.actor", t;
2632
+ }({});
2633
+ function Ji(t) {
2634
+ const e = t.computed ?? nt({}), n = t.context ?? nt({}), o = t.initial ? t.states?.[t.initial]?.tags : [], s = De({
2635
+ value: t.initial ?? "",
2636
+ previousValue: "",
2637
+ event: nt({}),
2638
+ previousEvent: nt({}),
2639
+ context: Zi(n, e),
2640
+ done: !1,
2641
+ tags: o ?? [],
2642
+ hasTag(i) {
2643
+ return this.tags.includes(i);
2644
+ },
2645
+ matches(...i) {
2646
+ return i.includes(this.value);
2647
+ },
2648
+ can(i) {
2649
+ return nt(this).nextEvents.includes(i);
2650
+ },
2651
+ get nextEvents() {
2652
+ const i = t.states?.[this.value]?.on ?? {}, r = t?.on ?? {};
2653
+ return Object.keys({
2654
+ ...i,
2655
+ ...r
2656
+ });
2657
+ },
2658
+ get changed() {
2659
+ return this.event.value === tt.Init || !this.previousValue ? !1 : this.value !== this.previousValue;
2660
+ }
2661
+ });
2662
+ return nt(s);
2663
+ }
2664
+ function Dt(t, e) {
2665
+ return (n, o) => {
2666
+ if (xs(t)) return t;
2667
+ if (Qt(t)) return t(n, o);
2668
+ if (ot(t)) {
2669
+ const s = Number.parseFloat(t);
2670
+ if (!Number.isNaN(s)) return s;
2671
+ if (e) {
2672
+ const i = e?.[t];
2673
+ if (i === null) throw new Error(`[@destyler/xstate > determine-delay] Cannot determine delay for \`${t}\`. It is set to null in \`options.delays\``);
2674
+ return Qt(i) ? i(n, o) : i;
2675
+ }
2676
+ }
2677
+ };
2678
+ }
2679
+ function tr(t) {
2680
+ return ot(t) ? { target: t } : t;
2681
+ }
2682
+ function er(t, e) {
2683
+ return (n, o, s) => ct(t).map(tr).find((i) => _n(i.guard, e)(n, o, s) ?? i.target ?? i.actions);
2684
+ }
2685
+ var nr = class {
2686
+ status = at.NotStarted;
2687
+ state;
2688
+ initialState;
2689
+ initialContext;
2690
+ id;
2691
+ type = dn.Machine;
2692
+ activityEvents = /* @__PURE__ */ new Map();
2693
+ delayedEvents = /* @__PURE__ */ new Map();
2694
+ stateListeners = /* @__PURE__ */ new Set();
2695
+ doneListeners = /* @__PURE__ */ new Set();
2696
+ contextWatchers = /* @__PURE__ */ new Set();
2697
+ removeStateListener = xn;
2698
+ parent;
2699
+ children = /* @__PURE__ */ new Map();
2700
+ guardMap;
2701
+ actionMap;
2702
+ delayMap;
2703
+ activityMap;
2704
+ sync;
2705
+ options;
2706
+ config;
2707
+ constructor(t, e) {
2708
+ this.config = bt(t), this.options = bt(e ?? {}), this.id = this.config.id ?? `machine-${ze()}`, this.guardMap = this.options?.guards ?? {}, this.actionMap = this.options?.actions ?? {}, this.delayMap = this.options?.delays ?? {}, this.activityMap = this.options?.activities ?? {}, this.sync = this.options?.sync ?? !1, this.state = Ji(this.config), this.initialContext = vt(this.state.context);
2709
+ }
2710
+ get stateSnapshot() {
2711
+ return nt(vt(this.state));
2712
+ }
2713
+ getState() {
2714
+ return this.stateSnapshot;
2715
+ }
2716
+ get contextSnapshot() {
2717
+ return this.stateSnapshot.context;
2718
+ }
2719
+ _created = () => {
2720
+ if (!this.config.created) return;
2721
+ const t = W(tt.Created);
2722
+ this.executeActions(this.config.created, t);
2723
+ };
2724
+ start = (t) => {
2725
+ if (this.state.value = "", this.state.tags = [], this.status === at.Running) return this;
2726
+ this.status = at.Running, this.removeStateListener = xe(this.state, () => {
2727
+ this.stateListeners.forEach((r) => {
2728
+ r(this.stateSnapshot);
2729
+ });
2730
+ }, this.sync), this.setupContextWatchers(), this.executeActivities(W(tt.Start), ct(this.config.activities), tt.Start), this.executeActions(this.config.entry, W(tt.Start));
2731
+ const e = W(tt.Init), n = zt(t) ? t.value : t, o = zt(t) ? t.context : void 0;
2732
+ o && this.setContext(o);
2733
+ const s = { target: n ?? this.config.initial }, i = this.getNextStateInfo(s, e);
2734
+ return this.initialState = i, this.performStateChangeEffects(this.state.value, i, e), this;
2735
+ };
2736
+ setupContextWatchers = () => {
2737
+ const { watch: t } = this.config;
2738
+ if (!t) return;
2739
+ let e = vt(this.state.context);
2740
+ const n = xe(this.state.context, () => {
2741
+ const o = vt(this.state.context);
2742
+ for (const [s, i] of Object.entries(t))
2743
+ (this.options.compareFns?.[s] ?? Object.is)(e[s], o[s]) || this.executeActions(i, this.state.event);
2744
+ e = o;
2745
+ });
2746
+ this.contextWatchers.add(n);
2747
+ };
2748
+ stop = () => {
2749
+ if (this.status !== at.Stopped)
2750
+ return this.performExitEffects(this.state.value, W(tt.Stop)), this.executeActions(this.config.exit, W(tt.Stop)), this.setState(""), this.setEvent(tt.Stop), this.stopStateListeners(), this.stopChildren(), this.stopActivities(), this.stopDelayedEvents(), this.stopContextWatchers(), this.status = at.Stopped, this;
2751
+ };
2752
+ stopStateListeners = () => {
2753
+ this.removeStateListener(), this.stateListeners.clear();
2754
+ };
2755
+ stopContextWatchers = () => {
2756
+ this.contextWatchers.forEach((t) => t()), this.contextWatchers.clear();
2757
+ };
2758
+ stopDelayedEvents = () => {
2759
+ this.delayedEvents.forEach((t) => {
2760
+ t.forEach((e) => e());
2761
+ }), this.delayedEvents.clear();
2762
+ };
2763
+ stopActivities = (t) => {
2764
+ t ? (this.activityEvents.get(t)?.forEach((e) => e()), this.activityEvents.get(t)?.clear(), this.activityEvents.delete(t)) : (this.activityEvents.forEach((e) => {
2765
+ e.forEach((n) => n()), e.clear();
2766
+ }), this.activityEvents.clear());
2767
+ };
2768
+ /**
2769
+ * Function to send event to spawned child machine or actor
2770
+ */
2771
+ sendChild = (t, e) => {
2772
+ const n = W(t), o = ye(e, this.contextSnapshot), s = this.children.get(o);
2773
+ if (!s) throw new Error(`[@destyler/xstate] Cannot send '${n.type}' event to unknown child`);
2774
+ s.send(n);
2775
+ };
2776
+ /**
2777
+ * Function to stop a running child machine or actor
2778
+ */
2779
+ stopChild = (t) => {
2780
+ if (!this.children.has(t)) throw new Error(`[@destyler.xstate > stop-child] Cannot stop unknown child ${t}`);
2781
+ this.children.get(t).stop(), this.children.delete(t);
2782
+ };
2783
+ removeChild = (t) => {
2784
+ this.children.delete(t);
2785
+ };
2786
+ stopChildren = () => {
2787
+ this.children.forEach((t) => t.stop()), this.children.clear();
2788
+ };
2789
+ setParent = (t) => {
2790
+ this.parent = t;
2791
+ };
2792
+ spawn = (t, e) => {
2793
+ const n = ye(t);
2794
+ return e && (n.id = e), n.type = dn.Actor, n.setParent(this), this.children.set(n.id, nt(n)), n.onDone(() => {
2795
+ this.removeChild(n.id);
2796
+ }).start(), nt(un(n));
2797
+ };
2798
+ stopActivity = (t) => {
2799
+ if (!this.state.value) return;
2800
+ const e = this.activityEvents.get(this.state.value);
2801
+ e?.get(t)?.(), e?.delete(t);
2802
+ };
2803
+ addActivityCleanup = (t, e, n) => {
2804
+ t && (this.activityEvents.has(t) ? this.activityEvents.get(t)?.set(e, n) : this.activityEvents.set(t, /* @__PURE__ */ new Map([[e, n]])));
2805
+ };
2806
+ setState = (t) => {
2807
+ this.state.previousValue = this.state.value, this.state.value = t;
2808
+ const e = this.getStateNode(t);
2809
+ t == null ? ws(this.state.tags) : this.state.tags = ct(e?.tags);
2810
+ };
2811
+ /**
2812
+ * To used within side effects for React or Vue to update context
2813
+ */
2814
+ setContext = (t) => {
2815
+ t && Mn(this.state.context, t);
2816
+ };
2817
+ setOptions = (t) => {
2818
+ const e = jt(t);
2819
+ this.actionMap = {
2820
+ ...this.actionMap,
2821
+ ...e.actions
2822
+ }, this.delayMap = {
2823
+ ...this.delayMap,
2824
+ ...e.delays
2825
+ }, this.activityMap = {
2826
+ ...this.activityMap,
2827
+ ...e.activities
2828
+ }, this.guardMap = {
2829
+ ...this.guardMap,
2830
+ ...e.guards
2831
+ };
2832
+ };
2833
+ getStateNode = (t) => {
2834
+ if (t)
2835
+ return this.config.states?.[t];
2836
+ };
2837
+ getNextStateInfo = (t, e) => {
2838
+ const n = this.determineTransition(t, e), o = !n?.target, s = n?.target ?? this.state.value, i = this.state.value !== s, r = this.getStateNode(s), c = {
2839
+ reenter: !o && !i && !n?.internal,
2840
+ transition: n,
2841
+ stateNode: r,
2842
+ target: s,
2843
+ changed: i
2844
+ };
2845
+ return this.log("NextState:", `[${e.type}]`, this.state.value, "---->", c.target), c;
2846
+ };
2847
+ getAfterActions = (t, e) => {
2848
+ let n;
2849
+ const o = this.state.value;
2850
+ return {
2851
+ entry: () => {
2852
+ n = globalThis.setTimeout(() => {
2853
+ const s = this.getNextStateInfo(t, this.state.event);
2854
+ this.performStateChangeEffects(o, s, this.state.event);
2855
+ }, e);
2856
+ },
2857
+ exit: () => {
2858
+ globalThis.clearTimeout(n);
2859
+ }
2860
+ };
2861
+ };
2862
+ /**
2863
+ * All `after` events leverage `setTimeout` and `clearTimeout`,
2864
+ * we invoke the `clearTimeout` on exit and `setTimeout` on entry.
2865
+ *
2866
+ * To achieve this, we split the `after` definition into `entry` and `exit`
2867
+ * functions and append them to the state's `entry` and `exit` actions
2868
+ */
2869
+ getDelayedEventActions = (t) => {
2870
+ const e = this.getStateNode(t), n = this.state.event;
2871
+ if (!e || !e.after) return;
2872
+ const o = [], s = [];
2873
+ if (Zt(e.after)) {
2874
+ const i = this.determineTransition(e.after, n);
2875
+ if (!i) return;
2876
+ if (!On(i, "delay")) throw new Error(`[@destyler/xstate > after] Delay is required for after transition: ${JSON.stringify(i)}`);
2877
+ const a = Dt(i.delay, this.delayMap)(this.contextSnapshot, n), c = this.getAfterActions(i, a);
2878
+ return o.push(c.entry), s.push(c.exit), {
2879
+ entries: o,
2880
+ exits: s
2881
+ };
2882
+ }
2883
+ if (zt(e.after)) for (const i in e.after) {
2884
+ const r = e.after[i], c = Dt(i, this.delayMap)(this.contextSnapshot, n), l = this.getAfterActions(r, c);
2885
+ o.push(l.entry), s.push(l.exit);
2886
+ }
2887
+ return {
2888
+ entries: o,
2889
+ exits: s
2890
+ };
2891
+ };
2892
+ /**
2893
+ * A reference to the instance methods of the machine.
2894
+ * Useful when spawning child machines and managing the communication between them.
2895
+ */
2896
+ get self() {
2897
+ const t = this;
2898
+ return {
2899
+ id: this.id,
2900
+ send: this.send.bind(this),
2901
+ sendParent: this.sendParent.bind(this),
2902
+ sendChild: this.sendChild.bind(this),
2903
+ stop: this.stop.bind(this),
2904
+ stopChild: this.stopChild.bind(this),
2905
+ spawn: this.spawn.bind(this),
2906
+ stopActivity: this.stopActivity.bind(this),
2907
+ get state() {
2908
+ return t.stateSnapshot;
2909
+ },
2910
+ get initialContext() {
2911
+ return t.initialContext;
2912
+ },
2913
+ get initialState() {
2914
+ return t.initialState?.target ?? "";
2915
+ }
2916
+ };
2917
+ }
2918
+ get meta() {
2919
+ return {
2920
+ state: this.stateSnapshot,
2921
+ guards: this.guardMap,
2922
+ send: this.send.bind(this),
2923
+ self: this.self,
2924
+ initialContext: this.initialContext,
2925
+ initialState: this.initialState?.target ?? "",
2926
+ getState: () => this.stateSnapshot,
2927
+ getAction: (t) => this.actionMap[t],
2928
+ getGuard: (t) => this.guardMap[t]
2929
+ };
2930
+ }
2931
+ get guardMeta() {
2932
+ return { state: this.stateSnapshot };
2933
+ }
2934
+ /**
2935
+ * Function to executes defined actions. It can accept actions as string
2936
+ * (referencing `options.actions`) or actual functions.
2937
+ */
2938
+ executeActions = (t, e) => {
2939
+ const n = fe(t, this.guardMap)(this.contextSnapshot, e, this.guardMeta);
2940
+ for (const o of ct(n)) {
2941
+ const s = ot(o) ? this.actionMap?.[o] : o;
2942
+ ot(o) && !s && console.warn(`[@destyler/xstate > execute-actions] No implementation found for action: \`${o}\``), s?.(this.state.context, e, this.meta);
2943
+ }
2944
+ };
2945
+ /**
2946
+ * Function to execute running activities and registers
2947
+ * their cleanup function internally (to be called later on when we exit the state)
2948
+ */
2949
+ executeActivities = (t, e, n) => {
2950
+ for (const o of e) {
2951
+ const s = ot(o) ? this.activityMap?.[o] : o;
2952
+ if (!s) {
2953
+ console.warn(`[@destyler/xstate > execute-activity] No implementation found for activity: \`${o}\``);
2954
+ continue;
2955
+ }
2956
+ const i = s(this.state.context, t, this.meta);
2957
+ if (i) {
2958
+ const r = ot(o) ? o : o.name || ze();
2959
+ this.addActivityCleanup(n ?? this.state.value, r, i);
2960
+ }
2961
+ }
2962
+ };
2963
+ /**
2964
+ * Normalizes the `every` definition to transition. `every` can be:
2965
+ * - An array of possible actions to run (we need to pick the first match based on guard)
2966
+ * - An object of intervals and actions
2967
+ */
2968
+ createEveryActivities = (t, e) => {
2969
+ if (t)
2970
+ if (Zt(t)) {
2971
+ const n = ct(t).find((r) => {
2972
+ const a = r.delay, l = Dt(a, this.delayMap)(this.contextSnapshot, this.state.event);
2973
+ return _n(r.guard, this.guardMap)(this.contextSnapshot, this.state.event, this.guardMeta) ?? l != null;
2974
+ });
2975
+ if (!n) return;
2976
+ const s = Dt(n.delay, this.delayMap)(this.contextSnapshot, this.state.event);
2977
+ e(() => {
2978
+ const r = globalThis.setInterval(() => {
2979
+ this.executeActions(n.actions, this.state.event);
2980
+ }, s);
2981
+ return () => {
2982
+ globalThis.clearInterval(r);
2983
+ };
2984
+ });
2985
+ } else for (const n in t) {
2986
+ const o = t?.[n], i = Dt(n, this.delayMap)(this.contextSnapshot, this.state.event);
2987
+ e(() => {
2988
+ const a = globalThis.setInterval(() => {
2989
+ this.executeActions(o, this.state.event);
2990
+ }, i);
2991
+ return () => {
2992
+ globalThis.clearInterval(a);
2993
+ };
2994
+ });
2995
+ }
2996
+ };
2997
+ setEvent = (t) => {
2998
+ this.state.previousEvent = this.state.event, this.state.event = un(W(t));
2999
+ };
3000
+ performExitEffects = (t, e) => {
3001
+ const n = this.state.value;
3002
+ if (n === "") return;
3003
+ const o = t ? this.getStateNode(t) : void 0;
3004
+ this.stopActivities(n);
3005
+ const s = fe(o?.exit, this.guardMap)(this.contextSnapshot, e, this.guardMeta), i = ct(s), r = this.delayedEvents.get(n);
3006
+ r && i.push(...r), this.executeActions(i, e), this.delayedEvents.delete(n);
3007
+ };
3008
+ performEntryEffects = (t, e) => {
3009
+ const n = this.getStateNode(t), o = ct(n?.activities);
3010
+ this.createEveryActivities(n?.every, (a) => {
3011
+ o.unshift(a);
3012
+ }), o.length > 0 && this.executeActivities(e, o);
3013
+ const s = fe(n?.entry, this.guardMap)(this.contextSnapshot, e, this.guardMeta), i = ct(s), r = this.getDelayedEventActions(t);
3014
+ n?.after && r && (this.delayedEvents.set(t, r?.exits), i.push(...r.entries)), this.executeActions(i, e), n?.type === "final" && (this.state.done = !0, this.doneListeners.forEach((a) => {
3015
+ a(this.stateSnapshot);
3016
+ }), this.stop());
3017
+ };
3018
+ performTransitionEffects = (t, e) => {
3019
+ const n = this.determineTransition(t, e);
3020
+ this.executeActions(n?.actions, e);
3021
+ };
3022
+ /**
3023
+ * Performs all the requires side-effects or reactions when
3024
+ * we move from state A => state B.
3025
+ *
3026
+ * The Effect order:
3027
+ * Exit actions (current state) => Transition actions => Go to state => Entry actions (next state)
3028
+ */
3029
+ performStateChangeEffects = (t, e, n) => {
3030
+ this.setEvent(n);
3031
+ const o = e.changed || e.reenter;
3032
+ o && this.performExitEffects(t, n), this.performTransitionEffects(e.transition, n), this.setState(e.target), o && this.performEntryEffects(e.target, n);
3033
+ };
3034
+ determineTransition = (t, e) => er(t, this.guardMap)?.(this.contextSnapshot, e, this.guardMeta);
3035
+ /**
3036
+ * Function to send event to parent machine from spawned child
3037
+ */
3038
+ sendParent = (t) => {
3039
+ if (!this.parent) throw new Error("[@destyler/xstate > send-parent] Cannot send event to parent machine, no parent is set. Use `machine.spawn()` to spawn a child machine.");
3040
+ const e = W(t);
3041
+ this.parent?.send(e);
3042
+ };
3043
+ log = (...t) => {
3044
+ this.options.debug && console.log(...t);
3045
+ };
3046
+ /**
3047
+ * Function to send an event to current machine
3048
+ */
3049
+ send = (t) => {
3050
+ const e = W(t);
3051
+ this.transition(this.state.value, e);
3052
+ };
3053
+ transition = (t, e) => {
3054
+ const n = ot(t) ? this.getStateNode(t) : t?.stateNode, o = W(e);
3055
+ if (!n && !this.config.on) {
3056
+ const r = this.status === at.Stopped ? "[@destyler/xstate > transition] Cannot transition a stopped machine" : `[destyler/xstate > transition] State does not have a definition for \`state\`: ${t}, \`event\`: ${o.type}`;
3057
+ console.warn(r);
3058
+ return;
3059
+ }
3060
+ const s = n?.on?.[o.type] ?? this.config.on?.[o.type], i = this.getNextStateInfo(s, o);
3061
+ return this.performStateChangeEffects(this.state.value, i, o), i.stateNode;
3062
+ };
3063
+ subscribe = (t) => (this.stateListeners.add(t), this.status === at.Running && t(this.stateSnapshot), () => {
3064
+ this.stateListeners.delete(t);
3065
+ });
3066
+ onDone = (t) => (this.doneListeners.add(t), this);
3067
+ onTransition = (t) => (this.stateListeners.add(t), this.status === at.Running && t(this.stateSnapshot), this);
3068
+ get [Symbol.toStringTag]() {
3069
+ return "Machine";
3070
+ }
3071
+ getHydrationState() {
3072
+ const t = this.getState();
3073
+ return {
3074
+ value: t.value,
3075
+ tags: t.tags
3076
+ };
3077
+ }
3078
+ };
3079
+ function or(t, e) {
3080
+ return new nr(t, e);
3081
+ }
3082
+ function sr() {
3083
+ return (t) => Array.from(new Set(t));
3084
+ }
3085
+ function ir(t) {
3086
+ return new Proxy({}, { get() {
3087
+ return t;
3088
+ } });
3089
+ }
3090
+ const rr = Gt("popover").parts("arrow", "arrowTip", "anchor", "trigger", "indicator", "positioner", "content", "title", "description", "closeTrigger"), K = rr.build(), A = ps({
3091
+ getAnchorId: (t) => t.ids?.anchor ?? `popover:${t.id}:anchor`,
3092
+ getTriggerId: (t) => t.ids?.trigger ?? `popover:${t.id}:trigger`,
3093
+ getContentId: (t) => t.ids?.content ?? `popover:${t.id}:content`,
3094
+ getPositionerId: (t) => t.ids?.positioner ?? `popover:${t.id}:popper`,
3095
+ getArrowId: (t) => t.ids?.arrow ?? `popover:${t.id}:arrow`,
3096
+ getTitleId: (t) => t.ids?.title ?? `popover:${t.id}:title`,
3097
+ getDescriptionId: (t) => t.ids?.description ?? `popover:${t.id}:desc`,
3098
+ getCloseTriggerId: (t) => t.ids?.closeTrigger ?? `popover:${t.id}:close`,
3099
+ getAnchorEl: (t) => A.getById(t, A.getAnchorId(t)),
3100
+ getTriggerEl: (t) => A.getById(t, A.getTriggerId(t)),
3101
+ getContentEl: (t) => A.getById(t, A.getContentId(t)),
3102
+ getPositionerEl: (t) => A.getById(t, A.getPositionerId(t)),
3103
+ getTitleEl: (t) => A.getById(t, A.getTitleId(t)),
3104
+ getDescriptionEl: (t) => A.getById(t, A.getDescriptionId(t)),
3105
+ getFocusableEls: (t) => Ne(A.getContentEl(t)),
3106
+ getFirstFocusableEl: (t) => A.getFocusableEls(t)[0]
3107
+ });
3108
+ function ar(t, e, n) {
3109
+ const o = t.matches("open"), s = t.context.currentPlacement, i = t.context.currentPortalled, r = t.context.renderedElements, a = hi({
3110
+ ...t.context.positioning,
3111
+ placement: s
3112
+ });
3113
+ return {
3114
+ portalled: i,
3115
+ open: o,
3116
+ setOpen(c) {
3117
+ c !== o && e(c ? "OPEN" : "CLOSE");
3118
+ },
3119
+ reposition(c = {}) {
3120
+ e({
3121
+ type: "POSITIONING.SET",
3122
+ options: c
3123
+ });
3124
+ },
3125
+ getArrowProps() {
3126
+ return n.element({
3127
+ id: A.getArrowId(t.context),
3128
+ ...K.arrow.attrs,
3129
+ dir: t.context.dir,
3130
+ style: a.arrow
3131
+ });
3132
+ },
3133
+ getArrowTipProps() {
3134
+ return n.element({
3135
+ ...K.arrowTip.attrs,
3136
+ dir: t.context.dir,
3137
+ style: a.arrowTip
3138
+ });
3139
+ },
3140
+ getAnchorProps() {
3141
+ return n.element({
3142
+ ...K.anchor.attrs,
3143
+ dir: t.context.dir,
3144
+ id: A.getAnchorId(t.context)
3145
+ });
3146
+ },
3147
+ getTriggerProps() {
3148
+ return n.button({
3149
+ ...K.trigger.attrs,
3150
+ dir: t.context.dir,
3151
+ type: "button",
3152
+ "data-placement": s,
3153
+ id: A.getTriggerId(t.context),
3154
+ "aria-haspopup": "dialog",
3155
+ "aria-expanded": o,
3156
+ "data-state": o ? "open" : "closed",
3157
+ "aria-controls": A.getContentId(t.context),
3158
+ onPointerDown(c) {
3159
+ Jo() && c.currentTarget.focus();
3160
+ },
3161
+ onClick(c) {
3162
+ c.defaultPrevented || e("TOGGLE");
3163
+ },
3164
+ onBlur(c) {
3165
+ e({
3166
+ type: "TRIGGER_BLUR",
3167
+ target: c.relatedTarget
3168
+ });
3169
+ }
3170
+ });
3171
+ },
3172
+ getIndicatorProps() {
3173
+ return n.element({
3174
+ ...K.indicator.attrs,
3175
+ dir: t.context.dir,
3176
+ "data-state": o ? "open" : "closed"
3177
+ });
3178
+ },
3179
+ getPositionerProps() {
3180
+ return n.element({
3181
+ id: A.getPositionerId(t.context),
3182
+ ...K.positioner.attrs,
3183
+ dir: t.context.dir,
3184
+ style: a.floating
3185
+ });
3186
+ },
3187
+ getContentProps() {
3188
+ return n.element({
3189
+ ...K.content.attrs,
3190
+ dir: t.context.dir,
3191
+ id: A.getContentId(t.context),
3192
+ tabIndex: -1,
3193
+ role: "dialog",
3194
+ hidden: !o,
3195
+ "data-state": o ? "open" : "closed",
3196
+ "data-expanded": Mo(o),
3197
+ "aria-labelledby": r.title ? A.getTitleId(t.context) : void 0,
3198
+ "aria-describedby": r.description ? A.getDescriptionId(t.context) : void 0,
3199
+ "data-placement": s
3200
+ });
3201
+ },
3202
+ getTitleProps() {
3203
+ return n.element({
3204
+ ...K.title.attrs,
3205
+ id: A.getTitleId(t.context),
3206
+ dir: t.context.dir
3207
+ });
3208
+ },
3209
+ getDescriptionProps() {
3210
+ return n.element({
3211
+ ...K.description.attrs,
3212
+ id: A.getDescriptionId(t.context),
3213
+ dir: t.context.dir
3214
+ });
3215
+ },
3216
+ getCloseTriggerProps() {
3217
+ return n.button({
3218
+ ...K.closeTrigger.attrs,
3219
+ dir: t.context.dir,
3220
+ id: A.getCloseTriggerId(t.context),
3221
+ type: "button",
3222
+ "aria-label": "close",
3223
+ onClick(c) {
3224
+ c.defaultPrevented || e("CLOSE");
3225
+ }
3226
+ });
3227
+ }
3228
+ };
3229
+ }
3230
+ function cr(t) {
3231
+ const e = jt(t);
3232
+ return or({
3233
+ id: "popover",
3234
+ initial: e.open ? "open" : "closed",
3235
+ context: {
3236
+ closeOnInteractOutside: !0,
3237
+ closeOnEscape: !0,
3238
+ autoFocus: !0,
3239
+ modal: !1,
3240
+ portalled: !0,
3241
+ positioning: {
3242
+ placement: "bottom",
3243
+ ...e.positioning
3244
+ },
3245
+ currentPlacement: void 0,
3246
+ ...e,
3247
+ renderedElements: {
3248
+ title: !0,
3249
+ description: !0
3250
+ }
3251
+ },
3252
+ computed: { currentPortalled: (n) => !!n.modal || !!n.portalled },
3253
+ watch: { open: ["toggleVisibility"] },
3254
+ entry: ["checkRenderedElements"],
3255
+ states: {
3256
+ closed: { on: {
3257
+ "CONTROLLED.OPEN": {
3258
+ target: "open",
3259
+ actions: ["setInitialFocus"]
3260
+ },
3261
+ TOGGLE: [{
3262
+ guard: "isOpenControlled",
3263
+ actions: ["invokeOnOpen"]
3264
+ }, {
3265
+ target: "open",
3266
+ actions: ["invokeOnOpen", "setInitialFocus"]
3267
+ }],
3268
+ OPEN: [{
3269
+ guard: "isOpenControlled",
3270
+ actions: ["invokeOnOpen"]
3271
+ }, {
3272
+ target: "open",
3273
+ actions: ["invokeOnOpen", "setInitialFocus"]
3274
+ }]
3275
+ } },
3276
+ open: {
3277
+ activities: [
3278
+ "trapFocus",
3279
+ "preventScroll",
3280
+ "hideContentBelow",
3281
+ "trackPositioning",
3282
+ "trackDismissableElement",
3283
+ "proxyTabFocus"
3284
+ ],
3285
+ on: {
3286
+ "CONTROLLED.CLOSE": {
3287
+ target: "closed",
3288
+ actions: ["setFinalFocus"]
3289
+ },
3290
+ CLOSE: [{
3291
+ guard: "isOpenControlled",
3292
+ actions: ["invokeOnClose"]
3293
+ }, {
3294
+ target: "closed",
3295
+ actions: ["invokeOnClose", "setFinalFocus"]
3296
+ }],
3297
+ TOGGLE: [{
3298
+ guard: "isOpenControlled",
3299
+ actions: ["invokeOnClose"]
3300
+ }, {
3301
+ target: "closed",
3302
+ actions: ["invokeOnClose"]
3303
+ }],
3304
+ "POSITIONING.SET": { actions: "reposition" }
3305
+ }
3306
+ }
3307
+ }
3308
+ }, {
3309
+ guards: { isOpenControlled: (n) => !!n["open.controlled"] },
3310
+ activities: {
3311
+ trackPositioning(n) {
3312
+ n.currentPlacement = n.positioning.placement;
3313
+ const o = A.getAnchorEl(n) ?? A.getTriggerEl(n);
3314
+ return Xe(o, () => A.getPositionerEl(n), {
3315
+ ...n.positioning,
3316
+ defer: !0,
3317
+ onComplete(i) {
3318
+ n.currentPlacement = i.placement;
3319
+ }
3320
+ });
3321
+ },
3322
+ trackDismissableElement(n, o, { send: s }) {
3323
+ const i = () => A.getContentEl(n);
3324
+ let r = !0;
3325
+ return Ii(i, {
3326
+ pointerBlocking: n.modal,
3327
+ exclude: A.getTriggerEl(n),
3328
+ defer: !0,
3329
+ onEscapeKeyDown(a) {
3330
+ n.onEscapeKeyDown?.(a), !n.closeOnEscape && a.preventDefault();
3331
+ },
3332
+ onInteractOutside(a) {
3333
+ n.onInteractOutside?.(a), !a.defaultPrevented && (r = !(a.detail.focusable || a.detail.contextmenu), n.closeOnInteractOutside || a.preventDefault());
3334
+ },
3335
+ onPointerDownOutside: n.onPointerDownOutside,
3336
+ onFocusOutside: n.onFocusOutside,
3337
+ persistentElements: n.persistentElements,
3338
+ onDismiss() {
3339
+ s({
3340
+ type: "CLOSE",
3341
+ src: "interact-outside",
3342
+ restoreFocus: r
3343
+ });
3344
+ }
3345
+ });
3346
+ },
3347
+ proxyTabFocus(n) {
3348
+ return n.modal || !n.portalled ? void 0 : hs(() => A.getContentEl(n), {
3349
+ triggerElement: A.getTriggerEl(n),
3350
+ defer: !0,
3351
+ onFocus(s) {
3352
+ s.focus({ preventScroll: !0 });
3353
+ }
3354
+ });
3355
+ },
3356
+ hideContentBelow(n) {
3357
+ return n.modal ? wi(() => [A.getContentEl(n), A.getTriggerEl(n)], { defer: !0 }) : void 0;
3358
+ },
3359
+ preventScroll(n) {
3360
+ if (n.modal)
3361
+ return ji(A.getDoc(n));
3362
+ },
3363
+ trapFocus(n) {
3364
+ return n.modal ? _i(() => A.getContentEl(n), { initialFocus: () => He({
3365
+ root: A.getContentEl(n),
3366
+ getInitialEl: n.initialFocusEl,
3367
+ enabled: n.autoFocus
3368
+ }) }) : void 0;
3369
+ }
3370
+ },
3371
+ actions: {
3372
+ reposition(n, o) {
3373
+ const s = A.getAnchorEl(n) ?? A.getTriggerEl(n);
3374
+ Xe(s, () => A.getPositionerEl(n), {
3375
+ ...n.positioning,
3376
+ ...o.options,
3377
+ defer: !0,
3378
+ listeners: !1,
3379
+ onComplete(r) {
3380
+ n.currentPlacement = r.placement;
3381
+ }
3382
+ });
3383
+ },
3384
+ checkRenderedElements(n) {
3385
+ q(() => {
3386
+ Object.assign(n.renderedElements, {
3387
+ title: !!A.getTitleEl(n),
3388
+ description: !!A.getDescriptionEl(n)
3389
+ });
3390
+ });
3391
+ },
3392
+ setInitialFocus(n) {
3393
+ n.modal || q(() => {
3394
+ He({
3395
+ root: A.getContentEl(n),
3396
+ getInitialEl: n.initialFocusEl,
3397
+ enabled: n.autoFocus
3398
+ })?.focus({ preventScroll: !0 });
3399
+ });
3400
+ },
3401
+ setFinalFocus(n, o) {
3402
+ const s = o.restoreFocus ?? o.previousEvent?.restoreFocus;
3403
+ s != null && !s || q(() => {
3404
+ A.getTriggerEl(n)?.focus({ preventScroll: !0 });
3405
+ });
3406
+ },
3407
+ invokeOnOpen(n) {
3408
+ n.onOpenChange?.({ open: !0 });
3409
+ },
3410
+ invokeOnClose(n) {
3411
+ n.onOpenChange?.({ open: !1 });
3412
+ },
3413
+ toggleVisibility(n, o, { send: s }) {
3414
+ s({
3415
+ type: n.open ? "CONTROLLED.OPEN" : "CONTROLLED.CLOSE",
3416
+ previousEvent: o
3417
+ });
3418
+ }
3419
+ }
3420
+ });
3421
+ }
3422
+ sr()([
3423
+ "autoFocus",
3424
+ "closeOnEscape",
3425
+ "closeOnInteractOutside",
3426
+ "dir",
3427
+ "getRootNode",
3428
+ "id",
3429
+ "ids",
3430
+ "initialFocusEl",
3431
+ "modal",
3432
+ "onEscapeKeyDown",
3433
+ "onFocusOutside",
3434
+ "onInteractOutside",
3435
+ "onOpenChange",
3436
+ "onPointerDownOutside",
3437
+ "open.controlled",
3438
+ "open",
3439
+ "persistentElements",
3440
+ "portalled",
3441
+ "positioning"
3442
+ ]);
3443
+ function lr(t, e) {
3444
+ const { actions: n, context: o } = {}, s = zn(t.state), i = xe(t.state, () => {
3445
+ s.value = vt(t.state);
3446
+ });
3447
+ return Kn(() => {
3448
+ i?.();
3449
+ }), Un(() => {
3450
+ t.setOptions({ actions: n });
3451
+ }), o && Lt(o, (r) => {
3452
+ t.setContext(M(r));
3453
+ }, { deep: !0 }), s;
3454
+ }
3455
+ function ur(t, e) {
3456
+ const { state: n, context: o } = {}, s = typeof t == "function" ? t() : t;
3457
+ return o && s.setContext(M(o)), s._created(), Hn(() => {
3458
+ s.start(n), Gn(() => {
3459
+ s.stop();
3460
+ });
3461
+ }), s;
3462
+ }
3463
+ function dr(t, e) {
3464
+ const n = ur(t);
3465
+ return [
3466
+ lr(n),
3467
+ n.send,
3468
+ n
3469
+ ];
3470
+ }
3471
+ function fr(t) {
3472
+ return t.charAt(0).toUpperCase() + t.substr(1).toLowerCase();
3473
+ }
3474
+ const fn = {
3475
+ htmlFor: "for",
3476
+ className: "class",
3477
+ onDoubleClick: "onDblclick",
3478
+ onChange: "onInput",
3479
+ onFocus: "onFocusin",
3480
+ onBlur: "onFocusout",
3481
+ defaultValue: "value",
3482
+ defaultChecked: "checked"
3483
+ };
3484
+ function hr(t) {
3485
+ return t in fn ? fn[t] : t.startsWith("on") ? `on${fr(t.substr(2))}` : t.toLowerCase();
3486
+ }
3487
+ const pr = ir((t) => {
3488
+ const e = {};
3489
+ for (const n in t) {
3490
+ const o = t[n];
3491
+ n === "children" ? typeof o == "string" && (e.innerHTML = o) : e[hr(n)] = t[n];
3492
+ }
3493
+ return e;
3494
+ }), gr = {
3495
+ key: 0,
3496
+ xmlns: "http://www.w3.org/2000/svg",
3497
+ width: "1em",
3498
+ height: "1em",
3499
+ viewBox: "0 0 16 16"
3500
+ }, mr = {
3501
+ key: 1,
3502
+ xmlns: "http://www.w3.org/2000/svg",
3503
+ width: "1em",
3504
+ height: "1em",
3505
+ viewBox: "0 0 16 16"
3506
+ }, yr = /* @__PURE__ */ pt({
3507
+ name: "ComponentIcones",
3508
+ __name: "ComponentsIcones",
3509
+ props: {
3510
+ expanded: { type: Boolean, default: !1 }
3511
+ },
3512
+ setup(t) {
3513
+ const e = t;
3514
+ return (n, o) => e.expanded ? (F(), D("svg", gr, o[0] || (o[0] = [
3515
+ T("g", {
3516
+ fill: "none",
3517
+ "stroke-linecap": "round",
3518
+ "stroke-linejoin": "round"
3519
+ }, [
3520
+ T("path", {
3521
+ class: "stroke-dark dark:stroke-light",
3522
+ d: "m1.87 8l.7-2.74a1 1 0 0 1 .96-.76h10.94a1 1 0 0 1 .97 1.24l-.219.875M6 13.5H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3523
+ }),
3524
+ T("path", {
3525
+ stroke: "#67B686",
3526
+ d: "m9.485 9.516l3.968 3.968m-3.968 0l3.968-3.968m-1.634-1.874l3.507 3.507a.496.496 0 0 1 0 .702l-3.507 3.507a.496.496 0 0 1-.701 0L7.61 11.85a.496.496 0 0 1 0-.702l3.507-3.507a.496.496 0 0 1 .701 0z"
3527
+ })
3528
+ ], -1)
3529
+ ]))) : (F(), D("svg", mr, o[1] || (o[1] = [
3530
+ T("g", {
3531
+ fill: "none",
3532
+ "stroke-linecap": "round",
3533
+ "stroke-linejoin": "round"
3534
+ }, [
3535
+ T("path", {
3536
+ class: "stroke-dark dark:stroke-light",
3537
+ d: "M4.5 4.5H12c.83 0 1.5.67 1.5 1.5v.5m-7.5 7H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3538
+ }),
3539
+ T("path", {
3540
+ stroke: "#67B686",
3541
+ d: "m9.485 9.516l3.968 3.968m-3.968 0l3.968-3.968m-1.634-1.874l3.507 3.507a.496.496 0 0 1 0 .702l-3.507 3.507a.496.496 0 0 1-.701 0L7.61 11.85a.496.496 0 0 1 0-.702l3.507-3.507a.496.496 0 0 1 .701 0z"
3542
+ })
3543
+ ], -1)
3544
+ ])));
3545
+ }
3546
+ }), br = {
3547
+ key: 0,
3548
+ xmlns: "http://www.w3.org/2000/svg",
3549
+ width: "1em",
3550
+ height: "1em",
3551
+ viewBox: "0 0 16 16"
3552
+ }, vr = {
3553
+ key: 1,
3554
+ xmlns: "http://www.w3.org/2000/svg",
3555
+ width: "1em",
3556
+ height: "1em",
3557
+ viewBox: "0 0 16 16"
3558
+ }, wr = /* @__PURE__ */ pt({
3559
+ name: "FolderIcones",
3560
+ __name: "FolderIcones",
3561
+ props: {
3562
+ expanded: { type: Boolean, default: !1 }
3563
+ },
3564
+ setup(t) {
3565
+ const e = t;
3566
+ return (n, o) => e.expanded ? (F(), D("svg", br, o[0] || (o[0] = [
3567
+ T("path", {
3568
+ fill: "none",
3569
+ class: "stroke-dark dark:stroke-light",
3570
+ "stroke-linecap": "round",
3571
+ "stroke-linejoin": "round",
3572
+ d: "m1.87 8l.7-2.74a1 1 0 0 1 .96-.76h10.94a1 1 0 0 1 .97 1.24l-1.75 7a1 1 0 0 1-.97.76H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3573
+ }, null, -1)
3574
+ ]))) : (F(), D("svg", vr, o[1] || (o[1] = [
3575
+ T("path", {
3576
+ fill: "none",
3577
+ class: "stroke-dark dark:stroke-light",
3578
+ "stroke-linecap": "round",
3579
+ "stroke-linejoin": "round",
3580
+ d: "M4.5 4.5H12c.83 0 1.5.67 1.5 1.5v6c0 .83-.67 1.5-1.5 1.5H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3581
+ }, null, -1)
3582
+ ])));
3583
+ }
3584
+ }), xr = {
3585
+ key: 0,
3586
+ xmlns: "http://www.w3.org/2000/svg",
3587
+ width: "1em",
3588
+ height: "1em",
3589
+ viewBox: "0 0 16 16"
3590
+ }, Er = {
3591
+ key: 1,
3592
+ xmlns: "http://www.w3.org/2000/svg",
3593
+ width: "1em",
3594
+ height: "1em",
3595
+ viewBox: "0 0 16 16"
3596
+ }, Or = /* @__PURE__ */ pt({
3597
+ name: "ModleIcones",
3598
+ __name: "ModuleIcones",
3599
+ props: {
3600
+ expanded: { type: Boolean, default: !1 }
3601
+ },
3602
+ setup(t) {
3603
+ const e = t;
3604
+ return (n, o) => e.expanded ? (F(), D("svg", xr, o[0] || (o[0] = [
3605
+ T("g", {
3606
+ fill: "none",
3607
+ "stroke-linecap": "round",
3608
+ "stroke-linejoin": "round"
3609
+ }, [
3610
+ T("path", {
3611
+ class: "stroke-dark dark:stroke-light",
3612
+ d: "m1.875 8l.686-2.743a1 1 0 0 1 .97-.757h10.938a1 1 0 0 1 .97 1.243l-.315 1.26M6 13.5H2.004A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3613
+ }),
3614
+ T("path", {
3615
+ stroke: "#65bb87",
3616
+ d: "M15.5 13.5v1.2a.8.8 0 0 1-.8.8h-4.4a.8.8 0 0 1-.8-.8v-1.2H9a1 1 0 0 1 0-2h.5v-1.2a.8.8 0 0 1 .8-.8h1.2V9a1 1 0 0 1 2 0v.5h1.2a.8.8 0 0 1 .8.8v1.2H15a1 1 0 0 0 0 2z"
3617
+ })
3618
+ ], -1)
3619
+ ]))) : (F(), D("svg", Er, o[1] || (o[1] = [
3620
+ T("g", {
3621
+ fill: "none",
3622
+ "stroke-linecap": "round",
3623
+ "stroke-linejoin": "round"
3624
+ }, [
3625
+ T("path", {
3626
+ class: "stroke-dark dark:stroke-light",
3627
+ d: "M4.5 4.5H12A1.5 1.5 0 0 1 13.5 6v.5m-7.5 7H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3628
+ }),
3629
+ T("path", {
3630
+ stroke: "#65bb87",
3631
+ d: "M15.5 13.5v1.2a.8.8 0 0 1-.8.8h-4.4a.8.8 0 0 1-.8-.8v-1.2H9a1 1 0 0 1 0-2h.5v-1.2a.8.8 0 0 1 .8-.8h1.2V9a1 1 0 0 1 2 0v.5h1.2a.8.8 0 0 1 .8.8v1.2H15a1 1 0 0 0 0 2z"
3632
+ })
3633
+ ], -1)
3634
+ ])));
3635
+ }
3636
+ }), Ar = {
3637
+ key: 0,
3638
+ xmlns: "http://www.w3.org/2000/svg",
3639
+ width: "1em",
3640
+ height: "1em",
3641
+ viewBox: "0 0 16 16"
3642
+ }, kr = {
3643
+ key: 1,
3644
+ xmlns: "http://www.w3.org/2000/svg",
3645
+ width: "1em",
3646
+ height: "1em",
3647
+ viewBox: "0 0 16 16"
3648
+ }, Sr = /* @__PURE__ */ pt({
3649
+ name: "PackagesIcones",
3650
+ __name: "PackagesIcones",
3651
+ props: {
3652
+ expanded: { type: Boolean, default: !1 }
3653
+ },
3654
+ setup(t) {
3655
+ const e = t;
3656
+ return (n, o) => e.expanded ? (F(), D("svg", Ar, o[0] || (o[0] = [
3657
+ T("g", {
3658
+ fill: "none",
3659
+ "stroke-linecap": "round",
3660
+ "stroke-linejoin": "round"
3661
+ }, [
3662
+ T("path", {
3663
+ class: "stroke-dark dark:stroke-light",
3664
+ d: "m1.875 8l.686-2.743a1 1 0 0 1 .97-.757h10.938a1 1 0 0 1 .97 1.243l-.315 1.26M6 13.5H2.004A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3665
+ }),
3666
+ T("path", {
3667
+ stroke: "#E23730",
3668
+ d: "M12 15.337v-3.919L8.5 9.214m3.5 2.204l3.5-2.204M12 7.5l3.5 1.714v4.408L12 15.5l-3.5-1.878V9.214Z"
3669
+ })
3670
+ ], -1)
3671
+ ]))) : (F(), D("svg", kr, o[1] || (o[1] = [
3672
+ T("g", {
3673
+ fill: "none",
3674
+ "stroke-linecap": "round",
3675
+ "stroke-linejoin": "round"
3676
+ }, [
3677
+ T("path", {
3678
+ class: "stroke-dark dark:stroke-light",
3679
+ d: "M4.5 4.5H12A1.5 1.5 0 0 1 13.5 6v.5m-7.5 7H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3680
+ }),
3681
+ T("path", {
3682
+ stroke: "#E23730",
3683
+ d: "M12 15.337v-3.919L8.5 9.214m3.5 2.204l3.5-2.204M12 7.5l3.5 1.714v4.408L12 15.5l-3.5-1.878V9.214Z"
3684
+ })
3685
+ ], -1)
3686
+ ])));
3687
+ }
3688
+ }), Tr = {
3689
+ key: 0,
3690
+ xmlns: "http://www.w3.org/2000/svg",
3691
+ width: "1em",
3692
+ height: "1em",
3693
+ viewBox: "0 0 16 16"
3694
+ }, Pr = {
3695
+ key: 1,
3696
+ xmlns: "http://www.w3.org/2000/svg",
3697
+ width: "1em",
3698
+ height: "1em",
3699
+ viewBox: "0 0 16 16"
3700
+ }, Cr = /* @__PURE__ */ pt({
3701
+ name: "SrcIcones",
3702
+ __name: "SrcIcones",
3703
+ props: {
3704
+ expanded: { type: Boolean, default: !1 }
3705
+ },
3706
+ setup(t) {
3707
+ const e = t;
3708
+ return (n, o) => e.expanded ? (F(), D("svg", Tr, o[0] || (o[0] = [
3709
+ T("g", {
3710
+ fill: "none",
3711
+ "stroke-linecap": "round",
3712
+ "stroke-linejoin": "round"
3713
+ }, [
3714
+ T("path", {
3715
+ class: "stroke-dark dark:stroke-light",
3716
+ d: "m1.875 8l.686-2.743a1 1 0 0 1 .97-.757h10.938a1 1 0 0 1 .97 1.243l-.315 1.26M6 13.5H2.004A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3717
+ }),
3718
+ T("path", {
3719
+ stroke: "#65bb87",
3720
+ d: "m10.5 8.5l-3 3.5l3 3.5m2-7l3 3.5l-3 3.5"
3721
+ })
3722
+ ], -1)
3723
+ ]))) : (F(), D("svg", Pr, o[1] || (o[1] = [
3724
+ T("g", {
3725
+ fill: "none",
3726
+ "stroke-linecap": "round",
3727
+ "stroke-linejoin": "round"
3728
+ }, [
3729
+ T("path", {
3730
+ class: "stroke-dark dark:stroke-light",
3731
+ d: "M4.5 4.5H12A1.5 1.5 0 0 1 13.5 6v.5m-7.5 7H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3732
+ }),
3733
+ T("path", {
3734
+ stroke: "#65bb87",
3735
+ d: "m10.5 8.5l-3 3.5l3 3.5m2-7l3 3.5l-3 3.5"
3736
+ })
3737
+ ], -1)
3738
+ ])));
3739
+ }
3740
+ }), Nr = {
3741
+ key: 0,
3742
+ xmlns: "http://www.w3.org/2000/svg",
3743
+ width: "1em",
3744
+ height: "1em",
3745
+ viewBox: "0 0 16 16"
3746
+ }, Fr = {
3747
+ key: 1,
3748
+ xmlns: "http://www.w3.org/2000/svg",
3749
+ width: "1em",
3750
+ height: "1em",
3751
+ viewBox: "0 0 16 16"
3752
+ }, Ir = /* @__PURE__ */ pt({
3753
+ name: "ViewIcones",
3754
+ __name: "ViewIcones",
3755
+ props: {
3756
+ expanded: { type: Boolean, default: !1 }
3757
+ },
3758
+ setup(t) {
3759
+ const e = t;
3760
+ return (n, o) => e.expanded ? (F(), D("svg", Nr, o[0] || (o[0] = [
3761
+ T("g", {
3762
+ fill: "none",
3763
+ "stroke-linecap": "round",
3764
+ "stroke-linejoin": "round"
3765
+ }, [
3766
+ T("path", {
3767
+ class: "stroke-dark dark:stroke-light",
3768
+ d: "m1.875 8l.686-2.743a1 1 0 0 1 .97-.757h10.938a1 1 0 0 1 .97 1.243l-.315 1.26M6 13.5H2.004A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3769
+ }),
3770
+ T("path", {
3771
+ stroke: "#E23730",
3772
+ d: "M14.692 8.5H9.308a.31.31 0 0 0-.307.336l.47 5.241c.01.128.1.235.223.27l2.303 1.153l2.308-1.153a.31.31 0 0 0 .225-.27L15 8.836a.31.31 0 0 0-.307-.336"
3773
+ })
3774
+ ], -1)
3775
+ ]))) : (F(), D("svg", Fr, o[1] || (o[1] = [
3776
+ T("g", {
3777
+ fill: "none",
3778
+ "stroke-linecap": "round",
3779
+ "stroke-linejoin": "round"
3780
+ }, [
3781
+ T("path", {
3782
+ class: "stroke-dark dark:stroke-light",
3783
+ d: "M4.5 4.5H12A1.5 1.5 0 0 1 13.5 6v.5m-7.5 7H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3784
+ }),
3785
+ T("path", {
3786
+ stroke: "#E23730",
3787
+ d: "M14.692 8.5H9.308a.31.31 0 0 0-.307.336l.47 5.241c.01.128.1.235.223.27l2.303 1.153l2.308-1.153a.31.31 0 0 0 .225-.27L15 8.836a.31.31 0 0 0-.307-.336"
3788
+ })
3789
+ ], -1)
3790
+ ])));
3791
+ }
3792
+ }), Dr = {
3793
+ xmlns: "http://www.w3.org/2000/svg",
3794
+ width: "1em",
3795
+ height: "1em",
3796
+ viewBox: "0 0 16 16"
3797
+ }, Lr = /* @__PURE__ */ pt({
3798
+ name: "VueIcones",
3799
+ __name: "VueIcones",
3800
+ setup(t) {
3801
+ return (e, n) => (F(), D("svg", Dr, n[0] || (n[0] = [
3802
+ T("g", {
3803
+ fill: "none",
3804
+ stroke: "#65bb87",
3805
+ "stroke-linecap": "round",
3806
+ "stroke-linejoin": "round"
3807
+ }, [
3808
+ T("path", { d: "M1 1.5h5.44L8 4.56L9.56 1.5H15l-6.99 13z" }),
3809
+ T("path", { d: "M12.05 1.73L8 9.28L3.95 1.73" })
3810
+ ], -1)
3811
+ ])));
3812
+ }
3813
+ }), Mr = { class: "mt-0" }, Rr = { class: "w-152 mb-2" }, _r = { class: "inline-flex items-center text-inherit not-italic leading-[0] text-center normal-case [vertical-align:-0.125em] [text-rendering:optimizeLegibility] svg:size-4" }, Br = {
3814
+ key: 1,
3815
+ class: "flex items-center justify-center h-[220px]"
3816
+ }, Gr = /* @__PURE__ */ pt({
3817
+ name: "ComponentSelect",
3818
+ __name: "ComponentSelect",
3819
+ props: {
3820
+ modelValue: {
3821
+ default: ""
3822
+ },
3823
+ modelModifiers: {},
3824
+ scope: {
3825
+ default: ""
3826
+ },
3827
+ scopeModifiers: {}
3828
+ },
3829
+ emits: ["update:modelValue", "update:scope"],
3830
+ setup(t) {
3831
+ const e = no.PRESENTED_IMAGE_SIMPLE, n = oo(), o = Le(t, "modelValue"), s = Le(t, "scope"), i = Yn("searchInputRef"), [r, a] = dr(cr({
3832
+ id: qn(),
3833
+ initialFocusEl: () => i.value
3834
+ })), c = oe(() => ar(r.value, a, pr)), l = se(!1), f = se(""), h = oe(() => o.value ? [`${s.value ? `module:${s.value}` : "local"}/${o.value}`] : []), u = se([]);
3835
+ function d(y) {
3836
+ return !y.includes("/");
3837
+ }
3838
+ function p(y) {
3839
+ const k = y.indexOf("/");
3840
+ return k === -1 ? y : y.slice(0, k);
3841
+ }
3842
+ function m(y) {
3843
+ const k = y.split("/"), b = [];
3844
+ let v = "";
3845
+ for (let E = 0; E < Math.max(0, k.length - 1); E++) {
3846
+ const S = k[E];
3847
+ v = E === 0 ? S : `${v}/${S}`, b.push(v);
3848
+ }
3849
+ return b;
3850
+ }
3851
+ function w(y, k) {
3852
+ const b = y || [], v = k?.node?.key, E = !!k?.expanded;
3853
+ let S;
3854
+ v && d(v) ? S = E ? v : void 0 : v ? S = p(v) : S = b.find(d);
3855
+ const C = b.filter((N) => !d(String(N)) || String(N) === S);
3856
+ u.value = C;
3857
+ }
3858
+ function g() {
3859
+ const y = h.value[0];
3860
+ if (!y)
3861
+ return;
3862
+ const k = m(y);
3863
+ u.value = k;
3864
+ }
3865
+ Lt(h, () => {
3866
+ g();
3867
+ }, { immediate: !0 }), Lt(l, (y) => {
3868
+ y && g();
3869
+ }), Lt(l, (y) => {
3870
+ y && g();
3871
+ });
3872
+ const x = oe(() => {
3873
+ const y = f.value.trim();
3874
+ return y ? n.filterRouteTree(y) : n.getRouteTreeData();
3875
+ });
3876
+ function O(y) {
3877
+ const k = [], b = (v) => {
3878
+ for (const E of v || [])
3879
+ Array.isArray(E?.children) && E.children.length > 0 && (k.push(String(E.key)), b(E.children));
3880
+ };
3881
+ return b(y), k;
3882
+ }
3883
+ Lt(f, (y) => {
3884
+ if (String(y || "").trim().length > 0) {
3885
+ const b = x.value;
3886
+ u.value = O(b);
3887
+ } else
3888
+ g();
3889
+ });
3890
+ function P(y, k) {
3891
+ const b = k?.node, v = b?.dataRef ?? b;
3892
+ v?.isLeaf && (o.value = v.value || "", s.value = v.scope || "", f.value = "", l.value = !1);
3893
+ }
3894
+ return (y, k) => {
3895
+ const b = Vn, v = jn, E = Wn, S = $n;
3896
+ return F(), D("div", Mr, [
3897
+ T("div", Xn(Zn(M(c).getTriggerProps())), [
3898
+ Pt(b, {
3899
+ value: o.value,
3900
+ "onUpdate:value": k[0] || (k[0] = (C) => o.value = C),
3901
+ "addon-before": s.value || "本地",
3902
+ placeholder: "请输入或选择组件路径(views下的路径)"
3903
+ }, null, 8, ["value", "addon-before"])
3904
+ ], 16),
3905
+ (F(), J(Qn, { to: "body" }, [
3906
+ M(c).open ? (F(), D("div", Me({ key: 0 }, M(c).getPositionerProps(), { class: "z-1050" }), [
3907
+ T("div", Me(M(c).getContentProps(), { class: "z-1050 w-162 rounded-md border border-solid p-4 border-[--g-border-color] shadow-md outline-none bg-#ffffff dark:bg-#141414 text-dark dark:text-light data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95" }), [
3908
+ T("div", Rr, [
3909
+ Pt(v, null, {
3910
+ default: ie(() => [
3911
+ Pt(b, {
3912
+ ref: "searchInputRef",
3913
+ value: M(f),
3914
+ "onUpdate:value": k[1] || (k[1] = (C) => Re(f) ? f.value = C : null),
3915
+ "allow-clear": "",
3916
+ size: "small",
3917
+ placeholder: "搜索组件或路径"
3918
+ }, null, 8, ["value"])
3919
+ ]),
3920
+ _: 1
3921
+ })
3922
+ ]),
3923
+ M(x) && M(x).length ? (F(), J(E, {
3924
+ key: 0,
3925
+ "expanded-keys": M(u),
3926
+ "onUpdate:expandedKeys": k[2] || (k[2] = (C) => Re(u) ? u.value = C : null),
3927
+ class: "w-152 h-100 overflow-y-auto directory-tree-root",
3928
+ "selected-keys": M(h),
3929
+ "tree-data": M(x),
3930
+ "show-icon": !0,
3931
+ "show-line": !0,
3932
+ virtual: !0,
3933
+ "expand-action": "click",
3934
+ onExpand: w,
3935
+ onSelect: P
3936
+ }, {
3937
+ switcherIcon: ie(({ switcherCls: C }) => [
3938
+ Pt(M(eo), {
3939
+ class: to(C)
3940
+ }, null, 8, ["class"])
3941
+ ]),
3942
+ icon: ie(({ expanded: C, dataRef: N }) => [
3943
+ T("span", _r, [
3944
+ N?.root && !N?.module ? (F(), J(Sr, {
3945
+ key: 0,
3946
+ expanded: C
3947
+ }, null, 8, ["expanded"])) : N?.root && N?.module ? (F(), J(Or, {
3948
+ key: 1,
3949
+ expanded: C
3950
+ }, null, 8, ["expanded"])) : N?.isLeaf ? (F(), J(Lr, { key: 2 })) : ["components", "component"].includes(String(N?.title).toLowerCase()) ? (F(), J(yr, {
3951
+ key: 3,
3952
+ expanded: C
3953
+ }, null, 8, ["expanded"])) : ["views", "view", "pages", "page"].includes(String(N?.title).toLowerCase()) ? (F(), J(Ir, {
3954
+ key: 4,
3955
+ expanded: C
3956
+ }, null, 8, ["expanded"])) : ["src"].includes(String(N?.title).toLowerCase()) ? (F(), J(Cr, {
3957
+ key: 5,
3958
+ expanded: C
3959
+ }, null, 8, ["expanded"])) : (F(), J(wr, {
3960
+ key: 6,
3961
+ expanded: C
3962
+ }, null, 8, ["expanded"]))
3963
+ ])
3964
+ ]),
3965
+ _: 1
3966
+ }, 8, ["expanded-keys", "selected-keys", "tree-data"])) : (F(), D("div", Br, [
3967
+ Pt(S, {
3968
+ image: M(e),
3969
+ description: "没有找到匹配的组件"
3970
+ }, null, 8, ["image"])
3971
+ ]))
3972
+ ], 16)
3973
+ ], 16)) : Jn("", !0)
3974
+ ]))
3975
+ ]);
3976
+ };
3977
+ }
3978
+ });
3979
+ export {
3980
+ Gr as _
3981
+ };