text: /*! For license information please see rebase.js.LICENSE.txt */
  (()=>{"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function n(){return n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},n.apply(this,arguments)}function o(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{},r=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(o).filter((function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable})))),r.forEach((function(n){e(t,n,o[n])}))}return t}function r(t,e){if(null==t)return{};var n,o,r=function(t,e){if(null==t)return{};var n,o,r={},i=Object.keys(t);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function i(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var a=i(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),l=i(/Edge/i),s=i(/firefox/i),c=i(/safari/i)&&!i(/chrome/i)&&!i(/android/i),d=i(/iP(ad|od|hone)/i),u=i(/chrome/i)&&i(/android/i),h={capture:!1,passive:!1};function f(t,e,n){t.addEventListener(e,n,!a&&h)}function p(t,e,n){t.removeEventListener(e,n,!a&&h)}function g(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function m(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function v(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&g(t,e):g(t,e))||o&&t===n)return t;if(t===n)break}while(t=m(t))}return null}var b,y=/\s+/g;function w(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(y," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(y," ")}}function E(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function S(t,e){var n="";if("string"==typeof t)n=t;else do{var o=E(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function C(t,e,n){if(t){var o=t.getElementsByTagName(e),r=0,i=o.length;if(n)for(;r<i;r++)n(o[r],r);return o}return[]}function D(){return document.scrollingElement||document.documentElement}function _(t,e,n,o,r){if(t.getBoundingClientRect||t===window){var i,l,s,c,d,u,h;if(t!==window&&t.parentNode&&t!==D()?(l=(i=t.getBoundingClientRect()).top,s=i.left,c=i.bottom,d=i.right,u=i.height,h=i.width):(l=0,s=0,c=window.innerHeight,d=window.innerWidth,u=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(r=r||t.parentNode,!a))do{if(r&&r.getBoundingClientRect&&("none"!==E(r,"transform")||n&&"static"!==E(r,"position"))){var f=r.getBoundingClientRect();l-=f.top+parseInt(E(r,"border-top-width")),s-=f.left+parseInt(E(r,"border-left-width")),c=l+i.height,d=s+i.width;break}}while(r=r.parentNode);if(o&&t!==window){var p=S(r||t),g=p&&p.a,m=p&&p.d;p&&(c=(l/=m)+(u/=m),d=(s/=g)+(h/=g))}return{top:l,left:s,bottom:c,right:d,width:h,height:u}}}function P(t,e,n){for(var o=A(t,!0),r=_(t)[e];o;){var i=_(o)[n];if(!("top"===n||"left"===n?r>=i:r<=i))return o;if(o===D())break;o=A(o,!1)}return!1}function k(t,e,n){for(var o=0,r=0,i=t.children;r<i.length;){if("none"!==i[r].style.display&&i[r]!==Mt.ghost&&i[r]!==Mt.dragged&&v(i[r],n.draggable,t,!1)){if(o===e)return i[r];o++}r++}return null}function T(t,e){for(var n=t.lastElementChild;n&&(n===Mt.ghost||"none"===E(n,"display")||e&&!g(n,e));)n=n.previousElementSibling;return n||null}function x(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Mt.clone||e&&!g(t,e)||n++;return n}function I(t){var e=0,n=0,o=D();if(t)do{var r=S(t),i=r.a,a=r.d;e+=t.scrollLeft*i,n+=t.scrollTop*a}while(t!==o&&(t=t.parentNode));return[e,n]}function A(t,e){if(!t||!t.getBoundingClientRect)return D();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=E(n);if(n.clientWidth<n.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!n.getBoundingClientRect||n===document.body)return D();if(o||e)return n;o=!0}}}while(n=n.parentNode);return D()}function M(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function N(t,e){return function(){if(!b){var n=arguments,o=this;1===n.length?t.call(o,n[0]):t.apply(o,n),b=setTimeout((function(){b=void 0}),e)}}}function O(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function L(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}var R="Sortable"+(new Date).getTime();var X=[],Y={initializeByDefault:!0},B={mount:function(t){for(var e in Y)Y.hasOwnProperty(e)&&!(e in t)&&(t[e]=Y[e]);X.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),X.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=t+"Global";X.forEach((function(r){e[r.pluginName]&&(e[r.pluginName][i]&&e[r.pluginName][i](o({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](o({sortable:e},n)))}))},initializePlugins:function(t,e,o,r){for(var i in X.forEach((function(r){var i=r.pluginName;if(t.options[i]||r.initializeByDefault){var a=new r(t,e,t.options);a.sortable=t,a.options=t.options,t[i]=a,n(o,a.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var a=this.modifyOption(t,i,t.options[i]);void 0!==a&&(t.options[i]=a)}},getEventProperties:function(t,e){var o={};return X.forEach((function(r){"function"==typeof r.eventProperties&&n(o,r.eventProperties.call(e[r.pluginName],t))})),o},modifyOption:function(t,e,n){var o;return X.forEach((function(r){t[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[e]&&(o=r.optionListeners[e].call(t[r.pluginName],n))})),o}};var F=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.evt,a=r(n,["evt"]);B.pluginEvent.bind(Mt)(t,e,o({dragEl:q,parentEl:H,ghostEl:z,rootEl:V,nextEl:W,lastDownEl:K,cloneEl:j,cloneHidden:U,dragStarted:st,putSortable:et,activeSortable:Mt.active,originalEvent:i,oldIndex:G,oldDraggableIndex:Z,newIndex:J,newDraggableIndex:Q,hideGhostForTarget:Tt,unhideGhostForTarget:xt,cloneNowHidden:function(){U=!0},cloneNowShown:function(){U=!1},dispatchSortableEvent:function(t){$({sortable:e,name:t,originalEvent:i})}},a))};function $(t){!function(t){var e=t.sortable,n=t.rootEl,r=t.name,i=t.targetEl,s=t.cloneEl,c=t.toEl,d=t.fromEl,u=t.oldIndex,h=t.newIndex,f=t.oldDraggableIndex,p=t.newDraggableIndex,g=t.originalEvent,m=t.putSortable,v=t.extraEventProperties;if(e=e||n&&n[R]){var b,y=e.options,w="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||a||l?(b=document.createEvent("Event")).initEvent(r,!0,!0):b=new CustomEvent(r,{bubbles:!0,cancelable:!0}),b.to=c||n,b.from=d||n,b.item=i||n,b.clone=s,b.oldIndex=u,b.newIndex=h,b.oldDraggableIndex=f,b.newDraggableIndex=p,b.originalEvent=g,b.pullMode=m?m.lastPutMode:void 0;var E=o({},v,B.getEventProperties(r,e));for(var S in E)b[S]=E[S];n&&n.dispatchEvent(b),y[w]&&y[w].call(e,b)}}(o({putSortable:et,cloneEl:j,targetEl:q,rootEl:V,oldIndex:G,oldDraggableIndex:Z,newIndex:J,newDraggableIndex:Q},t))}var q,H,z,V,W,K,j,U,G,J,Z,Q,tt,et,nt,ot,rt,it,at,lt,st,ct,dt,ut,ht,ft=!1,pt=!1,gt=[],mt=!1,vt=!1,bt=[],yt=!1,wt=[],Et="undefined"!=typeof document,St=d,Ct=l||a?"cssFloat":"float",Dt=Et&&!u&&!d&&"draggable"in document.createElement("div"),_t=function(){if(Et){if(a)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Pt=function(t,e){var n=E(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=k(t,0,e),i=k(t,1,e),a=r&&E(r),l=i&&E(i),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+_(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+_(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&"none"!==a.float){var d="left"===a.float?"left":"right";return!i||"both"!==l.clear&&l.clear!==d?"horizontal":"vertical"}return r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[Ct]||i&&"none"===n[Ct]&&s+c>o)?"vertical":"horizontal"},kt=function(e){function n(t,e){return function(o,r,i,a){var l=o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name;if(null==t&&(e||l))return!0;if(null==t||!1===t)return!1;if(e&&"clone"===t)return t;if("function"==typeof t)return n(t(o,r,i,a),e)(o,r,i,a);var s=(e?o:r).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var o={},r=e.group;r&&"object"==t(r)||(r={name:r}),o.name=r.name,o.checkPull=n(r.pull,!0),o.checkPut=n(r.put),o.revertClone=r.revertClone,e.group=o},Tt=function(){!_t&&z&&E(z,"display","none")},xt=function(){!_t&&z&&E(z,"display","")};Et&&document.addEventListener("click",(function(t){if(pt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),pt=!1,!1}),!0);var It=function(t){if(q){t=t.touches?t.touches[0]:t;var e=(r=t.clientX,i=t.clientY,gt.some((function(t){if(!T(t)){var e=_(t),n=t[R].options.emptyInsertThreshold,o=r>=e.left-n&&r<=e.right+n,l=i>=e.top-n&&i<=e.bottom+n;return n&&o&&l?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[R]._onDragOver(n)}}var r,i,a},At=function(t){q&&q.parentNode[R]._isOutsideThisEl(t.target)};function Mt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=n({},e),t[R]=this;var r,i,a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Pt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Mt.supportPointer&&"PointerEvent"in window&&!c,emptyInsertThreshold:5};for(var l in B.initializePlugins(this,t,a),a)!(l in e)&&(e[l]=a[l]);for(var s in kt(e),this)"_"===s.charAt(0)&&"function"==typeof this[s]&&(this[s]=this[s].bind(this));this.nativeDraggable=!e.forceFallback&&Dt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?f(t,"pointerdown",this._onTapStart):(f(t,"mousedown",this._onTapStart),f(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(f(t,"dragover",this),f(t,"dragenter",this)),gt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),n(this,(i=[],{captureAnimationState:function(){i=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==E(t,"display")&&t!==Mt.ghost){i.push({target:t,rect:_(t)});var e=o({},i[i.length-1].rect);if(t.thisAnimationDuration){var n=S(t,!0);n&&(e.top-=n.f,e.left-=n.e)}t.fromRect=e}}))},addAnimationState:function(t){i.push(t)},removeAnimationState:function(t){i.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(i,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(r),void("function"==typeof t&&t());var n=!1,o=0;i.forEach((function(t){var r=0,i=t.target,a=i.fromRect,l=_(i),s=i.prevFromRect,c=i.prevToRect,d=t.rect,u=S(i,!0);u&&(l.top-=u.f,l.left-=u.e),i.toRect=l,i.thisAnimationDuration&&M(s,l)&&!M(a,l)&&(d.top-l.top)/(d.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(r=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(d,s,c,e.options)),M(l,a)||(i.prevFromRect=a,i.prevToRect=l,r||(r=e.options.animation),e.animate(i,d,l,r)),r&&(n=!0,o=Math.max(o,r),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout((function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null}),r),i.thisAnimationDuration=r)})),clearTimeout(r),n?r=setTimeout((function(){"function"==typeof t&&t()}),o):"function"==typeof t&&t(),i=[]},animate:function(t,e,n,o){if(o){E(t,"transition",""),E(t,"transform","");var r=S(this.el),i=r&&r.a,a=r&&r.d,l=(e.left-n.left)/(i||1),s=(e.top-n.top)/(a||1);t.animatingX=!!l,t.animatingY=!!s,E(t,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),E(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),E(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){E(t,"transition",""),E(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}))}function Nt(t,e,n,o,r,i,s,c){var d,u,h=t[R],f=h.options.onMove;return!window.CustomEvent||a||l?(d=document.createEvent("Event")).initEvent("move",!0,!0):d=new CustomEvent("move",{bubbles:!0,cancelable:!0}),d.to=e,d.from=t,d.dragged=n,d.draggedRect=o,d.related=r||e,d.relatedRect=i||_(e),d.willInsertAfter=c,d.originalEvent=s,t.dispatchEvent(d),f&&(u=f.call(h,d,s)),u}function Ot(t){t.draggable=!1}function Lt(){yt=!1}function Rt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Xt(t){return setTimeout(t,0)}function Yt(t){return clearTimeout(t)}Mt.prototype={constructor:Mt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ct=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,q):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,r=o.preventOnFilter,i=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,d=o.filter;if(function(t){wt.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var o=e[n];o.checked&&wt.push(o)}}(n),!q&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!c||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=v(l,o.draggable,n,!1))&&l.animated||K===l)){if(G=x(l),Z=x(l,o.draggable),"function"==typeof d){if(d.call(this,t,l,this))return $({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),F("filter",e,{evt:t}),void(r&&t.cancelable&&t.preventDefault())}else if(d&&(d=d.split(",").some((function(o){if(o=v(s,o.trim(),n,!1))return $({sortable:e,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),F("filter",e,{evt:t}),!0}))))return void(r&&t.cancelable&&t.preventDefault());o.handle&&!v(s,o.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var o,r=this,i=r.el,c=r.options,d=i.ownerDocument;if(n&&!q&&n.parentNode===i){var u=_(n);if(V=i,H=(q=n).parentNode,W=q.nextSibling,K=n,tt=c.group,Mt.dragged=q,nt={target:q,clientX:(e||t).clientX,clientY:(e||t).clientY},at=nt.clientX-u.left,lt=nt.clientY-u.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,q.style["will-change"]="all",o=function(){F("delayEnded",r,{evt:t}),Mt.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!s&&r.nativeDraggable&&(q.draggable=!0),r._triggerDragStart(t,e),$({sortable:r,name:"choose",originalEvent:t}),w(q,c.chosenClass,!0))},c.ignore.split(",").forEach((function(t){C(q,t.trim(),Ot)})),f(d,"dragover",It),f(d,"mousemove",It),f(d,"touchmove",It),f(d,"mouseup",r._onDrop),f(d,"touchend",r._onDrop),f(d,"touchcancel",r._onDrop),s&&this.nativeDraggable&&(this.options.touchStartThreshold=4,q.draggable=!0),F("delayStart",this,{evt:t}),!c.delay||c.delayOnTouchOnly&&!e||this.nativeDraggable&&(l||a))o();else{if(Mt.eventCanceled)return void this._onDrop();f(d,"mouseup",r._disableDelayedDrag),f(d,"touchend",r._disableDelayedDrag),f(d,"touchcancel",r._disableDelayedDrag),f(d,"mousemove",r._delayedDragTouchMoveHandler),f(d,"touchmove",r._delayedDragTouchMoveHandler),c.supportPointer&&f(d,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,c.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){q&&Ot(q),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;p(t,"mouseup",this._disableDelayedDrag),p(t,"touchend",this._disableDelayedDrag),p(t,"touchcancel",this._disableDelayedDrag),p(t,"mousemove",this._delayedDragTouchMoveHandler),p(t,"touchmove",this._delayedDragTouchMoveHandler),p(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?f(document,"pointermove",this._onTouchMove):f(document,e?"touchmove":"mousemove",this._onTouchMove):(f(q,"dragend",this),f(V,"dragstart",this._onDragStart));try{document.selection?Xt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(ft=!1,V&&q){F("dragStarted",this,{evt:e}),this.nativeDraggable&&f(document,"dragover",At);var n=this.options;!t&&w(q,n.dragClass,!1),w(q,n.ghostClass,!0),Mt.active=this,t&&this._appendGhost(),$({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ot){this._lastX=ot.clientX,this._lastY=ot.clientY,Tt();for(var t=document.elementFromPoint(ot.clientX,ot.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ot.clientX,ot.clientY))!==e;)e=t;if(q.parentNode[R]._isOutsideThisEl(t),e)do{if(e[R]&&e[R]._onDragOver({clientX:ot.clientX,clientY:ot.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=e.parentNode);xt()}},_onTouchMove:function(t){if(nt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,r=t.touches?t.touches[0]:t,i=z&&S(z,!0),a=z&&i&&i.a,l=z&&i&&i.d,s=St&&ht&&I(ht),c=(r.clientX-nt.clientX+o.x)/(a||1)+(s?s[0]-bt[0]:0)/(a||1),d=(r.clientY-nt.clientY+o.y)/(l||1)+(s?s[1]-bt[1]:0)/(l||1);if(!Mt.active&&!ft){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(z){i?(i.e+=c-(rt||0),i.f+=d-(it||0)):i={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");E(z,"webkitTransform",u),E(z,"mozTransform",u),E(z,"msTransform",u),E(z,"transform",u),rt=c,it=d,ot=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!z){var t=this.options.fallbackOnBody?document.body:V,e=_(q,!0,St,!0,t),n=this.options;if(St){for(ht=t;"static"===E(ht,"position")&&"none"===E(ht,"transform")&&ht!==document;)ht=ht.parentNode;ht!==document.body&&ht!==document.documentElement?(ht===document&&(ht=D()),e.top+=ht.scrollTop,e.left+=ht.scrollLeft):ht=D(),bt=I(ht)}w(z=q.cloneNode(!0),n.ghostClass,!1),w(z,n.fallbackClass,!0),w(z,n.dragClass,!0),E(z,"transition",""),E(z,"transform",""),E(z,"box-sizing","border-box"),E(z,"margin",0),E(z,"top",e.top),E(z,"left",e.left),E(z,"width",e.width),E(z,"height",e.height),E(z,"opacity","0.8"),E(z,"position",St?"absolute":"fixed"),E(z,"zIndex","100000"),E(z,"pointerEvents","none"),Mt.ghost=z,t.appendChild(z),E(z,"transform-origin",at/parseInt(z.style.width)*100+"% "+lt/parseInt(z.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,r=n.options;F("dragStart",this,{evt:t}),Mt.eventCanceled?this._onDrop():(F("setupClone",this),Mt.eventCanceled||((j=L(q)).draggable=!1,j.style["will-change"]="",this._hideClone(),w(j,this.options.chosenClass,!1),Mt.clone=j),n.cloneId=Xt((function(){F("clone",n),Mt.eventCanceled||(n.options.removeCloneOnHide||V.insertBefore(j,q),n._hideClone(),$({sortable:n,name:"clone"}))})),!e&&w(q,r.dragClass,!0),e?(pt=!0,n._loopId=setInterval(n._emulateDragOver,50)):(p(document,"mouseup",n._onDrop),p(document,"touchend",n._onDrop),p(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(n,o,q)),f(document,"drop",n),E(q,"transform","translateZ(0)")),ft=!0,n._dragStartId=Xt(n._dragStarted.bind(n,e,t)),f(document,"selectstart",n),st=!0,c&&E(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,r,i,a=this.el,l=t.target,s=this.options,c=s.group,d=Mt.active,u=tt===c,h=s.sort,f=et||d,p=this,g=!1;if(!yt){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),l=v(l,s.draggable,a,!0),Y("dragOver"),Mt.eventCanceled)return g;if(q.contains(t.target)||l.animated&&l.animatingX&&l.animatingY||p._ignoreWhileAnimating===l)return K(!1);if(pt=!1,d&&!s.disabled&&(u?h||(r=!V.contains(q)):et===this||(this.lastPutMode=tt.checkPull(this,d,q,t))&&c.checkPut(this,d,q,t))){if(i="vertical"===this._getDirection(t,l),e=_(q),Y("dragOverValid"),Mt.eventCanceled)return g;if(r)return H=V,B(),this._hideClone(),Y("revert"),Mt.eventCanceled||(W?V.insertBefore(q,W):V.appendChild(q)),K(!0);var m=T(a,s.draggable);if(!m||function(t,e,n){var o=_(T(n.el,n.options.draggable));return e?t.clientX>o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(t,i,this)&&!m.animated){if(m===q)return K(!1);if(m&&a===t.target&&(l=m),l&&(n=_(l)),!1!==Nt(V,a,q,e,l,n,t,!!l))return B(),a.appendChild(q),H=a,j(),K(!0)}else if(l.parentNode===a){n=_(l);var b,y,S,C=q.parentNode!==a,D=!function(t,e,n){var o=n?t.left:t.top,r=n?t.right:t.bottom,i=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,s=n?e.width:e.height;return o===a||r===l||o+i/2===a+s/2}(q.animated&&q.toRect||e,l.animated&&l.toRect||n,i),k=i?"top":"left",I=P(l,"top","top")||P(q,"top","top"),A=I?I.scrollTop:void 0;if(ct!==l&&(y=n[k],mt=!1,vt=!D&&s.invertSwap||C),b=function(t,e,n,o,r,i,a,l){var s=o?t.clientY:t.clientX,c=o?n.height:n.width,d=o?n.top:n.left,u=o?n.bottom:n.right,h=!1;if(!a)if(l&&ut<c*r){if(!mt&&(1===dt?s>d+c*i/2:s<u-c*i/2)&&(mt=!0),mt)h=!0;else if(1===dt?s<d+ut:s>u-ut)return-dt}else if(s>d+c*(1-r)/2&&s<u-c*(1-r)/2)return function(t){return x(q)<x(t)?1:-1}(e);return(h=h||a)&&(s<d+c*i/2||s>u-c*i/2)?s>d+c/2?1:-1:0}(t,l,n,i,D?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,vt,ct===l),0!==b){var M=x(q);do{M-=b,S=H.children[M]}while(S&&("none"===E(S,"display")||S===z))}if(0===b||S===l)return K(!1);ct=l,dt=b;var N=l.nextElementSibling,L=!1,X=Nt(V,a,q,e,l,n,t,L=1===b);if(!1!==X)return 1!==X&&-1!==X||(L=1===X),yt=!0,setTimeout(Lt,30),B(),L&&!N?a.appendChild(q):l.parentNode.insertBefore(q,L?N:l),I&&O(I,0,A-I.scrollTop),H=q.parentNode,void 0===y||vt||(ut=Math.abs(y-_(l)[k])),j(),K(!0)}if(a.contains(q))return K(!1)}return!1}function Y(s,c){F(s,p,o({evt:t,isOwner:u,axis:i?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:h,fromSortable:f,target:l,completed:K,onMove:function(n,o){return Nt(V,a,q,e,n,_(n),t,o)},changed:j},c))}function B(){Y("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function K(e){return Y("dragOverCompleted",{insertion:e}),e&&(u?d._hideClone():d._showClone(p),p!==f&&(w(q,et?et.options.ghostClass:d.options.ghostClass,!1),w(q,s.ghostClass,!0)),et!==p&&p!==Mt.active?et=p:p===Mt.active&&et&&(et=null),f===p&&(p._ignoreWhileAnimating=l),p.animateAll((function(){Y("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(l===q&&!q.animated||l===a&&!l.animated)&&(ct=null),s.dragoverBubble||t.rootEl||l===document||(q.parentNode[R]._isOutsideThisEl(t.target),!e&&It(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function j(){J=x(q),Q=x(q,s.draggable),$({sortable:p,name:"change",toEl:a,newIndex:J,newDraggableIndex:Q,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){p(document,"mousemove",this._onTouchMove),p(document,"touchmove",this._onTouchMove),p(document,"pointermove",this._onTouchMove),p(document,"dragover",It),p(document,"mousemove",It),p(document,"touchmove",It)},_offUpEvents:function(){var t=this.el.ownerDocument;p(t,"mouseup",this._onDrop),p(t,"touchend",this._onDrop),p(t,"pointerup",this._onDrop),p(t,"touchcancel",this._onDrop),p(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;J=x(q),Q=x(q,n.draggable),F("drop",this,{evt:t}),H=q&&q.parentNode,J=x(q),Q=x(q,n.draggable),Mt.eventCanceled||(ft=!1,vt=!1,mt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Yt(this.cloneId),Yt(this._dragStartId),this.nativeDraggable&&(p(document,"drop",this),p(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),c&&E(document.body,"user-select",""),E(q,"transform",""),t&&(st&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),z&&z.parentNode&&z.parentNode.removeChild(z),(V===H||et&&"clone"!==et.lastPutMode)&&j&&j.parentNode&&j.parentNode.removeChild(j),q&&(this.nativeDraggable&&p(q,"dragend",this),Ot(q),q.style["will-change"]="",st&&!ft&&w(q,et?et.options.ghostClass:this.options.ghostClass,!1),w(q,this.options.chosenClass,!1),$({sortable:this,name:"unchoose",toEl:H,newIndex:null,newDraggableIndex:null,originalEvent:t}),V!==H?(J>=0&&($({rootEl:H,name:"add",toEl:H,fromEl:V,originalEvent:t}),$({sortable:this,name:"remove",toEl:H,originalEvent:t}),$({rootEl:H,name:"sort",toEl:H,fromEl:V,originalEvent:t}),$({sortable:this,name:"sort",toEl:H,originalEvent:t})),et&&et.save()):J!==G&&J>=0&&($({sortable:this,name:"update",toEl:H,originalEvent:t}),$({sortable:this,name:"sort",toEl:H,originalEvent:t})),Mt.active&&(null!=J&&-1!==J||(J=G,Q=Z),$({sortable:this,name:"end",toEl:H,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){F("nulling",this),V=q=H=z=W=j=K=U=nt=ot=st=J=Q=G=Z=ct=dt=et=tt=Mt.dragged=Mt.ghost=Mt.clone=Mt.active=null,wt.forEach((function(t){t.checked=!0})),wt.length=rt=it=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":q&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,r=n.length,i=this.options;o<r;o++)v(t=n[o],i.draggable,this.el,!1)&&e.push(t.getAttribute(i.dataIdAttr)||Rt(t));return e},sort:function(t,e){var n={},o=this.el;this.toArray().forEach((function(t,e){var r=o.children[e];v(r,this.options.draggable,o,!1)&&(n[t]=r)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(o.removeChild(n[t]),o.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return v(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=B.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&kt(n)},destroy:function(){F("destroy",this);var t=this.el;t[R]=null,p(t,"mousedown",this._onTapStart),p(t,"touchstart",this._onTapStart),p(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(p(t,"dragover",this),p(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),gt.splice(gt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!U){if(F("hideClone",this),Mt.eventCanceled)return;E(j,"display","none"),this.options.removeCloneOnHide&&j.parentNode&&j.parentNode.removeChild(j),U=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(U){if(F("showClone",this),Mt.eventCanceled)return;q.parentNode!=V||this.options.group.revertClone?W?V.insertBefore(j,W):V.appendChild(j):V.insertBefore(j,q),this.options.group.revertClone&&this.animate(q,j),E(j,"display",""),U=!1}}else this._hideClone()}},Et&&f(document,"touchmove",(function(t){(Mt.active||ft)&&t.cancelable&&t.preventDefault()})),Mt.utils={on:f,off:p,css:E,find:C,is:function(t,e){return!!v(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:N,closest:v,toggleClass:w,clone:L,index:x,nextTick:Xt,cancelNextTick:Yt,detectDirection:Pt,getChild:k},Mt.get=function(t){return t[R]},Mt.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Mt.utils=o({},Mt.utils,t.utils)),B.mount(t)}))},Mt.create=function(t,e){return new Mt(t,e)},Mt.version="1.13.0";var Bt,Ft,$t,qt,Ht,zt,Vt=[],Wt=!1;function Kt(){Vt.forEach((function(t){clearInterval(t.pid)})),Vt=[]}function jt(){clearInterval(zt)}var Ut=N((function(t,e,n,o){if(e.scroll){var r,i=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,c=D(),d=!1;Ft!==n&&(Ft=n,Kt(),Bt=e.scroll,r=e.scrollFn,!0===Bt&&(Bt=A(n,!0)));var u=0,h=Bt;do{var f=h,p=_(f),g=p.top,m=p.bottom,v=p.left,b=p.right,y=p.width,w=p.height,S=void 0,C=void 0,P=f.scrollWidth,k=f.scrollHeight,T=E(f),x=f.scrollLeft,I=f.scrollTop;f===c?(S=y<P&&("auto"===T.overflowX||"scroll"===T.overflowX||"visible"===T.overflowX),C=w<k&&("auto"===T.overflowY||"scroll"===T.overflowY||"visible"===T.overflowY)):(S=y<P&&("auto"===T.overflowX||"scroll"===T.overflowX),C=w<k&&("auto"===T.overflowY||"scroll"===T.overflowY));var M=S&&(Math.abs(b-i)<=l&&x+y<P)-(Math.abs(v-i)<=l&&!!x),N=C&&(Math.abs(m-a)<=l&&I+w<k)-(Math.abs(g-a)<=l&&!!I);if(!Vt[u])for(var L=0;L<=u;L++)Vt[L]||(Vt[L]={});Vt[u].vx==M&&Vt[u].vy==N&&Vt[u].el===f||(Vt[u].el=f,Vt[u].vx=M,Vt[u].vy=N,clearInterval(Vt[u].pid),0==M&&0==N||(d=!0,Vt[u].pid=setInterval(function(){o&&0===this.layer&&Mt.active._onTouchMove(Ht);var e=Vt[this.layer].vy?Vt[this.layer].vy*s:0,n=Vt[this.layer].vx?Vt[this.layer].vx*s:0;"function"==typeof r&&"continue"!==r.call(Mt.dragged.parentNode[R],n,e,t,Ht,Vt[this.layer].el)||O(Vt[this.layer].el,n,e)}.bind({layer:u}),24))),u++}while(e.bubbleScroll&&h!==c&&(h=A(h,!1)));Wt=d}}),30),Gt=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,r=t.activeSortable,i=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var s=n||r;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,d=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(d)&&(i("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function Jt(){}function Zt(){}Jt.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=k(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:Gt},n(Jt,{pluginName:"revertOnSpill"}),Zt.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:Gt},n(Zt,{pluginName:"removeOnSpill"}),Mt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?f(document,"dragover",this._handleAutoScroll):this.options.supportPointer?f(document,"pointermove",this._handleFallbackAutoScroll):e.touches?f(document,"touchmove",this._handleFallbackAutoScroll):f(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?p(document,"dragover",this._handleAutoScroll):(p(document,"pointermove",this._handleFallbackAutoScroll),p(document,"touchmove",this._handleFallbackAutoScroll),p(document,"mousemove",this._handleFallbackAutoScroll)),jt(),Kt(),clearTimeout(b),b=void 0},nulling:function(){Ht=Ft=Bt=Wt=zt=$t=qt=null,Vt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,i=document.elementFromPoint(o,r);if(Ht=t,e||l||a||c){Ut(t,this.options,i,e);var s=A(i,!0);!Wt||zt&&o===$t&&r===qt||(zt&&jt(),zt=setInterval((function(){var i=A(document.elementFromPoint(o,r),!0);i!==s&&(s=i,Kt()),Ut(t,n.options,i,e)}),10),$t=o,qt=r)}else{if(!this.options.bubbleScroll||A(i,!0)===D())return void Kt();Ut(t,this.options,A(i,!1),!1)}}},n(t,{pluginName:"scroll",initializeByDefault:!0})}),Mt.mount(Zt,Jt);const Qt=Mt;class te{constructor(t){this.method=t}}class ee{constructor(t){this.method=t}}new te("configuration/didChange");const ne=new ee("webview/ready"),oe=(new ee("configuration/update"),new ee("configuration/preview"),new te("configuration/didPreview"),new te("settings/jumpTo"),new te("rebase/change")),re=new ee("rebase/abort"),ie=new ee("rebase/disable"),ae=new ee("rebase/start"),le=new ee("rebase/switch"),se=new ee("rebase/change/entry"),ce=new ee("rebase/move/entry"),de=/^(?:(#?)([0-9a-f]{3}|[0-9a-f]{6})|((?:rgb|hsl)a?)\((-?\d+%?)[,\s]+(-?\d+%?)[,\s]+(-?\d+%?)[,\s]*(-?[\d.]+%?)?\))$/i;function ue(t,e){const n=t+e,o=e<0?n<0?0:n:n>255?255:n;return Math.round(o)}function he(t,e){return fe(t,-e)}function fe(t,e){const n=ge(t);if(null==n)return t;const[o,r,i,a]=n,l=255*e/100;return`rgba(${ue(o,l)}, ${ue(r,l)}, ${ue(i,l)}, ${a})`}function pe(t,e){const n=ge(t);if(null==n)return t;const[o,r,i,a]=n;return`rgba(${o}, ${r}, ${i}, ${a*(e/100)})`}function ge(t){t=t.trim();const e=de.exec(t);if(null==e)return null;if("#"===e[1]){const t=e[2];switch(t.length){case 3:return[parseInt(t[0]+t[0],16),parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),1];case 6:return[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16),1]}return null}switch(e[3]){case"rgb":return[parseInt(e[4],10),parseInt(e[5],10),parseInt(e[6],10),1];case"rgba":return[parseInt(e[4],10),parseInt(e[5],10),parseInt(e[6],10),parseFloat(e[7])];default:return null}}let me=0;var ve;(ve||(ve={})).on=function(t,e,n,o,r){let i=!1;if("string"==typeof t){const a=(null!=r?r:document).querySelectorAll(t);for(const t of a)t.addEventListener(e,n,null!=o&&o);return{dispose:()=>{if(!i){i=!0;for(const t of a)t.removeEventListener(e,n,null!=o&&o)}}}}return t.addEventListener(e,n,null!=o&&o),{dispose:()=>{i||(i=!0,t.removeEventListener(e,n,null!=o&&o))}}};const be=["pick","reword","edit","squash","fixup","drop"],ye=new Map([["p","pick"],["P","pick"],["r","reword"],["R","reword"],["e","edit"],["E","edit"],["s","squash"],["S","squash"],["f","fixup"],["F","fixup"],["d","drop"],["D","drop"]]);new class extends class{constructor(t,e){this.appName=t,this.log(`${this.appName}.ctor`),this._api=acquireVsCodeApi(),function(){const t=()=>{const t=document.body,e=window.getComputedStyle(t),n=t.style,o=e.getPropertyValue("--vscode-font-family").trim();o?(n.setProperty("--font-family",o),n.setProperty("--font-size",e.getPropertyValue("--vscode-font-size").trim()),n.setProperty("--font-weight",e.getPropertyValue("--vscode-font-weight").trim())):(n.setProperty("--font-family",e.getPropertyValue("--vscode-editor-font-family").trim()),n.setProperty("--font-size",e.getPropertyValue("--vscode-editor-font-size").trim()),n.setProperty("--font-weight",e.getPropertyValue("--vscode-editor-font-weight").trim()));let r=e.getPropertyValue("--vscode-editor-background").trim();n.setProperty("--color-background",r),n.setProperty("--color-background--lighten-05",fe(r,5)),n.setProperty("--color-background--darken-05",he(r,5)),n.setProperty("--color-background--lighten-075",fe(r,7.5)),n.setProperty("--color-background--darken-075",he(r,7.5)),n.setProperty("--color-background--lighten-15",fe(r,15)),n.setProperty("--color-background--darken-15",he(r,15)),n.setProperty("--color-background--lighten-30",fe(r,30)),n.setProperty("--color-background--darken-30",he(r,30)),n.setProperty("--color-background--lighten-50",fe(r,50)),n.setProperty("--color-background--darken-50",he(r,50)),r=e.getPropertyValue("--vscode-button-background").trim(),n.setProperty("--color-button-background",r),n.setProperty("--color-button-background--darken-30",he(r,30)),r=e.getPropertyValue("--vscode-button-secondaryBackground").trim(),n.setProperty("--color-button-secondary-background",r),n.setProperty("--color-button-secondary-background--darken-30",he(r,30)),r=e.getPropertyValue("--vscode-button-background").trim(),n.setProperty("--color-highlight",r),n.setProperty("--color-highlight--75",pe(r,75)),n.setProperty("--color-highlight--50",pe(r,50)),n.setProperty("--color-highlight--25",pe(r,25)),r=e.getPropertyValue("--vscode-button-foreground").trim(),n.setProperty("--color-button-foreground",r),r=e.getPropertyValue("--vscode-editor-foreground").trim(),r||(r=e.getPropertyValue("--vscode-foreground").trim()),n.setProperty("--color-foreground",r),n.setProperty("--color-foreground--85",pe(r,85)),n.setProperty("--color-foreground--75",pe(r,75)),n.setProperty("--color-foreground--65",pe(r,65)),n.setProperty("--color-foreground--50",pe(r,50)),r=e.getPropertyValue("--vscode-focusBorder").trim(),n.setProperty("--color-focus-border",r),r=e.getPropertyValue("--vscode-textLink-foreground").trim(),n.setProperty("--color-link-foreground",r),n.setProperty("--color-link-foreground--darken-20",he(r,20)),n.setProperty("--color-link-foreground--lighten-20",fe(r,20))};new MutationObserver(t).observe(document.body,{attributes:!0,attributeFilter:["class"]}),t()}(),this.state=e,setTimeout((()=>{var t,e;this.log(`${this.appName}.initializing`),null==(t=this.onInitialize)||t.call(this),this.bind(),null!=this.onMessageReceived&&window.addEventListener("message",this.onMessageReceived.bind(this)),this.sendCommand(ne,{}),null==(e=this.onInitialized)||e.call(this),setTimeout((()=>{document.body.classList.remove("preload")}),500)}),0)}bind(){var t,e;null==(t=this.bindDisposables)||t.forEach((t=>t.dispose())),this.bindDisposables=null==(e=this.onBind)?void 0:e.call(this)}log(t){}getState(){return this._api.getState()}sendCommand(t,e){return this.postMessage({id:(me===Number.MAX_SAFE_INTEGER?me=1:me++,`webview:${me}`),method:t.method,params:e})}setState(t){this.state=t,this._api.setState(t)}postMessage(t){this._api.postMessage(t)}}{constructor(){super("RebaseEditor",window.bootstrap),this.commitTokenRegex=new RegExp(encodeURIComponent("${commit}")),window.bootstrap=void 0}onInitialize(){var t;this.state=null!=(t=this.getState())?t:this.state,null!=this.state&&this.refresh(this.state)}onBind(){var t,e;const n=null!=(e=null==(t=super.onBind)?void 0:t.call(this))?e:[],o=this,r=document.getElementById("entries");if(Qt.create(r,{animation:150,handle:".entry-handle",filter:".entry--base",dragClass:"entry--drag",ghostClass:"entry--dragging",onChange:()=>{let t=!1,e=!1;const n=document.querySelectorAll("li[data-ref]");for(const o of n)e=!1,o.classList.contains("entry--squash")||o.classList.contains("entry--fixup")?t=!0:t&&(o.classList.contains("entry--drop")||(e=!0,t=!1)),o.classList.toggle("entry--squash-to",e&&!o.classList.contains("entry--base"))},onEnd:t=>{var e;if(null==t.newIndex||t.newIndex===t.oldIndex)return;const n=t.item.dataset.ref;null!=n&&(this.moveEntry(n,t.newIndex,!1),null==(e=document.querySelectorAll(`li[data-ref="${n}"]`)[0])||e.focus())},onMove:t=>!t.related.classList.contains("entry--base")}),window.navigator.platform.startsWith("Mac")){let t=document.querySelector('[data-action="start"] .shortcut');t.textContent="Cmd+Enter",t=document.querySelector('[data-action="abort"] .shortcut'),t.textContent="Cmd+A"}return n.push(ve.on(window,"keydown",(t=>{(t.ctrlKey||t.metaKey)&&("Enter"===t.key||"r"===t.key?(t.preventDefault(),t.stopPropagation(),this.onStartClicked()):"a"===t.key&&(t.preventDefault(),t.stopPropagation(),this.onAbortClicked()))})),ve.on('[data-action="start"]',"click",(()=>this.onStartClicked())),ve.on('[data-action="abort"]',"click",(()=>this.onAbortClicked())),ve.on('[data-action="disable"]',"click",(()=>this.onDisableClicked())),ve.on('[data-action="switch"]',"click",(()=>this.onSwitchClicked())),ve.on("li[data-ref]","keydown",(function(t){var e,n;if(t.target.matches("select[data-ref]"))"Escape"===t.key&&this.focus();else if("Enter"===t.key||" "===t.key){if("Enter"===t.key&&t.target.matches("a.entry-ref"))return;const e=this.querySelectorAll("select[data-ref]")[0];null!=e&&e.focus()}else if("ArrowUp"===t.key||"ArrowDown"===t.key){if(!t.metaKey&&!t.ctrlKey&&!t.shiftKey)if(t.altKey){const e=this.dataset.ref;e&&(t.stopPropagation(),o.moveEntry(e,"ArrowDown"===t.key?1:-1,!0))}else{if(null==o.state)return;let n=this.dataset.ref;if(null==n)return;t.preventDefault();let r=o.getEntryIndex(n)+("ArrowDown"===t.key?1:-1);r<0?r=o.state.entries.length-1:r===o.state.entries.length&&(r=0),n=o.state.entries[r].ref,null==(e=document.querySelectorAll(`li[data-ref="${n}"]`)[0])||e.focus()}}else if("j"===t.key||"k"===t.key){if(!(t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)){if(null==o.state)return;let e=this.dataset.ref;if(null==e)return;t.preventDefault();let r=o.getEntryIndex(e)+("j"===t.key?1:-1);r<0?r=o.state.entries.length-1:r===o.state.entries.length&&(r=0),e=o.state.entries[r].ref,null==(n=document.querySelectorAll(`li[data-ref="${e}"]`)[0])||n.focus()}}else if("J"===t.key||"K"===t.key){if(!t.metaKey&&!t.ctrlKey&&!t.altKey&&t.shiftKey){const e=this.dataset.ref;e&&(t.stopPropagation(),o.moveEntry(e,"J"===t.key?1:-1,!0))}}else if(!t.metaKey&&!t.altKey&&!t.ctrlKey){const e=ye.get(t.key);if(void 0!==e){t.stopPropagation();const n=this.querySelectorAll("select[data-ref]")[0];null==n||n.disabled||(n.value=e,o.onSelectChanged(n))}}})),ve.on("select[data-ref]","input",(function(){return o.onSelectChanged(this)}))),n}getEntry(t){var e;return null==(e=this.state)?void 0:e.entries.find((e=>e.ref===t))}getEntryIndex(t){var e,n;return null!=(n=null==(e=this.state)?void 0:e.entries.findIndex((e=>e.ref===t)))?n:-1}moveEntry(t,e,n){const o=this.getEntry(t);null!=o&&this.sendCommand(ce,{ref:o.ref,to:e,relative:n})}setEntryAction(t,e){const n=this.getEntry(t);if(null!=n){if(n.action===e)return;this.sendCommand(se,{ref:n.ref,action:e})}}onAbortClicked(){this.sendCommand(re,{})}onDisableClicked(){this.sendCommand(ie,{})}onSelectChanged(t){const e=t.dataset.ref;e&&this.setEntryAction(e,t.options[t.selectedIndex].value)}onStartClicked(){this.sendCommand(ae,{})}onSwitchClicked(){this.sendCommand(le,{})}onMessageReceived(t){var e;const n=t.data;n.method===oe.method?(t=>{this.setState({...this.state,...t.state}),this.refresh(this.state)})(n.params):null==(e=super.onMessageReceived)||e.call(this,t)}refresh(t){var e,n,o,r;const i=null==(n=null==(e=document.activeElement)?void 0:e.closest("li[data-ref]"))?void 0:n.dataset.ref;let a=!1;(null==(o=document.activeElement)?void 0:o.matches("select[data-ref]"))&&(a=!0);const l=document.getElementById("subhead");l.innerHTML="";let s=document.createElement("span");s.textContent=t.branch,s.classList.add("icon--branch","mr-1"),l.appendChild(s),s=document.createTextNode(`Rebasing ${t.entries.length} commit${1!==t.entries.length?"s":""}${t.onto?" onto":""}`),l.appendChild(s),t.onto&&(s=document.createElement("span"),s.textContent=t.onto,s.classList.add("icon--commit"),l.appendChild(s));const c=document.getElementById("entries");if(c.innerHTML="",0===t.entries.length){c.classList.add("entries--empty");const t=document.querySelector('.button[name="start"]');null!=t&&(t.disabled=!0);const e=document.createElement("li"),n=document.createElement("h3");return n.textContent="No commits to rebase",e.appendChild(n),void c.appendChild(e)}let d=!1,u=!1,h=0;for(const e of t.entries){let n;u=!1,"squash"===e.action||"fixup"===e.action?d=!0:d&&"drop"!==e.action&&(u=!0,d=!1),[n,h]=this.createEntry(e,t,++h,u),c.appendChild(n)}if(t.onto){const e=t.commits.find((e=>e.ref.startsWith(t.onto)));if(null!=e){const[n]=this.createEntry({action:void 0,index:0,message:e.message.split("\n")[0],ref:t.onto},t,++h,!1);c.appendChild(n),c.classList.add("entries--base")}}null==(r=document.querySelectorAll(`${a?"select":"li"}[data-ref="${null!=i?i:t.entries[0].ref}"]`)[0])||r.focus(),this.bind()}createEntry(t,e,n,o){var r,i,a,l;const s=document.createElement("li");if(s.classList.add("entry",`entry--${null!=(r=t.action)?r:"base"}`),s.classList.toggle("entry--squash-to",o),s.dataset.ref=t.ref,null!=t.action){s.tabIndex=n++;const e=document.createElement("span");e.classList.add("entry-handle"),s.appendChild(e);const o=document.createElement("div");o.classList.add("entry-action","select-container"),s.appendChild(o);const r=document.createElement("select");r.dataset.ref=t.ref,r.name="action",r.tabIndex=n++;for(const e of be){const n=document.createElement("option");n.value=e,n.text=e,t.action===e&&(n.selected=!0),r.appendChild(n)}o.appendChild(r)}const c=document.createElement("span");c.classList.add("entry-message"),c.textContent=null!=(i=t.message)?i:"",s.appendChild(c);const d=e.commits.find((e=>e.ref.startsWith(t.ref)));if(null!=d){if(c.title=null!=(a=d.message)?a:"",d.author){const t=e.authors.find((t=>t.author===d.author));if(null==t?void 0:t.avatarUrl.length){const e=document.createElement("img");e.classList.add("entry-avatar"),e.src=t.avatarUrl,s.appendChild(e)}const n=document.createElement("span");n.classList.add("entry-author"),n.textContent=d.author,s.appendChild(n)}if(d.dateFromNow){const t=document.createElement("span");t.title=null!=(l=d.date)?l:"",t.classList.add("entry-date"),t.textContent=d.dateFromNow,s.appendChild(t)}}const u=document.createElement("a");return u.classList.add("entry-ref","icon--commit"),u.href=(null==d?void 0:d.ref)?e.commands.commit.replace(this.commitTokenRegex,d.ref):"#",u.textContent=t.ref.substr(0,7),u.tabIndex=n++,s.appendChild(u),[s,n]}}})();
  //# sourceMappingURL=rebase.js.map