cy-element-ui 1.0.3 → 1.0.5

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 (416) hide show
  1. package/README.md +163 -59
  2. package/lib/alert.js +211 -203
  3. package/lib/aside.js +29 -29
  4. package/lib/autocomplete.js +4615 -483
  5. package/lib/avatar.js +152 -126
  6. package/lib/backtop.js +117 -125
  7. package/lib/badge.js +128 -134
  8. package/lib/breadcrumb-item.js +146 -122
  9. package/lib/breadcrumb.js +97 -96
  10. package/lib/button-group.js +68 -65
  11. package/lib/button.js +67 -87
  12. package/lib/calendar.js +2475 -603
  13. package/lib/card.js +101 -100
  14. package/lib/carousel-item.js +854 -210
  15. package/lib/carousel.js +575 -408
  16. package/lib/cascader-panel.js +3546 -1153
  17. package/lib/cascader.js +7376 -970
  18. package/lib/checkbox-button.js +337 -290
  19. package/lib/checkbox-group.js +176 -105
  20. package/lib/checkbox.js +240 -220
  21. package/lib/col.js +113 -68
  22. package/lib/collapse-item.js +1228 -225
  23. package/lib/collapse.js +163 -123
  24. package/lib/color-picker.js +5223 -1251
  25. package/lib/container.js +98 -88
  26. package/lib/date-picker.js +8396 -3945
  27. package/lib/descriptions-item.js +53 -32
  28. package/lib/descriptions.js +697 -334
  29. package/lib/dialog.js +1725 -247
  30. package/lib/directives/mousewheel.js +14 -20
  31. package/lib/directives/repeat-click.js +27 -30
  32. package/lib/divider.js +38 -45
  33. package/lib/drawer.js +1032 -238
  34. package/lib/dropdown-item.js +159 -111
  35. package/lib/dropdown-menu.js +2445 -117
  36. package/lib/dropdown.js +1675 -366
  37. package/lib/element-ui.common.js +49110 -39985
  38. package/lib/empty.js +1084 -203
  39. package/lib/fileUpload.js +3900 -0
  40. package/lib/footer.js +29 -29
  41. package/lib/form-item.js +1236 -467
  42. package/lib/form.js +326 -258
  43. package/lib/header.js +80 -80
  44. package/lib/icon.js +71 -68
  45. package/lib/image.js +2389 -743
  46. package/lib/index.js +1 -1
  47. package/lib/infinite-scroll.js +814 -150
  48. package/lib/input-number.js +2181 -444
  49. package/lib/input.js +1197 -517
  50. package/lib/link.js +117 -135
  51. package/lib/loading.js +1130 -363
  52. package/lib/locale/format.js +38 -49
  53. package/lib/locale/index.js +38 -52
  54. package/lib/locale/lang/af-ZA.js +130 -123
  55. package/lib/locale/lang/ar.js +123 -122
  56. package/lib/locale/lang/az.js +122 -121
  57. package/lib/locale/lang/bg.js +133 -123
  58. package/lib/locale/lang/bn.js +121 -121
  59. package/lib/locale/lang/ca.js +123 -122
  60. package/lib/locale/lang/cs-CZ.js +127 -125
  61. package/lib/locale/lang/da.js +124 -122
  62. package/lib/locale/lang/de.js +126 -124
  63. package/lib/locale/lang/ee.js +125 -123
  64. package/lib/locale/lang/el.js +125 -123
  65. package/lib/locale/lang/en.js +127 -123
  66. package/lib/locale/lang/eo.js +125 -123
  67. package/lib/locale/lang/es.js +123 -122
  68. package/lib/locale/lang/eu.js +128 -123
  69. package/lib/locale/lang/fa.js +125 -123
  70. package/lib/locale/lang/fi.js +125 -123
  71. package/lib/locale/lang/fr.js +125 -122
  72. package/lib/locale/lang/he.js +130 -123
  73. package/lib/locale/lang/hr.js +128 -123
  74. package/lib/locale/lang/hu.js +124 -122
  75. package/lib/locale/lang/hy-AM.js +125 -123
  76. package/lib/locale/lang/id.js +124 -123
  77. package/lib/locale/lang/is.js +124 -123
  78. package/lib/locale/lang/it.js +123 -122
  79. package/lib/locale/lang/ja.js +125 -123
  80. package/lib/locale/lang/kg.js +125 -123
  81. package/lib/locale/lang/km.js +124 -123
  82. package/lib/locale/lang/ko.js +125 -123
  83. package/lib/locale/lang/ku.js +125 -123
  84. package/lib/locale/lang/kz.js +125 -123
  85. package/lib/locale/lang/lo-LA.js +121 -121
  86. package/lib/locale/lang/lt.js +125 -123
  87. package/lib/locale/lang/lv.js +125 -123
  88. package/lib/locale/lang/mn.js +125 -123
  89. package/lib/locale/lang/ms.js +123 -122
  90. package/lib/locale/lang/nb-NO.js +123 -122
  91. package/lib/locale/lang/nl.js +125 -123
  92. package/lib/locale/lang/pl.js +125 -123
  93. package/lib/locale/lang/pt-br.js +124 -123
  94. package/lib/locale/lang/pt.js +133 -123
  95. package/lib/locale/lang/ro.js +125 -123
  96. package/lib/locale/lang/ru-RU.js +124 -123
  97. package/lib/locale/lang/si.js +127 -123
  98. package/lib/locale/lang/sk.js +126 -125
  99. package/lib/locale/lang/sl.js +125 -123
  100. package/lib/locale/lang/sr-Latn.js +124 -123
  101. package/lib/locale/lang/sr.js +128 -123
  102. package/lib/locale/lang/sv-SE.js +128 -123
  103. package/lib/locale/lang/sw.js +127 -123
  104. package/lib/locale/lang/ta.js +130 -122
  105. package/lib/locale/lang/th.js +127 -123
  106. package/lib/locale/lang/tk.js +129 -123
  107. package/lib/locale/lang/tr-TR.js +125 -123
  108. package/lib/locale/lang/ua.js +124 -123
  109. package/lib/locale/lang/ug-CN.js +124 -123
  110. package/lib/locale/lang/uz-UZ.js +124 -123
  111. package/lib/locale/lang/vi.js +124 -123
  112. package/lib/locale/lang/zh-CN.js +124 -123
  113. package/lib/locale/lang/zh-TW.js +128 -123
  114. package/lib/main.js +23 -21
  115. package/lib/menu-item-group.js +105 -111
  116. package/lib/menu-item.js +3558 -253
  117. package/lib/menu.js +1680 -528
  118. package/lib/message-box.js +3427 -684
  119. package/lib/message.js +1677 -229
  120. package/lib/mixins/emitter.js +28 -30
  121. package/lib/mixins/focus.js +10 -11
  122. package/lib/mixins/locale.js +12 -14
  123. package/lib/mixins/migrating.js +38 -45
  124. package/lib/notification.js +1707 -269
  125. package/lib/option-group.js +190 -139
  126. package/lib/option.js +949 -196
  127. package/lib/page-header.js +964 -42
  128. package/lib/pagination.js +6947 -641
  129. package/lib/popconfirm.js +3951 -223
  130. package/lib/popover.js +3247 -369
  131. package/lib/progress.js +254 -244
  132. package/lib/radio-button.js +259 -226
  133. package/lib/radio-group.js +249 -186
  134. package/lib/radio.js +263 -253
  135. package/lib/rate.js +1399 -420
  136. package/lib/result.js +183 -227
  137. package/lib/row.js +58 -41
  138. package/lib/scrollbar.js +1331 -278
  139. package/lib/select.js +5816 -1428
  140. package/lib/skeleton-item.js +133 -145
  141. package/lib/skeleton.js +82 -91
  142. package/lib/slider.js +5157 -702
  143. package/lib/spinner.js +113 -101
  144. package/lib/statistic.js +10205 -254
  145. package/lib/step.js +274 -311
  146. package/lib/steps.js +854 -117
  147. package/lib/subTitle.js +292 -0
  148. package/lib/submenu.js +2867 -429
  149. package/lib/switch.js +1051 -291
  150. package/lib/tab-pane.js +125 -135
  151. package/lib/tabDialog.js +2658 -0
  152. package/lib/table-column.js +1975 -751
  153. package/lib/table.js +8019 -3979
  154. package/lib/tabs.js +1455 -605
  155. package/lib/tag.js +73 -68
  156. package/lib/theme-chalk/src/index.scss +3 -0
  157. package/lib/time-picker.js +6821 -1944
  158. package/lib/time-select.js +6297 -1186
  159. package/lib/timeline-item.js +43 -84
  160. package/lib/timeline.js +43 -39
  161. package/lib/tooltip.js +3185 -287
  162. package/lib/transfer.js +2943 -625
  163. package/lib/transitions/collapse-transition.js +69 -87
  164. package/lib/tree.js +3312 -1791
  165. package/lib/treeSelect.js +4436 -0
  166. package/lib/umd/locale/af-ZA.js +145 -138
  167. package/lib/umd/locale/ar.js +138 -137
  168. package/lib/umd/locale/az.js +139 -137
  169. package/lib/umd/locale/bg.js +148 -138
  170. package/lib/umd/locale/bn.js +138 -137
  171. package/lib/umd/locale/ca.js +138 -137
  172. package/lib/umd/locale/cs-CZ.js +142 -140
  173. package/lib/umd/locale/da.js +139 -137
  174. package/lib/umd/locale/de.js +141 -139
  175. package/lib/umd/locale/ee.js +140 -138
  176. package/lib/umd/locale/el.js +140 -138
  177. package/lib/umd/locale/en.js +142 -138
  178. package/lib/umd/locale/eo.js +140 -138
  179. package/lib/umd/locale/es.js +138 -137
  180. package/lib/umd/locale/eu.js +143 -138
  181. package/lib/umd/locale/fa.js +140 -138
  182. package/lib/umd/locale/fi.js +140 -138
  183. package/lib/umd/locale/fr.js +140 -137
  184. package/lib/umd/locale/he.js +145 -138
  185. package/lib/umd/locale/hr.js +143 -138
  186. package/lib/umd/locale/hu.js +139 -137
  187. package/lib/umd/locale/hy-AM.js +140 -138
  188. package/lib/umd/locale/id.js +139 -138
  189. package/lib/umd/locale/is.js +139 -138
  190. package/lib/umd/locale/it.js +138 -137
  191. package/lib/umd/locale/ja.js +140 -138
  192. package/lib/umd/locale/kg.js +140 -138
  193. package/lib/umd/locale/km.js +139 -138
  194. package/lib/umd/locale/ko.js +140 -138
  195. package/lib/umd/locale/ku.js +140 -138
  196. package/lib/umd/locale/kz.js +140 -138
  197. package/lib/umd/locale/lo-LA.js +138 -137
  198. package/lib/umd/locale/lt.js +140 -138
  199. package/lib/umd/locale/lv.js +140 -138
  200. package/lib/umd/locale/mn.js +140 -138
  201. package/lib/umd/locale/ms.js +138 -137
  202. package/lib/umd/locale/nb-NO.js +138 -137
  203. package/lib/umd/locale/nl.js +140 -138
  204. package/lib/umd/locale/pl.js +140 -138
  205. package/lib/umd/locale/pt-br.js +139 -138
  206. package/lib/umd/locale/pt.js +148 -138
  207. package/lib/umd/locale/ro.js +140 -138
  208. package/lib/umd/locale/ru-RU.js +139 -138
  209. package/lib/umd/locale/si.js +142 -138
  210. package/lib/umd/locale/sk.js +141 -140
  211. package/lib/umd/locale/sl.js +140 -138
  212. package/lib/umd/locale/sr-Latn.js +139 -138
  213. package/lib/umd/locale/sr.js +143 -138
  214. package/lib/umd/locale/sv-SE.js +143 -138
  215. package/lib/umd/locale/sw.js +142 -138
  216. package/lib/umd/locale/ta.js +145 -137
  217. package/lib/umd/locale/th.js +142 -138
  218. package/lib/umd/locale/tk.js +144 -138
  219. package/lib/umd/locale/tr-TR.js +140 -138
  220. package/lib/umd/locale/ua.js +139 -138
  221. package/lib/umd/locale/ug-CN.js +139 -138
  222. package/lib/umd/locale/uz-UZ.js +139 -138
  223. package/lib/umd/locale/vi.js +139 -138
  224. package/lib/umd/locale/zh-CN.js +139 -138
  225. package/lib/umd/locale/zh-TW.js +143 -138
  226. package/lib/upload.js +2377 -987
  227. package/lib/utils/after-leave.js +36 -33
  228. package/lib/utils/aria-dialog.js +55 -73
  229. package/lib/utils/aria-utils.js +67 -76
  230. package/lib/utils/clickoutside.js +52 -60
  231. package/lib/utils/date-util.js +198 -241
  232. package/lib/utils/date.js +6 -368
  233. package/lib/utils/date_source.js +349 -0
  234. package/lib/utils/dom.js +167 -183
  235. package/lib/utils/lodash.js +13 -9421
  236. package/lib/utils/lodash_source.js +9421 -0
  237. package/lib/utils/menu/aria-menubar.js +13 -18
  238. package/lib/utils/menu/aria-menuitem.js +43 -54
  239. package/lib/utils/menu/aria-submenu.js +50 -59
  240. package/lib/utils/merge.js +15 -17
  241. package/lib/utils/popper.js +1141 -1170
  242. package/lib/utils/popup/index.js +186 -230
  243. package/lib/utils/popup/popup-manager.js +159 -191
  244. package/lib/utils/resize-event.js +29 -44
  245. package/lib/utils/scroll-into-view.js +25 -33
  246. package/lib/utils/scrollbar-width.js +25 -36
  247. package/lib/utils/shared.js +3 -3
  248. package/lib/utils/types.js +19 -32
  249. package/lib/utils/util.js +187 -221
  250. package/lib/utils/vdom.js +5 -9
  251. package/lib/utils/vue-popper.js +166 -188
  252. package/package.json +20 -19
  253. package/packages/alert/src/main.vue +63 -63
  254. package/packages/aside/src/main.vue +9 -9
  255. package/packages/autocomplete/src/autocomplete-suggestions.vue +46 -46
  256. package/packages/autocomplete/src/autocomplete.vue +198 -198
  257. package/packages/avatar/src/main.vue +5 -5
  258. package/packages/backtop/src/main.vue +3 -3
  259. package/packages/badge/src/main.vue +1 -1
  260. package/packages/breadcrumb/src/breadcrumb-item.vue +26 -26
  261. package/packages/breadcrumb/src/breadcrumb.vue +22 -22
  262. package/packages/button/src/button-group.vue +3 -3
  263. package/packages/button/src/button.vue +44 -44
  264. package/packages/calendar/src/date-table.vue +3 -3
  265. package/packages/calendar/src/main.vue +7 -7
  266. package/packages/card/src/main.vue +9 -9
  267. package/packages/carousel/src/item.vue +98 -98
  268. package/packages/carousel/src/main.vue +2 -2
  269. package/packages/cascader/src/cascader.vue +4 -4
  270. package/packages/cascader-panel/src/cascader-menu.vue +4 -4
  271. package/packages/cascader-panel/src/cascader-node.vue +232 -232
  272. package/packages/cascader-panel/src/cascader-panel.vue +3 -3
  273. package/packages/cascader-panel/src/node.js +2 -3
  274. package/packages/cascader-panel/src/store.js +0 -1
  275. package/packages/checkbox/src/checkbox-button.vue +139 -139
  276. package/packages/checkbox/src/checkbox-group.vue +33 -33
  277. package/packages/checkbox/src/checkbox.vue +140 -140
  278. package/packages/col/src/col.js +5 -5
  279. package/packages/collapse/src/collapse-item.vue +55 -55
  280. package/packages/collapse/src/collapse.vue +54 -54
  281. package/packages/color-picker/src/color.js +4 -4
  282. package/packages/color-picker/src/components/alpha-slider.vue +100 -100
  283. package/packages/color-picker/src/components/hue-slider.vue +91 -91
  284. package/packages/color-picker/src/components/picker-dropdown.vue +64 -64
  285. package/packages/color-picker/src/components/predefine.vue +43 -43
  286. package/packages/color-picker/src/components/sv-panel.vue +70 -70
  287. package/packages/color-picker/src/main.vue +141 -141
  288. package/packages/container/src/main.vue +20 -20
  289. package/packages/date-picker/src/basic/date-table.vue +360 -360
  290. package/packages/date-picker/src/basic/month-table.vue +222 -223
  291. package/packages/date-picker/src/basic/time-spinner.vue +174 -174
  292. package/packages/date-picker/src/basic/year-table.vue +91 -91
  293. package/packages/date-picker/src/panel/date-range.vue +415 -415
  294. package/packages/date-picker/src/panel/date.vue +423 -423
  295. package/packages/date-picker/src/panel/month-range.vue +177 -177
  296. package/packages/date-picker/src/panel/time-range.vue +173 -173
  297. package/packages/date-picker/src/panel/time-select.vue +131 -131
  298. package/packages/date-picker/src/panel/time.vue +131 -131
  299. package/packages/date-picker/src/picker.vue +7 -7
  300. package/packages/descriptions/src/descriptions-row.js +3 -3
  301. package/packages/descriptions/src/index.js +1 -1
  302. package/packages/dialog/src/component.vue +155 -155
  303. package/packages/divider/src/main.vue +1 -1
  304. package/packages/drawer/src/main.vue +2 -2
  305. package/packages/dropdown/src/dropdown-item.vue +15 -15
  306. package/packages/dropdown/src/dropdown-menu.vue +47 -47
  307. package/packages/dropdown/src/dropdown.vue +260 -260
  308. package/packages/empty/src/index.vue +1 -1
  309. package/packages/fileUpload/index.js +8 -0
  310. package/packages/fileUpload/src/main.vue +430 -0
  311. package/packages/footer/src/main.vue +9 -9
  312. package/packages/form/src/form-item.vue +245 -245
  313. package/packages/form/src/form.vue +154 -154
  314. package/packages/header/src/main.vue +9 -9
  315. package/packages/icon/src/icon.vue +6 -6
  316. package/packages/image/src/image-viewer.vue +9 -9
  317. package/packages/image/src/main.vue +206 -206
  318. package/packages/infinite-scroll/src/main.js +1 -2
  319. package/packages/input/src/calcTextareaHeight.js +2 -2
  320. package/packages/input/src/input.vue +311 -311
  321. package/packages/input-number/src/input-number.vue +205 -205
  322. package/packages/loading/src/loading.vue +19 -19
  323. package/packages/main/src/main.vue +4 -4
  324. package/packages/menu/src/menu-item-group.vue +27 -27
  325. package/packages/menu/src/menu-item.vue +69 -69
  326. package/packages/menu/src/menu.vue +284 -284
  327. package/packages/menu/src/submenu.vue +308 -309
  328. package/packages/message/src/main.js +1 -1
  329. package/packages/message/src/main.vue +72 -72
  330. package/packages/message-box/src/main.vue +216 -216
  331. package/packages/notification/src/main.js +1 -1
  332. package/packages/notification/src/main.vue +93 -93
  333. package/packages/pagination/src/pager.vue +99 -99
  334. package/packages/popconfirm/src/main.vue +28 -28
  335. package/packages/popover/src/main.vue +6 -6
  336. package/packages/progress/src/progress.vue +174 -174
  337. package/packages/radio/src/radio-button.vue +64 -64
  338. package/packages/radio/src/radio-group.vue +88 -88
  339. package/packages/radio/src/radio.vue +74 -74
  340. package/packages/rate/src/main.vue +270 -270
  341. package/packages/row/src/row.js +3 -3
  342. package/packages/scrollbar/src/main.js +2 -2
  343. package/packages/scrollbar/src/util.js +1 -1
  344. package/packages/select/src/option-group.vue +46 -46
  345. package/packages/select/src/option.vue +122 -122
  346. package/packages/select/src/select-dropdown.vue +49 -49
  347. package/packages/select/src/select.vue +676 -676
  348. package/packages/skeleton/src/item.vue +12 -12
  349. package/packages/slider/src/button.vue +191 -191
  350. package/packages/slider/src/main.vue +314 -314
  351. package/packages/spinner/src/spinner.vue +16 -16
  352. package/packages/statistic/src/main.vue +5 -6
  353. package/packages/steps/src/step.vue +2 -2
  354. package/packages/steps/src/steps.vue +4 -4
  355. package/packages/subTitle/index.js +8 -0
  356. package/packages/subTitle/src/main.vue +33 -0
  357. package/packages/switch/src/component.vue +123 -123
  358. package/packages/tabDialog/index.js +23 -0
  359. package/packages/tabDialog/src/dialog/drag.js +63 -0
  360. package/packages/tabDialog/src/dialog/dragHeight.js +34 -0
  361. package/packages/tabDialog/src/dialog/dragWidth.js +30 -0
  362. package/packages/tabDialog/src/main.vue +277 -0
  363. package/packages/table/src/filter-panel.vue +128 -128
  364. package/packages/table/src/store/index.js +1 -1
  365. package/packages/table/src/table-body.js +2 -2
  366. package/packages/table/src/table-column.js +1 -1
  367. package/packages/table/src/table-header.js +1 -1
  368. package/packages/table/src/table-layout.js +1 -1
  369. package/packages/table/src/table.vue +416 -416
  370. package/packages/tabs/src/tab-bar.vue +43 -43
  371. package/packages/tabs/src/tab-nav.vue +250 -250
  372. package/packages/tabs/src/tab-pane.vue +34 -34
  373. package/packages/tabs/src/tabs.vue +165 -165
  374. package/packages/tag/src/tag.vue +52 -52
  375. package/packages/theme-chalk/src/index.scss +3 -0
  376. package/packages/theme-cy/lib/element.css +1 -0
  377. package/packages/theme-cy/lib/fileUpload.css +1 -0
  378. package/packages/theme-cy/lib/index.css +1 -1
  379. package/packages/theme-cy/lib/subTitle.css +1 -0
  380. package/packages/theme-cy/lib/tabDialog.css +1 -0
  381. package/packages/theme-cy/lib/treeselect.css +1 -1
  382. package/packages/theme-cy/src/element.scss +45 -0
  383. package/packages/theme-cy/src/fileUpload.scss +30 -0
  384. package/packages/theme-cy/src/index.scss +4 -0
  385. package/packages/theme-cy/src/subTitle.scss +26 -0
  386. package/packages/theme-cy/src/tabDialog.scss +43 -0
  387. package/packages/theme-cy/src/treeselect.scss +20 -14
  388. package/packages/timeline/src/item.vue +24 -24
  389. package/packages/timeline/src/main.vue +27 -27
  390. package/packages/tooltip/src/main.js +1 -1
  391. package/packages/transfer/src/main.vue +169 -169
  392. package/packages/transfer/src/transfer-panel.vue +164 -164
  393. package/packages/tree/src/tree-node.vue +169 -169
  394. package/packages/tree/src/tree.vue +408 -408
  395. package/packages/treeSelect/index.js +8 -0
  396. package/packages/{treeselect → treeSelect}/src/main.vue +19 -19
  397. package/packages/upload/src/ajax.js +3 -3
  398. package/packages/upload/src/upload-dragger.vue +50 -50
  399. package/packages/upload/src/upload-list.vue +33 -33
  400. package/packages/upload/src/upload.vue +1 -1
  401. package/src/index.js +13 -5
  402. package/src/locale/format.js +0 -1
  403. package/src/mixins/migrating.js +2 -2
  404. package/src/utils/date.js +2 -368
  405. package/src/utils/date_source.js +368 -0
  406. package/src/utils/lodash.js +9 -18075
  407. package/src/utils/lodash_source.js +18075 -0
  408. package/src/utils/types.js +1 -1
  409. package/types/element-ui.d.ts +16 -3
  410. package/types/fileUpload.d.ts +5 -0
  411. package/types/subTitle.d.ts +5 -0
  412. package/types/tabDialog.d.ts +5 -0
  413. package/types/treeSelect.d.ts +5 -0
  414. package/lib/treeselect.js +0 -682
  415. package/packages/treeselect/index.js +0 -8
  416. package/types/treeselect.d.ts +0 -5
