genesys-spark-components 4.0.0-beta.34 → 4.0.0-beta.35

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 (287) hide show
  1. package/dist/cjs/en-14558544.js +24 -0
  2. package/dist/cjs/genesys-webcomponents.cjs.js +1 -1
  3. package/dist/cjs/gux-accordion.cjs.entry.js +1 -1
  4. package/dist/cjs/gux-action-button.cjs.entry.js +1 -1
  5. package/dist/cjs/gux-action-toast-legacy.cjs.entry.js +1 -1
  6. package/dist/cjs/gux-advanced-dropdown-legacy.cjs.entry.js +1 -1
  7. package/dist/cjs/gux-announce-beta.cjs.entry.js +1 -1
  8. package/dist/cjs/gux-badge.cjs.entry.js +1 -1
  9. package/dist/cjs/gux-blank-state.cjs.entry.js +1 -1
  10. package/dist/cjs/gux-breadcrumbs.cjs.entry.js +1 -1
  11. package/dist/cjs/gux-button-multi.cjs.entry.js +1 -1
  12. package/dist/cjs/gux-button-slot.cjs.entry.js +1 -1
  13. package/dist/cjs/gux-button.cjs.entry.js +1 -1
  14. package/dist/cjs/gux-calendar.cjs.entry.js +1 -1
  15. package/dist/cjs/gux-card.cjs.entry.js +1 -1
  16. package/dist/cjs/gux-column-manager.cjs.entry.js +1 -1
  17. package/dist/cjs/gux-content-search.cjs.entry.js +1 -1
  18. package/dist/cjs/gux-context-menu.cjs.entry.js +1 -1
  19. package/dist/cjs/gux-copy-to-clipboard.cjs.entry.js +1 -1
  20. package/dist/cjs/gux-date-beta.cjs.entry.js +1 -1
  21. package/dist/cjs/gux-date-time-beta.cjs.entry.js +1 -1
  22. package/dist/cjs/gux-datepicker.cjs.entry.js +1 -1
  23. package/dist/cjs/gux-disclosure-button-legacy.cjs.entry.js +1 -1
  24. package/dist/cjs/gux-dismiss-button.cjs.entry.js +1 -1
  25. package/dist/cjs/gux-dropdown-multi.cjs.entry.js +1 -1
  26. package/dist/cjs/gux-dropdown_3.cjs.entry.js +1 -1
  27. package/dist/cjs/gux-flyout-menu.cjs.entry.js +1 -1
  28. package/dist/cjs/gux-form-field-checkbox.cjs.entry.js +1 -1
  29. package/dist/cjs/gux-form-field-color.cjs.entry.js +1 -1
  30. package/dist/cjs/gux-form-field-dropdown.cjs.entry.js +1 -1
  31. package/dist/cjs/gux-form-field-input-clear-button.cjs.entry.js +1 -1
  32. package/dist/cjs/gux-form-field-number_3.cjs.entry.js +1 -1
  33. package/dist/cjs/gux-form-field-phone.cjs.entry.js +1 -1
  34. package/dist/cjs/gux-form-field-radio.cjs.entry.js +1 -1
  35. package/dist/cjs/gux-form-field-range.cjs.entry.js +1 -1
  36. package/dist/cjs/gux-form-field-search.cjs.entry.js +1 -1
  37. package/dist/cjs/gux-form-field-select.cjs.entry.js +1 -1
  38. package/dist/cjs/gux-form-field-text-like.cjs.entry.js +1 -1
  39. package/dist/cjs/gux-form-field-textarea.cjs.entry.js +1 -1
  40. package/dist/cjs/gux-form-field-time-picker.cjs.entry.js +1 -1
  41. package/dist/cjs/gux-icon.cjs.entry.js +1 -1
  42. package/dist/cjs/gux-inline-alert.cjs.entry.js +1 -1
  43. package/dist/cjs/gux-list.cjs.entry.js +1 -1
  44. package/dist/cjs/gux-listbox-multi.cjs.entry.js +1 -1
  45. package/dist/cjs/gux-loading-message.cjs.entry.js +1 -1
  46. package/dist/cjs/gux-modal.cjs.entry.js +1 -1
  47. package/dist/cjs/gux-month-picker-beta.cjs.entry.js +1 -1
  48. package/dist/cjs/gux-notification-toast-legacy.cjs.entry.js +1 -1
  49. package/dist/cjs/gux-page-loading-spinner.cjs.entry.js +1 -1
  50. package/dist/cjs/gux-pagination-cursor.cjs.entry.js +1 -1
  51. package/dist/cjs/gux-pagination-legacy.cjs.entry.js +1 -1
  52. package/dist/cjs/gux-pagination.cjs.entry.js +1 -1
  53. package/dist/cjs/gux-phone-input-beta.cjs.entry.js +1 -1
  54. package/dist/cjs/gux-popover-list.cjs.entry.js +1 -1
  55. package/dist/cjs/gux-radial-loading.cjs.entry.js +1 -1
  56. package/dist/cjs/gux-radial-progress.cjs.entry.js +1 -1
  57. package/dist/cjs/gux-rating.cjs.entry.js +1 -1
  58. package/dist/cjs/gux-region-icon.cjs.entry.js +1 -1
  59. package/dist/cjs/gux-screen-reader-beta.cjs.entry.js +1 -1
  60. package/dist/cjs/gux-segmented-control-beta.cjs.entry.js +1 -1
  61. package/dist/cjs/gux-simple-toast-legacy.cjs.entry.js +1 -1
  62. package/dist/cjs/gux-skip-navigation-list.cjs.entry.js +1 -1
  63. package/dist/cjs/gux-sort-control.cjs.entry.js +1 -1
  64. package/dist/cjs/gux-switch-legacy.cjs.entry.js +1 -1
  65. package/dist/cjs/gux-tab-advanced-legacy.cjs.entry.js +157 -0
  66. package/dist/cjs/gux-tab-advanced-list-legacy.cjs.entry.js +470 -0
  67. package/dist/cjs/gux-tab-advanced-list.cjs.entry.js +19 -3038
  68. package/dist/cjs/gux-tab-advanced-panel-legacy.cjs.entry.js +34 -0
  69. package/dist/cjs/gux-table-toolbar-action.cjs.entry.js +1 -1
  70. package/dist/cjs/gux-table-toolbar-custom-action.cjs.entry.js +1 -1
  71. package/dist/cjs/gux-table-toolbar-menu-button.cjs.entry.js +1 -1
  72. package/dist/cjs/gux-table-toolbar.cjs.entry.js +1 -1
  73. package/dist/cjs/gux-table.cjs.entry.js +1 -1
  74. package/dist/cjs/gux-tabs-advanced-legacy.cjs.entry.js +63 -0
  75. package/dist/cjs/gux-tabs-advanced.cjs.entry.js +1 -1
  76. package/dist/cjs/gux-tabs.cjs.entry.js +1 -1
  77. package/dist/cjs/gux-tag.cjs.entry.js +1 -1
  78. package/dist/cjs/gux-text-highlight.cjs.entry.js +1 -1
  79. package/dist/cjs/gux-time-beta.cjs.entry.js +1 -1
  80. package/dist/cjs/gux-time-picker.cjs.entry.js +1 -1
  81. package/dist/cjs/gux-time-zone-picker-beta.cjs.entry.js +1 -1
  82. package/dist/cjs/gux-toast.cjs.entry.js +1 -1
  83. package/dist/cjs/gux-toggle.cjs.entry.js +1 -1
  84. package/dist/cjs/gux-tooltip.cjs.entry.js +1 -1
  85. package/dist/cjs/index-0d0fdb85.js +20 -4
  86. package/dist/cjs/loader.cjs.js +1 -1
  87. package/dist/cjs/sortable.esm-73cf219b.js +3023 -0
  88. package/dist/cjs/{usage-b1e23593.js → usage-7e2e71dc.js} +1 -1
  89. package/dist/collection/collection-manifest.json +4 -0
  90. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced/gux-tab-advanced.css +117 -0
  91. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced/gux-tab-advanced.js +317 -0
  92. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-list/gux-tab-advanced-list.css +211 -0
  93. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-list/gux-tab-advanced-list.js +623 -0
  94. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-panel/gux-tab-advanced-panel.css +48 -0
  95. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-panel/gux-tab-advanced-panel.js +106 -0
  96. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tabs-advanced.css +3 -0
  97. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tabs-advanced.js +147 -0
  98. package/dist/collection/components/stable/gux-icon/gux-icon.js +1 -1
  99. package/dist/collection/components/stable/gux-icon/icons/custom/face-smile-hearts-regular.svg +1 -0
  100. package/dist/component-specs.json +10 -0
  101. package/dist/deploy-info.json +3 -3
  102. package/dist/esm/en-5b8ff4c7.js +22 -0
  103. package/dist/esm/genesys-webcomponents.js +1 -1
  104. package/dist/esm/gux-accordion.entry.js +1 -1
  105. package/dist/esm/gux-action-button.entry.js +1 -1
  106. package/dist/esm/gux-action-toast-legacy.entry.js +1 -1
  107. package/dist/esm/gux-advanced-dropdown-legacy.entry.js +1 -1
  108. package/dist/esm/gux-announce-beta.entry.js +1 -1
  109. package/dist/esm/gux-badge.entry.js +1 -1
  110. package/dist/esm/gux-blank-state.entry.js +1 -1
  111. package/dist/esm/gux-breadcrumbs.entry.js +1 -1
  112. package/dist/esm/gux-button-multi.entry.js +1 -1
  113. package/dist/esm/gux-button-slot.entry.js +1 -1
  114. package/dist/esm/gux-button.entry.js +1 -1
  115. package/dist/esm/gux-calendar.entry.js +1 -1
  116. package/dist/esm/gux-card.entry.js +1 -1
  117. package/dist/esm/gux-column-manager.entry.js +1 -1
  118. package/dist/esm/gux-content-search.entry.js +1 -1
  119. package/dist/esm/gux-context-menu.entry.js +1 -1
  120. package/dist/esm/gux-copy-to-clipboard.entry.js +1 -1
  121. package/dist/esm/gux-date-beta.entry.js +1 -1
  122. package/dist/esm/gux-date-time-beta.entry.js +1 -1
  123. package/dist/esm/gux-datepicker.entry.js +1 -1
  124. package/dist/esm/gux-disclosure-button-legacy.entry.js +1 -1
  125. package/dist/esm/gux-dismiss-button.entry.js +1 -1
  126. package/dist/esm/gux-dropdown-multi.entry.js +1 -1
  127. package/dist/esm/gux-dropdown_3.entry.js +1 -1
  128. package/dist/esm/gux-flyout-menu.entry.js +1 -1
  129. package/dist/esm/gux-form-field-checkbox.entry.js +1 -1
  130. package/dist/esm/gux-form-field-color.entry.js +1 -1
  131. package/dist/esm/gux-form-field-dropdown.entry.js +1 -1
  132. package/dist/esm/gux-form-field-input-clear-button.entry.js +1 -1
  133. package/dist/esm/gux-form-field-number_3.entry.js +1 -1
  134. package/dist/esm/gux-form-field-phone.entry.js +1 -1
  135. package/dist/esm/gux-form-field-radio.entry.js +1 -1
  136. package/dist/esm/gux-form-field-range.entry.js +1 -1
  137. package/dist/esm/gux-form-field-search.entry.js +1 -1
  138. package/dist/esm/gux-form-field-select.entry.js +1 -1
  139. package/dist/esm/gux-form-field-text-like.entry.js +1 -1
  140. package/dist/esm/gux-form-field-textarea.entry.js +1 -1
  141. package/dist/esm/gux-form-field-time-picker.entry.js +1 -1
  142. package/dist/esm/gux-icon.entry.js +1 -1
  143. package/dist/esm/gux-inline-alert.entry.js +1 -1
  144. package/dist/esm/gux-list.entry.js +1 -1
  145. package/dist/esm/gux-listbox-multi.entry.js +1 -1
  146. package/dist/esm/gux-loading-message.entry.js +1 -1
  147. package/dist/esm/gux-modal.entry.js +1 -1
  148. package/dist/esm/gux-month-picker-beta.entry.js +1 -1
  149. package/dist/esm/gux-notification-toast-legacy.entry.js +1 -1
  150. package/dist/esm/gux-page-loading-spinner.entry.js +1 -1
  151. package/dist/esm/gux-pagination-cursor.entry.js +1 -1
  152. package/dist/esm/gux-pagination-legacy.entry.js +1 -1
  153. package/dist/esm/gux-pagination.entry.js +1 -1
  154. package/dist/esm/gux-phone-input-beta.entry.js +1 -1
  155. package/dist/esm/gux-popover-list.entry.js +1 -1
  156. package/dist/esm/gux-radial-loading.entry.js +1 -1
  157. package/dist/esm/gux-radial-progress.entry.js +1 -1
  158. package/dist/esm/gux-rating.entry.js +1 -1
  159. package/dist/esm/gux-region-icon.entry.js +1 -1
  160. package/dist/esm/gux-screen-reader-beta.entry.js +1 -1
  161. package/dist/esm/gux-segmented-control-beta.entry.js +1 -1
  162. package/dist/esm/gux-simple-toast-legacy.entry.js +1 -1
  163. package/dist/esm/gux-skip-navigation-list.entry.js +1 -1
  164. package/dist/esm/gux-sort-control.entry.js +1 -1
  165. package/dist/esm/gux-switch-legacy.entry.js +1 -1
  166. package/dist/esm/gux-tab-advanced-legacy.entry.js +153 -0
  167. package/dist/esm/gux-tab-advanced-list-legacy.entry.js +466 -0
  168. package/dist/esm/gux-tab-advanced-list.entry.js +1 -3020
  169. package/dist/esm/gux-tab-advanced-panel-legacy.entry.js +30 -0
  170. package/dist/esm/gux-table-toolbar-action.entry.js +1 -1
  171. package/dist/esm/gux-table-toolbar-custom-action.entry.js +1 -1
  172. package/dist/esm/gux-table-toolbar-menu-button.entry.js +1 -1
  173. package/dist/esm/gux-table-toolbar.entry.js +1 -1
  174. package/dist/esm/gux-table.entry.js +1 -1
  175. package/dist/esm/gux-tabs-advanced-legacy.entry.js +59 -0
  176. package/dist/esm/gux-tabs-advanced.entry.js +1 -1
  177. package/dist/esm/gux-tabs.entry.js +1 -1
  178. package/dist/esm/gux-tag.entry.js +1 -1
  179. package/dist/esm/gux-text-highlight.entry.js +1 -1
  180. package/dist/esm/gux-time-beta.entry.js +1 -1
  181. package/dist/esm/gux-time-picker.entry.js +1 -1
  182. package/dist/esm/gux-time-zone-picker-beta.entry.js +1 -1
  183. package/dist/esm/gux-toast.entry.js +1 -1
  184. package/dist/esm/gux-toggle.entry.js +1 -1
  185. package/dist/esm/gux-tooltip.entry.js +1 -1
  186. package/dist/esm/index-0b66fe2c.js +20 -4
  187. package/dist/esm/loader.js +1 -1
  188. package/dist/esm/sortable.esm-8c3d5856.js +3021 -0
  189. package/dist/esm/{usage-7c4316f3.js → usage-cd252d08.js} +1 -1
  190. package/dist/genesys-webcomponents/genesys-webcomponents.esm.js +1 -1
  191. package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.en.json +1 -1
  192. package/dist/genesys-webcomponents/icons/custom/face-smile-hearts-regular.svg +1 -0
  193. package/dist/genesys-webcomponents/{p-f4cd6700.entry.js → p-0249b669.entry.js} +1 -1
  194. package/dist/genesys-webcomponents/{p-c564f3cc.entry.js → p-078d3c75.entry.js} +1 -1
  195. package/dist/genesys-webcomponents/{p-8fe30b09.entry.js → p-0ca229eb.entry.js} +1 -1
  196. package/dist/genesys-webcomponents/{p-718f0a96.entry.js → p-0d276dc9.entry.js} +1 -1
  197. package/dist/genesys-webcomponents/p-1486d7ea.js +7 -0
  198. package/dist/genesys-webcomponents/{p-3978c9d9.entry.js → p-197d4153.entry.js} +1 -1
  199. package/dist/genesys-webcomponents/p-1e4c80e5.entry.js +1 -0
  200. package/dist/genesys-webcomponents/{p-27b2e8f1.entry.js → p-2176b2e3.entry.js} +1 -1
  201. package/dist/genesys-webcomponents/{p-380d663e.entry.js → p-23ef4850.entry.js} +1 -1
  202. package/dist/genesys-webcomponents/{p-d5e23ee9.entry.js → p-2795474f.entry.js} +1 -1
  203. package/dist/genesys-webcomponents/{p-793c5d4b.entry.js → p-280ec994.entry.js} +1 -1
  204. package/dist/genesys-webcomponents/{p-832842b0.entry.js → p-29bb65b6.entry.js} +1 -1
  205. package/dist/genesys-webcomponents/{p-dabf28c2.entry.js → p-2b46c949.entry.js} +1 -1
  206. package/dist/genesys-webcomponents/{p-b9ed5a20.entry.js → p-2c9c3cea.entry.js} +1 -1
  207. package/dist/genesys-webcomponents/{p-1ee5b66e.entry.js → p-3493b6c1.entry.js} +1 -1
  208. package/dist/genesys-webcomponents/{p-4425a015.entry.js → p-359d6b16.entry.js} +1 -1
  209. package/dist/genesys-webcomponents/{p-5b0d2d81.entry.js → p-39151f6f.entry.js} +1 -1
  210. package/dist/genesys-webcomponents/{p-71649ca7.entry.js → p-3d15a15a.entry.js} +1 -1
  211. package/dist/genesys-webcomponents/{p-045a5c8d.entry.js → p-3d3fea51.entry.js} +1 -1
  212. package/dist/genesys-webcomponents/{p-d588f252.entry.js → p-3fc64f89.entry.js} +1 -1
  213. package/dist/genesys-webcomponents/{p-92dc4513.entry.js → p-409a2aed.entry.js} +1 -1
  214. package/dist/genesys-webcomponents/{p-535d0527.entry.js → p-41617814.entry.js} +1 -1
  215. package/dist/genesys-webcomponents/{p-afc8f510.entry.js → p-45baa064.entry.js} +1 -1
  216. package/dist/genesys-webcomponents/{p-50a508f2.entry.js → p-45bcb54b.entry.js} +1 -1
  217. package/dist/genesys-webcomponents/{p-8c62cbe0.entry.js → p-53c4a7f7.entry.js} +1 -1
  218. package/dist/genesys-webcomponents/p-572aec19.entry.js +1 -0
  219. package/dist/genesys-webcomponents/{p-35f055a2.entry.js → p-57c82db9.entry.js} +1 -1
  220. package/dist/genesys-webcomponents/{p-20e7c016.entry.js → p-5a94a9bf.entry.js} +1 -1
  221. package/dist/genesys-webcomponents/{p-9b6ed146.entry.js → p-5bbffb5a.entry.js} +1 -1
  222. package/dist/genesys-webcomponents/{p-b74733e2.entry.js → p-5f96b474.entry.js} +1 -1
  223. package/dist/genesys-webcomponents/{p-24b860b0.js → p-605734cc.js} +1 -1
  224. package/dist/genesys-webcomponents/{p-bcce68e5.entry.js → p-6081375f.entry.js} +1 -1
  225. package/dist/genesys-webcomponents/{p-94965977.entry.js → p-62456443.entry.js} +1 -1
  226. package/dist/genesys-webcomponents/{p-5e1a9a03.entry.js → p-67652427.entry.js} +1 -1
  227. package/dist/genesys-webcomponents/{p-ed00fc7c.entry.js → p-6a62e7d1.entry.js} +1 -1
  228. package/dist/genesys-webcomponents/p-6a8e1026.js +1 -0
  229. package/dist/genesys-webcomponents/{p-efafcf0b.entry.js → p-75146c5b.entry.js} +1 -1
  230. package/dist/genesys-webcomponents/{p-d8824819.entry.js → p-782c1b84.entry.js} +1 -1
  231. package/dist/genesys-webcomponents/{p-700df232.entry.js → p-7adb14d8.entry.js} +1 -1
  232. package/dist/genesys-webcomponents/{p-be3431b3.entry.js → p-7b3f06e0.entry.js} +1 -1
  233. package/dist/genesys-webcomponents/{p-0ed974cb.entry.js → p-7cecc169.entry.js} +1 -1
  234. package/dist/genesys-webcomponents/{p-e0f0cc0a.entry.js → p-7fa0ebcf.entry.js} +1 -1
  235. package/dist/genesys-webcomponents/{p-bb33884d.entry.js → p-8691acc1.entry.js} +1 -1
  236. package/dist/genesys-webcomponents/{p-4e865a79.entry.js → p-8cfed8ab.entry.js} +1 -1
  237. package/dist/genesys-webcomponents/{p-3504b52d.entry.js → p-8ef5755c.entry.js} +1 -1
  238. package/dist/genesys-webcomponents/{p-c5cc4499.entry.js → p-8f781185.entry.js} +1 -1
  239. package/dist/genesys-webcomponents/{p-56b47f79.entry.js → p-906dfed6.entry.js} +1 -1
  240. package/dist/genesys-webcomponents/{p-7583eb17.entry.js → p-9381f1a8.entry.js} +1 -1
  241. package/dist/genesys-webcomponents/{p-6b129835.entry.js → p-94f2e2a4.entry.js} +1 -1
  242. package/dist/genesys-webcomponents/{p-e9be8807.entry.js → p-9571e673.entry.js} +1 -1
  243. package/dist/genesys-webcomponents/{p-1f265935.entry.js → p-95a4e80e.entry.js} +1 -1
  244. package/dist/genesys-webcomponents/{p-1dca12c5.entry.js → p-95fcbe0c.entry.js} +1 -1
  245. package/dist/genesys-webcomponents/{p-559fd965.entry.js → p-97d57a71.entry.js} +1 -1
  246. package/dist/genesys-webcomponents/{p-2ac7ec81.entry.js → p-98f69d35.entry.js} +1 -1
  247. package/dist/genesys-webcomponents/{p-064f6ec0.entry.js → p-993b03b1.entry.js} +1 -1
  248. package/dist/genesys-webcomponents/{p-4a0aae21.entry.js → p-a2cc1e97.entry.js} +1 -1
  249. package/dist/genesys-webcomponents/{p-44b665e9.entry.js → p-a871a9cd.entry.js} +1 -1
  250. package/dist/genesys-webcomponents/p-ac40bdc8.entry.js +1 -0
  251. package/dist/genesys-webcomponents/{p-16109371.entry.js → p-ad9c8e01.entry.js} +1 -1
  252. package/dist/genesys-webcomponents/{p-0bc7c69c.entry.js → p-b1c23548.entry.js} +1 -1
  253. package/dist/genesys-webcomponents/{p-4bfa8d7f.entry.js → p-b5ee1c41.entry.js} +1 -1
  254. package/dist/genesys-webcomponents/{p-c9ad308d.entry.js → p-b6ec024f.entry.js} +1 -1
  255. package/dist/genesys-webcomponents/{p-18099796.entry.js → p-bf36d208.entry.js} +1 -1
  256. package/dist/genesys-webcomponents/{p-30e902fc.entry.js → p-c27e3e55.entry.js} +1 -1
  257. package/dist/genesys-webcomponents/{p-21ef475f.entry.js → p-c6d8e1d8.entry.js} +1 -1
  258. package/dist/genesys-webcomponents/{p-0b31e700.entry.js → p-c743441a.entry.js} +1 -1
  259. package/dist/genesys-webcomponents/{p-d24bbafd.entry.js → p-d2012304.entry.js} +1 -1
  260. package/dist/genesys-webcomponents/{p-dc82662a.entry.js → p-d3c907fc.entry.js} +1 -1
  261. package/dist/genesys-webcomponents/{p-8ebb78f7.entry.js → p-d9a38f04.entry.js} +1 -1
  262. package/dist/genesys-webcomponents/{p-5406e9ed.entry.js → p-dab7466b.entry.js} +1 -1
  263. package/dist/genesys-webcomponents/{p-8b3bf42a.entry.js → p-dfb9c511.entry.js} +1 -1
  264. package/dist/genesys-webcomponents/{p-a0926d37.entry.js → p-e078f4fa.entry.js} +1 -1
  265. package/dist/genesys-webcomponents/{p-804cc43e.entry.js → p-e1030da3.entry.js} +1 -1
  266. package/dist/genesys-webcomponents/{p-5675738b.entry.js → p-e401da19.entry.js} +1 -1
  267. package/dist/genesys-webcomponents/p-e4d54add.entry.js +1 -0
  268. package/dist/genesys-webcomponents/{p-81577261.entry.js → p-e511fb43.entry.js} +1 -1
  269. package/dist/genesys-webcomponents/{p-a90cc738.entry.js → p-e7cab774.entry.js} +1 -1
  270. package/dist/genesys-webcomponents/{p-a06023b3.entry.js → p-ebede868.entry.js} +1 -1
  271. package/dist/genesys-webcomponents/{p-632695ad.entry.js → p-ebfa2805.entry.js} +1 -1
  272. package/dist/genesys-webcomponents/{p-800521cd.entry.js → p-f242ce05.entry.js} +1 -1
  273. package/dist/genesys-webcomponents/{p-a71e6014.entry.js → p-f246861a.entry.js} +1 -1
  274. package/dist/genesys-webcomponents/{p-642b29b5.entry.js → p-f6913d5e.entry.js} +1 -1
  275. package/dist/genesys-webcomponents/p-f6f9039b.entry.js +1 -0
  276. package/dist/genesys-webcomponents/{p-bcf1af79.entry.js → p-fab9ff54.entry.js} +1 -1
  277. package/dist/genesys-webcomponents/{p-94465268.entry.js → p-fbc9566f.entry.js} +1 -1
  278. package/dist/stencil-wrapper.js +1 -1
  279. package/dist/types/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced/gux-tab-advanced.d.ts +45 -0
  280. package/dist/types/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-list/gux-tab-advanced-list.d.ts +82 -0
  281. package/dist/types/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-panel/gux-tab-advanced-panel.d.ts +12 -0
  282. package/dist/types/components/legacy/gux-tabs-advanced-legacy/gux-tabs-advanced.d.ts +25 -0
  283. package/dist/types/components/stable/gux-icon/gux-icon.types.d.ts +1 -1
  284. package/dist/types/components.d.ts +132 -0
  285. package/dist/types/stencil-wrapper.d.ts +1 -1
  286. package/package.json +1 -1
  287. package/dist/genesys-webcomponents/p-4d34cf6e.entry.js +0 -7
