bkui-vue 0.0.2-beta.14 → 0.0.2-beta.140

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 (505) hide show
  1. package/dist/index.cjs.js +142 -160
  2. package/dist/index.esm.js +18004 -19937
  3. package/dist/index.umd.js +142 -160
  4. package/dist/locale/en.esm.js +1 -1
  5. package/dist/locale/en.esm.js.map +1 -1
  6. package/dist/locale/en.umd.js +1 -1
  7. package/dist/locale/en.umd.js.map +1 -1
  8. package/dist/locale/zh-cn.esm.js +1 -1
  9. package/dist/locale/zh-cn.esm.js.map +1 -1
  10. package/dist/locale/zh-cn.umd.js +1 -1
  11. package/dist/locale/zh-cn.umd.js.map +1 -1
  12. package/dist/style.css +1 -1
  13. package/dist/style.variable.css +1 -1
  14. package/lib/affix/affix.d.ts +1 -1
  15. package/lib/affix/affix.variable.css +6 -2
  16. package/lib/affix/index.d.ts +4 -4
  17. package/lib/affix/index.js +322 -1
  18. package/lib/alert/alert.css +7 -0
  19. package/lib/alert/alert.d.ts +5 -5
  20. package/lib/alert/alert.less +16 -6
  21. package/lib/alert/alert.variable.css +13 -2
  22. package/lib/alert/index.d.ts +10 -10
  23. package/lib/alert/index.js +215 -1
  24. package/lib/animate-number/index.d.ts +1 -1
  25. package/lib/animate-number/index.js +156 -1
  26. package/lib/backtop/backtop.css +8 -8
  27. package/lib/backtop/backtop.less +3 -1
  28. package/lib/backtop/backtop.variable.css +17 -13
  29. package/lib/backtop/index.d.ts +1 -1
  30. package/lib/backtop/index.js +189 -1
  31. package/lib/badge/badge.css +8 -2
  32. package/lib/badge/badge.d.ts +2 -2
  33. package/lib/badge/badge.less +8 -4
  34. package/lib/badge/badge.variable.css +14 -4
  35. package/lib/badge/index.d.ts +7 -7
  36. package/lib/badge/index.js +236 -1
  37. package/lib/breadcrumb/breadcrumb.css +4 -4
  38. package/lib/breadcrumb/breadcrumb.variable.css +10 -6
  39. package/lib/breadcrumb/index.d.ts +2 -2
  40. package/lib/breadcrumb/index.js +310 -1
  41. package/lib/button/button-group.d.ts +2 -2
  42. package/lib/button/button.css +30 -7
  43. package/lib/button/button.d.ts +1 -1
  44. package/lib/button/button.less +29 -13
  45. package/lib/button/button.variable.css +44 -17
  46. package/lib/button/index.d.ts +7 -7
  47. package/lib/button/index.js +329 -1
  48. package/lib/card/card.css +11 -11
  49. package/lib/card/card.d.ts +1 -1
  50. package/lib/card/card.less +7 -7
  51. package/lib/card/card.variable.css +17 -13
  52. package/lib/card/index.d.ts +4 -4
  53. package/lib/card/index.js +292 -1
  54. package/lib/cascader/cascader-panel.d.ts +1 -0
  55. package/lib/cascader/cascader.css +7 -7
  56. package/lib/cascader/cascader.d.ts +1 -0
  57. package/lib/cascader/cascader.less +4 -6
  58. package/lib/cascader/cascader.variable.css +13 -9
  59. package/lib/cascader/index.d.ts +6 -2
  60. package/lib/cascader/index.js +2072 -2
  61. package/lib/cascader/interface.d.ts +1 -1
  62. package/lib/checkbox/checkbox-group.d.ts +6 -3
  63. package/lib/checkbox/checkbox.css +13 -1
  64. package/lib/checkbox/checkbox.d.ts +15 -12
  65. package/lib/checkbox/checkbox.less +15 -1
  66. package/lib/checkbox/checkbox.variable.css +19 -3
  67. package/lib/checkbox/common.d.ts +1 -0
  68. package/lib/checkbox/index.d.ts +43 -31
  69. package/lib/checkbox/index.js +570 -1
  70. package/lib/code-diff/code-diff.variable.css +6 -2
  71. package/lib/code-diff/index.d.ts +1 -1
  72. package/lib/code-diff/index.js +5502 -1
  73. package/lib/collapse/collapse.variable.css +6 -2
  74. package/lib/collapse/index.d.ts +2 -2
  75. package/lib/collapse/index.js +571 -1
  76. package/lib/collapse-transition/collapse-transition.variable.css +6 -2
  77. package/lib/collapse-transition/index.d.ts +128 -2
  78. package/lib/collapse-transition/index.js +177 -1
  79. package/lib/color-picker/color-picker.d.ts +16 -0
  80. package/lib/color-picker/color-picker.variable.css +6 -2
  81. package/lib/color-picker/components/recommend-colors.d.ts +16 -0
  82. package/lib/color-picker/index.d.ts +19 -1
  83. package/lib/color-picker/index.js +2666 -1
  84. package/lib/components.js +530 -1
  85. package/lib/config-provider/config-provider.d.ts +21 -0
  86. package/lib/config-provider/config-provider.variable.css +6 -2
  87. package/lib/config-provider/index.d.ts +29 -1
  88. package/lib/config-provider/index.js +365 -1
  89. package/lib/config-provider/token.d.ts +7 -0
  90. package/lib/config-provider/use-global-config.d.ts +2 -0
  91. package/lib/config-provider/use-prefix.d.ts +2 -0
  92. package/lib/container/container.css +4 -4
  93. package/lib/container/container.variable.css +10 -6
  94. package/lib/container/index.d.ts +2 -2
  95. package/lib/container/index.js +392 -1
  96. package/lib/date-picker/common.d.ts +2 -0
  97. package/lib/date-picker/date-picker.d.ts +6 -2
  98. package/lib/date-picker/date-picker.variable.css +6 -2
  99. package/lib/date-picker/index.d.ts +21 -8
  100. package/lib/date-picker/index.js +5636 -1
  101. package/lib/date-picker/panel/date-range.d.ts +2 -1
  102. package/lib/date-picker/panel/date.d.ts +2 -2
  103. package/lib/date-picker/panel/time-range.d.ts +17 -0
  104. package/lib/date-picker/panel/time.d.ts +17 -1
  105. package/lib/date-picker/time-picker.d.ts +3 -1
  106. package/lib/dialog/dialog.css +9 -6
  107. package/lib/dialog/dialog.less +7 -6
  108. package/lib/dialog/dialog.variable.css +15 -8
  109. package/lib/dialog/index.d.ts +1 -1
  110. package/lib/dialog/index.js +984 -2
  111. package/lib/directives/index.js +1387 -2
  112. package/lib/directives/tooltips.d.ts +2 -2
  113. package/lib/dist.index.js +87 -1
  114. package/lib/divider/divider.variable.css +6 -2
  115. package/lib/divider/index.d.ts +1 -1
  116. package/lib/divider/index.js +170 -1
  117. package/lib/dropdown/dropdown.css +2 -1
  118. package/lib/dropdown/dropdown.variable.css +8 -3
  119. package/lib/dropdown/index.d.ts +2 -2
  120. package/lib/dropdown/index.js +376 -1
  121. package/lib/exception/exception.variable.css +6 -2
  122. package/lib/exception/index.d.ts +2 -2
  123. package/lib/exception/index.js +386 -1
  124. package/lib/fixed-navbar/fixed-navbar.variable.css +6 -2
  125. package/lib/fixed-navbar/index.d.ts +1 -1
  126. package/lib/fixed-navbar/index.js +155 -1
  127. package/lib/form/form.css +2 -1
  128. package/lib/form/form.less +3 -2
  129. package/lib/form/form.variable.css +8 -3
  130. package/lib/form/index.d.ts +3 -3
  131. package/lib/form/index.js +953 -1
  132. package/lib/hooks.d.ts +1 -1
  133. package/lib/hooks.js +73 -1
  134. package/lib/icon/angle-double-down-line.js +191 -1
  135. package/lib/icon/angle-double-left-line.js +191 -1
  136. package/lib/icon/angle-double-left.js +191 -1
  137. package/lib/icon/angle-double-right-line.js +191 -1
  138. package/lib/icon/angle-double-right.js +191 -1
  139. package/lib/icon/angle-double-up-line.js +191 -1
  140. package/lib/icon/angle-down-fill.js +191 -1
  141. package/lib/icon/angle-down-line.js +191 -1
  142. package/lib/icon/angle-down.js +191 -1
  143. package/lib/icon/angle-left.js +191 -1
  144. package/lib/icon/angle-right.js +191 -1
  145. package/lib/icon/angle-up-fill.js +191 -1
  146. package/lib/icon/angle-up.js +191 -1
  147. package/lib/icon/archive-fill.js +191 -1
  148. package/lib/icon/arrows-left.js +191 -1
  149. package/lib/icon/arrows-right.js +191 -1
  150. package/lib/icon/assistant.d.ts +4 -0
  151. package/lib/icon/assistant.js +191 -0
  152. package/lib/icon/audio-fill.js +191 -1
  153. package/lib/icon/bk.js +191 -1
  154. package/lib/icon/circle.js +191 -1
  155. package/lib/icon/close-line.js +191 -1
  156. package/lib/icon/close.js +191 -1
  157. package/lib/icon/code.js +191 -1
  158. package/lib/icon/cog-shape.js +191 -1
  159. package/lib/icon/collapse-left.js +191 -1
  160. package/lib/icon/copy-shape.js +191 -1
  161. package/lib/icon/copy.js +191 -1
  162. package/lib/icon/data-shape.js +191 -1
  163. package/lib/icon/del.js +191 -1
  164. package/lib/icon/doc-fill.js +191 -1
  165. package/lib/icon/done.js +191 -1
  166. package/lib/icon/down-shape.js +191 -1
  167. package/lib/icon/down-small.js +191 -1
  168. package/lib/icon/edit-line.js +191 -1
  169. package/lib/icon/ellipsis.js +191 -1
  170. package/lib/icon/enlarge-line.js +191 -1
  171. package/lib/icon/error.js +191 -1
  172. package/lib/icon/excel-fill.js +191 -1
  173. package/lib/icon/exclamation-circle-shape.js +191 -1
  174. package/lib/icon/eye.js +191 -1
  175. package/lib/icon/filliscreen-line.js +191 -1
  176. package/lib/icon/fix-line.js +191 -1
  177. package/lib/icon/fix-shape.js +191 -1
  178. package/lib/icon/folder-open.js +191 -1
  179. package/lib/icon/folder-shape-open.js +191 -1
  180. package/lib/icon/folder-shape.js +191 -1
  181. package/lib/icon/folder.js +191 -1
  182. package/lib/icon/funnel.js +191 -1
  183. package/lib/icon/help-document-fill.js +191 -1
  184. package/lib/icon/help-fill.js +191 -1
  185. package/lib/icon/help.js +191 -1
  186. package/lib/icon/image-fill.js +276 -1
  187. package/lib/icon/img-error.js +276 -1
  188. package/lib/icon/img-placehoulder.js +276 -1
  189. package/lib/icon/index.d.ts +2 -0
  190. package/lib/icon/index.js +2432 -1
  191. package/lib/icon/info-line.js +276 -1
  192. package/lib/icon/info.js +276 -1
  193. package/lib/icon/left-shape.js +276 -1
  194. package/lib/icon/left-turn-line.js +276 -1
  195. package/lib/icon/loading.d.ts +4 -0
  196. package/lib/icon/loading.js +276 -0
  197. package/lib/icon/narrow-line.js +276 -1
  198. package/lib/icon/original.js +276 -1
  199. package/lib/icon/pdf-fill.js +276 -1
  200. package/lib/icon/play-shape.js +276 -1
  201. package/lib/icon/plus.js +276 -1
  202. package/lib/icon/ppt-fill.js +276 -1
  203. package/lib/icon/qq.js +276 -1
  204. package/lib/icon/right-shape.js +276 -1
  205. package/lib/icon/right-turn-line.js +276 -1
  206. package/lib/icon/search.js +276 -1
  207. package/lib/icon/share.js +276 -1
  208. package/lib/icon/spinner.js +276 -1
  209. package/lib/icon/success.js +276 -1
  210. package/lib/icon/switcher-loading.js +276 -1
  211. package/lib/icon/text-file.js +276 -1
  212. package/lib/icon/text-fill.js +276 -1
  213. package/lib/icon/transfer.js +276 -1
  214. package/lib/icon/tree-application-shape.js +276 -1
  215. package/lib/icon/unfull-screen.js +276 -1
  216. package/lib/icon/unvisible.js +276 -1
  217. package/lib/icon/up-shape.js +276 -1
  218. package/lib/icon/upload.js +276 -1
  219. package/lib/icon/video-fill.js +276 -1
  220. package/lib/icon/warn.js +276 -1
  221. package/lib/icon/weixin-pro.js +276 -1
  222. package/lib/icon/weixin.js +276 -1
  223. package/lib/image/image-viewer.variable.css +6 -2
  224. package/lib/image/image.variable.css +6 -2
  225. package/lib/image/index.d.ts +1 -1
  226. package/lib/image/index.js +641 -1
  227. package/lib/index.js +97 -1
  228. package/lib/info-box/index.js +1174 -2
  229. package/lib/info-box/info-box.css +2 -0
  230. package/lib/info-box/info-box.d.ts +4 -0
  231. package/lib/info-box/info-box.less +2 -1
  232. package/lib/info-box/info-box.variable.css +8 -2
  233. package/lib/input/index.d.ts +90 -12
  234. package/lib/input/index.js +1234 -1
  235. package/lib/input/input.css +51 -19
  236. package/lib/input/input.d.ts +79 -6
  237. package/lib/input/input.less +50 -13
  238. package/lib/input/input.variable.css +57 -21
  239. package/lib/input/util.d.ts +6 -0
  240. package/lib/link/index.d.ts +4 -4
  241. package/lib/link/index.js +161 -1
  242. package/lib/link/link.d.ts +1 -1
  243. package/lib/link/link.variable.css +6 -2
  244. package/lib/loading/index.d.ts +5 -5
  245. package/lib/loading/index.js +382 -1
  246. package/lib/loading/loading.css +13 -13
  247. package/lib/loading/loading.d.ts +1 -1
  248. package/lib/loading/loading.less +14 -9
  249. package/lib/loading/loading.variable.css +19 -15
  250. package/lib/locale/index.js +477 -1
  251. package/lib/locale/lang/en.d.ts +7 -0
  252. package/lib/menu/index.d.ts +2 -2
  253. package/lib/menu/index.js +725 -1
  254. package/lib/menu/menu.css +4 -4
  255. package/lib/menu/menu.variable.css +10 -6
  256. package/lib/menu/submenu.variable.css +6 -2
  257. package/lib/message/index.js +1796 -2
  258. package/lib/message/message.css +18 -2
  259. package/lib/message/message.less +16 -2
  260. package/lib/message/message.variable.css +24 -4
  261. package/lib/message/messageConstructor.d.ts +23 -3
  262. package/lib/modal/index.d.ts +2 -2
  263. package/lib/modal/index.js +397 -1
  264. package/lib/modal/modal.css +2 -0
  265. package/lib/modal/modal.variable.css +8 -2
  266. package/lib/navigation/index.d.ts +4 -1
  267. package/lib/navigation/index.js +368 -1
  268. package/lib/navigation/navigation.d.ts +1 -0
  269. package/lib/navigation/navigation.variable.css +6 -2
  270. package/lib/notify/index.js +398 -1
  271. package/lib/notify/notify.css +6 -6
  272. package/lib/notify/notify.less +6 -6
  273. package/lib/notify/notify.variable.css +12 -8
  274. package/lib/notify/notifyConstructor.d.ts +1 -1
  275. package/lib/overflow-title/components/overflow-title.d.ts +257 -2
  276. package/lib/overflow-title/index.d.ts +387 -2
  277. package/lib/overflow-title/index.js +292 -1
  278. package/lib/overflow-title/props.d.ts +129 -0
  279. package/lib/pagination/index.d.ts +6 -6
  280. package/lib/pagination/index.js +894 -1
  281. package/lib/pagination/pagination.css +1 -0
  282. package/lib/pagination/pagination.d.ts +3 -3
  283. package/lib/pagination/pagination.less +1 -0
  284. package/lib/pagination/pagination.variable.css +7 -2
  285. package/lib/plugin-popover/index.js +3833 -1
  286. package/lib/plugins/index.js +63 -1
  287. package/lib/pop-confirm/index.d.ts +43 -4
  288. package/lib/pop-confirm/index.js +294 -1
  289. package/lib/pop-confirm/pop-confirm.css +4 -4
  290. package/lib/pop-confirm/pop-confirm.d.ts +14 -1
  291. package/lib/pop-confirm/pop-confirm.less +4 -4
  292. package/lib/pop-confirm/pop-confirm.variable.css +10 -6
  293. package/lib/popover/content.d.ts +33 -0
  294. package/lib/popover/index.d.ts +74 -16
  295. package/lib/popover/index.js +3842 -1
  296. package/lib/popover/popover.css +2 -1
  297. package/lib/popover/popover.d.ts +40 -7
  298. package/lib/popover/popover.less +4 -3
  299. package/lib/popover/popover.variable.css +8 -3
  300. package/lib/popover/props.d.ts +25 -2
  301. package/lib/popover/use-floating.d.ts +1 -1
  302. package/lib/popover/use-popover-init.d.ts +2 -1
  303. package/lib/popover2/index.d.ts +1 -1
  304. package/lib/popover2/index.js +107 -1
  305. package/lib/preset.d.ts +14 -0
  306. package/lib/preset.js +93 -1
  307. package/lib/process/index.d.ts +1 -1
  308. package/lib/process/index.js +759 -2
  309. package/lib/process/process.variable.css +6 -2
  310. package/lib/progress/index.d.ts +5 -5
  311. package/lib/progress/index.js +432 -1
  312. package/lib/progress/progress.css +11 -7
  313. package/lib/progress/progress.d.ts +3 -3
  314. package/lib/progress/progress.less +8 -3
  315. package/lib/progress/progress.variable.css +17 -9
  316. package/lib/radio/common.d.ts +1 -0
  317. package/lib/radio/index.d.ts +31 -25
  318. package/lib/radio/index.js +636 -1
  319. package/lib/radio/radio-button.d.ts +8 -7
  320. package/lib/radio/radio-group.d.ts +7 -4
  321. package/lib/radio/radio.css +26 -12
  322. package/lib/radio/radio.d.ts +5 -4
  323. package/lib/radio/radio.less +42 -8
  324. package/lib/radio/radio.variable.css +26 -8
  325. package/lib/rate/index.d.ts +12 -8
  326. package/lib/rate/index.js +355 -1
  327. package/lib/rate/rate.d.ts +4 -3
  328. package/lib/rate/rate.variable.css +6 -2
  329. package/lib/rate/star.css +3 -0
  330. package/lib/rate/star.less +3 -0
  331. package/lib/rate/star.variable.css +9 -2
  332. package/lib/resize-layout/index.d.ts +4 -4
  333. package/lib/resize-layout/index.js +430 -1
  334. package/lib/resize-layout/resize-layout.css +14 -2
  335. package/lib/resize-layout/resize-layout.d.ts +1 -1
  336. package/lib/resize-layout/resize-layout.less +14 -2
  337. package/lib/resize-layout/resize-layout.variable.css +20 -4
  338. package/lib/search-select/index.d.ts +62 -29
  339. package/lib/search-select/index.js +2747 -2
  340. package/lib/search-select/input.d.ts +5 -1
  341. package/lib/search-select/menu.d.ts +33 -2
  342. package/lib/search-select/search-select.css +39 -21
  343. package/lib/search-select/search-select.d.ts +23 -20
  344. package/lib/search-select/search-select.less +44 -23
  345. package/lib/search-select/search-select.variable.css +45 -23
  346. package/lib/search-select/selected.d.ts +5 -1
  347. package/lib/search-select/utils.d.ts +13 -5
  348. package/lib/select/common.d.ts +4 -1
  349. package/lib/select/index.d.ts +287 -90
  350. package/lib/select/index.js +2422 -2
  351. package/lib/select/option.d.ts +12 -0
  352. package/lib/select/select.css +16 -5
  353. package/lib/select/select.d.ts +120 -39
  354. package/lib/select/select.less +14 -1
  355. package/lib/select/select.variable.css +46 -31
  356. package/lib/select/selectTagInput.d.ts +10 -5
  357. package/lib/select/type.d.ts +3 -0
  358. package/lib/shared/helper.d.ts +1 -1
  359. package/lib/shared/index.js +2690 -1
  360. package/lib/shared/mask-manager.d.ts +3 -4
  361. package/lib/shared/pop-manager.d.ts +6 -2
  362. package/lib/shared/popover.d.ts +2 -2
  363. package/lib/shared/vue-types.d.ts +4 -3
  364. package/lib/sideslider/index.d.ts +1 -1
  365. package/lib/sideslider/index.js +711 -2
  366. package/lib/sideslider/sideslider.variable.css +6 -2
  367. package/lib/slider/index.d.ts +1 -1
  368. package/lib/slider/index.js +1310 -2
  369. package/lib/slider/slider.css +2 -0
  370. package/lib/slider/slider.less +2 -0
  371. package/lib/slider/slider.variable.css +8 -2
  372. package/lib/steps/index.d.ts +5 -5
  373. package/lib/steps/index.js +826 -2
  374. package/lib/steps/steps.css +18 -6
  375. package/lib/steps/steps.d.ts +3 -3
  376. package/lib/steps/steps.less +26 -5
  377. package/lib/steps/steps.variable.css +24 -8
  378. package/lib/styles/index.d.ts +1 -0
  379. package/lib/styles/mixins/animate.css +4 -4
  380. package/lib/styles/mixins/animate.less +10 -6
  381. package/lib/styles/mixins/animate.variable.css +130 -4
  382. package/lib/styles/mixins/mixins.css +4 -4
  383. package/lib/styles/mixins/mixins.variable.css +4 -4
  384. package/lib/styles/mixins/popper.variable.css +6 -2
  385. package/lib/styles/mixins/scroll.variable.css +6 -2
  386. package/lib/styles/reset.variable.css +6 -2
  387. package/lib/styles/themes/themes.less +7 -3
  388. package/lib/swiper/index.d.ts +1 -1
  389. package/lib/swiper/index.js +337 -1
  390. package/lib/swiper/swiper.css +0 -6
  391. package/lib/swiper/swiper.less +0 -8
  392. package/lib/swiper/swiper.variable.css +6 -8
  393. package/lib/switcher/index.d.ts +34 -20
  394. package/lib/switcher/index.js +278 -1
  395. package/lib/switcher/switcher.css +4 -4
  396. package/lib/switcher/switcher.d.ts +76 -7
  397. package/lib/switcher/switcher.variable.css +10 -6
  398. package/lib/tab/index.d.ts +3 -3
  399. package/lib/tab/index.js +915 -1
  400. package/lib/tab/tab-nav.d.ts +12 -2
  401. package/lib/tab/tab-panel.d.ts +1 -1
  402. package/lib/tab/tab.variable.css +6 -2
  403. package/lib/table/components/table-cell.d.ts +22 -24
  404. package/lib/table/components/table-column.d.ts +100 -71
  405. package/lib/table/const.d.ts +25 -3
  406. package/lib/table/events.d.ts +26 -26
  407. package/lib/table/index.d.ts +309 -191
  408. package/lib/table/index.js +6562 -1
  409. package/lib/table/plugins/body-empty.d.ts +1 -1
  410. package/lib/table/plugins/head-filter.css +4 -28
  411. package/lib/table/plugins/head-filter.d.ts +2 -7
  412. package/lib/table/plugins/head-filter.less +5 -34
  413. package/lib/table/plugins/head-filter.variable.css +10 -30
  414. package/lib/table/plugins/head-sort.d.ts +2 -7
  415. package/lib/table/plugins/head-sort.variable.css +6 -2
  416. package/lib/table/plugins/settings.d.ts +2 -19
  417. package/lib/table/plugins/settings.variable.css +6 -2
  418. package/lib/table/plugins/use-column-resize.d.ts +30 -10
  419. package/lib/table/plugins/use-fixed-column.d.ts +9 -9
  420. package/lib/table/plugins/use-head-cell.d.ts +7 -0
  421. package/lib/table/plugins/use-pagination.d.ts +8 -4
  422. package/lib/table/props.d.ts +84 -52
  423. package/lib/table/table.css +117 -53
  424. package/lib/table/table.d.ts +91 -68
  425. package/lib/table/table.less +70 -26
  426. package/lib/table/table.variable.css +123 -55
  427. package/lib/table/use-attributes.d.ts +59 -0
  428. package/lib/table/use-column.d.ts +264 -53
  429. package/lib/table/use-common.d.ts +1607 -88
  430. package/lib/table/use-render.d.ts +11 -0
  431. package/lib/table/utils.d.ts +34 -31
  432. package/lib/table-column/index.d.ts +356 -113
  433. package/lib/table-column/index.js +775 -1
  434. package/lib/tag/index.d.ts +10 -10
  435. package/lib/tag/index.js +234 -1
  436. package/lib/tag/tag.d.ts +5 -5
  437. package/lib/tag/tag.variable.css +6 -2
  438. package/lib/tag-input/index.d.ts +49 -7
  439. package/lib/tag-input/index.js +1678 -1
  440. package/lib/tag-input/list-tag-render.d.ts +11 -0
  441. package/lib/tag-input/tag-input.css +8 -0
  442. package/lib/tag-input/tag-input.d.ts +46 -6
  443. package/lib/tag-input/tag-input.less +9 -0
  444. package/lib/tag-input/tag-input.variable.css +14 -2
  445. package/lib/tag-input/tag-props.d.ts +16 -2
  446. package/lib/time-picker/index.d.ts +10 -4
  447. package/lib/time-picker/index.js +72 -1
  448. package/lib/time-picker/time-picker.css +4 -3
  449. package/lib/time-picker/time-picker.less +5 -9
  450. package/lib/time-picker/time-picker.variable.css +10 -5
  451. package/lib/timeline/index.d.ts +1 -1
  452. package/lib/timeline/index.js +241 -1
  453. package/lib/timeline/timeline.variable.css +6 -2
  454. package/lib/transfer/index.d.ts +1 -1
  455. package/lib/transfer/index.js +687 -1
  456. package/lib/transfer/transfer.css +2 -2
  457. package/lib/transfer/transfer.less +2 -2
  458. package/lib/transfer/transfer.variable.css +8 -4
  459. package/lib/tree/constant.d.ts +2 -2
  460. package/lib/tree/index.d.ts +70 -40
  461. package/lib/tree/index.js +2603 -1
  462. package/lib/tree/props.d.ts +20 -10
  463. package/lib/tree/tree.css +13 -1
  464. package/lib/tree/tree.d.ts +42 -21
  465. package/lib/tree/tree.variable.css +19 -3
  466. package/lib/tree/use-empty.d.ts +1 -3
  467. package/lib/tree/use-node-action.d.ts +5 -3
  468. package/lib/tree/use-node-attribute.d.ts +17 -8
  469. package/lib/tree/use-search.d.ts +2 -2
  470. package/lib/tree/use-tree-init.d.ts +1 -2
  471. package/lib/tree/util.d.ts +9 -3
  472. package/lib/upload/index.d.ts +1 -1
  473. package/lib/upload/index.js +2888 -2
  474. package/lib/upload/upload.css +4 -4
  475. package/lib/upload/upload.type.d.ts +1 -1
  476. package/lib/upload/upload.variable.css +10 -6
  477. package/lib/upload/use-file-handler.d.ts +2 -2
  478. package/lib/virtual-render/index.d.ts +43 -1
  479. package/lib/virtual-render/index.js +902 -1
  480. package/lib/virtual-render/props.d.ts +15 -0
  481. package/lib/virtual-render/use-fix-top.d.ts +18 -0
  482. package/lib/virtual-render/v-virtual-render.d.ts +24 -1
  483. package/lib/virtual-render/virtual-render.d.ts +25 -0
  484. package/lib/virtual-render/virtual-render.variable.css +6 -2
  485. package/lib/volar.components.d.ts +24 -24
  486. package/package.json +34 -19
  487. package/dist/index.cjs.source.js +0 -45605
  488. package/dist/index.esm.source.js +0 -45605
  489. package/dist/index.umd.source.js +0 -45608
  490. package/lib/cascader/index.js.LICENSE.txt +0 -1
  491. package/lib/dialog/index.js.LICENSE.txt +0 -1
  492. package/lib/directives/index.js.LICENSE.txt +0 -14
  493. package/lib/info-box/index.js.LICENSE.txt +0 -1
  494. package/lib/message/index.js.LICENSE.txt +0 -6
  495. package/lib/process/index.js.LICENSE.txt +0 -1
  496. package/lib/search-select/index.js.LICENSE.txt +0 -1
  497. package/lib/select/index.js.LICENSE.txt +0 -1
  498. package/lib/sideslider/index.js.LICENSE.txt +0 -1
  499. package/lib/slider/index.js.LICENSE.txt +0 -1
  500. package/lib/steps/index.js.LICENSE.txt +0 -1
  501. package/lib/table/render.d.ts +0 -140
  502. package/lib/upload/index.js.LICENSE.txt +0 -1
  503. /package/lib/overflow-title/{overflow.css → overflow-title.css} +0 -0
  504. /package/lib/overflow-title/{overflow.less → overflow-title.less} +0 -0
  505. /package/lib/overflow-title/{overflow.variable.css → overflow-title.variable.css} +0 -0
