jquery.dgtable 0.5.48 → 0.5.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/jquery.dgtable.cjs.js +502 -230
- package/dist/jquery.dgtable.cjs.js.map +1 -1
- package/dist/jquery.dgtable.cjs.min.js +2 -2
- package/dist/jquery.dgtable.cjs.min.js.map +1 -1
- package/dist/jquery.dgtable.es6.js +501 -229
- package/dist/jquery.dgtable.es6.js.map +1 -1
- package/dist/jquery.dgtable.es6.min.js +2 -2
- package/dist/jquery.dgtable.es6.min.js.map +1 -1
- package/dist/jquery.dgtable.umd.js +2382 -1862
- package/dist/jquery.dgtable.umd.js.map +1 -1
- package/dist/jquery.dgtable.umd.min.js +2 -2
- package/dist/jquery.dgtable.umd.min.js.map +1 -1
- package/package.json +12 -11
- package/src/index.js +31 -27
- package/src/row_collection.js +6 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* jquery.dgtable 0.5.
|
|
2
|
+
* jquery.dgtable 0.5.52
|
|
3
3
|
* git://github.com/danielgindi/jquery.dgtable.git
|
|
4
4
|
*/
|
|
5
|
-
"use strict";var e=require("jquery"),t=require("@danielgindi/dom-utils/lib/ScrollHelper"),o=require("@danielgindi/dom-utils/lib/Css");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=r(e),i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=function(e){return e&&e.Math==Math&&e},s=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof i&&i)||function(){return this}()||Function("return this")(),a={},d=function(e){try{return!!e()}catch(e){return!0}},h=!d((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u={},c={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,f=p&&!c.call({1:2},1);u.f=f?function(e){var t=p(this,e);return!!t&&t.enumerable}:c;var m,g,b=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},v={}.toString,C="".split,w=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},y=d((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==function(e){return v.call(e).slice(8,-1)}(e)?C.call(e,""):Object(e)}:Object,_=w,R=function(e){return y(_(e))},W=function(e){return"object"==typeof e?null!==e:"function"==typeof e},T=s,E=function(e){return"function"==typeof e?e:void 0},N=function(e,t){return arguments.length<2?E(T[e]):T[e]&&T[e][t]},S=N("navigator","userAgent")||"",H=s,M=S,F=H.process,x=H.Deno,z=F&&F.versions||x&&x.version,O=z&&z.v8;O?g=(m=O.split("."))[0]<4?1:m[0]+m[1]:M&&(!(m=M.match(/Edge\/(\d+)/))||m[1]>=74)&&(m=M.match(/Chrome\/(\d+)/))&&(g=m[1]);var $=g&&+g,A=$,P=d,L=!!Object.getOwnPropertySymbols&&!P((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&A&&A<41})),k=L&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,I=N,B=k?function(e){return"symbol"==typeof e}:function(e){var t=I("Symbol");return"function"==typeof t&&Object(e)instanceof t},D=W,j={exports:{}},V=s,U=function(e,t){try{Object.defineProperty(V,e,{value:t,configurable:!0,writable:!0})}catch(o){V[e]=t}return t},q=U,X=s["__core-js_shared__"]||q("__core-js_shared__",{}),Y=X;(j.exports=function(e,t){return Y[e]||(Y[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.16.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var G,J=w,K=function(e){return Object(J(e))},Q=K,Z={}.hasOwnProperty,ee=Object.hasOwn||function(e,t){return Z.call(Q(e),t)},te=0,oe=Math.random(),re=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++te+oe).toString(36)},le=s,ie=j.exports,ne=ee,se=re,ae=L,de=k,he=ie("wks"),ue=le.Symbol,ce=de?ue:ue&&ue.withoutSetter||se,pe=W,fe=B,me=(ne(he,G="toPrimitive")&&(ae||"string"==typeof he[G])||(ae&&ne(ue,G)?he[G]=ue[G]:he[G]=ce("Symbol."+G)),he[G]),ge=function(e,t){if(!pe(e)||fe(e))return e;var o,r=e[me];if(void 0!==r){if(void 0===t&&(t="default"),o=r.call(e,t),!pe(o)||fe(o))return o;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var o,r;if("string"===t&&"function"==typeof(o=e.toString)&&!D(r=o.call(e)))return r;if("function"==typeof(o=e.valueOf)&&!D(r=o.call(e)))return r;if("string"!==t&&"function"==typeof(o=e.toString)&&!D(r=o.call(e)))return r;throw TypeError("Can't convert object to primitive value")}(e,t)},be=B,ve=function(e){var t=ge(e,"string");return be(t)?t:String(t)},Ce=W,we=s.document,ye=Ce(we)&&Ce(we.createElement),_e=!h&&!d((function(){return 7!=Object.defineProperty((e="div",ye?we.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),Re=h,We=u,Te=b,Ee=R,Ne=ve,Se=ee,He=_e,Me=Object.getOwnPropertyDescriptor;a.f=Re?Me:function(e,t){if(e=Ee(e),t=Ne(t),He)try{return Me(e,t)}catch(e){}if(Se(e,t))return Te(!We.f.call(e,t),e[t])};var Fe={},xe=W,ze=function(e){if(!xe(e))throw TypeError(String(e)+" is not an object");return e},Oe=h,$e=_e,Ae=ze,Pe=ve,Le=Object.defineProperty;Fe.f=Oe?Le:function(e,t,o){if(Ae(e),t=Pe(t),Ae(o),$e)try{return Le(e,t,o)}catch(e){}if("get"in o||"set"in o)throw TypeError("Accessors not supported");return"value"in o&&(e[t]=o.value),e};var ke=Fe,Ie=b,Be=h?function(e,t,o){return ke.f(e,t,Ie(1,o))}:function(e,t,o){return e[t]=o,e},De={exports:{}},je=X,Ve=Function.toString;"function"!=typeof je.inspectSource&&(je.inspectSource=function(e){return Ve.call(e)});var Ue,qe,Xe,Ye,Ge=je.inspectSource,Je=Ge,Ke=s.WeakMap,Qe="function"==typeof Ke&&/native code/.test(Je(Ke)),Ze=j.exports,et=re,tt=Ze("keys"),ot={},rt=Qe,lt=W,it=Be,nt=ee,st=X,at=ot,dt=s.WeakMap;if(rt||st.state){var ht=st.state||(st.state=new dt),ut=ht.get,ct=ht.has,pt=ht.set;Ue=function(e,t){if(ct.call(ht,e))throw new TypeError("Object already initialized");return t.facade=e,pt.call(ht,e,t),t},qe=function(e){return ut.call(ht,e)||{}},Xe=function(e){return ct.call(ht,e)}}else{var ft=tt[Ye="state"]||(tt[Ye]=et(Ye));at[ft]=!0,Ue=function(e,t){if(nt(e,ft))throw new TypeError("Object already initialized");return t.facade=e,it(e,ft,t),t},qe=function(e){return nt(e,ft)?e[ft]:{}},Xe=function(e){return nt(e,ft)}}var mt={set:Ue,get:qe,has:Xe,enforce:function(e){return Xe(e)?qe(e):Ue(e,{})},getterFor:function(e){return function(t){var o;if(!lt(t)||(o=qe(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return o}}},gt=s,bt=Be,vt=ee,Ct=U,wt=Ge,yt=mt.get,_t=mt.enforce,Rt=String(String).split("String");(De.exports=function(e,t,o,r){var l,i=!!r&&!!r.unsafe,n=!!r&&!!r.enumerable,s=!!r&&!!r.noTargetGet;"function"==typeof o&&("string"!=typeof t||vt(o,"name")||bt(o,"name",t),(l=_t(o)).source||(l.source=Rt.join("string"==typeof t?t:""))),e!==gt?(i?!s&&e[t]&&(n=!0):delete e[t],n?e[t]=o:bt(e,t,o)):n?e[t]=o:Ct(t,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&yt(this).source||wt(this)}));var Wt={},Tt=Math.ceil,Et=Math.floor,Nt=function(e){return isNaN(e=+e)?0:(e>0?Et:Tt)(e)},St=Nt,Ht=Math.min,Mt=function(e){return e>0?Ht(St(e),9007199254740991):0},Ft=Nt,xt=Math.max,zt=Math.min,Ot=R,$t=Mt,At=function(e){return function(t,o,r){var l,i=Ot(t),n=$t(i.length),s=function(e,t){var o=Ft(e);return o<0?xt(o+t,0):zt(o,t)}(r,n);if(e&&o!=o){for(;n>s;)if((l=i[s++])!=l)return!0}else for(;n>s;s++)if((e||s in i)&&i[s]===o)return e||s||0;return!e&&-1}},Pt={includes:At(!0),indexOf:At(!1)},Lt=ee,kt=R,It=Pt.indexOf,Bt=ot,Dt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");Wt.f=Object.getOwnPropertyNames||function(e){return function(e,t){var o,r=kt(e),l=0,i=[];for(o in r)!Lt(Bt,o)&&Lt(r,o)&&i.push(o);for(;t.length>l;)Lt(r,o=t[l++])&&(~It(i,o)||i.push(o));return i}(e,Dt)};var jt={};jt.f=Object.getOwnPropertySymbols;var Vt,Ut,qt=Wt,Xt=jt,Yt=ze,Gt=N("Reflect","ownKeys")||function(e){var t=qt.f(Yt(e)),o=Xt.f;return o?t.concat(o(e)):t},Jt=ee,Kt=Gt,Qt=a,Zt=Fe,eo=d,to=/#|\.prototype\./,oo=function(e,t){var o=lo[ro(e)];return o==no||o!=io&&("function"==typeof t?eo(t):!!t)},ro=oo.normalize=function(e){return String(e).replace(to,".").toLowerCase()},lo=oo.data={},io=oo.NATIVE="N",no=oo.POLYFILL="P",so=oo,ao=s,ho=a.f,uo=Be,co=De.exports,po=U,fo=function(e,t){for(var o=Kt(t),r=Zt.f,l=Qt.f,i=0;i<o.length;i++){var n=o[i];Jt(e,n)||r(e,n,l(t,n))}},mo=so,go=B,bo=Math.floor,vo=function(e,t){var o=e.length,r=bo(o/2);return o<8?Co(e,t):wo(vo(e.slice(0,r),t),vo(e.slice(r),t),t)},Co=function(e,t){for(var o,r,l=e.length,i=1;i<l;){for(r=i,o=e[i];r&&t(e[r-1],o)>0;)e[r]=e[--r];r!==i++&&(e[r]=o)}return e},wo=function(e,t,o){for(var r=e.length,l=t.length,i=0,n=0,s=[];i<r||n<l;)i<r&&n<l?s.push(o(e[i],t[n])<=0?e[i++]:t[n++]):s.push(i<r?e[i++]:t[n++]);return s},yo=vo,_o=d,Ro=S.match(/firefox\/(\d+)/i),Wo=!!Ro&&+Ro[1],To=/MSIE|Trident/.test(S),Eo=S.match(/AppleWebKit\/(\d+)\./),No=!!Eo&&+Eo[1],So=K,Ho=Mt,Mo=function(e){if(go(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)},Fo=d,xo=yo,zo=Wo,Oo=To,$o=$,Ao=No,Po=[],Lo=Po.sort,ko=Fo((function(){Po.sort(void 0)})),Io=Fo((function(){Po.sort(null)})),Bo=!!(Ut=[]["sort"])&&_o((function(){Ut.call(null,Vt||function(){throw 1},1)})),Do=!Fo((function(){if($o)return $o<70;if(!(zo&&zo>3)){if(Oo)return!0;if(Ao)return Ao<603;var e,t,o,r,l="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:o=3;break;case 68:case 71:o=4;break;default:o=2}for(r=0;r<47;r++)Po.push({k:t+r,v:o})}for(Po.sort((function(e,t){return t.v-e.v})),r=0;r<Po.length;r++)t=Po[r].k.charAt(0),l.charAt(l.length-1)!==t&&(l+=t);return"DGBEFHACIJK"!==l}}));!function(e,t){var o,r,l,i,n,s=e.target,a=e.global,d=e.stat;if(o=a?ao:d?ao[s]||po(s,{}):(ao[s]||{}).prototype)for(r in t){if(i=t[r],l=e.noTargetGet?(n=ho(o,r))&&n.value:o[r],!mo(a?r:s+(d?".":"#")+r,e.forced)&&void 0!==l){if(typeof i==typeof l)continue;fo(i,l)}(e.sham||l&&l.sham)&&uo(i,"sham",!0),co(o,r,i,e)}}({target:"Array",proto:!0,forced:ko||!Io||!Bo||!Do},{sort:function(e){void 0!==e&&function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function")}(e);var t=So(this);if(Do)return void 0===e?Lo.call(t):Lo.call(t,e);var o,r,l=[],i=Ho(t.length);for(r=0;r<i;r++)r in t&&l.push(t[r]);for(o=(l=xo(l,function(e){return function(t,o){return void 0===o?-1:void 0===t?1:void 0!==e?+e(t,o)||0:Mo(t)>Mo(o)?1:-1}}(e))).length,r=0;r<o;)t[r]=l[r++];for(;r<i;)delete t[r++];return t}});const jo=Array.prototype.indexOf,Vo=function(e,t){for(let o=0,r=e.length;o>=0&&o<r;o+=1)if(t(e[o],o,e))return e[o]},Uo=function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"<br />")};function qo(){let e=[];return Object.assign(e,qo.prototype),e.initialize.apply(e,arguments),e}qo.prototype=[],qo.prototype.initialize=function(e){e=e||{},this.sortColumn=null==e.sortColumn?[]:e.sortColumn},qo.prototype.add=function(e,t){let o,r;if("splice"in e&&"length"in e)if("number"==typeof t)for(o=0,r=e.length;o<r;o++)this.splice(t++,0,e[o]);else for(o=0,r=e.length;o<r;o++)this.push(e[o]);else"number"==typeof t?this.splice(t,0,e):this.push(e)},qo.prototype.reset=function(e){this.length=0,e&&this.add(e)},qo.prototype.filteredCollection=function(e,t){if(e&&t){let o=new qo({sortColumn:this.sortColumn});for(let r,l=0,i=this.length;l<i;l++)r=this[l],e(r,t)&&(r.__i=l,o.push(r));return o}return null},qo.prototype.onComparatorRequired=null,qo.prototype.onSort=null;let Xo=qo.prototype.sort;function Yo(e,t){let o=e.column,r=e.comparePath||o;"string"==typeof r&&(r=r.split("."));let l,i=r.length,n=i>1,s=t?1:-1,a=t?-1:1;return function(e,t){let o=e[r[0]],d=t[r[0]];if(n)for(l=1;l<i;l++)o=o&&o[r[l]],d=d&&d[r[l]];return o===d?0:null==o?s:null==d?a:o<d?s:a}}function Go(){let e=[];return Object.assign(e,Go.prototype),e.initialize.apply(e,arguments),e}qo.prototype.sort=function(e){if(this.sortColumn.length){let t,o,r=[];for(t=0;t<this.sortColumn.length;t++)o=null,this.onComparatorRequired&&(o=this.onComparatorRequired(this.sortColumn[t].column,this.sortColumn[t].descending)),o||(o=Yo(this.sortColumn[t],this.sortColumn[t].descending)),r.push(o.bind(this));if(1===r.length)Xo.call(this,r[0]);else{let e,l=r.length;o=function(o,i){for(t=0;t<l;t++)if(e=r[t](o,i),0!==e)return e;return e},Xo.call(this,o)}e||this.onSort&&this.onSort()}return this},Go.prototype=[],Go.prototype.initialize=function(){},Go.prototype.get=function(e){for(let t=0,o=this.length;t<o;t++)if(this[t].name==e)return this[t];return null},Go.prototype.indexOf=function(e){for(let t=0,o=this.length;t<o;t++)if(this[t].name==e)return t;return-1},Go.prototype.getByOrder=function(e){for(let t=0,o=this.length;t<o;t++)if(this[t].order==e)return this[t];return null},Go.prototype.normalizeOrder=function(){let e,t=[];for(e=0;e<this.length;e++)t.push(this[e]);for(t.sort((function(e,t){return e.order<t.order?-1:e.order>t.order?1:0})),e=0;e<t.length;e++)t[e].order=e;return this},Go.prototype.getColumns=function(){let e=[];for(let t,o=0;o<this.length;o++)t=this[o],e.push(t);return e.sort(((e,t)=>e.order<t.order?-1:e.order>t.order?1:0)),e},Go.prototype.getVisibleColumns=function(){let e=[];for(let t,o=0;o<this.length;o++)t=this[o],t.visible&&e.push(t);return e.sort(((e,t)=>e.order<t.order?-1:e.order>t.order?1:0)),e},Go.prototype.getMaxOrder=function(){let e=0;for(let t,o=0;o<this.length;o++)t=this[o],t.order>e&&(e=t.order);return e},Go.prototype.moveColumn=function(e,t){if(e&&t){let o,r,l=e.order,i=t.order;if(l<i)for(o=l+1;o<=i;o++)r=this.getByOrder(o),r.order--;else for(o=l-1;o>=i;o--)r=this.getByOrder(o),r.order++;e.order=i}return this};const Jo={};let Ko=null;Jo.getSupportedTransform=()=>{if(null===Ko){let e=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],t=document.createElement("div");Ko=!1;for(let o of e)if(t&&void 0!==t.style[o]){Ko=o;break}}return Ko};class Qo{static saveSelection(e){let t=window.getSelection().getRangeAt(0);if(e!==t.commonAncestorContainer&&!function(e,t){for(;(e=e.parentNode)&&e!==t;);return!!e}(t.commonAncestorContainer,e))return null;let o=t.cloneRange();o.selectNodeContents(e),o.setEnd(t.startContainer,t.startOffset);let r=o.toString().length;return{start:r,end:r+t.toString().length}}static restoreSelection(e,t){let o,r=0,l=[e],i=!1,n=!1,s=document.createRange();for(s.setStart(e,0),s.collapse(!0);!n&&(o=l.pop());)if(3===o.nodeType){let e=r+o.length;!i&&t.start>=r&&t.start<=e&&(s.setStart(o,t.start-r),i=!0),i&&t.end>=r&&t.end<=e&&(s.setEnd(o,t.end-r),n=!0),r=e}else{let e=o.childNodes.length;for(;e--;)l.push(o.childNodes[e])}let a=window.getSelection();a.removeAllRanges(),a.addRange(s)}}function Zo(e,t){let o=t.column,r=null==t.keyword?"":t.keyword.toString();if(!r||!o)return!0;let l=e[o];return null!=l&&(l=l.toString(),t.caseSensitive||(l=l.toLowerCase(),r=r.toLowerCase()),-1!==l.indexOf(r))}const er=Array.prototype.indexOf,tr=l.default;let or=navigator.userAgent,rr=-1!==or.indexOf("MSIE ")?parseFloat(or.substr(or.indexOf("MSIE ")+5)):null,lr=rr&&rr<10,ir=document.createElement.bind(document);const nr=Object.prototype.hasOwnProperty;function sr(e){var t,o;t=["relative","absolute","fixed"],o=e.css("position"),jo.call(t,o)>=0||e.css("position","relative")}const ar=e=>/^(?:INPUT|TEXTAREA|BUTTON|SELECT)$/.test(e.target.tagName);let dr=function e(){if(!(this instanceof e))return new(Function.prototype.bind.apply(e,[e].concat(Array.prototype.slice.call(arguments,0))));this.initialize.apply(this,arguments)};dr.VERSION="@@VERSION",dr.prototype.VERSION=dr.VERSION,dr.prototype.initialize=function(e){let t=this;e=e||{};let o=t.o={},r=t.p={};r.events={},t.el=e.el&&e.el instanceof Element?e.el:document.createElement("div");let l=t.$el=tr(t.el);t.el!==e.el&&l.addClass(e.className||"dgtable-wrapper"),l.data("control",t).data("dgtable",t),l.on("remove",(function(){t.destroy()})),r.onMouseMoveResizeAreaBound=this._onMouseMoveResizeArea.bind(this),r.onEndDragColumnHeaderBound=this._onEndDragColumnHeader.bind(this),r.onTableScrolledHorizontallyBound=this._onTableScrolledHorizontally.bind(this),this.$el.on("dragend",r.onEndDragColumnHeaderBound),r.tableSkeletonNeedsRendering=!0,o.virtualTable=void 0===e.virtualTable||!!e.virtualTable,o.rowsBufferSize=e.rowsBufferSize||3,o.minColumnWidth=Math.max(e.minColumnWidth||35,0),o.resizeAreaWidth=e.resizeAreaWidth||8,o.resizableColumns=void 0===e.resizableColumns||!!e.resizableColumns,o.movableColumns=void 0===e.movableColumns||!!e.movableColumns,o.sortableColumns=void 0===e.sortableColumns?1:parseInt(e.sortableColumns,10)||1,o.adjustColumnWidthForSortArrow=void 0===e.adjustColumnWidthForSortArrow||!!e.adjustColumnWidthForSortArrow,o.convertColumnWidthsToRelative=void 0!==e.convertColumnWidthsToRelative&&!!e.convertColumnWidthsToRelative,o.autoFillTableWidth=void 0!==e.autoFillTableWidth&&!!e.autoFillTableWidth,o.cellClasses=void 0===e.cellClasses?"":e.cellClasses,o.resizerClassName=void 0===e.resizerClassName?"dgtable-resize":e.resizerClassName,o.tableClassName=void 0===e.tableClassName?"dgtable":e.tableClassName,o.allowCellPreview=void 0===e.allowCellPreview||e.allowCellPreview,o.allowHeaderCellPreview=void 0===e.allowHeaderCellPreview||e.allowHeaderCellPreview,o.cellPreviewClassName=void 0===e.cellPreviewClassName?"dgtable-cell-preview":e.cellPreviewClassName,o.cellPreviewAutoBackground=void 0===e.cellPreviewAutoBackground||e.cellPreviewAutoBackground,o.onComparatorRequired=void 0===e.onComparatorRequired?null:e.onComparatorRequired,o.onComparatorRequired||"function"!=typeof e.comparatorCallback||(o.onComparatorRequired=e.comparatorCallback),o.width=void 0===e.width?dr.Width.NONE:e.width,o.relativeWidthGrowsToFillWidth=void 0===e.relativeWidthGrowsToFillWidth||!!e.relativeWidthGrowsToFillWidth,o.relativeWidthShrinksToFillWidth=void 0!==e.relativeWidthShrinksToFillWidth&&!!e.relativeWidthShrinksToFillWidth,this.setCellFormatter(e.cellFormatter),this.setHeaderCellFormatter(e.headerCellFormatter),this.setFilter(e.filter),o.height=e.height,t.setColumns(e.columns||[],!1);let i=[];if(e.sortColumn){let t=e.sortColumn;if(t&&"object"!=typeof t&&(t=[t]),t instanceof Array||"object"==typeof t)for(let e=0,o=t.length;e<o;e++){let o=t[e];"string"==typeof o&&(o={column:o,descending:!1});let l=r.columns.get(o.column);l&&i.push({column:o.column,comparePath:l.comparePath||l.dataPath,descending:o.descending})}}r.rows=new qo({sortColumn:i}),r.rows.onComparatorRequired=function(e,t){if(o.onComparatorRequired)return o.onComparatorRequired(e,t)},r.filteredRows=null;let n=function(e){let o=(e=e||event).fromElement||e.relatedTarget;o===this||tr.contains(this,o)||this.__previewCell&&(o===this.__previewCell||tr.contains(this.__previewCell,o))||t._cellMouseOverEvent.call(t,this)},s=function(e){let o=(e=e||event).toElement||e.relatedTarget;o===this||tr.contains(this,o)||this.__previewCell&&(o===this.__previewCell||tr.contains(this.__previewCell,o))||t._cellMouseOutEvent.call(t,this)};"addEventListener"in window?(r._bindCellHoverIn=function(e){e.__hoverIn||e.addEventListener("mouseover",e.__hoverIn=n.bind(e))},r._unbindCellHoverIn=function(e){e.__hoverIn&&(e.removeEventListener("mouseover",e.__hoverIn),e.__hoverIn=null)},r._bindCellHoverOut=function(e){return e.__hoverOut||e.addEventListener("mouseout",e.__hoverOut=s.bind(e.__cell||e)),this},r._unbindCellHoverOut=function(e){return e.__hoverOut&&(e.removeEventListener("mouseout",e.__hoverOut),e.__hoverOut=null),this}):(r._bindCellHoverIn=function(e){e.__hoverIn||e.attachEvent("mouseover",e.__hoverIn=n.bind(e))},r._unbindCellHoverIn=function(e){e.__hoverIn&&(e.detachEvent("mouseover",e.__hoverIn),e.__hoverIn=null)},r._bindCellHoverOut=function(e){e.__hoverOut||e.attachEvent("mouseout",e.__hoverOut=s.bind(e.__cell||e))},r._unbindCellHoverOut=function(e){return e.__hoverOut&&(e.detachEvent("mouseout",e.__hoverOut),e.__hoverOut=null),this})},dr.prototype.on=function(e,t){let o=this.p.events;return"function"!=typeof t||(nr.call(o,e)||(o[e]=[]),o[e].push({cb:t,once:!1})),this},dr.prototype.once=function(e,t){let o=this.p.events;return"function"!=typeof t||(nr.call(o,e)||(o[e]=[]),o[e].push({cb:t,once:!0})),this},dr.prototype.off=function(e,t){let o=this.p.events;if(!nr.call(o,e))return this;let r=o[e];for(let e=0;e<r.length;e++){let o=r[e];t&&o.cb!==t||r.splice(e--,1)}return this},dr.prototype.trigger=function(e){let t=this.p.events;if(nr.call(t,e)){let o=t[e];for(let e=0;e<o.length;e++){let t=o[e];t.once&&o.splice(e--,1),t.cb.apply(this,Array.prototype.slice.call(arguments,1))}}return this},dr.prototype._parseColumnWidth=function(e,t){let o=Math.max(0,parseFloat(e)),r=hr.AUTO;return o>0&&(e===o+"%"?(r=hr.RELATIVE,o/=100):o>0&&o<1?r=hr.RELATIVE:(o<t&&(o=t),r=hr.ABSOLUTE)),{width:o,mode:r}},dr.prototype._initColumnFromData=function(e){let t=this._parseColumnWidth(e.width,e.ignoreMin?0:this.o.minColumnWidth),o={name:e.name,label:void 0===e.label?e.name:e.label,width:t.width,widthMode:t.mode,resizable:void 0===e.resizable||e.resizable,sortable:void 0===e.sortable||e.sortable,movable:void 0===e.movable||e.movable,visible:void 0===e.visible||e.visible,cellClasses:void 0===e.cellClasses?this.o.cellClasses:e.cellClasses,ignoreMin:void 0!==e.ignoreMin&&!!e.ignoreMin};return o.dataPath=void 0===e.dataPath?o.name:e.dataPath,o.comparePath=void 0===e.comparePath?o.dataPath:e.comparePath,"string"==typeof o.dataPath&&(o.dataPath=o.dataPath.split(".")),"string"==typeof o.comparePath&&(o.comparePath=o.comparePath.split(".")),o},dr.prototype.close=dr.prototype.remove=dr.prototype.destroy=function(){let e=this,t=e.p||{},o=e.$el;if(e.__removed)return e;if(t.$resizer&&(t.$resizer.remove(),t.$resizer=null),t.$tbody){let o=t.$tbody[0].childNodes;for(let t=0,r=o.length;t<r;t++)e.trigger("rowdestroy",o[t])}if(this._destroyHeaderCells()._unbindCellEventsForTable(),t.$table&&t.$table.empty(),t.$tbody&&t.$tbody.empty(),t.workerListeners){for(let e=0;e<t.workerListeners.length;e++){let o=t.workerListeners[e];o.worker.removeEventListener("message",o.listener,!1)}t.workerListeners.length=0}t.rows.length=t.columns.length=0,t._deferredRender&&clearTimeout(t._deferredRender);for(let t in e)nr.call(e,t)&&(e[t]=null);return e.__removed=!0,o&&o.remove(),this},dr.prototype._unbindCellEventsForTable=function(){const e=this.p;if(e.headerRow)for(let t=0,o=e.headerRow.childNodes,r=o.length;t<r;t++)for(let r=0,l=o[t].childNodes,i=l.length;r<i;r++)e._unbindCellHoverIn(l[r]);if(e.tbody)for(let t=0,o=e.tbody.childNodes,r=o.length;t<r;t++)this._unbindCellEventsForRow(o[t]);return this},dr.prototype._unbindCellEventsForRow=function(e){const t=this.p;for(let o=0,r=e.childNodes,l=r.length;o<l;o++)t._unbindCellHoverIn(r[o]);return this},dr.prototype.render=function(){const e=this.o,o=this.p;if(!this.el.offsetParent)return o._deferredRender||(o._deferredRender=setTimeout((()=>{o._deferredRender=null,!this.__removed&&this.el.offsetParent&&this.render()}))),this;let r,l;if(!0===o.tableSkeletonNeedsRendering){o.tableSkeletonNeedsRendering=!1,e.width===dr.Width.AUTO&&this._clearSortArrows();let i=o.table&&o.table.parentNode?o.table.scrollTop:NaN,n=o.table&&o.table.parentNode?t.getScrollHorz(o.table):NaN;this._renderSkeletonBase()._renderSkeletonBody().tableWidthChanged(!0,!1)._renderSkeletonHeaderCells(),e.virtualTable||(l=(o.filteredRows||o.rows).length,r=this.renderRows(0,l-1),o.$tbody.html("").append(r)),this._updateLastCellWidthFromScrollbar(!0),this._updateTableWidth(!0);for(let e=0;e<o.rows.sortColumn.length;e++)this._showSortArrow(o.rows.sortColumn[e].column,o.rows.sortColumn[e].descending);e.adjustColumnWidthForSortArrow&&o.rows.sortColumn.length?this.tableWidthChanged(!0):e.virtualTable||this.tableWidthChanged(),isNaN(i)||(o.table.scrollTop=i),isNaN(n)||(t.setScrollHorz(o.table,n),t.setScrollHorz(o.header,n)),this.trigger("renderskeleton"),e.virtualTable&&(o.$table.on("scroll",this._onVirtualTableScrolled.bind(this)),this.render())}else if(e.virtualTable){l=(o.filteredRows||o.rows).length;let t=o.table.scrollTop,i=Math.floor((t-o.virtualRowHeightFirst)/o.virtualRowHeight)+1-e.rowsBufferSize,n=Math.ceil((t-o.virtualRowHeightFirst+o.visibleHeight)/o.virtualRowHeight)+e.rowsBufferSize;i<0&&(i=0),n>=l&&(n=l-1);let s,a=-1,d=-1,h=o.tbody.childNodes;if(h.length&&(a=h[0].rowIndex,d=h[h.length-1].rowIndex),-1!==a&&a<i){s=Math.min(d+1,i)-a;for(let e=0;e<s;e++)this.trigger("rowdestroy",h[0]),this._unbindCellEventsForRow(h[0]),o.tbody.removeChild(h[0]);a+=s,a>d&&(a=d=-1)}else if(-1!==d&&d>n){s=d-Math.max(a-1,n);for(let e=0;e<s;e++)this.trigger("rowdestroy",h[h.length-1]),this._unbindCellEventsForRow(h[h.length-1]),o.tbody.removeChild(h[h.length-1]);d<a&&(a=d=-1)}i<a&&(r=this.renderRows(i,Math.min(n,a-1)),o.$tbody.prepend(r)),(n>d||-1===d)&&(r=this.renderRows(-1===d?i:d+1,n),o.$tbody.append(r))}return this.trigger("render"),this},dr.prototype.clearAndRender=function(e){return this.p.tableSkeletonNeedsRendering=!0,(void 0===e||e)&&this.render(),this},dr.prototype.renderRows=function(e,t){const o=this.o,r=this.p;let l,i,n=o.tableClassName,s=n+"-row",a=n+"-cell",d=r.filteredRows||r.rows,h=!!r.filteredRows,u=o.allowCellPreview,c=r.visibleColumns,p=o.virtualTable,f=r.virtualRowHeightFirst,m=r.virtualRowHeight,g=c.length;for(let e,t=0;t<g;t++)e=c[t],e._finalWidth=e.actualWidthConsideringScrollbarWidth||e.actualWidth;let b=document.createDocumentFragment(),v=this._isTableRtl()?"right":"left";const C=Jo.getSupportedTransform();for(let o=e,n=d.length;o<n&&o<=t;o++){let e=d[o];i=h?e.__i:o;let t=ir("div");t.className=s,t.rowIndex=o,t.physicalRowIndex=i;for(let o=0;o<g;o++){let l=c[o],i=ir("div");i.columnName=l.name,i.setAttribute("data-column",l.name),i.className=a,i.style.width=l._finalWidth+"px",l.cellClasses&&(i.className+=" "+l.cellClasses),u&&r._bindCellHoverIn(i),i.appendChild(ir("div")).innerHTML=this._getHtmlForCell(e,l),t.appendChild(i)}p&&(l=o>0?f+(o-1)*m:0,t.style.position="absolute",t.style[v]=0,!1===C?t.style.top=`${l}px`:(t.style.top="0px",t.style[C]=`translateY(${l}px)`)),b.appendChild(t),this.trigger("rowcreate",o,i,t,e)}return b},dr.prototype._calculateVirtualHeight=function(){let e=this.p;if(e.tbody){let t=(e.filteredRows||e.rows).length,o=e.virtualRowHeight*t;t&&(o+=e.virtualRowHeightFirst-e.virtualRowHeight,o+=e.virtualRowHeightLast-e.virtualRowHeight),o<1&&(o=1),e.tbody.style.height=o+"px"}return this},dr.prototype._calculateTbodyWidth=function(){const e=this.p;let t,r,l,i=this.o.tableClassName,n=i+"-row",s=i+"-cell",a=e.visibleColumns,d=a.length,h=tr("<div>").addClass(n).css("float","left"),u=0;for(r=0;r<d;r++)l=a[r],t=ir("div"),t.className=s,t.style.width=l.actualWidth+"px",l.cellClasses&&(t.className+=" "+l.cellClasses),t.appendChild(ir("div")),h.append(t),u+=l.actualWidth;let c=tr("<div>").addClass(this.el.className).css({"z-index":-1,position:"absolute",left:"0",top:"-9999px",float:"left",width:"1px",overflow:"hidden"}).append(tr("<div>").addClass(i).append(tr("<div>").addClass(i+"-body").css("width",u+1e4).append(h)));c.appendTo(document.body);let p=tr('<div style="border:1.5px solid #000;width:0;height:0;position:absolute;left:0;top:-9999px">').appendTo(document.body),f=parseFloat(p.css("border-width")),m=Math.round(f)!==f;p.remove();let g=o.getElementWidth(h[0],!0,!0,!0);return g-=e.scrollbarWidth||0,m&&g++,c.remove(),g},dr.prototype.setColumns=function(e,t){const o=this.p;e=e||[];let r=new Go;for(let t=0,o=0;t<e.length;t++){let l=e[t],i=this._initColumnFromData(l);void 0!==l.order?(l.order>o&&(o=l.order+1),i.order=l.order):i.order=o++,r.push(i)}return r.normalizeOrder(),o.columns=r,o.visibleColumns=r.getVisibleColumns(),this._ensureVisibleColumns().clearAndRender(t),this},dr.prototype.addColumn=function(e,t,o){const r=this.p;let l=r.columns;if(e&&!l.get(e.name)){let i=null;void 0!==t&&(i=l.get(t)||l.getByOrder(t));let n=this._initColumnFromData(e);n.order=i?i.order:l.getMaxOrder()+1;for(let e=l.getMaxOrder(),t=n.order;e>=t;e--){let t=l.getByOrder(e);t&&t.order++}l.push(n),l.normalizeOrder(),r.visibleColumns=l.getVisibleColumns(),this._ensureVisibleColumns().clearAndRender(o),this.trigger("addcolumn",n.name)}return this},dr.prototype.removeColumn=function(e,t){const o=this.p;let r=o.columns,l=r.indexOf(e);return l>-1&&(r.splice(l,1),r.normalizeOrder(),o.visibleColumns=r.getVisibleColumns(),this._ensureVisibleColumns().clearAndRender(t),this.trigger("removecolumn",e)),this},dr.prototype.setCellFormatter=function(e){return this.o.cellFormatter=e||function(e){return"string"==typeof e?Uo(e):e},this},dr.prototype.setHeaderCellFormatter=function(e){return this.o.headerCellFormatter=e||function(e){return"string"==typeof e?Uo(e):e},this},dr.prototype.setFilter=function(e){return this.o.filter=e,this},dr.prototype.filter=function(e){const t=this.p;let o=this.o.filter||Zo;"string"==typeof arguments[0]&&"string"==typeof arguments[1]&&(e={column:arguments[0],keyword:arguments[1],caseSensitive:arguments[2]});let r=!!t.filteredRows;return t.filteredRows&&(t.filteredRows=null),t.filterArgs=null==e?null:"object"!=typeof e||Array.isArray(e)?e:tr.extend({},e),null!==t.filterArgs?(t.filteredRows=t.rows.filteredCollection(o,t.filterArgs),(r||t.filteredRows)&&(this.clearAndRender(),this.trigger("filter",e))):(t.filterArgs=null,t.filteredRows=null,this.clearAndRender(),this.trigger("filterclear",{})),this},dr.prototype.clearFilter=function(){const e=this.p;return e.filteredRows&&(e.filterArgs=null,e.filteredRows=null,this.clearAndRender(),this.trigger("filterclear",{})),this},dr.prototype._refilter=function(){const e=this.p;if(e.filteredRows&&e.filterArgs){let t=this.o.filter||Zo;e.filteredRows=e.rows.filteredCollection(t,e.filterArgs)}return this},dr.prototype.setColumnLabel=function(e,t){let o=this.p.columns.get(e);if(o&&(o.label=void 0===t?o.name:t,o.element))for(let e=0;e<o.element[0].firstChild.childNodes.length;e++){let t=o.element[0].firstChild.childNodes[e];if(3===t.nodeType){t.textContent=o.label;break}}return this},dr.prototype.moveColumn=function(e,t,o=!0){const r=this.o,l=this.p;let i,n,s=l.columns,a=o?l.visibleColumns:s.getColumns();if("string"==typeof e?i=s.get(e):"number"==typeof e&&(i=a[e]),"string"==typeof t?n=s.get(t):"number"==typeof t&&(n=a[t]),i&&n&&e!==t){let e=i.order,t=n.order,o=s.moveColumn(i,n).getVisibleColumns();if(l.visibleColumns.length!==o.length||l.visibleColumns.some(((e,t)=>e!==o[t])))if(l.visibleColumns=o,this._ensureVisibleColumns(),r.virtualTable)this.clearAndRender()._updateLastCellWidthFromScrollbar(!0);else{let o=l.$headerRow.find(">div."+r.tableClassName+"-header-cell"),i=e<t?t+1:t,n=e;o[0].parentNode.insertBefore(o[n],o[i]);let s=l.visibleColumns[e];s=(s.actualWidthConsideringScrollbarWidth||s.actualWidth)+"px";let a=l.visibleColumns[t];a=(a.actualWidthConsideringScrollbarWidth||a.actualWidth)+"px";let d=l.$tbody[0].childNodes;for(let o=0,r=d.length;o<r;o++){let r=d[o];1===r.nodeType&&(r.insertBefore(r.childNodes[n],r.childNodes[i]),r.childNodes[t].firstChild.style.width=a,r.childNodes[e].firstChild.style.width=s)}}this.trigger("movecolumn",i.name,e,t)}return this},dr.prototype.sort=function(e,t,o){const r=this.o,l=this.p;let i=l.columns.get(e),n=l.rows.sortColumn;if(i){if(n.length&&n[n.length-1].column===e&&(t=void 0===t?!n[n.length-1].descending:t),o){for(let e=0;e<n.length;e++)if(n[e].column===i.name){e<n.length-1?n.length=0:n.splice(n.length-1,1);break}(r.sortableColumns>0&&n.length>=r.sortableColumns||n.length>=l.visibleColumns.length)&&(n.length=0)}else n.length=0;t=void 0!==t&&t,n.push({column:i.name,comparePath:i.comparePath||i.dataPath,descending:!!t})}else n.length=0;this._clearSortArrows();for(let e=0;e<n.length;e++)this._showSortArrow(n[e].column,n[e].descending);if(r.adjustColumnWidthForSortArrow&&!r._tableSkeletonNeedsRendering&&this.tableWidthChanged(!0),r.virtualTable)for(;l.tbody&&l.tbody.firstChild;)this.trigger("rowdestroy",l.tbody.firstChild),this._unbindCellEventsForRow(l.tbody.firstChild),l.tbody.removeChild(l.tbody.firstChild);else l.tableSkeletonNeedsRendering=!0;l.rows.sortColumn=n,n.length&&(l.rows.sort(!!l.filteredRows),l.filteredRows&&l.filteredRows.sort(!!l.filteredRows));let s=[];for(let e=0;e<n.length;e++)s.push({column:n[e].column,descending:n[e].descending});return this.trigger("sort",s,!0),this},dr.prototype.resort=function(){const e=this.p;let t=e.columns,o=e.rows.sortColumn;if(o.length){for(let e=0;e<o.length;e++)t.get(o[e].column)||o.splice(e--,1);e.rows.sortColumn=o,o.length&&(e.rows.sort(!!e.filteredRows),e.filteredRows&&e.filteredRows.sort(!!e.filteredRows));let r=[];for(let e=0;e<o.length;e++)r.push({column:o[e].column,descending:o[e].descending});this.trigger("sort",r,!1)}return this},dr.prototype._ensureVisibleColumns=function(){const e=this.p;return 0===e.visibleColumns.length&&e.columns.length&&(e.columns[0].visible=!0,e.visibleColumns.push(e.columns[0]),this.trigger("showcolumn",e.columns[0].name)),this},dr.prototype.setColumnVisible=function(e,t){const o=this.p;let r=o.columns.get(e);return t=!!t,r&&!!r.visible!==t&&(r.visible=t,o.visibleColumns=o.columns.getVisibleColumns(),this.trigger(t?"showcolumn":"hidecolumn",e),this._ensureVisibleColumns(),this.clearAndRender()),this},dr.prototype.isColumnVisible=function(e){let t=this.p.columns.get(e);return!!t&&t.visible},dr.prototype.setMinColumnWidth=function(e){let t=this.o;return e=Math.max(e,0),t.minColumnWidth!==e&&(t.minColumnWidth=e,this.tableWidthChanged(!0)),this},dr.prototype.getMinColumnWidth=function(){return this.o.minColumnWidth},dr.prototype.setSortableColumns=function(e){const t=this.p,o=this.o;if(o.sortableColumns!==e&&(o.sortableColumns=e,t.$table)){let e=t.$headerRow.find(">div."+o.tableClassName+"-header-cell");for(let r=0;r<e.length;r++)tr(e[0])[o.sortableColumns>0&&t.visibleColumns[r].sortable?"addClass":"removeClass"]("sortable")}return this},dr.prototype.getSortableColumns=function(){return this.o.sortableColumns},dr.prototype.setMovableColumns=function(e){let t=this.o;return e=void 0===e||!!e,t.movableColumns!==e&&(t.movableColumns=e),this},dr.prototype.getMovableColumns=function(){return this.o.movableColumns},dr.prototype.setResizableColumns=function(e){let t=this.o;return e=void 0===e||!!e,t.resizableColumns!==e&&(t.resizableColumns=e),this},dr.prototype.getResizableColumns=function(){return this.o.resizableColumns},dr.prototype.setComparatorCallback=function(e){let t=this.o;return t.onComparatorRequired!==e&&(t.onComparatorRequired=e),this},dr.prototype.setColumnWidth=function(e,t){let o=this.p.columns.get(e),r=this._parseColumnWidth(t,o.ignoreMin?0:this.o.minColumnWidth);if(o){let e=this._serializeColumnWidth(o);o.width=r.width,o.widthMode=r.mode;let t=this._serializeColumnWidth(o);e!==t&&this.tableWidthChanged(!0),this.trigger("columnwidth",o.name,e,t)}return this},dr.prototype.getColumnWidth=function(e){let t=this.p.columns.get(e);return t?this._serializeColumnWidth(t):null},dr.prototype.getColumnConfig=function(e){let t=this.p.columns.get(e);return t?{order:t.order,width:this._serializeColumnWidth(t),visible:t.visible,label:t.label}:null},dr.prototype.getColumnsConfig=function(){const e=this.p;let t={};for(let o=0;o<e.columns.length;o++)t[e.columns[o].name]=this.getColumnConfig(e.columns[o].name);return t},dr.prototype.getSortedColumns=function(){const e=this.p;let t=[];for(let o=0;o<e.rows.sortColumn.length;o++){let r=e.rows.sortColumn[o];t.push({column:r.column,descending:r.descending})}return t},dr.prototype.getHtmlForRowCell=function(e,t){const o=this.p;if(e<0||e>o.rows.length-1)return null;let r=o.columns.get(t);if(!r)return null;let l=o.rows[e];return this._getHtmlForCell(l,r)},dr.prototype.getHtmlForRowDataCell=function(e,t){let o=this.p.columns.get(t);return o?this._getHtmlForCell(e,o):null},dr.prototype._getHtmlForCell=function(e,t){let o=t.dataPath,r=e[o[0]];for(let e=1;e<o.length&&null!=r;e++)r=r&&r[o[e]];let l=this.o.cellFormatter(r,t.name,e);return null==l&&(l=""),l},dr.prototype.getRowYPos=function(e){const t=this.p;if(this.o.virtualTable)return e>0?t.virtualRowHeightFirst+(e-1)*t.virtualRowHeight:0;{let o=t.tbody.childNodes[e];return o?o.offsetTop:null}},dr.prototype.getDataForRow=function(e){const t=this.p;return e<0||e>t.rows.length-1?null:t.rows[e]},dr.prototype.getRowCount=function(){const e=this.p;return e.rows?e.rows.length:0},dr.prototype.getIndexForRow=function(e){return this.p.rows.indexOf(e)},dr.prototype.getFilteredRowCount=function(){const e=this.p;return(e.filteredRows||e.rows).length},dr.prototype.getIndexForFilteredRow=function(e){const t=this.p;return(t.filteredRows||t.rows).indexOf(e)},dr.prototype.getDataForFilteredRow=function(e){const t=this.p;return e<0||e>(t.filteredRows||t.rows).length-1?null:(t.filteredRows||t.rows)[e]},dr.prototype.getHeaderRowElement=function(){return this.p.headerRow},dr.prototype._horizontalPadding=function(e){return(parseFloat(tr.css(e,"padding-left"))||0)+(parseFloat(tr.css(e,"padding-right"))||0)},dr.prototype._horizontalBorderWidth=function(e){return(parseFloat(tr.css(e,"border-left"))||0)+(parseFloat(tr.css(e,"border-right"))||0)},dr.prototype._calculateWidthAvailableForColumns=function(){const e=this.o,t=this.p;let r,l,i;t.$table&&(l=t.table?t.table.scrollTop:0,i=t.table?t.table.scrollLeft:0,e.virtualTable&&(r=t.$table[0].style.display,t.$table[0].style.display="none"));let n=o.getElementWidth(this.$el[0]);t.$table&&(e.virtualTable&&(t.$table[0].style.display=r),t.table.scrollTop=l,t.table.scrollLeft=i,t.header.scrollLeft=i);let s=e.tableClassName,a=tr("<div>").addClass(this.el.className).css({"z-index":-1,position:"absolute",left:"0",top:"-9999px"}),d=tr("<div>").addClass(s+"-header").appendTo(a),h=tr("<div>").addClass(s+"-header-row").appendTo(d);for(let e=0;e<t.visibleColumns.length;e++)h.append(tr("<div><div></div></div>").addClass(s+"-header-cell").addClass(t.visibleColumns[e].cellClasses||""));a.appendTo(document.body),n-=this._horizontalBorderWidth(h[0]);let u=h.find(">div."+s+"-header-cell");for(let e=0;e<u.length;e++){let t=tr(u[e]);"border-box"===t.css("boxSizing")||(n-=(parseFloat(t.css("border-right-width"))||0)+(parseFloat(t.css("border-left-width"))||0)+this._horizontalPadding(t[0]))}return a&&a.remove(),Math.max(0,n)},dr.prototype.tableWidthChanged=function(){let e=function(e){let t,r=this.o.tableClassName,l=tr("<div>").addClass(this.$el).append(tr("<div>").addClass(r+"-header").append(tr("<div>").addClass(r+"-header-row").append(t=tr("<div>").addClass(r+"-header-cell").append(tr("<div>").text(e))))).css({position:"absolute",top:"-9999px",visibility:"hidden"});l.appendTo(document.body);let i=o.getElementWidth(t[0]);return l.remove(),i},t=null;return function(o,r){let l=this.o,i=this.p,n=this._calculateWidthAvailableForColumns(),s=n,a=0;if(!i.$table)return this;r=void 0===r||r;let d=0;if(i.tbody||(r=!1),r&&(d=parseFloat(i.tbody.style.minWidth)||0),s!==t||o){t=n;let o=0,h=[],u=0;for(let e=0;e<i.columns.length;e++)i.columns[e].actualWidthConsideringScrollbarWidth=null;for(let t=0;t<i.visibleColumns.length;t++){let r=i.visibleColumns[t];if(r.widthMode===hr.ABSOLUTE){let e=r.width;e+=r.arrowProposedWidth||0,!r.ignoreMin&&e<l.minColumnWidth&&(e=l.minColumnWidth),s-=e,o+=e,e!==r.actualWidth&&(r.actualWidth=e,h.push(t))}else if(r.widthMode===hr.AUTO){let i=e.call(this,r.label)+20;i+=r.arrowProposedWidth||0,!r.ignoreMin&&i<l.minColumnWidth&&(i=l.minColumnWidth),s-=i,o+=i,i!==r.actualWidth&&(r.actualWidth=i,l.convertColumnWidthsToRelative||h.push(t))}else r.widthMode===hr.RELATIVE&&(u+=r.width,a++)}if(l.convertColumnWidthsToRelative)for(let e=0;e<i.visibleColumns.length;e++){let t=i.visibleColumns[e];t.widthMode===hr.AUTO&&(t.widthMode=hr.RELATIVE,s+=t.actualWidth,t.width=t.actualWidth/o,u+=t.width,a++)}if(a&&(u<1&&l.relativeWidthGrowsToFillWidth||u>1&&l.relativeWidthShrinksToFillWidth))for(let e=0;e<i.visibleColumns.length;e++){let t=i.visibleColumns[e];t.widthMode===hr.RELATIVE&&(t.width/=u)}let c=Math.max(0,s);0===c&&(c=i.table.clientWidth);let p=l.minColumnWidth/c;if(isNaN(p)&&(p=0),p>0){let e,t=0;for(let e=0;e<i.visibleColumns.length;e++){let o=i.visibleColumns[e];o.widthMode===hr.RELATIVE&&!o.ignoreMin&&o.width<p&&(t+=p-o.width,o.width=p)}for(let o=0;o<i.visibleColumns.length;o++){let r=i.visibleColumns[o];r.widthMode===hr.RELATIVE&&!r.ignoreMin&&r.width>p&&t>0&&(e=Math.min(t,r.width-p),r.width-=e,t-=e)}}if(l.autoFillTableWidth&&s>0){let e=0,t=s;for(let o=0;o<i.visibleColumns.length;o++){let r=i.visibleColumns[o];r.resizable||r.widthMode!==hr.ABSOLUTE||(e+=r.width),r.widthMode===hr.RELATIVE&&(t-=Math.round(c*r.width))}let o=(n-e)/(n-t-e)||NaN;for(let e=0;e<i.visibleColumns.length&&t>0;e++){let t=i.visibleColumns[e];if(t.resizable||t.widthMode!==hr.ABSOLUTE)if(t.widthMode===hr.RELATIVE)t.width*=o;else{let r=t.actualWidth*o;t.actualWidth!==r&&(t.actualWidth=r,-1===h.indexOf(e)&&h.push(e))}}}for(let e=0;e<i.visibleColumns.length;e++){let t=i.visibleColumns[e];if(t.widthMode===hr.RELATIVE){let o=Math.round(c*t.width);s-=o,a--,0===a&&1===s&&(o++,s--),-1===s&&(o--,s++),o!==t.actualWidth&&(t.actualWidth=o,h.push(e))}}if(i.visibleColumns.length&&(i.visibleColumns[i.visibleColumns.length-1].actualWidthConsideringScrollbarWidth=i.visibleColumns[i.visibleColumns.length-1].actualWidth-(i.scrollbarWidth||0)),r){let e=this._calculateTbodyWidth();d<e&&this._updateTableWidth(!1);for(let e=0;e<h.length;e++)this._resizeColumnElements(h[e]);d>e&&this._updateTableWidth(!1)}}return this}}(),dr.prototype.tableHeightChanged=function(){let e=this,t=e.o,r=e.p;if(!r.$table)return e;let l=o.getElementHeight(e.$el[0],!0)-(parseFloat(r.$table.css("border-top-width"))||0)-(parseFloat(r.$table.css("border-bottom-width"))||0);return l!==t.height&&(t.height=l,r.tbody&&(r.tbody.style.height=Math.max(t.height-o.getElementHeight(r.$headerRow[0],!0,!0,!0),1)+"px"),t.virtualTable&&e.clearAndRender()),e},dr.prototype.addRows=function(e,t,o,r){let l=this,i=l.p;if("boolean"==typeof t&&(r=o,o=t,t=-1),"number"!=typeof t&&(t=-1),(t<0||t>i.rows.length)&&(t=i.rows.length),r=void 0===r||!!r,e){if(i.rows.add(e,t),i.filteredRows||o&&i.rows.sortColumn.length)o&&i.rows.sortColumn.length?this.resort():this._refilter(),i.tableSkeletonNeedsRendering=!0,r&&this.render();else if(r){let o=i.tbody.childNodes;if(l.o.virtualTable){for(;i.tbody.firstChild;)this.trigger("rowdestroy",i.tbody.firstChild),this._unbindCellEventsForRow(i.tbody.firstChild),i.tbody.removeChild(i.tbody.firstChild);this._calculateVirtualHeight()._updateLastCellWidthFromScrollbar().render()._updateTableWidth(!1)}else if(i.$tbody){let r=t,n=t+e.length-1,s=l.renderRows(r,n);i.tbody.insertBefore(s,o[t]||null);for(let t=n+1;t<o.length;t++){let r=o[t];r.rowIndex+=e.length,r.physicalRowIndex+=e.length}this.render()._updateLastCellWidthFromScrollbar()._updateTableWidth(!0)}}this.trigger("addrows",e.length,!1)}return this},dr.prototype.removeRows=function(e,t,o){let r=this.p;if("number"!=typeof t||t<=0)return this;if(e<0||e>r.rows.length-1)return this;if(r.rows.splice(e,t),o=void 0===o||!!o,r.filteredRows)this._refilter(),r.tableSkeletonNeedsRendering=!0,o&&this.render();else if(o){let o=r.tbody.childNodes;if(this.o.virtualTable){for(;r.tbody.firstChild;)this.trigger("rowdestroy",r.tbody.firstChild),this._unbindCellEventsForRow(r.tbody.firstChild),r.tbody.removeChild(r.tbody.firstChild);this._calculateVirtualHeight()._updateLastCellWidthFromScrollbar().render()._updateTableWidth(!1)}else{let l=e+t-1;for(let i=0;i<o.length;i++){let n=o[i],s=n.physicalRowIndex;s>=e?s<=l?(this.trigger("rowdestroy",n),this._unbindCellEventsForRow(n),r.tbody.removeChild(n),i--):n.physicalRowIndex-=t:n.rowIndex=i}this.render()._updateLastCellWidthFromScrollbar()._updateTableWidth(!0)}}return this},dr.prototype.removeRow=function(e,t){return this.removeRows(e,1,t)},dr.prototype.refreshRow=function(e){let t=this.p;if(e<0||e>t.rows.length-1)return this;let o=-1;if(t.filteredRows&&-1===(o=t.filteredRows.indexOf(t.rows[e])))return this;-1===o&&(o=e);let r=t.tbody.childNodes;if(this.o.virtualTable){let l=!1,i=0;for(;i<r.length;i++)if(r[i].physicalRowIndex===e){l=!0,this.trigger("rowdestroy",r[i]),this._unbindCellEventsForRow(r[i]),t.tbody.removeChild(r[i]);break}if(l){let e=this.renderRows(o,o);t.tbody.insertBefore(e,r[i]||null)}}else{this.trigger("rowdestroy",r[o]),this._unbindCellEventsForRow(r[o]),t.tbody.removeChild(r[o]);let e=this.renderRows(o,o);t.tbody.insertBefore(e,r[o]||null)}return this},dr.prototype.getRowElement=function(e){let t=this.p;if(e<0||e>t.rows.length-1)return null;let o=-1;if(t.filteredRows&&-1===(o=t.filteredRows.indexOf(t.rows[e])))return this;-1===o&&(o=e);let r=t.tbody.childNodes;if(!this.o.virtualTable)return r[o];for(let t=0;t<r.length;t++)if(r[t].physicalRowIndex===e)return r[t];return null},dr.prototype.refreshAllVirtualRows=function(){const e=this.p;if(this.o.virtualTable){let t=[],o=e.tbody.childNodes;for(let r=0,l=o.length;r<l;r++)t.push(o[r].physicalRowIndex),this.trigger("rowdestroy",o[r]),this._unbindCellEventsForRow(o[r]),e.tbody.removeChild(o[r]),r--,l--;for(let o=0;o<t.length;o++){let r=this.renderRows(t[o],t[o]);e.tbody.appendChild(r)}}return this},dr.prototype.setRows=function(e,t){let o=this.p;return o.rows.reset(e),t&&o.rows.sortColumn.length?this.resort():this._refilter(),this.clearAndRender().trigger("addrows",e.length,!0),this},dr.prototype.getUrlForElementContent=function(e){let t,o=document.getElementById(e);if(o){let e=o.textContent;if("function"==typeof Blob)t=new Blob([e]);else{let o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(!o)return null;let r=new o;r.append(e),t=r.getBlob()}return(window.URL||window.webkitURL).createObjectURL(t)}return null},dr.prototype.isWorkerSupported=function(){return window.Worker instanceof Function},dr.prototype.createWebWorker=function(e,t,o){if(this.isWorkerSupported()){let r=this,l=r.p,i=new Worker(e),n=function(e){e.data.append?r.addRows(e.data.rows,o):r.setRows(e.data.rows,o)};return i.addEventListener("message",n,!1),l.workerListeners||(l.workerListeners=[]),l.workerListeners.push({worker:i,listener:n}),(t||void 0===t)&&i.postMessage(null),i}return null},dr.prototype.unbindWebWorker=function(e){let t=this.p;if(t.workerListeners)for(let o=0;o<t.workerListeners.length;o++)t.workerListeners[o].worker===e&&(e.removeEventListener("message",t.workerListeners[o].listener,!1),t.workerListeners.splice(o,1),o--);return this},dr.prototype.abortCellPreview=function(){return this.hideCellPreview(),this},dr.prototype.cancelColumnResize=function(){const e=this.p;return e.$resizer&&(e.$resizer.remove(),e.$resizer=null,tr(document).off("mousemove.dgtable",e.onMouseMoveResizeAreaBound).off("mouseup.dgtable",e.onEndDragColumnHeaderBound)),this},dr.prototype._onVirtualTableScrolled=function(){this.render()},dr.prototype._onTableScrolledHorizontally=function(){const e=this.p;e.header.scrollLeft=e.table.scrollLeft},dr.prototype._getColumnByResizePosition=function(e){let t=this.o,r=this._isTableRtl(),l=tr(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName),i=l[0];i.__cell&&(i=i.__cell,l=tr(i));let n=l[0].previousSibling;for(;n&&1!==n.nodeType;)n=n.previousSibling;let s=!n,a=((null!=e.pageX?e.pageX:e.originalEvent.pageX)||e.originalEvent.clientX)-l.offset().left;if(r){if(!s&&o.getElementWidth(l[0],!0,!0,!0)-a<=t.resizeAreaWidth/2)return n.columnName;if(a<=t.resizeAreaWidth/2)return i.columnName}else{if(!s&&a<=t.resizeAreaWidth/2)return n.columnName;if(o.getElementWidth(l[0],!0,!0,!0)-a<=t.resizeAreaWidth/2)return i.columnName}return null},dr.prototype._onTouchStartColumnHeader=function(e){const t=this.p;if(t.currentTouchId)return;let o=e.originalEvent.changedTouches[0];t.currentTouchId=o.identifier;let r,l=tr(e.currentTarget),i={x:o.pageX,y:o.pageY},n=i,s=function(){t.currentTouchId=null,l.off("touchend").off("touchcancel"),clearTimeout(r)},a=function(t){let o=tr.Event(t),r=Array.prototype.slice.call(arguments,1);for(let t of["target","clientX","clientY","offsetX","offsetY","screenX","screenY","pageX","pageY","which"]){o[t]=e[t];for(let e=0;e<r.length;e++)null!=r[e][t]&&(o[t]=r[e][t])}return o};l.trigger(a("mousedown",e.originalEvent.changedTouches[0],{which:1,target:e.target})),r=setTimeout((()=>{s(),l.one("touchend",(e=>{ar(e)||e.preventDefault(),l.off("touchend").off("touchcancel")})).one("touchcancel",(e=>{l.off("touchend").off("touchcancel")})),Math.sqrt(Math.pow(Math.abs(n.x-i.x),2)+Math.pow(Math.abs(n.y-i.y),2))<9&&(this.cancelColumnResize(),l.trigger(a("mouseup",e.originalEvent.changedTouches[0],{which:3,target:e.target})))}),500),l.on("touchend",(e=>{let o=Vo(e.originalEvent.changedTouches,(e=>e.identifier===t.currentTouchId));o&&(s(),ar(e)||e.preventDefault(),n={x:o.pageX,y:o.pageY},(Math.sqrt(Math.pow(Math.abs(n.x-i.x),2)+Math.pow(Math.abs(n.y-i.y),2))<9||t.$resizer)&&(l.trigger(a("mouseup",o,{which:1,target:e.target})),l.trigger(a("click",o,{which:1,target:e.target}))))})).on("touchcancel",(()=>{s()})).on("touchmove",(e=>{let o=Vo(e.originalEvent.changedTouches,(e=>e.identifier===t.currentTouchId));o&&(n={x:o.pageX,y:o.pageY},t.$resizer&&(e.preventDefault(),l.trigger(a("mousemove",o,{target:e.target}))))}))},dr.prototype._onMouseDownColumnHeader=function(e){if(1!==e.which)return this;let t=this.o,r=this.p,l=this._getColumnByResizePosition(e);if(l){let i=r.columns.get(l);if(!t.resizableColumns||!i||!i.resizable)return!1;let n=this._isTableRtl();r.$resizer&&tr(r.$resizer).remove(),r.$resizer=tr("<div></div>").addClass(t.resizerClassName).css({position:"absolute",display:"block","z-index":-1,visibility:"hidden",width:"2px",background:"#000",opacity:.7}).appendTo(this.$el);let s=i.element,a=r.$resizer.parent(),d=s.offset(),h=a.offset();8===rr&&(d=s.offset()),h.left+=parseFloat(a.css("border-left-width"))||0,h.top+=parseFloat(a.css("border-top-width"))||0,d.left-=h.left,d.top-=h.top,d.top-=parseFloat(s.css("border-top-width"))||0;let u=o.getElementWidth(r.$resizer[0],!0,!0,!0);n?(d.left-=Math.ceil((parseFloat(s.css("border-left-width"))||0)/2),d.left-=Math.ceil(u/2)):(d.left+=o.getElementWidth(s[0],!0,!0,!0),d.left+=Math.ceil((parseFloat(s.css("border-right-width"))||0)/2),d.left-=Math.ceil(u/2)),r.$resizer.css({"z-index":"10",visibility:"visible",left:d.left,top:d.top,height:o.getElementHeight(this.$el[0])})[0].columnName=s[0].columnName;try{r.$resizer[0].style.zIndex=""}catch(e){}tr(document).on("mousemove.dgtable",r.onMouseMoveResizeAreaBound),tr(document).on("mouseup.dgtable",r.onEndDragColumnHeaderBound),e.preventDefault()}},dr.prototype._onMouseMoveColumnHeader=function(e){let t=this.o,o=this.p;if(t.resizableColumns){let r=this._getColumnByResizePosition(e),l=tr(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName)[0];r&&o.columns.get(r).resizable?l.style.cursor="e-resize":l.style.cursor=""}},dr.prototype._onMouseUpColumnHeader=function(e){if(3===e.which){let t=this.o,r=tr(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName),l=r.offset();l.width=o.getElementWidth(r[0],!0,!0,!0),l.height=o.getElementHeight(r[0],!0,!0,!0),this.trigger("headercontextmenu",r[0].columnName,e.pageX,e.pageY,l)}return this},dr.prototype._onMouseLeaveColumnHeader=function(e){let t=this.o;tr(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName)[0].style.cursor=""},dr.prototype._onClickColumnHeader=function(e){if(!ar(e)&&!this._getColumnByResizePosition(e)){let t=this,o=t.o,r=t.p,l=tr(e.target).closest("div."+o.tableClassName+"-header-cell,div."+o.cellPreviewClassName)[0];if(o.sortableColumns){let e=r.columns.get(l.columnName);e&&e.sortable&&this.sort(l.columnName,void 0,!0).render()}}},dr.prototype._onStartDragColumnHeader=function(e){let t=this.o,o=this.p;if(t.movableColumns){let r=tr(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName),l=o.columns.get(r[0].columnName);l&&l.movable?(r[0].style.opacity=.35,o.dragId=161061273*Math.random(),e.originalEvent.dataTransfer.setData("text",JSON.stringify({dragId:o.dragId,column:l.name}))):e.preventDefault()}else e.preventDefault()},dr.prototype._onMouseMoveResizeArea=function(e){let t=this.p,r=t.columns.get(t.$resizer[0].columnName),l=this._isTableRtl(),i=r.element,n=t.$resizer.parent(),s=i.offset(),a=n.offset();a.left+=parseFloat(n.css("border-left-width"))||0,s.left-=a.left;let d=o.getElementWidth(t.$resizer[0],!0,!0,!0),h="border-box"===i.css("box-sizing"),u=e.pageX-a.left,c=s.left;c-=Math.ceil(d/2),l?(c+=o.getElementWidth(i[0],!0,!0,!0),c-=r.ignoreMin?0:this.o.minColumnWidth,h||(c-=Math.ceil((parseFloat(i.css("border-left-width"))||0)/2),c-=this._horizontalPadding(i[0])),u>c&&(u=c)):(c+=r.ignoreMin?0:this.o.minColumnWidth,h||(c+=Math.ceil((parseFloat(i.css("border-right-width"))||0)/2),c+=this._horizontalPadding(i[0])),u<c&&(u=c)),t.$resizer.css("left",u+"px")},dr.prototype._onEndDragColumnHeader=function(e){let t=this.o,r=this.p;if(r.$resizer){tr(document).off("mousemove.dgtable",r.onMouseMoveResizeAreaBound).off("mouseup.dgtable",r.onEndDragColumnHeaderBound);let l=r.columns.get(r.$resizer[0].columnName),i=this._isTableRtl(),n=l.element,s=r.$resizer.parent(),a=n.offset(),d=s.offset();d.left+=parseFloat(s.css("border-left-width"))||0,a.left-=d.left;let h=o.getElementWidth(r.$resizer[0],!0,!0,!0),u="border-box"===n.css("box-sizing"),c=e.pageX-d.left,p=a.left,f=a.left,m=0;p-=Math.ceil(h/2),i?(u||(c+=this._horizontalPadding(n[0]),c+=parseFloat(n.css("border-left-width"))||0,c+=parseFloat(n.css("border-right-width"))||0),p+=o.getElementWidth(n[0],!0,!0,!0),f=p-(l.ignoreMin?0:this.o.minColumnWidth),c>f&&(c=f),m=p-c):(u||(c-=this._horizontalPadding(n[0]),c-=parseFloat(n.css("border-left-width"))||0,c-=parseFloat(n.css("border-right-width"))||0),f=p+(l.ignoreMin?0:this.o.minColumnWidth),c<f&&(c=f),m=c-p),r.$resizer.remove(),r.$resizer=null;let g=m;if(l.widthMode===hr.RELATIVE){let e=this._calculateWidthAvailableForColumns(),o=0,i=0;for(let t=0;t<r.visibleColumns.length;t++){let n=r.visibleColumns[t];n.name!==l.name&&(n.widthMode===hr.RELATIVE?(o+=n.width,i++):e-=n.actualWidth)}if(e=Math.max(1,e),g=m/e,i>0){let e=g/((1-g)/o);o+=g,(o<1&&t.relativeWidthGrowsToFillWidth||o>1&&t.relativeWidthShrinksToFillWidth)&&(g=e)}g*=100,g+="%"}this.setColumnWidth(l.name,g)}else e.target.style.opacity=null},dr.prototype._onDragEnterColumnHeader=function(e){let t=this.o,o=this.p;if(t.movableColumns){let r=e.originalEvent.dataTransfer.getData("text");r=r?JSON.parse(r):null;let l=tr(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName);if(!r||o.dragId===r.dragId&&l.columnName!==r.column){let e=o.columns.get(l[0].columnName);e&&(e.movable||e!==o.visibleColumns[0])&&tr(l).addClass("drag-over")}}},dr.prototype._onDragOverColumnHeader=function(e){e.preventDefault()},dr.prototype._onDragLeaveColumnHeader=function(e){let t=this.o,o=tr(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName);tr(o[0].firstChild).has(e.originalEvent.relatedTarget).length||o.removeClass("drag-over")},dr.prototype._onDropColumnHeader=function(e){e.preventDefault();let t=this.o,o=this.p,r=JSON.parse(e.originalEvent.dataTransfer.getData("text")),l=tr(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName);if(t.movableColumns&&r.dragId===o.dragId){let e=r.column,t=l[0].columnName,i=o.columns.get(e),n=o.columns.get(t);i&&n&&i.movable&&(n.movable||n!==o.visibleColumns[0])&&this.moveColumn(e,t)}tr(l).removeClass("drag-over")},dr.prototype._clearSortArrows=function(){let e=this.p;if(e.$table){let t=this.o.tableClassName,o=e.$headerRow.find(">div."+t+"-header-cell.sorted"),r=o.find(">div>.sort-arrow");for(let t of r){let o=e.columns.get(t.parentNode.parentNode.columnName);o&&(o.arrowProposedWidth=0)}r.remove(),o.removeClass("sorted").removeClass("desc")}return this},dr.prototype._showSortArrow=function(e,t){let o=this.p.columns.get(e);if(!o)return!1;let r=ir("span");return r.className="sort-arrow",o.element&&(o.element.addClass(t?"sorted desc":"sorted"),o.element[0].firstChild.insertBefore(r,o.element[0].firstChild.firstChild)),o.widthMode!==hr.RELATIVE&&this.o.adjustColumnWidthForSortArrow&&(o.arrowProposedWidth=r.scrollWidth+(parseFloat(tr(r).css("margin-right"))||0)+(parseFloat(tr(r).css("margin-left"))||0)),this},dr.prototype._resizeColumnElements=function(e){let t=this.p,o=t.$headerRow.find("div."+this.o.tableClassName+"-header-cell"),r=t.columns.get(o[e].columnName);if(r){o[e].style.width=(r.actualWidthConsideringScrollbarWidth||r.actualWidth)+"px";let l=(r.actualWidthConsideringScrollbarWidth||r.actualWidth)+"px",i=t.$tbody[0].childNodes;for(let t=0,o=i.length;t<o;t++){let o=i[t];1===o.nodeType&&(o.childNodes[e].style.width=l)}}return this},dr.prototype._destroyHeaderCells=function(){let e=this.o,t=this.p;return t.$headerRow&&(this.trigger("headerrowdestroy",t.headerRow),t.$headerRow.find("div."+e.tableClassName+"-header-cell").remove(),t.$headerRow=null,t.headerRow=null),this},dr.prototype._renderSkeletonBase=function(){let e=this,t=e.p,r=e.o;if(t.$table&&r.virtualTable){if(t.$table.remove(),t.$tbody){let o=t.$tbody[0].childNodes;for(let t=0,r=o.length;t<r;t++)e.trigger("rowdestroy",o[t]),e._unbindCellEventsForRow(o[t])}t.$table=t.table=t.$tbody=t.tbody=null}e._destroyHeaderCells(),t.currentTouchId=null,t.$header&&t.$header.remove();let l=r.tableClassName,i=ir("div"),n=tr(i),s=ir("div"),a=tr(s);return i.className=l+"-header",s.className=l+"-header-row",t.$header=n,t.header=i,t.$headerRow=a,t.headerRow=s,a.appendTo(t.$header),n.prependTo(this.$el),sr(e.$el),r.width===dr.Width.SCROLL?this.el.style.overflow="hidden":this.el.style.overflow="",!r.height&&r.virtualTable&&(r.height=o.getElementHeight(this.$el[0],!0)),this},dr.prototype._renderSkeletonHeaderCells=function(){let e,t=this,o=t.p,r=t.o,l=r.allowCellPreview,i=r.allowHeaderCellPreview,n=r.tableClassName+"-header-cell",s=o.headerRow;lr&&(e=function(e){return e.preventDefault(),this.dragDrop(),!1});let a=function(e){e.preventDefault()};for(let d=0;d<o.visibleColumns.length;d++){let h=o.visibleColumns[d];if(h.visible){let u=ir("div"),c=tr(u);u.draggable=!0,u.className=n,u.style.width=h.actualWidth+"px",r.sortableColumns&&h.sortable&&(u.className+=" sortable"),u.columnName=h.name,u.setAttribute("data-column",h.name);let p=ir("div");p.innerHTML=r.headerCellFormatter(h.label,h.name),u.appendChild(p),l&&i&&o._bindCellHoverIn(u),s.appendChild(u),o.visibleColumns[d].element=c,c.on("mousedown.dgtable",t._onMouseDownColumnHeader.bind(t)).on("mousemove.dgtable",t._onMouseMoveColumnHeader.bind(t)).on("mouseup.dgtable",t._onMouseUpColumnHeader.bind(t)).on("mouseleave.dgtable",t._onMouseLeaveColumnHeader.bind(t)).on("touchstart.dgtable",t._onTouchStartColumnHeader.bind(t)).on("dragstart.dgtable",t._onStartDragColumnHeader.bind(t)).on("click.dgtable",t._onClickColumnHeader.bind(t)).on("contextmenu.dgtable",a),tr(p).on("dragenter.dgtable",t._onDragEnterColumnHeader.bind(t)).on("dragover.dgtable",t._onDragOverColumnHeader.bind(t)).on("dragleave.dgtable",t._onDragLeaveColumnHeader.bind(t)).on("drop.dgtable",t._onDropColumnHeader.bind(t)),lr&&c.on("selectstart.dgtable",e.bind(u)),c.css({"-webkit-touch-callout":"none","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none"})}}return this.trigger("headerrowcreate",s),this},dr.prototype._renderSkeletonBody=function(){let e=this,t=e.p,r=e.o,l=r.tableClassName;if(r.virtualTable&&!t.virtualRowHeight){let r,i=function(){let e=ir("div"),t=e.appendChild(ir("div")),o=t.appendChild(ir("div"));return e.className=l+"-row",t.className=l+"-cell",o.innerHTML="0",e.style.visibility="hidden",e.style.position="absolute",e},n=tr("<div>").addClass(e.el.className).css({"z-index":-1,position:"absolute",left:"0",top:"-9999px",width:"1px",overflow:"hidden"}).append(tr("<div>").addClass(l).append(r=tr("<div>").addClass(l+"-body").css("width",99999)));n.appendTo(document.body);let s=i(),a=i(),d=i();r.append(s,a,d),t.virtualRowHeightFirst=o.getElementHeight(s,!0,!0,!0),t.virtualRowHeight=o.getElementHeight(a,!0,!0,!0),t.virtualRowHeightLast=o.getElementHeight(d,!0,!0,!0),t.virtualRowHeightMin=Math.min(Math.min(t.virtualRowHeightFirst,t.virtualRowHeight),t.virtualRowHeightLast),t.virtualRowHeightMax=Math.max(Math.max(t.virtualRowHeightFirst,t.virtualRowHeight),t.virtualRowHeightLast),n.remove()}if(!t.$table){let i=document.createDocumentFragment(),n=ir("div"),s=tr(n);n.className=l,r.virtualTable&&(n.className+=" virtual");let a=r.height-o.getElementHeight(t.$headerRow[0],!0,!0,!0);"border-box"!==s.css("box-sizing")&&(a-=parseFloat(s.css("border-top-width"))||0,a-=parseFloat(s.css("border-bottom-width"))||0,a-=parseFloat(s.css("padding-top"))||0,a-=parseFloat(s.css("padding-bottom"))||0),t.visibleHeight=a,n.style.height=r.height?a+"px":"auto",n.style.display="block",n.style.overflowY="auto",n.style.overflowX=r.width===dr.Width.SCROLL?"auto":"hidden",i.appendChild(n);let d=ir("div"),h=tr(d);d.className=r.tableClassName+"-body",t.table=n,t.tbody=d,t.$table=s,t.$tbody=h,r.virtualTable&&(t.virtualVisibleRows=Math.ceil(t.visibleHeight/t.virtualRowHeightMin)),e._calculateVirtualHeight(),sr(h),sr(s),n.appendChild(d),e.el.appendChild(i)}return this},dr.prototype._renderSkeleton=function(){return this},dr.prototype._updateLastCellWidthFromScrollbar=function(e){const t=this.p;let o=t.table.offsetWidth-t.table.clientWidth;if(o!==t.scrollbarWidth||e){t.scrollbarWidth=o;for(let e=0;e<t.columns.length;e++)t.columns[e].actualWidthConsideringScrollbarWidth=null;if(t.scrollbarWidth>0&&t.visibleColumns.length>0){let e=t.visibleColumns.length-1;t.visibleColumns[e].actualWidthConsideringScrollbarWidth=t.visibleColumns[e].actualWidth-t.scrollbarWidth;let o=t.visibleColumns[e].actualWidthConsideringScrollbarWidth+"px",r=t.tbody.childNodes;for(let t=0,l=r.length;t<l;t++){let l=r[t];1===l.nodeType&&(l.childNodes[e].style.width=o)}t.headerRow.childNodes[e].style.width=o}}return this},dr.prototype._updateTableWidth=function(e){const t=this.o,r=this.p;let l=this._calculateTbodyWidth();if(r.tbody.style.minWidth=l+"px",r.headerRow.style.minWidth=l+(r.scrollbarWidth||0)+"px",r.$table.off("scroll",r.onTableScrolledHorizontallyBound),t.width===dr.Width.AUTO)o.setElementWidth(r.$table[0],o.getElementWidth(r.$tbody[0],!0,!0,!0)),o.setElementWidth(this.$el[0],o.getElementWidth(r.$table[0],!0,!0,!0));else if(t.width===dr.Width.SCROLL){if(e){let e=r.table?r.table.scrollTop:0,t=r.table?r.table.scrollLeft:0;!function(e){let t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}(this.el),r.table.scrollTop=e,r.table.scrollLeft=t,r.header.scrollLeft=t}r.$table.on("scroll",r.onTableScrolledHorizontallyBound)}return this},dr.prototype._isTableRtl=function(){return"rtl"===this.p.$table.css("direction")},dr.prototype._serializeColumnWidth=function(e){return e.widthMode===hr.AUTO?"auto":e.widthMode===hr.RELATIVE?100*e.width+"%":e.width},dr.prototype._cellMouseOverEvent=function(e){const t=this.o,r=this.p;let l=e.firstChild;if(l.scrollWidth-l.clientWidth>1||l.scrollHeight-l.clientHeight>1){this.hideCellPreview(),r.abortCellPreview=!1;let i=tr(e),n=tr(l),s=ir("div"),a=tr(s);s.innerHTML=e.innerHTML,s.className=t.cellPreviewClassName;let d=i.hasClass(t.tableClassName+"-header-cell");d&&(s.className+=" header",i.hasClass("sortable")&&(s.className+=" sortable"),s.draggable=!0,tr(s).on("mousedown",this._onMouseDownColumnHeader.bind(this)).on("mousemove",this._onMouseMoveColumnHeader.bind(this)).on("mouseup",this._onMouseUpColumnHeader.bind(this)).on("mouseleave",this._onMouseLeaveColumnHeader.bind(this)).on("touchstart",this._onTouchStartColumnHeader.bind(this)).on("dragstart",this._onStartDragColumnHeader.bind(this)).on("click",this._onClickColumnHeader.bind(this)).on("contextmenu.dgtable",(function(e){e.preventDefault()})),tr(s.firstChild).on("dragenter",this._onDragEnterColumnHeader.bind(this)).on("dragover",this._onDragOverColumnHeader.bind(this)).on("dragleave",this._onDragLeaveColumnHeader.bind(this)).on("drop",this._onDropColumnHeader.bind(this)),lr&&tr(s).on("selectstart",function(e){return e.preventDefault(),this.dragDrop(),!1}.bind(s)));let h=parseFloat(i.css("padding-left"))||0,u=parseFloat(i.css("padding-right"))||0,c=parseFloat(i.css("padding-top"))||0,p=parseFloat(i.css("padding-bottom"))||0,f=l.scrollWidth+(e.clientWidth-l.offsetWidth),m="border-box"===i.css("box-sizing");if(m?a.css("box-sizing","border-box"):(f-=h+u,a.css("margin-top",parseFloat(tr(e).css("border-top-width"))||0)),!r.transparentBgColor1){let e=document.createElement("div");e.style.backgroundColor="transparent",r.transparentBgColor1=tr(e).css("background-color"),e.style.backgroundColor="rgba(0,0,0,0)",r.transparentBgColor2=tr(e).css("background-color")}let g={"box-sizing":m?"border-box":"content-box",width:f,"min-height":o.getElementHeight(i[0]),"padding-left":h,"padding-right":u,"padding-top":c,"padding-bottom":p,overflow:"hidden",position:"absolute","z-index":"-1",left:"0",top:"0",cursor:"default"};if(g){let t=tr(e).css("background-color");t!==r.transparentBgColor1&&t!==r.transparentBgColor2||(t=tr(e.parentNode).css("background-color")),t!==r.transparentBgColor1&&t!==r.transparentBgColor2||(t="#fff"),g["background-color"]=t}a.css(g),this.el.appendChild(s),tr(s.firstChild).css({direction:n.css("direction"),"white-space":n.css("white-space")}),d&&a.css({"-webkit-touch-callout":"none","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none"}),s.rowIndex=e.parentNode.rowIndex;let b=s.physicalRowIndex=e.parentNode.physicalRowIndex;s.columnName=r.visibleColumns[er.call(e.parentNode.childNodes,e)].name;try{let t=Qo.saveSelection(e);t&&Qo.restoreSelection(s,t)}catch(e){}if(this.trigger("cellpreview",s.firstChild,null==b?null:b,s.columnName,null==b?null:r.rows[b],e),r.abortCellPreview)return void a.remove();let v=this.$el,C=v[0]===window?tr(document):v,w=i.offset(),y=v.offset(),_="right"===i.css("float"),R=_?"right":"left";if(_){let e=tr(window).width();w.right=e-(w.left+o.getElementWidth(i[0],!0,!0,!0)),y.right=e-(y.left+o.getElementWidth(v[0],!0,!0,!0))}w.left-=parseFloat(v.css("border-left-width"))||0,w.right-=parseFloat(v.css("border-right-width"))||0,w.top-=parseFloat(v.css("border-top-width"))||0,w[R]+=parseFloat(tr(e).css("border-"+R+"-width"))||0,w.top+=parseFloat(tr(e).css("border-top-width"))||parseFloat(tr(e).css("border-bottom-width"))||0,w.left-=y.left,w.right-=y.right,w.top-=y.top;let W=0,T=v-o.getElementWidth(a[0],!0,!0,!0);w[R]=w[R]<W?W:w[R]>T?T:w[R];let E=o.getElementHeight(i[0],!0,!0,!0),N=C.scrollTop()+o.getElementHeight(v[0],!0)-E;w.top>N&&(w.top=Math.max(0,N));let S={top:w.top,"z-index":9999};S[R]=w[R],a.css(S),s.__cell=e,r.$cellPreviewCell=a,e.__previewCell=s,r._bindCellHoverOut(e),r._bindCellHoverOut(s),a.on("mousewheel",(e=>{let t=e.originalEvent,o=t.wheelDelta||-t.detail,l=t.wheelDeltaX||(1===t.axis?o:0),i=t.wheelDeltaY||(2===t.axis?o:0);if(o&&this.hideCellPreview(),i&&r.table.scrollHeight>r.table.clientHeight){let e=-1*i+r.$table.scrollTop();r.$table.scrollTop(e)}if(l&&r.table.scrollWidth>r.table.clientWidth){let e=-1*l+r.$table.scrollLeft();r.$table.scrollLeft(e)}}))}},dr.prototype._cellMouseOutEvent=function(e){this.hideCellPreview()},dr.prototype.hideCellPreview=function(){const e=this.p;if(e.$cellPreviewCell){let t,o=e.$cellPreviewCell[0],r=o.__cell;try{t=Qo.saveSelection(o)}catch(e){}e.$cellPreviewCell.remove(),e._unbindCellHoverOut(r),e._unbindCellHoverOut(o);try{t&&Qo.restoreSelection(r,t)}catch(e){}this.trigger("cellpreviewdestroy",o.firstChild,o.physicalRowIndex,o.columnName,r),r.__previewCell=null,o.__cell=null,e.$cellPreviewCell=null,e.abortCellPreview=!1}else e.abortCellPreview=!0;return this};const hr={AUTO:0,ABSOLUTE:1,RELATIVE:2};dr.Width={NONE:"none",AUTO:"auto",SCROLL:"scroll"},tr.controls||(tr.controls={}),tr.controls.dgtable=dr,module.exports=dr;
|
|
5
|
+
"use strict";var e=require("jquery"),t=require("@danielgindi/dom-utils/lib/ScrollHelper"),o=require("@danielgindi/dom-utils/lib/Css");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=r(e),i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=function(e){return e&&e.Math==Math&&e},s=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof i&&i)||function(){return this}()||Function("return this")(),a={},d=function(e){try{return!!e()}catch(e){return!0}},u=!d((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),h=Function.prototype.call,c=h.bind?h.bind(h):function(){return h.apply(h,arguments)},p={},f={}.propertyIsEnumerable,m=Object.getOwnPropertyDescriptor,g=m&&!f.call({1:2},1);p.f=g?function(e){var t=m(this,e);return!!t&&t.enumerable}:f;var b,v,C=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},w=Function.prototype,y=w.bind,_=w.call,R=y&&y.bind(_,_),W=y?function(e){return e&&R(e)}:function(e){return e&&function(){return _.apply(e,arguments)}},T=W,N=T({}.toString),E=T("".slice),S=function(e){return E(N(e),8,-1)},M=W,F=d,H=S,z=s.Object,x=M("".split),O=F((function(){return!z("z").propertyIsEnumerable(0)}))?function(e){return"String"==H(e)?x(e,""):z(e)}:z,A=s.TypeError,P=function(e){if(null==e)throw A("Can't call method on "+e);return e},$=O,L=P,k=function(e){return $(L(e))},I=function(e){return"function"==typeof e},B=I,D=function(e){return"object"==typeof e?null!==e:B(e)},j=s,V=I,U=function(e){return V(e)?e:void 0},q=function(e,t){return arguments.length<2?U(j[e]):j[e]&&j[e][t]},X=W({}.isPrototypeOf),Y=q("navigator","userAgent")||"",G=s,J=Y,K=G.process,Q=G.Deno,Z=K&&K.versions||Q&&Q.version,ee=Z&&Z.v8;ee&&(v=(b=ee.split("."))[0]>0&&b[0]<4?1:+(b[0]+b[1])),!v&&J&&(!(b=J.match(/Edge\/(\d+)/))||b[1]>=74)&&(b=J.match(/Chrome\/(\d+)/))&&(v=+b[1]);var te=v,oe=te,re=d,le=!!Object.getOwnPropertySymbols&&!re((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&oe&&oe<41})),ie=le&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ne=q,se=I,ae=X,de=ie,ue=s.Object,he=de?function(e){return"symbol"==typeof e}:function(e){var t=ne("Symbol");return se(t)&&ae(t.prototype,ue(e))},ce=s.String,pe=I,fe=s.TypeError,me=function(e){if(pe(e))return e;throw fe(function(e){try{return ce(e)}catch(e){return"Object"}}(e)+" is not a function")},ge=me,be=c,ve=I,Ce=D,we=s.TypeError,ye={exports:{}},_e=s,Re=Object.defineProperty,We=function(e,t){try{Re(_e,e,{value:t,configurable:!0,writable:!0})}catch(o){_e[e]=t}return t},Te=We,Ne=s["__core-js_shared__"]||Te("__core-js_shared__",{}),Ee=Ne;(ye.exports=function(e,t){return Ee[e]||(Ee[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.20.2",mode:"global",copyright:"© 2022 Denis Pushkarev (zloirock.ru)"});var Se=P,Me=s.Object,Fe=function(e){return Me(Se(e))},He=Fe,ze=W({}.hasOwnProperty),xe=Object.hasOwn||function(e,t){return ze(He(e),t)},Oe=W,Ae=0,Pe=Math.random(),$e=Oe(1..toString),Le=function(e){return"Symbol("+(void 0===e?"":e)+")_"+$e(++Ae+Pe,36)},ke=s,Ie=ye.exports,Be=xe,De=Le,je=le,Ve=ie,Ue=Ie("wks"),qe=ke.Symbol,Xe=qe&&qe.for,Ye=Ve?qe:qe&&qe.withoutSetter||De,Ge=function(e){if(!Be(Ue,e)||!je&&"string"!=typeof Ue[e]){var t="Symbol."+e;je&&Be(qe,e)?Ue[e]=qe[e]:Ue[e]=Ve&&Xe?Xe(t):Ye(t)}return Ue[e]},Je=c,Ke=D,Qe=he,Ze=Ge,et=s.TypeError,tt=Ze("toPrimitive"),ot=function(e,t){if(!Ke(e)||Qe(e))return e;var o,r,l=null==(r=e[tt])?void 0:ge(r);if(l){if(void 0===t&&(t="default"),o=Je(l,e,t),!Ke(o)||Qe(o))return o;throw et("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var o,r;if("string"===t&&ve(o=e.toString)&&!Ce(r=be(o,e)))return r;if(ve(o=e.valueOf)&&!Ce(r=be(o,e)))return r;if("string"!==t&&ve(o=e.toString)&&!Ce(r=be(o,e)))return r;throw we("Can't convert object to primitive value")}(e,t)},rt=he,lt=function(e){var t=ot(e,"string");return rt(t)?t:t+""},it=D,nt=s.document,st=it(nt)&&it(nt.createElement),at=!u&&!d((function(){return 7!=Object.defineProperty((e="div",st?nt.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),dt=u,ut=c,ht=p,ct=C,pt=k,ft=lt,mt=xe,gt=at,bt=Object.getOwnPropertyDescriptor;a.f=dt?bt:function(e,t){if(e=pt(e),t=ft(t),gt)try{return bt(e,t)}catch(e){}if(mt(e,t))return ct(!ut(ht.f,e,t),e[t])};var vt={},Ct=u&&d((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),wt=s,yt=D,_t=wt.String,Rt=wt.TypeError,Wt=function(e){if(yt(e))return e;throw Rt(_t(e)+" is not an object")},Tt=u,Nt=at,Et=Ct,St=Wt,Mt=lt,Ft=s.TypeError,Ht=Object.defineProperty,zt=Object.getOwnPropertyDescriptor;vt.f=Tt?Et?function(e,t,o){if(St(e),t=Mt(t),St(o),"function"==typeof e&&"prototype"===t&&"value"in o&&"writable"in o&&!o.writable){var r=zt(e,t);r&&r.writable&&(e[t]=o.value,o={configurable:"configurable"in o?o.configurable:r.configurable,enumerable:"enumerable"in o?o.enumerable:r.enumerable,writable:!1})}return Ht(e,t,o)}:Ht:function(e,t,o){if(St(e),t=Mt(t),St(o),Nt)try{return Ht(e,t,o)}catch(e){}if("get"in o||"set"in o)throw Ft("Accessors not supported");return"value"in o&&(e[t]=o.value),e};var xt=vt,Ot=C,At=u?function(e,t,o){return xt.f(e,t,Ot(1,o))}:function(e,t,o){return e[t]=o,e},Pt={exports:{}},$t=I,Lt=Ne,kt=W(Function.toString);$t(Lt.inspectSource)||(Lt.inspectSource=function(e){return kt(e)});var It,Bt,Dt,jt,Vt=Lt.inspectSource,Ut=I,qt=Vt,Xt=s.WeakMap,Yt=Ut(Xt)&&/native code/.test(qt(Xt)),Gt=ye.exports,Jt=Le,Kt=Gt("keys"),Qt={},Zt=Yt,eo=s,to=W,oo=D,ro=At,lo=xe,io=Ne,no=Qt,so=eo.TypeError,ao=eo.WeakMap;if(Zt||io.state){var uo=io.state||(io.state=new ao),ho=to(uo.get),co=to(uo.has),po=to(uo.set);It=function(e,t){if(co(uo,e))throw new so("Object already initialized");return t.facade=e,po(uo,e,t),t},Bt=function(e){return ho(uo,e)||{}},Dt=function(e){return co(uo,e)}}else{var fo=Kt[jt="state"]||(Kt[jt]=Jt(jt));no[fo]=!0,It=function(e,t){if(lo(e,fo))throw new so("Object already initialized");return t.facade=e,ro(e,fo,t),t},Bt=function(e){return lo(e,fo)?e[fo]:{}},Dt=function(e){return lo(e,fo)}}var mo={set:It,get:Bt,has:Dt,enforce:function(e){return Dt(e)?Bt(e):It(e,{})},getterFor:function(e){return function(t){var o;if(!oo(t)||(o=Bt(t)).type!==e)throw so("Incompatible receiver, "+e+" required");return o}}},go=u,bo=xe,vo=Function.prototype,Co=go&&Object.getOwnPropertyDescriptor,wo=bo(vo,"name"),yo=wo&&(!go||go&&Co(vo,"name").configurable),_o=s,Ro=I,Wo=xe,To=At,No=We,Eo=Vt,So=yo,Mo=mo.get,Fo=mo.enforce,Ho=String(String).split("String");(Pt.exports=function(e,t,o,r){var l,i=!!r&&!!r.unsafe,n=!!r&&!!r.enumerable,s=!!r&&!!r.noTargetGet,a=r&&void 0!==r.name?r.name:t;Ro(o)&&("Symbol("===String(a).slice(0,7)&&(a="["+String(a).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Wo(o,"name")||So&&o.name!==a)&&To(o,"name",a),(l=Fo(o)).source||(l.source=Ho.join("string"==typeof a?a:""))),e!==_o?(i?!s&&e[t]&&(n=!0):delete e[t],n?e[t]=o:To(e,t,o)):n?e[t]=o:No(t,o)})(Function.prototype,"toString",(function(){return Ro(this)&&Mo(this).source||Eo(this)}));var zo={},xo=Math.ceil,Oo=Math.floor,Ao=function(e){var t=+e;return t!=t||0===t?0:(t>0?Oo:xo)(t)},Po=Ao,$o=Math.max,Lo=Math.min,ko=function(e,t){var o=Po(e);return o<0?$o(o+t,0):Lo(o,t)},Io=Ao,Bo=Math.min,Do=function(e){return(t=e.length)>0?Bo(Io(t),9007199254740991):0;var t},jo=k,Vo=ko,Uo=Do,qo=function(e){return function(t,o,r){var l,i=jo(t),n=Uo(i),s=Vo(r,n);if(e&&o!=o){for(;n>s;)if((l=i[s++])!=l)return!0}else for(;n>s;s++)if((e||s in i)&&i[s]===o)return e||s||0;return!e&&-1}},Xo={includes:qo(!0),indexOf:qo(!1)},Yo=xe,Go=k,Jo=Xo.indexOf,Ko=Qt,Qo=W([].push),Zo=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");zo.f=Object.getOwnPropertyNames||function(e){return function(e,t){var o,r=Go(e),l=0,i=[];for(o in r)!Yo(Ko,o)&&Yo(r,o)&&Qo(i,o);for(;t.length>l;)Yo(r,o=t[l++])&&(~Jo(i,o)||Qo(i,o));return i}(e,Zo)};var er={};er.f=Object.getOwnPropertySymbols;var tr=q,or=zo,rr=er,lr=Wt,ir=W([].concat),nr=tr("Reflect","ownKeys")||function(e){var t=or.f(lr(e)),o=rr.f;return o?ir(t,o(e)):t},sr=xe,ar=nr,dr=a,ur=vt,hr=d,cr=I,pr=/#|\.prototype\./,fr=function(e,t){var o=gr[mr(e)];return o==vr||o!=br&&(cr(t)?hr(t):!!t)},mr=fr.normalize=function(e){return String(e).replace(pr,".").toLowerCase()},gr=fr.data={},br=fr.NATIVE="N",vr=fr.POLYFILL="P",Cr=fr,wr=s,yr=a.f,_r=At,Rr=Pt.exports,Wr=We,Tr=function(e,t,o){for(var r=ar(t),l=ur.f,i=dr.f,n=0;n<r.length;n++){var s=r[n];sr(e,s)||o&&sr(o,s)||l(e,s,i(t,s))}},Nr=Cr,Er={};Er[Ge("toStringTag")]="z";var Sr,Mr,Fr=s,Hr="[object z]"===String(Er),zr=I,xr=S,Or=Ge("toStringTag"),Ar=Fr.Object,Pr="Arguments"==xr(function(){return arguments}()),$r=Hr?xr:function(e){var t,o,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(o=function(e,t){try{return e[t]}catch(e){}}(t=Ar(e),Or))?o:Pr?xr(t):"Object"==(r=xr(t))&&zr(t.callee)?"Arguments":r},Lr=s.String,kr=lt,Ir=vt,Br=C,Dr=ko,jr=Do,Vr=function(e,t,o){var r=kr(t);r in e?Ir.f(e,r,Br(0,o)):e[r]=o},Ur=s.Array,qr=Math.max,Xr=function(e,t,o){for(var r=jr(e),l=Dr(t,r),i=Dr(void 0===o?r:o,r),n=Ur(qr(i-l,0)),s=0;l<i;l++,s++)Vr(n,s,e[l]);return n.length=s,n},Yr=Math.floor,Gr=function(e,t){var o=e.length,r=Yr(o/2);return o<8?Jr(e,t):Kr(e,Gr(Xr(e,0,r),t),Gr(Xr(e,r),t),t)},Jr=function(e,t){for(var o,r,l=e.length,i=1;i<l;){for(r=i,o=e[i];r&&t(e[r-1],o)>0;)e[r]=e[--r];r!==i++&&(e[r]=o)}return e},Kr=function(e,t,o,r){for(var l=t.length,i=o.length,n=0,s=0;n<l||s<i;)e[n+s]=n<l&&s<i?r(t[n],o[s])<=0?t[n++]:o[s++]:n<l?t[n++]:o[s++];return e},Qr=Gr,Zr=d,el=Y.match(/firefox\/(\d+)/i),tl=!!el&&+el[1],ol=/MSIE|Trident/.test(Y),rl=Y.match(/AppleWebKit\/(\d+)\./),ll=!!rl&&+rl[1],il=W,nl=me,sl=Fe,al=Do,dl=function(e){if("Symbol"===$r(e))throw TypeError("Cannot convert a Symbol value to a string");return Lr(e)},ul=d,hl=Qr,cl=tl,pl=ol,fl=te,ml=ll,gl=[],bl=il(gl.sort),vl=il(gl.push),Cl=ul((function(){gl.sort(void 0)})),wl=ul((function(){gl.sort(null)})),yl=!!(Mr=[]["sort"])&&Zr((function(){Mr.call(null,Sr||function(){throw 1},1)})),_l=!ul((function(){if(fl)return fl<70;if(!(cl&&cl>3)){if(pl)return!0;if(ml)return ml<603;var e,t,o,r,l="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:o=3;break;case 68:case 71:o=4;break;default:o=2}for(r=0;r<47;r++)gl.push({k:t+r,v:o})}for(gl.sort((function(e,t){return t.v-e.v})),r=0;r<gl.length;r++)t=gl[r].k.charAt(0),l.charAt(l.length-1)!==t&&(l+=t);return"DGBEFHACIJK"!==l}}));!function(e,t){var o,r,l,i,n,s=e.target,a=e.global,d=e.stat;if(o=a?wr:d?wr[s]||Wr(s,{}):(wr[s]||{}).prototype)for(r in t){if(i=t[r],l=e.noTargetGet?(n=yr(o,r))&&n.value:o[r],!Nr(a?r:s+(d?".":"#")+r,e.forced)&&void 0!==l){if(typeof i==typeof l)continue;Tr(i,l)}(e.sham||l&&l.sham)&&_r(i,"sham",!0),Rr(o,r,i,e)}}({target:"Array",proto:!0,forced:Cl||!wl||!yl||!_l},{sort:function(e){void 0!==e&&nl(e);var t=sl(this);if(_l)return void 0===e?bl(t):bl(t,e);var o,r,l=[],i=al(t);for(r=0;r<i;r++)r in t&&vl(l,t[r]);for(hl(l,function(e){return function(t,o){return void 0===o?-1:void 0===t?1:void 0!==e?+e(t,o)||0:dl(t)>dl(o)?1:-1}}(e)),o=l.length,r=0;r<o;)t[r]=l[r++];for(;r<i;)delete t[r++];return t}});const Rl=Array.prototype.indexOf,Wl=function(e,t){for(let o=0,r=e.length;o>=0&&o<r;o+=1)if(t(e[o],o,e))return e[o]},Tl=function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"<br />")};function Nl(){let e=[];return Object.assign(e,Nl.prototype),e.initialize.apply(e,arguments),e}Nl.prototype=[],Nl.prototype.initialize=function(e){e=e||{},this.sortColumn=null==e.sortColumn?[]:e.sortColumn},Nl.prototype.add=function(e,t){let o,r;if("splice"in e&&"length"in e)if("number"==typeof t)for(o=0,r=e.length;o<r;o++)this.splice(t++,0,e[o]);else for(o=0,r=e.length;o<r;o++)this.push(e[o]);else"number"==typeof t?this.splice(t,0,e):this.push(e)},Nl.prototype.reset=function(e){this.length=0,e&&this.add(e)},Nl.prototype.filteredCollection=function(e,t){if(e&&t){let o=new Nl({sortColumn:this.sortColumn});for(let r,l=0,i=this.length;l<i;l++)r=this[l],e(r,t)&&(r.__i=l,o.push(r));return o}return null},Nl.prototype.onComparatorRequired=null,Nl.prototype.onSort=null;let El=Nl.prototype.sort;function Sl(e,t){let o=e.column,r=e.comparePath||o;"string"==typeof r&&(r=r.split("."));let l,i=r.length,n=i>1,s=t?1:-1,a=t?-1:1;return function(e,t){let o=e[r[0]],d=t[r[0]];if(n)for(l=1;l<i;l++)o=o&&o[r[l]],d=d&&d[r[l]];return o===d?0:null==o?s:null==d?a:o<d?s:a}}function Ml(){let e=[];return Object.assign(e,Ml.prototype),e.initialize.apply(e,arguments),e}Nl.prototype.sort=function(e){if(this.sortColumn.length){let t,o,r=[];for(t=0;t<this.sortColumn.length;t++){o=null;const e=Sl(this.sortColumn[t],this.sortColumn[t].descending);this.onComparatorRequired&&(o=this.onComparatorRequired(this.sortColumn[t].column,this.sortColumn[t].descending,e)),o||(o=e),r.push(o.bind(this))}if(1===r.length)El.call(this,r[0]);else{let e,l=r.length;o=function(o,i){for(t=0;t<l;t++)if(e=r[t](o,i),0!==e)return e;return e},El.call(this,o)}e||this.onSort&&this.onSort()}return this},Ml.prototype=[],Ml.prototype.initialize=function(){},Ml.prototype.get=function(e){for(let t=0,o=this.length;t<o;t++)if(this[t].name==e)return this[t];return null},Ml.prototype.indexOf=function(e){for(let t=0,o=this.length;t<o;t++)if(this[t].name==e)return t;return-1},Ml.prototype.getByOrder=function(e){for(let t=0,o=this.length;t<o;t++)if(this[t].order==e)return this[t];return null},Ml.prototype.normalizeOrder=function(){let e,t=[];for(e=0;e<this.length;e++)t.push(this[e]);for(t.sort((function(e,t){return e.order<t.order?-1:e.order>t.order?1:0})),e=0;e<t.length;e++)t[e].order=e;return this},Ml.prototype.getColumns=function(){let e=[];for(let t,o=0;o<this.length;o++)t=this[o],e.push(t);return e.sort(((e,t)=>e.order<t.order?-1:e.order>t.order?1:0)),e},Ml.prototype.getVisibleColumns=function(){let e=[];for(let t,o=0;o<this.length;o++)t=this[o],t.visible&&e.push(t);return e.sort(((e,t)=>e.order<t.order?-1:e.order>t.order?1:0)),e},Ml.prototype.getMaxOrder=function(){let e=0;for(let t,o=0;o<this.length;o++)t=this[o],t.order>e&&(e=t.order);return e},Ml.prototype.moveColumn=function(e,t){if(e&&t){let o,r,l=e.order,i=t.order;if(l<i)for(o=l+1;o<=i;o++)r=this.getByOrder(o),r.order--;else for(o=l-1;o>=i;o--)r=this.getByOrder(o),r.order++;e.order=i}return this};const Fl={};let Hl=null;Fl.getSupportedTransform=()=>{if(null===Hl){let e=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],t=document.createElement("div");Hl=!1;for(let o of e)if(t&&void 0!==t.style[o]){Hl=o;break}}return Hl};class zl{static saveSelection(e){let t=window.getSelection().getRangeAt(0);if(e!==t.commonAncestorContainer&&!function(e,t){for(;(e=e.parentNode)&&e!==t;);return!!e}(t.commonAncestorContainer,e))return null;let o=t.cloneRange();o.selectNodeContents(e),o.setEnd(t.startContainer,t.startOffset);let r=o.toString().length;return{start:r,end:r+t.toString().length}}static restoreSelection(e,t){let o,r=0,l=[e],i=!1,n=!1,s=document.createRange();for(s.setStart(e,0),s.collapse(!0);!n&&(o=l.pop());)if(3===o.nodeType){let e=r+o.length;!i&&t.start>=r&&t.start<=e&&(s.setStart(o,t.start-r),i=!0),i&&t.end>=r&&t.end<=e&&(s.setEnd(o,t.end-r),n=!0),r=e}else{let e=o.childNodes.length;for(;e--;)l.push(o.childNodes[e])}let a=window.getSelection();a.removeAllRanges(),a.addRange(s)}}function xl(e,t){let o=t.column,r=null==t.keyword?"":t.keyword.toString();if(!r||!o)return!0;let l=e[o];return null!=l&&(l=l.toString(),t.caseSensitive||(l=l.toLowerCase(),r=r.toLowerCase()),-1!==l.indexOf(r))}const Ol=Array.prototype.indexOf,Al=l.default;let Pl=navigator.userAgent,$l=-1!==Pl.indexOf("MSIE ")?parseFloat(Pl.substr(Pl.indexOf("MSIE ")+5)):null,Ll=$l&&$l<10,kl=document.createElement.bind(document);const Il=Object.prototype.hasOwnProperty;function Bl(e){var t,o;t=["relative","absolute","fixed"],o=e.css("position"),Rl.call(t,o)>=0||e.css("position","relative")}const Dl=e=>/^(?:INPUT|TEXTAREA|BUTTON|SELECT)$/.test(e.target.tagName);let jl=function e(){if(!(this instanceof e))return new(Function.prototype.bind.apply(e,[e].concat(Array.prototype.slice.call(arguments,0))));this.initialize.apply(this,arguments)};jl.VERSION="@@VERSION",jl.prototype.VERSION=jl.VERSION,jl.prototype.initialize=function(e){let t=this;e=e||{};let o=t.o={},r=t.p={};r.events={},t.el=e.el&&e.el instanceof Element?e.el:document.createElement("div");let l=t.$el=Al(t.el);t.el!==e.el&&l.addClass(e.className||"dgtable-wrapper"),l.data("control",t).data("dgtable",t),l.on("remove",(function(){t.destroy()})),r.onMouseMoveResizeAreaBound=this._onMouseMoveResizeArea.bind(this),r.onEndDragColumnHeaderBound=this._onEndDragColumnHeader.bind(this),r.onTableScrolledHorizontallyBound=this._onTableScrolledHorizontally.bind(this),this.$el.on("dragend",r.onEndDragColumnHeaderBound),r.tableSkeletonNeedsRendering=!0,o.virtualTable=void 0===e.virtualTable||!!e.virtualTable,o.rowsBufferSize=e.rowsBufferSize||3,o.minColumnWidth=Math.max(e.minColumnWidth||35,0),o.resizeAreaWidth=e.resizeAreaWidth||8,o.resizableColumns=void 0===e.resizableColumns||!!e.resizableColumns,o.movableColumns=void 0===e.movableColumns||!!e.movableColumns,o.sortableColumns=void 0===e.sortableColumns?1:parseInt(e.sortableColumns,10)||1,o.adjustColumnWidthForSortArrow=void 0===e.adjustColumnWidthForSortArrow||!!e.adjustColumnWidthForSortArrow,o.convertColumnWidthsToRelative=void 0!==e.convertColumnWidthsToRelative&&!!e.convertColumnWidthsToRelative,o.autoFillTableWidth=void 0!==e.autoFillTableWidth&&!!e.autoFillTableWidth,o.cellClasses=void 0===e.cellClasses?"":e.cellClasses,o.resizerClassName=void 0===e.resizerClassName?"dgtable-resize":e.resizerClassName,o.tableClassName=void 0===e.tableClassName?"dgtable":e.tableClassName,o.allowCellPreview=void 0===e.allowCellPreview||e.allowCellPreview,o.allowHeaderCellPreview=void 0===e.allowHeaderCellPreview||e.allowHeaderCellPreview,o.cellPreviewClassName=void 0===e.cellPreviewClassName?"dgtable-cell-preview":e.cellPreviewClassName,o.cellPreviewAutoBackground=void 0===e.cellPreviewAutoBackground||e.cellPreviewAutoBackground,o.onComparatorRequired=void 0===e.onComparatorRequired?null:e.onComparatorRequired,o.onComparatorRequired||"function"!=typeof e.comparatorCallback||(o.onComparatorRequired=e.comparatorCallback),o.width=void 0===e.width?jl.Width.NONE:e.width,o.relativeWidthGrowsToFillWidth=void 0===e.relativeWidthGrowsToFillWidth||!!e.relativeWidthGrowsToFillWidth,o.relativeWidthShrinksToFillWidth=void 0!==e.relativeWidthShrinksToFillWidth&&!!e.relativeWidthShrinksToFillWidth,this.setCellFormatter(e.cellFormatter),this.setHeaderCellFormatter(e.headerCellFormatter),this.setFilter(e.filter),o.height=e.height,t.setColumns(e.columns||[],!1);let i=[];if(e.sortColumn){let t=e.sortColumn;if(t&&"object"!=typeof t&&(t=[t]),t instanceof Array||"object"==typeof t)for(let e=0,o=t.length;e<o;e++){let o=t[e];"string"==typeof o&&(o={column:o,descending:!1});let l=r.columns.get(o.column);l&&i.push({column:o.column,comparePath:l.comparePath||l.dataPath,descending:o.descending})}}r.rows=new Nl({sortColumn:i}),r.rows.onComparatorRequired=(e,t,r)=>{if(o.onComparatorRequired)return o.onComparatorRequired(e,t,r)},r.filteredRows=null;let n=function(e){let o=(e=e||event).fromElement||e.relatedTarget;o===this||Al.contains(this,o)||this.__previewCell&&(o===this.__previewCell||Al.contains(this.__previewCell,o))||t._cellMouseOverEvent.call(t,this)},s=function(e){let o=(e=e||event).toElement||e.relatedTarget;o===this||Al.contains(this,o)||this.__previewCell&&(o===this.__previewCell||Al.contains(this.__previewCell,o))||t._cellMouseOutEvent.call(t,this)};"addEventListener"in window?(r._bindCellHoverIn=function(e){e.__hoverIn||e.addEventListener("mouseover",e.__hoverIn=n.bind(e))},r._unbindCellHoverIn=function(e){e.__hoverIn&&(e.removeEventListener("mouseover",e.__hoverIn),e.__hoverIn=null)},r._bindCellHoverOut=function(e){return e.__hoverOut||e.addEventListener("mouseout",e.__hoverOut=s.bind(e.__cell||e)),this},r._unbindCellHoverOut=function(e){return e.__hoverOut&&(e.removeEventListener("mouseout",e.__hoverOut),e.__hoverOut=null),this}):(r._bindCellHoverIn=function(e){e.__hoverIn||e.attachEvent("mouseover",e.__hoverIn=n.bind(e))},r._unbindCellHoverIn=function(e){e.__hoverIn&&(e.detachEvent("mouseover",e.__hoverIn),e.__hoverIn=null)},r._bindCellHoverOut=function(e){e.__hoverOut||e.attachEvent("mouseout",e.__hoverOut=s.bind(e.__cell||e))},r._unbindCellHoverOut=function(e){return e.__hoverOut&&(e.detachEvent("mouseout",e.__hoverOut),e.__hoverOut=null),this})},jl.prototype.on=function(e,t){let o=this.p.events;return"function"!=typeof t||(Il.call(o,e)||(o[e]=[]),o[e].push({cb:t,once:!1})),this},jl.prototype.once=function(e,t){let o=this.p.events;return"function"!=typeof t||(Il.call(o,e)||(o[e]=[]),o[e].push({cb:t,once:!0})),this},jl.prototype.off=function(e,t){let o=this.p.events;if(!Il.call(o,e))return this;let r=o[e];for(let e=0;e<r.length;e++){let o=r[e];t&&o.cb!==t||r.splice(e--,1)}return this},jl.prototype.trigger=function(e){let t=this.p.events;if(Il.call(t,e)){let o=t[e];for(let e=0;e<o.length;e++){let t=o[e];t.once&&o.splice(e--,1),t.cb.apply(this,Array.prototype.slice.call(arguments,1))}}return this},jl.prototype._parseColumnWidth=function(e,t){let o=Math.max(0,parseFloat(e)),r=Vl.AUTO;return o>0&&(e===o+"%"?(r=Vl.RELATIVE,o/=100):o>0&&o<1?r=Vl.RELATIVE:(o<t&&(o=t),r=Vl.ABSOLUTE)),{width:o,mode:r}},jl.prototype._initColumnFromData=function(e){let t=this._parseColumnWidth(e.width,e.ignoreMin?0:this.o.minColumnWidth),o={name:e.name,label:void 0===e.label?e.name:e.label,width:t.width,widthMode:t.mode,resizable:void 0===e.resizable||e.resizable,sortable:void 0===e.sortable||e.sortable,movable:void 0===e.movable||e.movable,visible:void 0===e.visible||e.visible,cellClasses:void 0===e.cellClasses?this.o.cellClasses:e.cellClasses,ignoreMin:void 0!==e.ignoreMin&&!!e.ignoreMin};return o.dataPath=void 0===e.dataPath?o.name:e.dataPath,o.comparePath=void 0===e.comparePath?o.dataPath:e.comparePath,"string"==typeof o.dataPath&&(o.dataPath=o.dataPath.split(".")),"string"==typeof o.comparePath&&(o.comparePath=o.comparePath.split(".")),o},jl.prototype.close=jl.prototype.remove=jl.prototype.destroy=function(){let e=this,t=e.p||{},o=e.$el;if(e.__removed)return e;if(t.$resizer&&(t.$resizer.remove(),t.$resizer=null),t.$tbody){let o=t.$tbody[0].childNodes;for(let t=0,r=o.length;t<r;t++)e.trigger("rowdestroy",o[t])}if(this._destroyHeaderCells()._unbindCellEventsForTable(),t.$table&&t.$table.empty(),t.$tbody&&t.$tbody.empty(),t.workerListeners){for(let e=0;e<t.workerListeners.length;e++){let o=t.workerListeners[e];o.worker.removeEventListener("message",o.listener,!1)}t.workerListeners.length=0}t.rows.length=t.columns.length=0,t._deferredRender&&clearTimeout(t._deferredRender);for(let t in e)Il.call(e,t)&&(e[t]=null);return e.__removed=!0,o&&o.remove(),this},jl.prototype._unbindCellEventsForTable=function(){const e=this.p;if(e.headerRow)for(let t=0,o=e.headerRow.childNodes,r=o.length;t<r;t++)for(let r=0,l=o[t].childNodes,i=l.length;r<i;r++)e._unbindCellHoverIn(l[r]);if(e.tbody)for(let t=0,o=e.tbody.childNodes,r=o.length;t<r;t++)this._unbindCellEventsForRow(o[t]);return this},jl.prototype._unbindCellEventsForRow=function(e){const t=this.p;for(let o=0,r=e.childNodes,l=r.length;o<l;o++)t._unbindCellHoverIn(r[o]);return this},jl.prototype.render=function(){const e=this.o,o=this.p;if(!this.el.offsetParent)return o._deferredRender||(o._deferredRender=setTimeout((()=>{o._deferredRender=null,!this.__removed&&this.el.offsetParent&&this.render()}))),this;let r,l;if(!0===o.tableSkeletonNeedsRendering){o.tableSkeletonNeedsRendering=!1,e.width===jl.Width.AUTO&&this._clearSortArrows();let i=o.table&&o.table.parentNode?o.table.scrollTop:NaN,n=o.table&&o.table.parentNode?t.getScrollHorz(o.table):NaN;this._renderSkeletonBase()._renderSkeletonBody().tableWidthChanged(!0,!1)._renderSkeletonHeaderCells(),e.virtualTable||(l=(o.filteredRows||o.rows).length,r=this.renderRows(0,l-1),o.$tbody.html("").append(r)),this._updateLastCellWidthFromScrollbar(!0),this._updateTableWidth(!0);for(let e=0;e<o.rows.sortColumn.length;e++)this._showSortArrow(o.rows.sortColumn[e].column,o.rows.sortColumn[e].descending);e.adjustColumnWidthForSortArrow&&o.rows.sortColumn.length?this.tableWidthChanged(!0):e.virtualTable||this.tableWidthChanged(),isNaN(i)||(o.table.scrollTop=i),isNaN(n)||(t.setScrollHorz(o.table,n),t.setScrollHorz(o.header,n)),this.trigger("renderskeleton"),e.virtualTable&&(o.$table.on("scroll",this._onVirtualTableScrolled.bind(this)),this.render())}else if(e.virtualTable){l=(o.filteredRows||o.rows).length;let t=o.table.scrollTop,i=Math.floor((t-o.virtualRowHeightFirst)/o.virtualRowHeight)+1-e.rowsBufferSize,n=Math.ceil((t-o.virtualRowHeightFirst+o.visibleHeight)/o.virtualRowHeight)+e.rowsBufferSize;i<0&&(i=0),n>=l&&(n=l-1);let s,a=-1,d=-1,u=o.tbody.childNodes;if(u.length&&(a=u[0].rowIndex,d=u[u.length-1].rowIndex),-1!==a&&a<i){s=Math.min(d+1,i)-a;for(let e=0;e<s;e++)this.trigger("rowdestroy",u[0]),this._unbindCellEventsForRow(u[0]),o.tbody.removeChild(u[0]);a+=s,a>d&&(a=d=-1)}else if(-1!==d&&d>n){s=d-Math.max(a-1,n);for(let e=0;e<s;e++)this.trigger("rowdestroy",u[u.length-1]),this._unbindCellEventsForRow(u[u.length-1]),o.tbody.removeChild(u[u.length-1]);d<a&&(a=d=-1)}i<a&&(r=this.renderRows(i,Math.min(n,a-1)),o.$tbody.prepend(r)),(n>d||-1===d)&&(r=this.renderRows(-1===d?i:d+1,n),o.$tbody.append(r))}return this.trigger("render"),this},jl.prototype.clearAndRender=function(e){return this.p.tableSkeletonNeedsRendering=!0,(void 0===e||e)&&this.render(),this},jl.prototype.renderRows=function(e,t){const o=this.o,r=this.p;let l,i,n=o.tableClassName,s=n+"-row",a=n+"-cell",d=r.filteredRows||r.rows,u=!!r.filteredRows,h=o.allowCellPreview,c=r.visibleColumns,p=o.virtualTable,f=r.virtualRowHeightFirst,m=r.virtualRowHeight,g=c.length;for(let e,t=0;t<g;t++)e=c[t],e._finalWidth=e.actualWidthConsideringScrollbarWidth||e.actualWidth;let b=document.createDocumentFragment(),v=this._isTableRtl()?"right":"left";const C=Fl.getSupportedTransform();for(let o=e,n=d.length;o<n&&o<=t;o++){let e=d[o];i=u?e.__i:o;let t=kl("div");t.className=s,t.rowIndex=o,t.physicalRowIndex=i;for(let o=0;o<g;o++){let l=c[o],i=kl("div");i.columnName=l.name,i.setAttribute("data-column",l.name),i.className=a,i.style.width=l._finalWidth+"px",l.cellClasses&&(i.className+=" "+l.cellClasses),h&&r._bindCellHoverIn(i),i.appendChild(kl("div")).innerHTML=this._getHtmlForCell(e,l),t.appendChild(i)}p&&(l=o>0?f+(o-1)*m:0,t.style.position="absolute",t.style[v]=0,!1===C?t.style.top=`${l}px`:(t.style.top="0px",t.style[C]=`translateY(${l}px)`)),b.appendChild(t),this.trigger("rowcreate",o,i,t,e)}return b},jl.prototype._calculateVirtualHeight=function(){let e=this.p;if(e.tbody){let t=(e.filteredRows||e.rows).length,o=e.virtualRowHeight*t;t&&(o+=e.virtualRowHeightFirst-e.virtualRowHeight,o+=e.virtualRowHeightLast-e.virtualRowHeight),o<1&&(o=1),e.tbody.style.height=o+"px"}return this},jl.prototype._calculateTbodyWidth=function(){const e=this.p;let t,r,l,i=this.o.tableClassName,n=i+"-row",s=i+"-cell",a=e.visibleColumns,d=a.length,u=Al("<div>").addClass(n).css("float","left"),h=0;for(r=0;r<d;r++)l=a[r],t=kl("div"),t.className=s,t.style.width=l.actualWidth+"px",l.cellClasses&&(t.className+=" "+l.cellClasses),t.appendChild(kl("div")),u.append(t),h+=l.actualWidth;let c=Al("<div>").addClass(this.el.className).css({"z-index":-1,position:"absolute",left:"0",top:"-9999px",float:"left",width:"1px",overflow:"hidden"}).append(Al("<div>").addClass(i).append(Al("<div>").addClass(i+"-body").css("width",h+1e4).append(u)));c.appendTo(document.body);let p=Al('<div style="border:1.5px solid #000;width:0;height:0;position:absolute;left:0;top:-9999px">').appendTo(document.body),f=parseFloat(p.css("border-width")),m=Math.round(f)!==f;p.remove();let g=o.getElementWidth(u[0],!0,!0,!0);return g-=e.scrollbarWidth||0,m&&g++,c.remove(),g},jl.prototype.setColumns=function(e,t){const o=this.p;e=e||[];let r=new Ml;for(let t=0,o=0;t<e.length;t++){let l=e[t],i=this._initColumnFromData(l);void 0!==l.order?(l.order>o&&(o=l.order+1),i.order=l.order):i.order=o++,r.push(i)}return r.normalizeOrder(),o.columns=r,o.visibleColumns=r.getVisibleColumns(),this._ensureVisibleColumns().clearAndRender(t),this},jl.prototype.addColumn=function(e,t,o){const r=this.p;let l=r.columns;if(e&&!l.get(e.name)){let i=null;void 0!==t&&(i=l.get(t)||l.getByOrder(t));let n=this._initColumnFromData(e);n.order=i?i.order:l.getMaxOrder()+1;for(let e=l.getMaxOrder(),t=n.order;e>=t;e--){let t=l.getByOrder(e);t&&t.order++}l.push(n),l.normalizeOrder(),r.visibleColumns=l.getVisibleColumns(),this._ensureVisibleColumns().clearAndRender(o),this.trigger("addcolumn",n.name)}return this},jl.prototype.removeColumn=function(e,t){const o=this.p;let r=o.columns,l=r.indexOf(e);return l>-1&&(r.splice(l,1),r.normalizeOrder(),o.visibleColumns=r.getVisibleColumns(),this._ensureVisibleColumns().clearAndRender(t),this.trigger("removecolumn",e)),this},jl.prototype.setCellFormatter=function(e){return e||((e=e=>"string"==typeof e?Tl(e):e).safe=!0),this.o.cellFormatter=e,this},jl.prototype.setHeaderCellFormatter=function(e){return this.o.headerCellFormatter=e||function(e){return"string"==typeof e?Tl(e):e},this},jl.prototype.setFilter=function(e){return this.o.filter=e,this},jl.prototype.filter=function(e){const t=this.p;let o=this.o.filter||xl;"string"==typeof arguments[0]&&"string"==typeof arguments[1]&&(e={column:arguments[0],keyword:arguments[1],caseSensitive:arguments[2]});let r=!!t.filteredRows;return t.filteredRows&&(t.filteredRows=null),t.filterArgs=null==e?null:"object"!=typeof e||Array.isArray(e)?e:Al.extend({},e),null!==t.filterArgs?(t.filteredRows=t.rows.filteredCollection(o,t.filterArgs),(r||t.filteredRows)&&(this.clearAndRender(),this.trigger("filter",e))):(t.filterArgs=null,t.filteredRows=null,this.clearAndRender(),this.trigger("filterclear",{})),this},jl.prototype.clearFilter=function(){const e=this.p;return e.filteredRows&&(e.filterArgs=null,e.filteredRows=null,this.clearAndRender(),this.trigger("filterclear",{})),this},jl.prototype._refilter=function(){const e=this.p;if(e.filteredRows&&e.filterArgs){let t=this.o.filter||xl;e.filteredRows=e.rows.filteredCollection(t,e.filterArgs)}return this},jl.prototype.setColumnLabel=function(e,t){let o=this.p.columns.get(e);if(o&&(o.label=void 0===t?o.name:t,o.element))for(let e=0;e<o.element[0].firstChild.childNodes.length;e++){let t=o.element[0].firstChild.childNodes[e];if(3===t.nodeType){t.textContent=o.label;break}}return this},jl.prototype.moveColumn=function(e,t,o=!0){const r=this.o,l=this.p;let i,n,s=l.columns,a=o?l.visibleColumns:s.getColumns();if("string"==typeof e?i=s.get(e):"number"==typeof e&&(i=a[e]),"string"==typeof t?n=s.get(t):"number"==typeof t&&(n=a[t]),i&&n&&e!==t){let e=i.order,t=n.order,o=s.moveColumn(i,n).getVisibleColumns();if(l.visibleColumns.length!==o.length||l.visibleColumns.some(((e,t)=>e!==o[t])))if(l.visibleColumns=o,this._ensureVisibleColumns(),r.virtualTable)this.clearAndRender()._updateLastCellWidthFromScrollbar(!0);else{let o=l.$headerRow.find(">div."+r.tableClassName+"-header-cell"),i=e<t?t+1:t,n=e;o[0].parentNode.insertBefore(o[n],o[i]);let s=l.visibleColumns[e];s=(s.actualWidthConsideringScrollbarWidth||s.actualWidth)+"px";let a=l.visibleColumns[t];a=(a.actualWidthConsideringScrollbarWidth||a.actualWidth)+"px";let d=l.$tbody[0].childNodes;for(let o=0,r=d.length;o<r;o++){let r=d[o];1===r.nodeType&&(r.insertBefore(r.childNodes[n],r.childNodes[i]),r.childNodes[t].firstChild.style.width=a,r.childNodes[e].firstChild.style.width=s)}}this.trigger("movecolumn",i.name,e,t)}return this},jl.prototype.sort=function(e,t,o){const r=this.o,l=this.p;let i=l.columns.get(e),n=l.rows.sortColumn;if(i){if(n.length&&n[n.length-1].column===e&&(t=void 0===t?!n[n.length-1].descending:t),o){for(let e=0;e<n.length;e++)if(n[e].column===i.name){e<n.length-1?n.length=0:n.splice(n.length-1,1);break}(r.sortableColumns>0&&n.length>=r.sortableColumns||n.length>=l.visibleColumns.length)&&(n.length=0)}else n.length=0;t=void 0!==t&&t,n.push({column:i.name,comparePath:i.comparePath||i.dataPath,descending:!!t})}else n.length=0;this._clearSortArrows();for(let e=0;e<n.length;e++)this._showSortArrow(n[e].column,n[e].descending);if(r.adjustColumnWidthForSortArrow&&!r._tableSkeletonNeedsRendering&&this.tableWidthChanged(!0),r.virtualTable)for(;l.tbody&&l.tbody.firstChild;)this.trigger("rowdestroy",l.tbody.firstChild),this._unbindCellEventsForRow(l.tbody.firstChild),l.tbody.removeChild(l.tbody.firstChild);else l.tableSkeletonNeedsRendering=!0;l.rows.sortColumn=n,n.length&&(l.rows.sort(!!l.filteredRows),l.filteredRows&&l.filteredRows.sort(!!l.filteredRows));let s=[];for(let e=0;e<n.length;e++)s.push({column:n[e].column,descending:n[e].descending});return this.trigger("sort",s,!0),this},jl.prototype.resort=function(){const e=this.p;let t=e.columns,o=e.rows.sortColumn;if(o.length){for(let e=0;e<o.length;e++)t.get(o[e].column)||o.splice(e--,1);e.rows.sortColumn=o,o.length&&(e.rows.sort(!!e.filteredRows),e.filteredRows&&e.filteredRows.sort(!!e.filteredRows));let r=[];for(let e=0;e<o.length;e++)r.push({column:o[e].column,descending:o[e].descending});this.trigger("sort",r,!1)}return this},jl.prototype._ensureVisibleColumns=function(){const e=this.p;return 0===e.visibleColumns.length&&e.columns.length&&(e.columns[0].visible=!0,e.visibleColumns.push(e.columns[0]),this.trigger("showcolumn",e.columns[0].name)),this},jl.prototype.setColumnVisible=function(e,t){const o=this.p;let r=o.columns.get(e);return t=!!t,r&&!!r.visible!==t&&(r.visible=t,o.visibleColumns=o.columns.getVisibleColumns(),this.trigger(t?"showcolumn":"hidecolumn",e),this._ensureVisibleColumns(),this.clearAndRender()),this},jl.prototype.isColumnVisible=function(e){let t=this.p.columns.get(e);return!!t&&t.visible},jl.prototype.setMinColumnWidth=function(e){let t=this.o;return e=Math.max(e,0),t.minColumnWidth!==e&&(t.minColumnWidth=e,this.tableWidthChanged(!0)),this},jl.prototype.getMinColumnWidth=function(){return this.o.minColumnWidth},jl.prototype.setSortableColumns=function(e){const t=this.p,o=this.o;if(o.sortableColumns!==e&&(o.sortableColumns=e,t.$table)){let e=t.$headerRow.find(">div."+o.tableClassName+"-header-cell");for(let r=0;r<e.length;r++)Al(e[0])[o.sortableColumns>0&&t.visibleColumns[r].sortable?"addClass":"removeClass"]("sortable")}return this},jl.prototype.getSortableColumns=function(){return this.o.sortableColumns},jl.prototype.setMovableColumns=function(e){let t=this.o;return e=void 0===e||!!e,t.movableColumns!==e&&(t.movableColumns=e),this},jl.prototype.getMovableColumns=function(){return this.o.movableColumns},jl.prototype.setResizableColumns=function(e){let t=this.o;return e=void 0===e||!!e,t.resizableColumns!==e&&(t.resizableColumns=e),this},jl.prototype.getResizableColumns=function(){return this.o.resizableColumns},jl.prototype.setComparatorCallback=function(e){let t=this.o;return t.onComparatorRequired!==e&&(t.onComparatorRequired=e),this},jl.prototype.setColumnWidth=function(e,t){let o=this.p.columns.get(e),r=this._parseColumnWidth(t,o.ignoreMin?0:this.o.minColumnWidth);if(o){let e=this._serializeColumnWidth(o);o.width=r.width,o.widthMode=r.mode;let t=this._serializeColumnWidth(o);e!==t&&this.tableWidthChanged(!0),this.trigger("columnwidth",o.name,e,t)}return this},jl.prototype.getColumnWidth=function(e){let t=this.p.columns.get(e);return t?this._serializeColumnWidth(t):null},jl.prototype.getColumnConfig=function(e){let t=this.p.columns.get(e);return t?{order:t.order,width:this._serializeColumnWidth(t),visible:t.visible,label:t.label}:null},jl.prototype.getColumnsConfig=function(){const e=this.p;let t={};for(let o=0;o<e.columns.length;o++)t[e.columns[o].name]=this.getColumnConfig(e.columns[o].name);return t},jl.prototype.getSortedColumns=function(){const e=this.p;let t=[];for(let o=0;o<e.rows.sortColumn.length;o++){let r=e.rows.sortColumn[o];t.push({column:r.column,descending:r.descending})}return t},jl.prototype.getHtmlForRowCell=function(e,t){const o=this.p;if(e<0||e>o.rows.length-1)return null;let r=o.columns.get(t);if(!r)return null;let l=o.rows[e];return this._getHtmlForCell(l,r)},jl.prototype.getHtmlForRowDataCell=function(e,t){let o=this.p.columns.get(t);return o?this._getHtmlForCell(e,o):null},jl.prototype._getHtmlForCell=function(e,t){let o=t.dataPath,r=e[o[0]];for(let e=1;e<o.length&&null!=r;e++)r=r&&r[o[e]];const l=this.o.cellFormatter;let i;if(l.safe)i=l(r,t.name,e);else try{i=l(r,t.name,e)}catch(e){i="[ERROR]",console.error("Failed to generate content for cell "+t.name,e)}return null==i&&(i=""),i},jl.prototype.getRowYPos=function(e){const t=this.p;if(this.o.virtualTable)return e>0?t.virtualRowHeightFirst+(e-1)*t.virtualRowHeight:0;{let o=t.tbody.childNodes[e];return o?o.offsetTop:null}},jl.prototype.getDataForRow=function(e){const t=this.p;return e<0||e>t.rows.length-1?null:t.rows[e]},jl.prototype.getRowCount=function(){const e=this.p;return e.rows?e.rows.length:0},jl.prototype.getIndexForRow=function(e){return this.p.rows.indexOf(e)},jl.prototype.getFilteredRowCount=function(){const e=this.p;return(e.filteredRows||e.rows).length},jl.prototype.getIndexForFilteredRow=function(e){const t=this.p;return(t.filteredRows||t.rows).indexOf(e)},jl.prototype.getDataForFilteredRow=function(e){const t=this.p;return e<0||e>(t.filteredRows||t.rows).length-1?null:(t.filteredRows||t.rows)[e]},jl.prototype.getHeaderRowElement=function(){return this.p.headerRow},jl.prototype._horizontalPadding=function(e){return(parseFloat(Al.css(e,"padding-left"))||0)+(parseFloat(Al.css(e,"padding-right"))||0)},jl.prototype._horizontalBorderWidth=function(e){return(parseFloat(Al.css(e,"border-left"))||0)+(parseFloat(Al.css(e,"border-right"))||0)},jl.prototype._calculateWidthAvailableForColumns=function(){const e=this.o,t=this.p;let r,l,i;t.$table&&(l=t.table?t.table.scrollTop:0,i=t.table?t.table.scrollLeft:0,e.virtualTable&&(r=t.$table[0].style.display,t.$table[0].style.display="none"));let n=o.getElementWidth(this.$el[0]);t.$table&&(e.virtualTable&&(t.$table[0].style.display=r),t.table.scrollTop=l,t.table.scrollLeft=i,t.header.scrollLeft=i);let s=e.tableClassName,a=Al("<div>").addClass(this.el.className).css({"z-index":-1,position:"absolute",left:"0",top:"-9999px"}),d=Al("<div>").addClass(s+"-header").appendTo(a),u=Al("<div>").addClass(s+"-header-row").appendTo(d);for(let e=0;e<t.visibleColumns.length;e++)u.append(Al("<div><div></div></div>").addClass(s+"-header-cell").addClass(t.visibleColumns[e].cellClasses||""));a.appendTo(document.body),n-=this._horizontalBorderWidth(u[0]);let h=u.find(">div."+s+"-header-cell");for(let e=0;e<h.length;e++){let t=Al(h[e]);"border-box"===t.css("boxSizing")||(n-=(parseFloat(t.css("border-right-width"))||0)+(parseFloat(t.css("border-left-width"))||0)+this._horizontalPadding(t[0]))}return a&&a.remove(),Math.max(0,n)},jl.prototype.tableWidthChanged=function(){let e=function(e){let t,r=this.o.tableClassName,l=Al("<div>").addClass(this.$el).append(Al("<div>").addClass(r+"-header").append(Al("<div>").addClass(r+"-header-row").append(t=Al("<div>").addClass(r+"-header-cell").append(Al("<div>").text(e))))).css({position:"absolute",top:"-9999px",visibility:"hidden"});l.appendTo(document.body);let i=o.getElementWidth(t[0]);return l.remove(),i},t=null;return function(o,r){let l=this.o,i=this.p,n=this._calculateWidthAvailableForColumns(),s=n,a=0;if(!i.$table)return this;r=void 0===r||r;let d=0;if(i.tbody||(r=!1),r&&(d=parseFloat(i.tbody.style.minWidth)||0),s!==t||o){t=n;let o=0,u=[],h=0;for(let e=0;e<i.columns.length;e++)i.columns[e].actualWidthConsideringScrollbarWidth=null;for(let t=0;t<i.visibleColumns.length;t++){let r=i.visibleColumns[t];if(r.widthMode===Vl.ABSOLUTE){let e=r.width;e+=r.arrowProposedWidth||0,!r.ignoreMin&&e<l.minColumnWidth&&(e=l.minColumnWidth),s-=e,o+=e,e!==r.actualWidth&&(r.actualWidth=e,u.push(t))}else if(r.widthMode===Vl.AUTO){let i=e.call(this,r.label)+20;i+=r.arrowProposedWidth||0,!r.ignoreMin&&i<l.minColumnWidth&&(i=l.minColumnWidth),s-=i,o+=i,i!==r.actualWidth&&(r.actualWidth=i,l.convertColumnWidthsToRelative||u.push(t))}else r.widthMode===Vl.RELATIVE&&(h+=r.width,a++)}if(l.convertColumnWidthsToRelative)for(let e=0;e<i.visibleColumns.length;e++){let t=i.visibleColumns[e];t.widthMode===Vl.AUTO&&(t.widthMode=Vl.RELATIVE,s+=t.actualWidth,t.width=t.actualWidth/o,h+=t.width,a++)}if(a&&(h<1&&l.relativeWidthGrowsToFillWidth||h>1&&l.relativeWidthShrinksToFillWidth))for(let e=0;e<i.visibleColumns.length;e++){let t=i.visibleColumns[e];t.widthMode===Vl.RELATIVE&&(t.width/=h)}let c=Math.max(0,s);0===c&&(c=i.table.clientWidth);let p=l.minColumnWidth/c;if(isNaN(p)&&(p=0),p>0){let e,t=0;for(let e=0;e<i.visibleColumns.length;e++){let o=i.visibleColumns[e];o.widthMode===Vl.RELATIVE&&!o.ignoreMin&&o.width<p&&(t+=p-o.width,o.width=p)}for(let o=0;o<i.visibleColumns.length;o++){let r=i.visibleColumns[o];r.widthMode===Vl.RELATIVE&&!r.ignoreMin&&r.width>p&&t>0&&(e=Math.min(t,r.width-p),r.width-=e,t-=e)}}if(l.autoFillTableWidth&&s>0){let e=0,t=s;for(let o=0;o<i.visibleColumns.length;o++){let r=i.visibleColumns[o];r.resizable||r.widthMode!==Vl.ABSOLUTE||(e+=r.width),r.widthMode===Vl.RELATIVE&&(t-=Math.round(c*r.width))}let o=(n-e)/(n-t-e)||NaN;for(let e=0;e<i.visibleColumns.length&&t>0;e++){let t=i.visibleColumns[e];if(t.resizable||t.widthMode!==Vl.ABSOLUTE)if(t.widthMode===Vl.RELATIVE)t.width*=o;else{let r=t.actualWidth*o;t.actualWidth!==r&&(t.actualWidth=r,-1===u.indexOf(e)&&u.push(e))}}}for(let e=0;e<i.visibleColumns.length;e++){let t=i.visibleColumns[e];if(t.widthMode===Vl.RELATIVE){let o=Math.round(c*t.width);s-=o,a--,0===a&&1===s&&(o++,s--),-1===s&&(o--,s++),o!==t.actualWidth&&(t.actualWidth=o,u.push(e))}}if(i.visibleColumns.length&&(i.visibleColumns[i.visibleColumns.length-1].actualWidthConsideringScrollbarWidth=i.visibleColumns[i.visibleColumns.length-1].actualWidth-(i.scrollbarWidth||0)),r){let e=this._calculateTbodyWidth();d<e&&this._updateTableWidth(!1);for(let e=0;e<u.length;e++)this._resizeColumnElements(u[e]);d>e&&this._updateTableWidth(!1)}}return this}}(),jl.prototype.tableHeightChanged=function(){let e=this,t=e.o,r=e.p;if(!r.$table)return e;let l=o.getElementHeight(e.$el[0],!0)-(parseFloat(r.$table.css("border-top-width"))||0)-(parseFloat(r.$table.css("border-bottom-width"))||0);return l!==t.height&&(t.height=l,r.tbody&&(r.tbody.style.height=Math.max(t.height-o.getElementHeight(r.$headerRow[0],!0,!0,!0),1)+"px"),t.virtualTable&&e.clearAndRender()),e},jl.prototype.addRows=function(e,t,o,r){let l=this,i=l.p;if("boolean"==typeof t&&(r=o,o=t,t=-1),"number"!=typeof t&&(t=-1),(t<0||t>i.rows.length)&&(t=i.rows.length),r=void 0===r||!!r,e){if(i.rows.add(e,t),i.filteredRows||o&&i.rows.sortColumn.length)o&&i.rows.sortColumn.length?this.resort():this._refilter(),i.tableSkeletonNeedsRendering=!0,r&&this.render();else if(r){let o=i.tbody.childNodes;if(l.o.virtualTable){for(;i.tbody.firstChild;)this.trigger("rowdestroy",i.tbody.firstChild),this._unbindCellEventsForRow(i.tbody.firstChild),i.tbody.removeChild(i.tbody.firstChild);this._calculateVirtualHeight()._updateLastCellWidthFromScrollbar().render()._updateTableWidth(!1)}else if(i.$tbody){let r=t,n=t+e.length-1,s=l.renderRows(r,n);i.tbody.insertBefore(s,o[t]||null);for(let t=n+1;t<o.length;t++){let r=o[t];r.rowIndex+=e.length,r.physicalRowIndex+=e.length}this.render()._updateLastCellWidthFromScrollbar()._updateTableWidth(!0)}}this.trigger("addrows",e.length,!1)}return this},jl.prototype.removeRows=function(e,t,o){let r=this.p;if("number"!=typeof t||t<=0)return this;if(e<0||e>r.rows.length-1)return this;if(r.rows.splice(e,t),o=void 0===o||!!o,r.filteredRows)this._refilter(),r.tableSkeletonNeedsRendering=!0,o&&this.render();else if(o){let o=r.tbody.childNodes;if(this.o.virtualTable){for(;r.tbody.firstChild;)this.trigger("rowdestroy",r.tbody.firstChild),this._unbindCellEventsForRow(r.tbody.firstChild),r.tbody.removeChild(r.tbody.firstChild);this._calculateVirtualHeight()._updateLastCellWidthFromScrollbar().render()._updateTableWidth(!1)}else{let l=e+t-1;for(let i=0;i<o.length;i++){let n=o[i],s=n.physicalRowIndex;s>=e?s<=l?(this.trigger("rowdestroy",n),this._unbindCellEventsForRow(n),r.tbody.removeChild(n),i--):n.physicalRowIndex-=t:n.rowIndex=i}this.render()._updateLastCellWidthFromScrollbar()._updateTableWidth(!0)}}return this},jl.prototype.removeRow=function(e,t){return this.removeRows(e,1,t)},jl.prototype.refreshRow=function(e){let t=this.p;if(e<0||e>t.rows.length-1)return this;let o=-1;if(t.filteredRows&&-1===(o=t.filteredRows.indexOf(t.rows[e])))return this;-1===o&&(o=e);let r=t.tbody.childNodes;if(this.o.virtualTable){let l=!1,i=0;for(;i<r.length;i++)if(r[i].physicalRowIndex===e){l=!0,this.trigger("rowdestroy",r[i]),this._unbindCellEventsForRow(r[i]),t.tbody.removeChild(r[i]);break}if(l){let e=this.renderRows(o,o);t.tbody.insertBefore(e,r[i]||null)}}else{this.trigger("rowdestroy",r[o]),this._unbindCellEventsForRow(r[o]),t.tbody.removeChild(r[o]);let e=this.renderRows(o,o);t.tbody.insertBefore(e,r[o]||null)}return this},jl.prototype.getRowElement=function(e){let t=this.p;if(e<0||e>t.rows.length-1)return null;let o=-1;if(t.filteredRows&&-1===(o=t.filteredRows.indexOf(t.rows[e])))return this;-1===o&&(o=e);let r=t.tbody.childNodes;if(!this.o.virtualTable)return r[o];for(let t=0;t<r.length;t++)if(r[t].physicalRowIndex===e)return r[t];return null},jl.prototype.refreshAllVirtualRows=function(){const e=this.p;if(this.o.virtualTable){let t=[],o=e.tbody.childNodes;for(let r=0,l=o.length;r<l;r++)t.push(o[r].physicalRowIndex),this.trigger("rowdestroy",o[r]),this._unbindCellEventsForRow(o[r]),e.tbody.removeChild(o[r]),r--,l--;for(let o=0;o<t.length;o++){let r=this.renderRows(t[o],t[o]);e.tbody.appendChild(r)}}return this},jl.prototype.setRows=function(e,t){let o=this.p;return o.rows.reset(e),t&&o.rows.sortColumn.length?this.resort():this._refilter(),this.clearAndRender().trigger("addrows",e.length,!0),this},jl.prototype.getUrlForElementContent=function(e){let t,o=document.getElementById(e);if(o){let e=o.textContent;if("function"==typeof Blob)t=new Blob([e]);else{let o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(!o)return null;let r=new o;r.append(e),t=r.getBlob()}return(window.URL||window.webkitURL).createObjectURL(t)}return null},jl.prototype.isWorkerSupported=function(){return window.Worker instanceof Function},jl.prototype.createWebWorker=function(e,t,o){if(this.isWorkerSupported()){let r=this,l=r.p,i=new Worker(e),n=function(e){e.data.append?r.addRows(e.data.rows,o):r.setRows(e.data.rows,o)};return i.addEventListener("message",n,!1),l.workerListeners||(l.workerListeners=[]),l.workerListeners.push({worker:i,listener:n}),(t||void 0===t)&&i.postMessage(null),i}return null},jl.prototype.unbindWebWorker=function(e){let t=this.p;if(t.workerListeners)for(let o=0;o<t.workerListeners.length;o++)t.workerListeners[o].worker===e&&(e.removeEventListener("message",t.workerListeners[o].listener,!1),t.workerListeners.splice(o,1),o--);return this},jl.prototype.abortCellPreview=function(){return this.hideCellPreview(),this},jl.prototype.cancelColumnResize=function(){const e=this.p;return e.$resizer&&(e.$resizer.remove(),e.$resizer=null,Al(document).off("mousemove.dgtable",e.onMouseMoveResizeAreaBound).off("mouseup.dgtable",e.onEndDragColumnHeaderBound)),this},jl.prototype._onVirtualTableScrolled=function(){this.render()},jl.prototype._onTableScrolledHorizontally=function(){const e=this.p;e.header.scrollLeft=e.table.scrollLeft},jl.prototype._getColumnByResizePosition=function(e){let t=this.o,r=this._isTableRtl(),l=Al(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName),i=l[0];i.__cell&&(i=i.__cell,l=Al(i));let n=l[0].previousSibling;for(;n&&1!==n.nodeType;)n=n.previousSibling;let s=!n,a=((null!=e.pageX?e.pageX:e.originalEvent.pageX)||e.originalEvent.clientX)-l.offset().left;if(r){if(!s&&o.getElementWidth(l[0],!0,!0,!0)-a<=t.resizeAreaWidth/2)return n.columnName;if(a<=t.resizeAreaWidth/2)return i.columnName}else{if(!s&&a<=t.resizeAreaWidth/2)return n.columnName;if(o.getElementWidth(l[0],!0,!0,!0)-a<=t.resizeAreaWidth/2)return i.columnName}return null},jl.prototype._onTouchStartColumnHeader=function(e){const t=this.p;if(t.currentTouchId)return;let o=e.originalEvent.changedTouches[0];t.currentTouchId=o.identifier;let r,l=Al(e.currentTarget),i={x:o.pageX,y:o.pageY},n=i,s=function(){t.currentTouchId=null,l.off("touchend").off("touchcancel"),clearTimeout(r)},a=function(t){let o=Al.Event(t),r=Array.prototype.slice.call(arguments,1);for(let t of["target","clientX","clientY","offsetX","offsetY","screenX","screenY","pageX","pageY","which"]){o[t]=e[t];for(let e=0;e<r.length;e++)null!=r[e][t]&&(o[t]=r[e][t])}return o};l.trigger(a("mousedown",e.originalEvent.changedTouches[0],{which:1,target:e.target})),r=setTimeout((()=>{s(),l.one("touchend",(e=>{Dl(e)||e.preventDefault(),l.off("touchend").off("touchcancel")})).one("touchcancel",(e=>{l.off("touchend").off("touchcancel")})),Math.sqrt(Math.pow(Math.abs(n.x-i.x),2)+Math.pow(Math.abs(n.y-i.y),2))<9&&(this.cancelColumnResize(),l.trigger(a("mouseup",e.originalEvent.changedTouches[0],{which:3,target:e.target})))}),500),l.on("touchend",(e=>{let o=Wl(e.originalEvent.changedTouches,(e=>e.identifier===t.currentTouchId));o&&(s(),Dl(e)||e.preventDefault(),n={x:o.pageX,y:o.pageY},(Math.sqrt(Math.pow(Math.abs(n.x-i.x),2)+Math.pow(Math.abs(n.y-i.y),2))<9||t.$resizer)&&(l.trigger(a("mouseup",o,{which:1,target:e.target})),l.trigger(a("click",o,{which:1,target:e.target}))))})).on("touchcancel",(()=>{s()})).on("touchmove",(e=>{let o=Wl(e.originalEvent.changedTouches,(e=>e.identifier===t.currentTouchId));o&&(n={x:o.pageX,y:o.pageY},t.$resizer&&(e.preventDefault(),l.trigger(a("mousemove",o,{target:e.target}))))}))},jl.prototype._onMouseDownColumnHeader=function(e){if(1!==e.which)return this;let t=this.o,r=this.p,l=this._getColumnByResizePosition(e);if(l){let i=r.columns.get(l);if(!t.resizableColumns||!i||!i.resizable)return!1;let n=this._isTableRtl();r.$resizer&&Al(r.$resizer).remove(),r.$resizer=Al("<div></div>").addClass(t.resizerClassName).css({position:"absolute",display:"block","z-index":-1,visibility:"hidden",width:"2px",background:"#000",opacity:.7}).appendTo(this.$el);let s=i.element,a=r.$resizer.parent(),d=s.offset(),u=a.offset();8===$l&&(d=s.offset()),u.left+=parseFloat(a.css("border-left-width"))||0,u.top+=parseFloat(a.css("border-top-width"))||0,d.left-=u.left,d.top-=u.top,d.top-=parseFloat(s.css("border-top-width"))||0;let h=o.getElementWidth(r.$resizer[0],!0,!0,!0);n?(d.left-=Math.ceil((parseFloat(s.css("border-left-width"))||0)/2),d.left-=Math.ceil(h/2)):(d.left+=o.getElementWidth(s[0],!0,!0,!0),d.left+=Math.ceil((parseFloat(s.css("border-right-width"))||0)/2),d.left-=Math.ceil(h/2)),r.$resizer.css({"z-index":"10",visibility:"visible",left:d.left,top:d.top,height:o.getElementHeight(this.$el[0])})[0].columnName=s[0].columnName;try{r.$resizer[0].style.zIndex=""}catch(e){}Al(document).on("mousemove.dgtable",r.onMouseMoveResizeAreaBound),Al(document).on("mouseup.dgtable",r.onEndDragColumnHeaderBound),e.preventDefault()}},jl.prototype._onMouseMoveColumnHeader=function(e){let t=this.o,o=this.p;if(t.resizableColumns){let r=this._getColumnByResizePosition(e),l=Al(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName)[0];r&&o.columns.get(r).resizable?l.style.cursor="e-resize":l.style.cursor=""}},jl.prototype._onMouseUpColumnHeader=function(e){if(3===e.which){let t=this.o,r=Al(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName),l=r.offset();l.width=o.getElementWidth(r[0],!0,!0,!0),l.height=o.getElementHeight(r[0],!0,!0,!0),this.trigger("headercontextmenu",r[0].columnName,e.pageX,e.pageY,l)}return this},jl.prototype._onMouseLeaveColumnHeader=function(e){let t=this.o;Al(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName)[0].style.cursor=""},jl.prototype._onClickColumnHeader=function(e){if(!Dl(e)&&!this._getColumnByResizePosition(e)){let t=this,o=t.o,r=t.p,l=Al(e.target).closest("div."+o.tableClassName+"-header-cell,div."+o.cellPreviewClassName)[0];if(o.sortableColumns){let e=r.columns.get(l.columnName);e&&e.sortable&&this.sort(l.columnName,void 0,!0).render()}}},jl.prototype._onStartDragColumnHeader=function(e){let t=this.o,o=this.p;if(t.movableColumns){let r=Al(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName),l=o.columns.get(r[0].columnName);l&&l.movable?(r[0].style.opacity=.35,o.dragId=161061273*Math.random(),e.originalEvent.dataTransfer.setData("text",JSON.stringify({dragId:o.dragId,column:l.name}))):e.preventDefault()}else e.preventDefault()},jl.prototype._onMouseMoveResizeArea=function(e){let t=this.p,r=t.columns.get(t.$resizer[0].columnName),l=this._isTableRtl(),i=r.element,n=t.$resizer.parent(),s=i.offset(),a=n.offset();a.left+=parseFloat(n.css("border-left-width"))||0,s.left-=a.left;let d=o.getElementWidth(t.$resizer[0],!0,!0,!0),u="border-box"===i.css("box-sizing"),h=e.pageX-a.left,c=s.left;c-=Math.ceil(d/2),l?(c+=o.getElementWidth(i[0],!0,!0,!0),c-=r.ignoreMin?0:this.o.minColumnWidth,u||(c-=Math.ceil((parseFloat(i.css("border-left-width"))||0)/2),c-=this._horizontalPadding(i[0])),h>c&&(h=c)):(c+=r.ignoreMin?0:this.o.minColumnWidth,u||(c+=Math.ceil((parseFloat(i.css("border-right-width"))||0)/2),c+=this._horizontalPadding(i[0])),h<c&&(h=c)),t.$resizer.css("left",h+"px")},jl.prototype._onEndDragColumnHeader=function(e){let t=this.o,r=this.p;if(r.$resizer){Al(document).off("mousemove.dgtable",r.onMouseMoveResizeAreaBound).off("mouseup.dgtable",r.onEndDragColumnHeaderBound);let l=r.columns.get(r.$resizer[0].columnName),i=this._isTableRtl(),n=l.element,s=r.$resizer.parent(),a=n.offset(),d=s.offset();d.left+=parseFloat(s.css("border-left-width"))||0,a.left-=d.left;let u=o.getElementWidth(r.$resizer[0],!0,!0,!0),h="border-box"===n.css("box-sizing"),c=e.pageX-d.left,p=a.left,f=a.left,m=0;p-=Math.ceil(u/2),i?(h||(c+=this._horizontalPadding(n[0]),c+=parseFloat(n.css("border-left-width"))||0,c+=parseFloat(n.css("border-right-width"))||0),p+=o.getElementWidth(n[0],!0,!0,!0),f=p-(l.ignoreMin?0:this.o.minColumnWidth),c>f&&(c=f),m=p-c):(h||(c-=this._horizontalPadding(n[0]),c-=parseFloat(n.css("border-left-width"))||0,c-=parseFloat(n.css("border-right-width"))||0),f=p+(l.ignoreMin?0:this.o.minColumnWidth),c<f&&(c=f),m=c-p),r.$resizer.remove(),r.$resizer=null;let g=m;if(l.widthMode===Vl.RELATIVE){let e=this._calculateWidthAvailableForColumns(),o=0,i=0;for(let t=0;t<r.visibleColumns.length;t++){let n=r.visibleColumns[t];n.name!==l.name&&(n.widthMode===Vl.RELATIVE?(o+=n.width,i++):e-=n.actualWidth)}if(e=Math.max(1,e),g=m/e,i>0){let e=g/((1-g)/o);o+=g,(o<1&&t.relativeWidthGrowsToFillWidth||o>1&&t.relativeWidthShrinksToFillWidth)&&(g=e)}g*=100,g+="%"}this.setColumnWidth(l.name,g)}else e.target.style.opacity=null},jl.prototype._onDragEnterColumnHeader=function(e){let t=this.o,o=this.p;if(t.movableColumns){let r=e.originalEvent.dataTransfer.getData("text");r=r?JSON.parse(r):null;let l=Al(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName);if(!r||o.dragId===r.dragId&&l.columnName!==r.column){let e=o.columns.get(l[0].columnName);e&&(e.movable||e!==o.visibleColumns[0])&&Al(l).addClass("drag-over")}}},jl.prototype._onDragOverColumnHeader=function(e){e.preventDefault()},jl.prototype._onDragLeaveColumnHeader=function(e){let t=this.o,o=Al(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName);Al(o[0].firstChild).has(e.originalEvent.relatedTarget).length||o.removeClass("drag-over")},jl.prototype._onDropColumnHeader=function(e){e.preventDefault();let t=this.o,o=this.p,r=JSON.parse(e.originalEvent.dataTransfer.getData("text")),l=Al(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName);if(t.movableColumns&&r.dragId===o.dragId){let e=r.column,t=l[0].columnName,i=o.columns.get(e),n=o.columns.get(t);i&&n&&i.movable&&(n.movable||n!==o.visibleColumns[0])&&this.moveColumn(e,t)}Al(l).removeClass("drag-over")},jl.prototype._clearSortArrows=function(){let e=this.p;if(e.$table){let t=this.o.tableClassName,o=e.$headerRow.find(">div."+t+"-header-cell.sorted"),r=o.find(">div>.sort-arrow");for(let t of r){let o=e.columns.get(t.parentNode.parentNode.columnName);o&&(o.arrowProposedWidth=0)}r.remove(),o.removeClass("sorted").removeClass("desc")}return this},jl.prototype._showSortArrow=function(e,t){let o=this.p.columns.get(e);if(!o)return!1;let r=kl("span");return r.className="sort-arrow",o.element&&(o.element.addClass(t?"sorted desc":"sorted"),o.element[0].firstChild.insertBefore(r,o.element[0].firstChild.firstChild)),o.widthMode!==Vl.RELATIVE&&this.o.adjustColumnWidthForSortArrow&&(o.arrowProposedWidth=r.scrollWidth+(parseFloat(Al(r).css("margin-right"))||0)+(parseFloat(Al(r).css("margin-left"))||0)),this},jl.prototype._resizeColumnElements=function(e){let t=this.p,o=t.$headerRow.find("div."+this.o.tableClassName+"-header-cell"),r=t.columns.get(o[e].columnName);if(r){o[e].style.width=(r.actualWidthConsideringScrollbarWidth||r.actualWidth)+"px";let l=(r.actualWidthConsideringScrollbarWidth||r.actualWidth)+"px",i=t.$tbody[0].childNodes;for(let t=0,o=i.length;t<o;t++){let o=i[t];1===o.nodeType&&(o.childNodes[e].style.width=l)}}return this},jl.prototype._destroyHeaderCells=function(){let e=this.o,t=this.p;return t.$headerRow&&(this.trigger("headerrowdestroy",t.headerRow),t.$headerRow.find("div."+e.tableClassName+"-header-cell").remove(),t.$headerRow=null,t.headerRow=null),this},jl.prototype._renderSkeletonBase=function(){let e=this,t=e.p,r=e.o;if(t.$table&&r.virtualTable){if(t.$table.remove(),t.$tbody){let o=t.$tbody[0].childNodes;for(let t=0,r=o.length;t<r;t++)e.trigger("rowdestroy",o[t]),e._unbindCellEventsForRow(o[t])}t.$table=t.table=t.$tbody=t.tbody=null}e._destroyHeaderCells(),t.currentTouchId=null,t.$header&&t.$header.remove();let l=r.tableClassName,i=kl("div"),n=Al(i),s=kl("div"),a=Al(s);return i.className=l+"-header",s.className=l+"-header-row",t.$header=n,t.header=i,t.$headerRow=a,t.headerRow=s,a.appendTo(t.$header),n.prependTo(this.$el),Bl(e.$el),r.width===jl.Width.SCROLL?this.el.style.overflow="hidden":this.el.style.overflow="",!r.height&&r.virtualTable&&(r.height=o.getElementHeight(this.$el[0],!0)),this},jl.prototype._renderSkeletonHeaderCells=function(){let e,t=this,o=t.p,r=t.o,l=r.allowCellPreview,i=r.allowHeaderCellPreview,n=r.tableClassName+"-header-cell",s=o.headerRow;Ll&&(e=function(e){return e.preventDefault(),this.dragDrop(),!1});let a=function(e){e.preventDefault()};for(let d=0;d<o.visibleColumns.length;d++){let u=o.visibleColumns[d];if(u.visible){let h=kl("div"),c=Al(h);h.draggable=!0,h.className=n,h.style.width=u.actualWidth+"px",r.sortableColumns&&u.sortable&&(h.className+=" sortable"),h.columnName=u.name,h.setAttribute("data-column",u.name);let p=kl("div");p.innerHTML=r.headerCellFormatter(u.label,u.name),h.appendChild(p),l&&i&&o._bindCellHoverIn(h),s.appendChild(h),o.visibleColumns[d].element=c,c.on("mousedown.dgtable",t._onMouseDownColumnHeader.bind(t)).on("mousemove.dgtable",t._onMouseMoveColumnHeader.bind(t)).on("mouseup.dgtable",t._onMouseUpColumnHeader.bind(t)).on("mouseleave.dgtable",t._onMouseLeaveColumnHeader.bind(t)).on("touchstart.dgtable",t._onTouchStartColumnHeader.bind(t)).on("dragstart.dgtable",t._onStartDragColumnHeader.bind(t)).on("click.dgtable",t._onClickColumnHeader.bind(t)).on("contextmenu.dgtable",a),Al(p).on("dragenter.dgtable",t._onDragEnterColumnHeader.bind(t)).on("dragover.dgtable",t._onDragOverColumnHeader.bind(t)).on("dragleave.dgtable",t._onDragLeaveColumnHeader.bind(t)).on("drop.dgtable",t._onDropColumnHeader.bind(t)),Ll&&c.on("selectstart.dgtable",e.bind(h)),c.css({"-webkit-touch-callout":"none","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none"})}}return this.trigger("headerrowcreate",s),this},jl.prototype._renderSkeletonBody=function(){let e=this,t=e.p,r=e.o,l=r.tableClassName;if(r.virtualTable&&!t.virtualRowHeight){let r,i=function(){let e=kl("div"),t=e.appendChild(kl("div")),o=t.appendChild(kl("div"));return e.className=l+"-row",t.className=l+"-cell",o.innerHTML="0",e.style.visibility="hidden",e.style.position="absolute",e},n=Al("<div>").addClass(e.el.className).css({"z-index":-1,position:"absolute",left:"0",top:"-9999px",width:"1px",overflow:"hidden"}).append(Al("<div>").addClass(l).append(r=Al("<div>").addClass(l+"-body").css("width",99999)));n.appendTo(document.body);let s=i(),a=i(),d=i();r.append(s,a,d),t.virtualRowHeightFirst=o.getElementHeight(s,!0,!0,!0),t.virtualRowHeight=o.getElementHeight(a,!0,!0,!0),t.virtualRowHeightLast=o.getElementHeight(d,!0,!0,!0),t.virtualRowHeightMin=Math.min(Math.min(t.virtualRowHeightFirst,t.virtualRowHeight),t.virtualRowHeightLast),t.virtualRowHeightMax=Math.max(Math.max(t.virtualRowHeightFirst,t.virtualRowHeight),t.virtualRowHeightLast),n.remove()}if(!t.$table){let i=document.createDocumentFragment(),n=kl("div"),s=Al(n);n.className=l,r.virtualTable&&(n.className+=" virtual");let a=r.height-o.getElementHeight(t.$headerRow[0],!0,!0,!0);"border-box"!==s.css("box-sizing")&&(a-=parseFloat(s.css("border-top-width"))||0,a-=parseFloat(s.css("border-bottom-width"))||0,a-=parseFloat(s.css("padding-top"))||0,a-=parseFloat(s.css("padding-bottom"))||0),t.visibleHeight=a,n.style.height=r.height?a+"px":"auto",n.style.display="block",n.style.overflowY="auto",n.style.overflowX=r.width===jl.Width.SCROLL?"auto":"hidden",i.appendChild(n);let d=kl("div"),u=Al(d);d.className=r.tableClassName+"-body",t.table=n,t.tbody=d,t.$table=s,t.$tbody=u,r.virtualTable&&(t.virtualVisibleRows=Math.ceil(t.visibleHeight/t.virtualRowHeightMin)),e._calculateVirtualHeight(),Bl(u),Bl(s),n.appendChild(d),e.el.appendChild(i)}return this},jl.prototype._renderSkeleton=function(){return this},jl.prototype._updateLastCellWidthFromScrollbar=function(e){const t=this.p;let o=t.table.offsetWidth-t.table.clientWidth;if(o!==t.scrollbarWidth||e){t.scrollbarWidth=o;for(let e=0;e<t.columns.length;e++)t.columns[e].actualWidthConsideringScrollbarWidth=null;if(t.scrollbarWidth>0&&t.visibleColumns.length>0){let e=t.visibleColumns.length-1;t.visibleColumns[e].actualWidthConsideringScrollbarWidth=t.visibleColumns[e].actualWidth-t.scrollbarWidth;let o=t.visibleColumns[e].actualWidthConsideringScrollbarWidth+"px",r=t.tbody.childNodes;for(let t=0,l=r.length;t<l;t++){let l=r[t];1===l.nodeType&&(l.childNodes[e].style.width=o)}t.headerRow.childNodes[e].style.width=o}}return this},jl.prototype._updateTableWidth=function(e){const t=this.o,r=this.p;let l=this._calculateTbodyWidth();if(r.tbody.style.minWidth=l+"px",r.headerRow.style.minWidth=l+(r.scrollbarWidth||0)+"px",r.$table.off("scroll",r.onTableScrolledHorizontallyBound),t.width===jl.Width.AUTO)o.setElementWidth(r.$table[0],o.getElementWidth(r.$tbody[0],!0,!0,!0)),o.setElementWidth(this.$el[0],o.getElementWidth(r.$table[0],!0,!0,!0));else if(t.width===jl.Width.SCROLL){if(e){let e=r.table?r.table.scrollTop:0,t=r.table?r.table.scrollLeft:0;!function(e){let t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}(this.el),r.table.scrollTop=e,r.table.scrollLeft=t,r.header.scrollLeft=t}r.$table.on("scroll",r.onTableScrolledHorizontallyBound)}return this},jl.prototype._isTableRtl=function(){return"rtl"===this.p.$table.css("direction")},jl.prototype._serializeColumnWidth=function(e){return e.widthMode===Vl.AUTO?"auto":e.widthMode===Vl.RELATIVE?100*e.width+"%":e.width},jl.prototype._cellMouseOverEvent=function(e){const t=this.o,r=this.p;let l=e.firstChild;if(l.scrollWidth-l.clientWidth>1||l.scrollHeight-l.clientHeight>1){this.hideCellPreview(),r.abortCellPreview=!1;let i=Al(e),n=Al(l),s=kl("div"),a=Al(s);s.innerHTML=e.innerHTML,s.className=t.cellPreviewClassName;let d=i.hasClass(t.tableClassName+"-header-cell");d&&(s.className+=" header",i.hasClass("sortable")&&(s.className+=" sortable"),s.draggable=!0,Al(s).on("mousedown",this._onMouseDownColumnHeader.bind(this)).on("mousemove",this._onMouseMoveColumnHeader.bind(this)).on("mouseup",this._onMouseUpColumnHeader.bind(this)).on("mouseleave",this._onMouseLeaveColumnHeader.bind(this)).on("touchstart",this._onTouchStartColumnHeader.bind(this)).on("dragstart",this._onStartDragColumnHeader.bind(this)).on("click",this._onClickColumnHeader.bind(this)).on("contextmenu.dgtable",(function(e){e.preventDefault()})),Al(s.firstChild).on("dragenter",this._onDragEnterColumnHeader.bind(this)).on("dragover",this._onDragOverColumnHeader.bind(this)).on("dragleave",this._onDragLeaveColumnHeader.bind(this)).on("drop",this._onDropColumnHeader.bind(this)),Ll&&Al(s).on("selectstart",function(e){return e.preventDefault(),this.dragDrop(),!1}.bind(s)));let u=parseFloat(i.css("padding-left"))||0,h=parseFloat(i.css("padding-right"))||0,c=parseFloat(i.css("padding-top"))||0,p=parseFloat(i.css("padding-bottom"))||0,f=l.scrollWidth+(e.clientWidth-l.offsetWidth),m="border-box"===i.css("box-sizing");if(m?a.css("box-sizing","border-box"):(f-=u+h,a.css("margin-top",parseFloat(Al(e).css("border-top-width"))||0)),!r.transparentBgColor1){let e=document.createElement("div");e.style.backgroundColor="transparent",r.transparentBgColor1=Al(e).css("background-color"),e.style.backgroundColor="rgba(0,0,0,0)",r.transparentBgColor2=Al(e).css("background-color")}let g={"box-sizing":m?"border-box":"content-box",width:f,"min-height":o.getElementHeight(i[0]),"padding-left":u,"padding-right":h,"padding-top":c,"padding-bottom":p,overflow:"hidden",position:"absolute","z-index":"-1",left:"0",top:"0",cursor:"default"};if(g){let t=Al(e).css("background-color");t!==r.transparentBgColor1&&t!==r.transparentBgColor2||(t=Al(e.parentNode).css("background-color")),t!==r.transparentBgColor1&&t!==r.transparentBgColor2||(t="#fff"),g["background-color"]=t}a.css(g),this.el.appendChild(s),Al(s.firstChild).css({direction:n.css("direction"),"white-space":n.css("white-space")}),d&&a.css({"-webkit-touch-callout":"none","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none"}),s.rowIndex=e.parentNode.rowIndex;let b=s.physicalRowIndex=e.parentNode.physicalRowIndex;s.columnName=r.visibleColumns[Ol.call(e.parentNode.childNodes,e)].name;try{let t=zl.saveSelection(e);t&&zl.restoreSelection(s,t)}catch(e){}if(this.trigger("cellpreview",s.firstChild,null==b?null:b,s.columnName,null==b?null:r.rows[b],e),r.abortCellPreview)return void a.remove();let v=this.$el,C=v[0]===window?Al(document):v,w=i.offset(),y=v.offset(),_="right"===i.css("float"),R=_?"right":"left";if(_){let e=Al(window).width();w.right=e-(w.left+o.getElementWidth(i[0],!0,!0,!0)),y.right=e-(y.left+o.getElementWidth(v[0],!0,!0,!0))}w.left-=parseFloat(v.css("border-left-width"))||0,w.right-=parseFloat(v.css("border-right-width"))||0,w.top-=parseFloat(v.css("border-top-width"))||0,w[R]+=parseFloat(Al(e).css("border-"+R+"-width"))||0,w.top+=parseFloat(Al(e).css("border-top-width"))||parseFloat(Al(e).css("border-bottom-width"))||0,w.left-=y.left,w.right-=y.right,w.top-=y.top;let W=0,T=v-o.getElementWidth(a[0],!0,!0,!0);w[R]=w[R]<W?W:w[R]>T?T:w[R];let N=o.getElementHeight(i[0],!0,!0,!0),E=C.scrollTop()+o.getElementHeight(v[0],!0)-N;w.top>E&&(w.top=Math.max(0,E));let S={top:w.top,"z-index":9999};S[R]=w[R],a.css(S),s.__cell=e,r.$cellPreviewCell=a,e.__previewCell=s,r._bindCellHoverOut(e),r._bindCellHoverOut(s),a.on("wheel",(()=>{this.hideCellPreview()}))}},jl.prototype._cellMouseOutEvent=function(e){this.hideCellPreview()},jl.prototype.hideCellPreview=function(){const e=this.p;if(e.$cellPreviewCell){let t,o=e.$cellPreviewCell[0],r=o.__cell;try{t=zl.saveSelection(o)}catch(e){}e.$cellPreviewCell.remove(),e._unbindCellHoverOut(r),e._unbindCellHoverOut(o);try{t&&zl.restoreSelection(r,t)}catch(e){}this.trigger("cellpreviewdestroy",o.firstChild,o.physicalRowIndex,o.columnName,r),r.__previewCell=null,o.__cell=null,e.$cellPreviewCell=null,e.abortCellPreview=!1}else e.abortCellPreview=!0;return this};const Vl={AUTO:0,ABSOLUTE:1,RELATIVE:2};jl.Width={NONE:"none",AUTO:"auto",SCROLL:"scroll"},Al.controls||(Al.controls={}),Al.controls.dgtable=jl,module.exports=jl;
|
|
6
6
|
|
|
7
7
|
//# sourceMappingURL=jquery.dgtable.cjs.min.js.map
|