UNPKG

quick-admin-vue3-core

Version:

以快(计算机执行效率、开发效率)为核心的后台管理系统开发模板

6 lines 62.5 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),x=require("./platform-Dl0zaSyI.cjs"),ce=require("./index-BC11nvhb.cjs"),Ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ne=require("./index-D8siRAAk.cjs"),he=require("./_config-K63Ley5U.cjs"),Fn=require("./index-CnbeZyYB.cjs");;/* empty css */const In=require("./Column.vue_vue_type_script_setup_true_lang-Bkh30dIE.cjs"),xn=require("./Index-CN1cIPwS.cjs"),Mn=require("./Index.vue_vue_type_script_setup_true_lang-Bvm_Z-BC.cjs"),Rn=require("./event-CZYC-DCX.cjs"),$n=require("./form-attrs-Bm_xmUjZ.cjs"),qt=require("./_utils-CZUtIwlu.cjs"),zn=()=>{let o=null,e=0;function n(t,i){let a=t.target;if(i&&(a=a.querySelector(i)),!a)return;const{scrollTop:l}=a;!o&&(o=a),e=l}return r.onActivated(()=>{o==null||o.scrollTo(0,e)}),{handleScroll:n}},Vn={class:"extra-btns f-fs-fs-w"};var en,tn;const Ln=r.defineComponent({__name:"ExtraBtns",props:r.mergeDefaults({btns:{},isStand:{type:Boolean}},{btns:()=>[],isStand:!0,...(tn=(en=x.config)==null?void 0:en.BaseCrud)==null?void 0:tn.ExtraBtns}),emits:["click"],setup(o,{emit:e}){const n=o,t=e,i=r.computed(()=>{const{isStand:a,btns:l}=n;return x.sortObjArrByKey(a?l:l.map(s=>ce.getBtnObj(s)))});return(a,l)=>{const s=r.resolveComponent("BaseBtn");return r.openBlock(),r.createElementBlock("div",Vn,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,(c,u)=>(r.openBlock(),r.createBlock(s,{tpl:c,isStand:"",onClick:l[0]||(l[0]=(...p)=>t("click",...p)),key:u},null,8,["tpl"]))),128))])}}}),qn=Ue._export_sfc(Ln,[["__scopeId","data-v-507043ae"]]),jn={class:"set-btns"};var nn,on;const Xn=r.defineComponent({__name:"Index",props:r.mergeDefaults({cols:{},originCols:{},toolBtns:{},disabled:{type:Boolean}},{cols:()=>[],originCols:()=>[],toolBtns:()=>["print","set"],...(on=(nn=x.config)==null?void 0:nn.BaseCrud)==null?void 0:on.SetBtns}),emits:["update:cols"],setup(o,{emit:e}){const n=r.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./SetPrint-BZEEr878.cjs"))),t=r.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./SetTable-Bc1QNnk7.cjs"))),a={print:{name:"print",title:"打印",show:!!Fn.useUserStore().vipLevel,attrs:{type:"primary",icon:Ne.printer_default,plain:!0,circle:!0}},set:{name:"set",title:"设置",show:!0,attrs:{type:"primary",icon:Ne.setting_default,plain:!0,circle:!0}}},l=e,s=r.inject("openPopup"),c=r.inject("closePopup"),u=o,p=r.computed({get:()=>u.cols,set:C=>l("update:cols",C)}),d=r.computed(()=>u.toolBtns.map(C=>a[C]).filter(C=>C.show));function b(C){var M;const D={set:()=>v(),print:()=>s("打印设置",n)};(M=D[C])==null||M.call(D)}function v(){const C=p.value.map(D=>{const{prop:M,label:B,type:O,sortable:z=!1,visible:W,exportable:U}=D;return{hidden:he.specialColKeys.includes(O),colProp:M,label:B,visible:W,exportable:U,sortable:!!z}});s({title:"列设置",closeOnClickModal:!0},[t,{rows:C,onChange:y,onSubmit:w,onReset:$}],"drawer")}function y({type:C,isTrue:D,rowInd:M}){const B=p.value[M];if(B[C]=D,C==="sortable"){const{width:O}=B;B.width=Number(O)+16*(D?1:-1)}}function w(){c()}function $(){p.value=JSON.parse(JSON.stringify(u.originCols))}return(C,D)=>{const M=r.resolveComponent("el-button"),B=r.resolveComponent("el-tooltip");return r.openBlock(),r.createElementBlock("div",jn,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(d.value,(O,z)=>(r.openBlock(),r.createBlock(B,r.mergeProps({content:O.title,ref_for:!0},r.unref(x.defaultTooltipAttrs),{key:z}),{default:r.withCtx(()=>[r.createVNode(M,r.mergeProps({disabled:C.disabled,onClick:W=>b(O.name),ref_for:!0},O.attrs),null,16,["disabled","onClick"])]),_:2},1040,["content"]))),128))])}}}),Yn=Ue._export_sfc(Xn,[["__scopeId","data-v-de7969e6"]]);var rn,an;const Hn=r.defineComponent({__name:"QueryTable",props:r.mergeDefaults({cols:{},data:{},operateBtns:{type:[Array,Function]},operateBtnsAttrs:{},disabled:{type:Boolean},loading:{type:Boolean},showSummary:{type:Boolean},currPage:{},pageSize:{},handleAuth:{type:Function},refreshList:{type:Function},summaryMethod:{type:Function}},{cols:()=>[],data:()=>[],summaryMethod:x.handleTableSummary,...(an=(rn=x.config)==null?void 0:rn.BaseCrud)==null?void 0:an.QueryTable}),emits:["update:cols","selectionChange",he.operateBtnsEmitName,"change"],setup(o,{expose:e,emit:n}){const t=o,i=n,{handleScroll:a}=zn();let l=t.showSummary?2:1;const s=r.ref(null),c=r.ref([]),u=r.reactive(he.getHandleCols(t,(v,y)=>{l+=v-1,i("update:cols",y)},!0)),p=r.computed(()=>{const{showSummary:v,summaryMethod:y}=t;return Object.assign({maxHeight:`calc(100% + ${l*40}px)`,cellClassName(w){const{row:$,column:C,rowIndex:D,columnIndex:M}=w;if(C.type==="sort")return"sort-cell"}},he.defaultTableAttrs,{showSummary:v,summaryMethod:y})});function d(v,{row:y,col:w,$index:$},C,D){i(he.operateBtnsEmitName,v,{$index:$,...y},C,D)}function b(v){c.value=v;const y=v.map(w=>w[p.value.rowKey]);i("selectionChange",v,y)}return e({tableRef:s}),(v,y)=>{const w=r.resolveComponent("BaseEmpty"),$=r.resolveComponent("el-table"),C=r.resolveDirective("loading");return r.withDirectives((r.openBlock(),r.createBlock($,r.mergeProps({class:"query-table",data:v.data,onSelectionChange:b,onScrollCapture:r.unref(a)},p.value,{ref_key:"tableRef",ref:s}),r.createSlots({default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u,(D,M)=>(r.openBlock(),r.createBlock(In._sfc_main,{col:D,disabled:v.disabled,refreshList:v.refreshList,operateBtnsAttrs:v.operateBtnsAttrs,getBtns:(B,O)=>r.unref(he.getOperateBtns)(B,O,t),onOperateBtns:d,key:M},{custom:r.withCtx(({row:B,col:O,$index:z})=>[r.renderSlot(v.$slots,"custom",r.mergeProps({ref_for:!0},{row:B,col:O,$index:z}),void 0,!0)]),"children-custom":r.withCtx(({row:B,col:O,$index:z})=>[r.renderSlot(v.$slots,"children-custom",r.mergeProps({ref_for:!0},{row:B,col:O,$index:z}),void 0,!0)]),_:2},1032,["col","disabled","refreshList","operateBtnsAttrs","getBtns"]))),128))]),_:2},[v.loading?void 0:{name:"empty",fn:r.withCtx(()=>[r.createVNode(w)]),key:"0"}]),1040,["data","onScrollCapture"])),[[C,v.loading]])}}}),Gn=Ue._export_sfc(Hn,[["__scopeId","data-v-65b56304"]]),jt=r.defineComponent({__name:"QueryFields",props:{modelValue:{default:()=>r.reactive({})},field:{},disabled:{type:Boolean},readonly:{type:Boolean},inputDebounce:{type:Boolean},layoutType:{}},emits:["update:modelValue","change","blur","focus"],setup(o,{emit:e}){const n=o,t=e;let i=r.computed({get:()=>n.modelValue,set:l=>t("update:modelValue",l)});function a(l){return l.attrs?l.attrs.style="width:100%":l.attrs={style:"width:100%"},l}return(l,s)=>{var c,u,p,d;return r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.layoutType==="flex"?xn.FieldItem:Mn._sfc_main),{modelValue:r.unref(i)[l.field.prop],"onUpdate:modelValue":s[0]||(s[0]=b=>r.unref(i)[l.field.prop]=b),class:"form-item",field:a(l.field),colAttrs:l.layoutType==="flex"?void 0:{class:"query-field-item"},disabled:((u=(c=l.field)==null?void 0:c.attrs)==null?void 0:u.disabled)??l.disabled,readonly:((d=(p=l.field)==null?void 0:p.attrs)==null?void 0:d.readonly)??l.readonly,inputDebounce:l.inputDebounce,onBlur:s[1]||(s[1]=(...b)=>t("blur",...b)),onFocus:s[2]||(s[2]=(...b)=>t("focus",...b)),onChange:s[3]||(s[3]=(...b)=>t("change",...b))},{custom:r.withCtx(({field:b})=>[r.renderSlot(l.$slots,"custom",{field:b})]),_:3},40,["modelValue","field","colAttrs","disabled","readonly","inputDebounce"])}}}),Xt=r.defineComponent({__name:"QueryBtns",props:{isFold:{type:Boolean,default:!0},loading:{type:Boolean},showFoldBtn:{type:Boolean}},emits:["submit","reset","fold"],setup(o,{emit:e}){const n=e;return(t,i)=>{const a=r.resolveComponent("el-button"),l=r.resolveComponent("el-icon"),s=r.resolveComponent("el-col"),c=r.resolveDirective("debounce");return r.openBlock(),r.createBlock(s,{class:"query-btns f-fe-fs ml-a"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(a,{type:"primary",icon:r.unref(Ne.search_default),disabled:t.loading,loading:t.loading},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(t.$t("base.button.search")),1)]),_:1},8,["icon","disabled","loading"])),[[c,()=>n("submit"),void 0,{immediate:!0}]]),r.createVNode(a,{icon:r.unref(Ne.refresh_left_default),onClick:i[0]||(i[0]=u=>n("reset")),disabled:t.loading},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(t.$t("base.button.reset")),1)]),_:1},8,["icon","disabled"]),t.showFoldBtn?(r.openBlock(),r.createBlock(a,{key:0,onClick:i[1]||(i[1]=u=>n("fold")),text:"",type:"primary"},{icon:r.withCtx(()=>[r.createVNode(l,{class:r.normalizeClass(["icon-fold",{"rotate-180":!t.isFold}])},{default:r.withCtx(()=>[r.createVNode(r.unref(Ne.arrow_down_default))]),_:1},8,["class"])]),default:r.withCtx(()=>[r.createTextVNode(" "+r.toDisplayString(t.isFold?t.$t("base.button.unfold"):t.$t("base.button.fold")),1)]),_:1})):r.createCommentVNode("",!0)]),_:1})}}}),Wn={class:"sec-fields f-fs-fs-w f-1"};var ln,sn;const Un=r.defineComponent({__name:"Index",props:r.mergeDefaults({modelValue:{},fields:{},sections:{},loading:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},rowNum:{},extraParams:{},inputDebounce:{type:Boolean},grid:{},showWhenNoFields:{type:Boolean},sectionFoldable:{type:Boolean},layoutType:{},afterReset:{type:Function}},{layoutType:"grid",rowNum:2,fields:()=>[],modelValue:()=>r.reactive({}),sectionFoldable:!0,...(sn=(ln=x.config)==null?void 0:ln.BaseCrud)==null?void 0:sn.QueryForm}),emits:["update:modelValue","submit","change","ready"],setup(o,{expose:e,emit:n}){var W,U;const{merge:t}=x._,i=o,a=n,l=r.ref(),s=r.ref(B()),c=r.ref(!0),u=r.reactive(((W=i==null?void 0:i.sections)==null?void 0:W.map(h=>{var g;return((g=h==null?void 0:h.fields)==null?void 0:g.length)??0<=s.value,!1}))??[]),p=r.ref([]),d=r.ref([]);function b(h){if(!c.value)return;const{sections:g,rowNum:P}=i;if(!g)return s.value>1?s.value*P-1:1*P;const V=d.value.length;if(V>P)return s.value-(h===P-1?1:0);const T=h===V-1;return s.value>1?s.value-(T?1:0):1}function v(h){return h===d.value.length-1?s.value-1:s.value}const y=r.computed(()=>{const{sections:h,rowNum:g}=i;if(h){const P=d.value.map((T,R)=>{const I=R===d.value.length-1;return T.fields.length<=s.value-(I?1:0)?1:2});let V=0;for(let T=0;T<P.length;T++)if(V+=P[T],V>g)return!0;return!1}else return p.value.length>s.value*g-1}),w=r.computed({get:()=>i.modelValue,set:h=>a("update:modelValue",h)});let $=!0;r.watch(()=>i.fields,(h,g)=>{var q;if((q=i.sections)!=null&&q.length)return;const{modelValue:P,grid:V}=i,T=ce.getHandleFields(h,P,{quickAttrs:{grid:ce.getGridAttrs(V)}},"query"),{data:R,fields:I}=T;p.value=I,t(w.value,R),$&&(a("ready"),$=!1)},{immediate:!0,deep:!0,once:!!((U=i==null?void 0:i.sections)!=null&&U.length)}),r.watch(()=>i.sections,h=>{if(!(h!=null&&h.length))return d.value=[];const{modelValue:g}=i;d.value=h.map(P=>{const{fields:V}=P,T=ce.getHandleFields(V,g,void 0,"query"),{data:R,fields:I}=T;return P.fields=I,t(w.value,R),P})??[],$&&(a("ready"),$=!1)},{immediate:!0,deep:!0,once:!i.sections}),Rn.useEvent("resize",()=>s.value=B(),!0);const{size:C}=$n.useFormAttrs();function D(){const{rowNum:h}=i,P={small:28,default:40,large:50}[C];return c.value?(s.value>1?h:h+1)*P+"px":"35vh"}function M(h){var q;const{disabled:g,readonly:P,inputDebounce:V,layoutType:T,grid:R}=i,I={field:h,disabled:g,readonly:P,layoutType:T,inputDebounce:V};if(T==="grid")I.grid=ce.getGridAttrs(((q=h==null?void 0:h.quickAttrs)==null?void 0:q.grid)??R);else if(T==="flex")Object.assign(I,{class:"f-1",style:{maxWidth:"350px",min:"300px"}});else throw new Error(`暂不支持此类型:${T}`);return I}function B(){const{grid:h}=i,g=ce.getGridAttrs(h),P={},V=x.getScreenSizeType();for(const T in g)P[T]=24/g[T];return P[V]}function O(){const h=l.value;h&&h.validate((g,P)=>{if(!g){const T=Object.values(P)[0][0];return x.showMessage(T==null?void 0:T.message,"error")}const{extraParams:V}=i;a("submit",t({},V,w.value))})}function z(){var h,g;(h=l.value)==null||h.resetFields(),(g=i.afterReset)==null||g.call(i)}return e({formRef:l,getFields(){var h;return(h=i.sections)!=null&&h.length?d.value.map(g=>g.fields).flat(1):p.value}}),(h,g)=>{const P=r.resolveComponent("el-icon"),V=r.resolveComponent("el-button"),T=r.resolveComponent("el-form");return p.value.length||d.value.length||h.showWhenNoFields?(r.openBlock(),r.createBlock(T,r.mergeProps({key:0,class:"query-form",model:w.value},r.unref(ce.defaultFormAttrs),{onKeyup:r.withKeys(O,["enter"]),ref_key:"formRef",ref:l}),{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["wrap-box all-hide-scroll",{"f-fs-fs-w":!d.value.length}]),style:r.normalizeStyle({maxHeight:D()})},[d.value.length?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(d.value.slice(0,c.value?h.rowNum:void 0),(R,I)=>(r.openBlock(),r.createElementBlock("div",{class:"f-fs-fs",key:I},[r.createVNode(V,{class:"f-0",onClick:q=>u[I]=!u[I],text:"",type:"info",disabled:!h.sectionFoldable||u[I]===void 0},r.createSlots({default:r.withCtx(()=>[r.createTextVNode(" "+r.toDisplayString(R.title),1)]),_:2},[h.sectionFoldable?{name:"icon",fn:r.withCtx(()=>[r.createVNode(P,{class:r.normalizeClass(["icon-fold",{"rotate-180":!u[I]&&!u[I]}])},{default:r.withCtx(()=>[u[I]===void 0?(r.openBlock(),r.createBlock(r.unref(Ne.minus_default),{key:0})):(r.openBlock(),r.createBlock(r.unref(Ne.arrow_down_default),{key:1}))]),_:2},1032,["class"])]),key:"0"}:void 0]),1032,["onClick","disabled"]),r.createElementVNode("div",Wn,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(R.fields.slice(0,u[I]?v(I):b(I)),(q,ve)=>(r.openBlock(),r.createBlock(jt,r.mergeProps({modelValue:w.value,"onUpdate:modelValue":g[0]||(g[0]=ae=>w.value=ae),ref_for:!0},M(q),{onChange:g[1]||(g[1]=(ae,$e)=>a("change",{[$e]:ae})),key:ve}),{custom:r.withCtx(({field:ae})=>[r.renderSlot(h.$slots,"custom",{field:ae},void 0,!0)]),_:2},1040,["modelValue"]))),128)),(d.value.length<=h.rowNum?I===d.value.length-1:c.value?I===h.rowNum-1:I===d.value.length-1)?(r.openBlock(),r.createBlock(Xt,r.mergeProps({key:0,loading:h.loading,isFold:c.value,showFoldBtn:y.value,onFold:g[2]||(g[2]=q=>c.value=!c.value),onSubmit:O,onReset:z,ref_for:!0},r.unref(ce.getGridAttrs)(h.grid)),null,16,["loading","isFold","showFoldBtn"])):r.createCommentVNode("",!0)])]))),128)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p.value.slice(0,b()),(R,I)=>(r.openBlock(),r.createBlock(jt,r.mergeProps({modelValue:w.value,"onUpdate:modelValue":g[3]||(g[3]=q=>w.value=q),ref_for:!0},M(R),{onChange:g[4]||(g[4]=(q,ve)=>a("change",{[ve]:q})),key:I}),{custom:r.withCtx(({field:q})=>[r.renderSlot(h.$slots,"custom",{field:q},void 0,!0)]),_:2},1040,["modelValue"]))),128)),r.createVNode(Xt,r.mergeProps({loading:h.loading,isFold:c.value,showFoldBtn:y.value,onFold:g[5]||(g[5]=R=>c.value=!c.value),onSubmit:O,onReset:z},r.unref(ce.getGridAttrs)(h.grid)),null,16,["loading","isFold","showFoldBtn"])],64))],6)]),_:3},16,["model"])):r.createCommentVNode("",!0)}}}),Qn=Ue._export_sfc(Un,[["__scopeId","data-v-80fff670"]]);/**! * Sortable 1.15.6 * @author RubaXa <trash@rubaxa.org> * @author owenm <owen23355@gmail.com> * @license MIT */function Yt(o,e){var n=Object.keys(o);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(o);e&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(o,i).enumerable})),n.push.apply(n,t)}return n}function ye(o){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yt(Object(n),!0).forEach(function(t){Kn(o,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(n,t))})}return o}function ot(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ot=function(e){return typeof e}:ot=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ot(o)}function Kn(o,e,n){return e in o?Object.defineProperty(o,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[e]=n,o}function _e(){return _e=Object.assign||function(o){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(o[t]=n[t])}return o},_e.apply(this,arguments)}function Jn(o,e){if(o==null)return{};var n={},t=Object.keys(o),i,a;for(a=0;a<t.length;a++)i=t[a],!(e.indexOf(i)>=0)&&(n[i]=o[i]);return n}function Zn(o,e){if(o==null)return{};var n=Jn(o,e),t,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(o);for(i=0;i<a.length;i++)t=a[i],!(e.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(o,t)&&(n[t]=o[t])}return n}var eo="1.15.6";function Se(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var Ce=Se(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Qe=Se(/Edge/i),Ht=Se(/firefox/i),Xe=Se(/safari/i)&&!Se(/chrome/i)&&!Se(/android/i),kt=Se(/iP(ad|od|hone)/i),fn=Se(/chrome/i)&&Se(/android/i),pn={capture:!1,passive:!1};function N(o,e,n){o.addEventListener(e,n,!Ce&&pn)}function k(o,e,n){o.removeEventListener(e,n,!Ce&&pn)}function st(o,e){if(e){if(e[0]===">"&&(e=e.substring(1)),o)try{if(o.matches)return o.matches(e);if(o.msMatchesSelector)return o.msMatchesSelector(e);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(e)}catch{return!1}return!1}}function hn(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function ge(o,e,n,t){if(o){n=n||document;do{if(e!=null&&(e[0]===">"?o.parentNode===n&&st(o,e):st(o,e))||t&&o===n)return o;if(o===n)break}while(o=hn(o))}return null}var Gt=/\s+/g;function se(o,e,n){if(o&&e)if(o.classList)o.classList[n?"add":"remove"](e);else{var t=(" "+o.className+" ").replace(Gt," ").replace(" "+e+" "," ");o.className=(t+(n?" "+e:"")).replace(Gt," ")}}function S(o,e,n){var t=o&&o.style;if(t){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(n=o.currentStyle),e===void 0?n:n[e];!(e in t)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),t[e]=n+(typeof n=="string"?"":"px")}}function Me(o,e){var n="";if(typeof o=="string")n=o;else do{var t=S(o,"transform");t&&t!=="none"&&(n=t+" "+n)}while(!e&&(o=o.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function mn(o,e,n){if(o){var t=o.getElementsByTagName(e),i=0,a=t.length;if(n)for(;i<a;i++)n(t[i],i);return t}return[]}function be(){var o=document.scrollingElement;return o||document.documentElement}function K(o,e,n,t,i){if(!(!o.getBoundingClientRect&&o!==window)){var a,l,s,c,u,p,d;if(o!==window&&o.parentNode&&o!==be()?(a=o.getBoundingClientRect(),l=a.top,s=a.left,c=a.bottom,u=a.right,p=a.height,d=a.width):(l=0,s=0,c=window.innerHeight,u=window.innerWidth,p=window.innerHeight,d=window.innerWidth),(e||n)&&o!==window&&(i=i||o.parentNode,!Ce))do if(i&&i.getBoundingClientRect&&(S(i,"transform")!=="none"||n&&S(i,"position")!=="static")){var b=i.getBoundingClientRect();l-=b.top+parseInt(S(i,"border-top-width")),s-=b.left+parseInt(S(i,"border-left-width")),c=l+a.height,u=s+a.width;break}while(i=i.parentNode);if(t&&o!==window){var v=Me(i||o),y=v&&v.a,w=v&&v.d;v&&(l/=w,s/=y,d/=y,p/=w,c=l+p,u=s+d)}return{top:l,left:s,bottom:c,right:u,width:d,height:p}}}function Wt(o,e,n){for(var t=Te(o,!0),i=K(o)[e];t;){var a=K(t)[n],l=void 0;if(l=i>=a,!l)return t;if(t===be())break;t=Te(t,!1)}return!1}function Re(o,e,n,t){for(var i=0,a=0,l=o.children;a<l.length;){if(l[a].style.display!=="none"&&l[a]!==_.ghost&&(t||l[a]!==_.dragged)&&ge(l[a],n.draggable,o,!1)){if(i===e)return l[a];i++}a++}return null}function Nt(o,e){for(var n=o.lastElementChild;n&&(n===_.ghost||S(n,"display")==="none"||e&&!st(n,e));)n=n.previousElementSibling;return n||null}function pe(o,e){var n=0;if(!o||!o.parentNode)return-1;for(;o=o.previousElementSibling;)o.nodeName.toUpperCase()!=="TEMPLATE"&&o!==_.clone&&(!e||st(o,e))&&n++;return n}function Ut(o){var e=0,n=0,t=be();if(o)do{var i=Me(o),a=i.a,l=i.d;e+=o.scrollLeft*a,n+=o.scrollTop*l}while(o!==t&&(o=o.parentNode));return[e,n]}function to(o,e){for(var n in o)if(o.hasOwnProperty(n)){for(var t in e)if(e.hasOwnProperty(t)&&e[t]===o[n][t])return Number(n)}return-1}function Te(o,e){if(!o||!o.getBoundingClientRect)return be();var n=o,t=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=S(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return be();if(t||e)return n;t=!0}}while(n=n.parentNode);return be()}function no(o,e){if(o&&e)for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);return o}function vt(o,e){return Math.round(o.top)===Math.round(e.top)&&Math.round(o.left)===Math.round(e.left)&&Math.round(o.height)===Math.round(e.height)&&Math.round(o.width)===Math.round(e.width)}var Ye;function gn(o,e){return function(){if(!Ye){var n=arguments,t=this;n.length===1?o.call(t,n[0]):o.apply(t,n),Ye=setTimeout(function(){Ye=void 0},e)}}}function oo(){clearTimeout(Ye),Ye=void 0}function vn(o,e,n){o.scrollLeft+=e,o.scrollTop+=n}function bn(o){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(o).cloneNode(!0):n?n(o).clone(!0)[0]:o.cloneNode(!0)}function yn(o,e,n){var t={};return Array.from(o.children).forEach(function(i){var a,l,s,c;if(!(!ge(i,e.draggable,o,!1)||i.animated||i===n)){var u=K(i);t.left=Math.min((a=t.left)!==null&&a!==void 0?a:1/0,u.left),t.top=Math.min((l=t.top)!==null&&l!==void 0?l:1/0,u.top),t.right=Math.max((s=t.right)!==null&&s!==void 0?s:-1/0,u.right),t.bottom=Math.max((c=t.bottom)!==null&&c!==void 0?c:-1/0,u.bottom)}}),t.width=t.right-t.left,t.height=t.bottom-t.top,t.x=t.left,t.y=t.top,t}var ie="Sortable"+new Date().getTime();function ro(){var o=[],e;return{captureAnimationState:function(){if(o=[],!!this.options.animation){var t=[].slice.call(this.el.children);t.forEach(function(i){if(!(S(i,"display")==="none"||i===_.ghost)){o.push({target:i,rect:K(i)});var a=ye({},o[o.length-1].rect);if(i.thisAnimationDuration){var l=Me(i,!0);l&&(a.top-=l.f,a.left-=l.e)}i.fromRect=a}})}},addAnimationState:function(t){o.push(t)},removeAnimationState:function(t){o.splice(to(o,{target:t}),1)},animateAll:function(t){var i=this;if(!this.options.animation){clearTimeout(e),typeof t=="function"&&t();return}var a=!1,l=0;o.forEach(function(s){var c=0,u=s.target,p=u.fromRect,d=K(u),b=u.prevFromRect,v=u.prevToRect,y=s.rect,w=Me(u,!0);w&&(d.top-=w.f,d.left-=w.e),u.toRect=d,u.thisAnimationDuration&&vt(b,d)&&!vt(p,d)&&(y.top-d.top)/(y.left-d.left)===(p.top-d.top)/(p.left-d.left)&&(c=ao(y,b,v,i.options)),vt(d,p)||(u.prevFromRect=p,u.prevToRect=d,c||(c=i.options.animation),i.animate(u,y,d,c)),c&&(a=!0,l=Math.max(l,c),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},c),u.thisAnimationDuration=c)}),clearTimeout(e),a?e=setTimeout(function(){typeof t=="function"&&t()},l):typeof t=="function"&&t(),o=[]},animate:function(t,i,a,l){if(l){S(t,"transition",""),S(t,"transform","");var s=Me(this.el),c=s&&s.a,u=s&&s.d,p=(i.left-a.left)/(c||1),d=(i.top-a.top)/(u||1);t.animatingX=!!p,t.animatingY=!!d,S(t,"transform","translate3d("+p+"px,"+d+"px,0)"),this.forRepaintDummy=io(t),S(t,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),S(t,"transform","translate3d(0,0,0)"),typeof t.animated=="number"&&clearTimeout(t.animated),t.animated=setTimeout(function(){S(t,"transition",""),S(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},l)}}}}function io(o){return o.offsetWidth}function ao(o,e,n,t){return Math.sqrt(Math.pow(e.top-o.top,2)+Math.pow(e.left-o.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*t.animation}var Oe=[],bt={initializeByDefault:!0},Ke={mount:function(e){for(var n in bt)bt.hasOwnProperty(n)&&!(n in e)&&(e[n]=bt[n]);Oe.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Oe.push(e)},pluginEvent:function(e,n,t){var i=this;this.eventCanceled=!1,t.cancel=function(){i.eventCanceled=!0};var a=e+"Global";Oe.forEach(function(l){n[l.pluginName]&&(n[l.pluginName][a]&&n[l.pluginName][a](ye({sortable:n},t)),n.options[l.pluginName]&&n[l.pluginName][e]&&n[l.pluginName][e](ye({sortable:n},t)))})},initializePlugins:function(e,n,t,i){Oe.forEach(function(s){var c=s.pluginName;if(!(!e.options[c]&&!s.initializeByDefault)){var u=new s(e,n,e.options);u.sortable=e,u.options=e.options,e[c]=u,_e(t,u.defaults)}});for(var a in e.options)if(e.options.hasOwnProperty(a)){var l=this.modifyOption(e,a,e.options[a]);typeof l<"u"&&(e.options[a]=l)}},getEventProperties:function(e,n){var t={};return Oe.forEach(function(i){typeof i.eventProperties=="function"&&_e(t,i.eventProperties.call(n[i.pluginName],e))}),t},modifyOption:function(e,n,t){var i;return Oe.forEach(function(a){e[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[n]=="function"&&(i=a.optionListeners[n].call(e[a.pluginName],t))}),i}};function lo(o){var e=o.sortable,n=o.rootEl,t=o.name,i=o.targetEl,a=o.cloneEl,l=o.toEl,s=o.fromEl,c=o.oldIndex,u=o.newIndex,p=o.oldDraggableIndex,d=o.newDraggableIndex,b=o.originalEvent,v=o.putSortable,y=o.extraEventProperties;if(e=e||n&&n[ie],!!e){var w,$=e.options,C="on"+t.charAt(0).toUpperCase()+t.substr(1);window.CustomEvent&&!Ce&&!Qe?w=new CustomEvent(t,{bubbles:!0,cancelable:!0}):(w=document.createEvent("Event"),w.initEvent(t,!0,!0)),w.to=l||n,w.from=s||n,w.item=i||n,w.clone=a,w.oldIndex=c,w.newIndex=u,w.oldDraggableIndex=p,w.newDraggableIndex=d,w.originalEvent=b,w.pullMode=v?v.lastPutMode:void 0;var D=ye(ye({},y),Ke.getEventProperties(t,e));for(var M in D)w[M]=D[M];n&&n.dispatchEvent(w),$[C]&&$[C].call(e,w)}}var so=["evt"],re=function(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=t.evt,a=Zn(t,so);Ke.pluginEvent.bind(_)(e,n,ye({dragEl:f,parentEl:G,ghostEl:E,rootEl:Y,nextEl:ke,lastDownEl:rt,cloneEl:H,cloneHidden:Be,dragStarted:Le,putSortable:ee,activeSortable:_.active,originalEvent:i,oldIndex:xe,oldDraggableIndex:He,newIndex:ue,newDraggableIndex:De,hideGhostForTarget:Cn,unhideGhostForTarget:En,cloneNowHidden:function(){Be=!0},cloneNowShown:function(){Be=!1},dispatchSortableEvent:function(s){oe({sortable:n,name:s,originalEvent:i})}},a))};function oe(o){lo(ye({putSortable:ee,cloneEl:H,targetEl:f,rootEl:Y,oldIndex:xe,oldDraggableIndex:He,newIndex:ue,newDraggableIndex:De},o))}var f,G,E,Y,ke,rt,H,Be,xe,ue,He,De,Ze,ee,Ie=!1,ut=!1,ct=[],Pe,me,yt,wt,Qt,Kt,Le,Fe,Ge,We=!1,et=!1,it,ne,St=[],Bt=!1,dt=[],pt=typeof document<"u",tt=kt,Jt=Qe||Ce?"cssFloat":"float",uo=pt&&!fn&&!kt&&"draggable"in document.createElement("div"),wn=function(){if(pt){if(Ce)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),Sn=function(e,n){var t=S(e),i=parseInt(t.width)-parseInt(t.paddingLeft)-parseInt(t.paddingRight)-parseInt(t.borderLeftWidth)-parseInt(t.borderRightWidth),a=Re(e,0,n),l=Re(e,1,n),s=a&&S(a),c=l&&S(l),u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+K(a).width,p=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+K(l).width;if(t.display==="flex")return t.flexDirection==="column"||t.flexDirection==="column-reverse"?"vertical":"horizontal";if(t.display==="grid")return t.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&s.float&&s.float!=="none"){var d=s.float==="left"?"left":"right";return l&&(c.clear==="both"||c.clear===d)?"vertical":"horizontal"}return a&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||u>=i&&t[Jt]==="none"||l&&t[Jt]==="none"&&u+p>i)?"vertical":"horizontal"},co=function(e,n,t){var i=t?e.left:e.top,a=t?e.right:e.bottom,l=t?e.width:e.height,s=t?n.left:n.top,c=t?n.right:n.bottom,u=t?n.width:n.height;return i===s||a===c||i+l/2===s+u/2},fo=function(e,n){var t;return ct.some(function(i){var a=i[ie].options.emptyInsertThreshold;if(!(!a||Nt(i))){var l=K(i),s=e>=l.left-a&&e<=l.right+a,c=n>=l.top-a&&n<=l.bottom+a;if(s&&c)return t=i}}),t},_n=function(e){function n(a,l){return function(s,c,u,p){var d=s.options.group.name&&c.options.group.name&&s.options.group.name===c.options.group.name;if(a==null&&(l||d))return!0;if(a==null||a===!1)return!1;if(l&&a==="clone")return a;if(typeof a=="function")return n(a(s,c,u,p),l)(s,c,u,p);var b=(l?s:c).options.group.name;return a===!0||typeof a=="string"&&a===b||a.join&&a.indexOf(b)>-1}}var t={},i=e.group;(!i||ot(i)!="object")&&(i={name:i}),t.name=i.name,t.checkPull=n(i.pull,!0),t.checkPut=n(i.put),t.revertClone=i.revertClone,e.group=t},Cn=function(){!wn&&E&&S(E,"display","none")},En=function(){!wn&&E&&S(E,"display","")};pt&&!fn&&document.addEventListener("click",function(o){if(ut)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),ut=!1,!1},!0);var Ae=function(e){if(f){e=e.touches?e.touches[0]:e;var n=fo(e.clientX,e.clientY);if(n){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);t.target=t.rootEl=n,t.preventDefault=void 0,t.stopPropagation=void 0,n[ie]._onDragOver(t)}}},po=function(e){f&&f.parentNode[ie]._isOutsideThisEl(e.target)};function _(o,e){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=e=_e({},e),o[ie]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Sn(o,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,s){l.setData("Text",s.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:_.supportPointer!==!1&&"PointerEvent"in window&&(!Xe||kt),emptyInsertThreshold:5};Ke.initializePlugins(this,o,n);for(var t in n)!(t in e)&&(e[t]=n[t]);_n(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:uo,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?N(o,"pointerdown",this._onTapStart):(N(o,"mousedown",this._onTapStart),N(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(N(o,"dragover",this),N(o,"dragenter",this)),ct.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),_e(this,ro())}_.prototype={constructor:_,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Fe=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,f):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,t=this.el,i=this.options,a=i.preventOnFilter,l=e.type,s=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,c=(s||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||c,p=i.filter;if(So(t),!f&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Xe&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=ge(c,i.draggable,t,!1),!(c&&c.animated)&&rt!==c)){if(xe=pe(c),He=pe(c,i.draggable),typeof p=="function"){if(p.call(this,e,c,this)){oe({sortable:n,rootEl:u,name:"filter",targetEl:c,toEl:t,fromEl:t}),re("filter",n,{evt:e}),a&&e.preventDefault();return}}else if(p&&(p=p.split(",").some(function(d){if(d=ge(u,d.trim(),t,!1),d)return oe({sortable:n,rootEl:d,name:"filter",targetEl:c,fromEl:t,toEl:t}),re("filter",n,{evt:e}),!0}),p)){a&&e.preventDefault();return}i.handle&&!ge(u,i.handle,t,!1)||this._prepareDragStart(e,s,c)}}},_prepareDragStart:function(e,n,t){var i=this,a=i.el,l=i.options,s=a.ownerDocument,c;if(t&&!f&&t.parentNode===a){var u=K(t);if(Y=a,f=t,G=f.parentNode,ke=f.nextSibling,rt=t,Ze=l.group,_.dragged=f,Pe={target:f,clientX:(n||e).clientX,clientY:(n||e).clientY},Qt=Pe.clientX-u.left,Kt=Pe.clientY-u.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,f.style["will-change"]="all",c=function(){if(re("delayEnded",i,{evt:e}),_.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Ht&&i.nativeDraggable&&(f.draggable=!0),i._triggerDragStart(e,n),oe({sortable:i,name:"choose",originalEvent:e}),se(f,l.chosenClass,!0)},l.ignore.split(",").forEach(function(p){mn(f,p.trim(),_t)}),N(s,"dragover",Ae),N(s,"mousemove",Ae),N(s,"touchmove",Ae),l.supportPointer?(N(s,"pointerup",i._onDrop),!this.nativeDraggable&&N(s,"pointercancel",i._onDrop)):(N(s,"mouseup",i._onDrop),N(s,"touchend",i._onDrop),N(s,"touchcancel",i._onDrop)),Ht&&this.nativeDraggable&&(this.options.touchStartThreshold=4,f.draggable=!0),re("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Qe||Ce))){if(_.eventCanceled){this._onDrop();return}l.supportPointer?(N(s,"pointerup",i._disableDelayedDrag),N(s,"pointercancel",i._disableDelayedDrag)):(N(s,"mouseup",i._disableDelayedDrag),N(s,"touchend",i._disableDelayedDrag),N(s,"touchcancel",i._disableDelayedDrag)),N(s,"mousemove",i._delayedDragTouchMoveHandler),N(s,"touchmove",i._delayedDragTouchMoveHandler),l.supportPointer&&N(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(c,l.delay)}else c()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){f&&_t(f),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;k(e,"mouseup",this._disableDelayedDrag),k(e,"touchend",this._disableDelayedDrag),k(e,"touchcancel",this._disableDelayedDrag),k(e,"pointerup",this._disableDelayedDrag),k(e,"pointercancel",this._disableDelayedDrag),k(e,"mousemove",this._delayedDragTouchMoveHandler),k(e,"touchmove",this._delayedDragTouchMoveHandler),k(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?N(document,"pointermove",this._onTouchMove):n?N(document,"touchmove",this._onTouchMove):N(document,"mousemove",this._onTouchMove):(N(f,"dragend",this),N(Y,"dragstart",this._onDragStart));try{document.selection?at(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(Ie=!1,Y&&f){re("dragStarted",this,{evt:n}),this.nativeDraggable&&N(document,"dragover",po);var t=this.options;!e&&se(f,t.dragClass,!1),se(f,t.ghostClass,!0),_.active=this,e&&this._appendGhost(),oe({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(me){this._lastX=me.clientX,this._lastY=me.clientY,Cn();for(var e=document.elementFromPoint(me.clientX,me.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(me.clientX,me.clientY),e!==n);)n=e;if(f.parentNode[ie]._isOutsideThisEl(e),n)do{if(n[ie]){var t=void 0;if(t=n[ie]._onDragOver({clientX:me.clientX,clientY:me.clientY,target:e,rootEl:n}),t&&!this.options.dragoverBubble)break}e=n}while(n=hn(n));En()}},_onTouchMove:function(e){if(Pe){var n=this.options,t=n.fallbackTolerance,i=n.fallbackOffset,a=e.touches?e.touches[0]:e,l=E&&Me(E,!0),s=E&&l&&l.a,c=E&&l&&l.d,u=tt&&ne&&Ut(ne),p=(a.clientX-Pe.clientX+i.x)/(s||1)+(u?u[0]-St[0]:0)/(s||1),d=(a.clientY-Pe.clientY+i.y)/(c||1)+(u?u[1]-St[1]:0)/(c||1);if(!_.active&&!Ie){if(t&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<t)return;this._onDragStart(e,!0)}if(E){l?(l.e+=p-(yt||0),l.f+=d-(wt||0)):l={a:1,b:0,c:0,d:1,e:p,f:d};var b="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");S(E,"webkitTransform",b),S(E,"mozTransform",b),S(E,"msTransform",b),S(E,"transform",b),yt=p,wt=d,me=a}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!E){var e=this.options.fallbackOnBody?document.body:Y,n=K(f,!0,tt,!0,e),t=this.options;if(tt){for(ne=e;S(ne,"position")==="static"&&S(ne,"transform")==="none"&&ne!==document;)ne=ne.parentNode;ne!==document.body&&ne!==document.documentElement?(ne===document&&(ne=be()),n.top+=ne.scrollTop,n.left+=ne.scrollLeft):ne=be(),St=Ut(ne)}E=f.cloneNode(!0),se(E,t.ghostClass,!1),se(E,t.fallbackClass,!0),se(E,t.dragClass,!0),S(E,"transition",""),S(E,"transform",""),S(E,"box-sizing","border-box"),S(E,"margin",0),S(E,"top",n.top),S(E,"left",n.left),S(E,"width",n.width),S(E,"height",n.height),S(E,"opacity","0.8"),S(E,"position",tt?"absolute":"fixed"),S(E,"zIndex","100000"),S(E,"pointerEvents","none"),_.ghost=E,e.appendChild(E),S(E,"transform-origin",Qt/parseInt(E.style.width)*100+"% "+Kt/parseInt(E.style.height)*100+"%")}},_onDragStart:function(e,n){var t=this,i=e.dataTransfer,a=t.options;if(re("dragStart",this,{evt:e}),_.eventCanceled){this._onDrop();return}re("setupClone",this),_.eventCanceled||(H=bn(f),H.removeAttribute("id"),H.draggable=!1,H.style["will-change"]="",this._hideClone(),se(H,this.options.chosenClass,!1),_.clone=H),t.cloneId=at(function(){re("clone",t),!_.eventCanceled&&(t.options.removeCloneOnHide||Y.insertBefore(H,f),t._hideClone(),oe({sortable:t,name:"clone"}))}),!n&&se(f,a.dragClass,!0),n?(ut=!0,t._loopId=setInterval(t._emulateDragOver,50)):(k(document,"mouseup",t._onDrop),k(document,"touchend",t._onDrop),k(document,"touchcancel",t._onDrop),i&&(i.effectAllowed="move",a.setData&&a.setData.call(t,i,f)),N(document,"drop",t),S(f,"transform","translateZ(0)")),Ie=!0,t._dragStartId=at(t._dragStarted.bind(t,n,e)),N(document,"selectstart",t),Le=!0,window.getSelection().removeAllRanges(),Xe&&S(document.body,"user-select","none")},_onDragOver:function(e){var n=this.el,t=e.target,i,a,l,s=this.options,c=s.group,u=_.active,p=Ze===c,d=s.sort,b=ee||u,v,y=this,w=!1;if(Bt)return;function $(ae,$e){re(ae,y,ye({evt:e,isOwner:p,axis:v?"vertical":"horizontal",revert:l,dragRect:i,targetRect:a,canSort:d,fromSortable:b,target:t,completed:D,onMove:function(de,Je){return nt(Y,n,f,i,de,K(de),e,Je)},changed:M},$e))}function C(){$("dragOverAnimationCapture"),y.captureAnimationState(),y!==b&&b.captureAnimationState()}function D(ae){return $("dragOverCompleted",{insertion:ae}),ae&&(p?u._hideClone():u._showClone(y),y!==b&&(se(f,ee?ee.options.ghostClass:u.options.ghostClass,!1),se(f,s.ghostClass,!0)),ee!==y&&y!==_.active?ee=y:y===_.active&&ee&&(ee=null),b===y&&(y._ignoreWhileAnimating=t),y.animateAll(function(){$("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==b&&(b.animateAll(),b._ignoreWhileAnimating=null)),(t===f&&!f.animated||t===n&&!t.animated)&&(Fe=null),!s.dragoverBubble&&!e.rootEl&&t!==document&&(f.parentNode[ie]._isOutsideThisEl(e.target),!ae&&Ae(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),w=!0}function M(){ue=pe(f),De=pe(f,s.draggable),oe({sortable:y,name:"change",toEl:n,newIndex:ue,newDraggableIndex:De,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),t=ge(t,s.draggable,n,!0),$("dragOver"),_.eventCanceled)return w;if(f.contains(e.target)||t.animated&&t.animatingX&&t.animatingY||y._ignoreWhileAnimating===t)return D(!1);if(ut=!1,u&&!s.disabled&&(p?d||(l=G!==Y):ee===this||(this.lastPutMode=Ze.checkPull(this,u,f,e))&&c.checkPut(this,u,f,e))){if(v=this._getDirection(e,t)==="vertical",i=K(f),$("dragOverValid"),_.eventCanceled)return w;if(l)return G=Y,C(),this._hideClone(),$("revert"),_.eventCanceled||(ke?Y.insertBefore(f,ke):Y.appendChild(f)),D(!0);var B=Nt(n,s.draggable);if(!B||vo(e,v,this)&&!B.animated){if(B===f)return D(!1);if(B&&n===e.target&&(t=B),t&&(a=K(t)),nt(Y,n,f,i,t,a,e,!!t)!==!1)return C(),B&&B.nextSibling?n.insertBefore(f,B.nextSibling):n.appendChild(f),G=n,M(),D(!0)}else if(B&&go(e,v,this)){var O=Re(n,0,s,!0);if(O===f)return D(!1);if(t=O,a=K(t),nt(Y,n,f,i,t,a,e,!1)!==!1)return C(),n.insertBefore(f,O),G=n,M(),D(!0)}else if(t.parentNode===n){a=K(t);var z=0,W,U=f.parentNode!==n,h=!co(f.animated&&f.toRect||i,t.animated&&t.toRect||a,v),g=v?"top":"left",P=Wt(t,"top","top")||Wt(f,"top","top"),V=P?P.scrollTop:void 0;Fe!==t&&(W=a[g],We=!1,et=!h&&s.invertSwap||U),z=bo(e,t,a,v,h?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,et,Fe===t);var T;if(z!==0){var R=pe(f);do R-=z,T=G.children[R];while(T&&(S(T,"display")==="none"||T===E))}if(z===0||T===t)return D(!1);Fe=t,Ge=z;var I=t.nextElementSibling,q=!1;q=z===1;var ve=nt(Y,n,f,i,t,a,e,q);if(ve!==!1)return(ve===1||ve===-1)&&(q=ve===1),Bt=!0,setTimeout(mo,30),C(),q&&!I?n.appendChild(f):t.parentNode.insertBefore(f,q?I:t),P&&vn(P,0,V-P.scrollTop),G=f.parentNode,W!==void 0&&!et&&(it=Math.abs(W-K(t)[g])),M(),D(!0)}if(n.contains(f))return D(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){k(document,"mousemove",this._onTouchMove),k(document,"touchmove",this._onTouchMove),k(document,"pointermove",this._onTouchMove),k(document,"dragover",Ae),k(document,"mousemove",Ae),k(document,"touchmove",Ae)},_offUpEvents:function(){var e=this.el.ownerDocument;k(e,"mouseup",this._onDrop),k(e,"touchend",this._onDrop),k(e,"pointerup",this._onDrop),k(e,"pointercancel",this._onDrop),k(e,"touchcancel",this._onDrop),k(document,"selectstart",this)},_onDrop:function(e){var n=this.el,t=this.options;if(ue=pe(f),De=pe(f,t.draggable),re("drop",this,{evt:e}),G=f&&f.parentNode,ue=pe(f),De=pe(f,t.draggable),_.eventCanceled){this._nulling();return}Ie=!1,et=!1,We=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Tt(this.cloneId),Tt(this._dragStartId),this.nativeDraggable&&(k(document,"drop",this),k(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Xe&&S(document.body,"user-select",""),S(f,"transform",""),e&&(Le&&(e.cancelable&&e.preventDefault(),!t.dropBubble&&e.stopPropagation()),E&&E.parentNode&&E.parentNode.removeChild(E),(Y===G||ee&&ee.lastPutMode!=="clone")&&H&&H.parentNode&&H.parentNode.removeChild(H),f&&(this.nativeDraggable&&k(f,"dragend",this),_t(f),f.style["will-change"]="",Le&&!Ie&&se(f,ee?ee.options.ghostClass:this.options.ghostClass,!1),se(f,this.options.chosenClass,!1),oe({sortable:this,name:"unchoose",toEl:G,newIndex:null,newDraggableIndex:null,originalEvent:e}),Y!==G?(ue>=0&&(oe({rootEl:G,name:"add",toEl:G,fromEl:Y,originalEvent:e}),oe({sortable:this,name:"remove",toEl:G,originalEvent:e}),oe({rootEl:G,name:"sort",toEl:G,fromEl:Y,originalEvent:e}),oe({sortable:this,name:"sort",toEl:G,originalEvent:e})),ee&&ee.save()):ue!==xe&&ue>=0&&(oe({sortable:this,name:"update",toEl:G,originalEvent:e}),oe({sortable:this,name:"sort",toEl:G,originalEvent:e})),_.active&&((ue==null||ue===-1)&&(ue=xe,De=He),oe({sortable:this,name:"end",toEl:G,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){re("nulling",this),Y=f=G=E=ke=H=rt=Be=Pe=me=Le=ue=De=xe=He=Fe=Ge=ee=Ze=_.dragged=_.ghost=_.clone=_.active=null,dt.forEach(function(e){e.checked=!0}),dt.length=yt=wt=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":f&&(this._onDragOver(e),ho(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,t=this.el.children,i=0,a=t.length,l=this.options;i<a;i++)n=t[i],ge(n,l.draggable,this.el,!1)&&e.push(n.getAttribute(l.dataIdAttr)||wo(n));return e},sort:function(e,n){var t={},i=this.el;this.toArray().forEach(function(a,l){var s=i.children[l];ge(s,this.options.draggable,i,!1)&&(t[a]=s)},this),n&&this.captureAnimationState(),e.forEach(function(a){t[a]&&(i.removeChild(t[a]),i.appendChild(t[a]))}),n&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return ge(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var t=this.options;if(n===void 0)return t[e];var i=Ke.modifyOption(this,e,n);typeof i<"u"?t[e]=i:t[e]=n,e==="group"&&_n(t)},destroy:function(){re("destroy",this);var e=this.el;e[ie]=null,k(e,"mousedown",this._onTapStart),k(e,"touchstart",this._onTapStart),k(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(k(e,"dragover",this),k(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ct.splice(ct.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Be){if(re("hideClone",this),_.eventCanceled)return;S(H,"display","none"),this.options.removeCloneOnHide&&H.parentNode&&H.parentNode.removeChild(H),Be=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Be){if(re("showClone",this),_.eventCanceled)return;f.parentNode==Y&&!this.options.group.revertClone?Y.insertBefore(H,f):ke?Y.insertBefore(H,ke):Y.appendChild(H),this.options.group.revertClone&&this.animate(f,H),S(H,"display",""),Be=!1}}};function ho(o){o.dataTransfer&&(o.dataTransfer.dropEffect="move"),o.cancelable&&o.preventDefault()}function nt(o,e,n,t,i,a,l,s){var c,u=o[ie],p=u.options.onMove,d;return window.CustomEvent&&!Ce&&!Qe?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=e,c.from=o,c.dragged=n,c.draggedRect=t,c.related=i||e,c.relatedRect=a||K(e),c.willInsertAfter=s,c.originalEvent=l,o.dispatchEvent(c),p&&(d=p.call(u,c,l)),d}function _t(o){o.draggable=!1}function mo(){Bt=!1}function go(o,e,n){var t=K(Re(n.el,0,n.options,!0)),i=yn(n.el,n.options,E),a=10;return e?o.clientX<i.left-a||o.clientY<t.top&&o.clientX<t.right:o.clientY<i.top-a||o.clientY<t.bottom&&o.clientX<t.left}function vo(o,e,n){var t=K(Nt(n.el,n.options.draggable)),i=yn(n.el,n.options,E),a=10;return e?o.clientX>i.right+a||o.clientY>t.bottom&&o.clientX>t.left:o.clientY>i.bottom+a||o.clientX>t.right&&o.clientY>t.top}function bo(o,e,n,t,i,a,l,s){var c=t?o.clientY:o.clientX,u=t?n.height:n.width,p=t?n.top:n.left,d=t?n.bottom:n.right,b=!1;if(!l){if(s&&it<u*i){if(!We&&(Ge===1?c>p+u*a/2:c<d-u*a/2)&&(We=!0),We)b=!0;else if(Ge===1?c<p+it:c>d-it)return-Ge}else if(c>p+u*(1-i)/2&&c<d-u*(1-i)/2)return yo(e)}return b=b||l,b&&(c<p+u*a/2||c>d-u*a/2)?c>p+u/2?1:-1:0}function yo(o){return pe(f)<pe(o)?1:-1}function wo(o){for(var e=o.tagName+o.className+o.src+o.href+o.textContent,n=e.length,t=0;n--;)t+=e.charCodeAt(n);return t.toString(36)}function So(o){dt.length=0;for(var e=o.getElementsByTagName("input"),n=e.length;n--;){var t=e[n];t.checked&&dt.push(t)}}function at(o){return setTimeout(o,0)}function Tt(o){return clearTimeout(o)}pt&&N(document,"touchmove",function(o){(_.active||Ie)&&o.cancelable&&o.preventDefault()});_.utils={on:N,off:k,css:S,find:mn,is:function(e,n){return!!ge(e,n,e,!1)},extend:no,throttle:gn,closest:ge,toggleClass:se,clone:bn,index:pe,nextTick:at,cancelNextTick:Tt,detectDirection:Sn,getChild:Re,expando:ie};_.get=function(o){return o[ie]};_.mount=function(){for(var o=arguments.length,e=new Array(o),n=0;n<o;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&&(_.utils=ye(ye({},_.utils),t.utils)),Ke.mount(t)})};_.create=function(o,e){return new _(o,e)};_.version=eo;var Q=[],qe,Pt,At=!1,Ct,Et,ft,je;function _o(){function o(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return o.prototype={dragStarted:function(n){var t=n.originalEvent;this.sortable.nativeDraggable?N(document,"dragover",this._handleAutoScroll):this.options.supportPointer?N(document,"pointermove",this._handleFallbackAutoScroll):t.touches?N(document,"touchmove",this._handleFallbackAutoScroll):N(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var t=n.originalEvent;!this.options.dragOverBubble&&!t.rootEl&&this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?k(document,"dragover",this._handleAutoScroll):(k(document,"pointermove",this._handleFallbackAutoScroll),k(document,"touchmove",this._handleFallbackAutoScroll),k(document,"mousemove",this._handleFallbackAutoScroll)),Zt(),lt(),oo()},nulling:function(){ft=Pt=qe=At=je=Ct=Et=null,Q.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,t){var i=this,a=(n.touches?n.touches[0]:n).clientX,l=(n.touches?n.touches[0]:n).clientY,s=document.elementFromPoint(a,l);if(ft=n,t||this.options.forceAutoScrollFallback||Qe||Ce||Xe){Dt(n,this.options,s,t);var c=Te(s,!0);At&&(!je||a!==Ct||l!==Et)&&(je&&Zt(),je=setInterval(function(){var u=Te(document.elementFromPoint(a,l),!0);u!==c&&(c=u,lt()),Dt(n,i.options,u,t)},10),Ct=a,Et=l)}else{if(!this.options.bubbleScroll||Te(s,!0)===be()){lt();return}Dt(n,this.options,Te(s,!1),!1)}}},_e(o,{pluginName:"scroll",initializeByDefault:!0})}function lt(){Q.forEach(function(o){clearInterval(o.pid)}),Q=[]}function Zt(){clearInterval(je)}var Dt=gn(function(o,e,n,t){if(e.scroll){var i=(o.touches?o.touches[0]:o).clientX,a=(o.touches?o.touches[0]:o).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,c=be(),u=!1,p;Pt!==n&&(Pt=n,lt(),qe=e.scroll,p=e.scrollFn,qe===!0&&(qe=Te(n,!0)));var d=0,b=qe;do{var v=b,y=K(v),w=y.top,$=y.bottom,C=y.left,D=y.right,M=y.width,B=y.height,O=void 0,z=void 0,W=v.scrollWidth,U=v.scrollHeight,h=S(v),g=v.scrollLeft,P=v.scrollTop;v===c?(O=M<W&&(h.overflowX==="auto"||h.overflowX==="scroll"||h.overflo