@@ -1 +1,3842 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider"],t);else{var n="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider")):t(e["../shared"],e.vue,e["../config-provider"]);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,((e,t,n)=>(()=>{var o={8022:(e,t,n)=>{var o=n(4481),r=n(6426),i=r;i.v1=o,i.v4=r,e.exports=i},8725:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var o=n||0,r=t;return[r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]]].join("")}},9157:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},4481:(e,t,n)=>{var o,r,i=n(9157),l=n(8725),a=0,c=0;e.exports=function(e,t,n){var u=t&&n||0,s=t||[],f=(e=e||{}).node||o,d=void 0!==e.clockseq?e.clockseq:r;if(null==f||null==d){var p=i();null==f&&(f=o=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=r=16383&(p[6]<<8|p[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:c+1,y=v-a+(m-c)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||v>a)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=v,c=m,r=d;var h=(1e4*(268435455&(v+=122192928e5))+m)%4294967296;s[u++]=h>>>24&255,s[u++]=h>>>16&255,s[u++]=h>>>8&255,s[u++]=255&h;var g=v/4294967296*1e4&268435455;s[u++]=g>>>8&255,s[u++]=255&g,s[u++]=g>>>24&15|16,s[u++]=g>>>16&255,s[u++]=d>>>8|128,s[u++]=255&d;for(var b=0;b<6;++b)s[u+b]=f[b];return t||l(s)}},6426:(e,t,n)=>{var o=n(9157),r=n(8725);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var l=(e=e||{}).random||(e.rng||o)();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t)for(var a=0;a<16;++a)t[i+a]=l[a];return t||r(l)}},2717:e=>{"use strict";e.exports=n},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={exports:{}};return o[e](n,n.exports,i),n.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{"use strict";i.r(l),i.d(l,{$bkPopover:()=>_e,PopoverProps:()=>x,default:()=>Be});var e=i(4212),t=i(748);function n(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,l=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw l}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var r,a=new Map;function c(e,t){var n,o=[];return Array.isArray(t.arg)?o=t.arg:(n=t.arg,"undefined"!=typeof Element&&n instanceof Element&&o.push(t.arg)),function(n,r){var i=t.instance.popperRef,l=n.target,a=null==r?void 0:r.target,c=!t||!t.instance,u=!l||!a,s=e.contains(l)||e.contains(a),f=e===l,d=o.length&&o.some((function(e){return null==e?void 0:e.contains(l)}))||o.length&&o.includes(a),p=i&&(i.contains(l)||i.contains(a));c||u||s||f||d||p||t.value(n,r)}}document.addEventListener("mousedown",(function(e){return r=e})),document.addEventListener("mouseup",(function(e){var t,o=n(a.values());try{for(o.s();!(t=o.n()).done;){var i,l=n(t.value);try{for(l.s();!(i=l.n()).done;)(0,i.value.documentHandler)(e,r)}catch(e){l.e(e)}finally{l.f()}}}catch(e){o.e(e)}finally{o.f()}}));var u={beforeMount:function(e,t){a.has(e)||a.set(e,[]),a.get(e).push({documentHandler:c(e,t),bindingFn:t.value})},updated:function(e,t){a.has(e)||a.set(e,[]);var n=a.get(e),o=n.findIndex((function(e){return e.bindingFn===t.oldValue})),r={documentHandler:c(e,t),bindingFn:t.value};o>=0?n.splice(o,1,r):n.push(r)},unmounted:function(e){a.delete(e)},install:function(e){e.directive("bkTooltips",u)}};const s=u;var f=i(2717);const d=(0,t.defineComponent)({name:"PopArrow",render:function(){var e=(0,(0,f.usePrefix)().resolveClassName)("pop2-arrow");return(0,t.createVNode)("div",{class:e},null)}});function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function v(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==p(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===p(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m,y;!function(e){e.CLICK_OUTSIDE="clickoutside",e.CONTENT_MOUSEENTER="contentMouseenter",e.CONTENT_MOUSELEAVE="contentMouseleave",e.CONTENT_AfterHidden="afterHidden",e.CONTENT_AfterShow="afterShow"}(y||(y={}));var h=function(e){return!0},g=function(e){return e},b=(v(m={},y.CLICK_OUTSIDE,(function(e){return!0})),v(m,y.CONTENT_MOUSEENTER,g),v(m,y.CONTENT_MOUSELEAVE,g),v(m,y.CONTENT_AfterHidden,h),v(m,y.CONTENT_AfterShow,h),m);const w=(0,t.defineComponent)({name:"PopContent",props:{width:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),height:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),maxHeight:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),extCls:e.PropTypes.string.def("")},setup:function(e){var n=function(e){return/^\d+\.?\d*$/.test("".concat(e))?"".concat(e,"px"):e};return{style:(0,t.computed)((function(){return{width:n(e.width),height:n(e.height),maxHeight:n(e.maxHeight)}})),resolveClassName:(0,f.usePrefix)().resolveClassName}},render:function(){var e,n,o,r,i,l,a=[this.resolveClassName("popover"),this.resolveClassName("pop2-content"),this.extCls];return(0,t.createVNode)("div",{class:a,tabindex:"-1",style:this.style},[null!==(o=null===(n=(e=this.$slots).arrow)||void 0===n?void 0:n.call(e))&&void 0!==o?o:"",null!==(l=null===(i=(r=this.$slots).default)||void 0===i?void 0:i.call(r))&&void 0!==l?l:""])}});var x={isShow:e.PropTypes.bool.def(!1),always:e.PropTypes.bool.def(!1),disabled:e.PropTypes.bool.def(!1),width:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),height:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),maxHeight:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),content:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def(""),allowHtml:e.PropTypes.bool.def(!1),placement:(0,e.placementType)().def(e.PlacementEnum.TOP_START),theme:e.PropTypes.string.def("dark"),trigger:(0,e.triggerType)(),renderType:(0,e.renderType)(),arrow:e.PropTypes.bool.def(!0),padding:e.PropTypes.number.def(5),offset:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.shape({mainAxis:e.PropTypes.number,crossAxis:e.PropTypes.number,alignmentAxis:e.PropTypes.number})]).def(6),boundary:e.PropTypes.oneOfType([e.PropTypes.string.def("parent"),e.PropTypes.instanceOf(HTMLElement)]),zIndex:e.PropTypes.number.def(void 0),disableTeleport:e.PropTypes.bool.def(!1),autoPlacement:e.PropTypes.bool.def(!1),autoVisibility:e.PropTypes.bool.def(!0),disableOutsideClick:e.PropTypes.bool.def(!1),disableTransform:e.PropTypes.bool.def(!1),reference:e.PropTypes.any,modifiers:e.PropTypes.array.def([]),popoverDelay:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.arrayOf(e.PropTypes.number)]).def(100),extCls:e.PropTypes.string.def("")};const T=(0,t.defineComponent)({name:"PopReference",render:function(){var e,t,n;return null!==(n=null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e))&&void 0!==n?n:""}}),P=(0,t.defineComponent)({props:{class:e.PropTypes.string.def(""),mode:e.PropTypes.string.def("")},render:function(){var e,n;return(0,t.createVNode)(t.Fragment,null,[null===(n=(e=this.$slots).default)||void 0===n?void 0:n.call(e)])}});function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,l,a=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);c=!0);}catch(e){u=!0,r=e}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const C=["top","right","bottom","left"],O=["start","end"],A=C.reduce(((e,t)=>e.concat(t,t+"-"+O[0],t+"-"+O[1])),[]),S=Math.min,N=Math.max,L=Math.round,j=Math.floor,H=e=>({x:e,y:e}),I={left:"right",right:"left",bottom:"top",top:"bottom"},D={start:"end",end:"start"};function M(e,t,n){return N(e,S(t,n))}function k(e,t){return"function"==typeof e?e(t):e}function F(e){return e.split("-")[0]}function V(e){return e.split("-")[1]}function $(e){return"x"===e?"y":"x"}function _(e){return"y"===e?"height":"width"}function B(e){return["top","bottom"].includes(F(e))?"y":"x"}function U(e){return $(B(e))}function q(e,t,n){void 0===n&&(n=!1);const o=V(e),r=U(e),i=_(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=z(l)),[l,z(l)]}function W(e){return e.replace(/start|end/g,(e=>D[e]))}function z(e){return e.replace(/left|right|bottom|top/g,(e=>I[e]))}function K(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function X(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Y(e,t,n){let{reference:o,floating:r}=e;const i=B(t),l=U(t),a=_(l),c=F(t),u="y"===i,s=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,d=o[a]/2-r[a]/2;let p;switch(c){case"top":p={x:s,y:o.y-r.height};break;case"bottom":p={x:s,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-r.width,y:f};break;default:p={x:o.x,y:o.y}}switch(V(t)){case"start":p[l]-=d*(n&&u?-1:1);break;case"end":p[l]+=d*(n&&u?-1:1)}return p}async function Z(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:s="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=k(t,e),v=K(p),m=a[d?"floating"===f?"reference":"floating":f],y=X(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:s,strategy:c})),h="floating"===f?{...l.floating,x:o,y:r}:l.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},w=X(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:h,offsetParent:g,strategy:c}):h);return{top:(y.top-w.top+v.top)/b.y,bottom:(w.bottom-y.bottom+v.bottom)/b.y,left:(y.left-w.left+v.left)/b.x,right:(w.right-y.right+v.right)/b.x}}function G(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function J(e){return C.some((t=>e[t]>=0))}function Q(e){const t=S(...e.map((e=>e.left))),n=S(...e.map((e=>e.top)));return{x:t,y:n,width:N(...e.map((e=>e.right)))-t,height:N(...e.map((e=>e.bottom)))-n}}const ee=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=F(n),a=V(n),c="y"===B(n),u=["left","top"].includes(l)?-1:1,s=i&&c?-1:1,f=k(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:v}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof v&&(p="end"===a?-1*v:v),c?{x:p*s,y:d*u}:{x:d*u,y:p*s}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},te=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=k(e,t),u={x:n,y:o},s=await Z(t,c),f=B(F(r)),d=$(f);let p=u[d],v=u[f];if(i){const e="y"===d?"bottom":"right";p=M(p+s["y"===d?"top":"left"],p,p-s[e])}if(l){const e="y"===f?"bottom":"right";v=M(v+s["y"===f?"top":"left"],v,v-s[e])}const m=a.fn({...t,[d]:p,[f]:v});return{...m,data:{x:m.x-n,y:m.y-o}}}}};function ne(e){return ie(e)?(e.nodeName||"").toLowerCase():"#document"}function oe(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function re(e){var t;return null==(t=(ie(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ie(e){return e instanceof Node||e instanceof oe(e).Node}function le(e){return e instanceof Element||e instanceof oe(e).Element}function ae(e){return e instanceof HTMLElement||e instanceof oe(e).HTMLElement}function ce(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof oe(e).ShadowRoot)}function ue(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ve(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function se(e){return["table","td","th"].includes(ne(e))}function fe(e){const t=de(),n=ve(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function de(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function pe(e){return["html","body","#document"].includes(ne(e))}function ve(e){return oe(e).getComputedStyle(e)}function me(e){return le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ye(e){if("html"===ne(e))return e;const t=e.assignedSlot||e.parentNode||ce(e)&&e.host||re(e);return ce(t)?t.host:t}function he(e){const t=ye(e);return pe(t)?e.ownerDocument?e.ownerDocument.body:e.body:ae(t)&&ue(t)?t:he(t)}function ge(e,t){var n;void 0===t&&(t=[]);const o=he(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=oe(o);return r?t.concat(i,i.visualViewport||[],ue(o)?o:[]):t.concat(o,ge(o))}function be(e){const t=ve(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ae(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=L(n)!==i||L(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function we(e){return le(e)?e:e.contextElement}function xe(e){const t=we(e);if(!ae(t))return H(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=be(t);let l=(i?L(n.width):n.width)/o,a=(i?L(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const Te=H(0);function Pe(e){const t=oe(e);return de()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Te}function Ee(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=we(e);let l=H(1);t&&(o?le(o)&&(l=xe(o)):l=xe(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==oe(e))&&t}(i,n,o)?Pe(i):H(0);let c=(r.left+a.x)/l.x,u=(r.top+a.y)/l.y,s=r.width/l.x,f=r.height/l.y;if(i){const e=oe(i),t=o&&le(o)?oe(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=xe(n),t=n.getBoundingClientRect(),o=ve(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;c*=e.x,u*=e.y,s*=e.x,f*=e.y,c+=r,u+=i,n=oe(n).frameElement}}return X({width:s,height:f,x:c,y:u})}function Re(e){return Ee(re(e)).left+me(e).scrollLeft}function Ce(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=oe(e),o=re(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,c=0;if(r){i=r.width,l=r.height;const e=de();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:l,x:a,y:c}}(e,n);else if("document"===t)o=function(e){const t=re(e),n=me(e),o=e.ownerDocument.body,r=N(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=N(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+Re(e);const a=-n.scrollTop;return"rtl"===ve(o).direction&&(l+=N(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(re(e));else if(le(t))o=function(e,t){const n=Ee(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=ae(e)?xe(e):H(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=Pe(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return X(o)}function Oe(e,t){const n=ye(e);return!(n===t||!le(n)||pe(n))&&("fixed"===ve(n).position||Oe(n,t))}function Ae(e,t,n){const o=ae(t),r=re(t),i="fixed"===n,l=Ee(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=H(0);if(o||!o&&!i)if(("body"!==ne(t)||ue(r))&&(a=me(t)),o){const e=Ee(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else r&&(c.x=Re(r));return{x:l.left+a.scrollLeft-c.x,y:l.top+a.scrollTop-c.y,width:l.width,height:l.height}}function Se(e,t){return ae(e)&&"fixed"!==ve(e).position?t?t(e):e.offsetParent:null}function Ne(e,t){const n=oe(e);if(!ae(e))return n;let o=Se(e,t);for(;o&&se(o)&&"static"===ve(o).position;)o=Se(o,t);return o&&("html"===ne(o)||"body"===ne(o)&&"static"===ve(o).position&&!fe(o))?n:o||function(e){let t=ye(e);for(;ae(t)&&!pe(t);){if(fe(t))return t;t=ye(t)}return null}(e)||n}const Le={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=ae(n),i=re(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=H(1);const c=H(0);if((r||!r&&"fixed"!==o)&&(("body"!==ne(n)||ue(i))&&(l=me(n)),ae(n))){const e=Ee(n);a=xe(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+c.x,y:t.y*a.y-l.scrollTop*a.y+c.y}},getDocumentElement:re,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=ge(e).filter((e=>le(e)&&"body"!==ne(e))),r=null;const i="fixed"===ve(e).position;let l=i?ye(e):e;for(;le(l)&&!pe(l);){const t=ve(l),n=fe(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||ue(l)&&!n&&Oe(e,l))?o=o.filter((e=>e!==l)):r=t,l=ye(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=i[0],a=i.reduce(((e,n)=>{const o=Ce(t,n,r);return e.top=N(o.top,e.top),e.right=S(o.right,e.right),e.bottom=S(o.bottom,e.bottom),e.left=N(o.left,e.left),e}),Ce(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Ne,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||Ne,i=this.getDimensions;return{reference:Ae(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return be(e)},getScale:xe,isElement:le,isRTL:function(e){return"rtl"===ve(e).direction}};var je=i(8022),He={},Ie=function(e){return document.querySelector(e)instanceof HTMLElement},De=function(e){return e instanceof Element||e instanceof HTMLDocument},Me=function(e){if(De(e))return{isElement:!0,content:e,vNode:void 0};if(/^(#|\.)/.test(e)){var t=document.querySelector(e),n=De(t);return{isElement:n,content:n?t:e,vNode:n?void 0:e}}return{isElement:!1,content:e,vNode:e}};const ke=function(n,o,r){var i=r.refReference,l=r.refContent,a=r.refArrow,c=r.refRoot,u=(0,t.ref)(!1),s=(0,t.ref)(),f=function(){var e,t,n,o=x(null===(e=i.value)||void 0===e?void 0:e.$el);return(null===(t=document.fullscreenElement)||void 0===t?void 0:t.shadowRoot)?document.fullscreenElement.shadowRoot.contains(o):null===(n=document.fullscreenElement)||void 0===n?void 0:n.contains(o)},d=["dark","light"],p=(0,t.computed)((function(){var e,t,o=null!==(t=null===(e=n.theme)||void 0===e?void 0:e.split(/\s+/))&&void 0!==t?t:[];return o.sort((function(e,t){return Number(d.includes(t))-Number(d.includes(e))})),{systemThemes:o,customThemes:o.filter((function(e){return!d.includes(e)}))}})),m=function(){return n.autoVisibility},h=function(){return n.autoPlacement},g=function(){var e,t,o,r,u=x(null===(e=i.value)||void 0===e?void 0:e.$el),s=x(null===(t=l.value)||void 0===t?void 0:t.$el),f=n.arrow?x(null===(o=a.value)||void 0===o?void 0:o.$el):null,d=x(null===(r=c.value)||void 0===r?void 0:r.$el),p=Me(n.content),v=p.isElement,m=p.content;return s&&v&&!(null==s?void 0:s.contains(m))&&s.append(m),{elReference:u,elContent:s,elArrow:f,root:d}},b=function(){var e={};return Array.isArray(n.modifiers)&&n.modifiers.forEach((function(t){var n,o,r,i,l;if("offset"===t.name){if("number"==typeof(null===(n=t.options)||void 0===n?void 0:n.offset)&&(l=null===(o=t.options)||void 0===o?void 0:o.offset),Array.isArray(null===(r=t.options)||void 0===r?void 0:r.offset)){var a=R(null===(i=t.options)||void 0===i?void 0:i.offset,2);l={mainAxis:a[0],crossAxis:a[1]}}Object.assign(e,{offset:l})}})),e},w=function(e,t){var n,o,r=b(),i=[ee(r.offset||t.offset),te({padding:t.padding})],l={placement:t.placement,middleware:i};if(t.arrow&&i.push((e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:l,elements:a}=t,{element:c,padding:u=0}=k(e,t)||{};if(null==c)return{};const s=K(u),f={x:n,y:o},d=U(r),p=_(d),v=await l.getDimensions(c),m="y"===d,y=m?"top":"left",h=m?"bottom":"right",g=m?"clientHeight":"clientWidth",b=i.reference[p]+i.reference[d]-f[d]-i.floating[p],w=f[d]-i.reference[d],x=await(null==l.getOffsetParent?void 0:l.getOffsetParent(c));let T=x?x[g]:0;T&&await(null==l.isElement?void 0:l.isElement(x))||(T=a.floating[g]||i.floating[p]);const P=b/2-w/2,E=T/2-v[p]/2-1,R=S(s[y],E),C=S(s[h],E),O=R,A=T-v[p]-C,N=T/2-v[p]/2+P,L=M(O,N,A),j=null!=V(r)&&N!=L&&i.reference[p]/2-(N<O?R:C)-v[p]/2<0?N<O?O-N:A-N:0;return{[d]:f[d]-j,data:{[d]:L,centerOffset:N-L+j}}}}))({element:e})),h()?i.push(function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,r;const{rects:i,middlewareData:l,placement:a,platform:c,elements:u}=t,{crossAxis:s=!1,alignment:f,allowedPlacements:d=A,autoAlignment:p=!0,...v}=k(e,t),m=void 0!==f||d===A?function(e,t,n){return(e?[...n.filter((t=>V(t)===e)),...n.filter((t=>V(t)!==e))]:n.filter((e=>F(e)===e))).filter((n=>!e||V(n)===e||!!t&&W(n)!==n))}(f||null,p,d):d,y=await Z(t,v),h=(null==(n=l.autoPlacement)?void 0:n.index)||0,g=m[h];if(null==g)return{};const b=q(g,i,await(null==c.isRTL?void 0:c.isRTL(u.floating)));if(a!==g)return{reset:{placement:m[0]}};const w=[y[F(g)],y[b[0]],y[b[1]]],x=[...(null==(o=l.autoPlacement)?void 0:o.overflows)||[],{placement:g,overflows:w}],T=m[h+1];if(T)return{data:{index:h+1,overflows:x},reset:{placement:T}};const P=x.map((e=>{const t=V(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce(((e,t)=>e+t),0):e.overflows[0],e.overflows]})).sort(((e,t)=>e[1]-t[1])),E=(null==(r=P.filter((e=>e[2].slice(0,V(e[0])?2:3).every((e=>e<=0))))[0])?void 0:r[0])||P[0][0];return E!==a?{data:{index:h+1,overflows:x},reset:{placement:E}}:{}}}}()):(i.unshift(function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:o,rects:r,platform:i,strategy:l}=t,{padding:a=2,x:c,y:u}=k(e,t),s=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(o.reference))||[]),f=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),n=[];let o=null;for(let e=0;e<t.length;e++){const r=t[e];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map((e=>X(Q(e))))}(s),d=X(Q(s)),p=K(a),v=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===f.length&&f[0].left>f[1].right&&null!=c&&null!=u)return f.find((e=>c>e.left-p.left&&c<e.right+p.right&&u>e.top-p.top&&u<e.bottom+p.bottom))||d;if(f.length>=2){if("y"===B(n)){const e=f[0],t=f[f.length-1],o="top"===F(n),r=e.top,i=t.bottom,l=o?e.left:t.left,a=o?e.right:t.right;return{top:r,bottom:i,left:l,right:a,width:a-l,height:i-r,x:l,y:r}}const e="left"===F(n),t=N(...f.map((e=>e.right))),o=S(...f.map((e=>e.left))),r=f.filter((n=>e?n.left===o:n.right===t)),i=r[0].top,l=r[r.length-1].bottom;return{top:i,bottom:l,left:o,right:t,width:t-o,height:l-i,x:o,y:i}}return d}},floating:o.floating,strategy:l});return r.reference.x!==v.reference.x||r.reference.y!==v.reference.y||r.reference.width!==v.reference.width||r.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}}()),i.push(function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:o,middlewareData:r,rects:i,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:s=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...m}=k(e,t),y=F(o),h=F(l)===l,g=await(null==a.isRTL?void 0:a.isRTL(c.floating)),b=f||(h||!v?[z(l)]:function(e){const t=z(e);return[W(e),t,W(t)]}(l));f||"none"===p||b.push(...function(e,t,n,o){const r=V(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:l;default:return[]}}(F(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(W)))),i}(l,v,p,g));const w=[l,...b],x=await Z(t,m),T=[];let P=(null==(n=r.flip)?void 0:n.overflows)||[];if(u&&T.push(x[y]),s){const e=q(o,i,g);T.push(x[e[0]],x[e[1]])}if(P=[...P,{placement:o,overflows:T}],!T.every((e=>e<=0))){var E,R;const e=((null==(E=r.flip)?void 0:E.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(R=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:R.placement;if(!n)switch(d){case"bestFit":{var C;const e=null==(C=P.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}}())),m()&&l.middleware.push(function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=k(e,t);switch(o){case"referenceHidden":{const e=G(await Z(t,{...r,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:J(e)}}}case"escaped":{const e=G(await Z(t,{...r,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:J(e)}}}default:return{}}}}}()),f()||t.isVirtualEl){var a=(o=s.value,{getElementRects:function(e){var t=e.reference,n=e.floating,o=t.getBoundingClientRect(),r=n.getBoundingClientRect();return{reference:{width:o.width,height:o.height,x:o.x,y:o.y},floating:{width:r.width,height:r.height,x:r.x,y:r.y}}},getDimensions:function(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height}},getClippingRect:function(e){var t;!function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e);var n=null!==(t=null==o?void 0:o.getBoundingClientRect())&&void 0!==t?t:{},r=n.width,i=void 0===r?0:r,l=n.height;return{width:i,height:void 0===l?0:l,x:0,y:0}}}),c=a.getElementRects,u=a.getDimensions,d=a.getClippingRect;Object.assign(l,{platform:Object.assign(Object.assign({},null!==(n=null==t?void 0:t.platform)&&void 0!==n?n:{}),{getElementRects:c,getDimensions:u,getClippingRect:d})})}return l},x=function e(t){return t instanceof HTMLElement?t:t instanceof Text?e(t.nextElementSibling):"function"==typeof(null==t?void 0:t.getBoundingClientRect)?t:null},T=p.value.customThemes.join(" "),P=p.value.customThemes.reduce((function(e,t){return Object.assign(v({},"data-".concat(t,"-theme"),!0),e)}),{}),E="".concat(T),C=null,O=function(e){var t=window.devicePixelRatio||1;return Math.round(e*t)/t||0},L=function(e,t,o,r){var i;n.disableTransform?Object.assign(e.style,{left:"".concat(O(t),"px"),top:"".concat(O(o),"px")}):Object.assign(e.style,{left:"0",top:"0",transform:"translate3d(".concat(O(t),"px,").concat(O(o),"px,0)")});var l=!!m()&&(null===(i=r.hide)||void 0===i?void 0:i.referenceHidden);Object.assign(e.style,{visibility:l?"hidden":"visible"})},H=function(e,t,o){var r;if(n.arrow){var i=null!==(r=o.arrow)&&void 0!==r?r:{},l=i.x,a=i.y;e.setAttribute("data-arrow",t),Object.assign(e.style,{left:"",top:"",bottom:"",right:""});var c={top:"bottom",right:"left",bottom:"top",left:"right"}[t];Object.assign(e.style,v({left:null!==l?"".concat(l,"px"):"",top:null!==a?"".concat(a,"px"):""},c,"-4px"))}},I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=g(),o=n.elReference,r=n.elContent,i=n.elArrow,l=e||o;if(l&&r){var a=w(i,t);((e,t,n)=>{const o=new Map,r={platform:Le,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:s,y:f}=Y(u,o,c),d=o,p={},v=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:y,y:h,data:g,reset:b}=await m({x:s,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:p,rects:u,platform:l,elements:{reference:e,floating:t}});s=null!=y?y:s,f=null!=h?h:f,p={...p,[i]:{...p[i],...g}},b&&v<=50&&(v++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:r}):b.rects),({x:s,y:f}=Y(u,d,c))),n=-1)}return{x:s,y:f,placement:d,strategy:r,middlewareData:p}})(e,t,{...r,platform:i})})(l,r,a).then((function(e){var t=e.x,n=e.y,o=e.placement,l=e.middlewareData,a=r.className;r.className="".concat(a.replace(E,"")," ").concat(E).replace(/\s+/gm," ").replace(/^\s+|\s+$/g,""),Object.keys(P).forEach((function(e){r.setAttribute(e,P[e])}));var c=o.split("-")[0],u=c;["left","right","top","bottom"].includes(c)||(u="top"),L(r,t,n,l),H(i,u,l)}))}},D=void 0,$=void 0,ne=!1,oe=function(){return Array.isArray(n.popoverDelay)?[n.popoverDelay[0],n.popoverDelay.slice(-1)[0]]:[n.popoverDelay,n.popoverDelay]},ie=function(){var e=oe()[0];$=setTimeout((function(){D&&clearTimeout(D),n.disabled||(u.value=!0)}),e)},le=function(){var e=oe()[1];D=setTimeout((function(){$&&clearTimeout($),u.value=!1}),e)},ae=function(){u.value?le():ie()},ce=function(){ae()},ue=function(e){"hover"===n.trigger&&(D&&(ne=!0,clearTimeout(D),D=void 0),fe(e))},se=function(e){ne&&(le(),ne=!1,de(e))},fe=function(e){o.emit(y.CONTENT_MOUSEENTER,e)},de=function(e){o.emit(y.CONTENT_MOUSELEAVE,e)};return(0,t.watch)((function(){return n.isShow}),(function(e){u.value=e})),(0,t.watch)(u,(function(t){var r,i;t?((i=x(null===(r=l.value)||void 0===r?void 0:r.$el)).style.setProperty("display","block"),i.style.setProperty("z-index","".concat(n.zIndex?n.zIndex:e.bkZIndexManager.getPopperIndex())),I(),o.emit(y.CONTENT_AfterShow,{isShow:!0})):function(){var e;x(null===(e=l.value)||void 0===e?void 0:e.$el).style.setProperty("display","none"),o.emit(y.CONTENT_AfterHidden,{isShow:!1})}()})),{showPopover:ie,hidePopover:le,resolveTriggerEvents:function(){var e;return null!==(e={hover:{content:[["mouseenter",ue],["mouseleave",se]],reference:[["mouseenter",ie],["mouseleave",le],["focus",ie],["blur",le]]},click:[["click",ce]],manual:{content:[["mouseenter",fe],["mouseleave",de]],reference:[[]]}}[n.trigger])&&void 0!==e?e:[]},updatePopover:I,triggerPopover:ae,resolvePopElements:g,isElementFullScreen:f,resolveTargetElement:x,createPopInstance:function(){var e=g(),t=e.elReference,o=e.elContent;C=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:c=!1}=o,u=we(e),s=r||i?[...u?ge(u):[],...ge(t)]:[];s.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const f=u&&a?function(e,t){let n,o=null;const r=re(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function l(a,c){void 0===a&&(a=!1),void 0===c&&(c=1),i();const{left:u,top:s,width:f,height:d}=e.getBoundingClientRect();if(a||t(),!f||!d)return;const p={rootMargin:-j(s)+"px "+-j(r.clientWidth-(u+f))+"px "+-j(r.clientHeight-(s+d))+"px "+-j(u)+"px",threshold:N(0,S(1,c))||1};let v=!0;function m(e){const t=e[0].intersectionRatio;if(t!==c){if(!v)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),100)}v=!1}try{o=new IntersectionObserver(m,{...p,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(m,p)}o.observe(e)}(!0),i}(u,n):null;let d,p=-1,v=null;l&&(v=new ResizeObserver((e=>{let[o]=e;o&&o.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{v&&v.observe(t)}))),n()})),u&&!c&&v.observe(u),v.observe(t));let m=c?Ee(e):null;return c&&function t(){const o=Ee(e);!m||o.x===m.x&&o.y===m.y&&o.width===m.width&&o.height===m.height||n(),m=o,d=requestAnimationFrame(t)}(),n(),()=>{s.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),f&&f(),v&&v.disconnect(),v=null,c&&cancelAnimationFrame(d)}}(t,o,(function(){u.value&&I(null,n)}))},updateFullscreenTarget:function(e){s.value=e},getFullscreenRoot:function(e){return f()?document.fullscreenElement.shadowRoot?document.fullscreenElement.shadowRoot.querySelector(e):document.fullscreenElement.querySelector(e):document.body},stopHide:function(){D&&(ne=!0,clearTimeout(D),D=void 0)},localIsShow:u,cleanup:C}};var Fe=null,Ve=null;const $e=(0,t.defineComponent)({name:"Popover",components:{Content:w,Arrow:d,Root:P},directives:{clickoutside:s},props:x,emits:b,setup:function(n,o){var r=(0,t.toRefs)(n).reference,i=(0,t.ref)(),l=(0,t.ref)(),a=(0,t.ref)(),c=(0,t.ref)(),u=(0,t.computed)((function(){return r.value||i.value})),s=function(e,n,o){var r=o.refReference,i=o.refContent,l=o.refArrow,a=o.refRoot,c=null,u=(0,t.ref)(!1),s=(He.fullscreenReferId||(He.fullscreenReferId="id_".concat((0,je.v4)())),He.fullscreenReferId),f=(0,t.ref)(),d=ke(e,n,{refReference:r,refContent:i,refArrow:l,refRoot:a}),p=d.localIsShow,v=d.showPopover,m=d.hidePopover,h=d.updatePopover,g=d.resolveTriggerEvents,b=d.resolvePopElements,w=d.isElementFullScreen,x=d.updateFullscreenTarget,T=d.createPopInstance,P=d.getFullscreenRoot,E=d.stopHide,C=function(){m()},O=function(){T(),e.always?v():A()},A=function(){var e=b(),t=e.elReference,n=e.elContent;if(c=g(),Array.isArray(c))S(t,c);else{var o=c,r=o.content,i=o.reference;S(t,i),S(n,r)}},S=function(e,t){t.forEach((function(t){var n=R(t,2),o=n[0],r=n[1];o&&"function"==typeof r&&e.addEventListener(o,r)}))},N=function(){var e=b(),t=e.elReference,n=e.root;u.value?H.value=null==f?void 0:f.value:H.value=j(n||t)},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#",n=function(n){var o=null,r=function(e){null===o&&e()};return r((function(){if(/^parent$/i.test(e.boundary)){o="".concat(t).concat(Fe);var r=(n||{}).parentNode;(null==r?void 0:r.parentNode)&&(r.parentNode.setAttribute("data-pnode-id",Ve),o="[data-pnode-id=".concat(Ve,"]"))}})),r((function(){if(!/^body$/i.test(e.boundary)){if("string"==typeof e.boundary)return Ie(e.boundary)?void(o=e.boundary):(console.error("props.boundary is not available selector"),void(o="body"));if(De(e.boundary))return void(o=e.boundary)}})),r((function(){o="string"==typeof e.boundary?e.boundary:"".concat(t).concat(Fe)})),o};if(null===Fe||!Ie("#".concat(Fe))){Fe="id_".concat((0,je.v4)());var o=document.createElement("div");o.setAttribute("id",Fe),o.setAttribute("data-popper-id",Fe),document.body.append(o)}return null===Ve&&(Ve="id_".concat((0,je.v4)())),{popContainerId:Fe,prefixId:n(),getPrefixId:n}}(e,"#"),j=L.getPrefixId,H=(0,t.ref)(),I=function(){!function(){if(null==c?void 0:c.length){var e=b().elReference;e&&c.forEach((function(t){var n=R(t,2),o=n[0],r=n[1];o&&"function"==typeof r&&e.removeEventListener(o,r)})),c=null}}()},D=function(e){var t;f.value=e,x(e),u.value=w(),null===(t=null==f?void 0:f.value)||void 0===t||t.setAttribute("data-fllsrn-id",s)},M=function(t){var n,o,r;document.fullscreenElement||(r="[data-fllsrn-id=".concat(s,"]"),(null!==(o=null===(n=null==f?void 0:f.value)||void 0===n?void 0:n.querySelectorAll(r))&&void 0!==o?o:[]).forEach((function(e){null==e||e.removeAttribute("data-fllsrn-id")}))),D(t.target),N(),h(null,e)};return{onMountedFn:function(){if(!e.disabled){if(O(),w()){var t="[data-fllsrn-id=".concat(s,"]"),n=P(t);D(n)}N(),document.body.addEventListener("fullscreenchange",M)}},onUnmountedFn:function(){I(),document.body.removeEventListener("fullscreenchange",M)},handleClickOutside:function(t){n.emit(y.CLICK_OUTSIDE,{isShow:p.value,event:t}),e.disableOutsideClick||e.always||e.disabled||"manual"===e.trigger||p.value&&C()},beforeInstanceUnmount:I,updateBoundary:N,initPopInstance:O,updatePopover:h,showPopover:v,hidePopover:m,showFn:function(){v()},hideFn:C,stopHide:E,isFullscreen:u,boundary:H,localIsShow:p}}(n,o,{refReference:u,refContent:l,refArrow:a,refRoot:c}),f=s.onMountedFn,d=s.onUnmountedFn,p=s.handleClickOutside,v=s.beforeInstanceUnmount,m=s.updateBoundary,h=s.initPopInstance,g=s.showFn,b=s.hideFn,w=s.showPopover,x=s.hidePopover,T=s.updatePopover,P=s.stopHide,E=s.localIsShow,C=s.boundary;n.always||n.disabled||(0,t.watch)((function(){return n.isShow}),(function(){n.isShow?w():x()}),{immediate:!0}),(0,t.watch)((function(){return[n.disabled]}),(function(e){e[0]?v():h()})),m(),(0,t.onMounted)(f),(0,t.onBeforeUnmount)(d);var O=(0,t.computed)((function(){return!n.disableTeleport})),A=(0,t.computed)((function(){return n.renderType===e.RenderType.AUTO||E.value}));return{boundary:C,arrow:n.arrow,refDefaultReference:i,refContent:l,refArrow:a,content:n.content,theme:n.theme,transBoundary:O,handleClickOutside:p,updatePopover:T,hide:function(){b()},show:function(){g()},stopHide:P,contentIsShow:A,renderContent:function(){return n.allowHtml?Me(n.content).vNode:n.content}}},render:function(){var e,n,o,r,i,l,a,c=this,u=function(e){var n;return"string"==typeof(null===(n=e[0])||void 0===n?void 0:n.children)?(0,t.createVNode)("span",null,[e]):e};return(0,t.createVNode)(P,{ref:"refRoot"},{default:function(){return[(0,t.createVNode)(T,{ref:"refDefaultReference"},(s=e=u(null!==(r=null===(o=(n=c.$slots).default)||void 0===o?void 0:o.call(n))&&void 0!==r?r:(0,t.createVNode)("span",null,null)),"function"==typeof s||"[object Object]"===Object.prototype.toString.call(s)&&!(0,t.isVNode)(s)?e:{default:function(){return[e]}})),(0,t.createVNode)(t.Teleport,{to:c.boundary,disabled:!c.transBoundary},{default:function(){return[(0,t.withDirectives)((0,t.createVNode)(w,{ref:"refContent","data-theme":c.theme,extCls:c.extCls,width:c.width,height:c.height,maxHeight:c.maxHeight},{default:function(){return[c.contentIsShow?null!==(a=null===(l=(i=c.$slots).content)||void 0===l?void 0:l.call(i))&&void 0!==a?a:c.renderContent():""]},arrow:function(){var e,n;return c.arrow?(0,t.createVNode)(d,{ref:"refArrow"},{default:function(){return[null===(n=(e=c.$slots).arrow)||void 0===n?void 0:n.call(e)]}}):""}}),[[(0,t.resolveDirective)("clickoutside"),c.handleClickOutside]])]}})];var s}})}});function _e(e){var n,o=null,r=null,i=null,l=Object.assign(Object.assign({boundary:"body",placement:"top",autoVisibility:!1},e),{trigger:"manual"}),a={name:"$popover",setup:function(e,n){var o=n.expose,r=(0,t.ref)(l),i=(0,t.ref)(),a=(0,t.ref)({position:"absolute",pointerEvents:"none",left:0,top:0,width:"auto",height:"auto",transform:""}),c=function(e){if(De(e)){var t=e.getBoundingClientRect(),n=t.x,o=t.y,r=t.width,i=t.height;Object.assign(a.value,{width:"".concat(r,"px"),height:"".concat(i,"px"),transform:"translate3d(".concat(n,"px,").concat(o,"px,0)")})}else{var l=e.clientX,c=e.clientY;Object.assign(a.value,{transform:"translate3d(".concat(l,"px,").concat(c,"px,0)"),width:"10px",height:"10px"})}};c(r.value.target);var u=(0,t.computed)((function(){var e=["target"];return Object.keys(r.value).filter((function(t){return!e.includes(t)})).reduce((function(e,t){return Object.assign(Object.assign({},e),v({},t,r.value[t]))}),{})})),s=function(){var e;null===(e=l.onContentMouseenter)||void 0===e||e.call(l)},f=function(){var e;null===(e=l.onContentMouseleave)||void 0===e||e.call(l)};return o({show:function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.show)||void 0===t||t.call(e)},hide:function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.hide)||void 0===t||t.call(e)},updateTarget:function(e){var n,o;r.value.target=e,c(e),null===(o=null===(n=i.value)||void 0===n?void 0:n.updatePopover)||void 0===o||o.call(n),(0,t.nextTick)((function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.updatePopover)||void 0===t||t.call(e)}))},stopHide:function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.stopHide)||void 0===t||t.call(e)}}),function(){return(0,t.createVNode)($e,(0,t.mergeProps)(u.value,{ref:i,onContentMouseenter:s,onContentMouseleave:f}),{default:function(){return[(0,t.createVNode)("span",{style:a.value},null)]}})}}};return null===o&&(i=document.createElement("div"),(n=l.boundary,/^body$/i.test(n)?document.body:/^parent$/i.test(n)?De(l.target)?l.target.parentNode:l.target.target.parentNode:"string"==typeof n&&Ie(n)?document.querySelector(n):document.body).append(i),o=(0,t.createApp)(a),r=o.mount(i)),{close:function(){o&&(o.unmount(),r=null,o=null,i.remove())},show:function(){null==r||r.show()},hide:function(){null==r||r.hide()},update:function(e){null==r||r.updateTarget(e)},get vm(){return r},get $el(){return r.$el}}}const Be=(0,e.withInstall)($e)})(),l})()));
1
+ import "./popover.less";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__ from "../shared";
3
+ import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
4
+ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__ from "../config-provider";
5
+ import * as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__ from "vue-types";
6
+ import * as __WEBPACK_EXTERNAL_MODULE_lodash_isElement_e6b2a6ce__ from "lodash/isElement";
7
+ /******/ // The require scope
8
+ /******/ var __webpack_require__ = {};
9
+ /******/
10
+ /************************************************************************/
11
+ /******/ /* webpack/runtime/define property getters */
12
+ /******/ (() => {
13
+ /******/ // define getter functions for harmony exports
14
+ /******/ __webpack_require__.d = (exports, definition) => {
15
+ /******/ for(var key in definition) {
16
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
17
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
18
+ /******/ }
19
+ /******/ }
20
+ /******/ };
21
+ /******/ })();
22
+ /******/
23
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
24
+ /******/ (() => {
25
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
26
+ /******/ })();
27
+ /******/
28
+ /************************************************************************/
29
+ var __webpack_exports__ = {};
30
+
31
+ // EXPORTS
32
+ __webpack_require__.d(__webpack_exports__, {
33
+ kB: () => (/* reexport */ createPopoverComponent),
34
+ uE: () => (/* reexport */ PopoverProps),
35
+ ZP: () => (/* binding */ src)
36
+ });
37
+
38
+ ;// CONCATENATED MODULE: external "../shared"
39
+ var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
40
+ var y = x => () => x
41
+ const shared_namespaceObject = x({ ["PlacementEnum"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PlacementEnum, ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes, ["RenderType"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.RenderType, ["bkZIndexManager"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.bkZIndexManager, ["placementType"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.placementType, ["renderType"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.renderType, ["triggerType"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.triggerType, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall });
42
+ ;// CONCATENATED MODULE: external "vue"
43
+ var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
44
+ var external_vue_y = x => () => x
45
+ const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["Teleport"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Teleport, ["Text"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Text, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createApp"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createApp, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
46
+ ;// CONCATENATED MODULE: ../../packages/directives/src/clickoutside.ts
47
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
48
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
49
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
50
+ /*
51
+ * Tencent is pleased to support the open source community by making
52
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
53
+ *
54
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
55
+ *
56
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
57
+ *
58
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
59
+ *
60
+ * ---------------------------------------------------
61
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
62
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
63
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
64
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
65
+ *
66
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
67
+ * the Software.
68
+ *
69
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
70
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
71
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
72
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
73
+ * IN THE SOFTWARE.
74
+ */
75
+ var isElement = function isElement(e) {
76
+ if (typeof Element === 'undefined') return false;
77
+ return e instanceof Element;
78
+ };
79
+ var nodeList = new Map();
80
+ var startClick;
81
+ document.addEventListener('mousedown', function (e) {
82
+ return startClick = e;
83
+ });
84
+ document.addEventListener('mouseup', function (e) {
85
+ var _iterator = _createForOfIteratorHelper(nodeList.values()),
86
+ _step;
87
+ try {
88
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
89
+ var handlers = _step.value;
90
+ var _iterator2 = _createForOfIteratorHelper(handlers),
91
+ _step2;
92
+ try {
93
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
94
+ var documentHandler = _step2.value.documentHandler;
95
+ documentHandler(e, startClick);
96
+ }
97
+ } catch (err) {
98
+ _iterator2.e(err);
99
+ } finally {
100
+ _iterator2.f();
101
+ }
102
+ }
103
+ } catch (err) {
104
+ _iterator.e(err);
105
+ } finally {
106
+ _iterator.f();
107
+ }
108
+ });
109
+ function createDocumentHandler(el, binding) {
110
+ var excludes = [];
111
+ if (Array.isArray(binding.arg)) {
112
+ excludes = binding.arg;
113
+ } else if (isElement(binding.arg)) {
114
+ excludes.push(binding.arg);
115
+ }
116
+ return function (mouseup, mousedown) {
117
+ var popperRef = binding.instance.popperRef;
118
+ var mouseUpTarget = mouseup.target;
119
+ var mouseDownTarget = mousedown === null || mousedown === void 0 ? void 0 : mousedown.target;
120
+ var isBound = !binding || !binding.instance;
121
+ var isTargetExists = !mouseUpTarget || !mouseDownTarget;
122
+ var isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget);
123
+ var isSelf = el === mouseUpTarget;
124
+ var isTargetExcluded = excludes.length && excludes.some(function (item) {
125
+ return item === null || item === void 0 ? void 0 : item.contains(mouseUpTarget);
126
+ }) || excludes.length && excludes.includes(mouseDownTarget);
127
+ var isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget));
128
+ if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) {
129
+ return;
130
+ }
131
+ binding.value(mouseup, mousedown);
132
+ };
133
+ }
134
+ var ClickOutside = {
135
+ beforeMount: function beforeMount(el, binding) {
136
+ if (!nodeList.has(el)) {
137
+ nodeList.set(el, []);
138
+ }
139
+ nodeList.get(el).push({
140
+ documentHandler: createDocumentHandler(el, binding),
141
+ bindingFn: binding.value
142
+ });
143
+ },
144
+ updated: function updated(el, binding) {
145
+ if (!nodeList.has(el)) {
146
+ nodeList.set(el, []);
147
+ }
148
+ var handlers = nodeList.get(el);
149
+ var oldHandlerIndex = handlers.findIndex(function (item) {
150
+ return item.bindingFn === binding.oldValue;
151
+ });
152
+ var newHandler = {
153
+ documentHandler: createDocumentHandler(el, binding),
154
+ bindingFn: binding.value
155
+ };
156
+ if (oldHandlerIndex >= 0) {
157
+ // replace the old handler to the new handler
158
+ handlers.splice(oldHandlerIndex, 1, newHandler);
159
+ } else {
160
+ handlers.push(newHandler);
161
+ }
162
+ },
163
+ unmounted: function unmounted(el) {
164
+ // remove all listeners when a component unmounted
165
+ nodeList["delete"](el);
166
+ }
167
+ };
168
+ ClickOutside.install = function (app) {
169
+ app.directive('bkTooltips', ClickOutside);
170
+ };
171
+ /* harmony default export */ const clickoutside = (ClickOutside);
172
+ ;// CONCATENATED MODULE: external "../config-provider"
173
+ var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
174
+ var config_provider_y = x => () => x
175
+ const config_provider_namespaceObject = config_provider_x({ ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix });
176
+ ;// CONCATENATED MODULE: ../../packages/popover/src/arrow.tsx
177
+
178
+ /*
179
+ * Tencent is pleased to support the open source community by making
180
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
181
+ *
182
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
183
+ *
184
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
185
+ *
186
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
187
+ *
188
+ * ---------------------------------------------------
189
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
190
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
191
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
192
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
193
+ *
194
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
195
+ * the Software.
196
+ *
197
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
198
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
199
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
200
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
201
+ * IN THE SOFTWARE.
202
+ */
203
+
204
+
205
+ /* harmony default export */ const src_arrow = ((0,external_vue_namespaceObject.defineComponent)({
206
+ name: 'PopArrow',
207
+ render: function render() {
208
+ var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
209
+ resolveClassName = _usePrefix.resolveClassName;
210
+ var arrowClassName = resolveClassName('pop2-arrow');
211
+ return (0,external_vue_namespaceObject.createVNode)("div", {
212
+ "class": arrowClassName
213
+ }, null);
214
+ }
215
+ }));
216
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
217
+ function _typeof(obj) {
218
+ "@babel/helpers - typeof";
219
+
220
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
221
+ return typeof obj;
222
+ } : function (obj) {
223
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
224
+ }, _typeof(obj);
225
+ }
226
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
227
+
228
+ function _toPrimitive(input, hint) {
229
+ if (_typeof(input) !== "object" || input === null) return input;
230
+ var prim = input[Symbol.toPrimitive];
231
+ if (prim !== undefined) {
232
+ var res = prim.call(input, hint || "default");
233
+ if (_typeof(res) !== "object") return res;
234
+ throw new TypeError("@@toPrimitive must return a primitive value.");
235
+ }
236
+ return (hint === "string" ? String : Number)(input);
237
+ }
238
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
239
+
240
+
241
+ function _toPropertyKey(arg) {
242
+ var key = _toPrimitive(arg, "string");
243
+ return _typeof(key) === "symbol" ? key : String(key);
244
+ }
245
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
246
+
247
+ function _defineProperty(obj, key, value) {
248
+ key = _toPropertyKey(key);
249
+ if (key in obj) {
250
+ Object.defineProperty(obj, key, {
251
+ value: value,
252
+ enumerable: true,
253
+ configurable: true,
254
+ writable: true
255
+ });
256
+ } else {
257
+ obj[key] = value;
258
+ }
259
+ return obj;
260
+ }
261
+ ;// CONCATENATED MODULE: ../../packages/popover/src/const.tsx
262
+
263
+ var _EMIT_EVENT_TYPES;
264
+ /* eslint-disable @typescript-eslint/naming-convention */
265
+ /*
266
+ * Tencent is pleased to support the open source community by making
267
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
268
+ *
269
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
270
+ *
271
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
272
+ *
273
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
274
+ *
275
+ * ---------------------------------------------------
276
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
277
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
278
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
279
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
280
+ *
281
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
282
+ * the Software.
283
+ *
284
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
285
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
286
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
287
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
288
+ * IN THE SOFTWARE.
289
+ */
290
+ // eslint-disable-next-line @typescript-eslint/naming-convention
291
+ var EMIT_EVENTS;
292
+ (function (EMIT_EVENTS) {
293
+ EMIT_EVENTS["CLICK_OUTSIDE"] = "clickoutside";
294
+ EMIT_EVENTS["CONTENT_MOUSEENTER"] = "contentMouseenter";
295
+ EMIT_EVENTS["CONTENT_MOUSELEAVE"] = "contentMouseleave";
296
+ EMIT_EVENTS["CONTENT_AfterHidden"] = "afterHidden";
297
+ EMIT_EVENTS["CONTENT_AfterShow"] = "afterShow";
298
+ })(EMIT_EVENTS || (EMIT_EVENTS = {}));
299
+ var EVENT_SHOW_HIDE_FN = function EVENT_SHOW_HIDE_FN(_args) {
300
+ return true;
301
+ };
302
+ var EVENT_COMMON_FN = function EVENT_COMMON_FN(e) {
303
+ return e;
304
+ };
305
+ var EVENT_CLICK_OUTSIDE_FN = function EVENT_CLICK_OUTSIDE_FN(_args) {
306
+ return true;
307
+ };
308
+ var EMIT_EVENT_TYPES = (_EMIT_EVENT_TYPES = {}, _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CLICK_OUTSIDE, EVENT_CLICK_OUTSIDE_FN), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CONTENT_MOUSEENTER, EVENT_COMMON_FN), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CONTENT_MOUSELEAVE, EVENT_COMMON_FN), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CONTENT_AfterHidden, EVENT_SHOW_HIDE_FN), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CONTENT_AfterShow, EVENT_SHOW_HIDE_FN), _EMIT_EVENT_TYPES);
309
+ ;// CONCATENATED MODULE: ../../packages/popover/src/content.tsx
310
+
311
+ /*
312
+ * Tencent is pleased to support the open source community by making
313
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
314
+ *
315
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
316
+ *
317
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
318
+ *
319
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
320
+ *
321
+ * ---------------------------------------------------
322
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
323
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
324
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
325
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
326
+ *
327
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
328
+ * the Software.
329
+ *
330
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
331
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
332
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
333
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
334
+ * IN THE SOFTWARE.
335
+ */
336
+
337
+
338
+
339
+ /* harmony default export */ const content = ((0,external_vue_namespaceObject.defineComponent)({
340
+ name: 'PopContent',
341
+ props: {
342
+ width: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.number]).def('auto'),
343
+ height: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.number]).def('auto'),
344
+ maxHeight: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.number]).def('auto'),
345
+ maxWidth: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.number]).def('auto'),
346
+ extCls: shared_namespaceObject.PropTypes.string.def(''),
347
+ visible: shared_namespaceObject.PropTypes.bool.def(false),
348
+ eventDelay: shared_namespaceObject.PropTypes.number.def(0)
349
+ },
350
+ setup: function setup(props) {
351
+ var resolveValToPix = function resolveValToPix(val) {
352
+ if (/^\d+\.?\d*$/.test("".concat(val))) {
353
+ return "".concat(val, "px");
354
+ }
355
+ return val;
356
+ };
357
+ var style = (0,external_vue_namespaceObject.computed)(function () {
358
+ return {
359
+ width: resolveValToPix(props.width),
360
+ height: resolveValToPix(props.height),
361
+ maxHeight: resolveValToPix(props.maxHeight),
362
+ maxWidth: resolveValToPix(props.maxWidth)
363
+ };
364
+ });
365
+ var refContent = (0,external_vue_namespaceObject.ref)(null);
366
+ var refTimer = (0,external_vue_namespaceObject.ref)(null);
367
+ var resetPointerEvent = function resetPointerEvent() {
368
+ var _props$eventDelay;
369
+ if (props.eventDelay === 0) {
370
+ return;
371
+ }
372
+ refTimer.value && clearTimeout(refTimer.value);
373
+ refTimer.value = setTimeout(function () {
374
+ setContentPointerEvent('unset');
375
+ }, (_props$eventDelay = props.eventDelay) !== null && _props$eventDelay !== void 0 ? _props$eventDelay : 300);
376
+ };
377
+ var setContentPointerEvent = function setContentPointerEvent(val) {
378
+ var _refContent$value;
379
+ if (props.eventDelay === 0) {
380
+ return;
381
+ }
382
+ (_refContent$value = refContent.value) === null || _refContent$value === void 0 ? void 0 : _refContent$value.style.setProperty('pointer-events', val);
383
+ };
384
+ var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
385
+ resolveClassName = _usePrefix.resolveClassName;
386
+ return {
387
+ style: style,
388
+ refContent: refContent,
389
+ resolveClassName: resolveClassName,
390
+ resetPointerEvent: resetPointerEvent,
391
+ setContentPointerEvent: setContentPointerEvent
392
+ };
393
+ },
394
+ render: function render() {
395
+ var _this = this,
396
+ _this$$slots$default,
397
+ _this$$slots,
398
+ _this$$slots$arrow,
399
+ _this$$slots$arrow2,
400
+ _this$$slots2,
401
+ _this$$slots$default2,
402
+ _this$$slots$default3,
403
+ _this$$slots3;
404
+ var className = [this.resolveClassName('popover'), this.resolveClassName('pop2-content'), this.extCls];
405
+ var resolveContentStyle = function resolveContentStyle(slot) {
406
+ var _slot$;
407
+ if (external_vue_namespaceObject.Fragment === (slot === null || slot === void 0 || (_slot$ = slot[0]) === null || _slot$ === void 0 ? void 0 : _slot$.type)) {
408
+ (0,external_vue_namespaceObject.nextTick)(function () {
409
+ _this.setContentPointerEvent('none');
410
+ _this.resetPointerEvent();
411
+ });
412
+ }
413
+ return _this.style;
414
+ };
415
+ var style = resolveContentStyle((_this$$slots$default = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots));
416
+ return (0,external_vue_namespaceObject.createVNode)("div", {
417
+ "class": className,
418
+ "style": style,
419
+ "ref": "refContent"
420
+ }, [(_this$$slots$arrow = (_this$$slots$arrow2 = (_this$$slots2 = this.$slots).arrow) === null || _this$$slots$arrow2 === void 0 ? void 0 : _this$$slots$arrow2.call(_this$$slots2)) !== null && _this$$slots$arrow !== void 0 ? _this$$slots$arrow : '', (_this$$slots$default2 = (_this$$slots$default3 = (_this$$slots3 = this.$slots)["default"]) === null || _this$$slots$default3 === void 0 ? void 0 : _this$$slots$default3.call(_this$$slots3)) !== null && _this$$slots$default2 !== void 0 ? _this$$slots$default2 : '']);
421
+ }
422
+ }));
423
+ ;// CONCATENATED MODULE: external "vue-types"
424
+ var external_vue_types_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
425
+ var external_vue_types_y = x => () => x
426
+ const external_vue_types_namespaceObject = external_vue_types_x({ ["toType"]: () => __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.toType });
427
+ ;// CONCATENATED MODULE: ../../packages/popover/src/props.ts
428
+
429
+
430
+ var EventProps = {
431
+ onAfterHidden: function onAfterHidden() {},
432
+ onAfterShow: function onAfterShow() {}
433
+ };
434
+ var PopoverProps = {
435
+ isShow: shared_namespaceObject.PropTypes.bool.def(false),
436
+ always: shared_namespaceObject.PropTypes.bool.def(false),
437
+ disabled: shared_namespaceObject.PropTypes.bool.def(false),
438
+ width: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.number]).def('auto'),
439
+ height: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.number]).def('auto'),
440
+ maxWidth: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.number]).def('auto'),
441
+ maxHeight: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.number]).def('auto'),
442
+ content: (0,external_vue_types_namespaceObject.toType)('IContent', {}).def(''),
443
+ target: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.instanceOf(HTMLElement), shared_namespaceObject.PropTypes.instanceOf(PointerEvent)]),
444
+ allowHtml: shared_namespaceObject.PropTypes.bool.def(false),
445
+ /**
446
+ * 组件显示位置
447
+ */
448
+ // placement: placementType().def(PlacementEnum.TOP),
449
+ placement: (0,shared_namespaceObject.placementType)().def(shared_namespaceObject.PlacementEnum.TOP_START),
450
+ // 'dark', 'light'
451
+ theme: shared_namespaceObject.PropTypes.string.def('dark'),
452
+ /**
453
+ * 触发方式
454
+ * 支持 click hover manual
455
+ * manual: 通过isShow控制显示、隐藏
456
+ */
457
+ // trigger: triggerType(),
458
+ trigger: (0,shared_namespaceObject.triggerType)(),
459
+ /**
460
+ * content 渲染方式
461
+ */
462
+ renderType: (0,shared_namespaceObject.renderType)(),
463
+ // 是否显示箭头
464
+ arrow: shared_namespaceObject.PropTypes.bool.def(true),
465
+ padding: shared_namespaceObject.PropTypes.number.def(5),
466
+ offset: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.number, shared_namespaceObject.PropTypes.shape({
467
+ mainAxis: shared_namespaceObject.PropTypes.number,
468
+ crossAxis: shared_namespaceObject.PropTypes.number,
469
+ alignmentAxis: shared_namespaceObject.PropTypes.number
470
+ })]).def(6),
471
+ /**
472
+ * 弹出内容绑定元素
473
+ */
474
+ boundary: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string.def('parent'), shared_namespaceObject.PropTypes.instanceOf(HTMLElement)]),
475
+ zIndex: shared_namespaceObject.PropTypes.number.def(undefined),
476
+ disableTeleport: shared_namespaceObject.PropTypes.bool.def(false),
477
+ /**
478
+ * chooses the placement that has the most space available automatically
479
+ */
480
+ autoPlacement: shared_namespaceObject.PropTypes.bool.def(false),
481
+ /**
482
+ * 当有滚动条,滚动出可是范围时自动隐藏pop
483
+ */
484
+ autoVisibility: shared_namespaceObject.PropTypes.bool.def(true),
485
+ /**
486
+ * 是否禁用clickoutside
487
+ */
488
+ disableOutsideClick: shared_namespaceObject.PropTypes.bool.def(false),
489
+ /**
490
+ * 是否禁用样式的transform更新位移
491
+ */
492
+ disableTransform: shared_namespaceObject.PropTypes.bool.def(false),
493
+ /**
494
+ * 自定义 reference
495
+ */
496
+ reference: shared_namespaceObject.PropTypes.any,
497
+ /**
498
+ * 兼容v1版本遗留配置
499
+ * 不建议使用
500
+ */
501
+ modifiers: shared_namespaceObject.PropTypes.array.def([]),
502
+ /**
503
+ * popover显示和隐藏的延时时间
504
+ */
505
+ popoverDelay: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.number, shared_namespaceObject.PropTypes.arrayOf(shared_namespaceObject.PropTypes.number)]).def(100),
506
+ /**
507
+ * 配置自定义样式类名,传入的类会被加在组件最外层的 DOM
508
+ */
509
+ extCls: shared_namespaceObject.PropTypes.string.def(''),
510
+ /**
511
+ * 自定义Content组件渲染,point-event延迟渲染时间
512
+ * 避免子组件point-event渲染时触发popover鼠标事件
513
+ * 如果设置为0,则不启用此设置
514
+ */
515
+ componentEventDelay: shared_namespaceObject.PropTypes.number.def(0),
516
+ /**
517
+ * 或略其他判定条件,强制监听clickoutside & 执行hide
518
+ */
519
+ forceClickoutside: shared_namespaceObject.PropTypes.bool.def(false)
520
+ };
521
+ ;// CONCATENATED MODULE: ../../packages/popover/src/reference.tsx
522
+ /*
523
+ * Tencent is pleased to support the open source community by making
524
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
525
+ *
526
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
527
+ *
528
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
529
+ *
530
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
531
+ *
532
+ * ---------------------------------------------------
533
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
534
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
535
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
536
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
537
+ *
538
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
539
+ * the Software.
540
+ *
541
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
542
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
543
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
544
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
545
+ * IN THE SOFTWARE.
546
+ */
547
+
548
+ /* harmony default export */ const reference = ((0,external_vue_namespaceObject.defineComponent)({
549
+ name: 'PopReference',
550
+ render: function render() {
551
+ var _this$$slots$default, _this$$slots$default2, _this$$slots;
552
+ return (_this$$slots$default = (_this$$slots$default2 = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default2 === void 0 ? void 0 : _this$$slots$default2.call(_this$$slots)) !== null && _this$$slots$default !== void 0 ? _this$$slots$default : '';
553
+ }
554
+ }));
555
+ ;// CONCATENATED MODULE: ../../packages/popover/src/root.tsx
556
+
557
+ /*
558
+ * Tencent is pleased to support the open source community by making
559
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
560
+ *
561
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
562
+ *
563
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
564
+ *
565
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
566
+ *
567
+ * ---------------------------------------------------
568
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
569
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
570
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
571
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
572
+ *
573
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
574
+ * the Software.
575
+ *
576
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
577
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
578
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
579
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
580
+ * IN THE SOFTWARE.
581
+ */
582
+
583
+
584
+ /* harmony default export */ const root = ((0,external_vue_namespaceObject.defineComponent)({
585
+ props: {
586
+ "class": shared_namespaceObject.PropTypes.string.def(''),
587
+ mode: shared_namespaceObject.PropTypes.string.def('')
588
+ },
589
+ render: function render() {
590
+ var _this$$slots$default, _this$$slots;
591
+ return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(_this$$slots$default = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots)]);
592
+ }
593
+ }));
594
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
595
+ function _arrayWithHoles(arr) {
596
+ if (Array.isArray(arr)) return arr;
597
+ }
598
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
599
+ function _iterableToArrayLimit(arr, i) {
600
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
601
+ if (null != _i) {
602
+ var _s,
603
+ _e,
604
+ _x,
605
+ _r,
606
+ _arr = [],
607
+ _n = !0,
608
+ _d = !1;
609
+ try {
610
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
611
+ if (Object(_i) !== _i) return;
612
+ _n = !1;
613
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
614
+ } catch (err) {
615
+ _d = !0, _e = err;
616
+ } finally {
617
+ try {
618
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
619
+ } finally {
620
+ if (_d) throw _e;
621
+ }
622
+ }
623
+ return _arr;
624
+ }
625
+ }
626
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
627
+ function arrayLikeToArray_arrayLikeToArray(arr, len) {
628
+ if (len == null || len > arr.length) len = arr.length;
629
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
630
+ return arr2;
631
+ }
632
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
633
+
634
+ function unsupportedIterableToArray_unsupportedIterableToArray(o, minLen) {
635
+ if (!o) return;
636
+ if (typeof o === "string") return arrayLikeToArray_arrayLikeToArray(o, minLen);
637
+ var n = Object.prototype.toString.call(o).slice(8, -1);
638
+ if (n === "Object" && o.constructor) n = o.constructor.name;
639
+ if (n === "Map" || n === "Set") return Array.from(o);
640
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray_arrayLikeToArray(o, minLen);
641
+ }
642
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
643
+ function _nonIterableRest() {
644
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
645
+ }
646
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js
647
+
648
+
649
+
650
+
651
+ function _slicedToArray(arr, i) {
652
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || unsupportedIterableToArray_unsupportedIterableToArray(arr, i) || _nonIterableRest();
653
+ }
654
+ ;// CONCATENATED MODULE: external "lodash/isElement"
655
+ var isElement_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
656
+ var isElement_y = x => () => x
657
+ const isElement_namespaceObject = isElement_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_lodash_isElement_e6b2a6ce__["default"] });
658
+ ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
659
+ const sides = ['top', 'right', 'bottom', 'left'];
660
+ const alignments = ['start', 'end'];
661
+ const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
662
+ const floating_ui_utils_min = Math.min;
663
+ const floating_ui_utils_max = Math.max;
664
+ const round = Math.round;
665
+ const floor = Math.floor;
666
+ const createCoords = v => ({
667
+ x: v,
668
+ y: v
669
+ });
670
+ const oppositeSideMap = {
671
+ left: 'right',
672
+ right: 'left',
673
+ bottom: 'top',
674
+ top: 'bottom'
675
+ };
676
+ const oppositeAlignmentMap = {
677
+ start: 'end',
678
+ end: 'start'
679
+ };
680
+ function clamp(start, value, end) {
681
+ return floating_ui_utils_max(start, floating_ui_utils_min(value, end));
682
+ }
683
+ function floating_ui_utils_evaluate(value, param) {
684
+ return typeof value === 'function' ? value(param) : value;
685
+ }
686
+ function floating_ui_utils_getSide(placement) {
687
+ return placement.split('-')[0];
688
+ }
689
+ function floating_ui_utils_getAlignment(placement) {
690
+ return placement.split('-')[1];
691
+ }
692
+ function floating_ui_utils_getOppositeAxis(axis) {
693
+ return axis === 'x' ? 'y' : 'x';
694
+ }
695
+ function getAxisLength(axis) {
696
+ return axis === 'y' ? 'height' : 'width';
697
+ }
698
+ function floating_ui_utils_getSideAxis(placement) {
699
+ return ['top', 'bottom'].includes(floating_ui_utils_getSide(placement)) ? 'y' : 'x';
700
+ }
701
+ function getAlignmentAxis(placement) {
702
+ return floating_ui_utils_getOppositeAxis(floating_ui_utils_getSideAxis(placement));
703
+ }
704
+ function getAlignmentSides(placement, rects, rtl) {
705
+ if (rtl === void 0) {
706
+ rtl = false;
707
+ }
708
+ const alignment = floating_ui_utils_getAlignment(placement);
709
+ const alignmentAxis = getAlignmentAxis(placement);
710
+ const length = getAxisLength(alignmentAxis);
711
+ let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
712
+ if (rects.reference[length] > rects.floating[length]) {
713
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
714
+ }
715
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
716
+ }
717
+ function getExpandedPlacements(placement) {
718
+ const oppositePlacement = getOppositePlacement(placement);
719
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
720
+ }
721
+ function getOppositeAlignmentPlacement(placement) {
722
+ return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
723
+ }
724
+ function getSideList(side, isStart, rtl) {
725
+ const lr = ['left', 'right'];
726
+ const rl = ['right', 'left'];
727
+ const tb = ['top', 'bottom'];
728
+ const bt = ['bottom', 'top'];
729
+ switch (side) {
730
+ case 'top':
731
+ case 'bottom':
732
+ if (rtl) return isStart ? rl : lr;
733
+ return isStart ? lr : rl;
734
+ case 'left':
735
+ case 'right':
736
+ return isStart ? tb : bt;
737
+ default:
738
+ return [];
739
+ }
740
+ }
741
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
742
+ const alignment = floating_ui_utils_getAlignment(placement);
743
+ let list = getSideList(floating_ui_utils_getSide(placement), direction === 'start', rtl);
744
+ if (alignment) {
745
+ list = list.map(side => side + "-" + alignment);
746
+ if (flipAlignment) {
747
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
748
+ }
749
+ }
750
+ return list;
751
+ }
752
+ function getOppositePlacement(placement) {
753
+ return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
754
+ }
755
+ function expandPaddingObject(padding) {
756
+ return {
757
+ top: 0,
758
+ right: 0,
759
+ bottom: 0,
760
+ left: 0,
761
+ ...padding
762
+ };
763
+ }
764
+ function getPaddingObject(padding) {
765
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
766
+ top: padding,
767
+ right: padding,
768
+ bottom: padding,
769
+ left: padding
770
+ };
771
+ }
772
+ function rectToClientRect(rect) {
773
+ return {
774
+ ...rect,
775
+ top: rect.y,
776
+ left: rect.x,
777
+ right: rect.x + rect.width,
778
+ bottom: rect.y + rect.height
779
+ };
780
+ }
781
+
782
+
783
+
784
+ ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs
785
+
786
+
787
+
788
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
789
+ let {
790
+ reference,
791
+ floating
792
+ } = _ref;
793
+ const sideAxis = floating_ui_utils_getSideAxis(placement);
794
+ const alignmentAxis = getAlignmentAxis(placement);
795
+ const alignLength = getAxisLength(alignmentAxis);
796
+ const side = floating_ui_utils_getSide(placement);
797
+ const isVertical = sideAxis === 'y';
798
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
799
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
800
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
801
+ let coords;
802
+ switch (side) {
803
+ case 'top':
804
+ coords = {
805
+ x: commonX,
806
+ y: reference.y - floating.height
807
+ };
808
+ break;
809
+ case 'bottom':
810
+ coords = {
811
+ x: commonX,
812
+ y: reference.y + reference.height
813
+ };
814
+ break;
815
+ case 'right':
816
+ coords = {
817
+ x: reference.x + reference.width,
818
+ y: commonY
819
+ };
820
+ break;
821
+ case 'left':
822
+ coords = {
823
+ x: reference.x - floating.width,
824
+ y: commonY
825
+ };
826
+ break;
827
+ default:
828
+ coords = {
829
+ x: reference.x,
830
+ y: reference.y
831
+ };
832
+ }
833
+ switch (floating_ui_utils_getAlignment(placement)) {
834
+ case 'start':
835
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
836
+ break;
837
+ case 'end':
838
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
839
+ break;
840
+ }
841
+ return coords;
842
+ }
843
+
844
+ /**
845
+ * Computes the `x` and `y` coordinates that will place the floating element
846
+ * next to a reference element when it is given a certain positioning strategy.
847
+ *
848
+ * This export does not have any `platform` interface logic. You will need to
849
+ * write one for the platform you are using Floating UI with.
850
+ */
851
+ const computePosition = async (reference, floating, config) => {
852
+ const {
853
+ placement = 'bottom',
854
+ strategy = 'absolute',
855
+ middleware = [],
856
+ platform
857
+ } = config;
858
+ const validMiddleware = middleware.filter(Boolean);
859
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
860
+ let rects = await platform.getElementRects({
861
+ reference,
862
+ floating,
863
+ strategy
864
+ });
865
+ let {
866
+ x,
867
+ y
868
+ } = computeCoordsFromPlacement(rects, placement, rtl);
869
+ let statefulPlacement = placement;
870
+ let middlewareData = {};
871
+ let resetCount = 0;
872
+ for (let i = 0; i < validMiddleware.length; i++) {
873
+ const {
874
+ name,
875
+ fn
876
+ } = validMiddleware[i];
877
+ const {
878
+ x: nextX,
879
+ y: nextY,
880
+ data,
881
+ reset
882
+ } = await fn({
883
+ x,
884
+ y,
885
+ initialPlacement: placement,
886
+ placement: statefulPlacement,
887
+ strategy,
888
+ middlewareData,
889
+ rects,
890
+ platform,
891
+ elements: {
892
+ reference,
893
+ floating
894
+ }
895
+ });
896
+ x = nextX != null ? nextX : x;
897
+ y = nextY != null ? nextY : y;
898
+ middlewareData = {
899
+ ...middlewareData,
900
+ [name]: {
901
+ ...middlewareData[name],
902
+ ...data
903
+ }
904
+ };
905
+ if (reset && resetCount <= 50) {
906
+ resetCount++;
907
+ if (typeof reset === 'object') {
908
+ if (reset.placement) {
909
+ statefulPlacement = reset.placement;
910
+ }
911
+ if (reset.rects) {
912
+ rects = reset.rects === true ? await platform.getElementRects({
913
+ reference,
914
+ floating,
915
+ strategy
916
+ }) : reset.rects;
917
+ }
918
+ ({
919
+ x,
920
+ y
921
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
922
+ }
923
+ i = -1;
924
+ continue;
925
+ }
926
+ }
927
+ return {
928
+ x,
929
+ y,
930
+ placement: statefulPlacement,
931
+ strategy,
932
+ middlewareData
933
+ };
934
+ };
935
+
936
+ /**
937
+ * Resolves with an object of overflow side offsets that determine how much the
938
+ * element is overflowing a given clipping boundary on each side.
939
+ * - positive = overflowing the boundary by that number of pixels
940
+ * - negative = how many pixels left before it will overflow
941
+ * - 0 = lies flush with the boundary
942
+ * @see https://floating-ui.com/docs/detectOverflow
943
+ */
944
+ async function detectOverflow(state, options) {
945
+ var _await$platform$isEle;
946
+ if (options === void 0) {
947
+ options = {};
948
+ }
949
+ const {
950
+ x,
951
+ y,
952
+ platform,
953
+ rects,
954
+ elements,
955
+ strategy
956
+ } = state;
957
+ const {
958
+ boundary = 'clippingAncestors',
959
+ rootBoundary = 'viewport',
960
+ elementContext = 'floating',
961
+ altBoundary = false,
962
+ padding = 0
963
+ } = floating_ui_utils_evaluate(options, state);
964
+ const paddingObject = getPaddingObject(padding);
965
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
966
+ const element = elements[altBoundary ? altContext : elementContext];
967
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
968
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
969
+ boundary,
970
+ rootBoundary,
971
+ strategy
972
+ }));
973
+ const rect = elementContext === 'floating' ? {
974
+ ...rects.floating,
975
+ x,
976
+ y
977
+ } : rects.reference;
978
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
979
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
980
+ x: 1,
981
+ y: 1
982
+ } : {
983
+ x: 1,
984
+ y: 1
985
+ };
986
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
987
+ rect,
988
+ offsetParent,
989
+ strategy
990
+ }) : rect);
991
+ return {
992
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
993
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
994
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
995
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
996
+ };
997
+ }
998
+
999
+ /**
1000
+ * Provides data to position an inner element of the floating element so that it
1001
+ * appears centered to the reference element.
1002
+ * @see https://floating-ui.com/docs/arrow
1003
+ */
1004
+ const arrow = options => ({
1005
+ name: 'arrow',
1006
+ options,
1007
+ async fn(state) {
1008
+ const {
1009
+ x,
1010
+ y,
1011
+ placement,
1012
+ rects,
1013
+ platform,
1014
+ elements
1015
+ } = state;
1016
+ // Since `element` is required, we don't Partial<> the type.
1017
+ const {
1018
+ element,
1019
+ padding = 0
1020
+ } = floating_ui_utils_evaluate(options, state) || {};
1021
+ if (element == null) {
1022
+ return {};
1023
+ }
1024
+ const paddingObject = getPaddingObject(padding);
1025
+ const coords = {
1026
+ x,
1027
+ y
1028
+ };
1029
+ const axis = getAlignmentAxis(placement);
1030
+ const length = getAxisLength(axis);
1031
+ const arrowDimensions = await platform.getDimensions(element);
1032
+ const isYAxis = axis === 'y';
1033
+ const minProp = isYAxis ? 'top' : 'left';
1034
+ const maxProp = isYAxis ? 'bottom' : 'right';
1035
+ const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
1036
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
1037
+ const startDiff = coords[axis] - rects.reference[axis];
1038
+ const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
1039
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
1040
+
1041
+ // DOM platform can return `window` as the `offsetParent`.
1042
+ if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
1043
+ clientSize = elements.floating[clientProp] || rects.floating[length];
1044
+ }
1045
+ const centerToReference = endDiff / 2 - startDiff / 2;
1046
+
1047
+ // If the padding is large enough that it causes the arrow to no longer be
1048
+ // centered, modify the padding so that it is centered.
1049
+ const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
1050
+ const minPadding = floating_ui_utils_min(paddingObject[minProp], largestPossiblePadding);
1051
+ const maxPadding = floating_ui_utils_min(paddingObject[maxProp], largestPossiblePadding);
1052
+
1053
+ // Make sure the arrow doesn't overflow the floating element if the center
1054
+ // point is outside the floating element's bounds.
1055
+ const min$1 = minPadding;
1056
+ const max = clientSize - arrowDimensions[length] - maxPadding;
1057
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
1058
+ const offset = clamp(min$1, center, max);
1059
+
1060
+ // If the reference is small enough that the arrow's padding causes it to
1061
+ // to point to nothing for an aligned placement, adjust the offset of the
1062
+ // floating element itself. This stops `shift()` from taking action, but can
1063
+ // be worked around by calling it again after the `arrow()` if desired.
1064
+ const shouldAddOffset = floating_ui_utils_getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
1065
+ const alignmentOffset = shouldAddOffset ? center < min$1 ? min$1 - center : max - center : 0;
1066
+ return {
1067
+ [axis]: coords[axis] - alignmentOffset,
1068
+ data: {
1069
+ [axis]: offset,
1070
+ centerOffset: center - offset + alignmentOffset
1071
+ }
1072
+ };
1073
+ }
1074
+ });
1075
+
1076
+ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
1077
+ const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => floating_ui_utils_getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => floating_ui_utils_getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => floating_ui_utils_getSide(placement) === placement);
1078
+ return allowedPlacementsSortedByAlignment.filter(placement => {
1079
+ if (alignment) {
1080
+ return floating_ui_utils_getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
1081
+ }
1082
+ return true;
1083
+ });
1084
+ }
1085
+ /**
1086
+ * Optimizes the visibility of the floating element by choosing the placement
1087
+ * that has the most space available automatically, without needing to specify a
1088
+ * preferred placement. Alternative to `flip`.
1089
+ * @see https://floating-ui.com/docs/autoPlacement
1090
+ */
1091
+ const autoPlacement = function (options) {
1092
+ if (options === void 0) {
1093
+ options = {};
1094
+ }
1095
+ return {
1096
+ name: 'autoPlacement',
1097
+ options,
1098
+ async fn(state) {
1099
+ var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
1100
+ const {
1101
+ rects,
1102
+ middlewareData,
1103
+ placement,
1104
+ platform,
1105
+ elements
1106
+ } = state;
1107
+ const {
1108
+ crossAxis = false,
1109
+ alignment,
1110
+ allowedPlacements = placements,
1111
+ autoAlignment = true,
1112
+ ...detectOverflowOptions
1113
+ } = floating_ui_utils_evaluate(options, state);
1114
+ const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
1115
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1116
+ const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
1117
+ const currentPlacement = placements$1[currentIndex];
1118
+ if (currentPlacement == null) {
1119
+ return {};
1120
+ }
1121
+ const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
1122
+
1123
+ // Make `computeCoords` start from the right place.
1124
+ if (placement !== currentPlacement) {
1125
+ return {
1126
+ reset: {
1127
+ placement: placements$1[0]
1128
+ }
1129
+ };
1130
+ }
1131
+ const currentOverflows = [overflow[floating_ui_utils_getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
1132
+ const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
1133
+ placement: currentPlacement,
1134
+ overflows: currentOverflows
1135
+ }];
1136
+ const nextPlacement = placements$1[currentIndex + 1];
1137
+
1138
+ // There are more placements to check.
1139
+ if (nextPlacement) {
1140
+ return {
1141
+ data: {
1142
+ index: currentIndex + 1,
1143
+ overflows: allOverflows
1144
+ },
1145
+ reset: {
1146
+ placement: nextPlacement
1147
+ }
1148
+ };
1149
+ }
1150
+ const placementsSortedByMostSpace = allOverflows.map(d => {
1151
+ const alignment = floating_ui_utils_getAlignment(d.placement);
1152
+ return [d.placement, alignment && crossAxis ?
1153
+ // Check along the mainAxis and main crossAxis side.
1154
+ d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
1155
+ // Check only the mainAxis.
1156
+ d.overflows[0], d.overflows];
1157
+ }).sort((a, b) => a[1] - b[1]);
1158
+ const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
1159
+ // Aligned placements should not check their opposite crossAxis
1160
+ // side.
1161
+ floating_ui_utils_getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
1162
+ const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
1163
+ if (resetPlacement !== placement) {
1164
+ return {
1165
+ data: {
1166
+ index: currentIndex + 1,
1167
+ overflows: allOverflows
1168
+ },
1169
+ reset: {
1170
+ placement: resetPlacement
1171
+ }
1172
+ };
1173
+ }
1174
+ return {};
1175
+ }
1176
+ };
1177
+ };
1178
+
1179
+ /**
1180
+ * Optimizes the visibility of the floating element by flipping the `placement`
1181
+ * in order to keep it in view when the preferred placement(s) will overflow the
1182
+ * clipping boundary. Alternative to `autoPlacement`.
1183
+ * @see https://floating-ui.com/docs/flip
1184
+ */
1185
+ const flip = function (options) {
1186
+ if (options === void 0) {
1187
+ options = {};
1188
+ }
1189
+ return {
1190
+ name: 'flip',
1191
+ options,
1192
+ async fn(state) {
1193
+ var _middlewareData$flip;
1194
+ const {
1195
+ placement,
1196
+ middlewareData,
1197
+ rects,
1198
+ initialPlacement,
1199
+ platform,
1200
+ elements
1201
+ } = state;
1202
+ const {
1203
+ mainAxis: checkMainAxis = true,
1204
+ crossAxis: checkCrossAxis = true,
1205
+ fallbackPlacements: specifiedFallbackPlacements,
1206
+ fallbackStrategy = 'bestFit',
1207
+ fallbackAxisSideDirection = 'none',
1208
+ flipAlignment = true,
1209
+ ...detectOverflowOptions
1210
+ } = floating_ui_utils_evaluate(options, state);
1211
+ const side = floating_ui_utils_getSide(placement);
1212
+ const isBasePlacement = floating_ui_utils_getSide(initialPlacement) === initialPlacement;
1213
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1214
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
1215
+ if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {
1216
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
1217
+ }
1218
+ const placements = [initialPlacement, ...fallbackPlacements];
1219
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1220
+ const overflows = [];
1221
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
1222
+ if (checkMainAxis) {
1223
+ overflows.push(overflow[side]);
1224
+ }
1225
+ if (checkCrossAxis) {
1226
+ const sides = getAlignmentSides(placement, rects, rtl);
1227
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
1228
+ }
1229
+ overflowsData = [...overflowsData, {
1230
+ placement,
1231
+ overflows
1232
+ }];
1233
+
1234
+ // One or more sides is overflowing.
1235
+ if (!overflows.every(side => side <= 0)) {
1236
+ var _middlewareData$flip2, _overflowsData$filter;
1237
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
1238
+ const nextPlacement = placements[nextIndex];
1239
+ if (nextPlacement) {
1240
+ // Try next placement and re-run the lifecycle.
1241
+ return {
1242
+ data: {
1243
+ index: nextIndex,
1244
+ overflows: overflowsData
1245
+ },
1246
+ reset: {
1247
+ placement: nextPlacement
1248
+ }
1249
+ };
1250
+ }
1251
+
1252
+ // First, find the candidates that fit on the mainAxis side of overflow,
1253
+ // then find the placement that fits the best on the main crossAxis side.
1254
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
1255
+
1256
+ // Otherwise fallback.
1257
+ if (!resetPlacement) {
1258
+ switch (fallbackStrategy) {
1259
+ case 'bestFit':
1260
+ {
1261
+ var _overflowsData$map$so;
1262
+ const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
1263
+ if (placement) {
1264
+ resetPlacement = placement;
1265
+ }
1266
+ break;
1267
+ }
1268
+ case 'initialPlacement':
1269
+ resetPlacement = initialPlacement;
1270
+ break;
1271
+ }
1272
+ }
1273
+ if (placement !== resetPlacement) {
1274
+ return {
1275
+ reset: {
1276
+ placement: resetPlacement
1277
+ }
1278
+ };
1279
+ }
1280
+ }
1281
+ return {};
1282
+ }
1283
+ };
1284
+ };
1285
+
1286
+ function getSideOffsets(overflow, rect) {
1287
+ return {
1288
+ top: overflow.top - rect.height,
1289
+ right: overflow.right - rect.width,
1290
+ bottom: overflow.bottom - rect.height,
1291
+ left: overflow.left - rect.width
1292
+ };
1293
+ }
1294
+ function isAnySideFullyClipped(overflow) {
1295
+ return sides.some(side => overflow[side] >= 0);
1296
+ }
1297
+ /**
1298
+ * Provides data to hide the floating element in applicable situations, such as
1299
+ * when it is not in the same clipping context as the reference element.
1300
+ * @see https://floating-ui.com/docs/hide
1301
+ */
1302
+ const hide = function (options) {
1303
+ if (options === void 0) {
1304
+ options = {};
1305
+ }
1306
+ return {
1307
+ name: 'hide',
1308
+ options,
1309
+ async fn(state) {
1310
+ const {
1311
+ rects
1312
+ } = state;
1313
+ const {
1314
+ strategy = 'referenceHidden',
1315
+ ...detectOverflowOptions
1316
+ } = floating_ui_utils_evaluate(options, state);
1317
+ switch (strategy) {
1318
+ case 'referenceHidden':
1319
+ {
1320
+ const overflow = await detectOverflow(state, {
1321
+ ...detectOverflowOptions,
1322
+ elementContext: 'reference'
1323
+ });
1324
+ const offsets = getSideOffsets(overflow, rects.reference);
1325
+ return {
1326
+ data: {
1327
+ referenceHiddenOffsets: offsets,
1328
+ referenceHidden: isAnySideFullyClipped(offsets)
1329
+ }
1330
+ };
1331
+ }
1332
+ case 'escaped':
1333
+ {
1334
+ const overflow = await detectOverflow(state, {
1335
+ ...detectOverflowOptions,
1336
+ altBoundary: true
1337
+ });
1338
+ const offsets = getSideOffsets(overflow, rects.floating);
1339
+ return {
1340
+ data: {
1341
+ escapedOffsets: offsets,
1342
+ escaped: isAnySideFullyClipped(offsets)
1343
+ }
1344
+ };
1345
+ }
1346
+ default:
1347
+ {
1348
+ return {};
1349
+ }
1350
+ }
1351
+ }
1352
+ };
1353
+ };
1354
+
1355
+ function getBoundingRect(rects) {
1356
+ const minX = floating_ui_utils_min(...rects.map(rect => rect.left));
1357
+ const minY = floating_ui_utils_min(...rects.map(rect => rect.top));
1358
+ const maxX = floating_ui_utils_max(...rects.map(rect => rect.right));
1359
+ const maxY = floating_ui_utils_max(...rects.map(rect => rect.bottom));
1360
+ return {
1361
+ x: minX,
1362
+ y: minY,
1363
+ width: maxX - minX,
1364
+ height: maxY - minY
1365
+ };
1366
+ }
1367
+ function getRectsByLine(rects) {
1368
+ const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
1369
+ const groups = [];
1370
+ let prevRect = null;
1371
+ for (let i = 0; i < sortedRects.length; i++) {
1372
+ const rect = sortedRects[i];
1373
+ if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {
1374
+ groups.push([rect]);
1375
+ } else {
1376
+ groups[groups.length - 1].push(rect);
1377
+ }
1378
+ prevRect = rect;
1379
+ }
1380
+ return groups.map(rect => rectToClientRect(getBoundingRect(rect)));
1381
+ }
1382
+ /**
1383
+ * Provides improved positioning for inline reference elements that can span
1384
+ * over multiple lines, such as hyperlinks or range selections.
1385
+ * @see https://floating-ui.com/docs/inline
1386
+ */
1387
+ const inline = function (options) {
1388
+ if (options === void 0) {
1389
+ options = {};
1390
+ }
1391
+ return {
1392
+ name: 'inline',
1393
+ options,
1394
+ async fn(state) {
1395
+ const {
1396
+ placement,
1397
+ elements,
1398
+ rects,
1399
+ platform,
1400
+ strategy
1401
+ } = state;
1402
+ // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a
1403
+ // ClientRect's bounds, despite the event listener being triggered. A
1404
+ // padding of 2 seems to handle this issue.
1405
+ const {
1406
+ padding = 2,
1407
+ x,
1408
+ y
1409
+ } = floating_ui_utils_evaluate(options, state);
1410
+ const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);
1411
+ const clientRects = getRectsByLine(nativeClientRects);
1412
+ const fallback = rectToClientRect(getBoundingRect(nativeClientRects));
1413
+ const paddingObject = getPaddingObject(padding);
1414
+ function getBoundingClientRect() {
1415
+ // There are two rects and they are disjoined.
1416
+ if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
1417
+ // Find the first rect in which the point is fully inside.
1418
+ return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;
1419
+ }
1420
+
1421
+ // There are 2 or more connected rects.
1422
+ if (clientRects.length >= 2) {
1423
+ if (floating_ui_utils_getSideAxis(placement) === 'y') {
1424
+ const firstRect = clientRects[0];
1425
+ const lastRect = clientRects[clientRects.length - 1];
1426
+ const isTop = floating_ui_utils_getSide(placement) === 'top';
1427
+ const top = firstRect.top;
1428
+ const bottom = lastRect.bottom;
1429
+ const left = isTop ? firstRect.left : lastRect.left;
1430
+ const right = isTop ? firstRect.right : lastRect.right;
1431
+ const width = right - left;
1432
+ const height = bottom - top;
1433
+ return {
1434
+ top,
1435
+ bottom,
1436
+ left,
1437
+ right,
1438
+ width,
1439
+ height,
1440
+ x: left,
1441
+ y: top
1442
+ };
1443
+ }
1444
+ const isLeftSide = floating_ui_utils_getSide(placement) === 'left';
1445
+ const maxRight = floating_ui_utils_max(...clientRects.map(rect => rect.right));
1446
+ const minLeft = floating_ui_utils_min(...clientRects.map(rect => rect.left));
1447
+ const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
1448
+ const top = measureRects[0].top;
1449
+ const bottom = measureRects[measureRects.length - 1].bottom;
1450
+ const left = minLeft;
1451
+ const right = maxRight;
1452
+ const width = right - left;
1453
+ const height = bottom - top;
1454
+ return {
1455
+ top,
1456
+ bottom,
1457
+ left,
1458
+ right,
1459
+ width,
1460
+ height,
1461
+ x: left,
1462
+ y: top
1463
+ };
1464
+ }
1465
+ return fallback;
1466
+ }
1467
+ const resetRects = await platform.getElementRects({
1468
+ reference: {
1469
+ getBoundingClientRect
1470
+ },
1471
+ floating: elements.floating,
1472
+ strategy
1473
+ });
1474
+ if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {
1475
+ return {
1476
+ reset: {
1477
+ rects: resetRects
1478
+ }
1479
+ };
1480
+ }
1481
+ return {};
1482
+ }
1483
+ };
1484
+ };
1485
+
1486
+ // For type backwards-compatibility, the `OffsetOptions` type was also
1487
+ // Derivable.
1488
+ async function convertValueToCoords(state, options) {
1489
+ const {
1490
+ placement,
1491
+ platform,
1492
+ elements
1493
+ } = state;
1494
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1495
+ const side = floating_ui_utils_getSide(placement);
1496
+ const alignment = floating_ui_utils_getAlignment(placement);
1497
+ const isVertical = floating_ui_utils_getSideAxis(placement) === 'y';
1498
+ const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
1499
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
1500
+ const rawValue = floating_ui_utils_evaluate(options, state);
1501
+
1502
+ // eslint-disable-next-line prefer-const
1503
+ let {
1504
+ mainAxis,
1505
+ crossAxis,
1506
+ alignmentAxis
1507
+ } = typeof rawValue === 'number' ? {
1508
+ mainAxis: rawValue,
1509
+ crossAxis: 0,
1510
+ alignmentAxis: null
1511
+ } : {
1512
+ mainAxis: 0,
1513
+ crossAxis: 0,
1514
+ alignmentAxis: null,
1515
+ ...rawValue
1516
+ };
1517
+ if (alignment && typeof alignmentAxis === 'number') {
1518
+ crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
1519
+ }
1520
+ return isVertical ? {
1521
+ x: crossAxis * crossAxisMulti,
1522
+ y: mainAxis * mainAxisMulti
1523
+ } : {
1524
+ x: mainAxis * mainAxisMulti,
1525
+ y: crossAxis * crossAxisMulti
1526
+ };
1527
+ }
1528
+
1529
+ /**
1530
+ * Modifies the placement by translating the floating element along the
1531
+ * specified axes.
1532
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
1533
+ * object may be passed.
1534
+ * @see https://floating-ui.com/docs/offset
1535
+ */
1536
+ const offset = function (options) {
1537
+ if (options === void 0) {
1538
+ options = 0;
1539
+ }
1540
+ return {
1541
+ name: 'offset',
1542
+ options,
1543
+ async fn(state) {
1544
+ const {
1545
+ x,
1546
+ y
1547
+ } = state;
1548
+ const diffCoords = await convertValueToCoords(state, options);
1549
+ return {
1550
+ x: x + diffCoords.x,
1551
+ y: y + diffCoords.y,
1552
+ data: diffCoords
1553
+ };
1554
+ }
1555
+ };
1556
+ };
1557
+
1558
+ /**
1559
+ * Optimizes the visibility of the floating element by shifting it in order to
1560
+ * keep it in view when it will overflow the clipping boundary.
1561
+ * @see https://floating-ui.com/docs/shift
1562
+ */
1563
+ const shift = function (options) {
1564
+ if (options === void 0) {
1565
+ options = {};
1566
+ }
1567
+ return {
1568
+ name: 'shift',
1569
+ options,
1570
+ async fn(state) {
1571
+ const {
1572
+ x,
1573
+ y,
1574
+ placement
1575
+ } = state;
1576
+ const {
1577
+ mainAxis: checkMainAxis = true,
1578
+ crossAxis: checkCrossAxis = false,
1579
+ limiter = {
1580
+ fn: _ref => {
1581
+ let {
1582
+ x,
1583
+ y
1584
+ } = _ref;
1585
+ return {
1586
+ x,
1587
+ y
1588
+ };
1589
+ }
1590
+ },
1591
+ ...detectOverflowOptions
1592
+ } = floating_ui_utils_evaluate(options, state);
1593
+ const coords = {
1594
+ x,
1595
+ y
1596
+ };
1597
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1598
+ const crossAxis = floating_ui_utils_getSideAxis(floating_ui_utils_getSide(placement));
1599
+ const mainAxis = floating_ui_utils_getOppositeAxis(crossAxis);
1600
+ let mainAxisCoord = coords[mainAxis];
1601
+ let crossAxisCoord = coords[crossAxis];
1602
+ if (checkMainAxis) {
1603
+ const minSide = mainAxis === 'y' ? 'top' : 'left';
1604
+ const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
1605
+ const min = mainAxisCoord + overflow[minSide];
1606
+ const max = mainAxisCoord - overflow[maxSide];
1607
+ mainAxisCoord = clamp(min, mainAxisCoord, max);
1608
+ }
1609
+ if (checkCrossAxis) {
1610
+ const minSide = crossAxis === 'y' ? 'top' : 'left';
1611
+ const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
1612
+ const min = crossAxisCoord + overflow[minSide];
1613
+ const max = crossAxisCoord - overflow[maxSide];
1614
+ crossAxisCoord = clamp(min, crossAxisCoord, max);
1615
+ }
1616
+ const limitedCoords = limiter.fn({
1617
+ ...state,
1618
+ [mainAxis]: mainAxisCoord,
1619
+ [crossAxis]: crossAxisCoord
1620
+ });
1621
+ return {
1622
+ ...limitedCoords,
1623
+ data: {
1624
+ x: limitedCoords.x - x,
1625
+ y: limitedCoords.y - y
1626
+ }
1627
+ };
1628
+ }
1629
+ };
1630
+ };
1631
+ /**
1632
+ * Built-in `limiter` that will stop `shift()` at a certain point.
1633
+ */
1634
+ const limitShift = function (options) {
1635
+ if (options === void 0) {
1636
+ options = {};
1637
+ }
1638
+ return {
1639
+ options,
1640
+ fn(state) {
1641
+ const {
1642
+ x,
1643
+ y,
1644
+ placement,
1645
+ rects,
1646
+ middlewareData
1647
+ } = state;
1648
+ const {
1649
+ offset = 0,
1650
+ mainAxis: checkMainAxis = true,
1651
+ crossAxis: checkCrossAxis = true
1652
+ } = evaluate(options, state);
1653
+ const coords = {
1654
+ x,
1655
+ y
1656
+ };
1657
+ const crossAxis = getSideAxis(placement);
1658
+ const mainAxis = getOppositeAxis(crossAxis);
1659
+ let mainAxisCoord = coords[mainAxis];
1660
+ let crossAxisCoord = coords[crossAxis];
1661
+ const rawOffset = evaluate(offset, state);
1662
+ const computedOffset = typeof rawOffset === 'number' ? {
1663
+ mainAxis: rawOffset,
1664
+ crossAxis: 0
1665
+ } : {
1666
+ mainAxis: 0,
1667
+ crossAxis: 0,
1668
+ ...rawOffset
1669
+ };
1670
+ if (checkMainAxis) {
1671
+ const len = mainAxis === 'y' ? 'height' : 'width';
1672
+ const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
1673
+ const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
1674
+ if (mainAxisCoord < limitMin) {
1675
+ mainAxisCoord = limitMin;
1676
+ } else if (mainAxisCoord > limitMax) {
1677
+ mainAxisCoord = limitMax;
1678
+ }
1679
+ }
1680
+ if (checkCrossAxis) {
1681
+ var _middlewareData$offse, _middlewareData$offse2;
1682
+ const len = mainAxis === 'y' ? 'width' : 'height';
1683
+ const isOriginSide = ['top', 'left'].includes(getSide(placement));
1684
+ const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
1685
+ const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
1686
+ if (crossAxisCoord < limitMin) {
1687
+ crossAxisCoord = limitMin;
1688
+ } else if (crossAxisCoord > limitMax) {
1689
+ crossAxisCoord = limitMax;
1690
+ }
1691
+ }
1692
+ return {
1693
+ [mainAxis]: mainAxisCoord,
1694
+ [crossAxis]: crossAxisCoord
1695
+ };
1696
+ }
1697
+ };
1698
+ };
1699
+
1700
+ /**
1701
+ * Provides data that allows you to change the size of the floating element —
1702
+ * for instance, prevent it from overflowing the clipping boundary or match the
1703
+ * width of the reference element.
1704
+ * @see https://floating-ui.com/docs/size
1705
+ */
1706
+ const size = function (options) {
1707
+ if (options === void 0) {
1708
+ options = {};
1709
+ }
1710
+ return {
1711
+ name: 'size',
1712
+ options,
1713
+ async fn(state) {
1714
+ const {
1715
+ placement,
1716
+ rects,
1717
+ platform,
1718
+ elements
1719
+ } = state;
1720
+ const {
1721
+ apply = () => {},
1722
+ ...detectOverflowOptions
1723
+ } = evaluate(options, state);
1724
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1725
+ const side = getSide(placement);
1726
+ const alignment = getAlignment(placement);
1727
+ const isYAxis = getSideAxis(placement) === 'y';
1728
+ const {
1729
+ width,
1730
+ height
1731
+ } = rects.floating;
1732
+ let heightSide;
1733
+ let widthSide;
1734
+ if (side === 'top' || side === 'bottom') {
1735
+ heightSide = side;
1736
+ widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
1737
+ } else {
1738
+ widthSide = side;
1739
+ heightSide = alignment === 'end' ? 'top' : 'bottom';
1740
+ }
1741
+ const overflowAvailableHeight = height - overflow[heightSide];
1742
+ const overflowAvailableWidth = width - overflow[widthSide];
1743
+ const noShift = !state.middlewareData.shift;
1744
+ let availableHeight = overflowAvailableHeight;
1745
+ let availableWidth = overflowAvailableWidth;
1746
+ if (isYAxis) {
1747
+ const maximumClippingWidth = width - overflow.left - overflow.right;
1748
+ availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
1749
+ } else {
1750
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
1751
+ availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
1752
+ }
1753
+ if (noShift && !alignment) {
1754
+ const xMin = max(overflow.left, 0);
1755
+ const xMax = max(overflow.right, 0);
1756
+ const yMin = max(overflow.top, 0);
1757
+ const yMax = max(overflow.bottom, 0);
1758
+ if (isYAxis) {
1759
+ availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
1760
+ } else {
1761
+ availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
1762
+ }
1763
+ }
1764
+ await apply({
1765
+ ...state,
1766
+ availableWidth,
1767
+ availableHeight
1768
+ });
1769
+ const nextDimensions = await platform.getDimensions(elements.floating);
1770
+ if (width !== nextDimensions.width || height !== nextDimensions.height) {
1771
+ return {
1772
+ reset: {
1773
+ rects: true
1774
+ }
1775
+ };
1776
+ }
1777
+ return {};
1778
+ }
1779
+ };
1780
+ };
1781
+
1782
+
1783
+
1784
+ ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/utils/dom/dist/floating-ui.utils.dom.mjs
1785
+ function getNodeName(node) {
1786
+ if (isNode(node)) {
1787
+ return (node.nodeName || '').toLowerCase();
1788
+ }
1789
+ // Mocked nodes in testing environments may not be instances of Node. By
1790
+ // returning `#document` an infinite loop won't occur.
1791
+ // https://github.com/floating-ui/floating-ui/issues/2317
1792
+ return '#document';
1793
+ }
1794
+ function getWindow(node) {
1795
+ var _node$ownerDocument;
1796
+ return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1797
+ }
1798
+ function getDocumentElement(node) {
1799
+ var _ref;
1800
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1801
+ }
1802
+ function isNode(value) {
1803
+ return value instanceof Node || value instanceof getWindow(value).Node;
1804
+ }
1805
+ function floating_ui_utils_dom_isElement(value) {
1806
+ return value instanceof Element || value instanceof getWindow(value).Element;
1807
+ }
1808
+ function isHTMLElement(value) {
1809
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1810
+ }
1811
+ function isShadowRoot(value) {
1812
+ // Browsers without `ShadowRoot` support.
1813
+ if (typeof ShadowRoot === 'undefined') {
1814
+ return false;
1815
+ }
1816
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1817
+ }
1818
+ function isOverflowElement(element) {
1819
+ const {
1820
+ overflow,
1821
+ overflowX,
1822
+ overflowY,
1823
+ display
1824
+ } = getComputedStyle(element);
1825
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
1826
+ }
1827
+ function isTableElement(element) {
1828
+ return ['table', 'td', 'th'].includes(getNodeName(element));
1829
+ }
1830
+ function isContainingBlock(element) {
1831
+ const webkit = isWebKit();
1832
+ const css = getComputedStyle(element);
1833
+
1834
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1835
+ return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
1836
+ }
1837
+ function isWebKit() {
1838
+ if (typeof CSS === 'undefined' || !CSS.supports) return false;
1839
+ return CSS.supports('-webkit-backdrop-filter', 'none');
1840
+ }
1841
+ function isLastTraversableNode(node) {
1842
+ return ['html', 'body', '#document'].includes(getNodeName(node));
1843
+ }
1844
+ function getComputedStyle(element) {
1845
+ return getWindow(element).getComputedStyle(element);
1846
+ }
1847
+ function getNodeScroll(element) {
1848
+ if (floating_ui_utils_dom_isElement(element)) {
1849
+ return {
1850
+ scrollLeft: element.scrollLeft,
1851
+ scrollTop: element.scrollTop
1852
+ };
1853
+ }
1854
+ return {
1855
+ scrollLeft: element.pageXOffset,
1856
+ scrollTop: element.pageYOffset
1857
+ };
1858
+ }
1859
+ function getParentNode(node) {
1860
+ if (getNodeName(node) === 'html') {
1861
+ return node;
1862
+ }
1863
+ const result =
1864
+ // Step into the shadow DOM of the parent of a slotted node.
1865
+ node.assignedSlot ||
1866
+ // DOM Element detected.
1867
+ node.parentNode ||
1868
+ // ShadowRoot detected.
1869
+ isShadowRoot(node) && node.host ||
1870
+ // Fallback.
1871
+ getDocumentElement(node);
1872
+ return isShadowRoot(result) ? result.host : result;
1873
+ }
1874
+ function getNearestOverflowAncestor(node) {
1875
+ const parentNode = getParentNode(node);
1876
+ if (isLastTraversableNode(parentNode)) {
1877
+ return node.ownerDocument ? node.ownerDocument.body : node.body;
1878
+ }
1879
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1880
+ return parentNode;
1881
+ }
1882
+ return getNearestOverflowAncestor(parentNode);
1883
+ }
1884
+ function getOverflowAncestors(node, list) {
1885
+ var _node$ownerDocument2;
1886
+ if (list === void 0) {
1887
+ list = [];
1888
+ }
1889
+ const scrollableAncestor = getNearestOverflowAncestor(node);
1890
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1891
+ const win = getWindow(scrollableAncestor);
1892
+ if (isBody) {
1893
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
1894
+ }
1895
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
1896
+ }
1897
+
1898
+
1899
+
1900
+ ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
1901
+
1902
+
1903
+
1904
+
1905
+
1906
+
1907
+ function getCssDimensions(element) {
1908
+ const css = getComputedStyle(element);
1909
+ // In testing environments, the `width` and `height` properties are empty
1910
+ // strings for SVG elements, returning NaN. Fallback to `0` in this case.
1911
+ let width = parseFloat(css.width) || 0;
1912
+ let height = parseFloat(css.height) || 0;
1913
+ const hasOffset = isHTMLElement(element);
1914
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
1915
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
1916
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
1917
+ if (shouldFallback) {
1918
+ width = offsetWidth;
1919
+ height = offsetHeight;
1920
+ }
1921
+ return {
1922
+ width,
1923
+ height,
1924
+ $: shouldFallback
1925
+ };
1926
+ }
1927
+
1928
+ function unwrapElement(element) {
1929
+ return !floating_ui_utils_dom_isElement(element) ? element.contextElement : element;
1930
+ }
1931
+
1932
+ function getScale(element) {
1933
+ const domElement = unwrapElement(element);
1934
+ if (!isHTMLElement(domElement)) {
1935
+ return createCoords(1);
1936
+ }
1937
+ const rect = domElement.getBoundingClientRect();
1938
+ const {
1939
+ width,
1940
+ height,
1941
+ $
1942
+ } = getCssDimensions(domElement);
1943
+ let x = ($ ? round(rect.width) : rect.width) / width;
1944
+ let y = ($ ? round(rect.height) : rect.height) / height;
1945
+
1946
+ // 0, NaN, or Infinity should always fallback to 1.
1947
+
1948
+ if (!x || !Number.isFinite(x)) {
1949
+ x = 1;
1950
+ }
1951
+ if (!y || !Number.isFinite(y)) {
1952
+ y = 1;
1953
+ }
1954
+ return {
1955
+ x,
1956
+ y
1957
+ };
1958
+ }
1959
+
1960
+ const noOffsets = /*#__PURE__*/createCoords(0);
1961
+ function getVisualOffsets(element) {
1962
+ const win = getWindow(element);
1963
+ if (!isWebKit() || !win.visualViewport) {
1964
+ return noOffsets;
1965
+ }
1966
+ return {
1967
+ x: win.visualViewport.offsetLeft,
1968
+ y: win.visualViewport.offsetTop
1969
+ };
1970
+ }
1971
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
1972
+ if (isFixed === void 0) {
1973
+ isFixed = false;
1974
+ }
1975
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
1976
+ return false;
1977
+ }
1978
+ return isFixed;
1979
+ }
1980
+
1981
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
1982
+ if (includeScale === void 0) {
1983
+ includeScale = false;
1984
+ }
1985
+ if (isFixedStrategy === void 0) {
1986
+ isFixedStrategy = false;
1987
+ }
1988
+ const clientRect = element.getBoundingClientRect();
1989
+ const domElement = unwrapElement(element);
1990
+ let scale = createCoords(1);
1991
+ if (includeScale) {
1992
+ if (offsetParent) {
1993
+ if (floating_ui_utils_dom_isElement(offsetParent)) {
1994
+ scale = getScale(offsetParent);
1995
+ }
1996
+ } else {
1997
+ scale = getScale(element);
1998
+ }
1999
+ }
2000
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
2001
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
2002
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
2003
+ let width = clientRect.width / scale.x;
2004
+ let height = clientRect.height / scale.y;
2005
+ if (domElement) {
2006
+ const win = getWindow(domElement);
2007
+ const offsetWin = offsetParent && floating_ui_utils_dom_isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
2008
+ let currentIFrame = win.frameElement;
2009
+ while (currentIFrame && offsetParent && offsetWin !== win) {
2010
+ const iframeScale = getScale(currentIFrame);
2011
+ const iframeRect = currentIFrame.getBoundingClientRect();
2012
+ const css = getComputedStyle(currentIFrame);
2013
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
2014
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
2015
+ x *= iframeScale.x;
2016
+ y *= iframeScale.y;
2017
+ width *= iframeScale.x;
2018
+ height *= iframeScale.y;
2019
+ x += left;
2020
+ y += top;
2021
+ currentIFrame = getWindow(currentIFrame).frameElement;
2022
+ }
2023
+ }
2024
+ return rectToClientRect({
2025
+ width,
2026
+ height,
2027
+ x,
2028
+ y
2029
+ });
2030
+ }
2031
+
2032
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
2033
+ let {
2034
+ rect,
2035
+ offsetParent,
2036
+ strategy
2037
+ } = _ref;
2038
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
2039
+ const documentElement = getDocumentElement(offsetParent);
2040
+ if (offsetParent === documentElement) {
2041
+ return rect;
2042
+ }
2043
+ let scroll = {
2044
+ scrollLeft: 0,
2045
+ scrollTop: 0
2046
+ };
2047
+ let scale = createCoords(1);
2048
+ const offsets = createCoords(0);
2049
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
2050
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
2051
+ scroll = getNodeScroll(offsetParent);
2052
+ }
2053
+ if (isHTMLElement(offsetParent)) {
2054
+ const offsetRect = getBoundingClientRect(offsetParent);
2055
+ scale = getScale(offsetParent);
2056
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
2057
+ offsets.y = offsetRect.y + offsetParent.clientTop;
2058
+ }
2059
+ }
2060
+ return {
2061
+ width: rect.width * scale.x,
2062
+ height: rect.height * scale.y,
2063
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
2064
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
2065
+ };
2066
+ }
2067
+
2068
+ function getClientRects(element) {
2069
+ return Array.from(element.getClientRects());
2070
+ }
2071
+
2072
+ function getWindowScrollBarX(element) {
2073
+ // If <html> has a CSS width greater than the viewport, then this will be
2074
+ // incorrect for RTL.
2075
+ return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
2076
+ }
2077
+
2078
+ // Gets the entire size of the scrollable document area, even extending outside
2079
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
2080
+ function getDocumentRect(element) {
2081
+ const html = getDocumentElement(element);
2082
+ const scroll = getNodeScroll(element);
2083
+ const body = element.ownerDocument.body;
2084
+ const width = floating_ui_utils_max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
2085
+ const height = floating_ui_utils_max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
2086
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
2087
+ const y = -scroll.scrollTop;
2088
+ if (getComputedStyle(body).direction === 'rtl') {
2089
+ x += floating_ui_utils_max(html.clientWidth, body.clientWidth) - width;
2090
+ }
2091
+ return {
2092
+ width,
2093
+ height,
2094
+ x,
2095
+ y
2096
+ };
2097
+ }
2098
+
2099
+ function getViewportRect(element, strategy) {
2100
+ const win = getWindow(element);
2101
+ const html = getDocumentElement(element);
2102
+ const visualViewport = win.visualViewport;
2103
+ let width = html.clientWidth;
2104
+ let height = html.clientHeight;
2105
+ let x = 0;
2106
+ let y = 0;
2107
+ if (visualViewport) {
2108
+ width = visualViewport.width;
2109
+ height = visualViewport.height;
2110
+ const visualViewportBased = isWebKit();
2111
+ if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
2112
+ x = visualViewport.offsetLeft;
2113
+ y = visualViewport.offsetTop;
2114
+ }
2115
+ }
2116
+ return {
2117
+ width,
2118
+ height,
2119
+ x,
2120
+ y
2121
+ };
2122
+ }
2123
+
2124
+ // Returns the inner client rect, subtracting scrollbars if present.
2125
+ function getInnerBoundingClientRect(element, strategy) {
2126
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
2127
+ const top = clientRect.top + element.clientTop;
2128
+ const left = clientRect.left + element.clientLeft;
2129
+ const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
2130
+ const width = element.clientWidth * scale.x;
2131
+ const height = element.clientHeight * scale.y;
2132
+ const x = left * scale.x;
2133
+ const y = top * scale.y;
2134
+ return {
2135
+ width,
2136
+ height,
2137
+ x,
2138
+ y
2139
+ };
2140
+ }
2141
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
2142
+ let rect;
2143
+ if (clippingAncestor === 'viewport') {
2144
+ rect = getViewportRect(element, strategy);
2145
+ } else if (clippingAncestor === 'document') {
2146
+ rect = getDocumentRect(getDocumentElement(element));
2147
+ } else if (floating_ui_utils_dom_isElement(clippingAncestor)) {
2148
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
2149
+ } else {
2150
+ const visualOffsets = getVisualOffsets(element);
2151
+ rect = {
2152
+ ...clippingAncestor,
2153
+ x: clippingAncestor.x - visualOffsets.x,
2154
+ y: clippingAncestor.y - visualOffsets.y
2155
+ };
2156
+ }
2157
+ return rectToClientRect(rect);
2158
+ }
2159
+ function hasFixedPositionAncestor(element, stopNode) {
2160
+ const parentNode = getParentNode(element);
2161
+ if (parentNode === stopNode || !floating_ui_utils_dom_isElement(parentNode) || isLastTraversableNode(parentNode)) {
2162
+ return false;
2163
+ }
2164
+ return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
2165
+ }
2166
+
2167
+ // A "clipping ancestor" is an `overflow` element with the characteristic of
2168
+ // clipping (or hiding) child elements. This returns all clipping ancestors
2169
+ // of the given element up the tree.
2170
+ function getClippingElementAncestors(element, cache) {
2171
+ const cachedResult = cache.get(element);
2172
+ if (cachedResult) {
2173
+ return cachedResult;
2174
+ }
2175
+ let result = getOverflowAncestors(element).filter(el => floating_ui_utils_dom_isElement(el) && getNodeName(el) !== 'body');
2176
+ let currentContainingBlockComputedStyle = null;
2177
+ const elementIsFixed = getComputedStyle(element).position === 'fixed';
2178
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
2179
+
2180
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
2181
+ while (floating_ui_utils_dom_isElement(currentNode) && !isLastTraversableNode(currentNode)) {
2182
+ const computedStyle = getComputedStyle(currentNode);
2183
+ const currentNodeIsContaining = isContainingBlock(currentNode);
2184
+ if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
2185
+ currentContainingBlockComputedStyle = null;
2186
+ }
2187
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
2188
+ if (shouldDropCurrentNode) {
2189
+ // Drop non-containing blocks.
2190
+ result = result.filter(ancestor => ancestor !== currentNode);
2191
+ } else {
2192
+ // Record last containing block for next iteration.
2193
+ currentContainingBlockComputedStyle = computedStyle;
2194
+ }
2195
+ currentNode = getParentNode(currentNode);
2196
+ }
2197
+ cache.set(element, result);
2198
+ return result;
2199
+ }
2200
+
2201
+ // Gets the maximum area that the element is visible in due to any number of
2202
+ // clipping ancestors.
2203
+ function getClippingRect(_ref) {
2204
+ let {
2205
+ element,
2206
+ boundary,
2207
+ rootBoundary,
2208
+ strategy
2209
+ } = _ref;
2210
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
2211
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
2212
+ const firstClippingAncestor = clippingAncestors[0];
2213
+ const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
2214
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
2215
+ accRect.top = floating_ui_utils_max(rect.top, accRect.top);
2216
+ accRect.right = floating_ui_utils_min(rect.right, accRect.right);
2217
+ accRect.bottom = floating_ui_utils_min(rect.bottom, accRect.bottom);
2218
+ accRect.left = floating_ui_utils_max(rect.left, accRect.left);
2219
+ return accRect;
2220
+ }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
2221
+ return {
2222
+ width: clippingRect.right - clippingRect.left,
2223
+ height: clippingRect.bottom - clippingRect.top,
2224
+ x: clippingRect.left,
2225
+ y: clippingRect.top
2226
+ };
2227
+ }
2228
+
2229
+ function getDimensions(element) {
2230
+ return getCssDimensions(element);
2231
+ }
2232
+
2233
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
2234
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
2235
+ const documentElement = getDocumentElement(offsetParent);
2236
+ const isFixed = strategy === 'fixed';
2237
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
2238
+ let scroll = {
2239
+ scrollLeft: 0,
2240
+ scrollTop: 0
2241
+ };
2242
+ const offsets = createCoords(0);
2243
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
2244
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
2245
+ scroll = getNodeScroll(offsetParent);
2246
+ }
2247
+ if (isOffsetParentAnElement) {
2248
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
2249
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
2250
+ offsets.y = offsetRect.y + offsetParent.clientTop;
2251
+ } else if (documentElement) {
2252
+ offsets.x = getWindowScrollBarX(documentElement);
2253
+ }
2254
+ }
2255
+ return {
2256
+ x: rect.left + scroll.scrollLeft - offsets.x,
2257
+ y: rect.top + scroll.scrollTop - offsets.y,
2258
+ width: rect.width,
2259
+ height: rect.height
2260
+ };
2261
+ }
2262
+
2263
+ function getTrueOffsetParent(element, polyfill) {
2264
+ if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
2265
+ return null;
2266
+ }
2267
+ if (polyfill) {
2268
+ return polyfill(element);
2269
+ }
2270
+ return element.offsetParent;
2271
+ }
2272
+ function getContainingBlock(element) {
2273
+ let currentNode = getParentNode(element);
2274
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
2275
+ if (isContainingBlock(currentNode)) {
2276
+ return currentNode;
2277
+ } else {
2278
+ currentNode = getParentNode(currentNode);
2279
+ }
2280
+ }
2281
+ return null;
2282
+ }
2283
+
2284
+ // Gets the closest ancestor positioned element. Handles some edge cases,
2285
+ // such as table ancestors and cross browser bugs.
2286
+ function getOffsetParent(element, polyfill) {
2287
+ const window = getWindow(element);
2288
+ if (!isHTMLElement(element)) {
2289
+ return window;
2290
+ }
2291
+ let offsetParent = getTrueOffsetParent(element, polyfill);
2292
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
2293
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
2294
+ }
2295
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
2296
+ return window;
2297
+ }
2298
+ return offsetParent || getContainingBlock(element) || window;
2299
+ }
2300
+
2301
+ const getElementRects = async function (_ref) {
2302
+ let {
2303
+ reference,
2304
+ floating,
2305
+ strategy
2306
+ } = _ref;
2307
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
2308
+ const getDimensionsFn = this.getDimensions;
2309
+ return {
2310
+ reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
2311
+ floating: {
2312
+ x: 0,
2313
+ y: 0,
2314
+ ...(await getDimensionsFn(floating))
2315
+ }
2316
+ };
2317
+ };
2318
+
2319
+ function isRTL(element) {
2320
+ return getComputedStyle(element).direction === 'rtl';
2321
+ }
2322
+
2323
+ const platform = {
2324
+ convertOffsetParentRelativeRectToViewportRelativeRect,
2325
+ getDocumentElement: getDocumentElement,
2326
+ getClippingRect,
2327
+ getOffsetParent,
2328
+ getElementRects,
2329
+ getClientRects,
2330
+ getDimensions,
2331
+ getScale,
2332
+ isElement: floating_ui_utils_dom_isElement,
2333
+ isRTL
2334
+ };
2335
+
2336
+ // https://samthor.au/2021/observing-dom/
2337
+ function observeMove(element, onMove) {
2338
+ let io = null;
2339
+ let timeoutId;
2340
+ const root = getDocumentElement(element);
2341
+ function cleanup() {
2342
+ clearTimeout(timeoutId);
2343
+ io && io.disconnect();
2344
+ io = null;
2345
+ }
2346
+ function refresh(skip, threshold) {
2347
+ if (skip === void 0) {
2348
+ skip = false;
2349
+ }
2350
+ if (threshold === void 0) {
2351
+ threshold = 1;
2352
+ }
2353
+ cleanup();
2354
+ const {
2355
+ left,
2356
+ top,
2357
+ width,
2358
+ height
2359
+ } = element.getBoundingClientRect();
2360
+ if (!skip) {
2361
+ onMove();
2362
+ }
2363
+ if (!width || !height) {
2364
+ return;
2365
+ }
2366
+ const insetTop = floor(top);
2367
+ const insetRight = floor(root.clientWidth - (left + width));
2368
+ const insetBottom = floor(root.clientHeight - (top + height));
2369
+ const insetLeft = floor(left);
2370
+ const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
2371
+ const options = {
2372
+ rootMargin,
2373
+ threshold: floating_ui_utils_max(0, floating_ui_utils_min(1, threshold)) || 1
2374
+ };
2375
+ let isFirstUpdate = true;
2376
+ function handleObserve(entries) {
2377
+ const ratio = entries[0].intersectionRatio;
2378
+ if (ratio !== threshold) {
2379
+ if (!isFirstUpdate) {
2380
+ return refresh();
2381
+ }
2382
+ if (!ratio) {
2383
+ timeoutId = setTimeout(() => {
2384
+ refresh(false, 1e-7);
2385
+ }, 100);
2386
+ } else {
2387
+ refresh(false, ratio);
2388
+ }
2389
+ }
2390
+ isFirstUpdate = false;
2391
+ }
2392
+
2393
+ // Older browsers don't support a `document` as the root and will throw an
2394
+ // error.
2395
+ try {
2396
+ io = new IntersectionObserver(handleObserve, {
2397
+ ...options,
2398
+ // Handle <iframe>s
2399
+ root: root.ownerDocument
2400
+ });
2401
+ } catch (e) {
2402
+ io = new IntersectionObserver(handleObserve, options);
2403
+ }
2404
+ io.observe(element);
2405
+ }
2406
+ refresh(true);
2407
+ return cleanup;
2408
+ }
2409
+
2410
+ /**
2411
+ * Automatically updates the position of the floating element when necessary.
2412
+ * Should only be called when the floating element is mounted on the DOM or
2413
+ * visible on the screen.
2414
+ * @returns cleanup function that should be invoked when the floating element is
2415
+ * removed from the DOM or hidden from the screen.
2416
+ * @see https://floating-ui.com/docs/autoUpdate
2417
+ */
2418
+ function autoUpdate(reference, floating, update, options) {
2419
+ if (options === void 0) {
2420
+ options = {};
2421
+ }
2422
+ const {
2423
+ ancestorScroll = true,
2424
+ ancestorResize = true,
2425
+ elementResize = typeof ResizeObserver === 'function',
2426
+ layoutShift = typeof IntersectionObserver === 'function',
2427
+ animationFrame = false
2428
+ } = options;
2429
+ const referenceEl = unwrapElement(reference);
2430
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
2431
+ ancestors.forEach(ancestor => {
2432
+ ancestorScroll && ancestor.addEventListener('scroll', update, {
2433
+ passive: true
2434
+ });
2435
+ ancestorResize && ancestor.addEventListener('resize', update);
2436
+ });
2437
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
2438
+ let reobserveFrame = -1;
2439
+ let resizeObserver = null;
2440
+ if (elementResize) {
2441
+ resizeObserver = new ResizeObserver(_ref => {
2442
+ let [firstEntry] = _ref;
2443
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
2444
+ // Prevent update loops when using the `size` middleware.
2445
+ // https://github.com/floating-ui/floating-ui/issues/1740
2446
+ resizeObserver.unobserve(floating);
2447
+ cancelAnimationFrame(reobserveFrame);
2448
+ reobserveFrame = requestAnimationFrame(() => {
2449
+ resizeObserver && resizeObserver.observe(floating);
2450
+ });
2451
+ }
2452
+ update();
2453
+ });
2454
+ if (referenceEl && !animationFrame) {
2455
+ resizeObserver.observe(referenceEl);
2456
+ }
2457
+ resizeObserver.observe(floating);
2458
+ }
2459
+ let frameId;
2460
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
2461
+ if (animationFrame) {
2462
+ frameLoop();
2463
+ }
2464
+ function frameLoop() {
2465
+ const nextRefRect = getBoundingClientRect(reference);
2466
+ if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
2467
+ update();
2468
+ }
2469
+ prevRefRect = nextRefRect;
2470
+ frameId = requestAnimationFrame(frameLoop);
2471
+ }
2472
+ update();
2473
+ return () => {
2474
+ ancestors.forEach(ancestor => {
2475
+ ancestorScroll && ancestor.removeEventListener('scroll', update);
2476
+ ancestorResize && ancestor.removeEventListener('resize', update);
2477
+ });
2478
+ cleanupIo && cleanupIo();
2479
+ resizeObserver && resizeObserver.disconnect();
2480
+ resizeObserver = null;
2481
+ if (animationFrame) {
2482
+ cancelAnimationFrame(frameId);
2483
+ }
2484
+ };
2485
+ }
2486
+
2487
+ /**
2488
+ * Computes the `x` and `y` coordinates that will place the floating element
2489
+ * next to a reference element when it is given a certain CSS positioning
2490
+ * strategy.
2491
+ */
2492
+ const floating_ui_dom_computePosition = (reference, floating, options) => {
2493
+ // This caches the expensive `getClippingElementAncestors` function so that
2494
+ // multiple lifecycle resets re-use the same result. It only lives for a
2495
+ // single call. If other functions become expensive, we can add them as well.
2496
+ const cache = new Map();
2497
+ const mergedOptions = {
2498
+ platform,
2499
+ ...options
2500
+ };
2501
+ const platformWithCache = {
2502
+ ...mergedOptions.platform,
2503
+ _c: cache
2504
+ };
2505
+ return computePosition(reference, floating, {
2506
+ ...mergedOptions,
2507
+ platform: platformWithCache
2508
+ });
2509
+ };
2510
+
2511
+
2512
+
2513
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/native.js
2514
+ const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
2515
+ /* harmony default export */ const esm_browser_native = ({
2516
+ randomUUID
2517
+ });
2518
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/rng.js
2519
+ // Unique ID creation requires a high quality random # generator. In the browser we therefore
2520
+ // require the crypto API and do not support built-in fallback to lower quality random number
2521
+ // generators (like Math.random()).
2522
+ let getRandomValues;
2523
+ const rnds8 = new Uint8Array(16);
2524
+ function rng() {
2525
+ // lazy load so that environments that need to polyfill have a chance to do so
2526
+ if (!getRandomValues) {
2527
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
2528
+ getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
2529
+
2530
+ if (!getRandomValues) {
2531
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
2532
+ }
2533
+ }
2534
+
2535
+ return getRandomValues(rnds8);
2536
+ }
2537
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/stringify.js
2538
+
2539
+ /**
2540
+ * Convert array of 16 byte values to UUID string format of the form:
2541
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
2542
+ */
2543
+
2544
+ const byteToHex = [];
2545
+
2546
+ for (let i = 0; i < 256; ++i) {
2547
+ byteToHex.push((i + 0x100).toString(16).slice(1));
2548
+ }
2549
+
2550
+ function unsafeStringify(arr, offset = 0) {
2551
+ // Note: Be careful editing this code! It's been tuned for performance
2552
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
2553
+ return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
2554
+ }
2555
+
2556
+ function stringify(arr, offset = 0) {
2557
+ const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
2558
+ // of the following:
2559
+ // - One or more input array values don't map to a hex octet (leading to
2560
+ // "undefined" in the uuid)
2561
+ // - Invalid input values for the RFC `version` or `variant` fields
2562
+
2563
+ if (!validate(uuid)) {
2564
+ throw TypeError('Stringified UUID is invalid');
2565
+ }
2566
+
2567
+ return uuid;
2568
+ }
2569
+
2570
+ /* harmony default export */ const esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify)));
2571
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/v4.js
2572
+
2573
+
2574
+
2575
+
2576
+ function v4(options, buf, offset) {
2577
+ if (esm_browser_native.randomUUID && !buf && !options) {
2578
+ return esm_browser_native.randomUUID();
2579
+ }
2580
+
2581
+ options = options || {};
2582
+ const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
2583
+
2584
+ rnds[6] = rnds[6] & 0x0f | 0x40;
2585
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
2586
+
2587
+ if (buf) {
2588
+ offset = offset || 0;
2589
+
2590
+ for (let i = 0; i < 16; ++i) {
2591
+ buf[offset + i] = rnds[i];
2592
+ }
2593
+
2594
+ return buf;
2595
+ }
2596
+
2597
+ return unsafeStringify(rnds);
2598
+ }
2599
+
2600
+ /* harmony default export */ const esm_browser_v4 = (v4);
2601
+ ;// CONCATENATED MODULE: ../../packages/popover/src/utils.ts
2602
+ /*
2603
+ * Tencent is pleased to support the open source community by making
2604
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2605
+ *
2606
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2607
+ *
2608
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2609
+ *
2610
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2611
+ *
2612
+ * ---------------------------------------------------
2613
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2614
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2615
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2616
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2617
+ *
2618
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2619
+ * the Software.
2620
+ *
2621
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2622
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2623
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2624
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2625
+ * IN THE SOFTWARE.
2626
+ */
2627
+
2628
+ var CachedConst = {};
2629
+ var isAvailableId = function isAvailableId(query) {
2630
+ var container = document.querySelector(query);
2631
+ return container instanceof HTMLElement;
2632
+ };
2633
+ var getFullscreenUid = function getFullscreenUid() {
2634
+ if (!CachedConst.fullscreenReferId) {
2635
+ CachedConst.fullscreenReferId = "id_".concat(esm_browser_v4());
2636
+ }
2637
+ return CachedConst.fullscreenReferId;
2638
+ };
2639
+ var utils_isElement = function isElement(element) {
2640
+ return element instanceof Element || element instanceof HTMLDocument;
2641
+ };
2642
+ var contentAsHTMLElement = function contentAsHTMLElement(content) {
2643
+ if (utils_isElement(content)) {
2644
+ return {
2645
+ isElement: true,
2646
+ content: content,
2647
+ vNode: undefined
2648
+ };
2649
+ }
2650
+ if (/^(#|\.)/.test(content)) {
2651
+ var target = document.querySelector(content);
2652
+ var isEle = utils_isElement(target);
2653
+ return {
2654
+ isElement: isEle,
2655
+ content: isEle ? target : content,
2656
+ vNode: isEle ? undefined : content
2657
+ };
2658
+ }
2659
+ return {
2660
+ isElement: false,
2661
+ content: content,
2662
+ vNode: content
2663
+ };
2664
+ };
2665
+ ;// CONCATENATED MODULE: ../../packages/popover/src/use-floating.tsx
2666
+
2667
+
2668
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2669
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2670
+ /*
2671
+ * Tencent is pleased to support the open source community by making
2672
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2673
+ *
2674
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2675
+ *
2676
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2677
+ *
2678
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2679
+ *
2680
+ * ---------------------------------------------------
2681
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2682
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2683
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2684
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2685
+ *
2686
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2687
+ * the Software.
2688
+ *
2689
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2690
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2691
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2692
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2693
+ * IN THE SOFTWARE.
2694
+ */
2695
+
2696
+
2697
+
2698
+
2699
+
2700
+ // import usePlatform from './use-platform';
2701
+
2702
+ /**
2703
+ * 解析popover相关配置
2704
+ */
2705
+ /* harmony default export */ const use_floating = (function (props, ctx, _ref) {
2706
+ var refReference = _ref.refReference,
2707
+ refContent = _ref.refContent,
2708
+ refArrow = _ref.refArrow,
2709
+ refRoot = _ref.refRoot;
2710
+ var localIsShow = (0,external_vue_namespaceObject.ref)(false);
2711
+ var fullScreenTarget = (0,external_vue_namespaceObject.ref)();
2712
+ var isElementFullScreen = function isElementFullScreen() {
2713
+ var _document$fullscreenE, _document$fullscreenE2;
2714
+ var elReference = resolveReferElement();
2715
+ if ((_document$fullscreenE = document.fullscreenElement) !== null && _document$fullscreenE !== void 0 && _document$fullscreenE.shadowRoot) {
2716
+ return document.fullscreenElement.shadowRoot.contains(elReference);
2717
+ }
2718
+ return (_document$fullscreenE2 = document.fullscreenElement) === null || _document$fullscreenE2 === void 0 ? void 0 : _document$fullscreenE2.contains(elReference);
2719
+ };
2720
+ /**
2721
+ * 当全屏模式开启,获取指定选择器下面的全屏元素
2722
+ * 如果是启用了webcomponent组件,则返回shadowRoot内指定的目标元素
2723
+ * @param selector
2724
+ * @returns
2725
+ */
2726
+ var getFullscreenRoot = function getFullscreenRoot(selector) {
2727
+ if (isElementFullScreen()) {
2728
+ if (document.fullscreenElement.shadowRoot) {
2729
+ return document.fullscreenElement.shadowRoot.querySelector(selector);
2730
+ }
2731
+ return document.fullscreenElement.querySelector(selector);
2732
+ }
2733
+ return document.body;
2734
+ };
2735
+ var themeList = ['dark', 'light'];
2736
+ /**
2737
+ * 根据props.theme计算theme
2738
+ * 返回systemTheme & customTheme
2739
+ * systemTheme是指包含在 ['dark', 'light'] 内置主题
2740
+ * customTheme是指自定义的theme,string类型
2741
+ */
2742
+ var compTheme = (0,external_vue_namespaceObject.computed)(function () {
2743
+ var _props$theme$split, _props$theme;
2744
+ var themes = (_props$theme$split = (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.split(/\s+/)) !== null && _props$theme$split !== void 0 ? _props$theme$split : [];
2745
+ themes.sort(function (a, b) {
2746
+ return Number(themeList.includes(b)) - Number(themeList.includes(a));
2747
+ });
2748
+ var systemThemes = themes;
2749
+ var customThemes = themes.filter(function (item) {
2750
+ return !themeList.includes(item);
2751
+ });
2752
+ return {
2753
+ systemThemes: systemThemes,
2754
+ customThemes: customThemes
2755
+ };
2756
+ });
2757
+ var isHideMiddlewareAvailable = function isHideMiddlewareAvailable() {
2758
+ return props.autoVisibility;
2759
+ };
2760
+ var isAutoPlacementAvailable = function isAutoPlacementAvailable() {
2761
+ return props.autoPlacement;
2762
+ };
2763
+ /**
2764
+ * 解析弹出reference元素,content元素, arrow元素
2765
+ * @returns
2766
+ */
2767
+ var resolvePopElements = function resolvePopElements() {
2768
+ var _refContent$value, _refArrow$value, _refRoot$value;
2769
+ var elReference = resolveReferElement();
2770
+ var elContent = resolveTargetElement((_refContent$value = refContent.value) === null || _refContent$value === void 0 ? void 0 : _refContent$value.$el);
2771
+ var elArrow = props.arrow ? resolveTargetElement((_refArrow$value = refArrow.value) === null || _refArrow$value === void 0 ? void 0 : _refArrow$value.$el) : null;
2772
+ var root = resolveTargetElement((_refRoot$value = refRoot.value) === null || _refRoot$value === void 0 ? void 0 : _refRoot$value.$el);
2773
+ var _contentAsHTMLElement = contentAsHTMLElement(props.content),
2774
+ isElement = _contentAsHTMLElement.isElement,
2775
+ content = _contentAsHTMLElement.content;
2776
+ if (elContent && isElement && !(elContent !== null && elContent !== void 0 && elContent.contains(content))) {
2777
+ elContent.append(content);
2778
+ }
2779
+ return {
2780
+ elReference: elReference,
2781
+ elContent: elContent,
2782
+ elArrow: elArrow,
2783
+ root: root
2784
+ };
2785
+ };
2786
+ var resolveReferElement = function resolveReferElement() {
2787
+ var _refReference$value;
2788
+ return resolveTargetElement(props.target) || resolveTargetElement((_refReference$value = refReference.value) === null || _refReference$value === void 0 ? void 0 : _refReference$value.$el);
2789
+ };
2790
+ var resolveModifiers = function resolveModifiers() {
2791
+ var resolveResult = {};
2792
+ if (Array.isArray(props.modifiers)) {
2793
+ props.modifiers.forEach(function (m) {
2794
+ var result;
2795
+ if (m.name === 'offset') {
2796
+ var _m$options, _m$options3;
2797
+ if (typeof ((_m$options = m.options) === null || _m$options === void 0 ? void 0 : _m$options.offset) === 'number') {
2798
+ var _m$options2;
2799
+ result = (_m$options2 = m.options) === null || _m$options2 === void 0 ? void 0 : _m$options2.offset;
2800
+ }
2801
+ if (Array.isArray((_m$options3 = m.options) === null || _m$options3 === void 0 ? void 0 : _m$options3.offset)) {
2802
+ var _m$options4;
2803
+ var _m$options$offset = (_m$options4 = m.options) === null || _m$options4 === void 0 ? void 0 : _m$options4.offset,
2804
+ _m$options$offset2 = _slicedToArray(_m$options$offset, 2),
2805
+ mainAxis = _m$options$offset2[0],
2806
+ crossAxis = _m$options$offset2[1];
2807
+ result = {
2808
+ mainAxis: mainAxis,
2809
+ crossAxis: crossAxis
2810
+ };
2811
+ }
2812
+ Object.assign(resolveResult, {
2813
+ offset: result
2814
+ });
2815
+ }
2816
+ });
2817
+ }
2818
+ return resolveResult;
2819
+ };
2820
+ var resolvePopOptions = function resolvePopOptions(elArrow, props) {
2821
+ var modifiers = resolveModifiers();
2822
+ var middleware = [offset(modifiers.offset || props.offset), shift({
2823
+ padding: props.padding
2824
+ })];
2825
+ var options = {
2826
+ placement: props.placement,
2827
+ middleware: middleware
2828
+ };
2829
+ if (props.arrow) {
2830
+ middleware.push(arrow({
2831
+ element: elArrow
2832
+ }));
2833
+ }
2834
+ if (isAutoPlacementAvailable()) {
2835
+ middleware.push(autoPlacement());
2836
+ }
2837
+ middleware.unshift(inline());
2838
+ middleware.push(flip());
2839
+ if (isHideMiddlewareAvailable()) {
2840
+ options.middleware.push(hide());
2841
+ }
2842
+ /**
2843
+ * 如果是全屏元素或者指定的虚拟元素
2844
+ * 则启用自定义的platform
2845
+ * 在弹出的全屏元素中,元素相对位置有别于document下面元素
2846
+ * 全屏模式下面,需要自定义当前元素的一个platform
2847
+ */
2848
+ // if (isElementFullScreen() || props.isVirtualEl) {
2849
+ // const { getElementRects, getDimensions, getClippingRect } = usePlatform(fullScreenTarget.value);
2850
+ // Object.assign(options, {
2851
+ // platform: {
2852
+ // ...(props?.platform ?? {}),
2853
+ // getElementRects,
2854
+ // getDimensions,
2855
+ // getClippingRect,
2856
+ // },
2857
+ // });
2858
+ // }
2859
+ return options;
2860
+ };
2861
+ var resolveTargetElement = function resolveTargetElement(target) {
2862
+ if (target instanceof HTMLElement) {
2863
+ return target;
2864
+ }
2865
+ if (target instanceof Text) {
2866
+ return resolveTargetElement(target.nextElementSibling);
2867
+ }
2868
+ if (typeof (target === null || target === void 0 ? void 0 : target.getBoundingClientRect) === 'function') {
2869
+ return target;
2870
+ }
2871
+ if (typeof target === 'string') {
2872
+ var targetEl = document.querySelector(target);
2873
+ if ((0,isElement_namespaceObject["default"])(targetEl)) {
2874
+ return targetEl;
2875
+ }
2876
+ return null;
2877
+ }
2878
+ if (target instanceof PointerEvent) {
2879
+ return resolveTargetElement(target.target);
2880
+ }
2881
+ return null;
2882
+ };
2883
+ // 兼容多种样式处理规则
2884
+ // class custom-theme
2885
+ var customThemeCls = compTheme.value.customThemes.join(' ');
2886
+ var customTheme = compTheme.value.customThemes.reduce(function (out, cur) {
2887
+ return _objectSpread(_defineProperty({}, "data-".concat(cur, "-theme"), true), out);
2888
+ }, {});
2889
+ var contentClass = "".concat(customThemeCls);
2890
+ var cleanup = null;
2891
+ var getRoundPixelVal = function getRoundPixelVal(val) {
2892
+ var dpr = window.devicePixelRatio || 1;
2893
+ return Math.round(val * dpr) / dpr || 0;
2894
+ };
2895
+ var updatePopContentStyle = function updatePopContentStyle(elContent, x, y, middlewareData) {
2896
+ var _middlewareData$hide;
2897
+ if (props.disableTransform) {
2898
+ Object.assign(elContent.style, {
2899
+ left: "".concat(getRoundPixelVal(x), "px"),
2900
+ top: "".concat(getRoundPixelVal(y), "px")
2901
+ });
2902
+ } else {
2903
+ Object.assign(elContent.style, {
2904
+ left: '0',
2905
+ top: '0',
2906
+ transform: "translate3d(".concat(getRoundPixelVal(x), "px,").concat(getRoundPixelVal(y), "px,0)")
2907
+ });
2908
+ }
2909
+ var referenceHidden = isHideMiddlewareAvailable() ? (_middlewareData$hide = middlewareData.hide) === null || _middlewareData$hide === void 0 ? void 0 : _middlewareData$hide.referenceHidden : false;
2910
+ Object.assign(elContent.style, {
2911
+ visibility: referenceHidden ? 'hidden' : 'visible'
2912
+ });
2913
+ };
2914
+ var updateArrowStyle = function updateArrowStyle(elArrow, resolvedPlacement, middlewareData) {
2915
+ if (props.arrow) {
2916
+ var _middlewareData$arrow;
2917
+ var _ref2 = (_middlewareData$arrow = middlewareData.arrow) !== null && _middlewareData$arrow !== void 0 ? _middlewareData$arrow : {},
2918
+ arrowX = _ref2.x,
2919
+ arrowY = _ref2.y;
2920
+ elArrow.setAttribute('data-arrow', resolvedPlacement);
2921
+ var arrowConfig = {
2922
+ left: '',
2923
+ top: '',
2924
+ bottom: '',
2925
+ right: ''
2926
+ };
2927
+ Object.assign(elArrow.style, arrowConfig);
2928
+ var arrowSide = {
2929
+ top: 'bottom',
2930
+ right: 'left',
2931
+ bottom: 'top',
2932
+ left: 'right'
2933
+ }[resolvedPlacement];
2934
+ Object.assign(elArrow.style, _defineProperty({
2935
+ left: arrowX !== null ? "".concat(arrowX, "px") : '',
2936
+ top: arrowY !== null ? "".concat(arrowY, "px") : ''
2937
+ }, arrowSide, '-4px'));
2938
+ }
2939
+ };
2940
+ var createPopInstance = function createPopInstance() {
2941
+ var _resolvePopElements = resolvePopElements(),
2942
+ elReference = _resolvePopElements.elReference,
2943
+ elContent = _resolvePopElements.elContent;
2944
+ cleanup = autoUpdate(elReference, elContent, function () {
2945
+ if (localIsShow.value) {
2946
+ updatePopover(null, props);
2947
+ }
2948
+ });
2949
+ };
2950
+ var updatePopover = function updatePopover() {
2951
+ var virtualEl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
2952
+ var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2953
+ var callFn = arguments.length > 2 ? arguments[2] : undefined;
2954
+ var _resolvePopElements2 = resolvePopElements(),
2955
+ elReference = _resolvePopElements2.elReference,
2956
+ elContent = _resolvePopElements2.elContent,
2957
+ elArrow = _resolvePopElements2.elArrow;
2958
+ var targetEl = virtualEl || elReference;
2959
+ if (!targetEl || !elContent) return;
2960
+ var options = resolvePopOptions(elArrow, props);
2961
+ floating_ui_dom_computePosition(targetEl, elContent, options).then(function (_ref3) {
2962
+ var x = _ref3.x,
2963
+ y = _ref3.y,
2964
+ placement = _ref3.placement,
2965
+ middlewareData = _ref3.middlewareData;
2966
+ var oldClass = elContent.className;
2967
+ elContent.className = "".concat(oldClass.replace(contentClass, ''), " ").concat(contentClass).replace(/\s+/gm, ' ').replace(/^\s+|\s+$/g, '');
2968
+ Object.keys(customTheme).forEach(function (key) {
2969
+ elContent.setAttribute(key, customTheme[key]);
2970
+ });
2971
+ var placementStr = placement.split('-')[0];
2972
+ var resolvedPlacement = placementStr;
2973
+ if (!['left', 'right', 'top', 'bottom'].includes(placementStr)) {
2974
+ resolvedPlacement = 'top';
2975
+ }
2976
+ updatePopContentStyle(elContent, x, y, middlewareData);
2977
+ updateArrowStyle(elArrow, resolvedPlacement, middlewareData);
2978
+ if (typeof callFn === 'function') {
2979
+ callFn();
2980
+ }
2981
+ });
2982
+ };
2983
+ var popHideTimerId = undefined;
2984
+ var popShowTimerId = undefined;
2985
+ var isMouseenter = false;
2986
+ var resolvePopoverDelay = function resolvePopoverDelay() {
2987
+ if (Array.isArray(props.popoverDelay)) {
2988
+ return [props.popoverDelay[0], props.popoverDelay.slice(-1)[0]];
2989
+ }
2990
+ return [props.popoverDelay, props.popoverDelay];
2991
+ };
2992
+ var showPopover = function showPopover() {
2993
+ var delay = resolvePopoverDelay()[0];
2994
+ // 设置settimeout避免hidePopover导致显示问题
2995
+ popShowTimerId = setTimeout(function () {
2996
+ if (popHideTimerId) {
2997
+ clearTimeout(popHideTimerId);
2998
+ }
2999
+ if (!props.disabled) {
3000
+ localIsShow.value = true;
3001
+ }
3002
+ }, delay);
3003
+ };
3004
+ var hidePopover = function hidePopover() {
3005
+ var delay = resolvePopoverDelay()[1];
3006
+ popHideTimerId = setTimeout(function () {
3007
+ popShowTimerId && clearTimeout(popShowTimerId);
3008
+ localIsShow.value = false;
3009
+ }, delay);
3010
+ };
3011
+ var handlePopoverShow = function handlePopoverShow() {
3012
+ var _refContent$value2;
3013
+ var elContent = resolveTargetElement((_refContent$value2 = refContent.value) === null || _refContent$value2 === void 0 ? void 0 : _refContent$value2.$el);
3014
+ elContent.style.setProperty('display', 'block');
3015
+ elContent.style.setProperty('z-index', "".concat(props.zIndex ? props.zIndex : shared_namespaceObject.bkZIndexManager.getPopperIndex()));
3016
+ updatePopover();
3017
+ ctx.emit(EMIT_EVENTS.CONTENT_AfterShow, {
3018
+ isShow: true
3019
+ });
3020
+ };
3021
+ var handlePopoverHide = function handlePopoverHide() {
3022
+ var _refContent$value3;
3023
+ var elContent = resolveTargetElement((_refContent$value3 = refContent.value) === null || _refContent$value3 === void 0 ? void 0 : _refContent$value3.$el);
3024
+ elContent.style.setProperty('display', 'none');
3025
+ ctx.emit(EMIT_EVENTS.CONTENT_AfterHidden, {
3026
+ isShow: false
3027
+ });
3028
+ };
3029
+ var triggerPopover = function triggerPopover() {
3030
+ if (!localIsShow.value) {
3031
+ showPopover();
3032
+ } else {
3033
+ hidePopover();
3034
+ }
3035
+ };
3036
+ var handleClickRef = function handleClickRef() {
3037
+ triggerPopover();
3038
+ };
3039
+ var handlePopContentMouseEnter = function handlePopContentMouseEnter(e) {
3040
+ if (props.trigger !== 'hover') {
3041
+ return;
3042
+ }
3043
+ if (popHideTimerId) {
3044
+ isMouseenter = true;
3045
+ clearTimeout(popHideTimerId);
3046
+ popHideTimerId = undefined;
3047
+ }
3048
+ emitPopContentMouseEnter(e);
3049
+ };
3050
+ var handlePopContentMouseLeave = function handlePopContentMouseLeave(e) {
3051
+ if (isMouseenter) {
3052
+ hidePopover();
3053
+ isMouseenter = false;
3054
+ emitPopContentMouseLeave(e);
3055
+ }
3056
+ };
3057
+ /**
3058
+ * 弹出内容鼠标移入事件
3059
+ * 抛出相关事件,方便后续操作
3060
+ * 例如:鼠标移入内容区域,则取消弹出内容隐藏操作
3061
+ */
3062
+ var emitPopContentMouseEnter = function emitPopContentMouseEnter(e) {
3063
+ ctx.emit(EMIT_EVENTS.CONTENT_MOUSEENTER, e);
3064
+ };
3065
+ /**
3066
+ * 弹出内容鼠标移出事件
3067
+ */
3068
+ var emitPopContentMouseLeave = function emitPopContentMouseLeave(e) {
3069
+ ctx.emit(EMIT_EVENTS.CONTENT_MOUSELEAVE, e);
3070
+ };
3071
+ var resolveTriggerEvents = function resolveTriggerEvents() {
3072
+ var _triggerEvents$props$;
3073
+ var triggerEvents = {
3074
+ hover: {
3075
+ content: [['mouseenter', handlePopContentMouseEnter], ['mouseleave', handlePopContentMouseLeave]],
3076
+ reference: [['mouseenter', showPopover], ['mouseleave', hidePopover], ['focus', showPopover], ['blur', hidePopover]]
3077
+ },
3078
+ click: [['click', handleClickRef]],
3079
+ manual: {
3080
+ content: [['mouseenter', emitPopContentMouseEnter], ['mouseleave', emitPopContentMouseLeave]],
3081
+ reference: [[]]
3082
+ }
3083
+ };
3084
+ return (_triggerEvents$props$ = triggerEvents[props.trigger]) !== null && _triggerEvents$props$ !== void 0 ? _triggerEvents$props$ : [];
3085
+ };
3086
+ var updateFullscreenTarget = function updateFullscreenTarget(val) {
3087
+ fullScreenTarget.value = val;
3088
+ };
3089
+ (0,external_vue_namespaceObject.watch)(function () {
3090
+ return props.isShow;
3091
+ }, function (val) {
3092
+ localIsShow.value = val;
3093
+ });
3094
+ (0,external_vue_namespaceObject.watch)(localIsShow, function (val) {
3095
+ if (val) {
3096
+ handlePopoverShow();
3097
+ } else {
3098
+ handlePopoverHide();
3099
+ }
3100
+ });
3101
+ var stopHide = function stopHide() {
3102
+ if (popHideTimerId) {
3103
+ isMouseenter = true;
3104
+ clearTimeout(popHideTimerId);
3105
+ popHideTimerId = undefined;
3106
+ }
3107
+ };
3108
+ return {
3109
+ showPopover: showPopover,
3110
+ hidePopover: hidePopover,
3111
+ resolveTriggerEvents: resolveTriggerEvents,
3112
+ updatePopover: updatePopover,
3113
+ triggerPopover: triggerPopover,
3114
+ resolvePopElements: resolvePopElements,
3115
+ isElementFullScreen: isElementFullScreen,
3116
+ resolveTargetElement: resolveTargetElement,
3117
+ createPopInstance: createPopInstance,
3118
+ updateFullscreenTarget: updateFullscreenTarget,
3119
+ getFullscreenRoot: getFullscreenRoot,
3120
+ stopHide: stopHide,
3121
+ localIsShow: localIsShow,
3122
+ cleanup: cleanup
3123
+ };
3124
+ });
3125
+ ;// CONCATENATED MODULE: ../../packages/popover/src/use-popper-id.ts
3126
+ /*
3127
+ * Tencent is pleased to support the open source community by making
3128
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3129
+ *
3130
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3131
+ *
3132
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3133
+ *
3134
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3135
+ *
3136
+ * ---------------------------------------------------
3137
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3138
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3139
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3140
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3141
+ *
3142
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3143
+ * the Software.
3144
+ *
3145
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3146
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3147
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3148
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3149
+ * IN THE SOFTWARE.
3150
+ */
3151
+
3152
+
3153
+ var popContainerId = null;
3154
+ var parentNodeReferId = null;
3155
+ /* harmony default export */ const use_popper_id = (function (props) {
3156
+ var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '#';
3157
+ var getPrefixId = function getPrefixId(root) {
3158
+ var resolvedBoundary = null;
3159
+ var resolveBoundary = function resolveBoundary(fn) {
3160
+ if (resolvedBoundary === null) {
3161
+ fn();
3162
+ }
3163
+ };
3164
+ var resolveParentBoundary = function resolveParentBoundary() {
3165
+ if (/^parent$/i.test(props.boundary)) {
3166
+ resolvedBoundary = "".concat(prefix).concat(popContainerId);
3167
+ var _ref = root || {},
3168
+ parentNode = _ref.parentNode;
3169
+ if (parentNode !== null && parentNode !== void 0 && parentNode.parentNode) {
3170
+ parentNode.parentNode.setAttribute('data-pnode-id', parentNodeReferId);
3171
+ resolvedBoundary = "[data-pnode-id=".concat(parentNodeReferId, "]");
3172
+ }
3173
+ }
3174
+ };
3175
+ var resolveCommonBoundary = function resolveCommonBoundary() {
3176
+ if (!/^body$/i.test(props.boundary)) {
3177
+ if (typeof props.boundary === 'string') {
3178
+ if (!isAvailableId(props.boundary)) {
3179
+ // console.error('props.boundary is not available selector');
3180
+ resolvedBoundary = 'body';
3181
+ return;
3182
+ }
3183
+ resolvedBoundary = props.boundary;
3184
+ return;
3185
+ }
3186
+ if (utils_isElement(props.boundary)) {
3187
+ resolvedBoundary = props.boundary;
3188
+ return;
3189
+ }
3190
+ }
3191
+ };
3192
+ resolveBoundary(resolveParentBoundary);
3193
+ resolveBoundary(resolveCommonBoundary);
3194
+ resolveBoundary(function () {
3195
+ resolvedBoundary = typeof props.boundary === 'string' ? props.boundary : "".concat(prefix).concat(popContainerId);
3196
+ });
3197
+ return resolvedBoundary;
3198
+ };
3199
+ if (popContainerId === null || !isAvailableId("#".concat(popContainerId))) {
3200
+ popContainerId = "id_".concat(esm_browser_v4());
3201
+ var popContainer = document.createElement('div');
3202
+ popContainer.setAttribute('id', popContainerId);
3203
+ popContainer.setAttribute('data-popper-id', popContainerId);
3204
+ document.body.append(popContainer);
3205
+ }
3206
+ if (parentNodeReferId === null) {
3207
+ parentNodeReferId = "id_".concat(esm_browser_v4());
3208
+ }
3209
+ return {
3210
+ popContainerId: popContainerId,
3211
+ prefixId: getPrefixId(),
3212
+ getPrefixId: getPrefixId
3213
+ };
3214
+ });
3215
+ ;// CONCATENATED MODULE: ../../packages/popover/src/use-popover-init.ts
3216
+
3217
+ /*
3218
+ * Tencent is pleased to support the open source community by making
3219
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3220
+ *
3221
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3222
+ *
3223
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3224
+ *
3225
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3226
+ *
3227
+ * ---------------------------------------------------
3228
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3229
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3230
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3231
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3232
+ *
3233
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3234
+ * the Software.
3235
+ *
3236
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3237
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3238
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3239
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3240
+ * IN THE SOFTWARE.
3241
+ */
3242
+
3243
+
3244
+
3245
+
3246
+
3247
+ /* harmony default export */ const use_popover_init = (function (props, ctx, _ref) {
3248
+ var refReference = _ref.refReference,
3249
+ refContent = _ref.refContent,
3250
+ refArrow = _ref.refArrow,
3251
+ refRoot = _ref.refRoot;
3252
+ var storeEvents = null;
3253
+ var isFullscreen = (0,external_vue_namespaceObject.ref)(false);
3254
+ var fullscreenReferId = getFullscreenUid();
3255
+ var fullScreenTarget = (0,external_vue_namespaceObject.ref)();
3256
+ var _useFloating = use_floating(props, ctx, {
3257
+ refReference: refReference,
3258
+ refContent: refContent,
3259
+ refArrow: refArrow,
3260
+ refRoot: refRoot
3261
+ }),
3262
+ localIsShow = _useFloating.localIsShow,
3263
+ showPopover = _useFloating.showPopover,
3264
+ hidePopover = _useFloating.hidePopover,
3265
+ updatePopover = _useFloating.updatePopover,
3266
+ cleanup = _useFloating.cleanup,
3267
+ resolveTriggerEvents = _useFloating.resolveTriggerEvents,
3268
+ resolvePopElements = _useFloating.resolvePopElements,
3269
+ isElementFullScreen = _useFloating.isElementFullScreen,
3270
+ updateFullscreenTarget = _useFloating.updateFullscreenTarget,
3271
+ createPopInstance = _useFloating.createPopInstance,
3272
+ getFullscreenRoot = _useFloating.getFullscreenRoot,
3273
+ stopHide = _useFloating.stopHide;
3274
+ var resetPopover = function resetPopover() {
3275
+ cleanup === null || cleanup === void 0 ? void 0 : cleanup();
3276
+ createPopInstance();
3277
+ };
3278
+ var showFn = function showFn() {
3279
+ showPopover();
3280
+ };
3281
+ var hideFn = function hideFn() {
3282
+ hidePopover();
3283
+ };
3284
+ var initPopInstance = function initPopInstance() {
3285
+ createPopInstance();
3286
+ if (props.always) {
3287
+ showPopover();
3288
+ } else {
3289
+ addEventToPopTargetEl();
3290
+ }
3291
+ };
3292
+ var addEventToPopTargetEl = function addEventToPopTargetEl() {
3293
+ var _resolvePopElements = resolvePopElements(),
3294
+ elReference = _resolvePopElements.elReference,
3295
+ elContent = _resolvePopElements.elContent;
3296
+ storeEvents = resolveTriggerEvents();
3297
+ if (Array.isArray(storeEvents)) {
3298
+ addEventToTargetEl(elReference, storeEvents);
3299
+ } else {
3300
+ var _storeEvents = storeEvents,
3301
+ content = _storeEvents.content,
3302
+ reference = _storeEvents.reference;
3303
+ addEventToTargetEl(elReference, reference);
3304
+ addEventToTargetEl(elContent, content);
3305
+ }
3306
+ };
3307
+ var addEventToTargetEl = function addEventToTargetEl(target, evets) {
3308
+ evets.forEach(function (_ref2) {
3309
+ var _ref3 = _slicedToArray(_ref2, 2),
3310
+ event = _ref3[0],
3311
+ listener = _ref3[1];
3312
+ if (event && typeof listener === 'function') {
3313
+ target.addEventListener(event, listener);
3314
+ }
3315
+ });
3316
+ };
3317
+ var removeEventListener = function removeEventListener() {
3318
+ var _storeEvents2;
3319
+ if ((_storeEvents2 = storeEvents) !== null && _storeEvents2 !== void 0 && _storeEvents2.length) {
3320
+ var _resolvePopElements2 = resolvePopElements(),
3321
+ elReference = _resolvePopElements2.elReference;
3322
+ if (elReference) {
3323
+ storeEvents.forEach(function (_ref4) {
3324
+ var _ref5 = _slicedToArray(_ref4, 2),
3325
+ event = _ref5[0],
3326
+ listener = _ref5[1];
3327
+ if (event && typeof listener === 'function') {
3328
+ elReference.removeEventListener(event, listener);
3329
+ }
3330
+ });
3331
+ }
3332
+ storeEvents = null;
3333
+ }
3334
+ };
3335
+ var updateBoundary = function updateBoundary() {
3336
+ var _resolvePopElements3 = resolvePopElements(),
3337
+ elReference = _resolvePopElements3.elReference,
3338
+ root = _resolvePopElements3.root;
3339
+ if (isFullscreen.value) {
3340
+ var _ref6 = elReference || root || {},
3341
+ parentNode = _ref6.parentNode;
3342
+ boundary.value = (fullScreenTarget === null || fullScreenTarget === void 0 ? void 0 : fullScreenTarget.value) || parentNode;
3343
+ return;
3344
+ }
3345
+ boundary.value = getPrefixId(root || elReference);
3346
+ };
3347
+ var _usePopperId = use_popper_id(props, '#'),
3348
+ getPrefixId = _usePopperId.getPrefixId;
3349
+ var setFullscreenTag = function setFullscreenTag() {
3350
+ var _fullScreenTarget$val;
3351
+ fullScreenTarget === null || fullScreenTarget === void 0 || (_fullScreenTarget$val = fullScreenTarget.value) === null || _fullScreenTarget$val === void 0 ? void 0 : _fullScreenTarget$val.setAttribute('data-fllsrn-id', fullscreenReferId);
3352
+ };
3353
+ var clearFullscreenTag = function clearFullscreenTag() {
3354
+ var _fullScreenTarget$val2, _fullScreenTarget$val3;
3355
+ var query = "[data-fllsrn-id=".concat(fullscreenReferId, "]");
3356
+ ((_fullScreenTarget$val2 = fullScreenTarget === null || fullScreenTarget === void 0 || (_fullScreenTarget$val3 = fullScreenTarget.value) === null || _fullScreenTarget$val3 === void 0 ? void 0 : _fullScreenTarget$val3.querySelectorAll(query)) !== null && _fullScreenTarget$val2 !== void 0 ? _fullScreenTarget$val2 : []).forEach(function (element) {
3357
+ element === null || element === void 0 ? void 0 : element.removeAttribute('data-fllsrn-id');
3358
+ });
3359
+ };
3360
+ var boundary = (0,external_vue_namespaceObject.ref)();
3361
+ var beforeInstanceUnmount = function beforeInstanceUnmount() {
3362
+ removeEventListener();
3363
+ };
3364
+ var updateFullscreen = function updateFullscreen(target) {
3365
+ fullScreenTarget.value = target;
3366
+ updateFullscreenTarget(target);
3367
+ isFullscreen.value = isElementFullScreen();
3368
+ setFullscreenTag();
3369
+ };
3370
+ var handleFullscreenChange = function handleFullscreenChange(e) {
3371
+ if (!document.fullscreenElement) {
3372
+ clearFullscreenTag();
3373
+ }
3374
+ updateFullscreen(e.target);
3375
+ updateBoundary();
3376
+ updatePopover(null, props);
3377
+ };
3378
+ var onMountedFn = function onMountedFn() {
3379
+ if (props.disabled) {
3380
+ return;
3381
+ }
3382
+ initPopInstance();
3383
+ if (isElementFullScreen()) {
3384
+ var query = "[data-fllsrn-id=".concat(fullscreenReferId, "]");
3385
+ var target = getFullscreenRoot(query);
3386
+ updateFullscreen(target);
3387
+ }
3388
+ updateBoundary();
3389
+ document.body.addEventListener('fullscreenchange', handleFullscreenChange);
3390
+ };
3391
+ var onUnmountedFn = function onUnmountedFn() {
3392
+ beforeInstanceUnmount();
3393
+ document.body.removeEventListener('fullscreenchange', handleFullscreenChange);
3394
+ };
3395
+ var handleClickOutside = function handleClickOutside(_e) {
3396
+ ctx.emit(EMIT_EVENTS.CLICK_OUTSIDE, {
3397
+ isShow: localIsShow.value,
3398
+ event: _e
3399
+ });
3400
+ var needExec = props.disableOutsideClick || props.always || props.disabled || props.trigger === 'manual';
3401
+ if (!props.forceClickoutside && needExec) {
3402
+ return;
3403
+ }
3404
+ if (localIsShow.value) {
3405
+ hideFn();
3406
+ }
3407
+ };
3408
+ return {
3409
+ onMountedFn: onMountedFn,
3410
+ onUnmountedFn: onUnmountedFn,
3411
+ handleClickOutside: handleClickOutside,
3412
+ beforeInstanceUnmount: beforeInstanceUnmount,
3413
+ updateBoundary: updateBoundary,
3414
+ initPopInstance: initPopInstance,
3415
+ updatePopover: updatePopover,
3416
+ resetPopover: resetPopover,
3417
+ showPopover: showPopover,
3418
+ hidePopover: hidePopover,
3419
+ showFn: showFn,
3420
+ hideFn: hideFn,
3421
+ stopHide: stopHide,
3422
+ isFullscreen: isFullscreen,
3423
+ boundary: boundary,
3424
+ localIsShow: localIsShow
3425
+ };
3426
+ });
3427
+ ;// CONCATENATED MODULE: ../../packages/popover/src/popover.tsx
3428
+
3429
+ /*
3430
+ * Tencent is pleased to support the open source community by making
3431
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3432
+ *
3433
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3434
+ *
3435
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3436
+ *
3437
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3438
+ *
3439
+ * ---------------------------------------------------
3440
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3441
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3442
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3443
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3444
+ *
3445
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3446
+ * the Software.
3447
+ *
3448
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3449
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3450
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3451
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3452
+ * IN THE SOFTWARE.
3453
+ */
3454
+
3455
+
3456
+
3457
+
3458
+
3459
+
3460
+
3461
+
3462
+
3463
+
3464
+
3465
+ function _isSlot(s) {
3466
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_namespaceObject.isVNode)(s);
3467
+ }
3468
+ /* harmony default export */ const popover = ((0,external_vue_namespaceObject.defineComponent)({
3469
+ name: 'Popover',
3470
+ components: {
3471
+ // eslint-disable-next-line vue/no-reserved-component-names
3472
+ Content: content,
3473
+ Arrow: src_arrow,
3474
+ Root: root
3475
+ },
3476
+ directives: {
3477
+ clickoutside: clickoutside
3478
+ },
3479
+ props: PopoverProps,
3480
+ emits: EMIT_EVENT_TYPES,
3481
+ setup: function setup(props, ctx) {
3482
+ var _toRefs = (0,external_vue_namespaceObject.toRefs)(props),
3483
+ reference = _toRefs.reference;
3484
+ var refDefaultReference = (0,external_vue_namespaceObject.ref)();
3485
+ var refContent = (0,external_vue_namespaceObject.ref)();
3486
+ var refArrow = (0,external_vue_namespaceObject.ref)();
3487
+ var refRoot = (0,external_vue_namespaceObject.ref)();
3488
+ var refReference = (0,external_vue_namespaceObject.computed)(function () {
3489
+ return reference.value || refDefaultReference.value;
3490
+ });
3491
+ var _usePopoverInit = use_popover_init(props, ctx, {
3492
+ refReference: refReference,
3493
+ refContent: refContent,
3494
+ refArrow: refArrow,
3495
+ refRoot: refRoot
3496
+ }),
3497
+ onMountedFn = _usePopoverInit.onMountedFn,
3498
+ onUnmountedFn = _usePopoverInit.onUnmountedFn,
3499
+ handleClickOutside = _usePopoverInit.handleClickOutside,
3500
+ beforeInstanceUnmount = _usePopoverInit.beforeInstanceUnmount,
3501
+ updateBoundary = _usePopoverInit.updateBoundary,
3502
+ initPopInstance = _usePopoverInit.initPopInstance,
3503
+ showFn = _usePopoverInit.showFn,
3504
+ hideFn = _usePopoverInit.hideFn,
3505
+ showPopover = _usePopoverInit.showPopover,
3506
+ hidePopover = _usePopoverInit.hidePopover,
3507
+ updatePopover = _usePopoverInit.updatePopover,
3508
+ resetPopover = _usePopoverInit.resetPopover,
3509
+ stopHide = _usePopoverInit.stopHide,
3510
+ localIsShow = _usePopoverInit.localIsShow,
3511
+ boundary = _usePopoverInit.boundary;
3512
+ if (!props.always && !props.disabled) {
3513
+ (0,external_vue_namespaceObject.watch)(function () {
3514
+ return props.isShow;
3515
+ }, function () {
3516
+ props.isShow ? showPopover() : hidePopover();
3517
+ }, {
3518
+ immediate: true
3519
+ });
3520
+ }
3521
+ (0,external_vue_namespaceObject.watch)(function () {
3522
+ return [props.disabled];
3523
+ }, function (val) {
3524
+ if (val[0]) {
3525
+ beforeInstanceUnmount();
3526
+ } else {
3527
+ initPopInstance();
3528
+ }
3529
+ });
3530
+ updateBoundary();
3531
+ (0,external_vue_namespaceObject.onMounted)(onMountedFn);
3532
+ (0,external_vue_namespaceObject.onBeforeUnmount)(onUnmountedFn);
3533
+ var transBoundary = (0,external_vue_namespaceObject.computed)(function () {
3534
+ return !props.disableTeleport;
3535
+ });
3536
+ var show = function show() {
3537
+ showFn();
3538
+ };
3539
+ var hide = function hide() {
3540
+ hideFn();
3541
+ };
3542
+ var contentIsShow = (0,external_vue_namespaceObject.computed)(function () {
3543
+ if (props.renderType === shared_namespaceObject.RenderType.AUTO) {
3544
+ return true;
3545
+ }
3546
+ return localIsShow.value;
3547
+ });
3548
+ var renderContent = function renderContent() {
3549
+ if (props.allowHtml) {
3550
+ var _contentAsHTMLElement = contentAsHTMLElement(props.content),
3551
+ vNode = _contentAsHTMLElement.vNode;
3552
+ return vNode;
3553
+ }
3554
+ return props.content;
3555
+ };
3556
+ return {
3557
+ boundary: boundary,
3558
+ arrow: props.arrow,
3559
+ refDefaultReference: refDefaultReference,
3560
+ refContent: refContent,
3561
+ refArrow: refArrow,
3562
+ content: props.content,
3563
+ theme: props.theme,
3564
+ transBoundary: transBoundary,
3565
+ handleClickOutside: handleClickOutside,
3566
+ updatePopover: updatePopover,
3567
+ resetPopover: resetPopover,
3568
+ hide: hide,
3569
+ show: show,
3570
+ stopHide: stopHide,
3571
+ contentIsShow: contentIsShow,
3572
+ renderContent: renderContent,
3573
+ localIsShow: localIsShow
3574
+ };
3575
+ },
3576
+ render: function render() {
3577
+ var _slot;
3578
+ var _this$$slots$default,
3579
+ _this$$slots$default2,
3580
+ _this$$slots,
3581
+ _this = this,
3582
+ _this$$slots$content,
3583
+ _this$$slots$content2,
3584
+ _this$$slots3;
3585
+ var renderReferSlot = function renderReferSlot(slot) {
3586
+ var _slot$;
3587
+ if (external_vue_namespaceObject.Text === (slot === null || slot === void 0 || (_slot$ = slot[0]) === null || _slot$ === void 0 ? void 0 : _slot$.type)) {
3588
+ return (0,external_vue_namespaceObject.createVNode)("span", null, [slot]);
3589
+ }
3590
+ return slot;
3591
+ };
3592
+ return (0,external_vue_namespaceObject.createVNode)(root, {
3593
+ "ref": "refRoot"
3594
+ }, {
3595
+ "default": function _default() {
3596
+ return [(0,external_vue_namespaceObject.createVNode)(reference, {
3597
+ "ref": "refDefaultReference"
3598
+ }, _isSlot(_slot = renderReferSlot((_this$$slots$default = (_this$$slots$default2 = (_this$$slots = _this.$slots)["default"]) === null || _this$$slots$default2 === void 0 ? void 0 : _this$$slots$default2.call(_this$$slots)) !== null && _this$$slots$default !== void 0 ? _this$$slots$default : (0,external_vue_namespaceObject.createVNode)("span", null, null))) ? _slot : {
3599
+ "default": function _default() {
3600
+ return [_slot];
3601
+ }
3602
+ }), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Teleport, {
3603
+ "to": _this.boundary,
3604
+ "disabled": !_this.transBoundary
3605
+ }, {
3606
+ "default": function _default() {
3607
+ return [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)(content, {
3608
+ "ref": "refContent",
3609
+ "visible": _this.localIsShow,
3610
+ "data-theme": _this.theme,
3611
+ "extCls": _this.extCls,
3612
+ "width": _this.width,
3613
+ "height": _this.height,
3614
+ "maxWidth": _this.maxWidth,
3615
+ "maxHeight": _this.maxHeight,
3616
+ "eventDelay": _this.componentEventDelay
3617
+ }, {
3618
+ "default": function _default() {
3619
+ return [_this.contentIsShow ? (_this$$slots$content = (_this$$slots$content2 = (_this$$slots3 = _this.$slots).content) === null || _this$$slots$content2 === void 0 ? void 0 : _this$$slots$content2.call(_this$$slots3)) !== null && _this$$slots$content !== void 0 ? _this$$slots$content : _this.renderContent() : ''];
3620
+ },
3621
+ arrow: function arrow() {
3622
+ var _this$$slots$arrow, _this$$slots2;
3623
+ return _this.arrow ? (0,external_vue_namespaceObject.createVNode)(src_arrow, {
3624
+ "ref": "refArrow"
3625
+ }, {
3626
+ "default": function _default() {
3627
+ return [(_this$$slots$arrow = (_this$$slots2 = _this.$slots).arrow) === null || _this$$slots$arrow === void 0 ? void 0 : _this$$slots$arrow.call(_this$$slots2)];
3628
+ }
3629
+ }) : '';
3630
+ }
3631
+ }), [[(0,external_vue_namespaceObject.resolveDirective)("clickoutside"), _this.handleClickOutside]])];
3632
+ }
3633
+ })];
3634
+ }
3635
+ });
3636
+ }
3637
+ }));
3638
+ ;// CONCATENATED MODULE: ../../packages/popover/src/plugin-popover.tsx
3639
+
3640
+
3641
+ function plugin_popover_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3642
+ function plugin_popover_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? plugin_popover_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : plugin_popover_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3643
+ /*
3644
+ * Tencent is pleased to support the open source community by making
3645
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3646
+ *
3647
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3648
+ *
3649
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3650
+ *
3651
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3652
+ *
3653
+ * ---------------------------------------------------
3654
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3655
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3656
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3657
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3658
+ *
3659
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3660
+ * the Software.
3661
+ *
3662
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3663
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3664
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3665
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3666
+ * IN THE SOFTWARE.
3667
+ */
3668
+
3669
+
3670
+
3671
+
3672
+ function createPopoverComponent(options) {
3673
+ var $PopoverInstance = null;
3674
+ var $PopoverInstanceVm = null;
3675
+ var $PopoverInstanceEl = null;
3676
+ var resolvedOptions = plugin_popover_objectSpread(plugin_popover_objectSpread({
3677
+ boundary: 'body',
3678
+ placement: 'top',
3679
+ autoVisibility: true,
3680
+ isShow: false,
3681
+ trigger: 'manual',
3682
+ onHide: function onHide() {},
3683
+ onShow: function onShow() {}
3684
+ }, options), {}, {
3685
+ allowHtml: true
3686
+ });
3687
+ var popoverComponent = {
3688
+ name: '$popover',
3689
+ setup: function setup(_, _ref) {
3690
+ var expose = _ref.expose;
3691
+ var formatOptions = function formatOptions() {
3692
+ return Object.keys(PopoverProps).reduce(function (result, key) {
3693
+ if (Object.prototype.hasOwnProperty.call(resolvedOptions, key)) {
3694
+ Object.assign(result, _defineProperty({}, key, resolvedOptions[key]));
3695
+ }
3696
+ return result;
3697
+ }, {
3698
+ target: resolvedOptions.target
3699
+ });
3700
+ };
3701
+ var refProps = (0,external_vue_namespaceObject.reactive)(formatOptions());
3702
+ var refReference = (0,external_vue_namespaceObject.ref)();
3703
+ var show = function show() {
3704
+ var _refReference$value, _refReference$value$s;
3705
+ (_refReference$value = refReference.value) === null || _refReference$value === void 0 || (_refReference$value$s = _refReference$value.show) === null || _refReference$value$s === void 0 ? void 0 : _refReference$value$s.call(_refReference$value);
3706
+ };
3707
+ var hide = function hide() {
3708
+ var _refReference$value2, _refReference$value2$;
3709
+ (_refReference$value2 = refReference.value) === null || _refReference$value2 === void 0 || (_refReference$value2$ = _refReference$value2.hide) === null || _refReference$value2$ === void 0 ? void 0 : _refReference$value2$.call(_refReference$value2);
3710
+ };
3711
+ var stopHide = function stopHide() {
3712
+ var _refReference$value3, _refReference$value3$;
3713
+ (_refReference$value3 = refReference.value) === null || _refReference$value3 === void 0 || (_refReference$value3$ = _refReference$value3.stopHide) === null || _refReference$value3$ === void 0 ? void 0 : _refReference$value3$.call(_refReference$value3);
3714
+ };
3715
+ var updateTarget = function updateTarget(target) {
3716
+ var _refReference$value4, _refReference$value4$;
3717
+ refProps.target = target;
3718
+ (_refReference$value4 = refReference.value) === null || _refReference$value4 === void 0 || (_refReference$value4$ = _refReference$value4.resetPopover) === null || _refReference$value4$ === void 0 ? void 0 : _refReference$value4$.call(_refReference$value4);
3719
+ };
3720
+ var handleContentMouseenter = function handleContentMouseenter() {
3721
+ var _resolvedOptions$onCo;
3722
+ (_resolvedOptions$onCo = resolvedOptions.onContentMouseenter) === null || _resolvedOptions$onCo === void 0 ? void 0 : _resolvedOptions$onCo.call(resolvedOptions);
3723
+ };
3724
+ var handleContentMouseleave = function handleContentMouseleave() {
3725
+ var _resolvedOptions$onCo2;
3726
+ (_resolvedOptions$onCo2 = resolvedOptions.onContentMouseleave) === null || _resolvedOptions$onCo2 === void 0 ? void 0 : _resolvedOptions$onCo2.call(resolvedOptions);
3727
+ };
3728
+ var handlePopoverHidden = function handlePopoverHidden() {
3729
+ var _resolvedOptions$onHi;
3730
+ (_resolvedOptions$onHi = resolvedOptions.onHide) === null || _resolvedOptions$onHi === void 0 ? void 0 : _resolvedOptions$onHi.call(resolvedOptions);
3731
+ };
3732
+ var handlePopoverShow = function handlePopoverShow() {
3733
+ var _resolvedOptions$onSh;
3734
+ (_resolvedOptions$onSh = resolvedOptions.onShow) === null || _resolvedOptions$onSh === void 0 ? void 0 : _resolvedOptions$onSh.call(resolvedOptions);
3735
+ };
3736
+ expose({
3737
+ show: show,
3738
+ hide: hide,
3739
+ updateTarget: updateTarget,
3740
+ stopHide: stopHide
3741
+ });
3742
+ return function () {
3743
+ return (0,external_vue_namespaceObject.createVNode)(popover, (0,external_vue_namespaceObject.mergeProps)(refProps, {
3744
+ "ref": refReference,
3745
+ "onContentMouseenter": handleContentMouseenter,
3746
+ "onContentMouseleave": handleContentMouseleave,
3747
+ "onAfterHidden": handlePopoverHidden,
3748
+ "onAfterShow": handlePopoverShow
3749
+ }), null);
3750
+ };
3751
+ }
3752
+ };
3753
+ function getBoundaryDom(boundary) {
3754
+ if (/^body$/i.test(boundary)) {
3755
+ return document.body;
3756
+ }
3757
+ if (/^parent$/i.test(boundary)) {
3758
+ if (utils_isElement(resolvedOptions.target)) {
3759
+ return resolvedOptions.target.parentNode;
3760
+ }
3761
+ return resolvedOptions.target.target.parentNode;
3762
+ }
3763
+ if (typeof boundary === 'string' && isAvailableId(boundary)) {
3764
+ return document.querySelector(boundary);
3765
+ }
3766
+ return document.body;
3767
+ }
3768
+ if ($PopoverInstance === null) {
3769
+ $PopoverInstanceEl = document.createElement('div');
3770
+ getBoundaryDom(resolvedOptions.boundary).append($PopoverInstanceEl);
3771
+ $PopoverInstance = (0,external_vue_namespaceObject.createApp)(popoverComponent);
3772
+ $PopoverInstanceVm = $PopoverInstance.mount($PopoverInstanceEl);
3773
+ }
3774
+ function close() {
3775
+ if ($PopoverInstance) {
3776
+ $PopoverInstance.unmount();
3777
+ $PopoverInstanceVm = null;
3778
+ $PopoverInstance = null;
3779
+ $PopoverInstanceEl.remove();
3780
+ }
3781
+ }
3782
+ function show() {
3783
+ var _$PopoverInstanceVm;
3784
+ (_$PopoverInstanceVm = $PopoverInstanceVm) === null || _$PopoverInstanceVm === void 0 ? void 0 : _$PopoverInstanceVm.show();
3785
+ }
3786
+ function update(e) {
3787
+ var _$PopoverInstanceVm2;
3788
+ (_$PopoverInstanceVm2 = $PopoverInstanceVm) === null || _$PopoverInstanceVm2 === void 0 ? void 0 : _$PopoverInstanceVm2.updateTarget(e);
3789
+ }
3790
+ function hide() {
3791
+ var _$PopoverInstanceVm3;
3792
+ (_$PopoverInstanceVm3 = $PopoverInstanceVm) === null || _$PopoverInstanceVm3 === void 0 ? void 0 : _$PopoverInstanceVm3.hide();
3793
+ }
3794
+ return {
3795
+ close: close,
3796
+ show: show,
3797
+ hide: hide,
3798
+ update: update,
3799
+ get vm() {
3800
+ return $PopoverInstanceVm;
3801
+ },
3802
+ get $el() {
3803
+ return $PopoverInstanceVm.$el;
3804
+ }
3805
+ };
3806
+ }
3807
+ ;// CONCATENATED MODULE: ../../packages/popover/src/index.ts
3808
+ /**
3809
+ * Tencent is pleased to support the open source community by making
3810
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3811
+ *
3812
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3813
+ *
3814
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3815
+ *
3816
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3817
+ *
3818
+ * ---------------------------------------------------
3819
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3820
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3821
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3822
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3823
+ *
3824
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3825
+ * the Software.
3826
+ *
3827
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3828
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3829
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3830
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3831
+ * IN THE SOFTWARE.
3832
+ */
3833
+
3834
+
3835
+ var BkPopover = (0,shared_namespaceObject.withInstall)(popover);
3836
+ /* harmony default export */ const src = (BkPopover);
3837
+
3838
+
3839
+ var __webpack_exports__$bkPopover = __webpack_exports__.kB;
3840
+ var __webpack_exports__PopoverProps = __webpack_exports__.uE;
3841
+ var __webpack_exports__default = __webpack_exports__.ZP;
3842
+ export { __webpack_exports__$bkPopover as $bkPopover, __webpack_exports__PopoverProps as PopoverProps, __webpack_exports__default as default };