@@ -0,0 +1,3021 @@
1
+ /**!
2
+ * Sortable 1.15.0
3
+ * @author RubaXa <trash@rubaxa.org>
4
+ * @author owenm <owen23355@gmail.com>
5
+ * @license MIT
6
+ */
7
+ function ownKeys(object, enumerableOnly) {
8
+ var keys = Object.keys(object);
9
+
10
+ if (Object.getOwnPropertySymbols) {
11
+ var symbols = Object.getOwnPropertySymbols(object);
12
+
13
+ if (enumerableOnly) {
14
+ symbols = symbols.filter(function (sym) {
15
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
16
+ });
17
+ }
18
+
19
+ keys.push.apply(keys, symbols);
20
+ }
21
+
22
+ return keys;
23
+ }
24
+
25
+ function _objectSpread2(target) {
26
+ for (var i = 1; i < arguments.length; i++) {
27
+ var source = arguments[i] != null ? arguments[i] : {};
28
+
29
+ if (i % 2) {
30
+ ownKeys(Object(source), true).forEach(function (key) {
31
+ _defineProperty(target, key, source[key]);
32
+ });
33
+ } else if (Object.getOwnPropertyDescriptors) {
34
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
35
+ } else {
36
+ ownKeys(Object(source)).forEach(function (key) {
37
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
38
+ });
39
+ }
40
+ }
41
+
42
+ return target;
43
+ }
44
+
45
+ function _typeof(obj) {
46
+ "@babel/helpers - typeof";
47
+
48
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
49
+ _typeof = function (obj) {
50
+ return typeof obj;
51
+ };
52
+ } else {
53
+ _typeof = function (obj) {
54
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
55
+ };
56
+ }
57
+
58
+ return _typeof(obj);
59
+ }
60
+
61
+ function _defineProperty(obj, key, value) {
62
+ if (key in obj) {
63
+ Object.defineProperty(obj, key, {
64
+ value: value,
65
+ enumerable: true,
66
+ configurable: true,
67
+ writable: true
68
+ });
69
+ } else {
70
+ obj[key] = value;
71
+ }
72
+
73
+ return obj;
74
+ }
75
+
76
+ function _extends() {
77
+ _extends = Object.assign || function (target) {
78
+ for (var i = 1; i < arguments.length; i++) {
79
+ var source = arguments[i];
80
+
81
+ for (var key in source) {
82
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
83
+ target[key] = source[key];
84
+ }
85
+ }
86
+ }
87
+
88
+ return target;
89
+ };
90
+
91
+ return _extends.apply(this, arguments);
92
+ }
93
+
94
+ function _objectWithoutPropertiesLoose(source, excluded) {
95
+ if (source == null) return {};
96
+ var target = {};
97
+ var sourceKeys = Object.keys(source);
98
+ var key, i;
99
+
100
+ for (i = 0; i < sourceKeys.length; i++) {
101
+ key = sourceKeys[i];
102
+ if (excluded.indexOf(key) >= 0) continue;
103
+ target[key] = source[key];
104
+ }
105
+
106
+ return target;
107
+ }
108
+
109
+ function _objectWithoutProperties(source, excluded) {
110
+ if (source == null) return {};
111
+
112
+ var target = _objectWithoutPropertiesLoose(source, excluded);
113
+
114
+ var key, i;
115
+
116
+ if (Object.getOwnPropertySymbols) {
117
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
118
+
119
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
120
+ key = sourceSymbolKeys[i];
121
+ if (excluded.indexOf(key) >= 0) continue;
122
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
123
+ target[key] = source[key];
124
+ }
125
+ }
126
+
127
+ return target;
128
+ }
129
+
130
+ var version = "1.15.0";
131
+
132
+ function userAgent(pattern) {
133
+ if (typeof window !== 'undefined' && window.navigator) {
134
+ return !! /*@__PURE__*/navigator.userAgent.match(pattern);
135
+ }
136
+ }
137
+
138
+ var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
139
+ var Edge = userAgent(/Edge/i);
140
+ var FireFox = userAgent(/firefox/i);
141
+ var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
142
+ var IOS = userAgent(/iP(ad|od|hone)/i);
143
+ var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
144
+
145
+ var captureMode = {
146
+ capture: false,
147
+ passive: false
148
+ };
149
+
150
+ function on(el, event, fn) {
151
+ el.addEventListener(event, fn, !IE11OrLess && captureMode);
152
+ }
153
+
154
+ function off(el, event, fn) {
155
+ el.removeEventListener(event, fn, !IE11OrLess && captureMode);
156
+ }
157
+
158
+ function matches(
159
+ /**HTMLElement*/
160
+ el,
161
+ /**String*/
162
+ selector) {
163
+ if (!selector) return;
164
+ selector[0] === '>' && (selector = selector.substring(1));
165
+
166
+ if (el) {
167
+ try {
168
+ if (el.matches) {
169
+ return el.matches(selector);
170
+ } else if (el.msMatchesSelector) {
171
+ return el.msMatchesSelector(selector);
172
+ } else if (el.webkitMatchesSelector) {
173
+ return el.webkitMatchesSelector(selector);
174
+ }
175
+ } catch (_) {
176
+ return false;
177
+ }
178
+ }
179
+
180
+ return false;
181
+ }
182
+
183
+ function getParentOrHost(el) {
184
+ return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
185
+ }
186
+
187
+ function closest(
188
+ /**HTMLElement*/
189
+ el,
190
+ /**String*/
191
+ selector,
192
+ /**HTMLElement*/
193
+ ctx, includeCTX) {
194
+ if (el) {
195
+ ctx = ctx || document;
196
+
197
+ do {
198
+ if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
199
+ return el;
200
+ }
201
+
202
+ if (el === ctx) break;
203
+ /* jshint boss:true */
204
+ } while (el = getParentOrHost(el));
205
+ }
206
+
207
+ return null;
208
+ }
209
+
210
+ var R_SPACE = /\s+/g;
211
+
212
+ function toggleClass(el, name, state) {
213
+ if (el && name) {
214
+ if (el.classList) {
215
+ el.classList[state ? 'add' : 'remove'](name);
216
+ } else {
217
+ var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
218
+ el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
219
+ }
220
+ }
221
+ }
222
+
223
+ function css(el, prop, val) {
224
+ var style = el && el.style;
225
+
226
+ if (style) {
227
+ if (val === void 0) {
228
+ if (document.defaultView && document.defaultView.getComputedStyle) {
229
+ val = document.defaultView.getComputedStyle(el, '');
230
+ } else if (el.currentStyle) {
231
+ val = el.currentStyle;
232
+ }
233
+
234
+ return prop === void 0 ? val : val[prop];
235
+ } else {
236
+ if (!(prop in style) && prop.indexOf('webkit') === -1) {
237
+ prop = '-webkit-' + prop;
238
+ }
239
+
240
+ style[prop] = val + (typeof val === 'string' ? '' : 'px');
241
+ }
242
+ }
243
+ }
244
+
245
+ function matrix(el, selfOnly) {
246
+ var appliedTransforms = '';
247
+
248
+ if (typeof el === 'string') {
249
+ appliedTransforms = el;
250
+ } else {
251
+ do {
252
+ var transform = css(el, 'transform');
253
+
254
+ if (transform && transform !== 'none') {
255
+ appliedTransforms = transform + ' ' + appliedTransforms;
256
+ }
257
+ /* jshint boss:true */
258
+
259
+ } while (!selfOnly && (el = el.parentNode));
260
+ }
261
+
262
+ var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
263
+ /*jshint -W056 */
264
+
265
+ return matrixFn && new matrixFn(appliedTransforms);
266
+ }
267
+
268
+ function find(ctx, tagName, iterator) {
269
+ if (ctx) {
270
+ var list = ctx.getElementsByTagName(tagName),
271
+ i = 0,
272
+ n = list.length;
273
+
274
+ if (iterator) {
275
+ for (; i < n; i++) {
276
+ iterator(list[i], i);
277
+ }
278
+ }
279
+
280
+ return list;
281
+ }
282
+
283
+ return [];
284
+ }
285
+
286
+ function getWindowScrollingElement() {
287
+ var scrollingElement = document.scrollingElement;
288
+
289
+ if (scrollingElement) {
290
+ return scrollingElement;
291
+ } else {
292
+ return document.documentElement;
293
+ }
294
+ }
295
+ /**
296
+ * Returns the "bounding client rect" of given element
297
+ * @param {HTMLElement} el The element whose boundingClientRect is wanted
298
+ * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
299
+ * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
300
+ * @param {[Boolean]} undoScale Whether the container's scale() should be undone
301
+ * @param {[HTMLElement]} container The parent the element will be placed in
302
+ * @return {Object} The boundingClientRect of el, with specified adjustments
303
+ */
304
+
305
+
306
+ function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
307
+ if (!el.getBoundingClientRect && el !== window) return;
308
+ var elRect, top, left, bottom, right, height, width;
309
+
310
+ if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
311
+ elRect = el.getBoundingClientRect();
312
+ top = elRect.top;
313
+ left = elRect.left;
314
+ bottom = elRect.bottom;
315
+ right = elRect.right;
316
+ height = elRect.height;
317
+ width = elRect.width;
318
+ } else {
319
+ top = 0;
320
+ left = 0;
321
+ bottom = window.innerHeight;
322
+ right = window.innerWidth;
323
+ height = window.innerHeight;
324
+ width = window.innerWidth;
325
+ }
326
+
327
+ if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
328
+ // Adjust for translate()
329
+ container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
330
+ // Not needed on <= IE11
331
+
332
+ if (!IE11OrLess) {
333
+ do {
334
+ if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
335
+ var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container
336
+
337
+ top -= containerRect.top + parseInt(css(container, 'border-top-width'));
338
+ left -= containerRect.left + parseInt(css(container, 'border-left-width'));
339
+ bottom = top + elRect.height;
340
+ right = left + elRect.width;
341
+ break;
342
+ }
343
+ /* jshint boss:true */
344
+
345
+ } while (container = container.parentNode);
346
+ }
347
+ }
348
+
349
+ if (undoScale && el !== window) {
350
+ // Adjust for scale()
351
+ var elMatrix = matrix(container || el),
352
+ scaleX = elMatrix && elMatrix.a,
353
+ scaleY = elMatrix && elMatrix.d;
354
+
355
+ if (elMatrix) {
356
+ top /= scaleY;
357
+ left /= scaleX;
358
+ width /= scaleX;
359
+ height /= scaleY;
360
+ bottom = top + height;
361
+ right = left + width;
362
+ }
363
+ }
364
+
365
+ return {
366
+ top: top,
367
+ left: left,
368
+ bottom: bottom,
369
+ right: right,
370
+ width: width,
371
+ height: height
372
+ };
373
+ }
374
+ /**
375
+ * Checks if a side of an element is scrolled past a side of its parents
376
+ * @param {HTMLElement} el The element who's side being scrolled out of view is in question
377
+ * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
378
+ * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
379
+ * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
380
+ */
381
+
382
+
383
+ function isScrolledPast(el, elSide, parentSide) {
384
+ var parent = getParentAutoScrollElement(el, true),
385
+ elSideVal = getRect(el)[elSide];
386
+ /* jshint boss:true */
387
+
388
+ while (parent) {
389
+ var parentSideVal = getRect(parent)[parentSide],
390
+ visible = void 0;
391
+
392
+ if (parentSide === 'top' || parentSide === 'left') {
393
+ visible = elSideVal >= parentSideVal;
394
+ } else {
395
+ visible = elSideVal <= parentSideVal;
396
+ }
397
+
398
+ if (!visible) return parent;
399
+ if (parent === getWindowScrollingElement()) break;
400
+ parent = getParentAutoScrollElement(parent, false);
401
+ }
402
+
403
+ return false;
404
+ }
405
+ /**
406
+ * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
407
+ * and non-draggable elements
408
+ * @param {HTMLElement} el The parent element
409
+ * @param {Number} childNum The index of the child
410
+ * @param {Object} options Parent Sortable's options
411
+ * @return {HTMLElement} The child at index childNum, or null if not found
412
+ */
413
+
414
+
415
+ function getChild(el, childNum, options, includeDragEl) {
416
+ var currentChild = 0,
417
+ i = 0,
418
+ children = el.children;
419
+
420
+ while (i < children.length) {
421
+ if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {
422
+ if (currentChild === childNum) {
423
+ return children[i];
424
+ }
425
+
426
+ currentChild++;
427
+ }
428
+
429
+ i++;
430
+ }
431
+
432
+ return null;
433
+ }
434
+ /**
435
+ * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
436
+ * @param {HTMLElement} el Parent element
437
+ * @param {selector} selector Any other elements that should be ignored
438
+ * @return {HTMLElement} The last child, ignoring ghostEl
439
+ */
440
+
441
+
442
+ function lastChild(el, selector) {
443
+ var last = el.lastElementChild;
444
+
445
+ while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
446
+ last = last.previousElementSibling;
447
+ }
448
+
449
+ return last || null;
450
+ }
451
+ /**
452
+ * Returns the index of an element within its parent for a selected set of
453
+ * elements
454
+ * @param {HTMLElement} el
455
+ * @param {selector} selector
456
+ * @return {number}
457
+ */
458
+
459
+
460
+ function index(el, selector) {
461
+ var index = 0;
462
+
463
+ if (!el || !el.parentNode) {
464
+ return -1;
465
+ }
466
+ /* jshint boss:true */
467
+
468
+
469
+ while (el = el.previousElementSibling) {
470
+ if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
471
+ index++;
472
+ }
473
+ }
474
+
475
+ return index;
476
+ }
477
+ /**
478
+ * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
479
+ * The value is returned in real pixels.
480
+ * @param {HTMLElement} el
481
+ * @return {Array} Offsets in the format of [left, top]
482
+ */
483
+
484
+
485
+ function getRelativeScrollOffset(el) {
486
+ var offsetLeft = 0,
487
+ offsetTop = 0,
488
+ winScroller = getWindowScrollingElement();
489
+
490
+ if (el) {
491
+ do {
492
+ var elMatrix = matrix(el),
493
+ scaleX = elMatrix.a,
494
+ scaleY = elMatrix.d;
495
+ offsetLeft += el.scrollLeft * scaleX;
496
+ offsetTop += el.scrollTop * scaleY;
497
+ } while (el !== winScroller && (el = el.parentNode));
498
+ }
499
+
500
+ return [offsetLeft, offsetTop];
501
+ }
502
+ /**
503
+ * Returns the index of the object within the given array
504
+ * @param {Array} arr Array that may or may not hold the object
505
+ * @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
506
+ * @return {Number} The index of the object in the array, or -1
507
+ */
508
+
509
+
510
+ function indexOfObject(arr, obj) {
511
+ for (var i in arr) {
512
+ if (!arr.hasOwnProperty(i)) continue;
513
+
514
+ for (var key in obj) {
515
+ if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
516
+ }
517
+ }
518
+
519
+ return -1;
520
+ }
521
+
522
+ function getParentAutoScrollElement(el, includeSelf) {
523
+ // skip to window
524
+ if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
525
+ var elem = el;
526
+ var gotSelf = false;
527
+
528
+ do {
529
+ // we don't need to get elem css if it isn't even overflowing in the first place (performance)
530
+ if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
531
+ var elemCSS = css(elem);
532
+
533
+ if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
534
+ if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
535
+ if (gotSelf || includeSelf) return elem;
536
+ gotSelf = true;
537
+ }
538
+ }
539
+ /* jshint boss:true */
540
+
541
+ } while (elem = elem.parentNode);
542
+
543
+ return getWindowScrollingElement();
544
+ }
545
+
546
+ function extend(dst, src) {
547
+ if (dst && src) {
548
+ for (var key in src) {
549
+ if (src.hasOwnProperty(key)) {
550
+ dst[key] = src[key];
551
+ }
552
+ }
553
+ }
554
+
555
+ return dst;
556
+ }
557
+
558
+ function isRectEqual(rect1, rect2) {
559
+ 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);
560
+ }
561
+
562
+ var _throttleTimeout;
563
+
564
+ function throttle(callback, ms) {
565
+ return function () {
566
+ if (!_throttleTimeout) {
567
+ var args = arguments,
568
+ _this = this;
569
+
570
+ if (args.length === 1) {
571
+ callback.call(_this, args[0]);
572
+ } else {
573
+ callback.apply(_this, args);
574
+ }
575
+
576
+ _throttleTimeout = setTimeout(function () {
577
+ _throttleTimeout = void 0;
578
+ }, ms);
579
+ }
580
+ };
581
+ }
582
+
583
+ function cancelThrottle() {
584
+ clearTimeout(_throttleTimeout);
585
+ _throttleTimeout = void 0;
586
+ }
587
+
588
+ function scrollBy(el, x, y) {
589
+ el.scrollLeft += x;
590
+ el.scrollTop += y;
591
+ }
592
+
593
+ function clone(el) {
594
+ var Polymer = window.Polymer;
595
+ var $ = window.jQuery || window.Zepto;
596
+
597
+ if (Polymer && Polymer.dom) {
598
+ return Polymer.dom(el).cloneNode(true);
599
+ } else if ($) {
600
+ return $(el).clone(true)[0];
601
+ } else {
602
+ return el.cloneNode(true);
603
+ }
604
+ }
605
+
606
+ var expando = 'Sortable' + new Date().getTime();
607
+
608
+ function AnimationStateManager() {
609
+ var animationStates = [],
610
+ animationCallbackId;
611
+ return {
612
+ captureAnimationState: function captureAnimationState() {
613
+ animationStates = [];
614
+ if (!this.options.animation) return;
615
+ var children = [].slice.call(this.el.children);
616
+ children.forEach(function (child) {
617
+ if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
618
+ animationStates.push({
619
+ target: child,
620
+ rect: getRect(child)
621
+ });
622
+
623
+ var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation
624
+
625
+
626
+ if (child.thisAnimationDuration) {
627
+ var childMatrix = matrix(child, true);
628
+
629
+ if (childMatrix) {
630
+ fromRect.top -= childMatrix.f;
631
+ fromRect.left -= childMatrix.e;
632
+ }
633
+ }
634
+
635
+ child.fromRect = fromRect;
636
+ });
637
+ },
638
+ addAnimationState: function addAnimationState(state) {
639
+ animationStates.push(state);
640
+ },
641
+ removeAnimationState: function removeAnimationState(target) {
642
+ animationStates.splice(indexOfObject(animationStates, {
643
+ target: target
644
+ }), 1);
645
+ },
646
+ animateAll: function animateAll(callback) {
647
+ var _this = this;
648
+
649
+ if (!this.options.animation) {
650
+ clearTimeout(animationCallbackId);
651
+ if (typeof callback === 'function') callback();
652
+ return;
653
+ }
654
+
655
+ var animating = false,
656
+ animationTime = 0;
657
+ animationStates.forEach(function (state) {
658
+ var time = 0,
659
+ target = state.target,
660
+ fromRect = target.fromRect,
661
+ toRect = getRect(target),
662
+ prevFromRect = target.prevFromRect,
663
+ prevToRect = target.prevToRect,
664
+ animatingRect = state.rect,
665
+ targetMatrix = matrix(target, true);
666
+
667
+ if (targetMatrix) {
668
+ // Compensate for current animation
669
+ toRect.top -= targetMatrix.f;
670
+ toRect.left -= targetMatrix.e;
671
+ }
672
+
673
+ target.toRect = toRect;
674
+
675
+ if (target.thisAnimationDuration) {
676
+ // Could also check if animatingRect is between fromRect and toRect
677
+ if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect
678
+ (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
679
+ // If returning to same place as started from animation and on same axis
680
+ time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
681
+ }
682
+ } // if fromRect != toRect: animate
683
+
684
+
685
+ if (!isRectEqual(toRect, fromRect)) {
686
+ target.prevFromRect = fromRect;
687
+ target.prevToRect = toRect;
688
+
689
+ if (!time) {
690
+ time = _this.options.animation;
691
+ }
692
+
693
+ _this.animate(target, animatingRect, toRect, time);
694
+ }
695
+
696
+ if (time) {
697
+ animating = true;
698
+ animationTime = Math.max(animationTime, time);
699
+ clearTimeout(target.animationResetTimer);
700
+ target.animationResetTimer = setTimeout(function () {
701
+ target.animationTime = 0;
702
+ target.prevFromRect = null;
703
+ target.fromRect = null;
704
+ target.prevToRect = null;
705
+ target.thisAnimationDuration = null;
706
+ }, time);
707
+ target.thisAnimationDuration = time;
708
+ }
709
+ });
710
+ clearTimeout(animationCallbackId);
711
+
712
+ if (!animating) {
713
+ if (typeof callback === 'function') callback();
714
+ } else {
715
+ animationCallbackId = setTimeout(function () {
716
+ if (typeof callback === 'function') callback();
717
+ }, animationTime);
718
+ }
719
+
720
+ animationStates = [];
721
+ },
722
+ animate: function animate(target, currentRect, toRect, duration) {
723
+ if (duration) {
724
+ css(target, 'transition', '');
725
+ css(target, 'transform', '');
726
+ var elMatrix = matrix(this.el),
727
+ scaleX = elMatrix && elMatrix.a,
728
+ scaleY = elMatrix && elMatrix.d,
729
+ translateX = (currentRect.left - toRect.left) / (scaleX || 1),
730
+ translateY = (currentRect.top - toRect.top) / (scaleY || 1);
731
+ target.animatingX = !!translateX;
732
+ target.animatingY = !!translateY;
733
+ css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
734
+ this.forRepaintDummy = repaint(target); // repaint
735
+
736
+ css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
737
+ css(target, 'transform', 'translate3d(0,0,0)');
738
+ typeof target.animated === 'number' && clearTimeout(target.animated);
739
+ target.animated = setTimeout(function () {
740
+ css(target, 'transition', '');
741
+ css(target, 'transform', '');
742
+ target.animated = false;
743
+ target.animatingX = false;
744
+ target.animatingY = false;
745
+ }, duration);
746
+ }
747
+ }
748
+ };
749
+ }
750
+
751
+ function repaint(target) {
752
+ return target.offsetWidth;
753
+ }
754
+
755
+ function calculateRealTime(animatingRect, fromRect, toRect, options) {
756
+ 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;
757
+ }
758
+
759
+ var plugins = [];
760
+ var defaults = {
761
+ initializeByDefault: true
762
+ };
763
+ var PluginManager = {
764
+ mount: function mount(plugin) {
765
+ // Set default static properties
766
+ for (var option in defaults) {
767
+ if (defaults.hasOwnProperty(option) && !(option in plugin)) {
768
+ plugin[option] = defaults[option];
769
+ }
770
+ }
771
+
772
+ plugins.forEach(function (p) {
773
+ if (p.pluginName === plugin.pluginName) {
774
+ throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
775
+ }
776
+ });
777
+ plugins.push(plugin);
778
+ },
779
+ pluginEvent: function pluginEvent(eventName, sortable, evt) {
780
+ var _this = this;
781
+
782
+ this.eventCanceled = false;
783
+
784
+ evt.cancel = function () {
785
+ _this.eventCanceled = true;
786
+ };
787
+
788
+ var eventNameGlobal = eventName + 'Global';
789
+ plugins.forEach(function (plugin) {
790
+ if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable
791
+
792
+ if (sortable[plugin.pluginName][eventNameGlobal]) {
793
+ sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
794
+ sortable: sortable
795
+ }, evt));
796
+ } // Only fire plugin event if plugin is enabled in this sortable,
797
+ // and plugin has event defined
798
+
799
+
800
+ if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
801
+ sortable[plugin.pluginName][eventName](_objectSpread2({
802
+ sortable: sortable
803
+ }, evt));
804
+ }
805
+ });
806
+ },
807
+ initializePlugins: function initializePlugins(sortable, el, defaults, options) {
808
+ plugins.forEach(function (plugin) {
809
+ var pluginName = plugin.pluginName;
810
+ if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
811
+ var initialized = new plugin(sortable, el, sortable.options);
812
+ initialized.sortable = sortable;
813
+ initialized.options = sortable.options;
814
+ sortable[pluginName] = initialized; // Add default options from plugin
815
+
816
+ _extends(defaults, initialized.defaults);
817
+ });
818
+
819
+ for (var option in sortable.options) {
820
+ if (!sortable.options.hasOwnProperty(option)) continue;
821
+ var modified = this.modifyOption(sortable, option, sortable.options[option]);
822
+
823
+ if (typeof modified !== 'undefined') {
824
+ sortable.options[option] = modified;
825
+ }
826
+ }
827
+ },
828
+ getEventProperties: function getEventProperties(name, sortable) {
829
+ var eventProperties = {};
830
+ plugins.forEach(function (plugin) {
831
+ if (typeof plugin.eventProperties !== 'function') return;
832
+
833
+ _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
834
+ });
835
+ return eventProperties;
836
+ },
837
+ modifyOption: function modifyOption(sortable, name, value) {
838
+ var modifiedValue;
839
+ plugins.forEach(function (plugin) {
840
+ // Plugin must exist on the Sortable
841
+ 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
842
+
843
+ if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
844
+ modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
845
+ }
846
+ });
847
+ return modifiedValue;
848
+ }
849
+ };
850
+
851
+ function dispatchEvent(_ref) {
852
+ var sortable = _ref.sortable,
853
+ rootEl = _ref.rootEl,
854
+ name = _ref.name,
855
+ targetEl = _ref.targetEl,
856
+ cloneEl = _ref.cloneEl,
857
+ toEl = _ref.toEl,
858
+ fromEl = _ref.fromEl,
859
+ oldIndex = _ref.oldIndex,
860
+ newIndex = _ref.newIndex,
861
+ oldDraggableIndex = _ref.oldDraggableIndex,
862
+ newDraggableIndex = _ref.newDraggableIndex,
863
+ originalEvent = _ref.originalEvent,
864
+ putSortable = _ref.putSortable,
865
+ extraEventProperties = _ref.extraEventProperties;
866
+ sortable = sortable || rootEl && rootEl[expando];
867
+ if (!sortable) return;
868
+ var evt,
869
+ options = sortable.options,
870
+ onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature
871
+
872
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
873
+ evt = new CustomEvent(name, {
874
+ bubbles: true,
875
+ cancelable: true
876
+ });
877
+ } else {
878
+ evt = document.createEvent('Event');
879
+ evt.initEvent(name, true, true);
880
+ }
881
+
882
+ evt.to = toEl || rootEl;
883
+ evt.from = fromEl || rootEl;
884
+ evt.item = targetEl || rootEl;
885
+ evt.clone = cloneEl;
886
+ evt.oldIndex = oldIndex;
887
+ evt.newIndex = newIndex;
888
+ evt.oldDraggableIndex = oldDraggableIndex;
889
+ evt.newDraggableIndex = newDraggableIndex;
890
+ evt.originalEvent = originalEvent;
891
+ evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
892
+
893
+ var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));
894
+
895
+ for (var option in allEventProperties) {
896
+ evt[option] = allEventProperties[option];
897
+ }
898
+
899
+ if (rootEl) {
900
+ rootEl.dispatchEvent(evt);
901
+ }
902
+
903
+ if (options[onName]) {
904
+ options[onName].call(sortable, evt);
905
+ }
906
+ }
907
+
908
+ var _excluded = ["evt"];
909
+
910
+ var pluginEvent = function pluginEvent(eventName, sortable) {
911
+ var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
912
+ originalEvent = _ref.evt,
913
+ data = _objectWithoutProperties(_ref, _excluded);
914
+
915
+ PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({
916
+ dragEl: dragEl,
917
+ parentEl: parentEl,
918
+ ghostEl: ghostEl,
919
+ rootEl: rootEl,
920
+ nextEl: nextEl,
921
+ lastDownEl: lastDownEl,
922
+ cloneEl: cloneEl,
923
+ cloneHidden: cloneHidden,
924
+ dragStarted: moved,
925
+ putSortable: putSortable,
926
+ activeSortable: Sortable.active,
927
+ originalEvent: originalEvent,
928
+ oldIndex: oldIndex,
929
+ oldDraggableIndex: oldDraggableIndex,
930
+ newIndex: newIndex,
931
+ newDraggableIndex: newDraggableIndex,
932
+ hideGhostForTarget: _hideGhostForTarget,
933
+ unhideGhostForTarget: _unhideGhostForTarget,
934
+ cloneNowHidden: function cloneNowHidden() {
935
+ cloneHidden = true;
936
+ },
937
+ cloneNowShown: function cloneNowShown() {
938
+ cloneHidden = false;
939
+ },
940
+ dispatchSortableEvent: function dispatchSortableEvent(name) {
941
+ _dispatchEvent({
942
+ sortable: sortable,
943
+ name: name,
944
+ originalEvent: originalEvent
945
+ });
946
+ }
947
+ }, data));
948
+ };
949
+
950
+ function _dispatchEvent(info) {
951
+ dispatchEvent(_objectSpread2({
952
+ putSortable: putSortable,
953
+ cloneEl: cloneEl,
954
+ targetEl: dragEl,
955
+ rootEl: rootEl,
956
+ oldIndex: oldIndex,
957
+ oldDraggableIndex: oldDraggableIndex,
958
+ newIndex: newIndex,
959
+ newDraggableIndex: newDraggableIndex
960
+ }, info));
961
+ }
962
+
963
+ var dragEl,
964
+ parentEl,
965
+ ghostEl,
966
+ rootEl,
967
+ nextEl,
968
+ lastDownEl,
969
+ cloneEl,
970
+ cloneHidden,
971
+ oldIndex,
972
+ newIndex,
973
+ oldDraggableIndex,
974
+ newDraggableIndex,
975
+ activeGroup,
976
+ putSortable,
977
+ awaitingDragStarted = false,
978
+ ignoreNextClick = false,
979
+ sortables = [],
980
+ tapEvt,
981
+ touchEvt,
982
+ lastDx,
983
+ lastDy,
984
+ tapDistanceLeft,
985
+ tapDistanceTop,
986
+ moved,
987
+ lastTarget,
988
+ lastDirection,
989
+ pastFirstInvertThresh = false,
990
+ isCircumstantialInvert = false,
991
+ targetMoveDistance,
992
+ // For positioning ghost absolutely
993
+ ghostRelativeParent,
994
+ ghostRelativeParentInitialScroll = [],
995
+ // (left, top)
996
+ _silent = false,
997
+ savedInputChecked = [];
998
+ /** @const */
999
+
1000
+ var documentExists = typeof document !== 'undefined',
1001
+ PositionGhostAbsolutely = IOS,
1002
+ CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
1003
+ // This will not pass for IE9, because IE9 DnD only works on anchors
1004
+ supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
1005
+ supportCssPointerEvents = function () {
1006
+ if (!documentExists) return; // false when <= IE11
1007
+
1008
+ if (IE11OrLess) {
1009
+ return false;
1010
+ }
1011
+
1012
+ var el = document.createElement('x');
1013
+ el.style.cssText = 'pointer-events:auto';
1014
+ return el.style.pointerEvents === 'auto';
1015
+ }(),
1016
+ _detectDirection = function _detectDirection(el, options) {
1017
+ var elCSS = css(el),
1018
+ elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
1019
+ child1 = getChild(el, 0, options),
1020
+ child2 = getChild(el, 1, options),
1021
+ firstChildCSS = child1 && css(child1),
1022
+ secondChildCSS = child2 && css(child2),
1023
+ firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
1024
+ secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
1025
+
1026
+ if (elCSS.display === 'flex') {
1027
+ return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
1028
+ }
1029
+
1030
+ if (elCSS.display === 'grid') {
1031
+ return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
1032
+ }
1033
+
1034
+ if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
1035
+ var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
1036
+ return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
1037
+ }
1038
+
1039
+ 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';
1040
+ },
1041
+ _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
1042
+ var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
1043
+ dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
1044
+ dragElOppLength = vertical ? dragRect.width : dragRect.height,
1045
+ targetS1Opp = vertical ? targetRect.left : targetRect.top,
1046
+ targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
1047
+ targetOppLength = vertical ? targetRect.width : targetRect.height;
1048
+ return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
1049
+ },
1050
+
1051
+ /**
1052
+ * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
1053
+ * @param {Number} x X position
1054
+ * @param {Number} y Y position
1055
+ * @return {HTMLElement} Element of the first found nearest Sortable
1056
+ */
1057
+ _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
1058
+ var ret;
1059
+ sortables.some(function (sortable) {
1060
+ var threshold = sortable[expando].options.emptyInsertThreshold;
1061
+ if (!threshold || lastChild(sortable)) return;
1062
+ var rect = getRect(sortable),
1063
+ insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
1064
+ insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
1065
+
1066
+ if (insideHorizontally && insideVertically) {
1067
+ return ret = sortable;
1068
+ }
1069
+ });
1070
+ return ret;
1071
+ },
1072
+ _prepareGroup = function _prepareGroup(options) {
1073
+ function toFn(value, pull) {
1074
+ return function (to, from, dragEl, evt) {
1075
+ var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
1076
+
1077
+ if (value == null && (pull || sameGroup)) {
1078
+ // Default pull value
1079
+ // Default pull and put value if same group
1080
+ return true;
1081
+ } else if (value == null || value === false) {
1082
+ return false;
1083
+ } else if (pull && value === 'clone') {
1084
+ return value;
1085
+ } else if (typeof value === 'function') {
1086
+ return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
1087
+ } else {
1088
+ var otherGroup = (pull ? to : from).options.group.name;
1089
+ return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
1090
+ }
1091
+ };
1092
+ }
1093
+
1094
+ var group = {};
1095
+ var originalGroup = options.group;
1096
+
1097
+ if (!originalGroup || _typeof(originalGroup) != 'object') {
1098
+ originalGroup = {
1099
+ name: originalGroup
1100
+ };
1101
+ }
1102
+
1103
+ group.name = originalGroup.name;
1104
+ group.checkPull = toFn(originalGroup.pull, true);
1105
+ group.checkPut = toFn(originalGroup.put);
1106
+ group.revertClone = originalGroup.revertClone;
1107
+ options.group = group;
1108
+ },
1109
+ _hideGhostForTarget = function _hideGhostForTarget() {
1110
+ if (!supportCssPointerEvents && ghostEl) {
1111
+ css(ghostEl, 'display', 'none');
1112
+ }
1113
+ },
1114
+ _unhideGhostForTarget = function _unhideGhostForTarget() {
1115
+ if (!supportCssPointerEvents && ghostEl) {
1116
+ css(ghostEl, 'display', '');
1117
+ }
1118
+ }; // #1184 fix - Prevent click event on fallback if dragged but item not changed position
1119
+
1120
+
1121
+ if (documentExists && !ChromeForAndroid) {
1122
+ document.addEventListener('click', function (evt) {
1123
+ if (ignoreNextClick) {
1124
+ evt.preventDefault();
1125
+ evt.stopPropagation && evt.stopPropagation();
1126
+ evt.stopImmediatePropagation && evt.stopImmediatePropagation();
1127
+ ignoreNextClick = false;
1128
+ return false;
1129
+ }
1130
+ }, true);
1131
+ }
1132
+
1133
+ var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
1134
+ if (dragEl) {
1135
+ evt = evt.touches ? evt.touches[0] : evt;
1136
+
1137
+ var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
1138
+
1139
+ if (nearest) {
1140
+ // Create imitation event
1141
+ var event = {};
1142
+
1143
+ for (var i in evt) {
1144
+ if (evt.hasOwnProperty(i)) {
1145
+ event[i] = evt[i];
1146
+ }
1147
+ }
1148
+
1149
+ event.target = event.rootEl = nearest;
1150
+ event.preventDefault = void 0;
1151
+ event.stopPropagation = void 0;
1152
+
1153
+ nearest[expando]._onDragOver(event);
1154
+ }
1155
+ }
1156
+ };
1157
+
1158
+ var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
1159
+ if (dragEl) {
1160
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
1161
+ }
1162
+ };
1163
+ /**
1164
+ * @class Sortable
1165
+ * @param {HTMLElement} el
1166
+ * @param {Object} [options]
1167
+ */
1168
+
1169
+
1170
+ function Sortable(el, options) {
1171
+ if (!(el && el.nodeType && el.nodeType === 1)) {
1172
+ throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
1173
+ }
1174
+
1175
+ this.el = el; // root element
1176
+
1177
+ this.options = options = _extends({}, options); // Export instance
1178
+
1179
+ el[expando] = this;
1180
+ var defaults = {
1181
+ group: null,
1182
+ sort: true,
1183
+ disabled: false,
1184
+ store: null,
1185
+ handle: null,
1186
+ draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
1187
+ swapThreshold: 1,
1188
+ // percentage; 0 <= x <= 1
1189
+ invertSwap: false,
1190
+ // invert always
1191
+ invertedSwapThreshold: null,
1192
+ // will be set to same as swapThreshold if default
1193
+ removeCloneOnHide: true,
1194
+ direction: function direction() {
1195
+ return _detectDirection(el, this.options);
1196
+ },
1197
+ ghostClass: 'sortable-ghost',
1198
+ chosenClass: 'sortable-chosen',
1199
+ dragClass: 'sortable-drag',
1200
+ ignore: 'a, img',
1201
+ filter: null,
1202
+ preventOnFilter: true,
1203
+ animation: 0,
1204
+ easing: null,
1205
+ setData: function setData(dataTransfer, dragEl) {
1206
+ dataTransfer.setData('Text', dragEl.textContent);
1207
+ },
1208
+ dropBubble: false,
1209
+ dragoverBubble: false,
1210
+ dataIdAttr: 'data-id',
1211
+ delay: 0,
1212
+ delayOnTouchOnly: false,
1213
+ touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
1214
+ forceFallback: false,
1215
+ fallbackClass: 'sortable-fallback',
1216
+ fallbackOnBody: false,
1217
+ fallbackTolerance: 0,
1218
+ fallbackOffset: {
1219
+ x: 0,
1220
+ y: 0
1221
+ },
1222
+ supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,
1223
+ emptyInsertThreshold: 5
1224
+ };
1225
+ PluginManager.initializePlugins(this, el, defaults); // Set default options
1226
+
1227
+ for (var name in defaults) {
1228
+ !(name in options) && (options[name] = defaults[name]);
1229
+ }
1230
+
1231
+ _prepareGroup(options); // Bind all private methods
1232
+
1233
+
1234
+ for (var fn in this) {
1235
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
1236
+ this[fn] = this[fn].bind(this);
1237
+ }
1238
+ } // Setup drag mode
1239
+
1240
+
1241
+ this.nativeDraggable = options.forceFallback ? false : supportDraggable;
1242
+
1243
+ if (this.nativeDraggable) {
1244
+ // Touch start threshold cannot be greater than the native dragstart threshold
1245
+ this.options.touchStartThreshold = 1;
1246
+ } // Bind events
1247
+
1248
+
1249
+ if (options.supportPointer) {
1250
+ on(el, 'pointerdown', this._onTapStart);
1251
+ } else {
1252
+ on(el, 'mousedown', this._onTapStart);
1253
+ on(el, 'touchstart', this._onTapStart);
1254
+ }
1255
+
1256
+ if (this.nativeDraggable) {
1257
+ on(el, 'dragover', this);
1258
+ on(el, 'dragenter', this);
1259
+ }
1260
+
1261
+ sortables.push(this.el); // Restore sorting
1262
+
1263
+ options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager
1264
+
1265
+ _extends(this, AnimationStateManager());
1266
+ }
1267
+
1268
+ Sortable.prototype =
1269
+ /** @lends Sortable.prototype */
1270
+ {
1271
+ constructor: Sortable,
1272
+ _isOutsideThisEl: function _isOutsideThisEl(target) {
1273
+ if (!this.el.contains(target) && target !== this.el) {
1274
+ lastTarget = null;
1275
+ }
1276
+ },
1277
+ _getDirection: function _getDirection(evt, target) {
1278
+ return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
1279
+ },
1280
+ _onTapStart: function _onTapStart(
1281
+ /** Event|TouchEvent */
1282
+ evt) {
1283
+ if (!evt.cancelable) return;
1284
+
1285
+ var _this = this,
1286
+ el = this.el,
1287
+ options = this.options,
1288
+ preventOnFilter = options.preventOnFilter,
1289
+ type = evt.type,
1290
+ touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
1291
+ target = (touch || evt).target,
1292
+ originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
1293
+ filter = options.filter;
1294
+
1295
+ _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
1296
+
1297
+
1298
+ if (dragEl) {
1299
+ return;
1300
+ }
1301
+
1302
+ if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
1303
+ return; // only left button and enabled
1304
+ } // cancel dnd if original target is content editable
1305
+
1306
+
1307
+ if (originalTarget.isContentEditable) {
1308
+ return;
1309
+ } // Safari ignores further event handling after mousedown
1310
+
1311
+
1312
+ if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {
1313
+ return;
1314
+ }
1315
+
1316
+ target = closest(target, options.draggable, el, false);
1317
+
1318
+ if (target && target.animated) {
1319
+ return;
1320
+ }
1321
+
1322
+ if (lastDownEl === target) {
1323
+ // Ignoring duplicate `down`
1324
+ return;
1325
+ } // Get the index of the dragged element within its parent
1326
+
1327
+
1328
+ oldIndex = index(target);
1329
+ oldDraggableIndex = index(target, options.draggable); // Check filter
1330
+
1331
+ if (typeof filter === 'function') {
1332
+ if (filter.call(this, evt, target, this)) {
1333
+ _dispatchEvent({
1334
+ sortable: _this,
1335
+ rootEl: originalTarget,
1336
+ name: 'filter',
1337
+ targetEl: target,
1338
+ toEl: el,
1339
+ fromEl: el
1340
+ });
1341
+
1342
+ pluginEvent('filter', _this, {
1343
+ evt: evt
1344
+ });
1345
+ preventOnFilter && evt.cancelable && evt.preventDefault();
1346
+ return; // cancel dnd
1347
+ }
1348
+ } else if (filter) {
1349
+ filter = filter.split(',').some(function (criteria) {
1350
+ criteria = closest(originalTarget, criteria.trim(), el, false);
1351
+
1352
+ if (criteria) {
1353
+ _dispatchEvent({
1354
+ sortable: _this,
1355
+ rootEl: criteria,
1356
+ name: 'filter',
1357
+ targetEl: target,
1358
+ fromEl: el,
1359
+ toEl: el
1360
+ });
1361
+
1362
+ pluginEvent('filter', _this, {
1363
+ evt: evt
1364
+ });
1365
+ return true;
1366
+ }
1367
+ });
1368
+
1369
+ if (filter) {
1370
+ preventOnFilter && evt.cancelable && evt.preventDefault();
1371
+ return; // cancel dnd
1372
+ }
1373
+ }
1374
+
1375
+ if (options.handle && !closest(originalTarget, options.handle, el, false)) {
1376
+ return;
1377
+ } // Prepare `dragstart`
1378
+
1379
+
1380
+ this._prepareDragStart(evt, touch, target);
1381
+ },
1382
+ _prepareDragStart: function _prepareDragStart(
1383
+ /** Event */
1384
+ evt,
1385
+ /** Touch */
1386
+ touch,
1387
+ /** HTMLElement */
1388
+ target) {
1389
+ var _this = this,
1390
+ el = _this.el,
1391
+ options = _this.options,
1392
+ ownerDocument = el.ownerDocument,
1393
+ dragStartFn;
1394
+
1395
+ if (target && !dragEl && target.parentNode === el) {
1396
+ var dragRect = getRect(target);
1397
+ rootEl = el;
1398
+ dragEl = target;
1399
+ parentEl = dragEl.parentNode;
1400
+ nextEl = dragEl.nextSibling;
1401
+ lastDownEl = target;
1402
+ activeGroup = options.group;
1403
+ Sortable.dragged = dragEl;
1404
+ tapEvt = {
1405
+ target: dragEl,
1406
+ clientX: (touch || evt).clientX,
1407
+ clientY: (touch || evt).clientY
1408
+ };
1409
+ tapDistanceLeft = tapEvt.clientX - dragRect.left;
1410
+ tapDistanceTop = tapEvt.clientY - dragRect.top;
1411
+ this._lastX = (touch || evt).clientX;
1412
+ this._lastY = (touch || evt).clientY;
1413
+ dragEl.style['will-change'] = 'all';
1414
+
1415
+ dragStartFn = function dragStartFn() {
1416
+ pluginEvent('delayEnded', _this, {
1417
+ evt: evt
1418
+ });
1419
+
1420
+ if (Sortable.eventCanceled) {
1421
+ _this._onDrop();
1422
+
1423
+ return;
1424
+ } // Delayed drag has been triggered
1425
+ // we can re-enable the events: touchmove/mousemove
1426
+
1427
+
1428
+ _this._disableDelayedDragEvents();
1429
+
1430
+ if (!FireFox && _this.nativeDraggable) {
1431
+ dragEl.draggable = true;
1432
+ } // Bind the events: dragstart/dragend
1433
+
1434
+
1435
+ _this._triggerDragStart(evt, touch); // Drag start event
1436
+
1437
+
1438
+ _dispatchEvent({
1439
+ sortable: _this,
1440
+ name: 'choose',
1441
+ originalEvent: evt
1442
+ }); // Chosen item
1443
+
1444
+
1445
+ toggleClass(dragEl, options.chosenClass, true);
1446
+ }; // Disable "draggable"
1447
+
1448
+
1449
+ options.ignore.split(',').forEach(function (criteria) {
1450
+ find(dragEl, criteria.trim(), _disableDraggable);
1451
+ });
1452
+ on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
1453
+ on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
1454
+ on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
1455
+ on(ownerDocument, 'mouseup', _this._onDrop);
1456
+ on(ownerDocument, 'touchend', _this._onDrop);
1457
+ on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)
1458
+
1459
+ if (FireFox && this.nativeDraggable) {
1460
+ this.options.touchStartThreshold = 4;
1461
+ dragEl.draggable = true;
1462
+ }
1463
+
1464
+ pluginEvent('delayStart', this, {
1465
+ evt: evt
1466
+ }); // Delay is impossible for native DnD in Edge or IE
1467
+
1468
+ if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
1469
+ if (Sortable.eventCanceled) {
1470
+ this._onDrop();
1471
+
1472
+ return;
1473
+ } // If the user moves the pointer or let go the click or touch
1474
+ // before the delay has been reached:
1475
+ // disable the delayed drag
1476
+
1477
+
1478
+ on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
1479
+ on(ownerDocument, 'touchend', _this._disableDelayedDrag);
1480
+ on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
1481
+ on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
1482
+ on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
1483
+ options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
1484
+ _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
1485
+ } else {
1486
+ dragStartFn();
1487
+ }
1488
+ }
1489
+ },
1490
+ _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(
1491
+ /** TouchEvent|PointerEvent **/
1492
+ e) {
1493
+ var touch = e.touches ? e.touches[0] : e;
1494
+
1495
+ 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))) {
1496
+ this._disableDelayedDrag();
1497
+ }
1498
+ },
1499
+ _disableDelayedDrag: function _disableDelayedDrag() {
1500
+ dragEl && _disableDraggable(dragEl);
1501
+ clearTimeout(this._dragStartTimer);
1502
+
1503
+ this._disableDelayedDragEvents();
1504
+ },
1505
+ _disableDelayedDragEvents: function _disableDelayedDragEvents() {
1506
+ var ownerDocument = this.el.ownerDocument;
1507
+ off(ownerDocument, 'mouseup', this._disableDelayedDrag);
1508
+ off(ownerDocument, 'touchend', this._disableDelayedDrag);
1509
+ off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
1510
+ off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
1511
+ off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
1512
+ off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
1513
+ },
1514
+ _triggerDragStart: function _triggerDragStart(
1515
+ /** Event */
1516
+ evt,
1517
+ /** Touch */
1518
+ touch) {
1519
+ touch = touch || evt.pointerType == 'touch' && evt;
1520
+
1521
+ if (!this.nativeDraggable || touch) {
1522
+ if (this.options.supportPointer) {
1523
+ on(document, 'pointermove', this._onTouchMove);
1524
+ } else if (touch) {
1525
+ on(document, 'touchmove', this._onTouchMove);
1526
+ } else {
1527
+ on(document, 'mousemove', this._onTouchMove);
1528
+ }
1529
+ } else {
1530
+ on(dragEl, 'dragend', this);
1531
+ on(rootEl, 'dragstart', this._onDragStart);
1532
+ }
1533
+
1534
+ try {
1535
+ if (document.selection) {
1536
+ // Timeout neccessary for IE9
1537
+ _nextTick(function () {
1538
+ document.selection.empty();
1539
+ });
1540
+ } else {
1541
+ window.getSelection().removeAllRanges();
1542
+ }
1543
+ } catch (err) {}
1544
+ },
1545
+ _dragStarted: function _dragStarted(fallback, evt) {
1546
+
1547
+ awaitingDragStarted = false;
1548
+
1549
+ if (rootEl && dragEl) {
1550
+ pluginEvent('dragStarted', this, {
1551
+ evt: evt
1552
+ });
1553
+
1554
+ if (this.nativeDraggable) {
1555
+ on(document, 'dragover', _checkOutsideTargetEl);
1556
+ }
1557
+
1558
+ var options = this.options; // Apply effect
1559
+
1560
+ !fallback && toggleClass(dragEl, options.dragClass, false);
1561
+ toggleClass(dragEl, options.ghostClass, true);
1562
+ Sortable.active = this;
1563
+ fallback && this._appendGhost(); // Drag start event
1564
+
1565
+ _dispatchEvent({
1566
+ sortable: this,
1567
+ name: 'start',
1568
+ originalEvent: evt
1569
+ });
1570
+ } else {
1571
+ this._nulling();
1572
+ }
1573
+ },
1574
+ _emulateDragOver: function _emulateDragOver() {
1575
+ if (touchEvt) {
1576
+ this._lastX = touchEvt.clientX;
1577
+ this._lastY = touchEvt.clientY;
1578
+
1579
+ _hideGhostForTarget();
1580
+
1581
+ var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1582
+ var parent = target;
1583
+
1584
+ while (target && target.shadowRoot) {
1585
+ target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1586
+ if (target === parent) break;
1587
+ parent = target;
1588
+ }
1589
+
1590
+ dragEl.parentNode[expando]._isOutsideThisEl(target);
1591
+
1592
+ if (parent) {
1593
+ do {
1594
+ if (parent[expando]) {
1595
+ var inserted = void 0;
1596
+ inserted = parent[expando]._onDragOver({
1597
+ clientX: touchEvt.clientX,
1598
+ clientY: touchEvt.clientY,
1599
+ target: target,
1600
+ rootEl: parent
1601
+ });
1602
+
1603
+ if (inserted && !this.options.dragoverBubble) {
1604
+ break;
1605
+ }
1606
+ }
1607
+
1608
+ target = parent; // store last element
1609
+ }
1610
+ /* jshint boss:true */
1611
+ while (parent = parent.parentNode);
1612
+ }
1613
+
1614
+ _unhideGhostForTarget();
1615
+ }
1616
+ },
1617
+ _onTouchMove: function _onTouchMove(
1618
+ /**TouchEvent*/
1619
+ evt) {
1620
+ if (tapEvt) {
1621
+ var options = this.options,
1622
+ fallbackTolerance = options.fallbackTolerance,
1623
+ fallbackOffset = options.fallbackOffset,
1624
+ touch = evt.touches ? evt.touches[0] : evt,
1625
+ ghostMatrix = ghostEl && matrix(ghostEl, true),
1626
+ scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
1627
+ scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
1628
+ relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
1629
+ dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
1630
+ 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
1631
+
1632
+ if (!Sortable.active && !awaitingDragStarted) {
1633
+ if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
1634
+ return;
1635
+ }
1636
+
1637
+ this._onDragStart(evt, true);
1638
+ }
1639
+
1640
+ if (ghostEl) {
1641
+ if (ghostMatrix) {
1642
+ ghostMatrix.e += dx - (lastDx || 0);
1643
+ ghostMatrix.f += dy - (lastDy || 0);
1644
+ } else {
1645
+ ghostMatrix = {
1646
+ a: 1,
1647
+ b: 0,
1648
+ c: 0,
1649
+ d: 1,
1650
+ e: dx,
1651
+ f: dy
1652
+ };
1653
+ }
1654
+
1655
+ var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
1656
+ css(ghostEl, 'webkitTransform', cssMatrix);
1657
+ css(ghostEl, 'mozTransform', cssMatrix);
1658
+ css(ghostEl, 'msTransform', cssMatrix);
1659
+ css(ghostEl, 'transform', cssMatrix);
1660
+ lastDx = dx;
1661
+ lastDy = dy;
1662
+ touchEvt = touch;
1663
+ }
1664
+
1665
+ evt.cancelable && evt.preventDefault();
1666
+ }
1667
+ },
1668
+ _appendGhost: function _appendGhost() {
1669
+ // Bug if using scale(): https://stackoverflow.com/questions/2637058
1670
+ // Not being adjusted for
1671
+ if (!ghostEl) {
1672
+ var container = this.options.fallbackOnBody ? document.body : rootEl,
1673
+ rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
1674
+ options = this.options; // Position absolutely
1675
+
1676
+ if (PositionGhostAbsolutely) {
1677
+ // Get relatively positioned parent
1678
+ ghostRelativeParent = container;
1679
+
1680
+ while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
1681
+ ghostRelativeParent = ghostRelativeParent.parentNode;
1682
+ }
1683
+
1684
+ if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
1685
+ if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
1686
+ rect.top += ghostRelativeParent.scrollTop;
1687
+ rect.left += ghostRelativeParent.scrollLeft;
1688
+ } else {
1689
+ ghostRelativeParent = getWindowScrollingElement();
1690
+ }
1691
+
1692
+ ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
1693
+ }
1694
+
1695
+ ghostEl = dragEl.cloneNode(true);
1696
+ toggleClass(ghostEl, options.ghostClass, false);
1697
+ toggleClass(ghostEl, options.fallbackClass, true);
1698
+ toggleClass(ghostEl, options.dragClass, true);
1699
+ css(ghostEl, 'transition', '');
1700
+ css(ghostEl, 'transform', '');
1701
+ css(ghostEl, 'box-sizing', 'border-box');
1702
+ css(ghostEl, 'margin', 0);
1703
+ css(ghostEl, 'top', rect.top);
1704
+ css(ghostEl, 'left', rect.left);
1705
+ css(ghostEl, 'width', rect.width);
1706
+ css(ghostEl, 'height', rect.height);
1707
+ css(ghostEl, 'opacity', '0.8');
1708
+ css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
1709
+ css(ghostEl, 'zIndex', '100000');
1710
+ css(ghostEl, 'pointerEvents', 'none');
1711
+ Sortable.ghost = ghostEl;
1712
+ container.appendChild(ghostEl); // Set transform-origin
1713
+
1714
+ css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
1715
+ }
1716
+ },
1717
+ _onDragStart: function _onDragStart(
1718
+ /**Event*/
1719
+ evt,
1720
+ /**boolean*/
1721
+ fallback) {
1722
+ var _this = this;
1723
+
1724
+ var dataTransfer = evt.dataTransfer;
1725
+ var options = _this.options;
1726
+ pluginEvent('dragStart', this, {
1727
+ evt: evt
1728
+ });
1729
+
1730
+ if (Sortable.eventCanceled) {
1731
+ this._onDrop();
1732
+
1733
+ return;
1734
+ }
1735
+
1736
+ pluginEvent('setupClone', this);
1737
+
1738
+ if (!Sortable.eventCanceled) {
1739
+ cloneEl = clone(dragEl);
1740
+ cloneEl.removeAttribute("id");
1741
+ cloneEl.draggable = false;
1742
+ cloneEl.style['will-change'] = '';
1743
+
1744
+ this._hideClone();
1745
+
1746
+ toggleClass(cloneEl, this.options.chosenClass, false);
1747
+ Sortable.clone = cloneEl;
1748
+ } // #1143: IFrame support workaround
1749
+
1750
+
1751
+ _this.cloneId = _nextTick(function () {
1752
+ pluginEvent('clone', _this);
1753
+ if (Sortable.eventCanceled) return;
1754
+
1755
+ if (!_this.options.removeCloneOnHide) {
1756
+ rootEl.insertBefore(cloneEl, dragEl);
1757
+ }
1758
+
1759
+ _this._hideClone();
1760
+
1761
+ _dispatchEvent({
1762
+ sortable: _this,
1763
+ name: 'clone'
1764
+ });
1765
+ });
1766
+ !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events
1767
+
1768
+ if (fallback) {
1769
+ ignoreNextClick = true;
1770
+ _this._loopId = setInterval(_this._emulateDragOver, 50);
1771
+ } else {
1772
+ // Undo what was set in _prepareDragStart before drag started
1773
+ off(document, 'mouseup', _this._onDrop);
1774
+ off(document, 'touchend', _this._onDrop);
1775
+ off(document, 'touchcancel', _this._onDrop);
1776
+
1777
+ if (dataTransfer) {
1778
+ dataTransfer.effectAllowed = 'move';
1779
+ options.setData && options.setData.call(_this, dataTransfer, dragEl);
1780
+ }
1781
+
1782
+ on(document, 'drop', _this); // #1276 fix:
1783
+
1784
+ css(dragEl, 'transform', 'translateZ(0)');
1785
+ }
1786
+
1787
+ awaitingDragStarted = true;
1788
+ _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
1789
+ on(document, 'selectstart', _this);
1790
+ moved = true;
1791
+
1792
+ if (Safari) {
1793
+ css(document.body, 'user-select', 'none');
1794
+ }
1795
+ },
1796
+ // Returns true - if no further action is needed (either inserted or another condition)
1797
+ _onDragOver: function _onDragOver(
1798
+ /**Event*/
1799
+ evt) {
1800
+ var el = this.el,
1801
+ target = evt.target,
1802
+ dragRect,
1803
+ targetRect,
1804
+ revert,
1805
+ options = this.options,
1806
+ group = options.group,
1807
+ activeSortable = Sortable.active,
1808
+ isOwner = activeGroup === group,
1809
+ canSort = options.sort,
1810
+ fromSortable = putSortable || activeSortable,
1811
+ vertical,
1812
+ _this = this,
1813
+ completedFired = false;
1814
+
1815
+ if (_silent) return;
1816
+
1817
+ function dragOverEvent(name, extra) {
1818
+ pluginEvent(name, _this, _objectSpread2({
1819
+ evt: evt,
1820
+ isOwner: isOwner,
1821
+ axis: vertical ? 'vertical' : 'horizontal',
1822
+ revert: revert,
1823
+ dragRect: dragRect,
1824
+ targetRect: targetRect,
1825
+ canSort: canSort,
1826
+ fromSortable: fromSortable,
1827
+ target: target,
1828
+ completed: completed,
1829
+ onMove: function onMove(target, after) {
1830
+ return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
1831
+ },
1832
+ changed: changed
1833
+ }, extra));
1834
+ } // Capture animation state
1835
+
1836
+
1837
+ function capture() {
1838
+ dragOverEvent('dragOverAnimationCapture');
1839
+
1840
+ _this.captureAnimationState();
1841
+
1842
+ if (_this !== fromSortable) {
1843
+ fromSortable.captureAnimationState();
1844
+ }
1845
+ } // Return invocation when dragEl is inserted (or completed)
1846
+
1847
+
1848
+ function completed(insertion) {
1849
+ dragOverEvent('dragOverCompleted', {
1850
+ insertion: insertion
1851
+ });
1852
+
1853
+ if (insertion) {
1854
+ // Clones must be hidden before folding animation to capture dragRectAbsolute properly
1855
+ if (isOwner) {
1856
+ activeSortable._hideClone();
1857
+ } else {
1858
+ activeSortable._showClone(_this);
1859
+ }
1860
+
1861
+ if (_this !== fromSortable) {
1862
+ // Set ghost class to new sortable's ghost class
1863
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
1864
+ toggleClass(dragEl, options.ghostClass, true);
1865
+ }
1866
+
1867
+ if (putSortable !== _this && _this !== Sortable.active) {
1868
+ putSortable = _this;
1869
+ } else if (_this === Sortable.active && putSortable) {
1870
+ putSortable = null;
1871
+ } // Animation
1872
+
1873
+
1874
+ if (fromSortable === _this) {
1875
+ _this._ignoreWhileAnimating = target;
1876
+ }
1877
+
1878
+ _this.animateAll(function () {
1879
+ dragOverEvent('dragOverAnimationComplete');
1880
+ _this._ignoreWhileAnimating = null;
1881
+ });
1882
+
1883
+ if (_this !== fromSortable) {
1884
+ fromSortable.animateAll();
1885
+ fromSortable._ignoreWhileAnimating = null;
1886
+ }
1887
+ } // Null lastTarget if it is not inside a previously swapped element
1888
+
1889
+
1890
+ if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
1891
+ lastTarget = null;
1892
+ } // no bubbling and not fallback
1893
+
1894
+
1895
+ if (!options.dragoverBubble && !evt.rootEl && target !== document) {
1896
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted
1897
+
1898
+
1899
+ !insertion && nearestEmptyInsertDetectEvent(evt);
1900
+ }
1901
+
1902
+ !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
1903
+ return completedFired = true;
1904
+ } // Call when dragEl has been inserted
1905
+
1906
+
1907
+ function changed() {
1908
+ newIndex = index(dragEl);
1909
+ newDraggableIndex = index(dragEl, options.draggable);
1910
+
1911
+ _dispatchEvent({
1912
+ sortable: _this,
1913
+ name: 'change',
1914
+ toEl: el,
1915
+ newIndex: newIndex,
1916
+ newDraggableIndex: newDraggableIndex,
1917
+ originalEvent: evt
1918
+ });
1919
+ }
1920
+
1921
+ if (evt.preventDefault !== void 0) {
1922
+ evt.cancelable && evt.preventDefault();
1923
+ }
1924
+
1925
+ target = closest(target, options.draggable, el, true);
1926
+ dragOverEvent('dragOver');
1927
+ if (Sortable.eventCanceled) return completedFired;
1928
+
1929
+ if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
1930
+ return completed(false);
1931
+ }
1932
+
1933
+ ignoreNextClick = false;
1934
+
1935
+ if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list
1936
+ : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
1937
+ vertical = this._getDirection(evt, target) === 'vertical';
1938
+ dragRect = getRect(dragEl);
1939
+ dragOverEvent('dragOverValid');
1940
+ if (Sortable.eventCanceled) return completedFired;
1941
+
1942
+ if (revert) {
1943
+ parentEl = rootEl; // actualization
1944
+
1945
+ capture();
1946
+
1947
+ this._hideClone();
1948
+
1949
+ dragOverEvent('revert');
1950
+
1951
+ if (!Sortable.eventCanceled) {
1952
+ if (nextEl) {
1953
+ rootEl.insertBefore(dragEl, nextEl);
1954
+ } else {
1955
+ rootEl.appendChild(dragEl);
1956
+ }
1957
+ }
1958
+
1959
+ return completed(true);
1960
+ }
1961
+
1962
+ var elLastChild = lastChild(el, options.draggable);
1963
+
1964
+ if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
1965
+ // Insert to end of list
1966
+ // If already at end of list: Do not insert
1967
+ if (elLastChild === dragEl) {
1968
+ return completed(false);
1969
+ } // if there is a last element, it is the target
1970
+
1971
+
1972
+ if (elLastChild && el === evt.target) {
1973
+ target = elLastChild;
1974
+ }
1975
+
1976
+ if (target) {
1977
+ targetRect = getRect(target);
1978
+ }
1979
+
1980
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
1981
+ capture();
1982
+
1983
+ if (elLastChild && elLastChild.nextSibling) {
1984
+ // the last draggable element is not the last node
1985
+ el.insertBefore(dragEl, elLastChild.nextSibling);
1986
+ } else {
1987
+ el.appendChild(dragEl);
1988
+ }
1989
+
1990
+ parentEl = el; // actualization
1991
+
1992
+ changed();
1993
+ return completed(true);
1994
+ }
1995
+ } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
1996
+ // Insert to start of list
1997
+ var firstChild = getChild(el, 0, options, true);
1998
+
1999
+ if (firstChild === dragEl) {
2000
+ return completed(false);
2001
+ }
2002
+
2003
+ target = firstChild;
2004
+ targetRect = getRect(target);
2005
+
2006
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
2007
+ capture();
2008
+ el.insertBefore(dragEl, firstChild);
2009
+ parentEl = el; // actualization
2010
+
2011
+ changed();
2012
+ return completed(true);
2013
+ }
2014
+ } else if (target.parentNode === el) {
2015
+ targetRect = getRect(target);
2016
+ var direction = 0,
2017
+ targetBeforeFirstSwap,
2018
+ differentLevel = dragEl.parentNode !== el,
2019
+ differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
2020
+ side1 = vertical ? 'top' : 'left',
2021
+ scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
2022
+ scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
2023
+
2024
+ if (lastTarget !== target) {
2025
+ targetBeforeFirstSwap = targetRect[side1];
2026
+ pastFirstInvertThresh = false;
2027
+ isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
2028
+ }
2029
+
2030
+ direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
2031
+ var sibling;
2032
+
2033
+ if (direction !== 0) {
2034
+ // Check if target is beside dragEl in respective direction (ignoring hidden elements)
2035
+ var dragIndex = index(dragEl);
2036
+
2037
+ do {
2038
+ dragIndex -= direction;
2039
+ sibling = parentEl.children[dragIndex];
2040
+ } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
2041
+ } // If dragEl is already beside target: Do not insert
2042
+
2043
+
2044
+ if (direction === 0 || sibling === target) {
2045
+ return completed(false);
2046
+ }
2047
+
2048
+ lastTarget = target;
2049
+ lastDirection = direction;
2050
+ var nextSibling = target.nextElementSibling,
2051
+ after = false;
2052
+ after = direction === 1;
2053
+
2054
+ var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
2055
+
2056
+ if (moveVector !== false) {
2057
+ if (moveVector === 1 || moveVector === -1) {
2058
+ after = moveVector === 1;
2059
+ }
2060
+
2061
+ _silent = true;
2062
+ setTimeout(_unsilent, 30);
2063
+ capture();
2064
+
2065
+ if (after && !nextSibling) {
2066
+ el.appendChild(dragEl);
2067
+ } else {
2068
+ target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
2069
+ } // Undo chrome's scroll adjustment (has no effect on other browsers)
2070
+
2071
+
2072
+ if (scrolledPastTop) {
2073
+ scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
2074
+ }
2075
+
2076
+ parentEl = dragEl.parentNode; // actualization
2077
+ // must be done before animation
2078
+
2079
+ if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
2080
+ targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
2081
+ }
2082
+
2083
+ changed();
2084
+ return completed(true);
2085
+ }
2086
+ }
2087
+
2088
+ if (el.contains(dragEl)) {
2089
+ return completed(false);
2090
+ }
2091
+ }
2092
+
2093
+ return false;
2094
+ },
2095
+ _ignoreWhileAnimating: null,
2096
+ _offMoveEvents: function _offMoveEvents() {
2097
+ off(document, 'mousemove', this._onTouchMove);
2098
+ off(document, 'touchmove', this._onTouchMove);
2099
+ off(document, 'pointermove', this._onTouchMove);
2100
+ off(document, 'dragover', nearestEmptyInsertDetectEvent);
2101
+ off(document, 'mousemove', nearestEmptyInsertDetectEvent);
2102
+ off(document, 'touchmove', nearestEmptyInsertDetectEvent);
2103
+ },
2104
+ _offUpEvents: function _offUpEvents() {
2105
+ var ownerDocument = this.el.ownerDocument;
2106
+ off(ownerDocument, 'mouseup', this._onDrop);
2107
+ off(ownerDocument, 'touchend', this._onDrop);
2108
+ off(ownerDocument, 'pointerup', this._onDrop);
2109
+ off(ownerDocument, 'touchcancel', this._onDrop);
2110
+ off(document, 'selectstart', this);
2111
+ },
2112
+ _onDrop: function _onDrop(
2113
+ /**Event*/
2114
+ evt) {
2115
+ var el = this.el,
2116
+ options = this.options; // Get the index of the dragged element within its parent
2117
+
2118
+ newIndex = index(dragEl);
2119
+ newDraggableIndex = index(dragEl, options.draggable);
2120
+ pluginEvent('drop', this, {
2121
+ evt: evt
2122
+ });
2123
+ parentEl = dragEl && dragEl.parentNode; // Get again after plugin event
2124
+
2125
+ newIndex = index(dragEl);
2126
+ newDraggableIndex = index(dragEl, options.draggable);
2127
+
2128
+ if (Sortable.eventCanceled) {
2129
+ this._nulling();
2130
+
2131
+ return;
2132
+ }
2133
+
2134
+ awaitingDragStarted = false;
2135
+ isCircumstantialInvert = false;
2136
+ pastFirstInvertThresh = false;
2137
+ clearInterval(this._loopId);
2138
+ clearTimeout(this._dragStartTimer);
2139
+
2140
+ _cancelNextTick(this.cloneId);
2141
+
2142
+ _cancelNextTick(this._dragStartId); // Unbind events
2143
+
2144
+
2145
+ if (this.nativeDraggable) {
2146
+ off(document, 'drop', this);
2147
+ off(el, 'dragstart', this._onDragStart);
2148
+ }
2149
+
2150
+ this._offMoveEvents();
2151
+
2152
+ this._offUpEvents();
2153
+
2154
+ if (Safari) {
2155
+ css(document.body, 'user-select', '');
2156
+ }
2157
+
2158
+ css(dragEl, 'transform', '');
2159
+
2160
+ if (evt) {
2161
+ if (moved) {
2162
+ evt.cancelable && evt.preventDefault();
2163
+ !options.dropBubble && evt.stopPropagation();
2164
+ }
2165
+
2166
+ ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
2167
+
2168
+ if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
2169
+ // Remove clone(s)
2170
+ cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
2171
+ }
2172
+
2173
+ if (dragEl) {
2174
+ if (this.nativeDraggable) {
2175
+ off(dragEl, 'dragend', this);
2176
+ }
2177
+
2178
+ _disableDraggable(dragEl);
2179
+
2180
+ dragEl.style['will-change'] = ''; // Remove classes
2181
+ // ghostClass is added in dragStarted
2182
+
2183
+ if (moved && !awaitingDragStarted) {
2184
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
2185
+ }
2186
+
2187
+ toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event
2188
+
2189
+ _dispatchEvent({
2190
+ sortable: this,
2191
+ name: 'unchoose',
2192
+ toEl: parentEl,
2193
+ newIndex: null,
2194
+ newDraggableIndex: null,
2195
+ originalEvent: evt
2196
+ });
2197
+
2198
+ if (rootEl !== parentEl) {
2199
+ if (newIndex >= 0) {
2200
+ // Add event
2201
+ _dispatchEvent({
2202
+ rootEl: parentEl,
2203
+ name: 'add',
2204
+ toEl: parentEl,
2205
+ fromEl: rootEl,
2206
+ originalEvent: evt
2207
+ }); // Remove event
2208
+
2209
+
2210
+ _dispatchEvent({
2211
+ sortable: this,
2212
+ name: 'remove',
2213
+ toEl: parentEl,
2214
+ originalEvent: evt
2215
+ }); // drag from one list and drop into another
2216
+
2217
+
2218
+ _dispatchEvent({
2219
+ rootEl: parentEl,
2220
+ name: 'sort',
2221
+ toEl: parentEl,
2222
+ fromEl: rootEl,
2223
+ originalEvent: evt
2224
+ });
2225
+
2226
+ _dispatchEvent({
2227
+ sortable: this,
2228
+ name: 'sort',
2229
+ toEl: parentEl,
2230
+ originalEvent: evt
2231
+ });
2232
+ }
2233
+
2234
+ putSortable && putSortable.save();
2235
+ } else {
2236
+ if (newIndex !== oldIndex) {
2237
+ if (newIndex >= 0) {
2238
+ // drag & drop within the same list
2239
+ _dispatchEvent({
2240
+ sortable: this,
2241
+ name: 'update',
2242
+ toEl: parentEl,
2243
+ originalEvent: evt
2244
+ });
2245
+
2246
+ _dispatchEvent({
2247
+ sortable: this,
2248
+ name: 'sort',
2249
+ toEl: parentEl,
2250
+ originalEvent: evt
2251
+ });
2252
+ }
2253
+ }
2254
+ }
2255
+
2256
+ if (Sortable.active) {
2257
+ /* jshint eqnull:true */
2258
+ if (newIndex == null || newIndex === -1) {
2259
+ newIndex = oldIndex;
2260
+ newDraggableIndex = oldDraggableIndex;
2261
+ }
2262
+
2263
+ _dispatchEvent({
2264
+ sortable: this,
2265
+ name: 'end',
2266
+ toEl: parentEl,
2267
+ originalEvent: evt
2268
+ }); // Save sorting
2269
+
2270
+
2271
+ this.save();
2272
+ }
2273
+ }
2274
+ }
2275
+
2276
+ this._nulling();
2277
+ },
2278
+ _nulling: function _nulling() {
2279
+ pluginEvent('nulling', this);
2280
+ 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;
2281
+ savedInputChecked.forEach(function (el) {
2282
+ el.checked = true;
2283
+ });
2284
+ savedInputChecked.length = lastDx = lastDy = 0;
2285
+ },
2286
+ handleEvent: function handleEvent(
2287
+ /**Event*/
2288
+ evt) {
2289
+ switch (evt.type) {
2290
+ case 'drop':
2291
+ case 'dragend':
2292
+ this._onDrop(evt);
2293
+
2294
+ break;
2295
+
2296
+ case 'dragenter':
2297
+ case 'dragover':
2298
+ if (dragEl) {
2299
+ this._onDragOver(evt);
2300
+
2301
+ _globalDragOver(evt);
2302
+ }
2303
+
2304
+ break;
2305
+
2306
+ case 'selectstart':
2307
+ evt.preventDefault();
2308
+ break;
2309
+ }
2310
+ },
2311
+
2312
+ /**
2313
+ * Serializes the item into an array of string.
2314
+ * @returns {String[]}
2315
+ */
2316
+ toArray: function toArray() {
2317
+ var order = [],
2318
+ el,
2319
+ children = this.el.children,
2320
+ i = 0,
2321
+ n = children.length,
2322
+ options = this.options;
2323
+
2324
+ for (; i < n; i++) {
2325
+ el = children[i];
2326
+
2327
+ if (closest(el, options.draggable, this.el, false)) {
2328
+ order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
2329
+ }
2330
+ }
2331
+
2332
+ return order;
2333
+ },
2334
+
2335
+ /**
2336
+ * Sorts the elements according to the array.
2337
+ * @param {String[]} order order of the items
2338
+ */
2339
+ sort: function sort(order, useAnimation) {
2340
+ var items = {},
2341
+ rootEl = this.el;
2342
+ this.toArray().forEach(function (id, i) {
2343
+ var el = rootEl.children[i];
2344
+
2345
+ if (closest(el, this.options.draggable, rootEl, false)) {
2346
+ items[id] = el;
2347
+ }
2348
+ }, this);
2349
+ useAnimation && this.captureAnimationState();
2350
+ order.forEach(function (id) {
2351
+ if (items[id]) {
2352
+ rootEl.removeChild(items[id]);
2353
+ rootEl.appendChild(items[id]);
2354
+ }
2355
+ });
2356
+ useAnimation && this.animateAll();
2357
+ },
2358
+
2359
+ /**
2360
+ * Save the current sorting
2361
+ */
2362
+ save: function save() {
2363
+ var store = this.options.store;
2364
+ store && store.set && store.set(this);
2365
+ },
2366
+
2367
+ /**
2368
+ * 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.
2369
+ * @param {HTMLElement} el
2370
+ * @param {String} [selector] default: `options.draggable`
2371
+ * @returns {HTMLElement|null}
2372
+ */
2373
+ closest: function closest$1(el, selector) {
2374
+ return closest(el, selector || this.options.draggable, this.el, false);
2375
+ },
2376
+
2377
+ /**
2378
+ * Set/get option
2379
+ * @param {string} name
2380
+ * @param {*} [value]
2381
+ * @returns {*}
2382
+ */
2383
+ option: function option(name, value) {
2384
+ var options = this.options;
2385
+
2386
+ if (value === void 0) {
2387
+ return options[name];
2388
+ } else {
2389
+ var modifiedValue = PluginManager.modifyOption(this, name, value);
2390
+
2391
+ if (typeof modifiedValue !== 'undefined') {
2392
+ options[name] = modifiedValue;
2393
+ } else {
2394
+ options[name] = value;
2395
+ }
2396
+
2397
+ if (name === 'group') {
2398
+ _prepareGroup(options);
2399
+ }
2400
+ }
2401
+ },
2402
+
2403
+ /**
2404
+ * Destroy
2405
+ */
2406
+ destroy: function destroy() {
2407
+ pluginEvent('destroy', this);
2408
+ var el = this.el;
2409
+ el[expando] = null;
2410
+ off(el, 'mousedown', this._onTapStart);
2411
+ off(el, 'touchstart', this._onTapStart);
2412
+ off(el, 'pointerdown', this._onTapStart);
2413
+
2414
+ if (this.nativeDraggable) {
2415
+ off(el, 'dragover', this);
2416
+ off(el, 'dragenter', this);
2417
+ } // Remove draggable attributes
2418
+
2419
+
2420
+ Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
2421
+ el.removeAttribute('draggable');
2422
+ });
2423
+
2424
+ this._onDrop();
2425
+
2426
+ this._disableDelayedDragEvents();
2427
+
2428
+ sortables.splice(sortables.indexOf(this.el), 1);
2429
+ this.el = el = null;
2430
+ },
2431
+ _hideClone: function _hideClone() {
2432
+ if (!cloneHidden) {
2433
+ pluginEvent('hideClone', this);
2434
+ if (Sortable.eventCanceled) return;
2435
+ css(cloneEl, 'display', 'none');
2436
+
2437
+ if (this.options.removeCloneOnHide && cloneEl.parentNode) {
2438
+ cloneEl.parentNode.removeChild(cloneEl);
2439
+ }
2440
+
2441
+ cloneHidden = true;
2442
+ }
2443
+ },
2444
+ _showClone: function _showClone(putSortable) {
2445
+ if (putSortable.lastPutMode !== 'clone') {
2446
+ this._hideClone();
2447
+
2448
+ return;
2449
+ }
2450
+
2451
+ if (cloneHidden) {
2452
+ pluginEvent('showClone', this);
2453
+ if (Sortable.eventCanceled) return; // show clone at dragEl or original position
2454
+
2455
+ if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
2456
+ rootEl.insertBefore(cloneEl, dragEl);
2457
+ } else if (nextEl) {
2458
+ rootEl.insertBefore(cloneEl, nextEl);
2459
+ } else {
2460
+ rootEl.appendChild(cloneEl);
2461
+ }
2462
+
2463
+ if (this.options.group.revertClone) {
2464
+ this.animate(dragEl, cloneEl);
2465
+ }
2466
+
2467
+ css(cloneEl, 'display', '');
2468
+ cloneHidden = false;
2469
+ }
2470
+ }
2471
+ };
2472
+
2473
+ function _globalDragOver(
2474
+ /**Event*/
2475
+ evt) {
2476
+ if (evt.dataTransfer) {
2477
+ evt.dataTransfer.dropEffect = 'move';
2478
+ }
2479
+
2480
+ evt.cancelable && evt.preventDefault();
2481
+ }
2482
+
2483
+ function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
2484
+ var evt,
2485
+ sortable = fromEl[expando],
2486
+ onMoveFn = sortable.options.onMove,
2487
+ retVal; // Support for new CustomEvent feature
2488
+
2489
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
2490
+ evt = new CustomEvent('move', {
2491
+ bubbles: true,
2492
+ cancelable: true
2493
+ });
2494
+ } else {
2495
+ evt = document.createEvent('Event');
2496
+ evt.initEvent('move', true, true);
2497
+ }
2498
+
2499
+ evt.to = toEl;
2500
+ evt.from = fromEl;
2501
+ evt.dragged = dragEl;
2502
+ evt.draggedRect = dragRect;
2503
+ evt.related = targetEl || toEl;
2504
+ evt.relatedRect = targetRect || getRect(toEl);
2505
+ evt.willInsertAfter = willInsertAfter;
2506
+ evt.originalEvent = originalEvent;
2507
+ fromEl.dispatchEvent(evt);
2508
+
2509
+ if (onMoveFn) {
2510
+ retVal = onMoveFn.call(sortable, evt, originalEvent);
2511
+ }
2512
+
2513
+ return retVal;
2514
+ }
2515
+
2516
+ function _disableDraggable(el) {
2517
+ el.draggable = false;
2518
+ }
2519
+
2520
+ function _unsilent() {
2521
+ _silent = false;
2522
+ }
2523
+
2524
+ function _ghostIsFirst(evt, vertical, sortable) {
2525
+ var rect = getRect(getChild(sortable.el, 0, sortable.options, true));
2526
+ var spacer = 10;
2527
+ return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left;
2528
+ }
2529
+
2530
+ function _ghostIsLast(evt, vertical, sortable) {
2531
+ var rect = getRect(lastChild(sortable.el, sortable.options.draggable));
2532
+ var spacer = 10;
2533
+ 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;
2534
+ }
2535
+
2536
+ function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
2537
+ var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
2538
+ targetLength = vertical ? targetRect.height : targetRect.width,
2539
+ targetS1 = vertical ? targetRect.top : targetRect.left,
2540
+ targetS2 = vertical ? targetRect.bottom : targetRect.right,
2541
+ invert = false;
2542
+
2543
+ if (!invertSwap) {
2544
+ // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
2545
+ if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
2546
+ // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
2547
+ // check if past first invert threshold on side opposite of lastDirection
2548
+ if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
2549
+ // past first invert threshold, do not restrict inverted threshold to dragEl shadow
2550
+ pastFirstInvertThresh = true;
2551
+ }
2552
+
2553
+ if (!pastFirstInvertThresh) {
2554
+ // dragEl shadow (target move distance shadow)
2555
+ if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
2556
+ : mouseOnAxis > targetS2 - targetMoveDistance) {
2557
+ return -lastDirection;
2558
+ }
2559
+ } else {
2560
+ invert = true;
2561
+ }
2562
+ } else {
2563
+ // Regular
2564
+ if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
2565
+ return _getInsertDirection(target);
2566
+ }
2567
+ }
2568
+ }
2569
+
2570
+ invert = invert || invertSwap;
2571
+
2572
+ if (invert) {
2573
+ // Invert of regular
2574
+ if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
2575
+ return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
2576
+ }
2577
+ }
2578
+
2579
+ return 0;
2580
+ }
2581
+ /**
2582
+ * Gets the direction dragEl must be swapped relative to target in order to make it
2583
+ * seem that dragEl has been "inserted" into that element's position
2584
+ * @param {HTMLElement} target The target whose position dragEl is being inserted at
2585
+ * @return {Number} Direction dragEl must be swapped
2586
+ */
2587
+
2588
+
2589
+ function _getInsertDirection(target) {
2590
+ if (index(dragEl) < index(target)) {
2591
+ return 1;
2592
+ } else {
2593
+ return -1;
2594
+ }
2595
+ }
2596
+ /**
2597
+ * Generate id
2598
+ * @param {HTMLElement} el
2599
+ * @returns {String}
2600
+ * @private
2601
+ */
2602
+
2603
+
2604
+ function _generateId(el) {
2605
+ var str = el.tagName + el.className + el.src + el.href + el.textContent,
2606
+ i = str.length,
2607
+ sum = 0;
2608
+
2609
+ while (i--) {
2610
+ sum += str.charCodeAt(i);
2611
+ }
2612
+
2613
+ return sum.toString(36);
2614
+ }
2615
+
2616
+ function _saveInputCheckedState(root) {
2617
+ savedInputChecked.length = 0;
2618
+ var inputs = root.getElementsByTagName('input');
2619
+ var idx = inputs.length;
2620
+
2621
+ while (idx--) {
2622
+ var el = inputs[idx];
2623
+ el.checked && savedInputChecked.push(el);
2624
+ }
2625
+ }
2626
+
2627
+ function _nextTick(fn) {
2628
+ return setTimeout(fn, 0);
2629
+ }
2630
+
2631
+ function _cancelNextTick(id) {
2632
+ return clearTimeout(id);
2633
+ } // Fixed #973:
2634
+
2635
+
2636
+ if (documentExists) {
2637
+ on(document, 'touchmove', function (evt) {
2638
+ if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
2639
+ evt.preventDefault();
2640
+ }
2641
+ });
2642
+ } // Export utils
2643
+
2644
+
2645
+ Sortable.utils = {
2646
+ on: on,
2647
+ off: off,
2648
+ css: css,
2649
+ find: find,
2650
+ is: function is(el, selector) {
2651
+ return !!closest(el, selector, el, false);
2652
+ },
2653
+ extend: extend,
2654
+ throttle: throttle,
2655
+ closest: closest,
2656
+ toggleClass: toggleClass,
2657
+ clone: clone,
2658
+ index: index,
2659
+ nextTick: _nextTick,
2660
+ cancelNextTick: _cancelNextTick,
2661
+ detectDirection: _detectDirection,
2662
+ getChild: getChild
2663
+ };
2664
+ /**
2665
+ * Get the Sortable instance of an element
2666
+ * @param {HTMLElement} element The element
2667
+ * @return {Sortable|undefined} The instance of Sortable
2668
+ */
2669
+
2670
+ Sortable.get = function (element) {
2671
+ return element[expando];
2672
+ };
2673
+ /**
2674
+ * Mount a plugin to Sortable
2675
+ * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
2676
+ */
2677
+
2678
+
2679
+ Sortable.mount = function () {
2680
+ for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
2681
+ plugins[_key] = arguments[_key];
2682
+ }
2683
+
2684
+ if (plugins[0].constructor === Array) plugins = plugins[0];
2685
+ plugins.forEach(function (plugin) {
2686
+ if (!plugin.prototype || !plugin.prototype.constructor) {
2687
+ throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
2688
+ }
2689
+
2690
+ if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
2691
+ PluginManager.mount(plugin);
2692
+ });
2693
+ };
2694
+ /**
2695
+ * Create sortable instance
2696
+ * @param {HTMLElement} el
2697
+ * @param {Object} [options]
2698
+ */
2699
+
2700
+
2701
+ Sortable.create = function (el, options) {
2702
+ return new Sortable(el, options);
2703
+ }; // Export
2704
+
2705
+
2706
+ Sortable.version = version;
2707
+
2708
+ var autoScrolls = [],
2709
+ scrollEl,
2710
+ scrollRootEl,
2711
+ scrolling = false,
2712
+ lastAutoScrollX,
2713
+ lastAutoScrollY,
2714
+ touchEvt$1,
2715
+ pointerElemChangedInterval;
2716
+
2717
+ function AutoScrollPlugin() {
2718
+ function AutoScroll() {
2719
+ this.defaults = {
2720
+ scroll: true,
2721
+ forceAutoScrollFallback: false,
2722
+ scrollSensitivity: 30,
2723
+ scrollSpeed: 10,
2724
+ bubbleScroll: true
2725
+ }; // Bind all private methods
2726
+
2727
+ for (var fn in this) {
2728
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
2729
+ this[fn] = this[fn].bind(this);
2730
+ }
2731
+ }
2732
+ }
2733
+
2734
+ AutoScroll.prototype = {
2735
+ dragStarted: function dragStarted(_ref) {
2736
+ var originalEvent = _ref.originalEvent;
2737
+
2738
+ if (this.sortable.nativeDraggable) {
2739
+ on(document, 'dragover', this._handleAutoScroll);
2740
+ } else {
2741
+ if (this.options.supportPointer) {
2742
+ on(document, 'pointermove', this._handleFallbackAutoScroll);
2743
+ } else if (originalEvent.touches) {
2744
+ on(document, 'touchmove', this._handleFallbackAutoScroll);
2745
+ } else {
2746
+ on(document, 'mousemove', this._handleFallbackAutoScroll);
2747
+ }
2748
+ }
2749
+ },
2750
+ dragOverCompleted: function dragOverCompleted(_ref2) {
2751
+ var originalEvent = _ref2.originalEvent;
2752
+
2753
+ // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
2754
+ if (!this.options.dragOverBubble && !originalEvent.rootEl) {
2755
+ this._handleAutoScroll(originalEvent);
2756
+ }
2757
+ },
2758
+ drop: function drop() {
2759
+ if (this.sortable.nativeDraggable) {
2760
+ off(document, 'dragover', this._handleAutoScroll);
2761
+ } else {
2762
+ off(document, 'pointermove', this._handleFallbackAutoScroll);
2763
+ off(document, 'touchmove', this._handleFallbackAutoScroll);
2764
+ off(document, 'mousemove', this._handleFallbackAutoScroll);
2765
+ }
2766
+
2767
+ clearPointerElemChangedInterval();
2768
+ clearAutoScrolls();
2769
+ cancelThrottle();
2770
+ },
2771
+ nulling: function nulling() {
2772
+ touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
2773
+ autoScrolls.length = 0;
2774
+ },
2775
+ _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
2776
+ this._handleAutoScroll(evt, true);
2777
+ },
2778
+ _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
2779
+ var _this = this;
2780
+
2781
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
2782
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
2783
+ elem = document.elementFromPoint(x, y);
2784
+ touchEvt$1 = evt; // IE does not seem to have native autoscroll,
2785
+ // Edge's autoscroll seems too conditional,
2786
+ // MACOS Safari does not have autoscroll,
2787
+ // Firefox and Chrome are good
2788
+
2789
+ if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
2790
+ autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change
2791
+
2792
+ var ogElemScroller = getParentAutoScrollElement(elem, true);
2793
+
2794
+ if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
2795
+ pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour
2796
+
2797
+ pointerElemChangedInterval = setInterval(function () {
2798
+ var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
2799
+
2800
+ if (newElem !== ogElemScroller) {
2801
+ ogElemScroller = newElem;
2802
+ clearAutoScrolls();
2803
+ }
2804
+
2805
+ autoScroll(evt, _this.options, newElem, fallback);
2806
+ }, 10);
2807
+ lastAutoScrollX = x;
2808
+ lastAutoScrollY = y;
2809
+ }
2810
+ } else {
2811
+ // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
2812
+ if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
2813
+ clearAutoScrolls();
2814
+ return;
2815
+ }
2816
+
2817
+ autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
2818
+ }
2819
+ }
2820
+ };
2821
+ return _extends(AutoScroll, {
2822
+ pluginName: 'scroll',
2823
+ initializeByDefault: true
2824
+ });
2825
+ }
2826
+
2827
+ function clearAutoScrolls() {
2828
+ autoScrolls.forEach(function (autoScroll) {
2829
+ clearInterval(autoScroll.pid);
2830
+ });
2831
+ autoScrolls = [];
2832
+ }
2833
+
2834
+ function clearPointerElemChangedInterval() {
2835
+ clearInterval(pointerElemChangedInterval);
2836
+ }
2837
+
2838
+ var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
2839
+ // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
2840
+ if (!options.scroll) return;
2841
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
2842
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
2843
+ sens = options.scrollSensitivity,
2844
+ speed = options.scrollSpeed,
2845
+ winScroller = getWindowScrollingElement();
2846
+ var scrollThisInstance = false,
2847
+ scrollCustomFn; // New scroll root, set scrollEl
2848
+
2849
+ if (scrollRootEl !== rootEl) {
2850
+ scrollRootEl = rootEl;
2851
+ clearAutoScrolls();
2852
+ scrollEl = options.scroll;
2853
+ scrollCustomFn = options.scrollFn;
2854
+
2855
+ if (scrollEl === true) {
2856
+ scrollEl = getParentAutoScrollElement(rootEl, true);
2857
+ }
2858
+ }
2859
+
2860
+ var layersOut = 0;
2861
+ var currentParent = scrollEl;
2862
+
2863
+ do {
2864
+ var el = currentParent,
2865
+ rect = getRect(el),
2866
+ top = rect.top,
2867
+ bottom = rect.bottom,
2868
+ left = rect.left,
2869
+ right = rect.right,
2870
+ width = rect.width,
2871
+ height = rect.height,
2872
+ canScrollX = void 0,
2873
+ canScrollY = void 0,
2874
+ scrollWidth = el.scrollWidth,
2875
+ scrollHeight = el.scrollHeight,
2876
+ elCSS = css(el),
2877
+ scrollPosX = el.scrollLeft,
2878
+ scrollPosY = el.scrollTop;
2879
+
2880
+ if (el === winScroller) {
2881
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
2882
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
2883
+ } else {
2884
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
2885
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
2886
+ }
2887
+
2888
+ var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
2889
+ var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
2890
+
2891
+ if (!autoScrolls[layersOut]) {
2892
+ for (var i = 0; i <= layersOut; i++) {
2893
+ if (!autoScrolls[i]) {
2894
+ autoScrolls[i] = {};
2895
+ }
2896
+ }
2897
+ }
2898
+
2899
+ if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
2900
+ autoScrolls[layersOut].el = el;
2901
+ autoScrolls[layersOut].vx = vx;
2902
+ autoScrolls[layersOut].vy = vy;
2903
+ clearInterval(autoScrolls[layersOut].pid);
2904
+
2905
+ if (vx != 0 || vy != 0) {
2906
+ scrollThisInstance = true;
2907
+ /* jshint loopfunc:true */
2908
+
2909
+ autoScrolls[layersOut].pid = setInterval(function () {
2910
+ // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
2911
+ if (isFallback && this.layer === 0) {
2912
+ Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
2913
+
2914
+ }
2915
+
2916
+ var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
2917
+ var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
2918
+
2919
+ if (typeof scrollCustomFn === 'function') {
2920
+ if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
2921
+ return;
2922
+ }
2923
+ }
2924
+
2925
+ scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
2926
+ }.bind({
2927
+ layer: layersOut
2928
+ }), 24);
2929
+ }
2930
+ }
2931
+
2932
+ layersOut++;
2933
+ } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
2934
+
2935
+ scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
2936
+ }, 30);
2937
+
2938
+ var drop = function drop(_ref) {
2939
+ var originalEvent = _ref.originalEvent,
2940
+ putSortable = _ref.putSortable,
2941
+ dragEl = _ref.dragEl,
2942
+ activeSortable = _ref.activeSortable,
2943
+ dispatchSortableEvent = _ref.dispatchSortableEvent,
2944
+ hideGhostForTarget = _ref.hideGhostForTarget,
2945
+ unhideGhostForTarget = _ref.unhideGhostForTarget;
2946
+ if (!originalEvent) return;
2947
+ var toSortable = putSortable || activeSortable;
2948
+ hideGhostForTarget();
2949
+ var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
2950
+ var target = document.elementFromPoint(touch.clientX, touch.clientY);
2951
+ unhideGhostForTarget();
2952
+
2953
+ if (toSortable && !toSortable.el.contains(target)) {
2954
+ dispatchSortableEvent('spill');
2955
+ this.onSpill({
2956
+ dragEl: dragEl,
2957
+ putSortable: putSortable
2958
+ });
2959
+ }
2960
+ };
2961
+
2962
+ function Revert() {}
2963
+
2964
+ Revert.prototype = {
2965
+ startIndex: null,
2966
+ dragStart: function dragStart(_ref2) {
2967
+ var oldDraggableIndex = _ref2.oldDraggableIndex;
2968
+ this.startIndex = oldDraggableIndex;
2969
+ },
2970
+ onSpill: function onSpill(_ref3) {
2971
+ var dragEl = _ref3.dragEl,
2972
+ putSortable = _ref3.putSortable;
2973
+ this.sortable.captureAnimationState();
2974
+
2975
+ if (putSortable) {
2976
+ putSortable.captureAnimationState();
2977
+ }
2978
+
2979
+ var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
2980
+
2981
+ if (nextSibling) {
2982
+ this.sortable.el.insertBefore(dragEl, nextSibling);
2983
+ } else {
2984
+ this.sortable.el.appendChild(dragEl);
2985
+ }
2986
+
2987
+ this.sortable.animateAll();
2988
+
2989
+ if (putSortable) {
2990
+ putSortable.animateAll();
2991
+ }
2992
+ },
2993
+ drop: drop
2994
+ };
2995
+
2996
+ _extends(Revert, {
2997
+ pluginName: 'revertOnSpill'
2998
+ });
2999
+
3000
+ function Remove() {}
3001
+
3002
+ Remove.prototype = {
3003
+ onSpill: function onSpill(_ref4) {
3004
+ var dragEl = _ref4.dragEl,
3005
+ putSortable = _ref4.putSortable;
3006
+ var parentSortable = putSortable || this.sortable;
3007
+ parentSortable.captureAnimationState();
3008
+ dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
3009
+ parentSortable.animateAll();
3010
+ },
3011
+ drop: drop
3012
+ };
3013
+
3014
+ _extends(Remove, {
3015
+ pluginName: 'removeOnSpill'
3016
+ });
3017
+
3018
+ Sortable.mount(new AutoScrollPlugin());
3019
+ Sortable.mount(Remove, Revert);
3020
+
3021
+ export { Sortable as S };