alchemy_cms 7.1.0.pre.rc1 → 7.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 52cea190db8dfb6571f62d93f72942df0c05afbf7b7988b952da56cbbba5dd91
4
- data.tar.gz: efd336249755bc11de59ff751be0af224ab9861f902df7ddd4226a97208840b6
3
+ metadata.gz: 6f6bb3f75bc0a5e455b4fc01c4bb046b096dde762bfbebb40a7e48f2ec4e58a9
4
+ data.tar.gz: 15e3a6a6dcd6ac863e7295bba8412393117c8fd2c1b40203012f41e84cf3e3db
5
5
  SHA512:
6
- metadata.gz: 587dee2f8372e32252543bbf6dd86bad7ab69d1734c2f129b3b6c4d11519e32f476f8605d2675e3df8cde2a1485ec470383baab818ab236895d61e0f37f9b631
7
- data.tar.gz: dfdaa30ab9f4429d75fdc1bf4930cce9e5b093f9a5e4ca2a3a090008e90c0747b8efb6c7dc40fecc0874fd788db9de82da3a6e071eeed2c65e297ca2a3c9b7a2
6
+ metadata.gz: dbb0d596df45f3f442d245f1f9ad019d7390279fb0f2e85f56046f203798e1e4c6a48c03c554dc70efe90c9c6d1d70a8f9f95acbe421a2f56942e03f2647d330
7
+ data.tar.gz: f2fb77f58aaf9280cfca63c4492794eea9d72cbee7d662fec28ef5d7d90fe4f72feeb04b22d4ba658085e343abd6dcfdbe4dd5bd9b51f2734c1f43ee53ce24c5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.1.0 (2024-01-25)
4
+
5
+ - Revert "Set admin picture thumbnail quality to 90" [#2706](https://github.com/AlchemyCMS/alchemy_cms/pull/2706) ([tvdeyen](https://github.com/tvdeyen))
6
+ - [js] Update all development Yarn dependencies (2024-01-25) [#2705](https://github.com/AlchemyCMS/alchemy_cms/pull/2705) ([depfu](https://github.com/apps/depfu))
7
+ - 7.1 Fix UI glitches [#2704](https://github.com/AlchemyCMS/alchemy_cms/pull/2704) ([tvdeyen](https://github.com/tvdeyen))
8
+ - [7.1] Revert WebP thumbnails [#2703](https://github.com/AlchemyCMS/alchemy_cms/pull/2703) ([tvdeyen](https://github.com/tvdeyen))
9
+ - TinyMCE: Trim spaces from pasted links [#2702](https://github.com/AlchemyCMS/alchemy_cms/pull/2702) ([mamhoff](https://github.com/mamhoff))
10
+ - [js] Update sortablejs 1.15.1 → 1.15.2 (patch) [#2698](https://github.com/AlchemyCMS/alchemy_cms/pull/2698) ([depfu](https://github.com/apps/depfu))
11
+ - [js] Update @rails/ujs 7.1.2 → 7.1.3 (patch) [#2697](https://github.com/AlchemyCMS/alchemy_cms/pull/2697) ([depfu](https://github.com/apps/depfu))
12
+ - Set admin picture thumbnail quality to 90 [#2692](https://github.com/AlchemyCMS/alchemy_cms/pull/2692) ([tvdeyen](https://github.com/tvdeyen))
13
+ - Set Tinymce editor form min-height [#2691](https://github.com/AlchemyCMS/alchemy_cms/pull/2691) ([tvdeyen](https://github.com/tvdeyen))
14
+ - Link tinymce icons [#2690](https://github.com/AlchemyCMS/alchemy_cms/pull/2690) ([tvdeyen](https://github.com/tvdeyen))
15
+
3
16
  ## 7.1.0-rc1 (2024-01-15)
4
17
 
5
18
  - Use title attribute for link_to_dialog and delete_button tooltip [#2688](https://github.com/AlchemyCMS/alchemy_cms/pull/2688) ([tvdeyen](https://github.com/tvdeyen))
@@ -5,6 +5,7 @@
5
5
  //= link alchemy/print.css
6
6
  //= link alchemy/welcome.css
7
7
  //= link tinymce/plugins/alchemy_link/plugin.min.js
8
+ //= link tinymce/icons/remixicons/icons.js
8
9
  //= link_directory ../stylesheets/tinymce/skins/ui/alchemy/ .css
9
10
  //= link_directory ../stylesheets/tinymce/skins/content/alchemy/ .css
10
11
  //= link_tree ../images/alchemy/
@@ -129,10 +129,11 @@ class window.Alchemy.LinkDialog extends Alchemy.Dialog
129
129
 
130
130
  # Sets the link either in TinyMCE or on an Ingredient.
131
131
  setLink: (url, title, target) ->
132
+ trimmedUrl = url.trim()
132
133
  if @link_object.editor
133
- @setTinyMCELink(url, title, target)
134
+ @setTinyMCELink(trimmedUrl, title, target)
134
135
  else
135
- @link_object.setLink(url, title, target, @link_type)
136
+ @link_object.setLink(trimmedUrl, title, target, @link_type)
136
137
  return
137
138
 
138
139
  # Sets a link in TinyMCE editor.
@@ -121,6 +121,7 @@ export class ElementEditor extends HTMLElement {
121
121
  this.setClean()
122
122
  // Reset errors that might be visible from last save attempt
123
123
  this.errorsDisplay.innerHTML = ""
124
+ this.elementErrors.classList.add("hidden")
124
125
  this.body
125
126
  .querySelectorAll(".ingredient-editor")
126
127
  .forEach((el) => el.classList.remove("validation_failed"))
@@ -100,12 +100,19 @@ class Tinymce extends AlchemyHTMLElement {
100
100
  }
101
101
  })
102
102
 
103
- return {
103
+ const config = {
104
104
  ...Alchemy.TinymceDefaults,
105
105
  ...customConfig,
106
106
  language: currentLocale(),
107
107
  selector: `#${this.editorId}`
108
108
  }
109
+
110
+ // Tinymce has a height of 400px by default
111
+ // if the element has a min_height set, we use this value for the height as well
112
+ // so we do not need to set both values in the element configuration
113
+ config.height = config.min_height
114
+
115
+ return config
109
116
  }
110
117
 
111
118
  get editorId() {
@@ -27,7 +27,6 @@ export class Progress extends AlchemyHTMLElement {
27
27
  this.actionButton.addEventListener("click", () => {
28
28
  if (this.finished) {
29
29
  this.onComplete(this.status)
30
- this.visible = false
31
30
  } else {
32
31
  this.cancel()
33
32
  }
@@ -126,6 +125,7 @@ export class Progress extends AlchemyHTMLElement {
126
125
  */
127
126
  _updateView() {
128
127
  const status = this.status
128
+ this.className = status
129
129
 
130
130
  // update progress bar
131
131
  this.progressElement.value = this.totalProgress
@@ -143,10 +143,9 @@ export class Progress extends AlchemyHTMLElement {
143
143
  if (this.finished) {
144
144
  this._setupCloseButton()
145
145
  this.onComplete(status)
146
+ } else {
147
+ this.visible = true
146
148
  }
147
-
148
- this.className = status
149
- this.visible = true
150
149
  }
151
150
 
152
151
  /**
@@ -112,9 +112,6 @@ export class Uploader extends AlchemyHTMLElement {
112
112
  }
113
113
  this.uploadProgress = new Progress(fileUploads)
114
114
  this.uploadProgress.onComplete = (status) => {
115
- if (status === "successful" || status === "canceled") {
116
- this.uploadProgress.visible = false
117
- }
118
115
  this.dispatchCustomEvent(`upload.${status}`)
119
116
  }
120
117
 
@@ -192,6 +192,21 @@ module Alchemy
192
192
  nil
193
193
  end
194
194
 
195
+ # Returns an url for the thumbnail representation of the picture
196
+ #
197
+ # @param [String] size - The size of the thumbnail
198
+ #
199
+ # @return [String]
200
+ def thumbnail_url(size: "160x120")
201
+ return if image_file.nil?
202
+
203
+ url(
204
+ flatten: true,
205
+ format: image_file_format || "jpg",
206
+ size: size
207
+ )
208
+ end
209
+
195
210
  # Updates name and tag_list attributes.
196
211
  #
197
212
  # Used by +Admin::PicturesController#update_multiple+
@@ -84,7 +84,7 @@ module Alchemy
84
84
  crop_from: crop && crop_from.presence || default_crop_from&.join("x"),
85
85
  crop_size: crop && crop_size.presence || default_crop_size&.join("x"),
86
86
  flatten: true,
87
- format: "webp"
87
+ format: picture&.image_file_format || "jpg"
88
88
  }
89
89
  end
90
90
 
@@ -8,7 +8,7 @@
8
8
  <%= simple_format Alchemy.t(:explain_cropping) %>
9
9
  <% end %>
10
10
  <div class="thumbnail_background">
11
- <%= image_tag @picture.url(size: '800x600', flatten: true, format: "webp"), id: 'imageToCrop' %>
11
+ <%= image_tag @picture.thumbnail_url(size: '800x600'), id: 'imageToCrop' %>
12
12
  </div>
13
13
  <form>
14
14
  <%= button_tag Alchemy.t(:apply), type: 'submit' %>
@@ -1,8 +1,8 @@
1
1
  <span class="page_status">
2
2
  <% if page.public? %>
3
- <%= render_icon(:cloud, size: "1x", class: "disabled") %>
3
+ <%= render_icon(:cloud, size: "1x") %>
4
4
  <% else %>
5
- <%= render_icon("cloud-off", size: "1x") %>
5
+ <%= render_icon("cloud-off", size: "1x", class: "disabled") %>
6
6
  <% end %>
7
7
  </span>
8
8
  <span class="page_status">
@@ -20,7 +20,7 @@
20
20
  </sl-tooltip>
21
21
  </span>
22
22
  <% end %>
23
- <% picture_url = picture.url(size: preview_size(@size), flatten: true, format: "webp") %>
23
+ <% picture_url = picture.thumbnail_url(size: preview_size(@size)) %>
24
24
  <% image = image_tag(picture_url || "alchemy/missing-image.svg", alt: picture.name) %>
25
25
  <% if can?(:edit, picture) && picture_url %>
26
26
  <%= link_to(
@@ -2,7 +2,7 @@
2
2
  <sl-tooltip content="<%= Alchemy.t(:assign_image) %>">
3
3
  <%= link_to(
4
4
  image_tag(
5
- picture_to_assign.url(size: preview_size(size), flatten: true, format: "webp") || "alchemy/missing-image.svg",
5
+ picture_to_assign.thumbnail_url(size: preview_size(size)) || "alchemy/missing-image.svg",
6
6
  alt: picture_to_assign.name
7
7
  ),
8
8
  alchemy.assign_admin_picture_path(
@@ -17,9 +17,10 @@
17
17
  </alchemy-uploader>
18
18
 
19
19
  <script type='text/javascript'>
20
- document.querySelector("alchemy-uploader").addEventListener("Alchemy.upload.successful", () => {
20
+ document.querySelector("alchemy-uploader").addEventListener("Alchemy.upload.successful", (evt) => {
21
21
  setTimeout(() => {
22
22
  var url = '<%= redirect_url.html_safe %>';
23
+ evt.target.uploadProgress.visible = false;
23
24
  <% if local_assigns[:in_dialog] %>
24
25
  $.get(url, null, null, 'script');
25
26
  <% else %>
@@ -203,8 +203,8 @@ RSpec.shared_examples_for "having picture thumbnails" do
203
203
  allow(record).to receive(:settings) { settings }
204
204
  end
205
205
 
206
- it "includes webp file format." do
207
- expect(thumbnail_url).to match(/\.webp/)
206
+ it "includes the image's original file format." do
207
+ expect(thumbnail_url).to match(/\.png/)
208
208
  end
209
209
 
210
210
  it "flattens the image." do
@@ -305,8 +305,8 @@ RSpec.shared_examples_for "having picture thumbnails" do
305
305
  create(:alchemy_picture)
306
306
  end
307
307
 
308
- it "uses webp image format." do
309
- expect(thumbnail_url_options[:format]).to eq("webp")
308
+ it "includes the image's original file format." do
309
+ expect(thumbnail_url_options[:format]).to eq("png")
310
310
  end
311
311
 
312
312
  it "flattens the image." do
@@ -381,7 +381,7 @@ RSpec.shared_examples_for "having picture thumbnails" do
381
381
  crop_from: nil,
382
382
  crop_size: nil,
383
383
  flatten: true,
384
- format: "webp",
384
+ format: "jpg",
385
385
  size: "160x120"
386
386
  )
387
387
  end
@@ -400,7 +400,7 @@ RSpec.shared_examples_for "having picture thumbnails" do
400
400
  crop_from: nil,
401
401
  crop_size: nil,
402
402
  flatten: true,
403
- format: "webp",
403
+ format: "jpg",
404
404
  size: "160x120"
405
405
  )
406
406
  end
@@ -22,7 +22,6 @@ module Alchemy
22
22
  width: "auto",
23
23
  resize: true,
24
24
  min_height: 250,
25
- height: 250,
26
25
  menubar: false,
27
26
  statusbar: true,
28
27
  toolbar: [
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "7.1.0-rc1"
4
+ VERSION = "7.1.0"
5
5
 
6
6
  def self.version
7
7
  VERSION
data/package.json CHANGED
@@ -10,18 +10,18 @@
10
10
  "author": "Thomas von Deyen",
11
11
  "license": "BSD-3-Clause",
12
12
  "dependencies": {
13
- "@rails/ujs": "^7.1.2",
13
+ "@rails/ujs": "^7.1.3",
14
14
  "@shoelace-style/shoelace": "^2.12.0",
15
15
  "@ungap/custom-elements": "^1.3.0",
16
16
  "clipboard": "^2.0.11",
17
17
  "flatpickr": "^4.6.13",
18
18
  "keymaster": "^1.6.2",
19
- "sortablejs": "^1.15.1",
19
+ "sortablejs": "^1.15.2",
20
20
  "tinymce": "^6.8.2"
21
21
  },
22
22
  "devDependencies": {
23
- "@babel/core": "^7.22.11",
24
- "@babel/preset-env": "^7.22.11",
23
+ "@babel/core": "^7.23.7",
24
+ "@babel/preset-env": "^7.23.7",
25
25
  "@rollup/plugin-commonjs": "^25.0.7",
26
26
  "@rollup/plugin-node-resolve": "^15.2.3",
27
27
  "@rollup/plugin-terser": "^0.4.4",
@@ -31,8 +31,8 @@
31
31
  "jest-environment-jsdom": "^29.6.4",
32
32
  "jquery": "^3.7.1",
33
33
  "jsdom-testing-mocks": "^1.11.0",
34
- "prettier": "^3.0.0",
35
- "rollup": "^4.9.3",
34
+ "prettier": "^3.2.4",
35
+ "rollup": "^4.9.5",
36
36
  "xhr-mock": "^2.5.1"
37
37
  },
38
38
  "jest": {
@@ -1,7 +1,7 @@
1
1
  /**!
2
- * Sortable 1.15.1
2
+ * Sortable 1.15.2
3
3
  * @author RubaXa <trash@rubaxa.org>
4
4
  * @author owenm <owen23355@gmail.com>
5
5
  * @license MIT
6
6
  */
7
- function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function e(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach((function(t){o(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(){return i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},i.apply(this,arguments)}function r(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function a(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function s(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var c=s(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),u=s(/Edge/i),d=s(/firefox/i),h=s(/safari/i)&&!s(/chrome/i)&&!s(/android/i),f=s(/iP(ad|od|hone)/i),p=s(/chrome/i)&&s(/android/i),g={capture:!1,passive:!1};function v(t,e,n){t.addEventListener(e,n,!c&&g)}function m(t,e,n){t.removeEventListener(e,n,!c&&g)}function b(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function y(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function w(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&b(t,e):b(t,e))||o&&t===n)return t;if(t===n)break}while(t=y(t))}return null}var E,D=/\s+/g;function S(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(D," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(D," ")}}function _(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function C(t,e){var n="";if("string"==typeof t)n=t;else do{var o=_(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function T(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function x(){var t=document.scrollingElement;return t||document.documentElement}function O(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,a,l,s,u,d,h;if(t!==window&&t.parentNode&&t!==x()?(a=(r=t.getBoundingClientRect()).top,l=r.left,s=r.bottom,u=r.right,d=r.height,h=r.width):(a=0,l=0,s=window.innerHeight,u=window.innerWidth,d=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!c))do{if(i&&i.getBoundingClientRect&&("none"!==_(i,"transform")||n&&"static"!==_(i,"position"))){var f=i.getBoundingClientRect();a-=f.top+parseInt(_(i,"border-top-width")),l-=f.left+parseInt(_(i,"border-left-width")),s=a+r.height,u=l+r.width;break}}while(i=i.parentNode);if(o&&t!==window){var p=C(i||t),g=p&&p.a,v=p&&p.d;p&&(s=(a/=v)+(d/=v),u=(l/=g)+(h/=g))}return{top:a,left:l,bottom:s,right:u,width:h,height:d}}}function M(t){var e=O(t),n=parseInt(_(t,"padding-left")),o=parseInt(_(t,"padding-top")),i=parseInt(_(t,"padding-right")),r=parseInt(_(t,"padding-bottom"));return e.top+=o+parseInt(_(t,"border-top-width")),e.left+=n+parseInt(_(t,"border-left-width")),e.width=t.clientWidth-n-i,e.height=t.clientHeight-o-r,e.bottom=e.top+e.height,e.right=e.left+e.width,e}function A(t,e,n){for(var o=R(t,!0),i=O(t)[e];o;){var r=O(o)[n];if(!("top"===n||"left"===n?i>=r:i<=r))return o;if(o===x())break;o=R(o,!1)}return!1}function I(t,e,n,o){for(var i=0,r=0,a=t.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==jt.ghost&&(o||a[r]!==jt.dragged)&&w(a[r],n.draggable,t,!1)){if(i===e)return a[r];i++}r++}return null}function N(t,e){for(var n=t.lastElementChild;n&&(n===jt.ghost||"none"===_(n,"display")||e&&!b(n,e));)n=n.previousElementSibling;return n||null}function P(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===jt.clone||e&&!b(t,e)||n++;return n}function k(t){var e=0,n=0,o=x();if(t)do{var i=C(t),r=i.a,a=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*a}while(t!==o&&(t=t.parentNode));return[e,n]}function R(t,e){if(!t||!t.getBoundingClientRect)return x();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=_(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return x();if(o||e)return n;o=!0}}}while(n=n.parentNode);return x()}function X(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function Y(t,e){return function(){if(!E){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),E=setTimeout((function(){E=void 0}),e)}}}function B(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function F(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function H(t,e){_(t,"position","absolute"),_(t,"top",e.top),_(t,"left",e.left),_(t,"width",e.width),_(t,"height",e.height)}function j(t){_(t,"position",""),_(t,"top",""),_(t,"left",""),_(t,"width",""),_(t,"height","")}var L="Sortable"+(new Date).getTime();function W(){var t,n=[];return{captureAnimationState:function(){(n=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==_(t,"display")&&t!==jt.ghost){n.push({target:t,rect:O(t)});var o=e({},n[n.length-1].rect);if(t.thisAnimationDuration){var i=C(t,!0);i&&(o.top-=i.f,o.left-=i.e)}t.fromRect=o}}))},addAnimationState:function(t){n.push(t)},removeAnimationState:function(t){n.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(n,{target:t}),1)},animateAll:function(e){var o=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof e&&e());var i=!1,r=0;n.forEach((function(t){var e=0,n=t.target,a=n.fromRect,l=O(n),s=n.prevFromRect,c=n.prevToRect,u=t.rect,d=C(n,!0);d&&(l.top-=d.f,l.left-=d.e),n.toRect=l,n.thisAnimationDuration&&X(s,l)&&!X(a,l)&&(u.top-l.top)/(u.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(e=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(u,s,c,o.options)),X(l,a)||(n.prevFromRect=a,n.prevToRect=l,e||(e=o.options.animation),o.animate(n,u,l,e)),e&&(i=!0,r=Math.max(r,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"==typeof e&&e()}),r):"function"==typeof e&&e(),n=[]},animate:function(t,e,n,o){if(o){_(t,"transition",""),_(t,"transform","");var i=C(this.el),r=i&&i.a,a=i&&i.d,l=(e.left-n.left)/(r||1),s=(e.top-n.top)/(a||1);t.animatingX=!!l,t.animatingY=!!s,_(t,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),_(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),_(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){_(t,"transition",""),_(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}}var K=[],z={initializeByDefault:!0},G={mount:function(t){for(var e in z)z.hasOwnProperty(e)&&!(e in t)&&(t[e]=z[e]);K.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),K.push(t)},pluginEvent:function(t,n,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var r=t+"Global";K.forEach((function(i){n[i.pluginName]&&(n[i.pluginName][r]&&n[i.pluginName][r](e({sortable:n},o)),n.options[i.pluginName]&&n[i.pluginName][t]&&n[i.pluginName][t](e({sortable:n},o)))}))},initializePlugins:function(t,e,n,o){for(var r in K.forEach((function(o){var r=o.pluginName;if(t.options[r]||o.initializeByDefault){var a=new o(t,e,t.options);a.sortable=t,a.options=t.options,t[r]=a,i(n,a.defaults)}})),t.options)if(t.options.hasOwnProperty(r)){var a=this.modifyOption(t,r,t.options[r]);void 0!==a&&(t.options[r]=a)}},getEventProperties:function(t,e){var n={};return K.forEach((function(o){"function"==typeof o.eventProperties&&i(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return K.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(o=i.optionListeners[e].call(t[i.pluginName],n))})),o}};function U(t){var n=t.sortable,o=t.rootEl,i=t.name,r=t.targetEl,a=t.cloneEl,l=t.toEl,s=t.fromEl,d=t.oldIndex,h=t.newIndex,f=t.oldDraggableIndex,p=t.newDraggableIndex,g=t.originalEvent,v=t.putSortable,m=t.extraEventProperties;if(n=n||o&&o[L]){var b,y=n.options,w="on"+i.charAt(0).toUpperCase()+i.substr(1);!window.CustomEvent||c||u?(b=document.createEvent("Event")).initEvent(i,!0,!0):b=new CustomEvent(i,{bubbles:!0,cancelable:!0}),b.to=l||o,b.from=s||o,b.item=r||o,b.clone=a,b.oldIndex=d,b.newIndex=h,b.oldDraggableIndex=f,b.newDraggableIndex=p,b.originalEvent=g,b.pullMode=v?v.lastPutMode:void 0;var E=e(e({},m),G.getEventProperties(i,n));for(var D in E)b[D]=E[D];o&&o.dispatchEvent(b),y[w]&&y[w].call(n,b)}}var q=["evt"],V=function(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.evt,a=r(o,q);G.pluginEvent.bind(jt)(t,n,e({dragEl:$,parentEl:Q,ghostEl:J,rootEl:tt,nextEl:et,lastDownEl:nt,cloneEl:ot,cloneHidden:it,dragStarted:mt,putSortable:ut,activeSortable:jt.active,originalEvent:i,oldIndex:rt,oldDraggableIndex:lt,newIndex:at,newDraggableIndex:st,hideGhostForTarget:Yt,unhideGhostForTarget:Bt,cloneNowHidden:function(){it=!0},cloneNowShown:function(){it=!1},dispatchSortableEvent:function(t){Z({sortable:n,name:t,originalEvent:i})}},a))};function Z(t){U(e({putSortable:ut,cloneEl:ot,targetEl:$,rootEl:tt,oldIndex:rt,oldDraggableIndex:lt,newIndex:at,newDraggableIndex:st},t))}var $,Q,J,tt,et,nt,ot,it,rt,at,lt,st,ct,ut,dt,ht,ft,pt,gt,vt,mt,bt,yt,wt,Et,Dt=!1,St=!1,_t=[],Ct=!1,Tt=!1,xt=[],Ot=!1,Mt=[],At="undefined"!=typeof document,It=f,Nt=u||c?"cssFloat":"float",Pt=At&&!p&&!f&&"draggable"in document.createElement("div"),kt=function(){if(At){if(c)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Rt=function(t,e){var n=_(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=I(t,0,e),r=I(t,1,e),a=i&&_(i),l=r&&_(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+O(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+O(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[Nt]||r&&"none"===n[Nt]&&s+c>o)?"vertical":"horizontal"},Xt=function(t){function e(t,n){return function(o,i,r,a){var l=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==t&&(n||l))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,a),n)(o,i,r,a);var s=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var o={},i=t.group;i&&"object"==n(i)||(i={name:i}),o.name=i.name,o.checkPull=e(i.pull,!0),o.checkPut=e(i.put),o.revertClone=i.revertClone,t.group=o},Yt=function(){!kt&&J&&_(J,"display","none")},Bt=function(){!kt&&J&&_(J,"display","")};At&&!p&&document.addEventListener("click",(function(t){if(St)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),St=!1,!1}),!0);var Ft=function(t){if($){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,r=t.clientY,_t.some((function(t){var e=t[L].options.emptyInsertThreshold;if(e&&!N(t)){var n=O(t),o=i>=n.left-e&&i<=n.right+e,l=r>=n.top-e&&r<=n.bottom+e;return o&&l?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[L]._onDragOver(n)}}var i,r,a},Ht=function(t){$&&$.parentNode[L]._isOutsideThisEl(t.target)};function jt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=i({},e),t[L]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Rt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==jt.supportPointer&&"PointerEvent"in window&&!h,emptyInsertThreshold:5};for(var o in G.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var r in Xt(e),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!e.forceFallback&&Pt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?v(t,"pointerdown",this._onTapStart):(v(t,"mousedown",this._onTapStart),v(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(t,"dragover",this),v(t,"dragenter",this)),_t.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),i(this,W())}function Lt(t,e,n,o,i,r,a,l){var s,d,h=t[L],f=h.options.onMove;return!window.CustomEvent||c||u?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||O(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),f&&(d=f.call(h,s,a)),d}function Wt(t){t.draggable=!1}function Kt(){Ot=!1}function zt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Gt(t){return setTimeout(t,0)}function Ut(t){return clearTimeout(t)}jt.prototype={constructor:jt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(bt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,$):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(function(t){Mt.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Mt.push(o)}}(n),!$&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!h||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=w(l,o.draggable,n,!1))&&l.animated||nt===l)){if(rt=P(l),lt=P(l,o.draggable),"function"==typeof c){if(c.call(this,t,l,this))return Z({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),V("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=w(s,o.trim(),n,!1))return Z({sortable:e,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),V("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!w(s,o.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;if(n&&!$&&n.parentNode===r){var s=O(n);if(tt=r,Q=($=n).parentNode,et=$.nextSibling,nt=n,ct=a.group,jt.dragged=$,dt={target:$,clientX:(e||t).clientX,clientY:(e||t).clientY},gt=dt.clientX-s.left,vt=dt.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,$.style["will-change"]="all",o=function(){V("delayEnded",i,{evt:t}),jt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!d&&i.nativeDraggable&&($.draggable=!0),i._triggerDragStart(t,e),Z({sortable:i,name:"choose",originalEvent:t}),S($,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){T($,t.trim(),Wt)})),v(l,"dragover",Ft),v(l,"mousemove",Ft),v(l,"touchmove",Ft),v(l,"mouseup",i._onDrop),v(l,"touchend",i._onDrop),v(l,"touchcancel",i._onDrop),d&&this.nativeDraggable&&(this.options.touchStartThreshold=4,$.draggable=!0),V("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(u||c))o();else{if(jt.eventCanceled)return void this._onDrop();v(l,"mouseup",i._disableDelayedDrag),v(l,"touchend",i._disableDelayedDrag),v(l,"touchcancel",i._disableDelayedDrag),v(l,"mousemove",i._delayedDragTouchMoveHandler),v(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&v(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){$&&Wt($),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._disableDelayedDrag),m(t,"touchend",this._disableDelayedDrag),m(t,"touchcancel",this._disableDelayedDrag),m(t,"mousemove",this._delayedDragTouchMoveHandler),m(t,"touchmove",this._delayedDragTouchMoveHandler),m(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):v(document,e?"touchmove":"mousemove",this._onTouchMove):(v($,"dragend",this),v(tt,"dragstart",this._onDragStart));try{document.selection?Gt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(Dt=!1,tt&&$){V("dragStarted",this,{evt:e}),this.nativeDraggable&&v(document,"dragover",Ht);var n=this.options;!t&&S($,n.dragClass,!1),S($,n.ghostClass,!0),jt.active=this,t&&this._appendGhost(),Z({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ht){this._lastX=ht.clientX,this._lastY=ht.clientY,Yt();for(var t=document.elementFromPoint(ht.clientX,ht.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ht.clientX,ht.clientY))!==e;)e=t;if($.parentNode[L]._isOutsideThisEl(t),e)do{if(e[L]){if(e[L]._onDragOver({clientX:ht.clientX,clientY:ht.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Bt()}},_onTouchMove:function(t){if(dt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=J&&C(J,!0),a=J&&r&&r.a,l=J&&r&&r.d,s=It&&Et&&k(Et),c=(i.clientX-dt.clientX+o.x)/(a||1)+(s?s[0]-xt[0]:0)/(a||1),u=(i.clientY-dt.clientY+o.y)/(l||1)+(s?s[1]-xt[1]:0)/(l||1);if(!jt.active&&!Dt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(J){r?(r.e+=c-(ft||0),r.f+=u-(pt||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");_(J,"webkitTransform",d),_(J,"mozTransform",d),_(J,"msTransform",d),_(J,"transform",d),ft=c,pt=u,ht=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!J){var t=this.options.fallbackOnBody?document.body:tt,e=O($,!0,It,!0,t),n=this.options;if(It){for(Et=t;"static"===_(Et,"position")&&"none"===_(Et,"transform")&&Et!==document;)Et=Et.parentNode;Et!==document.body&&Et!==document.documentElement?(Et===document&&(Et=x()),e.top+=Et.scrollTop,e.left+=Et.scrollLeft):Et=x(),xt=k(Et)}S(J=$.cloneNode(!0),n.ghostClass,!1),S(J,n.fallbackClass,!0),S(J,n.dragClass,!0),_(J,"transition",""),_(J,"transform",""),_(J,"box-sizing","border-box"),_(J,"margin",0),_(J,"top",e.top),_(J,"left",e.left),_(J,"width",e.width),_(J,"height",e.height),_(J,"opacity","0.8"),_(J,"position",It?"absolute":"fixed"),_(J,"zIndex","100000"),_(J,"pointerEvents","none"),jt.ghost=J,t.appendChild(J),_(J,"transform-origin",gt/parseInt(J.style.width)*100+"% "+vt/parseInt(J.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;V("dragStart",this,{evt:t}),jt.eventCanceled?this._onDrop():(V("setupClone",this),jt.eventCanceled||((ot=F($)).removeAttribute("id"),ot.draggable=!1,ot.style["will-change"]="",this._hideClone(),S(ot,this.options.chosenClass,!1),jt.clone=ot),n.cloneId=Gt((function(){V("clone",n),jt.eventCanceled||(n.options.removeCloneOnHide||tt.insertBefore(ot,$),n._hideClone(),Z({sortable:n,name:"clone"}))})),!e&&S($,i.dragClass,!0),e?(St=!0,n._loopId=setInterval(n._emulateDragOver,50)):(m(document,"mouseup",n._onDrop),m(document,"touchend",n._onDrop),m(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,$)),v(document,"drop",n),_($,"transform","translateZ(0)")),Dt=!0,n._dragStartId=Gt(n._dragStarted.bind(n,e,t)),v(document,"selectstart",n),mt=!0,h&&_(document.body,"user-select","none"))},_onDragOver:function(t){var n,o,i,r,a=this.el,l=t.target,s=this.options,c=s.group,u=jt.active,d=ct===c,h=s.sort,f=ut||u,p=this,g=!1;if(!Ot){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),l=w(l,s.draggable,a,!0),H("dragOver"),jt.eventCanceled)return g;if($.contains(t.target)||l.animated&&l.animatingX&&l.animatingY||p._ignoreWhileAnimating===l)return W(!1);if(St=!1,u&&!s.disabled&&(d?h||(i=Q!==tt):ut===this||(this.lastPutMode=ct.checkPull(this,u,$,t))&&c.checkPut(this,u,$,t))){if(r="vertical"===this._getDirection(t,l),n=O($),H("dragOverValid"),jt.eventCanceled)return g;if(i)return Q=tt,j(),this._hideClone(),H("revert"),jt.eventCanceled||(et?tt.insertBefore($,et):tt.appendChild($)),W(!0);var v=N(a,s.draggable);if(!v||function(t,e,n){var o=O(N(n.el,n.options.draggable)),i=M(n.el),r=10;return e?t.clientX>i.right+r||t.clientY>o.bottom&&t.clientX>o.left:t.clientY>i.bottom+r||t.clientX>o.right&&t.clientY>o.top}(t,r,this)&&!v.animated){if(v===$)return W(!1);if(v&&a===t.target&&(l=v),l&&(o=O(l)),!1!==Lt(tt,a,$,n,l,o,t,!!l))return j(),v&&v.nextSibling?a.insertBefore($,v.nextSibling):a.appendChild($),Q=a,K(),W(!0)}else if(v&&function(t,e,n){var o=O(I(n.el,0,n.options,!0)),i=M(n.el),r=10;return e?t.clientX<i.left-r||t.clientY<o.top&&t.clientX<o.right:t.clientY<i.top-r||t.clientY<o.bottom&&t.clientX<o.left}(t,r,this)){var m=I(a,0,s,!0);if(m===$)return W(!1);if(o=O(l=m),!1!==Lt(tt,a,$,n,l,o,t,!1))return j(),a.insertBefore($,m),Q=a,K(),W(!0)}else if(l.parentNode===a){o=O(l);var b,y,E,D=$.parentNode!==a,C=!function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,r=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,s=n?e.width:e.height;return o===a||i===l||o+r/2===a+s/2}($.animated&&$.toRect||n,l.animated&&l.toRect||o,r),T=r?"top":"left",x=A(l,"top","top")||A($,"top","top"),k=x?x.scrollTop:void 0;if(bt!==l&&(y=o[T],Ct=!1,Tt=!C&&s.invertSwap||D),b=function(t,e,n,o,i,r,a,l){var s=o?t.clientY:t.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,h=!1;if(!a)if(l&&wt<c*i){if(!Ct&&(1===yt?s>u+c*r/2:s<d-c*r/2)&&(Ct=!0),Ct)h=!0;else if(1===yt?s<u+wt:s>d-wt)return-yt}else if(s>u+c*(1-i)/2&&s<d-c*(1-i)/2)return function(t){return P($)<P(t)?1:-1}(e);if((h=h||a)&&(s<u+c*r/2||s>d-c*r/2))return s>u+c/2?1:-1;return 0}(t,l,o,r,C?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Tt,bt===l),0!==b){var R=P($);do{R-=b,E=Q.children[R]}while(E&&("none"===_(E,"display")||E===J))}if(0===b||E===l)return W(!1);bt=l,yt=b;var X=l.nextElementSibling,Y=!1,F=Lt(tt,a,$,n,l,o,t,Y=1===b);if(!1!==F)return 1!==F&&-1!==F||(Y=1===F),Ot=!0,setTimeout(Kt,30),j(),Y&&!X?a.appendChild($):l.parentNode.insertBefore($,Y?X:l),x&&B(x,0,k-x.scrollTop),Q=$.parentNode,void 0===y||Tt||(wt=Math.abs(y-O(l)[T])),K(),W(!0)}if(a.contains($))return W(!1)}return!1}function H(s,c){V(s,p,e({evt:t,isOwner:d,axis:r?"vertical":"horizontal",revert:i,dragRect:n,targetRect:o,canSort:h,fromSortable:f,target:l,completed:W,onMove:function(e,o){return Lt(tt,a,$,n,e,O(e),t,o)},changed:K},c))}function j(){H("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function W(e){return H("dragOverCompleted",{insertion:e}),e&&(d?u._hideClone():u._showClone(p),p!==f&&(S($,ut?ut.options.ghostClass:u.options.ghostClass,!1),S($,s.ghostClass,!0)),ut!==p&&p!==jt.active?ut=p:p===jt.active&&ut&&(ut=null),f===p&&(p._ignoreWhileAnimating=l),p.animateAll((function(){H("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(l===$&&!$.animated||l===a&&!l.animated)&&(bt=null),s.dragoverBubble||t.rootEl||l===document||($.parentNode[L]._isOutsideThisEl(t.target),!e&&Ft(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function K(){at=P($),st=P($,s.draggable),Z({sortable:p,name:"change",toEl:a,newIndex:at,newDraggableIndex:st,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){m(document,"mousemove",this._onTouchMove),m(document,"touchmove",this._onTouchMove),m(document,"pointermove",this._onTouchMove),m(document,"dragover",Ft),m(document,"mousemove",Ft),m(document,"touchmove",Ft)},_offUpEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._onDrop),m(t,"touchend",this._onDrop),m(t,"pointerup",this._onDrop),m(t,"touchcancel",this._onDrop),m(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;at=P($),st=P($,n.draggable),V("drop",this,{evt:t}),Q=$&&$.parentNode,at=P($),st=P($,n.draggable),jt.eventCanceled||(Dt=!1,Tt=!1,Ct=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ut(this.cloneId),Ut(this._dragStartId),this.nativeDraggable&&(m(document,"drop",this),m(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),h&&_(document.body,"user-select",""),_($,"transform",""),t&&(mt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),J&&J.parentNode&&J.parentNode.removeChild(J),(tt===Q||ut&&"clone"!==ut.lastPutMode)&&ot&&ot.parentNode&&ot.parentNode.removeChild(ot),$&&(this.nativeDraggable&&m($,"dragend",this),Wt($),$.style["will-change"]="",mt&&!Dt&&S($,ut?ut.options.ghostClass:this.options.ghostClass,!1),S($,this.options.chosenClass,!1),Z({sortable:this,name:"unchoose",toEl:Q,newIndex:null,newDraggableIndex:null,originalEvent:t}),tt!==Q?(at>=0&&(Z({rootEl:Q,name:"add",toEl:Q,fromEl:tt,originalEvent:t}),Z({sortable:this,name:"remove",toEl:Q,originalEvent:t}),Z({rootEl:Q,name:"sort",toEl:Q,fromEl:tt,originalEvent:t}),Z({sortable:this,name:"sort",toEl:Q,originalEvent:t})),ut&&ut.save()):at!==rt&&at>=0&&(Z({sortable:this,name:"update",toEl:Q,originalEvent:t}),Z({sortable:this,name:"sort",toEl:Q,originalEvent:t})),jt.active&&(null!=at&&-1!==at||(at=rt,st=lt),Z({sortable:this,name:"end",toEl:Q,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){V("nulling",this),tt=$=Q=J=et=ot=nt=it=dt=ht=mt=at=st=rt=lt=bt=yt=ut=ct=jt.dragged=jt.ghost=jt.clone=jt.active=null,Mt.forEach((function(t){t.checked=!0})),Mt.length=ft=pt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":$&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)w(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||zt(t));return e},sort:function(t,e){var n={},o=this.el;this.toArray().forEach((function(t,e){var i=o.children[e];w(i,this.options.draggable,o,!1)&&(n[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(o.removeChild(n[t]),o.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return w(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=G.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&Xt(n)},destroy:function(){V("destroy",this);var t=this.el;t[L]=null,m(t,"mousedown",this._onTapStart),m(t,"touchstart",this._onTapStart),m(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(m(t,"dragover",this),m(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),_t.splice(_t.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!it){if(V("hideClone",this),jt.eventCanceled)return;_(ot,"display","none"),this.options.removeCloneOnHide&&ot.parentNode&&ot.parentNode.removeChild(ot),it=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(it){if(V("showClone",this),jt.eventCanceled)return;$.parentNode!=tt||this.options.group.revertClone?et?tt.insertBefore(ot,et):tt.appendChild(ot):tt.insertBefore(ot,$),this.options.group.revertClone&&this.animate($,ot),_(ot,"display",""),it=!1}}else this._hideClone()}},At&&v(document,"touchmove",(function(t){(jt.active||Dt)&&t.cancelable&&t.preventDefault()})),jt.utils={on:v,off:m,css:_,find:T,is:function(t,e){return!!w(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:Y,closest:w,toggleClass:S,clone:F,index:P,nextTick:Gt,cancelNextTick:Ut,detectDirection:Rt,getChild:I},jt.get=function(t){return t[L]},jt.mount=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];n[0].constructor===Array&&(n=n[0]),n.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(jt.utils=e(e({},jt.utils),t.utils)),G.mount(t)}))},jt.create=function(t,e){return new jt(t,e)},jt.version="1.15.1";var qt,Vt,Zt,$t,Qt,Jt,te=[],ee=!1;function ne(){te.forEach((function(t){clearInterval(t.pid)})),te=[]}function oe(){clearInterval(Jt)}var ie,re=Y((function(t,e,n,o){if(e.scroll){var i,r=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,c=x(),u=!1;Vt!==n&&(Vt=n,ne(),qt=e.scroll,i=e.scrollFn,!0===qt&&(qt=R(n,!0)));var d=0,h=qt;do{var f=h,p=O(f),g=p.top,v=p.bottom,m=p.left,b=p.right,y=p.width,w=p.height,E=void 0,D=void 0,S=f.scrollWidth,C=f.scrollHeight,T=_(f),M=f.scrollLeft,A=f.scrollTop;f===c?(E=y<S&&("auto"===T.overflowX||"scroll"===T.overflowX||"visible"===T.overflowX),D=w<C&&("auto"===T.overflowY||"scroll"===T.overflowY||"visible"===T.overflowY)):(E=y<S&&("auto"===T.overflowX||"scroll"===T.overflowX),D=w<C&&("auto"===T.overflowY||"scroll"===T.overflowY));var I=E&&(Math.abs(b-r)<=l&&M+y<S)-(Math.abs(m-r)<=l&&!!M),N=D&&(Math.abs(v-a)<=l&&A+w<C)-(Math.abs(g-a)<=l&&!!A);if(!te[d])for(var P=0;P<=d;P++)te[P]||(te[P]={});te[d].vx==I&&te[d].vy==N&&te[d].el===f||(te[d].el=f,te[d].vx=I,te[d].vy=N,clearInterval(te[d].pid),0==I&&0==N||(u=!0,te[d].pid=setInterval(function(){o&&0===this.layer&&jt.active._onTouchMove(Qt);var e=te[this.layer].vy?te[this.layer].vy*s:0,n=te[this.layer].vx?te[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(jt.dragged.parentNode[L],n,e,t,Qt,te[this.layer].el)||B(te[this.layer].el,n,e)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&h!==c&&(h=R(h,!1)));ee=u}}),30),ae=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var s=n||i;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function le(){}function se(){}function ce(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){var e=t.dragEl;ie=e},dragOverValid:function(t){var e=t.completed,n=t.target,o=t.onMove,i=t.activeSortable,r=t.changed,a=t.cancel;if(i.options.swap){var l=this.sortable.el,s=this.options;if(n&&n!==l){var c=ie;!1!==o(n)?(S(n,s.swapClass,!0),ie=n):ie=null,c&&c!==ie&&S(c,s.swapClass,!1)}r(),e(!0),a()}},drop:function(t){var e=t.activeSortable,n=t.putSortable,o=t.dragEl,i=n||this.sortable,r=this.options;ie&&S(ie,r.swapClass,!1),ie&&(r.swap||n&&n.options.swap)&&o!==ie&&(i.captureAnimationState(),i!==e&&e.captureAnimationState(),function(t,e){var n,o,i=t.parentNode,r=e.parentNode;if(!i||!r||i.isEqualNode(e)||r.isEqualNode(t))return;n=P(t),o=P(e),i.isEqualNode(r)&&n<o&&o++;i.insertBefore(e,i.children[n]),r.insertBefore(t,r.children[o])}(o,ie),i.animateAll(),i!==e&&e.animateAll())},nulling:function(){ie=null}},i(t,{pluginName:"swap",eventProperties:function(){return{swapItem:ie}}})}le.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=I(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:ae},i(le,{pluginName:"revertOnSpill"}),se.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:ae},i(se,{pluginName:"removeOnSpill"});var ue,de,he,fe,pe,ge=[],ve=[],me=!1,be=!1,ye=!1;function we(){function t(t){for(var e in this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this));t.options.avoidImplicitDeselect||(t.options.supportPointer?v(document,"pointerup",this._deselectMultiDrag):(v(document,"mouseup",this._deselectMultiDrag),v(document,"touchend",this._deselectMultiDrag))),v(document,"keydown",this._checkKeyDown),v(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(e,n){var o="";ge.length&&de===t?ge.forEach((function(t,e){o+=(e?", ":"")+t.textContent})):o=n.textContent,e.setData("Text",o)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var e=t.dragEl;he=e},delayEnded:function(){this.isMultiDrag=~ge.indexOf(he)},setupClone:function(t){var e=t.sortable,n=t.cancel;if(this.isMultiDrag){for(var o=0;o<ge.length;o++)ve.push(F(ge[o])),ve[o].sortableIndex=ge[o].sortableIndex,ve[o].draggable=!1,ve[o].style["will-change"]="",S(ve[o],this.options.selectedClass,!1),ge[o]===he&&S(ve[o],this.options.chosenClass,!1);e._hideClone(),n()}},clone:function(t){var e=t.sortable,n=t.rootEl,o=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||ge.length&&de===e&&(Ee(!0,n),o("clone"),i()))},showClone:function(t){var e=t.cloneNowShown,n=t.rootEl,o=t.cancel;this.isMultiDrag&&(Ee(!1,n),ve.forEach((function(t){_(t,"display","")})),e(),pe=!1,o())},hideClone:function(t){var e=this;t.sortable;var n=t.cloneNowHidden,o=t.cancel;this.isMultiDrag&&(ve.forEach((function(t){_(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)})),n(),pe=!0,o())},dragStartGlobal:function(t){t.sortable,!this.isMultiDrag&&de&&de.multiDrag._deselectMultiDrag(),ge.forEach((function(t){t.sortableIndex=P(t)})),ge=ge.sort((function(t,e){return t.sortableIndex-e.sortableIndex})),ye=!0},dragStarted:function(t){var e=this,n=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){ge.forEach((function(t){t!==he&&_(t,"position","absolute")}));var o=O(he,!1,!0,!0);ge.forEach((function(t){t!==he&&H(t,o)})),be=!0,me=!0}n.animateAll((function(){be=!1,me=!1,e.options.animation&&ge.forEach((function(t){j(t)})),e.options.sort&&De()}))}},dragOver:function(t){var e=t.target,n=t.completed,o=t.cancel;be&&~ge.indexOf(e)&&(n(!1),o())},revert:function(t){var e=t.fromSortable,n=t.rootEl,o=t.sortable,i=t.dragRect;ge.length>1&&(ge.forEach((function(t){o.addAnimationState({target:t,rect:be?O(t):i}),j(t),t.fromRect=i,e.removeAnimationState(t)})),be=!1,function(t,e){ge.forEach((function(n,o){var i=e.children[n.sortableIndex+(t?Number(o):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(t){var e=t.sortable,n=t.isOwner,o=t.insertion,i=t.activeSortable,r=t.parentEl,a=t.putSortable,l=this.options;if(o){if(n&&i._hideClone(),me=!1,l.animation&&ge.length>1&&(be||!n&&!i.options.sort&&!a)){var s=O(he,!1,!0,!0);ge.forEach((function(t){t!==he&&(H(t,s),r.appendChild(t))})),be=!0}if(!n)if(be||De(),ge.length>1){var c=pe;i._showClone(e),i.options.animation&&!pe&&c&&ve.forEach((function(t){i.addAnimationState({target:t,rect:fe}),t.fromRect=fe,t.thisAnimationDuration=null}))}else i._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,o=t.activeSortable;if(ge.forEach((function(t){t.thisAnimationDuration=null})),o.options.animation&&!n&&o.multiDrag.isMultiDrag){fe=i({},e);var r=C(he,!0);fe.top-=r.f,fe.left-=r.e}},dragOverAnimationComplete:function(){be&&(be=!1,De())},drop:function(t){var e=t.originalEvent,n=t.rootEl,o=t.parentEl,i=t.sortable,r=t.dispatchSortableEvent,a=t.oldIndex,l=t.putSortable,s=l||this.sortable;if(e){var c=this.options,u=o.children;if(!ye)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),S(he,c.selectedClass,!~ge.indexOf(he)),~ge.indexOf(he))ge.splice(ge.indexOf(he),1),ue=null,U({sortable:i,rootEl:n,name:"deselect",targetEl:he,originalEvent:e});else{if(ge.push(he),U({sortable:i,rootEl:n,name:"select",targetEl:he,originalEvent:e}),e.shiftKey&&ue&&i.el.contains(ue)){var d,h,f=P(ue),p=P(he);if(~f&&~p&&f!==p)for(p>f?(h=f,d=p):(h=p,d=f+1);h<d;h++)~ge.indexOf(u[h])||(S(u[h],c.selectedClass,!0),ge.push(u[h]),U({sortable:i,rootEl:n,name:"select",targetEl:u[h],originalEvent:e}))}else ue=he;de=s}if(ye&&this.isMultiDrag){if(be=!1,(o[L].options.sort||o!==n)&&ge.length>1){var g=O(he),v=P(he,":not(."+this.options.selectedClass+")");if(!me&&c.animation&&(he.thisAnimationDuration=null),s.captureAnimationState(),!me&&(c.animation&&(he.fromRect=g,ge.forEach((function(t){if(t.thisAnimationDuration=null,t!==he){var e=be?O(t):g;t.fromRect=e,s.addAnimationState({target:t,rect:e})}}))),De(),ge.forEach((function(t){u[v]?o.insertBefore(t,u[v]):o.appendChild(t),v++})),a===P(he))){var m=!1;ge.forEach((function(t){t.sortableIndex===P(t)||(m=!0)})),m&&(r("update"),r("sort"))}ge.forEach((function(t){j(t)})),s.animateAll()}de=s}(n===o||l&&"clone"!==l.lastPutMode)&&ve.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=ye=!1,ve.length=0},destroyGlobal:function(){this._deselectMultiDrag(),m(document,"pointerup",this._deselectMultiDrag),m(document,"mouseup",this._deselectMultiDrag),m(document,"touchend",this._deselectMultiDrag),m(document,"keydown",this._checkKeyDown),m(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==ye&&ye||de!==this.sortable||t&&w(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;ge.length;){var e=ge[0];S(e,this.options.selectedClass,!1),ge.shift(),U({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},i(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[L];e&&e.options.multiDrag&&!~ge.indexOf(t)&&(de&&de!==e&&(de.multiDrag._deselectMultiDrag(),de=e),S(t,e.options.selectedClass,!0),ge.push(t))},deselect:function(t){var e=t.parentNode[L],n=ge.indexOf(t);e&&e.options.multiDrag&&~n&&(S(t,e.options.selectedClass,!1),ge.splice(n,1))}},eventProperties:function(){var t=this,e=[],n=[];return ge.forEach((function(o){var i;e.push({multiDragElement:o,index:o.sortableIndex}),i=be&&o!==he?-1:be?P(o,":not(."+t.options.selectedClass+")"):P(o),n.push({multiDragElement:o,index:i})})),{items:a(ge),clones:[].concat(ve),oldIndicies:e,newIndicies:n}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function Ee(t,e){ve.forEach((function(n,o){var i=e.children[n.sortableIndex+(t?Number(o):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}function De(){ge.forEach((function(t){t!==he&&t.parentNode&&t.parentNode.removeChild(t)}))}jt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):e.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?m(document,"dragover",this._handleAutoScroll):(m(document,"pointermove",this._handleFallbackAutoScroll),m(document,"touchmove",this._handleFallbackAutoScroll),m(document,"mousemove",this._handleFallbackAutoScroll)),oe(),ne(),clearTimeout(E),E=void 0},nulling:function(){Qt=Vt=qt=ee=Jt=Zt=$t=null,te.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(o,i);if(Qt=t,e||this.options.forceAutoScrollFallback||u||c||h){re(t,this.options,r,e);var a=R(r,!0);!ee||Jt&&o===Zt&&i===$t||(Jt&&oe(),Jt=setInterval((function(){var r=R(document.elementFromPoint(o,i),!0);r!==a&&(a=r,ne()),re(t,n.options,r,e)}),10),Zt=o,$t=i)}else{if(!this.options.bubbleScroll||R(r,!0)===x())return void ne();re(t,this.options,R(r,!1),!1)}}},i(t,{pluginName:"scroll",initializeByDefault:!0})}),jt.mount(se,le);export{we as MultiDrag,jt as Sortable,ce as Swap,jt as default};
7
+ function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function e(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach((function(t){o(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(){return i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},i.apply(this,arguments)}function r(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function a(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function s(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var c=s(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),u=s(/Edge/i),d=s(/firefox/i),h=s(/safari/i)&&!s(/chrome/i)&&!s(/android/i),f=s(/iP(ad|od|hone)/i),p=s(/chrome/i)&&s(/android/i),g={capture:!1,passive:!1};function v(t,e,n){t.addEventListener(e,n,!c&&g)}function m(t,e,n){t.removeEventListener(e,n,!c&&g)}function b(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function y(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function w(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&b(t,e):b(t,e))||o&&t===n)return t;if(t===n)break}while(t=y(t))}return null}var E,D=/\s+/g;function S(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(D," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(D," ")}}function _(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function C(t,e){var n="";if("string"==typeof t)n=t;else do{var o=_(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function T(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function x(){var t=document.scrollingElement;return t||document.documentElement}function O(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,a,l,s,u,d,h;if(t!==window&&t.parentNode&&t!==x()?(a=(r=t.getBoundingClientRect()).top,l=r.left,s=r.bottom,u=r.right,d=r.height,h=r.width):(a=0,l=0,s=window.innerHeight,u=window.innerWidth,d=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!c))do{if(i&&i.getBoundingClientRect&&("none"!==_(i,"transform")||n&&"static"!==_(i,"position"))){var f=i.getBoundingClientRect();a-=f.top+parseInt(_(i,"border-top-width")),l-=f.left+parseInt(_(i,"border-left-width")),s=a+r.height,u=l+r.width;break}}while(i=i.parentNode);if(o&&t!==window){var p=C(i||t),g=p&&p.a,v=p&&p.d;p&&(s=(a/=v)+(d/=v),u=(l/=g)+(h/=g))}return{top:a,left:l,bottom:s,right:u,width:h,height:d}}}function M(t,e,n){for(var o=k(t,!0),i=O(t)[e];o;){var r=O(o)[n];if(!("top"===n||"left"===n?i>=r:i<=r))return o;if(o===x())break;o=k(o,!1)}return!1}function A(t,e,n,o){for(var i=0,r=0,a=t.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==Ht.ghost&&(o||a[r]!==Ht.dragged)&&w(a[r],n.draggable,t,!1)){if(i===e)return a[r];i++}r++}return null}function N(t,e){for(var n=t.lastElementChild;n&&(n===Ht.ghost||"none"===_(n,"display")||e&&!b(n,e));)n=n.previousElementSibling;return n||null}function I(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Ht.clone||e&&!b(t,e)||n++;return n}function P(t){var e=0,n=0,o=x();if(t)do{var i=C(t),r=i.a,a=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*a}while(t!==o&&(t=t.parentNode));return[e,n]}function k(t,e){if(!t||!t.getBoundingClientRect)return x();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=_(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return x();if(o||e)return n;o=!0}}}while(n=n.parentNode);return x()}function R(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function X(t,e){return function(){if(!E){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),E=setTimeout((function(){E=void 0}),e)}}}function Y(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function B(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function F(t,e){_(t,"position","absolute"),_(t,"top",e.top),_(t,"left",e.left),_(t,"width",e.width),_(t,"height",e.height)}function j(t){_(t,"position",""),_(t,"top",""),_(t,"left",""),_(t,"width",""),_(t,"height","")}function H(t,e,n){var o={};return Array.from(t.children).forEach((function(i){var r,a,l,s;if(w(i,e.draggable,t,!1)&&!i.animated&&i!==n){var c=O(i);o.left=Math.min(null!==(r=o.left)&&void 0!==r?r:1/0,c.left),o.top=Math.min(null!==(a=o.top)&&void 0!==a?a:1/0,c.top),o.right=Math.max(null!==(l=o.right)&&void 0!==l?l:-1/0,c.right),o.bottom=Math.max(null!==(s=o.bottom)&&void 0!==s?s:-1/0,c.bottom)}})),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var L="Sortable"+(new Date).getTime();function K(){var t,n=[];return{captureAnimationState:function(){(n=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==_(t,"display")&&t!==Ht.ghost){n.push({target:t,rect:O(t)});var o=e({},n[n.length-1].rect);if(t.thisAnimationDuration){var i=C(t,!0);i&&(o.top-=i.f,o.left-=i.e)}t.fromRect=o}}))},addAnimationState:function(t){n.push(t)},removeAnimationState:function(t){n.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(n,{target:t}),1)},animateAll:function(e){var o=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof e&&e());var i=!1,r=0;n.forEach((function(t){var e=0,n=t.target,a=n.fromRect,l=O(n),s=n.prevFromRect,c=n.prevToRect,u=t.rect,d=C(n,!0);d&&(l.top-=d.f,l.left-=d.e),n.toRect=l,n.thisAnimationDuration&&R(s,l)&&!R(a,l)&&(u.top-l.top)/(u.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(e=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(u,s,c,o.options)),R(l,a)||(n.prevFromRect=a,n.prevToRect=l,e||(e=o.options.animation),o.animate(n,u,l,e)),e&&(i=!0,r=Math.max(r,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"==typeof e&&e()}),r):"function"==typeof e&&e(),n=[]},animate:function(t,e,n,o){if(o){_(t,"transition",""),_(t,"transform","");var i=C(this.el),r=i&&i.a,a=i&&i.d,l=(e.left-n.left)/(r||1),s=(e.top-n.top)/(a||1);t.animatingX=!!l,t.animatingY=!!s,_(t,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),_(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),_(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){_(t,"transition",""),_(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}}var W=[],z={initializeByDefault:!0},G={mount:function(t){for(var e in z)z.hasOwnProperty(e)&&!(e in t)&&(t[e]=z[e]);W.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),W.push(t)},pluginEvent:function(t,n,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var r=t+"Global";W.forEach((function(i){n[i.pluginName]&&(n[i.pluginName][r]&&n[i.pluginName][r](e({sortable:n},o)),n.options[i.pluginName]&&n[i.pluginName][t]&&n[i.pluginName][t](e({sortable:n},o)))}))},initializePlugins:function(t,e,n,o){for(var r in W.forEach((function(o){var r=o.pluginName;if(t.options[r]||o.initializeByDefault){var a=new o(t,e,t.options);a.sortable=t,a.options=t.options,t[r]=a,i(n,a.defaults)}})),t.options)if(t.options.hasOwnProperty(r)){var a=this.modifyOption(t,r,t.options[r]);void 0!==a&&(t.options[r]=a)}},getEventProperties:function(t,e){var n={};return W.forEach((function(o){"function"==typeof o.eventProperties&&i(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return W.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(o=i.optionListeners[e].call(t[i.pluginName],n))})),o}};function U(t){var n=t.sortable,o=t.rootEl,i=t.name,r=t.targetEl,a=t.cloneEl,l=t.toEl,s=t.fromEl,d=t.oldIndex,h=t.newIndex,f=t.oldDraggableIndex,p=t.newDraggableIndex,g=t.originalEvent,v=t.putSortable,m=t.extraEventProperties;if(n=n||o&&o[L]){var b,y=n.options,w="on"+i.charAt(0).toUpperCase()+i.substr(1);!window.CustomEvent||c||u?(b=document.createEvent("Event")).initEvent(i,!0,!0):b=new CustomEvent(i,{bubbles:!0,cancelable:!0}),b.to=l||o,b.from=s||o,b.item=r||o,b.clone=a,b.oldIndex=d,b.newIndex=h,b.oldDraggableIndex=f,b.newDraggableIndex=p,b.originalEvent=g,b.pullMode=v?v.lastPutMode:void 0;var E=e(e({},m),G.getEventProperties(i,n));for(var D in E)b[D]=E[D];o&&o.dispatchEvent(b),y[w]&&y[w].call(n,b)}}var q=["evt"],V=function(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.evt,a=r(o,q);G.pluginEvent.bind(Ht)(t,n,e({dragEl:$,parentEl:Q,ghostEl:J,rootEl:tt,nextEl:et,lastDownEl:nt,cloneEl:ot,cloneHidden:it,dragStarted:mt,putSortable:ut,activeSortable:Ht.active,originalEvent:i,oldIndex:rt,oldDraggableIndex:lt,newIndex:at,newDraggableIndex:st,hideGhostForTarget:Yt,unhideGhostForTarget:Bt,cloneNowHidden:function(){it=!0},cloneNowShown:function(){it=!1},dispatchSortableEvent:function(t){Z({sortable:n,name:t,originalEvent:i})}},a))};function Z(t){U(e({putSortable:ut,cloneEl:ot,targetEl:$,rootEl:tt,oldIndex:rt,oldDraggableIndex:lt,newIndex:at,newDraggableIndex:st},t))}var $,Q,J,tt,et,nt,ot,it,rt,at,lt,st,ct,ut,dt,ht,ft,pt,gt,vt,mt,bt,yt,wt,Et,Dt=!1,St=!1,_t=[],Ct=!1,Tt=!1,xt=[],Ot=!1,Mt=[],At="undefined"!=typeof document,Nt=f,It=u||c?"cssFloat":"float",Pt=At&&!p&&!f&&"draggable"in document.createElement("div"),kt=function(){if(At){if(c)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Rt=function(t,e){var n=_(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=A(t,0,e),r=A(t,1,e),a=i&&_(i),l=r&&_(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+O(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+O(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[It]||r&&"none"===n[It]&&s+c>o)?"vertical":"horizontal"},Xt=function(t){function e(t,n){return function(o,i,r,a){var l=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==t&&(n||l))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,a),n)(o,i,r,a);var s=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var o={},i=t.group;i&&"object"==n(i)||(i={name:i}),o.name=i.name,o.checkPull=e(i.pull,!0),o.checkPut=e(i.put),o.revertClone=i.revertClone,t.group=o},Yt=function(){!kt&&J&&_(J,"display","none")},Bt=function(){!kt&&J&&_(J,"display","")};At&&!p&&document.addEventListener("click",(function(t){if(St)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),St=!1,!1}),!0);var Ft=function(t){if($){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,r=t.clientY,_t.some((function(t){var e=t[L].options.emptyInsertThreshold;if(e&&!N(t)){var n=O(t),o=i>=n.left-e&&i<=n.right+e,l=r>=n.top-e&&r<=n.bottom+e;return o&&l?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[L]._onDragOver(n)}}var i,r,a},jt=function(t){$&&$.parentNode[L]._isOutsideThisEl(t.target)};function Ht(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=i({},e),t[L]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Rt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ht.supportPointer&&"PointerEvent"in window&&!h,emptyInsertThreshold:5};for(var o in G.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var r in Xt(e),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!e.forceFallback&&Pt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?v(t,"pointerdown",this._onTapStart):(v(t,"mousedown",this._onTapStart),v(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(t,"dragover",this),v(t,"dragenter",this)),_t.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),i(this,K())}function Lt(t,e,n,o,i,r,a,l){var s,d,h=t[L],f=h.options.onMove;return!window.CustomEvent||c||u?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||O(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),f&&(d=f.call(h,s,a)),d}function Kt(t){t.draggable=!1}function Wt(){Ot=!1}function zt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Gt(t){return setTimeout(t,0)}function Ut(t){return clearTimeout(t)}Ht.prototype={constructor:Ht,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(bt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,$):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(function(t){Mt.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Mt.push(o)}}(n),!$&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!h||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=w(l,o.draggable,n,!1))&&l.animated||nt===l)){if(rt=I(l),lt=I(l,o.draggable),"function"==typeof c){if(c.call(this,t,l,this))return Z({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),V("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=w(s,o.trim(),n,!1))return Z({sortable:e,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),V("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!w(s,o.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;if(n&&!$&&n.parentNode===r){var s=O(n);if(tt=r,Q=($=n).parentNode,et=$.nextSibling,nt=n,ct=a.group,Ht.dragged=$,dt={target:$,clientX:(e||t).clientX,clientY:(e||t).clientY},gt=dt.clientX-s.left,vt=dt.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,$.style["will-change"]="all",o=function(){V("delayEnded",i,{evt:t}),Ht.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!d&&i.nativeDraggable&&($.draggable=!0),i._triggerDragStart(t,e),Z({sortable:i,name:"choose",originalEvent:t}),S($,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){T($,t.trim(),Kt)})),v(l,"dragover",Ft),v(l,"mousemove",Ft),v(l,"touchmove",Ft),v(l,"mouseup",i._onDrop),v(l,"touchend",i._onDrop),v(l,"touchcancel",i._onDrop),d&&this.nativeDraggable&&(this.options.touchStartThreshold=4,$.draggable=!0),V("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(u||c))o();else{if(Ht.eventCanceled)return void this._onDrop();v(l,"mouseup",i._disableDelayedDrag),v(l,"touchend",i._disableDelayedDrag),v(l,"touchcancel",i._disableDelayedDrag),v(l,"mousemove",i._delayedDragTouchMoveHandler),v(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&v(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){$&&Kt($),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._disableDelayedDrag),m(t,"touchend",this._disableDelayedDrag),m(t,"touchcancel",this._disableDelayedDrag),m(t,"mousemove",this._delayedDragTouchMoveHandler),m(t,"touchmove",this._delayedDragTouchMoveHandler),m(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):v(document,e?"touchmove":"mousemove",this._onTouchMove):(v($,"dragend",this),v(tt,"dragstart",this._onDragStart));try{document.selection?Gt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(Dt=!1,tt&&$){V("dragStarted",this,{evt:e}),this.nativeDraggable&&v(document,"dragover",jt);var n=this.options;!t&&S($,n.dragClass,!1),S($,n.ghostClass,!0),Ht.active=this,t&&this._appendGhost(),Z({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ht){this._lastX=ht.clientX,this._lastY=ht.clientY,Yt();for(var t=document.elementFromPoint(ht.clientX,ht.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ht.clientX,ht.clientY))!==e;)e=t;if($.parentNode[L]._isOutsideThisEl(t),e)do{if(e[L]){if(e[L]._onDragOver({clientX:ht.clientX,clientY:ht.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Bt()}},_onTouchMove:function(t){if(dt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=J&&C(J,!0),a=J&&r&&r.a,l=J&&r&&r.d,s=Nt&&Et&&P(Et),c=(i.clientX-dt.clientX+o.x)/(a||1)+(s?s[0]-xt[0]:0)/(a||1),u=(i.clientY-dt.clientY+o.y)/(l||1)+(s?s[1]-xt[1]:0)/(l||1);if(!Ht.active&&!Dt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(J){r?(r.e+=c-(ft||0),r.f+=u-(pt||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");_(J,"webkitTransform",d),_(J,"mozTransform",d),_(J,"msTransform",d),_(J,"transform",d),ft=c,pt=u,ht=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!J){var t=this.options.fallbackOnBody?document.body:tt,e=O($,!0,Nt,!0,t),n=this.options;if(Nt){for(Et=t;"static"===_(Et,"position")&&"none"===_(Et,"transform")&&Et!==document;)Et=Et.parentNode;Et!==document.body&&Et!==document.documentElement?(Et===document&&(Et=x()),e.top+=Et.scrollTop,e.left+=Et.scrollLeft):Et=x(),xt=P(Et)}S(J=$.cloneNode(!0),n.ghostClass,!1),S(J,n.fallbackClass,!0),S(J,n.dragClass,!0),_(J,"transition",""),_(J,"transform",""),_(J,"box-sizing","border-box"),_(J,"margin",0),_(J,"top",e.top),_(J,"left",e.left),_(J,"width",e.width),_(J,"height",e.height),_(J,"opacity","0.8"),_(J,"position",Nt?"absolute":"fixed"),_(J,"zIndex","100000"),_(J,"pointerEvents","none"),Ht.ghost=J,t.appendChild(J),_(J,"transform-origin",gt/parseInt(J.style.width)*100+"% "+vt/parseInt(J.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;V("dragStart",this,{evt:t}),Ht.eventCanceled?this._onDrop():(V("setupClone",this),Ht.eventCanceled||((ot=B($)).removeAttribute("id"),ot.draggable=!1,ot.style["will-change"]="",this._hideClone(),S(ot,this.options.chosenClass,!1),Ht.clone=ot),n.cloneId=Gt((function(){V("clone",n),Ht.eventCanceled||(n.options.removeCloneOnHide||tt.insertBefore(ot,$),n._hideClone(),Z({sortable:n,name:"clone"}))})),!e&&S($,i.dragClass,!0),e?(St=!0,n._loopId=setInterval(n._emulateDragOver,50)):(m(document,"mouseup",n._onDrop),m(document,"touchend",n._onDrop),m(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,$)),v(document,"drop",n),_($,"transform","translateZ(0)")),Dt=!0,n._dragStartId=Gt(n._dragStarted.bind(n,e,t)),v(document,"selectstart",n),mt=!0,h&&_(document.body,"user-select","none"))},_onDragOver:function(t){var n,o,i,r,a=this.el,l=t.target,s=this.options,c=s.group,u=Ht.active,d=ct===c,h=s.sort,f=ut||u,p=this,g=!1;if(!Ot){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),l=w(l,s.draggable,a,!0),F("dragOver"),Ht.eventCanceled)return g;if($.contains(t.target)||l.animated&&l.animatingX&&l.animatingY||p._ignoreWhileAnimating===l)return K(!1);if(St=!1,u&&!s.disabled&&(d?h||(i=Q!==tt):ut===this||(this.lastPutMode=ct.checkPull(this,u,$,t))&&c.checkPut(this,u,$,t))){if(r="vertical"===this._getDirection(t,l),n=O($),F("dragOverValid"),Ht.eventCanceled)return g;if(i)return Q=tt,j(),this._hideClone(),F("revert"),Ht.eventCanceled||(et?tt.insertBefore($,et):tt.appendChild($)),K(!0);var v=N(a,s.draggable);if(!v||function(t,e,n){var o=O(N(n.el,n.options.draggable)),i=H(n.el,n.options,J),r=10;return e?t.clientX>i.right+r||t.clientY>o.bottom&&t.clientX>o.left:t.clientY>i.bottom+r||t.clientX>o.right&&t.clientY>o.top}(t,r,this)&&!v.animated){if(v===$)return K(!1);if(v&&a===t.target&&(l=v),l&&(o=O(l)),!1!==Lt(tt,a,$,n,l,o,t,!!l))return j(),v&&v.nextSibling?a.insertBefore($,v.nextSibling):a.appendChild($),Q=a,W(),K(!0)}else if(v&&function(t,e,n){var o=O(A(n.el,0,n.options,!0)),i=H(n.el,n.options,J),r=10;return e?t.clientX<i.left-r||t.clientY<o.top&&t.clientX<o.right:t.clientY<i.top-r||t.clientY<o.bottom&&t.clientX<o.left}(t,r,this)){var m=A(a,0,s,!0);if(m===$)return K(!1);if(o=O(l=m),!1!==Lt(tt,a,$,n,l,o,t,!1))return j(),a.insertBefore($,m),Q=a,W(),K(!0)}else if(l.parentNode===a){o=O(l);var b,y,E,D=$.parentNode!==a,C=!function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,r=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,s=n?e.width:e.height;return o===a||i===l||o+r/2===a+s/2}($.animated&&$.toRect||n,l.animated&&l.toRect||o,r),T=r?"top":"left",x=M(l,"top","top")||M($,"top","top"),P=x?x.scrollTop:void 0;if(bt!==l&&(y=o[T],Ct=!1,Tt=!C&&s.invertSwap||D),b=function(t,e,n,o,i,r,a,l){var s=o?t.clientY:t.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,h=!1;if(!a)if(l&&wt<c*i){if(!Ct&&(1===yt?s>u+c*r/2:s<d-c*r/2)&&(Ct=!0),Ct)h=!0;else if(1===yt?s<u+wt:s>d-wt)return-yt}else if(s>u+c*(1-i)/2&&s<d-c*(1-i)/2)return function(t){return I($)<I(t)?1:-1}(e);if((h=h||a)&&(s<u+c*r/2||s>d-c*r/2))return s>u+c/2?1:-1;return 0}(t,l,o,r,C?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Tt,bt===l),0!==b){var k=I($);do{k-=b,E=Q.children[k]}while(E&&("none"===_(E,"display")||E===J))}if(0===b||E===l)return K(!1);bt=l,yt=b;var R=l.nextElementSibling,X=!1,B=Lt(tt,a,$,n,l,o,t,X=1===b);if(!1!==B)return 1!==B&&-1!==B||(X=1===B),Ot=!0,setTimeout(Wt,30),j(),X&&!R?a.appendChild($):l.parentNode.insertBefore($,X?R:l),x&&Y(x,0,P-x.scrollTop),Q=$.parentNode,void 0===y||Tt||(wt=Math.abs(y-O(l)[T])),W(),K(!0)}if(a.contains($))return K(!1)}return!1}function F(s,c){V(s,p,e({evt:t,isOwner:d,axis:r?"vertical":"horizontal",revert:i,dragRect:n,targetRect:o,canSort:h,fromSortable:f,target:l,completed:K,onMove:function(e,o){return Lt(tt,a,$,n,e,O(e),t,o)},changed:W},c))}function j(){F("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function K(e){return F("dragOverCompleted",{insertion:e}),e&&(d?u._hideClone():u._showClone(p),p!==f&&(S($,ut?ut.options.ghostClass:u.options.ghostClass,!1),S($,s.ghostClass,!0)),ut!==p&&p!==Ht.active?ut=p:p===Ht.active&&ut&&(ut=null),f===p&&(p._ignoreWhileAnimating=l),p.animateAll((function(){F("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(l===$&&!$.animated||l===a&&!l.animated)&&(bt=null),s.dragoverBubble||t.rootEl||l===document||($.parentNode[L]._isOutsideThisEl(t.target),!e&&Ft(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function W(){at=I($),st=I($,s.draggable),Z({sortable:p,name:"change",toEl:a,newIndex:at,newDraggableIndex:st,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){m(document,"mousemove",this._onTouchMove),m(document,"touchmove",this._onTouchMove),m(document,"pointermove",this._onTouchMove),m(document,"dragover",Ft),m(document,"mousemove",Ft),m(document,"touchmove",Ft)},_offUpEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._onDrop),m(t,"touchend",this._onDrop),m(t,"pointerup",this._onDrop),m(t,"touchcancel",this._onDrop),m(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;at=I($),st=I($,n.draggable),V("drop",this,{evt:t}),Q=$&&$.parentNode,at=I($),st=I($,n.draggable),Ht.eventCanceled||(Dt=!1,Tt=!1,Ct=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ut(this.cloneId),Ut(this._dragStartId),this.nativeDraggable&&(m(document,"drop",this),m(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),h&&_(document.body,"user-select",""),_($,"transform",""),t&&(mt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),J&&J.parentNode&&J.parentNode.removeChild(J),(tt===Q||ut&&"clone"!==ut.lastPutMode)&&ot&&ot.parentNode&&ot.parentNode.removeChild(ot),$&&(this.nativeDraggable&&m($,"dragend",this),Kt($),$.style["will-change"]="",mt&&!Dt&&S($,ut?ut.options.ghostClass:this.options.ghostClass,!1),S($,this.options.chosenClass,!1),Z({sortable:this,name:"unchoose",toEl:Q,newIndex:null,newDraggableIndex:null,originalEvent:t}),tt!==Q?(at>=0&&(Z({rootEl:Q,name:"add",toEl:Q,fromEl:tt,originalEvent:t}),Z({sortable:this,name:"remove",toEl:Q,originalEvent:t}),Z({rootEl:Q,name:"sort",toEl:Q,fromEl:tt,originalEvent:t}),Z({sortable:this,name:"sort",toEl:Q,originalEvent:t})),ut&&ut.save()):at!==rt&&at>=0&&(Z({sortable:this,name:"update",toEl:Q,originalEvent:t}),Z({sortable:this,name:"sort",toEl:Q,originalEvent:t})),Ht.active&&(null!=at&&-1!==at||(at=rt,st=lt),Z({sortable:this,name:"end",toEl:Q,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){V("nulling",this),tt=$=Q=J=et=ot=nt=it=dt=ht=mt=at=st=rt=lt=bt=yt=ut=ct=Ht.dragged=Ht.ghost=Ht.clone=Ht.active=null,Mt.forEach((function(t){t.checked=!0})),Mt.length=ft=pt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":$&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)w(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||zt(t));return e},sort:function(t,e){var n={},o=this.el;this.toArray().forEach((function(t,e){var i=o.children[e];w(i,this.options.draggable,o,!1)&&(n[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(o.removeChild(n[t]),o.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return w(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=G.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&Xt(n)},destroy:function(){V("destroy",this);var t=this.el;t[L]=null,m(t,"mousedown",this._onTapStart),m(t,"touchstart",this._onTapStart),m(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(m(t,"dragover",this),m(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),_t.splice(_t.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!it){if(V("hideClone",this),Ht.eventCanceled)return;_(ot,"display","none"),this.options.removeCloneOnHide&&ot.parentNode&&ot.parentNode.removeChild(ot),it=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(it){if(V("showClone",this),Ht.eventCanceled)return;$.parentNode!=tt||this.options.group.revertClone?et?tt.insertBefore(ot,et):tt.appendChild(ot):tt.insertBefore(ot,$),this.options.group.revertClone&&this.animate($,ot),_(ot,"display",""),it=!1}}else this._hideClone()}},At&&v(document,"touchmove",(function(t){(Ht.active||Dt)&&t.cancelable&&t.preventDefault()})),Ht.utils={on:v,off:m,css:_,find:T,is:function(t,e){return!!w(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:X,closest:w,toggleClass:S,clone:B,index:I,nextTick:Gt,cancelNextTick:Ut,detectDirection:Rt,getChild:A},Ht.get=function(t){return t[L]},Ht.mount=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];n[0].constructor===Array&&(n=n[0]),n.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Ht.utils=e(e({},Ht.utils),t.utils)),G.mount(t)}))},Ht.create=function(t,e){return new Ht(t,e)},Ht.version="1.15.2";var qt,Vt,Zt,$t,Qt,Jt,te=[],ee=!1;function ne(){te.forEach((function(t){clearInterval(t.pid)})),te=[]}function oe(){clearInterval(Jt)}var ie,re=X((function(t,e,n,o){if(e.scroll){var i,r=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,c=x(),u=!1;Vt!==n&&(Vt=n,ne(),qt=e.scroll,i=e.scrollFn,!0===qt&&(qt=k(n,!0)));var d=0,h=qt;do{var f=h,p=O(f),g=p.top,v=p.bottom,m=p.left,b=p.right,y=p.width,w=p.height,E=void 0,D=void 0,S=f.scrollWidth,C=f.scrollHeight,T=_(f),M=f.scrollLeft,A=f.scrollTop;f===c?(E=y<S&&("auto"===T.overflowX||"scroll"===T.overflowX||"visible"===T.overflowX),D=w<C&&("auto"===T.overflowY||"scroll"===T.overflowY||"visible"===T.overflowY)):(E=y<S&&("auto"===T.overflowX||"scroll"===T.overflowX),D=w<C&&("auto"===T.overflowY||"scroll"===T.overflowY));var N=E&&(Math.abs(b-r)<=l&&M+y<S)-(Math.abs(m-r)<=l&&!!M),I=D&&(Math.abs(v-a)<=l&&A+w<C)-(Math.abs(g-a)<=l&&!!A);if(!te[d])for(var P=0;P<=d;P++)te[P]||(te[P]={});te[d].vx==N&&te[d].vy==I&&te[d].el===f||(te[d].el=f,te[d].vx=N,te[d].vy=I,clearInterval(te[d].pid),0==N&&0==I||(u=!0,te[d].pid=setInterval(function(){o&&0===this.layer&&Ht.active._onTouchMove(Qt);var e=te[this.layer].vy?te[this.layer].vy*s:0,n=te[this.layer].vx?te[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(Ht.dragged.parentNode[L],n,e,t,Qt,te[this.layer].el)||Y(te[this.layer].el,n,e)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&h!==c&&(h=k(h,!1)));ee=u}}),30),ae=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var s=n||i;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function le(){}function se(){}function ce(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){var e=t.dragEl;ie=e},dragOverValid:function(t){var e=t.completed,n=t.target,o=t.onMove,i=t.activeSortable,r=t.changed,a=t.cancel;if(i.options.swap){var l=this.sortable.el,s=this.options;if(n&&n!==l){var c=ie;!1!==o(n)?(S(n,s.swapClass,!0),ie=n):ie=null,c&&c!==ie&&S(c,s.swapClass,!1)}r(),e(!0),a()}},drop:function(t){var e=t.activeSortable,n=t.putSortable,o=t.dragEl,i=n||this.sortable,r=this.options;ie&&S(ie,r.swapClass,!1),ie&&(r.swap||n&&n.options.swap)&&o!==ie&&(i.captureAnimationState(),i!==e&&e.captureAnimationState(),function(t,e){var n,o,i=t.parentNode,r=e.parentNode;if(!i||!r||i.isEqualNode(e)||r.isEqualNode(t))return;n=I(t),o=I(e),i.isEqualNode(r)&&n<o&&o++;i.insertBefore(e,i.children[n]),r.insertBefore(t,r.children[o])}(o,ie),i.animateAll(),i!==e&&e.animateAll())},nulling:function(){ie=null}},i(t,{pluginName:"swap",eventProperties:function(){return{swapItem:ie}}})}le.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=A(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:ae},i(le,{pluginName:"revertOnSpill"}),se.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:ae},i(se,{pluginName:"removeOnSpill"});var ue,de,he,fe,pe,ge=[],ve=[],me=!1,be=!1,ye=!1;function we(){function t(t){for(var e in this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this));t.options.avoidImplicitDeselect||(t.options.supportPointer?v(document,"pointerup",this._deselectMultiDrag):(v(document,"mouseup",this._deselectMultiDrag),v(document,"touchend",this._deselectMultiDrag))),v(document,"keydown",this._checkKeyDown),v(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(e,n){var o="";ge.length&&de===t?ge.forEach((function(t,e){o+=(e?", ":"")+t.textContent})):o=n.textContent,e.setData("Text",o)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var e=t.dragEl;he=e},delayEnded:function(){this.isMultiDrag=~ge.indexOf(he)},setupClone:function(t){var e=t.sortable,n=t.cancel;if(this.isMultiDrag){for(var o=0;o<ge.length;o++)ve.push(B(ge[o])),ve[o].sortableIndex=ge[o].sortableIndex,ve[o].draggable=!1,ve[o].style["will-change"]="",S(ve[o],this.options.selectedClass,!1),ge[o]===he&&S(ve[o],this.options.chosenClass,!1);e._hideClone(),n()}},clone:function(t){var e=t.sortable,n=t.rootEl,o=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||ge.length&&de===e&&(Ee(!0,n),o("clone"),i()))},showClone:function(t){var e=t.cloneNowShown,n=t.rootEl,o=t.cancel;this.isMultiDrag&&(Ee(!1,n),ve.forEach((function(t){_(t,"display","")})),e(),pe=!1,o())},hideClone:function(t){var e=this;t.sortable;var n=t.cloneNowHidden,o=t.cancel;this.isMultiDrag&&(ve.forEach((function(t){_(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)})),n(),pe=!0,o())},dragStartGlobal:function(t){t.sortable,!this.isMultiDrag&&de&&de.multiDrag._deselectMultiDrag(),ge.forEach((function(t){t.sortableIndex=I(t)})),ge=ge.sort((function(t,e){return t.sortableIndex-e.sortableIndex})),ye=!0},dragStarted:function(t){var e=this,n=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){ge.forEach((function(t){t!==he&&_(t,"position","absolute")}));var o=O(he,!1,!0,!0);ge.forEach((function(t){t!==he&&F(t,o)})),be=!0,me=!0}n.animateAll((function(){be=!1,me=!1,e.options.animation&&ge.forEach((function(t){j(t)})),e.options.sort&&De()}))}},dragOver:function(t){var e=t.target,n=t.completed,o=t.cancel;be&&~ge.indexOf(e)&&(n(!1),o())},revert:function(t){var e=t.fromSortable,n=t.rootEl,o=t.sortable,i=t.dragRect;ge.length>1&&(ge.forEach((function(t){o.addAnimationState({target:t,rect:be?O(t):i}),j(t),t.fromRect=i,e.removeAnimationState(t)})),be=!1,function(t,e){ge.forEach((function(n,o){var i=e.children[n.sortableIndex+(t?Number(o):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(t){var e=t.sortable,n=t.isOwner,o=t.insertion,i=t.activeSortable,r=t.parentEl,a=t.putSortable,l=this.options;if(o){if(n&&i._hideClone(),me=!1,l.animation&&ge.length>1&&(be||!n&&!i.options.sort&&!a)){var s=O(he,!1,!0,!0);ge.forEach((function(t){t!==he&&(F(t,s),r.appendChild(t))})),be=!0}if(!n)if(be||De(),ge.length>1){var c=pe;i._showClone(e),i.options.animation&&!pe&&c&&ve.forEach((function(t){i.addAnimationState({target:t,rect:fe}),t.fromRect=fe,t.thisAnimationDuration=null}))}else i._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,o=t.activeSortable;if(ge.forEach((function(t){t.thisAnimationDuration=null})),o.options.animation&&!n&&o.multiDrag.isMultiDrag){fe=i({},e);var r=C(he,!0);fe.top-=r.f,fe.left-=r.e}},dragOverAnimationComplete:function(){be&&(be=!1,De())},drop:function(t){var e=t.originalEvent,n=t.rootEl,o=t.parentEl,i=t.sortable,r=t.dispatchSortableEvent,a=t.oldIndex,l=t.putSortable,s=l||this.sortable;if(e){var c=this.options,u=o.children;if(!ye)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),S(he,c.selectedClass,!~ge.indexOf(he)),~ge.indexOf(he))ge.splice(ge.indexOf(he),1),ue=null,U({sortable:i,rootEl:n,name:"deselect",targetEl:he,originalEvent:e});else{if(ge.push(he),U({sortable:i,rootEl:n,name:"select",targetEl:he,originalEvent:e}),e.shiftKey&&ue&&i.el.contains(ue)){var d,h,f=I(ue),p=I(he);if(~f&&~p&&f!==p)for(p>f?(h=f,d=p):(h=p,d=f+1);h<d;h++)~ge.indexOf(u[h])||(S(u[h],c.selectedClass,!0),ge.push(u[h]),U({sortable:i,rootEl:n,name:"select",targetEl:u[h],originalEvent:e}))}else ue=he;de=s}if(ye&&this.isMultiDrag){if(be=!1,(o[L].options.sort||o!==n)&&ge.length>1){var g=O(he),v=I(he,":not(."+this.options.selectedClass+")");if(!me&&c.animation&&(he.thisAnimationDuration=null),s.captureAnimationState(),!me&&(c.animation&&(he.fromRect=g,ge.forEach((function(t){if(t.thisAnimationDuration=null,t!==he){var e=be?O(t):g;t.fromRect=e,s.addAnimationState({target:t,rect:e})}}))),De(),ge.forEach((function(t){u[v]?o.insertBefore(t,u[v]):o.appendChild(t),v++})),a===I(he))){var m=!1;ge.forEach((function(t){t.sortableIndex===I(t)||(m=!0)})),m&&(r("update"),r("sort"))}ge.forEach((function(t){j(t)})),s.animateAll()}de=s}(n===o||l&&"clone"!==l.lastPutMode)&&ve.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=ye=!1,ve.length=0},destroyGlobal:function(){this._deselectMultiDrag(),m(document,"pointerup",this._deselectMultiDrag),m(document,"mouseup",this._deselectMultiDrag),m(document,"touchend",this._deselectMultiDrag),m(document,"keydown",this._checkKeyDown),m(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==ye&&ye||de!==this.sortable||t&&w(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;ge.length;){var e=ge[0];S(e,this.options.selectedClass,!1),ge.shift(),U({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},i(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[L];e&&e.options.multiDrag&&!~ge.indexOf(t)&&(de&&de!==e&&(de.multiDrag._deselectMultiDrag(),de=e),S(t,e.options.selectedClass,!0),ge.push(t))},deselect:function(t){var e=t.parentNode[L],n=ge.indexOf(t);e&&e.options.multiDrag&&~n&&(S(t,e.options.selectedClass,!1),ge.splice(n,1))}},eventProperties:function(){var t=this,e=[],n=[];return ge.forEach((function(o){var i;e.push({multiDragElement:o,index:o.sortableIndex}),i=be&&o!==he?-1:be?I(o,":not(."+t.options.selectedClass+")"):I(o),n.push({multiDragElement:o,index:i})})),{items:a(ge),clones:[].concat(ve),oldIndicies:e,newIndicies:n}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function Ee(t,e){ve.forEach((function(n,o){var i=e.children[n.sortableIndex+(t?Number(o):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}function De(){ge.forEach((function(t){t!==he&&t.parentNode&&t.parentNode.removeChild(t)}))}Ht.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):e.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?m(document,"dragover",this._handleAutoScroll):(m(document,"pointermove",this._handleFallbackAutoScroll),m(document,"touchmove",this._handleFallbackAutoScroll),m(document,"mousemove",this._handleFallbackAutoScroll)),oe(),ne(),clearTimeout(E),E=void 0},nulling:function(){Qt=Vt=qt=ee=Jt=Zt=$t=null,te.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(o,i);if(Qt=t,e||this.options.forceAutoScrollFallback||u||c||h){re(t,this.options,r,e);var a=k(r,!0);!ee||Jt&&o===Zt&&i===$t||(Jt&&oe(),Jt=setInterval((function(){var r=k(document.elementFromPoint(o,i),!0);r!==a&&(a=r,ne()),re(t,n.options,r,e)}),10),Zt=o,$t=i)}else{if(!this.options.bubbleScroll||k(r,!0)===x())return void ne();re(t,this.options,k(r,!1),!1)}}},i(t,{pluginName:"scroll",initializeByDefault:!0})}),Ht.mount(se,le);export{we as MultiDrag,Ht as Sortable,ce as Swap,Ht as default};
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.0.pre.rc1
4
+ version: 7.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2024-01-15 00:00:00.000000000 Z
16
+ date: 2024-01-25 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: actionmailer