123456 |
- var ln=Object.defineProperty;var sn=(i,e,t)=>e in i?ln(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var F=(i,e,t)=>(sn(i,typeof e!="symbol"?e+"":e,t),t);import{b as dn,i as We,P as st,a2 as un,a5 as fn,_ as Yt,v as cn,a6 as hn,Y as dt}from"./index-EwE51S_X.js";import{d as Tt,r as $e,j as V,aE as pn,a2 as gn,az as Xt,a as Ve,K as te,aq as jt,e as y,f as A,y as G,C,u as I,F as ee,B as Ue,L as j,t as ce,m as ut,i as It,n as mn,z as vn,am as Ke,ar as Se,x as bn,s as Ie,aA as yn,D as wn,aC as Nt,Z as En,a1 as Sn,w as _n}from"./vue-A59npLRR.js";const Dn=Tt({name:"Column",props:{attr:{type:Object,required:!0}},setup(i,{slots:e}){const t=$e(i.attr);return t["column-key"]=t["column-key"]?t["column-key"]:t.prop||dn(),()=>V(pn,t,e.default)}}),Tn=(i,e)=>{e.target=="_blank"?window.open(i):window.location.href=i},wi=(i=["weigh-sort","edit","delete"])=>{const e=new Map([["weigh-sort",{render:"moveButton",name:"weigh-sort",title:"Drag sort",text:"",type:"info",icon:"fa fa-arrows",class:"table-row-weigh-sort",disabledTip:!1}],["edit",{render:"tipButton",name:"edit",title:"Edit",text:"",type:"primary",icon:"fa fa-pencil",class:"table-row-edit",disabledTip:!1}],["delete",{render:"confirmButton",name:"delete",title:"Delete",text:"",type:"danger",icon:"fa fa-trash",class:"table-row-delete",popconfirm:{confirmButtonText:We.global.t("Delete"),cancelButtonText:We.global.t("Cancel"),confirmButtonType:"danger",title:We.global.t("Are you sure to delete the selected record?")},disabledTip:!1}]]),t=[];for(const n in i)e.has(i[n])&&t.push(e.get(i[n]));return t},wt=(i,e,t=-1)=>{for(const n in i){if(typeof t=="number"&&t++,t==e)return i[n];if(i[n].children&&(t=wt(i[n].children,e,t),typeof t!="number"))return t}return t},Cn={key:2,class:"ba-render-image"},An={key:3,class:"ba-render-image"},kn={key:4},On={key:5},In={key:6},Nn={key:7},Fn={key:8},Pn=["innerHTML"],Rn={key:11},Bn={key:0,class:"table-operate-text"},Mn={key:0,class:"table-operate-text"},xn={class:"ml-6"},zn={key:0,class:"table-operate-text"},Ln={key:0,class:"table-operate-text"},Hn=Tt({__name:"index",props:{row:{},field:{},column:{},index:{}},setup(i){const{t:e}=gn(),t=Xt("baTable"),n=i,o=Ve(n.field.prop),r=Ve(o.value?n.row[o.value]:"");if(o.value&&o.value.indexOf(".")>-1){let a=o.value.split("."),h=Ve(n.row[a[0]]);for(let c=1;c<a.length;c++)h.value=h.value?h.value[a[c]]??"":"";r.value=h.value}n.field.renderFormatter&&typeof n.field.renderFormatter=="function"&&(r.value=n.field.renderFormatter(n.row,n.field,r.value,n.column,n.index));const l=a=>{t.onTableAction("field-change",{value:a,...n})},s=a=>{if(typeof a.click=="function"){a.click(n.row,n.field);return}t.onTableAction(a.name,n)},u=(a,h)=>h&&h[a]?h[a]:"";return(a,h)=>{const c=te("Icon"),b=te("el-switch"),_=te("el-image"),w=te("el-tag"),E=te("el-button"),z=te("el-input"),q=te("el-tooltip"),M=te("el-popconfirm"),p=jt("blur");return y(),A(ee,null,[a.field.render=="icon"?(y(),G(c,{key:0,class:"ba-icon-dark",name:r.value?r.value:a.field.default??""},null,8,["name"])):C("",!0),a.field.render=="switch"?(y(),G(b,{key:1,onChange:l,"model-value":r.value.toString(),loading:a.row.loading,"active-value":"1","inactive-value":"0"},null,8,["model-value","loading"])):C("",!0),a.field.render=="image"&&r.value?(y(),A("div",Cn,[V(_,{"hide-on-click-modal":!0,"preview-teleported":!0,"preview-src-list":[I(st)(r.value)],src:I(st)(r.value)},null,8,["preview-src-list","src"])])):C("",!0),a.field.render=="images"?(y(),A("div",An,[Array.isArray(r.value)&&r.value.length?(y(!0),A(ee,{key:0},Ue(r.value,(d,S)=>(y(),G(_,{key:S,"initial-index":S,"preview-teleported":!0,"preview-src-list":I(un)(r.value),class:"images-item",src:I(st)(d),"hide-on-click-modal":!0},null,8,["initial-index","preview-src-list","src"]))),128)):C("",!0)])):C("",!0),a.field.render=="tag"&&r.value!==""?(y(),A("div",kn,[V(w,{type:u(r.value,a.field.custom),effect:a.field.effect??"light",size:a.field.size??"default"},{default:j(()=>[ut(ce(a.field.replaceValue?a.field.replaceValue[r.value]:r.value),1)]),_:1},8,["type","effect","size"])])):C("",!0),a.field.render=="tags"?(y(),A("div",On,[Array.isArray(r.value)?(y(!0),A(ee,{key:0},Ue(r.value,(d,S)=>(y(),A(ee,{key:S},[d?(y(),G(w,{key:0,class:"m-10",type:u(d,a.field.custom),effect:a.field.effect??"light",size:a.field.size??"default"},{default:j(()=>[ut(ce(a.field.replaceValue?a.field.replaceValue[d]??d:d),1)]),_:2},1032,["type","effect","size"])):C("",!0)],64))),128)):(y(),A(ee,{key:1},[r.value!==""?(y(),G(w,{key:0,class:"m-10",type:u(r.value,a.field.custom),effect:a.field.effect??"light",size:a.field.size??"default"},{default:j(()=>[ut(ce(a.field.replaceValue?a.field.replaceValue[r.value]??r.value:r.value),1)]),_:1},8,["type","effect","size"])):C("",!0)],64))])):C("",!0),a.field.render=="url"&&r.value?(y(),A("div",In,[V(z,{"model-value":r.value,placeholder:I(e)("Link address")},{append:j(()=>[V(E,{onClick:h[0]||(h[0]=d=>typeof a.field.click=="function"?a.field.click(a.row,a.field,r.value,a.column,a.index):I(Tn)(r.value,a.field))},{default:j(()=>[V(c,{color:"#606266",name:"el-icon-Position"})]),_:1})]),_:1},8,["model-value","placeholder"])])):C("",!0),a.field.render=="datetime"?(y(),A("div",Nn,ce(r.value?I(fn)(r.value,a.field.timeFormat??void 0):"-"),1)):C("",!0),a.field.render=="color"?(y(),A("div",Fn,[It("div",{style:mn({background:r.value}),class:"ba-render-color"},null,4)])):C("",!0),a.field.render=="customTemplate"?(y(),A("div",{key:9,innerHTML:a.field.customTemplate?a.field.customTemplate(a.row,a.field,r.value,a.column,a.index):""},null,8,Pn)):C("",!0),a.field.render=="customRender"?(y(),G(vn(a.field.customRender),{key:10,renderRow:a.row,renderField:a.field,renderValue:r.value,renderColumn:a.column,renderIndex:a.index},null,8,["renderRow","renderField","renderValue","renderColumn","renderIndex"])):C("",!0),a.field.render=="buttons"&&a.field.buttons?(y(),A("div",Rn,[(y(!0),A(ee,null,Ue(a.field.buttons,(d,S)=>(y(),A(ee,{key:S},[!d.display||d.display(a.row,a.field)?(y(),A(ee,{key:0},[d.render=="basicButton"?Ke((y(),G(E,Se({key:0,onClick:B=>s(d),class:[d.class,"table-operate"],type:d.type,disabled:d.disabled&&d.disabled(a.row,a.field)},d.attr),{default:j(()=>[V(c,{name:d.icon},null,8,["name"]),d.text?(y(),A("div",Bn,ce(d.text),1)):C("",!0)]),_:2},1040,["onClick","class","type","disabled"])),[[p]]):C("",!0),d.render=="tipButton"&&(d.name=="edit"&&I(t).auth("edit")||d.name!="edit")?(y(),G(q,{key:1,disabled:!(d.title&&!d.disabledTip),content:d.title?I(e)(d.title):"",placement:"top"},{default:j(()=>[Ke((y(),G(E,Se({onClick:B=>s(d),class:[d.class,"table-operate"],type:d.type,disabled:d.disabled&&d.disabled(a.row,a.field)},d.attr),{default:j(()=>[V(c,{name:d.icon},null,8,["name"]),d.text?(y(),A("div",Mn,ce(d.text),1)):C("",!0)]),_:2},1040,["onClick","class","type","disabled"])),[[p]])]),_:2},1032,["disabled","content"])):C("",!0),d.render=="confirmButton"&&(d.name=="delete"&&I(t).auth("del")||d.name!="delete")?(y(),G(M,Se({key:2,disabled:d.disabled&&d.disabled(a.row,a.field)},d.popconfirm,{onConfirm:B=>s(d)}),{reference:j(()=>[It("div",xn,[V(q,{disabled:!d.title,content:d.title?I(e)(d.title):"",placement:"top"},{default:j(()=>[Ke((y(),G(E,Se({class:[d.class,"table-operate"],type:d.type,disabled:d.disabled&&d.disabled(a.row,a.field)},d.attr),{default:j(()=>[V(c,{name:d.icon},null,8,["name"]),d.text?(y(),A("div",zn,ce(d.text),1)):C("",!0)]),_:2},1040,["class","type","disabled"])),[[p]])]),_:2},1032,["disabled","content"])])]),_:2},1040,["disabled","onConfirm"])):C("",!0),d.render=="moveButton"&&(d.name=="weigh-sort"&&I(t).auth("sortable")||d.name!="weigh-sort")?(y(),G(q,{key:3,disabled:!(d.title&&!d.disabledTip),content:d.title?I(e)(d.title):"",placement:"top"},{default:j(()=>[V(E,Se({class:[d.class,"table-operate move-button"],type:d.type,disabled:d.disabled&&d.disabled(a.row,a.field)},d.attr),{default:j(()=>[V(c,{name:d.icon},null,8,["name"]),d.text?(y(),A("div",Ln,ce(d.text),1)):C("",!0)]),_:2},1040,["class","type","disabled"])]),_:2},1032,["disabled","content"])):C("",!0)],64)):C("",!0)],64))),128))])):C("",!0)],64)}}}),Yn=Yt(Hn,[["__scopeId","data-v-496267b7"]]),Xn={key:0,class:"table-pagination"},jn=Tt({__name:"index",props:{pagination:{type:Boolean,default:!0}},setup(i,{expose:e}){const t=cn(),n=Ve(),o=Xt("baTable"),r=i,l=p=>{o.onTableAction("page-size-change",{size:p})},s=p=>{o.onTableAction("current-page-change",{page:p})},u=({order:p,prop:d})=>{o.onTableAction("sort-change",{prop:d,order:p?p=="ascending"?"asc":"desc":""})},a=bn(()=>{let p=[10,20,50,100];return o.table.filter.limit&&(p.includes(o.table.filter.limit)||p.push(o.table.filter.limit)),p}),h=p=>{var d;c(p.map(S=>S[o.table.pk].toString()))?p.map(S=>{S.children&&b(S.children,!0)}):(d=n.value)==null||d.clearSelection()},c=p=>{let d=o.table.data;for(const S in d)return p.includes(d[S][o.table.pk].toString());return!1},b=(p,d)=>{p.map(S=>{_(S,d),S.children&&b(S.children,d)})},_=(p,d)=>{p&&wn(()=>{var S;(S=n.value)==null||S.toggleRowSelection(p,d)})},w=(p,d)=>{p.some(S=>d[o.table.pk]===S[o.table.pk])?d.children&&b(d.children,!0):d.children&&b(d.children,!1)},E=p=>{o.onTableAction("selection-change",p)},z=(p,d)=>{var S;for(const B in p)(S=n.value)==null||S.toggleRowExpansion(p[B],d),p[B].children&&z(p[B].children,d)};return e({unFoldAll:p=>{z(o.table.data,p)},getRef:()=>n.value}),(p,d)=>{const S=te("el-table"),B=te("el-pagination"),re=jt("loading");return y(),A("div",null,[Ie(p.$slots,"neck",{},void 0,!0),Ke((y(),G(S,Se({ref_key:"tableRef",ref:n,class:"ba-data-table w100","header-cell-class-name":"table-header-cell","default-expand-all":I(o).table.expandAll,data:I(o).table.data,"row-key":I(o).table.pk,border:!0,stripe:"",onSelectAll:h,onSelect:w,onSelectionChange:E,onSortChange:u,onRowDblclick:I(o).onTableDblclick},p.$attrs),{default:j(()=>[Ie(p.$slots,"columnPrepend",{},void 0,!0),(y(!0),A(ee,null,Ue(I(o).table.column,(L,H)=>(y(),A(ee,null,[L.show!==!1?(y(),A(ee,{key:0},[L.render=="slot"?Ie(p.$slots,L.slotName,{key:0},void 0,!0):(y(),G(Dn,{attr:L,key:H+"-column"},yn({_:2},[L.render?{name:"default",fn:j(Z=>[(y(),G(Yn,{field:L,row:Z.row,column:Z.column,index:Z.$index,key:H+"-"+Z.$index+"-"+L.render+"-"+(L.prop?"-"+L.prop+"-"+Z.row[L.prop]:"")},null,8,["field","row","column","index"]))]),key:"0"}:void 0]),1032,["attr"]))],64)):C("",!0)],64))),256)),Ie(p.$slots,"columnAppend",{},void 0,!0)]),_:3},16,["default-expand-all","data","row-key","onRowDblclick"])),[[re,I(o).table.loading]]),r.pagination?(y(),A("div",Xn,[V(B,{currentPage:I(o).table.filter.page,"page-size":I(o).table.filter.limit,"page-sizes":a.value,background:"",layout:I(t).layout.shrink?"prev, next, jumper":"sizes,total, ->, prev, pager, next, jumper",total:I(o).table.total,onSizeChange:l,onCurrentChange:s},null,8,["currentPage","page-size","page-sizes","layout","total"])])):C("",!0),Ie(p.$slots,"footer",{},void 0,!0)])}}}),Ei=Yt(jn,[["__scopeId","data-v-7f8222db"]]);/**!
- * Sortable 1.15.1
- * @author RubaXa <trash@rubaxa.org>
- * @author owenm <owen23355@gmail.com>
- * @license MIT
- */function Ft(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),t.push.apply(t,n)}return t}function oe(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ft(Object(t),!0).forEach(function(n){Gn(i,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):Ft(Object(t)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(t,n))})}return i}function Qe(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Qe=function(e){return typeof e}:Qe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qe(i)}function Gn(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function se(){return se=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},se.apply(this,arguments)}function qn(i,e){if(i==null)return{};var t={},n=Object.keys(i),o,r;for(r=0;r<n.length;r++)o=n[r],!(e.indexOf(o)>=0)&&(t[o]=i[o]);return t}function Wn(i,e){if(i==null)return{};var t=qn(i,e),n,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);for(o=0;o<r.length;o++)n=r[o],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(t[n]=i[n])}return t}var $n="1.15.1";function le(i){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(i)}var de=le(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Le=le(/Edge/i),Pt=le(/firefox/i),Re=le(/safari/i)&&!le(/chrome/i)&&!le(/android/i),Gt=le(/iP(ad|od|hone)/i),qt=le(/chrome/i)&&le(/android/i),Wt={capture:!1,passive:!1};function T(i,e,t){i.addEventListener(e,t,!de&&Wt)}function D(i,e,t){i.removeEventListener(e,t,!de&&Wt)}function nt(i,e){if(e){if(e[0]===">"&&(e=e.substring(1)),i)try{if(i.matches)return i.matches(e);if(i.msMatchesSelector)return i.msMatchesSelector(e);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(e)}catch{return!1}return!1}}function Vn(i){return i.host&&i!==document&&i.host.nodeType?i.host:i.parentNode}function ne(i,e,t,n){if(i){t=t||document;do{if(e!=null&&(e[0]===">"?i.parentNode===t&&nt(i,e):nt(i,e))||n&&i===t)return i;if(i===t)break}while(i=Vn(i))}return null}var Rt=/\s+/g;function $(i,e,t){if(i&&e)if(i.classList)i.classList[t?"add":"remove"](e);else{var n=(" "+i.className+" ").replace(Rt," ").replace(" "+e+" "," ");i.className=(n+(t?" "+e:"")).replace(Rt," ")}}function g(i,e,t){var n=i&&i.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(t=i.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function Te(i,e){var t="";if(typeof i=="string")t=i;else do{var n=g(i,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(i=i.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(t)}function $t(i,e,t){if(i){var n=i.getElementsByTagName(e),o=0,r=n.length;if(t)for(;o<r;o++)t(n[o],o);return n}return[]}function ie(){var i=document.scrollingElement;return i||document.documentElement}function R(i,e,t,n,o){if(!(!i.getBoundingClientRect&&i!==window)){var r,l,s,u,a,h,c;if(i!==window&&i.parentNode&&i!==ie()?(r=i.getBoundingClientRect(),l=r.top,s=r.left,u=r.bottom,a=r.right,h=r.height,c=r.width):(l=0,s=0,u=window.innerHeight,a=window.innerWidth,h=window.innerHeight,c=window.innerWidth),(e||t)&&i!==window&&(o=o||i.parentNode,!de))do if(o&&o.getBoundingClientRect&&(g(o,"transform")!=="none"||t&&g(o,"position")!=="static")){var b=o.getBoundingClientRect();l-=b.top+parseInt(g(o,"border-top-width")),s-=b.left+parseInt(g(o,"border-left-width")),u=l+r.height,a=s+r.width;break}while(o=o.parentNode);if(n&&i!==window){var _=Te(o||i),w=_&&_.a,E=_&&_.d;_&&(l/=E,s/=w,c/=w,h/=E,u=l+h,a=s+c)}return{top:l,left:s,bottom:u,right:a,width:c,height:h}}}function Vt(i){var e=R(i),t=parseInt(g(i,"padding-left")),n=parseInt(g(i,"padding-top")),o=parseInt(g(i,"padding-right")),r=parseInt(g(i,"padding-bottom"));return e.top+=n+parseInt(g(i,"border-top-width")),e.left+=t+parseInt(g(i,"border-left-width")),e.width=i.clientWidth-t-o,e.height=i.clientHeight-n-r,e.bottom=e.top+e.height,e.right=e.left+e.width,e}function Bt(i,e,t){for(var n=ge(i,!0),o=R(i)[e];n;){var r=R(n)[t],l=void 0;if(t==="top"||t==="left"?l=o>=r:l=o<=r,!l)return n;if(n===ie())break;n=ge(n,!1)}return!1}function Ce(i,e,t,n){for(var o=0,r=0,l=i.children;r<l.length;){if(l[r].style.display!=="none"&&l[r]!==m.ghost&&(n||l[r]!==m.dragged)&&ne(l[r],t.draggable,i,!1)){if(o===e)return l[r];o++}r++}return null}function Ct(i,e){for(var t=i.lastElementChild;t&&(t===m.ghost||g(t,"display")==="none"||e&&!nt(t,e));)t=t.previousElementSibling;return t||null}function Q(i,e){var t=0;if(!i||!i.parentNode)return-1;for(;i=i.previousElementSibling;)i.nodeName.toUpperCase()!=="TEMPLATE"&&i!==m.clone&&(!e||nt(i,e))&&t++;return t}function Mt(i){var e=0,t=0,n=ie();if(i)do{var o=Te(i),r=o.a,l=o.d;e+=i.scrollLeft*r,t+=i.scrollTop*l}while(i!==n&&(i=i.parentNode));return[e,t]}function Un(i,e){for(var t in i)if(i.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===i[t][n])return Number(t)}return-1}function ge(i,e){if(!i||!i.getBoundingClientRect)return ie();var t=i,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var o=g(t);if(t.clientWidth<t.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return ie();if(n||e)return t;n=!0}}while(t=t.parentNode);return ie()}function Kn(i,e){if(i&&e)for(var t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return i}function ft(i,e){return Math.round(i.top)===Math.round(e.top)&&Math.round(i.left)===Math.round(e.left)&&Math.round(i.height)===Math.round(e.height)&&Math.round(i.width)===Math.round(e.width)}var Be;function Ut(i,e){return function(){if(!Be){var t=arguments,n=this;t.length===1?i.call(n,t[0]):i.apply(n,t),Be=setTimeout(function(){Be=void 0},e)}}}function Qn(){clearTimeout(Be),Be=void 0}function Kt(i,e,t){i.scrollLeft+=e,i.scrollTop+=t}function Qt(i){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(i).cloneNode(!0):t?t(i).clone(!0)[0]:i.cloneNode(!0)}var K="Sortable"+new Date().getTime();function Zn(){var i=[],e;return{captureAnimationState:function(){if(i=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(o){if(!(g(o,"display")==="none"||o===m.ghost)){i.push({target:o,rect:R(o)});var r=oe({},i[i.length-1].rect);if(o.thisAnimationDuration){var l=Te(o,!0);l&&(r.top-=l.f,r.left-=l.e)}o.fromRect=r}})}},addAnimationState:function(n){i.push(n)},removeAnimationState:function(n){i.splice(Un(i,{target:n}),1)},animateAll:function(n){var o=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var r=!1,l=0;i.forEach(function(s){var u=0,a=s.target,h=a.fromRect,c=R(a),b=a.prevFromRect,_=a.prevToRect,w=s.rect,E=Te(a,!0);E&&(c.top-=E.f,c.left-=E.e),a.toRect=c,a.thisAnimationDuration&&ft(b,c)&&!ft(h,c)&&(w.top-c.top)/(w.left-c.left)===(h.top-c.top)/(h.left-c.left)&&(u=ei(w,b,_,o.options)),ft(c,h)||(a.prevFromRect=h,a.prevToRect=c,u||(u=o.options.animation),o.animate(a,w,c,u)),u&&(r=!0,l=Math.max(l,u),clearTimeout(a.animationResetTimer),a.animationResetTimer=setTimeout(function(){a.animationTime=0,a.prevFromRect=null,a.fromRect=null,a.prevToRect=null,a.thisAnimationDuration=null},u),a.thisAnimationDuration=u)}),clearTimeout(e),r?e=setTimeout(function(){typeof n=="function"&&n()},l):typeof n=="function"&&n(),i=[]},animate:function(n,o,r,l){if(l){g(n,"transition",""),g(n,"transform","");var s=Te(this.el),u=s&&s.a,a=s&&s.d,h=(o.left-r.left)/(u||1),c=(o.top-r.top)/(a||1);n.animatingX=!!h,n.animatingY=!!c,g(n,"transform","translate3d("+h+"px,"+c+"px,0)"),this.forRepaintDummy=Jn(n),g(n,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),g(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){g(n,"transition",""),g(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},l)}}}}function Jn(i){return i.offsetWidth}function ei(i,e,t,n){return Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var we=[],ct={initializeByDefault:!0},He={mount:function(e){for(var t in ct)ct.hasOwnProperty(t)&&!(t in e)&&(e[t]=ct[t]);we.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),we.push(e)},pluginEvent:function(e,t,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var r=e+"Global";we.forEach(function(l){t[l.pluginName]&&(t[l.pluginName][r]&&t[l.pluginName][r](oe({sortable:t},n)),t.options[l.pluginName]&&t[l.pluginName][e]&&t[l.pluginName][e](oe({sortable:t},n)))})},initializePlugins:function(e,t,n,o){we.forEach(function(s){var u=s.pluginName;if(!(!e.options[u]&&!s.initializeByDefault)){var a=new s(e,t,e.options);a.sortable=e,a.options=e.options,e[u]=a,se(n,a.defaults)}});for(var r in e.options)if(e.options.hasOwnProperty(r)){var l=this.modifyOption(e,r,e.options[r]);typeof l<"u"&&(e.options[r]=l)}},getEventProperties:function(e,t){var n={};return we.forEach(function(o){typeof o.eventProperties=="function"&&se(n,o.eventProperties.call(t[o.pluginName],e))}),n},modifyOption:function(e,t,n){var o;return we.forEach(function(r){e[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[t]=="function"&&(o=r.optionListeners[t].call(e[r.pluginName],n))}),o}};function ti(i){var e=i.sortable,t=i.rootEl,n=i.name,o=i.targetEl,r=i.cloneEl,l=i.toEl,s=i.fromEl,u=i.oldIndex,a=i.newIndex,h=i.oldDraggableIndex,c=i.newDraggableIndex,b=i.originalEvent,_=i.putSortable,w=i.extraEventProperties;if(e=e||t&&t[K],!!e){var E,z=e.options,q="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!de&&!Le?E=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(E=document.createEvent("Event"),E.initEvent(n,!0,!0)),E.to=l||t,E.from=s||t,E.item=o||t,E.clone=r,E.oldIndex=u,E.newIndex=a,E.oldDraggableIndex=h,E.newDraggableIndex=c,E.originalEvent=b,E.pullMode=_?_.lastPutMode:void 0;var M=oe(oe({},w),He.getEventProperties(n,e));for(var p in M)E[p]=M[p];t&&t.dispatchEvent(E),z[q]&&z[q].call(e,E)}}var ni=["evt"],W=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.evt,r=Wn(n,ni);He.pluginEvent.bind(m)(e,t,oe({dragEl:f,parentEl:N,ghostEl:v,rootEl:k,nextEl:ye,lastDownEl:Ze,cloneEl:O,cloneHidden:pe,dragStarted:Ne,putSortable:x,activeSortable:m.active,originalEvent:o,oldIndex:De,oldDraggableIndex:Me,newIndex:U,newDraggableIndex:he,hideGhostForTarget:tn,unhideGhostForTarget:nn,cloneNowHidden:function(){pe=!0},cloneNowShown:function(){pe=!1},dispatchSortableEvent:function(s){X({sortable:t,name:s,originalEvent:o})}},r))};function X(i){ti(oe({putSortable:x,cloneEl:O,targetEl:f,rootEl:k,oldIndex:De,oldDraggableIndex:Me,newIndex:U,newDraggableIndex:he},i))}var f,N,v,k,ye,Ze,O,pe,De,U,Me,he,Xe,x,_e=!1,it=!1,ot=[],ve,J,ht,pt,xt,zt,Ne,Ee,xe,ze=!1,je=!1,Je,Y,gt=[],Et=!1,rt=[],lt=typeof document<"u",Ge=Gt,Lt=Le||de?"cssFloat":"float",ii=lt&&!qt&&!Gt&&"draggable"in document.createElement("div"),Zt=function(){if(lt){if(de)return!1;var i=document.createElement("x");return i.style.cssText="pointer-events:auto",i.style.pointerEvents==="auto"}}(),Jt=function(e,t){var n=g(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=Ce(e,0,t),l=Ce(e,1,t),s=r&&g(r),u=l&&g(l),a=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+R(r).width,h=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+R(l).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&s.float&&s.float!=="none"){var c=s.float==="left"?"left":"right";return l&&(u.clear==="both"||u.clear===c)?"vertical":"horizontal"}return r&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||a>=o&&n[Lt]==="none"||l&&n[Lt]==="none"&&a+h>o)?"vertical":"horizontal"},oi=function(e,t,n){var o=n?e.left:e.top,r=n?e.right:e.bottom,l=n?e.width:e.height,s=n?t.left:t.top,u=n?t.right:t.bottom,a=n?t.width:t.height;return o===s||r===u||o+l/2===s+a/2},ri=function(e,t){var n;return ot.some(function(o){var r=o[K].options.emptyInsertThreshold;if(!(!r||Ct(o))){var l=R(o),s=e>=l.left-r&&e<=l.right+r,u=t>=l.top-r&&t<=l.bottom+r;if(s&&u)return n=o}}),n},en=function(e){function t(r,l){return function(s,u,a,h){var c=s.options.group.name&&u.options.group.name&&s.options.group.name===u.options.group.name;if(r==null&&(l||c))return!0;if(r==null||r===!1)return!1;if(l&&r==="clone")return r;if(typeof r=="function")return t(r(s,u,a,h),l)(s,u,a,h);var b=(l?s:u).options.group.name;return r===!0||typeof r=="string"&&r===b||r.join&&r.indexOf(b)>-1}}var n={},o=e.group;(!o||Qe(o)!="object")&&(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},tn=function(){!Zt&&v&&g(v,"display","none")},nn=function(){!Zt&&v&&g(v,"display","")};lt&&!qt&&document.addEventListener("click",function(i){if(it)return i.preventDefault(),i.stopPropagation&&i.stopPropagation(),i.stopImmediatePropagation&&i.stopImmediatePropagation(),it=!1,!1},!0);var be=function(e){if(f){e=e.touches?e.touches[0]:e;var t=ri(e.clientX,e.clientY);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[K]._onDragOver(n)}}},ai=function(e){f&&f.parentNode[K]._isOutsideThisEl(e.target)};function m(i,e){if(!(i&&i.nodeType&&i.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));this.el=i,this.options=e=se({},e),i[K]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(i.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Jt(i,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:m.supportPointer!==!1&&"PointerEvent"in window&&!Re,emptyInsertThreshold:5};He.initializePlugins(this,i,t);for(var n in t)!(n in e)&&(e[n]=t[n]);en(e);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=e.forceFallback?!1:ii,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?T(i,"pointerdown",this._onTapStart):(T(i,"mousedown",this._onTapStart),T(i,"touchstart",this._onTapStart)),this.nativeDraggable&&(T(i,"dragover",this),T(i,"dragenter",this)),ot.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),se(this,Zn())}m.prototype={constructor:m,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ee=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,f):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,r=o.preventOnFilter,l=e.type,s=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,u=(s||e).target,a=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||u,h=o.filter;if(pi(n),!f&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||o.disabled)&&!a.isContentEditable&&!(!this.nativeDraggable&&Re&&u&&u.tagName.toUpperCase()==="SELECT")&&(u=ne(u,o.draggable,n,!1),!(u&&u.animated)&&Ze!==u)){if(De=Q(u),Me=Q(u,o.draggable),typeof h=="function"){if(h.call(this,e,u,this)){X({sortable:t,rootEl:a,name:"filter",targetEl:u,toEl:n,fromEl:n}),W("filter",t,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(h&&(h=h.split(",").some(function(c){if(c=ne(a,c.trim(),n,!1),c)return X({sortable:t,rootEl:c,name:"filter",targetEl:u,fromEl:n,toEl:n}),W("filter",t,{evt:e}),!0}),h)){r&&e.cancelable&&e.preventDefault();return}o.handle&&!ne(a,o.handle,n,!1)||this._prepareDragStart(e,s,u)}}},_prepareDragStart:function(e,t,n){var o=this,r=o.el,l=o.options,s=r.ownerDocument,u;if(n&&!f&&n.parentNode===r){var a=R(n);if(k=r,f=n,N=f.parentNode,ye=f.nextSibling,Ze=n,Xe=l.group,m.dragged=f,ve={target:f,clientX:(t||e).clientX,clientY:(t||e).clientY},xt=ve.clientX-a.left,zt=ve.clientY-a.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,f.style["will-change"]="all",u=function(){if(W("delayEnded",o,{evt:e}),m.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Pt&&o.nativeDraggable&&(f.draggable=!0),o._triggerDragStart(e,t),X({sortable:o,name:"choose",originalEvent:e}),$(f,l.chosenClass,!0)},l.ignore.split(",").forEach(function(h){$t(f,h.trim(),mt)}),T(s,"dragover",be),T(s,"mousemove",be),T(s,"touchmove",be),T(s,"mouseup",o._onDrop),T(s,"touchend",o._onDrop),T(s,"touchcancel",o._onDrop),Pt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,f.draggable=!0),W("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Le||de))){if(m.eventCanceled){this._onDrop();return}T(s,"mouseup",o._disableDelayedDrag),T(s,"touchend",o._disableDelayedDrag),T(s,"touchcancel",o._disableDelayedDrag),T(s,"mousemove",o._delayedDragTouchMoveHandler),T(s,"touchmove",o._delayedDragTouchMoveHandler),l.supportPointer&&T(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(u,l.delay)}else u()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){f&&mt(f),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;D(e,"mouseup",this._disableDelayedDrag),D(e,"touchend",this._disableDelayedDrag),D(e,"touchcancel",this._disableDelayedDrag),D(e,"mousemove",this._delayedDragTouchMoveHandler),D(e,"touchmove",this._delayedDragTouchMoveHandler),D(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?T(document,"pointermove",this._onTouchMove):t?T(document,"touchmove",this._onTouchMove):T(document,"mousemove",this._onTouchMove):(T(f,"dragend",this),T(k,"dragstart",this._onDragStart));try{document.selection?et(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(_e=!1,k&&f){W("dragStarted",this,{evt:t}),this.nativeDraggable&&T(document,"dragover",ai);var n=this.options;!e&&$(f,n.dragClass,!1),$(f,n.ghostClass,!0),m.active=this,e&&this._appendGhost(),X({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(J){this._lastX=J.clientX,this._lastY=J.clientY,tn();for(var e=document.elementFromPoint(J.clientX,J.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(J.clientX,J.clientY),e!==t);)t=e;if(f.parentNode[K]._isOutsideThisEl(e),t)do{if(t[K]){var n=void 0;if(n=t[K]._onDragOver({clientX:J.clientX,clientY:J.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);nn()}},_onTouchMove:function(e){if(ve){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,r=e.touches?e.touches[0]:e,l=v&&Te(v,!0),s=v&&l&&l.a,u=v&&l&&l.d,a=Ge&&Y&&Mt(Y),h=(r.clientX-ve.clientX+o.x)/(s||1)+(a?a[0]-gt[0]:0)/(s||1),c=(r.clientY-ve.clientY+o.y)/(u||1)+(a?a[1]-gt[1]:0)/(u||1);if(!m.active&&!_e){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(v){l?(l.e+=h-(ht||0),l.f+=c-(pt||0)):l={a:1,b:0,c:0,d:1,e:h,f:c};var b="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");g(v,"webkitTransform",b),g(v,"mozTransform",b),g(v,"msTransform",b),g(v,"transform",b),ht=h,pt=c,J=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!v){var e=this.options.fallbackOnBody?document.body:k,t=R(f,!0,Ge,!0,e),n=this.options;if(Ge){for(Y=e;g(Y,"position")==="static"&&g(Y,"transform")==="none"&&Y!==document;)Y=Y.parentNode;Y!==document.body&&Y!==document.documentElement?(Y===document&&(Y=ie()),t.top+=Y.scrollTop,t.left+=Y.scrollLeft):Y=ie(),gt=Mt(Y)}v=f.cloneNode(!0),$(v,n.ghostClass,!1),$(v,n.fallbackClass,!0),$(v,n.dragClass,!0),g(v,"transition",""),g(v,"transform",""),g(v,"box-sizing","border-box"),g(v,"margin",0),g(v,"top",t.top),g(v,"left",t.left),g(v,"width",t.width),g(v,"height",t.height),g(v,"opacity","0.8"),g(v,"position",Ge?"absolute":"fixed"),g(v,"zIndex","100000"),g(v,"pointerEvents","none"),m.ghost=v,e.appendChild(v),g(v,"transform-origin",xt/parseInt(v.style.width)*100+"% "+zt/parseInt(v.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,r=n.options;if(W("dragStart",this,{evt:e}),m.eventCanceled){this._onDrop();return}W("setupClone",this),m.eventCanceled||(O=Qt(f),O.removeAttribute("id"),O.draggable=!1,O.style["will-change"]="",this._hideClone(),$(O,this.options.chosenClass,!1),m.clone=O),n.cloneId=et(function(){W("clone",n),!m.eventCanceled&&(n.options.removeCloneOnHide||k.insertBefore(O,f),n._hideClone(),X({sortable:n,name:"clone"}))}),!t&&$(f,r.dragClass,!0),t?(it=!0,n._loopId=setInterval(n._emulateDragOver,50)):(D(document,"mouseup",n._onDrop),D(document,"touchend",n._onDrop),D(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(n,o,f)),T(document,"drop",n),g(f,"transform","translateZ(0)")),_e=!0,n._dragStartId=et(n._dragStarted.bind(n,t,e)),T(document,"selectstart",n),Ne=!0,Re&&g(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,o,r,l,s=this.options,u=s.group,a=m.active,h=Xe===u,c=s.sort,b=x||a,_,w=this,E=!1;if(Et)return;function z(Oe,rn){W(Oe,w,oe({evt:e,isOwner:h,axis:_?"vertical":"horizontal",revert:l,dragRect:o,targetRect:r,canSort:c,fromSortable:b,target:n,completed:M,onMove:function(Ot,an){return qe(k,t,f,o,Ot,R(Ot),e,an)},changed:p},rn))}function q(){z("dragOverAnimationCapture"),w.captureAnimationState(),w!==b&&b.captureAnimationState()}function M(Oe){return z("dragOverCompleted",{insertion:Oe}),Oe&&(h?a._hideClone():a._showClone(w),w!==b&&($(f,x?x.options.ghostClass:a.options.ghostClass,!1),$(f,s.ghostClass,!0)),x!==w&&w!==m.active?x=w:w===m.active&&x&&(x=null),b===w&&(w._ignoreWhileAnimating=n),w.animateAll(function(){z("dragOverAnimationComplete"),w._ignoreWhileAnimating=null}),w!==b&&(b.animateAll(),b._ignoreWhileAnimating=null)),(n===f&&!f.animated||n===t&&!n.animated)&&(Ee=null),!s.dragoverBubble&&!e.rootEl&&n!==document&&(f.parentNode[K]._isOutsideThisEl(e.target),!Oe&&be(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),E=!0}function p(){U=Q(f),he=Q(f,s.draggable),X({sortable:w,name:"change",toEl:t,newIndex:U,newDraggableIndex:he,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=ne(n,s.draggable,t,!0),z("dragOver"),m.eventCanceled)return E;if(f.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||w._ignoreWhileAnimating===n)return M(!1);if(it=!1,a&&!s.disabled&&(h?c||(l=N!==k):x===this||(this.lastPutMode=Xe.checkPull(this,a,f,e))&&u.checkPut(this,a,f,e))){if(_=this._getDirection(e,n)==="vertical",o=R(f),z("dragOverValid"),m.eventCanceled)return E;if(l)return N=k,q(),this._hideClone(),z("revert"),m.eventCanceled||(ye?k.insertBefore(f,ye):k.appendChild(f)),M(!0);var d=Ct(t,s.draggable);if(!d||ui(e,_,this)&&!d.animated){if(d===f)return M(!1);if(d&&t===e.target&&(n=d),n&&(r=R(n)),qe(k,t,f,o,n,r,e,!!n)!==!1)return q(),d&&d.nextSibling?t.insertBefore(f,d.nextSibling):t.appendChild(f),N=t,p(),M(!0)}else if(d&&di(e,_,this)){var S=Ce(t,0,s,!0);if(S===f)return M(!1);if(n=S,r=R(n),qe(k,t,f,o,n,r,e,!1)!==!1)return q(),t.insertBefore(f,S),N=t,p(),M(!0)}else if(n.parentNode===t){r=R(n);var B=0,re,L=f.parentNode!==t,H=!oi(f.animated&&f.toRect||o,n.animated&&n.toRect||r,_),Z=_?"top":"left",ue=Bt(n,"top","top")||Bt(f,"top","top"),Ae=ue?ue.scrollTop:void 0;Ee!==n&&(re=r[Z],ze=!1,je=!H&&s.invertSwap||L),B=fi(e,n,r,_,H?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,je,Ee===n);var ae;if(B!==0){var me=Q(f);do me-=B,ae=N.children[me];while(ae&&(g(ae,"display")==="none"||ae===v))}if(B===0||ae===n)return M(!1);Ee=n,xe=B;var ke=n.nextElementSibling,fe=!1;fe=B===1;var Ye=qe(k,t,f,o,n,r,e,fe);if(Ye!==!1)return(Ye===1||Ye===-1)&&(fe=Ye===1),Et=!0,setTimeout(si,30),q(),fe&&!ke?t.appendChild(f):n.parentNode.insertBefore(f,fe?ke:n),ue&&Kt(ue,0,Ae-ue.scrollTop),N=f.parentNode,re!==void 0&&!je&&(Je=Math.abs(re-R(n)[Z])),p(),M(!0)}if(t.contains(f))return M(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){D(document,"mousemove",this._onTouchMove),D(document,"touchmove",this._onTouchMove),D(document,"pointermove",this._onTouchMove),D(document,"dragover",be),D(document,"mousemove",be),D(document,"touchmove",be)},_offUpEvents:function(){var e=this.el.ownerDocument;D(e,"mouseup",this._onDrop),D(e,"touchend",this._onDrop),D(e,"pointerup",this._onDrop),D(e,"touchcancel",this._onDrop),D(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(U=Q(f),he=Q(f,n.draggable),W("drop",this,{evt:e}),N=f&&f.parentNode,U=Q(f),he=Q(f,n.draggable),m.eventCanceled){this._nulling();return}_e=!1,je=!1,ze=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),St(this.cloneId),St(this._dragStartId),this.nativeDraggable&&(D(document,"drop",this),D(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Re&&g(document.body,"user-select",""),g(f,"transform",""),e&&(Ne&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),v&&v.parentNode&&v.parentNode.removeChild(v),(k===N||x&&x.lastPutMode!=="clone")&&O&&O.parentNode&&O.parentNode.removeChild(O),f&&(this.nativeDraggable&&D(f,"dragend",this),mt(f),f.style["will-change"]="",Ne&&!_e&&$(f,x?x.options.ghostClass:this.options.ghostClass,!1),$(f,this.options.chosenClass,!1),X({sortable:this,name:"unchoose",toEl:N,newIndex:null,newDraggableIndex:null,originalEvent:e}),k!==N?(U>=0&&(X({rootEl:N,name:"add",toEl:N,fromEl:k,originalEvent:e}),X({sortable:this,name:"remove",toEl:N,originalEvent:e}),X({rootEl:N,name:"sort",toEl:N,fromEl:k,originalEvent:e}),X({sortable:this,name:"sort",toEl:N,originalEvent:e})),x&&x.save()):U!==De&&U>=0&&(X({sortable:this,name:"update",toEl:N,originalEvent:e}),X({sortable:this,name:"sort",toEl:N,originalEvent:e})),m.active&&((U==null||U===-1)&&(U=De,he=Me),X({sortable:this,name:"end",toEl:N,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){W("nulling",this),k=f=N=v=ye=O=Ze=pe=ve=J=Ne=U=he=De=Me=Ee=xe=x=Xe=m.dragged=m.ghost=m.clone=m.active=null,rt.forEach(function(e){e.checked=!0}),rt.length=ht=pt=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":f&&(this._onDragOver(e),li(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,o=0,r=n.length,l=this.options;o<r;o++)t=n[o],ne(t,l.draggable,this.el,!1)&&e.push(t.getAttribute(l.dataIdAttr)||hi(t));return e},sort:function(e,t){var n={},o=this.el;this.toArray().forEach(function(r,l){var s=o.children[l];ne(s,this.options.draggable,o,!1)&&(n[r]=s)},this),t&&this.captureAnimationState(),e.forEach(function(r){n[r]&&(o.removeChild(n[r]),o.appendChild(n[r]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return ne(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var o=He.modifyOption(this,e,t);typeof o<"u"?n[e]=o:n[e]=t,e==="group"&&en(n)},destroy:function(){W("destroy",this);var e=this.el;e[K]=null,D(e,"mousedown",this._onTapStart),D(e,"touchstart",this._onTapStart),D(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(D(e,"dragover",this),D(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ot.splice(ot.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!pe){if(W("hideClone",this),m.eventCanceled)return;g(O,"display","none"),this.options.removeCloneOnHide&&O.parentNode&&O.parentNode.removeChild(O),pe=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(pe){if(W("showClone",this),m.eventCanceled)return;f.parentNode==k&&!this.options.group.revertClone?k.insertBefore(O,f):ye?k.insertBefore(O,ye):k.appendChild(O),this.options.group.revertClone&&this.animate(f,O),g(O,"display",""),pe=!1}}};function li(i){i.dataTransfer&&(i.dataTransfer.dropEffect="move"),i.cancelable&&i.preventDefault()}function qe(i,e,t,n,o,r,l,s){var u,a=i[K],h=a.options.onMove,c;return window.CustomEvent&&!de&&!Le?u=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent("move",!0,!0)),u.to=e,u.from=i,u.dragged=t,u.draggedRect=n,u.related=o||e,u.relatedRect=r||R(e),u.willInsertAfter=s,u.originalEvent=l,i.dispatchEvent(u),h&&(c=h.call(a,u,l)),c}function mt(i){i.draggable=!1}function si(){Et=!1}function di(i,e,t){var n=R(Ce(t.el,0,t.options,!0)),o=Vt(t.el),r=10;return e?i.clientX<o.left-r||i.clientY<n.top&&i.clientX<n.right:i.clientY<o.top-r||i.clientY<n.bottom&&i.clientX<n.left}function ui(i,e,t){var n=R(Ct(t.el,t.options.draggable)),o=Vt(t.el),r=10;return e?i.clientX>o.right+r||i.clientY>n.bottom&&i.clientX>n.left:i.clientY>o.bottom+r||i.clientX>n.right&&i.clientY>n.top}function fi(i,e,t,n,o,r,l,s){var u=n?i.clientY:i.clientX,a=n?t.height:t.width,h=n?t.top:t.left,c=n?t.bottom:t.right,b=!1;if(!l){if(s&&Je<a*o){if(!ze&&(xe===1?u>h+a*r/2:u<c-a*r/2)&&(ze=!0),ze)b=!0;else if(xe===1?u<h+Je:u>c-Je)return-xe}else if(u>h+a*(1-o)/2&&u<c-a*(1-o)/2)return ci(e)}return b=b||l,b&&(u<h+a*r/2||u>c-a*r/2)?u>h+a/2?1:-1:0}function ci(i){return Q(f)<Q(i)?1:-1}function hi(i){for(var e=i.tagName+i.className+i.src+i.href+i.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function pi(i){rt.length=0;for(var e=i.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&rt.push(n)}}function et(i){return setTimeout(i,0)}function St(i){return clearTimeout(i)}lt&&T(document,"touchmove",function(i){(m.active||_e)&&i.cancelable&&i.preventDefault()});m.utils={on:T,off:D,css:g,find:$t,is:function(e,t){return!!ne(e,t,e,!1)},extend:Kn,throttle:Ut,closest:ne,toggleClass:$,clone:Qt,index:Q,nextTick:et,cancelNextTick:St,detectDirection:Jt,getChild:Ce};m.get=function(i){return i[K]};m.mount=function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(m.utils=oe(oe({},m.utils),n.utils)),He.mount(n)})};m.create=function(i,e){return new m(i,e)};m.version=$n;var P=[],Fe,_t,Dt=!1,vt,bt,at,Pe;function gi(){function i(){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 i.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?T(document,"dragover",this._handleAutoScroll):this.options.supportPointer?T(document,"pointermove",this._handleFallbackAutoScroll):n.touches?T(document,"touchmove",this._handleFallbackAutoScroll):T(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?D(document,"dragover",this._handleAutoScroll):(D(document,"pointermove",this._handleFallbackAutoScroll),D(document,"touchmove",this._handleFallbackAutoScroll),D(document,"mousemove",this._handleFallbackAutoScroll)),Ht(),tt(),Qn()},nulling:function(){at=_t=Fe=Dt=Pe=vt=bt=null,P.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var o=this,r=(t.touches?t.touches[0]:t).clientX,l=(t.touches?t.touches[0]:t).clientY,s=document.elementFromPoint(r,l);if(at=t,n||this.options.forceAutoScrollFallback||Le||de||Re){yt(t,this.options,s,n);var u=ge(s,!0);Dt&&(!Pe||r!==vt||l!==bt)&&(Pe&&Ht(),Pe=setInterval(function(){var a=ge(document.elementFromPoint(r,l),!0);a!==u&&(u=a,tt()),yt(t,o.options,a,n)},10),vt=r,bt=l)}else{if(!this.options.bubbleScroll||ge(s,!0)===ie()){tt();return}yt(t,this.options,ge(s,!1),!1)}}},se(i,{pluginName:"scroll",initializeByDefault:!0})}function tt(){P.forEach(function(i){clearInterval(i.pid)}),P=[]}function Ht(){clearInterval(Pe)}var yt=Ut(function(i,e,t,n){if(e.scroll){var o=(i.touches?i.touches[0]:i).clientX,r=(i.touches?i.touches[0]:i).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,u=ie(),a=!1,h;_t!==t&&(_t=t,tt(),Fe=e.scroll,h=e.scrollFn,Fe===!0&&(Fe=ge(t,!0)));var c=0,b=Fe;do{var _=b,w=R(_),E=w.top,z=w.bottom,q=w.left,M=w.right,p=w.width,d=w.height,S=void 0,B=void 0,re=_.scrollWidth,L=_.scrollHeight,H=g(_),Z=_.scrollLeft,ue=_.scrollTop;_===u?(S=p<re&&(H.overflowX==="auto"||H.overflowX==="scroll"||H.overflowX==="visible"),B=d<L&&(H.overflowY==="auto"||H.overflowY==="scroll"||H.overflowY==="visible")):(S=p<re&&(H.overflowX==="auto"||H.overflowX==="scroll"),B=d<L&&(H.overflowY==="auto"||H.overflowY==="scroll"));var Ae=S&&(Math.abs(M-o)<=l&&Z+p<re)-(Math.abs(q-o)<=l&&!!Z),ae=B&&(Math.abs(z-r)<=l&&ue+d<L)-(Math.abs(E-r)<=l&&!!ue);if(!P[c])for(var me=0;me<=c;me++)P[me]||(P[me]={});(P[c].vx!=Ae||P[c].vy!=ae||P[c].el!==_)&&(P[c].el=_,P[c].vx=Ae,P[c].vy=ae,clearInterval(P[c].pid),(Ae!=0||ae!=0)&&(a=!0,P[c].pid=setInterval((function(){n&&this.layer===0&&m.active._onTouchMove(at);var ke=P[this.layer].vy?P[this.layer].vy*s:0,fe=P[this.layer].vx?P[this.layer].vx*s:0;typeof h=="function"&&h.call(m.dragged.parentNode[K],fe,ke,i,at,P[this.layer].el)!=="continue"||Kt(P[this.layer].el,fe,ke)}).bind({layer:c}),24))),c++}while(e.bubbleScroll&&b!==u&&(b=ge(b,!1)));Dt=a}},30),on=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,r=e.activeSortable,l=e.dispatchSortableEvent,s=e.hideGhostForTarget,u=e.unhideGhostForTarget;if(t){var a=n||r;s();var h=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,c=document.elementFromPoint(h.clientX,h.clientY);u(),a&&!a.el.contains(c)&&(l("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function At(){}At.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=Ce(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:on};se(At,{pluginName:"revertOnSpill"});function kt(){}kt.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,o=n||this.sortable;o.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),o.animateAll()},drop:on};se(kt,{pluginName:"removeOnSpill"});m.mount(new gi);m.mount(kt,At);class Si{constructor(e,t,n={},o={},r={}){F(this,"api");F(this,"table",$e({ref:void 0,pk:"id",data:[],remark:null,loading:!1,selection:[],column:[],total:0,filter:{},dragSortLimitField:"pid",acceptQuery:!0,showComSearch:!1,dblClickNotEditColumn:[void 0],expandAll:!1,extend:{}}));F(this,"form",$e({ref:void 0,labelWidth:160,operate:"",operateIds:[],items:{},submitLoading:!1,defaultItems:{},loading:!1,extend:{}}));F(this,"before");F(this,"after");F(this,"comSearch",$e({form:{},fieldData:new Map}));F(this,"getIndex",()=>{if(this.runBefore("getIndex")!==!1)return this.table.loading=!0,this.api.index(this.table.filter).then(e=>{this.table.data=e.data.list,this.table.total=e.data.total,this.table.remark=e.data.remark,this.runAfter("getIndex",{res:e})}).finally(()=>{this.table.loading=!1})});F(this,"postDel",e=>{this.runBefore("postDel",{ids:e})!==!1&&this.api.del(e).then(t=>{this.onTableHeaderAction("refresh",{}),this.runAfter("postDel",{res:t})})});F(this,"requestEdit",e=>{if(this.runBefore("requestEdit",{id:e})!==!1)return this.form.loading=!0,this.form.items={},this.api.edit({[this.table.pk]:e}).then(t=>{this.form.items=t.data.row,this.runAfter("requestEdit",{res:t})}).catch(t=>{this.toggleForm(),this.runAfter("requestEdit",{err:t})}).finally(()=>{this.form.loading=!1})});F(this,"onTableDblclick",(e,t)=>{if(!this.table.dblClickNotEditColumn.includes("all")&&!this.table.dblClickNotEditColumn.includes(t.property)){if(this.runBefore("onTableDblclick",{row:e,column:t})===!1)return;this.toggleForm("Edit",[e[this.table.pk]]),this.runAfter("onTableDblclick",{row:e,column:t})}});F(this,"toggleForm",(e="",t=[])=>{if(this.runBefore("toggleForm",{operate:e,operateIds:t})!==!1){if(this.form.ref&&this.form.ref.resetFields(),e=="Edit"){if(!t.length)return!1;this.requestEdit(t[0])}else e=="Add"&&(this.form.items=Nt(this.form.defaultItems));this.form.operate=e,this.form.operateIds=t,this.runAfter("toggleForm",{operate:e,operateIds:t})}});F(this,"drawertoggleForm",(e="",t=[])=>{if(this.runBefore("toggleForm",{operate:e,operateIds:t})!==!1){if(this.form.ref&&this.form.ref.resetFields(),e=="Edit"){if(!t.length)return!1;this.requestEdit(t[0])}else e=="Add"&&(this.form.items=Nt(this.form.defaultItems));this.form.operate=e,this.form.operateIds=t,this.runAfter("toggleForm",{operate:e,operateIds:t})}});F(this,"onSubmit",(e=void 0)=>{const t=this.form.operate.replace(this.form.operate[0],this.form.operate[0].toLowerCase());if(this.runBefore("onSubmit",{formEl:e,operate:t,items:this.form.items})===!1)return;Object.keys(this.form.items).forEach(o=>{this.form.items[o]===null&&delete this.form.items[o]});const n=()=>{this.form.submitLoading=!0,this.api.postData(t,this.form.items).then(o=>{var r;this.onTableHeaderAction("refresh",{}),(r=this.form.operateIds)==null||r.shift(),this.form.operateIds.length>0?this.toggleForm("Edit",this.form.operateIds):this.toggleForm(),this.runAfter("onSubmit",{res:o})}).finally(()=>{this.form.submitLoading=!1})};e?(this.form.ref=e,e.validate(o=>{o&&n()})):n()});F(this,"onTableAction",(e,t)=>{if(this.runBefore("onTableAction",{event:e,data:t})===!1)return;const n=new Map([["selection-change",()=>{this.table.selection=t}],["page-size-change",()=>{this.table.filter.limit=t.size,this.onTableHeaderAction("refresh",{event:"page-size-change",...t})}],["current-page-change",()=>{this.table.filter.page=t.page,this.onTableHeaderAction("refresh",{event:"current-page-change",...t})}],["sort-change",()=>{let r;t.prop&&t.order&&(r=t.prop+","+t.order),r!=this.table.filter.order&&(this.table.filter.order=r,this.onTableHeaderAction("refresh",{event:"sort-change",...t}))}],["edit",()=>{this.toggleForm("Edit",[t.row[this.table.pk]])}],["delete",()=>{this.postDel([t.row[this.table.pk]])}],["field-change",()=>{if(t.field.render=="switch"){if(!t.field||!t.field.prop)return;t.row.loading=!0,this.api.postData("edit",{[this.table.pk]:t.row[this.table.pk],[t.field.prop]:t.value}).then(()=>{t.row.loading=!1,t.row[t.field.prop]=t.value}).catch(()=>{t.row.loading=!1})}}],["com-search",()=>{this.table.filter.search=t,this.onTableHeaderAction("refresh",{event:"com-search",data:t})}],["default",()=>{console.warn("No action defined")}]]);return(n.get(e)||n.get("default")).call(this),this.runAfter("onTableAction",{event:e,data:t})});F(this,"onTableHeaderAction",(e,t)=>{if(this.runBefore("onTableHeaderAction",{event:e,data:t})===!1)return;const n=new Map([["refresh",()=>{this.table.data=[],this.getIndex()}],["add",()=>{this.toggleForm("Add")}],["edit",()=>{this.toggleForm("Edit",this.getSelectionIds())}],["draweradd",()=>{this.drawertoggleForm("Add")}],["draweredit",()=>{this.drawertoggleForm("Edit",this.getSelectionIds())}],["delete",()=>{this.postDel(this.getSelectionIds())}],["unfold",()=>{if(!this.table.ref){console.warn("Collapse/expand failed because table ref is not defined. Please assign table ref when onMounted");return}this.table.expandAll=t.unfold,this.table.ref.unFoldAll(t.unfold)}],["quick-search",()=>{this.onTableHeaderAction("refresh",{event:"quick-search",...t})}],["change-show-column",()=>{const r=dt(this.table.column,"prop",t.field);this.table.column[r].show=t.value}],["default",()=>{console.warn("No action defined")}]]);return(n.get(e)||n.get("default")).call(this),this.runAfter("onTableHeaderAction",{event:e,data:t})});F(this,"initSort",()=>{var e;if(this.table.defaultOrder&&this.table.defaultOrder.prop){if(!this.table.ref){console.warn("Failed to initialize default sorting because table ref is not defined. Please assign table ref when onMounted");return}const t=this.table.defaultOrder.prop+","+this.table.defaultOrder.order;this.table.filter&&this.table.filter.order!=t&&(this.table.filter.order=t,(e=this.table.ref.getRef())==null||e.sort(this.table.defaultOrder.prop,this.table.defaultOrder.order=="desc"?"descending":"ascending"))}});F(this,"dragSort",()=>{var r;const e=dt(this.table.column,"render","buttons");if(e===!1)return;const t=dt((r=this.table.column[e])==null?void 0:r.buttons,"render","moveButton");if(t===!1)return;if(!this.table.ref){console.warn("Failed to initialize drag sort because table ref is not defined. Please assign table ref when onMounted");return}const n=this.table.ref.getRef().$el.querySelector(".el-table__body-wrapper .el-table__body tbody"),o=this.table.column[e].buttons[t].disabledTip;m.create(n,{animation:200,handle:".table-row-weigh-sort",ghostClass:"ba-table-row",onStart:()=>{this.table.column[e].buttons[t].disabledTip=!0},onEnd:l=>{this.table.column[e].buttons[t].disabledTip=o;const s=wt(this.table.data,l.oldIndex),u=wt(this.table.data,l.newIndex);if(this.table.dragSortLimitField&&s[this.table.dragSortLimitField]!=u[this.table.dragSortLimitField]){this.onTableHeaderAction("refresh",{}),En({type:"error",message:We.global.t("utils.The moving position is beyond the movable range!")});return}this.api.sortableApi(s[this.table.pk],u[this.table.pk]).finally(()=>{this.onTableHeaderAction("refresh",{})})}})});F(this,"mount",()=>{if(this.runBefore("mount")===!1)return;const e=Sn();this.table.routePath=e.path,this.initComSearch(e!=null&&e.query?e.query:{});let t=e.path+Object.entries(e.query).toString();_n(()=>e.query,()=>{const n=e.path+Object.entries(e.query).toString();e.path==this.table.routePath&&t!=n&&(this.initComSearch(e.query),this.onTableHeaderAction("refresh",{event:"route-query-change",query:e.query}),t=n)})});F(this,"initComSearch",(e={})=>{const t={},n=this.table.column;if(!(n.length<=0)){for(const o in n){if(n[o].operator===!1)continue;const r=n[o].prop;if(typeof n[o].operator>"u"&&(n[o].operator="eq"),r){if(n[o].operator=="RANGE"||n[o].operator=="NOT RANGE"?(t[r]="",t[r+"-start"]="",t[r+"-end"]=""):n[o].operator=="NULL"||n[o].operator=="NOT NULL"?t[r]=!1:t[r]="",this.table.acceptQuery&&typeof e[r]<"u"){const l=e[r]??"";if(n[o].operator=="RANGE"||n[o].operator=="NOT RANGE"){const s=l.split(",");n[o].render=="datetime"?s&&s.length>=2&&(t[r+"-default"]=[new Date(s[0]),new Date(s[1])]):(t[r+"-start"]=s[0]??"",t[r+"-end"]=s[1]??"")}else n[o].operator=="NULL"||n[o].operator=="NOT NULL"?t[r]=!!l:n[o].render=="datetime"?t[r+"-default"]=new Date(l):t[r]=l}this.comSearch.fieldData.set(r,{operator:n[o].operator,render:n[o].render,comSearchRender:n[o].comSearchRender})}}if(this.table.acceptQuery){const o=[];for(const r in e){const l=this.comSearch.fieldData.get(r);l&&o.push({field:r,val:e[r],operator:l.operator,render:l.render})}this.table.filter.search=o}this.comSearch.form=Object.assign(this.comSearch.form,t)}});this.api=e,this.form=Object.assign(this.form,n),this.table=Object.assign(this.table,t),this.before=o,this.after=r}auth(e){return hn(e)}runBefore(e,t={}){return this.before&&this.before[e]&&typeof this.before[e]=="function"?this.before[e]({...t})!==!1:!0}runAfter(e,t={}){return this.after&&this.after[e]&&typeof this.after[e]=="function"?this.after[e]({...t})!==!1:!0}getSelectionIds(){var t;const e=[];return(t=this.table.selection)==null||t.forEach(n=>{e.push(n[this.table.pk])}),e}}export{m as S,Ei as T,Si as b,wi as d};
|