package/lib/submenu.js CHANGED
@@ -82,12 +82,510 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 132);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 214);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
90
  /***/ 0:
91
+ /***/ (function(module, exports) {
92
+
93
+ module.exports = require("vue");
94
+
95
+ /***/ }),
96
+
97
+ /***/ 1:
98
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
+
100
+ "use strict";
101
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
102
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
103
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
104
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
105
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
106
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
107
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
108
+ /* unused harmony export setStyle */
109
+ /* unused harmony export isScroll */
110
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
111
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
112
+ /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
113
+ /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_0__);
114
+ /* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(53);
115
+ /* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_1__);
116
+ /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
117
+ /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_2__);
118
+ /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
119
+ /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3__);
120
+ /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
121
+ /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_4__);
122
+ /* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(16);
123
+ /* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_5__);
124
+ /* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(12);
125
+ /* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_6__);
126
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(0);
127
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_7__);
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+ /* istanbul ignore next */
136
+
137
+
138
+ var isServer = vue__WEBPACK_IMPORTED_MODULE_7___default.a.prototype.$isServer;
139
+ var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
140
+ var MOZ_HACK_REGEXP = /^moz([A-Z])/;
141
+ var ieVersion = isServer ? 0 : Number(document.documentMode);
142
+
143
+ /* istanbul ignore next */
144
+ var trim = function trim(string) {
145
+ return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
146
+ };
147
+ /* istanbul ignore next */
148
+ var camelCase = function camelCase(name) {
149
+ return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
150
+ return offset ? letter.toUpperCase() : letter;
151
+ }).replace(MOZ_HACK_REGEXP, 'Moz$1');
152
+ };
153
+
154
+ /* istanbul ignore next */
155
+ var on = function () {
156
+ if (!isServer && document.addEventListener) {
157
+ return function (element, event, handler) {
158
+ if (element && event && handler) {
159
+ element.addEventListener(event, handler, false);
160
+ }
161
+ };
162
+ } else {
163
+ return function (element, event, handler) {
164
+ if (element && event && handler) {
165
+ element.attachEvent('on' + event, handler);
166
+ }
167
+ };
168
+ }
169
+ }();
170
+
171
+ /* istanbul ignore next */
172
+ var off = function () {
173
+ if (!isServer && document.removeEventListener) {
174
+ return function (element, event, handler) {
175
+ if (element && event) {
176
+ element.removeEventListener(event, handler, false);
177
+ }
178
+ };
179
+ } else {
180
+ return function (element, event, handler) {
181
+ if (element && event) {
182
+ element.detachEvent('on' + event, handler);
183
+ }
184
+ };
185
+ }
186
+ }();
187
+
188
+ /* istanbul ignore next */
189
+ var once = function once(el, event, fn) {
190
+ var _listener = function listener() {
191
+ if (fn) {
192
+ fn.apply(this, arguments);
193
+ }
194
+ off(el, event, _listener);
195
+ };
196
+ on(el, event, _listener);
197
+ };
198
+
199
+ /* istanbul ignore next */
200
+ function hasClass(el, cls) {
201
+ if (!el || !cls) return false;
202
+ if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
203
+ if (el.classList) {
204
+ return el.classList.contains(cls);
205
+ } else {
206
+ return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
207
+ }
208
+ }
209
+ ;
210
+
211
+ /* istanbul ignore next */
212
+ function addClass(el, cls) {
213
+ if (!el) return;
214
+ var curClass = el.className;
215
+ var classes = (cls || '').split(' ');
216
+ for (var i = 0, j = classes.length; i < j; i++) {
217
+ var clsName = classes[i];
218
+ if (!clsName) continue;
219
+ if (el.classList) {
220
+ el.classList.add(clsName);
221
+ } else if (!hasClass(el, clsName)) {
222
+ curClass += ' ' + clsName;
223
+ }
224
+ }
225
+ if (!el.classList) {
226
+ el.setAttribute('class', curClass);
227
+ }
228
+ }
229
+ ;
230
+
231
+ /* istanbul ignore next */
232
+ function removeClass(el, cls) {
233
+ if (!el || !cls) return;
234
+ var classes = cls.split(' ');
235
+ var curClass = ' ' + el.className + ' ';
236
+ for (var i = 0, j = classes.length; i < j; i++) {
237
+ var clsName = classes[i];
238
+ if (!clsName) continue;
239
+ if (el.classList) {
240
+ el.classList.remove(clsName);
241
+ } else if (hasClass(el, clsName)) {
242
+ curClass = curClass.replace(' ' + clsName + ' ', ' ');
243
+ }
244
+ }
245
+ if (!el.classList) {
246
+ el.setAttribute('class', trim(curClass));
247
+ }
248
+ }
249
+ ;
250
+
251
+ /* istanbul ignore next */
252
+ var getStyle = ieVersion < 9 ? function (element, styleName) {
253
+ if (isServer) return;
254
+ if (!element || !styleName) return null;
255
+ styleName = camelCase(styleName);
256
+ if (styleName === 'float') {
257
+ styleName = 'styleFloat';
258
+ }
259
+ try {
260
+ switch (styleName) {
261
+ case 'opacity':
262
+ try {
263
+ return element.filters.item('alpha').opacity / 100;
264
+ } catch (e) {
265
+ return 1.0;
266
+ }
267
+ default:
268
+ return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
269
+ }
270
+ } catch (e) {
271
+ return element.style[styleName];
272
+ }
273
+ } : function (element, styleName) {
274
+ if (isServer) return;
275
+ if (!element || !styleName) return null;
276
+ styleName = camelCase(styleName);
277
+ if (styleName === 'float') {
278
+ styleName = 'cssFloat';
279
+ }
280
+ try {
281
+ var computed = document.defaultView.getComputedStyle(element, '');
282
+ return element.style[styleName] || computed ? computed[styleName] : null;
283
+ } catch (e) {
284
+ return element.style[styleName];
285
+ }
286
+ };
287
+
288
+ /* istanbul ignore next */
289
+ function setStyle(element, styleName, value) {
290
+ if (!element || !styleName) return;
291
+ if (typeof styleName === 'object') {
292
+ for (var prop in styleName) {
293
+ if (styleName.hasOwnProperty(prop)) {
294
+ setStyle(element, prop, styleName[prop]);
295
+ }
296
+ }
297
+ } else {
298
+ styleName = camelCase(styleName);
299
+ if (styleName === 'opacity' && ieVersion < 9) {
300
+ element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
301
+ } else {
302
+ element.style[styleName] = value;
303
+ }
304
+ }
305
+ }
306
+ ;
307
+ var isScroll = function isScroll(el, vertical) {
308
+ if (isServer) return;
309
+ var determinedDirection = vertical !== null && vertical !== undefined;
310
+ var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
311
+ return overflow.match(/(scroll|auto|overlay)/);
312
+ };
313
+ var getScrollContainer = function getScrollContainer(el, vertical) {
314
+ if (isServer) return;
315
+ var parent = el;
316
+ while (parent) {
317
+ if ([window, document, document.documentElement].includes(parent)) {
318
+ return window;
319
+ }
320
+ if (isScroll(parent, vertical)) {
321
+ return parent;
322
+ }
323
+ parent = parent.parentNode;
324
+ }
325
+ return parent;
326
+ };
327
+ var isInContainer = function isInContainer(el, container) {
328
+ if (isServer || !el || !container) return false;
329
+ var elRect = el.getBoundingClientRect();
330
+ var containerRect;
331
+ if ([window, document, document.documentElement, null, undefined].includes(container)) {
332
+ containerRect = {
333
+ top: 0,
334
+ right: window.innerWidth,
335
+ bottom: window.innerHeight,
336
+ left: 0
337
+ };
338
+ } else {
339
+ containerRect = container.getBoundingClientRect();
340
+ }
341
+ return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
342
+ };
343
+
344
+ /***/ }),
345
+
346
+ /***/ 10:
347
+ /***/ (function(module, exports) {
348
+
349
+ module.exports = require("core-js/modules/web.dom-collections.for-each.js");
350
+
351
+ /***/ }),
352
+
353
+ /***/ 101:
354
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
355
+
356
+ "use strict";
357
+ /* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
358
+
359
+ var Transition = /*#__PURE__*/function () {
360
+ function Transition() {}
361
+ var _proto = Transition.prototype;
362
+ _proto.beforeEnter = function beforeEnter(el) {
363
+ Object(_utils_dom__WEBPACK_IMPORTED_MODULE_0__[/* addClass */ "a"])(el, 'collapse-transition');
364
+ if (!el.dataset) el.dataset = {};
365
+ el.dataset.oldPaddingTop = el.style.paddingTop;
366
+ el.dataset.oldPaddingBottom = el.style.paddingBottom;
367
+ el.style.height = '0';
368
+ el.style.paddingTop = 0;
369
+ el.style.paddingBottom = 0;
370
+ };
371
+ _proto.enter = function enter(el) {
372
+ el.dataset.oldOverflow = el.style.overflow;
373
+ if (el.scrollHeight !== 0) {
374
+ el.style.height = el.scrollHeight + 'px';
375
+ el.style.paddingTop = el.dataset.oldPaddingTop;
376
+ el.style.paddingBottom = el.dataset.oldPaddingBottom;
377
+ } else {
378
+ el.style.height = '';
379
+ el.style.paddingTop = el.dataset.oldPaddingTop;
380
+ el.style.paddingBottom = el.dataset.oldPaddingBottom;
381
+ }
382
+ el.style.overflow = 'hidden';
383
+ };
384
+ _proto.afterEnter = function afterEnter(el) {
385
+ // for safari: remove class then reset height is necessary
386
+ Object(_utils_dom__WEBPACK_IMPORTED_MODULE_0__[/* removeClass */ "i"])(el, 'collapse-transition');
387
+ el.style.height = '';
388
+ el.style.overflow = el.dataset.oldOverflow;
389
+ };
390
+ _proto.beforeLeave = function beforeLeave(el) {
391
+ if (!el.dataset) el.dataset = {};
392
+ el.dataset.oldPaddingTop = el.style.paddingTop;
393
+ el.dataset.oldPaddingBottom = el.style.paddingBottom;
394
+ el.dataset.oldOverflow = el.style.overflow;
395
+ el.style.height = el.scrollHeight + 'px';
396
+ el.style.overflow = 'hidden';
397
+ };
398
+ _proto.leave = function leave(el) {
399
+ if (el.scrollHeight !== 0) {
400
+ // for safari: add class after set height, or it will jump to zero height suddenly, weired
401
+ Object(_utils_dom__WEBPACK_IMPORTED_MODULE_0__[/* addClass */ "a"])(el, 'collapse-transition');
402
+ el.style.height = 0;
403
+ el.style.paddingTop = 0;
404
+ el.style.paddingBottom = 0;
405
+ }
406
+ };
407
+ _proto.afterLeave = function afterLeave(el) {
408
+ Object(_utils_dom__WEBPACK_IMPORTED_MODULE_0__[/* removeClass */ "i"])(el, 'collapse-transition');
409
+ el.style.height = '';
410
+ el.style.overflow = el.dataset.oldOverflow;
411
+ el.style.paddingTop = el.dataset.oldPaddingTop;
412
+ el.style.paddingBottom = el.dataset.oldPaddingBottom;
413
+ };
414
+ return Transition;
415
+ }();
416
+ /* harmony default export */ __webpack_exports__["a"] = ({
417
+ name: 'ElCollapseTransition',
418
+ functional: true,
419
+ render: function render(h, _ref) {
420
+ var children = _ref.children;
421
+ var data = {
422
+ on: new Transition()
423
+ };
424
+ return h('transition', data, children);
425
+ }
426
+ });
427
+
428
+ /***/ }),
429
+
430
+ /***/ 11:
431
+ /***/ (function(module, exports) {
432
+
433
+ module.exports = require("core-js/modules/es.regexp.to-string.js");
434
+
435
+ /***/ }),
436
+
437
+ /***/ 114:
438
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
439
+
440
+ "use strict";
441
+ /* harmony default export */ __webpack_exports__["a"] = ({
442
+ inject: ['rootMenu'],
443
+ computed: {
444
+ indexPath: function indexPath() {
445
+ var path = [this.index];
446
+ var parent = this.$parent;
447
+ while (parent.$options.componentName !== 'ElMenu') {
448
+ if (parent.index) {
449
+ path.unshift(parent.index);
450
+ }
451
+ parent = parent.$parent;
452
+ }
453
+ return path;
454
+ },
455
+ parentMenu: function parentMenu() {
456
+ var parent = this.$parent;
457
+ while (parent && ['ElMenu', 'ElSubmenu'].indexOf(parent.$options.componentName) === -1) {
458
+ parent = parent.$parent;
459
+ }
460
+ return parent;
461
+ },
462
+ paddingStyle: function paddingStyle() {
463
+ if (this.rootMenu.mode !== 'vertical') return {};
464
+ var padding = 20;
465
+ var parent = this.$parent;
466
+ if (this.rootMenu.collapse) {
467
+ padding = 20;
468
+ } else {
469
+ while (parent && parent.$options.componentName !== 'ElMenu') {
470
+ if (parent.$options.componentName === 'ElSubmenu') {
471
+ padding += 20;
472
+ }
473
+ parent = parent.$parent;
474
+ }
475
+ }
476
+ return {
477
+ paddingLeft: padding + 'px'
478
+ };
479
+ }
480
+ }
481
+ });
482
+
483
+ /***/ }),
484
+
485
+ /***/ 12:
486
+ /***/ (function(module, exports) {
487
+
488
+ module.exports = require("core-js/modules/es.string.replace.js");
489
+
490
+ /***/ }),
491
+
492
+ /***/ 13:
493
+ /***/ (function(module, exports) {
494
+
495
+ module.exports = require("core-js/modules/es.array.slice.js");
496
+
497
+ /***/ }),
498
+
499
+ /***/ 14:
500
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
501
+
502
+ "use strict";
503
+ /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21);
504
+ /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_0__);
505
+ /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
506
+ /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__);
507
+ /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
508
+ /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__);
509
+
510
+
511
+
512
+ function _broadcast(componentName, eventName, params) {
513
+ this.$children.forEach(function (child) {
514
+ var name = child.$options.componentName;
515
+ if (name === componentName) {
516
+ child.$emit.apply(child, [eventName].concat(params));
517
+ } else {
518
+ _broadcast.apply(child, [componentName, eventName].concat([params]));
519
+ }
520
+ });
521
+ }
522
+ /* harmony default export */ __webpack_exports__["a"] = ({
523
+ methods: {
524
+ dispatch: function dispatch(componentName, eventName, params) {
525
+ var parent = this.$parent || this.$root;
526
+ var name = parent.$options.componentName;
527
+ while (parent && (!name || name !== componentName)) {
528
+ parent = parent.$parent;
529
+ if (parent) {
530
+ name = parent.$options.componentName;
531
+ }
532
+ }
533
+ if (parent) {
534
+ parent.$emit.apply(parent, [eventName].concat(params));
535
+ }
536
+ },
537
+ broadcast: function broadcast(componentName, eventName, params) {
538
+ _broadcast.call(this, componentName, eventName, params);
539
+ }
540
+ }
541
+ });
542
+
543
+ /***/ }),
544
+
545
+ /***/ 15:
546
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
547
+
548
+ "use strict";
549
+ /* harmony default export */ __webpack_exports__["a"] = (function (target) {
550
+ for (var i = 1, j = arguments.length; i < j; i++) {
551
+ var source = arguments[i] || {};
552
+ for (var prop in source) {
553
+ if (source.hasOwnProperty(prop)) {
554
+ var value = source[prop];
555
+ if (value !== undefined) {
556
+ target[prop] = value;
557
+ }
558
+ }
559
+ }
560
+ }
561
+ return target;
562
+ });
563
+ ;
564
+
565
+ /***/ }),
566
+
567
+ /***/ 16:
568
+ /***/ (function(module, exports) {
569
+
570
+ module.exports = require("core-js/modules/es.string.match.js");
571
+
572
+ /***/ }),
573
+
574
+ /***/ 17:
575
+ /***/ (function(module, exports) {
576
+
577
+ module.exports = require("core-js/modules/es.object.keys.js");
578
+
579
+ /***/ }),
580
+
581
+ /***/ 18:
582
+ /***/ (function(module, exports) {
583
+
584
+ module.exports = require("core-js/modules/es.array.filter.js");
585
+
586
+ /***/ }),
587
+
588
+ /***/ 2:
91
589
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
590
 
