kz-ui-base 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/index.js +5 -0
  2. package/kztool/css/10.96cad523.css +1 -0
  3. package/kztool/css/11.e4c864cd.css +1 -0
  4. package/kztool/css/12.647fccce.css +1 -0
  5. package/kztool/css/13.65952a1f.css +1 -0
  6. package/kztool/css/14.dd36c45f.css +1 -0
  7. package/kztool/css/15.832c7deb.css +1 -0
  8. package/kztool/css/16.8b271d59.css +1 -0
  9. package/kztool/css/17.0e84559e.css +1 -0
  10. package/kztool/css/18.832c7deb.css +1 -0
  11. package/kztool/css/19.6a3d2dce.css +1 -0
  12. package/kztool/css/2.f1342bd9.css +1 -0
  13. package/kztool/css/20.bb41fc34.css +1 -0
  14. package/kztool/css/21.ed73c08f.css +1 -0
  15. package/kztool/css/22.e894eb6f.css +1 -0
  16. package/kztool/css/23.57aa83b4.css +1 -0
  17. package/kztool/css/25.5f134180.css +1 -0
  18. package/kztool/css/26.832c7deb.css +1 -0
  19. package/kztool/css/4.a42922b4.css +1 -0
  20. package/kztool/css/6.2fd4b699.css +1 -0
  21. package/kztool/css/7.9be14673.css +21 -0
  22. package/kztool/css/9.9d93e54d.css +22 -0
  23. package/kztool/demo.html +10 -0
  24. package/kztool/img/401.089007e7.gif +0 -0
  25. package/kztool/img/404.a57b6f31.png +0 -0
  26. package/kztool/img/404.cb2515ac.svg +1 -0
  27. package/kztool/img/404_cloud.0f4bc32b.png +0 -0
  28. package/kztool/img/bug.f34b1328.svg +1 -0
  29. package/kztool/img/build.afff0ba4.svg +1 -0
  30. package/kztool/img/button.43a072f1.svg +1 -0
  31. package/kztool/img/cascader.af4b06f5.svg +1 -0
  32. package/kztool/img/chart.15fe45db.svg +1 -0
  33. package/kztool/img/checkbox.33950d05.svg +1 -0
  34. package/kztool/img/client.8669e2c6.svg +1 -0
  35. package/kztool/img/clipboard.a754c187.svg +1 -0
  36. package/kztool/img/code.21a8c1ce.svg +1 -0
  37. package/kztool/img/color.d6e1d0d9.svg +1 -0
  38. package/kztool/img/component.a69885f8.svg +1 -0
  39. package/kztool/img/dark.412ca67e.svg +39 -0
  40. package/kztool/img/dashboard.28a2a850.svg +1 -0
  41. package/kztool/img/date-range.21c0ab78.svg +1 -0
  42. package/kztool/img/date.43878da9.svg +1 -0
  43. package/kztool/img/dict.e54d50d6.svg +1 -0
  44. package/kztool/img/documentation.250402ca.svg +1 -0
  45. package/kztool/img/download.5153dc2b.svg +1 -0
  46. package/kztool/img/drag.4a19e202.svg +1 -0
  47. package/kztool/img/druid.09b411e5.svg +1 -0
  48. package/kztool/img/edit.82ad92eb.svg +1 -0
  49. package/kztool/img/education.8a144773.svg +1 -0
  50. package/kztool/img/email.e4742db4.svg +1 -0
  51. package/kztool/img/example.894f4689.svg +1 -0
  52. package/kztool/img/excel.25efb1e4.svg +1 -0
  53. package/kztool/img/exit-fullscreen.c0a0b5af.svg +1 -0
  54. package/kztool/img/eye-open.26bf09f4.svg +1 -0
  55. package/kztool/img/eye.e4fe315c.svg +1 -0
  56. package/kztool/img/file-config.e9cf97b5.png +0 -0
  57. package/kztool/img/file-doc.2e32d62d.png +0 -0
  58. package/kztool/img/file-exe.ba756588.png +0 -0
  59. package/kztool/img/file-ini.b1d3af9d.png +0 -0
  60. package/kztool/img/file-jpg.20c594b1.png +0 -0
  61. package/kztool/img/file-mpg.4a3b6b53.png +0 -0
  62. package/kztool/img/file-none.529195fd.png +0 -0
  63. package/kztool/img/file-pdf.36c3acbd.png +0 -0
  64. package/kztool/img/file-png.961aaab6.png +0 -0
  65. package/kztool/img/file-ppt.b13aca2d.png +0 -0
  66. package/kztool/img/file-rar.d940b06e.png +0 -0
  67. package/kztool/img/file-txt.fba6847c.png +0 -0
  68. package/kztool/img/file-wav.6c6a98a5.png +0 -0
  69. package/kztool/img/file-xls.0ba7ceb7.png +0 -0
  70. package/kztool/img/form.f3ed6fee.svg +1 -0
  71. package/kztool/img/fullscreen.9ce971c6.svg +1 -0
  72. package/kztool/img/github.a1e0a262.svg +1 -0
  73. package/kztool/img/guide.fe0b5508.svg +1 -0
  74. package/kztool/img/icon-ext.ba81b24c.png +0 -0
  75. package/kztool/img/icon.3ab19eb2.svg +1 -0
  76. package/kztool/img/icon.551539f8.png +0 -0
  77. package/kztool/img/input.fd627960.svg +1 -0
  78. package/kztool/img/international.256537bf.svg +1 -0
  79. package/kztool/img/job.b6da1ffe.svg +1 -0
  80. package/kztool/img/kz_authority.3278f033.svg +1 -0
  81. package/kztool/img/kz_build.d01b7fab.svg +1 -0
  82. package/kztool/img/kz_code.181e9399.svg +1 -0
  83. package/kztool/img/kz_config.8ed433a4.svg +1 -0
  84. package/kztool/img/kz_creatTime.b36ed35c.svg +1 -0
  85. package/kztool/img/kz_dept.5e64451a.svg +1 -0
  86. package/kztool/img/kz_dept_profile.5d4e147f.svg +1 -0
  87. package/kztool/img/kz_dict.2ab95ca5.svg +1 -0
  88. package/kztool/img/kz_edit.7d07a3ee.svg +1 -0
  89. package/kztool/img/kz_enlarge.af9fd797.svg +1 -0
  90. package/kztool/img/kz_enterprise.d341ab44.svg +1 -0
  91. package/kztool/img/kz_fold.17a83166.svg +2 -0
  92. package/kztool/img/kz_job.d4e52276.svg +1 -0
  93. package/kztool/img/kz_layout.9bab2381.svg +1 -0
  94. package/kztool/img/kz_log.685b9ce0.svg +1 -0
  95. package/kztool/img/kz_log_loginInfo.68ba7786.svg +1 -0
  96. package/kztool/img/kz_log_operation.fdc2ddf9.svg +1 -0
  97. package/kztool/img/kz_master-slave.83dad46f.svg +2 -0
  98. package/kztool/img/kz_menu.35eddf40.svg +1 -0
  99. package/kztool/img/kz_menu_analyse.4b4d8f9b.svg +22 -0
  100. package/kztool/img/kz_message.b8712b45.svg +1 -0
  101. package/kztool/img/kz_monitor.8b10fbe6.svg +1 -0
  102. package/kztool/img/kz_nacos.c51b9d4a.svg +1 -0
  103. package/kztool/img/kz_narrow.2a646b99.svg +1 -0
  104. package/kztool/img/kz_notice.34428b82.svg +2 -0
  105. package/kztool/img/kz_online.754b59da.svg +1 -0
  106. package/kztool/img/kz_open.c0247e97.svg +2 -0
  107. package/kztool/img/kz_organization.c4c24b8b.svg +1 -0
  108. package/kztool/img/kz_post.a3b24529.svg +1 -0
  109. package/kztool/img/kz_post_profile.729ed1fd.svg +1 -0
  110. package/kztool/img/kz_productCenter.94cb1bf1.svg +1 -0
  111. package/kztool/img/kz_rabbit.c1e30068.svg +1 -0
  112. package/kztool/img/kz_refresh.e4335ee7.svg +2 -0
  113. package/kztool/img/kz_renovation.cec7bdbb.svg +1 -0
  114. package/kztool/img/kz_role.337dafc2.svg +1 -0
  115. package/kztool/img/kz_roleGroup.d40cf86e.svg +1 -0
  116. package/kztool/img/kz_search.91e19919.svg +1 -0
  117. package/kztool/img/kz_sentinel.65a96c32.svg +1 -0
  118. package/kztool/img/kz_server.1aeaae9a.svg +1 -0
  119. package/kztool/img/kz_setting.b121026e.svg +1 -0
  120. package/kztool/img/kz_sex.2dfbc39c.svg +1 -0
  121. package/kztool/img/kz_source.78acc35f.svg +2 -0
  122. package/kztool/img/kz_strategy.960f4e2b.svg +2 -0
  123. package/kztool/img/kz_swagger.72b031ef.svg +1 -0
  124. package/kztool/img/kz_system.a0a83a20.svg +1 -0
  125. package/kztool/img/kz_tenant.bb89322f.svg +1 -0
  126. package/kztool/img/kz_tool.bc04a7cd.svg +1 -0
  127. package/kztool/img/kz_user.8ade980b.svg +1 -0
  128. package/kztool/img/language.a84ceaa6.svg +1 -0
  129. package/kztool/img/light.4183aad0.svg +39 -0
  130. package/kztool/img/link.9c719b73.svg +1 -0
  131. package/kztool/img/list.76dedeca.svg +1 -0
  132. package/kztool/img/loading-0.a72011cc.gif +0 -0
  133. package/kztool/img/lock.8634238d.svg +1 -0
  134. package/kztool/img/log.7798bf59.svg +1 -0
  135. package/kztool/img/login-background.c5b184b7.jpg +0 -0
  136. package/kztool/img/logininfor.182c8103.svg +1 -0
  137. package/kztool/img/logo.8ae3d6ee.jpg +0 -0
  138. package/kztool/img/logo.eeed0dd2.png +0 -0
  139. package/kztool/img/mes-ad.af0324d3.svg +21 -0
  140. package/kztool/img/mes-ic.7d10c9df.svg +16 -0
  141. package/kztool/img/mes-mfg-order.d03a00ac.svg +22 -0
  142. package/kztool/img/mes-tm.e3818cf7.svg +15 -0
  143. package/kztool/img/message.1fbaa155.svg +1 -0
  144. package/kztool/img/money.954fffc7.svg +1 -0
  145. package/kztool/img/monitor.7eeb6217.svg +2 -0
  146. package/kztool/img/nacos.147e9bf5.svg +1 -0
  147. package/kztool/img/nested.c948fb38.svg +1 -0
  148. package/kztool/img/number.7e0faaa5.svg +1 -0
  149. package/kztool/img/online.fb93d2e7.svg +1 -0
  150. package/kztool/img/password.9173da92.svg +1 -0
  151. package/kztool/img/pdf.7e6ae0e3.svg +1 -0
  152. package/kztool/img/people.665094ec.svg +1 -0
  153. package/kztool/img/peoples.73b2be61.svg +1 -0
  154. package/kztool/img/phone.4ab5e783.svg +1 -0
  155. package/kztool/img/post.4f1521cb.svg +1 -0
  156. package/kztool/img/profile.8ae3d6ee.jpg +0 -0
  157. package/kztool/img/qq.8968a17d.svg +1 -0
  158. package/kztool/img/question.6dd93e77.svg +1 -0
  159. package/kztool/img/radio.1db061a7.svg +1 -0
  160. package/kztool/img/rate.d8284c44.svg +1 -0
  161. package/kztool/img/row.88cc2b15.svg +1 -0
  162. package/kztool/img/search.8b49baae.svg +1 -0
  163. package/kztool/img/select.be2885c0.svg +1 -0
  164. package/kztool/img/sentinel.51b1eedb.svg +1 -0
  165. package/kztool/img/server.e9df1296.svg +1 -0
  166. package/kztool/img/shop-call.31143fe6.svg +14 -0
  167. package/kztool/img/shopping.232bbd1d.svg +1 -0
  168. package/kztool/img/size.c77e5b9c.svg +1 -0
  169. package/kztool/img/skill.9842762c.svg +1 -0
  170. package/kztool/img/slider.dca17dd6.svg +1 -0
  171. package/kztool/img/star.91c10562.svg +1 -0
  172. package/kztool/img/stock-query.e3aea312.svg +14 -0
  173. package/kztool/img/stock-report.03ca7ff1.svg +14 -0
  174. package/kztool/img/stock-take.6bd8c87e.svg +14 -0
  175. package/kztool/img/swagger.78429129.svg +1 -0
  176. package/kztool/img/switch.67ff45e5.svg +1 -0
  177. package/kztool/img/system.8f062138.svg +2 -0
  178. package/kztool/img/tab.02b3a5b8.svg +1 -0
  179. package/kztool/img/table.fe7671a5.svg +1 -0
  180. package/kztool/img/textarea.6a19873e.svg +1 -0
  181. package/kztool/img/theme.a8c15249.svg +1 -0
  182. package/kztool/img/time-range.4a869bcb.svg +1 -0
  183. package/kztool/img/time.809df2f6.svg +1 -0
  184. package/kztool/img/tool.ce0f6d38.svg +1 -0
  185. package/kztool/img/tree-table.76f687b5.svg +1 -0
  186. package/kztool/img/tree.59ecebc1.svg +1 -0
  187. package/kztool/img/upload.84d5b598.svg +1 -0
  188. package/kztool/img/user.9f469d0b.svg +1 -0
  189. package/kztool/img/validCode.9e7b7784.svg +1 -0
  190. package/kztool/img/wechat.28725df0.svg +1 -0
  191. package/kztool/img/xy-cancel.c5f3d1db.svg +1 -0
  192. package/kztool/img/xy-choice.b2e8c9cf.svg +1 -0
  193. package/kztool/img/xy-choice2.453db322.svg +31 -0
  194. package/kztool/img/zip.839d61e0.svg +1 -0
  195. package/kztool/kztool.common.0.js +17212 -0
  196. package/kztool/kztool.common.1.js +11 -0
  197. package/kztool/kztool.common.10.js +2775 -0
  198. package/kztool/kztool.common.11.js +1920 -0
  199. package/kztool/kztool.common.12.js +641 -0
  200. package/kztool/kztool.common.13.js +1363 -0
  201. package/kztool/kztool.common.14.js +987 -0
  202. package/kztool/kztool.common.15.js +2477 -0
  203. package/kztool/kztool.common.16.js +222 -0
  204. package/kztool/kztool.common.17.js +140 -0
  205. package/kztool/kztool.common.18.js +1053 -0
  206. package/kztool/kztool.common.19.js +319 -0
  207. package/kztool/kztool.common.2.js +2893 -0
  208. package/kztool/kztool.common.20.js +131 -0
  209. package/kztool/kztool.common.21.js +396 -0
  210. package/kztool/kztool.common.22.js +377 -0
  211. package/kztool/kztool.common.23.js +677 -0
  212. package/kztool/kztool.common.24.js +1007 -0
  213. package/kztool/kztool.common.25.js +246 -0
  214. package/kztool/kztool.common.26.js +138 -0
  215. package/kztool/kztool.common.27.js +505 -0
  216. package/kztool/kztool.common.28.js +62 -0
  217. package/kztool/kztool.common.29.js +65 -0
  218. package/kztool/kztool.common.3.js +3868 -0
  219. package/kztool/kztool.common.4.js +1387 -0
  220. package/kztool/kztool.common.5.js +10 -0
  221. package/kztool/kztool.common.6.js +32006 -0
  222. package/kztool/kztool.common.7.js +28976 -0
  223. package/kztool/kztool.common.9.js +63288 -0
  224. package/kztool/kztool.common.js +137547 -0
  225. package/kztool/kztool.css +7 -0
  226. package/kztool/kztool.umd.0.js +17212 -0
  227. package/kztool/kztool.umd.1.js +11 -0
  228. package/kztool/kztool.umd.10.js +2775 -0
  229. package/kztool/kztool.umd.11.js +1920 -0
  230. package/kztool/kztool.umd.12.js +641 -0
  231. package/kztool/kztool.umd.13.js +1363 -0
  232. package/kztool/kztool.umd.14.js +987 -0
  233. package/kztool/kztool.umd.15.js +2477 -0
  234. package/kztool/kztool.umd.16.js +222 -0
  235. package/kztool/kztool.umd.17.js +140 -0
  236. package/kztool/kztool.umd.18.js +1053 -0
  237. package/kztool/kztool.umd.19.js +319 -0
  238. package/kztool/kztool.umd.2.js +2893 -0
  239. package/kztool/kztool.umd.20.js +131 -0
  240. package/kztool/kztool.umd.21.js +396 -0
  241. package/kztool/kztool.umd.22.js +377 -0
  242. package/kztool/kztool.umd.23.js +677 -0
  243. package/kztool/kztool.umd.24.js +1007 -0
  244. package/kztool/kztool.umd.25.js +246 -0
  245. package/kztool/kztool.umd.26.js +138 -0
  246. package/kztool/kztool.umd.27.js +505 -0
  247. package/kztool/kztool.umd.28.js +62 -0
  248. package/kztool/kztool.umd.29.js +65 -0
  249. package/kztool/kztool.umd.3.js +3868 -0
  250. package/kztool/kztool.umd.4.js +1387 -0
  251. package/kztool/kztool.umd.5.js +10 -0
  252. package/kztool/kztool.umd.6.js +32006 -0
  253. package/kztool/kztool.umd.7.js +28976 -0
  254. package/kztool/kztool.umd.9.js +63288 -0
  255. package/kztool/kztool.umd.js +137557 -0
  256. package/kztool/kztool.umd.min.0.js +9 -0
  257. package/kztool/kztool.umd.min.1.js +1 -0
  258. package/kztool/kztool.umd.min.10.js +1 -0
  259. package/kztool/kztool.umd.min.11.js +1 -0
  260. package/kztool/kztool.umd.min.12.js +1 -0
  261. package/kztool/kztool.umd.min.13.js +1 -0
  262. package/kztool/kztool.umd.min.14.js +1 -0
  263. package/kztool/kztool.umd.min.15.js +1 -0
  264. package/kztool/kztool.umd.min.16.js +1 -0
  265. package/kztool/kztool.umd.min.17.js +1 -0
  266. package/kztool/kztool.umd.min.18.js +1 -0
  267. package/kztool/kztool.umd.min.19.js +1 -0
  268. package/kztool/kztool.umd.min.2.js +1 -0
  269. package/kztool/kztool.umd.min.20.js +1 -0
  270. package/kztool/kztool.umd.min.21.js +1 -0
  271. package/kztool/kztool.umd.min.22.js +1 -0
  272. package/kztool/kztool.umd.min.23.js +1 -0
  273. package/kztool/kztool.umd.min.24.js +1 -0
  274. package/kztool/kztool.umd.min.25.js +1 -0
  275. package/kztool/kztool.umd.min.26.js +1 -0
  276. package/kztool/kztool.umd.min.27.js +1 -0
  277. package/kztool/kztool.umd.min.28.js +1 -0
  278. package/kztool/kztool.umd.min.29.js +1 -0
  279. package/kztool/kztool.umd.min.3.js +8 -0
  280. package/kztool/kztool.umd.min.4.js +1 -0
  281. package/kztool/kztool.umd.min.5.js +1 -0
  282. package/kztool/kztool.umd.min.6.js +1 -0
  283. package/kztool/kztool.umd.min.7.js +24 -0
  284. package/kztool/kztool.umd.min.9.js +24 -0
  285. package/kztool/kztool.umd.min.js +349 -0
  286. package/list-bese-page/doublelistBasePageTs.vue +996 -0
  287. package/list-bese-page/listBasePageTs.vue +2170 -0
  288. package/package.json +12 -0
