bkui-vue 0.0.2-table-refactor.9 → 0.0.3-beta.1

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