93
591
  "use strict";
@@ -192,410 +690,404 @@ function normalizeComponent(
192
690
 
193
691
  /***/ }),
194
692
 
195
- /***/ 132:
693
+ /***/ 20:
694
+ /***/ (function(module, exports) {
695
+
696
+ module.exports = require("core-js/modules/es.array.map.js");
697
+
698
+ /***/ }),
699
+
700
+ /***/ 21:
701
+ /***/ (function(module, exports) {
702
+
703
+ module.exports = require("core-js/modules/es.array.concat.js");
704
+
705
+ /***/ }),
706
+
707
+ /***/ 214:
196
708
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
197
709
 
198
710
  "use strict";
199
711
  // ESM COMPAT FLAG
200
712
  __webpack_require__.r(__webpack_exports__);
201
713
 
202
- // EXTERNAL MODULE: external "element-ui/lib/transitions/collapse-transition"
203
- var collapse_transition_ = __webpack_require__(28);
204
- var collapse_transition_default = /*#__PURE__*/__webpack_require__.n(collapse_transition_);
714
+ // EXTERNAL MODULE: external "core-js/modules/es.function.name.js"
715
+ var es_function_name_js_ = __webpack_require__(5);
205
716
 
206
- // EXTERNAL MODULE: ./packages/menu/src/menu-mixin.js
207
- var menu_mixin = __webpack_require__(37);
717
+ // EXTERNAL MODULE: external "core-js/modules/es.number.constructor.js"
718
+ var es_number_constructor_js_ = __webpack_require__(6);
208
719
 
209
- // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
210
- var emitter_ = __webpack_require__(4);
211
- var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
720
+ // EXTERNAL MODULE: external "core-js/modules/es.object.keys.js"
721
+ var es_object_keys_js_ = __webpack_require__(17);
212
722
 
213
- // EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"
214
- var vue_popper_ = __webpack_require__(5);
215
- var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
723
+ // EXTERNAL MODULE: external "core-js/modules/es.object.to-string.js"
724
+ var es_object_to_string_js_ = __webpack_require__(3);
216
725
 
217
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/submenu.vue?vue&type=script&lang=js
726
+ // EXTERNAL MODULE: external "core-js/modules/web.dom-collections.for-each.js"
727
+ var web_dom_collections_for_each_js_ = __webpack_require__(10);
218
728
 
729
+ // EXTERNAL MODULE: ./src/transitions/collapse-transition.js
730
+ var collapse_transition = __webpack_require__(101);
219
731
 
732
+ // EXTERNAL MODULE: ./packages/menu/src/menu-mixin.js
733
+ var menu_mixin = __webpack_require__(114);
220
734
 
735
+ // EXTERNAL MODULE: ./src/mixins/emitter.js
736
+ var emitter = __webpack_require__(14);
221
737
 
738
+ // EXTERNAL MODULE: ./src/utils/vue-popper.js
739
+ var vue_popper = __webpack_require__(51);
222
740
 
741
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/submenu.vue?vue&type=script&lang=js
223
742
 
224
- var poperMixins = {
225
- props: {
226
- transformOrigin: {
227
- type: [Boolean, String],
228
- default: false
229
- },
230
- offset: vue_popper_default.a.props.offset,
231
- boundariesPadding: vue_popper_default.a.props.boundariesPadding,
232
- popperOptions: vue_popper_default.a.props.popperOptions
233
- },
234
- data: vue_popper_default.a.data,
235
- methods: vue_popper_default.a.methods,
236
- beforeDestroy: vue_popper_default.a.beforeDestroy,
237
- deactivated: vue_popper_default.a.deactivated
238
- };
239
743
 