@@ -0,0 +1,3868 @@
1
+ ((typeof self !== 'undefined' ? self : this)["webpackJsonpkztool"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpkztool"] || []).push([[3],{
2
+
3
+ /***/ "04d1":
4
+ /***/ (function(module, exports, __webpack_require__) {
5
+
6
+ "use strict";
7
+
8
+ var userAgent = __webpack_require__("342f");
9
+
10
+ var firefox = userAgent.match(/firefox\/(\d+)/i);
11
+
12
+ module.exports = !!firefox && +firefox[1];
13
+
14
+
15
+ /***/ }),
16
+
17
+ /***/ "4e82":
18
+ /***/ (function(module, exports, __webpack_require__) {
19
+
20
+ "use strict";
21
+
22
+ var $ = __webpack_require__("23e7");
23
+ var uncurryThis = __webpack_require__("e330");
24
+ var aCallable = __webpack_require__("59ed");
25
+ var toObject = __webpack_require__("7b0b");
26
+ var lengthOfArrayLike = __webpack_require__("07fa");
27
+ var deletePropertyOrThrow = __webpack_require__("083a");
28
+ var toString = __webpack_require__("577e");
29
+ var fails = __webpack_require__("d039");
30
+ var internalSort = __webpack_require__("addb");
31
+ var arrayMethodIsStrict = __webpack_require__("a640");
32
+ var FF = __webpack_require__("04d1");
33
+ var IE_OR_EDGE = __webpack_require__("d998");
34
+ var V8 = __webpack_require__("2d00");
35
+ var WEBKIT = __webpack_require__("512ce");
36
+
37
+ var test = [];
38
+ var nativeSort = uncurryThis(test.sort);
39
+ var push = uncurryThis(test.push);
40
+
41
+ // IE8-
42
+ var FAILS_ON_UNDEFINED = fails(function () {
43
+ test.sort(undefined);
44
+ });
45
+ // V8 bug
46
+ var FAILS_ON_NULL = fails(function () {
47
+ test.sort(null);
48
+ });
49
+ // Old WebKit
50
+ var STRICT_METHOD = arrayMethodIsStrict('sort');
51
+
52
+ var STABLE_SORT = !fails(function () {
53
+ // feature detection can be too slow, so check engines versions
54
+ if (V8) return V8 < 70;
55
+ if (FF && FF > 3) return;
56
+ if (IE_OR_EDGE) return true;
57
+ if (WEBKIT) return WEBKIT < 603;
58
+
59
+ var result = '';
60
+ var code, chr, value, index;
61
+
62
+ // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
63
+ for (code = 65; code < 76; code++) {
64
+ chr = String.fromCharCode(code);
65
+
66
+ switch (code) {
67
+ case 66: case 69: case 70: case 72: value = 3; break;
68
+ case 68: case 71: value = 4; break;
69
+ default: value = 2;
70
+ }
71
+
72
+ for (index = 0; index < 47; index++) {
73
+ test.push({ k: chr + index, v: value });
74
+ }
75
+ }
76
+
77
+ test.sort(function (a, b) { return b.v - a.v; });
78
+
79
+ for (index = 0; index < test.length; index++) {
80
+ chr = test[index].k.charAt(0);
81
+ if (result.charAt(result.length - 1) !== chr) result += chr;
82
+ }
83
+
84
+ return result !== 'DGBEFHACIJK';
85
+ });
86
+
87
+ var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
88
+
89
+ var getSortCompare = function (comparefn) {
90
+ return function (x, y) {
91
+ if (y === undefined) return -1;
92
+ if (x === undefined) return 1;
93
+ if (comparefn !== undefined) return +comparefn(x, y) || 0;
94
+ return toString(x) > toString(y) ? 1 : -1;
95
+ };
96
+ };
97
+
98
+ // `Array.prototype.sort` method
99
+ // https://tc39.es/ecma262/#sec-array.prototype.sort
100
+ $({ target: 'Array', proto: true, forced: FORCED }, {
101
+ sort: function sort(comparefn) {
102
+ if (comparefn !== undefined) aCallable(comparefn);
103
+
104
+ var array = toObject(this);
105
+
106
+ if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
107
+
108
+ var items = [];
109
+ var arrayLength = lengthOfArrayLike(array);
110
+ var itemsLength, index;
111
+
112
+ for (index = 0; index < arrayLength; index++) {
113
+ if (index in array) push(items, array[index]);
114
+ }
115
+
116
+ internalSort(items, getSortCompare(comparefn));
117
+
118
+ itemsLength = lengthOfArrayLike(items);
119
+ index = 0;
120
+
121
+ while (index < itemsLength) array[index] = items[index++];
122
+ while (index < arrayLength) deletePropertyOrThrow(array, index++);
123
+
124
+ return array;
125
+ }
126
+ });
127
+
128
+
129
+ /***/ }),
130
+
131
+ /***/ "512ce":
132
+ /***/ (function(module, exports, __webpack_require__) {
133
+
134
+ "use strict";
135
+
136
+ var userAgent = __webpack_require__("342f");
137
+
138
+ var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
139
+
140
+ module.exports = !!webkit && +webkit[1];
141
+
142
+
143
+ /***/ }),
144
+
145
+ /***/ "aa47":
146
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
147
+
148
+ "use strict";
149
+ __webpack_require__.r(__webpack_exports__);
150
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiDrag", function() { return MultiDragPlugin; });
151
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sortable", function() { return Sortable; });
152
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Swap", function() { return SwapPlugin; });
153
+ /**!
154
+ * Sortable 1.10.2
155
+ * @author RubaXa <trash@rubaxa.org>
156
+ * @author owenm <owen23355@gmail.com>
157
+ * @license MIT
158
+ */
159
+ function _typeof(obj) {
160
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
161
+ _typeof = function (obj) {
162
+ return typeof obj;
163
+ };
164
+ } else {
165
+ _typeof = function (obj) {
166
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
167
+ };
168
+ }
169
+
170
+ return _typeof(obj);
171
+ }
172
+
173
+ function _defineProperty(obj, key, value) {
174
+ if (key in obj) {
175
+ Object.defineProperty(obj, key, {
176
+ value: value,
177
+ enumerable: true,
178
+ configurable: true,
179
+ writable: true
180
+ });
181
+ } else {
182
+ obj[key] = value;
183
+ }
184
+
185
+ return obj;
186
+ }
187
+
188
+ function _extends() {
189
+ _extends = Object.assign || function (target) {
190
+ for (var i = 1; i < arguments.length; i++) {
191
+ var source = arguments[i];
192
+
193
+ for (var key in source) {
194
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
195
+ target[key] = source[key];
196
+ }
197
+ }
198
+ }
199
+
200
+ return target;
201
+ };
202
+
203
+ return _extends.apply(this, arguments);
204
+ }
205
+
206
+ function _objectSpread(target) {
207
+ for (var i = 1; i < arguments.length; i++) {
208
+ var source = arguments[i] != null ? arguments[i] : {};
209
+ var ownKeys = Object.keys(source);
210
+
211
+ if (typeof Object.getOwnPropertySymbols === 'function') {
212
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
213
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
214
+ }));
215
+ }
216
+
217
+ ownKeys.forEach(function (key) {
218
+ _defineProperty(target, key, source[key]);
219
+ });
220
+ }
221
+
222
+ return target;
223
+ }
224
+
225
+ function _objectWithoutPropertiesLoose(source, excluded) {
226
+ if (source == null) return {};
227
+ var target = {};
228
+ var sourceKeys = Object.keys(source);
229
+ var key, i;
230
+
231
+ for (i = 0; i < sourceKeys.length; i++) {
232
+ key = sourceKeys[i];
233
+ if (excluded.indexOf(key) >= 0) continue;
234
+ target[key] = source[key];
235
+ }
236
+
237
+ return target;
238
+ }
239
+
240
+ function _objectWithoutProperties(source, excluded) {
241
+ if (source == null) return {};
242
+
243
+ var target = _objectWithoutPropertiesLoose(source, excluded);
244
+
245
+ var key, i;
246
+
247
+ if (Object.getOwnPropertySymbols) {
248
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
249
+
250
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
251
+ key = sourceSymbolKeys[i];
252
+ if (excluded.indexOf(key) >= 0) continue;
253
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
254
+ target[key] = source[key];
255
+ }
256
+ }
257
+
258
+ return target;
259
+ }
260
+
261
+ function _toConsumableArray(arr) {
262
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
263
+ }
264
+
265
+ function _arrayWithoutHoles(arr) {
266
+ if (Array.isArray(arr)) {
267
+ for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
268
+
269
+ return arr2;
270
+ }
271
+ }
272
+
273
+ function _iterableToArray(iter) {
274
+ if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
275
+ }
276
+
277
+ function _nonIterableSpread() {
278
+ throw new TypeError("Invalid attempt to spread non-iterable instance");
279
+ }
280
+
281
+ var version = "1.10.2";
282
+
283
+ function userAgent(pattern) {
284
+ if (typeof window !== 'undefined' && window.navigator) {
285
+ return !!
286
+ /*@__PURE__*/
287
+ navigator.userAgent.match(pattern);
288
+ }
289
+ }
290
+
291
+ var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
292
+ var Edge = userAgent(/Edge/i);
293
+ var FireFox = userAgent(/firefox/i);
294
+ var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
295
+ var IOS = userAgent(/iP(ad|od|hone)/i);
296
+ var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
297
+
298
+ var captureMode = {
299
+ capture: false,
300
+ passive: false
301
+ };
302
+
303
+ function on(el, event, fn) {
304
+ el.addEventListener(event, fn, !IE11OrLess && captureMode);
305
+ }
306
+
307
+ function off(el, event, fn) {
308
+ el.removeEventListener(event, fn, !IE11OrLess && captureMode);
309
+ }
310
+
311
+ function matches(
312
+ /**HTMLElement*/
313
+ el,
314
+ /**String*/
315
+ selector) {
316
+ if (!selector) return;
317
+ selector[0] === '>' && (selector = selector.substring(1));
318
+
319
+ if (el) {
320
+ try {
321
+ if (el.matches) {
322
+ return el.matches(selector);
323
+ } else if (el.msMatchesSelector) {
324
+ return el.msMatchesSelector(selector);
325
+ } else if (el.webkitMatchesSelector) {
326
+ return el.webkitMatchesSelector(selector);
327
+ }
328
+ } catch (_) {
329
+ return false;
330
+ }
331
+ }
332
+
333
+ return false;
334
+ }
335
+
336
+ function getParentOrHost(el) {
337
+ return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
338
+ }
339
+
340
+ function closest(
341
+ /**HTMLElement*/
342
+ el,
343
+ /**String*/
344
+ selector,
345
+ /**HTMLElement*/
346
+ ctx, includeCTX) {
347
+ if (el) {
348
+ ctx = ctx || document;
349
+
350
+ do {
351
+ if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
352
+ return el;
353
+ }
354
+
355
+ if (el === ctx) break;
356
+ /* jshint boss:true */
357
+ } while (el = getParentOrHost(el));
358
+ }
359
+
360
+ return null;
361
+ }
362
+
363
+ var R_SPACE = /\s+/g;
364
+
365
+ function toggleClass(el, name, state) {
366
+ if (el && name) {
367
+ if (el.classList) {
368
+ el.classList[state ? 'add' : 'remove'](name);
369
+ } else {
370
+ var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
371
+ el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
372
+ }
373
+ }
374
+ }
375
+
376
+ function css(el, prop, val) {
377
+ var style = el && el.style;
378
+
379
+ if (style) {
380
+ if (val === void 0) {
381
+ if (document.defaultView && document.defaultView.getComputedStyle) {
382
+ val = document.defaultView.getComputedStyle(el, '');
383
+ } else if (el.currentStyle) {
384
+ val = el.currentStyle;
385
+ }
386
+
387
+ return prop === void 0 ? val : val[prop];
388
+ } else {
389
+ if (!(prop in style) && prop.indexOf('webkit') === -1) {
390
+ prop = '-webkit-' + prop;
391
+ }
392
+
393
+ style[prop] = val + (typeof val === 'string' ? '' : 'px');
394
+ }
395
+ }
396
+ }
397
+
398
+ function matrix(el, selfOnly) {
399
+ var appliedTransforms = '';
400
+
401
+ if (typeof el === 'string') {
402
+ appliedTransforms = el;
403
+ } else {
404
+ do {
405
+ var transform = css(el, 'transform');
406
+
407
+ if (transform && transform !== 'none') {
408
+ appliedTransforms = transform + ' ' + appliedTransforms;
409
+ }
410
+ /* jshint boss:true */
411
+
412
+ } while (!selfOnly && (el = el.parentNode));
413
+ }
414
+
415
+ var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
416
+ /*jshint -W056 */
417
+
418
+ return matrixFn && new matrixFn(appliedTransforms);
419
+ }
420
+
421
+ function find(ctx, tagName, iterator) {
422
+ if (ctx) {
423
+ var list = ctx.getElementsByTagName(tagName),
424
+ i = 0,
425
+ n = list.length;
426
+
427
+ if (iterator) {
428
+ for (; i < n; i++) {
429
+ iterator(list[i], i);
430
+ }
431
+ }
432
+
433
+ return list;
434
+ }
435
+
436
+ return [];
437
+ }
438
+
439
+ function getWindowScrollingElement() {
440
+ var scrollingElement = document.scrollingElement;
441
+
442
+ if (scrollingElement) {
443
+ return scrollingElement;
444
+ } else {
445
+ return document.documentElement;
446
+ }
447
+ }
448
+ /**
449
+ * Returns the "bounding client rect" of given element
450
+ * @param {HTMLElement} el The element whose boundingClientRect is wanted
451
+ * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
452
+ * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
453
+ * @param {[Boolean]} undoScale Whether the container's scale() should be undone
454
+ * @param {[HTMLElement]} container The parent the element will be placed in
455
+ * @return {Object} The boundingClientRect of el, with specified adjustments
456
+ */
457
+
458
+
459
+ function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
460
+ if (!el.getBoundingClientRect && el !== window) return;
461
+ var elRect, top, left, bottom, right, height, width;
462
+
463
+ if (el !== window && el !== getWindowScrollingElement()) {
464
+ elRect = el.getBoundingClientRect();
465
+ top = elRect.top;
466
+ left = elRect.left;
467
+ bottom = elRect.bottom;
468
+ right = elRect.right;
469
+ height = elRect.height;
470
+ width = elRect.width;
471
+ } else {
472
+ top = 0;
473
+ left = 0;
474
+ bottom = window.innerHeight;
475
+ right = window.innerWidth;
476
+ height = window.innerHeight;
477
+ width = window.innerWidth;
478
+ }
479
+
480
+ if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
481
+ // Adjust for translate()
482
+ container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
483
+ // Not needed on <= IE11
484
+
485
+ if (!IE11OrLess) {
486
+ do {
487
+ if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
488
+ var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container
489
+
490
+ top -= containerRect.top + parseInt(css(container, 'border-top-width'));
491
+ left -= containerRect.left + parseInt(css(container, 'border-left-width'));
492
+ bottom = top + elRect.height;
493
+ right = left + elRect.width;
494
+ break;
495
+ }
496
+ /* jshint boss:true */
497
+
498
+ } while (container = container.parentNode);
499
+ }
500
+ }
501
+
502
+ if (undoScale && el !== window) {
503
+ // Adjust for scale()
504
+ var elMatrix = matrix(container || el),
505
+ scaleX = elMatrix && elMatrix.a,
506
+ scaleY = elMatrix && elMatrix.d;
507
+
508
+ if (elMatrix) {
509
+ top /= scaleY;
510
+ left /= scaleX;
511
+ width /= scaleX;
512
+ height /= scaleY;
513
+ bottom = top + height;
514
+ right = left + width;
515
+ }
516
+ }
517
+
518
+ return {
519
+ top: top,
520
+ left: left,
521
+ bottom: bottom,
522
+ right: right,
523
+ width: width,
524
+ height: height
525
+ };
526
+ }
527
+ /**
528
+ * Checks if a side of an element is scrolled past a side of its parents
529
+ * @param {HTMLElement} el The element who's side being scrolled out of view is in question
530
+ * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
531
+ * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
532
+ * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
533
+ */
534
+
535
+
536
+ function isScrolledPast(el, elSide, parentSide) {
537
+ var parent = getParentAutoScrollElement(el, true),
538
+ elSideVal = getRect(el)[elSide];
539
+ /* jshint boss:true */
540
+
541
+ while (parent) {
542
+ var parentSideVal = getRect(parent)[parentSide],
543
+ visible = void 0;
544
+
545
+ if (parentSide === 'top' || parentSide === 'left') {
546
+ visible = elSideVal >= parentSideVal;
547
+ } else {
548
+ visible = elSideVal <= parentSideVal;
549
+ }
550
+
551
+ if (!visible) return parent;
552
+ if (parent === getWindowScrollingElement()) break;
553
+ parent = getParentAutoScrollElement(parent, false);
554
+ }
555
+
556
+ return false;
557
+ }
558
+ /**
559
+ * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
560
+ * and non-draggable elements
561
+ * @param {HTMLElement} el The parent element
562
+ * @param {Number} childNum The index of the child
563
+ * @param {Object} options Parent Sortable's options
564
+ * @return {HTMLElement} The child at index childNum, or null if not found
565
+ */
566
+
567
+
568
+ function getChild(el, childNum, options) {
569
+ var currentChild = 0,
570
+ i = 0,
571
+ children = el.children;
572
+
573
+ while (i < children.length) {
574
+ if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && children[i] !== Sortable.dragged && closest(children[i], options.draggable, el, false)) {
575
+ if (currentChild === childNum) {
576
+ return children[i];
577
+ }
578
+
579
+ currentChild++;
580
+ }
581
+
582
+ i++;
583
+ }
584
+
585
+ return null;
586
+ }
587
+ /**
588
+ * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
589
+ * @param {HTMLElement} el Parent element
590
+ * @param {selector} selector Any other elements that should be ignored
591
+ * @return {HTMLElement} The last child, ignoring ghostEl
592
+ */
593
+
594
+
595
+ function lastChild(el, selector) {
596
+ var last = el.lastElementChild;
597
+
598
+ while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
599
+ last = last.previousElementSibling;
600
+ }
601
+
602
+ return last || null;
603
+ }
604
+ /**
605
+ * Returns the index of an element within its parent for a selected set of
606
+ * elements
607
+ * @param {HTMLElement} el
608
+ * @param {selector} selector
609
+ * @return {number}
610
+ */
611
+
612
+
613
+ function index(el, selector) {
614
+ var index = 0;
615
+
616
+ if (!el || !el.parentNode) {
617
+ return -1;
618
+ }
619
+ /* jshint boss:true */
620
+
621
+
622
+ while (el = el.previousElementSibling) {
623
+ if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
624
+ index++;
625
+ }
626
+ }
627
+
628
+ return index;
629
+ }
630
+ /**
631
+ * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
632
+ * The value is returned in real pixels.
633
+ * @param {HTMLElement} el
634
+ * @return {Array} Offsets in the format of [left, top]
635
+ */
636
+
637
+
638
+ function getRelativeScrollOffset(el) {
639
+ var offsetLeft = 0,
640
+ offsetTop = 0,
641
+ winScroller = getWindowScrollingElement();
642
+
643
+ if (el) {
644
+ do {
645
+ var elMatrix = matrix(el),
646
+ scaleX = elMatrix.a,
647
+ scaleY = elMatrix.d;
648
+ offsetLeft += el.scrollLeft * scaleX;
649
+ offsetTop += el.scrollTop * scaleY;
650
+ } while (el !== winScroller && (el = el.parentNode));
651
+ }
652
+
653
+ return [offsetLeft, offsetTop];
654
+ }
655
+ /**
656
+ * Returns the index of the object within the given array
657
+ * @param {Array} arr Array that may or may not hold the object
658
+ * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find
659
+ * @return {Number} The index of the object in the array, or -1
660
+ */
661
+
662
+
663
+ function indexOfObject(arr, obj) {
664
+ for (var i in arr) {
665
+ if (!arr.hasOwnProperty(i)) continue;
666
+
667
+ for (var key in obj) {
668
+ if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
669
+ }
670
+ }
671
+
672
+ return -1;
673
+ }
674
+
675
+ function getParentAutoScrollElement(el, includeSelf) {
676
+ // skip to window
677
+ if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
678
+ var elem = el;
679
+ var gotSelf = false;
680
+
681
+ do {
682
+ // we don't need to get elem css if it isn't even overflowing in the first place (performance)
683
+ if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
684
+ var elemCSS = css(elem);
685
+
686
+ if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
687
+ if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
688
+ if (gotSelf || includeSelf) return elem;
689
+ gotSelf = true;
690
+ }
691
+ }
692
+ /* jshint boss:true */
693
+
694
+ } while (elem = elem.parentNode);
695
+
696
+ return getWindowScrollingElement();
697
+ }
698
+
699
+ function extend(dst, src) {
700
+ if (dst && src) {
701
+ for (var key in src) {
702
+ if (src.hasOwnProperty(key)) {
703
+ dst[key] = src[key];
704
+ }
705
+ }
706
+ }
707
+
708
+ return dst;
709
+ }
710
+
711
+ function isRectEqual(rect1, rect2) {
712
+ return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
713
+ }
714
+
715
+ var _throttleTimeout;
716
+
717
+ function throttle(callback, ms) {
718
+ return function () {
719
+ if (!_throttleTimeout) {
720
+ var args = arguments,
721
+ _this = this;
722
+
723
+ if (args.length === 1) {
724
+ callback.call(_this, args[0]);
725
+ } else {
726
+ callback.apply(_this, args);
727
+ }
728
+
729
+ _throttleTimeout = setTimeout(function () {
730
+ _throttleTimeout = void 0;
731
+ }, ms);
732
+ }
733
+ };
734
+ }
735
+
736
+ function cancelThrottle() {
737
+ clearTimeout(_throttleTimeout);
738
+ _throttleTimeout = void 0;
739
+ }
740
+
741
+ function scrollBy(el, x, y) {
742
+ el.scrollLeft += x;
743
+ el.scrollTop += y;
744
+ }
745
+
746
+ function clone(el) {
747
+ var Polymer = window.Polymer;
748
+ var $ = window.jQuery || window.Zepto;
749
+
750
+ if (Polymer && Polymer.dom) {
751
+ return Polymer.dom(el).cloneNode(true);
752
+ } else if ($) {
753
+ return $(el).clone(true)[0];
754
+ } else {
755
+ return el.cloneNode(true);
756
+ }
757
+ }
758
+
759
+ function setRect(el, rect) {
760
+ css(el, 'position', 'absolute');
761
+ css(el, 'top', rect.top);
762
+ css(el, 'left', rect.left);
763
+ css(el, 'width', rect.width);
764
+ css(el, 'height', rect.height);
765
+ }
766
+
767
+ function unsetRect(el) {
768
+ css(el, 'position', '');
769
+ css(el, 'top', '');
770
+ css(el, 'left', '');
771
+ css(el, 'width', '');
772
+ css(el, 'height', '');
773
+ }
774
+
775
+ var expando = 'Sortable' + new Date().getTime();
776
+
777
+ function AnimationStateManager() {
778
+ var animationStates = [],
779
+ animationCallbackId;
780
+ return {
781
+ captureAnimationState: function captureAnimationState() {
782
+ animationStates = [];
783
+ if (!this.options.animation) return;
784
+ var children = [].slice.call(this.el.children);
785
+ children.forEach(function (child) {
786
+ if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
787
+ animationStates.push({
788
+ target: child,
789
+ rect: getRect(child)
790
+ });
791
+
792
+ var fromRect = _objectSpread({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation
793
+
794
+
795
+ if (child.thisAnimationDuration) {
796
+ var childMatrix = matrix(child, true);
797
+
798
+ if (childMatrix) {
799
+ fromRect.top -= childMatrix.f;
800
+ fromRect.left -= childMatrix.e;
801
+ }
802
+ }
803
+
804
+ child.fromRect = fromRect;
805
+ });
806
+ },
807
+ addAnimationState: function addAnimationState(state) {
808
+ animationStates.push(state);
809
+ },
810
+ removeAnimationState: function removeAnimationState(target) {
811
+ animationStates.splice(indexOfObject(animationStates, {
812
+ target: target
813
+ }), 1);
814
+ },
815
+ animateAll: function animateAll(callback) {
816
+ var _this = this;
817
+
818
+ if (!this.options.animation) {
819
+ clearTimeout(animationCallbackId);
820
+ if (typeof callback === 'function') callback();
821
+ return;
822
+ }
823
+
824
+ var animating = false,
825
+ animationTime = 0;
826
+ animationStates.forEach(function (state) {
827
+ var time = 0,
828
+ target = state.target,
829
+ fromRect = target.fromRect,
830
+ toRect = getRect(target),
831
+ prevFromRect = target.prevFromRect,
832
+ prevToRect = target.prevToRect,
833
+ animatingRect = state.rect,
834
+ targetMatrix = matrix(target, true);
835
+
836
+ if (targetMatrix) {
837
+ // Compensate for current animation
838
+ toRect.top -= targetMatrix.f;
839
+ toRect.left -= targetMatrix.e;
840
+ }
841
+
842
+ target.toRect = toRect;
843
+
844
+ if (target.thisAnimationDuration) {
845
+ // Could also check if animatingRect is between fromRect and toRect
846
+ if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect
847
+ (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
848
+ // If returning to same place as started from animation and on same axis
849
+ time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
850
+ }
851
+ } // if fromRect != toRect: animate
852
+
853
+
854
+ if (!isRectEqual(toRect, fromRect)) {
855
+ target.prevFromRect = fromRect;
856
+ target.prevToRect = toRect;
857
+
858
+ if (!time) {
859
+ time = _this.options.animation;
860
+ }
861
+
862
+ _this.animate(target, animatingRect, toRect, time);
863
+ }
864
+
865
+ if (time) {
866
+ animating = true;
867
+ animationTime = Math.max(animationTime, time);
868
+ clearTimeout(target.animationResetTimer);
869
+ target.animationResetTimer = setTimeout(function () {
870
+ target.animationTime = 0;
871
+ target.prevFromRect = null;
872
+ target.fromRect = null;
873
+ target.prevToRect = null;
874
+ target.thisAnimationDuration = null;
875
+ }, time);
876
+ target.thisAnimationDuration = time;
877
+ }
878
+ });
879
+ clearTimeout(animationCallbackId);
880
+
881
+ if (!animating) {
882
+ if (typeof callback === 'function') callback();
883
+ } else {
884
+ animationCallbackId = setTimeout(function () {
885
+ if (typeof callback === 'function') callback();
886
+ }, animationTime);
887
+ }
888
+
889
+ animationStates = [];
890
+ },
891
+ animate: function animate(target, currentRect, toRect, duration) {
892
+ if (duration) {
893
+ css(target, 'transition', '');
894
+ css(target, 'transform', '');
895
+ var elMatrix = matrix(this.el),
896
+ scaleX = elMatrix && elMatrix.a,
897
+ scaleY = elMatrix && elMatrix.d,
898
+ translateX = (currentRect.left - toRect.left) / (scaleX || 1),
899
+ translateY = (currentRect.top - toRect.top) / (scaleY || 1);
900
+ target.animatingX = !!translateX;
901
+ target.animatingY = !!translateY;
902
+ css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
903
+ repaint(target); // repaint
904
+
905
+ css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
906
+ css(target, 'transform', 'translate3d(0,0,0)');
907
+ typeof target.animated === 'number' && clearTimeout(target.animated);
908
+ target.animated = setTimeout(function () {
909
+ css(target, 'transition', '');
910
+ css(target, 'transform', '');
911
+ target.animated = false;
912
+ target.animatingX = false;
913
+ target.animatingY = false;
914
+ }, duration);
915
+ }
916
+ }
917
+ };
918
+ }
919
+
920
+ function repaint(target) {
921
+ return target.offsetWidth;
922
+ }
923
+
924
+ function calculateRealTime(animatingRect, fromRect, toRect, options) {
925
+ return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;
926
+ }
927
+
928
+ var plugins = [];
929
+ var defaults = {
930
+ initializeByDefault: true
931
+ };
932
+ var PluginManager = {
933
+ mount: function mount(plugin) {
934
+ // Set default static properties
935
+ for (var option in defaults) {
936
+ if (defaults.hasOwnProperty(option) && !(option in plugin)) {
937
+ plugin[option] = defaults[option];
938
+ }
939
+ }
940
+
941
+ plugins.push(plugin);
942
+ },
943
+ pluginEvent: function pluginEvent(eventName, sortable, evt) {
944
+ var _this = this;
945
+
946
+ this.eventCanceled = false;
947
+
948
+ evt.cancel = function () {
949
+ _this.eventCanceled = true;
950
+ };
951
+
952
+ var eventNameGlobal = eventName + 'Global';
953
+ plugins.forEach(function (plugin) {
954
+ if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable
955
+
956
+ if (sortable[plugin.pluginName][eventNameGlobal]) {
957
+ sortable[plugin.pluginName][eventNameGlobal](_objectSpread({
958
+ sortable: sortable
959
+ }, evt));
960
+ } // Only fire plugin event if plugin is enabled in this sortable,
961
+ // and plugin has event defined
962
+
963
+
964
+ if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
965
+ sortable[plugin.pluginName][eventName](_objectSpread({
966
+ sortable: sortable
967
+ }, evt));
968
+ }
969
+ });
970
+ },
971
+ initializePlugins: function initializePlugins(sortable, el, defaults, options) {
972
+ plugins.forEach(function (plugin) {
973
+ var pluginName = plugin.pluginName;
974
+ if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
975
+ var initialized = new plugin(sortable, el, sortable.options);
976
+ initialized.sortable = sortable;
977
+ initialized.options = sortable.options;
978
+ sortable[pluginName] = initialized; // Add default options from plugin
979
+
980
+ _extends(defaults, initialized.defaults);
981
+ });
982
+
983
+ for (var option in sortable.options) {
984
+ if (!sortable.options.hasOwnProperty(option)) continue;
985
+ var modified = this.modifyOption(sortable, option, sortable.options[option]);
986
+
987
+ if (typeof modified !== 'undefined') {
988
+ sortable.options[option] = modified;
989
+ }
990
+ }
991
+ },
992
+ getEventProperties: function getEventProperties(name, sortable) {
993
+ var eventProperties = {};
994
+ plugins.forEach(function (plugin) {
995
+ if (typeof plugin.eventProperties !== 'function') return;
996
+
997
+ _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
998
+ });
999
+ return eventProperties;
1000
+ },
1001
+ modifyOption: function modifyOption(sortable, name, value) {
1002
+ var modifiedValue;
1003
+ plugins.forEach(function (plugin) {
1004
+ // Plugin must exist on the Sortable
1005
+ if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
1006
+
1007
+ if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
1008
+ modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
1009
+ }
1010
+ });
1011
+ return modifiedValue;
1012
+ }
1013
+ };
1014
+
1015
+ function dispatchEvent(_ref) {
1016
+ var sortable = _ref.sortable,
1017
+ rootEl = _ref.rootEl,
1018
+ name = _ref.name,
1019
+ targetEl = _ref.targetEl,
1020
+ cloneEl = _ref.cloneEl,
1021
+ toEl = _ref.toEl,
1022
+ fromEl = _ref.fromEl,
1023
+ oldIndex = _ref.oldIndex,
1024
+ newIndex = _ref.newIndex,
1025
+ oldDraggableIndex = _ref.oldDraggableIndex,
1026
+ newDraggableIndex = _ref.newDraggableIndex,
1027
+ originalEvent = _ref.originalEvent,
1028
+ putSortable = _ref.putSortable,
1029
+ extraEventProperties = _ref.extraEventProperties;
1030
+ sortable = sortable || rootEl && rootEl[expando];
1031
+ if (!sortable) return;
1032
+ var evt,
1033
+ options = sortable.options,
1034
+ onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature
1035
+
1036
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
1037
+ evt = new CustomEvent(name, {
1038
+ bubbles: true,
1039
+ cancelable: true
1040
+ });
1041
+ } else {
1042
+ evt = document.createEvent('Event');
1043
+ evt.initEvent(name, true, true);
1044
+ }
1045
+
1046
+ evt.to = toEl || rootEl;
1047
+ evt.from = fromEl || rootEl;
1048
+ evt.item = targetEl || rootEl;
1049
+ evt.clone = cloneEl;
1050
+ evt.oldIndex = oldIndex;
1051
+ evt.newIndex = newIndex;
1052
+ evt.oldDraggableIndex = oldDraggableIndex;
1053
+ evt.newDraggableIndex = newDraggableIndex;
1054
+ evt.originalEvent = originalEvent;
1055
+ evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
1056
+
1057
+ var allEventProperties = _objectSpread({}, extraEventProperties, PluginManager.getEventProperties(name, sortable));
1058
+
1059
+ for (var option in allEventProperties) {
1060
+ evt[option] = allEventProperties[option];
1061
+ }
1062
+
1063
+ if (rootEl) {
1064
+ rootEl.dispatchEvent(evt);
1065
+ }
1066
+
1067
+ if (options[onName]) {
1068
+ options[onName].call(sortable, evt);
1069
+ }
1070
+ }
1071
+
1072
+ var pluginEvent = function pluginEvent(eventName, sortable) {
1073
+ var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
1074
+ originalEvent = _ref.evt,
1075
+ data = _objectWithoutProperties(_ref, ["evt"]);
1076
+
1077
+ PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread({
1078
+ dragEl: dragEl,
1079
+ parentEl: parentEl,
1080
+ ghostEl: ghostEl,
1081
+ rootEl: rootEl,
1082
+ nextEl: nextEl,
1083
+ lastDownEl: lastDownEl,
1084
+ cloneEl: cloneEl,
1085
+ cloneHidden: cloneHidden,
1086
+ dragStarted: moved,
1087
+ putSortable: putSortable,
1088
+ activeSortable: Sortable.active,
1089
+ originalEvent: originalEvent,
1090
+ oldIndex: oldIndex,
1091
+ oldDraggableIndex: oldDraggableIndex,
1092
+ newIndex: newIndex,
1093
+ newDraggableIndex: newDraggableIndex,
1094
+ hideGhostForTarget: _hideGhostForTarget,
1095
+ unhideGhostForTarget: _unhideGhostForTarget,
1096
+ cloneNowHidden: function cloneNowHidden() {
1097
+ cloneHidden = true;
1098
+ },
1099
+ cloneNowShown: function cloneNowShown() {
1100
+ cloneHidden = false;
1101
+ },
1102
+ dispatchSortableEvent: function dispatchSortableEvent(name) {
1103
+ _dispatchEvent({
1104
+ sortable: sortable,
1105
+ name: name,
1106
+ originalEvent: originalEvent
1107
+ });
1108
+ }
1109
+ }, data));
1110
+ };
1111
+
1112
+ function _dispatchEvent(info) {
1113
+ dispatchEvent(_objectSpread({
1114
+ putSortable: putSortable,
1115
+ cloneEl: cloneEl,
1116
+ targetEl: dragEl,
1117
+ rootEl: rootEl,
1118
+ oldIndex: oldIndex,
1119
+ oldDraggableIndex: oldDraggableIndex,
1120
+ newIndex: newIndex,
1121
+ newDraggableIndex: newDraggableIndex
1122
+ }, info));
1123
+ }
1124
+
1125
+ var dragEl,
1126
+ parentEl,
1127
+ ghostEl,
1128
+ rootEl,
1129
+ nextEl,
1130
+ lastDownEl,
1131
+ cloneEl,
1132
+ cloneHidden,
1133
+ oldIndex,
1134
+ newIndex,
1135
+ oldDraggableIndex,
1136
+ newDraggableIndex,
1137
+ activeGroup,
1138
+ putSortable,
1139
+ awaitingDragStarted = false,
1140
+ ignoreNextClick = false,
1141
+ sortables = [],
1142
+ tapEvt,
1143
+ touchEvt,
1144
+ lastDx,
1145
+ lastDy,
1146
+ tapDistanceLeft,
1147
+ tapDistanceTop,
1148
+ moved,
1149
+ lastTarget,
1150
+ lastDirection,
1151
+ pastFirstInvertThresh = false,
1152
+ isCircumstantialInvert = false,
1153
+ targetMoveDistance,
1154
+ // For positioning ghost absolutely
1155
+ ghostRelativeParent,
1156
+ ghostRelativeParentInitialScroll = [],
1157
+ // (left, top)
1158
+ _silent = false,
1159
+ savedInputChecked = [];
1160
+ /** @const */
1161
+
1162
+ var documentExists = typeof document !== 'undefined',
1163
+ PositionGhostAbsolutely = IOS,
1164
+ CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
1165
+ // This will not pass for IE9, because IE9 DnD only works on anchors
1166
+ supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
1167
+ supportCssPointerEvents = function () {
1168
+ if (!documentExists) return; // false when <= IE11
1169
+
1170
+ if (IE11OrLess) {
1171
+ return false;
1172
+ }
1173
+
1174
+ var el = document.createElement('x');
1175
+ el.style.cssText = 'pointer-events:auto';
1176
+ return el.style.pointerEvents === 'auto';
1177
+ }(),
1178
+ _detectDirection = function _detectDirection(el, options) {
1179
+ var elCSS = css(el),
1180
+ elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
1181
+ child1 = getChild(el, 0, options),
1182
+ child2 = getChild(el, 1, options),
1183
+ firstChildCSS = child1 && css(child1),
1184
+ secondChildCSS = child2 && css(child2),
1185
+ firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
1186
+ secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
1187
+
1188
+ if (elCSS.display === 'flex') {
1189
+ return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
1190
+ }
1191
+
1192
+ if (elCSS.display === 'grid') {
1193
+ return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
1194
+ }
1195
+
1196
+ if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
1197
+ var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
1198
+ return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
1199
+ }
1200
+
1201
+ return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';
1202
+ },
1203
+ _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
1204
+ var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
1205
+ dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
1206
+ dragElOppLength = vertical ? dragRect.width : dragRect.height,
1207
+ targetS1Opp = vertical ? targetRect.left : targetRect.top,
1208
+ targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
1209
+ targetOppLength = vertical ? targetRect.width : targetRect.height;
1210
+ return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
1211
+ },
1212
+
1213
+ /**
1214
+ * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
1215
+ * @param {Number} x X position
1216
+ * @param {Number} y Y position
1217
+ * @return {HTMLElement} Element of the first found nearest Sortable
1218
+ */
1219
+ _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
1220
+ var ret;
1221
+ sortables.some(function (sortable) {
1222
+ if (lastChild(sortable)) return;
1223
+ var rect = getRect(sortable),
1224
+ threshold = sortable[expando].options.emptyInsertThreshold,
1225
+ insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
1226
+ insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
1227
+
1228
+ if (threshold && insideHorizontally && insideVertically) {
1229
+ return ret = sortable;
1230
+ }
1231
+ });
1232
+ return ret;
1233
+ },
1234
+ _prepareGroup = function _prepareGroup(options) {
1235
+ function toFn(value, pull) {
1236
+ return function (to, from, dragEl, evt) {
1237
+ var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
1238
+
1239
+ if (value == null && (pull || sameGroup)) {
1240
+ // Default pull value
1241
+ // Default pull and put value if same group
1242
+ return true;
1243
+ } else if (value == null || value === false) {
1244
+ return false;
1245
+ } else if (pull && value === 'clone') {
1246
+ return value;
1247
+ } else if (typeof value === 'function') {
1248
+ return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
1249
+ } else {
1250
+ var otherGroup = (pull ? to : from).options.group.name;
1251
+ return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
1252
+ }
1253
+ };
1254
+ }
1255
+
1256
+ var group = {};
1257
+ var originalGroup = options.group;
1258
+
1259
+ if (!originalGroup || _typeof(originalGroup) != 'object') {
1260
+ originalGroup = {
1261
+ name: originalGroup
1262
+ };
1263
+ }
1264
+
1265
+ group.name = originalGroup.name;
1266
+ group.checkPull = toFn(originalGroup.pull, true);
1267
+ group.checkPut = toFn(originalGroup.put);
1268
+ group.revertClone = originalGroup.revertClone;
1269
+ options.group = group;
1270
+ },
1271
+ _hideGhostForTarget = function _hideGhostForTarget() {
1272
+ if (!supportCssPointerEvents && ghostEl) {
1273
+ css(ghostEl, 'display', 'none');
1274
+ }
1275
+ },
1276
+ _unhideGhostForTarget = function _unhideGhostForTarget() {
1277
+ if (!supportCssPointerEvents && ghostEl) {
1278
+ css(ghostEl, 'display', '');
1279
+ }
1280
+ }; // #1184 fix - Prevent click event on fallback if dragged but item not changed position
1281
+
1282
+
1283
+ if (documentExists) {
1284
+ document.addEventListener('click', function (evt) {
1285
+ if (ignoreNextClick) {
1286
+ evt.preventDefault();
1287
+ evt.stopPropagation && evt.stopPropagation();
1288
+ evt.stopImmediatePropagation && evt.stopImmediatePropagation();
1289
+ ignoreNextClick = false;
1290
+ return false;
1291
+ }
1292
+ }, true);
1293
+ }
1294
+
1295
+ var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
1296
+ if (dragEl) {
1297
+ evt = evt.touches ? evt.touches[0] : evt;
1298
+
1299
+ var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
1300
+
1301
+ if (nearest) {
1302
+ // Create imitation event
1303
+ var event = {};
1304
+
1305
+ for (var i in evt) {
1306
+ if (evt.hasOwnProperty(i)) {
1307
+ event[i] = evt[i];
1308
+ }
1309
+ }
1310
+
1311
+ event.target = event.rootEl = nearest;
1312
+ event.preventDefault = void 0;
1313
+ event.stopPropagation = void 0;
1314
+
1315
+ nearest[expando]._onDragOver(event);
1316
+ }
1317
+ }
1318
+ };
1319
+
1320
+ var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
1321
+ if (dragEl) {
1322
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
1323
+ }
1324
+ };
1325
+ /**
1326
+ * @class Sortable
1327
+ * @param {HTMLElement} el
1328
+ * @param {Object} [options]
1329
+ */
1330
+
1331
+
1332
+ function Sortable(el, options) {
1333
+ if (!(el && el.nodeType && el.nodeType === 1)) {
1334
+ throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
1335
+ }
1336
+
1337
+ this.el = el; // root element
1338
+
1339
+ this.options = options = _extends({}, options); // Export instance
1340
+
1341
+ el[expando] = this;
1342
+ var defaults = {
1343
+ group: null,
1344
+ sort: true,
1345
+ disabled: false,
1346
+ store: null,
1347
+ handle: null,
1348
+ draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
1349
+ swapThreshold: 1,
1350
+ // percentage; 0 <= x <= 1
1351
+ invertSwap: false,
1352
+ // invert always
1353
+ invertedSwapThreshold: null,
1354
+ // will be set to same as swapThreshold if default
1355
+ removeCloneOnHide: true,
1356
+ direction: function direction() {
1357
+ return _detectDirection(el, this.options);
1358
+ },
1359
+ ghostClass: 'sortable-ghost',
1360
+ chosenClass: 'sortable-chosen',
1361
+ dragClass: 'sortable-drag',
1362
+ ignore: 'a, img',
1363
+ filter: null,
1364
+ preventOnFilter: true,
1365
+ animation: 0,
1366
+ easing: null,
1367
+ setData: function setData(dataTransfer, dragEl) {
1368
+ dataTransfer.setData('Text', dragEl.textContent);
1369
+ },
1370
+ dropBubble: false,
1371
+ dragoverBubble: false,
1372
+ dataIdAttr: 'data-id',
1373
+ delay: 0,
1374
+ delayOnTouchOnly: false,
1375
+ touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
1376
+ forceFallback: false,
1377
+ fallbackClass: 'sortable-fallback',
1378
+ fallbackOnBody: false,
1379
+ fallbackTolerance: 0,
1380
+ fallbackOffset: {
1381
+ x: 0,
1382
+ y: 0
1383
+ },
1384
+ supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window,
1385
+ emptyInsertThreshold: 5
1386
+ };
1387
+ PluginManager.initializePlugins(this, el, defaults); // Set default options
1388
+
1389
+ for (var name in defaults) {
1390
+ !(name in options) && (options[name] = defaults[name]);
1391
+ }
1392
+
1393
+ _prepareGroup(options); // Bind all private methods
1394
+
1395
+
1396
+ for (var fn in this) {
1397
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
1398
+ this[fn] = this[fn].bind(this);
1399
+ }
1400
+ } // Setup drag mode
1401
+
1402
+
1403
+ this.nativeDraggable = options.forceFallback ? false : supportDraggable;
1404
+
1405
+ if (this.nativeDraggable) {
1406
+ // Touch start threshold cannot be greater than the native dragstart threshold
1407
+ this.options.touchStartThreshold = 1;
1408
+ } // Bind events
1409
+
1410
+
1411
+ if (options.supportPointer) {
1412
+ on(el, 'pointerdown', this._onTapStart);
1413
+ } else {
1414
+ on(el, 'mousedown', this._onTapStart);
1415
+ on(el, 'touchstart', this._onTapStart);
1416
+ }
1417
+
1418
+ if (this.nativeDraggable) {
1419
+ on(el, 'dragover', this);
1420
+ on(el, 'dragenter', this);
1421
+ }
1422
+
1423
+ sortables.push(this.el); // Restore sorting
1424
+
1425
+ options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager
1426
+
1427
+ _extends(this, AnimationStateManager());
1428
+ }
1429
+
1430
+ Sortable.prototype =
1431
+ /** @lends Sortable.prototype */
1432
+ {
1433
+ constructor: Sortable,
1434
+ _isOutsideThisEl: function _isOutsideThisEl(target) {
1435
+ if (!this.el.contains(target) && target !== this.el) {
1436
+ lastTarget = null;
1437
+ }
1438
+ },
1439
+ _getDirection: function _getDirection(evt, target) {
1440
+ return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
1441
+ },
1442
+ _onTapStart: function _onTapStart(
1443
+ /** Event|TouchEvent */
1444
+ evt) {
1445
+ if (!evt.cancelable) return;
1446
+
1447
+ var _this = this,
1448
+ el = this.el,
1449
+ options = this.options,
1450
+ preventOnFilter = options.preventOnFilter,
1451
+ type = evt.type,
1452
+ touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
1453
+ target = (touch || evt).target,
1454
+ originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
1455
+ filter = options.filter;
1456
+
1457
+ _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
1458
+
1459
+
1460
+ if (dragEl) {
1461
+ return;
1462
+ }
1463
+
1464
+ if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
1465
+ return; // only left button and enabled
1466
+ } // cancel dnd if original target is content editable
1467
+
1468
+
1469
+ if (originalTarget.isContentEditable) {
1470
+ return;
1471
+ }
1472
+
1473
+ target = closest(target, options.draggable, el, false);
1474
+
1475
+ if (target && target.animated) {
1476
+ return;
1477
+ }
1478
+
1479
+ if (lastDownEl === target) {
1480
+ // Ignoring duplicate `down`
1481
+ return;
1482
+ } // Get the index of the dragged element within its parent
1483
+
1484
+
1485
+ oldIndex = index(target);
1486
+ oldDraggableIndex = index(target, options.draggable); // Check filter
1487
+
1488
+ if (typeof filter === 'function') {
1489
+ if (filter.call(this, evt, target, this)) {
1490
+ _dispatchEvent({
1491
+ sortable: _this,
1492
+ rootEl: originalTarget,
1493
+ name: 'filter',
1494
+ targetEl: target,
1495
+ toEl: el,
1496
+ fromEl: el
1497
+ });
1498
+
1499
+ pluginEvent('filter', _this, {
1500
+ evt: evt
1501
+ });
1502
+ preventOnFilter && evt.cancelable && evt.preventDefault();
1503
+ return; // cancel dnd
1504
+ }
1505
+ } else if (filter) {
1506
+ filter = filter.split(',').some(function (criteria) {
1507
+ criteria = closest(originalTarget, criteria.trim(), el, false);
1508
+
1509
+ if (criteria) {
1510
+ _dispatchEvent({
1511
+ sortable: _this,
1512
+ rootEl: criteria,
1513
+ name: 'filter',
1514
+ targetEl: target,
1515
+ fromEl: el,
1516
+ toEl: el
1517
+ });
1518
+
1519
+ pluginEvent('filter', _this, {
1520
+ evt: evt
1521
+ });
1522
+ return true;
1523
+ }
1524
+ });
1525
+
1526
+ if (filter) {
1527
+ preventOnFilter && evt.cancelable && evt.preventDefault();
1528
+ return; // cancel dnd
1529
+ }
1530
+ }
1531
+
1532
+ if (options.handle && !closest(originalTarget, options.handle, el, false)) {
1533
+ return;
1534
+ } // Prepare `dragstart`
1535
+
1536
+
1537
+ this._prepareDragStart(evt, touch, target);
1538
+ },
1539
+ _prepareDragStart: function _prepareDragStart(
1540
+ /** Event */
1541
+ evt,
1542
+ /** Touch */
1543
+ touch,
1544
+ /** HTMLElement */
1545
+ target) {
1546
+ var _this = this,
1547
+ el = _this.el,
1548
+ options = _this.options,
1549
+ ownerDocument = el.ownerDocument,
1550
+ dragStartFn;
1551
+
1552
+ if (target && !dragEl && target.parentNode === el) {
1553
+ var dragRect = getRect(target);
1554
+ rootEl = el;
1555
+ dragEl = target;
1556
+ parentEl = dragEl.parentNode;
1557
+ nextEl = dragEl.nextSibling;
1558
+ lastDownEl = target;
1559
+ activeGroup = options.group;
1560
+ Sortable.dragged = dragEl;
1561
+ tapEvt = {
1562
+ target: dragEl,
1563
+ clientX: (touch || evt).clientX,
1564
+ clientY: (touch || evt).clientY
1565
+ };
1566
+ tapDistanceLeft = tapEvt.clientX - dragRect.left;
1567
+ tapDistanceTop = tapEvt.clientY - dragRect.top;
1568
+ this._lastX = (touch || evt).clientX;
1569
+ this._lastY = (touch || evt).clientY;
1570
+ dragEl.style['will-change'] = 'all';
1571
+
1572
+ dragStartFn = function dragStartFn() {
1573
+ pluginEvent('delayEnded', _this, {
1574
+ evt: evt
1575
+ });
1576
+
1577
+ if (Sortable.eventCanceled) {
1578
+ _this._onDrop();
1579
+
1580
+ return;
1581
+ } // Delayed drag has been triggered
1582
+ // we can re-enable the events: touchmove/mousemove
1583
+
1584
+
1585
+ _this._disableDelayedDragEvents();
1586
+
1587
+ if (!FireFox && _this.nativeDraggable) {
1588
+ dragEl.draggable = true;
1589
+ } // Bind the events: dragstart/dragend
1590
+
1591
+
1592
+ _this._triggerDragStart(evt, touch); // Drag start event
1593
+
1594
+
1595
+ _dispatchEvent({
1596
+ sortable: _this,
1597
+ name: 'choose',
1598
+ originalEvent: evt
1599
+ }); // Chosen item
1600
+
1601
+
1602
+ toggleClass(dragEl, options.chosenClass, true);
1603
+ }; // Disable "draggable"
1604
+
1605
+
1606
+ options.ignore.split(',').forEach(function (criteria) {
1607
+ find(dragEl, criteria.trim(), _disableDraggable);
1608
+ });
1609
+ on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
1610
+ on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
1611
+ on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
1612
+ on(ownerDocument, 'mouseup', _this._onDrop);
1613
+ on(ownerDocument, 'touchend', _this._onDrop);
1614
+ on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)
1615
+
1616
+ if (FireFox && this.nativeDraggable) {
1617
+ this.options.touchStartThreshold = 4;
1618
+ dragEl.draggable = true;
1619
+ }
1620
+
1621
+ pluginEvent('delayStart', this, {
1622
+ evt: evt
1623
+ }); // Delay is impossible for native DnD in Edge or IE
1624
+
1625
+ if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
1626
+ if (Sortable.eventCanceled) {
1627
+ this._onDrop();
1628
+
1629
+ return;
1630
+ } // If the user moves the pointer or let go the click or touch
1631
+ // before the delay has been reached:
1632
+ // disable the delayed drag
1633
+
1634
+
1635
+ on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
1636
+ on(ownerDocument, 'touchend', _this._disableDelayedDrag);
1637
+ on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
1638
+ on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
1639
+ on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
1640
+ options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
1641
+ _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
1642
+ } else {
1643
+ dragStartFn();
1644
+ }
1645
+ }
1646
+ },
1647
+ _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(
1648
+ /** TouchEvent|PointerEvent **/
1649
+ e) {
1650
+ var touch = e.touches ? e.touches[0] : e;
1651
+
1652
+ if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {
1653
+ this._disableDelayedDrag();
1654
+ }
1655
+ },
1656
+ _disableDelayedDrag: function _disableDelayedDrag() {
1657
+ dragEl && _disableDraggable(dragEl);
1658
+ clearTimeout(this._dragStartTimer);
1659
+
1660
+ this._disableDelayedDragEvents();
1661
+ },
1662
+ _disableDelayedDragEvents: function _disableDelayedDragEvents() {
1663
+ var ownerDocument = this.el.ownerDocument;
1664
+ off(ownerDocument, 'mouseup', this._disableDelayedDrag);
1665
+ off(ownerDocument, 'touchend', this._disableDelayedDrag);
1666
+ off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
1667
+ off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
1668
+ off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
1669
+ off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
1670
+ },
1671
+ _triggerDragStart: function _triggerDragStart(
1672
+ /** Event */
1673
+ evt,
1674
+ /** Touch */
1675
+ touch) {
1676
+ touch = touch || evt.pointerType == 'touch' && evt;
1677
+
1678
+ if (!this.nativeDraggable || touch) {
1679
+ if (this.options.supportPointer) {
1680
+ on(document, 'pointermove', this._onTouchMove);
1681
+ } else if (touch) {
1682
+ on(document, 'touchmove', this._onTouchMove);
1683
+ } else {
1684
+ on(document, 'mousemove', this._onTouchMove);
1685
+ }
1686
+ } else {
1687
+ on(dragEl, 'dragend', this);
1688
+ on(rootEl, 'dragstart', this._onDragStart);
1689
+ }
1690
+
1691
+ try {
1692
+ if (document.selection) {
1693
+ // Timeout neccessary for IE9
1694
+ _nextTick(function () {
1695
+ document.selection.empty();
1696
+ });
1697
+ } else {
1698
+ window.getSelection().removeAllRanges();
1699
+ }
1700
+ } catch (err) {}
1701
+ },
1702
+ _dragStarted: function _dragStarted(fallback, evt) {
1703
+
1704
+ awaitingDragStarted = false;
1705
+
1706
+ if (rootEl && dragEl) {
1707
+ pluginEvent('dragStarted', this, {
1708
+ evt: evt
1709
+ });
1710
+
1711
+ if (this.nativeDraggable) {
1712
+ on(document, 'dragover', _checkOutsideTargetEl);
1713
+ }
1714
+
1715
+ var options = this.options; // Apply effect
1716
+
1717
+ !fallback && toggleClass(dragEl, options.dragClass, false);
1718
+ toggleClass(dragEl, options.ghostClass, true);
1719
+ Sortable.active = this;
1720
+ fallback && this._appendGhost(); // Drag start event
1721
+
1722
+ _dispatchEvent({
1723
+ sortable: this,
1724
+ name: 'start',
1725
+ originalEvent: evt
1726
+ });
1727
+ } else {
1728
+ this._nulling();
1729
+ }
1730
+ },
1731
+ _emulateDragOver: function _emulateDragOver() {
1732
+ if (touchEvt) {
1733
+ this._lastX = touchEvt.clientX;
1734
+ this._lastY = touchEvt.clientY;
1735
+
1736
+ _hideGhostForTarget();
1737
+
1738
+ var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1739
+ var parent = target;
1740
+
1741
+ while (target && target.shadowRoot) {
1742
+ target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1743
+ if (target === parent) break;
1744
+ parent = target;
1745
+ }
1746
+
1747
+ dragEl.parentNode[expando]._isOutsideThisEl(target);
1748
+
1749
+ if (parent) {
1750
+ do {
1751
+ if (parent[expando]) {
1752
+ var inserted = void 0;
1753
+ inserted = parent[expando]._onDragOver({
1754
+ clientX: touchEvt.clientX,
1755
+ clientY: touchEvt.clientY,
1756
+ target: target,
1757
+ rootEl: parent
1758
+ });
1759
+
1760
+ if (inserted && !this.options.dragoverBubble) {
1761
+ break;
1762
+ }
1763
+ }
1764
+
1765
+ target = parent; // store last element
1766
+ }
1767
+ /* jshint boss:true */
1768
+ while (parent = parent.parentNode);
1769
+ }
1770
+
1771
+ _unhideGhostForTarget();
1772
+ }
1773
+ },
1774
+ _onTouchMove: function _onTouchMove(
1775
+ /**TouchEvent*/
1776
+ evt) {
1777
+ if (tapEvt) {
1778
+ var options = this.options,
1779
+ fallbackTolerance = options.fallbackTolerance,
1780
+ fallbackOffset = options.fallbackOffset,
1781
+ touch = evt.touches ? evt.touches[0] : evt,
1782
+ ghostMatrix = ghostEl && matrix(ghostEl, true),
1783
+ scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
1784
+ scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
1785
+ relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
1786
+ dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
1787
+ dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging
1788
+
1789
+ if (!Sortable.active && !awaitingDragStarted) {
1790
+ if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
1791
+ return;
1792
+ }
1793
+
1794
+ this._onDragStart(evt, true);
1795
+ }
1796
+
1797
+ if (ghostEl) {
1798
+ if (ghostMatrix) {
1799
+ ghostMatrix.e += dx - (lastDx || 0);
1800
+ ghostMatrix.f += dy - (lastDy || 0);
1801
+ } else {
1802
+ ghostMatrix = {
1803
+ a: 1,
1804
+ b: 0,
1805
+ c: 0,
1806
+ d: 1,
1807
+ e: dx,
1808
+ f: dy
1809
+ };
1810
+ }
1811
+
1812
+ var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
1813
+ css(ghostEl, 'webkitTransform', cssMatrix);
1814
+ css(ghostEl, 'mozTransform', cssMatrix);
1815
+ css(ghostEl, 'msTransform', cssMatrix);
1816
+ css(ghostEl, 'transform', cssMatrix);
1817
+ lastDx = dx;
1818
+ lastDy = dy;
1819
+ touchEvt = touch;
1820
+ }
1821
+
1822
+ evt.cancelable && evt.preventDefault();
1823
+ }
1824
+ },
1825
+ _appendGhost: function _appendGhost() {
1826
+ // Bug if using scale(): https://stackoverflow.com/questions/2637058
1827
+ // Not being adjusted for
1828
+ if (!ghostEl) {
1829
+ var container = this.options.fallbackOnBody ? document.body : rootEl,
1830
+ rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
1831
+ options = this.options; // Position absolutely
1832
+
1833
+ if (PositionGhostAbsolutely) {
1834
+ // Get relatively positioned parent
1835
+ ghostRelativeParent = container;
1836
+
1837
+ while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
1838
+ ghostRelativeParent = ghostRelativeParent.parentNode;
1839
+ }
1840
+
1841
+ if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
1842
+ if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
1843
+ rect.top += ghostRelativeParent.scrollTop;
1844
+ rect.left += ghostRelativeParent.scrollLeft;
1845
+ } else {
1846
+ ghostRelativeParent = getWindowScrollingElement();
1847
+ }
1848
+
1849
+ ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
1850
+ }
1851
+
1852
+ ghostEl = dragEl.cloneNode(true);
1853
+ toggleClass(ghostEl, options.ghostClass, false);
1854
+ toggleClass(ghostEl, options.fallbackClass, true);
1855
+ toggleClass(ghostEl, options.dragClass, true);
1856
+ css(ghostEl, 'transition', '');
1857
+ css(ghostEl, 'transform', '');
1858
+ css(ghostEl, 'box-sizing', 'border-box');
1859
+ css(ghostEl, 'margin', 0);
1860
+ css(ghostEl, 'top', rect.top);
1861
+ css(ghostEl, 'left', rect.left);
1862
+ css(ghostEl, 'width', rect.width);
1863
+ css(ghostEl, 'height', rect.height);
1864
+ css(ghostEl, 'opacity', '0.8');
1865
+ css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
1866
+ css(ghostEl, 'zIndex', '100000');
1867
+ css(ghostEl, 'pointerEvents', 'none');
1868
+ Sortable.ghost = ghostEl;
1869
+ container.appendChild(ghostEl); // Set transform-origin
1870
+
1871
+ css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
1872
+ }
1873
+ },
1874
+ _onDragStart: function _onDragStart(
1875
+ /**Event*/
1876
+ evt,
1877
+ /**boolean*/
1878
+ fallback) {
1879
+ var _this = this;
1880
+
1881
+ var dataTransfer = evt.dataTransfer;
1882
+ var options = _this.options;
1883
+ pluginEvent('dragStart', this, {
1884
+ evt: evt
1885
+ });
1886
+
1887
+ if (Sortable.eventCanceled) {
1888
+ this._onDrop();
1889
+
1890
+ return;
1891
+ }
1892
+
1893
+ pluginEvent('setupClone', this);
1894
+
1895
+ if (!Sortable.eventCanceled) {
1896
+ cloneEl = clone(dragEl);
1897
+ cloneEl.draggable = false;
1898
+ cloneEl.style['will-change'] = '';
1899
+
1900
+ this._hideClone();
1901
+
1902
+ toggleClass(cloneEl, this.options.chosenClass, false);
1903
+ Sortable.clone = cloneEl;
1904
+ } // #1143: IFrame support workaround
1905
+
1906
+
1907
+ _this.cloneId = _nextTick(function () {
1908
+ pluginEvent('clone', _this);
1909
+ if (Sortable.eventCanceled) return;
1910
+
1911
+ if (!_this.options.removeCloneOnHide) {
1912
+ rootEl.insertBefore(cloneEl, dragEl);
1913
+ }
1914
+
1915
+ _this._hideClone();
1916
+
1917
+ _dispatchEvent({
1918
+ sortable: _this,
1919
+ name: 'clone'
1920
+ });
1921
+ });
1922
+ !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events
1923
+
1924
+ if (fallback) {
1925
+ ignoreNextClick = true;
1926
+ _this._loopId = setInterval(_this._emulateDragOver, 50);
1927
+ } else {
1928
+ // Undo what was set in _prepareDragStart before drag started
1929
+ off(document, 'mouseup', _this._onDrop);
1930
+ off(document, 'touchend', _this._onDrop);
1931
+ off(document, 'touchcancel', _this._onDrop);
1932
+
1933
+ if (dataTransfer) {
1934
+ dataTransfer.effectAllowed = 'move';
1935
+ options.setData && options.setData.call(_this, dataTransfer, dragEl);
1936
+ }
1937
+
1938
+ on(document, 'drop', _this); // #1276 fix:
1939
+
1940
+ css(dragEl, 'transform', 'translateZ(0)');
1941
+ }
1942
+
1943
+ awaitingDragStarted = true;
1944
+ _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
1945
+ on(document, 'selectstart', _this);
1946
+ moved = true;
1947
+
1948
+ if (Safari) {
1949
+ css(document.body, 'user-select', 'none');
1950
+ }
1951
+ },
1952
+ // Returns true - if no further action is needed (either inserted or another condition)
1953
+ _onDragOver: function _onDragOver(
1954
+ /**Event*/
1955
+ evt) {
1956
+ var el = this.el,
1957
+ target = evt.target,
1958
+ dragRect,
1959
+ targetRect,
1960
+ revert,
1961
+ options = this.options,
1962
+ group = options.group,
1963
+ activeSortable = Sortable.active,
1964
+ isOwner = activeGroup === group,
1965
+ canSort = options.sort,
1966
+ fromSortable = putSortable || activeSortable,
1967
+ vertical,
1968
+ _this = this,
1969
+ completedFired = false;
1970
+
1971
+ if (_silent) return;
1972
+
1973
+ function dragOverEvent(name, extra) {
1974
+ pluginEvent(name, _this, _objectSpread({
1975
+ evt: evt,
1976
+ isOwner: isOwner,
1977
+ axis: vertical ? 'vertical' : 'horizontal',
1978
+ revert: revert,
1979
+ dragRect: dragRect,
1980
+ targetRect: targetRect,
1981
+ canSort: canSort,
1982
+ fromSortable: fromSortable,
1983
+ target: target,
1984
+ completed: completed,
1985
+ onMove: function onMove(target, after) {
1986
+ return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
1987
+ },
1988
+ changed: changed
1989
+ }, extra));
1990
+ } // Capture animation state
1991
+
1992
+
1993
+ function capture() {
1994
+ dragOverEvent('dragOverAnimationCapture');
1995
+
1996
+ _this.captureAnimationState();
1997
+
1998
+ if (_this !== fromSortable) {
1999
+ fromSortable.captureAnimationState();
2000
+ }
2001
+ } // Return invocation when dragEl is inserted (or completed)
2002
+
2003
+
2004
+ function completed(insertion) {
2005
+ dragOverEvent('dragOverCompleted', {
2006
+ insertion: insertion
2007
+ });
2008
+
2009
+ if (insertion) {
2010
+ // Clones must be hidden before folding animation to capture dragRectAbsolute properly
2011
+ if (isOwner) {
2012
+ activeSortable._hideClone();
2013
+ } else {
2014
+ activeSortable._showClone(_this);
2015
+ }
2016
+
2017
+ if (_this !== fromSortable) {
2018
+ // Set ghost class to new sortable's ghost class
2019
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
2020
+ toggleClass(dragEl, options.ghostClass, true);
2021
+ }
2022
+
2023
+ if (putSortable !== _this && _this !== Sortable.active) {
2024
+ putSortable = _this;
2025
+ } else if (_this === Sortable.active && putSortable) {
2026
+ putSortable = null;
2027
+ } // Animation
2028
+
2029
+
2030
+ if (fromSortable === _this) {
2031
+ _this._ignoreWhileAnimating = target;
2032
+ }
2033
+
2034
+ _this.animateAll(function () {
2035
+ dragOverEvent('dragOverAnimationComplete');
2036
+ _this._ignoreWhileAnimating = null;
2037
+ });
2038
+
2039
+ if (_this !== fromSortable) {
2040
+ fromSortable.animateAll();
2041
+ fromSortable._ignoreWhileAnimating = null;
2042
+ }
2043
+ } // Null lastTarget if it is not inside a previously swapped element
2044
+
2045
+
2046
+ if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
2047
+ lastTarget = null;
2048
+ } // no bubbling and not fallback
2049
+
2050
+
2051
+ if (!options.dragoverBubble && !evt.rootEl && target !== document) {
2052
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted
2053
+
2054
+
2055
+ !insertion && nearestEmptyInsertDetectEvent(evt);
2056
+ }
2057
+
2058
+ !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
2059
+ return completedFired = true;
2060
+ } // Call when dragEl has been inserted
2061
+
2062
+
2063
+ function changed() {
2064
+ newIndex = index(dragEl);
2065
+ newDraggableIndex = index(dragEl, options.draggable);
2066
+
2067
+ _dispatchEvent({
2068
+ sortable: _this,
2069
+ name: 'change',
2070
+ toEl: el,
2071
+ newIndex: newIndex,
2072
+ newDraggableIndex: newDraggableIndex,
2073
+ originalEvent: evt
2074
+ });
2075
+ }
2076
+
2077
+ if (evt.preventDefault !== void 0) {
2078
+ evt.cancelable && evt.preventDefault();
2079
+ }
2080
+
2081
+ target = closest(target, options.draggable, el, true);
2082
+ dragOverEvent('dragOver');
2083
+ if (Sortable.eventCanceled) return completedFired;
2084
+
2085
+ if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
2086
+ return completed(false);
2087
+ }
2088
+
2089
+ ignoreNextClick = false;
2090
+
2091
+ if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list
2092
+ : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
2093
+ vertical = this._getDirection(evt, target) === 'vertical';
2094
+ dragRect = getRect(dragEl);
2095
+ dragOverEvent('dragOverValid');
2096
+ if (Sortable.eventCanceled) return completedFired;
2097
+
2098
+ if (revert) {
2099
+ parentEl = rootEl; // actualization
2100
+
2101
+ capture();
2102
+
2103
+ this._hideClone();
2104
+
2105
+ dragOverEvent('revert');
2106
+
2107
+ if (!Sortable.eventCanceled) {
2108
+ if (nextEl) {
2109
+ rootEl.insertBefore(dragEl, nextEl);
2110
+ } else {
2111
+ rootEl.appendChild(dragEl);
2112
+ }
2113
+ }
2114
+
2115
+ return completed(true);
2116
+ }
2117
+
2118
+ var elLastChild = lastChild(el, options.draggable);
2119
+
2120
+ if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
2121
+ // If already at end of list: Do not insert
2122
+ if (elLastChild === dragEl) {
2123
+ return completed(false);
2124
+ } // assign target only if condition is true
2125
+
2126
+
2127
+ if (elLastChild && el === evt.target) {
2128
+ target = elLastChild;
2129
+ }
2130
+
2131
+ if (target) {
2132
+ targetRect = getRect(target);
2133
+ }
2134
+
2135
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
2136
+ capture();
2137
+ el.appendChild(dragEl);
2138
+ parentEl = el; // actualization
2139
+
2140
+ changed();
2141
+ return completed(true);
2142
+ }
2143
+ } else if (target.parentNode === el) {
2144
+ targetRect = getRect(target);
2145
+ var direction = 0,
2146
+ targetBeforeFirstSwap,
2147
+ differentLevel = dragEl.parentNode !== el,
2148
+ differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
2149
+ side1 = vertical ? 'top' : 'left',
2150
+ scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
2151
+ scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
2152
+
2153
+ if (lastTarget !== target) {
2154
+ targetBeforeFirstSwap = targetRect[side1];
2155
+ pastFirstInvertThresh = false;
2156
+ isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
2157
+ }
2158
+
2159
+ direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
2160
+ var sibling;
2161
+
2162
+ if (direction !== 0) {
2163
+ // Check if target is beside dragEl in respective direction (ignoring hidden elements)
2164
+ var dragIndex = index(dragEl);
2165
+
2166
+ do {
2167
+ dragIndex -= direction;
2168
+ sibling = parentEl.children[dragIndex];
2169
+ } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
2170
+ } // If dragEl is already beside target: Do not insert
2171
+
2172
+
2173
+ if (direction === 0 || sibling === target) {
2174
+ return completed(false);
2175
+ }
2176
+
2177
+ lastTarget = target;
2178
+ lastDirection = direction;
2179
+ var nextSibling = target.nextElementSibling,
2180
+ after = false;
2181
+ after = direction === 1;
2182
+
2183
+ var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
2184
+
2185
+ if (moveVector !== false) {
2186
+ if (moveVector === 1 || moveVector === -1) {
2187
+ after = moveVector === 1;
2188
+ }
2189
+
2190
+ _silent = true;
2191
+ setTimeout(_unsilent, 30);
2192
+ capture();
2193
+
2194
+ if (after && !nextSibling) {
2195
+ el.appendChild(dragEl);
2196
+ } else {
2197
+ target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
2198
+ } // Undo chrome's scroll adjustment (has no effect on other browsers)
2199
+
2200
+
2201
+ if (scrolledPastTop) {
2202
+ scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
2203
+ }
2204
+
2205
+ parentEl = dragEl.parentNode; // actualization
2206
+ // must be done before animation
2207
+
2208
+ if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
2209
+ targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
2210
+ }
2211
+
2212
+ changed();
2213
+ return completed(true);
2214
+ }
2215
+ }
2216
+
2217
+ if (el.contains(dragEl)) {
2218
+ return completed(false);
2219
+ }
2220
+ }
2221
+
2222
+ return false;
2223
+ },
2224
+ _ignoreWhileAnimating: null,
2225
+ _offMoveEvents: function _offMoveEvents() {
2226
+ off(document, 'mousemove', this._onTouchMove);
2227
+ off(document, 'touchmove', this._onTouchMove);
2228
+ off(document, 'pointermove', this._onTouchMove);
2229
+ off(document, 'dragover', nearestEmptyInsertDetectEvent);
2230
+ off(document, 'mousemove', nearestEmptyInsertDetectEvent);
2231
+ off(document, 'touchmove', nearestEmptyInsertDetectEvent);
2232
+ },
2233
+ _offUpEvents: function _offUpEvents() {
2234
+ var ownerDocument = this.el.ownerDocument;
2235
+ off(ownerDocument, 'mouseup', this._onDrop);
2236
+ off(ownerDocument, 'touchend', this._onDrop);
2237
+ off(ownerDocument, 'pointerup', this._onDrop);
2238
+ off(ownerDocument, 'touchcancel', this._onDrop);
2239
+ off(document, 'selectstart', this);
2240
+ },
2241
+ _onDrop: function _onDrop(
2242
+ /**Event*/
2243
+ evt) {
2244
+ var el = this.el,
2245
+ options = this.options; // Get the index of the dragged element within its parent
2246
+
2247
+ newIndex = index(dragEl);
2248
+ newDraggableIndex = index(dragEl, options.draggable);
2249
+ pluginEvent('drop', this, {
2250
+ evt: evt
2251
+ });
2252
+ parentEl = dragEl && dragEl.parentNode; // Get again after plugin event
2253
+
2254
+ newIndex = index(dragEl);
2255
+ newDraggableIndex = index(dragEl, options.draggable);
2256
+
2257
+ if (Sortable.eventCanceled) {
2258
+ this._nulling();
2259
+
2260
+ return;
2261
+ }
2262
+
2263
+ awaitingDragStarted = false;
2264
+ isCircumstantialInvert = false;
2265
+ pastFirstInvertThresh = false;
2266
+ clearInterval(this._loopId);
2267
+ clearTimeout(this._dragStartTimer);
2268
+
2269
+ _cancelNextTick(this.cloneId);
2270
+
2271
+ _cancelNextTick(this._dragStartId); // Unbind events
2272
+
2273
+
2274
+ if (this.nativeDraggable) {
2275
+ off(document, 'drop', this);
2276
+ off(el, 'dragstart', this._onDragStart);
2277
+ }
2278
+
2279
+ this._offMoveEvents();
2280
+
2281
+ this._offUpEvents();
2282
+
2283
+ if (Safari) {
2284
+ css(document.body, 'user-select', '');
2285
+ }
2286
+
2287
+ css(dragEl, 'transform', '');
2288
+
2289
+ if (evt) {
2290
+ if (moved) {
2291
+ evt.cancelable && evt.preventDefault();
2292
+ !options.dropBubble && evt.stopPropagation();
2293
+ }
2294
+
2295
+ ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
2296
+
2297
+ if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
2298
+ // Remove clone(s)
2299
+ cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
2300
+ }
2301
+
2302
+ if (dragEl) {
2303
+ if (this.nativeDraggable) {
2304
+ off(dragEl, 'dragend', this);
2305
+ }
2306
+
2307
+ _disableDraggable(dragEl);
2308
+
2309
+ dragEl.style['will-change'] = ''; // Remove classes
2310
+ // ghostClass is added in dragStarted
2311
+
2312
+ if (moved && !awaitingDragStarted) {
2313
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
2314
+ }
2315
+
2316
+ toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event
2317
+
2318
+ _dispatchEvent({
2319
+ sortable: this,
2320
+ name: 'unchoose',
2321
+ toEl: parentEl,
2322
+ newIndex: null,
2323
+ newDraggableIndex: null,
2324
+ originalEvent: evt
2325
+ });
2326
+
2327
+ if (rootEl !== parentEl) {
2328
+ if (newIndex >= 0) {
2329
+ // Add event
2330
+ _dispatchEvent({
2331
+ rootEl: parentEl,
2332
+ name: 'add',
2333
+ toEl: parentEl,
2334
+ fromEl: rootEl,
2335
+ originalEvent: evt
2336
+ }); // Remove event
2337
+
2338
+
2339
+ _dispatchEvent({
2340
+ sortable: this,
2341
+ name: 'remove',
2342
+ toEl: parentEl,
2343
+ originalEvent: evt
2344
+ }); // drag from one list and drop into another
2345
+
2346
+
2347
+ _dispatchEvent({
2348
+ rootEl: parentEl,
2349
+ name: 'sort',
2350
+ toEl: parentEl,
2351
+ fromEl: rootEl,
2352
+ originalEvent: evt
2353
+ });
2354
+
2355
+ _dispatchEvent({
2356
+ sortable: this,
2357
+ name: 'sort',
2358
+ toEl: parentEl,
2359
+ originalEvent: evt
2360
+ });
2361
+ }
2362
+
2363
+ putSortable && putSortable.save();
2364
+ } else {
2365
+ if (newIndex !== oldIndex) {
2366
+ if (newIndex >= 0) {
2367
+ // drag & drop within the same list
2368
+ _dispatchEvent({
2369
+ sortable: this,
2370
+ name: 'update',
2371
+ toEl: parentEl,
2372
+ originalEvent: evt
2373
+ });
2374
+
2375
+ _dispatchEvent({
2376
+ sortable: this,
2377
+ name: 'sort',
2378
+ toEl: parentEl,
2379
+ originalEvent: evt
2380
+ });
2381
+ }
2382
+ }
2383
+ }
2384
+
2385
+ if (Sortable.active) {
2386
+ /* jshint eqnull:true */
2387
+ if (newIndex == null || newIndex === -1) {
2388
+ newIndex = oldIndex;
2389
+ newDraggableIndex = oldDraggableIndex;
2390
+ }
2391
+
2392
+ _dispatchEvent({
2393
+ sortable: this,
2394
+ name: 'end',
2395
+ toEl: parentEl,
2396
+ originalEvent: evt
2397
+ }); // Save sorting
2398
+
2399
+
2400
+ this.save();
2401
+ }
2402
+ }
2403
+ }
2404
+
2405
+ this._nulling();
2406
+ },
2407
+ _nulling: function _nulling() {
2408
+ pluginEvent('nulling', this);
2409
+ rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;
2410
+ savedInputChecked.forEach(function (el) {
2411
+ el.checked = true;
2412
+ });
2413
+ savedInputChecked.length = lastDx = lastDy = 0;
2414
+ },
2415
+ handleEvent: function handleEvent(
2416
+ /**Event*/
2417
+ evt) {
2418
+ switch (evt.type) {
2419
+ case 'drop':
2420
+ case 'dragend':
2421
+ this._onDrop(evt);
2422
+
2423
+ break;
2424
+
2425
+ case 'dragenter':
2426
+ case 'dragover':
2427
+ if (dragEl) {
2428
+ this._onDragOver(evt);
2429
+
2430
+ _globalDragOver(evt);
2431
+ }
2432
+
2433
+ break;
2434
+
2435
+ case 'selectstart':
2436
+ evt.preventDefault();
2437
+ break;
2438
+ }
2439
+ },
2440
+
2441
+ /**
2442
+ * Serializes the item into an array of string.
2443
+ * @returns {String[]}
2444
+ */
2445
+ toArray: function toArray() {
2446
+ var order = [],
2447
+ el,
2448
+ children = this.el.children,
2449
+ i = 0,
2450
+ n = children.length,
2451
+ options = this.options;
2452
+
2453
+ for (; i < n; i++) {
2454
+ el = children[i];
2455
+
2456
+ if (closest(el, options.draggable, this.el, false)) {
2457
+ order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
2458
+ }
2459
+ }
2460
+
2461
+ return order;
2462
+ },
2463
+
2464
+ /**
2465
+ * Sorts the elements according to the array.
2466
+ * @param {String[]} order order of the items
2467
+ */
2468
+ sort: function sort(order) {
2469
+ var items = {},
2470
+ rootEl = this.el;
2471
+ this.toArray().forEach(function (id, i) {
2472
+ var el = rootEl.children[i];
2473
+
2474
+ if (closest(el, this.options.draggable, rootEl, false)) {
2475
+ items[id] = el;
2476
+ }
2477
+ }, this);
2478
+ order.forEach(function (id) {
2479
+ if (items[id]) {
2480
+ rootEl.removeChild(items[id]);
2481
+ rootEl.appendChild(items[id]);
2482
+ }
2483
+ });
2484
+ },
2485
+
2486
+ /**
2487
+ * Save the current sorting
2488
+ */
2489
+ save: function save() {
2490
+ var store = this.options.store;
2491
+ store && store.set && store.set(this);
2492
+ },
2493
+
2494
+ /**
2495
+ * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2496
+ * @param {HTMLElement} el
2497
+ * @param {String} [selector] default: `options.draggable`
2498
+ * @returns {HTMLElement|null}
2499
+ */
2500
+ closest: function closest$1(el, selector) {
2501
+ return closest(el, selector || this.options.draggable, this.el, false);
2502
+ },
2503
+
2504
+ /**
2505
+ * Set/get option
2506
+ * @param {string} name
2507
+ * @param {*} [value]
2508
+ * @returns {*}
2509
+ */
2510
+ option: function option(name, value) {
2511
+ var options = this.options;
2512
+
2513
+ if (value === void 0) {
2514
+ return options[name];
2515
+ } else {
2516
+ var modifiedValue = PluginManager.modifyOption(this, name, value);
2517
+
2518
+ if (typeof modifiedValue !== 'undefined') {
2519
+ options[name] = modifiedValue;
2520
+ } else {
2521
+ options[name] = value;
2522
+ }
2523
+
2524
+ if (name === 'group') {
2525
+ _prepareGroup(options);
2526
+ }
2527
+ }
2528
+ },
2529
+
2530
+ /**
2531
+ * Destroy
2532
+ */
2533
+ destroy: function destroy() {
2534
+ pluginEvent('destroy', this);
2535
+ var el = this.el;
2536
+ el[expando] = null;
2537
+ off(el, 'mousedown', this._onTapStart);
2538
+ off(el, 'touchstart', this._onTapStart);
2539
+ off(el, 'pointerdown', this._onTapStart);
2540
+
2541
+ if (this.nativeDraggable) {
2542
+ off(el, 'dragover', this);
2543
+ off(el, 'dragenter', this);
2544
+ } // Remove draggable attributes
2545
+
2546
+
2547
+ Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
2548
+ el.removeAttribute('draggable');
2549
+ });
2550
+
2551
+ this._onDrop();
2552
+
2553
+ this._disableDelayedDragEvents();
2554
+
2555
+ sortables.splice(sortables.indexOf(this.el), 1);
2556
+ this.el = el = null;
2557
+ },
2558
+ _hideClone: function _hideClone() {
2559
+ if (!cloneHidden) {
2560
+ pluginEvent('hideClone', this);
2561
+ if (Sortable.eventCanceled) return;
2562
+ css(cloneEl, 'display', 'none');
2563
+
2564
+ if (this.options.removeCloneOnHide && cloneEl.parentNode) {
2565
+ cloneEl.parentNode.removeChild(cloneEl);
2566
+ }
2567
+
2568
+ cloneHidden = true;
2569
+ }
2570
+ },
2571
+ _showClone: function _showClone(putSortable) {
2572
+ if (putSortable.lastPutMode !== 'clone') {
2573
+ this._hideClone();
2574
+
2575
+ return;
2576
+ }
2577
+
2578
+ if (cloneHidden) {
2579
+ pluginEvent('showClone', this);
2580
+ if (Sortable.eventCanceled) return; // show clone at dragEl or original position
2581
+
2582
+ if (rootEl.contains(dragEl) && !this.options.group.revertClone) {
2583
+ rootEl.insertBefore(cloneEl, dragEl);
2584
+ } else if (nextEl) {
2585
+ rootEl.insertBefore(cloneEl, nextEl);
2586
+ } else {
2587
+ rootEl.appendChild(cloneEl);
2588
+ }
2589
+
2590
+ if (this.options.group.revertClone) {
2591
+ this.animate(dragEl, cloneEl);
2592
+ }
2593
+
2594
+ css(cloneEl, 'display', '');
2595
+ cloneHidden = false;
2596
+ }
2597
+ }
2598
+ };
2599
+
2600
+ function _globalDragOver(
2601
+ /**Event*/
2602
+ evt) {
2603
+ if (evt.dataTransfer) {
2604
+ evt.dataTransfer.dropEffect = 'move';
2605
+ }
2606
+
2607
+ evt.cancelable && evt.preventDefault();
2608
+ }
2609
+
2610
+ function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
2611
+ var evt,
2612
+ sortable = fromEl[expando],
2613
+ onMoveFn = sortable.options.onMove,
2614
+ retVal; // Support for new CustomEvent feature
2615
+
2616
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
2617
+ evt = new CustomEvent('move', {
2618
+ bubbles: true,
2619
+ cancelable: true
2620
+ });
2621
+ } else {
2622
+ evt = document.createEvent('Event');
2623
+ evt.initEvent('move', true, true);
2624
+ }
2625
+
2626
+ evt.to = toEl;
2627
+ evt.from = fromEl;
2628
+ evt.dragged = dragEl;
2629
+ evt.draggedRect = dragRect;
2630
+ evt.related = targetEl || toEl;
2631
+ evt.relatedRect = targetRect || getRect(toEl);
2632
+ evt.willInsertAfter = willInsertAfter;
2633
+ evt.originalEvent = originalEvent;
2634
+ fromEl.dispatchEvent(evt);
2635
+
2636
+ if (onMoveFn) {
2637
+ retVal = onMoveFn.call(sortable, evt, originalEvent);
2638
+ }
2639
+
2640
+ return retVal;
2641
+ }
2642
+
2643
+ function _disableDraggable(el) {
2644
+ el.draggable = false;
2645
+ }
2646
+
2647
+ function _unsilent() {
2648
+ _silent = false;
2649
+ }
2650
+
2651
+ function _ghostIsLast(evt, vertical, sortable) {
2652
+ var rect = getRect(lastChild(sortable.el, sortable.options.draggable));
2653
+ var spacer = 10;
2654
+ return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;
2655
+ }
2656
+
2657
+ function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
2658
+ var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
2659
+ targetLength = vertical ? targetRect.height : targetRect.width,
2660
+ targetS1 = vertical ? targetRect.top : targetRect.left,
2661
+ targetS2 = vertical ? targetRect.bottom : targetRect.right,
2662
+ invert = false;
2663
+
2664
+ if (!invertSwap) {
2665
+ // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
2666
+ if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
2667
+ // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
2668
+ // check if past first invert threshold on side opposite of lastDirection
2669
+ if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
2670
+ // past first invert threshold, do not restrict inverted threshold to dragEl shadow
2671
+ pastFirstInvertThresh = true;
2672
+ }
2673
+
2674
+ if (!pastFirstInvertThresh) {
2675
+ // dragEl shadow (target move distance shadow)
2676
+ if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
2677
+ : mouseOnAxis > targetS2 - targetMoveDistance) {
2678
+ return -lastDirection;
2679
+ }
2680
+ } else {
2681
+ invert = true;
2682
+ }
2683
+ } else {
2684
+ // Regular
2685
+ if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
2686
+ return _getInsertDirection(target);
2687
+ }
2688
+ }
2689
+ }
2690
+
2691
+ invert = invert || invertSwap;
2692
+
2693
+ if (invert) {
2694
+ // Invert of regular
2695
+ if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
2696
+ return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
2697
+ }
2698
+ }
2699
+
2700
+ return 0;
2701
+ }
2702
+ /**
2703
+ * Gets the direction dragEl must be swapped relative to target in order to make it
2704
+ * seem that dragEl has been "inserted" into that element's position
2705
+ * @param {HTMLElement} target The target whose position dragEl is being inserted at
2706
+ * @return {Number} Direction dragEl must be swapped
2707
+ */
2708
+
2709
+
2710
+ function _getInsertDirection(target) {
2711
+ if (index(dragEl) < index(target)) {
2712
+ return 1;
2713
+ } else {
2714
+ return -1;
2715
+ }
2716
+ }
2717
+ /**
2718
+ * Generate id
2719
+ * @param {HTMLElement} el
2720
+ * @returns {String}
2721
+ * @private
2722
+ */
2723
+
2724
+
2725
+ function _generateId(el) {
2726
+ var str = el.tagName + el.className + el.src + el.href + el.textContent,
2727
+ i = str.length,
2728
+ sum = 0;
2729
+
2730
+ while (i--) {
2731
+ sum += str.charCodeAt(i);
2732
+ }
2733
+
2734
+ return sum.toString(36);
2735
+ }
2736
+
2737
+ function _saveInputCheckedState(root) {
2738
+ savedInputChecked.length = 0;
2739
+ var inputs = root.getElementsByTagName('input');
2740
+ var idx = inputs.length;
2741
+
2742
+ while (idx--) {
2743
+ var el = inputs[idx];
2744
+ el.checked && savedInputChecked.push(el);
2745
+ }
2746
+ }
2747
+
2748
+ function _nextTick(fn) {
2749
+ return setTimeout(fn, 0);
2750
+ }
2751
+
2752
+ function _cancelNextTick(id) {
2753
+ return clearTimeout(id);
2754
+ } // Fixed #973:
2755
+
2756
+
2757
+ if (documentExists) {
2758
+ on(document, 'touchmove', function (evt) {
2759
+ if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
2760
+ evt.preventDefault();
2761
+ }
2762
+ });
2763
+ } // Export utils
2764
+
2765
+
2766
+ Sortable.utils = {
2767
+ on: on,
2768
+ off: off,
2769
+ css: css,
2770
+ find: find,
2771
+ is: function is(el, selector) {
2772
+ return !!closest(el, selector, el, false);
2773
+ },
2774
+ extend: extend,
2775
+ throttle: throttle,
2776
+ closest: closest,
2777
+ toggleClass: toggleClass,
2778
+ clone: clone,
2779
+ index: index,
2780
+ nextTick: _nextTick,
2781
+ cancelNextTick: _cancelNextTick,
2782
+ detectDirection: _detectDirection,
2783
+ getChild: getChild
2784
+ };
2785
+ /**
2786
+ * Get the Sortable instance of an element
2787
+ * @param {HTMLElement} element The element
2788
+ * @return {Sortable|undefined} The instance of Sortable
2789
+ */
2790
+
2791
+ Sortable.get = function (element) {
2792
+ return element[expando];
2793
+ };
2794
+ /**
2795
+ * Mount a plugin to Sortable
2796
+ * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
2797
+ */
2798
+
2799
+
2800
+ Sortable.mount = function () {
2801
+ for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
2802
+ plugins[_key] = arguments[_key];
2803
+ }
2804
+
2805
+ if (plugins[0].constructor === Array) plugins = plugins[0];
2806
+ plugins.forEach(function (plugin) {
2807
+ if (!plugin.prototype || !plugin.prototype.constructor) {
2808
+ throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
2809
+ }
2810
+
2811
+ if (plugin.utils) Sortable.utils = _objectSpread({}, Sortable.utils, plugin.utils);
2812
+ PluginManager.mount(plugin);
2813
+ });
2814
+ };
2815
+ /**
2816
+ * Create sortable instance
2817
+ * @param {HTMLElement} el
2818
+ * @param {Object} [options]
2819
+ */
2820
+
2821
+
2822
+ Sortable.create = function (el, options) {
2823
+ return new Sortable(el, options);
2824
+ }; // Export
2825
+
2826
+
2827
+ Sortable.version = version;
2828
+
2829
+ var autoScrolls = [],
2830
+ scrollEl,
2831
+ scrollRootEl,
2832
+ scrolling = false,
2833
+ lastAutoScrollX,
2834
+ lastAutoScrollY,
2835
+ touchEvt$1,
2836
+ pointerElemChangedInterval;
2837
+
2838
+ function AutoScrollPlugin() {
2839
+ function AutoScroll() {
2840
+ this.defaults = {
2841
+ scroll: true,
2842
+ scrollSensitivity: 30,
2843
+ scrollSpeed: 10,
2844
+ bubbleScroll: true
2845
+ }; // Bind all private methods
2846
+
2847
+ for (var fn in this) {
2848
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
2849
+ this[fn] = this[fn].bind(this);
2850
+ }
2851
+ }
2852
+ }
2853
+
2854
+ AutoScroll.prototype = {
2855
+ dragStarted: function dragStarted(_ref) {
2856
+ var originalEvent = _ref.originalEvent;
2857
+
2858
+ if (this.sortable.nativeDraggable) {
2859
+ on(document, 'dragover', this._handleAutoScroll);
2860
+ } else {
2861
+ if (this.options.supportPointer) {
2862
+ on(document, 'pointermove', this._handleFallbackAutoScroll);
2863
+ } else if (originalEvent.touches) {
2864
+ on(document, 'touchmove', this._handleFallbackAutoScroll);
2865
+ } else {
2866
+ on(document, 'mousemove', this._handleFallbackAutoScroll);
2867
+ }
2868
+ }
2869
+ },
2870
+ dragOverCompleted: function dragOverCompleted(_ref2) {
2871
+ var originalEvent = _ref2.originalEvent;
2872
+
2873
+ // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
2874
+ if (!this.options.dragOverBubble && !originalEvent.rootEl) {
2875
+ this._handleAutoScroll(originalEvent);
2876
+ }
2877
+ },
2878
+ drop: function drop() {
2879
+ if (this.sortable.nativeDraggable) {
2880
+ off(document, 'dragover', this._handleAutoScroll);
2881
+ } else {
2882
+ off(document, 'pointermove', this._handleFallbackAutoScroll);
2883
+ off(document, 'touchmove', this._handleFallbackAutoScroll);
2884
+ off(document, 'mousemove', this._handleFallbackAutoScroll);
2885
+ }
2886
+
2887
+ clearPointerElemChangedInterval();
2888
+ clearAutoScrolls();
2889
+ cancelThrottle();
2890
+ },
2891
+ nulling: function nulling() {
2892
+ touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
2893
+ autoScrolls.length = 0;
2894
+ },
2895
+ _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
2896
+ this._handleAutoScroll(evt, true);
2897
+ },
2898
+ _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
2899
+ var _this = this;
2900
+
2901
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
2902
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
2903
+ elem = document.elementFromPoint(x, y);
2904
+ touchEvt$1 = evt; // IE does not seem to have native autoscroll,
2905
+ // Edge's autoscroll seems too conditional,
2906
+ // MACOS Safari does not have autoscroll,
2907
+ // Firefox and Chrome are good
2908
+
2909
+ if (fallback || Edge || IE11OrLess || Safari) {
2910
+ autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change
2911
+
2912
+ var ogElemScroller = getParentAutoScrollElement(elem, true);
2913
+
2914
+ if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
2915
+ pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour
2916
+
2917
+ pointerElemChangedInterval = setInterval(function () {
2918
+ var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
2919
+
2920
+ if (newElem !== ogElemScroller) {
2921
+ ogElemScroller = newElem;
2922
+ clearAutoScrolls();
2923
+ }
2924
+
2925
+ autoScroll(evt, _this.options, newElem, fallback);
2926
+ }, 10);
2927
+ lastAutoScrollX = x;
2928
+ lastAutoScrollY = y;
2929
+ }
2930
+ } else {
2931
+ // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
2932
+ if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
2933
+ clearAutoScrolls();
2934
+ return;
2935
+ }
2936
+
2937
+ autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
2938
+ }
2939
+ }
2940
+ };
2941
+ return _extends(AutoScroll, {
2942
+ pluginName: 'scroll',
2943
+ initializeByDefault: true
2944
+ });
2945
+ }
2946
+
2947
+ function clearAutoScrolls() {
2948
+ autoScrolls.forEach(function (autoScroll) {
2949
+ clearInterval(autoScroll.pid);
2950
+ });
2951
+ autoScrolls = [];
2952
+ }
2953
+
2954
+ function clearPointerElemChangedInterval() {
2955
+ clearInterval(pointerElemChangedInterval);
2956
+ }
2957
+
2958
+ var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
2959
+ // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
2960
+ if (!options.scroll) return;
2961
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
2962
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
2963
+ sens = options.scrollSensitivity,
2964
+ speed = options.scrollSpeed,
2965
+ winScroller = getWindowScrollingElement();
2966
+ var scrollThisInstance = false,
2967
+ scrollCustomFn; // New scroll root, set scrollEl
2968
+
2969
+ if (scrollRootEl !== rootEl) {
2970
+ scrollRootEl = rootEl;
2971
+ clearAutoScrolls();
2972
+ scrollEl = options.scroll;
2973
+ scrollCustomFn = options.scrollFn;
2974
+
2975
+ if (scrollEl === true) {
2976
+ scrollEl = getParentAutoScrollElement(rootEl, true);
2977
+ }
2978
+ }
2979
+
2980
+ var layersOut = 0;
2981
+ var currentParent = scrollEl;
2982
+
2983
+ do {
2984
+ var el = currentParent,
2985
+ rect = getRect(el),
2986
+ top = rect.top,
2987
+ bottom = rect.bottom,
2988
+ left = rect.left,
2989
+ right = rect.right,
2990
+ width = rect.width,
2991
+ height = rect.height,
2992
+ canScrollX = void 0,
2993
+ canScrollY = void 0,
2994
+ scrollWidth = el.scrollWidth,
2995
+ scrollHeight = el.scrollHeight,
2996
+ elCSS = css(el),
2997
+ scrollPosX = el.scrollLeft,
2998
+ scrollPosY = el.scrollTop;
2999
+
3000
+ if (el === winScroller) {
3001
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
3002
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
3003
+ } else {
3004
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
3005
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
3006
+ }
3007
+
3008
+ var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
3009
+ var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
3010
+
3011
+ if (!autoScrolls[layersOut]) {
3012
+ for (var i = 0; i <= layersOut; i++) {
3013
+ if (!autoScrolls[i]) {
3014
+ autoScrolls[i] = {};
3015
+ }
3016
+ }
3017
+ }
3018
+
3019
+ if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
3020
+ autoScrolls[layersOut].el = el;
3021
+ autoScrolls[layersOut].vx = vx;
3022
+ autoScrolls[layersOut].vy = vy;
3023
+ clearInterval(autoScrolls[layersOut].pid);
3024
+
3025
+ if (vx != 0 || vy != 0) {
3026
+ scrollThisInstance = true;
3027
+ /* jshint loopfunc:true */
3028
+
3029
+ autoScrolls[layersOut].pid = setInterval(function () {
3030
+ // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
3031
+ if (isFallback && this.layer === 0) {
3032
+ Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
3033
+
3034
+ }
3035
+
3036
+ var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
3037
+ var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
3038
+
3039
+ if (typeof scrollCustomFn === 'function') {
3040
+ if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
3041
+ return;
3042
+ }
3043
+ }
3044
+
3045
+ scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
3046
+ }.bind({
3047
+ layer: layersOut
3048
+ }), 24);
3049
+ }
3050
+ }
3051
+
3052
+ layersOut++;
3053
+ } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
3054
+
3055
+ scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
3056
+ }, 30);
3057
+
3058
+ var drop = function drop(_ref) {
3059
+ var originalEvent = _ref.originalEvent,
3060
+ putSortable = _ref.putSortable,
3061
+ dragEl = _ref.dragEl,
3062
+ activeSortable = _ref.activeSortable,
3063
+ dispatchSortableEvent = _ref.dispatchSortableEvent,
3064
+ hideGhostForTarget = _ref.hideGhostForTarget,
3065
+ unhideGhostForTarget = _ref.unhideGhostForTarget;
3066
+ if (!originalEvent) return;
3067
+ var toSortable = putSortable || activeSortable;
3068
+ hideGhostForTarget();
3069
+ var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
3070
+ var target = document.elementFromPoint(touch.clientX, touch.clientY);
3071
+ unhideGhostForTarget();
3072
+
3073
+ if (toSortable && !toSortable.el.contains(target)) {
3074
+ dispatchSortableEvent('spill');
3075
+ this.onSpill({
3076
+ dragEl: dragEl,
3077
+ putSortable: putSortable
3078
+ });
3079
+ }
3080
+ };
3081
+
3082
+ function Revert() {}
3083
+
3084
+ Revert.prototype = {
3085
+ startIndex: null,
3086
+ dragStart: function dragStart(_ref2) {
3087
+ var oldDraggableIndex = _ref2.oldDraggableIndex;
3088
+ this.startIndex = oldDraggableIndex;
3089
+ },
3090
+ onSpill: function onSpill(_ref3) {
3091
+ var dragEl = _ref3.dragEl,
3092
+ putSortable = _ref3.putSortable;
3093
+ this.sortable.captureAnimationState();
3094
+
3095
+ if (putSortable) {
3096
+ putSortable.captureAnimationState();
3097
+ }
3098
+
3099
+ var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
3100
+
3101
+ if (nextSibling) {
3102
+ this.sortable.el.insertBefore(dragEl, nextSibling);
3103
+ } else {
3104
+ this.sortable.el.appendChild(dragEl);
3105
+ }
3106
+
3107
+ this.sortable.animateAll();
3108
+
3109
+ if (putSortable) {
3110
+ putSortable.animateAll();
3111
+ }
3112
+ },
3113
+ drop: drop
3114
+ };
3115
+
3116
+ _extends(Revert, {
3117
+ pluginName: 'revertOnSpill'
3118
+ });
3119
+
3120
+ function Remove() {}
3121
+
3122
+ Remove.prototype = {
3123
+ onSpill: function onSpill(_ref4) {
3124
+ var dragEl = _ref4.dragEl,
3125
+ putSortable = _ref4.putSortable;
3126
+ var parentSortable = putSortable || this.sortable;
3127
+ parentSortable.captureAnimationState();
3128
+ dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
3129
+ parentSortable.animateAll();
3130
+ },
3131
+ drop: drop
3132
+ };
3133
+
3134
+ _extends(Remove, {
3135
+ pluginName: 'removeOnSpill'
3136
+ });
3137
+
3138
+ var lastSwapEl;
3139
+
3140
+ function SwapPlugin() {
3141
+ function Swap() {
3142
+ this.defaults = {
3143
+ swapClass: 'sortable-swap-highlight'
3144
+ };
3145
+ }
3146
+
3147
+ Swap.prototype = {
3148
+ dragStart: function dragStart(_ref) {
3149
+ var dragEl = _ref.dragEl;
3150
+ lastSwapEl = dragEl;
3151
+ },
3152
+ dragOverValid: function dragOverValid(_ref2) {
3153
+ var completed = _ref2.completed,
3154
+ target = _ref2.target,
3155
+ onMove = _ref2.onMove,
3156
+ activeSortable = _ref2.activeSortable,
3157
+ changed = _ref2.changed,
3158
+ cancel = _ref2.cancel;
3159
+ if (!activeSortable.options.swap) return;
3160
+ var el = this.sortable.el,
3161
+ options = this.options;
3162
+
3163
+ if (target && target !== el) {
3164
+ var prevSwapEl = lastSwapEl;
3165
+
3166
+ if (onMove(target) !== false) {
3167
+ toggleClass(target, options.swapClass, true);
3168
+ lastSwapEl = target;
3169
+ } else {
3170
+ lastSwapEl = null;
3171
+ }
3172
+
3173
+ if (prevSwapEl && prevSwapEl !== lastSwapEl) {
3174
+ toggleClass(prevSwapEl, options.swapClass, false);
3175
+ }
3176
+ }
3177
+
3178
+ changed();
3179
+ completed(true);
3180
+ cancel();
3181
+ },
3182
+ drop: function drop(_ref3) {
3183
+ var activeSortable = _ref3.activeSortable,
3184
+ putSortable = _ref3.putSortable,
3185
+ dragEl = _ref3.dragEl;
3186
+ var toSortable = putSortable || this.sortable;
3187
+ var options = this.options;
3188
+ lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);
3189
+
3190
+ if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {
3191
+ if (dragEl !== lastSwapEl) {
3192
+ toSortable.captureAnimationState();
3193
+ if (toSortable !== activeSortable) activeSortable.captureAnimationState();
3194
+ swapNodes(dragEl, lastSwapEl);
3195
+ toSortable.animateAll();
3196
+ if (toSortable !== activeSortable) activeSortable.animateAll();
3197
+ }
3198
+ }
3199
+ },
3200
+ nulling: function nulling() {
3201
+ lastSwapEl = null;
3202
+ }
3203
+ };
3204
+ return _extends(Swap, {
3205
+ pluginName: 'swap',
3206
+ eventProperties: function eventProperties() {
3207
+ return {
3208
+ swapItem: lastSwapEl
3209
+ };
3210
+ }
3211
+ });
3212
+ }
3213
+
3214
+ function swapNodes(n1, n2) {
3215
+ var p1 = n1.parentNode,
3216
+ p2 = n2.parentNode,
3217
+ i1,
3218
+ i2;
3219
+ if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;
3220
+ i1 = index(n1);
3221
+ i2 = index(n2);
3222
+
3223
+ if (p1.isEqualNode(p2) && i1 < i2) {
3224
+ i2++;
3225
+ }
3226
+
3227
+ p1.insertBefore(n2, p1.children[i1]);
3228
+ p2.insertBefore(n1, p2.children[i2]);
3229
+ }
3230
+
3231
+ var multiDragElements = [],
3232
+ multiDragClones = [],
3233
+ lastMultiDragSelect,
3234
+ // for selection with modifier key down (SHIFT)
3235
+ multiDragSortable,
3236
+ initialFolding = false,
3237
+ // Initial multi-drag fold when drag started
3238
+ folding = false,
3239
+ // Folding any other time
3240
+ dragStarted = false,
3241
+ dragEl$1,
3242
+ clonesFromRect,
3243
+ clonesHidden;
3244
+
3245
+ function MultiDragPlugin() {
3246
+ function MultiDrag(sortable) {
3247
+ // Bind all private methods
3248
+ for (var fn in this) {
3249
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
3250
+ this[fn] = this[fn].bind(this);
3251
+ }
3252
+ }
3253
+
3254
+ if (sortable.options.supportPointer) {
3255
+ on(document, 'pointerup', this._deselectMultiDrag);
3256
+ } else {
3257
+ on(document, 'mouseup', this._deselectMultiDrag);
3258
+ on(document, 'touchend', this._deselectMultiDrag);
3259
+ }
3260
+
3261
+ on(document, 'keydown', this._checkKeyDown);
3262
+ on(document, 'keyup', this._checkKeyUp);
3263
+ this.defaults = {
3264
+ selectedClass: 'sortable-selected',
3265
+ multiDragKey: null,
3266
+ setData: function setData(dataTransfer, dragEl) {
3267
+ var data = '';
3268
+
3269
+ if (multiDragElements.length && multiDragSortable === sortable) {
3270
+ multiDragElements.forEach(function (multiDragElement, i) {
3271
+ data += (!i ? '' : ', ') + multiDragElement.textContent;
3272
+ });
3273
+ } else {
3274
+ data = dragEl.textContent;
3275
+ }
3276
+
3277
+ dataTransfer.setData('Text', data);
3278
+ }
3279
+ };
3280
+ }
3281
+
3282
+ MultiDrag.prototype = {
3283
+ multiDragKeyDown: false,
3284
+ isMultiDrag: false,
3285
+ delayStartGlobal: function delayStartGlobal(_ref) {
3286
+ var dragged = _ref.dragEl;
3287
+ dragEl$1 = dragged;
3288
+ },
3289
+ delayEnded: function delayEnded() {
3290
+ this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);
3291
+ },
3292
+ setupClone: function setupClone(_ref2) {
3293
+ var sortable = _ref2.sortable,
3294
+ cancel = _ref2.cancel;
3295
+ if (!this.isMultiDrag) return;
3296
+
3297
+ for (var i = 0; i < multiDragElements.length; i++) {
3298
+ multiDragClones.push(clone(multiDragElements[i]));
3299
+ multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;
3300
+ multiDragClones[i].draggable = false;
3301
+ multiDragClones[i].style['will-change'] = '';
3302
+ toggleClass(multiDragClones[i], this.options.selectedClass, false);
3303
+ multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);
3304
+ }
3305
+
3306
+ sortable._hideClone();
3307
+
3308
+ cancel();
3309
+ },
3310
+ clone: function clone(_ref3) {
3311
+ var sortable = _ref3.sortable,
3312
+ rootEl = _ref3.rootEl,
3313
+ dispatchSortableEvent = _ref3.dispatchSortableEvent,
3314
+ cancel = _ref3.cancel;
3315
+ if (!this.isMultiDrag) return;
3316
+
3317
+ if (!this.options.removeCloneOnHide) {
3318
+ if (multiDragElements.length && multiDragSortable === sortable) {
3319
+ insertMultiDragClones(true, rootEl);
3320
+ dispatchSortableEvent('clone');
3321
+ cancel();
3322
+ }
3323
+ }
3324
+ },
3325
+ showClone: function showClone(_ref4) {
3326
+ var cloneNowShown = _ref4.cloneNowShown,
3327
+ rootEl = _ref4.rootEl,
3328
+ cancel = _ref4.cancel;
3329
+ if (!this.isMultiDrag) return;
3330
+ insertMultiDragClones(false, rootEl);
3331
+ multiDragClones.forEach(function (clone) {
3332
+ css(clone, 'display', '');
3333
+ });
3334
+ cloneNowShown();
3335
+ clonesHidden = false;
3336
+ cancel();
3337
+ },
3338
+ hideClone: function hideClone(_ref5) {
3339
+ var _this = this;
3340
+
3341
+ var sortable = _ref5.sortable,
3342
+ cloneNowHidden = _ref5.cloneNowHidden,
3343
+ cancel = _ref5.cancel;
3344
+ if (!this.isMultiDrag) return;
3345
+ multiDragClones.forEach(function (clone) {
3346
+ css(clone, 'display', 'none');
3347
+
3348
+ if (_this.options.removeCloneOnHide && clone.parentNode) {
3349
+ clone.parentNode.removeChild(clone);
3350
+ }
3351
+ });
3352
+ cloneNowHidden();
3353
+ clonesHidden = true;
3354
+ cancel();
3355
+ },
3356
+ dragStartGlobal: function dragStartGlobal(_ref6) {
3357
+ var sortable = _ref6.sortable;
3358
+
3359
+ if (!this.isMultiDrag && multiDragSortable) {
3360
+ multiDragSortable.multiDrag._deselectMultiDrag();
3361
+ }
3362
+
3363
+ multiDragElements.forEach(function (multiDragElement) {
3364
+ multiDragElement.sortableIndex = index(multiDragElement);
3365
+ }); // Sort multi-drag elements
3366
+
3367
+ multiDragElements = multiDragElements.sort(function (a, b) {
3368
+ return a.sortableIndex - b.sortableIndex;
3369
+ });
3370
+ dragStarted = true;
3371
+ },
3372
+ dragStarted: function dragStarted(_ref7) {
3373
+ var _this2 = this;
3374
+
3375
+ var sortable = _ref7.sortable;
3376
+ if (!this.isMultiDrag) return;
3377
+
3378
+ if (this.options.sort) {
3379
+ // Capture rects,
3380
+ // hide multi drag elements (by positioning them absolute),
3381
+ // set multi drag elements rects to dragRect,
3382
+ // show multi drag elements,
3383
+ // animate to rects,
3384
+ // unset rects & remove from DOM
3385
+ sortable.captureAnimationState();
3386
+
3387
+ if (this.options.animation) {
3388
+ multiDragElements.forEach(function (multiDragElement) {
3389
+ if (multiDragElement === dragEl$1) return;
3390
+ css(multiDragElement, 'position', 'absolute');
3391
+ });
3392
+ var dragRect = getRect(dragEl$1, false, true, true);
3393
+ multiDragElements.forEach(function (multiDragElement) {
3394
+ if (multiDragElement === dragEl$1) return;
3395
+ setRect(multiDragElement, dragRect);
3396
+ });
3397
+ folding = true;
3398
+ initialFolding = true;
3399
+ }
3400
+ }
3401
+
3402
+ sortable.animateAll(function () {
3403
+ folding = false;
3404
+ initialFolding = false;
3405
+
3406
+ if (_this2.options.animation) {
3407
+ multiDragElements.forEach(function (multiDragElement) {
3408
+ unsetRect(multiDragElement);
3409
+ });
3410
+ } // Remove all auxiliary multidrag items from el, if sorting enabled
3411
+
3412
+
3413
+ if (_this2.options.sort) {
3414
+ removeMultiDragElements();
3415
+ }
3416
+ });
3417
+ },
3418
+ dragOver: function dragOver(_ref8) {
3419
+ var target = _ref8.target,
3420
+ completed = _ref8.completed,
3421
+ cancel = _ref8.cancel;
3422
+
3423
+ if (folding && ~multiDragElements.indexOf(target)) {
3424
+ completed(false);
3425
+ cancel();
3426
+ }
3427
+ },
3428
+ revert: function revert(_ref9) {
3429
+ var fromSortable = _ref9.fromSortable,
3430
+ rootEl = _ref9.rootEl,
3431
+ sortable = _ref9.sortable,
3432
+ dragRect = _ref9.dragRect;
3433
+
3434
+ if (multiDragElements.length > 1) {
3435
+ // Setup unfold animation
3436
+ multiDragElements.forEach(function (multiDragElement) {
3437
+ sortable.addAnimationState({
3438
+ target: multiDragElement,
3439
+ rect: folding ? getRect(multiDragElement) : dragRect
3440
+ });
3441
+ unsetRect(multiDragElement);
3442
+ multiDragElement.fromRect = dragRect;
3443
+ fromSortable.removeAnimationState(multiDragElement);
3444
+ });
3445
+ folding = false;
3446
+ insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);
3447
+ }
3448
+ },
3449
+ dragOverCompleted: function dragOverCompleted(_ref10) {
3450
+ var sortable = _ref10.sortable,
3451
+ isOwner = _ref10.isOwner,
3452
+ insertion = _ref10.insertion,
3453
+ activeSortable = _ref10.activeSortable,
3454
+ parentEl = _ref10.parentEl,
3455
+ putSortable = _ref10.putSortable;
3456
+ var options = this.options;
3457
+
3458
+ if (insertion) {
3459
+ // Clones must be hidden before folding animation to capture dragRectAbsolute properly
3460
+ if (isOwner) {
3461
+ activeSortable._hideClone();
3462
+ }
3463
+
3464
+ initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location
3465
+
3466
+ if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {
3467
+ // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible
3468
+ var dragRectAbsolute = getRect(dragEl$1, false, true, true);
3469
+ multiDragElements.forEach(function (multiDragElement) {
3470
+ if (multiDragElement === dragEl$1) return;
3471
+ setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted
3472
+ // while folding, and so that we can capture them again because old sortable will no longer be fromSortable
3473
+
3474
+ parentEl.appendChild(multiDragElement);
3475
+ });
3476
+ folding = true;
3477
+ } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out
3478
+
3479
+
3480
+ if (!isOwner) {
3481
+ // Only remove if not folding (folding will remove them anyways)
3482
+ if (!folding) {
3483
+ removeMultiDragElements();
3484
+ }
3485
+
3486
+ if (multiDragElements.length > 1) {
3487
+ var clonesHiddenBefore = clonesHidden;
3488
+
3489
+ activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden
3490
+
3491
+
3492
+ if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {
3493
+ multiDragClones.forEach(function (clone) {
3494
+ activeSortable.addAnimationState({
3495
+ target: clone,
3496
+ rect: clonesFromRect
3497
+ });
3498
+ clone.fromRect = clonesFromRect;
3499
+ clone.thisAnimationDuration = null;
3500
+ });
3501
+ }
3502
+ } else {
3503
+ activeSortable._showClone(sortable);
3504
+ }
3505
+ }
3506
+ }
3507
+ },
3508
+ dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {
3509
+ var dragRect = _ref11.dragRect,
3510
+ isOwner = _ref11.isOwner,
3511
+ activeSortable = _ref11.activeSortable;
3512
+ multiDragElements.forEach(function (multiDragElement) {
3513
+ multiDragElement.thisAnimationDuration = null;
3514
+ });
3515
+
3516
+ if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {
3517
+ clonesFromRect = _extends({}, dragRect);
3518
+ var dragMatrix = matrix(dragEl$1, true);
3519
+ clonesFromRect.top -= dragMatrix.f;
3520
+ clonesFromRect.left -= dragMatrix.e;
3521
+ }
3522
+ },
3523
+ dragOverAnimationComplete: function dragOverAnimationComplete() {
3524
+ if (folding) {
3525
+ folding = false;
3526
+ removeMultiDragElements();
3527
+ }
3528
+ },
3529
+ drop: function drop(_ref12) {
3530
+ var evt = _ref12.originalEvent,
3531
+ rootEl = _ref12.rootEl,
3532
+ parentEl = _ref12.parentEl,
3533
+ sortable = _ref12.sortable,
3534
+ dispatchSortableEvent = _ref12.dispatchSortableEvent,
3535
+ oldIndex = _ref12.oldIndex,
3536
+ putSortable = _ref12.putSortable;
3537
+ var toSortable = putSortable || this.sortable;
3538
+ if (!evt) return;
3539
+ var options = this.options,
3540
+ children = parentEl.children; // Multi-drag selection
3541
+
3542
+ if (!dragStarted) {
3543
+ if (options.multiDragKey && !this.multiDragKeyDown) {
3544
+ this._deselectMultiDrag();
3545
+ }
3546
+
3547
+ toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));
3548
+
3549
+ if (!~multiDragElements.indexOf(dragEl$1)) {
3550
+ multiDragElements.push(dragEl$1);
3551
+ dispatchEvent({
3552
+ sortable: sortable,
3553
+ rootEl: rootEl,
3554
+ name: 'select',
3555
+ targetEl: dragEl$1,
3556
+ originalEvt: evt
3557
+ }); // Modifier activated, select from last to dragEl
3558
+
3559
+ if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {
3560
+ var lastIndex = index(lastMultiDragSelect),
3561
+ currentIndex = index(dragEl$1);
3562
+
3563
+ if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {
3564
+ // Must include lastMultiDragSelect (select it), in case modified selection from no selection
3565
+ // (but previous selection existed)
3566
+ var n, i;
3567
+
3568
+ if (currentIndex > lastIndex) {
3569
+ i = lastIndex;
3570
+ n = currentIndex;
3571
+ } else {
3572
+ i = currentIndex;
3573
+ n = lastIndex + 1;
3574
+ }
3575
+
3576
+ for (; i < n; i++) {
3577
+ if (~multiDragElements.indexOf(children[i])) continue;
3578
+ toggleClass(children[i], options.selectedClass, true);
3579
+ multiDragElements.push(children[i]);
3580
+ dispatchEvent({
3581
+ sortable: sortable,
3582
+ rootEl: rootEl,
3583
+ name: 'select',
3584
+ targetEl: children[i],
3585
+ originalEvt: evt
3586
+ });
3587
+ }
3588
+ }
3589
+ } else {
3590
+ lastMultiDragSelect = dragEl$1;
3591
+ }
3592
+
3593
+ multiDragSortable = toSortable;
3594
+ } else {
3595
+ multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);
3596
+ lastMultiDragSelect = null;
3597
+ dispatchEvent({
3598
+ sortable: sortable,
3599
+ rootEl: rootEl,
3600
+ name: 'deselect',
3601
+ targetEl: dragEl$1,
3602
+ originalEvt: evt
3603
+ });
3604
+ }
3605
+ } // Multi-drag drop
3606
+
3607
+
3608
+ if (dragStarted && this.isMultiDrag) {
3609
+ // Do not "unfold" after around dragEl if reverted
3610
+ if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {
3611
+ var dragRect = getRect(dragEl$1),
3612
+ multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');
3613
+ if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;
3614
+ toSortable.captureAnimationState();
3615
+
3616
+ if (!initialFolding) {
3617
+ if (options.animation) {
3618
+ dragEl$1.fromRect = dragRect;
3619
+ multiDragElements.forEach(function (multiDragElement) {
3620
+ multiDragElement.thisAnimationDuration = null;
3621
+
3622
+ if (multiDragElement !== dragEl$1) {
3623
+ var rect = folding ? getRect(multiDragElement) : dragRect;
3624
+ multiDragElement.fromRect = rect; // Prepare unfold animation
3625
+
3626
+ toSortable.addAnimationState({
3627
+ target: multiDragElement,
3628
+ rect: rect
3629
+ });
3630
+ }
3631
+ });
3632
+ } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert
3633
+ // properly they must all be removed
3634
+
3635
+
3636
+ removeMultiDragElements();
3637
+ multiDragElements.forEach(function (multiDragElement) {
3638
+ if (children[multiDragIndex]) {
3639
+ parentEl.insertBefore(multiDragElement, children[multiDragIndex]);
3640
+ } else {
3641
+ parentEl.appendChild(multiDragElement);
3642
+ }
3643
+
3644
+ multiDragIndex++;
3645
+ }); // If initial folding is done, the elements may have changed position because they are now
3646
+ // unfolding around dragEl, even though dragEl may not have his index changed, so update event
3647
+ // must be fired here as Sortable will not.
3648
+
3649
+ if (oldIndex === index(dragEl$1)) {
3650
+ var update = false;
3651
+ multiDragElements.forEach(function (multiDragElement) {
3652
+ if (multiDragElement.sortableIndex !== index(multiDragElement)) {
3653
+ update = true;
3654
+ return;
3655
+ }
3656
+ });
3657
+
3658
+ if (update) {
3659
+ dispatchSortableEvent('update');
3660
+ }
3661
+ }
3662
+ } // Must be done after capturing individual rects (scroll bar)
3663
+
3664
+
3665
+ multiDragElements.forEach(function (multiDragElement) {
3666
+ unsetRect(multiDragElement);
3667
+ });
3668
+ toSortable.animateAll();
3669
+ }
3670
+
3671
+ multiDragSortable = toSortable;
3672
+ } // Remove clones if necessary
3673
+
3674
+
3675
+ if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
3676
+ multiDragClones.forEach(function (clone) {
3677
+ clone.parentNode && clone.parentNode.removeChild(clone);
3678
+ });
3679
+ }
3680
+ },
3681
+ nullingGlobal: function nullingGlobal() {
3682
+ this.isMultiDrag = dragStarted = false;
3683
+ multiDragClones.length = 0;
3684
+ },
3685
+ destroyGlobal: function destroyGlobal() {
3686
+ this._deselectMultiDrag();
3687
+
3688
+ off(document, 'pointerup', this._deselectMultiDrag);
3689
+ off(document, 'mouseup', this._deselectMultiDrag);
3690
+ off(document, 'touchend', this._deselectMultiDrag);
3691
+ off(document, 'keydown', this._checkKeyDown);
3692
+ off(document, 'keyup', this._checkKeyUp);
3693
+ },
3694
+ _deselectMultiDrag: function _deselectMultiDrag(evt) {
3695
+ if (typeof dragStarted !== "undefined" && dragStarted) return; // Only deselect if selection is in this sortable
3696
+
3697
+ if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable
3698
+
3699
+ if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click
3700
+
3701
+ if (evt && evt.button !== 0) return;
3702
+
3703
+ while (multiDragElements.length) {
3704
+ var el = multiDragElements[0];
3705
+ toggleClass(el, this.options.selectedClass, false);
3706
+ multiDragElements.shift();
3707
+ dispatchEvent({
3708
+ sortable: this.sortable,
3709
+ rootEl: this.sortable.el,
3710
+ name: 'deselect',
3711
+ targetEl: el,
3712
+ originalEvt: evt
3713
+ });
3714
+ }
3715
+ },
3716
+ _checkKeyDown: function _checkKeyDown(evt) {
3717
+ if (evt.key === this.options.multiDragKey) {
3718
+ this.multiDragKeyDown = true;
3719
+ }
3720
+ },
3721
+ _checkKeyUp: function _checkKeyUp(evt) {
3722
+ if (evt.key === this.options.multiDragKey) {
3723
+ this.multiDragKeyDown = false;
3724
+ }
3725
+ }
3726
+ };
3727
+ return _extends(MultiDrag, {
3728
+ // Static methods & properties
3729
+ pluginName: 'multiDrag',
3730
+ utils: {
3731
+ /**
3732
+ * Selects the provided multi-drag item
3733
+ * @param {HTMLElement} el The element to be selected
3734
+ */
3735
+ select: function select(el) {
3736
+ var sortable = el.parentNode[expando];
3737
+ if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;
3738
+
3739
+ if (multiDragSortable && multiDragSortable !== sortable) {
3740
+ multiDragSortable.multiDrag._deselectMultiDrag();
3741
+
3742
+ multiDragSortable = sortable;
3743
+ }
3744
+
3745
+ toggleClass(el, sortable.options.selectedClass, true);
3746
+ multiDragElements.push(el);
3747
+ },
3748
+
3749
+ /**
3750
+ * Deselects the provided multi-drag item
3751
+ * @param {HTMLElement} el The element to be deselected
3752
+ */
3753
+ deselect: function deselect(el) {
3754
+ var sortable = el.parentNode[expando],
3755
+ index = multiDragElements.indexOf(el);
3756
+ if (!sortable || !sortable.options.multiDrag || !~index) return;
3757
+ toggleClass(el, sortable.options.selectedClass, false);
3758
+ multiDragElements.splice(index, 1);
3759
+ }
3760
+ },
3761
+ eventProperties: function eventProperties() {
3762
+ var _this3 = this;
3763
+
3764
+ var oldIndicies = [],
3765
+ newIndicies = [];
3766
+ multiDragElements.forEach(function (multiDragElement) {
3767
+ oldIndicies.push({
3768
+ multiDragElement: multiDragElement,
3769
+ index: multiDragElement.sortableIndex
3770
+ }); // multiDragElements will already be sorted if folding
3771
+
3772
+ var newIndex;
3773
+
3774
+ if (folding && multiDragElement !== dragEl$1) {
3775
+ newIndex = -1;
3776
+ } else if (folding) {
3777
+ newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');
3778
+ } else {
3779
+ newIndex = index(multiDragElement);
3780
+ }
3781
+
3782
+ newIndicies.push({
3783
+ multiDragElement: multiDragElement,
3784
+ index: newIndex
3785
+ });
3786
+ });
3787
+ return {
3788
+ items: _toConsumableArray(multiDragElements),
3789
+ clones: [].concat(multiDragClones),
3790
+ oldIndicies: oldIndicies,
3791
+ newIndicies: newIndicies
3792
+ };
3793
+ },
3794
+ optionListeners: {
3795
+ multiDragKey: function multiDragKey(key) {
3796
+ key = key.toLowerCase();
3797
+
3798
+ if (key === 'ctrl') {
3799
+ key = 'Control';
3800
+ } else if (key.length > 1) {
3801
+ key = key.charAt(0).toUpperCase() + key.substr(1);
3802
+ }
3803
+
3804
+ return key;
3805
+ }
3806
+ }
3807
+ });
3808
+ }
3809
+
3810
+ function insertMultiDragElements(clonesInserted, rootEl) {
3811
+ multiDragElements.forEach(function (multiDragElement, i) {
3812
+ var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];
3813
+
3814
+ if (target) {
3815
+ rootEl.insertBefore(multiDragElement, target);
3816
+ } else {
3817
+ rootEl.appendChild(multiDragElement);
3818
+ }
3819
+ });
3820
+ }
3821
+ /**
3822
+ * Insert multi-drag clones
3823
+ * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted
3824
+ * @param {HTMLElement} rootEl
3825
+ */
3826
+
3827
+
3828
+ function insertMultiDragClones(elementsInserted, rootEl) {
3829
+ multiDragClones.forEach(function (clone, i) {
3830
+ var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];
3831
+
3832
+ if (target) {
3833
+ rootEl.insertBefore(clone, target);
3834
+ } else {
3835
+ rootEl.appendChild(clone);
3836
+ }
3837
+ });
3838
+ }
3839
+
3840
+ function removeMultiDragElements() {
3841
+ multiDragElements.forEach(function (multiDragElement) {
3842
+ if (multiDragElement === dragEl$1) return;
3843
+ multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);
3844
+ });
3845
+ }
3846
+
3847
+ Sortable.mount(new AutoScrollPlugin());
3848
+ Sortable.mount(Remove, Revert);
3849
+
3850
+ /* harmony default export */ __webpack_exports__["default"] = (Sortable);
3851
+
3852
+
3853
+
3854
+ /***/ }),
3855
+
3856
+ /***/ "d998":
3857
+ /***/ (function(module, exports, __webpack_require__) {
3858
+
3859
+ "use strict";
3860
+
3861
+ var UA = __webpack_require__("342f");
3862
+
3863
+ module.exports = /MSIE|Trident/.test(UA);
3864
+
3865
+
3866
+ /***/ })
3867
+
3868
+ }]);