From c6e5b4a385811d96775b71c379558d975cfb6232 Mon Sep 17 00:00:00 2001 From: Thomas Brouard Date: Tue, 24 May 2022 09:16:18 +0200 Subject: [PATCH] Move from dragula to sortablejs --- dist/electron-tabs.draggable.js | 3352 ++++++++++++++++++++------- dist/electron-tabs.draggable.js.map | 2 +- dist/electron-tabs.js | 20 +- dist/electron-tabs.js.map | 2 +- package-lock.json | 53 +- package.json | 4 +- src/draggable.js | 12 +- src/index.js | 20 +- 8 files changed, 2552 insertions(+), 913 deletions(-) diff --git a/dist/electron-tabs.draggable.js b/dist/electron-tabs.draggable.js index c38cf0d..98b5014 100644 --- a/dist/electron-tabs.draggable.js +++ b/dist/electron-tabs.draggable.js @@ -527,820 +527,12 @@ function hmrAcceptRun(bundle, id) { },{}],"1qqD7":[function(require,module,exports) { var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); -var _dragula = require("dragula"); -var _dragulaDefault = parcelHelpers.interopDefault(_dragula); +var _sortablejs = require("sortablejs"); +var _sortablejsDefault = parcelHelpers.interopDefault(_sortablejs); var _indexJs = require("./index.js"); -var _dragulaCss = require("dragula/dist/dragula.css"); -var _dragulaCssDefault = parcelHelpers.interopDefault(_dragulaCss); -window.dragula = _dragulaDefault.default; -// Inject styles -(function() { - let styleTag = document.createElement("style"); - styleTag.innerHTML = _dragulaCssDefault.default; - document.getElementsByTagName("head")[0].appendChild(styleTag); -})(); +window.Sortable = _sortablejsDefault.default; -},{"dragula":"1Ls2r","./index.js":"8lqZg","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3","dragula/dist/dragula.css":"giGox"}],"1Ls2r":[function(require,module,exports) { -'use strict'; -var global = arguments[3]; -var emitter = require('contra/emitter'); -var crossvent = require('crossvent'); -var classes = require('./classes'); -var doc = document; -var documentElement = doc.documentElement; -function dragula(initialContainers, options) { - var len1 = arguments.length; - if (len1 === 1 && Array.isArray(initialContainers) === false) { - options = initialContainers; - initialContainers = []; - } - var _mirror; // mirror image - var _source; // source container - var _item; // item being dragged - var _offsetX; // reference x - var _offsetY; // reference y - var _moveX; // reference move x - var _moveY; // reference move y - var _initialSibling; // reference sibling when grabbed - var _currentSibling; // reference sibling now - var _copy; // item used for copying - var _renderTimer; // timer for setTimeout renderMirrorImage - var _lastDropTarget = null; // last container item was over - var _grabbed; // holds mousedown context until first mousemove - var o = options || {}; - if (o.moves === void 0) o.moves = always; - if (o.accepts === void 0) o.accepts = always; - if (o.invalid === void 0) o.invalid = invalidTarget; - if (o.containers === void 0) o.containers = initialContainers || []; - if (o.isContainer === void 0) o.isContainer = never; - if (o.copy === void 0) o.copy = false; - if (o.copySortSource === void 0) o.copySortSource = false; - if (o.revertOnSpill === void 0) o.revertOnSpill = false; - if (o.removeOnSpill === void 0) o.removeOnSpill = false; - if (o.direction === void 0) o.direction = 'vertical'; - if (o.ignoreInputTextSelection === void 0) o.ignoreInputTextSelection = true; - if (o.mirrorContainer === void 0) o.mirrorContainer = doc.body; - var drake = emitter({ - containers: o.containers, - start: manualStart, - end: end, - cancel: cancel, - remove: remove1, - destroy: destroy, - canMove: canMove, - dragging: false - }); - if (o.removeOnSpill === true) drake.on('over', spillOver).on('out', spillOut); - events(); - return drake; - function isContainer(el) { - return drake.containers.indexOf(el) !== -1 || o.isContainer(el); - } - function events(remove) { - var op = remove ? 'remove' : 'add'; - touchy(documentElement, op, 'mousedown', grab); - touchy(documentElement, op, 'mouseup', release); - } - function eventualMovements(remove) { - var op = remove ? 'remove' : 'add'; - touchy(documentElement, op, 'mousemove', startBecauseMouseMoved); - } - function movements(remove) { - var op = remove ? 'remove' : 'add'; - crossvent[op](documentElement, 'selectstart', preventGrabbed); // IE8 - crossvent[op](documentElement, 'click', preventGrabbed); - } - function destroy() { - events(true); - release({}); - } - function preventGrabbed(e) { - if (_grabbed) { - e.preventDefault(); - } - } - function grab(e) { - _moveX = e.clientX; - _moveY = e.clientY; - var ignore = whichMouseButton(e) !== 1 || e.metaKey || e.ctrlKey; - if (ignore) { - return; // we only care about honest-to-god left clicks and touch events - } - var item = e.target; - var context = canStart(item); - if (!context) { - return; - } - _grabbed = context; - eventualMovements(); - if (e.type === 'mousedown') { - if (isInput(item)) { - item.focus(); // fixes https://github.com/bevacqua/dragula/issues/176 - } else { - e.preventDefault(); // fixes https://github.com/bevacqua/dragula/issues/155 - } - } - } - function startBecauseMouseMoved(e) { - if (!_grabbed) { - return; - } - if (whichMouseButton(e) === 0) { - release({}); - return; // when text is selected on an input and then dragged, mouseup doesn't fire. this is our only hope - } - // truthy check fixes #239, equality fixes #207, fixes #501 - if (e.clientX !== void 0 && Math.abs(e.clientX - _moveX) <= (o.slideFactorX || 0) && e.clientY !== void 0 && Math.abs(e.clientY - _moveY) <= (o.slideFactorY || 0)) { - return; - } - if (o.ignoreInputTextSelection) { - var clientX = getCoord('clientX', e) || 0; - var clientY = getCoord('clientY', e) || 0; - var elementBehindCursor = doc.elementFromPoint(clientX, clientY); - if (isInput(elementBehindCursor)) { - return; - } - } - var grabbed = _grabbed; // call to end() unsets _grabbed - eventualMovements(true); - movements(); - end(); - start(grabbed); - var offset = getOffset(_item); - _offsetX = getCoord('pageX', e) - offset.left; - _offsetY = getCoord('pageY', e) - offset.top; - classes.add(_copy || _item, 'gu-transit'); - renderMirrorImage(); - drag(e); - } - function canStart(item) { - if (drake.dragging && _mirror) { - return; - } - if (isContainer(item)) { - return; // don't drag container itself - } - var handle = item; - while(getParent(item) && isContainer(getParent(item)) === false){ - if (o.invalid(item, handle)) { - return; - } - item = getParent(item); // drag target should be a top element - if (!item) { - return; - } - } - var source = getParent(item); - if (!source) { - return; - } - if (o.invalid(item, handle)) { - return; - } - var movable = o.moves(item, source, handle, nextEl(item)); - if (!movable) { - return; - } - return { - item: item, - source: source - }; - } - function canMove(item) { - return !!canStart(item); - } - function manualStart(item) { - var context = canStart(item); - if (context) { - start(context); - } - } - function start(context) { - if (isCopy(context.item, context.source)) { - _copy = context.item.cloneNode(true); - drake.emit('cloned', _copy, context.item, 'copy'); - } - _source = context.source; - _item = context.item; - _initialSibling = _currentSibling = nextEl(context.item); - drake.dragging = true; - drake.emit('drag', _item, _source); - } - function invalidTarget() { - return false; - } - function end() { - if (!drake.dragging) { - return; - } - var item = _copy || _item; - drop(item, getParent(item)); - } - function ungrab() { - _grabbed = false; - eventualMovements(true); - movements(true); - } - function release(e) { - ungrab(); - if (!drake.dragging) { - return; - } - var item = _copy || _item; - var clientX = getCoord('clientX', e) || 0; - var clientY = getCoord('clientY', e) || 0; - var elementBehindCursor = getElementBehindPoint(_mirror, clientX, clientY); - var dropTarget = findDropTarget(elementBehindCursor, clientX, clientY); - if (dropTarget && (_copy && o.copySortSource || !_copy || dropTarget !== _source)) { - drop(item, dropTarget); - } else if (o.removeOnSpill) { - remove1(); - } else { - cancel(); - } - } - function drop(item, target) { - var parent = getParent(item); - if (_copy && o.copySortSource && target === _source) { - parent.removeChild(_item); - } - if (isInitialPlacement(target)) { - drake.emit('cancel', item, _source, _source); - } else { - drake.emit('drop', item, target, _source, _currentSibling); - } - cleanup(); - } - function remove1() { - if (!drake.dragging) { - return; - } - var item = _copy || _item; - var parent = getParent(item); - if (parent) { - parent.removeChild(item); - } - drake.emit(_copy ? 'cancel' : 'remove', item, parent, _source); - cleanup(); - } - function cancel(revert) { - if (!drake.dragging) { - return; - } - var reverts = arguments.length > 0 ? revert : o.revertOnSpill; - var item = _copy || _item; - var parent = getParent(item); - var initial = isInitialPlacement(parent); - if (initial === false && reverts) { - if (_copy) { - if (parent) { - parent.removeChild(_copy); - } - } else { - _source.insertBefore(item, _initialSibling); - } - } - if (initial || reverts) { - drake.emit('cancel', item, _source, _source); - } else { - drake.emit('drop', item, parent, _source, _currentSibling); - } - cleanup(); - } - function cleanup() { - var item = _copy || _item; - ungrab(); - removeMirrorImage(); - if (item) { - classes.rm(item, 'gu-transit'); - } - if (_renderTimer) { - clearTimeout(_renderTimer); - } - drake.dragging = false; - if (_lastDropTarget) { - drake.emit('out', item, _lastDropTarget, _source); - } - drake.emit('dragend', item); - _source = _item = _copy = _initialSibling = _currentSibling = _renderTimer = _lastDropTarget = null; - } - function isInitialPlacement(target, s) { - var sibling; - if (s !== void 0) { - sibling = s; - } else if (_mirror) { - sibling = _currentSibling; - } else { - sibling = nextEl(_copy || _item); - } - return target === _source && sibling === _initialSibling; - } - function findDropTarget(elementBehindCursor, clientX, clientY) { - var target = elementBehindCursor; - while(target && !accepted()){ - target = getParent(target); - } - return target; - function accepted() { - var droppable = isContainer(target); - if (droppable === false) { - return false; - } - var immediate = getImmediateChild(target, elementBehindCursor); - var reference = getReference(target, immediate, clientX, clientY); - var initial = isInitialPlacement(target, reference); - if (initial) { - return true; // should always be able to drop it right back where it was - } - return o.accepts(_item, target, _source, reference); - } - } - function drag(e) { - if (!_mirror) { - return; - } - e.preventDefault(); - var clientX = getCoord('clientX', e) || 0; - var clientY = getCoord('clientY', e) || 0; - var x = clientX - _offsetX; - var y = clientY - _offsetY; - _mirror.style.left = x + 'px'; - _mirror.style.top = y + 'px'; - var item = _copy || _item; - var elementBehindCursor = getElementBehindPoint(_mirror, clientX, clientY); - var dropTarget = findDropTarget(elementBehindCursor, clientX, clientY); - var changed = dropTarget !== null && dropTarget !== _lastDropTarget; - if (changed || dropTarget === null) { - out(); - _lastDropTarget = dropTarget; - over(); - } - var parent = getParent(item); - if (dropTarget === _source && _copy && !o.copySortSource) { - if (parent) { - parent.removeChild(item); - } - return; - } - var reference; - var immediate = getImmediateChild(dropTarget, elementBehindCursor); - if (immediate !== null) { - reference = getReference(dropTarget, immediate, clientX, clientY); - } else if (o.revertOnSpill === true && !_copy) { - reference = _initialSibling; - dropTarget = _source; - } else { - if (_copy && parent) { - parent.removeChild(item); - } - return; - } - if (reference === null && changed || reference !== item && reference !== nextEl(item)) { - _currentSibling = reference; - dropTarget.insertBefore(item, reference); - drake.emit('shadow', item, dropTarget, _source); - } - function moved(type) { - drake.emit(type, item, _lastDropTarget, _source); - } - function over() { - if (changed) { - moved('over'); - } - } - function out() { - if (_lastDropTarget) { - moved('out'); - } - } - } - function spillOver(el) { - classes.rm(el, 'gu-hide'); - } - function spillOut(el) { - if (drake.dragging) { - classes.add(el, 'gu-hide'); - } - } - function renderMirrorImage() { - if (_mirror) { - return; - } - var rect = _item.getBoundingClientRect(); - _mirror = _item.cloneNode(true); - _mirror.style.width = getRectWidth(rect) + 'px'; - _mirror.style.height = getRectHeight(rect) + 'px'; - classes.rm(_mirror, 'gu-transit'); - classes.add(_mirror, 'gu-mirror'); - o.mirrorContainer.appendChild(_mirror); - touchy(documentElement, 'add', 'mousemove', drag); - classes.add(o.mirrorContainer, 'gu-unselectable'); - drake.emit('cloned', _mirror, _item, 'mirror'); - } - function removeMirrorImage() { - if (_mirror) { - classes.rm(o.mirrorContainer, 'gu-unselectable'); - touchy(documentElement, 'remove', 'mousemove', drag); - getParent(_mirror).removeChild(_mirror); - _mirror = null; - } - } - function getImmediateChild(dropTarget, target) { - var immediate = target; - while(immediate !== dropTarget && getParent(immediate) !== dropTarget){ - immediate = getParent(immediate); - } - if (immediate === documentElement) { - return null; - } - return immediate; - } - function getReference(dropTarget, target, x, y) { - var horizontal = o.direction === 'horizontal'; - var reference = target !== dropTarget ? inside() : outside(); - return reference; - function outside() { - var len = dropTarget.children.length; - var i; - var el; - var rect; - for(i = 0; i < len; i++){ - el = dropTarget.children[i]; - rect = el.getBoundingClientRect(); - if (horizontal && rect.left + rect.width / 2 > x) { - return el; - } - if (!horizontal && rect.top + rect.height / 2 > y) { - return el; - } - } - return null; - } - function inside() { - var rect = target.getBoundingClientRect(); - if (horizontal) { - return resolve(x > rect.left + getRectWidth(rect) / 2); - } - return resolve(y > rect.top + getRectHeight(rect) / 2); - } - function resolve(after) { - return after ? nextEl(target) : target; - } - } - function isCopy(item, container) { - return typeof o.copy === 'boolean' ? o.copy : o.copy(item, container); - } -} -function touchy(el, op, type, fn) { - var touch = { - mouseup: 'touchend', - mousedown: 'touchstart', - mousemove: 'touchmove' - }; - var pointers = { - mouseup: 'pointerup', - mousedown: 'pointerdown', - mousemove: 'pointermove' - }; - var microsoft = { - mouseup: 'MSPointerUp', - mousedown: 'MSPointerDown', - mousemove: 'MSPointerMove' - }; - if (global.navigator.pointerEnabled) crossvent[op](el, pointers[type], fn); - else if (global.navigator.msPointerEnabled) crossvent[op](el, microsoft[type], fn); - else { - crossvent[op](el, touch[type], fn); - crossvent[op](el, type, fn); - } -} -function whichMouseButton(e) { - if (e.touches !== void 0) return e.touches.length; - if (e.which !== void 0 && e.which !== 0) return e.which; - // see https://github.com/bevacqua/dragula/issues/261 - if (e.buttons !== void 0) return e.buttons; - var button = e.button; - if (button !== void 0) return button & 1 ? 1 : button & 2 ? 3 : button & 4 ? 2 : 0; -} -function getOffset(el) { - var rect = el.getBoundingClientRect(); - return { - left: rect.left + getScroll('scrollLeft', 'pageXOffset'), - top: rect.top + getScroll('scrollTop', 'pageYOffset') - }; -} -function getScroll(scrollProp, offsetProp) { - if (typeof global[offsetProp] !== 'undefined') return global[offsetProp]; - if (documentElement.clientHeight) return documentElement[scrollProp]; - return doc.body[scrollProp]; -} -function getElementBehindPoint(point, x, y) { - point = point || {}; - var state = point.className || ''; - var el; - point.className += ' gu-hide'; - el = doc.elementFromPoint(x, y); - point.className = state; - return el; -} -function never() { - return false; -} -function always() { - return true; -} -function getRectWidth(rect) { - return rect.width || rect.right - rect.left; -} -function getRectHeight(rect) { - return rect.height || rect.bottom - rect.top; -} -function getParent(el) { - return el.parentNode === doc ? null : el.parentNode; -} -function isInput(el) { - return el.tagName === 'INPUT' || el.tagName === 'TEXTAREA' || el.tagName === 'SELECT' || isEditable(el); -} -function isEditable(el) { - if (!el) return false; - // no parents were editable - if (el.contentEditable === 'false') return false; - // stop the lookup - if (el.contentEditable === 'true') return true; - // found a contentEditable element in the chain - return isEditable(getParent(el)); // contentEditable is set to 'inherit' -} -function nextEl(el) { - return el.nextElementSibling || manually(); - function manually() { - var sibling = el; - do { - sibling = sibling.nextSibling; - }while (sibling && sibling.nodeType !== 1) - return sibling; - } -} -function getEventHost(e) { - // on touchend event, we have to use `e.changedTouches` - // see http://stackoverflow.com/questions/7192563/touchend-event-properties - // see https://github.com/bevacqua/dragula/issues/34 - if (e.targetTouches && e.targetTouches.length) return e.targetTouches[0]; - if (e.changedTouches && e.changedTouches.length) return e.changedTouches[0]; - return e; -} -function getCoord(coord, e) { - var host = getEventHost(e); - var missMap = { - pageX: 'clientX', - pageY: 'clientY' // IE8 - }; - if (coord in missMap && !(coord in host) && missMap[coord] in host) coord = missMap[coord]; - return host[coord]; -} -module.exports = dragula; - -},{"contra/emitter":"5LDWz","crossvent":"lbeRj","./classes":"ii4qi"}],"5LDWz":[function(require,module,exports) { -'use strict'; -var atoa = require('atoa'); -var debounce = require('./debounce'); -module.exports = function emitter(thing, options) { - var opts = options || {}; - var evt = {}; - if (thing === undefined) thing = {}; - thing.on = function(type, fn) { - if (!evt[type]) evt[type] = [ - fn - ]; - else evt[type].push(fn); - return thing; - }; - thing.once = function(type, fn) { - fn._once = true; // thing.off(fn) still works! - thing.on(type, fn); - return thing; - }; - thing.off = function(type, fn) { - var c = arguments.length; - if (c === 1) delete evt[type]; - else if (c === 0) evt = {}; - else { - var et = evt[type]; - if (!et) return thing; - et.splice(et.indexOf(fn), 1); - } - return thing; - }; - thing.emit = function() { - var args = atoa(arguments); - return thing.emitterSnapshot(args.shift()).apply(this, args); - }; - thing.emitterSnapshot = function(type) { - var et = (evt[type] || []).slice(0); - return function() { - var args = atoa(arguments); - var ctx = this || thing; - if (type === 'error' && opts.throws !== false && !et.length) throw args.length === 1 ? args[0] : args; - et.forEach(function emitter(listen) { - if (opts.async) debounce(listen, args, ctx); - else listen.apply(ctx, args); - if (listen._once) thing.off(type, listen); - }); - return thing; - }; - }; - return thing; -}; - -},{"atoa":"66ZjW","./debounce":"A9uP7"}],"66ZjW":[function(require,module,exports) { -module.exports = function atoa(a, n) { - return Array.prototype.slice.call(a, n); -}; - -},{}],"A9uP7":[function(require,module,exports) { -'use strict'; -var ticky = require('ticky'); -module.exports = function debounce(fn, args, ctx) { - if (!fn) return; - ticky(function run() { - fn.apply(ctx || null, args || []); - }); -}; - -},{"ticky":"faOTF"}],"faOTF":[function(require,module,exports) { -var si = typeof setImmediate === 'function', tick; -if (si) tick = function(fn) { - setImmediate(fn); -}; -else tick = function(fn) { - setTimeout(fn, 0); -}; -module.exports = tick; - -},{}],"lbeRj":[function(require,module,exports) { -'use strict'; -var global = arguments[3]; -var customEvent = require('custom-event'); -var eventmap = require('./eventmap'); -var doc = global.document; -var addEvent = addEventEasy; -var removeEvent = removeEventEasy; -var hardCache = []; -if (!global.addEventListener) { - addEvent = addEventHard; - removeEvent = removeEventHard; -} -module.exports = { - add: addEvent, - remove: removeEvent, - fabricate: fabricateEvent -}; -function addEventEasy(el, type, fn, capturing) { - return el.addEventListener(type, fn, capturing); -} -function addEventHard(el, type, fn) { - return el.attachEvent('on' + type, wrap(el, type, fn)); -} -function removeEventEasy(el, type, fn, capturing) { - return el.removeEventListener(type, fn, capturing); -} -function removeEventHard(el, type, fn) { - var listener = unwrap(el, type, fn); - if (listener) return el.detachEvent('on' + type, listener); -} -function fabricateEvent(el, type, model) { - var e1 = eventmap.indexOf(type) === -1 ? makeCustomEvent() : makeClassicEvent(); - if (el.dispatchEvent) el.dispatchEvent(e1); - else el.fireEvent('on' + type, e1); - function makeClassicEvent() { - var e; - if (doc.createEvent) { - e = doc.createEvent('Event'); - e.initEvent(type, true, true); - } else if (doc.createEventObject) e = doc.createEventObject(); - return e; - } - function makeCustomEvent() { - return new customEvent(type, { - detail: model - }); - } -} -function wrapperFactory(el, type, fn) { - return function wrapper(originalEvent) { - var e = originalEvent || global.event; - e.target = e.target || e.srcElement; - e.preventDefault = e.preventDefault || function preventDefault() { - e.returnValue = false; - }; - e.stopPropagation = e.stopPropagation || function stopPropagation() { - e.cancelBubble = true; - }; - e.which = e.which || e.keyCode; - fn.call(el, e); - }; -} -function wrap(el, type, fn) { - var wrapper = unwrap(el, type, fn) || wrapperFactory(el, type, fn); - hardCache.push({ - wrapper: wrapper, - element: el, - type: type, - fn: fn - }); - return wrapper; -} -function unwrap(el, type, fn) { - var i = find(el, type, fn); - if (i) { - var wrapper = hardCache[i].wrapper; - hardCache.splice(i, 1); // free up a tad of memory - return wrapper; - } -} -function find(el, type, fn) { - var i, item; - for(i = 0; i < hardCache.length; i++){ - item = hardCache[i]; - if (item.element === el && item.type === type && item.fn === fn) return i; - } -} - -},{"custom-event":"36pCm","./eventmap":"80VLb"}],"36pCm":[function(require,module,exports) { -var global = arguments[3]; -var NativeCustomEvent = global.CustomEvent; -function useNative() { - try { - var p = new NativeCustomEvent('cat', { - detail: { - foo: 'bar' - } - }); - return 'cat' === p.type && 'bar' === p.detail.foo; - } catch (e) {} - return false; -} -/** - * Cross-browser `CustomEvent` constructor. - * - * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent - * - * @public - */ module.exports = useNative() ? NativeCustomEvent : // IE >= 9 -'undefined' !== typeof document && 'function' === typeof document.createEvent ? function CustomEvent(type, params) { - var e = document.createEvent('CustomEvent'); - if (params) e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail); - else e.initCustomEvent(type, false, false, void 0); - return e; -} : // IE <= 8 -function CustomEvent(type, params) { - var e = document.createEventObject(); - e.type = type; - if (params) { - e.bubbles = Boolean(params.bubbles); - e.cancelable = Boolean(params.cancelable); - e.detail = params.detail; - } else { - e.bubbles = false; - e.cancelable = false; - e.detail = void 0; - } - return e; -}; - -},{}],"80VLb":[function(require,module,exports) { -'use strict'; -var global = arguments[3]; -var eventmap = []; -var eventname = ''; -var ron = /^on/; -for(eventname in global)if (ron.test(eventname)) eventmap.push(eventname.slice(2)); -module.exports = eventmap; - -},{}],"ii4qi":[function(require,module,exports) { -'use strict'; -var cache = {}; -var start = '(?:^|\\s)'; -var end = '(?:\\s|$)'; -function lookupClass(className) { - var cached = cache[className]; - if (cached) cached.lastIndex = 0; - else cache[className] = cached = new RegExp(start + className + end, 'g'); - return cached; -} -function addClass(el, className) { - var current = el.className; - if (!current.length) el.className = className; - else if (!lookupClass(className).test(current)) el.className += ' ' + className; -} -function rmClass(el, className) { - el.className = el.className.replace(lookupClass(className), ' ').trim(); -} -module.exports = { - add: addClass, - rm: rmClass -}; - -},{}],"8lqZg":[function(require,module,exports) { +},{"./index.js":"8lqZg","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3","sortablejs":"4mik1"}],"8lqZg":[function(require,module,exports) { var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); var _styleCss = require("./style.css"); var _styleCssDefault = parcelHelpers.interopDefault(_styleCss); @@ -1393,18 +585,16 @@ class TabGroup extends HTMLElement { TabGroupPrivate.initVisibility.bind(this)(); // Init draggable tabs if (this.options.draggable) { - const initDragula = ()=>{ - // FIXME: dragula doesnt support shadow dom :-( - console.log(this.tabContainer); - const d = window.dragula([ - this.tabContainer - ], { - direction: "horizontal" - }); - console.log(d); + const initSortable = ()=>{ + const options = Object.assign({ + direction: "horizontal", + animation: 150, + swapThreshold: 0.20 + }, this.options.draggableOptions); + new window.Sortable(this.tabContainer, options); }; - if (window.dragula) initDragula(); - else document.addEventListener("DOMContentLoaded", initDragula); + if (window.Sortable) initSortable(); + else document.addEventListener("DOMContentLoaded", initSortable); } } setDefaultTab(tab) { @@ -1744,7 +934,12 @@ Object.assign(TabGroup.prototype, eventEmitterMixin); Object.assign(Tab.prototype, eventEmitterMixin); customElements.define("tab-group", TabGroup); -},{"@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3","./style.css":"e9qgF"}],"gkKU3":[function(require,module,exports) { +},{"./style.css":"e9qgF","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"e9qgF":[function(require,module,exports) { +var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); +parcelHelpers.defineInteropFlag(exports); +exports.default = "/* TODO: use custom properties */\n\nwebview {\n position: absolute;\n visibility: hidden;\n width: 100%;\n height: 100%;\n}\n\nwebview.visible {\n visibility: visible;\n}\n\n.etabs {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n text-rendering: optimizeLegibility;\n font-feature-settings: 'liga', 'clig', 'kern';\n}\n\n.etabs-tabgroup {\n width: 100%;\n height: 32px;\n cursor: default;\n font: caption;\n font-size: 14px;\n -webkit-user-select: none;\n user-select: none;\n display: none;\n background: #E7EAED;\n box-shadow: inset 0 -1px #DADCE0;\n border-top: 1px solid #DADCE0;\n}\n\n.etabs-tabgroup.visible {\n display: flex;\n}\n\n.etabs-tabs {\n height: 100%;\n}\n\n.etabs-tab {\n display: none;\n position: relative;\n height: 100%;\n background: #E7EAED;\n color: #696A6C;\n padding: 5px 9px;\n transition: background-color 150ms ease-out;\n box-shadow: inset 0 -1px #DADCE0;\n font: caption;\n font-size: 13px;\n cursor: pointer;\n box-sizing: border-box;\n}\n\n/* Dragula */\n.etabs-tab.gu-mirror {\n padding-bottom: 0;\n cursor: grab;\n\tborder: none;\n}\n\n.etabs-tab:first-child {\n border-left: none;\n}\n\n.etabs-tab.visible {\n display: inline-block;\n}\n\n.etabs-tab.active {\n background: #fff;\n box-shadow: none;\n\tborder-left: 1px solid #DADCE0;\n\tborder-right: 1px solid #DADCE0;\n\tpadding-left: 8px;\n\tpadding-right: 8px;\n}\n\n.etabs-tab.flash {\n background: linear-gradient(to bottom, rgba(255,243,170,1) 0%,rgba(255,227,37,1) 100%);\n}\n\n.etabs-tab.visible:not(.active)+.etabs-tab.visible:not(.active) {\n\tborder-left: 1px solid #B4B6B8;\n\tpadding-left: 8px;\n}\n\n.etabs-tab:not(.active):hover {\n\tbackground: #F1F3F4;\n}\n\n.etabs-buttons {\n border-left: 1px solid #B4B6B8;\n}\n\n.etabs-buttons button {\n display: block;\n color: #777;\n background: none;\n border: none;\n font-size: 16px;\n font-family: inherit;\n margin-top: 5px;\n border-radius: 50%;\n margin-left: 4px;\n width: 20px;\n height: 20px;\n text-align: center;\n line-height: 14px;\n padding: 1px 0 0 0;\n\tcursor: pointer;\n}\n\n.etabs-buttons button:hover {\n color: #333;\n background-color: #bbb;\n}\n\n.etabs-tab-badge {\n position: absolute;\n right: 0;\n top: -7px;\n background: red;\n border-radius: 100%;\n text-align: center;\n font-size: 10px;\n padding: 0 5px;\n}\n\n.etabs-tab-badge.hidden {\n display: none;\n}\n\n.etabs-tab-icon {\n display: inline-block;\n height: 16px;\n}\n\n.etabs-tab-icon img {\n max-width: 16px;\n max-height: 16px;\n}\n\n.etabs-tab-title {\n display: inline-block;\n margin-left: 10px;\n}\n\n.etabs-tab-buttons {\n display: inline-block;\n margin-left: 10px;\n}\n\n.etabs-tab-buttons button {\n display: inline-block;\n color: #777;\n background: none;\n border: none;\n width: 20px;\n height: 20px;\n text-align: center;\n border-radius: 50%;\n cursor: pointer;\n padding: 1px 0 0 0;\n font-size: 16px;\n}\n\n.etabs-tab-buttons button:hover {\n color: #333;\n background-color: #bbb;\n}\n\n.etabs-views {\n position: relative;\n height: calc(100vh - 33px);\n}\n\n.etab-view {\n position: relative;\n}\n"; + +},{"@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"gkKU3":[function(require,module,exports) { exports.interopDefault = function(a) { return a && a.__esModule ? a : { default: a @@ -1774,15 +969,2510 @@ exports.export = function(dest, destName, get) { }); }; -},{}],"e9qgF":[function(require,module,exports) { +},{}],"4mik1":[function(require,module,exports) { var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); parcelHelpers.defineInteropFlag(exports); -exports.default = "/* TODO: use custom properties */\n\nwebview {\n position: absolute;\n visibility: hidden;\n width: 100%;\n height: 100%;\n}\n\nwebview.visible {\n visibility: visible;\n}\n\n.etabs {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n text-rendering: optimizeLegibility;\n font-feature-settings: 'liga', 'clig', 'kern';\n}\n\n.etabs-tabgroup {\n width: 100%;\n height: 32px;\n cursor: default;\n font: caption;\n font-size: 14px;\n -webkit-user-select: none;\n user-select: none;\n display: none;\n background: #E7EAED;\n box-shadow: inset 0 -1px #DADCE0;\n border-top: 1px solid #DADCE0;\n}\n\n.etabs-tabgroup.visible {\n display: flex;\n}\n\n.etabs-tabs {\n height: 100%;\n}\n\n.etabs-tab {\n display: none;\n position: relative;\n height: 100%;\n background: #E7EAED;\n color: #696A6C;\n padding: 5px 9px;\n transition: background-color 150ms ease-out;\n box-shadow: inset 0 -1px #DADCE0;\n font: caption;\n font-size: 13px;\n cursor: pointer;\n box-sizing: border-box;\n}\n\n/* Dragula */\n.etabs-tab.gu-mirror {\n padding-bottom: 0;\n cursor: grab;\n\tborder: none;\n}\n\n.etabs-tab:first-child {\n border-left: none;\n}\n\n.etabs-tab.visible {\n display: inline-block;\n}\n\n.etabs-tab.active {\n background: #fff;\n box-shadow: none;\n\tborder-left: 1px solid #DADCE0;\n\tborder-right: 1px solid #DADCE0;\n\tpadding-left: 8px;\n\tpadding-right: 8px;\n}\n\n.etabs-tab.flash {\n background: linear-gradient(to bottom, rgba(255,243,170,1) 0%,rgba(255,227,37,1) 100%);\n}\n\n.etabs-tab.visible:not(.active)+.etabs-tab.visible:not(.active) {\n\tborder-left: 1px solid #B4B6B8;\n\tpadding-left: 8px;\n}\n\n.etabs-tab:not(.active):hover {\n\tbackground: #F1F3F4;\n}\n\n.etabs-buttons {\n border-left: 1px solid #B4B6B8;\n}\n\n.etabs-buttons button {\n display: block;\n color: #777;\n background: none;\n border: none;\n font-size: 16px;\n font-family: inherit;\n margin-top: 5px;\n border-radius: 50%;\n margin-left: 4px;\n width: 20px;\n height: 20px;\n text-align: center;\n line-height: 14px;\n padding: 1px 0 0 0;\n\tcursor: pointer;\n}\n\n.etabs-buttons button:hover {\n color: #333;\n background-color: #bbb;\n}\n\n.etabs-tab-badge {\n position: absolute;\n right: 0;\n top: -7px;\n background: red;\n border-radius: 100%;\n text-align: center;\n font-size: 10px;\n padding: 0 5px;\n}\n\n.etabs-tab-badge.hidden {\n display: none;\n}\n\n.etabs-tab-icon {\n display: inline-block;\n height: 16px;\n}\n\n.etabs-tab-icon img {\n max-width: 16px;\n max-height: 16px;\n}\n\n.etabs-tab-title {\n display: inline-block;\n margin-left: 10px;\n}\n\n.etabs-tab-buttons {\n display: inline-block;\n margin-left: 10px;\n}\n\n.etabs-tab-buttons button {\n display: inline-block;\n color: #777;\n background: none;\n border: none;\n width: 20px;\n height: 20px;\n text-align: center;\n border-radius: 50%;\n cursor: pointer;\n padding: 1px 0 0 0;\n font-size: 16px;\n}\n\n.etabs-tab-buttons button:hover {\n color: #333;\n background-color: #bbb;\n}\n\n.etabs-views {\n position: relative;\n height: calc(100vh - 33px);\n}\n\n.etab-view {\n position: relative;\n}\n"; - -},{"@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"giGox":[function(require,module,exports) { -var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); -parcelHelpers.defineInteropFlag(exports); -exports.default = ".gu-mirror {\n position: fixed !important;\n margin: 0 !important;\n z-index: 9999 !important;\n opacity: 0.8;\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)\";\n filter: alpha(opacity=80);\n}\n.gu-hide {\n display: none !important;\n}\n.gu-unselectable {\n -webkit-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n}\n.gu-transit {\n opacity: 0.2;\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)\";\n filter: alpha(opacity=20);\n}\n"; +parcelHelpers.export(exports, "MultiDrag", ()=>MultiDragPlugin +); +parcelHelpers.export(exports, "Sortable", ()=>Sortable +); +parcelHelpers.export(exports, "Swap", ()=>SwapPlugin +); +/**! + * Sortable 1.15.0 + * @author RubaXa + * @author owenm + * @license MIT + */ function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + return keys; +} +function _objectSpread2(target) { + for(var i = 1; i < arguments.length; i++){ + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) ownKeys(Object(source), true).forEach(function(key) { + _defineProperty(target, key, source[key]); + }); + else if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + else ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; +} +function _typeof(obj1) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") _typeof = function(obj) { + return typeof obj; + }; + else _typeof = function(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + return _typeof(obj1); +} +function _defineProperty(obj, key, value) { + if (key in obj) Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + else obj[key] = value; + return obj; +} +function _extends() { + _extends = Object.assign || function(target) { + for(var i = 1; i < arguments.length; i++){ + var source = arguments[i]; + for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key]; + } + return target; + }; + return _extends.apply(this, arguments); +} +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + for(i = 0; i < sourceKeys.length; i++){ + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + return target; +} +function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + var target = _objectWithoutPropertiesLoose(source, excluded); + var key, i; + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + for(i = 0; i < sourceSymbolKeys.length; i++){ + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + return target; +} +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); +} +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); +} +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); +} +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); +} +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i]; + return arr2; +} +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +var version = "1.15.0"; +function userAgent(pattern) { + if (typeof window !== 'undefined' && window.navigator) return !!/*@__PURE__*/ navigator.userAgent.match(pattern); +} +var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i); +var Edge = userAgent(/Edge/i); +var FireFox = userAgent(/firefox/i); +var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i); +var IOS = userAgent(/iP(ad|od|hone)/i); +var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i); +var captureMode = { + capture: false, + passive: false +}; +function on(el, event, fn) { + el.addEventListener(event, fn, !IE11OrLess && captureMode); +} +function off(el, event, fn) { + el.removeEventListener(event, fn, !IE11OrLess && captureMode); +} +function matches(/**HTMLElement*/ el, /**String*/ selector) { + if (!selector) return; + selector[0] === '>' && (selector = selector.substring(1)); + if (el) try { + if (el.matches) return el.matches(selector); + else if (el.msMatchesSelector) return el.msMatchesSelector(selector); + else if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector); + } catch (_) { + return false; + } + return false; +} +function getParentOrHost(el) { + return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode; +} +function closest(/**HTMLElement*/ el, /**String*/ selector, /**HTMLElement*/ ctx, includeCTX) { + if (el) { + ctx = ctx || document; + do { + if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) return el; + if (el === ctx) break; + /* jshint boss:true */ }while (el = getParentOrHost(el)) + } + return null; +} +var R_SPACE = /\s+/g; +function toggleClass(el, name, state) { + if (el && name) { + if (el.classList) el.classList[state ? 'add' : 'remove'](name); + else { + var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' '); + el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' '); + } + } +} +function css(el, prop, val) { + var style = el && el.style; + if (style) { + if (val === void 0) { + if (document.defaultView && document.defaultView.getComputedStyle) val = document.defaultView.getComputedStyle(el, ''); + else if (el.currentStyle) val = el.currentStyle; + return prop === void 0 ? val : val[prop]; + } else { + if (!(prop in style) && prop.indexOf('webkit') === -1) prop = '-webkit-' + prop; + style[prop] = val + (typeof val === 'string' ? '' : 'px'); + } + } +} +function matrix(el, selfOnly) { + var appliedTransforms = ''; + if (typeof el === 'string') appliedTransforms = el; + else do { + var transform = css(el, 'transform'); + if (transform && transform !== 'none') appliedTransforms = transform + ' ' + appliedTransforms; + /* jshint boss:true */ }while (!selfOnly && (el = el.parentNode)) + var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix; + /*jshint -W056 */ return matrixFn && new matrixFn(appliedTransforms); +} +function find(ctx, tagName, iterator) { + if (ctx) { + var list = ctx.getElementsByTagName(tagName), i = 0, n = list.length; + if (iterator) for(; i < n; i++)iterator(list[i], i); + return list; + } + return []; +} +function getWindowScrollingElement() { + var scrollingElement = document.scrollingElement; + if (scrollingElement) return scrollingElement; + else return document.documentElement; +} +/** + * Returns the "bounding client rect" of given element + * @param {HTMLElement} el The element whose boundingClientRect is wanted + * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container + * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr + * @param {[Boolean]} undoScale Whether the container's scale() should be undone + * @param {[HTMLElement]} container The parent the element will be placed in + * @return {Object} The boundingClientRect of el, with specified adjustments + */ function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) { + if (!el.getBoundingClientRect && el !== window) return; + var elRect, top, left, bottom, right, height, width; + if (el !== window && el.parentNode && el !== getWindowScrollingElement()) { + elRect = el.getBoundingClientRect(); + top = elRect.top; + left = elRect.left; + bottom = elRect.bottom; + right = elRect.right; + height = elRect.height; + width = elRect.width; + } else { + top = 0; + left = 0; + bottom = window.innerHeight; + right = window.innerWidth; + height = window.innerHeight; + width = window.innerWidth; + } + if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) { + // Adjust for translate() + container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312) + // Not needed on <= IE11 + if (!IE11OrLess) { + do if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) { + var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container + top -= containerRect.top + parseInt(css(container, 'border-top-width')); + left -= containerRect.left + parseInt(css(container, 'border-left-width')); + bottom = top + elRect.height; + right = left + elRect.width; + break; + } + while (container = container.parentNode) + } + } + if (undoScale && el !== window) { + // Adjust for scale() + var elMatrix = matrix(container || el), scaleX = elMatrix && elMatrix.a, scaleY = elMatrix && elMatrix.d; + if (elMatrix) { + top /= scaleY; + left /= scaleX; + width /= scaleX; + height /= scaleY; + bottom = top + height; + right = left + width; + } + } + return { + top: top, + left: left, + bottom: bottom, + right: right, + width: width, + height: height + }; +} +/** + * Checks if a side of an element is scrolled past a side of its parents + * @param {HTMLElement} el The element who's side being scrolled out of view is in question + * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom') + * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom') + * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element + */ function isScrolledPast(el, elSide, parentSide) { + var parent = getParentAutoScrollElement(el, true), elSideVal = getRect(el)[elSide]; + /* jshint boss:true */ while(parent){ + var parentSideVal = getRect(parent)[parentSide], visible = void 0; + if (parentSide === 'top' || parentSide === 'left') visible = elSideVal >= parentSideVal; + else visible = elSideVal <= parentSideVal; + if (!visible) return parent; + if (parent === getWindowScrollingElement()) break; + parent = getParentAutoScrollElement(parent, false); + } + return false; +} +/** + * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible) + * and non-draggable elements + * @param {HTMLElement} el The parent element + * @param {Number} childNum The index of the child + * @param {Object} options Parent Sortable's options + * @return {HTMLElement} The child at index childNum, or null if not found + */ function getChild(el, childNum, options, includeDragEl) { + var currentChild = 0, i = 0, children = el.children; + while(i < children.length){ + if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) { + if (currentChild === childNum) return children[i]; + currentChild++; + } + i++; + } + return null; +} +/** + * Gets the last child in the el, ignoring ghostEl or invisible elements (clones) + * @param {HTMLElement} el Parent element + * @param {selector} selector Any other elements that should be ignored + * @return {HTMLElement} The last child, ignoring ghostEl + */ function lastChild(el, selector) { + var last = el.lastElementChild; + while(last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector)))last = last.previousElementSibling; + return last || null; +} +/** + * Returns the index of an element within its parent for a selected set of + * elements + * @param {HTMLElement} el + * @param {selector} selector + * @return {number} + */ function index(el, selector) { + var index1 = 0; + if (!el || !el.parentNode) return -1; + /* jshint boss:true */ while(el = el.previousElementSibling)if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) index1++; + return index1; +} +/** + * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements. + * The value is returned in real pixels. + * @param {HTMLElement} el + * @return {Array} Offsets in the format of [left, top] + */ function getRelativeScrollOffset(el) { + var offsetLeft = 0, offsetTop = 0, winScroller = getWindowScrollingElement(); + if (el) do { + var elMatrix = matrix(el), scaleX = elMatrix.a, scaleY = elMatrix.d; + offsetLeft += el.scrollLeft * scaleX; + offsetTop += el.scrollTop * scaleY; + }while (el !== winScroller && (el = el.parentNode)) + return [ + offsetLeft, + offsetTop + ]; +} +/** + * Returns the index of the object within the given array + * @param {Array} arr Array that may or may not hold the object + * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find + * @return {Number} The index of the object in the array, or -1 + */ function indexOfObject(arr, obj) { + for(var i in arr){ + if (!arr.hasOwnProperty(i)) continue; + for(var key in obj){ + if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i); + } + } + return -1; +} +function getParentAutoScrollElement(el, includeSelf) { + // skip to window + if (!el || !el.getBoundingClientRect) return getWindowScrollingElement(); + var elem = el; + var gotSelf = false; + do // we don't need to get elem css if it isn't even overflowing in the first place (performance) + if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) { + var elemCSS = css(elem); + if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) { + if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement(); + if (gotSelf || includeSelf) return elem; + gotSelf = true; + } + } + while (elem = elem.parentNode) + return getWindowScrollingElement(); +} +function extend(dst, src) { + if (dst && src) { + for(var key in src)if (src.hasOwnProperty(key)) dst[key] = src[key]; + } + return dst; +} +function isRectEqual(rect1, rect2) { + return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width); +} +var _throttleTimeout; +function throttle(callback, ms) { + return function() { + if (!_throttleTimeout) { + var args = arguments, _this = this; + if (args.length === 1) callback.call(_this, args[0]); + else callback.apply(_this, args); + _throttleTimeout = setTimeout(function() { + _throttleTimeout = void 0; + }, ms); + } + }; +} +function cancelThrottle() { + clearTimeout(_throttleTimeout); + _throttleTimeout = void 0; +} +function scrollBy(el, x, y) { + el.scrollLeft += x; + el.scrollTop += y; +} +function clone(el) { + var Polymer = window.Polymer; + var $ = window.jQuery || window.Zepto; + if (Polymer && Polymer.dom) return Polymer.dom(el).cloneNode(true); + else if ($) return $(el).clone(true)[0]; + else return el.cloneNode(true); +} +function setRect(el, rect) { + css(el, 'position', 'absolute'); + css(el, 'top', rect.top); + css(el, 'left', rect.left); + css(el, 'width', rect.width); + css(el, 'height', rect.height); +} +function unsetRect(el) { + css(el, 'position', ''); + css(el, 'top', ''); + css(el, 'left', ''); + css(el, 'width', ''); + css(el, 'height', ''); +} +var expando = 'Sortable' + new Date().getTime(); +function AnimationStateManager() { + var animationStates = [], animationCallbackId; + return { + captureAnimationState: function captureAnimationState() { + animationStates = []; + if (!this.options.animation) return; + var children = [].slice.call(this.el.children); + children.forEach(function(child) { + if (css(child, 'display') === 'none' || child === Sortable.ghost) return; + animationStates.push({ + target: child, + rect: getRect(child) + }); + var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation + if (child.thisAnimationDuration) { + var childMatrix = matrix(child, true); + if (childMatrix) { + fromRect.top -= childMatrix.f; + fromRect.left -= childMatrix.e; + } + } + child.fromRect = fromRect; + }); + }, + addAnimationState: function addAnimationState(state) { + animationStates.push(state); + }, + removeAnimationState: function removeAnimationState(target) { + animationStates.splice(indexOfObject(animationStates, { + target: target + }), 1); + }, + animateAll: function animateAll(callback) { + var _this = this; + if (!this.options.animation) { + clearTimeout(animationCallbackId); + if (typeof callback === 'function') callback(); + return; + } + var animating = false, animationTime = 0; + animationStates.forEach(function(state) { + var time = 0, target = state.target, fromRect = target.fromRect, toRect = getRect(target), prevFromRect = target.prevFromRect, prevToRect = target.prevToRect, animatingRect = state.rect, targetMatrix = matrix(target, true); + if (targetMatrix) { + // Compensate for current animation + toRect.top -= targetMatrix.f; + toRect.left -= targetMatrix.e; + } + target.toRect = toRect; + if (target.thisAnimationDuration) // Could also check if animatingRect is between fromRect and toRect + { + if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) // If returning to same place as started from animation and on same axis + time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options); + } // if fromRect != toRect: animate + if (!isRectEqual(toRect, fromRect)) { + target.prevFromRect = fromRect; + target.prevToRect = toRect; + if (!time) time = _this.options.animation; + _this.animate(target, animatingRect, toRect, time); + } + if (time) { + animating = true; + animationTime = Math.max(animationTime, time); + clearTimeout(target.animationResetTimer); + target.animationResetTimer = setTimeout(function() { + target.animationTime = 0; + target.prevFromRect = null; + target.fromRect = null; + target.prevToRect = null; + target.thisAnimationDuration = null; + }, time); + target.thisAnimationDuration = time; + } + }); + clearTimeout(animationCallbackId); + if (!animating) { + if (typeof callback === 'function') callback(); + } else animationCallbackId = setTimeout(function() { + if (typeof callback === 'function') callback(); + }, animationTime); + animationStates = []; + }, + animate: function animate(target, currentRect, toRect, duration) { + if (duration) { + css(target, 'transition', ''); + css(target, 'transform', ''); + var elMatrix = matrix(this.el), scaleX = elMatrix && elMatrix.a, scaleY = elMatrix && elMatrix.d, translateX = (currentRect.left - toRect.left) / (scaleX || 1), translateY = (currentRect.top - toRect.top) / (scaleY || 1); + target.animatingX = !!translateX; + target.animatingY = !!translateY; + css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)'); + this.forRepaintDummy = repaint(target); // repaint + css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : '')); + css(target, 'transform', 'translate3d(0,0,0)'); + typeof target.animated === 'number' && clearTimeout(target.animated); + target.animated = setTimeout(function() { + css(target, 'transition', ''); + css(target, 'transform', ''); + target.animated = false; + target.animatingX = false; + target.animatingY = false; + }, duration); + } + } + }; +} +function repaint(target) { + return target.offsetWidth; +} +function calculateRealTime(animatingRect, fromRect, toRect, options) { + return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation; +} +var plugins = []; +var defaults = { + initializeByDefault: true +}; +var PluginManager = { + mount: function mount(plugin) { + // Set default static properties + for(var option in defaults)if (defaults.hasOwnProperty(option) && !(option in plugin)) plugin[option] = defaults[option]; + plugins.forEach(function(p) { + if (p.pluginName === plugin.pluginName) throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once"); + }); + plugins.push(plugin); + }, + pluginEvent: function pluginEvent(eventName, sortable, evt) { + var _this = this; + this.eventCanceled = false; + evt.cancel = function() { + _this.eventCanceled = true; + }; + var eventNameGlobal = eventName + 'Global'; + plugins.forEach(function(plugin) { + if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable + if (sortable[plugin.pluginName][eventNameGlobal]) sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({ + sortable: sortable + }, evt)); + // Only fire plugin event if plugin is enabled in this sortable, + // and plugin has event defined + if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) sortable[plugin.pluginName][eventName](_objectSpread2({ + sortable: sortable + }, evt)); + }); + }, + initializePlugins: function initializePlugins(sortable, el, defaults1, options) { + plugins.forEach(function(plugin) { + var pluginName = plugin.pluginName; + if (!sortable.options[pluginName] && !plugin.initializeByDefault) return; + var initialized = new plugin(sortable, el, sortable.options); + initialized.sortable = sortable; + initialized.options = sortable.options; + sortable[pluginName] = initialized; // Add default options from plugin + _extends(defaults1, initialized.defaults); + }); + for(var option in sortable.options){ + if (!sortable.options.hasOwnProperty(option)) continue; + var modified = this.modifyOption(sortable, option, sortable.options[option]); + if (typeof modified !== 'undefined') sortable.options[option] = modified; + } + }, + getEventProperties: function getEventProperties(name, sortable) { + var eventProperties = {}; + plugins.forEach(function(plugin) { + if (typeof plugin.eventProperties !== 'function') return; + _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name)); + }); + return eventProperties; + }, + modifyOption: function modifyOption(sortable, name, value) { + var modifiedValue; + plugins.forEach(function(plugin) { + // Plugin must exist on the Sortable + if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin + if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value); + }); + return modifiedValue; + } +}; +function dispatchEvent(_ref) { + var sortable = _ref.sortable, rootEl1 = _ref.rootEl, name = _ref.name, targetEl = _ref.targetEl, cloneEl1 = _ref.cloneEl, toEl = _ref.toEl, fromEl = _ref.fromEl, oldIndex1 = _ref.oldIndex, newIndex1 = _ref.newIndex, oldDraggableIndex1 = _ref.oldDraggableIndex, newDraggableIndex1 = _ref.newDraggableIndex, originalEvent = _ref.originalEvent, putSortable1 = _ref.putSortable, extraEventProperties = _ref.extraEventProperties; + sortable = sortable || rootEl1 && rootEl1[expando]; + if (!sortable) return; + var evt, options = sortable.options, onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature + if (window.CustomEvent && !IE11OrLess && !Edge) evt = new CustomEvent(name, { + bubbles: true, + cancelable: true + }); + else { + evt = document.createEvent('Event'); + evt.initEvent(name, true, true); + } + evt.to = toEl || rootEl1; + evt.from = fromEl || rootEl1; + evt.item = targetEl || rootEl1; + evt.clone = cloneEl1; + evt.oldIndex = oldIndex1; + evt.newIndex = newIndex1; + evt.oldDraggableIndex = oldDraggableIndex1; + evt.newDraggableIndex = newDraggableIndex1; + evt.originalEvent = originalEvent; + evt.pullMode = putSortable1 ? putSortable1.lastPutMode : undefined; + var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable)); + for(var option in allEventProperties)evt[option] = allEventProperties[option]; + if (rootEl1) rootEl1.dispatchEvent(evt); + if (options[onName]) options[onName].call(sortable, evt); +} +var _excluded = [ + "evt" +]; +var pluginEvent = function pluginEvent(eventName, sortable) { + var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, originalEvent = _ref.evt, data = _objectWithoutProperties(_ref, _excluded); + PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({ + dragEl: dragEl, + parentEl: parentEl, + ghostEl: ghostEl, + rootEl: rootEl, + nextEl: nextEl, + lastDownEl: lastDownEl, + cloneEl: cloneEl, + cloneHidden: cloneHidden, + dragStarted: moved, + putSortable: putSortable, + activeSortable: Sortable.active, + originalEvent: originalEvent, + oldIndex: oldIndex, + oldDraggableIndex: oldDraggableIndex, + newIndex: newIndex, + newDraggableIndex: newDraggableIndex, + hideGhostForTarget: _hideGhostForTarget, + unhideGhostForTarget: _unhideGhostForTarget, + cloneNowHidden: function cloneNowHidden() { + cloneHidden = true; + }, + cloneNowShown: function cloneNowShown() { + cloneHidden = false; + }, + dispatchSortableEvent: function dispatchSortableEvent(name) { + _dispatchEvent({ + sortable: sortable, + name: name, + originalEvent: originalEvent + }); + } + }, data)); +}; +function _dispatchEvent(info) { + dispatchEvent(_objectSpread2({ + putSortable: putSortable, + cloneEl: cloneEl, + targetEl: dragEl, + rootEl: rootEl, + oldIndex: oldIndex, + oldDraggableIndex: oldDraggableIndex, + newIndex: newIndex, + newDraggableIndex: newDraggableIndex + }, info)); +} +var dragEl, parentEl, ghostEl, rootEl, nextEl, lastDownEl, cloneEl, cloneHidden, oldIndex, newIndex, oldDraggableIndex, newDraggableIndex, activeGroup, putSortable, awaitingDragStarted = false, ignoreNextClick = false, sortables = [], tapEvt, touchEvt, lastDx, lastDy, tapDistanceLeft, tapDistanceTop, moved, lastTarget, lastDirection, pastFirstInvertThresh = false, isCircumstantialInvert = false, targetMoveDistance, // For positioning ghost absolutely +ghostRelativeParent, ghostRelativeParentInitialScroll = [], // (left, top) +_silent = false, savedInputChecked = []; +/** @const */ var documentExists = typeof document !== 'undefined', PositionGhostAbsolutely = IOS, CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float', // This will not pass for IE9, because IE9 DnD only works on anchors +supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'), supportCssPointerEvents = function() { + if (!documentExists) return; // false when <= IE11 + if (IE11OrLess) return false; + var el = document.createElement('x'); + el.style.cssText = 'pointer-events:auto'; + return el.style.pointerEvents === 'auto'; +}(), _detectDirection = function _detectDirection(el, options) { + var elCSS = css(el), elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth), child1 = getChild(el, 0, options), child2 = getChild(el, 1, options), firstChildCSS = child1 && css(child1), secondChildCSS = child2 && css(child2), firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width, secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width; + if (elCSS.display === 'flex') return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal'; + if (elCSS.display === 'grid') return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal'; + if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') { + var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right'; + return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal'; + } + return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal'; +}, _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) { + var dragElS1Opp = vertical ? dragRect.left : dragRect.top, dragElS2Opp = vertical ? dragRect.right : dragRect.bottom, dragElOppLength = vertical ? dragRect.width : dragRect.height, targetS1Opp = vertical ? targetRect.left : targetRect.top, targetS2Opp = vertical ? targetRect.right : targetRect.bottom, targetOppLength = vertical ? targetRect.width : targetRect.height; + return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2; +}, /** + * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold. + * @param {Number} x X position + * @param {Number} y Y position + * @return {HTMLElement} Element of the first found nearest Sortable + */ _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) { + var ret; + sortables.some(function(sortable) { + var threshold = sortable[expando].options.emptyInsertThreshold; + if (!threshold || lastChild(sortable)) return; + var rect = getRect(sortable), insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold, insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold; + if (insideHorizontally && insideVertically) return ret = sortable; + }); + return ret; +}, _prepareGroup = function _prepareGroup(options) { + function toFn(value, pull) { + return function(to, from, dragEl1, evt) { + var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name; + if (value == null && (pull || sameGroup)) // Default pull value + // Default pull and put value if same group + return true; + else if (value == null || value === false) return false; + else if (pull && value === 'clone') return value; + else if (typeof value === 'function') return toFn(value(to, from, dragEl1, evt), pull)(to, from, dragEl1, evt); + else { + var otherGroup = (pull ? to : from).options.group.name; + return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1; + } + }; + } + var group = {}; + var originalGroup = options.group; + if (!originalGroup || _typeof(originalGroup) != 'object') originalGroup = { + name: originalGroup + }; + group.name = originalGroup.name; + group.checkPull = toFn(originalGroup.pull, true); + group.checkPut = toFn(originalGroup.put); + group.revertClone = originalGroup.revertClone; + options.group = group; +}, _hideGhostForTarget = function _hideGhostForTarget() { + if (!supportCssPointerEvents && ghostEl) css(ghostEl, 'display', 'none'); +}, _unhideGhostForTarget = function _unhideGhostForTarget() { + if (!supportCssPointerEvents && ghostEl) css(ghostEl, 'display', ''); +}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position +if (documentExists && !ChromeForAndroid) document.addEventListener('click', function(evt) { + if (ignoreNextClick) { + evt.preventDefault(); + evt.stopPropagation && evt.stopPropagation(); + evt.stopImmediatePropagation && evt.stopImmediatePropagation(); + ignoreNextClick = false; + return false; + } +}, true); +var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) { + if (dragEl) { + evt = evt.touches ? evt.touches[0] : evt; + var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY); + if (nearest) { + // Create imitation event + var event = {}; + for(var i in evt)if (evt.hasOwnProperty(i)) event[i] = evt[i]; + event.target = event.rootEl = nearest; + event.preventDefault = void 0; + event.stopPropagation = void 0; + nearest[expando]._onDragOver(event); + } + } +}; +var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) { + if (dragEl) dragEl.parentNode[expando]._isOutsideThisEl(evt.target); +}; +/** + * @class Sortable + * @param {HTMLElement} el + * @param {Object} [options] + */ function Sortable(el, options) { + if (!(el && el.nodeType && el.nodeType === 1)) throw "Sortable: `el` must be an HTMLElement, not ".concat(({}).toString.call(el)); + this.el = el; // root element + this.options = options = _extends({}, options); // Export instance + el[expando] = this; + var defaults2 = { + group: null, + sort: true, + disabled: false, + store: null, + handle: null, + draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*', + swapThreshold: 1, + // percentage; 0 <= x <= 1 + invertSwap: false, + // invert always + invertedSwapThreshold: null, + // will be set to same as swapThreshold if default + removeCloneOnHide: true, + direction: function direction() { + return _detectDirection(el, this.options); + }, + ghostClass: 'sortable-ghost', + chosenClass: 'sortable-chosen', + dragClass: 'sortable-drag', + ignore: 'a, img', + filter: null, + preventOnFilter: true, + animation: 0, + easing: null, + setData: function setData(dataTransfer, dragEl2) { + dataTransfer.setData('Text', dragEl2.textContent); + }, + dropBubble: false, + dragoverBubble: false, + dataIdAttr: 'data-id', + delay: 0, + delayOnTouchOnly: false, + touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1, + forceFallback: false, + fallbackClass: 'sortable-fallback', + fallbackOnBody: false, + fallbackTolerance: 0, + fallbackOffset: { + x: 0, + y: 0 + }, + supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari, + emptyInsertThreshold: 5 + }; + PluginManager.initializePlugins(this, el, defaults2); // Set default options + for(var name in defaults2)!(name in options) && (options[name] = defaults2[name]); + _prepareGroup(options); // Bind all private methods + for(var fn in this)if (fn.charAt(0) === '_' && typeof this[fn] === 'function') this[fn] = this[fn].bind(this); + // Setup drag mode + this.nativeDraggable = options.forceFallback ? false : supportDraggable; + if (this.nativeDraggable) // Touch start threshold cannot be greater than the native dragstart threshold + this.options.touchStartThreshold = 1; + // Bind events + if (options.supportPointer) on(el, 'pointerdown', this._onTapStart); + else { + on(el, 'mousedown', this._onTapStart); + on(el, 'touchstart', this._onTapStart); + } + if (this.nativeDraggable) { + on(el, 'dragover', this); + on(el, 'dragenter', this); + } + sortables.push(this.el); // Restore sorting + options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager + _extends(this, AnimationStateManager()); +} +Sortable.prototype = /** @lends Sortable.prototype */ { + constructor: Sortable, + _isOutsideThisEl: function _isOutsideThisEl(target) { + if (!this.el.contains(target) && target !== this.el) lastTarget = null; + }, + _getDirection: function _getDirection(evt, target) { + return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction; + }, + _onTapStart: function _onTapStart(/** Event|TouchEvent */ evt) { + if (!evt.cancelable) return; + var _this = this, el = this.el, options = this.options, preventOnFilter = options.preventOnFilter, type = evt.type, touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt, target = (touch || evt).target, originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target, filter = options.filter; + _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group. + if (dragEl) return; + if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) return; // only left button and enabled + // cancel dnd if original target is content editable + if (originalTarget.isContentEditable) return; + // Safari ignores further event handling after mousedown + if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') return; + target = closest(target, options.draggable, el, false); + if (target && target.animated) return; + if (lastDownEl === target) // Ignoring duplicate `down` + return; + // Get the index of the dragged element within its parent + oldIndex = index(target); + oldDraggableIndex = index(target, options.draggable); // Check filter + if (typeof filter === 'function') { + if (filter.call(this, evt, target, this)) { + _dispatchEvent({ + sortable: _this, + rootEl: originalTarget, + name: 'filter', + targetEl: target, + toEl: el, + fromEl: el + }); + pluginEvent('filter', _this, { + evt: evt + }); + preventOnFilter && evt.cancelable && evt.preventDefault(); + return; // cancel dnd + } + } else if (filter) { + filter = filter.split(',').some(function(criteria) { + criteria = closest(originalTarget, criteria.trim(), el, false); + if (criteria) { + _dispatchEvent({ + sortable: _this, + rootEl: criteria, + name: 'filter', + targetEl: target, + fromEl: el, + toEl: el + }); + pluginEvent('filter', _this, { + evt: evt + }); + return true; + } + }); + if (filter) { + preventOnFilter && evt.cancelable && evt.preventDefault(); + return; // cancel dnd + } + } + if (options.handle && !closest(originalTarget, options.handle, el, false)) return; + // Prepare `dragstart` + this._prepareDragStart(evt, touch, target); + }, + _prepareDragStart: function _prepareDragStart(/** Event */ evt, /** Touch */ touch, /** HTMLElement */ target) { + var _this = this, el = _this.el, options = _this.options, ownerDocument = el.ownerDocument, dragStartFn; + if (target && !dragEl && target.parentNode === el) { + var dragRect = getRect(target); + rootEl = el; + dragEl = target; + parentEl = dragEl.parentNode; + nextEl = dragEl.nextSibling; + lastDownEl = target; + activeGroup = options.group; + Sortable.dragged = dragEl; + tapEvt = { + target: dragEl, + clientX: (touch || evt).clientX, + clientY: (touch || evt).clientY + }; + tapDistanceLeft = tapEvt.clientX - dragRect.left; + tapDistanceTop = tapEvt.clientY - dragRect.top; + this._lastX = (touch || evt).clientX; + this._lastY = (touch || evt).clientY; + dragEl.style['will-change'] = 'all'; + dragStartFn = function dragStartFn() { + pluginEvent('delayEnded', _this, { + evt: evt + }); + if (Sortable.eventCanceled) { + _this._onDrop(); + return; + } // Delayed drag has been triggered + // we can re-enable the events: touchmove/mousemove + _this._disableDelayedDragEvents(); + if (!FireFox && _this.nativeDraggable) dragEl.draggable = true; + // Bind the events: dragstart/dragend + _this._triggerDragStart(evt, touch); // Drag start event + _dispatchEvent({ + sortable: _this, + name: 'choose', + originalEvent: evt + }); // Chosen item + toggleClass(dragEl, options.chosenClass, true); + }; // Disable "draggable" + options.ignore.split(',').forEach(function(criteria) { + find(dragEl, criteria.trim(), _disableDraggable); + }); + on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent); + on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent); + on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent); + on(ownerDocument, 'mouseup', _this._onDrop); + on(ownerDocument, 'touchend', _this._onDrop); + on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox) + if (FireFox && this.nativeDraggable) { + this.options.touchStartThreshold = 4; + dragEl.draggable = true; + } + pluginEvent('delayStart', this, { + evt: evt + }); // Delay is impossible for native DnD in Edge or IE + if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) { + if (Sortable.eventCanceled) { + this._onDrop(); + return; + } // If the user moves the pointer or let go the click or touch + // before the delay has been reached: + // disable the delayed drag + on(ownerDocument, 'mouseup', _this._disableDelayedDrag); + on(ownerDocument, 'touchend', _this._disableDelayedDrag); + on(ownerDocument, 'touchcancel', _this._disableDelayedDrag); + on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler); + on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler); + options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler); + _this._dragStartTimer = setTimeout(dragStartFn, options.delay); + } else dragStartFn(); + } + }, + _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(/** TouchEvent|PointerEvent **/ e) { + var touch = e.touches ? e.touches[0] : e; + if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) this._disableDelayedDrag(); + }, + _disableDelayedDrag: function _disableDelayedDrag() { + dragEl && _disableDraggable(dragEl); + clearTimeout(this._dragStartTimer); + this._disableDelayedDragEvents(); + }, + _disableDelayedDragEvents: function _disableDelayedDragEvents() { + var ownerDocument = this.el.ownerDocument; + off(ownerDocument, 'mouseup', this._disableDelayedDrag); + off(ownerDocument, 'touchend', this._disableDelayedDrag); + off(ownerDocument, 'touchcancel', this._disableDelayedDrag); + off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler); + off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler); + off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler); + }, + _triggerDragStart: function _triggerDragStart(/** Event */ evt, /** Touch */ touch) { + touch = touch || evt.pointerType == 'touch' && evt; + if (!this.nativeDraggable || touch) { + if (this.options.supportPointer) on(document, 'pointermove', this._onTouchMove); + else if (touch) on(document, 'touchmove', this._onTouchMove); + else on(document, 'mousemove', this._onTouchMove); + } else { + on(dragEl, 'dragend', this); + on(rootEl, 'dragstart', this._onDragStart); + } + try { + if (document.selection) // Timeout neccessary for IE9 + _nextTick(function() { + document.selection.empty(); + }); + else window.getSelection().removeAllRanges(); + } catch (err) {} + }, + _dragStarted: function _dragStarted(fallback, evt) { + awaitingDragStarted = false; + if (rootEl && dragEl) { + pluginEvent('dragStarted', this, { + evt: evt + }); + if (this.nativeDraggable) on(document, 'dragover', _checkOutsideTargetEl); + var options = this.options; // Apply effect + !fallback && toggleClass(dragEl, options.dragClass, false); + toggleClass(dragEl, options.ghostClass, true); + Sortable.active = this; + fallback && this._appendGhost(); // Drag start event + _dispatchEvent({ + sortable: this, + name: 'start', + originalEvent: evt + }); + } else this._nulling(); + }, + _emulateDragOver: function _emulateDragOver() { + if (touchEvt) { + this._lastX = touchEvt.clientX; + this._lastY = touchEvt.clientY; + _hideGhostForTarget(); + var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY); + var parent = target; + while(target && target.shadowRoot){ + target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY); + if (target === parent) break; + parent = target; + } + dragEl.parentNode[expando]._isOutsideThisEl(target); + if (parent) do { + if (parent[expando]) { + var inserted = void 0; + inserted = parent[expando]._onDragOver({ + clientX: touchEvt.clientX, + clientY: touchEvt.clientY, + target: target, + rootEl: parent + }); + if (inserted && !this.options.dragoverBubble) break; + } + target = parent; // store last element + }while (parent = parent.parentNode) + _unhideGhostForTarget(); + } + }, + _onTouchMove: function _onTouchMove(/**TouchEvent*/ evt) { + if (tapEvt) { + var options = this.options, fallbackTolerance = options.fallbackTolerance, fallbackOffset = options.fallbackOffset, touch = evt.touches ? evt.touches[0] : evt, ghostMatrix = ghostEl && matrix(ghostEl, true), scaleX = ghostEl && ghostMatrix && ghostMatrix.a, scaleY = ghostEl && ghostMatrix && ghostMatrix.d, relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent), dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1), dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging + if (!Sortable.active && !awaitingDragStarted) { + if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) return; + this._onDragStart(evt, true); + } + if (ghostEl) { + if (ghostMatrix) { + ghostMatrix.e += dx - (lastDx || 0); + ghostMatrix.f += dy - (lastDy || 0); + } else ghostMatrix = { + a: 1, + b: 0, + c: 0, + d: 1, + e: dx, + f: dy + }; + var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")"); + css(ghostEl, 'webkitTransform', cssMatrix); + css(ghostEl, 'mozTransform', cssMatrix); + css(ghostEl, 'msTransform', cssMatrix); + css(ghostEl, 'transform', cssMatrix); + lastDx = dx; + lastDy = dy; + touchEvt = touch; + } + evt.cancelable && evt.preventDefault(); + } + }, + _appendGhost: function _appendGhost() { + // Bug if using scale(): https://stackoverflow.com/questions/2637058 + // Not being adjusted for + if (!ghostEl) { + var container = this.options.fallbackOnBody ? document.body : rootEl, rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container), options = this.options; // Position absolutely + if (PositionGhostAbsolutely) { + // Get relatively positioned parent + ghostRelativeParent = container; + while(css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document)ghostRelativeParent = ghostRelativeParent.parentNode; + if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) { + if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement(); + rect.top += ghostRelativeParent.scrollTop; + rect.left += ghostRelativeParent.scrollLeft; + } else ghostRelativeParent = getWindowScrollingElement(); + ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent); + } + ghostEl = dragEl.cloneNode(true); + toggleClass(ghostEl, options.ghostClass, false); + toggleClass(ghostEl, options.fallbackClass, true); + toggleClass(ghostEl, options.dragClass, true); + css(ghostEl, 'transition', ''); + css(ghostEl, 'transform', ''); + css(ghostEl, 'box-sizing', 'border-box'); + css(ghostEl, 'margin', 0); + css(ghostEl, 'top', rect.top); + css(ghostEl, 'left', rect.left); + css(ghostEl, 'width', rect.width); + css(ghostEl, 'height', rect.height); + css(ghostEl, 'opacity', '0.8'); + css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed'); + css(ghostEl, 'zIndex', '100000'); + css(ghostEl, 'pointerEvents', 'none'); + Sortable.ghost = ghostEl; + container.appendChild(ghostEl); // Set transform-origin + css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%'); + } + }, + _onDragStart: function _onDragStart(/**Event*/ evt, /**boolean*/ fallback) { + var _this = this; + var dataTransfer = evt.dataTransfer; + var options = _this.options; + pluginEvent('dragStart', this, { + evt: evt + }); + if (Sortable.eventCanceled) { + this._onDrop(); + return; + } + pluginEvent('setupClone', this); + if (!Sortable.eventCanceled) { + cloneEl = clone(dragEl); + cloneEl.removeAttribute("id"); + cloneEl.draggable = false; + cloneEl.style['will-change'] = ''; + this._hideClone(); + toggleClass(cloneEl, this.options.chosenClass, false); + Sortable.clone = cloneEl; + } // #1143: IFrame support workaround + _this.cloneId = _nextTick(function() { + pluginEvent('clone', _this); + if (Sortable.eventCanceled) return; + if (!_this.options.removeCloneOnHide) rootEl.insertBefore(cloneEl, dragEl); + _this._hideClone(); + _dispatchEvent({ + sortable: _this, + name: 'clone' + }); + }); + !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events + if (fallback) { + ignoreNextClick = true; + _this._loopId = setInterval(_this._emulateDragOver, 50); + } else { + // Undo what was set in _prepareDragStart before drag started + off(document, 'mouseup', _this._onDrop); + off(document, 'touchend', _this._onDrop); + off(document, 'touchcancel', _this._onDrop); + if (dataTransfer) { + dataTransfer.effectAllowed = 'move'; + options.setData && options.setData.call(_this, dataTransfer, dragEl); + } + on(document, 'drop', _this); // #1276 fix: + css(dragEl, 'transform', 'translateZ(0)'); + } + awaitingDragStarted = true; + _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt)); + on(document, 'selectstart', _this); + moved = true; + if (Safari) css(document.body, 'user-select', 'none'); + }, + // Returns true - if no further action is needed (either inserted or another condition) + _onDragOver: function _onDragOver(/**Event*/ evt) { + var el = this.el, target1 = evt.target, dragRect, targetRect, revert, options = this.options, group = options.group, activeSortable = Sortable.active, isOwner = activeGroup === group, canSort = options.sort, fromSortable = putSortable || activeSortable, vertical, _this = this, completedFired = false; + if (_silent) return; + function dragOverEvent(name, extra) { + pluginEvent(name, _this, _objectSpread2({ + evt: evt, + isOwner: isOwner, + axis: vertical ? 'vertical' : 'horizontal', + revert: revert, + dragRect: dragRect, + targetRect: targetRect, + canSort: canSort, + fromSortable: fromSortable, + target: target1, + completed: completed, + onMove: function onMove(target, after) { + return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after); + }, + changed: changed + }, extra)); + } // Capture animation state + function capture() { + dragOverEvent('dragOverAnimationCapture'); + _this.captureAnimationState(); + if (_this !== fromSortable) fromSortable.captureAnimationState(); + } // Return invocation when dragEl is inserted (or completed) + function completed(insertion) { + dragOverEvent('dragOverCompleted', { + insertion: insertion + }); + if (insertion) { + // Clones must be hidden before folding animation to capture dragRectAbsolute properly + if (isOwner) activeSortable._hideClone(); + else activeSortable._showClone(_this); + if (_this !== fromSortable) { + // Set ghost class to new sortable's ghost class + toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false); + toggleClass(dragEl, options.ghostClass, true); + } + if (putSortable !== _this && _this !== Sortable.active) putSortable = _this; + else if (_this === Sortable.active && putSortable) putSortable = null; + // Animation + if (fromSortable === _this) _this._ignoreWhileAnimating = target1; + _this.animateAll(function() { + dragOverEvent('dragOverAnimationComplete'); + _this._ignoreWhileAnimating = null; + }); + if (_this !== fromSortable) { + fromSortable.animateAll(); + fromSortable._ignoreWhileAnimating = null; + } + } // Null lastTarget if it is not inside a previously swapped element + if (target1 === dragEl && !dragEl.animated || target1 === el && !target1.animated) lastTarget = null; + // no bubbling and not fallback + if (!options.dragoverBubble && !evt.rootEl && target1 !== document) { + dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted + !insertion && nearestEmptyInsertDetectEvent(evt); + } + !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation(); + return completedFired = true; + } // Call when dragEl has been inserted + function changed() { + newIndex = index(dragEl); + newDraggableIndex = index(dragEl, options.draggable); + _dispatchEvent({ + sortable: _this, + name: 'change', + toEl: el, + newIndex: newIndex, + newDraggableIndex: newDraggableIndex, + originalEvent: evt + }); + } + if (evt.preventDefault !== void 0) evt.cancelable && evt.preventDefault(); + target1 = closest(target1, options.draggable, el, true); + dragOverEvent('dragOver'); + if (Sortable.eventCanceled) return completedFired; + if (dragEl.contains(evt.target) || target1.animated && target1.animatingX && target1.animatingY || _this._ignoreWhileAnimating === target1) return completed(false); + ignoreNextClick = false; + if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl // Reverting item into the original list + ) : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) { + vertical = this._getDirection(evt, target1) === 'vertical'; + dragRect = getRect(dragEl); + dragOverEvent('dragOverValid'); + if (Sortable.eventCanceled) return completedFired; + if (revert) { + parentEl = rootEl; // actualization + capture(); + this._hideClone(); + dragOverEvent('revert'); + if (!Sortable.eventCanceled) { + if (nextEl) rootEl.insertBefore(dragEl, nextEl); + else rootEl.appendChild(dragEl); + } + return completed(true); + } + var elLastChild = lastChild(el, options.draggable); + if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) { + // Insert to end of list + // If already at end of list: Do not insert + if (elLastChild === dragEl) return completed(false); + // if there is a last element, it is the target + if (elLastChild && el === evt.target) target1 = elLastChild; + if (target1) targetRect = getRect(target1); + if (_onMove(rootEl, el, dragEl, dragRect, target1, targetRect, evt, !!target1) !== false) { + capture(); + if (elLastChild && elLastChild.nextSibling) // the last draggable element is not the last node + el.insertBefore(dragEl, elLastChild.nextSibling); + else el.appendChild(dragEl); + parentEl = el; // actualization + changed(); + return completed(true); + } + } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) { + // Insert to start of list + var firstChild = getChild(el, 0, options, true); + if (firstChild === dragEl) return completed(false); + target1 = firstChild; + targetRect = getRect(target1); + if (_onMove(rootEl, el, dragEl, dragRect, target1, targetRect, evt, false) !== false) { + capture(); + el.insertBefore(dragEl, firstChild); + parentEl = el; // actualization + changed(); + return completed(true); + } + } else if (target1.parentNode === el) { + targetRect = getRect(target1); + var direction = 0, targetBeforeFirstSwap, differentLevel = dragEl.parentNode !== el, differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target1.animated && target1.toRect || targetRect, vertical), side1 = vertical ? 'top' : 'left', scrolledPastTop = isScrolledPast(target1, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'), scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0; + if (lastTarget !== target1) { + targetBeforeFirstSwap = targetRect[side1]; + pastFirstInvertThresh = false; + isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel; + } + direction = _getSwapDirection(evt, target1, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target1); + var sibling; + if (direction !== 0) { + // Check if target is beside dragEl in respective direction (ignoring hidden elements) + var dragIndex = index(dragEl); + do { + dragIndex -= direction; + sibling = parentEl.children[dragIndex]; + }while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl)) + } // If dragEl is already beside target: Do not insert + if (direction === 0 || sibling === target1) return completed(false); + lastTarget = target1; + lastDirection = direction; + var nextSibling = target1.nextElementSibling, after1 = false; + after1 = direction === 1; + var moveVector = _onMove(rootEl, el, dragEl, dragRect, target1, targetRect, evt, after1); + if (moveVector !== false) { + if (moveVector === 1 || moveVector === -1) after1 = moveVector === 1; + _silent = true; + setTimeout(_unsilent, 30); + capture(); + if (after1 && !nextSibling) el.appendChild(dragEl); + else target1.parentNode.insertBefore(dragEl, after1 ? nextSibling : target1); + // Undo chrome's scroll adjustment (has no effect on other browsers) + if (scrolledPastTop) scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop); + parentEl = dragEl.parentNode; // actualization + // must be done before animation + if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target1)[side1]); + changed(); + return completed(true); + } + } + if (el.contains(dragEl)) return completed(false); + } + return false; + }, + _ignoreWhileAnimating: null, + _offMoveEvents: function _offMoveEvents() { + off(document, 'mousemove', this._onTouchMove); + off(document, 'touchmove', this._onTouchMove); + off(document, 'pointermove', this._onTouchMove); + off(document, 'dragover', nearestEmptyInsertDetectEvent); + off(document, 'mousemove', nearestEmptyInsertDetectEvent); + off(document, 'touchmove', nearestEmptyInsertDetectEvent); + }, + _offUpEvents: function _offUpEvents() { + var ownerDocument = this.el.ownerDocument; + off(ownerDocument, 'mouseup', this._onDrop); + off(ownerDocument, 'touchend', this._onDrop); + off(ownerDocument, 'pointerup', this._onDrop); + off(ownerDocument, 'touchcancel', this._onDrop); + off(document, 'selectstart', this); + }, + _onDrop: function _onDrop(/**Event*/ evt) { + var el = this.el, options = this.options; // Get the index of the dragged element within its parent + newIndex = index(dragEl); + newDraggableIndex = index(dragEl, options.draggable); + pluginEvent('drop', this, { + evt: evt + }); + parentEl = dragEl && dragEl.parentNode; // Get again after plugin event + newIndex = index(dragEl); + newDraggableIndex = index(dragEl, options.draggable); + if (Sortable.eventCanceled) { + this._nulling(); + return; + } + awaitingDragStarted = false; + isCircumstantialInvert = false; + pastFirstInvertThresh = false; + clearInterval(this._loopId); + clearTimeout(this._dragStartTimer); + _cancelNextTick(this.cloneId); + _cancelNextTick(this._dragStartId); // Unbind events + if (this.nativeDraggable) { + off(document, 'drop', this); + off(el, 'dragstart', this._onDragStart); + } + this._offMoveEvents(); + this._offUpEvents(); + if (Safari) css(document.body, 'user-select', ''); + css(dragEl, 'transform', ''); + if (evt) { + if (moved) { + evt.cancelable && evt.preventDefault(); + !options.dropBubble && evt.stopPropagation(); + } + ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl); + if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') // Remove clone(s) + cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl); + if (dragEl) { + if (this.nativeDraggable) off(dragEl, 'dragend', this); + _disableDraggable(dragEl); + dragEl.style['will-change'] = ''; // Remove classes + // ghostClass is added in dragStarted + if (moved && !awaitingDragStarted) toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false); + toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event + _dispatchEvent({ + sortable: this, + name: 'unchoose', + toEl: parentEl, + newIndex: null, + newDraggableIndex: null, + originalEvent: evt + }); + if (rootEl !== parentEl) { + if (newIndex >= 0) { + // Add event + _dispatchEvent({ + rootEl: parentEl, + name: 'add', + toEl: parentEl, + fromEl: rootEl, + originalEvent: evt + }); // Remove event + _dispatchEvent({ + sortable: this, + name: 'remove', + toEl: parentEl, + originalEvent: evt + }); // drag from one list and drop into another + _dispatchEvent({ + rootEl: parentEl, + name: 'sort', + toEl: parentEl, + fromEl: rootEl, + originalEvent: evt + }); + _dispatchEvent({ + sortable: this, + name: 'sort', + toEl: parentEl, + originalEvent: evt + }); + } + putSortable && putSortable.save(); + } else { + if (newIndex !== oldIndex) { + if (newIndex >= 0) { + // drag & drop within the same list + _dispatchEvent({ + sortable: this, + name: 'update', + toEl: parentEl, + originalEvent: evt + }); + _dispatchEvent({ + sortable: this, + name: 'sort', + toEl: parentEl, + originalEvent: evt + }); + } + } + } + if (Sortable.active) { + /* jshint eqnull:true */ if (newIndex == null || newIndex === -1) { + newIndex = oldIndex; + newDraggableIndex = oldDraggableIndex; + } + _dispatchEvent({ + sortable: this, + name: 'end', + toEl: parentEl, + originalEvent: evt + }); // Save sorting + this.save(); + } + } + } + this._nulling(); + }, + _nulling: function _nulling() { + pluginEvent('nulling', this); + rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null; + savedInputChecked.forEach(function(el) { + el.checked = true; + }); + savedInputChecked.length = lastDx = lastDy = 0; + }, + handleEvent: function handleEvent(/**Event*/ evt) { + switch(evt.type){ + case 'drop': + case 'dragend': + this._onDrop(evt); + break; + case 'dragenter': + case 'dragover': + if (dragEl) { + this._onDragOver(evt); + _globalDragOver(evt); + } + break; + case 'selectstart': + evt.preventDefault(); + break; + } + }, + /** + * Serializes the item into an array of string. + * @returns {String[]} + */ toArray: function toArray() { + var order = [], el, children = this.el.children, i = 0, n = children.length, options = this.options; + for(; i < n; i++){ + el = children[i]; + if (closest(el, options.draggable, this.el, false)) order.push(el.getAttribute(options.dataIdAttr) || _generateId(el)); + } + return order; + }, + /** + * Sorts the elements according to the array. + * @param {String[]} order order of the items + */ sort: function sort(order, useAnimation) { + var items = {}, rootEl2 = this.el; + this.toArray().forEach(function(id, i) { + var el = rootEl2.children[i]; + if (closest(el, this.options.draggable, rootEl2, false)) items[id] = el; + }, this); + useAnimation && this.captureAnimationState(); + order.forEach(function(id) { + if (items[id]) { + rootEl2.removeChild(items[id]); + rootEl2.appendChild(items[id]); + } + }); + useAnimation && this.animateAll(); + }, + /** + * Save the current sorting + */ save: function save() { + var store = this.options.store; + store && store.set && store.set(this); + }, + /** + * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. + * @param {HTMLElement} el + * @param {String} [selector] default: `options.draggable` + * @returns {HTMLElement|null} + */ closest: function closest$1(el, selector) { + return closest(el, selector || this.options.draggable, this.el, false); + }, + /** + * Set/get option + * @param {string} name + * @param {*} [value] + * @returns {*} + */ option: function option(name, value) { + var options = this.options; + if (value === void 0) return options[name]; + else { + var modifiedValue = PluginManager.modifyOption(this, name, value); + if (typeof modifiedValue !== 'undefined') options[name] = modifiedValue; + else options[name] = value; + if (name === 'group') _prepareGroup(options); + } + }, + /** + * Destroy + */ destroy: function destroy() { + pluginEvent('destroy', this); + var el1 = this.el; + el1[expando] = null; + off(el1, 'mousedown', this._onTapStart); + off(el1, 'touchstart', this._onTapStart); + off(el1, 'pointerdown', this._onTapStart); + if (this.nativeDraggable) { + off(el1, 'dragover', this); + off(el1, 'dragenter', this); + } // Remove draggable attributes + Array.prototype.forEach.call(el1.querySelectorAll('[draggable]'), function(el) { + el.removeAttribute('draggable'); + }); + this._onDrop(); + this._disableDelayedDragEvents(); + sortables.splice(sortables.indexOf(this.el), 1); + this.el = el1 = null; + }, + _hideClone: function _hideClone() { + if (!cloneHidden) { + pluginEvent('hideClone', this); + if (Sortable.eventCanceled) return; + css(cloneEl, 'display', 'none'); + if (this.options.removeCloneOnHide && cloneEl.parentNode) cloneEl.parentNode.removeChild(cloneEl); + cloneHidden = true; + } + }, + _showClone: function _showClone(putSortable2) { + if (putSortable2.lastPutMode !== 'clone') { + this._hideClone(); + return; + } + if (cloneHidden) { + pluginEvent('showClone', this); + if (Sortable.eventCanceled) return; // show clone at dragEl or original position + if (dragEl.parentNode == rootEl && !this.options.group.revertClone) rootEl.insertBefore(cloneEl, dragEl); + else if (nextEl) rootEl.insertBefore(cloneEl, nextEl); + else rootEl.appendChild(cloneEl); + if (this.options.group.revertClone) this.animate(dragEl, cloneEl); + css(cloneEl, 'display', ''); + cloneHidden = false; + } + } +}; +function _globalDragOver(/**Event*/ evt) { + if (evt.dataTransfer) evt.dataTransfer.dropEffect = 'move'; + evt.cancelable && evt.preventDefault(); +} +function _onMove(fromEl, toEl, dragEl3, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) { + var evt, sortable = fromEl[expando], onMoveFn = sortable.options.onMove, retVal; // Support for new CustomEvent feature + if (window.CustomEvent && !IE11OrLess && !Edge) evt = new CustomEvent('move', { + bubbles: true, + cancelable: true + }); + else { + evt = document.createEvent('Event'); + evt.initEvent('move', true, true); + } + evt.to = toEl; + evt.from = fromEl; + evt.dragged = dragEl3; + evt.draggedRect = dragRect; + evt.related = targetEl || toEl; + evt.relatedRect = targetRect || getRect(toEl); + evt.willInsertAfter = willInsertAfter; + evt.originalEvent = originalEvent; + fromEl.dispatchEvent(evt); + if (onMoveFn) retVal = onMoveFn.call(sortable, evt, originalEvent); + return retVal; +} +function _disableDraggable(el) { + el.draggable = false; +} +function _unsilent() { + _silent = false; +} +function _ghostIsFirst(evt, vertical, sortable) { + var rect = getRect(getChild(sortable.el, 0, sortable.options, true)); + var spacer = 10; + return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left; +} +function _ghostIsLast(evt, vertical, sortable) { + var rect = getRect(lastChild(sortable.el, sortable.options.draggable)); + var spacer = 10; + return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer; +} +function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) { + var mouseOnAxis = vertical ? evt.clientY : evt.clientX, targetLength = vertical ? targetRect.height : targetRect.width, targetS1 = vertical ? targetRect.top : targetRect.left, targetS2 = vertical ? targetRect.bottom : targetRect.right, invert = false; + if (!invertSwap) { + // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold + if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) { + // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2 + // check if past first invert threshold on side opposite of lastDirection + if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) // past first invert threshold, do not restrict inverted threshold to dragEl shadow + pastFirstInvertThresh = true; + if (!pastFirstInvertThresh) { + // dragEl shadow (target move distance shadow) + if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow + : mouseOnAxis > targetS2 - targetMoveDistance) return -lastDirection; + } else invert = true; + } else { + // Regular + if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) return _getInsertDirection(target); + } + } + invert = invert || invertSwap; + if (invert) { + // Invert of regular + if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1; + } + return 0; +} +/** + * Gets the direction dragEl must be swapped relative to target in order to make it + * seem that dragEl has been "inserted" into that element's position + * @param {HTMLElement} target The target whose position dragEl is being inserted at + * @return {Number} Direction dragEl must be swapped + */ function _getInsertDirection(target) { + if (index(dragEl) < index(target)) return 1; + else return -1; +} +/** + * Generate id + * @param {HTMLElement} el + * @returns {String} + * @private + */ function _generateId(el) { + var str = el.tagName + el.className + el.src + el.href + el.textContent, i = str.length, sum = 0; + while(i--)sum += str.charCodeAt(i); + return sum.toString(36); +} +function _saveInputCheckedState(root) { + savedInputChecked.length = 0; + var inputs = root.getElementsByTagName('input'); + var idx = inputs.length; + while(idx--){ + var el = inputs[idx]; + el.checked && savedInputChecked.push(el); + } +} +function _nextTick(fn) { + return setTimeout(fn, 0); +} +function _cancelNextTick(id) { + return clearTimeout(id); +} // Fixed #973: +if (documentExists) on(document, 'touchmove', function(evt) { + if ((Sortable.active || awaitingDragStarted) && evt.cancelable) evt.preventDefault(); +}); + // Export utils +Sortable.utils = { + on: on, + off: off, + css: css, + find: find, + is: function is(el, selector) { + return !!closest(el, selector, el, false); + }, + extend: extend, + throttle: throttle, + closest: closest, + toggleClass: toggleClass, + clone: clone, + index: index, + nextTick: _nextTick, + cancelNextTick: _cancelNextTick, + detectDirection: _detectDirection, + getChild: getChild +}; +/** + * Get the Sortable instance of an element + * @param {HTMLElement} element The element + * @return {Sortable|undefined} The instance of Sortable + */ Sortable.get = function(element) { + return element[expando]; +}; +/** + * Mount a plugin to Sortable + * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted + */ Sortable.mount = function() { + for(var _len = arguments.length, plugins1 = new Array(_len), _key = 0; _key < _len; _key++)plugins1[_key] = arguments[_key]; + if (plugins1[0].constructor === Array) plugins1 = plugins1[0]; + plugins1.forEach(function(plugin) { + if (!plugin.prototype || !plugin.prototype.constructor) throw "Sortable: Mounted plugin must be a constructor function, not ".concat(({}).toString.call(plugin)); + if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils); + PluginManager.mount(plugin); + }); +}; +/** + * Create sortable instance + * @param {HTMLElement} el + * @param {Object} [options] + */ Sortable.create = function(el, options) { + return new Sortable(el, options); +}; // Export +Sortable.version = version; +var autoScrolls = [], scrollEl, scrollRootEl, scrolling = false, lastAutoScrollX, lastAutoScrollY, touchEvt$1, pointerElemChangedInterval; +function AutoScrollPlugin() { + function AutoScroll() { + this.defaults = { + scroll: true, + forceAutoScrollFallback: false, + scrollSensitivity: 30, + scrollSpeed: 10, + bubbleScroll: true + }; // Bind all private methods + for(var fn in this)if (fn.charAt(0) === '_' && typeof this[fn] === 'function') this[fn] = this[fn].bind(this); + } + AutoScroll.prototype = { + dragStarted: function dragStarted(_ref) { + var originalEvent = _ref.originalEvent; + if (this.sortable.nativeDraggable) on(document, 'dragover', this._handleAutoScroll); + else { + if (this.options.supportPointer) on(document, 'pointermove', this._handleFallbackAutoScroll); + else if (originalEvent.touches) on(document, 'touchmove', this._handleFallbackAutoScroll); + else on(document, 'mousemove', this._handleFallbackAutoScroll); + } + }, + dragOverCompleted: function dragOverCompleted(_ref2) { + var originalEvent = _ref2.originalEvent; + // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached) + if (!this.options.dragOverBubble && !originalEvent.rootEl) this._handleAutoScroll(originalEvent); + }, + drop: function drop() { + if (this.sortable.nativeDraggable) off(document, 'dragover', this._handleAutoScroll); + else { + off(document, 'pointermove', this._handleFallbackAutoScroll); + off(document, 'touchmove', this._handleFallbackAutoScroll); + off(document, 'mousemove', this._handleFallbackAutoScroll); + } + clearPointerElemChangedInterval(); + clearAutoScrolls(); + cancelThrottle(); + }, + nulling: function nulling() { + touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null; + autoScrolls.length = 0; + }, + _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) { + this._handleAutoScroll(evt, true); + }, + _handleAutoScroll: function _handleAutoScroll(evt, fallback) { + var _this = this; + var x = (evt.touches ? evt.touches[0] : evt).clientX, y = (evt.touches ? evt.touches[0] : evt).clientY, elem = document.elementFromPoint(x, y); + touchEvt$1 = evt; // IE does not seem to have native autoscroll, + // Edge's autoscroll seems too conditional, + // MACOS Safari does not have autoscroll, + // Firefox and Chrome are good + if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) { + autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change + var ogElemScroller = getParentAutoScrollElement(elem, true); + if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) { + pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour + pointerElemChangedInterval = setInterval(function() { + var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true); + if (newElem !== ogElemScroller) { + ogElemScroller = newElem; + clearAutoScrolls(); + } + autoScroll(evt, _this.options, newElem, fallback); + }, 10); + lastAutoScrollX = x; + lastAutoScrollY = y; + } + } else { + // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll + if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) { + clearAutoScrolls(); + return; + } + autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false); + } + } + }; + return _extends(AutoScroll, { + pluginName: 'scroll', + initializeByDefault: true + }); +} +function clearAutoScrolls() { + autoScrolls.forEach(function(autoScroll1) { + clearInterval(autoScroll1.pid); + }); + autoScrolls = []; +} +function clearPointerElemChangedInterval() { + clearInterval(pointerElemChangedInterval); +} +var autoScroll = throttle(function(evt, options, rootEl3, isFallback) { + // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521 + if (!options.scroll) return; + var x = (evt.touches ? evt.touches[0] : evt).clientX, y = (evt.touches ? evt.touches[0] : evt).clientY, sens = options.scrollSensitivity, speed = options.scrollSpeed, winScroller = getWindowScrollingElement(); + var scrollThisInstance = false, scrollCustomFn; // New scroll root, set scrollEl + if (scrollRootEl !== rootEl3) { + scrollRootEl = rootEl3; + clearAutoScrolls(); + scrollEl = options.scroll; + scrollCustomFn = options.scrollFn; + if (scrollEl === true) scrollEl = getParentAutoScrollElement(rootEl3, true); + } + var layersOut = 0; + var currentParent = scrollEl; + do { + var el = currentParent, rect = getRect(el), top = rect.top, bottom = rect.bottom, left = rect.left, right = rect.right, width = rect.width, height = rect.height, canScrollX = void 0, canScrollY = void 0, scrollWidth = el.scrollWidth, scrollHeight = el.scrollHeight, elCSS = css(el), scrollPosX = el.scrollLeft, scrollPosY = el.scrollTop; + if (el === winScroller) { + canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible'); + canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible'); + } else { + canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll'); + canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll'); + } + var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX); + var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY); + if (!autoScrolls[layersOut]) { + for(var i = 0; i <= layersOut; i++)if (!autoScrolls[i]) autoScrolls[i] = {}; + } + if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) { + autoScrolls[layersOut].el = el; + autoScrolls[layersOut].vx = vx; + autoScrolls[layersOut].vy = vy; + clearInterval(autoScrolls[layersOut].pid); + if (vx != 0 || vy != 0) { + scrollThisInstance = true; + /* jshint loopfunc:true */ autoScrolls[layersOut].pid = setInterval((function() { + // emulate drag over during autoscroll (fallback), emulating native DnD behaviour + if (isFallback && this.layer === 0) Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely + var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0; + var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0; + if (typeof scrollCustomFn === 'function') { + if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') return; + } + scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY); + }).bind({ + layer: layersOut + }), 24); + } + } + layersOut++; + }while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false))) + scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not +}, 30); +var drop = function drop(_ref) { + var originalEvent = _ref.originalEvent, putSortable3 = _ref.putSortable, dragEl4 = _ref.dragEl, activeSortable = _ref.activeSortable, dispatchSortableEvent = _ref.dispatchSortableEvent, hideGhostForTarget = _ref.hideGhostForTarget, unhideGhostForTarget = _ref.unhideGhostForTarget; + if (!originalEvent) return; + var toSortable = putSortable3 || activeSortable; + hideGhostForTarget(); + var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent; + var target = document.elementFromPoint(touch.clientX, touch.clientY); + unhideGhostForTarget(); + if (toSortable && !toSortable.el.contains(target)) { + dispatchSortableEvent('spill'); + this.onSpill({ + dragEl: dragEl4, + putSortable: putSortable3 + }); + } +}; +function Revert() {} +Revert.prototype = { + startIndex: null, + dragStart: function dragStart(_ref2) { + var oldDraggableIndex2 = _ref2.oldDraggableIndex; + this.startIndex = oldDraggableIndex2; + }, + onSpill: function onSpill(_ref3) { + var dragEl5 = _ref3.dragEl, putSortable4 = _ref3.putSortable; + this.sortable.captureAnimationState(); + if (putSortable4) putSortable4.captureAnimationState(); + var nextSibling = getChild(this.sortable.el, this.startIndex, this.options); + if (nextSibling) this.sortable.el.insertBefore(dragEl5, nextSibling); + else this.sortable.el.appendChild(dragEl5); + this.sortable.animateAll(); + if (putSortable4) putSortable4.animateAll(); + }, + drop: drop +}; +_extends(Revert, { + pluginName: 'revertOnSpill' +}); +function Remove() {} +Remove.prototype = { + onSpill: function onSpill(_ref4) { + var dragEl6 = _ref4.dragEl, putSortable5 = _ref4.putSortable; + var parentSortable = putSortable5 || this.sortable; + parentSortable.captureAnimationState(); + dragEl6.parentNode && dragEl6.parentNode.removeChild(dragEl6); + parentSortable.animateAll(); + }, + drop: drop +}; +_extends(Remove, { + pluginName: 'removeOnSpill' +}); +var lastSwapEl; +function SwapPlugin() { + function Swap() { + this.defaults = { + swapClass: 'sortable-swap-highlight' + }; + } + Swap.prototype = { + dragStart: function dragStart(_ref) { + var dragEl7 = _ref.dragEl; + lastSwapEl = dragEl7; + }, + dragOverValid: function dragOverValid(_ref2) { + var completed = _ref2.completed, target = _ref2.target, onMove = _ref2.onMove, activeSortable = _ref2.activeSortable, changed = _ref2.changed, cancel = _ref2.cancel; + if (!activeSortable.options.swap) return; + var el = this.sortable.el, options = this.options; + if (target && target !== el) { + var prevSwapEl = lastSwapEl; + if (onMove(target) !== false) { + toggleClass(target, options.swapClass, true); + lastSwapEl = target; + } else lastSwapEl = null; + if (prevSwapEl && prevSwapEl !== lastSwapEl) toggleClass(prevSwapEl, options.swapClass, false); + } + changed(); + completed(true); + cancel(); + }, + drop: function drop(_ref3) { + var activeSortable = _ref3.activeSortable, putSortable6 = _ref3.putSortable, dragEl8 = _ref3.dragEl; + var toSortable = putSortable6 || this.sortable; + var options = this.options; + lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false); + if (lastSwapEl && (options.swap || putSortable6 && putSortable6.options.swap)) { + if (dragEl8 !== lastSwapEl) { + toSortable.captureAnimationState(); + if (toSortable !== activeSortable) activeSortable.captureAnimationState(); + swapNodes(dragEl8, lastSwapEl); + toSortable.animateAll(); + if (toSortable !== activeSortable) activeSortable.animateAll(); + } + } + }, + nulling: function nulling() { + lastSwapEl = null; + } + }; + return _extends(Swap, { + pluginName: 'swap', + eventProperties: function eventProperties() { + return { + swapItem: lastSwapEl + }; + } + }); +} +function swapNodes(n1, n2) { + var p1 = n1.parentNode, p2 = n2.parentNode, i1, i2; + if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return; + i1 = index(n1); + i2 = index(n2); + if (p1.isEqualNode(p2) && i1 < i2) i2++; + p1.insertBefore(n2, p1.children[i1]); + p2.insertBefore(n1, p2.children[i2]); +} +var multiDragElements = [], multiDragClones = [], lastMultiDragSelect, // for selection with modifier key down (SHIFT) +multiDragSortable, initialFolding = false, // Initial multi-drag fold when drag started +folding = false, // Folding any other time +dragStarted = false, dragEl$1, clonesFromRect, clonesHidden; +function MultiDragPlugin() { + function MultiDrag(sortable) { + // Bind all private methods + for(var fn in this)if (fn.charAt(0) === '_' && typeof this[fn] === 'function') this[fn] = this[fn].bind(this); + if (!sortable.options.avoidImplicitDeselect) { + if (sortable.options.supportPointer) on(document, 'pointerup', this._deselectMultiDrag); + else { + on(document, 'mouseup', this._deselectMultiDrag); + on(document, 'touchend', this._deselectMultiDrag); + } + } + on(document, 'keydown', this._checkKeyDown); + on(document, 'keyup', this._checkKeyUp); + this.defaults = { + selectedClass: 'sortable-selected', + multiDragKey: null, + avoidImplicitDeselect: false, + setData: function setData(dataTransfer, dragEl9) { + var data = ''; + if (multiDragElements.length && multiDragSortable === sortable) multiDragElements.forEach(function(multiDragElement, i) { + data += (!i ? '' : ', ') + multiDragElement.textContent; + }); + else data = dragEl9.textContent; + dataTransfer.setData('Text', data); + } + }; + } + MultiDrag.prototype = { + multiDragKeyDown: false, + isMultiDrag: false, + delayStartGlobal: function delayStartGlobal(_ref) { + var dragged = _ref.dragEl; + dragEl$1 = dragged; + }, + delayEnded: function delayEnded() { + this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1); + }, + setupClone: function setupClone(_ref2) { + var sortable = _ref2.sortable, cancel = _ref2.cancel; + if (!this.isMultiDrag) return; + for(var i = 0; i < multiDragElements.length; i++){ + multiDragClones.push(clone(multiDragElements[i])); + multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex; + multiDragClones[i].draggable = false; + multiDragClones[i].style['will-change'] = ''; + toggleClass(multiDragClones[i], this.options.selectedClass, false); + multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false); + } + sortable._hideClone(); + cancel(); + }, + clone: function clone(_ref3) { + var sortable = _ref3.sortable, rootEl4 = _ref3.rootEl, dispatchSortableEvent = _ref3.dispatchSortableEvent, cancel = _ref3.cancel; + if (!this.isMultiDrag) return; + if (!this.options.removeCloneOnHide) { + if (multiDragElements.length && multiDragSortable === sortable) { + insertMultiDragClones(true, rootEl4); + dispatchSortableEvent('clone'); + cancel(); + } + } + }, + showClone: function showClone(_ref4) { + var cloneNowShown = _ref4.cloneNowShown, rootEl5 = _ref4.rootEl, cancel = _ref4.cancel; + if (!this.isMultiDrag) return; + insertMultiDragClones(false, rootEl5); + multiDragClones.forEach(function(clone1) { + css(clone1, 'display', ''); + }); + cloneNowShown(); + clonesHidden = false; + cancel(); + }, + hideClone: function hideClone(_ref5) { + var _this = this; + var sortable = _ref5.sortable, cloneNowHidden = _ref5.cloneNowHidden, cancel = _ref5.cancel; + if (!this.isMultiDrag) return; + multiDragClones.forEach(function(clone2) { + css(clone2, 'display', 'none'); + if (_this.options.removeCloneOnHide && clone2.parentNode) clone2.parentNode.removeChild(clone2); + }); + cloneNowHidden(); + clonesHidden = true; + cancel(); + }, + dragStartGlobal: function dragStartGlobal(_ref6) { + var sortable = _ref6.sortable; + if (!this.isMultiDrag && multiDragSortable) multiDragSortable.multiDrag._deselectMultiDrag(); + multiDragElements.forEach(function(multiDragElement) { + multiDragElement.sortableIndex = index(multiDragElement); + }); // Sort multi-drag elements + multiDragElements = multiDragElements.sort(function(a, b) { + return a.sortableIndex - b.sortableIndex; + }); + dragStarted = true; + }, + dragStarted: function dragStarted(_ref7) { + var _this2 = this; + var sortable = _ref7.sortable; + if (!this.isMultiDrag) return; + if (this.options.sort) { + // Capture rects, + // hide multi drag elements (by positioning them absolute), + // set multi drag elements rects to dragRect, + // show multi drag elements, + // animate to rects, + // unset rects & remove from DOM + sortable.captureAnimationState(); + if (this.options.animation) { + multiDragElements.forEach(function(multiDragElement) { + if (multiDragElement === dragEl$1) return; + css(multiDragElement, 'position', 'absolute'); + }); + var dragRect = getRect(dragEl$1, false, true, true); + multiDragElements.forEach(function(multiDragElement) { + if (multiDragElement === dragEl$1) return; + setRect(multiDragElement, dragRect); + }); + folding = true; + initialFolding = true; + } + } + sortable.animateAll(function() { + folding = false; + initialFolding = false; + if (_this2.options.animation) multiDragElements.forEach(function(multiDragElement) { + unsetRect(multiDragElement); + }); + // Remove all auxiliary multidrag items from el, if sorting enabled + if (_this2.options.sort) removeMultiDragElements(); + }); + }, + dragOver: function dragOver(_ref8) { + var target = _ref8.target, completed = _ref8.completed, cancel = _ref8.cancel; + if (folding && ~multiDragElements.indexOf(target)) { + completed(false); + cancel(); + } + }, + revert: function revert(_ref9) { + var fromSortable = _ref9.fromSortable, rootEl6 = _ref9.rootEl, sortable = _ref9.sortable, dragRect = _ref9.dragRect; + if (multiDragElements.length > 1) { + // Setup unfold animation + multiDragElements.forEach(function(multiDragElement) { + sortable.addAnimationState({ + target: multiDragElement, + rect: folding ? getRect(multiDragElement) : dragRect + }); + unsetRect(multiDragElement); + multiDragElement.fromRect = dragRect; + fromSortable.removeAnimationState(multiDragElement); + }); + folding = false; + insertMultiDragElements(!this.options.removeCloneOnHide, rootEl6); + } + }, + dragOverCompleted: function dragOverCompleted(_ref10) { + var sortable = _ref10.sortable, isOwner = _ref10.isOwner, insertion = _ref10.insertion, activeSortable = _ref10.activeSortable, parentEl1 = _ref10.parentEl, putSortable7 = _ref10.putSortable; + var options = this.options; + if (insertion) { + // Clones must be hidden before folding animation to capture dragRectAbsolute properly + if (isOwner) activeSortable._hideClone(); + initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location + if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable7)) { + // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible + var dragRectAbsolute = getRect(dragEl$1, false, true, true); + multiDragElements.forEach(function(multiDragElement) { + if (multiDragElement === dragEl$1) return; + setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted + // while folding, and so that we can capture them again because old sortable will no longer be fromSortable + parentEl1.appendChild(multiDragElement); + }); + folding = true; + } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out + if (!isOwner) { + // Only remove if not folding (folding will remove them anyways) + if (!folding) removeMultiDragElements(); + if (multiDragElements.length > 1) { + var clonesHiddenBefore = clonesHidden; + activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden + if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) multiDragClones.forEach(function(clone3) { + activeSortable.addAnimationState({ + target: clone3, + rect: clonesFromRect + }); + clone3.fromRect = clonesFromRect; + clone3.thisAnimationDuration = null; + }); + } else activeSortable._showClone(sortable); + } + } + }, + dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) { + var dragRect = _ref11.dragRect, isOwner = _ref11.isOwner, activeSortable = _ref11.activeSortable; + multiDragElements.forEach(function(multiDragElement) { + multiDragElement.thisAnimationDuration = null; + }); + if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) { + clonesFromRect = _extends({}, dragRect); + var dragMatrix = matrix(dragEl$1, true); + clonesFromRect.top -= dragMatrix.f; + clonesFromRect.left -= dragMatrix.e; + } + }, + dragOverAnimationComplete: function dragOverAnimationComplete() { + if (folding) { + folding = false; + removeMultiDragElements(); + } + }, + drop: function drop(_ref12) { + var evt = _ref12.originalEvent, rootEl7 = _ref12.rootEl, parentEl2 = _ref12.parentEl, sortable = _ref12.sortable, dispatchSortableEvent = _ref12.dispatchSortableEvent, oldIndex2 = _ref12.oldIndex, putSortable8 = _ref12.putSortable; + var toSortable = putSortable8 || this.sortable; + if (!evt) return; + var options = this.options, children = parentEl2.children; // Multi-drag selection + if (!dragStarted) { + if (options.multiDragKey && !this.multiDragKeyDown) this._deselectMultiDrag(); + toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1)); + if (!~multiDragElements.indexOf(dragEl$1)) { + multiDragElements.push(dragEl$1); + dispatchEvent({ + sortable: sortable, + rootEl: rootEl7, + name: 'select', + targetEl: dragEl$1, + originalEvent: evt + }); // Modifier activated, select from last to dragEl + if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) { + var lastIndex = index(lastMultiDragSelect), currentIndex = index(dragEl$1); + if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) { + // Must include lastMultiDragSelect (select it), in case modified selection from no selection + // (but previous selection existed) + var n, i; + if (currentIndex > lastIndex) { + i = lastIndex; + n = currentIndex; + } else { + i = currentIndex; + n = lastIndex + 1; + } + for(; i < n; i++){ + if (~multiDragElements.indexOf(children[i])) continue; + toggleClass(children[i], options.selectedClass, true); + multiDragElements.push(children[i]); + dispatchEvent({ + sortable: sortable, + rootEl: rootEl7, + name: 'select', + targetEl: children[i], + originalEvent: evt + }); + } + } + } else lastMultiDragSelect = dragEl$1; + multiDragSortable = toSortable; + } else { + multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1); + lastMultiDragSelect = null; + dispatchEvent({ + sortable: sortable, + rootEl: rootEl7, + name: 'deselect', + targetEl: dragEl$1, + originalEvent: evt + }); + } + } // Multi-drag drop + if (dragStarted && this.isMultiDrag) { + folding = false; // Do not "unfold" after around dragEl if reverted + if ((parentEl2[expando].options.sort || parentEl2 !== rootEl7) && multiDragElements.length > 1) { + var dragRect = getRect(dragEl$1), multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')'); + if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null; + toSortable.captureAnimationState(); + if (!initialFolding) { + if (options.animation) { + dragEl$1.fromRect = dragRect; + multiDragElements.forEach(function(multiDragElement) { + multiDragElement.thisAnimationDuration = null; + if (multiDragElement !== dragEl$1) { + var rect = folding ? getRect(multiDragElement) : dragRect; + multiDragElement.fromRect = rect; // Prepare unfold animation + toSortable.addAnimationState({ + target: multiDragElement, + rect: rect + }); + } + }); + } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert + // properly they must all be removed + removeMultiDragElements(); + multiDragElements.forEach(function(multiDragElement) { + if (children[multiDragIndex]) parentEl2.insertBefore(multiDragElement, children[multiDragIndex]); + else parentEl2.appendChild(multiDragElement); + multiDragIndex++; + }); // If initial folding is done, the elements may have changed position because they are now + // unfolding around dragEl, even though dragEl may not have his index changed, so update event + // must be fired here as Sortable will not. + if (oldIndex2 === index(dragEl$1)) { + var update = false; + multiDragElements.forEach(function(multiDragElement) { + if (multiDragElement.sortableIndex !== index(multiDragElement)) { + update = true; + return; + } + }); + if (update) dispatchSortableEvent('update'); + } + } // Must be done after capturing individual rects (scroll bar) + multiDragElements.forEach(function(multiDragElement) { + unsetRect(multiDragElement); + }); + toSortable.animateAll(); + } + multiDragSortable = toSortable; + } // Remove clones if necessary + if (rootEl7 === parentEl2 || putSortable8 && putSortable8.lastPutMode !== 'clone') multiDragClones.forEach(function(clone4) { + clone4.parentNode && clone4.parentNode.removeChild(clone4); + }); + }, + nullingGlobal: function nullingGlobal() { + this.isMultiDrag = dragStarted = false; + multiDragClones.length = 0; + }, + destroyGlobal: function destroyGlobal() { + this._deselectMultiDrag(); + off(document, 'pointerup', this._deselectMultiDrag); + off(document, 'mouseup', this._deselectMultiDrag); + off(document, 'touchend', this._deselectMultiDrag); + off(document, 'keydown', this._checkKeyDown); + off(document, 'keyup', this._checkKeyUp); + }, + _deselectMultiDrag: function _deselectMultiDrag(evt) { + if (typeof dragStarted !== "undefined" && dragStarted) return; // Only deselect if selection is in this sortable + if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable + if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click + if (evt && evt.button !== 0) return; + while(multiDragElements.length){ + var el = multiDragElements[0]; + toggleClass(el, this.options.selectedClass, false); + multiDragElements.shift(); + dispatchEvent({ + sortable: this.sortable, + rootEl: this.sortable.el, + name: 'deselect', + targetEl: el, + originalEvent: evt + }); + } + }, + _checkKeyDown: function _checkKeyDown(evt) { + if (evt.key === this.options.multiDragKey) this.multiDragKeyDown = true; + }, + _checkKeyUp: function _checkKeyUp(evt) { + if (evt.key === this.options.multiDragKey) this.multiDragKeyDown = false; + } + }; + return _extends(MultiDrag, { + // Static methods & properties + pluginName: 'multiDrag', + utils: { + /** + * Selects the provided multi-drag item + * @param {HTMLElement} el The element to be selected + */ select: function select(el) { + var sortable = el.parentNode[expando]; + if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return; + if (multiDragSortable && multiDragSortable !== sortable) { + multiDragSortable.multiDrag._deselectMultiDrag(); + multiDragSortable = sortable; + } + toggleClass(el, sortable.options.selectedClass, true); + multiDragElements.push(el); + }, + /** + * Deselects the provided multi-drag item + * @param {HTMLElement} el The element to be deselected + */ deselect: function deselect(el) { + var sortable = el.parentNode[expando], index2 = multiDragElements.indexOf(el); + if (!sortable || !sortable.options.multiDrag || !~index2) return; + toggleClass(el, sortable.options.selectedClass, false); + multiDragElements.splice(index2, 1); + } + }, + eventProperties: function eventProperties() { + var _this3 = this; + var oldIndicies = [], newIndicies = []; + multiDragElements.forEach(function(multiDragElement) { + oldIndicies.push({ + multiDragElement: multiDragElement, + index: multiDragElement.sortableIndex + }); // multiDragElements will already be sorted if folding + var newIndex2; + if (folding && multiDragElement !== dragEl$1) newIndex2 = -1; + else if (folding) newIndex2 = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')'); + else newIndex2 = index(multiDragElement); + newIndicies.push({ + multiDragElement: multiDragElement, + index: newIndex2 + }); + }); + return { + items: _toConsumableArray(multiDragElements), + clones: [].concat(multiDragClones), + oldIndicies: oldIndicies, + newIndicies: newIndicies + }; + }, + optionListeners: { + multiDragKey: function multiDragKey(key) { + key = key.toLowerCase(); + if (key === 'ctrl') key = 'Control'; + else if (key.length > 1) key = key.charAt(0).toUpperCase() + key.substr(1); + return key; + } + } + }); +} +function insertMultiDragElements(clonesInserted, rootEl8) { + multiDragElements.forEach(function(multiDragElement, i) { + var target = rootEl8.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)]; + if (target) rootEl8.insertBefore(multiDragElement, target); + else rootEl8.appendChild(multiDragElement); + }); +} +/** + * Insert multi-drag clones + * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted + * @param {HTMLElement} rootEl + */ function insertMultiDragClones(elementsInserted, rootEl9) { + multiDragClones.forEach(function(clone5, i) { + var target = rootEl9.children[clone5.sortableIndex + (elementsInserted ? Number(i) : 0)]; + if (target) rootEl9.insertBefore(clone5, target); + else rootEl9.appendChild(clone5); + }); +} +function removeMultiDragElements() { + multiDragElements.forEach(function(multiDragElement) { + if (multiDragElement === dragEl$1) return; + multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement); + }); +} +Sortable.mount(new AutoScrollPlugin()); +Sortable.mount(Remove, Revert); +exports.default = Sortable; },{"@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}]},["6X8JM","1qqD7"], "1qqD7", "parcelRequire22a0") diff --git a/dist/electron-tabs.draggable.js.map b/dist/electron-tabs.draggable.js.map index d044151..8e41e16 100644 --- a/dist/electron-tabs.draggable.js.map +++ b/dist/electron-tabs.draggable.js.map @@ -1 +1 @@ -{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAsJ,YAAY,CAAC;AAAnK,IAAI,QAAQ,GAAG,IAAI,AAAC;AAAA,IAAI,QAAQ,GAAG,IAAI,AAAC;AAAA,IAAI,UAAU,GAAG,KAAK,AAAC;AAAA,IAAI,YAAY,GAAG,kBAAkB,AAAC;AAAA,MAAM,CAAC,MAAM,CAAC,aAAa,GAAG,kBAAkB,CAAC;AAEtJ,SAAS,kBAAkB,CAAC,GAAG,EAAE;IAAE,OAAO,kBAAkB,CAAC,GAAG,CAAC,IAAI,gBAAgB,CAAC,GAAG,CAAC,IAAI,2BAA2B,CAAC,GAAG,CAAC,IAAI,kBAAkB,EAAE,CAAC;CAAE;AAEzJ,SAAS,kBAAkB,GAAG;IAAE,MAAM,IAAI,SAAS,CA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YAChB,GAAG,EAAE,WAAY;gBACf,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;aACpB;SACF,CAAC,CAAC;KACJ,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;CACb,CAAC;AAEF,OAAO,CAAC,MAAM,GAAG,SAAU,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE;IAC9C,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE;QACpC,UAAU,EAAE,IAAI;QAChB,GAAG,EAAE,GAAG;KACT,CAAC,CAAC;CACJ,CAAC;;;AC9BF;;kBAAe,muGAAmuG,AAAlvG,CAAkvG;;;ACAlvG;;kBAAe,gkBAAgkB,AAA/kB,CAA+kB","sources":["node_modules/@parcel/runtime-browser-hmr/lib/runtime-d9890fba0b088434.js","src/draggable.js","node_modules/dragula/dragula.js","node_modules/contra/emitter.js","node_modules/atoa/atoa.js","node_modules/contra/debounce.js","node_modules/ticky/ticky-browser.js","node_modules/crossvent/src/crossvent.js","node_modules/custom-event/index.js","node_modules/crossvent/src/eventmap.js","node_modules/dragula/classes.js","src/index.js","node_modules/@parcel/transformer-js/src/esmodule-helpers.js","src/style.css","node_modules/dragula/dist/dragula.css"],"sourcesContent":["var HMR_HOST = null;var HMR_PORT = 1234;var HMR_SECURE = false;var HMR_ENV_HASH = \"d6ea1d42532a7575\";module.bundle.HMR_BUNDLE_ID = \"2f45e28c8a3d245e\";\"use strict\";\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n/* global HMR_HOST, HMR_PORT, HMR_ENV_HASH, HMR_SECURE, chrome, browser */\n\n/*::\nimport type {\n HMRAsset,\n HMRMessage,\n} from '@parcel/reporter-dev-server/src/HMRServer.js';\ninterface ParcelRequire {\n (string): mixed;\n cache: {|[string]: ParcelModule|};\n hotData: mixed;\n Module: any;\n parent: ?ParcelRequire;\n isParcelRequire: true;\n modules: {|[string]: [Function, {|[string]: string|}]|};\n HMR_BUNDLE_ID: string;\n root: ParcelRequire;\n}\ninterface ParcelModule {\n hot: {|\n data: mixed,\n accept(cb: (Function) => void): void,\n dispose(cb: (mixed) => void): void,\n // accept(deps: Array | string, cb: (Function) => void): void,\n // decline(): void,\n _acceptCallbacks: Array<(Function) => void>,\n _disposeCallbacks: Array<(mixed) => void>,\n |};\n}\ninterface ExtensionContext {\n runtime: {|\n reload(): void,\n |};\n}\ndeclare var module: {bundle: ParcelRequire, ...};\ndeclare var HMR_HOST: string;\ndeclare var HMR_PORT: string;\ndeclare var HMR_ENV_HASH: string;\ndeclare var HMR_SECURE: boolean;\ndeclare var chrome: ExtensionContext;\ndeclare var browser: ExtensionContext;\n*/\nvar OVERLAY_ID = '__parcel__error__overlay__';\nvar OldModule = module.bundle.Module;\n\nfunction Module(moduleName) {\n OldModule.call(this, moduleName);\n this.hot = {\n data: module.bundle.hotData,\n _acceptCallbacks: [],\n _disposeCallbacks: [],\n accept: function accept(fn) {\n this._acceptCallbacks.push(fn || function () {});\n },\n dispose: function dispose(fn) {\n this._disposeCallbacks.push(fn);\n }\n };\n module.bundle.hotData = undefined;\n}\n\nmodule.bundle.Module = Module;\nvar checkedAssets\n/*: {|[string]: boolean|} */\n, acceptedAssets\n/*: {|[string]: boolean|} */\n, assetsToAccept\n/*: Array<[ParcelRequire, string]> */\n;\n\nfunction getHostname() {\n return HMR_HOST || (location.protocol.indexOf('http') === 0 ? location.hostname : 'localhost');\n}\n\nfunction getPort() {\n return HMR_PORT || location.port;\n} // eslint-disable-next-line no-redeclare\n\n\nvar parent = module.bundle.parent;\n\nif ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {\n var hostname = getHostname();\n var port = getPort();\n var protocol = HMR_SECURE || location.protocol == 'https:' && !/localhost|127.0.0.1|0.0.0.0/.test(hostname) ? 'wss' : 'ws';\n var ws = new WebSocket(protocol + '://' + hostname + (port ? ':' + port : '') + '/'); // $FlowFixMe\n\n ws.onmessage = function (event\n /*: {data: string, ...} */\n ) {\n checkedAssets = {}\n /*: {|[string]: boolean|} */\n ;\n acceptedAssets = {}\n /*: {|[string]: boolean|} */\n ;\n assetsToAccept = [];\n var data\n /*: HMRMessage */\n = JSON.parse(event.data);\n\n if (data.type === 'update') {\n // Remove error overlay if there is one\n if (typeof document !== 'undefined') {\n removeErrorOverlay();\n }\n\n var assets = data.assets.filter(function (asset) {\n return asset.envHash === HMR_ENV_HASH;\n }); // Handle HMR Update\n\n var handled = assets.every(function (asset) {\n return asset.type === 'css' || asset.type === 'js' && hmrAcceptCheck(module.bundle.root, asset.id, asset.depsByBundle);\n });\n\n if (handled) {\n console.clear();\n assets.forEach(function (asset) {\n hmrApply(module.bundle.root, asset);\n });\n\n for (var i = 0; i < assetsToAccept.length; i++) {\n var id = assetsToAccept[i][1];\n\n if (!acceptedAssets[id]) {\n hmrAcceptRun(assetsToAccept[i][0], id);\n }\n }\n } else if ('reload' in location) {\n location.reload();\n } else {\n // Web extension context\n var ext = typeof chrome === 'undefined' ? typeof browser === 'undefined' ? null : browser : chrome;\n\n if (ext && ext.runtime && ext.runtime.reload) {\n ext.runtime.reload();\n }\n }\n }\n\n if (data.type === 'error') {\n // Log parcel errors to console\n var _iterator = _createForOfIteratorHelper(data.diagnostics.ansi),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var ansiDiagnostic = _step.value;\n var stack = ansiDiagnostic.codeframe ? ansiDiagnostic.codeframe : ansiDiagnostic.stack;\n console.error('🚨 [parcel]: ' + ansiDiagnostic.message + '\\n' + stack + '\\n\\n' + ansiDiagnostic.hints.join('\\n'));\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n if (typeof document !== 'undefined') {\n // Render the fancy html overlay\n removeErrorOverlay();\n var overlay = createErrorOverlay(data.diagnostics.html); // $FlowFixMe\n\n document.body.appendChild(overlay);\n }\n }\n };\n\n ws.onerror = function (e) {\n console.error(e.message);\n };\n\n ws.onclose = function () {\n console.warn('[parcel] 🚨 Connection to the HMR server was lost');\n };\n}\n\nfunction removeErrorOverlay() {\n var overlay = document.getElementById(OVERLAY_ID);\n\n if (overlay) {\n overlay.remove();\n console.log('[parcel] ✨ Error resolved');\n }\n}\n\nfunction createErrorOverlay(diagnostics) {\n var overlay = document.createElement('div');\n overlay.id = OVERLAY_ID;\n var errorHTML = '
';\n\n var _iterator2 = _createForOfIteratorHelper(diagnostics),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var diagnostic = _step2.value;\n var stack = diagnostic.codeframe ? diagnostic.codeframe : diagnostic.stack;\n errorHTML += \"\\n
\\n
\\n \\uD83D\\uDEA8 \".concat(diagnostic.message, \"\\n
\\n
\").concat(stack, \"
\\n
\\n \").concat(diagnostic.hints.map(function (hint) {\n return '
💡 ' + hint + '
';\n }).join(''), \"\\n
\\n \").concat(diagnostic.documentation ? \"
\\uD83D\\uDCDD Learn more
\") : '', \"\\n
\\n \");\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n errorHTML += '
';\n overlay.innerHTML = errorHTML;\n return overlay;\n}\n\nfunction getParents(bundle, id)\n/*: Array<[ParcelRequire, string]> */\n{\n var modules = bundle.modules;\n\n if (!modules) {\n return [];\n }\n\n var parents = [];\n var k, d, dep;\n\n for (k in modules) {\n for (d in modules[k][1]) {\n dep = modules[k][1][d];\n\n if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {\n parents.push([bundle, k]);\n }\n }\n }\n\n if (bundle.parent) {\n parents = parents.concat(getParents(bundle.parent, id));\n }\n\n return parents;\n}\n\nfunction updateLink(link) {\n var newLink = link.cloneNode();\n\n newLink.onload = function () {\n if (link.parentNode !== null) {\n // $FlowFixMe\n link.parentNode.removeChild(link);\n }\n };\n\n newLink.setAttribute('href', // $FlowFixMe\n link.getAttribute('href').split('?')[0] + '?' + Date.now()); // $FlowFixMe\n\n link.parentNode.insertBefore(newLink, link.nextSibling);\n}\n\nvar cssTimeout = null;\n\nfunction reloadCSS() {\n if (cssTimeout) {\n return;\n }\n\n cssTimeout = setTimeout(function () {\n var links = document.querySelectorAll('link[rel=\"stylesheet\"]');\n\n for (var i = 0; i < links.length; i++) {\n // $FlowFixMe[incompatible-type]\n var href\n /*: string */\n = links[i].getAttribute('href');\n var hostname = getHostname();\n var servedFromHMRServer = hostname === 'localhost' ? new RegExp('^(https?:\\\\/\\\\/(0.0.0.0|127.0.0.1)|localhost):' + getPort()).test(href) : href.indexOf(hostname + ':' + getPort());\n var absolute = /^https?:\\/\\//i.test(href) && href.indexOf(location.origin) !== 0 && !servedFromHMRServer;\n\n if (!absolute) {\n updateLink(links[i]);\n }\n }\n\n cssTimeout = null;\n }, 50);\n}\n\nfunction hmrApply(bundle\n/*: ParcelRequire */\n, asset\n/*: HMRAsset */\n) {\n var modules = bundle.modules;\n\n if (!modules) {\n return;\n }\n\n if (asset.type === 'css') {\n reloadCSS();\n } else if (asset.type === 'js') {\n var deps = asset.depsByBundle[bundle.HMR_BUNDLE_ID];\n\n if (deps) {\n if (modules[asset.id]) {\n // Remove dependencies that are removed and will become orphaned.\n // This is necessary so that if the asset is added back again, the cache is gone, and we prevent a full page reload.\n var oldDeps = modules[asset.id][1];\n\n for (var dep in oldDeps) {\n if (!deps[dep] || deps[dep] !== oldDeps[dep]) {\n var id = oldDeps[dep];\n var parents = getParents(module.bundle.root, id);\n\n if (parents.length === 1) {\n hmrDelete(module.bundle.root, id);\n }\n }\n }\n }\n\n var fn = new Function('require', 'module', 'exports', asset.output);\n modules[asset.id] = [fn, deps];\n } else if (bundle.parent) {\n hmrApply(bundle.parent, asset);\n }\n }\n}\n\nfunction hmrDelete(bundle, id) {\n var modules = bundle.modules;\n\n if (!modules) {\n return;\n }\n\n if (modules[id]) {\n // Collect dependencies that will become orphaned when this module is deleted.\n var deps = modules[id][1];\n var orphans = [];\n\n for (var dep in deps) {\n var parents = getParents(module.bundle.root, deps[dep]);\n\n if (parents.length === 1) {\n orphans.push(deps[dep]);\n }\n } // Delete the module. This must be done before deleting dependencies in case of circular dependencies.\n\n\n delete modules[id];\n delete bundle.cache[id]; // Now delete the orphans.\n\n orphans.forEach(function (id) {\n hmrDelete(module.bundle.root, id);\n });\n } else if (bundle.parent) {\n hmrDelete(bundle.parent, id);\n }\n}\n\nfunction hmrAcceptCheck(bundle\n/*: ParcelRequire */\n, id\n/*: string */\n, depsByBundle\n/*: ?{ [string]: { [string]: string } }*/\n) {\n if (hmrAcceptCheckOne(bundle, id, depsByBundle)) {\n return true;\n } // Traverse parents breadth first. All possible ancestries must accept the HMR update, or we'll reload.\n\n\n var parents = getParents(module.bundle.root, id);\n var accepted = false;\n\n while (parents.length > 0) {\n var v = parents.shift();\n var a = hmrAcceptCheckOne(v[0], v[1], null);\n\n if (a) {\n // If this parent accepts, stop traversing upward, but still consider siblings.\n accepted = true;\n } else {\n // Otherwise, queue the parents in the next level upward.\n var p = getParents(module.bundle.root, v[1]);\n\n if (p.length === 0) {\n // If there are no parents, then we've reached an entry without accepting. Reload.\n accepted = false;\n break;\n }\n\n parents.push.apply(parents, _toConsumableArray(p));\n }\n }\n\n return accepted;\n}\n\nfunction hmrAcceptCheckOne(bundle\n/*: ParcelRequire */\n, id\n/*: string */\n, depsByBundle\n/*: ?{ [string]: { [string]: string } }*/\n) {\n var modules = bundle.modules;\n\n if (!modules) {\n return;\n }\n\n if (depsByBundle && !depsByBundle[bundle.HMR_BUNDLE_ID]) {\n // If we reached the root bundle without finding where the asset should go,\n // there's nothing to do. Mark as \"accepted\" so we don't reload the page.\n if (!bundle.parent) {\n return true;\n }\n\n return hmrAcceptCheck(bundle.parent, id, depsByBundle);\n }\n\n if (checkedAssets[id]) {\n return true;\n }\n\n checkedAssets[id] = true;\n var cached = bundle.cache[id];\n assetsToAccept.push([bundle, id]);\n\n if (!cached || cached.hot && cached.hot._acceptCallbacks.length) {\n return true;\n }\n}\n\nfunction hmrAcceptRun(bundle\n/*: ParcelRequire */\n, id\n/*: string */\n) {\n var cached = bundle.cache[id];\n bundle.hotData = {};\n\n if (cached && cached.hot) {\n cached.hot.data = bundle.hotData;\n }\n\n if (cached && cached.hot && cached.hot._disposeCallbacks.length) {\n cached.hot._disposeCallbacks.forEach(function (cb) {\n cb(bundle.hotData);\n });\n }\n\n delete bundle.cache[id];\n bundle(id);\n cached = bundle.cache[id];\n\n if (cached && cached.hot && cached.hot._acceptCallbacks.length) {\n cached.hot._acceptCallbacks.forEach(function (cb) {\n var assetsToAlsoAccept = cb(function () {\n return getParents(module.bundle.root, id);\n });\n\n if (assetsToAlsoAccept && assetsToAccept.length) {\n // $FlowFixMe[method-unbinding]\n assetsToAccept.push.apply(assetsToAccept, assetsToAlsoAccept);\n }\n });\n }\n\n acceptedAssets[id] = true;\n}","import dragula from \"dragula\";\nimport \"./index.js\";\nimport styles from \"dragula/dist/dragula.css\";\n\nwindow.dragula = dragula;\n\n// Inject styles\n(function () {\n let styleTag = document.createElement(\"style\");\n styleTag.innerHTML = styles;\n document.getElementsByTagName(\"head\")[0].appendChild(styleTag);\n})();\n","'use strict';\n\nvar emitter = require('contra/emitter');\nvar crossvent = require('crossvent');\nvar classes = require('./classes');\nvar doc = document;\nvar documentElement = doc.documentElement;\n\nfunction dragula (initialContainers, options) {\n var len = arguments.length;\n if (len === 1 && Array.isArray(initialContainers) === false) {\n options = initialContainers;\n initialContainers = [];\n }\n var _mirror; // mirror image\n var _source; // source container\n var _item; // item being dragged\n var _offsetX; // reference x\n var _offsetY; // reference y\n var _moveX; // reference move x\n var _moveY; // reference move y\n var _initialSibling; // reference sibling when grabbed\n var _currentSibling; // reference sibling now\n var _copy; // item used for copying\n var _renderTimer; // timer for setTimeout renderMirrorImage\n var _lastDropTarget = null; // last container item was over\n var _grabbed; // holds mousedown context until first mousemove\n\n var o = options || {};\n if (o.moves === void 0) { o.moves = always; }\n if (o.accepts === void 0) { o.accepts = always; }\n if (o.invalid === void 0) { o.invalid = invalidTarget; }\n if (o.containers === void 0) { o.containers = initialContainers || []; }\n if (o.isContainer === void 0) { o.isContainer = never; }\n if (o.copy === void 0) { o.copy = false; }\n if (o.copySortSource === void 0) { o.copySortSource = false; }\n if (o.revertOnSpill === void 0) { o.revertOnSpill = false; }\n if (o.removeOnSpill === void 0) { o.removeOnSpill = false; }\n if (o.direction === void 0) { o.direction = 'vertical'; }\n if (o.ignoreInputTextSelection === void 0) { o.ignoreInputTextSelection = true; }\n if (o.mirrorContainer === void 0) { o.mirrorContainer = doc.body; }\n\n var drake = emitter({\n containers: o.containers,\n start: manualStart,\n end: end,\n cancel: cancel,\n remove: remove,\n destroy: destroy,\n canMove: canMove,\n dragging: false\n });\n\n if (o.removeOnSpill === true) {\n drake.on('over', spillOver).on('out', spillOut);\n }\n\n events();\n\n return drake;\n\n function isContainer (el) {\n return drake.containers.indexOf(el) !== -1 || o.isContainer(el);\n }\n\n function events (remove) {\n var op = remove ? 'remove' : 'add';\n touchy(documentElement, op, 'mousedown', grab);\n touchy(documentElement, op, 'mouseup', release);\n }\n\n function eventualMovements (remove) {\n var op = remove ? 'remove' : 'add';\n touchy(documentElement, op, 'mousemove', startBecauseMouseMoved);\n }\n\n function movements (remove) {\n var op = remove ? 'remove' : 'add';\n crossvent[op](documentElement, 'selectstart', preventGrabbed); // IE8\n crossvent[op](documentElement, 'click', preventGrabbed);\n }\n\n function destroy () {\n events(true);\n release({});\n }\n\n function preventGrabbed (e) {\n if (_grabbed) {\n e.preventDefault();\n }\n }\n\n function grab (e) {\n _moveX = e.clientX;\n _moveY = e.clientY;\n\n var ignore = whichMouseButton(e) !== 1 || e.metaKey || e.ctrlKey;\n if (ignore) {\n return; // we only care about honest-to-god left clicks and touch events\n }\n var item = e.target;\n var context = canStart(item);\n if (!context) {\n return;\n }\n _grabbed = context;\n eventualMovements();\n if (e.type === 'mousedown') {\n if (isInput(item)) { // see also: https://github.com/bevacqua/dragula/issues/208\n item.focus(); // fixes https://github.com/bevacqua/dragula/issues/176\n } else {\n e.preventDefault(); // fixes https://github.com/bevacqua/dragula/issues/155\n }\n }\n }\n\n function startBecauseMouseMoved (e) {\n if (!_grabbed) {\n return;\n }\n if (whichMouseButton(e) === 0) {\n release({});\n return; // when text is selected on an input and then dragged, mouseup doesn't fire. this is our only hope\n }\n\n // truthy check fixes #239, equality fixes #207, fixes #501\n if ((e.clientX !== void 0 && Math.abs(e.clientX - _moveX) <= (o.slideFactorX || 0)) &&\n (e.clientY !== void 0 && Math.abs(e.clientY - _moveY) <= (o.slideFactorY || 0))) {\n return;\n }\n\n if (o.ignoreInputTextSelection) {\n var clientX = getCoord('clientX', e) || 0;\n var clientY = getCoord('clientY', e) || 0;\n var elementBehindCursor = doc.elementFromPoint(clientX, clientY);\n if (isInput(elementBehindCursor)) {\n return;\n }\n }\n\n var grabbed = _grabbed; // call to end() unsets _grabbed\n eventualMovements(true);\n movements();\n end();\n start(grabbed);\n\n var offset = getOffset(_item);\n _offsetX = getCoord('pageX', e) - offset.left;\n _offsetY = getCoord('pageY', e) - offset.top;\n\n classes.add(_copy || _item, 'gu-transit');\n renderMirrorImage();\n drag(e);\n }\n\n function canStart (item) {\n if (drake.dragging && _mirror) {\n return;\n }\n if (isContainer(item)) {\n return; // don't drag container itself\n }\n var handle = item;\n while (getParent(item) && isContainer(getParent(item)) === false) {\n if (o.invalid(item, handle)) {\n return;\n }\n item = getParent(item); // drag target should be a top element\n if (!item) {\n return;\n }\n }\n var source = getParent(item);\n if (!source) {\n return;\n }\n if (o.invalid(item, handle)) {\n return;\n }\n\n var movable = o.moves(item, source, handle, nextEl(item));\n if (!movable) {\n return;\n }\n\n return {\n item: item,\n source: source\n };\n }\n\n function canMove (item) {\n return !!canStart(item);\n }\n\n function manualStart (item) {\n var context = canStart(item);\n if (context) {\n start(context);\n }\n }\n\n function start (context) {\n if (isCopy(context.item, context.source)) {\n _copy = context.item.cloneNode(true);\n drake.emit('cloned', _copy, context.item, 'copy');\n }\n\n _source = context.source;\n _item = context.item;\n _initialSibling = _currentSibling = nextEl(context.item);\n\n drake.dragging = true;\n drake.emit('drag', _item, _source);\n }\n\n function invalidTarget () {\n return false;\n }\n\n function end () {\n if (!drake.dragging) {\n return;\n }\n var item = _copy || _item;\n drop(item, getParent(item));\n }\n\n function ungrab () {\n _grabbed = false;\n eventualMovements(true);\n movements(true);\n }\n\n function release (e) {\n ungrab();\n\n if (!drake.dragging) {\n return;\n }\n var item = _copy || _item;\n var clientX = getCoord('clientX', e) || 0;\n var clientY = getCoord('clientY', e) || 0;\n var elementBehindCursor = getElementBehindPoint(_mirror, clientX, clientY);\n var dropTarget = findDropTarget(elementBehindCursor, clientX, clientY);\n if (dropTarget && ((_copy && o.copySortSource) || (!_copy || dropTarget !== _source))) {\n drop(item, dropTarget);\n } else if (o.removeOnSpill) {\n remove();\n } else {\n cancel();\n }\n }\n\n function drop (item, target) {\n var parent = getParent(item);\n if (_copy && o.copySortSource && target === _source) {\n parent.removeChild(_item);\n }\n if (isInitialPlacement(target)) {\n drake.emit('cancel', item, _source, _source);\n } else {\n drake.emit('drop', item, target, _source, _currentSibling);\n }\n cleanup();\n }\n\n function remove () {\n if (!drake.dragging) {\n return;\n }\n var item = _copy || _item;\n var parent = getParent(item);\n if (parent) {\n parent.removeChild(item);\n }\n drake.emit(_copy ? 'cancel' : 'remove', item, parent, _source);\n cleanup();\n }\n\n function cancel (revert) {\n if (!drake.dragging) {\n return;\n }\n var reverts = arguments.length > 0 ? revert : o.revertOnSpill;\n var item = _copy || _item;\n var parent = getParent(item);\n var initial = isInitialPlacement(parent);\n if (initial === false && reverts) {\n if (_copy) {\n if (parent) {\n parent.removeChild(_copy);\n }\n } else {\n _source.insertBefore(item, _initialSibling);\n }\n }\n if (initial || reverts) {\n drake.emit('cancel', item, _source, _source);\n } else {\n drake.emit('drop', item, parent, _source, _currentSibling);\n }\n cleanup();\n }\n\n function cleanup () {\n var item = _copy || _item;\n ungrab();\n removeMirrorImage();\n if (item) {\n classes.rm(item, 'gu-transit');\n }\n if (_renderTimer) {\n clearTimeout(_renderTimer);\n }\n drake.dragging = false;\n if (_lastDropTarget) {\n drake.emit('out', item, _lastDropTarget, _source);\n }\n drake.emit('dragend', item);\n _source = _item = _copy = _initialSibling = _currentSibling = _renderTimer = _lastDropTarget = null;\n }\n\n function isInitialPlacement (target, s) {\n var sibling;\n if (s !== void 0) {\n sibling = s;\n } else if (_mirror) {\n sibling = _currentSibling;\n } else {\n sibling = nextEl(_copy || _item);\n }\n return target === _source && sibling === _initialSibling;\n }\n\n function findDropTarget (elementBehindCursor, clientX, clientY) {\n var target = elementBehindCursor;\n while (target && !accepted()) {\n target = getParent(target);\n }\n return target;\n\n function accepted () {\n var droppable = isContainer(target);\n if (droppable === false) {\n return false;\n }\n\n var immediate = getImmediateChild(target, elementBehindCursor);\n var reference = getReference(target, immediate, clientX, clientY);\n var initial = isInitialPlacement(target, reference);\n if (initial) {\n return true; // should always be able to drop it right back where it was\n }\n return o.accepts(_item, target, _source, reference);\n }\n }\n\n function drag (e) {\n if (!_mirror) {\n return;\n }\n e.preventDefault();\n\n var clientX = getCoord('clientX', e) || 0;\n var clientY = getCoord('clientY', e) || 0;\n var x = clientX - _offsetX;\n var y = clientY - _offsetY;\n\n _mirror.style.left = x + 'px';\n _mirror.style.top = y + 'px';\n\n var item = _copy || _item;\n var elementBehindCursor = getElementBehindPoint(_mirror, clientX, clientY);\n var dropTarget = findDropTarget(elementBehindCursor, clientX, clientY);\n var changed = dropTarget !== null && dropTarget !== _lastDropTarget;\n if (changed || dropTarget === null) {\n out();\n _lastDropTarget = dropTarget;\n over();\n }\n var parent = getParent(item);\n if (dropTarget === _source && _copy && !o.copySortSource) {\n if (parent) {\n parent.removeChild(item);\n }\n return;\n }\n var reference;\n var immediate = getImmediateChild(dropTarget, elementBehindCursor);\n if (immediate !== null) {\n reference = getReference(dropTarget, immediate, clientX, clientY);\n } else if (o.revertOnSpill === true && !_copy) {\n reference = _initialSibling;\n dropTarget = _source;\n } else {\n if (_copy && parent) {\n parent.removeChild(item);\n }\n return;\n }\n if (\n (reference === null && changed) ||\n reference !== item &&\n reference !== nextEl(item)\n ) {\n _currentSibling = reference;\n dropTarget.insertBefore(item, reference);\n drake.emit('shadow', item, dropTarget, _source);\n }\n function moved (type) { drake.emit(type, item, _lastDropTarget, _source); }\n function over () { if (changed) { moved('over'); } }\n function out () { if (_lastDropTarget) { moved('out'); } }\n }\n\n function spillOver (el) {\n classes.rm(el, 'gu-hide');\n }\n\n function spillOut (el) {\n if (drake.dragging) { classes.add(el, 'gu-hide'); }\n }\n\n function renderMirrorImage () {\n if (_mirror) {\n return;\n }\n var rect = _item.getBoundingClientRect();\n _mirror = _item.cloneNode(true);\n _mirror.style.width = getRectWidth(rect) + 'px';\n _mirror.style.height = getRectHeight(rect) + 'px';\n classes.rm(_mirror, 'gu-transit');\n classes.add(_mirror, 'gu-mirror');\n o.mirrorContainer.appendChild(_mirror);\n touchy(documentElement, 'add', 'mousemove', drag);\n classes.add(o.mirrorContainer, 'gu-unselectable');\n drake.emit('cloned', _mirror, _item, 'mirror');\n }\n\n function removeMirrorImage () {\n if (_mirror) {\n classes.rm(o.mirrorContainer, 'gu-unselectable');\n touchy(documentElement, 'remove', 'mousemove', drag);\n getParent(_mirror).removeChild(_mirror);\n _mirror = null;\n }\n }\n\n function getImmediateChild (dropTarget, target) {\n var immediate = target;\n while (immediate !== dropTarget && getParent(immediate) !== dropTarget) {\n immediate = getParent(immediate);\n }\n if (immediate === documentElement) {\n return null;\n }\n return immediate;\n }\n\n function getReference (dropTarget, target, x, y) {\n var horizontal = o.direction === 'horizontal';\n var reference = target !== dropTarget ? inside() : outside();\n return reference;\n\n function outside () { // slower, but able to figure out any position\n var len = dropTarget.children.length;\n var i;\n var el;\n var rect;\n for (i = 0; i < len; i++) {\n el = dropTarget.children[i];\n rect = el.getBoundingClientRect();\n if (horizontal && (rect.left + rect.width / 2) > x) { return el; }\n if (!horizontal && (rect.top + rect.height / 2) > y) { return el; }\n }\n return null;\n }\n\n function inside () { // faster, but only available if dropped inside a child element\n var rect = target.getBoundingClientRect();\n if (horizontal) {\n return resolve(x > rect.left + getRectWidth(rect) / 2);\n }\n return resolve(y > rect.top + getRectHeight(rect) / 2);\n }\n\n function resolve (after) {\n return after ? nextEl(target) : target;\n }\n }\n\n function isCopy (item, container) {\n return typeof o.copy === 'boolean' ? o.copy : o.copy(item, container);\n }\n}\n\nfunction touchy (el, op, type, fn) {\n var touch = {\n mouseup: 'touchend',\n mousedown: 'touchstart',\n mousemove: 'touchmove'\n };\n var pointers = {\n mouseup: 'pointerup',\n mousedown: 'pointerdown',\n mousemove: 'pointermove'\n };\n var microsoft = {\n mouseup: 'MSPointerUp',\n mousedown: 'MSPointerDown',\n mousemove: 'MSPointerMove'\n };\n if (global.navigator.pointerEnabled) {\n crossvent[op](el, pointers[type], fn);\n } else if (global.navigator.msPointerEnabled) {\n crossvent[op](el, microsoft[type], fn);\n } else {\n crossvent[op](el, touch[type], fn);\n crossvent[op](el, type, fn);\n }\n}\n\nfunction whichMouseButton (e) {\n if (e.touches !== void 0) { return e.touches.length; }\n if (e.which !== void 0 && e.which !== 0) { return e.which; } // see https://github.com/bevacqua/dragula/issues/261\n if (e.buttons !== void 0) { return e.buttons; }\n var button = e.button;\n if (button !== void 0) { // see https://github.com/jquery/jquery/blob/99e8ff1baa7ae341e94bb89c3e84570c7c3ad9ea/src/event.js#L573-L575\n return button & 1 ? 1 : button & 2 ? 3 : (button & 4 ? 2 : 0);\n }\n}\n\nfunction getOffset (el) {\n var rect = el.getBoundingClientRect();\n return {\n left: rect.left + getScroll('scrollLeft', 'pageXOffset'),\n top: rect.top + getScroll('scrollTop', 'pageYOffset')\n };\n}\n\nfunction getScroll (scrollProp, offsetProp) {\n if (typeof global[offsetProp] !== 'undefined') {\n return global[offsetProp];\n }\n if (documentElement.clientHeight) {\n return documentElement[scrollProp];\n }\n return doc.body[scrollProp];\n}\n\nfunction getElementBehindPoint (point, x, y) {\n point = point || {};\n var state = point.className || '';\n var el;\n point.className += ' gu-hide';\n el = doc.elementFromPoint(x, y);\n point.className = state;\n return el;\n}\n\nfunction never () { return false; }\nfunction always () { return true; }\nfunction getRectWidth (rect) { return rect.width || (rect.right - rect.left); }\nfunction getRectHeight (rect) { return rect.height || (rect.bottom - rect.top); }\nfunction getParent (el) { return el.parentNode === doc ? null : el.parentNode; }\nfunction isInput (el) { return el.tagName === 'INPUT' || el.tagName === 'TEXTAREA' || el.tagName === 'SELECT' || isEditable(el); }\nfunction isEditable (el) {\n if (!el) { return false; } // no parents were editable\n if (el.contentEditable === 'false') { return false; } // stop the lookup\n if (el.contentEditable === 'true') { return true; } // found a contentEditable element in the chain\n return isEditable(getParent(el)); // contentEditable is set to 'inherit'\n}\n\nfunction nextEl (el) {\n return el.nextElementSibling || manually();\n function manually () {\n var sibling = el;\n do {\n sibling = sibling.nextSibling;\n } while (sibling && sibling.nodeType !== 1);\n return sibling;\n }\n}\n\nfunction getEventHost (e) {\n // on touchend event, we have to use `e.changedTouches`\n // see http://stackoverflow.com/questions/7192563/touchend-event-properties\n // see https://github.com/bevacqua/dragula/issues/34\n if (e.targetTouches && e.targetTouches.length) {\n return e.targetTouches[0];\n }\n if (e.changedTouches && e.changedTouches.length) {\n return e.changedTouches[0];\n }\n return e;\n}\n\nfunction getCoord (coord, e) {\n var host = getEventHost(e);\n var missMap = {\n pageX: 'clientX', // IE8\n pageY: 'clientY' // IE8\n };\n if (coord in missMap && !(coord in host) && missMap[coord] in host) {\n coord = missMap[coord];\n }\n return host[coord];\n}\n\nmodule.exports = dragula;\n","'use strict';\n\nvar atoa = require('atoa');\nvar debounce = require('./debounce');\n\nmodule.exports = function emitter (thing, options) {\n var opts = options || {};\n var evt = {};\n if (thing === undefined) { thing = {}; }\n thing.on = function (type, fn) {\n if (!evt[type]) {\n evt[type] = [fn];\n } else {\n evt[type].push(fn);\n }\n return thing;\n };\n thing.once = function (type, fn) {\n fn._once = true; // thing.off(fn) still works!\n thing.on(type, fn);\n return thing;\n };\n thing.off = function (type, fn) {\n var c = arguments.length;\n if (c === 1) {\n delete evt[type];\n } else if (c === 0) {\n evt = {};\n } else {\n var et = evt[type];\n if (!et) { return thing; }\n et.splice(et.indexOf(fn), 1);\n }\n return thing;\n };\n thing.emit = function () {\n var args = atoa(arguments);\n return thing.emitterSnapshot(args.shift()).apply(this, args);\n };\n thing.emitterSnapshot = function (type) {\n var et = (evt[type] || []).slice(0);\n return function () {\n var args = atoa(arguments);\n var ctx = this || thing;\n if (type === 'error' && opts.throws !== false && !et.length) { throw args.length === 1 ? args[0] : args; }\n et.forEach(function emitter (listen) {\n if (opts.async) { debounce(listen, args, ctx); } else { listen.apply(ctx, args); }\n if (listen._once) { thing.off(type, listen); }\n });\n return thing;\n };\n };\n return thing;\n};\n","module.exports = function atoa (a, n) { return Array.prototype.slice.call(a, n); }\n","'use strict';\n\nvar ticky = require('ticky');\n\nmodule.exports = function debounce (fn, args, ctx) {\n if (!fn) { return; }\n ticky(function run () {\n fn.apply(ctx || null, args || []);\n });\n};\n","var si = typeof setImmediate === 'function', tick;\nif (si) {\n tick = function (fn) { setImmediate(fn); };\n} else {\n tick = function (fn) { setTimeout(fn, 0); };\n}\n\nmodule.exports = tick;","'use strict';\n\nvar customEvent = require('custom-event');\nvar eventmap = require('./eventmap');\nvar doc = global.document;\nvar addEvent = addEventEasy;\nvar removeEvent = removeEventEasy;\nvar hardCache = [];\n\nif (!global.addEventListener) {\n addEvent = addEventHard;\n removeEvent = removeEventHard;\n}\n\nmodule.exports = {\n add: addEvent,\n remove: removeEvent,\n fabricate: fabricateEvent\n};\n\nfunction addEventEasy (el, type, fn, capturing) {\n return el.addEventListener(type, fn, capturing);\n}\n\nfunction addEventHard (el, type, fn) {\n return el.attachEvent('on' + type, wrap(el, type, fn));\n}\n\nfunction removeEventEasy (el, type, fn, capturing) {\n return el.removeEventListener(type, fn, capturing);\n}\n\nfunction removeEventHard (el, type, fn) {\n var listener = unwrap(el, type, fn);\n if (listener) {\n return el.detachEvent('on' + type, listener);\n }\n}\n\nfunction fabricateEvent (el, type, model) {\n var e = eventmap.indexOf(type) === -1 ? makeCustomEvent() : makeClassicEvent();\n if (el.dispatchEvent) {\n el.dispatchEvent(e);\n } else {\n el.fireEvent('on' + type, e);\n }\n function makeClassicEvent () {\n var e;\n if (doc.createEvent) {\n e = doc.createEvent('Event');\n e.initEvent(type, true, true);\n } else if (doc.createEventObject) {\n e = doc.createEventObject();\n }\n return e;\n }\n function makeCustomEvent () {\n return new customEvent(type, { detail: model });\n }\n}\n\nfunction wrapperFactory (el, type, fn) {\n return function wrapper (originalEvent) {\n var e = originalEvent || global.event;\n e.target = e.target || e.srcElement;\n e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; };\n e.stopPropagation = e.stopPropagation || function stopPropagation () { e.cancelBubble = true; };\n e.which = e.which || e.keyCode;\n fn.call(el, e);\n };\n}\n\nfunction wrap (el, type, fn) {\n var wrapper = unwrap(el, type, fn) || wrapperFactory(el, type, fn);\n hardCache.push({\n wrapper: wrapper,\n element: el,\n type: type,\n fn: fn\n });\n return wrapper;\n}\n\nfunction unwrap (el, type, fn) {\n var i = find(el, type, fn);\n if (i) {\n var wrapper = hardCache[i].wrapper;\n hardCache.splice(i, 1); // free up a tad of memory\n return wrapper;\n }\n}\n\nfunction find (el, type, fn) {\n var i, item;\n for (i = 0; i < hardCache.length; i++) {\n item = hardCache[i];\n if (item.element === el && item.type === type && item.fn === fn) {\n return i;\n }\n }\n}\n","\nvar NativeCustomEvent = global.CustomEvent;\n\nfunction useNative () {\n try {\n var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } });\n return 'cat' === p.type && 'bar' === p.detail.foo;\n } catch (e) {\n }\n return false;\n}\n\n/**\n * Cross-browser `CustomEvent` constructor.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent\n *\n * @public\n */\n\nmodule.exports = useNative() ? NativeCustomEvent :\n\n// IE >= 9\n'undefined' !== typeof document && 'function' === typeof document.createEvent ? function CustomEvent (type, params) {\n var e = document.createEvent('CustomEvent');\n if (params) {\n e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail);\n } else {\n e.initCustomEvent(type, false, false, void 0);\n }\n return e;\n} :\n\n// IE <= 8\nfunction CustomEvent (type, params) {\n var e = document.createEventObject();\n e.type = type;\n if (params) {\n e.bubbles = Boolean(params.bubbles);\n e.cancelable = Boolean(params.cancelable);\n e.detail = params.detail;\n } else {\n e.bubbles = false;\n e.cancelable = false;\n e.detail = void 0;\n }\n return e;\n}\n","'use strict';\n\nvar eventmap = [];\nvar eventname = '';\nvar ron = /^on/;\n\nfor (eventname in global) {\n if (ron.test(eventname)) {\n eventmap.push(eventname.slice(2));\n }\n}\n\nmodule.exports = eventmap;\n","'use strict';\n\nvar cache = {};\nvar start = '(?:^|\\\\s)';\nvar end = '(?:\\\\s|$)';\n\nfunction lookupClass (className) {\n var cached = cache[className];\n if (cached) {\n cached.lastIndex = 0;\n } else {\n cache[className] = cached = new RegExp(start + className + end, 'g');\n }\n return cached;\n}\n\nfunction addClass (el, className) {\n var current = el.className;\n if (!current.length) {\n el.className = className;\n } else if (!lookupClass(className).test(current)) {\n el.className += ' ' + className;\n }\n}\n\nfunction rmClass (el, className) {\n el.className = el.className.replace(lookupClass(className), ' ').trim();\n}\n\nmodule.exports = {\n add: addClass,\n rm: rmClass\n};\n","import styles from \"./style.css\";\n\nif (!document) {\n throw Error(\"electron-tabs module must be called in renderer process\");\n}\n\nclass TabGroup extends HTMLElement {\n constructor () {\n super();\n\n // Options\n this.options = {\n closeButtonText: this.getAttribute(\"close-button-text\") || \"×\",\n newTabButtonText: this.getAttribute(\"new-tab-button-text\") || \"+\",\n visibilityThreshold: this.getAttribute(\"visibility-threshold\") || 0,\n tabClass: this.getAttribute(\"tab-class\") || \"etabs-tab\",\n viewClass: this.getAttribute(\"view-class\") || \"etabs-view\",\n newTabButton: this.getAttribute(\"new-tab-button\") || false,\n defaultTab: { title: \"New Tab\", active: true },\n draggable: this.getAttribute(\"draggable\") || false\n // TODO: replace this callback\n // ready: args.ready\n };\n\n // Create custom element\n const shadow = this.attachShadow({mode: \"open\"});\n\n const wrapper = document.createElement(\"div\");\n wrapper.setAttribute(\"class\", \"etabs\");\n\n const tabgroup = document.createElement(\"div\");\n tabgroup.setAttribute(\"class\", \"etabs-tabgroup\");\n wrapper.appendChild(tabgroup);\n\n const tabContainer = document.createElement(\"div\");\n tabContainer.setAttribute(\"class\", \"etabs-tabs\");\n tabgroup.appendChild(tabContainer);\n this.tabContainer = tabContainer;\n\n const buttonContainer = document.createElement(\"div\");\n buttonContainer.setAttribute(\"class\", \"etabs-buttons\");\n tabgroup.appendChild(buttonContainer);\n this.buttonContainer = buttonContainer;\n\n const viewContainer = document.createElement(\"div\");\n viewContainer.setAttribute(\"class\", \"etabs-views\");\n wrapper.appendChild(viewContainer);\n this.viewContainer = viewContainer;\n\n const style = document.createElement(\"style\");\n style.textContent = styles;\n\n shadow.appendChild(style);\n shadow.appendChild(wrapper);\n\n this.tabs = [];\n this.newTabId = 0;\n TabGroupPrivate.initNewTabButton.bind(this)();\n TabGroupPrivate.initVisibility.bind(this)();\n\n // Init draggable tabs\n if (this.options.draggable) {\n const initDragula = () => {\n // FIXME: dragula doesnt support shadow dom :-(\n console.log(this.tabContainer);\n const d =window.dragula([this.tabContainer], {\n direction: \"horizontal\"\n });\n console.log(d);\n };\n\n if (window.dragula) {\n initDragula();\n } else {\n document.addEventListener(\"DOMContentLoaded\", initDragula);\n }\n }\n }\n\n setDefaultTab (tab) {\n this.options.defaultTab = tab;\n }\n\n addTab (args = this.options.defaultTab) {\n if (typeof args === \"function\") {\n args = args(this);\n }\n let id = this.newTabId;\n this.newTabId++;\n let tab = new Tab(this, id, args);\n this.tabs.push(tab);\n // Don't call tab.activate() before a tab is referenced in this.tabs\n if (args.active === true) {\n tab.activate();\n }\n this.emit(\"tab-added\", tab, this);\n return tab;\n }\n\n getTab (id) {\n for (let i in this.tabs) {\n if (this.tabs[i].id === id) {\n return this.tabs[i];\n }\n }\n return null;\n }\n\n getTabByPosition (position) {\n let fromRight = position < 0;\n for (let i in this.tabs) {\n if (this.tabs[i].getPosition(fromRight) === position) {\n return this.tabs[i];\n }\n }\n return null;\n }\n\n getTabByRelPosition (position) {\n position = this.getActiveTab().getPosition() + position;\n if (position <= 0) {\n return null;\n }\n return this.getTabByPosition(position);\n }\n\n getNextTab () {\n return this.getTabByRelPosition(1);\n }\n\n getPreviousTab () {\n return this.getTabByRelPosition(-1);\n }\n\n getTabs () {\n return this.tabs.slice();\n }\n\n eachTab (fn) {\n this.getTabs().forEach(fn);\n return this;\n }\n\n getActiveTab () {\n if (this.tabs.length === 0) return null;\n return this.tabs[0];\n }\n}\n\nconst TabGroupPrivate = {\n initNewTabButton: function () {\n if (!this.options.newTabButton) return;\n let button = this.buttonContainer.appendChild(document.createElement(\"button\"));\n button.classList.add(`${this.options.tabClass}-button-new`);\n button.innerHTML = this.options.newTabButtonText;\n button.addEventListener(\"click\", this.addTab.bind(this, undefined), false);\n },\n\n initVisibility: function () {\n function toggleTabsVisibility(tab, tabGroup) {\n var visibilityThreshold = this.options.visibilityThreshold;\n var el = tabGroup.tabContainer.parentNode;\n if (this.tabs.length >= visibilityThreshold) {\n el.classList.add(\"visible\");\n } else {\n el.classList.remove(\"visible\");\n }\n }\n\n this.on(\"tab-added\", toggleTabsVisibility);\n this.on(\"tab-removed\", toggleTabsVisibility);\n },\n\n removeTab: function (tab, triggerEvent) {\n let id = tab.id;\n for (let i in this.tabs) {\n if (this.tabs[i].id === id) {\n this.tabs.splice(i, 1);\n break;\n }\n }\n if (triggerEvent) {\n this.emit(\"tab-removed\", tab, this);\n }\n return this;\n },\n\n setActiveTab: function (tab) {\n TabGroupPrivate.removeTab.bind(this)(tab);\n this.tabs.unshift(tab);\n this.emit(\"tab-active\", tab, this);\n return this;\n },\n\n activateRecentTab: function (tab) {\n if (this.tabs.length > 0) {\n this.tabs[0].activate();\n }\n return this;\n }\n};\n\nclass Tab extends EventTarget {\n constructor (tabGroup, id, args) {\n super();\n this.tabGroup = tabGroup;\n this.id = id;\n this.title = args.title;\n this.badge = args.badge;\n this.iconURL = args.iconURL;\n this.icon = args.icon;\n this.closable = args.closable === false ? false : true;\n this.webviewAttributes = args.webviewAttributes || {};\n this.webviewAttributes.src = args.src;\n this.tabElements = {};\n TabPrivate.initTab.bind(this)();\n TabPrivate.initWebview.bind(this)();\n if (args.visible !== false) {\n this.show();\n }\n if (typeof args.ready === \"function\") {\n args.ready(this);\n }\n }\n\n setTitle (title) {\n if (this.isClosed) return;\n let span = this.tabElements.title;\n span.innerHTML = title;\n span.title = title;\n this.title = title;\n this.emit(\"title-changed\", title, this);\n return this;\n }\n\n getTitle () {\n if (this.isClosed) return;\n return this.title;\n }\n\n setBadge (badge) {\n if (this.isClosed) return;\n let span = this.tabElements.badge;\n this.badge = badge;\n\n if (badge) {\n span.innerHTML = badge;\n span.classList.remove(\"hidden\");\n } else {\n span.classList.add(\"hidden\");\n }\n\n this.emit(\"badge-changed\", badge, this);\n }\n\n getBadge () {\n if (this.isClosed) return;\n return this.badge;\n }\n\n setIcon (iconURL, icon) {\n if (this.isClosed) return;\n this.iconURL = iconURL;\n this.icon = icon;\n let span = this.tabElements.icon;\n if (iconURL) {\n span.innerHTML = ``;\n this.emit(\"icon-changed\", iconURL, this);\n } else if (icon) {\n span.innerHTML = ``;\n this.emit(\"icon-changed\", icon, this);\n }\n\n return this;\n }\n\n getIcon () {\n if (this.isClosed) return;\n if (this.iconURL) return this.iconURL;\n return this.icon;\n }\n\n setPosition (newPosition) {\n let tabContainer = this.tabGroup.tabContainer;\n let tabs = tabContainer.children;\n let oldPosition = this.getPosition() - 1;\n\n if (newPosition < 0) {\n newPosition += tabContainer.childElementCount;\n\n if (newPosition < 0) {\n newPosition = 0;\n }\n } else {\n if (newPosition > tabContainer.childElementCount) {\n newPosition = tabContainer.childElementCount;\n }\n\n // Make 1 be leftmost position\n newPosition--;\n }\n\n if (newPosition > oldPosition) {\n newPosition++;\n }\n\n tabContainer.insertBefore(tabs[oldPosition], tabs[newPosition]);\n\n return this;\n }\n\n getPosition (fromRight) {\n let position = 0;\n let tab = this.tab;\n while ((tab = tab.previousSibling) != null) position++;\n\n if (fromRight === true) {\n position -= this.tabGroup.tabContainer.childElementCount;\n }\n\n if (position >= 0) {\n position++;\n }\n\n return position;\n }\n\n activate () {\n if (this.isClosed) return;\n let activeTab = this.tabGroup.getActiveTab();\n if (activeTab) {\n activeTab.tab.classList.remove(\"active\");\n activeTab.webview.classList.remove(\"visible\");\n activeTab.emit(\"inactive\", activeTab);\n }\n TabGroupPrivate.setActiveTab.bind(this.tabGroup)(this);\n this.tab.classList.add(\"active\");\n this.webview.classList.add(\"visible\");\n this.webview.focus();\n this.emit(\"active\", this);\n return this;\n }\n\n show (flag) {\n if (this.isClosed) return;\n if (flag !== false) {\n this.tab.classList.add(\"visible\");\n this.emit(\"visible\", this);\n } else {\n this.tab.classList.remove(\"visible\");\n this.emit(\"hidden\", this);\n }\n return this;\n }\n\n hide () {\n return this.show(false);\n }\n\n flash (flag) {\n if (this.isClosed) return;\n if (flag !== false) {\n this.tab.classList.add(\"flash\");\n this.emit(\"flash\", this);\n } else {\n this.tab.classList.remove(\"flash\");\n this.emit(\"unflash\", this);\n }\n return this;\n }\n\n unflash () {\n return this.flash(false);\n }\n\n hasClass (classname) {\n return this.tab.classList.contains(classname);\n }\n\n close (force) {\n const abortController = new AbortController();\n const abort = () => abortController.abort();\n this.emit(\"closing\", this, abort);\n\n const abortSignal = abortController.signal;\n if (this.isClosed || (!this.closable && !force) || abortSignal.aborted) return;\n\n this.isClosed = true;\n let tabGroup = this.tabGroup;\n tabGroup.tabContainer.removeChild(this.tab);\n tabGroup.viewContainer.removeChild(this.webview);\n let activeTab = this.tabGroup.getActiveTab();\n TabGroupPrivate.removeTab.bind(tabGroup)(this, true);\n\n this.emit(\"close\", this);\n\n if (activeTab.id === this.id) {\n TabGroupPrivate.activateRecentTab.bind(tabGroup)();\n }\n }\n}\n\nconst TabPrivate = {\n initTab: function () {\n let tabClass = this.tabGroup.options.tabClass;\n\n // Create tab element\n let tab = this.tab = document.createElement(\"div\");\n tab.classList.add(tabClass);\n for (let el of [\"icon\", \"title\", \"buttons\", \"badge\"]) {\n let span = tab.appendChild(document.createElement(\"span\"));\n span.classList.add(`${tabClass}-${el}`);\n this.tabElements[el] = span;\n }\n\n this.setTitle(this.title);\n this.setBadge(this.badge);\n this.setIcon(this.iconURL, this.icon);\n TabPrivate.initTabButtons.bind(this)();\n TabPrivate.initTabClickHandler.bind(this)();\n\n this.tabGroup.tabContainer.appendChild(this.tab);\n },\n\n initTabButtons: function () {\n let container = this.tabElements.buttons;\n let tabClass = this.tabGroup.options.tabClass;\n if (this.closable) {\n let button = container.appendChild(document.createElement(\"button\"));\n button.classList.add(`${tabClass}-button-close`);\n button.innerHTML = this.tabGroup.options.closeButtonText;\n button.addEventListener(\"click\", this.close.bind(this, false), false);\n }\n },\n\n initTabClickHandler: function () {\n // Mouse up\n const tabClickHandler = function (e) {\n if (this.isClosed) return;\n if (e.which === 2) {\n this.close();\n }\n };\n this.tab.addEventListener(\"mouseup\", tabClickHandler.bind(this), false);\n // Mouse down\n const tabMouseDownHandler = function (e) {\n if (this.isClosed) return;\n if (e.which === 1) {\n if (e.target.matches(\"button\")) return;\n this.activate();\n }\n };\n this.tab.addEventListener(\"mousedown\", tabMouseDownHandler.bind(this), false);\n },\n\n initWebview: function () {\n const webview = this.webview = document.createElement(\"webview\");\n\n const tabWebviewDidFinishLoadHandler = function (e) {\n this.emit(\"webview-ready\", this);\n };\n\n this.webview.addEventListener(\"did-finish-load\", tabWebviewDidFinishLoadHandler.bind(this), false);\n\n const tabWebviewDomReadyHandler = function (e) {\n // Remove this once https://github.com/electron/electron/issues/14474 is fixed\n webview.blur();\n webview.focus();\n this.emit(\"webview-dom-ready\", this);\n };\n\n this.webview.addEventListener(\"dom-ready\", tabWebviewDomReadyHandler.bind(this), false);\n\n this.webview.classList.add(this.tabGroup.options.viewClass);\n if (this.webviewAttributes) {\n let attrs = this.webviewAttributes;\n for (let key in attrs) {\n const attr = attrs[key];\n if (attr === false) continue;\n this.webview.setAttribute(key, attr);\n }\n }\n\n this.tabGroup.viewContainer.appendChild(this.webview);\n }\n};\n\n/**\n * This makes the browser EventTarget API work similar to EventEmitter\n */\nconst eventEmitterMixin = {\n emit (type, ...args) {\n this.dispatchEvent(new CustomEvent(type, { detail: args }));\n },\n\n on (type, fn) {\n this.addEventListener(type, ({ detail }) => fn.apply(this, detail));\n },\n\n once (type, fn) {\n this.addEventListener(type, ({ detail }) => fn.apply(this, detail), { once: true });\n }\n};\n\nObject.assign(TabGroup.prototype, eventEmitterMixin);\nObject.assign(Tab.prototype, eventEmitterMixin);\n\ncustomElements.define(\"tab-group\", TabGroup);\n","exports.interopDefault = function (a) {\n return a && a.__esModule ? a : {default: a};\n};\n\nexports.defineInteropFlag = function (a) {\n Object.defineProperty(a, '__esModule', {value: true});\n};\n\nexports.exportAll = function (source, dest) {\n Object.keys(source).forEach(function (key) {\n if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function () {\n return source[key];\n },\n });\n });\n\n return dest;\n};\n\nexports.export = function (dest, destName, get) {\n Object.defineProperty(dest, destName, {\n enumerable: true,\n get: get,\n });\n};\n","/* TODO: use custom properties */\n\nwebview {\n position: absolute;\n visibility: hidden;\n width: 100%;\n height: 100%;\n}\n\nwebview.visible {\n visibility: visible;\n}\n\n.etabs {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n text-rendering: optimizeLegibility;\n font-feature-settings: 'liga', 'clig', 'kern';\n}\n\n.etabs-tabgroup {\n width: 100%;\n height: 32px;\n cursor: default;\n font: caption;\n font-size: 14px;\n -webkit-user-select: none;\n user-select: none;\n display: none;\n background: #E7EAED;\n box-shadow: inset 0 -1px #DADCE0;\n border-top: 1px solid #DADCE0;\n}\n\n.etabs-tabgroup.visible {\n display: flex;\n}\n\n.etabs-tabs {\n height: 100%;\n}\n\n.etabs-tab {\n display: none;\n position: relative;\n height: 100%;\n background: #E7EAED;\n color: #696A6C;\n padding: 5px 9px;\n transition: background-color 150ms ease-out;\n box-shadow: inset 0 -1px #DADCE0;\n font: caption;\n font-size: 13px;\n cursor: pointer;\n box-sizing: border-box;\n}\n\n/* Dragula */\n.etabs-tab.gu-mirror {\n padding-bottom: 0;\n cursor: grab;\n\tborder: none;\n}\n\n.etabs-tab:first-child {\n border-left: none;\n}\n\n.etabs-tab.visible {\n display: inline-block;\n}\n\n.etabs-tab.active {\n background: #fff;\n box-shadow: none;\n\tborder-left: 1px solid #DADCE0;\n\tborder-right: 1px solid #DADCE0;\n\tpadding-left: 8px;\n\tpadding-right: 8px;\n}\n\n.etabs-tab.flash {\n background: linear-gradient(to bottom, rgba(255,243,170,1) 0%,rgba(255,227,37,1) 100%);\n}\n\n.etabs-tab.visible:not(.active)+.etabs-tab.visible:not(.active) {\n\tborder-left: 1px solid #B4B6B8;\n\tpadding-left: 8px;\n}\n\n.etabs-tab:not(.active):hover {\n\tbackground: #F1F3F4;\n}\n\n.etabs-buttons {\n border-left: 1px solid #B4B6B8;\n}\n\n.etabs-buttons button {\n display: block;\n color: #777;\n background: none;\n border: none;\n font-size: 16px;\n font-family: inherit;\n margin-top: 5px;\n border-radius: 50%;\n margin-left: 4px;\n width: 20px;\n height: 20px;\n text-align: center;\n line-height: 14px;\n padding: 1px 0 0 0;\n\tcursor: pointer;\n}\n\n.etabs-buttons button:hover {\n color: #333;\n background-color: #bbb;\n}\n\n.etabs-tab-badge {\n position: absolute;\n right: 0;\n top: -7px;\n background: red;\n border-radius: 100%;\n text-align: center;\n font-size: 10px;\n padding: 0 5px;\n}\n\n.etabs-tab-badge.hidden {\n display: none;\n}\n\n.etabs-tab-icon {\n display: inline-block;\n height: 16px;\n}\n\n.etabs-tab-icon img {\n max-width: 16px;\n max-height: 16px;\n}\n\n.etabs-tab-title {\n display: inline-block;\n margin-left: 10px;\n}\n\n.etabs-tab-buttons {\n display: inline-block;\n margin-left: 10px;\n}\n\n.etabs-tab-buttons button {\n display: inline-block;\n color: #777;\n background: none;\n border: none;\n width: 20px;\n height: 20px;\n text-align: center;\n border-radius: 50%;\n cursor: pointer;\n padding: 1px 0 0 0;\n font-size: 16px;\n}\n\n.etabs-tab-buttons button:hover {\n color: #333;\n background-color: #bbb;\n}\n\n.etabs-views {\n position: relative;\n height: calc(100vh - 33px);\n}\n\n.etab-view {\n position: relative;\n}\n",".gu-mirror {\n position: fixed !important;\n margin: 0 !important;\n z-index: 9999 !important;\n opacity: 0.8;\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)\";\n filter: alpha(opacity=80);\n}\n.gu-hide {\n display: none !important;\n}\n.gu-unselectable {\n -webkit-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n}\n.gu-transit {\n opacity: 0.2;\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)\";\n filter: alpha(opacity=20);\n}\n"],"names":[],"version":3,"file":"electron-tabs.draggable.js.map","sourceRoot":"../"} \ No newline at end of file +{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAsJ,YAAY,CAAC;AAAnK,IAAI,QAAQ,GAAG,IAAI,AAAC;AAAA,IAAI,QAAQ,GAAG,IAAI,AAAC;AAAA,IAAI,UAAU,GAAG,KAAK,AAAC;AAAA,IAAI,YAAY,GAAG,kBAAkB,AAAC;AAAA,MAAM,CAAC,MAAM,CAAC,aAAa,GAAG,kBAAkB,CAAC;AAEtJ,SAAS,kBAAkB,CAAC,GAAG,EAAE;IAAE,OAAO,kBAAkB,CAAC,GAAG,CAA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AAM,CAAC,CAAC;kBAEhB,QAAQ,AAtsHvB,CAssHwB","sources":["node_modules/@parcel/runtime-browser-hmr/lib/runtime-d9890fba0b088434.js","src/draggable.js","src/index.js","src/style.css","node_modules/@parcel/transformer-js/src/esmodule-helpers.js","node_modules/sortablejs/modular/sortable.esm.js"],"sourcesContent":["var HMR_HOST = null;var HMR_PORT = 1234;var HMR_SECURE = false;var HMR_ENV_HASH = \"d6ea1d42532a7575\";module.bundle.HMR_BUNDLE_ID = \"2f45e28c8a3d245e\";\"use strict\";\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n/* global HMR_HOST, HMR_PORT, HMR_ENV_HASH, HMR_SECURE, chrome, browser */\n\n/*::\nimport type {\n HMRAsset,\n HMRMessage,\n} from '@parcel/reporter-dev-server/src/HMRServer.js';\ninterface ParcelRequire {\n (string): mixed;\n cache: {|[string]: ParcelModule|};\n hotData: mixed;\n Module: any;\n parent: ?ParcelRequire;\n isParcelRequire: true;\n modules: {|[string]: [Function, {|[string]: string|}]|};\n HMR_BUNDLE_ID: string;\n root: ParcelRequire;\n}\ninterface ParcelModule {\n hot: {|\n data: mixed,\n accept(cb: (Function) => void): void,\n dispose(cb: (mixed) => void): void,\n // accept(deps: Array | string, cb: (Function) => void): void,\n // decline(): void,\n _acceptCallbacks: Array<(Function) => void>,\n _disposeCallbacks: Array<(mixed) => void>,\n |};\n}\ninterface ExtensionContext {\n runtime: {|\n reload(): void,\n |};\n}\ndeclare var module: {bundle: ParcelRequire, ...};\ndeclare var HMR_HOST: string;\ndeclare var HMR_PORT: string;\ndeclare var HMR_ENV_HASH: string;\ndeclare var HMR_SECURE: boolean;\ndeclare var chrome: ExtensionContext;\ndeclare var browser: ExtensionContext;\n*/\nvar OVERLAY_ID = '__parcel__error__overlay__';\nvar OldModule = module.bundle.Module;\n\nfunction Module(moduleName) {\n OldModule.call(this, moduleName);\n this.hot = {\n data: module.bundle.hotData,\n _acceptCallbacks: [],\n _disposeCallbacks: [],\n accept: function accept(fn) {\n this._acceptCallbacks.push(fn || function () {});\n },\n dispose: function dispose(fn) {\n this._disposeCallbacks.push(fn);\n }\n };\n module.bundle.hotData = undefined;\n}\n\nmodule.bundle.Module = Module;\nvar checkedAssets\n/*: {|[string]: boolean|} */\n, acceptedAssets\n/*: {|[string]: boolean|} */\n, assetsToAccept\n/*: Array<[ParcelRequire, string]> */\n;\n\nfunction getHostname() {\n return HMR_HOST || (location.protocol.indexOf('http') === 0 ? location.hostname : 'localhost');\n}\n\nfunction getPort() {\n return HMR_PORT || location.port;\n} // eslint-disable-next-line no-redeclare\n\n\nvar parent = module.bundle.parent;\n\nif ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {\n var hostname = getHostname();\n var port = getPort();\n var protocol = HMR_SECURE || location.protocol == 'https:' && !/localhost|127.0.0.1|0.0.0.0/.test(hostname) ? 'wss' : 'ws';\n var ws = new WebSocket(protocol + '://' + hostname + (port ? ':' + port : '') + '/'); // $FlowFixMe\n\n ws.onmessage = function (event\n /*: {data: string, ...} */\n ) {\n checkedAssets = {}\n /*: {|[string]: boolean|} */\n ;\n acceptedAssets = {}\n /*: {|[string]: boolean|} */\n ;\n assetsToAccept = [];\n var data\n /*: HMRMessage */\n = JSON.parse(event.data);\n\n if (data.type === 'update') {\n // Remove error overlay if there is one\n if (typeof document !== 'undefined') {\n removeErrorOverlay();\n }\n\n var assets = data.assets.filter(function (asset) {\n return asset.envHash === HMR_ENV_HASH;\n }); // Handle HMR Update\n\n var handled = assets.every(function (asset) {\n return asset.type === 'css' || asset.type === 'js' && hmrAcceptCheck(module.bundle.root, asset.id, asset.depsByBundle);\n });\n\n if (handled) {\n console.clear();\n assets.forEach(function (asset) {\n hmrApply(module.bundle.root, asset);\n });\n\n for (var i = 0; i < assetsToAccept.length; i++) {\n var id = assetsToAccept[i][1];\n\n if (!acceptedAssets[id]) {\n hmrAcceptRun(assetsToAccept[i][0], id);\n }\n }\n } else if ('reload' in location) {\n location.reload();\n } else {\n // Web extension context\n var ext = typeof chrome === 'undefined' ? typeof browser === 'undefined' ? null : browser : chrome;\n\n if (ext && ext.runtime && ext.runtime.reload) {\n ext.runtime.reload();\n }\n }\n }\n\n if (data.type === 'error') {\n // Log parcel errors to console\n var _iterator = _createForOfIteratorHelper(data.diagnostics.ansi),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var ansiDiagnostic = _step.value;\n var stack = ansiDiagnostic.codeframe ? ansiDiagnostic.codeframe : ansiDiagnostic.stack;\n console.error('🚨 [parcel]: ' + ansiDiagnostic.message + '\\n' + stack + '\\n\\n' + ansiDiagnostic.hints.join('\\n'));\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n if (typeof document !== 'undefined') {\n // Render the fancy html overlay\n removeErrorOverlay();\n var overlay = createErrorOverlay(data.diagnostics.html); // $FlowFixMe\n\n document.body.appendChild(overlay);\n }\n }\n };\n\n ws.onerror = function (e) {\n console.error(e.message);\n };\n\n ws.onclose = function () {\n console.warn('[parcel] 🚨 Connection to the HMR server was lost');\n };\n}\n\nfunction removeErrorOverlay() {\n var overlay = document.getElementById(OVERLAY_ID);\n\n if (overlay) {\n overlay.remove();\n console.log('[parcel] ✨ Error resolved');\n }\n}\n\nfunction createErrorOverlay(diagnostics) {\n var overlay = document.createElement('div');\n overlay.id = OVERLAY_ID;\n var errorHTML = '
';\n\n var _iterator2 = _createForOfIteratorHelper(diagnostics),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var diagnostic = _step2.value;\n var stack = diagnostic.codeframe ? diagnostic.codeframe : diagnostic.stack;\n errorHTML += \"\\n
\\n
\\n \\uD83D\\uDEA8 \".concat(diagnostic.message, \"\\n
\\n
\").concat(stack, \"
\\n
\\n \").concat(diagnostic.hints.map(function (hint) {\n return '
💡 ' + hint + '
';\n }).join(''), \"\\n
\\n \").concat(diagnostic.documentation ? \"
\\uD83D\\uDCDD Learn more
\") : '', \"\\n
\\n \");\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n errorHTML += '
';\n overlay.innerHTML = errorHTML;\n return overlay;\n}\n\nfunction getParents(bundle, id)\n/*: Array<[ParcelRequire, string]> */\n{\n var modules = bundle.modules;\n\n if (!modules) {\n return [];\n }\n\n var parents = [];\n var k, d, dep;\n\n for (k in modules) {\n for (d in modules[k][1]) {\n dep = modules[k][1][d];\n\n if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {\n parents.push([bundle, k]);\n }\n }\n }\n\n if (bundle.parent) {\n parents = parents.concat(getParents(bundle.parent, id));\n }\n\n return parents;\n}\n\nfunction updateLink(link) {\n var newLink = link.cloneNode();\n\n newLink.onload = function () {\n if (link.parentNode !== null) {\n // $FlowFixMe\n link.parentNode.removeChild(link);\n }\n };\n\n newLink.setAttribute('href', // $FlowFixMe\n link.getAttribute('href').split('?')[0] + '?' + Date.now()); // $FlowFixMe\n\n link.parentNode.insertBefore(newLink, link.nextSibling);\n}\n\nvar cssTimeout = null;\n\nfunction reloadCSS() {\n if (cssTimeout) {\n return;\n }\n\n cssTimeout = setTimeout(function () {\n var links = document.querySelectorAll('link[rel=\"stylesheet\"]');\n\n for (var i = 0; i < links.length; i++) {\n // $FlowFixMe[incompatible-type]\n var href\n /*: string */\n = links[i].getAttribute('href');\n var hostname = getHostname();\n var servedFromHMRServer = hostname === 'localhost' ? new RegExp('^(https?:\\\\/\\\\/(0.0.0.0|127.0.0.1)|localhost):' + getPort()).test(href) : href.indexOf(hostname + ':' + getPort());\n var absolute = /^https?:\\/\\//i.test(href) && href.indexOf(location.origin) !== 0 && !servedFromHMRServer;\n\n if (!absolute) {\n updateLink(links[i]);\n }\n }\n\n cssTimeout = null;\n }, 50);\n}\n\nfunction hmrApply(bundle\n/*: ParcelRequire */\n, asset\n/*: HMRAsset */\n) {\n var modules = bundle.modules;\n\n if (!modules) {\n return;\n }\n\n if (asset.type === 'css') {\n reloadCSS();\n } else if (asset.type === 'js') {\n var deps = asset.depsByBundle[bundle.HMR_BUNDLE_ID];\n\n if (deps) {\n if (modules[asset.id]) {\n // Remove dependencies that are removed and will become orphaned.\n // This is necessary so that if the asset is added back again, the cache is gone, and we prevent a full page reload.\n var oldDeps = modules[asset.id][1];\n\n for (var dep in oldDeps) {\n if (!deps[dep] || deps[dep] !== oldDeps[dep]) {\n var id = oldDeps[dep];\n var parents = getParents(module.bundle.root, id);\n\n if (parents.length === 1) {\n hmrDelete(module.bundle.root, id);\n }\n }\n }\n }\n\n var fn = new Function('require', 'module', 'exports', asset.output);\n modules[asset.id] = [fn, deps];\n } else if (bundle.parent) {\n hmrApply(bundle.parent, asset);\n }\n }\n}\n\nfunction hmrDelete(bundle, id) {\n var modules = bundle.modules;\n\n if (!modules) {\n return;\n }\n\n if (modules[id]) {\n // Collect dependencies that will become orphaned when this module is deleted.\n var deps = modules[id][1];\n var orphans = [];\n\n for (var dep in deps) {\n var parents = getParents(module.bundle.root, deps[dep]);\n\n if (parents.length === 1) {\n orphans.push(deps[dep]);\n }\n } // Delete the module. This must be done before deleting dependencies in case of circular dependencies.\n\n\n delete modules[id];\n delete bundle.cache[id]; // Now delete the orphans.\n\n orphans.forEach(function (id) {\n hmrDelete(module.bundle.root, id);\n });\n } else if (bundle.parent) {\n hmrDelete(bundle.parent, id);\n }\n}\n\nfunction hmrAcceptCheck(bundle\n/*: ParcelRequire */\n, id\n/*: string */\n, depsByBundle\n/*: ?{ [string]: { [string]: string } }*/\n) {\n if (hmrAcceptCheckOne(bundle, id, depsByBundle)) {\n return true;\n } // Traverse parents breadth first. All possible ancestries must accept the HMR update, or we'll reload.\n\n\n var parents = getParents(module.bundle.root, id);\n var accepted = false;\n\n while (parents.length > 0) {\n var v = parents.shift();\n var a = hmrAcceptCheckOne(v[0], v[1], null);\n\n if (a) {\n // If this parent accepts, stop traversing upward, but still consider siblings.\n accepted = true;\n } else {\n // Otherwise, queue the parents in the next level upward.\n var p = getParents(module.bundle.root, v[1]);\n\n if (p.length === 0) {\n // If there are no parents, then we've reached an entry without accepting. Reload.\n accepted = false;\n break;\n }\n\n parents.push.apply(parents, _toConsumableArray(p));\n }\n }\n\n return accepted;\n}\n\nfunction hmrAcceptCheckOne(bundle\n/*: ParcelRequire */\n, id\n/*: string */\n, depsByBundle\n/*: ?{ [string]: { [string]: string } }*/\n) {\n var modules = bundle.modules;\n\n if (!modules) {\n return;\n }\n\n if (depsByBundle && !depsByBundle[bundle.HMR_BUNDLE_ID]) {\n // If we reached the root bundle without finding where the asset should go,\n // there's nothing to do. Mark as \"accepted\" so we don't reload the page.\n if (!bundle.parent) {\n return true;\n }\n\n return hmrAcceptCheck(bundle.parent, id, depsByBundle);\n }\n\n if (checkedAssets[id]) {\n return true;\n }\n\n checkedAssets[id] = true;\n var cached = bundle.cache[id];\n assetsToAccept.push([bundle, id]);\n\n if (!cached || cached.hot && cached.hot._acceptCallbacks.length) {\n return true;\n }\n}\n\nfunction hmrAcceptRun(bundle\n/*: ParcelRequire */\n, id\n/*: string */\n) {\n var cached = bundle.cache[id];\n bundle.hotData = {};\n\n if (cached && cached.hot) {\n cached.hot.data = bundle.hotData;\n }\n\n if (cached && cached.hot && cached.hot._disposeCallbacks.length) {\n cached.hot._disposeCallbacks.forEach(function (cb) {\n cb(bundle.hotData);\n });\n }\n\n delete bundle.cache[id];\n bundle(id);\n cached = bundle.cache[id];\n\n if (cached && cached.hot && cached.hot._acceptCallbacks.length) {\n cached.hot._acceptCallbacks.forEach(function (cb) {\n var assetsToAlsoAccept = cb(function () {\n return getParents(module.bundle.root, id);\n });\n\n if (assetsToAlsoAccept && assetsToAccept.length) {\n // $FlowFixMe[method-unbinding]\n assetsToAccept.push.apply(assetsToAccept, assetsToAlsoAccept);\n }\n });\n }\n\n acceptedAssets[id] = true;\n}","import Sortable from \"sortablejs\";\nimport \"./index.js\";\n\nwindow.Sortable = Sortable;\n","import styles from \"./style.css\";\n\nif (!document) {\n throw Error(\"electron-tabs module must be called in renderer process\");\n}\n\nclass TabGroup extends HTMLElement {\n constructor () {\n super();\n\n // Options\n this.options = {\n closeButtonText: this.getAttribute(\"close-button-text\") || \"×\",\n newTabButtonText: this.getAttribute(\"new-tab-button-text\") || \"+\",\n visibilityThreshold: this.getAttribute(\"visibility-threshold\") || 0,\n tabClass: this.getAttribute(\"tab-class\") || \"etabs-tab\",\n viewClass: this.getAttribute(\"view-class\") || \"etabs-view\",\n newTabButton: this.getAttribute(\"new-tab-button\") || false,\n defaultTab: { title: \"New Tab\", active: true },\n draggable: this.getAttribute(\"draggable\") || false\n // TODO: replace this callback\n // ready: args.ready\n };\n\n // Create custom element\n const shadow = this.attachShadow({mode: \"open\"});\n\n const wrapper = document.createElement(\"div\");\n wrapper.setAttribute(\"class\", \"etabs\");\n\n const tabgroup = document.createElement(\"div\");\n tabgroup.setAttribute(\"class\", \"etabs-tabgroup\");\n wrapper.appendChild(tabgroup);\n\n const tabContainer = document.createElement(\"div\");\n tabContainer.setAttribute(\"class\", \"etabs-tabs\");\n tabgroup.appendChild(tabContainer);\n this.tabContainer = tabContainer;\n\n const buttonContainer = document.createElement(\"div\");\n buttonContainer.setAttribute(\"class\", \"etabs-buttons\");\n tabgroup.appendChild(buttonContainer);\n this.buttonContainer = buttonContainer;\n\n const viewContainer = document.createElement(\"div\");\n viewContainer.setAttribute(\"class\", \"etabs-views\");\n wrapper.appendChild(viewContainer);\n this.viewContainer = viewContainer;\n\n const style = document.createElement(\"style\");\n style.textContent = styles;\n\n shadow.appendChild(style);\n shadow.appendChild(wrapper);\n\n this.tabs = [];\n this.newTabId = 0;\n TabGroupPrivate.initNewTabButton.bind(this)();\n TabGroupPrivate.initVisibility.bind(this)();\n\n // Init draggable tabs\n if (this.options.draggable) {\n const initSortable = () => {\n const options = Object.assign({\n direction: \"horizontal\",\n animation: 150,\n swapThreshold: 0.20\n }, this.options.draggableOptions);\n new window.Sortable(this.tabContainer, options);\n };\n\n if (window.Sortable) {\n initSortable();\n } else {\n document.addEventListener(\"DOMContentLoaded\", initSortable);\n }\n }\n }\n\n setDefaultTab (tab) {\n this.options.defaultTab = tab;\n }\n\n addTab (args = this.options.defaultTab) {\n if (typeof args === \"function\") {\n args = args(this);\n }\n let id = this.newTabId;\n this.newTabId++;\n let tab = new Tab(this, id, args);\n this.tabs.push(tab);\n // Don't call tab.activate() before a tab is referenced in this.tabs\n if (args.active === true) {\n tab.activate();\n }\n this.emit(\"tab-added\", tab, this);\n return tab;\n }\n\n getTab (id) {\n for (let i in this.tabs) {\n if (this.tabs[i].id === id) {\n return this.tabs[i];\n }\n }\n return null;\n }\n\n getTabByPosition (position) {\n let fromRight = position < 0;\n for (let i in this.tabs) {\n if (this.tabs[i].getPosition(fromRight) === position) {\n return this.tabs[i];\n }\n }\n return null;\n }\n\n getTabByRelPosition (position) {\n position = this.getActiveTab().getPosition() + position;\n if (position <= 0) {\n return null;\n }\n return this.getTabByPosition(position);\n }\n\n getNextTab () {\n return this.getTabByRelPosition(1);\n }\n\n getPreviousTab () {\n return this.getTabByRelPosition(-1);\n }\n\n getTabs () {\n return this.tabs.slice();\n }\n\n eachTab (fn) {\n this.getTabs().forEach(fn);\n return this;\n }\n\n getActiveTab () {\n if (this.tabs.length === 0) return null;\n return this.tabs[0];\n }\n}\n\nconst TabGroupPrivate = {\n initNewTabButton: function () {\n if (!this.options.newTabButton) return;\n let button = this.buttonContainer.appendChild(document.createElement(\"button\"));\n button.classList.add(`${this.options.tabClass}-button-new`);\n button.innerHTML = this.options.newTabButtonText;\n button.addEventListener(\"click\", this.addTab.bind(this, undefined), false);\n },\n\n initVisibility: function () {\n function toggleTabsVisibility(tab, tabGroup) {\n var visibilityThreshold = this.options.visibilityThreshold;\n var el = tabGroup.tabContainer.parentNode;\n if (this.tabs.length >= visibilityThreshold) {\n el.classList.add(\"visible\");\n } else {\n el.classList.remove(\"visible\");\n }\n }\n\n this.on(\"tab-added\", toggleTabsVisibility);\n this.on(\"tab-removed\", toggleTabsVisibility);\n },\n\n removeTab: function (tab, triggerEvent) {\n let id = tab.id;\n for (let i in this.tabs) {\n if (this.tabs[i].id === id) {\n this.tabs.splice(i, 1);\n break;\n }\n }\n if (triggerEvent) {\n this.emit(\"tab-removed\", tab, this);\n }\n return this;\n },\n\n setActiveTab: function (tab) {\n TabGroupPrivate.removeTab.bind(this)(tab);\n this.tabs.unshift(tab);\n this.emit(\"tab-active\", tab, this);\n return this;\n },\n\n activateRecentTab: function (tab) {\n if (this.tabs.length > 0) {\n this.tabs[0].activate();\n }\n return this;\n }\n};\n\nclass Tab extends EventTarget {\n constructor (tabGroup, id, args) {\n super();\n this.tabGroup = tabGroup;\n this.id = id;\n this.title = args.title;\n this.badge = args.badge;\n this.iconURL = args.iconURL;\n this.icon = args.icon;\n this.closable = args.closable === false ? false : true;\n this.webviewAttributes = args.webviewAttributes || {};\n this.webviewAttributes.src = args.src;\n this.tabElements = {};\n TabPrivate.initTab.bind(this)();\n TabPrivate.initWebview.bind(this)();\n if (args.visible !== false) {\n this.show();\n }\n if (typeof args.ready === \"function\") {\n args.ready(this);\n }\n }\n\n setTitle (title) {\n if (this.isClosed) return;\n let span = this.tabElements.title;\n span.innerHTML = title;\n span.title = title;\n this.title = title;\n this.emit(\"title-changed\", title, this);\n return this;\n }\n\n getTitle () {\n if (this.isClosed) return;\n return this.title;\n }\n\n setBadge (badge) {\n if (this.isClosed) return;\n let span = this.tabElements.badge;\n this.badge = badge;\n\n if (badge) {\n span.innerHTML = badge;\n span.classList.remove(\"hidden\");\n } else {\n span.classList.add(\"hidden\");\n }\n\n this.emit(\"badge-changed\", badge, this);\n }\n\n getBadge () {\n if (this.isClosed) return;\n return this.badge;\n }\n\n setIcon (iconURL, icon) {\n if (this.isClosed) return;\n this.iconURL = iconURL;\n this.icon = icon;\n let span = this.tabElements.icon;\n if (iconURL) {\n span.innerHTML = ``;\n this.emit(\"icon-changed\", iconURL, this);\n } else if (icon) {\n span.innerHTML = ``;\n this.emit(\"icon-changed\", icon, this);\n }\n\n return this;\n }\n\n getIcon () {\n if (this.isClosed) return;\n if (this.iconURL) return this.iconURL;\n return this.icon;\n }\n\n setPosition (newPosition) {\n let tabContainer = this.tabGroup.tabContainer;\n let tabs = tabContainer.children;\n let oldPosition = this.getPosition() - 1;\n\n if (newPosition < 0) {\n newPosition += tabContainer.childElementCount;\n\n if (newPosition < 0) {\n newPosition = 0;\n }\n } else {\n if (newPosition > tabContainer.childElementCount) {\n newPosition = tabContainer.childElementCount;\n }\n\n // Make 1 be leftmost position\n newPosition--;\n }\n\n if (newPosition > oldPosition) {\n newPosition++;\n }\n\n tabContainer.insertBefore(tabs[oldPosition], tabs[newPosition]);\n\n return this;\n }\n\n getPosition (fromRight) {\n let position = 0;\n let tab = this.tab;\n while ((tab = tab.previousSibling) != null) position++;\n\n if (fromRight === true) {\n position -= this.tabGroup.tabContainer.childElementCount;\n }\n\n if (position >= 0) {\n position++;\n }\n\n return position;\n }\n\n activate () {\n if (this.isClosed) return;\n let activeTab = this.tabGroup.getActiveTab();\n if (activeTab) {\n activeTab.tab.classList.remove(\"active\");\n activeTab.webview.classList.remove(\"visible\");\n activeTab.emit(\"inactive\", activeTab);\n }\n TabGroupPrivate.setActiveTab.bind(this.tabGroup)(this);\n this.tab.classList.add(\"active\");\n this.webview.classList.add(\"visible\");\n this.webview.focus();\n this.emit(\"active\", this);\n return this;\n }\n\n show (flag) {\n if (this.isClosed) return;\n if (flag !== false) {\n this.tab.classList.add(\"visible\");\n this.emit(\"visible\", this);\n } else {\n this.tab.classList.remove(\"visible\");\n this.emit(\"hidden\", this);\n }\n return this;\n }\n\n hide () {\n return this.show(false);\n }\n\n flash (flag) {\n if (this.isClosed) return;\n if (flag !== false) {\n this.tab.classList.add(\"flash\");\n this.emit(\"flash\", this);\n } else {\n this.tab.classList.remove(\"flash\");\n this.emit(\"unflash\", this);\n }\n return this;\n }\n\n unflash () {\n return this.flash(false);\n }\n\n hasClass (classname) {\n return this.tab.classList.contains(classname);\n }\n\n close (force) {\n const abortController = new AbortController();\n const abort = () => abortController.abort();\n this.emit(\"closing\", this, abort);\n\n const abortSignal = abortController.signal;\n if (this.isClosed || (!this.closable && !force) || abortSignal.aborted) return;\n\n this.isClosed = true;\n let tabGroup = this.tabGroup;\n tabGroup.tabContainer.removeChild(this.tab);\n tabGroup.viewContainer.removeChild(this.webview);\n let activeTab = this.tabGroup.getActiveTab();\n TabGroupPrivate.removeTab.bind(tabGroup)(this, true);\n\n this.emit(\"close\", this);\n\n if (activeTab.id === this.id) {\n TabGroupPrivate.activateRecentTab.bind(tabGroup)();\n }\n }\n}\n\nconst TabPrivate = {\n initTab: function () {\n let tabClass = this.tabGroup.options.tabClass;\n\n // Create tab element\n let tab = this.tab = document.createElement(\"div\");\n tab.classList.add(tabClass);\n for (let el of [\"icon\", \"title\", \"buttons\", \"badge\"]) {\n let span = tab.appendChild(document.createElement(\"span\"));\n span.classList.add(`${tabClass}-${el}`);\n this.tabElements[el] = span;\n }\n\n this.setTitle(this.title);\n this.setBadge(this.badge);\n this.setIcon(this.iconURL, this.icon);\n TabPrivate.initTabButtons.bind(this)();\n TabPrivate.initTabClickHandler.bind(this)();\n\n this.tabGroup.tabContainer.appendChild(this.tab);\n },\n\n initTabButtons: function () {\n let container = this.tabElements.buttons;\n let tabClass = this.tabGroup.options.tabClass;\n if (this.closable) {\n let button = container.appendChild(document.createElement(\"button\"));\n button.classList.add(`${tabClass}-button-close`);\n button.innerHTML = this.tabGroup.options.closeButtonText;\n button.addEventListener(\"click\", this.close.bind(this, false), false);\n }\n },\n\n initTabClickHandler: function () {\n // Mouse up\n const tabClickHandler = function (e) {\n if (this.isClosed) return;\n if (e.which === 2) {\n this.close();\n }\n };\n this.tab.addEventListener(\"mouseup\", tabClickHandler.bind(this), false);\n // Mouse down\n const tabMouseDownHandler = function (e) {\n if (this.isClosed) return;\n if (e.which === 1) {\n if (e.target.matches(\"button\")) return;\n this.activate();\n }\n };\n this.tab.addEventListener(\"mousedown\", tabMouseDownHandler.bind(this), false);\n },\n\n initWebview: function () {\n const webview = this.webview = document.createElement(\"webview\");\n\n const tabWebviewDidFinishLoadHandler = function (e) {\n this.emit(\"webview-ready\", this);\n };\n\n this.webview.addEventListener(\"did-finish-load\", tabWebviewDidFinishLoadHandler.bind(this), false);\n\n const tabWebviewDomReadyHandler = function (e) {\n // Remove this once https://github.com/electron/electron/issues/14474 is fixed\n webview.blur();\n webview.focus();\n this.emit(\"webview-dom-ready\", this);\n };\n\n this.webview.addEventListener(\"dom-ready\", tabWebviewDomReadyHandler.bind(this), false);\n\n this.webview.classList.add(this.tabGroup.options.viewClass);\n if (this.webviewAttributes) {\n let attrs = this.webviewAttributes;\n for (let key in attrs) {\n const attr = attrs[key];\n if (attr === false) continue;\n this.webview.setAttribute(key, attr);\n }\n }\n\n this.tabGroup.viewContainer.appendChild(this.webview);\n }\n};\n\n/**\n * This makes the browser EventTarget API work similar to EventEmitter\n */\nconst eventEmitterMixin = {\n emit (type, ...args) {\n this.dispatchEvent(new CustomEvent(type, { detail: args }));\n },\n\n on (type, fn) {\n this.addEventListener(type, ({ detail }) => fn.apply(this, detail));\n },\n\n once (type, fn) {\n this.addEventListener(type, ({ detail }) => fn.apply(this, detail), { once: true });\n }\n};\n\nObject.assign(TabGroup.prototype, eventEmitterMixin);\nObject.assign(Tab.prototype, eventEmitterMixin);\n\ncustomElements.define(\"tab-group\", TabGroup);\n","/* TODO: use custom properties */\n\nwebview {\n position: absolute;\n visibility: hidden;\n width: 100%;\n height: 100%;\n}\n\nwebview.visible {\n visibility: visible;\n}\n\n.etabs {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n text-rendering: optimizeLegibility;\n font-feature-settings: 'liga', 'clig', 'kern';\n}\n\n.etabs-tabgroup {\n width: 100%;\n height: 32px;\n cursor: default;\n font: caption;\n font-size: 14px;\n -webkit-user-select: none;\n user-select: none;\n display: none;\n background: #E7EAED;\n box-shadow: inset 0 -1px #DADCE0;\n border-top: 1px solid #DADCE0;\n}\n\n.etabs-tabgroup.visible {\n display: flex;\n}\n\n.etabs-tabs {\n height: 100%;\n}\n\n.etabs-tab {\n display: none;\n position: relative;\n height: 100%;\n background: #E7EAED;\n color: #696A6C;\n padding: 5px 9px;\n transition: background-color 150ms ease-out;\n box-shadow: inset 0 -1px #DADCE0;\n font: caption;\n font-size: 13px;\n cursor: pointer;\n box-sizing: border-box;\n}\n\n/* Dragula */\n.etabs-tab.gu-mirror {\n padding-bottom: 0;\n cursor: grab;\n\tborder: none;\n}\n\n.etabs-tab:first-child {\n border-left: none;\n}\n\n.etabs-tab.visible {\n display: inline-block;\n}\n\n.etabs-tab.active {\n background: #fff;\n box-shadow: none;\n\tborder-left: 1px solid #DADCE0;\n\tborder-right: 1px solid #DADCE0;\n\tpadding-left: 8px;\n\tpadding-right: 8px;\n}\n\n.etabs-tab.flash {\n background: linear-gradient(to bottom, rgba(255,243,170,1) 0%,rgba(255,227,37,1) 100%);\n}\n\n.etabs-tab.visible:not(.active)+.etabs-tab.visible:not(.active) {\n\tborder-left: 1px solid #B4B6B8;\n\tpadding-left: 8px;\n}\n\n.etabs-tab:not(.active):hover {\n\tbackground: #F1F3F4;\n}\n\n.etabs-buttons {\n border-left: 1px solid #B4B6B8;\n}\n\n.etabs-buttons button {\n display: block;\n color: #777;\n background: none;\n border: none;\n font-size: 16px;\n font-family: inherit;\n margin-top: 5px;\n border-radius: 50%;\n margin-left: 4px;\n width: 20px;\n height: 20px;\n text-align: center;\n line-height: 14px;\n padding: 1px 0 0 0;\n\tcursor: pointer;\n}\n\n.etabs-buttons button:hover {\n color: #333;\n background-color: #bbb;\n}\n\n.etabs-tab-badge {\n position: absolute;\n right: 0;\n top: -7px;\n background: red;\n border-radius: 100%;\n text-align: center;\n font-size: 10px;\n padding: 0 5px;\n}\n\n.etabs-tab-badge.hidden {\n display: none;\n}\n\n.etabs-tab-icon {\n display: inline-block;\n height: 16px;\n}\n\n.etabs-tab-icon img {\n max-width: 16px;\n max-height: 16px;\n}\n\n.etabs-tab-title {\n display: inline-block;\n margin-left: 10px;\n}\n\n.etabs-tab-buttons {\n display: inline-block;\n margin-left: 10px;\n}\n\n.etabs-tab-buttons button {\n display: inline-block;\n color: #777;\n background: none;\n border: none;\n width: 20px;\n height: 20px;\n text-align: center;\n border-radius: 50%;\n cursor: pointer;\n padding: 1px 0 0 0;\n font-size: 16px;\n}\n\n.etabs-tab-buttons button:hover {\n color: #333;\n background-color: #bbb;\n}\n\n.etabs-views {\n position: relative;\n height: calc(100vh - 33px);\n}\n\n.etab-view {\n position: relative;\n}\n","exports.interopDefault = function (a) {\n return a && a.__esModule ? a : {default: a};\n};\n\nexports.defineInteropFlag = function (a) {\n Object.defineProperty(a, '__esModule', {value: true});\n};\n\nexports.exportAll = function (source, dest) {\n Object.keys(source).forEach(function (key) {\n if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function () {\n return source[key];\n },\n });\n });\n\n return dest;\n};\n\nexports.export = function (dest, destName, get) {\n Object.defineProperty(dest, destName, {\n enumerable: true,\n get: get,\n });\n};\n","/**!\n * Sortable 1.15.0\n * @author\tRubaXa \n * @author\towenm \n * @license MIT\n */\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar version = \"1.15.0\";\n\nfunction userAgent(pattern) {\n if (typeof window !== 'undefined' && window.navigator) {\n return !! /*@__PURE__*/navigator.userAgent.match(pattern);\n }\n}\n\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\n\nvar captureMode = {\n capture: false,\n passive: false\n};\n\nfunction on(el, event, fn) {\n el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction off(el, event, fn) {\n el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction matches(\n/**HTMLElement*/\nel,\n/**String*/\nselector) {\n if (!selector) return;\n selector[0] === '>' && (selector = selector.substring(1));\n\n if (el) {\n try {\n if (el.matches) {\n return el.matches(selector);\n } else if (el.msMatchesSelector) {\n return el.msMatchesSelector(selector);\n } else if (el.webkitMatchesSelector) {\n return el.webkitMatchesSelector(selector);\n }\n } catch (_) {\n return false;\n }\n }\n\n return false;\n}\n\nfunction getParentOrHost(el) {\n return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\n\nfunction closest(\n/**HTMLElement*/\nel,\n/**String*/\nselector,\n/**HTMLElement*/\nctx, includeCTX) {\n if (el) {\n ctx = ctx || document;\n\n do {\n if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n return el;\n }\n\n if (el === ctx) break;\n /* jshint boss:true */\n } while (el = getParentOrHost(el));\n }\n\n return null;\n}\n\nvar R_SPACE = /\\s+/g;\n\nfunction toggleClass(el, name, state) {\n if (el && name) {\n if (el.classList) {\n el.classList[state ? 'add' : 'remove'](name);\n } else {\n var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n }\n }\n}\n\nfunction css(el, prop, val) {\n var style = el && el.style;\n\n if (style) {\n if (val === void 0) {\n if (document.defaultView && document.defaultView.getComputedStyle) {\n val = document.defaultView.getComputedStyle(el, '');\n } else if (el.currentStyle) {\n val = el.currentStyle;\n }\n\n return prop === void 0 ? val : val[prop];\n } else {\n if (!(prop in style) && prop.indexOf('webkit') === -1) {\n prop = '-webkit-' + prop;\n }\n\n style[prop] = val + (typeof val === 'string' ? '' : 'px');\n }\n }\n}\n\nfunction matrix(el, selfOnly) {\n var appliedTransforms = '';\n\n if (typeof el === 'string') {\n appliedTransforms = el;\n } else {\n do {\n var transform = css(el, 'transform');\n\n if (transform && transform !== 'none') {\n appliedTransforms = transform + ' ' + appliedTransforms;\n }\n /* jshint boss:true */\n\n } while (!selfOnly && (el = el.parentNode));\n }\n\n var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n /*jshint -W056 */\n\n return matrixFn && new matrixFn(appliedTransforms);\n}\n\nfunction find(ctx, tagName, iterator) {\n if (ctx) {\n var list = ctx.getElementsByTagName(tagName),\n i = 0,\n n = list.length;\n\n if (iterator) {\n for (; i < n; i++) {\n iterator(list[i], i);\n }\n }\n\n return list;\n }\n\n return [];\n}\n\nfunction getWindowScrollingElement() {\n var scrollingElement = document.scrollingElement;\n\n if (scrollingElement) {\n return scrollingElement;\n } else {\n return document.documentElement;\n }\n}\n/**\n * Returns the \"bounding client rect\" of given element\n * @param {HTMLElement} el The element whose boundingClientRect is wanted\n * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container\n * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr\n * @param {[Boolean]} undoScale Whether the container's scale() should be undone\n * @param {[HTMLElement]} container The parent the element will be placed in\n * @return {Object} The boundingClientRect of el, with specified adjustments\n */\n\n\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n if (!el.getBoundingClientRect && el !== window) return;\n var elRect, top, left, bottom, right, height, width;\n\n if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n elRect = el.getBoundingClientRect();\n top = elRect.top;\n left = elRect.left;\n bottom = elRect.bottom;\n right = elRect.right;\n height = elRect.height;\n width = elRect.width;\n } else {\n top = 0;\n left = 0;\n bottom = window.innerHeight;\n right = window.innerWidth;\n height = window.innerHeight;\n width = window.innerWidth;\n }\n\n if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n // Adjust for translate()\n container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n // Not needed on <= IE11\n\n if (!IE11OrLess) {\n do {\n if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container\n\n top -= containerRect.top + parseInt(css(container, 'border-top-width'));\n left -= containerRect.left + parseInt(css(container, 'border-left-width'));\n bottom = top + elRect.height;\n right = left + elRect.width;\n break;\n }\n /* jshint boss:true */\n\n } while (container = container.parentNode);\n }\n }\n\n if (undoScale && el !== window) {\n // Adjust for scale()\n var elMatrix = matrix(container || el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d;\n\n if (elMatrix) {\n top /= scaleY;\n left /= scaleX;\n width /= scaleX;\n height /= scaleY;\n bottom = top + height;\n right = left + width;\n }\n }\n\n return {\n top: top,\n left: left,\n bottom: bottom,\n right: right,\n width: width,\n height: height\n };\n}\n/**\n * Checks if a side of an element is scrolled past a side of its parents\n * @param {HTMLElement} el The element who's side being scrolled out of view is in question\n * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')\n * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')\n * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element\n */\n\n\nfunction isScrolledPast(el, elSide, parentSide) {\n var parent = getParentAutoScrollElement(el, true),\n elSideVal = getRect(el)[elSide];\n /* jshint boss:true */\n\n while (parent) {\n var parentSideVal = getRect(parent)[parentSide],\n visible = void 0;\n\n if (parentSide === 'top' || parentSide === 'left') {\n visible = elSideVal >= parentSideVal;\n } else {\n visible = elSideVal <= parentSideVal;\n }\n\n if (!visible) return parent;\n if (parent === getWindowScrollingElement()) break;\n parent = getParentAutoScrollElement(parent, false);\n }\n\n return false;\n}\n/**\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\n * and non-draggable elements\n * @param {HTMLElement} el The parent element\n * @param {Number} childNum The index of the child\n * @param {Object} options Parent Sortable's options\n * @return {HTMLElement} The child at index childNum, or null if not found\n */\n\n\nfunction getChild(el, childNum, options, includeDragEl) {\n var currentChild = 0,\n i = 0,\n children = el.children;\n\n while (i < children.length) {\n if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {\n if (currentChild === childNum) {\n return children[i];\n }\n\n currentChild++;\n }\n\n i++;\n }\n\n return null;\n}\n/**\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\n * @param {HTMLElement} el Parent element\n * @param {selector} selector Any other elements that should be ignored\n * @return {HTMLElement} The last child, ignoring ghostEl\n */\n\n\nfunction lastChild(el, selector) {\n var last = el.lastElementChild;\n\n while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n last = last.previousElementSibling;\n }\n\n return last || null;\n}\n/**\n * Returns the index of an element within its parent for a selected set of\n * elements\n * @param {HTMLElement} el\n * @param {selector} selector\n * @return {number}\n */\n\n\nfunction index(el, selector) {\n var index = 0;\n\n if (!el || !el.parentNode) {\n return -1;\n }\n /* jshint boss:true */\n\n\n while (el = el.previousElementSibling) {\n if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n index++;\n }\n }\n\n return index;\n}\n/**\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\n * The value is returned in real pixels.\n * @param {HTMLElement} el\n * @return {Array} Offsets in the format of [left, top]\n */\n\n\nfunction getRelativeScrollOffset(el) {\n var offsetLeft = 0,\n offsetTop = 0,\n winScroller = getWindowScrollingElement();\n\n if (el) {\n do {\n var elMatrix = matrix(el),\n scaleX = elMatrix.a,\n scaleY = elMatrix.d;\n offsetLeft += el.scrollLeft * scaleX;\n offsetTop += el.scrollTop * scaleY;\n } while (el !== winScroller && (el = el.parentNode));\n }\n\n return [offsetLeft, offsetTop];\n}\n/**\n * Returns the index of the object within the given array\n * @param {Array} arr Array that may or may not hold the object\n * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find\n * @return {Number} The index of the object in the array, or -1\n */\n\n\nfunction indexOfObject(arr, obj) {\n for (var i in arr) {\n if (!arr.hasOwnProperty(i)) continue;\n\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n }\n }\n\n return -1;\n}\n\nfunction getParentAutoScrollElement(el, includeSelf) {\n // skip to window\n if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n var elem = el;\n var gotSelf = false;\n\n do {\n // we don't need to get elem css if it isn't even overflowing in the first place (performance)\n if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n var elemCSS = css(elem);\n\n if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {\n if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n if (gotSelf || includeSelf) return elem;\n gotSelf = true;\n }\n }\n /* jshint boss:true */\n\n } while (elem = elem.parentNode);\n\n return getWindowScrollingElement();\n}\n\nfunction extend(dst, src) {\n if (dst && src) {\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n dst[key] = src[key];\n }\n }\n }\n\n return dst;\n}\n\nfunction isRectEqual(rect1, rect2) {\n return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\n\nvar _throttleTimeout;\n\nfunction throttle(callback, ms) {\n return function () {\n if (!_throttleTimeout) {\n var args = arguments,\n _this = this;\n\n if (args.length === 1) {\n callback.call(_this, args[0]);\n } else {\n callback.apply(_this, args);\n }\n\n _throttleTimeout = setTimeout(function () {\n _throttleTimeout = void 0;\n }, ms);\n }\n };\n}\n\nfunction cancelThrottle() {\n clearTimeout(_throttleTimeout);\n _throttleTimeout = void 0;\n}\n\nfunction scrollBy(el, x, y) {\n el.scrollLeft += x;\n el.scrollTop += y;\n}\n\nfunction clone(el) {\n var Polymer = window.Polymer;\n var $ = window.jQuery || window.Zepto;\n\n if (Polymer && Polymer.dom) {\n return Polymer.dom(el).cloneNode(true);\n } else if ($) {\n return $(el).clone(true)[0];\n } else {\n return el.cloneNode(true);\n }\n}\n\nfunction setRect(el, rect) {\n css(el, 'position', 'absolute');\n css(el, 'top', rect.top);\n css(el, 'left', rect.left);\n css(el, 'width', rect.width);\n css(el, 'height', rect.height);\n}\n\nfunction unsetRect(el) {\n css(el, 'position', '');\n css(el, 'top', '');\n css(el, 'left', '');\n css(el, 'width', '');\n css(el, 'height', '');\n}\n\nvar expando = 'Sortable' + new Date().getTime();\n\nfunction AnimationStateManager() {\n var animationStates = [],\n animationCallbackId;\n return {\n captureAnimationState: function captureAnimationState() {\n animationStates = [];\n if (!this.options.animation) return;\n var children = [].slice.call(this.el.children);\n children.forEach(function (child) {\n if (css(child, 'display') === 'none' || child === Sortable.ghost) return;\n animationStates.push({\n target: child,\n rect: getRect(child)\n });\n\n var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation\n\n\n if (child.thisAnimationDuration) {\n var childMatrix = matrix(child, true);\n\n if (childMatrix) {\n fromRect.top -= childMatrix.f;\n fromRect.left -= childMatrix.e;\n }\n }\n\n child.fromRect = fromRect;\n });\n },\n addAnimationState: function addAnimationState(state) {\n animationStates.push(state);\n },\n removeAnimationState: function removeAnimationState(target) {\n animationStates.splice(indexOfObject(animationStates, {\n target: target\n }), 1);\n },\n animateAll: function animateAll(callback) {\n var _this = this;\n\n if (!this.options.animation) {\n clearTimeout(animationCallbackId);\n if (typeof callback === 'function') callback();\n return;\n }\n\n var animating = false,\n animationTime = 0;\n animationStates.forEach(function (state) {\n var time = 0,\n target = state.target,\n fromRect = target.fromRect,\n toRect = getRect(target),\n prevFromRect = target.prevFromRect,\n prevToRect = target.prevToRect,\n animatingRect = state.rect,\n targetMatrix = matrix(target, true);\n\n if (targetMatrix) {\n // Compensate for current animation\n toRect.top -= targetMatrix.f;\n toRect.left -= targetMatrix.e;\n }\n\n target.toRect = toRect;\n\n if (target.thisAnimationDuration) {\n // Could also check if animatingRect is between fromRect and toRect\n if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect\n (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n // If returning to same place as started from animation and on same axis\n time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n }\n } // if fromRect != toRect: animate\n\n\n if (!isRectEqual(toRect, fromRect)) {\n target.prevFromRect = fromRect;\n target.prevToRect = toRect;\n\n if (!time) {\n time = _this.options.animation;\n }\n\n _this.animate(target, animatingRect, toRect, time);\n }\n\n if (time) {\n animating = true;\n animationTime = Math.max(animationTime, time);\n clearTimeout(target.animationResetTimer);\n target.animationResetTimer = setTimeout(function () {\n target.animationTime = 0;\n target.prevFromRect = null;\n target.fromRect = null;\n target.prevToRect = null;\n target.thisAnimationDuration = null;\n }, time);\n target.thisAnimationDuration = time;\n }\n });\n clearTimeout(animationCallbackId);\n\n if (!animating) {\n if (typeof callback === 'function') callback();\n } else {\n animationCallbackId = setTimeout(function () {\n if (typeof callback === 'function') callback();\n }, animationTime);\n }\n\n animationStates = [];\n },\n animate: function animate(target, currentRect, toRect, duration) {\n if (duration) {\n css(target, 'transition', '');\n css(target, 'transform', '');\n var elMatrix = matrix(this.el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d,\n translateX = (currentRect.left - toRect.left) / (scaleX || 1),\n translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n target.animatingX = !!translateX;\n target.animatingY = !!translateY;\n css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');\n this.forRepaintDummy = repaint(target); // repaint\n\n css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n css(target, 'transform', 'translate3d(0,0,0)');\n typeof target.animated === 'number' && clearTimeout(target.animated);\n target.animated = setTimeout(function () {\n css(target, 'transition', '');\n css(target, 'transform', '');\n target.animated = false;\n target.animatingX = false;\n target.animatingY = false;\n }, duration);\n }\n }\n };\n}\n\nfunction repaint(target) {\n return target.offsetWidth;\n}\n\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\n\nvar plugins = [];\nvar defaults = {\n initializeByDefault: true\n};\nvar PluginManager = {\n mount: function mount(plugin) {\n // Set default static properties\n for (var option in defaults) {\n if (defaults.hasOwnProperty(option) && !(option in plugin)) {\n plugin[option] = defaults[option];\n }\n }\n\n plugins.forEach(function (p) {\n if (p.pluginName === plugin.pluginName) {\n throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n }\n });\n plugins.push(plugin);\n },\n pluginEvent: function pluginEvent(eventName, sortable, evt) {\n var _this = this;\n\n this.eventCanceled = false;\n\n evt.cancel = function () {\n _this.eventCanceled = true;\n };\n\n var eventNameGlobal = eventName + 'Global';\n plugins.forEach(function (plugin) {\n if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable\n\n if (sortable[plugin.pluginName][eventNameGlobal]) {\n sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({\n sortable: sortable\n }, evt));\n } // Only fire plugin event if plugin is enabled in this sortable,\n // and plugin has event defined\n\n\n if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n sortable[plugin.pluginName][eventName](_objectSpread2({\n sortable: sortable\n }, evt));\n }\n });\n },\n initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n plugins.forEach(function (plugin) {\n var pluginName = plugin.pluginName;\n if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n var initialized = new plugin(sortable, el, sortable.options);\n initialized.sortable = sortable;\n initialized.options = sortable.options;\n sortable[pluginName] = initialized; // Add default options from plugin\n\n _extends(defaults, initialized.defaults);\n });\n\n for (var option in sortable.options) {\n if (!sortable.options.hasOwnProperty(option)) continue;\n var modified = this.modifyOption(sortable, option, sortable.options[option]);\n\n if (typeof modified !== 'undefined') {\n sortable.options[option] = modified;\n }\n }\n },\n getEventProperties: function getEventProperties(name, sortable) {\n var eventProperties = {};\n plugins.forEach(function (plugin) {\n if (typeof plugin.eventProperties !== 'function') return;\n\n _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n });\n return eventProperties;\n },\n modifyOption: function modifyOption(sortable, name, value) {\n var modifiedValue;\n plugins.forEach(function (plugin) {\n // Plugin must exist on the Sortable\n if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n\n if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {\n modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n }\n });\n return modifiedValue;\n }\n};\n\nfunction dispatchEvent(_ref) {\n var sortable = _ref.sortable,\n rootEl = _ref.rootEl,\n name = _ref.name,\n targetEl = _ref.targetEl,\n cloneEl = _ref.cloneEl,\n toEl = _ref.toEl,\n fromEl = _ref.fromEl,\n oldIndex = _ref.oldIndex,\n newIndex = _ref.newIndex,\n oldDraggableIndex = _ref.oldDraggableIndex,\n newDraggableIndex = _ref.newDraggableIndex,\n originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n extraEventProperties = _ref.extraEventProperties;\n sortable = sortable || rootEl && rootEl[expando];\n if (!sortable) return;\n var evt,\n options = sortable.options,\n onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature\n\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent(name, {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent(name, true, true);\n }\n\n evt.to = toEl || rootEl;\n evt.from = fromEl || rootEl;\n evt.item = targetEl || rootEl;\n evt.clone = cloneEl;\n evt.oldIndex = oldIndex;\n evt.newIndex = newIndex;\n evt.oldDraggableIndex = oldDraggableIndex;\n evt.newDraggableIndex = newDraggableIndex;\n evt.originalEvent = originalEvent;\n evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n\n var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n\n for (var option in allEventProperties) {\n evt[option] = allEventProperties[option];\n }\n\n if (rootEl) {\n rootEl.dispatchEvent(evt);\n }\n\n if (options[onName]) {\n options[onName].call(sortable, evt);\n }\n}\n\nvar _excluded = [\"evt\"];\n\nvar pluginEvent = function pluginEvent(eventName, sortable) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n originalEvent = _ref.evt,\n data = _objectWithoutProperties(_ref, _excluded);\n\n PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({\n dragEl: dragEl,\n parentEl: parentEl,\n ghostEl: ghostEl,\n rootEl: rootEl,\n nextEl: nextEl,\n lastDownEl: lastDownEl,\n cloneEl: cloneEl,\n cloneHidden: cloneHidden,\n dragStarted: moved,\n putSortable: putSortable,\n activeSortable: Sortable.active,\n originalEvent: originalEvent,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n hideGhostForTarget: _hideGhostForTarget,\n unhideGhostForTarget: _unhideGhostForTarget,\n cloneNowHidden: function cloneNowHidden() {\n cloneHidden = true;\n },\n cloneNowShown: function cloneNowShown() {\n cloneHidden = false;\n },\n dispatchSortableEvent: function dispatchSortableEvent(name) {\n _dispatchEvent({\n sortable: sortable,\n name: name,\n originalEvent: originalEvent\n });\n }\n }, data));\n};\n\nfunction _dispatchEvent(info) {\n dispatchEvent(_objectSpread2({\n putSortable: putSortable,\n cloneEl: cloneEl,\n targetEl: dragEl,\n rootEl: rootEl,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex\n }, info));\n}\n\nvar dragEl,\n parentEl,\n ghostEl,\n rootEl,\n nextEl,\n lastDownEl,\n cloneEl,\n cloneHidden,\n oldIndex,\n newIndex,\n oldDraggableIndex,\n newDraggableIndex,\n activeGroup,\n putSortable,\n awaitingDragStarted = false,\n ignoreNextClick = false,\n sortables = [],\n tapEvt,\n touchEvt,\n lastDx,\n lastDy,\n tapDistanceLeft,\n tapDistanceTop,\n moved,\n lastTarget,\n lastDirection,\n pastFirstInvertThresh = false,\n isCircumstantialInvert = false,\n targetMoveDistance,\n // For positioning ghost absolutely\nghostRelativeParent,\n ghostRelativeParentInitialScroll = [],\n // (left, top)\n_silent = false,\n savedInputChecked = [];\n/** @const */\n\nvar documentExists = typeof document !== 'undefined',\n PositionGhostAbsolutely = IOS,\n CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n // This will not pass for IE9, because IE9 DnD only works on anchors\nsupportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n supportCssPointerEvents = function () {\n if (!documentExists) return; // false when <= IE11\n\n if (IE11OrLess) {\n return false;\n }\n\n var el = document.createElement('x');\n el.style.cssText = 'pointer-events:auto';\n return el.style.pointerEvents === 'auto';\n}(),\n _detectDirection = function _detectDirection(el, options) {\n var elCSS = css(el),\n elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),\n child1 = getChild(el, 0, options),\n child2 = getChild(el, 1, options),\n firstChildCSS = child1 && css(child1),\n secondChildCSS = child2 && css(child2),\n firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,\n secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n\n if (elCSS.display === 'flex') {\n return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n }\n\n if (elCSS.display === 'grid') {\n return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n }\n\n if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== 'none') {\n var touchingSideChild2 = firstChildCSS[\"float\"] === 'left' ? 'left' : 'right';\n return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';\n }\n\n return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';\n},\n _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n var dragElS1Opp = vertical ? dragRect.left : dragRect.top,\n dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,\n dragElOppLength = vertical ? dragRect.width : dragRect.height,\n targetS1Opp = vertical ? targetRect.left : targetRect.top,\n targetS2Opp = vertical ? targetRect.right : targetRect.bottom,\n targetOppLength = vertical ? targetRect.width : targetRect.height;\n return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n},\n\n/**\r\n * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\r\n * @param {Number} x X position\r\n * @param {Number} y Y position\r\n * @return {HTMLElement} Element of the first found nearest Sortable\r\n */\n_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n var ret;\n sortables.some(function (sortable) {\n var threshold = sortable[expando].options.emptyInsertThreshold;\n if (!threshold || lastChild(sortable)) return;\n var rect = getRect(sortable),\n insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,\n insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n\n if (insideHorizontally && insideVertically) {\n return ret = sortable;\n }\n });\n return ret;\n},\n _prepareGroup = function _prepareGroup(options) {\n function toFn(value, pull) {\n return function (to, from, dragEl, evt) {\n var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n\n if (value == null && (pull || sameGroup)) {\n // Default pull value\n // Default pull and put value if same group\n return true;\n } else if (value == null || value === false) {\n return false;\n } else if (pull && value === 'clone') {\n return value;\n } else if (typeof value === 'function') {\n return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n } else {\n var otherGroup = (pull ? to : from).options.group.name;\n return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n }\n };\n }\n\n var group = {};\n var originalGroup = options.group;\n\n if (!originalGroup || _typeof(originalGroup) != 'object') {\n originalGroup = {\n name: originalGroup\n };\n }\n\n group.name = originalGroup.name;\n group.checkPull = toFn(originalGroup.pull, true);\n group.checkPut = toFn(originalGroup.put);\n group.revertClone = originalGroup.revertClone;\n options.group = group;\n},\n _hideGhostForTarget = function _hideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', 'none');\n }\n},\n _unhideGhostForTarget = function _unhideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', '');\n }\n}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position\n\n\nif (documentExists && !ChromeForAndroid) {\n document.addEventListener('click', function (evt) {\n if (ignoreNextClick) {\n evt.preventDefault();\n evt.stopPropagation && evt.stopPropagation();\n evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n ignoreNextClick = false;\n return false;\n }\n }, true);\n}\n\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n if (dragEl) {\n evt = evt.touches ? evt.touches[0] : evt;\n\n var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n\n if (nearest) {\n // Create imitation event\n var event = {};\n\n for (var i in evt) {\n if (evt.hasOwnProperty(i)) {\n event[i] = evt[i];\n }\n }\n\n event.target = event.rootEl = nearest;\n event.preventDefault = void 0;\n event.stopPropagation = void 0;\n\n nearest[expando]._onDragOver(event);\n }\n }\n};\n\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n if (dragEl) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n }\n};\n/**\r\n * @class Sortable\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\n\n\nfunction Sortable(el, options) {\n if (!(el && el.nodeType && el.nodeType === 1)) {\n throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n }\n\n this.el = el; // root element\n\n this.options = options = _extends({}, options); // Export instance\n\n el[expando] = this;\n var defaults = {\n group: null,\n sort: true,\n disabled: false,\n store: null,\n handle: null,\n draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',\n swapThreshold: 1,\n // percentage; 0 <= x <= 1\n invertSwap: false,\n // invert always\n invertedSwapThreshold: null,\n // will be set to same as swapThreshold if default\n removeCloneOnHide: true,\n direction: function direction() {\n return _detectDirection(el, this.options);\n },\n ghostClass: 'sortable-ghost',\n chosenClass: 'sortable-chosen',\n dragClass: 'sortable-drag',\n ignore: 'a, img',\n filter: null,\n preventOnFilter: true,\n animation: 0,\n easing: null,\n setData: function setData(dataTransfer, dragEl) {\n dataTransfer.setData('Text', dragEl.textContent);\n },\n dropBubble: false,\n dragoverBubble: false,\n dataIdAttr: 'data-id',\n delay: 0,\n delayOnTouchOnly: false,\n touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n forceFallback: false,\n fallbackClass: 'sortable-fallback',\n fallbackOnBody: false,\n fallbackTolerance: 0,\n fallbackOffset: {\n x: 0,\n y: 0\n },\n supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,\n emptyInsertThreshold: 5\n };\n PluginManager.initializePlugins(this, el, defaults); // Set default options\n\n for (var name in defaults) {\n !(name in options) && (options[name] = defaults[name]);\n }\n\n _prepareGroup(options); // Bind all private methods\n\n\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n } // Setup drag mode\n\n\n this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n\n if (this.nativeDraggable) {\n // Touch start threshold cannot be greater than the native dragstart threshold\n this.options.touchStartThreshold = 1;\n } // Bind events\n\n\n if (options.supportPointer) {\n on(el, 'pointerdown', this._onTapStart);\n } else {\n on(el, 'mousedown', this._onTapStart);\n on(el, 'touchstart', this._onTapStart);\n }\n\n if (this.nativeDraggable) {\n on(el, 'dragover', this);\n on(el, 'dragenter', this);\n }\n\n sortables.push(this.el); // Restore sorting\n\n options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager\n\n _extends(this, AnimationStateManager());\n}\n\nSortable.prototype =\n/** @lends Sortable.prototype */\n{\n constructor: Sortable,\n _isOutsideThisEl: function _isOutsideThisEl(target) {\n if (!this.el.contains(target) && target !== this.el) {\n lastTarget = null;\n }\n },\n _getDirection: function _getDirection(evt, target) {\n return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n },\n _onTapStart: function _onTapStart(\n /** Event|TouchEvent */\n evt) {\n if (!evt.cancelable) return;\n\n var _this = this,\n el = this.el,\n options = this.options,\n preventOnFilter = options.preventOnFilter,\n type = evt.type,\n touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,\n target = (touch || evt).target,\n originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,\n filter = options.filter;\n\n _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n\n\n if (dragEl) {\n return;\n }\n\n if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n return; // only left button and enabled\n } // cancel dnd if original target is content editable\n\n\n if (originalTarget.isContentEditable) {\n return;\n } // Safari ignores further event handling after mousedown\n\n\n if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {\n return;\n }\n\n target = closest(target, options.draggable, el, false);\n\n if (target && target.animated) {\n return;\n }\n\n if (lastDownEl === target) {\n // Ignoring duplicate `down`\n return;\n } // Get the index of the dragged element within its parent\n\n\n oldIndex = index(target);\n oldDraggableIndex = index(target, options.draggable); // Check filter\n\n if (typeof filter === 'function') {\n if (filter.call(this, evt, target, this)) {\n _dispatchEvent({\n sortable: _this,\n rootEl: originalTarget,\n name: 'filter',\n targetEl: target,\n toEl: el,\n fromEl: el\n });\n\n pluginEvent('filter', _this, {\n evt: evt\n });\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n } else if (filter) {\n filter = filter.split(',').some(function (criteria) {\n criteria = closest(originalTarget, criteria.trim(), el, false);\n\n if (criteria) {\n _dispatchEvent({\n sortable: _this,\n rootEl: criteria,\n name: 'filter',\n targetEl: target,\n fromEl: el,\n toEl: el\n });\n\n pluginEvent('filter', _this, {\n evt: evt\n });\n return true;\n }\n });\n\n if (filter) {\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n }\n\n if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n return;\n } // Prepare `dragstart`\n\n\n this._prepareDragStart(evt, touch, target);\n },\n _prepareDragStart: function _prepareDragStart(\n /** Event */\n evt,\n /** Touch */\n touch,\n /** HTMLElement */\n target) {\n var _this = this,\n el = _this.el,\n options = _this.options,\n ownerDocument = el.ownerDocument,\n dragStartFn;\n\n if (target && !dragEl && target.parentNode === el) {\n var dragRect = getRect(target);\n rootEl = el;\n dragEl = target;\n parentEl = dragEl.parentNode;\n nextEl = dragEl.nextSibling;\n lastDownEl = target;\n activeGroup = options.group;\n Sortable.dragged = dragEl;\n tapEvt = {\n target: dragEl,\n clientX: (touch || evt).clientX,\n clientY: (touch || evt).clientY\n };\n tapDistanceLeft = tapEvt.clientX - dragRect.left;\n tapDistanceTop = tapEvt.clientY - dragRect.top;\n this._lastX = (touch || evt).clientX;\n this._lastY = (touch || evt).clientY;\n dragEl.style['will-change'] = 'all';\n\n dragStartFn = function dragStartFn() {\n pluginEvent('delayEnded', _this, {\n evt: evt\n });\n\n if (Sortable.eventCanceled) {\n _this._onDrop();\n\n return;\n } // Delayed drag has been triggered\n // we can re-enable the events: touchmove/mousemove\n\n\n _this._disableDelayedDragEvents();\n\n if (!FireFox && _this.nativeDraggable) {\n dragEl.draggable = true;\n } // Bind the events: dragstart/dragend\n\n\n _this._triggerDragStart(evt, touch); // Drag start event\n\n\n _dispatchEvent({\n sortable: _this,\n name: 'choose',\n originalEvent: evt\n }); // Chosen item\n\n\n toggleClass(dragEl, options.chosenClass, true);\n }; // Disable \"draggable\"\n\n\n options.ignore.split(',').forEach(function (criteria) {\n find(dragEl, criteria.trim(), _disableDraggable);\n });\n on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mouseup', _this._onDrop);\n on(ownerDocument, 'touchend', _this._onDrop);\n on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)\n\n if (FireFox && this.nativeDraggable) {\n this.options.touchStartThreshold = 4;\n dragEl.draggable = true;\n }\n\n pluginEvent('delayStart', this, {\n evt: evt\n }); // Delay is impossible for native DnD in Edge or IE\n\n if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n if (Sortable.eventCanceled) {\n this._onDrop();\n\n return;\n } // If the user moves the pointer or let go the click or touch\n // before the delay has been reached:\n // disable the delayed drag\n\n\n on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n } else {\n dragStartFn();\n }\n }\n },\n _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(\n /** TouchEvent|PointerEvent **/\n e) {\n var touch = e.touches ? e.touches[0] : e;\n\n if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n this._disableDelayedDrag();\n }\n },\n _disableDelayedDrag: function _disableDelayedDrag() {\n dragEl && _disableDraggable(dragEl);\n clearTimeout(this._dragStartTimer);\n\n this._disableDelayedDragEvents();\n },\n _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n off(ownerDocument, 'touchend', this._disableDelayedDrag);\n off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n },\n _triggerDragStart: function _triggerDragStart(\n /** Event */\n evt,\n /** Touch */\n touch) {\n touch = touch || evt.pointerType == 'touch' && evt;\n\n if (!this.nativeDraggable || touch) {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._onTouchMove);\n } else if (touch) {\n on(document, 'touchmove', this._onTouchMove);\n } else {\n on(document, 'mousemove', this._onTouchMove);\n }\n } else {\n on(dragEl, 'dragend', this);\n on(rootEl, 'dragstart', this._onDragStart);\n }\n\n try {\n if (document.selection) {\n // Timeout neccessary for IE9\n _nextTick(function () {\n document.selection.empty();\n });\n } else {\n window.getSelection().removeAllRanges();\n }\n } catch (err) {}\n },\n _dragStarted: function _dragStarted(fallback, evt) {\n\n awaitingDragStarted = false;\n\n if (rootEl && dragEl) {\n pluginEvent('dragStarted', this, {\n evt: evt\n });\n\n if (this.nativeDraggable) {\n on(document, 'dragover', _checkOutsideTargetEl);\n }\n\n var options = this.options; // Apply effect\n\n !fallback && toggleClass(dragEl, options.dragClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n Sortable.active = this;\n fallback && this._appendGhost(); // Drag start event\n\n _dispatchEvent({\n sortable: this,\n name: 'start',\n originalEvent: evt\n });\n } else {\n this._nulling();\n }\n },\n _emulateDragOver: function _emulateDragOver() {\n if (touchEvt) {\n this._lastX = touchEvt.clientX;\n this._lastY = touchEvt.clientY;\n\n _hideGhostForTarget();\n\n var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n var parent = target;\n\n while (target && target.shadowRoot) {\n target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n if (target === parent) break;\n parent = target;\n }\n\n dragEl.parentNode[expando]._isOutsideThisEl(target);\n\n if (parent) {\n do {\n if (parent[expando]) {\n var inserted = void 0;\n inserted = parent[expando]._onDragOver({\n clientX: touchEvt.clientX,\n clientY: touchEvt.clientY,\n target: target,\n rootEl: parent\n });\n\n if (inserted && !this.options.dragoverBubble) {\n break;\n }\n }\n\n target = parent; // store last element\n }\n /* jshint boss:true */\n while (parent = parent.parentNode);\n }\n\n _unhideGhostForTarget();\n }\n },\n _onTouchMove: function _onTouchMove(\n /**TouchEvent*/\n evt) {\n if (tapEvt) {\n var options = this.options,\n fallbackTolerance = options.fallbackTolerance,\n fallbackOffset = options.fallbackOffset,\n touch = evt.touches ? evt.touches[0] : evt,\n ghostMatrix = ghostEl && matrix(ghostEl, true),\n scaleX = ghostEl && ghostMatrix && ghostMatrix.a,\n scaleY = ghostEl && ghostMatrix && ghostMatrix.d,\n relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),\n dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),\n dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging\n\n if (!Sortable.active && !awaitingDragStarted) {\n if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n return;\n }\n\n this._onDragStart(evt, true);\n }\n\n if (ghostEl) {\n if (ghostMatrix) {\n ghostMatrix.e += dx - (lastDx || 0);\n ghostMatrix.f += dy - (lastDy || 0);\n } else {\n ghostMatrix = {\n a: 1,\n b: 0,\n c: 0,\n d: 1,\n e: dx,\n f: dy\n };\n }\n\n var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n css(ghostEl, 'webkitTransform', cssMatrix);\n css(ghostEl, 'mozTransform', cssMatrix);\n css(ghostEl, 'msTransform', cssMatrix);\n css(ghostEl, 'transform', cssMatrix);\n lastDx = dx;\n lastDy = dy;\n touchEvt = touch;\n }\n\n evt.cancelable && evt.preventDefault();\n }\n },\n _appendGhost: function _appendGhost() {\n // Bug if using scale(): https://stackoverflow.com/questions/2637058\n // Not being adjusted for\n if (!ghostEl) {\n var container = this.options.fallbackOnBody ? document.body : rootEl,\n rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),\n options = this.options; // Position absolutely\n\n if (PositionGhostAbsolutely) {\n // Get relatively positioned parent\n ghostRelativeParent = container;\n\n while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n ghostRelativeParent = ghostRelativeParent.parentNode;\n }\n\n if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n rect.top += ghostRelativeParent.scrollTop;\n rect.left += ghostRelativeParent.scrollLeft;\n } else {\n ghostRelativeParent = getWindowScrollingElement();\n }\n\n ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n }\n\n ghostEl = dragEl.cloneNode(true);\n toggleClass(ghostEl, options.ghostClass, false);\n toggleClass(ghostEl, options.fallbackClass, true);\n toggleClass(ghostEl, options.dragClass, true);\n css(ghostEl, 'transition', '');\n css(ghostEl, 'transform', '');\n css(ghostEl, 'box-sizing', 'border-box');\n css(ghostEl, 'margin', 0);\n css(ghostEl, 'top', rect.top);\n css(ghostEl, 'left', rect.left);\n css(ghostEl, 'width', rect.width);\n css(ghostEl, 'height', rect.height);\n css(ghostEl, 'opacity', '0.8');\n css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');\n css(ghostEl, 'zIndex', '100000');\n css(ghostEl, 'pointerEvents', 'none');\n Sortable.ghost = ghostEl;\n container.appendChild(ghostEl); // Set transform-origin\n\n css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n }\n },\n _onDragStart: function _onDragStart(\n /**Event*/\n evt,\n /**boolean*/\n fallback) {\n var _this = this;\n\n var dataTransfer = evt.dataTransfer;\n var options = _this.options;\n pluginEvent('dragStart', this, {\n evt: evt\n });\n\n if (Sortable.eventCanceled) {\n this._onDrop();\n\n return;\n }\n\n pluginEvent('setupClone', this);\n\n if (!Sortable.eventCanceled) {\n cloneEl = clone(dragEl);\n cloneEl.removeAttribute(\"id\");\n cloneEl.draggable = false;\n cloneEl.style['will-change'] = '';\n\n this._hideClone();\n\n toggleClass(cloneEl, this.options.chosenClass, false);\n Sortable.clone = cloneEl;\n } // #1143: IFrame support workaround\n\n\n _this.cloneId = _nextTick(function () {\n pluginEvent('clone', _this);\n if (Sortable.eventCanceled) return;\n\n if (!_this.options.removeCloneOnHide) {\n rootEl.insertBefore(cloneEl, dragEl);\n }\n\n _this._hideClone();\n\n _dispatchEvent({\n sortable: _this,\n name: 'clone'\n });\n });\n !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events\n\n if (fallback) {\n ignoreNextClick = true;\n _this._loopId = setInterval(_this._emulateDragOver, 50);\n } else {\n // Undo what was set in _prepareDragStart before drag started\n off(document, 'mouseup', _this._onDrop);\n off(document, 'touchend', _this._onDrop);\n off(document, 'touchcancel', _this._onDrop);\n\n if (dataTransfer) {\n dataTransfer.effectAllowed = 'move';\n options.setData && options.setData.call(_this, dataTransfer, dragEl);\n }\n\n on(document, 'drop', _this); // #1276 fix:\n\n css(dragEl, 'transform', 'translateZ(0)');\n }\n\n awaitingDragStarted = true;\n _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n on(document, 'selectstart', _this);\n moved = true;\n\n if (Safari) {\n css(document.body, 'user-select', 'none');\n }\n },\n // Returns true - if no further action is needed (either inserted or another condition)\n _onDragOver: function _onDragOver(\n /**Event*/\n evt) {\n var el = this.el,\n target = evt.target,\n dragRect,\n targetRect,\n revert,\n options = this.options,\n group = options.group,\n activeSortable = Sortable.active,\n isOwner = activeGroup === group,\n canSort = options.sort,\n fromSortable = putSortable || activeSortable,\n vertical,\n _this = this,\n completedFired = false;\n\n if (_silent) return;\n\n function dragOverEvent(name, extra) {\n pluginEvent(name, _this, _objectSpread2({\n evt: evt,\n isOwner: isOwner,\n axis: vertical ? 'vertical' : 'horizontal',\n revert: revert,\n dragRect: dragRect,\n targetRect: targetRect,\n canSort: canSort,\n fromSortable: fromSortable,\n target: target,\n completed: completed,\n onMove: function onMove(target, after) {\n return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);\n },\n changed: changed\n }, extra));\n } // Capture animation state\n\n\n function capture() {\n dragOverEvent('dragOverAnimationCapture');\n\n _this.captureAnimationState();\n\n if (_this !== fromSortable) {\n fromSortable.captureAnimationState();\n }\n } // Return invocation when dragEl is inserted (or completed)\n\n\n function completed(insertion) {\n dragOverEvent('dragOverCompleted', {\n insertion: insertion\n });\n\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n } else {\n activeSortable._showClone(_this);\n }\n\n if (_this !== fromSortable) {\n // Set ghost class to new sortable's ghost class\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n }\n\n if (putSortable !== _this && _this !== Sortable.active) {\n putSortable = _this;\n } else if (_this === Sortable.active && putSortable) {\n putSortable = null;\n } // Animation\n\n\n if (fromSortable === _this) {\n _this._ignoreWhileAnimating = target;\n }\n\n _this.animateAll(function () {\n dragOverEvent('dragOverAnimationComplete');\n _this._ignoreWhileAnimating = null;\n });\n\n if (_this !== fromSortable) {\n fromSortable.animateAll();\n fromSortable._ignoreWhileAnimating = null;\n }\n } // Null lastTarget if it is not inside a previously swapped element\n\n\n if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n lastTarget = null;\n } // no bubbling and not fallback\n\n\n if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted\n\n\n !insertion && nearestEmptyInsertDetectEvent(evt);\n }\n\n !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n return completedFired = true;\n } // Call when dragEl has been inserted\n\n\n function changed() {\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n\n _dispatchEvent({\n sortable: _this,\n name: 'change',\n toEl: el,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n originalEvent: evt\n });\n }\n\n if (evt.preventDefault !== void 0) {\n evt.cancelable && evt.preventDefault();\n }\n\n target = closest(target, options.draggable, el, true);\n dragOverEvent('dragOver');\n if (Sortable.eventCanceled) return completedFired;\n\n if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n return completed(false);\n }\n\n ignoreNextClick = false;\n\n if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list\n : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n vertical = this._getDirection(evt, target) === 'vertical';\n dragRect = getRect(dragEl);\n dragOverEvent('dragOverValid');\n if (Sortable.eventCanceled) return completedFired;\n\n if (revert) {\n parentEl = rootEl; // actualization\n\n capture();\n\n this._hideClone();\n\n dragOverEvent('revert');\n\n if (!Sortable.eventCanceled) {\n if (nextEl) {\n rootEl.insertBefore(dragEl, nextEl);\n } else {\n rootEl.appendChild(dragEl);\n }\n }\n\n return completed(true);\n }\n\n var elLastChild = lastChild(el, options.draggable);\n\n if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n // Insert to end of list\n // If already at end of list: Do not insert\n if (elLastChild === dragEl) {\n return completed(false);\n } // if there is a last element, it is the target\n\n\n if (elLastChild && el === evt.target) {\n target = elLastChild;\n }\n\n if (target) {\n targetRect = getRect(target);\n }\n\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n capture();\n\n if (elLastChild && elLastChild.nextSibling) {\n // the last draggable element is not the last node\n el.insertBefore(dragEl, elLastChild.nextSibling);\n } else {\n el.appendChild(dragEl);\n }\n\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {\n // Insert to start of list\n var firstChild = getChild(el, 0, options, true);\n\n if (firstChild === dragEl) {\n return completed(false);\n }\n\n target = firstChild;\n targetRect = getRect(target);\n\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {\n capture();\n el.insertBefore(dragEl, firstChild);\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (target.parentNode === el) {\n targetRect = getRect(target);\n var direction = 0,\n targetBeforeFirstSwap,\n differentLevel = dragEl.parentNode !== el,\n differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),\n side1 = vertical ? 'top' : 'left',\n scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),\n scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n\n if (lastTarget !== target) {\n targetBeforeFirstSwap = targetRect[side1];\n pastFirstInvertThresh = false;\n isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n }\n\n direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n var sibling;\n\n if (direction !== 0) {\n // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n var dragIndex = index(dragEl);\n\n do {\n dragIndex -= direction;\n sibling = parentEl.children[dragIndex];\n } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n } // If dragEl is already beside target: Do not insert\n\n\n if (direction === 0 || sibling === target) {\n return completed(false);\n }\n\n lastTarget = target;\n lastDirection = direction;\n var nextSibling = target.nextElementSibling,\n after = false;\n after = direction === 1;\n\n var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n\n if (moveVector !== false) {\n if (moveVector === 1 || moveVector === -1) {\n after = moveVector === 1;\n }\n\n _silent = true;\n setTimeout(_unsilent, 30);\n capture();\n\n if (after && !nextSibling) {\n el.appendChild(dragEl);\n } else {\n target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n } // Undo chrome's scroll adjustment (has no effect on other browsers)\n\n\n if (scrolledPastTop) {\n scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n }\n\n parentEl = dragEl.parentNode; // actualization\n // must be done before animation\n\n if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n }\n\n changed();\n return completed(true);\n }\n }\n\n if (el.contains(dragEl)) {\n return completed(false);\n }\n }\n\n return false;\n },\n _ignoreWhileAnimating: null,\n _offMoveEvents: function _offMoveEvents() {\n off(document, 'mousemove', this._onTouchMove);\n off(document, 'touchmove', this._onTouchMove);\n off(document, 'pointermove', this._onTouchMove);\n off(document, 'dragover', nearestEmptyInsertDetectEvent);\n off(document, 'mousemove', nearestEmptyInsertDetectEvent);\n off(document, 'touchmove', nearestEmptyInsertDetectEvent);\n },\n _offUpEvents: function _offUpEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._onDrop);\n off(ownerDocument, 'touchend', this._onDrop);\n off(ownerDocument, 'pointerup', this._onDrop);\n off(ownerDocument, 'touchcancel', this._onDrop);\n off(document, 'selectstart', this);\n },\n _onDrop: function _onDrop(\n /**Event*/\n evt) {\n var el = this.el,\n options = this.options; // Get the index of the dragged element within its parent\n\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n pluginEvent('drop', this, {\n evt: evt\n });\n parentEl = dragEl && dragEl.parentNode; // Get again after plugin event\n\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n\n if (Sortable.eventCanceled) {\n this._nulling();\n\n return;\n }\n\n awaitingDragStarted = false;\n isCircumstantialInvert = false;\n pastFirstInvertThresh = false;\n clearInterval(this._loopId);\n clearTimeout(this._dragStartTimer);\n\n _cancelNextTick(this.cloneId);\n\n _cancelNextTick(this._dragStartId); // Unbind events\n\n\n if (this.nativeDraggable) {\n off(document, 'drop', this);\n off(el, 'dragstart', this._onDragStart);\n }\n\n this._offMoveEvents();\n\n this._offUpEvents();\n\n if (Safari) {\n css(document.body, 'user-select', '');\n }\n\n css(dragEl, 'transform', '');\n\n if (evt) {\n if (moved) {\n evt.cancelable && evt.preventDefault();\n !options.dropBubble && evt.stopPropagation();\n }\n\n ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n // Remove clone(s)\n cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n }\n\n if (dragEl) {\n if (this.nativeDraggable) {\n off(dragEl, 'dragend', this);\n }\n\n _disableDraggable(dragEl);\n\n dragEl.style['will-change'] = ''; // Remove classes\n // ghostClass is added in dragStarted\n\n if (moved && !awaitingDragStarted) {\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n }\n\n toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event\n\n _dispatchEvent({\n sortable: this,\n name: 'unchoose',\n toEl: parentEl,\n newIndex: null,\n newDraggableIndex: null,\n originalEvent: evt\n });\n\n if (rootEl !== parentEl) {\n if (newIndex >= 0) {\n // Add event\n _dispatchEvent({\n rootEl: parentEl,\n name: 'add',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n }); // Remove event\n\n\n _dispatchEvent({\n sortable: this,\n name: 'remove',\n toEl: parentEl,\n originalEvent: evt\n }); // drag from one list and drop into another\n\n\n _dispatchEvent({\n rootEl: parentEl,\n name: 'sort',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n });\n\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n\n putSortable && putSortable.save();\n } else {\n if (newIndex !== oldIndex) {\n if (newIndex >= 0) {\n // drag & drop within the same list\n _dispatchEvent({\n sortable: this,\n name: 'update',\n toEl: parentEl,\n originalEvent: evt\n });\n\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n }\n }\n\n if (Sortable.active) {\n /* jshint eqnull:true */\n if (newIndex == null || newIndex === -1) {\n newIndex = oldIndex;\n newDraggableIndex = oldDraggableIndex;\n }\n\n _dispatchEvent({\n sortable: this,\n name: 'end',\n toEl: parentEl,\n originalEvent: evt\n }); // Save sorting\n\n\n this.save();\n }\n }\n }\n\n this._nulling();\n },\n _nulling: function _nulling() {\n pluginEvent('nulling', this);\n rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n savedInputChecked.forEach(function (el) {\n el.checked = true;\n });\n savedInputChecked.length = lastDx = lastDy = 0;\n },\n handleEvent: function handleEvent(\n /**Event*/\n evt) {\n switch (evt.type) {\n case 'drop':\n case 'dragend':\n this._onDrop(evt);\n\n break;\n\n case 'dragenter':\n case 'dragover':\n if (dragEl) {\n this._onDragOver(evt);\n\n _globalDragOver(evt);\n }\n\n break;\n\n case 'selectstart':\n evt.preventDefault();\n break;\n }\n },\n\n /**\r\n * Serializes the item into an array of string.\r\n * @returns {String[]}\r\n */\n toArray: function toArray() {\n var order = [],\n el,\n children = this.el.children,\n i = 0,\n n = children.length,\n options = this.options;\n\n for (; i < n; i++) {\n el = children[i];\n\n if (closest(el, options.draggable, this.el, false)) {\n order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n }\n }\n\n return order;\n },\n\n /**\r\n * Sorts the elements according to the array.\r\n * @param {String[]} order order of the items\r\n */\n sort: function sort(order, useAnimation) {\n var items = {},\n rootEl = this.el;\n this.toArray().forEach(function (id, i) {\n var el = rootEl.children[i];\n\n if (closest(el, this.options.draggable, rootEl, false)) {\n items[id] = el;\n }\n }, this);\n useAnimation && this.captureAnimationState();\n order.forEach(function (id) {\n if (items[id]) {\n rootEl.removeChild(items[id]);\n rootEl.appendChild(items[id]);\n }\n });\n useAnimation && this.animateAll();\n },\n\n /**\r\n * Save the current sorting\r\n */\n save: function save() {\n var store = this.options.store;\n store && store.set && store.set(this);\n },\n\n /**\r\n * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\r\n * @param {HTMLElement} el\r\n * @param {String} [selector] default: `options.draggable`\r\n * @returns {HTMLElement|null}\r\n */\n closest: function closest$1(el, selector) {\n return closest(el, selector || this.options.draggable, this.el, false);\n },\n\n /**\r\n * Set/get option\r\n * @param {string} name\r\n * @param {*} [value]\r\n * @returns {*}\r\n */\n option: function option(name, value) {\n var options = this.options;\n\n if (value === void 0) {\n return options[name];\n } else {\n var modifiedValue = PluginManager.modifyOption(this, name, value);\n\n if (typeof modifiedValue !== 'undefined') {\n options[name] = modifiedValue;\n } else {\n options[name] = value;\n }\n\n if (name === 'group') {\n _prepareGroup(options);\n }\n }\n },\n\n /**\r\n * Destroy\r\n */\n destroy: function destroy() {\n pluginEvent('destroy', this);\n var el = this.el;\n el[expando] = null;\n off(el, 'mousedown', this._onTapStart);\n off(el, 'touchstart', this._onTapStart);\n off(el, 'pointerdown', this._onTapStart);\n\n if (this.nativeDraggable) {\n off(el, 'dragover', this);\n off(el, 'dragenter', this);\n } // Remove draggable attributes\n\n\n Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n el.removeAttribute('draggable');\n });\n\n this._onDrop();\n\n this._disableDelayedDragEvents();\n\n sortables.splice(sortables.indexOf(this.el), 1);\n this.el = el = null;\n },\n _hideClone: function _hideClone() {\n if (!cloneHidden) {\n pluginEvent('hideClone', this);\n if (Sortable.eventCanceled) return;\n css(cloneEl, 'display', 'none');\n\n if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n cloneEl.parentNode.removeChild(cloneEl);\n }\n\n cloneHidden = true;\n }\n },\n _showClone: function _showClone(putSortable) {\n if (putSortable.lastPutMode !== 'clone') {\n this._hideClone();\n\n return;\n }\n\n if (cloneHidden) {\n pluginEvent('showClone', this);\n if (Sortable.eventCanceled) return; // show clone at dragEl or original position\n\n if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {\n rootEl.insertBefore(cloneEl, dragEl);\n } else if (nextEl) {\n rootEl.insertBefore(cloneEl, nextEl);\n } else {\n rootEl.appendChild(cloneEl);\n }\n\n if (this.options.group.revertClone) {\n this.animate(dragEl, cloneEl);\n }\n\n css(cloneEl, 'display', '');\n cloneHidden = false;\n }\n }\n};\n\nfunction _globalDragOver(\n/**Event*/\nevt) {\n if (evt.dataTransfer) {\n evt.dataTransfer.dropEffect = 'move';\n }\n\n evt.cancelable && evt.preventDefault();\n}\n\nfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n var evt,\n sortable = fromEl[expando],\n onMoveFn = sortable.options.onMove,\n retVal; // Support for new CustomEvent feature\n\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent('move', {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent('move', true, true);\n }\n\n evt.to = toEl;\n evt.from = fromEl;\n evt.dragged = dragEl;\n evt.draggedRect = dragRect;\n evt.related = targetEl || toEl;\n evt.relatedRect = targetRect || getRect(toEl);\n evt.willInsertAfter = willInsertAfter;\n evt.originalEvent = originalEvent;\n fromEl.dispatchEvent(evt);\n\n if (onMoveFn) {\n retVal = onMoveFn.call(sortable, evt, originalEvent);\n }\n\n return retVal;\n}\n\nfunction _disableDraggable(el) {\n el.draggable = false;\n}\n\nfunction _unsilent() {\n _silent = false;\n}\n\nfunction _ghostIsFirst(evt, vertical, sortable) {\n var rect = getRect(getChild(sortable.el, 0, sortable.options, true));\n var spacer = 10;\n return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left;\n}\n\nfunction _ghostIsLast(evt, vertical, sortable) {\n var rect = getRect(lastChild(sortable.el, sortable.options.draggable));\n var spacer = 10;\n return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;\n}\n\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n var mouseOnAxis = vertical ? evt.clientY : evt.clientX,\n targetLength = vertical ? targetRect.height : targetRect.width,\n targetS1 = vertical ? targetRect.top : targetRect.left,\n targetS2 = vertical ? targetRect.bottom : targetRect.right,\n invert = false;\n\n if (!invertSwap) {\n // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n // check if past first invert threshold on side opposite of lastDirection\n if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n pastFirstInvertThresh = true;\n }\n\n if (!pastFirstInvertThresh) {\n // dragEl shadow (target move distance shadow)\n if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n : mouseOnAxis > targetS2 - targetMoveDistance) {\n return -lastDirection;\n }\n } else {\n invert = true;\n }\n } else {\n // Regular\n if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n return _getInsertDirection(target);\n }\n }\n }\n\n invert = invert || invertSwap;\n\n if (invert) {\n // Invert of regular\n if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n }\n }\n\n return 0;\n}\n/**\r\n * Gets the direction dragEl must be swapped relative to target in order to make it\r\n * seem that dragEl has been \"inserted\" into that element's position\r\n * @param {HTMLElement} target The target whose position dragEl is being inserted at\r\n * @return {Number} Direction dragEl must be swapped\r\n */\n\n\nfunction _getInsertDirection(target) {\n if (index(dragEl) < index(target)) {\n return 1;\n } else {\n return -1;\n }\n}\n/**\r\n * Generate id\r\n * @param {HTMLElement} el\r\n * @returns {String}\r\n * @private\r\n */\n\n\nfunction _generateId(el) {\n var str = el.tagName + el.className + el.src + el.href + el.textContent,\n i = str.length,\n sum = 0;\n\n while (i--) {\n sum += str.charCodeAt(i);\n }\n\n return sum.toString(36);\n}\n\nfunction _saveInputCheckedState(root) {\n savedInputChecked.length = 0;\n var inputs = root.getElementsByTagName('input');\n var idx = inputs.length;\n\n while (idx--) {\n var el = inputs[idx];\n el.checked && savedInputChecked.push(el);\n }\n}\n\nfunction _nextTick(fn) {\n return setTimeout(fn, 0);\n}\n\nfunction _cancelNextTick(id) {\n return clearTimeout(id);\n} // Fixed #973:\n\n\nif (documentExists) {\n on(document, 'touchmove', function (evt) {\n if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n evt.preventDefault();\n }\n });\n} // Export utils\n\n\nSortable.utils = {\n on: on,\n off: off,\n css: css,\n find: find,\n is: function is(el, selector) {\n return !!closest(el, selector, el, false);\n },\n extend: extend,\n throttle: throttle,\n closest: closest,\n toggleClass: toggleClass,\n clone: clone,\n index: index,\n nextTick: _nextTick,\n cancelNextTick: _cancelNextTick,\n detectDirection: _detectDirection,\n getChild: getChild\n};\n/**\r\n * Get the Sortable instance of an element\r\n * @param {HTMLElement} element The element\r\n * @return {Sortable|undefined} The instance of Sortable\r\n */\n\nSortable.get = function (element) {\n return element[expando];\n};\n/**\r\n * Mount a plugin to Sortable\r\n * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted\r\n */\n\n\nSortable.mount = function () {\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n\n if (plugins[0].constructor === Array) plugins = plugins[0];\n plugins.forEach(function (plugin) {\n if (!plugin.prototype || !plugin.prototype.constructor) {\n throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n }\n\n if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n PluginManager.mount(plugin);\n });\n};\n/**\r\n * Create sortable instance\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\n\n\nSortable.create = function (el, options) {\n return new Sortable(el, options);\n}; // Export\n\n\nSortable.version = version;\n\nvar autoScrolls = [],\n scrollEl,\n scrollRootEl,\n scrolling = false,\n lastAutoScrollX,\n lastAutoScrollY,\n touchEvt$1,\n pointerElemChangedInterval;\n\nfunction AutoScrollPlugin() {\n function AutoScroll() {\n this.defaults = {\n scroll: true,\n forceAutoScrollFallback: false,\n scrollSensitivity: 30,\n scrollSpeed: 10,\n bubbleScroll: true\n }; // Bind all private methods\n\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n }\n\n AutoScroll.prototype = {\n dragStarted: function dragStarted(_ref) {\n var originalEvent = _ref.originalEvent;\n\n if (this.sortable.nativeDraggable) {\n on(document, 'dragover', this._handleAutoScroll);\n } else {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._handleFallbackAutoScroll);\n } else if (originalEvent.touches) {\n on(document, 'touchmove', this._handleFallbackAutoScroll);\n } else {\n on(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref2) {\n var originalEvent = _ref2.originalEvent;\n\n // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)\n if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n this._handleAutoScroll(originalEvent);\n }\n },\n drop: function drop() {\n if (this.sortable.nativeDraggable) {\n off(document, 'dragover', this._handleAutoScroll);\n } else {\n off(document, 'pointermove', this._handleFallbackAutoScroll);\n off(document, 'touchmove', this._handleFallbackAutoScroll);\n off(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n\n clearPointerElemChangedInterval();\n clearAutoScrolls();\n cancelThrottle();\n },\n nulling: function nulling() {\n touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n autoScrolls.length = 0;\n },\n _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n this._handleAutoScroll(evt, true);\n },\n _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n var _this = this;\n\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n elem = document.elementFromPoint(x, y);\n touchEvt$1 = evt; // IE does not seem to have native autoscroll,\n // Edge's autoscroll seems too conditional,\n // MACOS Safari does not have autoscroll,\n // Firefox and Chrome are good\n\n if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change\n\n var ogElemScroller = getParentAutoScrollElement(elem, true);\n\n if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour\n\n pointerElemChangedInterval = setInterval(function () {\n var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n\n if (newElem !== ogElemScroller) {\n ogElemScroller = newElem;\n clearAutoScrolls();\n }\n\n autoScroll(evt, _this.options, newElem, fallback);\n }, 10);\n lastAutoScrollX = x;\n lastAutoScrollY = y;\n }\n } else {\n // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n clearAutoScrolls();\n return;\n }\n\n autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n }\n }\n };\n return _extends(AutoScroll, {\n pluginName: 'scroll',\n initializeByDefault: true\n });\n}\n\nfunction clearAutoScrolls() {\n autoScrolls.forEach(function (autoScroll) {\n clearInterval(autoScroll.pid);\n });\n autoScrolls = [];\n}\n\nfunction clearPointerElemChangedInterval() {\n clearInterval(pointerElemChangedInterval);\n}\n\nvar autoScroll = throttle(function (evt, options, rootEl, isFallback) {\n // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n if (!options.scroll) return;\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n sens = options.scrollSensitivity,\n speed = options.scrollSpeed,\n winScroller = getWindowScrollingElement();\n var scrollThisInstance = false,\n scrollCustomFn; // New scroll root, set scrollEl\n\n if (scrollRootEl !== rootEl) {\n scrollRootEl = rootEl;\n clearAutoScrolls();\n scrollEl = options.scroll;\n scrollCustomFn = options.scrollFn;\n\n if (scrollEl === true) {\n scrollEl = getParentAutoScrollElement(rootEl, true);\n }\n }\n\n var layersOut = 0;\n var currentParent = scrollEl;\n\n do {\n var el = currentParent,\n rect = getRect(el),\n top = rect.top,\n bottom = rect.bottom,\n left = rect.left,\n right = rect.right,\n width = rect.width,\n height = rect.height,\n canScrollX = void 0,\n canScrollY = void 0,\n scrollWidth = el.scrollWidth,\n scrollHeight = el.scrollHeight,\n elCSS = css(el),\n scrollPosX = el.scrollLeft,\n scrollPosY = el.scrollTop;\n\n if (el === winScroller) {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');\n } else {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');\n }\n\n var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n\n if (!autoScrolls[layersOut]) {\n for (var i = 0; i <= layersOut; i++) {\n if (!autoScrolls[i]) {\n autoScrolls[i] = {};\n }\n }\n }\n\n if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n autoScrolls[layersOut].el = el;\n autoScrolls[layersOut].vx = vx;\n autoScrolls[layersOut].vy = vy;\n clearInterval(autoScrolls[layersOut].pid);\n\n if (vx != 0 || vy != 0) {\n scrollThisInstance = true;\n /* jshint loopfunc:true */\n\n autoScrolls[layersOut].pid = setInterval(function () {\n // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n if (isFallback && this.layer === 0) {\n Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely\n\n }\n\n var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n\n if (typeof scrollCustomFn === 'function') {\n if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {\n return;\n }\n }\n\n scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n }.bind({\n layer: layersOut\n }), 24);\n }\n }\n\n layersOut++;\n } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n\n scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\n\nvar drop = function drop(_ref) {\n var originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n dragEl = _ref.dragEl,\n activeSortable = _ref.activeSortable,\n dispatchSortableEvent = _ref.dispatchSortableEvent,\n hideGhostForTarget = _ref.hideGhostForTarget,\n unhideGhostForTarget = _ref.unhideGhostForTarget;\n if (!originalEvent) return;\n var toSortable = putSortable || activeSortable;\n hideGhostForTarget();\n var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n var target = document.elementFromPoint(touch.clientX, touch.clientY);\n unhideGhostForTarget();\n\n if (toSortable && !toSortable.el.contains(target)) {\n dispatchSortableEvent('spill');\n this.onSpill({\n dragEl: dragEl,\n putSortable: putSortable\n });\n }\n};\n\nfunction Revert() {}\n\nRevert.prototype = {\n startIndex: null,\n dragStart: function dragStart(_ref2) {\n var oldDraggableIndex = _ref2.oldDraggableIndex;\n this.startIndex = oldDraggableIndex;\n },\n onSpill: function onSpill(_ref3) {\n var dragEl = _ref3.dragEl,\n putSortable = _ref3.putSortable;\n this.sortable.captureAnimationState();\n\n if (putSortable) {\n putSortable.captureAnimationState();\n }\n\n var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n\n if (nextSibling) {\n this.sortable.el.insertBefore(dragEl, nextSibling);\n } else {\n this.sortable.el.appendChild(dragEl);\n }\n\n this.sortable.animateAll();\n\n if (putSortable) {\n putSortable.animateAll();\n }\n },\n drop: drop\n};\n\n_extends(Revert, {\n pluginName: 'revertOnSpill'\n});\n\nfunction Remove() {}\n\nRemove.prototype = {\n onSpill: function onSpill(_ref4) {\n var dragEl = _ref4.dragEl,\n putSortable = _ref4.putSortable;\n var parentSortable = putSortable || this.sortable;\n parentSortable.captureAnimationState();\n dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);\n parentSortable.animateAll();\n },\n drop: drop\n};\n\n_extends(Remove, {\n pluginName: 'removeOnSpill'\n});\n\nvar lastSwapEl;\n\nfunction SwapPlugin() {\n function Swap() {\n this.defaults = {\n swapClass: 'sortable-swap-highlight'\n };\n }\n\n Swap.prototype = {\n dragStart: function dragStart(_ref) {\n var dragEl = _ref.dragEl;\n lastSwapEl = dragEl;\n },\n dragOverValid: function dragOverValid(_ref2) {\n var completed = _ref2.completed,\n target = _ref2.target,\n onMove = _ref2.onMove,\n activeSortable = _ref2.activeSortable,\n changed = _ref2.changed,\n cancel = _ref2.cancel;\n if (!activeSortable.options.swap) return;\n var el = this.sortable.el,\n options = this.options;\n\n if (target && target !== el) {\n var prevSwapEl = lastSwapEl;\n\n if (onMove(target) !== false) {\n toggleClass(target, options.swapClass, true);\n lastSwapEl = target;\n } else {\n lastSwapEl = null;\n }\n\n if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n toggleClass(prevSwapEl, options.swapClass, false);\n }\n }\n\n changed();\n completed(true);\n cancel();\n },\n drop: function drop(_ref3) {\n var activeSortable = _ref3.activeSortable,\n putSortable = _ref3.putSortable,\n dragEl = _ref3.dragEl;\n var toSortable = putSortable || this.sortable;\n var options = this.options;\n lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);\n\n if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n if (dragEl !== lastSwapEl) {\n toSortable.captureAnimationState();\n if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n swapNodes(dragEl, lastSwapEl);\n toSortable.animateAll();\n if (toSortable !== activeSortable) activeSortable.animateAll();\n }\n }\n },\n nulling: function nulling() {\n lastSwapEl = null;\n }\n };\n return _extends(Swap, {\n pluginName: 'swap',\n eventProperties: function eventProperties() {\n return {\n swapItem: lastSwapEl\n };\n }\n });\n}\n\nfunction swapNodes(n1, n2) {\n var p1 = n1.parentNode,\n p2 = n2.parentNode,\n i1,\n i2;\n if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n i1 = index(n1);\n i2 = index(n2);\n\n if (p1.isEqualNode(p2) && i1 < i2) {\n i2++;\n }\n\n p1.insertBefore(n2, p1.children[i1]);\n p2.insertBefore(n1, p2.children[i2]);\n}\n\nvar multiDragElements = [],\n multiDragClones = [],\n lastMultiDragSelect,\n // for selection with modifier key down (SHIFT)\nmultiDragSortable,\n initialFolding = false,\n // Initial multi-drag fold when drag started\nfolding = false,\n // Folding any other time\ndragStarted = false,\n dragEl$1,\n clonesFromRect,\n clonesHidden;\n\nfunction MultiDragPlugin() {\n function MultiDrag(sortable) {\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n\n if (!sortable.options.avoidImplicitDeselect) {\n if (sortable.options.supportPointer) {\n on(document, 'pointerup', this._deselectMultiDrag);\n } else {\n on(document, 'mouseup', this._deselectMultiDrag);\n on(document, 'touchend', this._deselectMultiDrag);\n }\n }\n\n on(document, 'keydown', this._checkKeyDown);\n on(document, 'keyup', this._checkKeyUp);\n this.defaults = {\n selectedClass: 'sortable-selected',\n multiDragKey: null,\n avoidImplicitDeselect: false,\n setData: function setData(dataTransfer, dragEl) {\n var data = '';\n\n if (multiDragElements.length && multiDragSortable === sortable) {\n multiDragElements.forEach(function (multiDragElement, i) {\n data += (!i ? '' : ', ') + multiDragElement.textContent;\n });\n } else {\n data = dragEl.textContent;\n }\n\n dataTransfer.setData('Text', data);\n }\n };\n }\n\n MultiDrag.prototype = {\n multiDragKeyDown: false,\n isMultiDrag: false,\n delayStartGlobal: function delayStartGlobal(_ref) {\n var dragged = _ref.dragEl;\n dragEl$1 = dragged;\n },\n delayEnded: function delayEnded() {\n this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);\n },\n setupClone: function setupClone(_ref2) {\n var sortable = _ref2.sortable,\n cancel = _ref2.cancel;\n if (!this.isMultiDrag) return;\n\n for (var i = 0; i < multiDragElements.length; i++) {\n multiDragClones.push(clone(multiDragElements[i]));\n multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;\n multiDragClones[i].draggable = false;\n multiDragClones[i].style['will-change'] = '';\n toggleClass(multiDragClones[i], this.options.selectedClass, false);\n multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);\n }\n\n sortable._hideClone();\n\n cancel();\n },\n clone: function clone(_ref3) {\n var sortable = _ref3.sortable,\n rootEl = _ref3.rootEl,\n dispatchSortableEvent = _ref3.dispatchSortableEvent,\n cancel = _ref3.cancel;\n if (!this.isMultiDrag) return;\n\n if (!this.options.removeCloneOnHide) {\n if (multiDragElements.length && multiDragSortable === sortable) {\n insertMultiDragClones(true, rootEl);\n dispatchSortableEvent('clone');\n cancel();\n }\n }\n },\n showClone: function showClone(_ref4) {\n var cloneNowShown = _ref4.cloneNowShown,\n rootEl = _ref4.rootEl,\n cancel = _ref4.cancel;\n if (!this.isMultiDrag) return;\n insertMultiDragClones(false, rootEl);\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', '');\n });\n cloneNowShown();\n clonesHidden = false;\n cancel();\n },\n hideClone: function hideClone(_ref5) {\n var _this = this;\n\n var sortable = _ref5.sortable,\n cloneNowHidden = _ref5.cloneNowHidden,\n cancel = _ref5.cancel;\n if (!this.isMultiDrag) return;\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', 'none');\n\n if (_this.options.removeCloneOnHide && clone.parentNode) {\n clone.parentNode.removeChild(clone);\n }\n });\n cloneNowHidden();\n clonesHidden = true;\n cancel();\n },\n dragStartGlobal: function dragStartGlobal(_ref6) {\n var sortable = _ref6.sortable;\n\n if (!this.isMultiDrag && multiDragSortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n }\n\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.sortableIndex = index(multiDragElement);\n }); // Sort multi-drag elements\n\n multiDragElements = multiDragElements.sort(function (a, b) {\n return a.sortableIndex - b.sortableIndex;\n });\n dragStarted = true;\n },\n dragStarted: function dragStarted(_ref7) {\n var _this2 = this;\n\n var sortable = _ref7.sortable;\n if (!this.isMultiDrag) return;\n\n if (this.options.sort) {\n // Capture rects,\n // hide multi drag elements (by positioning them absolute),\n // set multi drag elements rects to dragRect,\n // show multi drag elements,\n // animate to rects,\n // unset rects & remove from DOM\n sortable.captureAnimationState();\n\n if (this.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n css(multiDragElement, 'position', 'absolute');\n });\n var dragRect = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRect);\n });\n folding = true;\n initialFolding = true;\n }\n }\n\n sortable.animateAll(function () {\n folding = false;\n initialFolding = false;\n\n if (_this2.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n } // Remove all auxiliary multidrag items from el, if sorting enabled\n\n\n if (_this2.options.sort) {\n removeMultiDragElements();\n }\n });\n },\n dragOver: function dragOver(_ref8) {\n var target = _ref8.target,\n completed = _ref8.completed,\n cancel = _ref8.cancel;\n\n if (folding && ~multiDragElements.indexOf(target)) {\n completed(false);\n cancel();\n }\n },\n revert: function revert(_ref9) {\n var fromSortable = _ref9.fromSortable,\n rootEl = _ref9.rootEl,\n sortable = _ref9.sortable,\n dragRect = _ref9.dragRect;\n\n if (multiDragElements.length > 1) {\n // Setup unfold animation\n multiDragElements.forEach(function (multiDragElement) {\n sortable.addAnimationState({\n target: multiDragElement,\n rect: folding ? getRect(multiDragElement) : dragRect\n });\n unsetRect(multiDragElement);\n multiDragElement.fromRect = dragRect;\n fromSortable.removeAnimationState(multiDragElement);\n });\n folding = false;\n insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref10) {\n var sortable = _ref10.sortable,\n isOwner = _ref10.isOwner,\n insertion = _ref10.insertion,\n activeSortable = _ref10.activeSortable,\n parentEl = _ref10.parentEl,\n putSortable = _ref10.putSortable;\n var options = this.options;\n\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n }\n\n initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location\n\n if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {\n // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible\n var dragRectAbsolute = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted\n // while folding, and so that we can capture them again because old sortable will no longer be fromSortable\n\n parentEl.appendChild(multiDragElement);\n });\n folding = true;\n } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n\n\n if (!isOwner) {\n // Only remove if not folding (folding will remove them anyways)\n if (!folding) {\n removeMultiDragElements();\n }\n\n if (multiDragElements.length > 1) {\n var clonesHiddenBefore = clonesHidden;\n\n activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden\n\n\n if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {\n multiDragClones.forEach(function (clone) {\n activeSortable.addAnimationState({\n target: clone,\n rect: clonesFromRect\n });\n clone.fromRect = clonesFromRect;\n clone.thisAnimationDuration = null;\n });\n }\n } else {\n activeSortable._showClone(sortable);\n }\n }\n }\n },\n dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n var dragRect = _ref11.dragRect,\n isOwner = _ref11.isOwner,\n activeSortable = _ref11.activeSortable;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n });\n\n if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n clonesFromRect = _extends({}, dragRect);\n var dragMatrix = matrix(dragEl$1, true);\n clonesFromRect.top -= dragMatrix.f;\n clonesFromRect.left -= dragMatrix.e;\n }\n },\n dragOverAnimationComplete: function dragOverAnimationComplete() {\n if (folding) {\n folding = false;\n removeMultiDragElements();\n }\n },\n drop: function drop(_ref12) {\n var evt = _ref12.originalEvent,\n rootEl = _ref12.rootEl,\n parentEl = _ref12.parentEl,\n sortable = _ref12.sortable,\n dispatchSortableEvent = _ref12.dispatchSortableEvent,\n oldIndex = _ref12.oldIndex,\n putSortable = _ref12.putSortable;\n var toSortable = putSortable || this.sortable;\n if (!evt) return;\n var options = this.options,\n children = parentEl.children; // Multi-drag selection\n\n if (!dragStarted) {\n if (options.multiDragKey && !this.multiDragKeyDown) {\n this._deselectMultiDrag();\n }\n\n toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n\n if (!~multiDragElements.indexOf(dragEl$1)) {\n multiDragElements.push(dragEl$1);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: dragEl$1,\n originalEvent: evt\n }); // Modifier activated, select from last to dragEl\n\n if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n var lastIndex = index(lastMultiDragSelect),\n currentIndex = index(dragEl$1);\n\n if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\n // Must include lastMultiDragSelect (select it), in case modified selection from no selection\n // (but previous selection existed)\n var n, i;\n\n if (currentIndex > lastIndex) {\n i = lastIndex;\n n = currentIndex;\n } else {\n i = currentIndex;\n n = lastIndex + 1;\n }\n\n for (; i < n; i++) {\n if (~multiDragElements.indexOf(children[i])) continue;\n toggleClass(children[i], options.selectedClass, true);\n multiDragElements.push(children[i]);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: children[i],\n originalEvent: evt\n });\n }\n }\n } else {\n lastMultiDragSelect = dragEl$1;\n }\n\n multiDragSortable = toSortable;\n } else {\n multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);\n lastMultiDragSelect = null;\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'deselect',\n targetEl: dragEl$1,\n originalEvent: evt\n });\n }\n } // Multi-drag drop\n\n\n if (dragStarted && this.isMultiDrag) {\n folding = false; // Do not \"unfold\" after around dragEl if reverted\n\n if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {\n var dragRect = getRect(dragEl$1),\n multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');\n if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;\n toSortable.captureAnimationState();\n\n if (!initialFolding) {\n if (options.animation) {\n dragEl$1.fromRect = dragRect;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n\n if (multiDragElement !== dragEl$1) {\n var rect = folding ? getRect(multiDragElement) : dragRect;\n multiDragElement.fromRect = rect; // Prepare unfold animation\n\n toSortable.addAnimationState({\n target: multiDragElement,\n rect: rect\n });\n }\n });\n } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert\n // properly they must all be removed\n\n\n removeMultiDragElements();\n multiDragElements.forEach(function (multiDragElement) {\n if (children[multiDragIndex]) {\n parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n } else {\n parentEl.appendChild(multiDragElement);\n }\n\n multiDragIndex++;\n }); // If initial folding is done, the elements may have changed position because they are now\n // unfolding around dragEl, even though dragEl may not have his index changed, so update event\n // must be fired here as Sortable will not.\n\n if (oldIndex === index(dragEl$1)) {\n var update = false;\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement.sortableIndex !== index(multiDragElement)) {\n update = true;\n return;\n }\n });\n\n if (update) {\n dispatchSortableEvent('update');\n }\n }\n } // Must be done after capturing individual rects (scroll bar)\n\n\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n toSortable.animateAll();\n }\n\n multiDragSortable = toSortable;\n } // Remove clones if necessary\n\n\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n multiDragClones.forEach(function (clone) {\n clone.parentNode && clone.parentNode.removeChild(clone);\n });\n }\n },\n nullingGlobal: function nullingGlobal() {\n this.isMultiDrag = dragStarted = false;\n multiDragClones.length = 0;\n },\n destroyGlobal: function destroyGlobal() {\n this._deselectMultiDrag();\n\n off(document, 'pointerup', this._deselectMultiDrag);\n off(document, 'mouseup', this._deselectMultiDrag);\n off(document, 'touchend', this._deselectMultiDrag);\n off(document, 'keydown', this._checkKeyDown);\n off(document, 'keyup', this._checkKeyUp);\n },\n _deselectMultiDrag: function _deselectMultiDrag(evt) {\n if (typeof dragStarted !== \"undefined\" && dragStarted) return; // Only deselect if selection is in this sortable\n\n if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable\n\n if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click\n\n if (evt && evt.button !== 0) return;\n\n while (multiDragElements.length) {\n var el = multiDragElements[0];\n toggleClass(el, this.options.selectedClass, false);\n multiDragElements.shift();\n dispatchEvent({\n sortable: this.sortable,\n rootEl: this.sortable.el,\n name: 'deselect',\n targetEl: el,\n originalEvent: evt\n });\n }\n },\n _checkKeyDown: function _checkKeyDown(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = true;\n }\n },\n _checkKeyUp: function _checkKeyUp(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = false;\n }\n }\n };\n return _extends(MultiDrag, {\n // Static methods & properties\n pluginName: 'multiDrag',\n utils: {\n /**\r\n * Selects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be selected\r\n */\n select: function select(el) {\n var sortable = el.parentNode[expando];\n if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;\n\n if (multiDragSortable && multiDragSortable !== sortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n\n multiDragSortable = sortable;\n }\n\n toggleClass(el, sortable.options.selectedClass, true);\n multiDragElements.push(el);\n },\n\n /**\r\n * Deselects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be deselected\r\n */\n deselect: function deselect(el) {\n var sortable = el.parentNode[expando],\n index = multiDragElements.indexOf(el);\n if (!sortable || !sortable.options.multiDrag || !~index) return;\n toggleClass(el, sortable.options.selectedClass, false);\n multiDragElements.splice(index, 1);\n }\n },\n eventProperties: function eventProperties() {\n var _this3 = this;\n\n var oldIndicies = [],\n newIndicies = [];\n multiDragElements.forEach(function (multiDragElement) {\n oldIndicies.push({\n multiDragElement: multiDragElement,\n index: multiDragElement.sortableIndex\n }); // multiDragElements will already be sorted if folding\n\n var newIndex;\n\n if (folding && multiDragElement !== dragEl$1) {\n newIndex = -1;\n } else if (folding) {\n newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');\n } else {\n newIndex = index(multiDragElement);\n }\n\n newIndicies.push({\n multiDragElement: multiDragElement,\n index: newIndex\n });\n });\n return {\n items: _toConsumableArray(multiDragElements),\n clones: [].concat(multiDragClones),\n oldIndicies: oldIndicies,\n newIndicies: newIndicies\n };\n },\n optionListeners: {\n multiDragKey: function multiDragKey(key) {\n key = key.toLowerCase();\n\n if (key === 'ctrl') {\n key = 'Control';\n } else if (key.length > 1) {\n key = key.charAt(0).toUpperCase() + key.substr(1);\n }\n\n return key;\n }\n }\n });\n}\n\nfunction insertMultiDragElements(clonesInserted, rootEl) {\n multiDragElements.forEach(function (multiDragElement, i) {\n var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n\n if (target) {\n rootEl.insertBefore(multiDragElement, target);\n } else {\n rootEl.appendChild(multiDragElement);\n }\n });\n}\n/**\r\n * Insert multi-drag clones\r\n * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted\r\n * @param {HTMLElement} rootEl\r\n */\n\n\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n multiDragClones.forEach(function (clone, i) {\n var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n\n if (target) {\n rootEl.insertBefore(clone, target);\n } else {\n rootEl.appendChild(clone);\n }\n });\n}\n\nfunction removeMultiDragElements() {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n });\n}\n\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\n\nexport default Sortable;\nexport { MultiDragPlugin as MultiDrag, Sortable, SwapPlugin as Swap };\n"],"names":[],"version":3,"file":"electron-tabs.draggable.js.map","sourceRoot":"../"} \ No newline at end of file diff --git a/dist/electron-tabs.js b/dist/electron-tabs.js index f2cb050..2847281 100644 --- a/dist/electron-tabs.js +++ b/dist/electron-tabs.js @@ -50,18 +50,16 @@ class $4fa36e821943b400$var$TabGroup extends HTMLElement { $4fa36e821943b400$var$TabGroupPrivate.initVisibility.bind(this)(); // Init draggable tabs if (this.options.draggable) { - const initDragula = ()=>{ - // FIXME: dragula doesnt support shadow dom :-( - console.log(this.tabContainer); - const d = window.dragula([ - this.tabContainer - ], { - direction: "horizontal" - }); - console.log(d); + const initSortable = ()=>{ + const options = Object.assign({ + direction: "horizontal", + animation: 150, + swapThreshold: 0.20 + }, this.options.draggableOptions); + new window.Sortable(this.tabContainer, options); }; - if (window.dragula) initDragula(); - else document.addEventListener("DOMContentLoaded", initDragula); + if (window.Sortable) initSortable(); + else document.addEventListener("DOMContentLoaded", initSortable); } } setDefaultTab(tab) { diff --git a/dist/electron-tabs.js.map b/dist/electron-tabs.js.map index a887130..2fa460d 100644 --- a/dist/electron-tabs.js.map +++ b/dist/electron-tabs.js.map @@ -1 +1 @@ -{"mappings":"ACAA,IAAA,wCAAkvG,GAAnuG,muGAAmuG;;ADAlvG;AAEA,IAAI,CAAC,QAAQ,EACX,MAAM,KAAK,CAAC,yDAAyD,CAAC,CAAC;AAGzE,MAAM,8BAAQ,SAAS,WAAW;IAChC,aAAe;QACb,KAAK,EAAE,CAAC;QAER,UAAU;QACV,IAAI,CAAC,OAAO,GAAG;YACb,eAAe,EAAE,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,IAAI,QAAQ;YACnE,gBAAgB,EAAE,IAAI,CAAC,YAAY,CAAC,qBAAqB,CAAC,IAAI,UAAU;YACxE,mBAAmB,EAAE,IAAI,CAAC,YAAY,CAAC,sBAAsB,CAAC,IAAI,CAAC;YACnE,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,IAAI,WAAW;YACvD,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,YAAY,CA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AM,CAAC,MAAM,CAAC,8BAAQ,CAAC,SAAS,EAAE,uCAAiB,CAAC,CAAC;AACrD,MAAM,CAAC,MAAM,CAAC,yBAAG,CAAC,SAAS,EAAE,uCAAiB,CAAC,CAAC;AAEhD,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,8BAAQ,CAAC,CAAC","sources":["src/index.js","src/style.css"],"sourcesContent":["import styles from \"./style.css\";\n\nif (!document) {\n throw Error(\"electron-tabs module must be called in renderer process\");\n}\n\nclass TabGroup extends HTMLElement {\n constructor () {\n super();\n\n // Options\n this.options = {\n closeButtonText: this.getAttribute(\"close-button-text\") || \"×\",\n newTabButtonText: this.getAttribute(\"new-tab-button-text\") || \"+\",\n visibilityThreshold: this.getAttribute(\"visibility-threshold\") || 0,\n tabClass: this.getAttribute(\"tab-class\") || \"etabs-tab\",\n viewClass: this.getAttribute(\"view-class\") || \"etabs-view\",\n newTabButton: this.getAttribute(\"new-tab-button\") || false,\n defaultTab: { title: \"New Tab\", active: true },\n draggable: this.getAttribute(\"draggable\") || false\n // TODO: replace this callback\n // ready: args.ready\n };\n\n // Create custom element\n const shadow = this.attachShadow({mode: \"open\"});\n\n const wrapper = document.createElement(\"div\");\n wrapper.setAttribute(\"class\", \"etabs\");\n\n const tabgroup = document.createElement(\"div\");\n tabgroup.setAttribute(\"class\", \"etabs-tabgroup\");\n wrapper.appendChild(tabgroup);\n\n const tabContainer = document.createElement(\"div\");\n tabContainer.setAttribute(\"class\", \"etabs-tabs\");\n tabgroup.appendChild(tabContainer);\n this.tabContainer = tabContainer;\n\n const buttonContainer = document.createElement(\"div\");\n buttonContainer.setAttribute(\"class\", \"etabs-buttons\");\n tabgroup.appendChild(buttonContainer);\n this.buttonContainer = buttonContainer;\n\n const viewContainer = document.createElement(\"div\");\n viewContainer.setAttribute(\"class\", \"etabs-views\");\n wrapper.appendChild(viewContainer);\n this.viewContainer = viewContainer;\n\n const style = document.createElement(\"style\");\n style.textContent = styles;\n\n shadow.appendChild(style);\n shadow.appendChild(wrapper);\n\n this.tabs = [];\n this.newTabId = 0;\n TabGroupPrivate.initNewTabButton.bind(this)();\n TabGroupPrivate.initVisibility.bind(this)();\n\n // Init draggable tabs\n if (this.options.draggable) {\n const initDragula = () => {\n // FIXME: dragula doesnt support shadow dom :-(\n console.log(this.tabContainer);\n const d =window.dragula([this.tabContainer], {\n direction: \"horizontal\"\n });\n console.log(d);\n };\n\n if (window.dragula) {\n initDragula();\n } else {\n document.addEventListener(\"DOMContentLoaded\", initDragula);\n }\n }\n }\n\n setDefaultTab (tab) {\n this.options.defaultTab = tab;\n }\n\n addTab (args = this.options.defaultTab) {\n if (typeof args === \"function\") {\n args = args(this);\n }\n let id = this.newTabId;\n this.newTabId++;\n let tab = new Tab(this, id, args);\n this.tabs.push(tab);\n // Don't call tab.activate() before a tab is referenced in this.tabs\n if (args.active === true) {\n tab.activate();\n }\n this.emit(\"tab-added\", tab, this);\n return tab;\n }\n\n getTab (id) {\n for (let i in this.tabs) {\n if (this.tabs[i].id === id) {\n return this.tabs[i];\n }\n }\n return null;\n }\n\n getTabByPosition (position) {\n let fromRight = position < 0;\n for (let i in this.tabs) {\n if (this.tabs[i].getPosition(fromRight) === position) {\n return this.tabs[i];\n }\n }\n return null;\n }\n\n getTabByRelPosition (position) {\n position = this.getActiveTab().getPosition() + position;\n if (position <= 0) {\n return null;\n }\n return this.getTabByPosition(position);\n }\n\n getNextTab () {\n return this.getTabByRelPosition(1);\n }\n\n getPreviousTab () {\n return this.getTabByRelPosition(-1);\n }\n\n getTabs () {\n return this.tabs.slice();\n }\n\n eachTab (fn) {\n this.getTabs().forEach(fn);\n return this;\n }\n\n getActiveTab () {\n if (this.tabs.length === 0) return null;\n return this.tabs[0];\n }\n}\n\nconst TabGroupPrivate = {\n initNewTabButton: function () {\n if (!this.options.newTabButton) return;\n let button = this.buttonContainer.appendChild(document.createElement(\"button\"));\n button.classList.add(`${this.options.tabClass}-button-new`);\n button.innerHTML = this.options.newTabButtonText;\n button.addEventListener(\"click\", this.addTab.bind(this, undefined), false);\n },\n\n initVisibility: function () {\n function toggleTabsVisibility(tab, tabGroup) {\n var visibilityThreshold = this.options.visibilityThreshold;\n var el = tabGroup.tabContainer.parentNode;\n if (this.tabs.length >= visibilityThreshold) {\n el.classList.add(\"visible\");\n } else {\n el.classList.remove(\"visible\");\n }\n }\n\n this.on(\"tab-added\", toggleTabsVisibility);\n this.on(\"tab-removed\", toggleTabsVisibility);\n },\n\n removeTab: function (tab, triggerEvent) {\n let id = tab.id;\n for (let i in this.tabs) {\n if (this.tabs[i].id === id) {\n this.tabs.splice(i, 1);\n break;\n }\n }\n if (triggerEvent) {\n this.emit(\"tab-removed\", tab, this);\n }\n return this;\n },\n\n setActiveTab: function (tab) {\n TabGroupPrivate.removeTab.bind(this)(tab);\n this.tabs.unshift(tab);\n this.emit(\"tab-active\", tab, this);\n return this;\n },\n\n activateRecentTab: function (tab) {\n if (this.tabs.length > 0) {\n this.tabs[0].activate();\n }\n return this;\n }\n};\n\nclass Tab extends EventTarget {\n constructor (tabGroup, id, args) {\n super();\n this.tabGroup = tabGroup;\n this.id = id;\n this.title = args.title;\n this.badge = args.badge;\n this.iconURL = args.iconURL;\n this.icon = args.icon;\n this.closable = args.closable === false ? false : true;\n this.webviewAttributes = args.webviewAttributes || {};\n this.webviewAttributes.src = args.src;\n this.tabElements = {};\n TabPrivate.initTab.bind(this)();\n TabPrivate.initWebview.bind(this)();\n if (args.visible !== false) {\n this.show();\n }\n if (typeof args.ready === \"function\") {\n args.ready(this);\n }\n }\n\n setTitle (title) {\n if (this.isClosed) return;\n let span = this.tabElements.title;\n span.innerHTML = title;\n span.title = title;\n this.title = title;\n this.emit(\"title-changed\", title, this);\n return this;\n }\n\n getTitle () {\n if (this.isClosed) return;\n return this.title;\n }\n\n setBadge (badge) {\n if (this.isClosed) return;\n let span = this.tabElements.badge;\n this.badge = badge;\n\n if (badge) {\n span.innerHTML = badge;\n span.classList.remove(\"hidden\");\n } else {\n span.classList.add(\"hidden\");\n }\n\n this.emit(\"badge-changed\", badge, this);\n }\n\n getBadge () {\n if (this.isClosed) return;\n return this.badge;\n }\n\n setIcon (iconURL, icon) {\n if (this.isClosed) return;\n this.iconURL = iconURL;\n this.icon = icon;\n let span = this.tabElements.icon;\n if (iconURL) {\n span.innerHTML = ``;\n this.emit(\"icon-changed\", iconURL, this);\n } else if (icon) {\n span.innerHTML = ``;\n this.emit(\"icon-changed\", icon, this);\n }\n\n return this;\n }\n\n getIcon () {\n if (this.isClosed) return;\n if (this.iconURL) return this.iconURL;\n return this.icon;\n }\n\n setPosition (newPosition) {\n let tabContainer = this.tabGroup.tabContainer;\n let tabs = tabContainer.children;\n let oldPosition = this.getPosition() - 1;\n\n if (newPosition < 0) {\n newPosition += tabContainer.childElementCount;\n\n if (newPosition < 0) {\n newPosition = 0;\n }\n } else {\n if (newPosition > tabContainer.childElementCount) {\n newPosition = tabContainer.childElementCount;\n }\n\n // Make 1 be leftmost position\n newPosition--;\n }\n\n if (newPosition > oldPosition) {\n newPosition++;\n }\n\n tabContainer.insertBefore(tabs[oldPosition], tabs[newPosition]);\n\n return this;\n }\n\n getPosition (fromRight) {\n let position = 0;\n let tab = this.tab;\n while ((tab = tab.previousSibling) != null) position++;\n\n if (fromRight === true) {\n position -= this.tabGroup.tabContainer.childElementCount;\n }\n\n if (position >= 0) {\n position++;\n }\n\n return position;\n }\n\n activate () {\n if (this.isClosed) return;\n let activeTab = this.tabGroup.getActiveTab();\n if (activeTab) {\n activeTab.tab.classList.remove(\"active\");\n activeTab.webview.classList.remove(\"visible\");\n activeTab.emit(\"inactive\", activeTab);\n }\n TabGroupPrivate.setActiveTab.bind(this.tabGroup)(this);\n this.tab.classList.add(\"active\");\n this.webview.classList.add(\"visible\");\n this.webview.focus();\n this.emit(\"active\", this);\n return this;\n }\n\n show (flag) {\n if (this.isClosed) return;\n if (flag !== false) {\n this.tab.classList.add(\"visible\");\n this.emit(\"visible\", this);\n } else {\n this.tab.classList.remove(\"visible\");\n this.emit(\"hidden\", this);\n }\n return this;\n }\n\n hide () {\n return this.show(false);\n }\n\n flash (flag) {\n if (this.isClosed) return;\n if (flag !== false) {\n this.tab.classList.add(\"flash\");\n this.emit(\"flash\", this);\n } else {\n this.tab.classList.remove(\"flash\");\n this.emit(\"unflash\", this);\n }\n return this;\n }\n\n unflash () {\n return this.flash(false);\n }\n\n hasClass (classname) {\n return this.tab.classList.contains(classname);\n }\n\n close (force) {\n const abortController = new AbortController();\n const abort = () => abortController.abort();\n this.emit(\"closing\", this, abort);\n\n const abortSignal = abortController.signal;\n if (this.isClosed || (!this.closable && !force) || abortSignal.aborted) return;\n\n this.isClosed = true;\n let tabGroup = this.tabGroup;\n tabGroup.tabContainer.removeChild(this.tab);\n tabGroup.viewContainer.removeChild(this.webview);\n let activeTab = this.tabGroup.getActiveTab();\n TabGroupPrivate.removeTab.bind(tabGroup)(this, true);\n\n this.emit(\"close\", this);\n\n if (activeTab.id === this.id) {\n TabGroupPrivate.activateRecentTab.bind(tabGroup)();\n }\n }\n}\n\nconst TabPrivate = {\n initTab: function () {\n let tabClass = this.tabGroup.options.tabClass;\n\n // Create tab element\n let tab = this.tab = document.createElement(\"div\");\n tab.classList.add(tabClass);\n for (let el of [\"icon\", \"title\", \"buttons\", \"badge\"]) {\n let span = tab.appendChild(document.createElement(\"span\"));\n span.classList.add(`${tabClass}-${el}`);\n this.tabElements[el] = span;\n }\n\n this.setTitle(this.title);\n this.setBadge(this.badge);\n this.setIcon(this.iconURL, this.icon);\n TabPrivate.initTabButtons.bind(this)();\n TabPrivate.initTabClickHandler.bind(this)();\n\n this.tabGroup.tabContainer.appendChild(this.tab);\n },\n\n initTabButtons: function () {\n let container = this.tabElements.buttons;\n let tabClass = this.tabGroup.options.tabClass;\n if (this.closable) {\n let button = container.appendChild(document.createElement(\"button\"));\n button.classList.add(`${tabClass}-button-close`);\n button.innerHTML = this.tabGroup.options.closeButtonText;\n button.addEventListener(\"click\", this.close.bind(this, false), false);\n }\n },\n\n initTabClickHandler: function () {\n // Mouse up\n const tabClickHandler = function (e) {\n if (this.isClosed) return;\n if (e.which === 2) {\n this.close();\n }\n };\n this.tab.addEventListener(\"mouseup\", tabClickHandler.bind(this), false);\n // Mouse down\n const tabMouseDownHandler = function (e) {\n if (this.isClosed) return;\n if (e.which === 1) {\n if (e.target.matches(\"button\")) return;\n this.activate();\n }\n };\n this.tab.addEventListener(\"mousedown\", tabMouseDownHandler.bind(this), false);\n },\n\n initWebview: function () {\n const webview = this.webview = document.createElement(\"webview\");\n\n const tabWebviewDidFinishLoadHandler = function (e) {\n this.emit(\"webview-ready\", this);\n };\n\n this.webview.addEventListener(\"did-finish-load\", tabWebviewDidFinishLoadHandler.bind(this), false);\n\n const tabWebviewDomReadyHandler = function (e) {\n // Remove this once https://github.com/electron/electron/issues/14474 is fixed\n webview.blur();\n webview.focus();\n this.emit(\"webview-dom-ready\", this);\n };\n\n this.webview.addEventListener(\"dom-ready\", tabWebviewDomReadyHandler.bind(this), false);\n\n this.webview.classList.add(this.tabGroup.options.viewClass);\n if (this.webviewAttributes) {\n let attrs = this.webviewAttributes;\n for (let key in attrs) {\n const attr = attrs[key];\n if (attr === false) continue;\n this.webview.setAttribute(key, attr);\n }\n }\n\n this.tabGroup.viewContainer.appendChild(this.webview);\n }\n};\n\n/**\n * This makes the browser EventTarget API work similar to EventEmitter\n */\nconst eventEmitterMixin = {\n emit (type, ...args) {\n this.dispatchEvent(new CustomEvent(type, { detail: args }));\n },\n\n on (type, fn) {\n this.addEventListener(type, ({ detail }) => fn.apply(this, detail));\n },\n\n once (type, fn) {\n this.addEventListener(type, ({ detail }) => fn.apply(this, detail), { once: true });\n }\n};\n\nObject.assign(TabGroup.prototype, eventEmitterMixin);\nObject.assign(Tab.prototype, eventEmitterMixin);\n\ncustomElements.define(\"tab-group\", TabGroup);\n","/* TODO: use custom properties */\n\nwebview {\n position: absolute;\n visibility: hidden;\n width: 100%;\n height: 100%;\n}\n\nwebview.visible {\n visibility: visible;\n}\n\n.etabs {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n text-rendering: optimizeLegibility;\n font-feature-settings: 'liga', 'clig', 'kern';\n}\n\n.etabs-tabgroup {\n width: 100%;\n height: 32px;\n cursor: default;\n font: caption;\n font-size: 14px;\n -webkit-user-select: none;\n user-select: none;\n display: none;\n background: #E7EAED;\n box-shadow: inset 0 -1px #DADCE0;\n border-top: 1px solid #DADCE0;\n}\n\n.etabs-tabgroup.visible {\n display: flex;\n}\n\n.etabs-tabs {\n height: 100%;\n}\n\n.etabs-tab {\n display: none;\n position: relative;\n height: 100%;\n background: #E7EAED;\n color: #696A6C;\n padding: 5px 9px;\n transition: background-color 150ms ease-out;\n box-shadow: inset 0 -1px #DADCE0;\n font: caption;\n font-size: 13px;\n cursor: pointer;\n box-sizing: border-box;\n}\n\n/* Dragula */\n.etabs-tab.gu-mirror {\n padding-bottom: 0;\n cursor: grab;\n\tborder: none;\n}\n\n.etabs-tab:first-child {\n border-left: none;\n}\n\n.etabs-tab.visible {\n display: inline-block;\n}\n\n.etabs-tab.active {\n background: #fff;\n box-shadow: none;\n\tborder-left: 1px solid #DADCE0;\n\tborder-right: 1px solid #DADCE0;\n\tpadding-left: 8px;\n\tpadding-right: 8px;\n}\n\n.etabs-tab.flash {\n background: linear-gradient(to bottom, rgba(255,243,170,1) 0%,rgba(255,227,37,1) 100%);\n}\n\n.etabs-tab.visible:not(.active)+.etabs-tab.visible:not(.active) {\n\tborder-left: 1px solid #B4B6B8;\n\tpadding-left: 8px;\n}\n\n.etabs-tab:not(.active):hover {\n\tbackground: #F1F3F4;\n}\n\n.etabs-buttons {\n border-left: 1px solid #B4B6B8;\n}\n\n.etabs-buttons button {\n display: block;\n color: #777;\n background: none;\n border: none;\n font-size: 16px;\n font-family: inherit;\n margin-top: 5px;\n border-radius: 50%;\n margin-left: 4px;\n width: 20px;\n height: 20px;\n text-align: center;\n line-height: 14px;\n padding: 1px 0 0 0;\n\tcursor: pointer;\n}\n\n.etabs-buttons button:hover {\n color: #333;\n background-color: #bbb;\n}\n\n.etabs-tab-badge {\n position: absolute;\n right: 0;\n top: -7px;\n background: red;\n border-radius: 100%;\n text-align: center;\n font-size: 10px;\n padding: 0 5px;\n}\n\n.etabs-tab-badge.hidden {\n display: none;\n}\n\n.etabs-tab-icon {\n display: inline-block;\n height: 16px;\n}\n\n.etabs-tab-icon img {\n max-width: 16px;\n max-height: 16px;\n}\n\n.etabs-tab-title {\n display: inline-block;\n margin-left: 10px;\n}\n\n.etabs-tab-buttons {\n display: inline-block;\n margin-left: 10px;\n}\n\n.etabs-tab-buttons button {\n display: inline-block;\n color: #777;\n background: none;\n border: none;\n width: 20px;\n height: 20px;\n text-align: center;\n border-radius: 50%;\n cursor: pointer;\n padding: 1px 0 0 0;\n font-size: 16px;\n}\n\n.etabs-tab-buttons button:hover {\n color: #333;\n background-color: #bbb;\n}\n\n.etabs-views {\n position: relative;\n height: calc(100vh - 33px);\n}\n\n.etab-view {\n position: relative;\n}\n"],"names":[],"version":3,"file":"electron-tabs.js.map","sourceRoot":"../"} \ No newline at end of file +{"mappings":"ACAA,IAAA,wCAAkvG,GAAnuG,muGAAmuG;;ADAlvG;AAEA,IAAI,CAAC,QAAQ,EACX,MAAM,KAAK,CAAC,yDAAyD,CAAC,CAAC;AAGzE,MAAM,8BAAQ,SAAS,WAAW;IAChC,aAAe;QACb,KAAK,EAAE,CAAC;QAER,UAAU;QACV,IAAI,CAAC,OAAO,GAAG;YACb,eAAe,EAAE,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,IAAI,QAAQ;YACnE,gBAAgB,EAAE,IAAI,CAAC,YAAY,CAAC,qBAAqB,CAAC,IAAI,UAAU;YACxE,mBAAmB,EAAE,IAAI,CAAC,YAAY,CAAC,sBAAsB,CAAC,IAAI,CAAC;YACn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C,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC;QAAA,EAAE;YAAE,IAAI,EAAE,IAAI;SAAE,CAAC,CAAC;KACrF;CACF,AAAC;AAEF,MAAM,CAAC,MAAM,CAAC,8BAAQ,CAAC,SAAS,EAAE,uCAAiB,CAAC,CAAC;AACrD,MAAM,CAAC,MAAM,CAAC,yBAAG,CAAC,SAAS,EAAE,uCAAiB,CAAC,CAAC;AAEhD,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,8BAAQ,CAAC,CAAC","sources":["src/index.js","src/style.css"],"sourcesContent":["import styles from \"./style.css\";\n\nif (!document) {\n throw Error(\"electron-tabs module must be called in renderer process\");\n}\n\nclass TabGroup extends HTMLElement {\n constructor () {\n super();\n\n // Options\n this.options = {\n closeButtonText: this.getAttribute(\"close-button-text\") || \"×\",\n newTabButtonText: this.getAttribute(\"new-tab-button-text\") || \"+\",\n visibilityThreshold: this.getAttribute(\"visibility-threshold\") || 0,\n tabClass: this.getAttribute(\"tab-class\") || \"etabs-tab\",\n viewClass: this.getAttribute(\"view-class\") || \"etabs-view\",\n newTabButton: this.getAttribute(\"new-tab-button\") || false,\n defaultTab: { title: \"New Tab\", active: true },\n draggable: this.getAttribute(\"draggable\") || false\n // TODO: replace this callback\n // ready: args.ready\n };\n\n // Create custom element\n const shadow = this.attachShadow({mode: \"open\"});\n\n const wrapper = document.createElement(\"div\");\n wrapper.setAttribute(\"class\", \"etabs\");\n\n const tabgroup = document.createElement(\"div\");\n tabgroup.setAttribute(\"class\", \"etabs-tabgroup\");\n wrapper.appendChild(tabgroup);\n\n const tabContainer = document.createElement(\"div\");\n tabContainer.setAttribute(\"class\", \"etabs-tabs\");\n tabgroup.appendChild(tabContainer);\n this.tabContainer = tabContainer;\n\n const buttonContainer = document.createElement(\"div\");\n buttonContainer.setAttribute(\"class\", \"etabs-buttons\");\n tabgroup.appendChild(buttonContainer);\n this.buttonContainer = buttonContainer;\n\n const viewContainer = document.createElement(\"div\");\n viewContainer.setAttribute(\"class\", \"etabs-views\");\n wrapper.appendChild(viewContainer);\n this.viewContainer = viewContainer;\n\n const style = document.createElement(\"style\");\n style.textContent = styles;\n\n shadow.appendChild(style);\n shadow.appendChild(wrapper);\n\n this.tabs = [];\n this.newTabId = 0;\n TabGroupPrivate.initNewTabButton.bind(this)();\n TabGroupPrivate.initVisibility.bind(this)();\n\n // Init draggable tabs\n if (this.options.draggable) {\n const initSortable = () => {\n const options = Object.assign({\n direction: \"horizontal\",\n animation: 150,\n swapThreshold: 0.20\n }, this.options.draggableOptions);\n new window.Sortable(this.tabContainer, options);\n };\n\n if (window.Sortable) {\n initSortable();\n } else {\n document.addEventListener(\"DOMContentLoaded\", initSortable);\n }\n }\n }\n\n setDefaultTab (tab) {\n this.options.defaultTab = tab;\n }\n\n addTab (args = this.options.defaultTab) {\n if (typeof args === \"function\") {\n args = args(this);\n }\n let id = this.newTabId;\n this.newTabId++;\n let tab = new Tab(this, id, args);\n this.tabs.push(tab);\n // Don't call tab.activate() before a tab is referenced in this.tabs\n if (args.active === true) {\n tab.activate();\n }\n this.emit(\"tab-added\", tab, this);\n return tab;\n }\n\n getTab (id) {\n for (let i in this.tabs) {\n if (this.tabs[i].id === id) {\n return this.tabs[i];\n }\n }\n return null;\n }\n\n getTabByPosition (position) {\n let fromRight = position < 0;\n for (let i in this.tabs) {\n if (this.tabs[i].getPosition(fromRight) === position) {\n return this.tabs[i];\n }\n }\n return null;\n }\n\n getTabByRelPosition (position) {\n position = this.getActiveTab().getPosition() + position;\n if (position <= 0) {\n return null;\n }\n return this.getTabByPosition(position);\n }\n\n getNextTab () {\n return this.getTabByRelPosition(1);\n }\n\n getPreviousTab () {\n return this.getTabByRelPosition(-1);\n }\n\n getTabs () {\n return this.tabs.slice();\n }\n\n eachTab (fn) {\n this.getTabs().forEach(fn);\n return this;\n }\n\n getActiveTab () {\n if (this.tabs.length === 0) return null;\n return this.tabs[0];\n }\n}\n\nconst TabGroupPrivate = {\n initNewTabButton: function () {\n if (!this.options.newTabButton) return;\n let button = this.buttonContainer.appendChild(document.createElement(\"button\"));\n button.classList.add(`${this.options.tabClass}-button-new`);\n button.innerHTML = this.options.newTabButtonText;\n button.addEventListener(\"click\", this.addTab.bind(this, undefined), false);\n },\n\n initVisibility: function () {\n function toggleTabsVisibility(tab, tabGroup) {\n var visibilityThreshold = this.options.visibilityThreshold;\n var el = tabGroup.tabContainer.parentNode;\n if (this.tabs.length >= visibilityThreshold) {\n el.classList.add(\"visible\");\n } else {\n el.classList.remove(\"visible\");\n }\n }\n\n this.on(\"tab-added\", toggleTabsVisibility);\n this.on(\"tab-removed\", toggleTabsVisibility);\n },\n\n removeTab: function (tab, triggerEvent) {\n let id = tab.id;\n for (let i in this.tabs) {\n if (this.tabs[i].id === id) {\n this.tabs.splice(i, 1);\n break;\n }\n }\n if (triggerEvent) {\n this.emit(\"tab-removed\", tab, this);\n }\n return this;\n },\n\n setActiveTab: function (tab) {\n TabGroupPrivate.removeTab.bind(this)(tab);\n this.tabs.unshift(tab);\n this.emit(\"tab-active\", tab, this);\n return this;\n },\n\n activateRecentTab: function (tab) {\n if (this.tabs.length > 0) {\n this.tabs[0].activate();\n }\n return this;\n }\n};\n\nclass Tab extends EventTarget {\n constructor (tabGroup, id, args) {\n super();\n this.tabGroup = tabGroup;\n this.id = id;\n this.title = args.title;\n this.badge = args.badge;\n this.iconURL = args.iconURL;\n this.icon = args.icon;\n this.closable = args.closable === false ? false : true;\n this.webviewAttributes = args.webviewAttributes || {};\n this.webviewAttributes.src = args.src;\n this.tabElements = {};\n TabPrivate.initTab.bind(this)();\n TabPrivate.initWebview.bind(this)();\n if (args.visible !== false) {\n this.show();\n }\n if (typeof args.ready === \"function\") {\n args.ready(this);\n }\n }\n\n setTitle (title) {\n if (this.isClosed) return;\n let span = this.tabElements.title;\n span.innerHTML = title;\n span.title = title;\n this.title = title;\n this.emit(\"title-changed\", title, this);\n return this;\n }\n\n getTitle () {\n if (this.isClosed) return;\n return this.title;\n }\n\n setBadge (badge) {\n if (this.isClosed) return;\n let span = this.tabElements.badge;\n this.badge = badge;\n\n if (badge) {\n span.innerHTML = badge;\n span.classList.remove(\"hidden\");\n } else {\n span.classList.add(\"hidden\");\n }\n\n this.emit(\"badge-changed\", badge, this);\n }\n\n getBadge () {\n if (this.isClosed) return;\n return this.badge;\n }\n\n setIcon (iconURL, icon) {\n if (this.isClosed) return;\n this.iconURL = iconURL;\n this.icon = icon;\n let span = this.tabElements.icon;\n if (iconURL) {\n span.innerHTML = ``;\n this.emit(\"icon-changed\", iconURL, this);\n } else if (icon) {\n span.innerHTML = ``;\n this.emit(\"icon-changed\", icon, this);\n }\n\n return this;\n }\n\n getIcon () {\n if (this.isClosed) return;\n if (this.iconURL) return this.iconURL;\n return this.icon;\n }\n\n setPosition (newPosition) {\n let tabContainer = this.tabGroup.tabContainer;\n let tabs = tabContainer.children;\n let oldPosition = this.getPosition() - 1;\n\n if (newPosition < 0) {\n newPosition += tabContainer.childElementCount;\n\n if (newPosition < 0) {\n newPosition = 0;\n }\n } else {\n if (newPosition > tabContainer.childElementCount) {\n newPosition = tabContainer.childElementCount;\n }\n\n // Make 1 be leftmost position\n newPosition--;\n }\n\n if (newPosition > oldPosition) {\n newPosition++;\n }\n\n tabContainer.insertBefore(tabs[oldPosition], tabs[newPosition]);\n\n return this;\n }\n\n getPosition (fromRight) {\n let position = 0;\n let tab = this.tab;\n while ((tab = tab.previousSibling) != null) position++;\n\n if (fromRight === true) {\n position -= this.tabGroup.tabContainer.childElementCount;\n }\n\n if (position >= 0) {\n position++;\n }\n\n return position;\n }\n\n activate () {\n if (this.isClosed) return;\n let activeTab = this.tabGroup.getActiveTab();\n if (activeTab) {\n activeTab.tab.classList.remove(\"active\");\n activeTab.webview.classList.remove(\"visible\");\n activeTab.emit(\"inactive\", activeTab);\n }\n TabGroupPrivate.setActiveTab.bind(this.tabGroup)(this);\n this.tab.classList.add(\"active\");\n this.webview.classList.add(\"visible\");\n this.webview.focus();\n this.emit(\"active\", this);\n return this;\n }\n\n show (flag) {\n if (this.isClosed) return;\n if (flag !== false) {\n this.tab.classList.add(\"visible\");\n this.emit(\"visible\", this);\n } else {\n this.tab.classList.remove(\"visible\");\n this.emit(\"hidden\", this);\n }\n return this;\n }\n\n hide () {\n return this.show(false);\n }\n\n flash (flag) {\n if (this.isClosed) return;\n if (flag !== false) {\n this.tab.classList.add(\"flash\");\n this.emit(\"flash\", this);\n } else {\n this.tab.classList.remove(\"flash\");\n this.emit(\"unflash\", this);\n }\n return this;\n }\n\n unflash () {\n return this.flash(false);\n }\n\n hasClass (classname) {\n return this.tab.classList.contains(classname);\n }\n\n close (force) {\n const abortController = new AbortController();\n const abort = () => abortController.abort();\n this.emit(\"closing\", this, abort);\n\n const abortSignal = abortController.signal;\n if (this.isClosed || (!this.closable && !force) || abortSignal.aborted) return;\n\n this.isClosed = true;\n let tabGroup = this.tabGroup;\n tabGroup.tabContainer.removeChild(this.tab);\n tabGroup.viewContainer.removeChild(this.webview);\n let activeTab = this.tabGroup.getActiveTab();\n TabGroupPrivate.removeTab.bind(tabGroup)(this, true);\n\n this.emit(\"close\", this);\n\n if (activeTab.id === this.id) {\n TabGroupPrivate.activateRecentTab.bind(tabGroup)();\n }\n }\n}\n\nconst TabPrivate = {\n initTab: function () {\n let tabClass = this.tabGroup.options.tabClass;\n\n // Create tab element\n let tab = this.tab = document.createElement(\"div\");\n tab.classList.add(tabClass);\n for (let el of [\"icon\", \"title\", \"buttons\", \"badge\"]) {\n let span = tab.appendChild(document.createElement(\"span\"));\n span.classList.add(`${tabClass}-${el}`);\n this.tabElements[el] = span;\n }\n\n this.setTitle(this.title);\n this.setBadge(this.badge);\n this.setIcon(this.iconURL, this.icon);\n TabPrivate.initTabButtons.bind(this)();\n TabPrivate.initTabClickHandler.bind(this)();\n\n this.tabGroup.tabContainer.appendChild(this.tab);\n },\n\n initTabButtons: function () {\n let container = this.tabElements.buttons;\n let tabClass = this.tabGroup.options.tabClass;\n if (this.closable) {\n let button = container.appendChild(document.createElement(\"button\"));\n button.classList.add(`${tabClass}-button-close`);\n button.innerHTML = this.tabGroup.options.closeButtonText;\n button.addEventListener(\"click\", this.close.bind(this, false), false);\n }\n },\n\n initTabClickHandler: function () {\n // Mouse up\n const tabClickHandler = function (e) {\n if (this.isClosed) return;\n if (e.which === 2) {\n this.close();\n }\n };\n this.tab.addEventListener(\"mouseup\", tabClickHandler.bind(this), false);\n // Mouse down\n const tabMouseDownHandler = function (e) {\n if (this.isClosed) return;\n if (e.which === 1) {\n if (e.target.matches(\"button\")) return;\n this.activate();\n }\n };\n this.tab.addEventListener(\"mousedown\", tabMouseDownHandler.bind(this), false);\n },\n\n initWebview: function () {\n const webview = this.webview = document.createElement(\"webview\");\n\n const tabWebviewDidFinishLoadHandler = function (e) {\n this.emit(\"webview-ready\", this);\n };\n\n this.webview.addEventListener(\"did-finish-load\", tabWebviewDidFinishLoadHandler.bind(this), false);\n\n const tabWebviewDomReadyHandler = function (e) {\n // Remove this once https://github.com/electron/electron/issues/14474 is fixed\n webview.blur();\n webview.focus();\n this.emit(\"webview-dom-ready\", this);\n };\n\n this.webview.addEventListener(\"dom-ready\", tabWebviewDomReadyHandler.bind(this), false);\n\n this.webview.classList.add(this.tabGroup.options.viewClass);\n if (this.webviewAttributes) {\n let attrs = this.webviewAttributes;\n for (let key in attrs) {\n const attr = attrs[key];\n if (attr === false) continue;\n this.webview.setAttribute(key, attr);\n }\n }\n\n this.tabGroup.viewContainer.appendChild(this.webview);\n }\n};\n\n/**\n * This makes the browser EventTarget API work similar to EventEmitter\n */\nconst eventEmitterMixin = {\n emit (type, ...args) {\n this.dispatchEvent(new CustomEvent(type, { detail: args }));\n },\n\n on (type, fn) {\n this.addEventListener(type, ({ detail }) => fn.apply(this, detail));\n },\n\n once (type, fn) {\n this.addEventListener(type, ({ detail }) => fn.apply(this, detail), { once: true });\n }\n};\n\nObject.assign(TabGroup.prototype, eventEmitterMixin);\nObject.assign(Tab.prototype, eventEmitterMixin);\n\ncustomElements.define(\"tab-group\", TabGroup);\n","/* TODO: use custom properties */\n\nwebview {\n position: absolute;\n visibility: hidden;\n width: 100%;\n height: 100%;\n}\n\nwebview.visible {\n visibility: visible;\n}\n\n.etabs {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n text-rendering: optimizeLegibility;\n font-feature-settings: 'liga', 'clig', 'kern';\n}\n\n.etabs-tabgroup {\n width: 100%;\n height: 32px;\n cursor: default;\n font: caption;\n font-size: 14px;\n -webkit-user-select: none;\n user-select: none;\n display: none;\n background: #E7EAED;\n box-shadow: inset 0 -1px #DADCE0;\n border-top: 1px solid #DADCE0;\n}\n\n.etabs-tabgroup.visible {\n display: flex;\n}\n\n.etabs-tabs {\n height: 100%;\n}\n\n.etabs-tab {\n display: none;\n position: relative;\n height: 100%;\n background: #E7EAED;\n color: #696A6C;\n padding: 5px 9px;\n transition: background-color 150ms ease-out;\n box-shadow: inset 0 -1px #DADCE0;\n font: caption;\n font-size: 13px;\n cursor: pointer;\n box-sizing: border-box;\n}\n\n/* Dragula */\n.etabs-tab.gu-mirror {\n padding-bottom: 0;\n cursor: grab;\n\tborder: none;\n}\n\n.etabs-tab:first-child {\n border-left: none;\n}\n\n.etabs-tab.visible {\n display: inline-block;\n}\n\n.etabs-tab.active {\n background: #fff;\n box-shadow: none;\n\tborder-left: 1px solid #DADCE0;\n\tborder-right: 1px solid #DADCE0;\n\tpadding-left: 8px;\n\tpadding-right: 8px;\n}\n\n.etabs-tab.flash {\n background: linear-gradient(to bottom, rgba(255,243,170,1) 0%,rgba(255,227,37,1) 100%);\n}\n\n.etabs-tab.visible:not(.active)+.etabs-tab.visible:not(.active) {\n\tborder-left: 1px solid #B4B6B8;\n\tpadding-left: 8px;\n}\n\n.etabs-tab:not(.active):hover {\n\tbackground: #F1F3F4;\n}\n\n.etabs-buttons {\n border-left: 1px solid #B4B6B8;\n}\n\n.etabs-buttons button {\n display: block;\n color: #777;\n background: none;\n border: none;\n font-size: 16px;\n font-family: inherit;\n margin-top: 5px;\n border-radius: 50%;\n margin-left: 4px;\n width: 20px;\n height: 20px;\n text-align: center;\n line-height: 14px;\n padding: 1px 0 0 0;\n\tcursor: pointer;\n}\n\n.etabs-buttons button:hover {\n color: #333;\n background-color: #bbb;\n}\n\n.etabs-tab-badge {\n position: absolute;\n right: 0;\n top: -7px;\n background: red;\n border-radius: 100%;\n text-align: center;\n font-size: 10px;\n padding: 0 5px;\n}\n\n.etabs-tab-badge.hidden {\n display: none;\n}\n\n.etabs-tab-icon {\n display: inline-block;\n height: 16px;\n}\n\n.etabs-tab-icon img {\n max-width: 16px;\n max-height: 16px;\n}\n\n.etabs-tab-title {\n display: inline-block;\n margin-left: 10px;\n}\n\n.etabs-tab-buttons {\n display: inline-block;\n margin-left: 10px;\n}\n\n.etabs-tab-buttons button {\n display: inline-block;\n color: #777;\n background: none;\n border: none;\n width: 20px;\n height: 20px;\n text-align: center;\n border-radius: 50%;\n cursor: pointer;\n padding: 1px 0 0 0;\n font-size: 16px;\n}\n\n.etabs-tab-buttons button:hover {\n color: #333;\n background-color: #bbb;\n}\n\n.etabs-views {\n position: relative;\n height: calc(100vh - 33px);\n}\n\n.etab-view {\n position: relative;\n}\n"],"names":[],"version":3,"file":"electron-tabs.js.map","sourceRoot":"../"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b7d86df..973f1ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1057,12 +1057,6 @@ "color-convert": "^2.0.1" } }, - "atoa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/atoa/-/atoa-1.0.0.tgz", - "integrity": "sha512-VVE1H6cc4ai+ZXo/CRWoJiHXrA1qfA31DPnx6D20+kSI547hQN5Greh51LQ1baMRMfxO5K5M4ImMtZbZt2DODQ==", - "dev": true - }, "base-x": { "version": "3.0.9", "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", @@ -1247,16 +1241,6 @@ "proto-list": "~1.2.1" } }, - "contra": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/contra/-/contra-1.9.4.tgz", - "integrity": "sha1-9TveQtfltZhcrk2ZqNYQUm3o8o0=", - "dev": true, - "requires": { - "atoa": "1.0.0", - "ticky": "1.0.1" - } - }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -1276,15 +1260,6 @@ "yaml": "^1.10.0" } }, - "crossvent": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/crossvent/-/crossvent-1.5.5.tgz", - "integrity": "sha1-rSCHjkkh6b5z2daXb4suzQ9xoLE=", - "dev": true, - "requires": { - "custom-event": "^1.0.0" - } - }, "css-declaration-sorter": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.2.2.tgz", @@ -1389,12 +1364,6 @@ "css-tree": "^1.1.2" } }, - "custom-event": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", - "dev": true - }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -1499,16 +1468,6 @@ "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==", "dev": true }, - "dragula": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/dragula/-/dragula-3.7.3.tgz", - "integrity": "sha512-/rRg4zRhcpf81TyDhaHLtXt6sEywdfpv1cRUMeFFy7DuypH2U0WUL0GTdyAQvXegviT4PJK4KuMmOaIDpICseQ==", - "dev": true, - "requires": { - "contra": "1.9.4", - "crossvent": "1.5.5" - } - }, "duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", @@ -2626,6 +2585,12 @@ "type-fest": "^0.13.1" } }, + "sortablejs": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.0.tgz", + "integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -2748,12 +2713,6 @@ } } }, - "ticky": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ticky/-/ticky-1.0.1.tgz", - "integrity": "sha1-t8+nHnaPHJAAxJe5FRswlHxQ5G0=", - "dev": true - }, "timsort": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", diff --git a/package.json b/package.json index 5d8a70a..3abf0b2 100644 --- a/package.json +++ b/package.json @@ -31,10 +31,10 @@ "license": "MIT", "devDependencies": { "cssnano": "^5.1.9", - "dragula": "^3.7.3", "electron": "^17.1.2", "parcel": "^2.5.0", "parcel-transformer-css-to-string": "^0.9.1", - "postcss": "^8.4.14" + "postcss": "^8.4.14", + "sortablejs": "^1.15.0" } } diff --git a/src/draggable.js b/src/draggable.js index e3b485a..a874ffd 100644 --- a/src/draggable.js +++ b/src/draggable.js @@ -1,12 +1,4 @@ -import dragula from "dragula"; +import Sortable from "sortablejs"; import "./index.js"; -import styles from "dragula/dist/dragula.css"; -window.dragula = dragula; - -// Inject styles -(function () { - let styleTag = document.createElement("style"); - styleTag.innerHTML = styles; - document.getElementsByTagName("head")[0].appendChild(styleTag); -})(); +window.Sortable = Sortable; diff --git a/src/index.js b/src/index.js index 68306ae..bb5e997 100644 --- a/src/index.js +++ b/src/index.js @@ -60,19 +60,19 @@ class TabGroup extends HTMLElement { // Init draggable tabs if (this.options.draggable) { - const initDragula = () => { - // FIXME: dragula doesnt support shadow dom :-( - console.log(this.tabContainer); - const d =window.dragula([this.tabContainer], { - direction: "horizontal" - }); - console.log(d); + const initSortable = () => { + const options = Object.assign({ + direction: "horizontal", + animation: 150, + swapThreshold: 0.20 + }, this.options.draggableOptions); + new window.Sortable(this.tabContainer, options); }; - if (window.dragula) { - initDragula(); + if (window.Sortable) { + initSortable(); } else { - document.addEventListener("DOMContentLoaded", initDragula); + document.addEventListener("DOMContentLoaded", initSortable); } } }