@innovastudio/contentbuilder 1.4.44 → 1.4.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -22239,7 +22239,7 @@ const renderSnippetPanel = builder => {
|
|
22239
22239
|
|
22240
22240
|
for (let i = 0; i < builder.opts.emailSnippetCategories.length; i++) {
|
22241
22241
|
// catoptions += '<div role="button" tabindex="0" data-value="' + builder.opts.emailSnippetCategories[i][0] + '">' + builder.opts.emailSnippetCategories[i][1] + '</div>';
|
22242
|
-
catitems += '<li role="option" tabindex="0" data-value="' + builder.opts.emailSnippetCategories[i][0] + '">' + builder.opts.emailSnippetCategories[i][1] + '</li>';
|
22242
|
+
catitems += '<li role="option" tabindex="0" data-value="' + builder.opts.emailSnippetCategories[i][0] + '">' + util.out(builder.opts.emailSnippetCategories[i][1]) + '</li>';
|
22243
22243
|
if (builder.opts.emailSnippetCategories[i][0] === builder.opts.defaultEmailSnippetCategory) defaultcat = builder.opts.emailSnippetCategories[i][1];
|
22244
22244
|
}
|
22245
22245
|
} else {
|
@@ -22247,12 +22247,12 @@ const renderSnippetPanel = builder => {
|
|
22247
22247
|
|
22248
22248
|
for (let i = 0; i < builder.opts.snippetCategories.length; i++) {
|
22249
22249
|
// catoptions += '<div role="button" tabindex="0" data-value="' + builder.opts.snippetCategories[i][0] + '">' + builder.opts.snippetCategories[i][1] + '</div>';
|
22250
|
-
catitems += '<li role="option" tabindex="0" data-value="' + builder.opts.snippetCategories[i][0] + '">' + builder.opts.snippetCategories[i][1] + '</li>';
|
22250
|
+
catitems += '<li role="option" tabindex="0" data-value="' + builder.opts.snippetCategories[i][0] + '">' + util.out(builder.opts.snippetCategories[i][1]) + '</li>';
|
22251
22251
|
if (builder.opts.snippetCategories[i][0] === builder.opts.defaultSnippetCategory) defaultcat = builder.opts.snippetCategories[i][1];
|
22252
22252
|
}
|
22253
22253
|
}
|
22254
22254
|
|
22255
|
-
let html_snippets = '' + '<div class="is-dropdown selectsnippet" style="position:absolute;top:0;right:0;padding: 0;width:100%;z-index:2;">' + '<button tabindex="0" class="dropdown-toggle no-outline" title="' + util.out('Snippet Categories') + '" type="button" aria-haspopup="true" data-value="' + defaultcatval + '">' + '<span>' + defaultcat + '</span>' + '</button>' + '<ul class="dropdown-menu" role="listbox" title="' + util.out('Snippets') + '" aria-expanded="false">' + catitems + '</ul>' + '</div>' + (sidePanel === 'right' ? '<div id="divSnippetScrollUp" role="button" tabindex="-1" style="top:calc(50% - 27px);right:25px;">▲</div>' + '<div id="divSnippetScrollDown" role="button" tabindex="-1" style="top:calc(50% + 27px);right:25px;">▼</div>' + '<div id="divSnippetHandle" role="button" tabindex="-1" title="' + util.out('Snippets') + '" data-title="' + util.out('Snippets') + '" style="' + hideHandle + '">' + '<svg class="is-icon-flex"><use xlink:href="#ion-ios-arrow-left"></use></svg>' + '</div>' : '<div id="divSnippetScrollUp" role="button" tabindex="-1" style="top:calc(50% - 27px);left:10px;">▲</div>' + '<div id="divSnippetScrollDown" role="button" tabindex="-1" style="top:calc(50% + 27px);left:10px;">▼</div>' + '<div id="divSnippetHandle" role="button" tabindex="-1" title="' + util.out('Snippets') + '" data-title="' + util.out('Snippets') + '" style="' + hideHandle + '">' + '<svg class="is-icon-flex"><use xlink:href="#ion-ios-arrow-right"></use></svg>' + '</div>') + '<div class="is-design-list" tabindex="0">' + '</div>';
|
22255
|
+
let html_snippets = '' + '<div class="is-dropdown selectsnippet" style="position:absolute;top:0;right:0;padding: 0;width:100%;z-index:2;">' + '<button tabindex="0" class="dropdown-toggle no-outline" title="' + util.out('Snippet Categories') + '" type="button" aria-haspopup="true" data-value="' + defaultcatval + '">' + '<span>' + util.out(defaultcat) + '</span>' + '</button>' + '<ul class="dropdown-menu" role="listbox" title="' + util.out('Snippets') + '" aria-expanded="false">' + catitems + '</ul>' + '</div>' + (sidePanel === 'right' ? '<div id="divSnippetScrollUp" role="button" tabindex="-1" style="top:calc(50% - 27px);right:25px;">▲</div>' + '<div id="divSnippetScrollDown" role="button" tabindex="-1" style="top:calc(50% + 27px);right:25px;">▼</div>' + '<div id="divSnippetHandle" role="button" tabindex="-1" title="' + util.out('Snippets') + '" data-title="' + util.out('Snippets') + '" style="' + hideHandle + '">' + '<svg class="is-icon-flex"><use xlink:href="#ion-ios-arrow-left"></use></svg>' + '</div>' : '<div id="divSnippetScrollUp" role="button" tabindex="-1" style="top:calc(50% - 27px);left:10px;">▲</div>' + '<div id="divSnippetScrollDown" role="button" tabindex="-1" style="top:calc(50% + 27px);left:10px;">▼</div>' + '<div id="divSnippetHandle" role="button" tabindex="-1" title="' + util.out('Snippets') + '" data-title="' + util.out('Snippets') + '" style="' + hideHandle + '">' + '<svg class="is-icon-flex"><use xlink:href="#ion-ios-arrow-right"></use></svg>' + '</div>') + '<div class="is-design-list" tabindex="0">' + '</div>';
|
22256
22256
|
let snippetPanel = document.querySelector(builder.opts.snippetList);
|
22257
22257
|
dom.appendHtml(snippetPanel, html_snippets);
|
22258
22258
|
const dropDown = new Select(snippetPanel.querySelector('.selectsnippet'));
|
@@ -17,7 +17,7 @@ var ContentBuilder=function(){"use strict";var t="undefined"!=typeof globalThis?
|
|
17
17
|
* @author owenm <owen23355@gmail.com>
|
18
18
|
* @license MIT
|
19
19
|
*/
|
20
|
-
function Hi(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Fi(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Hi(Object(i),!0).forEach((function(e){Wi(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Hi(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Ui(t){return Ui="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},Ui(t)}function Wi(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function ji(){return ji=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},ji.apply(this,arguments)}function Gi(t,e){if(null==t)return{};var i,n,o=function(t,e){if(null==t)return{};var i,n,o={},s=Object.keys(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||(o[i]=t[i]);return o}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(o[i]=t[i])}return o}function Vi(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var Yi=Vi(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Xi=Vi(/Edge/i),Zi=Vi(/firefox/i),Ki=Vi(/safari/i)&&!Vi(/chrome/i)&&!Vi(/android/i),Qi=Vi(/iP(ad|od|hone)/i),Ji=Vi(/chrome/i)&&Vi(/android/i),tn={capture:!1,passive:!1};function en(t,e,i){t.addEventListener(e,i,!Yi&&tn)}function nn(t,e,i){t.removeEventListener(e,i,!Yi&&tn)}function on(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 sn(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function rn(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&on(t,e):on(t,e))||n&&t===i)return t;if(t===i)break}while(t=sn(t))}return null}var ln,an=/\s+/g;function dn(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(an," ").replace(" "+e+" "," ");t.className=(n+(i?" "+e:"")).replace(an," ")}}function cn(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=i+("string"==typeof i?"":"px")}}function un(t,e){var i="";if("string"==typeof t)i=t;else do{var n=cn(t,"transform");n&&"none"!==n&&(i=n+" "+i)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(i)}function pn(t,e,i){if(t){var n=t.getElementsByTagName(e),o=0,s=n.length;if(i)for(;o<s;o++)i(n[o],o);return n}return[]}function hn(){var t=document.scrollingElement;return t||document.documentElement}function gn(t,e,i,n,o){if(t.getBoundingClientRect||t===window){var s,r,l,a,d,c,u;if(t!==window&&t.parentNode&&t!==hn()?(r=(s=t.getBoundingClientRect()).top,l=s.left,a=s.bottom,d=s.right,c=s.height,u=s.width):(r=0,l=0,a=window.innerHeight,d=window.innerWidth,c=window.innerHeight,u=window.innerWidth),(e||i)&&t!==window&&(o=o||t.parentNode,!Yi))do{if(o&&o.getBoundingClientRect&&("none"!==cn(o,"transform")||i&&"static"!==cn(o,"position"))){var p=o.getBoundingClientRect();r-=p.top+parseInt(cn(o,"border-top-width")),l-=p.left+parseInt(cn(o,"border-left-width")),a=r+s.height,d=l+s.width;break}}while(o=o.parentNode);if(n&&t!==window){var h=un(o||t),g=h&&h.a,m=h&&h.d;h&&(a=(r/=m)+(c/=m),d=(l/=g)+(u/=g))}return{top:r,left:l,bottom:a,right:d,width:u,height:c}}}function mn(t,e,i){for(var n=xn(t,!0),o=gn(t)[e];n;){var s=gn(n)[i];if(!("top"===i||"left"===i?o>=s:o<=s))return n;if(n===hn())break;n=xn(n,!1)}return!1}function fn(t,e,i,n){for(var o=0,s=0,r=t.children;s<r.length;){if("none"!==r[s].style.display&&r[s]!==Co.ghost&&(n||r[s]!==Co.dragged)&&rn(r[s],i.draggable,t,!1)){if(o===e)return r[s];o++}s++}return null}function bn(t,e){for(var i=t.lastElementChild;i&&(i===Co.ghost||"none"===cn(i,"display")||e&&!on(i,e));)i=i.previousElementSibling;return i||null}function vn(t,e){var i=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Co.clone||e&&!on(t,e)||i++;return i}function yn(t){var e=0,i=0,n=hn();if(t)do{var o=un(t),s=o.a,r=o.d;e+=t.scrollLeft*s,i+=t.scrollTop*r}while(t!==n&&(t=t.parentNode));return[e,i]}function xn(t,e){if(!t||!t.getBoundingClientRect)return hn();var i=t,n=!1;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var o=cn(i);if(i.clientWidth<i.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||i.clientHeight<i.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!i.getBoundingClientRect||i===document.body)return hn();if(n||e)return i;n=!0}}}while(i=i.parentNode);return hn()}function wn(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 Sn(t,e){return function(){if(!ln){var i=arguments;1===i.length?t.call(this,i[0]):t.apply(this,i),ln=setTimeout((function(){ln=void 0}),e)}}}function _n(t,e,i){t.scrollLeft+=e,t.scrollTop+=i}function Cn(t){var e=window.Polymer,i=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):i?i(t).clone(!0)[0]:t.cloneNode(!0)}var kn="Sortable"+(new Date).getTime();function En(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==cn(t,"display")&&t!==Co.ghost){e.push({target:t,rect:gn(t)});var i=Fi({},e[e.length-1].rect);if(t.thisAnimationDuration){var n=un(t,!0);n&&(i.top-=n.f,i.left-=n.e)}t.fromRect=i}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var i in t)if(t.hasOwnProperty(i))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[i][n])return Number(i);return-1}(e,{target:t}),1)},animateAll:function(i){var n=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof i&&i());var o=!1,s=0;e.forEach((function(t){var e=0,i=t.target,r=i.fromRect,l=gn(i),a=i.prevFromRect,d=i.prevToRect,c=t.rect,u=un(i,!0);u&&(l.top-=u.f,l.left-=u.e),i.toRect=l,i.thisAnimationDuration&&wn(a,l)&&!wn(r,l)&&(c.top-l.top)/(c.left-l.left)==(r.top-l.top)/(r.left-l.left)&&(e=function(t,e,i,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))*n.animation}(c,a,d,n.options)),wn(l,r)||(i.prevFromRect=r,i.prevToRect=l,e||(e=n.options.animation),n.animate(i,c,l,e)),e&&(o=!0,s=Math.max(s,e),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout((function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null}),e),i.thisAnimationDuration=e)})),clearTimeout(t),o?t=setTimeout((function(){"function"==typeof i&&i()}),s):"function"==typeof i&&i(),e=[]},animate:function(t,e,i,n){if(n){cn(t,"transition",""),cn(t,"transform","");var o=un(this.el),s=o&&o.a,r=o&&o.d,l=(e.left-i.left)/(s||1),a=(e.top-i.top)/(r||1);t.animatingX=!!l,t.animatingY=!!a,cn(t,"transform","translate3d("+l+"px,"+a+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),cn(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),cn(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){cn(t,"transition",""),cn(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n)}}}}var An=[],Ln={initializeByDefault:!0},qn={mount:function(t){for(var e in Ln)Ln.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ln[e]);An.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),An.push(t)},pluginEvent:function(t,e,i){var n=this;this.eventCanceled=!1,i.cancel=function(){n.eventCanceled=!0};var o=t+"Global";An.forEach((function(n){e[n.pluginName]&&(e[n.pluginName][o]&&e[n.pluginName][o](Fi({sortable:e},i)),e.options[n.pluginName]&&e[n.pluginName][t]&&e[n.pluginName][t](Fi({sortable:e},i)))}))},initializePlugins:function(t,e,i,n){for(var o in An.forEach((function(n){var o=n.pluginName;if(t.options[o]||n.initializeByDefault){var s=new n(t,e,t.options);s.sortable=t,s.options=t.options,t[o]=s,ji(i,s.defaults)}})),t.options)if(t.options.hasOwnProperty(o)){var s=this.modifyOption(t,o,t.options[o]);void 0!==s&&(t.options[o]=s)}},getEventProperties:function(t,e){var i={};return An.forEach((function(n){"function"==typeof n.eventProperties&&ji(i,n.eventProperties.call(e[n.pluginName],t))})),i},modifyOption:function(t,e,i){var n;return An.forEach((function(o){t[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[e]&&(n=o.optionListeners[e].call(t[o.pluginName],i))})),n}};var Tn=["evt"],Mn=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.evt,o=Gi(i,Tn);qn.pluginEvent.bind(Co)(t,e,Fi({dragEl:Rn,parentEl:Bn,ghostEl:Nn,rootEl:In,nextEl:$n,lastDownEl:Dn,cloneEl:Pn,cloneHidden:zn,dragStarted:Jn,putSortable:Gn,activeSortable:Co.active,originalEvent:n,oldIndex:Hn,oldDraggableIndex:Un,newIndex:Fn,newDraggableIndex:Wn,hideGhostForTarget:xo,unhideGhostForTarget:wo,cloneNowHidden:function(){zn=!0},cloneNowShown:function(){zn=!1},dispatchSortableEvent:function(t){On({sortable:e,name:t,originalEvent:n})}},o))};function On(t){!function(t){var e=t.sortable,i=t.rootEl,n=t.name,o=t.targetEl,s=t.cloneEl,r=t.toEl,l=t.fromEl,a=t.oldIndex,d=t.newIndex,c=t.oldDraggableIndex,u=t.newDraggableIndex,p=t.originalEvent,h=t.putSortable,g=t.extraEventProperties;if(e=e||i&&i[kn]){var m,f=e.options,b="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||Yi||Xi?(m=document.createEvent("Event")).initEvent(n,!0,!0):m=new CustomEvent(n,{bubbles:!0,cancelable:!0}),m.to=r||i,m.from=l||i,m.item=o||i,m.clone=s,m.oldIndex=a,m.newIndex=d,m.oldDraggableIndex=c,m.newDraggableIndex=u,m.originalEvent=p,m.pullMode=h?h.lastPutMode:void 0;var v=Fi(Fi({},g),qn.getEventProperties(n,e));for(var y in v)m[y]=v[y];i&&i.dispatchEvent(m),f[b]&&f[b].call(e,m)}}(Fi({putSortable:Gn,cloneEl:Pn,targetEl:Rn,rootEl:In,oldIndex:Hn,oldDraggableIndex:Un,newIndex:Fn,newDraggableIndex:Wn},t))}var Rn,Bn,Nn,In,$n,Dn,Pn,zn,Hn,Fn,Un,Wn,jn,Gn,Vn,Yn,Xn,Zn,Kn,Qn,Jn,to,eo,io,no,oo=!1,so=!1,ro=[],lo=!1,ao=!1,co=[],uo=!1,po=[],ho="undefined"!=typeof document,go=Qi,mo=Xi||Yi?"cssFloat":"float",fo=ho&&!Ji&&!Qi&&"draggable"in document.createElement("div"),bo=function(){if(ho){if(Yi)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),vo=function(t,e){var i=cn(t),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),o=fn(t,0,e),s=fn(t,1,e),r=o&&cn(o),l=s&&cn(s),a=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+gn(o).width,d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+gn(s).width;if("flex"===i.display)return"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal";if("grid"===i.display)return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&r.float&&"none"!==r.float){var c="left"===r.float?"left":"right";return!s||"both"!==l.clear&&l.clear!==c?"horizontal":"vertical"}return o&&("block"===r.display||"flex"===r.display||"table"===r.display||"grid"===r.display||a>=n&&"none"===i[mo]||s&&"none"===i[mo]&&a+d>n)?"vertical":"horizontal"},yo=function(t){function e(t,i){return function(n,o,s,r){var l=n.options.group.name&&o.options.group.name&&n.options.group.name===o.options.group.name;if(null==t&&(i||l))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return e(t(n,o,s,r),i)(n,o,s,r);var a=(i?n:o).options.group.name;return!0===t||"string"==typeof t&&t===a||t.join&&t.indexOf(a)>-1}}var i={},n=t.group;n&&"object"==Ui(n)||(n={name:n}),i.name=n.name,i.checkPull=e(n.pull,!0),i.checkPut=e(n.put),i.revertClone=n.revertClone,t.group=i},xo=function(){!bo&&Nn&&cn(Nn,"display","none")},wo=function(){!bo&&Nn&&cn(Nn,"display","")};ho&&document.addEventListener("click",(function(t){if(so)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),so=!1,!1}),!0);var So=function(t){if(Rn){t=t.touches?t.touches[0]:t;var e=(o=t.clientX,s=t.clientY,ro.some((function(t){var e=t[kn].options.emptyInsertThreshold;if(e&&!bn(t)){var i=gn(t),n=o>=i.left-e&&o<=i.right+e,l=s>=i.top-e&&s<=i.bottom+e;return n&&l?r=t:void 0}})),r);if(e){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[kn]._onDragOver(i)}}var o,s,r},_o=function(t){Rn&&Rn.parentNode[kn]._isOutsideThisEl(t.target)};function Co(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=ji({},e),t[kn]=this;var i={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 vo(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!==Co.supportPointer&&"PointerEvent"in window&&!Ki,emptyInsertThreshold:5};for(var n in qn.initializePlugins(this,t,i),i)!(n in e)&&(e[n]=i[n]);for(var o in yo(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&fo,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?en(t,"pointerdown",this._onTapStart):(en(t,"mousedown",this._onTapStart),en(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(en(t,"dragover",this),en(t,"dragenter",this)),ro.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),ji(this,En())}function ko(t,e,i,n,o,s,r,l){var a,d,c=t[kn],u=c.options.onMove;return!window.CustomEvent||Yi||Xi?(a=document.createEvent("Event")).initEvent("move",!0,!0):a=new CustomEvent("move",{bubbles:!0,cancelable:!0}),a.to=e,a.from=t,a.dragged=i,a.draggedRect=n,a.related=o||e,a.relatedRect=s||gn(e),a.willInsertAfter=l,a.originalEvent=r,t.dispatchEvent(a),u&&(d=u.call(c,a,r)),d}function Eo(t){t.draggable=!1}function Ao(){uo=!1}function Lo(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,n=0;i--;)n+=e.charCodeAt(i);return n.toString(36)}function qo(t){return setTimeout(t,0)}function To(t){return clearTimeout(t)}Co.prototype={constructor:Co,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(to=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Rn):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,o=n.preventOnFilter,s=t.type,r=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(r||t).target,a=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,d=n.filter;if(function(t){po.length=0;var e=t.getElementsByTagName("input"),i=e.length;for(;i--;){var n=e[i];n.checked&&po.push(n)}}(i),!Rn&&!(/mousedown|pointerdown/.test(s)&&0!==t.button||n.disabled)&&!a.isContentEditable&&(this.nativeDraggable||!Ki||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=rn(l,n.draggable,i,!1))&&l.animated||Dn===l)){if(Hn=vn(l),Un=vn(l,n.draggable),"function"==typeof d){if(d.call(this,t,l,this))return On({sortable:e,rootEl:a,name:"filter",targetEl:l,toEl:i,fromEl:i}),Mn("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(d&&(d=d.split(",").some((function(n){if(n=rn(a,n.trim(),i,!1))return On({sortable:e,rootEl:n,name:"filter",targetEl:l,fromEl:i,toEl:i}),Mn("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());n.handle&&!rn(a,n.handle,i,!1)||this._prepareDragStart(t,r,l)}}},_prepareDragStart:function(t,e,i){var n,o=this,s=o.el,r=o.options,l=s.ownerDocument;if(i&&!Rn&&i.parentNode===s){var a=gn(i);if(In=s,Bn=(Rn=i).parentNode,$n=Rn.nextSibling,Dn=i,jn=r.group,Co.dragged=Rn,Vn={target:Rn,clientX:(e||t).clientX,clientY:(e||t).clientY},Kn=Vn.clientX-a.left,Qn=Vn.clientY-a.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Rn.style["will-change"]="all",n=function(){Mn("delayEnded",o,{evt:t}),Co.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!Zi&&o.nativeDraggable&&(Rn.draggable=!0),o._triggerDragStart(t,e),On({sortable:o,name:"choose",originalEvent:t}),dn(Rn,r.chosenClass,!0))},r.ignore.split(",").forEach((function(t){pn(Rn,t.trim(),Eo)})),en(l,"dragover",So),en(l,"mousemove",So),en(l,"touchmove",So),en(l,"mouseup",o._onDrop),en(l,"touchend",o._onDrop),en(l,"touchcancel",o._onDrop),Zi&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Rn.draggable=!0),Mn("delayStart",this,{evt:t}),!r.delay||r.delayOnTouchOnly&&!e||this.nativeDraggable&&(Xi||Yi))n();else{if(Co.eventCanceled)return void this._onDrop();en(l,"mouseup",o._disableDelayedDrag),en(l,"touchend",o._disableDelayedDrag),en(l,"touchcancel",o._disableDelayedDrag),en(l,"mousemove",o._delayedDragTouchMoveHandler),en(l,"touchmove",o._delayedDragTouchMoveHandler),r.supportPointer&&en(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(n,r.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(){Rn&&Eo(Rn),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;nn(t,"mouseup",this._disableDelayedDrag),nn(t,"touchend",this._disableDelayedDrag),nn(t,"touchcancel",this._disableDelayedDrag),nn(t,"mousemove",this._delayedDragTouchMoveHandler),nn(t,"touchmove",this._delayedDragTouchMoveHandler),nn(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?en(document,"pointermove",this._onTouchMove):en(document,e?"touchmove":"mousemove",this._onTouchMove):(en(Rn,"dragend",this),en(In,"dragstart",this._onDragStart));try{document.selection?qo((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(oo=!1,In&&Rn){Mn("dragStarted",this,{evt:e}),this.nativeDraggable&&en(document,"dragover",_o);var i=this.options;!t&&dn(Rn,i.dragClass,!1),dn(Rn,i.ghostClass,!0),Co.active=this,t&&this._appendGhost(),On({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Yn){this._lastX=Yn.clientX,this._lastY=Yn.clientY,xo();for(var t=document.elementFromPoint(Yn.clientX,Yn.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Yn.clientX,Yn.clientY))!==e;)e=t;if(Rn.parentNode[kn]._isOutsideThisEl(t),e)do{if(e[kn]){if(e[kn]._onDragOver({clientX:Yn.clientX,clientY:Yn.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);wo()}},_onTouchMove:function(t){if(Vn){var e=this.options,i=e.fallbackTolerance,n=e.fallbackOffset,o=t.touches?t.touches[0]:t,s=Nn&&un(Nn,!0),r=Nn&&s&&s.a,l=Nn&&s&&s.d,a=go&&no&&yn(no),d=(o.clientX-Vn.clientX+n.x)/(r||1)+(a?a[0]-co[0]:0)/(r||1),c=(o.clientY-Vn.clientY+n.y)/(l||1)+(a?a[1]-co[1]:0)/(l||1);if(!Co.active&&!oo){if(i&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(Nn){s?(s.e+=d-(Xn||0),s.f+=c-(Zn||0)):s={a:1,b:0,c:0,d:1,e:d,f:c};var u="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");cn(Nn,"webkitTransform",u),cn(Nn,"mozTransform",u),cn(Nn,"msTransform",u),cn(Nn,"transform",u),Xn=d,Zn=c,Yn=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Nn){var t=this.options.fallbackOnBody?document.body:In,e=gn(Rn,!0,go,!0,t),i=this.options;if(go){for(no=t;"static"===cn(no,"position")&&"none"===cn(no,"transform")&&no!==document;)no=no.parentNode;no!==document.body&&no!==document.documentElement?(no===document&&(no=hn()),e.top+=no.scrollTop,e.left+=no.scrollLeft):no=hn(),co=yn(no)}dn(Nn=Rn.cloneNode(!0),i.ghostClass,!1),dn(Nn,i.fallbackClass,!0),dn(Nn,i.dragClass,!0),cn(Nn,"transition",""),cn(Nn,"transform",""),cn(Nn,"box-sizing","border-box"),cn(Nn,"margin",0),cn(Nn,"top",e.top),cn(Nn,"left",e.left),cn(Nn,"width",e.width),cn(Nn,"height",e.height),cn(Nn,"opacity","0.8"),cn(Nn,"position",go?"absolute":"fixed"),cn(Nn,"zIndex","100000"),cn(Nn,"pointerEvents","none"),Co.ghost=Nn,t.appendChild(Nn),cn(Nn,"transform-origin",Kn/parseInt(Nn.style.width)*100+"% "+Qn/parseInt(Nn.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,n=t.dataTransfer,o=i.options;Mn("dragStart",this,{evt:t}),Co.eventCanceled?this._onDrop():(Mn("setupClone",this),Co.eventCanceled||((Pn=Cn(Rn)).draggable=!1,Pn.style["will-change"]="",this._hideClone(),dn(Pn,this.options.chosenClass,!1),Co.clone=Pn),i.cloneId=qo((function(){Mn("clone",i),Co.eventCanceled||(i.options.removeCloneOnHide||In.insertBefore(Pn,Rn),i._hideClone(),On({sortable:i,name:"clone"}))})),!e&&dn(Rn,o.dragClass,!0),e?(so=!0,i._loopId=setInterval(i._emulateDragOver,50)):(nn(document,"mouseup",i._onDrop),nn(document,"touchend",i._onDrop),nn(document,"touchcancel",i._onDrop),n&&(n.effectAllowed="move",o.setData&&o.setData.call(i,n,Rn)),en(document,"drop",i),cn(Rn,"transform","translateZ(0)")),oo=!0,i._dragStartId=qo(i._dragStarted.bind(i,e,t)),en(document,"selectstart",i),Jn=!0,Ki&&cn(document.body,"user-select","none"))},_onDragOver:function(t){var e,i,n,o,s=this.el,r=t.target,l=this.options,a=l.group,d=Co.active,c=jn===a,u=l.sort,p=Gn||d,h=this,g=!1;if(!uo){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),r=rn(r,l.draggable,s,!0),q("dragOver"),Co.eventCanceled)return g;if(Rn.contains(t.target)||r.animated&&r.animatingX&&r.animatingY||h._ignoreWhileAnimating===r)return M(!1);if(so=!1,d&&!l.disabled&&(c?u||(n=Bn!==In):Gn===this||(this.lastPutMode=jn.checkPull(this,d,Rn,t))&&a.checkPut(this,d,Rn,t))){if(o="vertical"===this._getDirection(t,r),e=gn(Rn),q("dragOverValid"),Co.eventCanceled)return g;if(n)return Bn=In,T(),this._hideClone(),q("revert"),Co.eventCanceled||($n?In.insertBefore(Rn,$n):In.appendChild(Rn)),M(!0);var m=bn(s,l.draggable);if(!m||function(t,e,i){var n=gn(bn(i.el,i.options.draggable)),o=10;return e?t.clientX>n.right+o||t.clientX<=n.right&&t.clientY>n.bottom&&t.clientX>=n.left:t.clientX>n.right&&t.clientY>n.top||t.clientX<=n.right&&t.clientY>n.bottom+o}(t,o,this)&&!m.animated){if(m===Rn)return M(!1);if(m&&s===t.target&&(r=m),r&&(i=gn(r)),!1!==ko(In,s,Rn,e,r,i,t,!!r))return T(),s.appendChild(Rn),Bn=s,O(),M(!0)}else if(m&&function(t,e,i){var n=gn(fn(i.el,0,i.options,!0)),o=10;return e?t.clientX<n.left-o||t.clientY<n.top&&t.clientX<n.right:t.clientY<n.top-o||t.clientY<n.bottom&&t.clientX<n.left}(t,o,this)){var f=fn(s,0,l,!0);if(f===Rn)return M(!1);if(i=gn(r=f),!1!==ko(In,s,Rn,e,r,i,t,!1))return T(),s.insertBefore(Rn,f),Bn=s,O(),M(!0)}else if(r.parentNode===s){i=gn(r);var b,v,y,x=Rn.parentNode!==s,w=!function(t,e,i){var n=i?t.left:t.top,o=i?t.right:t.bottom,s=i?t.width:t.height,r=i?e.left:e.top,l=i?e.right:e.bottom,a=i?e.width:e.height;return n===r||o===l||n+s/2===r+a/2}(Rn.animated&&Rn.toRect||e,r.animated&&r.toRect||i,o),S=o?"top":"left",_=mn(r,"top","top")||mn(Rn,"top","top"),C=_?_.scrollTop:void 0;if(to!==r&&(v=i[S],lo=!1,ao=!w&&l.invertSwap||x),b=function(t,e,i,n,o,s,r,l){var a=n?t.clientY:t.clientX,d=n?i.height:i.width,c=n?i.top:i.left,u=n?i.bottom:i.right,p=!1;if(!r)if(l&&io<d*o){if(!lo&&(1===eo?a>c+d*s/2:a<u-d*s/2)&&(lo=!0),lo)p=!0;else if(1===eo?a<c+io:a>u-io)return-eo}else if(a>c+d*(1-o)/2&&a<u-d*(1-o)/2)return function(t){return vn(Rn)<vn(t)?1:-1}(e);if(p=p||r,p&&(a<c+d*s/2||a>u-d*s/2))return a>c+d/2?1:-1;return 0}(t,r,i,o,w?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,ao,to===r),0!==b){var k=vn(Rn);do{k-=b,y=Bn.children[k]}while(y&&("none"===cn(y,"display")||y===Nn))}if(0===b||y===r)return M(!1);to=r,eo=b;var E=r.nextElementSibling,A=!1,L=ko(In,s,Rn,e,r,i,t,A=1===b);if(!1!==L)return 1!==L&&-1!==L||(A=1===L),uo=!0,setTimeout(Ao,30),T(),A&&!E?s.appendChild(Rn):r.parentNode.insertBefore(Rn,A?E:r),_&&_n(_,0,C-_.scrollTop),Bn=Rn.parentNode,void 0===v||ao||(io=Math.abs(v-gn(r)[S])),O(),M(!0)}if(s.contains(Rn))return M(!1)}return!1}function q(l,a){Mn(l,h,Fi({evt:t,isOwner:c,axis:o?"vertical":"horizontal",revert:n,dragRect:e,targetRect:i,canSort:u,fromSortable:p,target:r,completed:M,onMove:function(i,n){return ko(In,s,Rn,e,i,gn(i),t,n)},changed:O},a))}function T(){q("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function M(e){return q("dragOverCompleted",{insertion:e}),e&&(c?d._hideClone():d._showClone(h),h!==p&&(dn(Rn,Gn?Gn.options.ghostClass:d.options.ghostClass,!1),dn(Rn,l.ghostClass,!0)),Gn!==h&&h!==Co.active?Gn=h:h===Co.active&&Gn&&(Gn=null),p===h&&(h._ignoreWhileAnimating=r),h.animateAll((function(){q("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(r===Rn&&!Rn.animated||r===s&&!r.animated)&&(to=null),l.dragoverBubble||t.rootEl||r===document||(Rn.parentNode[kn]._isOutsideThisEl(t.target),!e&&So(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function O(){Fn=vn(Rn),Wn=vn(Rn,l.draggable),On({sortable:h,name:"change",toEl:s,newIndex:Fn,newDraggableIndex:Wn,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){nn(document,"mousemove",this._onTouchMove),nn(document,"touchmove",this._onTouchMove),nn(document,"pointermove",this._onTouchMove),nn(document,"dragover",So),nn(document,"mousemove",So),nn(document,"touchmove",So)},_offUpEvents:function(){var t=this.el.ownerDocument;nn(t,"mouseup",this._onDrop),nn(t,"touchend",this._onDrop),nn(t,"pointerup",this._onDrop),nn(t,"touchcancel",this._onDrop),nn(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;Fn=vn(Rn),Wn=vn(Rn,i.draggable),Mn("drop",this,{evt:t}),Bn=Rn&&Rn.parentNode,Fn=vn(Rn),Wn=vn(Rn,i.draggable),Co.eventCanceled||(oo=!1,ao=!1,lo=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),To(this.cloneId),To(this._dragStartId),this.nativeDraggable&&(nn(document,"drop",this),nn(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ki&&cn(document.body,"user-select",""),cn(Rn,"transform",""),t&&(Jn&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),Nn&&Nn.parentNode&&Nn.parentNode.removeChild(Nn),(In===Bn||Gn&&"clone"!==Gn.lastPutMode)&&Pn&&Pn.parentNode&&Pn.parentNode.removeChild(Pn),Rn&&(this.nativeDraggable&&nn(Rn,"dragend",this),Eo(Rn),Rn.style["will-change"]="",Jn&&!oo&&dn(Rn,Gn?Gn.options.ghostClass:this.options.ghostClass,!1),dn(Rn,this.options.chosenClass,!1),On({sortable:this,name:"unchoose",toEl:Bn,newIndex:null,newDraggableIndex:null,originalEvent:t}),In!==Bn?(Fn>=0&&(On({rootEl:Bn,name:"add",toEl:Bn,fromEl:In,originalEvent:t}),On({sortable:this,name:"remove",toEl:Bn,originalEvent:t}),On({rootEl:Bn,name:"sort",toEl:Bn,fromEl:In,originalEvent:t}),On({sortable:this,name:"sort",toEl:Bn,originalEvent:t})),Gn&&Gn.save()):Fn!==Hn&&Fn>=0&&(On({sortable:this,name:"update",toEl:Bn,originalEvent:t}),On({sortable:this,name:"sort",toEl:Bn,originalEvent:t})),Co.active&&(null!=Fn&&-1!==Fn||(Fn=Hn,Wn=Un),On({sortable:this,name:"end",toEl:Bn,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Mn("nulling",this),In=Rn=Bn=Nn=$n=Pn=Dn=zn=Vn=Yn=Jn=Fn=Wn=Hn=Un=to=eo=Gn=jn=Co.dragged=Co.ghost=Co.clone=Co.active=null,po.forEach((function(t){t.checked=!0})),po.length=Xn=Zn=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Rn&&(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=[],i=this.el.children,n=0,o=i.length,s=this.options;n<o;n++)rn(t=i[n],s.draggable,this.el,!1)&&e.push(t.getAttribute(s.dataIdAttr)||Lo(t));return e},sort:function(t,e){var i={},n=this.el;this.toArray().forEach((function(t,e){var o=n.children[e];rn(o,this.options.draggable,n,!1)&&(i[t]=o)}),this),e&&this.captureAnimationState(),t.forEach((function(t){i[t]&&(n.removeChild(i[t]),n.appendChild(i[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return rn(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(void 0===e)return i[t];var n=qn.modifyOption(this,t,e);i[t]=void 0!==n?n:e,"group"===t&&yo(i)},destroy:function(){Mn("destroy",this);var t=this.el;t[kn]=null,nn(t,"mousedown",this._onTapStart),nn(t,"touchstart",this._onTapStart),nn(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(nn(t,"dragover",this),nn(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),ro.splice(ro.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!zn){if(Mn("hideClone",this),Co.eventCanceled)return;cn(Pn,"display","none"),this.options.removeCloneOnHide&&Pn.parentNode&&Pn.parentNode.removeChild(Pn),zn=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(zn){if(Mn("showClone",this),Co.eventCanceled)return;Rn.parentNode!=In||this.options.group.revertClone?$n?In.insertBefore(Pn,$n):In.appendChild(Pn):In.insertBefore(Pn,Rn),this.options.group.revertClone&&this.animate(Rn,Pn),cn(Pn,"display",""),zn=!1}}else this._hideClone()}},ho&&en(document,"touchmove",(function(t){(Co.active||oo)&&t.cancelable&&t.preventDefault()})),Co.utils={on:en,off:nn,css:cn,find:pn,is:function(t,e){return!!rn(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},throttle:Sn,closest:rn,toggleClass:dn,clone:Cn,index:vn,nextTick:qo,cancelNextTick:To,detectDirection:vo,getChild:fn},Co.get=function(t){return t[kn]},Co.mount=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];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&&(Co.utils=Fi(Fi({},Co.utils),t.utils)),qn.mount(t)}))},Co.create=function(t,e){return new Co(t,e)},Co.version="1.14.0";var Mo,Oo,Ro,Bo,No,Io,$o=[],Do=!1;function Po(){$o.forEach((function(t){clearInterval(t.pid)})),$o=[]}function zo(){clearInterval(Io)}var Ho=Sn((function(t,e,i,n){if(e.scroll){var o,s=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,a=e.scrollSpeed,d=hn(),c=!1;Oo!==i&&(Oo=i,Po(),Mo=e.scroll,o=e.scrollFn,!0===Mo&&(Mo=xn(i,!0)));var u=0,p=Mo;do{var h=p,g=gn(h),m=g.top,f=g.bottom,b=g.left,v=g.right,y=g.width,x=g.height,w=void 0,S=void 0,_=h.scrollWidth,C=h.scrollHeight,k=cn(h),E=h.scrollLeft,A=h.scrollTop;h===d?(w=y<_&&("auto"===k.overflowX||"scroll"===k.overflowX||"visible"===k.overflowX),S=x<C&&("auto"===k.overflowY||"scroll"===k.overflowY||"visible"===k.overflowY)):(w=y<_&&("auto"===k.overflowX||"scroll"===k.overflowX),S=x<C&&("auto"===k.overflowY||"scroll"===k.overflowY));var L=w&&(Math.abs(v-s)<=l&&E+y<_)-(Math.abs(b-s)<=l&&!!E),q=S&&(Math.abs(f-r)<=l&&A+x<C)-(Math.abs(m-r)<=l&&!!A);if(!$o[u])for(var T=0;T<=u;T++)$o[T]||($o[T]={});$o[u].vx==L&&$o[u].vy==q&&$o[u].el===h||($o[u].el=h,$o[u].vx=L,$o[u].vy=q,clearInterval($o[u].pid),0==L&&0==q||(c=!0,$o[u].pid=setInterval(function(){n&&0===this.layer&&Co.active._onTouchMove(No);var e=$o[this.layer].vy?$o[this.layer].vy*a:0,i=$o[this.layer].vx?$o[this.layer].vx*a:0;"function"==typeof o&&"continue"!==o.call(Co.dragged.parentNode[kn],i,e,t,No,$o[this.layer].el)||_n($o[this.layer].el,i,e)}.bind({layer:u}),24))),u++}while(e.bubbleScroll&&p!==d&&(p=xn(p,!1)));Do=c}}),30),Fo=function(t){var e=t.originalEvent,i=t.putSortable,n=t.dragEl,o=t.activeSortable,s=t.dispatchSortableEvent,r=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var a=i||o;r();var d=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(d.clientX,d.clientY);l(),a&&!a.el.contains(c)&&(s("spill"),this.onSpill({dragEl:n,putSortable:i}))}};function Uo(){}function Wo(){}Uo.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var n=fn(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(e,n):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:Fo},ji(Uo,{pluginName:"revertOnSpill"}),Wo.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable||this.sortable;i.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),i.animateAll()},drop:Fo},ji(Wo,{pluginName:"removeOnSpill"}),Co.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?en(document,"dragover",this._handleAutoScroll):this.options.supportPointer?en(document,"pointermove",this._handleFallbackAutoScroll):e.touches?en(document,"touchmove",this._handleFallbackAutoScroll):en(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?nn(document,"dragover",this._handleAutoScroll):(nn(document,"pointermove",this._handleFallbackAutoScroll),nn(document,"touchmove",this._handleFallbackAutoScroll),nn(document,"mousemove",this._handleFallbackAutoScroll)),zo(),Po(),clearTimeout(ln),ln=void 0},nulling:function(){No=Oo=Mo=Do=Io=Ro=Bo=null,$o.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var i=this,n=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,s=document.elementFromPoint(n,o);if(No=t,e||this.options.forceAutoScrollFallback||Xi||Yi||Ki){Ho(t,this.options,s,e);var r=xn(s,!0);!Do||Io&&n===Ro&&o===Bo||(Io&&zo(),Io=setInterval((function(){var s=xn(document.elementFromPoint(n,o),!0);s!==r&&(r=s,Po()),Ho(t,i.options,s,e)}),10),Ro=n,Bo=o)}else{if(!this.options.bubbleScroll||xn(s,!0)===hn())return void Po();Ho(t,this.options,xn(s,!1),!1)}}},ji(t,{pluginName:"scroll",initializeByDefault:!0})}),Co.mount(Wo,Uo);const jo=new o;class Go{constructor(t){const[e,i]=t.children,n=e=>{if(!t)return document.removeEventListener("click",n);t.contains(e.target)||this.toggle(!1)},o=n=>{const o=n.textContent,s=n.getAttribute("data-value");e.textContent=o,this.value=s,this.toggle(!1),t.dispatchEvent(new Event("change")),e.focus(),jo.elementChildren(i).forEach((t=>{jo.removeClass(t,"selected")}));let r=i.querySelector('[data-value="'+s+'"]');r&&jo.addClass(r,"selected")},s=t=>{t.preventDefault(),38===t.keyCode&&t.target.previousElementSibling?t.target.previousElementSibling.focus():40===t.keyCode&&t.target.nextElementSibling?t.target.nextElementSibling.focus():27===t.keyCode?(this.toggle(!1),e.focus()):13!==t.keyCode&&32!==t.keyCode||o(t.target)};e.addEventListener("keydown",(t=>{27===t.keyCode?(this.toggle(!1),t.preventDefault()):13!==t.keyCode&&32!==t.keyCode||(this.toggle(!0),t.preventDefault())})),e.addEventListener("click",(()=>this.toggle())),[...i.children].forEach((t=>{t.addEventListener("keydown",s),t.addEventListener("click",(()=>o(t)))})),this.element=t,this.value=e.getAttribute("data-value"),this.toggle=(o=null)=>{if(o=null===o?"true"!==i.getAttribute("aria-expanded"):o,i.setAttribute("aria-expanded",o),o){e.classList.add("active");let o=i.querySelector('[data-value="'+this.value+'"]');o&&(jo.addClass(o,"selected"),o.focus()),document.addEventListener("click",n),t.dispatchEvent(new Event("opened"))}else e.classList.remove("active"),t.dispatchEvent(new Event("closed")),document.removeEventListener("click",n)}}}const Vo=t=>{const e=t.util,i=t.builderStuff,n=t.dom;let o="",s=t.opts.sidePanel;if("#divSnippetList"===t.opts.snippetList){const r=`<div id="divSnippetList" class="is-side ${"right"===s?"":" fromleft"} snippetlist scroll-darker" tabindex="-1" role="dialog" aria-modal="true" title="${e.out("Snippets")}">\n </div>`;n.appendHtml(i,r),t.opts.snippetHandle||(o="display:none;")}else o="display:none;",s="left";let r="",l="",a="";if(t.opts.emailMode){l=t.opts.defaultEmailSnippetCategory;for(let e=0;e<t.opts.emailSnippetCategories.length;e++)a+='<li role="option" tabindex="0" data-value="'+t.opts.emailSnippetCategories[e][0]+'">'+t.opts.emailSnippetCategories[e][1]+"</li>",t.opts.emailSnippetCategories[e][0]===t.opts.defaultEmailSnippetCategory&&(r=t.opts.emailSnippetCategories[e][1])}else{l=t.opts.defaultSnippetCategory;for(let e=0;e<t.opts.snippetCategories.length;e++)a+='<li role="option" tabindex="0" data-value="'+t.opts.snippetCategories[e][0]+'">'+t.opts.snippetCategories[e][1]+"</li>",t.opts.snippetCategories[e][0]===t.opts.defaultSnippetCategory&&(r=t.opts.snippetCategories[e][1])}let d='<div class="is-dropdown selectsnippet" style="position:absolute;top:0;right:0;padding: 0;width:100%;z-index:2;"><button tabindex="0" class="dropdown-toggle no-outline" title="'+e.out("Snippet Categories")+'" type="button" aria-haspopup="true" data-value="'+l+'"><span>'+r+'</span></button><ul class="dropdown-menu" role="listbox" title="'+e.out("Snippets")+'" aria-expanded="false">'+a+"</ul></div>"+("right"===s?'<div id="divSnippetScrollUp" role="button" tabindex="-1" style="top:calc(50% - 27px);right:25px;">▲</div><div id="divSnippetScrollDown" role="button" tabindex="-1" style="top:calc(50% + 27px);right:25px;">▼</div><div id="divSnippetHandle" role="button" tabindex="-1" title="'+e.out("Snippets")+'" data-title="'+e.out("Snippets")+'" style="'+o+'"><svg class="is-icon-flex"><use xlink:href="#ion-ios-arrow-left"></use></svg></div>':'<div id="divSnippetScrollUp" role="button" tabindex="-1" style="top:calc(50% - 27px);left:10px;">▲</div><div id="divSnippetScrollDown" role="button" tabindex="-1" style="top:calc(50% + 27px);left:10px;">▼</div><div id="divSnippetHandle" role="button" tabindex="-1" title="'+e.out("Snippets")+'" data-title="'+e.out("Snippets")+'" style="'+o+'"><svg class="is-icon-flex"><use xlink:href="#ion-ios-arrow-right"></use></svg></div>')+'<div class="is-design-list" tabindex="0"></div>',c=document.querySelector(t.opts.snippetList);n.appendHtml(c,d);const u=new Go(c.querySelector(".selectsnippet"));u.element.addEventListener("change",(()=>{let i=u.value,o=p.querySelectorAll(".snippet-item"),s=!1;Array.prototype.forEach.call(o,(t=>{t.getAttribute("data-cat")===i&&(s=!0)})),s||t.opts.snippetJSON.snippets.forEach((t=>{t.category===i&&n.appendHtml(p,'<div class="snippet-item" data-id="'+t.id+'" data-cat="'+t.category+'"><img alt="'+e.out("Snippet")+'" alt="" src="'+h+t.thumbnail+'"><span class="is-overlay"></span></div>')})),i&&(Array.prototype.forEach.call(o,(t=>{n.addClass(t,"hide")})),Array.prototype.forEach.call(o,(t=>{t.getAttribute("data-cat")===i&&(t.className=t.className.replace(/hide/g,""))})))})),u.toggle(!1),"#divSnippetList"===t.opts.snippetList&&(c.querySelector(".selectsnippet").style.display="none",c.querySelector(".is-design-list").style.display="none",t.doc.addEventListener("click",t.doHideSnippetHandler=e=>{var i=(e=e||window.event).target||e.srcElement;if("auto"===t.opts.snippetsSidebarDisplay&&n.hasClass(c,"active")){n.parentsHasClass(i,"is-builder")&&function(t){const e=t.dom;let i=document.querySelector("#divSnippetList");const n=i.querySelector("#divSnippetHandle");e.removeClass(i,"active"),"right"===t.opts.sidePanel?n.innerHTML='<svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#ion-ios-arrow-left"></use></svg>':n.innerHTML='<svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#ion-ios-arrow-right"></use></svg>';setTimeout((()=>{i.querySelector(".selectsnippet").style.display="none",i.querySelector(".is-design-list").style.display="none"}),300)}
|
20
|
+
function Hi(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Fi(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Hi(Object(i),!0).forEach((function(e){Wi(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Hi(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Ui(t){return Ui="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},Ui(t)}function Wi(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function ji(){return ji=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},ji.apply(this,arguments)}function Gi(t,e){if(null==t)return{};var i,n,o=function(t,e){if(null==t)return{};var i,n,o={},s=Object.keys(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||(o[i]=t[i]);return o}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(o[i]=t[i])}return o}function Vi(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var Yi=Vi(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Xi=Vi(/Edge/i),Zi=Vi(/firefox/i),Ki=Vi(/safari/i)&&!Vi(/chrome/i)&&!Vi(/android/i),Qi=Vi(/iP(ad|od|hone)/i),Ji=Vi(/chrome/i)&&Vi(/android/i),tn={capture:!1,passive:!1};function en(t,e,i){t.addEventListener(e,i,!Yi&&tn)}function nn(t,e,i){t.removeEventListener(e,i,!Yi&&tn)}function on(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 sn(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function rn(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&on(t,e):on(t,e))||n&&t===i)return t;if(t===i)break}while(t=sn(t))}return null}var ln,an=/\s+/g;function dn(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(an," ").replace(" "+e+" "," ");t.className=(n+(i?" "+e:"")).replace(an," ")}}function cn(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=i+("string"==typeof i?"":"px")}}function un(t,e){var i="";if("string"==typeof t)i=t;else do{var n=cn(t,"transform");n&&"none"!==n&&(i=n+" "+i)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(i)}function pn(t,e,i){if(t){var n=t.getElementsByTagName(e),o=0,s=n.length;if(i)for(;o<s;o++)i(n[o],o);return n}return[]}function hn(){var t=document.scrollingElement;return t||document.documentElement}function gn(t,e,i,n,o){if(t.getBoundingClientRect||t===window){var s,r,l,a,d,c,u;if(t!==window&&t.parentNode&&t!==hn()?(r=(s=t.getBoundingClientRect()).top,l=s.left,a=s.bottom,d=s.right,c=s.height,u=s.width):(r=0,l=0,a=window.innerHeight,d=window.innerWidth,c=window.innerHeight,u=window.innerWidth),(e||i)&&t!==window&&(o=o||t.parentNode,!Yi))do{if(o&&o.getBoundingClientRect&&("none"!==cn(o,"transform")||i&&"static"!==cn(o,"position"))){var p=o.getBoundingClientRect();r-=p.top+parseInt(cn(o,"border-top-width")),l-=p.left+parseInt(cn(o,"border-left-width")),a=r+s.height,d=l+s.width;break}}while(o=o.parentNode);if(n&&t!==window){var h=un(o||t),g=h&&h.a,m=h&&h.d;h&&(a=(r/=m)+(c/=m),d=(l/=g)+(u/=g))}return{top:r,left:l,bottom:a,right:d,width:u,height:c}}}function mn(t,e,i){for(var n=xn(t,!0),o=gn(t)[e];n;){var s=gn(n)[i];if(!("top"===i||"left"===i?o>=s:o<=s))return n;if(n===hn())break;n=xn(n,!1)}return!1}function fn(t,e,i,n){for(var o=0,s=0,r=t.children;s<r.length;){if("none"!==r[s].style.display&&r[s]!==Co.ghost&&(n||r[s]!==Co.dragged)&&rn(r[s],i.draggable,t,!1)){if(o===e)return r[s];o++}s++}return null}function bn(t,e){for(var i=t.lastElementChild;i&&(i===Co.ghost||"none"===cn(i,"display")||e&&!on(i,e));)i=i.previousElementSibling;return i||null}function vn(t,e){var i=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Co.clone||e&&!on(t,e)||i++;return i}function yn(t){var e=0,i=0,n=hn();if(t)do{var o=un(t),s=o.a,r=o.d;e+=t.scrollLeft*s,i+=t.scrollTop*r}while(t!==n&&(t=t.parentNode));return[e,i]}function xn(t,e){if(!t||!t.getBoundingClientRect)return hn();var i=t,n=!1;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var o=cn(i);if(i.clientWidth<i.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||i.clientHeight<i.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!i.getBoundingClientRect||i===document.body)return hn();if(n||e)return i;n=!0}}}while(i=i.parentNode);return hn()}function wn(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 Sn(t,e){return function(){if(!ln){var i=arguments;1===i.length?t.call(this,i[0]):t.apply(this,i),ln=setTimeout((function(){ln=void 0}),e)}}}function _n(t,e,i){t.scrollLeft+=e,t.scrollTop+=i}function Cn(t){var e=window.Polymer,i=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):i?i(t).clone(!0)[0]:t.cloneNode(!0)}var kn="Sortable"+(new Date).getTime();function En(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==cn(t,"display")&&t!==Co.ghost){e.push({target:t,rect:gn(t)});var i=Fi({},e[e.length-1].rect);if(t.thisAnimationDuration){var n=un(t,!0);n&&(i.top-=n.f,i.left-=n.e)}t.fromRect=i}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var i in t)if(t.hasOwnProperty(i))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[i][n])return Number(i);return-1}(e,{target:t}),1)},animateAll:function(i){var n=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof i&&i());var o=!1,s=0;e.forEach((function(t){var e=0,i=t.target,r=i.fromRect,l=gn(i),a=i.prevFromRect,d=i.prevToRect,c=t.rect,u=un(i,!0);u&&(l.top-=u.f,l.left-=u.e),i.toRect=l,i.thisAnimationDuration&&wn(a,l)&&!wn(r,l)&&(c.top-l.top)/(c.left-l.left)==(r.top-l.top)/(r.left-l.left)&&(e=function(t,e,i,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))*n.animation}(c,a,d,n.options)),wn(l,r)||(i.prevFromRect=r,i.prevToRect=l,e||(e=n.options.animation),n.animate(i,c,l,e)),e&&(o=!0,s=Math.max(s,e),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout((function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null}),e),i.thisAnimationDuration=e)})),clearTimeout(t),o?t=setTimeout((function(){"function"==typeof i&&i()}),s):"function"==typeof i&&i(),e=[]},animate:function(t,e,i,n){if(n){cn(t,"transition",""),cn(t,"transform","");var o=un(this.el),s=o&&o.a,r=o&&o.d,l=(e.left-i.left)/(s||1),a=(e.top-i.top)/(r||1);t.animatingX=!!l,t.animatingY=!!a,cn(t,"transform","translate3d("+l+"px,"+a+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),cn(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),cn(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){cn(t,"transition",""),cn(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n)}}}}var An=[],Ln={initializeByDefault:!0},qn={mount:function(t){for(var e in Ln)Ln.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ln[e]);An.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),An.push(t)},pluginEvent:function(t,e,i){var n=this;this.eventCanceled=!1,i.cancel=function(){n.eventCanceled=!0};var o=t+"Global";An.forEach((function(n){e[n.pluginName]&&(e[n.pluginName][o]&&e[n.pluginName][o](Fi({sortable:e},i)),e.options[n.pluginName]&&e[n.pluginName][t]&&e[n.pluginName][t](Fi({sortable:e},i)))}))},initializePlugins:function(t,e,i,n){for(var o in An.forEach((function(n){var o=n.pluginName;if(t.options[o]||n.initializeByDefault){var s=new n(t,e,t.options);s.sortable=t,s.options=t.options,t[o]=s,ji(i,s.defaults)}})),t.options)if(t.options.hasOwnProperty(o)){var s=this.modifyOption(t,o,t.options[o]);void 0!==s&&(t.options[o]=s)}},getEventProperties:function(t,e){var i={};return An.forEach((function(n){"function"==typeof n.eventProperties&&ji(i,n.eventProperties.call(e[n.pluginName],t))})),i},modifyOption:function(t,e,i){var n;return An.forEach((function(o){t[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[e]&&(n=o.optionListeners[e].call(t[o.pluginName],i))})),n}};var Tn=["evt"],Mn=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.evt,o=Gi(i,Tn);qn.pluginEvent.bind(Co)(t,e,Fi({dragEl:Rn,parentEl:Bn,ghostEl:Nn,rootEl:In,nextEl:$n,lastDownEl:Dn,cloneEl:Pn,cloneHidden:zn,dragStarted:Jn,putSortable:Gn,activeSortable:Co.active,originalEvent:n,oldIndex:Hn,oldDraggableIndex:Un,newIndex:Fn,newDraggableIndex:Wn,hideGhostForTarget:xo,unhideGhostForTarget:wo,cloneNowHidden:function(){zn=!0},cloneNowShown:function(){zn=!1},dispatchSortableEvent:function(t){On({sortable:e,name:t,originalEvent:n})}},o))};function On(t){!function(t){var e=t.sortable,i=t.rootEl,n=t.name,o=t.targetEl,s=t.cloneEl,r=t.toEl,l=t.fromEl,a=t.oldIndex,d=t.newIndex,c=t.oldDraggableIndex,u=t.newDraggableIndex,p=t.originalEvent,h=t.putSortable,g=t.extraEventProperties;if(e=e||i&&i[kn]){var m,f=e.options,b="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||Yi||Xi?(m=document.createEvent("Event")).initEvent(n,!0,!0):m=new CustomEvent(n,{bubbles:!0,cancelable:!0}),m.to=r||i,m.from=l||i,m.item=o||i,m.clone=s,m.oldIndex=a,m.newIndex=d,m.oldDraggableIndex=c,m.newDraggableIndex=u,m.originalEvent=p,m.pullMode=h?h.lastPutMode:void 0;var v=Fi(Fi({},g),qn.getEventProperties(n,e));for(var y in v)m[y]=v[y];i&&i.dispatchEvent(m),f[b]&&f[b].call(e,m)}}(Fi({putSortable:Gn,cloneEl:Pn,targetEl:Rn,rootEl:In,oldIndex:Hn,oldDraggableIndex:Un,newIndex:Fn,newDraggableIndex:Wn},t))}var Rn,Bn,Nn,In,$n,Dn,Pn,zn,Hn,Fn,Un,Wn,jn,Gn,Vn,Yn,Xn,Zn,Kn,Qn,Jn,to,eo,io,no,oo=!1,so=!1,ro=[],lo=!1,ao=!1,co=[],uo=!1,po=[],ho="undefined"!=typeof document,go=Qi,mo=Xi||Yi?"cssFloat":"float",fo=ho&&!Ji&&!Qi&&"draggable"in document.createElement("div"),bo=function(){if(ho){if(Yi)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),vo=function(t,e){var i=cn(t),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),o=fn(t,0,e),s=fn(t,1,e),r=o&&cn(o),l=s&&cn(s),a=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+gn(o).width,d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+gn(s).width;if("flex"===i.display)return"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal";if("grid"===i.display)return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&r.float&&"none"!==r.float){var c="left"===r.float?"left":"right";return!s||"both"!==l.clear&&l.clear!==c?"horizontal":"vertical"}return o&&("block"===r.display||"flex"===r.display||"table"===r.display||"grid"===r.display||a>=n&&"none"===i[mo]||s&&"none"===i[mo]&&a+d>n)?"vertical":"horizontal"},yo=function(t){function e(t,i){return function(n,o,s,r){var l=n.options.group.name&&o.options.group.name&&n.options.group.name===o.options.group.name;if(null==t&&(i||l))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return e(t(n,o,s,r),i)(n,o,s,r);var a=(i?n:o).options.group.name;return!0===t||"string"==typeof t&&t===a||t.join&&t.indexOf(a)>-1}}var i={},n=t.group;n&&"object"==Ui(n)||(n={name:n}),i.name=n.name,i.checkPull=e(n.pull,!0),i.checkPut=e(n.put),i.revertClone=n.revertClone,t.group=i},xo=function(){!bo&&Nn&&cn(Nn,"display","none")},wo=function(){!bo&&Nn&&cn(Nn,"display","")};ho&&document.addEventListener("click",(function(t){if(so)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),so=!1,!1}),!0);var So=function(t){if(Rn){t=t.touches?t.touches[0]:t;var e=(o=t.clientX,s=t.clientY,ro.some((function(t){var e=t[kn].options.emptyInsertThreshold;if(e&&!bn(t)){var i=gn(t),n=o>=i.left-e&&o<=i.right+e,l=s>=i.top-e&&s<=i.bottom+e;return n&&l?r=t:void 0}})),r);if(e){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[kn]._onDragOver(i)}}var o,s,r},_o=function(t){Rn&&Rn.parentNode[kn]._isOutsideThisEl(t.target)};function Co(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=ji({},e),t[kn]=this;var i={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 vo(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!==Co.supportPointer&&"PointerEvent"in window&&!Ki,emptyInsertThreshold:5};for(var n in qn.initializePlugins(this,t,i),i)!(n in e)&&(e[n]=i[n]);for(var o in yo(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&fo,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?en(t,"pointerdown",this._onTapStart):(en(t,"mousedown",this._onTapStart),en(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(en(t,"dragover",this),en(t,"dragenter",this)),ro.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),ji(this,En())}function ko(t,e,i,n,o,s,r,l){var a,d,c=t[kn],u=c.options.onMove;return!window.CustomEvent||Yi||Xi?(a=document.createEvent("Event")).initEvent("move",!0,!0):a=new CustomEvent("move",{bubbles:!0,cancelable:!0}),a.to=e,a.from=t,a.dragged=i,a.draggedRect=n,a.related=o||e,a.relatedRect=s||gn(e),a.willInsertAfter=l,a.originalEvent=r,t.dispatchEvent(a),u&&(d=u.call(c,a,r)),d}function Eo(t){t.draggable=!1}function Ao(){uo=!1}function Lo(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,n=0;i--;)n+=e.charCodeAt(i);return n.toString(36)}function qo(t){return setTimeout(t,0)}function To(t){return clearTimeout(t)}Co.prototype={constructor:Co,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(to=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Rn):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,o=n.preventOnFilter,s=t.type,r=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(r||t).target,a=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,d=n.filter;if(function(t){po.length=0;var e=t.getElementsByTagName("input"),i=e.length;for(;i--;){var n=e[i];n.checked&&po.push(n)}}(i),!Rn&&!(/mousedown|pointerdown/.test(s)&&0!==t.button||n.disabled)&&!a.isContentEditable&&(this.nativeDraggable||!Ki||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=rn(l,n.draggable,i,!1))&&l.animated||Dn===l)){if(Hn=vn(l),Un=vn(l,n.draggable),"function"==typeof d){if(d.call(this,t,l,this))return On({sortable:e,rootEl:a,name:"filter",targetEl:l,toEl:i,fromEl:i}),Mn("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(d&&(d=d.split(",").some((function(n){if(n=rn(a,n.trim(),i,!1))return On({sortable:e,rootEl:n,name:"filter",targetEl:l,fromEl:i,toEl:i}),Mn("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());n.handle&&!rn(a,n.handle,i,!1)||this._prepareDragStart(t,r,l)}}},_prepareDragStart:function(t,e,i){var n,o=this,s=o.el,r=o.options,l=s.ownerDocument;if(i&&!Rn&&i.parentNode===s){var a=gn(i);if(In=s,Bn=(Rn=i).parentNode,$n=Rn.nextSibling,Dn=i,jn=r.group,Co.dragged=Rn,Vn={target:Rn,clientX:(e||t).clientX,clientY:(e||t).clientY},Kn=Vn.clientX-a.left,Qn=Vn.clientY-a.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Rn.style["will-change"]="all",n=function(){Mn("delayEnded",o,{evt:t}),Co.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!Zi&&o.nativeDraggable&&(Rn.draggable=!0),o._triggerDragStart(t,e),On({sortable:o,name:"choose",originalEvent:t}),dn(Rn,r.chosenClass,!0))},r.ignore.split(",").forEach((function(t){pn(Rn,t.trim(),Eo)})),en(l,"dragover",So),en(l,"mousemove",So),en(l,"touchmove",So),en(l,"mouseup",o._onDrop),en(l,"touchend",o._onDrop),en(l,"touchcancel",o._onDrop),Zi&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Rn.draggable=!0),Mn("delayStart",this,{evt:t}),!r.delay||r.delayOnTouchOnly&&!e||this.nativeDraggable&&(Xi||Yi))n();else{if(Co.eventCanceled)return void this._onDrop();en(l,"mouseup",o._disableDelayedDrag),en(l,"touchend",o._disableDelayedDrag),en(l,"touchcancel",o._disableDelayedDrag),en(l,"mousemove",o._delayedDragTouchMoveHandler),en(l,"touchmove",o._delayedDragTouchMoveHandler),r.supportPointer&&en(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(n,r.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(){Rn&&Eo(Rn),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;nn(t,"mouseup",this._disableDelayedDrag),nn(t,"touchend",this._disableDelayedDrag),nn(t,"touchcancel",this._disableDelayedDrag),nn(t,"mousemove",this._delayedDragTouchMoveHandler),nn(t,"touchmove",this._delayedDragTouchMoveHandler),nn(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?en(document,"pointermove",this._onTouchMove):en(document,e?"touchmove":"mousemove",this._onTouchMove):(en(Rn,"dragend",this),en(In,"dragstart",this._onDragStart));try{document.selection?qo((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(oo=!1,In&&Rn){Mn("dragStarted",this,{evt:e}),this.nativeDraggable&&en(document,"dragover",_o);var i=this.options;!t&&dn(Rn,i.dragClass,!1),dn(Rn,i.ghostClass,!0),Co.active=this,t&&this._appendGhost(),On({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Yn){this._lastX=Yn.clientX,this._lastY=Yn.clientY,xo();for(var t=document.elementFromPoint(Yn.clientX,Yn.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Yn.clientX,Yn.clientY))!==e;)e=t;if(Rn.parentNode[kn]._isOutsideThisEl(t),e)do{if(e[kn]){if(e[kn]._onDragOver({clientX:Yn.clientX,clientY:Yn.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);wo()}},_onTouchMove:function(t){if(Vn){var e=this.options,i=e.fallbackTolerance,n=e.fallbackOffset,o=t.touches?t.touches[0]:t,s=Nn&&un(Nn,!0),r=Nn&&s&&s.a,l=Nn&&s&&s.d,a=go&&no&&yn(no),d=(o.clientX-Vn.clientX+n.x)/(r||1)+(a?a[0]-co[0]:0)/(r||1),c=(o.clientY-Vn.clientY+n.y)/(l||1)+(a?a[1]-co[1]:0)/(l||1);if(!Co.active&&!oo){if(i&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(Nn){s?(s.e+=d-(Xn||0),s.f+=c-(Zn||0)):s={a:1,b:0,c:0,d:1,e:d,f:c};var u="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");cn(Nn,"webkitTransform",u),cn(Nn,"mozTransform",u),cn(Nn,"msTransform",u),cn(Nn,"transform",u),Xn=d,Zn=c,Yn=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Nn){var t=this.options.fallbackOnBody?document.body:In,e=gn(Rn,!0,go,!0,t),i=this.options;if(go){for(no=t;"static"===cn(no,"position")&&"none"===cn(no,"transform")&&no!==document;)no=no.parentNode;no!==document.body&&no!==document.documentElement?(no===document&&(no=hn()),e.top+=no.scrollTop,e.left+=no.scrollLeft):no=hn(),co=yn(no)}dn(Nn=Rn.cloneNode(!0),i.ghostClass,!1),dn(Nn,i.fallbackClass,!0),dn(Nn,i.dragClass,!0),cn(Nn,"transition",""),cn(Nn,"transform",""),cn(Nn,"box-sizing","border-box"),cn(Nn,"margin",0),cn(Nn,"top",e.top),cn(Nn,"left",e.left),cn(Nn,"width",e.width),cn(Nn,"height",e.height),cn(Nn,"opacity","0.8"),cn(Nn,"position",go?"absolute":"fixed"),cn(Nn,"zIndex","100000"),cn(Nn,"pointerEvents","none"),Co.ghost=Nn,t.appendChild(Nn),cn(Nn,"transform-origin",Kn/parseInt(Nn.style.width)*100+"% "+Qn/parseInt(Nn.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,n=t.dataTransfer,o=i.options;Mn("dragStart",this,{evt:t}),Co.eventCanceled?this._onDrop():(Mn("setupClone",this),Co.eventCanceled||((Pn=Cn(Rn)).draggable=!1,Pn.style["will-change"]="",this._hideClone(),dn(Pn,this.options.chosenClass,!1),Co.clone=Pn),i.cloneId=qo((function(){Mn("clone",i),Co.eventCanceled||(i.options.removeCloneOnHide||In.insertBefore(Pn,Rn),i._hideClone(),On({sortable:i,name:"clone"}))})),!e&&dn(Rn,o.dragClass,!0),e?(so=!0,i._loopId=setInterval(i._emulateDragOver,50)):(nn(document,"mouseup",i._onDrop),nn(document,"touchend",i._onDrop),nn(document,"touchcancel",i._onDrop),n&&(n.effectAllowed="move",o.setData&&o.setData.call(i,n,Rn)),en(document,"drop",i),cn(Rn,"transform","translateZ(0)")),oo=!0,i._dragStartId=qo(i._dragStarted.bind(i,e,t)),en(document,"selectstart",i),Jn=!0,Ki&&cn(document.body,"user-select","none"))},_onDragOver:function(t){var e,i,n,o,s=this.el,r=t.target,l=this.options,a=l.group,d=Co.active,c=jn===a,u=l.sort,p=Gn||d,h=this,g=!1;if(!uo){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),r=rn(r,l.draggable,s,!0),q("dragOver"),Co.eventCanceled)return g;if(Rn.contains(t.target)||r.animated&&r.animatingX&&r.animatingY||h._ignoreWhileAnimating===r)return M(!1);if(so=!1,d&&!l.disabled&&(c?u||(n=Bn!==In):Gn===this||(this.lastPutMode=jn.checkPull(this,d,Rn,t))&&a.checkPut(this,d,Rn,t))){if(o="vertical"===this._getDirection(t,r),e=gn(Rn),q("dragOverValid"),Co.eventCanceled)return g;if(n)return Bn=In,T(),this._hideClone(),q("revert"),Co.eventCanceled||($n?In.insertBefore(Rn,$n):In.appendChild(Rn)),M(!0);var m=bn(s,l.draggable);if(!m||function(t,e,i){var n=gn(bn(i.el,i.options.draggable)),o=10;return e?t.clientX>n.right+o||t.clientX<=n.right&&t.clientY>n.bottom&&t.clientX>=n.left:t.clientX>n.right&&t.clientY>n.top||t.clientX<=n.right&&t.clientY>n.bottom+o}(t,o,this)&&!m.animated){if(m===Rn)return M(!1);if(m&&s===t.target&&(r=m),r&&(i=gn(r)),!1!==ko(In,s,Rn,e,r,i,t,!!r))return T(),s.appendChild(Rn),Bn=s,O(),M(!0)}else if(m&&function(t,e,i){var n=gn(fn(i.el,0,i.options,!0)),o=10;return e?t.clientX<n.left-o||t.clientY<n.top&&t.clientX<n.right:t.clientY<n.top-o||t.clientY<n.bottom&&t.clientX<n.left}(t,o,this)){var f=fn(s,0,l,!0);if(f===Rn)return M(!1);if(i=gn(r=f),!1!==ko(In,s,Rn,e,r,i,t,!1))return T(),s.insertBefore(Rn,f),Bn=s,O(),M(!0)}else if(r.parentNode===s){i=gn(r);var b,v,y,x=Rn.parentNode!==s,w=!function(t,e,i){var n=i?t.left:t.top,o=i?t.right:t.bottom,s=i?t.width:t.height,r=i?e.left:e.top,l=i?e.right:e.bottom,a=i?e.width:e.height;return n===r||o===l||n+s/2===r+a/2}(Rn.animated&&Rn.toRect||e,r.animated&&r.toRect||i,o),S=o?"top":"left",_=mn(r,"top","top")||mn(Rn,"top","top"),C=_?_.scrollTop:void 0;if(to!==r&&(v=i[S],lo=!1,ao=!w&&l.invertSwap||x),b=function(t,e,i,n,o,s,r,l){var a=n?t.clientY:t.clientX,d=n?i.height:i.width,c=n?i.top:i.left,u=n?i.bottom:i.right,p=!1;if(!r)if(l&&io<d*o){if(!lo&&(1===eo?a>c+d*s/2:a<u-d*s/2)&&(lo=!0),lo)p=!0;else if(1===eo?a<c+io:a>u-io)return-eo}else if(a>c+d*(1-o)/2&&a<u-d*(1-o)/2)return function(t){return vn(Rn)<vn(t)?1:-1}(e);if(p=p||r,p&&(a<c+d*s/2||a>u-d*s/2))return a>c+d/2?1:-1;return 0}(t,r,i,o,w?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,ao,to===r),0!==b){var k=vn(Rn);do{k-=b,y=Bn.children[k]}while(y&&("none"===cn(y,"display")||y===Nn))}if(0===b||y===r)return M(!1);to=r,eo=b;var E=r.nextElementSibling,A=!1,L=ko(In,s,Rn,e,r,i,t,A=1===b);if(!1!==L)return 1!==L&&-1!==L||(A=1===L),uo=!0,setTimeout(Ao,30),T(),A&&!E?s.appendChild(Rn):r.parentNode.insertBefore(Rn,A?E:r),_&&_n(_,0,C-_.scrollTop),Bn=Rn.parentNode,void 0===v||ao||(io=Math.abs(v-gn(r)[S])),O(),M(!0)}if(s.contains(Rn))return M(!1)}return!1}function q(l,a){Mn(l,h,Fi({evt:t,isOwner:c,axis:o?"vertical":"horizontal",revert:n,dragRect:e,targetRect:i,canSort:u,fromSortable:p,target:r,completed:M,onMove:function(i,n){return ko(In,s,Rn,e,i,gn(i),t,n)},changed:O},a))}function T(){q("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function M(e){return q("dragOverCompleted",{insertion:e}),e&&(c?d._hideClone():d._showClone(h),h!==p&&(dn(Rn,Gn?Gn.options.ghostClass:d.options.ghostClass,!1),dn(Rn,l.ghostClass,!0)),Gn!==h&&h!==Co.active?Gn=h:h===Co.active&&Gn&&(Gn=null),p===h&&(h._ignoreWhileAnimating=r),h.animateAll((function(){q("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(r===Rn&&!Rn.animated||r===s&&!r.animated)&&(to=null),l.dragoverBubble||t.rootEl||r===document||(Rn.parentNode[kn]._isOutsideThisEl(t.target),!e&&So(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function O(){Fn=vn(Rn),Wn=vn(Rn,l.draggable),On({sortable:h,name:"change",toEl:s,newIndex:Fn,newDraggableIndex:Wn,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){nn(document,"mousemove",this._onTouchMove),nn(document,"touchmove",this._onTouchMove),nn(document,"pointermove",this._onTouchMove),nn(document,"dragover",So),nn(document,"mousemove",So),nn(document,"touchmove",So)},_offUpEvents:function(){var t=this.el.ownerDocument;nn(t,"mouseup",this._onDrop),nn(t,"touchend",this._onDrop),nn(t,"pointerup",this._onDrop),nn(t,"touchcancel",this._onDrop),nn(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;Fn=vn(Rn),Wn=vn(Rn,i.draggable),Mn("drop",this,{evt:t}),Bn=Rn&&Rn.parentNode,Fn=vn(Rn),Wn=vn(Rn,i.draggable),Co.eventCanceled||(oo=!1,ao=!1,lo=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),To(this.cloneId),To(this._dragStartId),this.nativeDraggable&&(nn(document,"drop",this),nn(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ki&&cn(document.body,"user-select",""),cn(Rn,"transform",""),t&&(Jn&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),Nn&&Nn.parentNode&&Nn.parentNode.removeChild(Nn),(In===Bn||Gn&&"clone"!==Gn.lastPutMode)&&Pn&&Pn.parentNode&&Pn.parentNode.removeChild(Pn),Rn&&(this.nativeDraggable&&nn(Rn,"dragend",this),Eo(Rn),Rn.style["will-change"]="",Jn&&!oo&&dn(Rn,Gn?Gn.options.ghostClass:this.options.ghostClass,!1),dn(Rn,this.options.chosenClass,!1),On({sortable:this,name:"unchoose",toEl:Bn,newIndex:null,newDraggableIndex:null,originalEvent:t}),In!==Bn?(Fn>=0&&(On({rootEl:Bn,name:"add",toEl:Bn,fromEl:In,originalEvent:t}),On({sortable:this,name:"remove",toEl:Bn,originalEvent:t}),On({rootEl:Bn,name:"sort",toEl:Bn,fromEl:In,originalEvent:t}),On({sortable:this,name:"sort",toEl:Bn,originalEvent:t})),Gn&&Gn.save()):Fn!==Hn&&Fn>=0&&(On({sortable:this,name:"update",toEl:Bn,originalEvent:t}),On({sortable:this,name:"sort",toEl:Bn,originalEvent:t})),Co.active&&(null!=Fn&&-1!==Fn||(Fn=Hn,Wn=Un),On({sortable:this,name:"end",toEl:Bn,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Mn("nulling",this),In=Rn=Bn=Nn=$n=Pn=Dn=zn=Vn=Yn=Jn=Fn=Wn=Hn=Un=to=eo=Gn=jn=Co.dragged=Co.ghost=Co.clone=Co.active=null,po.forEach((function(t){t.checked=!0})),po.length=Xn=Zn=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Rn&&(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=[],i=this.el.children,n=0,o=i.length,s=this.options;n<o;n++)rn(t=i[n],s.draggable,this.el,!1)&&e.push(t.getAttribute(s.dataIdAttr)||Lo(t));return e},sort:function(t,e){var i={},n=this.el;this.toArray().forEach((function(t,e){var o=n.children[e];rn(o,this.options.draggable,n,!1)&&(i[t]=o)}),this),e&&this.captureAnimationState(),t.forEach((function(t){i[t]&&(n.removeChild(i[t]),n.appendChild(i[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return rn(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(void 0===e)return i[t];var n=qn.modifyOption(this,t,e);i[t]=void 0!==n?n:e,"group"===t&&yo(i)},destroy:function(){Mn("destroy",this);var t=this.el;t[kn]=null,nn(t,"mousedown",this._onTapStart),nn(t,"touchstart",this._onTapStart),nn(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(nn(t,"dragover",this),nn(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),ro.splice(ro.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!zn){if(Mn("hideClone",this),Co.eventCanceled)return;cn(Pn,"display","none"),this.options.removeCloneOnHide&&Pn.parentNode&&Pn.parentNode.removeChild(Pn),zn=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(zn){if(Mn("showClone",this),Co.eventCanceled)return;Rn.parentNode!=In||this.options.group.revertClone?$n?In.insertBefore(Pn,$n):In.appendChild(Pn):In.insertBefore(Pn,Rn),this.options.group.revertClone&&this.animate(Rn,Pn),cn(Pn,"display",""),zn=!1}}else this._hideClone()}},ho&&en(document,"touchmove",(function(t){(Co.active||oo)&&t.cancelable&&t.preventDefault()})),Co.utils={on:en,off:nn,css:cn,find:pn,is:function(t,e){return!!rn(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},throttle:Sn,closest:rn,toggleClass:dn,clone:Cn,index:vn,nextTick:qo,cancelNextTick:To,detectDirection:vo,getChild:fn},Co.get=function(t){return t[kn]},Co.mount=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];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&&(Co.utils=Fi(Fi({},Co.utils),t.utils)),qn.mount(t)}))},Co.create=function(t,e){return new Co(t,e)},Co.version="1.14.0";var Mo,Oo,Ro,Bo,No,Io,$o=[],Do=!1;function Po(){$o.forEach((function(t){clearInterval(t.pid)})),$o=[]}function zo(){clearInterval(Io)}var Ho=Sn((function(t,e,i,n){if(e.scroll){var o,s=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,a=e.scrollSpeed,d=hn(),c=!1;Oo!==i&&(Oo=i,Po(),Mo=e.scroll,o=e.scrollFn,!0===Mo&&(Mo=xn(i,!0)));var u=0,p=Mo;do{var h=p,g=gn(h),m=g.top,f=g.bottom,b=g.left,v=g.right,y=g.width,x=g.height,w=void 0,S=void 0,_=h.scrollWidth,C=h.scrollHeight,k=cn(h),E=h.scrollLeft,A=h.scrollTop;h===d?(w=y<_&&("auto"===k.overflowX||"scroll"===k.overflowX||"visible"===k.overflowX),S=x<C&&("auto"===k.overflowY||"scroll"===k.overflowY||"visible"===k.overflowY)):(w=y<_&&("auto"===k.overflowX||"scroll"===k.overflowX),S=x<C&&("auto"===k.overflowY||"scroll"===k.overflowY));var L=w&&(Math.abs(v-s)<=l&&E+y<_)-(Math.abs(b-s)<=l&&!!E),q=S&&(Math.abs(f-r)<=l&&A+x<C)-(Math.abs(m-r)<=l&&!!A);if(!$o[u])for(var T=0;T<=u;T++)$o[T]||($o[T]={});$o[u].vx==L&&$o[u].vy==q&&$o[u].el===h||($o[u].el=h,$o[u].vx=L,$o[u].vy=q,clearInterval($o[u].pid),0==L&&0==q||(c=!0,$o[u].pid=setInterval(function(){n&&0===this.layer&&Co.active._onTouchMove(No);var e=$o[this.layer].vy?$o[this.layer].vy*a:0,i=$o[this.layer].vx?$o[this.layer].vx*a:0;"function"==typeof o&&"continue"!==o.call(Co.dragged.parentNode[kn],i,e,t,No,$o[this.layer].el)||_n($o[this.layer].el,i,e)}.bind({layer:u}),24))),u++}while(e.bubbleScroll&&p!==d&&(p=xn(p,!1)));Do=c}}),30),Fo=function(t){var e=t.originalEvent,i=t.putSortable,n=t.dragEl,o=t.activeSortable,s=t.dispatchSortableEvent,r=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var a=i||o;r();var d=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(d.clientX,d.clientY);l(),a&&!a.el.contains(c)&&(s("spill"),this.onSpill({dragEl:n,putSortable:i}))}};function Uo(){}function Wo(){}Uo.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var n=fn(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(e,n):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:Fo},ji(Uo,{pluginName:"revertOnSpill"}),Wo.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable||this.sortable;i.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),i.animateAll()},drop:Fo},ji(Wo,{pluginName:"removeOnSpill"}),Co.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?en(document,"dragover",this._handleAutoScroll):this.options.supportPointer?en(document,"pointermove",this._handleFallbackAutoScroll):e.touches?en(document,"touchmove",this._handleFallbackAutoScroll):en(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?nn(document,"dragover",this._handleAutoScroll):(nn(document,"pointermove",this._handleFallbackAutoScroll),nn(document,"touchmove",this._handleFallbackAutoScroll),nn(document,"mousemove",this._handleFallbackAutoScroll)),zo(),Po(),clearTimeout(ln),ln=void 0},nulling:function(){No=Oo=Mo=Do=Io=Ro=Bo=null,$o.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var i=this,n=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,s=document.elementFromPoint(n,o);if(No=t,e||this.options.forceAutoScrollFallback||Xi||Yi||Ki){Ho(t,this.options,s,e);var r=xn(s,!0);!Do||Io&&n===Ro&&o===Bo||(Io&&zo(),Io=setInterval((function(){var s=xn(document.elementFromPoint(n,o),!0);s!==r&&(r=s,Po()),Ho(t,i.options,s,e)}),10),Ro=n,Bo=o)}else{if(!this.options.bubbleScroll||xn(s,!0)===hn())return void Po();Ho(t,this.options,xn(s,!1),!1)}}},ji(t,{pluginName:"scroll",initializeByDefault:!0})}),Co.mount(Wo,Uo);const jo=new o;class Go{constructor(t){const[e,i]=t.children,n=e=>{if(!t)return document.removeEventListener("click",n);t.contains(e.target)||this.toggle(!1)},o=n=>{const o=n.textContent,s=n.getAttribute("data-value");e.textContent=o,this.value=s,this.toggle(!1),t.dispatchEvent(new Event("change")),e.focus(),jo.elementChildren(i).forEach((t=>{jo.removeClass(t,"selected")}));let r=i.querySelector('[data-value="'+s+'"]');r&&jo.addClass(r,"selected")},s=t=>{t.preventDefault(),38===t.keyCode&&t.target.previousElementSibling?t.target.previousElementSibling.focus():40===t.keyCode&&t.target.nextElementSibling?t.target.nextElementSibling.focus():27===t.keyCode?(this.toggle(!1),e.focus()):13!==t.keyCode&&32!==t.keyCode||o(t.target)};e.addEventListener("keydown",(t=>{27===t.keyCode?(this.toggle(!1),t.preventDefault()):13!==t.keyCode&&32!==t.keyCode||(this.toggle(!0),t.preventDefault())})),e.addEventListener("click",(()=>this.toggle())),[...i.children].forEach((t=>{t.addEventListener("keydown",s),t.addEventListener("click",(()=>o(t)))})),this.element=t,this.value=e.getAttribute("data-value"),this.toggle=(o=null)=>{if(o=null===o?"true"!==i.getAttribute("aria-expanded"):o,i.setAttribute("aria-expanded",o),o){e.classList.add("active");let o=i.querySelector('[data-value="'+this.value+'"]');o&&(jo.addClass(o,"selected"),o.focus()),document.addEventListener("click",n),t.dispatchEvent(new Event("opened"))}else e.classList.remove("active"),t.dispatchEvent(new Event("closed")),document.removeEventListener("click",n)}}}const Vo=t=>{const e=t.util,i=t.builderStuff,n=t.dom;let o="",s=t.opts.sidePanel;if("#divSnippetList"===t.opts.snippetList){const r=`<div id="divSnippetList" class="is-side ${"right"===s?"":" fromleft"} snippetlist scroll-darker" tabindex="-1" role="dialog" aria-modal="true" title="${e.out("Snippets")}">\n </div>`;n.appendHtml(i,r),t.opts.snippetHandle||(o="display:none;")}else o="display:none;",s="left";let r="",l="",a="";if(t.opts.emailMode){l=t.opts.defaultEmailSnippetCategory;for(let i=0;i<t.opts.emailSnippetCategories.length;i++)a+='<li role="option" tabindex="0" data-value="'+t.opts.emailSnippetCategories[i][0]+'">'+e.out(t.opts.emailSnippetCategories[i][1])+"</li>",t.opts.emailSnippetCategories[i][0]===t.opts.defaultEmailSnippetCategory&&(r=t.opts.emailSnippetCategories[i][1])}else{l=t.opts.defaultSnippetCategory;for(let i=0;i<t.opts.snippetCategories.length;i++)a+='<li role="option" tabindex="0" data-value="'+t.opts.snippetCategories[i][0]+'">'+e.out(t.opts.snippetCategories[i][1])+"</li>",t.opts.snippetCategories[i][0]===t.opts.defaultSnippetCategory&&(r=t.opts.snippetCategories[i][1])}let d='<div class="is-dropdown selectsnippet" style="position:absolute;top:0;right:0;padding: 0;width:100%;z-index:2;"><button tabindex="0" class="dropdown-toggle no-outline" title="'+e.out("Snippet Categories")+'" type="button" aria-haspopup="true" data-value="'+l+'"><span>'+e.out(r)+'</span></button><ul class="dropdown-menu" role="listbox" title="'+e.out("Snippets")+'" aria-expanded="false">'+a+"</ul></div>"+("right"===s?'<div id="divSnippetScrollUp" role="button" tabindex="-1" style="top:calc(50% - 27px);right:25px;">▲</div><div id="divSnippetScrollDown" role="button" tabindex="-1" style="top:calc(50% + 27px);right:25px;">▼</div><div id="divSnippetHandle" role="button" tabindex="-1" title="'+e.out("Snippets")+'" data-title="'+e.out("Snippets")+'" style="'+o+'"><svg class="is-icon-flex"><use xlink:href="#ion-ios-arrow-left"></use></svg></div>':'<div id="divSnippetScrollUp" role="button" tabindex="-1" style="top:calc(50% - 27px);left:10px;">▲</div><div id="divSnippetScrollDown" role="button" tabindex="-1" style="top:calc(50% + 27px);left:10px;">▼</div><div id="divSnippetHandle" role="button" tabindex="-1" title="'+e.out("Snippets")+'" data-title="'+e.out("Snippets")+'" style="'+o+'"><svg class="is-icon-flex"><use xlink:href="#ion-ios-arrow-right"></use></svg></div>')+'<div class="is-design-list" tabindex="0"></div>',c=document.querySelector(t.opts.snippetList);n.appendHtml(c,d);const u=new Go(c.querySelector(".selectsnippet"));u.element.addEventListener("change",(()=>{let i=u.value,o=p.querySelectorAll(".snippet-item"),s=!1;Array.prototype.forEach.call(o,(t=>{t.getAttribute("data-cat")===i&&(s=!0)})),s||t.opts.snippetJSON.snippets.forEach((t=>{t.category===i&&n.appendHtml(p,'<div class="snippet-item" data-id="'+t.id+'" data-cat="'+t.category+'"><img alt="'+e.out("Snippet")+'" alt="" src="'+h+t.thumbnail+'"><span class="is-overlay"></span></div>')})),i&&(Array.prototype.forEach.call(o,(t=>{n.addClass(t,"hide")})),Array.prototype.forEach.call(o,(t=>{t.getAttribute("data-cat")===i&&(t.className=t.className.replace(/hide/g,""))})))})),u.toggle(!1),"#divSnippetList"===t.opts.snippetList&&(c.querySelector(".selectsnippet").style.display="none",c.querySelector(".is-design-list").style.display="none",t.doc.addEventListener("click",t.doHideSnippetHandler=e=>{var i=(e=e||window.event).target||e.srcElement;if("auto"===t.opts.snippetsSidebarDisplay&&n.hasClass(c,"active")){n.parentsHasClass(i,"is-builder")&&function(t){const e=t.dom;let i=document.querySelector("#divSnippetList");const n=i.querySelector("#divSnippetHandle");e.removeClass(i,"active"),"right"===t.opts.sidePanel?n.innerHTML='<svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#ion-ios-arrow-left"></use></svg>':n.innerHTML='<svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#ion-ios-arrow-right"></use></svg>';setTimeout((()=>{i.querySelector(".selectsnippet").style.display="none",i.querySelector(".is-design-list").style.display="none"}),300)}
|
21
21
|
/*!
|
22
22
|
* Cropper.js v1.5.12
|
23
23
|
* https://fengyuanchen.github.io/cropperjs
|
@@ -413,4 +413,23 @@ _txt["Live Preview"] = "Live Preview";
|
|
413
413
|
_txt["Wrap Columns (Breakpoint)"] = "Wrap Columns (Breakpoint)";
|
414
414
|
_txt["Reverse Columns"] = "Reverse Columns";
|
415
415
|
_txt["Columns per Line"] = "Columns per Line";
|
416
|
-
_txt["Symbol"] = "Symbol";
|
416
|
+
_txt["Symbol"] = "Symbol";
|
417
|
+
// _txt["Basic"] = "Basic";
|
418
|
+
_txt["Article"] = "Article";
|
419
|
+
// _txt["Headline"] = "Headline";
|
420
|
+
_txt["Buttons"] = "Buttons";
|
421
|
+
_txt["Photos"] = "Photos";
|
422
|
+
_txt["Profile"] = "Profile";
|
423
|
+
_txt["Contact"] = "Contact";
|
424
|
+
_txt["Products"] = "Products";
|
425
|
+
_txt["Features"] = "Features";
|
426
|
+
_txt["Process"] = "Process";
|
427
|
+
_txt["Pricing"] = "Pricing";
|
428
|
+
_txt["Skills"] = "Skills";
|
429
|
+
_txt["Achievements"] = "Achievements";
|
430
|
+
_txt["Quotes"] = "Quotes";
|
431
|
+
_txt["Partners"] = "Partners";
|
432
|
+
_txt["As Featured On"] = "As Featured On";
|
433
|
+
_txt["Page Not Found"] = "Page Not Found";
|
434
|
+
_txt["Coming Soon"] = "Coming Soon";
|
435
|
+
_txt["Help, FAQ"] = "Help, FAQ";
|
@@ -413,4 +413,23 @@ _txt["Live Preview"] = "Live Preview";
|
|
413
413
|
_txt["Wrap Columns (Breakpoint)"] = "Wrap Columns (Breakpoint)";
|
414
414
|
_txt["Reverse Columns"] = "Reverse Columns";
|
415
415
|
_txt["Columns per Line"] = "Columns per Line";
|
416
|
-
_txt["Symbol"] = "Symbol";
|
416
|
+
_txt["Symbol"] = "Symbol";
|
417
|
+
// _txt["Basic"] = "Basic";
|
418
|
+
_txt["Article"] = "Article";
|
419
|
+
// _txt["Headline"] = "Headline";
|
420
|
+
_txt["Buttons"] = "Buttons";
|
421
|
+
_txt["Photos"] = "Photos";
|
422
|
+
_txt["Profile"] = "Profile";
|
423
|
+
_txt["Contact"] = "Contact";
|
424
|
+
_txt["Products"] = "Products";
|
425
|
+
_txt["Features"] = "Features";
|
426
|
+
_txt["Process"] = "Process";
|
427
|
+
_txt["Pricing"] = "Pricing";
|
428
|
+
_txt["Skills"] = "Skills";
|
429
|
+
_txt["Achievements"] = "Achievements";
|
430
|
+
_txt["Quotes"] = "Quotes";
|
431
|
+
_txt["Partners"] = "Partners";
|
432
|
+
_txt["As Featured On"] = "As Featured On";
|
433
|
+
_txt["Page Not Found"] = "Page Not Found";
|
434
|
+
_txt["Coming Soon"] = "Coming Soon";
|
435
|
+
_txt["Help, FAQ"] = "Help, FAQ";
|