240
- /* harmony default export */ var submenuvue_type_script_lang_js = ({
241
- name: 'ElSubmenu',
242
-
243
- componentName: 'ElSubmenu',
244
-
245
- mixins: [menu_mixin["a" /* default */], emitter_default.a, poperMixins],
246
-
247
- components: { ElCollapseTransition: collapse_transition_default.a },
248
-
249
- props: {
250
- index: {
251
- type: String,
252
- required: true
253
- },
254
- showTimeout: {
255
- type: Number,
256
- default: 300
257
- },
258
- hideTimeout: {
259
- type: Number,
260
- default: 300
261
- },
262
- popperClass: String,
263
- disabled: Boolean,
264
- popperAppendToBody: {
265
- type: Boolean,
266
- default: undefined
267
- }
268
- },
269
-
270
- data: function data() {
271
- return {
272
- popperJS: null,
273
- timeout: null,
274
- items: {},
275
- submenus: {},
276
- mouseInChild: false
277
- };
278
- },
279
-
280
- watch: {
281
- opened: function opened(val) {
282
- var _this = this;
283
-
284
- if (this.isMenuPopup) {
285
- this.$nextTick(function (_) {
286
- _this.updatePopper();
287
- });
288
- }
289
- }
290
- },
291
- computed: {
292
- // popper option
293
- appendToBody: function appendToBody() {
294
- return this.popperAppendToBody === undefined ? this.isFirstLevel : this.popperAppendToBody;
295
- },
296
- menuTransitionName: function menuTransitionName() {
297
- return this.rootMenu.collapse ? 'el-zoom-in-left' : 'el-zoom-in-top';
298
- },
299
- opened: function opened() {
300
- return this.rootMenu.openedMenus.indexOf(this.index) > -1;
301
- },
302
- active: function active() {
303
- var isActive = false;
304
- var submenus = this.submenus;
305
- var items = this.items;
306
-
307
- Object.keys(items).forEach(function (index) {
308
- if (items[index].active) {
309
- isActive = true;
310
- }
311
- });
312
-
313
- Object.keys(submenus).forEach(function (index) {
314
- if (submenus[index].active) {
315
- isActive = true;
316
- }
317
- });
318
-
319
- return isActive;
320
- },
321
- hoverBackground: function hoverBackground() {
322
- return this.rootMenu.hoverBackground;
323
- },
324
- backgroundColor: function backgroundColor() {
325
- return this.rootMenu.backgroundColor || '';
326
- },
327
- activeTextColor: function activeTextColor() {
328
- return this.rootMenu.activeTextColor || '';
329
- },
330
- textColor: function textColor() {
331
- return this.rootMenu.textColor || '';
332
- },
333
- mode: function mode() {
334
- return this.rootMenu.mode;
335
- },
336
- isMenuPopup: function isMenuPopup() {
337
- return this.rootMenu.isMenuPopup;
338
- },
339
- titleStyle: function titleStyle() {
340
- if (this.mode !== 'horizontal') {
341
- return {
342
- color: this.textColor
343
- };
344
- }
345
- return {
346
- borderBottomColor: this.active ? this.rootMenu.activeTextColor ? this.activeTextColor : '' : 'transparent',
347
- color: this.active ? this.activeTextColor : this.textColor
348
- };
349
- },
350
- isFirstLevel: function isFirstLevel() {
351
- var isFirstLevel = true;
352
- var parent = this.$parent;
353
- while (parent && parent !== this.rootMenu) {
354
- if (['ElSubmenu', 'ElMenuItemGroup'].indexOf(parent.$options.componentName) > -1) {
355
- isFirstLevel = false;
356
- break;
357
- } else {
358
- parent = parent.$parent;
359
- }
360
- }
361
- return isFirstLevel;
362
- }
363
- },
364
- methods: {
365
- handleCollapseToggle: function handleCollapseToggle(value) {
366
- if (value) {
367
- this.initPopper();
368
- } else {
369
- this.doDestroy();
370
- }
371
- },
372
- addItem: function addItem(item) {
373
- this.$set(this.items, item.index, item);
374
- },
375
- removeItem: function removeItem(item) {
376
- delete this.items[item.index];
377
- },
378
- addSubmenu: function addSubmenu(item) {
379
- this.$set(this.submenus, item.index, item);
380
- },
381
- removeSubmenu: function removeSubmenu(item) {
382
- delete this.submenus[item.index];
383
- },
384
- handleClick: function handleClick() {
385
- var rootMenu = this.rootMenu,
386
- disabled = this.disabled;
387
-
388
- if (rootMenu.menuTrigger === 'hover' && rootMenu.mode === 'horizontal' || rootMenu.collapse && rootMenu.mode === 'vertical' || disabled) {
389
- return;
390
- }
391
- this.dispatch('ElMenu', 'submenu-click', this);
392
- },
393
- handleMouseenter: function handleMouseenter(event) {
394
- var _this2 = this;
395
744
 
396
- var showTimeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.showTimeout;
397
745
 
398
746
 
399
- if (!('ActiveXObject' in window) && event.type === 'focus' && !event.relatedTarget) {
400
- return;
401
- }
402
- var rootMenu = this.rootMenu,
403
- disabled = this.disabled;
404
747
 
405
- if (rootMenu.menuTrigger === 'click' && rootMenu.mode === 'horizontal' || !rootMenu.collapse && rootMenu.mode === 'vertical' || disabled) {
406
- return;
407
- }
408
- this.dispatch('ElSubmenu', 'mouse-enter-child');
409
- clearTimeout(this.timeout);
410
- this.timeout = setTimeout(function () {
411
- _this2.rootMenu.openMenu(_this2.index, _this2.indexPath);
412
- }, showTimeout);
413
-
414
- if (this.appendToBody) {
415
- this.$parent.$el.dispatchEvent(new MouseEvent('mouseenter'));
416
- }
417
- },
418
- handleMouseleave: function handleMouseleave() {
419
- var _this3 = this;
420
748
 
421
- var deepDispatch = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
422
- var rootMenu = this.rootMenu;
423
749
 
424
- if (rootMenu.menuTrigger === 'click' && rootMenu.mode === 'horizontal' || !rootMenu.collapse && rootMenu.mode === 'vertical') {
425
- return;
426
- }
427
- this.dispatch('ElSubmenu', 'mouse-leave-child');
428
- clearTimeout(this.timeout);
429
- this.timeout = setTimeout(function () {
430
- !_this3.mouseInChild && _this3.rootMenu.closeMenu(_this3.index);
431
- }, this.hideTimeout);
432
-
433
- if (this.appendToBody && deepDispatch) {
434
- if (this.$parent.$options.name === 'ElSubmenu') {
435
- this.$parent.handleMouseleave(true);
436
- }
437
- }
438
- },
439
- handleTitleMouseenter: function handleTitleMouseenter() {
440
- if (this.mode === 'horizontal' && !this.rootMenu.backgroundColor) return;
441
- var title = this.$refs['submenu-title'];
442
- title && (title.style.backgroundColor = this.rootMenu.hoverBackground);
443
- },
444
- handleTitleMouseleave: function handleTitleMouseleave() {
445
- if (this.mode === 'horizontal' && !this.rootMenu.backgroundColor) return;
446
- var title = this.$refs['submenu-title'];
447
- title && (title.style.backgroundColor = this.rootMenu.backgroundColor || '');
448
- },
449
- updatePlacement: function updatePlacement() {
450
- this.currentPlacement = this.mode === 'horizontal' && this.isFirstLevel ? 'bottom-start' : 'right-start';
451
- },
452
- initPopper: function initPopper() {
453
- this.referenceElm = this.$el;
454
- this.popperElm = this.$refs.menu;
455
- this.updatePlacement();
456
- }
457
- },
458
- created: function created() {
459
- var _this4 = this;
460
-
461
- this.$on('toggle-collapse', this.handleCollapseToggle);
462
- this.$on('mouse-enter-child', function () {
463
- _this4.mouseInChild = true;
464
- clearTimeout(_this4.timeout);
465
- });
466
- this.$on('mouse-leave-child', function () {
467
- _this4.mouseInChild = false;
468
- clearTimeout(_this4.timeout);
469
- });
470
- },
471
- mounted: function mounted() {
472
- this.parentMenu.addSubmenu(this);
473
- this.rootMenu.addSubmenu(this);
474
- this.initPopper();
475
- },
476
- beforeDestroy: function beforeDestroy() {
477
- this.parentMenu.removeSubmenu(this);
478
- this.rootMenu.removeSubmenu(this);
479
- },
480
- render: function render(h) {
481
- var _this5 = this;
482
-
483
- var active = this.active,
484
- opened = this.opened,
485
- paddingStyle = this.paddingStyle,
486
- titleStyle = this.titleStyle,
487
- backgroundColor = this.backgroundColor,
488
- rootMenu = this.rootMenu,
489
- currentPlacement = this.currentPlacement,
490
- menuTransitionName = this.menuTransitionName,
491
- mode = this.mode,
492
- disabled = this.disabled,
493
- popperClass = this.popperClass,
494
- $slots = this.$slots,
495
- isFirstLevel = this.isFirstLevel;
496
-
497
-
498
- var popupMenu = h(
499
- 'transition',
500
- {
501
- attrs: { name: menuTransitionName }
502
- },
503
- [h(
504
- 'div',
505
- {
506
- ref: 'menu',
507
- directives: [{
508
- name: 'show',
509
- value: opened
510
- }],
511
-
512
- 'class': ['el-menu--' + mode, popperClass],
513
- on: {
514
- 'mouseenter': function mouseenter($event) {
515
- return _this5.handleMouseenter($event, 100);
516
- },
517
- 'mouseleave': function mouseleave() {
518
- return _this5.handleMouseleave(true);
519
- },
520
- 'focus': function focus($event) {
521
- return _this5.handleMouseenter($event, 100);
522
- }
523
- }
524
- },
525
- [h(
526
- 'ul',
527
- {
528
- attrs: {
529
- role: 'menu'
530
- },
531
- 'class': ['el-menu el-menu--popup', 'el-menu--popup-' + currentPlacement],
532
- style: { backgroundColor: rootMenu.backgroundColor || '' } },
533
- [$slots.default]
534
- )]
535
- )]
536
- );
537
-
538
- var inlineMenu = h('el-collapse-transition', [h(
539
- 'ul',
540
- {
541
- attrs: {
542
- role: 'menu'
543
- },
544
- 'class': 'el-menu el-menu--inline',
545
- directives: [{
546
- name: 'show',
547
- value: opened
548
- }],
549
-
550
- style: { backgroundColor: rootMenu.backgroundColor || '' } },
551
- [$slots.default]
552
- )]);
553
-
554
- var submenuTitleIcon = rootMenu.mode === 'horizontal' && isFirstLevel || rootMenu.mode === 'vertical' && !rootMenu.collapse ? 'el-icon-arrow-down' : 'el-icon-arrow-right';
555
-
556
- return h(
557
- 'li',
558
- {
559
- 'class': {
560
- 'el-submenu': true,
561
- 'is-active': active,
562
- 'is-opened': opened,
563
- 'is-disabled': disabled
564
- },
565
- attrs: { role: 'menuitem',
566
- 'aria-haspopup': 'true',
567
- 'aria-expanded': opened
568
- },
569
- on: {
570
- 'mouseenter': this.handleMouseenter,
571
- 'mouseleave': function mouseleave() {
572
- return _this5.handleMouseleave(false);
573
- },
574
- 'focus': this.handleMouseenter
575
- }
576
- },
577
- [h(
578
- 'div',
579
- {
580
- 'class': 'el-submenu__title',
581
- ref: 'submenu-title',
582
- on: {
583
- 'click': this.handleClick,
584
- 'mouseenter': this.handleTitleMouseenter,
585
- 'mouseleave': this.handleTitleMouseleave
586
- },
587
-
588
- style: [paddingStyle, titleStyle, { backgroundColor: backgroundColor }]
589
- },
590
- [$slots.title, h('i', { 'class': ['el-submenu__icon-arrow', submenuTitleIcon] })]
591
- ), this.isMenuPopup ? popupMenu : inlineMenu]
592
- );
593
- }
750
+
751
+ var poperMixins = {
752
+ props: {
753
+ transformOrigin: {
754
+ type: [Boolean, String],
755
+ default: false
756
+ },
757
+ offset: vue_popper["a" /* default */].props.offset,
758
+ boundariesPadding: vue_popper["a" /* default */].props.boundariesPadding,
759
+ popperOptions: vue_popper["a" /* default */].props.popperOptions
760
+ },
761
+ data: vue_popper["a" /* default */].data,
762
+ methods: vue_popper["a" /* default */].methods,
763
+ beforeDestroy: vue_popper["a" /* default */].beforeDestroy,
764
+ deactivated: vue_popper["a" /* default */].deactivated
765
+ };
766
+ /* harmony default export */ var submenuvue_type_script_lang_js = ({
767
+ name: 'ElSubmenu',
768
+ componentName: 'ElSubmenu',
769
+ mixins: [menu_mixin["a" /* default */], emitter["a" /* default */], poperMixins],
770
+ components: {
771
+ ElCollapseTransition: collapse_transition["a" /* default */]
772
+ },
773
+ props: {
774
+ index: {
775
+ type: String,
776
+ required: true
777
+ },
778
+ showTimeout: {
779
+ type: Number,
780
+ default: 300
781
+ },
782
+ hideTimeout: {
783
+ type: Number,
784
+ default: 300
785
+ },
786
+ popperClass: String,
787
+ disabled: Boolean,
788
+ popperAppendToBody: {
789
+ type: Boolean,
790
+ default: undefined
791
+ }
792
+ },
793
+ data: function data() {
794
+ return {
795
+ popperJS: null,
796
+ timeout: null,
797
+ items: {},
798
+ submenus: {},
799
+ mouseInChild: false
800
+ };
801
+ },
802
+ watch: {
803
+ opened: function opened(val) {
804
+ var _this = this;
805
+ if (this.isMenuPopup) {
806
+ this.$nextTick(function (_) {
807
+ _this.updatePopper();
808
+ });
809
+ }
810
+ }
811
+ },
812
+ computed: {
813
+ // popper option
814
+ appendToBody: function appendToBody() {
815
+ return this.popperAppendToBody === undefined ? this.isFirstLevel : this.popperAppendToBody;
816
+ },
817
+ menuTransitionName: function menuTransitionName() {
818
+ return this.rootMenu.collapse ? 'el-zoom-in-left' : 'el-zoom-in-top';
819
+ },
820
+ opened: function opened() {
821
+ return this.rootMenu.openedMenus.indexOf(this.index) > -1;
822
+ },
823
+ active: function active() {
824
+ var isActive = false;
825
+ var submenus = this.submenus;
826
+ var items = this.items;
827
+ Object.keys(items).forEach(function (index) {
828
+ if (items[index].active) {
829
+ isActive = true;
830
+ }
831
+ });
832
+ Object.keys(submenus).forEach(function (index) {
833
+ if (submenus[index].active) {
834
+ isActive = true;
835
+ }
836
+ });
837
+ return isActive;
838
+ },
839
+ hoverBackground: function hoverBackground() {
840
+ return this.rootMenu.hoverBackground;
841
+ },
842
+ backgroundColor: function backgroundColor() {
843
+ return this.rootMenu.backgroundColor || '';
844
+ },
845
+ activeTextColor: function activeTextColor() {
846
+ return this.rootMenu.activeTextColor || '';
847
+ },
848
+ textColor: function textColor() {
849
+ return this.rootMenu.textColor || '';
850
+ },
851
+ mode: function mode() {
852
+ return this.rootMenu.mode;
853
+ },
854
+ isMenuPopup: function isMenuPopup() {
855
+ return this.rootMenu.isMenuPopup;
856
+ },
857
+ titleStyle: function titleStyle() {
858
+ if (this.mode !== 'horizontal') {
859
+ return {
860
+ color: this.textColor
861
+ };
862
+ }
863
+ return {
864
+ borderBottomColor: this.active ? this.rootMenu.activeTextColor ? this.activeTextColor : '' : 'transparent',
865
+ color: this.active ? this.activeTextColor : this.textColor
866
+ };
867
+ },
868
+ isFirstLevel: function isFirstLevel() {
869
+ var isFirstLevel = true;
870
+ var parent = this.$parent;
871
+ while (parent && parent !== this.rootMenu) {
872
+ if (['ElSubmenu', 'ElMenuItemGroup'].indexOf(parent.$options.componentName) > -1) {
873
+ isFirstLevel = false;
874
+ break;
875
+ } else {
876
+ parent = parent.$parent;
877
+ }
878
+ }
879
+ return isFirstLevel;
880
+ }
881
+ },
882
+ methods: {
883
+ handleCollapseToggle: function handleCollapseToggle(value) {
884
+ if (value) {
885
+ this.initPopper();
886
+ } else {
887
+ this.doDestroy();
888
+ }
889
+ },
890
+ addItem: function addItem(item) {
891
+ this.$set(this.items, item.index, item);
892
+ },
893
+ removeItem: function removeItem(item) {
894
+ delete this.items[item.index];
895
+ },
896
+ addSubmenu: function addSubmenu(item) {
897
+ this.$set(this.submenus, item.index, item);
898
+ },
899
+ removeSubmenu: function removeSubmenu(item) {
900
+ delete this.submenus[item.index];
901
+ },
902
+ handleClick: function handleClick() {
903
+ var rootMenu = this.rootMenu,
904
+ disabled = this.disabled;
905
+ if (rootMenu.menuTrigger === 'hover' && rootMenu.mode === 'horizontal' || rootMenu.collapse && rootMenu.mode === 'vertical' || disabled) {
906
+ return;
907
+ }
908
+ this.dispatch('ElMenu', 'submenu-click', this);
909
+ },
910
+ handleMouseenter: function handleMouseenter(event, showTimeout) {
911
+ var _this2 = this;
912
+ if (showTimeout === void 0) {
913
+ showTimeout = this.showTimeout;
914
+ }
915
+ if (!('ActiveXObject' in window) && event.type === 'focus' && !event.relatedTarget) {
916
+ return;
917
+ }
918
+ var rootMenu = this.rootMenu,
919
+ disabled = this.disabled;
920
+ if (rootMenu.menuTrigger === 'click' && rootMenu.mode === 'horizontal' || !rootMenu.collapse && rootMenu.mode === 'vertical' || disabled) {
921
+ return;
922
+ }
923
+ this.dispatch('ElSubmenu', 'mouse-enter-child');
924
+ clearTimeout(this.timeout);
925
+ this.timeout = setTimeout(function () {
926
+ _this2.rootMenu.openMenu(_this2.index, _this2.indexPath);
927
+ }, showTimeout);
928
+ if (this.appendToBody) {
929
+ this.$parent.$el.dispatchEvent(new MouseEvent('mouseenter'));
930
+ }
931
+ },
932
+ handleMouseleave: function handleMouseleave(deepDispatch) {
933
+ var _this3 = this;
934
+ if (deepDispatch === void 0) {
935
+ deepDispatch = false;
936
+ }
937
+ var rootMenu = this.rootMenu;
938
+ if (rootMenu.menuTrigger === 'click' && rootMenu.mode === 'horizontal' || !rootMenu.collapse && rootMenu.mode === 'vertical') {
939
+ return;
940
+ }
941
+ this.dispatch('ElSubmenu', 'mouse-leave-child');
942
+ clearTimeout(this.timeout);
943
+ this.timeout = setTimeout(function () {
944
+ !_this3.mouseInChild && _this3.rootMenu.closeMenu(_this3.index);
945
+ }, this.hideTimeout);
946
+ if (this.appendToBody && deepDispatch) {
947
+ if (this.$parent.$options.name === 'ElSubmenu') {
948
+ this.$parent.handleMouseleave(true);
949
+ }
950
+ }
951
+ },
952
+ handleTitleMouseenter: function handleTitleMouseenter() {
953
+ if (this.mode === 'horizontal' && !this.rootMenu.backgroundColor) return;
954
+ var title = this.$refs['submenu-title'];
955
+ title && (title.style.backgroundColor = this.rootMenu.hoverBackground);
956
+ },
957
+ handleTitleMouseleave: function handleTitleMouseleave() {
958
+ if (this.mode === 'horizontal' && !this.rootMenu.backgroundColor) return;
959
+ var title = this.$refs['submenu-title'];
960
+ title && (title.style.backgroundColor = this.rootMenu.backgroundColor || '');
961
+ },
962
+ updatePlacement: function updatePlacement() {
963
+ this.currentPlacement = this.mode === 'horizontal' && this.isFirstLevel ? 'bottom-start' : 'right-start';
964
+ },
965
+ initPopper: function initPopper() {
966
+ this.referenceElm = this.$el;
967
+ this.popperElm = this.$refs.menu;
968
+ this.updatePlacement();
969
+ }
970
+ },
971
+ created: function created() {
972
+ var _this4 = this;
973
+ this.$on('toggle-collapse', this.handleCollapseToggle);
974
+ this.$on('mouse-enter-child', function () {
975
+ _this4.mouseInChild = true;
976
+ clearTimeout(_this4.timeout);
977
+ });
978
+ this.$on('mouse-leave-child', function () {
979
+ _this4.mouseInChild = false;
980
+ clearTimeout(_this4.timeout);
981
+ });
982
+ },
983
+ mounted: function mounted() {
984
+ this.parentMenu.addSubmenu(this);
985
+ this.rootMenu.addSubmenu(this);
986
+ this.initPopper();
987
+ },
988
+ beforeDestroy: function beforeDestroy() {
989
+ this.parentMenu.removeSubmenu(this);
990
+ this.rootMenu.removeSubmenu(this);
991
+ },
992
+ render: function render(h) {
993
+ var _this5 = this;
994
+ var active = this.active,
995
+ opened = this.opened,
996
+ paddingStyle = this.paddingStyle,
997
+ titleStyle = this.titleStyle,
998
+ backgroundColor = this.backgroundColor,
999
+ rootMenu = this.rootMenu,
1000
+ currentPlacement = this.currentPlacement,
1001
+ menuTransitionName = this.menuTransitionName,
1002
+ mode = this.mode,
1003
+ disabled = this.disabled,
1004
+ popperClass = this.popperClass,
1005
+ $slots = this.$slots,
1006
+ isFirstLevel = this.isFirstLevel;
1007
+ var popupMenu = h("transition", {
1008
+ "attrs": {
1009
+ "name": menuTransitionName
1010
+ }
1011
+ }, [h("div", {
1012
+ "ref": "menu",
1013
+ "directives": [{
1014
+ name: "show",
1015
+ value: opened
1016
+ }],
1017
+ "class": ["el-menu--" + mode, popperClass],
1018
+ "on": {
1019
+ "mouseenter": function mouseenter($event) {
1020
+ return _this5.handleMouseenter($event, 100);
1021
+ },
1022
+ "mouseleave": function mouseleave() {
1023
+ return _this5.handleMouseleave(true);
1024
+ },
1025
+ "focus": function focus($event) {
1026
+ return _this5.handleMouseenter($event, 100);
1027
+ }
1028
+ }
1029
+ }, [h("ul", {
1030
+ "attrs": {
1031
+ "role": "menu"
1032
+ },
1033
+ "class": ['el-menu el-menu--popup', "el-menu--popup-" + currentPlacement],
1034
+ "style": {
1035
+ backgroundColor: rootMenu.backgroundColor || ''
1036
+ }
1037
+ }, [$slots.default])])]);
1038
+ var inlineMenu = h("el-collapse-transition", [h("ul", {
1039
+ "attrs": {
1040
+ "role": "menu"
1041
+ },
1042
+ "class": "el-menu el-menu--inline",
1043
+ "directives": [{
1044
+ name: "show",
1045
+ value: opened
1046
+ }],
1047
+ "style": {
1048
+ backgroundColor: rootMenu.backgroundColor || ''
1049
+ }
1050
+ }, [$slots.default])]);
1051
+ var submenuTitleIcon = rootMenu.mode === 'horizontal' && isFirstLevel || rootMenu.mode === 'vertical' && !rootMenu.collapse ? 'el-icon-arrow-down' : 'el-icon-arrow-right';
1052
+ return h("li", {
1053
+ "class": {
1054
+ 'el-submenu': true,
1055
+ 'is-active': active,
1056
+ 'is-opened': opened,
1057
+ 'is-disabled': disabled
1058
+ },
1059
+ "attrs": {
1060
+ "role": "menuitem",
1061
+ "aria-haspopup": "true",
1062
+ "aria-expanded": opened
1063
+ },
1064
+ "on": {
1065
+ "mouseenter": this.handleMouseenter,
1066
+ "mouseleave": function mouseleave() {
1067
+ return _this5.handleMouseleave(false);
1068
+ },
1069
+ "focus": this.handleMouseenter
1070
+ }
1071
+ }, [h("div", {
1072
+ "class": "el-submenu__title",
1073
+ "ref": "submenu-title",
1074
+ "on": {
1075
+ "click": this.handleClick,
1076
+ "mouseenter": this.handleTitleMouseenter,
1077
+ "mouseleave": this.handleTitleMouseleave
1078
+ },
1079
+ "style": [paddingStyle, titleStyle, {
1080
+ backgroundColor: backgroundColor
1081
+ }]
1082
+ }, [$slots.title, h("i", {
1083
+ "class": ['el-submenu__icon-arrow', submenuTitleIcon]
1084
+ })]), this.isMenuPopup ? popupMenu : inlineMenu]);
1085
+ }
594
1086
  });
595
1087
  // CONCATENATED MODULE: ./packages/menu/src/submenu.vue?vue&type=script&lang=js
596
1088
  /* harmony default export */ var src_submenuvue_type_script_lang_js = (submenuvue_type_script_lang_js);
597
1089
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
598
- var componentNormalizer = __webpack_require__(0);
1090
+ var componentNormalizer = __webpack_require__(2);
599
1091
 
600
1092
  // CONCATENATED MODULE: ./packages/menu/src/submenu.vue
601
1093
  var render, staticRenderFns
@@ -620,81 +1112,2027 @@ var component = Object(componentNormalizer["a" /* default */])(
620
1112
  // CONCATENATED MODULE: ./packages/submenu/index.js
621
1113
 
622
1114
 
1115
+
623
1116
  /* istanbul ignore next */
624
1117
  submenu.install = function (Vue) {
625
- Vue.component(submenu.name, submenu);
1118
+ Vue.component(submenu.name, submenu);
626
1119
  };
627
-
628
1120
  /* harmony default export */ var packages_submenu = __webpack_exports__["default"] = (submenu);
629
1121
 
630
1122
  /***/ }),
631
1123
 
632
- /***/ 28:
1124
+ /***/ 22:
633
1125
  /***/ (function(module, exports) {
634
1126
 
635
- module.exports = require("element-ui/lib/transitions/collapse-transition");
1127
+ module.exports = require("core-js/modules/es.array.splice.js");
636
1128
 
637
1129
  /***/ }),
638
1130
 
639
- /***/ 37:
1131
+ /***/ 23:
640
1132
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
641
1133
 
642
1134
  "use strict";
643
- /* harmony default export */ __webpack_exports__["a"] = ({
644
- inject: ['rootMenu'],
645
- computed: {
646
- indexPath: function indexPath() {
647
- var path = [this.index];
648
- var parent = this.$parent;
649
- while (parent.$options.componentName !== 'ElMenu') {
650
- if (parent.index) {
651
- path.unshift(parent.index);
652
- }
653
- parent = parent.$parent;
654
- }
655
- return path;
656
- },
657
- parentMenu: function parentMenu() {
658
- var parent = this.$parent;
659
- while (parent && ['ElMenu', 'ElSubmenu'].indexOf(parent.$options.componentName) === -1) {
660
- parent = parent.$parent;
661
- }
662
- return parent;
663
- },
664
- paddingStyle: function paddingStyle() {
665
- if (this.rootMenu.mode !== 'vertical') return {};
666
-
667
- var padding = 20;
668
- var parent = this.$parent;
669
-
670
- if (this.rootMenu.collapse) {
671
- padding = 20;
672
- } else {
673
- while (parent && parent.$options.componentName !== 'ElMenu') {
674
- if (parent.$options.componentName === 'ElSubmenu') {
675
- padding += 20;
676
- }
677
- parent = parent.$parent;
678
- }
679
- }
680
- return { paddingLeft: padding + 'px' };
681
- }
682
- }
1135
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1136
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
1137
+
1138
+ var scrollBarWidth;
1139
+ /* harmony default export */ __webpack_exports__["a"] = (function () {
1140
+ if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
1141
+ if (scrollBarWidth !== undefined) return scrollBarWidth;
1142
+ var outer = document.createElement('div');
1143
+ outer.className = 'el-scrollbar__wrap';
1144
+ outer.style.visibility = 'hidden';
1145
+ outer.style.width = '100px';
1146
+ outer.style.position = 'absolute';
1147
+ outer.style.top = '-9999px';
1148
+ document.body.appendChild(outer);
1149
+ var widthNoScroll = outer.offsetWidth;
1150
+ outer.style.overflow = 'scroll';
1151
+ var inner = document.createElement('div');
1152
+ inner.style.width = '100%';
1153
+ outer.appendChild(inner);
1154
+ var widthWithScroll = inner.offsetWidth;
1155
+ outer.parentNode.removeChild(outer);
1156
+ scrollBarWidth = widthNoScroll - widthWithScroll;
1157
+ return scrollBarWidth;
683
1158
  });
1159
+ ;
684
1160
 
685
1161
  /***/ }),
686
1162
 
687
- /***/ 4:
688
- /***/ (function(module, exports) {
1163
+ /***/ 24:
1164
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
689
1165
 
690
- module.exports = require("element-ui/lib/mixins/emitter");
1166
+ "use strict";
691
1167
 
692
- /***/ }),
1168
+ // EXPORTS
1169
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
693
1170
 
694
- /***/ 5:
1171
+ // EXTERNAL MODULE: external "core-js/modules/es.number.constructor.js"
1172
+ var es_number_constructor_js_ = __webpack_require__(6);
1173
+
1174
+ // EXTERNAL MODULE: external "vue"
1175
+ var external_vue_ = __webpack_require__(0);
1176
+ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
1177
+
1178
+ // EXTERNAL MODULE: ./src/utils/merge.js
1179
+ var merge = __webpack_require__(15);
1180
+
1181
+ // EXTERNAL MODULE: external "core-js/modules/es.array.splice.js"
1182
+ var es_array_splice_js_ = __webpack_require__(22);
1183
+
1184
+ // EXTERNAL MODULE: external "core-js/modules/es.object.to-string.js"
1185
+ var es_object_to_string_js_ = __webpack_require__(3);
1186
+
1187
+ // EXTERNAL MODULE: external "core-js/modules/es.regexp.exec.js"
1188
+ var es_regexp_exec_js_ = __webpack_require__(7);
1189
+
1190
+ // EXTERNAL MODULE: external "core-js/modules/es.string.split.js"
1191
+ var es_string_split_js_ = __webpack_require__(59);
1192
+
1193
+ // EXTERNAL MODULE: external "core-js/modules/es.string.trim.js"
1194
+ var es_string_trim_js_ = __webpack_require__(55);
1195
+
1196
+ // EXTERNAL MODULE: external "core-js/modules/web.dom-collections.for-each.js"
1197
+ var web_dom_collections_for_each_js_ = __webpack_require__(10);
1198
+
1199
+ // EXTERNAL MODULE: ./src/utils/dom.js
1200
+ var utils_dom = __webpack_require__(1);
1201
+
1202
+ // CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
1203
+
1204
+
1205
+
1206
+
1207
+
1208
+
1209
+
1210
+
1211
+ var hasModal = false;
1212
+ var hasInitZIndex = false;
1213
+ var popup_manager_zIndex;
1214
+ var popup_manager_getModal = function getModal() {
1215
+ if (external_vue_default.a.prototype.$isServer) return;
1216
+ var modalDom = PopupManager.modalDom;
1217
+ if (modalDom) {
1218
+ hasModal = true;
1219
+ } else {
1220
+ hasModal = false;
1221
+ modalDom = document.createElement('div');
1222
+ PopupManager.modalDom = modalDom;
1223
+ modalDom.addEventListener('touchmove', function (event) {
1224
+ event.preventDefault();
1225
+ event.stopPropagation();
1226
+ });
1227
+ modalDom.addEventListener('click', function () {
1228
+ PopupManager.doOnModalClick && PopupManager.doOnModalClick();
1229
+ });
1230
+ }
1231
+ return modalDom;
1232
+ };
1233
+ var instances = {};
1234
+ var PopupManager = {
1235
+ modalFade: true,
1236
+ getInstance: function getInstance(id) {
1237
+ return instances[id];
1238
+ },
1239
+ register: function register(id, instance) {
1240
+ if (id && instance) {
1241
+ instances[id] = instance;
1242
+ }
1243
+ },
1244
+ deregister: function deregister(id) {
1245
+ if (id) {
1246
+ instances[id] = null;
1247
+ delete instances[id];
1248
+ }
1249
+ },
1250
+ nextZIndex: function nextZIndex() {
1251
+ return PopupManager.zIndex++;
1252
+ },
1253
+ modalStack: [],
1254
+ doOnModalClick: function doOnModalClick() {
1255
+ var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
1256
+ if (!topItem) return;
1257
+ var instance = PopupManager.getInstance(topItem.id);
1258
+ if (instance && instance.closeOnClickModal) {
1259
+ instance.close();
1260
+ }
1261
+ },
1262
+ openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
1263
+ if (external_vue_default.a.prototype.$isServer) return;
1264
+ if (!id || zIndex === undefined) return;
1265
+ this.modalFade = modalFade;
1266
+ var modalStack = this.modalStack;
1267
+ for (var i = 0, j = modalStack.length; i < j; i++) {
1268
+ var item = modalStack[i];
1269
+ if (item.id === id) {
1270
+ return;
1271
+ }
1272
+ }
1273
+ var modalDom = popup_manager_getModal();
1274
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
1275
+ if (this.modalFade && !hasModal) {
1276
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
1277
+ }
1278
+ if (modalClass) {
1279
+ var classArr = modalClass.trim().split(/\s+/);
1280
+ classArr.forEach(function (item) {
1281
+ return Object(utils_dom["a" /* addClass */])(modalDom, item);
1282
+ });
1283
+ }
1284
+ setTimeout(function () {
1285
+ Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
1286
+ }, 200);
1287
+ if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
1288
+ dom.parentNode.appendChild(modalDom);
1289
+ } else {
1290
+ document.body.appendChild(modalDom);
1291
+ }
1292
+ if (zIndex) {
1293
+ modalDom.style.zIndex = zIndex;
1294
+ }
1295
+ modalDom.tabIndex = 0;
1296
+ modalDom.style.display = '';
1297
+ this.modalStack.push({
1298
+ id: id,
1299
+ zIndex: zIndex,
1300
+ modalClass: modalClass
1301
+ });
1302
+ },
1303
+ closeModal: function closeModal(id) {
1304
+ var modalStack = this.modalStack;
1305
+ var modalDom = popup_manager_getModal();
1306
+ if (modalStack.length > 0) {
1307
+ var topItem = modalStack[modalStack.length - 1];
1308
+ if (topItem.id === id) {
1309
+ if (topItem.modalClass) {
1310
+ var classArr = topItem.modalClass.trim().split(/\s+/);
1311
+ classArr.forEach(function (item) {
1312
+ return Object(utils_dom["i" /* removeClass */])(modalDom, item);
1313
+ });
1314
+ }
1315
+ modalStack.pop();
1316
+ if (modalStack.length > 0) {
1317
+ modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
1318
+ }
1319
+ } else {
1320
+ for (var i = modalStack.length - 1; i >= 0; i--) {
1321
+ if (modalStack[i].id === id) {
1322
+ modalStack.splice(i, 1);
1323
+ break;
1324
+ }
1325
+ }
1326
+ }
1327
+ }
1328
+ if (modalStack.length === 0) {
1329
+ if (this.modalFade) {
1330
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
1331
+ }
1332
+ setTimeout(function () {
1333
+ if (modalStack.length === 0) {
1334
+ if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
1335
+ modalDom.style.display = 'none';
1336
+ PopupManager.modalDom = undefined;
1337
+ }
1338
+ Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
1339
+ }, 200);
1340
+ }
1341
+ }
1342
+ };
1343
+ Object.defineProperty(PopupManager, 'zIndex', {
1344
+ configurable: true,
1345
+ get: function get() {
1346
+ if (!hasInitZIndex) {
1347
+ popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
1348
+ hasInitZIndex = true;
1349
+ }
1350
+ return popup_manager_zIndex;
1351
+ },
1352
+ set: function set(value) {
1353
+ popup_manager_zIndex = value;
1354
+ }
1355
+ });
1356
+ var popup_manager_getTopPopup = function getTopPopup() {
1357
+ if (external_vue_default.a.prototype.$isServer) return;
1358
+ if (PopupManager.modalStack.length > 0) {
1359
+ var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
1360
+ if (!topPopup) return;
1361
+ var instance = PopupManager.getInstance(topPopup.id);
1362
+ return instance;
1363
+ }
1364
+ };
1365
+ if (!external_vue_default.a.prototype.$isServer) {
1366
+ // handle `esc` key when the popup is shown
1367
+ window.addEventListener('keydown', function (event) {
1368
+ if (event.keyCode === 27) {
1369
+ var topPopup = popup_manager_getTopPopup();
1370
+ if (topPopup && topPopup.closeOnPressEscape) {
1371
+ topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
1372
+ }
1373
+ }
1374
+ });
1375
+ }
1376
+ /* harmony default export */ var popup_manager = (PopupManager);
1377
+ // EXTERNAL MODULE: ./src/utils/scrollbar-width.js
1378
+ var scrollbar_width = __webpack_require__(23);
1379
+
1380
+ // CONCATENATED MODULE: ./src/utils/popup/index.js
1381
+
1382
+
1383
+
1384
+
1385
+
1386
+
1387
+ var idSeed = 1;
1388
+ var scrollBarWidth;
1389
+ /* harmony default export */ var popup = __webpack_exports__["b"] = ({
1390
+ props: {
1391
+ visible: {
1392
+ type: Boolean,
1393
+ default: false
1394
+ },
1395
+ openDelay: {},
1396
+ closeDelay: {},
1397
+ zIndex: {},
1398
+ modal: {
1399
+ type: Boolean,
1400
+ default: false
1401
+ },
1402
+ modalFade: {
1403
+ type: Boolean,
1404
+ default: true
1405
+ },
1406
+ modalClass: {},
1407
+ modalAppendToBody: {
1408
+ type: Boolean,
1409
+ default: false
1410
+ },
1411
+ lockScroll: {
1412
+ type: Boolean,
1413
+ default: true
1414
+ },
1415
+ closeOnPressEscape: {
1416
+ type: Boolean,
1417
+ default: false
1418
+ },
1419
+ closeOnClickModal: {
1420
+ type: Boolean,
1421
+ default: false
1422
+ }
1423
+ },
1424
+ beforeMount: function beforeMount() {
1425
+ this._popupId = 'popup-' + idSeed++;
1426
+ popup_manager.register(this._popupId, this);
1427
+ },
1428
+ beforeDestroy: function beforeDestroy() {
1429
+ popup_manager.deregister(this._popupId);
1430
+ popup_manager.closeModal(this._popupId);
1431
+ this.restoreBodyStyle();
1432
+ },
1433
+ data: function data() {
1434
+ return {
1435
+ opened: false,
1436
+ bodyPaddingRight: null,
1437
+ computedBodyPaddingRight: 0,
1438
+ withoutHiddenClass: true,
1439
+ rendered: false
1440
+ };
1441
+ },
1442
+ watch: {
1443
+ visible: function visible(val) {
1444
+ var _this = this;
1445
+ if (val) {
1446
+ if (this._opening) return;
1447
+ if (!this.rendered) {
1448
+ this.rendered = true;
1449
+ external_vue_default.a.nextTick(function () {
1450
+ _this.open();
1451
+ });
1452
+ } else {
1453
+ this.open();
1454
+ }
1455
+ } else {
1456
+ this.close();
1457
+ }
1458
+ }
1459
+ },
1460
+ methods: {
1461
+ open: function open(options) {
1462
+ var _this2 = this;
1463
+ if (!this.rendered) {
1464
+ this.rendered = true;
1465
+ }
1466
+ var props = Object(merge["a" /* default */])({}, this.$props || this, options);
1467
+ if (this._closeTimer) {
1468
+ clearTimeout(this._closeTimer);
1469
+ this._closeTimer = null;
1470
+ }
1471
+ clearTimeout(this._openTimer);
1472
+ var openDelay = Number(props.openDelay);
1473
+ if (openDelay > 0) {
1474
+ this._openTimer = setTimeout(function () {
1475
+ _this2._openTimer = null;
1476
+ _this2.doOpen(props);
1477
+ }, openDelay);
1478
+ } else {
1479
+ this.doOpen(props);
1480
+ }
1481
+ },
1482
+ doOpen: function doOpen(props) {
1483
+ if (this.$isServer) return;
1484
+ if (this.willOpen && !this.willOpen()) return;
1485
+ if (this.opened) return;
1486
+ this._opening = true;
1487
+ var dom = this.$el;
1488
+ var modal = props.modal;
1489
+ var zIndex = props.zIndex;
1490
+ if (zIndex) {
1491
+ popup_manager.zIndex = zIndex;
1492
+ }
1493
+ if (modal) {
1494
+ if (this._closing) {
1495
+ popup_manager.closeModal(this._popupId);
1496
+ this._closing = false;
1497
+ }
1498
+ popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
1499
+ if (props.lockScroll) {
1500
+ this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
1501
+ if (this.withoutHiddenClass) {
1502
+ this.bodyPaddingRight = document.body.style.paddingRight;
1503
+ this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
1504
+ }
1505
+ scrollBarWidth = Object(scrollbar_width["a" /* default */])();
1506
+ var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
1507
+ var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
1508
+ if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
1509
+ document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
1510
+ }
1511
+ Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
1512
+ }
1513
+ }
1514
+ if (getComputedStyle(dom).position === 'static') {
1515
+ dom.style.position = 'absolute';
1516
+ }
1517
+ dom.style.zIndex = popup_manager.nextZIndex();
1518
+ this.opened = true;
1519
+ this.onOpen && this.onOpen();
1520
+ this.doAfterOpen();
1521
+ },
1522
+ doAfterOpen: function doAfterOpen() {
1523
+ this._opening = false;
1524
+ },
1525
+ close: function close() {
1526
+ var _this3 = this;
1527
+ if (this.willClose && !this.willClose()) return;
1528
+ if (this._openTimer !== null) {
1529
+ clearTimeout(this._openTimer);
1530
+ this._openTimer = null;
1531
+ }
1532
+ clearTimeout(this._closeTimer);
1533
+ var closeDelay = Number(this.closeDelay);
1534
+ if (closeDelay > 0) {
1535
+ this._closeTimer = setTimeout(function () {
1536
+ _this3._closeTimer = null;
1537
+ _this3.doClose();
1538
+ }, closeDelay);
1539
+ } else {
1540
+ this.doClose();
1541
+ }
1542
+ },
1543
+ doClose: function doClose() {
1544
+ this._closing = true;
1545
+ this.onClose && this.onClose();
1546
+ if (this.lockScroll) {
1547
+ setTimeout(this.restoreBodyStyle, 200);
1548
+ }
1549
+ this.opened = false;
1550
+ this.doAfterClose();
1551
+ },
1552
+ doAfterClose: function doAfterClose() {
1553
+ popup_manager.closeModal(this._popupId);
1554
+ this._closing = false;
1555
+ },
1556
+ restoreBodyStyle: function restoreBodyStyle() {
1557
+ if (this.modal && this.withoutHiddenClass) {
1558
+ document.body.style.paddingRight = this.bodyPaddingRight;
1559
+ Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
1560
+ }
1561
+ this.withoutHiddenClass = true;
1562
+ }
1563
+ }
1564
+ });
1565
+
1566
+
1567
+ /***/ }),
1568
+
1569
+ /***/ 3:
1570
+ /***/ (function(module, exports) {
1571
+
1572
+ module.exports = require("core-js/modules/es.object.to-string.js");
1573
+
1574
+ /***/ }),
1575
+
1576
+ /***/ 5:
1577
+ /***/ (function(module, exports) {
1578
+
1579
+ module.exports = require("core-js/modules/es.function.name.js");
1580
+
1581
+ /***/ }),
1582
+
1583
+ /***/ 51:
1584
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1585
+
1586
+ "use strict";
1587
+ /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
1588
+ /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0__);
1589
+ /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
1590
+ /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_1__);
1591
+ /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
1592
+ /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__);
1593
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0);
1594
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_3__);
1595
+ /* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24);
1596
+
1597
+
1598
+
1599
+
1600
+
1601
+ var PopperJS = vue__WEBPACK_IMPORTED_MODULE_3___default.a.prototype.$isServer ? function () {} : __webpack_require__(73);
1602
+ var stop = function stop(e) {
1603
+ return e.stopPropagation();
1604
+ };
1605
+
1606
+ /**
1607
+ * @param {HTMLElement} [reference=$refs.reference] - The reference element used to position the popper.
1608
+ * @param {HTMLElement} [popper=$refs.popper] - The HTML element used as popper, or a configuration used to generate the popper.
1609
+ * @param {String} [placement=button] - Placement of the popper accepted values: top(-start, -end), right(-start, -end), bottom(-start, -end), left(-start, -end)
1610
+ * @param {Number} [offset=0] - Amount of pixels the popper will be shifted (can be negative).
1611
+ * @param {Boolean} [visible=false] Visibility of the popup element.
1612
+ * @param {Boolean} [visible-arrow=false] Visibility of the arrow, no style.
1613
+ */
1614
+ /* harmony default export */ __webpack_exports__["a"] = ({
1615
+ props: {
1616
+ transformOrigin: {
1617
+ type: [Boolean, String],
1618
+ default: true
1619
+ },
1620
+ placement: {
1621
+ type: String,
1622
+ default: 'bottom'
1623
+ },
1624
+ boundariesPadding: {
1625
+ type: Number,
1626
+ default: 5
1627
+ },
1628
+ reference: {},
1629
+ popper: {},
1630
+ offset: {
1631
+ default: 0
1632
+ },
1633
+ value: Boolean,
1634
+ visibleArrow: Boolean,
1635
+ arrowOffset: {
1636
+ type: Number,
1637
+ default: 35
1638
+ },
1639
+ appendToBody: {
1640
+ type: Boolean,
1641
+ default: true
1642
+ },
1643
+ popperOptions: {
1644
+ type: Object,
1645
+ default: function _default() {
1646
+ return {
1647
+ gpuAcceleration: false
1648
+ };
1649
+ }
1650
+ }
1651
+ },
1652
+ data: function data() {
1653
+ return {
1654
+ showPopper: false,
1655
+ currentPlacement: ''
1656
+ };
1657
+ },
1658
+ watch: {
1659
+ value: {
1660
+ immediate: true,
1661
+ handler: function handler(val) {
1662
+ this.showPopper = val;
1663
+ this.$emit('input', val);
1664
+ }
1665
+ },
1666
+ showPopper: function showPopper(val) {
1667
+ if (this.disabled) return;
1668
+ val ? this.updatePopper() : this.destroyPopper();
1669
+ this.$emit('input', val);
1670
+ }
1671
+ },
1672
+ methods: {
1673
+ createPopper: function createPopper() {
1674
+ var _this = this;
1675
+ if (this.$isServer) return;
1676
+ this.currentPlacement = this.currentPlacement || this.placement;
1677
+ if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement)) {
1678
+ return;
1679
+ }
1680
+ var options = this.popperOptions;
1681
+ var popper = this.popperElm = this.popperElm || this.popper || this.$refs.popper;
1682
+ var reference = this.referenceElm = this.referenceElm || this.reference || this.$refs.reference;
1683
+ if (!reference && this.$slots.reference && this.$slots.reference[0]) {
1684
+ reference = this.referenceElm = this.$slots.reference[0].elm;
1685
+ }
1686
+ if (!popper || !reference) return;
1687
+ if (this.visibleArrow) this.appendArrow(popper);
1688
+ if (this.appendToBody) document.body.appendChild(this.popperElm);
1689
+ if (this.popperJS && this.popperJS.destroy) {
1690
+ this.popperJS.destroy();
1691
+ }
1692
+ options.placement = this.currentPlacement;
1693
+ options.offset = this.offset;
1694
+ options.arrowOffset = this.arrowOffset;
1695
+ this.popperJS = new PopperJS(reference, popper, options);
1696
+ this.popperJS.onCreate(function (_) {
1697
+ _this.$emit('created', _this);
1698
+ _this.resetTransformOrigin();
1699
+ _this.$nextTick(_this.updatePopper);
1700
+ });
1701
+ if (typeof options.onUpdate === 'function') {
1702
+ this.popperJS.onUpdate(options.onUpdate);
1703
+ }
1704
+ this.popperJS._popper.style.zIndex = _popup__WEBPACK_IMPORTED_MODULE_4__[/* PopupManager */ "a"].nextZIndex();
1705
+ this.popperElm.addEventListener('click', stop);
1706
+ },
1707
+ updatePopper: function updatePopper() {
1708
+ var popperJS = this.popperJS;
1709
+ if (popperJS) {
1710
+ popperJS.update();
1711
+ if (popperJS._popper) {
1712
+ popperJS._popper.style.zIndex = _popup__WEBPACK_IMPORTED_MODULE_4__[/* PopupManager */ "a"].nextZIndex();
1713
+ }
1714
+ } else {
1715
+ this.createPopper();
1716
+ }
1717
+ },
1718
+ doDestroy: function doDestroy(forceDestroy) {
1719
+ /* istanbul ignore if */
1720
+ if (!this.popperJS || this.showPopper && !forceDestroy) return;
1721
+ this.popperJS.destroy();
1722
+ this.popperJS = null;
1723
+ },
1724
+ destroyPopper: function destroyPopper() {
1725
+ if (this.popperJS) {
1726
+ this.resetTransformOrigin();
1727
+ }
1728
+ },
1729
+ resetTransformOrigin: function resetTransformOrigin() {
1730
+ if (!this.transformOrigin) return;
1731
+ var placementMap = {
1732
+ top: 'bottom',
1733
+ bottom: 'top',
1734
+ left: 'right',
1735
+ right: 'left'
1736
+ };
1737
+ var placement = this.popperJS._popper.getAttribute('x-placement').split('-')[0];
1738
+ var origin = placementMap[placement];
1739
+ this.popperJS._popper.style.transformOrigin = typeof this.transformOrigin === 'string' ? this.transformOrigin : ['top', 'bottom'].indexOf(placement) > -1 ? "center " + origin : origin + " center";
1740
+ },
1741
+ appendArrow: function appendArrow(element) {
1742
+ var hash;
1743
+ if (this.appended) {
1744
+ return;
1745
+ }
1746
+ this.appended = true;
1747
+ for (var item in element.attributes) {
1748
+ if (/^_v-/.test(element.attributes[item].name)) {
1749
+ hash = element.attributes[item].name;
1750
+ break;
1751
+ }
1752
+ }
1753
+ var arrow = document.createElement('div');
1754
+ if (hash) {
1755
+ arrow.setAttribute(hash, '');
1756
+ }
1757
+ arrow.setAttribute('x-arrow', '');
1758
+ arrow.className = 'popper__arrow';
1759
+ element.appendChild(arrow);
1760
+ }
1761
+ },
1762
+ beforeDestroy: function beforeDestroy() {
1763
+ this.doDestroy(true);
1764
+ if (this.popperElm && this.popperElm.parentNode === document.body) {
1765
+ this.popperElm.removeEventListener('click', stop);
1766
+ document.body.removeChild(this.popperElm);
1767
+ }
1768
+ },
1769
+ // call destroy in keep-alive mode
1770
+ deactivated: function deactivated() {
1771
+ this.$options.beforeDestroy[0].call(this);
1772
+ }
1773
+ });
1774
+
1775
+ /***/ }),
1776
+
1777
+ /***/ 53:
1778
+ /***/ (function(module, exports) {
1779
+
1780
+ module.exports = require("core-js/modules/es.array.includes.js");
1781
+
1782
+ /***/ }),
1783
+
1784
+ /***/ 55:
1785
+ /***/ (function(module, exports) {
1786
+
1787
+ module.exports = require("core-js/modules/es.string.trim.js");
1788
+
1789
+ /***/ }),
1790
+
1791
+ /***/ 59:
1792
+ /***/ (function(module, exports) {
1793
+
1794
+ module.exports = require("core-js/modules/es.string.split.js");
1795
+
1796
+ /***/ }),
1797
+
1798
+ /***/ 6:
1799
+ /***/ (function(module, exports) {
1800
+
1801
+ module.exports = require("core-js/modules/es.number.constructor.js");
1802
+
1803
+ /***/ }),
1804
+
1805
+ /***/ 60:
1806
+ /***/ (function(module, exports) {
1807
+
1808
+ module.exports = require("core-js/modules/es.object.assign.js");
1809
+
1810
+ /***/ }),
1811
+
1812
+ /***/ 66:
1813
+ /***/ (function(module, exports) {
1814
+
1815
+ /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
1816
+ module.exports = __webpack_amd_options__;
1817
+
1818
+ /* WEBPACK VAR INJECTION */}.call(this, {}))
1819
+
1820
+ /***/ }),
1821
+
1822
+ /***/ 67:
1823
+ /***/ (function(module, exports) {
1824
+
1825
+ module.exports = function(originalModule) {
1826
+ if (!originalModule.webpackPolyfill) {
1827
+ var module = Object.create(originalModule);
1828
+ // module.parent = undefined by default
1829
+ if (!module.children) module.children = [];
1830
+ Object.defineProperty(module, "loaded", {
1831
+ enumerable: true,
1832
+ get: function() {
1833
+ return module.l;
1834
+ }
1835
+ });
1836
+ Object.defineProperty(module, "id", {
1837
+ enumerable: true,
1838
+ get: function() {
1839
+ return module.i;
1840
+ }
1841
+ });
1842
+ Object.defineProperty(module, "exports", {
1843
+ enumerable: true
1844
+ });
1845
+ module.webpackPolyfill = 1;
1846
+ }
1847
+ return module;
1848
+ };
1849
+
1850
+
1851
+ /***/ }),
1852
+
1853
+ /***/ 7:
1854
+ /***/ (function(module, exports) {
1855
+
1856
+ module.exports = require("core-js/modules/es.regexp.exec.js");
1857
+
1858
+ /***/ }),
1859
+
1860
+ /***/ 73:
1861
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1862
+
1863
+ "use strict";
1864
+ __webpack_require__.r(__webpack_exports__);
1865
+ /* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
1866
+ /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_0__);
1867
+ /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
1868
+ /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_1__);
1869
+ /* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13);
1870
+ /* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_2__);
1871
+ /* harmony import */ var core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(60);
1872
+ /* harmony import */ var core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_3__);
1873
+ /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(74);
1874
+ /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_4__);
1875
+ /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(17);
1876
+ /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_5__);
1877
+ /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
1878
+ /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__);
1879
+ /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7);
1880
+ /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_7__);
1881
+ /* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(11);
1882
+ /* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_8__);
1883
+ /* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(12);
1884
+ /* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_9__);
1885
+ /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(10);
1886
+ /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_10__);
1887
+
1888
+
1889
+
1890
+
1891
+
1892
+
1893
+
1894
+
1895
+
1896
+
1897
+
1898
+ /**
1899
+ * @fileOverview Kickass library to create and place poppers near their reference elements.
1900
+ * @version {{version}}
1901
+ * @license
1902
+ * Copyright (c) 2016 Federico Zivolo and contributors
1903
+ *
1904
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
1905
+ * of this software and associated documentation files (the "Software"), to deal
1906
+ * in the Software without restriction, including without limitation the rights
1907
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1908
+ * copies of the Software, and to permit persons to whom the Software is
1909
+ * furnished to do so, subject to the following conditions:
1910
+ *
1911
+ * The above copyright notice and this permission notice shall be included in all
1912
+ * copies or substantial portions of the Software.
1913
+ *
1914
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1915
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1916
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1917
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1918
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1919
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1920
+ * SOFTWARE.
1921
+ */
1922
+
1923
+ //
1924
+ // Cross module loader
1925
+ // Supported: Node, AMD, Browser globals
1926
+ //
1927
+ ;
1928
+ (function (root, factory) {
1929
+ if (typeof define === 'function' && __webpack_require__(66)) {
1930
+ // AMD. Register as an anonymous module.
1931
+ define(factory);
1932
+ } else if ( true && module.exports) {
1933
+ // Node. Does not work with strict CommonJS, but
1934
+ // only CommonJS-like environments that support module.exports,
1935
+ // like Node.
1936
+ module.exports = factory();
1937
+ } else {
1938
+ // Browser globals (root is window)
1939
+ root.Popper = factory();
1940
+ }
1941
+ })(undefined, function () {
1942
+ 'use strict';
1943
+
1944
+ var root = window;
1945
+
1946
+ // default options
1947
+ var DEFAULTS = {
1948
+ // placement of the popper
1949
+ placement: 'bottom',
1950
+ gpuAcceleration: true,
1951
+ // shift popper from its origin by the given amount of pixels (can be negative)
1952
+ offset: 0,
1953
+ // the element which will act as boundary of the popper
1954
+ boundariesElement: 'viewport',
1955
+ // amount of pixel used to define a minimum distance between the boundaries and the popper
1956
+ boundariesPadding: 5,
1957
+ // popper will try to prevent overflow following this order,
1958
+ // by default, then, it could overflow on the left and on top of the boundariesElement
1959
+ preventOverflowOrder: ['left', 'right', 'top', 'bottom'],
1960
+ // the behavior used by flip to change the placement of the popper
1961
+ flipBehavior: 'flip',
1962
+ arrowElement: '[x-arrow]',
1963
+ arrowOffset: 0,
1964
+ // list of functions used to modify the offsets before they are applied to the popper
1965
+ modifiers: ['shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle'],
1966
+ modifiersIgnored: [],
1967
+ forceAbsolute: false
1968
+ };
1969
+
1970
+ /**
1971
+ * Create a new Popper.js instance
1972
+ * @constructor Popper
1973
+ * @param {HTMLElement} reference - The reference element used to position the popper
1974
+ * @param {HTMLElement|Object} popper
1975
+ * The HTML element used as popper, or a configuration used to generate the popper.
1976
+ * @param {String} [popper.tagName='div'] The tag name of the generated popper.
1977
+ * @param {Array} [popper.classNames=['popper']] Array of classes to apply to the generated popper.
1978
+ * @param {Array} [popper.attributes] Array of attributes to apply, specify `attr:value` to assign a value to it.
1979
+ * @param {HTMLElement|String} [popper.parent=window.document.body] The parent element, given as HTMLElement or as query string.
1980
+ * @param {String} [popper.content=''] The content of the popper, it can be text, html, or node; if it is not text, set `contentType` to `html` or `node`.
1981
+ * @param {String} [popper.contentType='text'] If `html`, the `content` will be parsed as HTML. If `node`, it will be appended as-is.
1982
+ * @param {String} [popper.arrowTagName='div'] Same as `popper.tagName` but for the arrow element.
1983
+ * @param {Array} [popper.arrowClassNames='popper__arrow'] Same as `popper.classNames` but for the arrow element.
1984
+ * @param {String} [popper.arrowAttributes=['x-arrow']] Same as `popper.attributes` but for the arrow element.
1985
+ * @param {Object} options
1986
+ * @param {String} [options.placement=bottom]
1987
+ * Placement of the popper accepted values: `top(-start, -end), right(-start, -end), bottom(-start, -right),
1988
+ * left(-start, -end)`
1989
+ *
1990
+ * @param {HTMLElement|String} [options.arrowElement='[x-arrow]']
1991
+ * The DOM Node used as arrow for the popper, or a CSS selector used to get the DOM node. It must be child of
1992
+ * its parent Popper. Popper.js will apply to the given element the style required to align the arrow with its
1993
+ * reference element.
1994
+ * By default, it will look for a child node of the popper with the `x-arrow` attribute.
1995
+ *
1996
+ * @param {Boolean} [options.gpuAcceleration=true]
1997
+ * When this property is set to true, the popper position will be applied using CSS3 translate3d, allowing the
1998
+ * browser to use the GPU to accelerate the rendering.
1999
+ * If set to false, the popper will be placed using `top` and `left` properties, not using the GPU.
2000
+ *
2001
+ * @param {Number} [options.offset=0]
2002
+ * Amount of pixels the popper will be shifted (can be negative).
2003
+ *
2004
+ * @param {String|Element} [options.boundariesElement='viewport']
2005
+ * The element which will define the boundaries of the popper position, the popper will never be placed outside
2006
+ * of the defined boundaries (except if `keepTogether` is enabled)
2007
+ *
2008
+ * @param {Number} [options.boundariesPadding=5]
2009
+ * Additional padding for the boundaries
2010
+ *
2011
+ * @param {Array} [options.preventOverflowOrder=['left', 'right', 'top', 'bottom']]
2012
+ * Order used when Popper.js tries to avoid overflows from the boundaries, they will be checked in order,
2013
+ * this means that the last ones will never overflow
2014
+ *
2015
+ * @param {String|Array} [options.flipBehavior='flip']
2016
+ * The behavior used by the `flip` modifier to change the placement of the popper when the latter is trying to
2017
+ * overlap its reference element. Defining `flip` as value, the placement will be flipped on
2018
+ * its axis (`right - left`, `top - bottom`).
2019
+ * You can even pass an array of placements (eg: `['right', 'left', 'top']` ) to manually specify
2020
+ * how alter the placement when a flip is needed. (eg. in the above example, it would first flip from right to left,
2021
+ * then, if even in its new placement, the popper is overlapping its reference element, it will be moved to top)
2022
+ *
2023
+ * @param {Array} [options.modifiers=[ 'shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle']]
2024
+ * List of functions used to modify the data before they are applied to the popper, add your custom functions
2025
+ * to this array to edit the offsets and placement.
2026
+ * The function should reflect the @params and @returns of preventOverflow
2027
+ *
2028
+ * @param {Array} [options.modifiersIgnored=[]]
2029
+ * Put here any built-in modifier name you want to exclude from the modifiers list
2030
+ * The function should reflect the @params and @returns of preventOverflow
2031
+ *
2032
+ * @param {Boolean} [options.removeOnDestroy=false]
2033
+ * Set to true if you want to automatically remove the popper when you call the `destroy` method.
2034
+ */
2035
+ function Popper(reference, popper, options) {
2036
+ this._reference = reference.jquery ? reference[0] : reference;
2037
+ this.state = {};
2038
+
2039
+ // if the popper variable is a configuration object, parse it to generate an HTMLElement
2040
+ // generate a default popper if is not defined
2041
+ var isNotDefined = typeof popper === 'undefined' || popper === null;
2042
+ var isConfig = popper && Object.prototype.toString.call(popper) === '[object Object]';
2043
+ if (isNotDefined || isConfig) {
2044
+ this._popper = this.parse(isConfig ? popper : {});
2045
+ }
2046
+ // otherwise, use the given HTMLElement as popper
2047
+ else {
2048
+ this._popper = popper.jquery ? popper[0] : popper;
2049
+ }
2050
+
2051
+ // with {} we create a new object with the options inside it
2052
+ this._options = Object.assign({}, DEFAULTS, options);
2053
+
2054
+ // refactoring modifiers' list
2055
+ this._options.modifiers = this._options.modifiers.map(function (modifier) {
2056
+ // remove ignored modifiers
2057
+ if (this._options.modifiersIgnored.indexOf(modifier) !== -1) return;
2058
+
2059
+ // set the x-placement attribute before everything else because it could be used to add margins to the popper
2060
+ // margins needs to be calculated to get the correct popper offsets
2061
+ if (modifier === 'applyStyle') {
2062
+ this._popper.setAttribute('x-placement', this._options.placement);
2063
+ }
2064
+
2065
+ // return predefined modifier identified by string or keep the custom one
2066
+ return this.modifiers[modifier] || modifier;
2067
+ }.bind(this));
2068
+
2069
+ // make sure to apply the popper position before any computation
2070
+ this.state.position = this._getPosition(this._popper, this._reference);
2071
+ setStyle(this._popper, {
2072
+ position: this.state.position,
2073
+ top: 0
2074
+ });
2075
+
2076
+ // fire the first update to position the popper in the right place
2077
+ this.update();
2078
+
2079
+ // setup event listeners, they will take care of update the position in specific situations
2080
+ this._setupEventListeners();
2081
+ return this;
2082
+ }
2083
+
2084
+ //
2085
+ // Methods
2086
+ //
2087
+ /**
2088
+ * Destroy the popper
2089
+ * @method
2090
+ * @memberof Popper
2091
+ */
2092
+ Popper.prototype.destroy = function () {
2093
+ this._popper.removeAttribute('x-placement');
2094
+ this._popper.style.left = '';
2095
+ this._popper.style.position = '';
2096
+ this._popper.style.top = '';
2097
+ this._popper.style[getSupportedPropertyName('transform')] = '';
2098
+ this._removeEventListeners();
2099
+
2100
+ // remove the popper if user explicity asked for the deletion on destroy
2101
+ if (this._options.removeOnDestroy) {
2102
+ this._popper.remove();
2103
+ }
2104
+ return this;
2105
+ };
2106
+
2107
+ /**
2108
+ * Updates the position of the popper, computing the new offsets and applying the new style
2109
+ * @method
2110
+ * @memberof Popper
2111
+ */
2112
+ Popper.prototype.update = function () {
2113
+ var data = {
2114
+ instance: this,
2115
+ styles: {}
2116
+ };
2117
+
2118
+ // store placement inside the data object, modifiers will be able to edit `placement` if needed
2119
+ // and refer to _originalPlacement to know the original value
2120
+ data.placement = this._options.placement;
2121
+ data._originalPlacement = this._options.placement;
2122
+
2123
+ // compute the popper and reference offsets and put them inside data.offsets
2124
+ data.offsets = this._getOffsets(this._popper, this._reference, data.placement);
2125
+
2126
+ // get boundaries
2127
+ data.boundaries = this._getBoundaries(data, this._options.boundariesPadding, this._options.boundariesElement);
2128
+ data = this.runModifiers(data, this._options.modifiers);
2129
+ if (typeof this.state.updateCallback === 'function') {
2130
+ this.state.updateCallback(data);
2131
+ }
2132
+ };
2133
+
2134
+ /**
2135
+ * If a function is passed, it will be executed after the initialization of popper with as first argument the Popper instance.
2136
+ * @method
2137
+ * @memberof Popper
2138
+ * @param {Function} callback
2139
+ */
2140
+ Popper.prototype.onCreate = function (callback) {
2141
+ // the createCallbacks return as first argument the popper instance
2142
+ callback(this);
2143
+ return this;
2144
+ };
2145
+
2146
+ /**
2147
+ * If a function is passed, it will be executed after each update of popper with as first argument the set of coordinates and informations
2148
+ * used to style popper and its arrow.
2149
+ * NOTE: it doesn't get fired on the first call of the `Popper.update()` method inside the `Popper` constructor!
2150
+ * @method
2151
+ * @memberof Popper
2152
+ * @param {Function} callback
2153
+ */
2154
+ Popper.prototype.onUpdate = function (callback) {
2155
+ this.state.updateCallback = callback;
2156
+ return this;
2157
+ };
2158
+
2159
+ /**
2160
+ * Helper used to generate poppers from a configuration file
2161
+ * @method
2162
+ * @memberof Popper
2163
+ * @param config {Object} configuration
2164
+ * @returns {HTMLElement} popper
2165
+ */
2166
+ Popper.prototype.parse = function (config) {
2167
+ var defaultConfig = {
2168
+ tagName: 'div',
2169
+ classNames: ['popper'],
2170
+ attributes: [],
2171
+ parent: root.document.body,
2172
+ content: '',
2173
+ contentType: 'text',
2174
+ arrowTagName: 'div',
2175
+ arrowClassNames: ['popper__arrow'],
2176
+ arrowAttributes: ['x-arrow']
2177
+ };
2178
+ config = Object.assign({}, defaultConfig, config);
2179
+ var d = root.document;
2180
+ var popper = d.createElement(config.tagName);
2181
+ addClassNames(popper, config.classNames);
2182
+ addAttributes(popper, config.attributes);
2183
+ if (config.contentType === 'node') {
2184
+ popper.appendChild(config.content.jquery ? config.content[0] : config.content);
2185
+ } else if (config.contentType === 'html') {
2186
+ popper.innerHTML = config.content;
2187
+ } else {
2188
+ popper.textContent = config.content;
2189
+ }
2190
+ if (config.arrowTagName) {
2191
+ var arrow = d.createElement(config.arrowTagName);
2192
+ addClassNames(arrow, config.arrowClassNames);
2193
+ addAttributes(arrow, config.arrowAttributes);
2194
+ popper.appendChild(arrow);
2195
+ }
2196
+ var parent = config.parent.jquery ? config.parent[0] : config.parent;
2197
+
2198
+ // if the given parent is a string, use it to match an element
2199
+ // if more than one element is matched, the first one will be used as parent
2200
+ // if no elements are matched, the script will throw an error
2201
+ if (typeof parent === 'string') {
2202
+ parent = d.querySelectorAll(config.parent);
2203
+ if (parent.length > 1) {
2204
+ console.warn('WARNING: the given `parent` query(' + config.parent + ') matched more than one element, the first one will be used');
2205
+ }
2206
+ if (parent.length === 0) {
2207
+ throw 'ERROR: the given `parent` doesn\'t exists!';
2208
+ }
2209
+ parent = parent[0];
2210
+ }
2211
+ // if the given parent is a DOM nodes list or an array of nodes with more than one element,
2212
+ // the first one will be used as parent
2213
+ if (parent.length > 1 && parent instanceof Element === false) {
2214
+ console.warn('WARNING: you have passed as parent a list of elements, the first one will be used');
2215
+ parent = parent[0];
2216
+ }
2217
+
2218
+ // append the generated popper to its parent
2219
+ parent.appendChild(popper);
2220
+ return popper;
2221
+
2222
+ /**
2223
+ * Adds class names to the given element
2224
+ * @function
2225
+ * @ignore
2226
+ * @param {HTMLElement} target
2227
+ * @param {Array} classes
2228
+ */
2229
+ function addClassNames(element, classNames) {
2230
+ classNames.forEach(function (className) {
2231
+ element.classList.add(className);
2232
+ });
2233
+ }
2234
+
2235
+ /**
2236
+ * Adds attributes to the given element
2237
+ * @function
2238
+ * @ignore
2239
+ * @param {HTMLElement} target
2240
+ * @param {Array} attributes
2241
+ * @example
2242
+ * addAttributes(element, [ 'data-info:foobar' ]);
2243
+ */
2244
+ function addAttributes(element, attributes) {
2245
+ attributes.forEach(function (attribute) {
2246
+ element.setAttribute(attribute.split(':')[0], attribute.split(':')[1] || '');
2247
+ });
2248
+ }
2249
+ };
2250
+
2251
+ /**
2252
+ * Helper used to get the position which will be applied to the popper
2253
+ * @method
2254
+ * @memberof Popper
2255
+ * @param config {HTMLElement} popper element
2256
+ * @param reference {HTMLElement} reference element
2257
+ * @returns {String} position
2258
+ */
2259
+ Popper.prototype._getPosition = function (popper, reference) {
2260
+ var container = getOffsetParent(reference);
2261
+ if (this._options.forceAbsolute) {
2262
+ return 'absolute';
2263
+ }
2264
+
2265
+ // Decide if the popper will be fixed
2266
+ // If the reference element is inside a fixed context, the popper will be fixed as well to allow them to scroll together
2267
+ var isParentFixed = isFixed(reference, container);
2268
+ return isParentFixed ? 'fixed' : 'absolute';
2269
+ };
2270
+
2271
+ /**
2272
+ * Get offsets to the popper
2273
+ * @method
2274
+ * @memberof Popper
2275
+ * @access private
2276
+ * @param {Element} popper - the popper element
2277
+ * @param {Element} reference - the reference element (the popper will be relative to this)
2278
+ * @returns {Object} An object containing the offsets which will be applied to the popper
2279
+ */
2280
+ Popper.prototype._getOffsets = function (popper, reference, placement) {
2281
+ placement = placement.split('-')[0];
2282
+ var popperOffsets = {};
2283
+ popperOffsets.position = this.state.position;
2284
+ var isParentFixed = popperOffsets.position === 'fixed';
2285
+
2286
+ //
2287
+ // Get reference element position
2288
+ //
2289
+ var referenceOffsets = getOffsetRectRelativeToCustomParent(reference, getOffsetParent(popper), isParentFixed);
2290
+
2291
+ //
2292
+ // Get popper sizes
2293
+ //
2294
+ var popperRect = getOuterSizes(popper);
2295
+
2296
+ //
2297
+ // Compute offsets of popper
2298
+ //
2299
+
2300
+ // depending by the popper placement we have to compute its offsets slightly differently
2301
+ if (['right', 'left'].indexOf(placement) !== -1) {
2302
+ popperOffsets.top = referenceOffsets.top + referenceOffsets.height / 2 - popperRect.height / 2;
2303
+ if (placement === 'left') {
2304
+ popperOffsets.left = referenceOffsets.left - popperRect.width;
2305
+ } else {
2306
+ popperOffsets.left = referenceOffsets.right;
2307
+ }
2308
+ } else {
2309
+ popperOffsets.left = referenceOffsets.left + referenceOffsets.width / 2 - popperRect.width / 2;
2310
+ if (placement === 'top') {
2311
+ popperOffsets.top = referenceOffsets.top - popperRect.height;
2312
+ } else {
2313
+ popperOffsets.top = referenceOffsets.bottom;
2314
+ }
2315
+ }
2316
+
2317
+ // Add width and height to our offsets object
2318
+ popperOffsets.width = popperRect.width;
2319
+ popperOffsets.height = popperRect.height;
2320
+ return {
2321
+ popper: popperOffsets,
2322
+ reference: referenceOffsets
2323
+ };
2324
+ };
2325
+
2326
+ /**
2327
+ * Setup needed event listeners used to update the popper position
2328
+ * @method
2329
+ * @memberof Popper
2330
+ * @access private
2331
+ */
2332
+ Popper.prototype._setupEventListeners = function () {
2333
+ // NOTE: 1 DOM access here
2334
+ this.state.updateBound = this.update.bind(this);
2335
+ root.addEventListener('resize', this.state.updateBound);
2336
+ // if the boundariesElement is window we don't need to listen for the scroll event
2337
+ if (this._options.boundariesElement !== 'window') {
2338
+ var target = getScrollParent(this._reference);
2339
+ // here it could be both `body` or `documentElement` thanks to Firefox, we then check both
2340
+ if (target === root.document.body || target === root.document.documentElement) {
2341
+ target = root;
2342
+ }
2343
+ target.addEventListener('scroll', this.state.updateBound);
2344
+ this.state.scrollTarget = target;
2345
+ }
2346
+ };
2347
+
2348
+ /**
2349
+ * Remove event listeners used to update the popper position
2350
+ * @method
2351
+ * @memberof Popper
2352
+ * @access private
2353
+ */
2354
+ Popper.prototype._removeEventListeners = function () {
2355
+ // NOTE: 1 DOM access here
2356
+ root.removeEventListener('resize', this.state.updateBound);
2357
+ if (this._options.boundariesElement !== 'window' && this.state.scrollTarget) {
2358
+ this.state.scrollTarget.removeEventListener('scroll', this.state.updateBound);
2359
+ this.state.scrollTarget = null;
2360
+ }
2361
+ this.state.updateBound = null;
2362
+ };
2363
+
2364
+ /**
2365
+ * Computed the boundaries limits and return them
2366
+ * @method
2367
+ * @memberof Popper
2368
+ * @access private
2369
+ * @param {Object} data - Object containing the property "offsets" generated by `_getOffsets`
2370
+ * @param {Number} padding - Boundaries padding
2371
+ * @param {Element} boundariesElement - Element used to define the boundaries
2372
+ * @returns {Object} Coordinates of the boundaries
2373
+ */
2374
+ Popper.prototype._getBoundaries = function (data, padding, boundariesElement) {
2375
+ // NOTE: 1 DOM access here
2376
+ var boundaries = {};
2377
+ var width, height;
2378
+ if (boundariesElement === 'window') {
2379
+ var body = root.document.body,
2380
+ html = root.document.documentElement;
2381
+ height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
2382
+ width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
2383
+ boundaries = {
2384
+ top: 0,
2385
+ right: width,
2386
+ bottom: height,
2387
+ left: 0
2388
+ };
2389
+ } else if (boundariesElement === 'viewport') {
2390
+ var offsetParent = getOffsetParent(this._popper);
2391
+ var scrollParent = getScrollParent(this._popper);
2392
+ var offsetParentRect = getOffsetRect(offsetParent);
2393
+
2394
+ // Thanks the fucking native API, `document.body.scrollTop` & `document.documentElement.scrollTop`
2395
+ var getScrollTopValue = function getScrollTopValue(element) {
2396
+ return element == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : element.scrollTop;
2397
+ };
2398
+ var getScrollLeftValue = function getScrollLeftValue(element) {
2399
+ return element == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : element.scrollLeft;
2400
+ };
2401
+
2402
+ // if the popper is fixed we don't have to substract scrolling from the boundaries
2403
+ var scrollTop = data.offsets.popper.position === 'fixed' ? 0 : getScrollTopValue(scrollParent);
2404
+ var scrollLeft = data.offsets.popper.position === 'fixed' ? 0 : getScrollLeftValue(scrollParent);
2405
+ boundaries = {
2406
+ top: 0 - (offsetParentRect.top - scrollTop),
2407
+ right: root.document.documentElement.clientWidth - (offsetParentRect.left - scrollLeft),
2408
+ bottom: root.document.documentElement.clientHeight - (offsetParentRect.top - scrollTop),
2409
+ left: 0 - (offsetParentRect.left - scrollLeft)
2410
+ };
2411
+ } else {
2412
+ if (getOffsetParent(this._popper) === boundariesElement) {
2413
+ boundaries = {
2414
+ top: 0,
2415
+ left: 0,
2416
+ right: boundariesElement.clientWidth,
2417
+ bottom: boundariesElement.clientHeight
2418
+ };
2419
+ } else {
2420
+ boundaries = getOffsetRect(boundariesElement);
2421
+ }
2422
+ }
2423
+ boundaries.left += padding;
2424
+ boundaries.right -= padding;
2425
+ boundaries.top = boundaries.top + padding;
2426
+ boundaries.bottom = boundaries.bottom - padding;
2427
+ return boundaries;
2428
+ };
2429
+
2430
+ /**
2431
+ * Loop trough the list of modifiers and run them in order, each of them will then edit the data object
2432
+ * @method
2433
+ * @memberof Popper
2434
+ * @access public
2435
+ * @param {Object} data
2436
+ * @param {Array} modifiers
2437
+ * @param {Function} ends
2438
+ */
2439
+ Popper.prototype.runModifiers = function (data, modifiers, ends) {
2440
+ var modifiersToRun = modifiers.slice();
2441
+ if (ends !== undefined) {
2442
+ modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
2443
+ }
2444
+ modifiersToRun.forEach(function (modifier) {
2445
+ if (isFunction(modifier)) {
2446
+ data = modifier.call(this, data);
2447
+ }
2448
+ }.bind(this));
2449
+ return data;
2450
+ };
2451
+
2452
+ /**
2453
+ * Helper used to know if the given modifier depends from another one.
2454
+ * @method
2455
+ * @memberof Popper
2456
+ * @param {String} requesting - name of requesting modifier
2457
+ * @param {String} requested - name of requested modifier
2458
+ * @returns {Boolean}
2459
+ */
2460
+ Popper.prototype.isModifierRequired = function (requesting, requested) {
2461
+ var index = getArrayKeyIndex(this._options.modifiers, requesting);
2462
+ return !!this._options.modifiers.slice(0, index).filter(function (modifier) {
2463
+ return modifier === requested;
2464
+ }).length;
2465
+ };
2466
+
2467
+ //
2468
+ // Modifiers
2469
+ //
2470
+
2471
+ /**
2472
+ * Modifiers list
2473
+ * @namespace Popper.modifiers
2474
+ * @memberof Popper
2475
+ * @type {Object}
2476
+ */
2477
+ Popper.prototype.modifiers = {};
2478
+
2479
+ /**
2480
+ * Apply the computed styles to the popper element
2481
+ * @method
2482
+ * @memberof Popper.modifiers
2483
+ * @argument {Object} data - The data object generated by `update` method
2484
+ * @returns {Object} The same data object
2485
+ */
2486
+ Popper.prototype.modifiers.applyStyle = function (data) {
2487
+ // apply the final offsets to the popper
2488
+ // NOTE: 1 DOM access here
2489
+ var styles = {
2490
+ position: data.offsets.popper.position
2491
+ };
2492
+
2493
+ // round top and left to avoid blurry text
2494
+ var left = Math.round(data.offsets.popper.left);
2495
+ var top = Math.round(data.offsets.popper.top);
2496
+
2497
+ // if gpuAcceleration is set to true and transform is supported, we use `translate3d` to apply the position to the popper
2498
+ // we automatically use the supported prefixed version if needed
2499
+ var prefixedProperty;
2500
+ if (this._options.gpuAcceleration && (prefixedProperty = getSupportedPropertyName('transform'))) {
2501
+ styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
2502
+ styles.top = 0;
2503
+ styles.left = 0;
2504
+ }
2505
+ // othwerise, we use the standard `left` and `top` properties
2506
+ else {
2507
+ styles.left = left;
2508
+ styles.top = top;
2509
+ }
2510
+
2511
+ // any property present in `data.styles` will be applied to the popper,
2512
+ // in this way we can make the 3rd party modifiers add custom styles to it
2513
+ // Be aware, modifiers could override the properties defined in the previous
2514
+ // lines of this modifier!
2515
+ Object.assign(styles, data.styles);
2516
+ setStyle(this._popper, styles);
2517
+
2518
+ // set an attribute which will be useful to style the tooltip (use it to properly position its arrow)
2519
+ // NOTE: 1 DOM access here
2520
+ this._popper.setAttribute('x-placement', data.placement);
2521
+
2522
+ // if the arrow modifier is required and the arrow style has been computed, apply the arrow style
2523
+ if (this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && data.offsets.arrow) {
2524
+ setStyle(data.arrowElement, data.offsets.arrow);
2525
+ }
2526
+ return data;
2527
+ };
2528
+
2529
+ /**
2530
+ * Modifier used to shift the popper on the start or end of its reference element side
2531
+ * @method
2532
+ * @memberof Popper.modifiers
2533
+ * @argument {Object} data - The data object generated by `update` method
2534
+ * @returns {Object} The data object, properly modified
2535
+ */
2536
+ Popper.prototype.modifiers.shift = function (data) {
2537
+ var placement = data.placement;
2538
+ var basePlacement = placement.split('-')[0];
2539
+ var shiftVariation = placement.split('-')[1];
2540
+
2541
+ // if shift shiftVariation is specified, run the modifier
2542
+ if (shiftVariation) {
2543
+ var reference = data.offsets.reference;
2544
+ var popper = getPopperClientRect(data.offsets.popper);
2545
+ var shiftOffsets = {
2546
+ y: {
2547
+ start: {
2548
+ top: reference.top
2549
+ },
2550
+ end: {
2551
+ top: reference.top + reference.height - popper.height
2552
+ }
2553
+ },
2554
+ x: {
2555
+ start: {
2556
+ left: reference.left
2557
+ },
2558
+ end: {
2559
+ left: reference.left + reference.width - popper.width
2560
+ }
2561
+ }
2562
+ };
2563
+ var axis = ['bottom', 'top'].indexOf(basePlacement) !== -1 ? 'x' : 'y';
2564
+ data.offsets.popper = Object.assign(popper, shiftOffsets[axis][shiftVariation]);
2565
+ }
2566
+ return data;
2567
+ };
2568
+
2569
+ /**
2570
+ * Modifier used to make sure the popper does not overflows from it's boundaries
2571
+ * @method
2572
+ * @memberof Popper.modifiers
2573
+ * @argument {Object} data - The data object generated by `update` method
2574
+ * @returns {Object} The data object, properly modified
2575
+ */
2576
+ Popper.prototype.modifiers.preventOverflow = function (data) {
2577
+ var order = this._options.preventOverflowOrder;
2578
+ var popper = getPopperClientRect(data.offsets.popper);
2579
+ var check = {
2580
+ left: function left() {
2581
+ var left = popper.left;
2582
+ if (popper.left < data.boundaries.left) {
2583
+ left = Math.max(popper.left, data.boundaries.left);
2584
+ }
2585
+ return {
2586
+ left: left
2587
+ };
2588
+ },
2589
+ right: function right() {
2590
+ var left = popper.left;
2591
+ if (popper.right > data.boundaries.right) {
2592
+ left = Math.min(popper.left, data.boundaries.right - popper.width);
2593
+ }
2594
+ return {
2595
+ left: left
2596
+ };
2597
+ },
2598
+ top: function top() {
2599
+ var top = popper.top;
2600
+ if (popper.top < data.boundaries.top) {
2601
+ top = Math.max(popper.top, data.boundaries.top);
2602
+ }
2603
+ return {
2604
+ top: top
2605
+ };
2606
+ },
2607
+ bottom: function bottom() {
2608
+ var top = popper.top;
2609
+ if (popper.bottom > data.boundaries.bottom) {
2610
+ top = Math.min(popper.top, data.boundaries.bottom - popper.height);
2611
+ }
2612
+ return {
2613
+ top: top
2614
+ };
2615
+ }
2616
+ };
2617
+ order.forEach(function (direction) {
2618
+ data.offsets.popper = Object.assign(popper, check[direction]());
2619
+ });
2620
+ return data;
2621
+ };
2622
+
2623
+ /**
2624
+ * Modifier used to make sure the popper is always near its reference
2625
+ * @method
2626
+ * @memberof Popper.modifiers
2627
+ * @argument {Object} data - The data object generated by _update method
2628
+ * @returns {Object} The data object, properly modified
2629
+ */
2630
+ Popper.prototype.modifiers.keepTogether = function (data) {
2631
+ var popper = getPopperClientRect(data.offsets.popper);
2632
+ var reference = data.offsets.reference;
2633
+ var f = Math.floor;
2634
+ if (popper.right < f(reference.left)) {
2635
+ data.offsets.popper.left = f(reference.left) - popper.width;
2636
+ }
2637
+ if (popper.left > f(reference.right)) {
2638
+ data.offsets.popper.left = f(reference.right);
2639
+ }
2640
+ if (popper.bottom < f(reference.top)) {
2641
+ data.offsets.popper.top = f(reference.top) - popper.height;
2642
+ }
2643
+ if (popper.top > f(reference.bottom)) {
2644
+ data.offsets.popper.top = f(reference.bottom);
2645
+ }
2646
+ return data;
2647
+ };
2648
+
2649
+ /**
2650
+ * Modifier used to flip the placement of the popper when the latter is starting overlapping its reference element.
2651
+ * Requires the `preventOverflow` modifier before it in order to work.
2652
+ * **NOTE:** This modifier will run all its previous modifiers everytime it tries to flip the popper!
2653
+ * @method
2654
+ * @memberof Popper.modifiers
2655
+ * @argument {Object} data - The data object generated by _update method
2656
+ * @returns {Object} The data object, properly modified
2657
+ */
2658
+ Popper.prototype.modifiers.flip = function (data) {
2659
+ // check if preventOverflow is in the list of modifiers before the flip modifier.
2660
+ // otherwise flip would not work as expected.
2661
+ if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow)) {
2662
+ console.warn('WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!');
2663
+ return data;
2664
+ }
2665
+ if (data.flipped && data.placement === data._originalPlacement) {
2666
+ // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
2667
+ return data;
2668
+ }
2669
+ var placement = data.placement.split('-')[0];
2670
+ var placementOpposite = getOppositePlacement(placement);
2671
+ var variation = data.placement.split('-')[1] || '';
2672
+ var flipOrder = [];
2673
+ if (this._options.flipBehavior === 'flip') {
2674
+ flipOrder = [placement, placementOpposite];
2675
+ } else {
2676
+ flipOrder = this._options.flipBehavior;
2677
+ }
2678
+ flipOrder.forEach(function (step, index) {
2679
+ if (placement !== step || flipOrder.length === index + 1) {
2680
+ return;
2681
+ }
2682
+ placement = data.placement.split('-')[0];
2683
+ placementOpposite = getOppositePlacement(placement);
2684
+ var popperOffsets = getPopperClientRect(data.offsets.popper);
2685
+
2686
+ // this boolean is used to distinguish right and bottom from top and left
2687
+ // they need different computations to get flipped
2688
+ var a = ['right', 'bottom'].indexOf(placement) !== -1;
2689
+
2690
+ // using Math.floor because the reference offsets may contain decimals we are not going to consider here
2691
+ if (a && Math.floor(data.offsets.reference[placement]) > Math.floor(popperOffsets[placementOpposite]) || !a && Math.floor(data.offsets.reference[placement]) < Math.floor(popperOffsets[placementOpposite])) {
2692
+ // we'll use this boolean to detect any flip loop
2693
+ data.flipped = true;
2694
+ data.placement = flipOrder[index + 1];
2695
+ if (variation) {
2696
+ data.placement += '-' + variation;
2697
+ }
2698
+ data.offsets.popper = this._getOffsets(this._popper, this._reference, data.placement).popper;
2699
+ data = this.runModifiers(data, this._options.modifiers, this._flip);
2700
+ }
2701
+ }.bind(this));
2702
+ return data;
2703
+ };
2704
+
2705
+ /**
2706
+ * Modifier used to add an offset to the popper, useful if you more granularity positioning your popper.
2707
+ * The offsets will shift the popper on the side of its reference element.
2708
+ * @method
2709
+ * @memberof Popper.modifiers
2710
+ * @argument {Object} data - The data object generated by _update method
2711
+ * @returns {Object} The data object, properly modified
2712
+ */
2713
+ Popper.prototype.modifiers.offset = function (data) {
2714
+ var offset = this._options.offset;
2715
+ var popper = data.offsets.popper;
2716
+ if (data.placement.indexOf('left') !== -1) {
2717
+ popper.top -= offset;
2718
+ } else if (data.placement.indexOf('right') !== -1) {
2719
+ popper.top += offset;
2720
+ } else if (data.placement.indexOf('top') !== -1) {
2721
+ popper.left -= offset;
2722
+ } else if (data.placement.indexOf('bottom') !== -1) {
2723
+ popper.left += offset;
2724
+ }
2725
+ return data;
2726
+ };
2727
+
2728
+ /**
2729
+ * Modifier used to move the arrows on the edge of the popper to make sure them are always between the popper and the reference element
2730
+ * It will use the CSS outer size of the arrow element to know how many pixels of conjuction are needed
2731
+ * @method
2732
+ * @memberof Popper.modifiers
2733
+ * @argument {Object} data - The data object generated by _update method
2734
+ * @returns {Object} The data object, properly modified
2735
+ */
2736
+ Popper.prototype.modifiers.arrow = function (data) {
2737
+ var arrow = this._options.arrowElement;
2738
+ var arrowOffset = this._options.arrowOffset;
2739
+
2740
+ // if the arrowElement is a string, suppose it's a CSS selector
2741
+ if (typeof arrow === 'string') {
2742
+ arrow = this._popper.querySelector(arrow);
2743
+ }
2744
+
2745
+ // if arrow element is not found, don't run the modifier
2746
+ if (!arrow) {
2747
+ return data;
2748
+ }
2749
+
2750
+ // the arrow element must be child of its popper
2751
+ if (!this._popper.contains(arrow)) {
2752
+ console.warn('WARNING: `arrowElement` must be child of its popper element!');
2753
+ return data;
2754
+ }
2755
+
2756
+ // arrow depends on keepTogether in order to work
2757
+ if (!this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether)) {
2758
+ console.warn('WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!');
2759
+ return data;
2760
+ }
2761
+ var arrowStyle = {};
2762
+ var placement = data.placement.split('-')[0];
2763
+ var popper = getPopperClientRect(data.offsets.popper);
2764
+ var reference = data.offsets.reference;
2765
+ var isVertical = ['left', 'right'].indexOf(placement) !== -1;
2766
+ var len = isVertical ? 'height' : 'width';
2767
+ var side = isVertical ? 'top' : 'left';
2768
+ var translate = isVertical ? 'translateY' : 'translateX';
2769
+ var altSide = isVertical ? 'left' : 'top';
2770
+ var opSide = isVertical ? 'bottom' : 'right';
2771
+ var arrowSize = getOuterSizes(arrow)[len];
2772
+
2773
+ //
2774
+ // extends keepTogether behavior making sure the popper and its reference have enough pixels in conjuction
2775
+ //
2776
+
2777
+ // top/left side
2778
+ if (reference[opSide] - arrowSize < popper[side]) {
2779
+ data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowSize);
2780
+ }
2781
+ // bottom/right side
2782
+ if (reference[side] + arrowSize > popper[opSide]) {
2783
+ data.offsets.popper[side] += reference[side] + arrowSize - popper[opSide];
2784
+ }
2785
+
2786
+ // compute center of the popper
2787
+ var center = reference[side] + (arrowOffset || reference[len] / 2 - arrowSize / 2);
2788
+ var sideValue = center - popper[side];
2789
+
2790
+ // prevent arrow from being placed not contiguously to its popper
2791
+ sideValue = Math.max(Math.min(popper[len] - arrowSize - 8, sideValue), 8);
2792
+ arrowStyle[side] = sideValue;
2793
+ arrowStyle[altSide] = ''; // make sure to remove any old style from the arrow
2794
+
2795
+ data.offsets.arrow = arrowStyle;
2796
+ data.arrowElement = arrow;
2797
+ return data;
2798
+ };
2799
+
2800
+ //
2801
+ // Helpers
2802
+ //
2803
+
2804
+ /**
2805
+ * Get the outer sizes of the given element (offset size + margins)
2806
+ * @function
2807
+ * @ignore
2808
+ * @argument {Element} element
2809
+ * @returns {Object} object containing width and height properties
2810
+ */
2811
+ function getOuterSizes(element) {
2812
+ // NOTE: 1 DOM access here
2813
+ var _display = element.style.display,
2814
+ _visibility = element.style.visibility;
2815
+ element.style.display = 'block';
2816
+ element.style.visibility = 'hidden';
2817
+ var calcWidthToForceRepaint = element.offsetWidth;
2818
+
2819
+ // original method
2820
+ var styles = root.getComputedStyle(element);
2821
+ var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
2822
+ var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
2823
+ var result = {
2824
+ width: element.offsetWidth + y,
2825
+ height: element.offsetHeight + x
2826
+ };
2827
+
2828
+ // reset element styles
2829
+ element.style.display = _display;
2830
+ element.style.visibility = _visibility;
2831
+ return result;
2832
+ }
2833
+
2834
+ /**
2835
+ * Get the opposite placement of the given one/
2836
+ * @function
2837
+ * @ignore
2838
+ * @argument {String} placement
2839
+ * @returns {String} flipped placement
2840
+ */
2841
+ function getOppositePlacement(placement) {
2842
+ var hash = {
2843
+ left: 'right',
2844
+ right: 'left',
2845
+ bottom: 'top',
2846
+ top: 'bottom'
2847
+ };
2848
+ return placement.replace(/left|right|bottom|top/g, function (matched) {
2849
+ return hash[matched];
2850
+ });
2851
+ }
2852
+
2853
+ /**
2854
+ * Given the popper offsets, generate an output similar to getBoundingClientRect
2855
+ * @function
2856
+ * @ignore
2857
+ * @argument {Object} popperOffsets
2858
+ * @returns {Object} ClientRect like output
2859
+ */
2860
+ function getPopperClientRect(popperOffsets) {
2861
+ var offsets = Object.assign({}, popperOffsets);
2862
+ offsets.right = offsets.left + offsets.width;
2863
+ offsets.bottom = offsets.top + offsets.height;
2864
+ return offsets;
2865
+ }
2866
+
2867
+ /**
2868
+ * Given an array and the key to find, returns its index
2869
+ * @function
2870
+ * @ignore
2871
+ * @argument {Array} arr
2872
+ * @argument keyToFind
2873
+ * @returns index or null
2874
+ */
2875
+ function getArrayKeyIndex(arr, keyToFind) {
2876
+ var i = 0,
2877
+ key;
2878
+ for (key in arr) {
2879
+ if (arr[key] === keyToFind) {
2880
+ return i;
2881
+ }
2882
+ i++;
2883
+ }
2884
+ return null;
2885
+ }
2886
+
2887
+ /**
2888
+ * Get CSS computed property of the given element
2889
+ * @function
2890
+ * @ignore
2891
+ * @argument {Eement} element
2892
+ * @argument {String} property
2893
+ */
2894
+ function getStyleComputedProperty(element, property) {
2895
+ // NOTE: 1 DOM access here
2896
+ var css = root.getComputedStyle(element, null);
2897
+ return css[property];
2898
+ }
2899
+
2900
+ /**
2901
+ * Returns the offset parent of the given element
2902
+ * @function
2903
+ * @ignore
2904
+ * @argument {Element} element
2905
+ * @returns {Element} offset parent
2906
+ */
2907
+ function getOffsetParent(element) {
2908
+ // NOTE: 1 DOM access here
2909
+ var offsetParent = element.offsetParent;
2910
+ return offsetParent === root.document.body || !offsetParent ? root.document.documentElement : offsetParent;
2911
+ }
2912
+
2913
+ /**
2914
+ * Returns the scrolling parent of the given element
2915
+ * @function
2916
+ * @ignore
2917
+ * @argument {Element} element
2918
+ * @returns {Element} offset parent
2919
+ */
2920
+ function getScrollParent(element) {
2921
+ var parent = element.parentNode;
2922
+ if (!parent) {
2923
+ return element;
2924
+ }
2925
+ if (parent === root.document) {
2926
+ // Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is
2927
+ // greater than 0 and return the proper element
2928
+ if (root.document.body.scrollTop || root.document.body.scrollLeft) {
2929
+ return root.document.body;
2930
+ } else {
2931
+ return root.document.documentElement;
2932
+ }
2933
+ }
2934
+
2935
+ // Firefox want us to check `-x` and `-y` variations as well
2936
+ if (['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-x')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-y')) !== -1) {
2937
+ // If the detected scrollParent is body, we perform an additional check on its parentNode
2938
+ // in this way we'll get body if the browser is Chrome-ish, or documentElement otherwise
2939
+ // fixes issue #65
2940
+ return parent;
2941
+ }
2942
+ return getScrollParent(element.parentNode);
2943
+ }
2944
+
2945
+ /**
2946
+ * Check if the given element is fixed or is inside a fixed parent
2947
+ * @function
2948
+ * @ignore
2949
+ * @argument {Element} element
2950
+ * @argument {Element} customContainer
2951
+ * @returns {Boolean} answer to "isFixed?"
2952
+ */
2953
+ function isFixed(element) {
2954
+ if (element === root.document.body) {
2955
+ return false;
2956
+ }
2957
+ if (getStyleComputedProperty(element, 'position') === 'fixed') {
2958
+ return true;
2959
+ }
2960
+ return element.parentNode ? isFixed(element.parentNode) : element;
2961
+ }
2962
+
2963
+ /**
2964
+ * Set the style to the given popper
2965
+ * @function
2966
+ * @ignore
2967
+ * @argument {Element} element - Element to apply the style to
2968
+ * @argument {Object} styles - Object with a list of properties and values which will be applied to the element
2969
+ */
2970
+ function setStyle(element, styles) {
2971
+ function is_numeric(n) {
2972
+ return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
2973
+ }
2974
+ Object.keys(styles).forEach(function (prop) {
2975
+ var unit = '';
2976
+ // add unit if the value is numeric and is one of the following
2977
+ if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && is_numeric(styles[prop])) {
2978
+ unit = 'px';
2979
+ }
2980
+ element.style[prop] = styles[prop] + unit;
2981
+ });
2982
+ }
2983
+
2984
+ /**
2985
+ * Check if the given variable is a function
2986
+ * @function
2987
+ * @ignore
2988
+ * @argument {*} functionToCheck - variable to check
2989
+ * @returns {Boolean} answer to: is a function?
2990
+ */
2991
+ function isFunction(functionToCheck) {
2992
+ var getType = {};
2993
+ return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
2994
+ }
2995
+
2996
+ /**
2997
+ * Get the position of the given element, relative to its offset parent
2998
+ * @function
2999
+ * @ignore
3000
+ * @param {Element} element
3001
+ * @return {Object} position - Coordinates of the element and its `scrollTop`
3002
+ */
3003
+ function getOffsetRect(element) {
3004
+ var elementRect = {
3005
+ width: element.offsetWidth,
3006
+ height: element.offsetHeight,
3007
+ left: element.offsetLeft,
3008
+ top: element.offsetTop
3009
+ };
3010
+ elementRect.right = elementRect.left + elementRect.width;
3011
+ elementRect.bottom = elementRect.top + elementRect.height;
3012
+
3013
+ // position
3014
+ return elementRect;
3015
+ }
3016
+
3017
+ /**
3018
+ * Get bounding client rect of given element
3019
+ * @function
3020
+ * @ignore
3021
+ * @param {HTMLElement} element
3022
+ * @return {Object} client rect
3023
+ */
3024
+ function getBoundingClientRect(element) {
3025
+ var rect = element.getBoundingClientRect();
3026
+
3027
+ // whether the IE version is lower than 11
3028
+ var isIE = navigator.userAgent.indexOf("MSIE") != -1;
3029
+
3030
+ // fix ie document bounding top always 0 bug
3031
+ var rectTop = isIE && element.tagName === 'HTML' ? -element.scrollTop : rect.top;
3032
+ return {
3033
+ left: rect.left,
3034
+ top: rectTop,
3035
+ right: rect.right,
3036
+ bottom: rect.bottom,
3037
+ width: rect.right - rect.left,
3038
+ height: rect.bottom - rectTop
3039
+ };
3040
+ }
3041
+
3042
+ /**
3043
+ * Given an element and one of its parents, return the offset
3044
+ * @function
3045
+ * @ignore
3046
+ * @param {HTMLElement} element
3047
+ * @param {HTMLElement} parent
3048
+ * @return {Object} rect
3049
+ */
3050
+ function getOffsetRectRelativeToCustomParent(element, parent, fixed) {
3051
+ var elementRect = getBoundingClientRect(element);
3052
+ var parentRect = getBoundingClientRect(parent);
3053
+ if (fixed) {
3054
+ var scrollParent = getScrollParent(parent);
3055
+ parentRect.top += scrollParent.scrollTop;
3056
+ parentRect.bottom += scrollParent.scrollTop;
3057
+ parentRect.left += scrollParent.scrollLeft;
3058
+ parentRect.right += scrollParent.scrollLeft;
3059
+ }
3060
+ var rect = {
3061
+ top: elementRect.top - parentRect.top,
3062
+ left: elementRect.left - parentRect.left,
3063
+ bottom: elementRect.top - parentRect.top + elementRect.height,
3064
+ right: elementRect.left - parentRect.left + elementRect.width,
3065
+ width: elementRect.width,
3066
+ height: elementRect.height
3067
+ };
3068
+ return rect;
3069
+ }
3070
+
3071
+ /**
3072
+ * Get the prefixed supported property name
3073
+ * @function
3074
+ * @ignore
3075
+ * @argument {String} property (camelCase)
3076
+ * @returns {String} prefixed property (camelCase)
3077
+ */
3078
+ function getSupportedPropertyName(property) {
3079
+ var prefixes = ['', 'ms', 'webkit', 'moz', 'o'];
3080
+ for (var i = 0; i < prefixes.length; i++) {
3081
+ var toCheck = prefixes[i] ? prefixes[i] + property.charAt(0).toUpperCase() + property.slice(1) : property;
3082
+ if (typeof root.document.body.style[toCheck] !== 'undefined') {
3083
+ return toCheck;
3084
+ }
3085
+ }
3086
+ return null;
3087
+ }
3088
+
3089
+ /**
3090
+ * The Object.assign() method is used to copy the values of all enumerable own properties from one or more source
3091
+ * objects to a target object. It will return the target object.
3092
+ * This polyfill doesn't support symbol properties, since ES5 doesn't have symbols anyway
3093
+ * Source: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
3094
+ * @function
3095
+ * @ignore
3096
+ */
3097
+ if (!Object.assign) {
3098
+ Object.defineProperty(Object, 'assign', {
3099
+ enumerable: false,
3100
+ configurable: true,
3101
+ writable: true,
3102
+ value: function value(target) {
3103
+ if (target === undefined || target === null) {
3104
+ throw new TypeError('Cannot convert first argument to object');
3105
+ }
3106
+ var to = Object(target);
3107
+ for (var i = 1; i < arguments.length; i++) {
3108
+ var nextSource = arguments[i];
3109
+ if (nextSource === undefined || nextSource === null) {
3110
+ continue;
3111
+ }
3112
+ nextSource = Object(nextSource);
3113
+ var keysArray = Object.keys(nextSource);
3114
+ for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
3115
+ var nextKey = keysArray[nextIndex];
3116
+ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
3117
+ if (desc !== undefined && desc.enumerable) {
3118
+ to[nextKey] = nextSource[nextKey];
3119
+ }
3120
+ }
3121
+ }
3122
+ return to;
3123
+ }
3124
+ });
3125
+ }
3126
+ return Popper;
3127
+ });
3128
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(67)(module)))
3129
+
3130
+ /***/ }),
3131
+
3132
+ /***/ 74:
695
3133
  /***/ (function(module, exports) {
696
3134
 
697
- module.exports = require("element-ui/lib/utils/vue-popper");
3135
+ module.exports = require("core-js/modules/es.object.get-own-property-descriptor.js");
698
3136
 
699
3137
  /***/ })
700
3138