/*!
   SpryMedia Ltd.

 This source file is free software, available under the following license:
   MIT license - http://datatables.net/license

 This source file is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.

 For details please refer to: http://www.datatables.net
 DataTables 1.12.1
 ©2008-2022 SpryMedia Ltd - datatables.net/license
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(l,y,A){l instanceof String&&(l=String(l));for(var q=l.length,E=0;E<q;E++){var P=l[E];if(y.call(A,P,E,l))return{i:E,v:P}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(l,y,A){if(l==Array.prototype||l==Object.prototype)return l;l[y]=A.value;return l};$jscomp.getGlobal=function(l){l=["object"==typeof globalThis&&globalThis,l,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var y=0;y<l.length;++y){var A=l[y];if(A&&A.Math==Math)return A}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(l,y){var A=$jscomp.propertyToPolyfillSymbol[y];if(null==A)return l[y];A=l[A];return void 0!==A?A:l[y]};$jscomp.polyfill=function(l,y,A,q){y&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(l,y,A,q):$jscomp.polyfillUnisolated(l,y,A,q))};$jscomp.polyfillUnisolated=function(l,y,A,q){A=$jscomp.global;l=l.split(".");for(q=0;q<l.length-1;q++){var E=l[q];if(!(E in A))return;A=A[E]}l=l[l.length-1];q=A[l];y=y(q);y!=q&&null!=y&&$jscomp.defineProperty(A,l,{configurable:!0,writable:!0,value:y})};$jscomp.polyfillIsolated=function(l,y,A,q){var E=l.split(".");l=1===E.length;q=E[0];q=!l&&q in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var P=0;P<E.length-1;P++){var la=E[P];if(!(la in q))return;q=q[la]}E=E[E.length-1];A=$jscomp.IS_SYMBOL_NATIVE&&"es6"===A?q[E]:null;y=y(A);null!=y&&(l?$jscomp.defineProperty($jscomp.polyfills,E,{configurable:!0,writable:!0,value:y}):y!==A&&($jscomp.propertyToPolyfillSymbol[E]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(E):$jscomp.POLYFILL_PREFIX+E,E=$jscomp.propertyToPolyfillSymbol[E],$jscomp.defineProperty(q,E,{configurable:!0,writable:!0,value:y})))};$jscomp.polyfill("Array.prototype.find",function(l){return l?l:function(y,A){return $jscomp.findInternal(this,y,A).v}},"es6","es3");(function(l){"function"===typeof define&&define.amd?define(["jquery"],function(y){return l(y,window,document)}):"object"===typeof exports?module.exports=function(y,A){y||(y=window);A||(A="undefined"!==typeof window?require("jquery"):require("jquery")(y));return l(A,y,y.document)}:window.DataTable=l(jQuery,window,document)})(function(l,y,A,q){function E(a){var b,c,d={};l.each(a,function(e,h){(b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" ")&&(c=e.replace(b[0],b[2].toLowerCase()),d[c]=e,"o"===b[1]&&E(a[e]))});a._hungarianMap=d}function P(a,b,c){a._hungarianMap||E(a);var d;l.each(b,function(e,h){d=a._hungarianMap[e];d===q||!c&&b[d]!==q||("o"===d.charAt(0)?(b[d]||(b[d]={}),l.extend(!0,b[d],b[e]),P(a[d],b[d],c)):b[d]=b[e])})}function la(a){var b=u.defaults.oLanguage,c=b.sDecimal;c&&bb(c);if(a){var d=a.sZeroRecords;!a.sEmptyTable&&d&&"No data available in table"===b.sEmptyTable&&Y(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&d&&"Loading..."===b.sLoadingRecords&&Y(a,a,"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&c!==a&&bb(a)}}function Db(a){S(a,"ordering","bSort");S(a,"orderMulti","bSortMulti");S(a,"orderClasses","bSortClasses");S(a,"orderCellsTop","bSortCellsTop");S(a,"order","aaSorting");S(a,"orderFixed","aaSortingFixed");S(a,"paging","bPaginate");S(a,"pagingType","sPaginationType");S(a,"pageLength","iDisplayLength");S(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":"");"boolean"===typeof a.scrollX&&(a.scrollX=a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&P(u.models.oSearch,a[b])}function Eb(a){S(a,"orderable","bSortable");S(a,"orderData","aDataSort");S(a,"orderSequence","asSorting");S(a,"orderDataType","sortDataType");var b=a.aDataSort;"number"!==typeof b||Array.isArray(b)||(a.aDataSort=[b])}function Fb(a){if(!u.__browser){var b={};u.__browser=b;var c=l("<div/>").css({position:"fixed",top:0,left:-1*l(y).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(l("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(l("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}l.extend(a.oBrowser,u.__browser);a.oScroll.iBarWidth=u.__browser.barWidth}
function Gb(a,b,c,d,e,h){var f=!1;if(c!==q){var g=c;f=!0}for(;d!==e;)a.hasOwnProperty(d)&&(g=f?b(g,a[d],d,a):a[d],f=!0,d+=h);return g}function cb(a,b){var c=u.defaults.column,d=a.aoColumns.length;c=l.extend({},u.models.oColumn,c,{nTh:b?b:A.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=l.extend({},u.models.oSearch,c[d]);Ia(a,d,l(b).data())}function Ia(a,b,c){b=a.aoColumns[b];var d=a.oClasses,e=l(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var h=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);h&&(b.sWidthOrig=h[1])}c!==q&&null!==c&&(Eb(c),P(u.defaults.column,c,!0),c.mDataProp===q||c.mData||(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),c.sClass&&e.addClass(c.sClass),h=b.sClass,l.extend(b,c),Y(b,c,"sWidth","sWidthOrig"),h!==b.sClass&&(b.sClass=h+" "+b.sClass),c.iDataSort!==q&&(b.aDataSort=[c.iDataSort]),Y(b,c,"aDataSort"));var f=b.mData,g=ma(f),k=b.mRender?ma(b.mRender):null;c=function(m){return"string"===typeof m&&-1!==m.indexOf("@")};b._bAttrSrc=l.isPlainObject(f)&&(c(f.sort)||c(f.type)||c(f.filter));b._setter=null;b.fnGetData=function(m,n,p){var t=g(m,n,q,p);return k&&n?k(t,n,m,p):t};b.fnSetData=function(m,n,p){return ha(f)(m,n,p)};"number"!==typeof f&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==l.inArray("asc",b.asSorting);c=-1!==l.inArray("desc",b.asSorting);b.bSortable&&(a||c)?a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI):(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI="")}function sa(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;db(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;""===b.sY&&""===b.sX||Ja(a);F(a,null,"column-sizing",[a])}function ta(a,b){a=Ka(a,"bVisible");return"number"===typeof a[b]?a[b]:null}function ua(a,b){a=Ka(a,"bVisible");b=l.inArray(b,a);return-1!==b?b:null}function na(a){var b=0;l.each(a.aoColumns,function(c,d){d.bVisible&&"none"!==l(d.nTh).css("display")&&b++});return b}function Ka(a,b){var c=[];l.map(a.aoColumns,function(d,e){d[b]&&c.push(e)});return c}function eb(a){var b=a.aoColumns,c=a.aoData,d=u.ext.type.detect,e,h,f;var g=0;for(e=b.length;g<e;g++){var k=b[g];var m=[];if(!k.sType&&k._sManualType)k.sType=k._sManualType;else if(!k.sType){var n=0;for(h=d.length;n<h;n++){var p=0;for(f=c.length;p<f;p++){m[p]===q&&(m[p]=T(a,p,g,"type"));var t=d[n](m[p],a);if(!t&&n!==d.length-1)break;if("html"===t&&!aa(m[p]))break}if(t){k.sType=t;break}}k.sType||(k.sType="string")}}}function Hb(a,b,c,d){var e,h,f,g=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){var k=b[e];var m=k.target!==q?k.target:k.targets!==q?k.targets:k.aTargets;Array.isArray(m)||(m=[m]);var n=0;for(h=m.length;n<h;n++)if("number"===typeof m[n]&&0<=m[n]){for(;g.length<=m[n];)cb(a);d(m[n],k)}else if("number"===typeof m[n]&&0>m[n])d(g.length+m[n],k);else if("string"===typeof m[n]){var p=0;for(f=g.length;p<f;p++)("_all"==m[n]||l(g[p].nTh).hasClass(m[n]))&&d(p,k)}}if(c)for(e=0,a=c.length;e<a;e++)d(e,c[e])}function ia(a,b,c,d){var e=a.aoData.length,h=l.extend(!0,{},u.models.oRow,{src:c?"dom":"data",idx:e});h._aData=b;a.aoData.push(h);for(var f=a.aoColumns,g=0,k=f.length;g<k;g++)f[g].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==q&&(a.aIds[b]=h);!c&&a.oFeatures.bDeferRender||fb(a,e,c,d);return e}function La(a,b){var c;b instanceof l||(b=l(b));return b.map(function(d,e){c=gb(a,e);return ia(a,c.data,e,c.cells)})}function T(a,b,c,d){"search"===d?d="filter":"order"===d&&(d="sort");var e=a.iDraw,h=a.aoColumns[c],f=a.aoData[b]._aData,g=h.sDefaultContent,k=h.fnGetData(f,d,{settings:a,row:b,col:c});if(k===q)return a.iDrawError!=e&&null===g&&(ea(a,0,"Requested unknown parameter "+("function"==typeof h.mData?"{function}":"'"+h.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),g;if((k===f||null===k)&&null!==g&&d!==q)k=g;else if("function"===typeof k)return k.call(f);if(null===k&&"display"===d)return"";"filter"===d&&(a=u.ext.type.search,a[h.sType]&&(k=a[h.sType](k)));return k}function Ib(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}function hb(a){return l.map(a.match(/(\\.|[^\.])+/g)||[""],function(b){return b.replace(/\\\./g,".")})}function ib(a){return U(a.aoData,"_aData")}function Ma(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0;a.aIds={}}function Na(a,b,c){for(var d=-1,e=0,h=a.length;e<h;e++)a[e]==b?d=e:a[e]>b&&a[e]--;-1!=d&&c===q&&a.splice(d,1)}function va(a,b,c,d){var e=a.aoData[b],h,f=function(k,m){for(;k.childNodes.length;)k.removeChild(k.firstChild);k.innerHTML=T(a,b,m,"display")};if("dom"!==c&&(c&&"auto"!==c||"dom"!==e.src)){var g=e.anCells;if(g)if(d!==q)f(g[d],d);else for(c=0,h=g.length;c<h;c++)f(g[c],c)}else e._aData=gb(a,e,d,d===q?q:e._aData).data;e._aSortData=null;e._aFilterData=null;f=a.aoColumns;if(d!==q)f[d].sType=null;else{c=0;for(h=f.length;c<h;c++)f[c].sType=null;jb(a,e)}}function gb(a,b,c,d){var e=[],h=b.firstChild,f,g=0,k,m=a.aoColumns,n=a._rowReadObject;d=d!==q?d:n?{}:[];var p=function(x,w){if("string"===typeof x){var r=x.indexOf("@");-1!==r&&(r=x.substring(r+1),ha(x)(d,w.getAttribute(r)))}},t=function(x){if(c===q||c===g)f=m[g],k=x.innerHTML.trim(),f&&f._bAttrSrc?(ha(f.mData._)(d,k),p(f.mData.sort,x),p(f.mData.type,x),p(f.mData.filter,x)):n?(f._setter||(f._setter=ha(f.mData)),f._setter(d,k)):d[g]=k;g++};if(h)for(;h;){var v=h.nodeName.toUpperCase();if("TD"==v||"TH"==v)t(h),e.push(h);h=h.nextSibling}else for(e=b.anCells,h=0,v=e.length;h<v;h++)t(e[h]);(b=b.firstChild?b:b.nTr)&&(b=b.getAttribute("id"))&&ha(a.rowId)(d,b);return{data:d,cells:e}}function fb(a,b,c,d){var e=a.aoData[b],h=e._aData,f=[],g,k;if(null===e.nTr){var m=c||A.createElement("tr");e.nTr=m;e.anCells=f;m._DT_RowIndex=b;jb(a,e);var n=0;for(g=a.aoColumns.length;n<g;n++){var p=a.aoColumns[n];e=(k=c?!1:!0)?A.createElement(p.sCellType):d[n];e._DT_CellIndex={row:b,column:n};f.push(e);if(k||!(!p.mRender&&p.mData===n||l.isPlainObject(p.mData)&&p.mData._===n+".display"))e.innerHTML=T(a,b,n,"display");p.sClass&&(e.className+=" "+p.sClass);p.bVisible&&!c?m.appendChild(e):!p.bVisible&&c&&e.parentNode.removeChild(e);p.fnCreatedCell&&p.fnCreatedCell.call(a.oInstance,e,T(a,b,n),h,b,n)}F(a,"aoRowCreatedCallback",null,[m,h,b,f])}}function jb(a,b){var c=b.nTr,d=b._aData;if(c){if(a=a.rowIdFn(d))c.id=a;d.DT_RowClass&&(a=d.DT_RowClass.split(" "),b.__rowc=b.__rowc?Oa(b.__rowc.concat(a)):a,l(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));d.DT_RowAttr&&l(c).attr(d.DT_RowAttr);d.DT_RowData&&l(c).data(d.DT_RowData)}}function Jb(a){var b,c,d=a.nTHead,e=a.nTFoot,h=0===l("th, td",d).length,f=a.oClasses,g=a.aoColumns;h&&(c=l("<tr/>").appendTo(d));var k=0;for(b=g.length;k<b;k++){var m=g[k];var n=l(m.nTh).addClass(m.sClass);h&&n.appendTo(c);a.oFeatures.bSort&&(n.addClass(m.sSortingClass),!1!==m.bSortable&&(n.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),kb(a,m.nTh,k)));m.sTitle!=n[0].innerHTML&&n.html(m.sTitle);lb(a,"header")(a,n,m,f)}h&&wa(a.aoHeader,d);l(d).children("tr").children("th, td").addClass(f.sHeaderTH);l(e).children("tr").children("th, td").addClass(f.sFooterTH);if(null!==e)for(a=a.aoFooter[0],k=0,b=a.length;k<b;k++)m=g[k],m.nTf=a[k].cell,m.sClass&&l(m.nTf).addClass(m.sClass)}function xa(a,b,c){var d,e,h=[],f=[],g=a.aoColumns.length;if(b){c===q&&(c=!1);var k=0;for(d=b.length;k<d;k++){h[k]=b[k].slice();h[k].nTr=b[k].nTr;for(e=g-1;0<=e;e--)a.aoColumns[e].bVisible||c||h[k].splice(e,1);f.push([])}k=0;for(d=h.length;k<d;k++){if(a=h[k].nTr)for(;e=a.firstChild;)a.removeChild(e);e=0;for(b=h[k].length;e<b;e++){var m=g=1;if(f[k][e]===q){a.appendChild(h[k][e].cell);for(f[k][e]=1;h[k+g]!==q&&h[k][e].cell==h[k+g][e].cell;)f[k+g][e]=1,g++;for(;h[k][e+m]!==q&&h[k][e].cell==h[k][e+m].cell;){for(c=0;c<g;c++)f[k+c][e+m]=1;m++}l(h[k][e].cell).attr("rowspan",g).attr("colspan",m)}}}}}function ja(a,b){var c="ssp"==Q(a),d=a.iInitDisplayStart;d!==q&&-1!==d&&(a._iDisplayStart=c?d:d>=a.fnRecordsDisplay()?0:d,a.iInitDisplayStart=-1);c=F(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==l.inArray(!1,c))V(a,!1);else{c=[];var e=0;d=a.asStripeClasses;var h=d.length,f=a.oLanguage,g="ssp"==Q(a),k=a.aiDisplay,m=a._iDisplayStart,n=a.fnDisplayEnd();a.bDrawing=!0;if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,V(a,!1);else if(!g)a.iDraw++;else if(!a.bDestroying&&!b){Kb(a);return}if(0!==k.length)for(b=g?a.aoData.length:n,f=g?0:m;f<b;f++){g=k[f];var p=a.aoData[g];null===p.nTr&&fb(a,g);var t=p.nTr;if(0!==h){var v=d[e%h];p._sRowStripe!=v&&(l(t).removeClass(p._sRowStripe).addClass(v),p._sRowStripe=v)}F(a,"aoRowCallback",null,[t,p._aData,e,f,g]);c.push(t);e++}else e=f.sZeroRecords,1==a.iDraw&&"ajax"==Q(a)?e=f.sLoadingRecords:f.sEmptyTable&&0===a.fnRecordsTotal()&&(e=f.sEmptyTable),c[0]=l("<tr/>",{"class":h?d[0]:""}).append(l("<td />",{valign:"top",colSpan:na(a),"class":a.oClasses.sRowEmpty}).html(e))[0];F(a,"aoHeaderCallback","header",[l(a.nTHead).children("tr")[0],ib(a),m,n,k]);F(a,"aoFooterCallback","footer",[l(a.nTFoot).children("tr")[0],ib(a),m,n,k]);d=l(a.nTBody);d.children().detach();d.append(l(c));F(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function ka(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&Lb(a);d?ya(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;ja(a);a._drawHold=!1}function Mb(a){var b=a.oClasses,c=l(a.nTable);c=l("<div/>").insertBefore(c);var d=a.oFeatures,e=l("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var h=a.sDom.split(""),f,g,k,m,n,p,t=0;t<h.length;t++){f=null;g=h[t];if("<"==g){k=l("<div/>")[0];m=h[t+1];if("'"==m||'"'==m){n="";for(p=2;h[t+p]!=m;)n+=h[t+p],p++;"H"==n?n=b.sJUIHeader:"F"==n&&(n=b.sJUIFooter);-1!=n.indexOf(".")?(m=n.split("."),k.id=m[0].substr(1,m[0].length-1),k.className=m[1]):"#"==n.charAt(0)?k.id=n.substr(1,n.length-1):k.className=n;t+=p}e.append(k);e=l(k)}else if(">"==g)e=e.parent();else if("l"==g&&d.bPaginate&&d.bLengthChange)f=Nb(a);else if("f"==g&&d.bFilter)f=Ob(a);else if("r"==g&&d.bProcessing)f=Pb(a);else if("t"==g)f=Qb(a);else if("i"==g&&d.bInfo)f=Rb(a);else if("p"==g&&d.bPaginate)f=Sb(a);else if(0!==u.ext.feature.length)for(k=u.ext.feature,p=0,m=k.length;p<m;p++)if(g==k[p].cFeature){f=k[p].fnInit(a);break}f&&(k=a.aanFeatures,k[g]||(k[g]=[]),k[g].push(f),e.append(f))}c.replaceWith(e);a.nHolding=null}function wa(a,b){b=l(b).children("tr");var c,d,e;a.splice(0,a.length);var h=0;for(e=b.length;h<e;h++)a.push([]);h=0;for(e=b.length;h<e;h++){var f=b[h];for(c=f.firstChild;c;){if("TD"==c.nodeName.toUpperCase()||"TH"==c.nodeName.toUpperCase()){var g=1*c.getAttribute("colspan");var k=1*c.getAttribute("rowspan");g=g&&0!==g&&1!==g?g:1;k=k&&0!==k&&1!==k?k:1;var m=0;for(d=a[h];d[m];)m++;var n=m;var p=1===g?!0:!1;for(d=0;d<g;d++)for(m=0;m<k;m++)a[h+m][n+d]={cell:c,unique:p},a[h+m].nTr=f}c=c.nextSibling}}}
function Pa(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],wa(c,b)));b=0;for(var e=c.length;b<e;b++)for(var h=0,f=c[b].length;h<f;h++)!c[b][h].unique||d[h]&&a.bSortCellsTop||(d[h]=c[b][h].cell);return d}function Qa(a,b,c){F(a,"aoServerParams","serverParams",[b]);if(b&&Array.isArray(b)){var d={},e=/(.*?)\[\]$/;l.each(b,function(n,p){(n=p.name.match(e))?(n=n[0],d[n]||(d[n]=[]),d[n].push(p.value)):d[p.name]=p.value});b=d}var h=a.ajax,f=a.oInstance,g=function(n){var p=a.jqXHR?a.jqXHR.status:null;if(null===n||"number"===typeof p&&204==p)n={},za(a,n,[]);(p=n.error||n.sError)&&ea(a,0,p);a.json=n;F(a,null,"xhr",[a,n,a.jqXHR]);c(n)};if(l.isPlainObject(h)&&h.data){var k=h.data;var m="function"===typeof k?k(b,a):k;b="function"===typeof k&&m?m:l.extend(!0,b,m);delete h.data}m={data:b,success:g,dataType:"json",cache:!1,type:a.sServerMethod,error:function(n,p,t){t=F(a,null,"xhr",[a,null,a.jqXHR]);-1===l.inArray(!0,t)&&("parsererror"==p?ea(a,0,"Invalid JSON response",1):4===n.readyState&&ea(a,0,"Ajax error",7));V(a,!1)}};a.oAjaxData=b;F(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(f,a.sAjaxSource,l.map(b,function(n,p){return{name:p,value:n}}),g,a):a.sAjaxSource||"string"===typeof h?a.jqXHR=l.ajax(l.extend(m,{url:h||a.sAjaxSource})):"function"===typeof h?a.jqXHR=h.call(f,b,g,a):(a.jqXHR=l.ajax(l.extend(m,h)),h.data=k)}function Kb(a){a.iDraw++;V(a,!0);Qa(a,Tb(a),function(b){Ub(a,b)})}function Tb(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,h=a.aoPreSearchCols,f=[],g=oa(a);var k=a._iDisplayStart;var m=!1!==d.bPaginate?a._iDisplayLength:-1;var n=function(x,w){f.push({name:x,value:w})};n("sEcho",a.iDraw);n("iColumns",c);n("sColumns",U(b,"sName").join(","));n("iDisplayStart",k);n("iDisplayLength",m);var p={draw:a.iDraw,columns:[],order:[],start:k,length:m,search:{value:e.sSearch,regex:e.bRegex}};for(k=0;k<c;k++){var t=b[k];var v=h[k];m="function"==typeof t.mData?"function":t.mData;p.columns.push({data:m,name:t.sName,searchable:t.bSearchable,orderable:t.bSortable,search:{value:v.sSearch,regex:v.bRegex}});n("mDataProp_"+k,m);d.bFilter&&(n("sSearch_"+k,v.sSearch),n("bRegex_"+k,v.bRegex),n("bSearchable_"+k,t.bSearchable));d.bSort&&n("bSortable_"+k,t.bSortable)}d.bFilter&&(n("sSearch",e.sSearch),n("bRegex",e.bRegex));d.bSort&&(l.each(g,function(x,w){p.order.push({column:w.col,dir:w.dir});n("iSortCol_"+x,w.col);n("sSortDir_"+x,w.dir)}),n("iSortingCols",g.length));b=u.ext.legacy.ajax;return null===b?a.sAjaxSource?f:p:b?f:p}function Ub(a,b){var c=function(f,g){return b[f]!==q?b[f]:b[g]},d=za(a,b),e=c("sEcho","draw"),h=c("iTotalRecords","recordsTotal");c=c("iTotalDisplayRecords","recordsFiltered");if(e!==q){if(1*e<a.iDraw)return;a.iDraw=1*e}d||(d=[]);Ma(a);a._iRecordsTotal=parseInt(h,10);a._iRecordsDisplay=parseInt(c,10);e=0;for(h=d.length;e<h;e++)ia(a,d[e]);a.aiDisplay=a.aiDisplayMaster.slice();ja(a,!0);a._bInitComplete||Ra(a,b);V(a,!1)}function za(a,b,c){a=l.isPlainObject(a.ajax)&&a.ajax.dataSrc!==q?a.ajax.dataSrc:a.sAjaxDataProp;if(!c)return"data"===a?b.aaData||b[a]:""!==a?ma(a)(b):b;ha(a)(b,c)}function Ob(a){var b=a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,h=a.aanFeatures,f='<input type="search" class="'+b.sFilterInput+'"/>',g=d.sSearch;g=g.match(/_INPUT_/)?g.replace("_INPUT_",f):g+f;b=l("<div/>",{id:h.f?null:c+"_filter","class":b.sFilter}).append(l("<label/>").append(g));var k=function(n){var p=this.value?this.value:"";e.return&&"Enter"!==n.key||p==e.sSearch||(ya(a,{sSearch:p,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive,"return":e.return}),a._iDisplayStart=0,ja(a))};h=null!==a.searchDelay?a.searchDelay:"ssp"===Q(a)?400:0;var m=l("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",h?mb(k,h):k).on("mouseup",function(n){setTimeout(function(){k.call(m[0],n)},10)}).on("keypress.DT",function(n){if(13==n.keyCode)return!1}).attr("aria-controls",c);l(a.nTable).on("search.dt.DT",function(n,p){if(a===p)try{m[0]!==A.activeElement&&m.val(e.sSearch)}catch(t){}});return b[0]}function ya(a,b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,h=function(g){d.sSearch=g.sSearch;d.bRegex=g.bRegex;d.bSmart=g.bSmart;d.bCaseInsensitive=g.bCaseInsensitive;d.return=g.return},f=function(g){return g.bEscapeRegex!==q?!g.bEscapeRegex:g.bRegex};eb(a);if("ssp"!=Q(a)){Vb(a,b.sSearch,c,f(b),b.bSmart,b.bCaseInsensitive,b.return);h(b);for(b=0;b<e.length;b++)Wb(a,e[b].sSearch,b,f(e[b]),e[b].bSmart,e[b].bCaseInsensitive);Xb(a)}else h(b);a.bFiltered=!0;F(a,null,"search",[a])}function Xb(a){for(var b=u.ext.search,c=a.aiDisplay,d,e,h=0,f=b.length;h<f;h++){for(var g=[],k=0,m=c.length;k<m;k++)e=c[k],d=a.aoData[e],b[h](a,d._aFilterData,e,d._aData,k)&&g.push(e);c.length=0;l.merge(c,g)}}function Wb(a,b,c,d,e,h){if(""!==b){var f=[],g=a.aiDisplay;d=nb(b,d,e,h);for(e=0;e<g.length;e++)b=a.aoData[g[e]]._aFilterData[c],d.test(b)&&f.push(g[e]);a.aiDisplay=f}}function Vb(a,b,c,d,e,h){e=nb(b,d,e,h);var f=a.oPreviousSearch.sSearch,g=a.aiDisplayMaster;h=[];0!==u.ext.search.length&&(c=!0);var k=Yb(a);if(0>=b.length)a.aiDisplay=g.slice();else{if(k||c||d||f.length>b.length||0!==b.indexOf(f)||a.bSorted)a.aiDisplay=g.slice();b=a.aiDisplay;for(c=0;c<b.length;c++)e.test(a.aoData[b[c]]._sFilterRow)&&h.push(b[c]);a.aiDisplay=h}}function nb(a,b,c,d){a=b?a:ob(a);c&&(a="^(?=.*?"+l.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(e){if('"'===e.charAt(0)){var h=e.match(/^"(.*)"$/);e=h?h[1]:e}return e.replace('"',"")}).join(")(?=.*?")+").*$");return new RegExp(a,d?"i":"")}function Yb(a){var b=a.aoColumns,c,d;var e=!1;var h=0;for(c=a.aoData.length;h<c;h++){var f=a.aoData[h];if(!f._aFilterData){var g=[];e=0;for(d=b.length;e<d;e++){var k=b[e];k.bSearchable?(k=T(a,h,e,"filter"),null===k&&(k=""),"string"!==typeof k&&k.toString&&(k=k.toString())):k="";k.indexOf&&-1!==k.indexOf("&")&&(Sa.innerHTML=k,k=Bc?Sa.textContent:Sa.innerText);k.replace&&(k=k.replace(/[\r\n\u2028]/g,""));g.push(k)}f._aFilterData=g;f._sFilterRow=g.join("  ");e=!0}}return e}function Zb(a){return{search:a.sSearch,smart:a.bSmart,regex:a.bRegex,caseInsensitive:a.bCaseInsensitive}}
function $b(a){return{sSearch:a.search,bSmart:a.smart,bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function Rb(a){var b=a.sTableId,c=a.aanFeatures.i,d=l("<div/>",{"class":a.oClasses.sInfo,id:c?null:b+"_info"});c||(a.aoDrawCallback.push({fn:ac,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),l(a.nTable).attr("aria-describedby",b+"_info"));return d[0]}function ac(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,d=a._iDisplayStart+1,e=a.fnDisplayEnd(),h=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),g=f?c.sInfo:c.sInfoEmpty;f!==h&&(g+=" "+c.sInfoFiltered);g+=c.sInfoPostFix;g=bc(a,g);c=c.fnInfoCallback;null!==c&&(g=c.call(a.oInstance,a,d,e,h,f,g));l(b).html(g)}}function bc(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,h=a.fnRecordsDisplay(),f=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,h)).replace(/_PAGE_/g,c.call(a,f?1:Math.ceil(d/e))).replace(/_PAGES_/g,c.call(a,f?1:Math.ceil(h/e)))}function Aa(a){var b=a.iInitDisplayStart,c=a.aoColumns;var d=a.oFeatures;var e=a.bDeferLoading;if(a.bInitialised){Mb(a);Jb(a);xa(a,a.aoHeader);xa(a,a.aoFooter);V(a,!0);d.bAutoWidth&&db(a);var h=0;for(d=c.length;h<d;h++){var f=c[h];f.sWidth&&(f.nTh.style.width=K(f.sWidth))}F(a,null,"preInit",[a]);ka(a);c=Q(a);if("ssp"!=c||e)"ajax"==c?Qa(a,[],function(g){var k=za(a,g);for(h=0;h<k.length;h++)ia(a,k[h]);a.iInitDisplayStart=b;ka(a);V(a,!1);Ra(a,g)},a):(V(a,!1),Ra(a))}else setTimeout(function(){Aa(a)},200)}function Ra(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&sa(a);F(a,null,"plugin-init",[a,b]);F(a,"aoInitComplete","init",[a,b])}function pb(a,b){b=parseInt(b,10);a._iDisplayLength=b;qb(a);F(a,null,"length",[a,b])}function Nb(a){var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=Array.isArray(d[0]),h=e?d[0]:d;d=e?d[1]:d;e=l("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect});for(var f=0,g=h.length;f<g;f++)e[0][f]=new Option("number"===typeof d[f]?a.fnFormatNumber(d[f]):d[f],h[f]);var k=l("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(k[0].id=c+"_length");k.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));l("select",k).val(a._iDisplayLength).on("change.DT",function(m){pb(a,l(this).val());ja(a)});l(a.nTable).on("length.dt.DT",function(m,n,p){a===n&&l("select",k).val(p)});return k[0]}function Sb(a){var b=a.sPaginationType,c=u.ext.pager[b],d="function"===typeof c,e=function(f){ja(f)};b=l("<div/>").addClass(a.oClasses.sPaging+b)[0];var h=a.aanFeatures;d||c.fnInit(a,b,e);h.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(f){if(d){var g=f._iDisplayStart,k=f._iDisplayLength,m=f.fnRecordsDisplay(),n=-1===k;g=n?0:Math.ceil(g/k);k=n?1:Math.ceil(m/k);m=c(g,k);var p;n=0;for(p=h.p.length;n<p;n++)lb(f,"pageButton")(f,h.p[n],n,m,g,k)}else c.fnUpdate(f,e)},sName:"pagination"}));return b}function Ta(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,h=a.fnRecordsDisplay();0===h||-1===e?d=0:"number"===typeof b?(d=b*e,d>h&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e<h&&(d+=e):"last"==b?d=Math.floor((h-1)/e)*e:ea(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==d;a._iDisplayStart=d;b&&(F(a,null,"page",[a]),c&&ja(a));return b}function Pb(a){return l("<div/>",{id:a.aanFeatures.r?null:a.sTableId+"_processing","class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).append("<div><div></div><div></div><div></div><div></div></div>").insertBefore(a.nTable)[0]}function V(a,b){a.oFeatures.bProcessing&&l(a.aanFeatures.r).css("display",b?"block":"none");F(a,null,"processing",[a,b])}function Qb(a){var b=l(a.nTable),c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,h=a.oClasses,f=b.children("caption"),g=f.length?f[0]._captionSide:null,k=l(b[0].cloneNode(!1)),m=l(b[0].cloneNode(!1)),n=b.children("tfoot");n.length||(n=null);k=l("<div/>",{"class":h.sScrollWrapper}).append(l("<div/>",{"class":h.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?d?K(d):null:"100%"}).append(l("<div/>",{"class":h.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(k.removeAttr("id").css("margin-left",0).append("top"===g?f:null).append(b.children("thead"))))).append(l("<div/>",{"class":h.sScrollBody}).css({position:"relative",overflow:"auto",width:d?K(d):null}).append(b));n&&k.append(l("<div/>",{"class":h.sScrollFoot}).css({overflow:"hidden",border:0,width:d?d?K(d):null:"100%"}).append(l("<div/>",{"class":h.sScrollFootInner}).append(m.removeAttr("id").css("margin-left",0).append("bottom"===g?f:null).append(b.children("tfoot")))));b=k.children();var p=b[0];h=b[1];var t=n?b[2]:null;if(d)l(h).on("scroll.DT",function(v){v=this.scrollLeft;p.scrollLeft=v;n&&(t.scrollLeft=v)});l(h).css("max-height",e);c.bCollapse||l(h).css("height",e);a.nScrollHead=p;a.nScrollBody=h;a.nScrollFoot=t;a.aoDrawCallback.push({fn:Ja,sName:"scrolling"});return k[0]}function Ja(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY;b=b.iBarWidth;var h=l(a.nScrollHead),f=h[0].style,g=h.children("div"),k=g[0].style,m=g.children("table");g=a.nScrollBody;var n=l(g),p=g.style,t=l(a.nScrollFoot).children("div"),v=t.children("table"),x=l(a.nTHead),w=l(a.nTable),r=w[0],C=r.style,G=a.nTFoot?l(a.nTFoot):null,ba=a.oBrowser,L=ba.bScrollOversize;U(a.aoColumns,"nTh");var O=[],I=[],H=[],fa=[],Z,Ba=function(D){D=D.style;D.paddingTop="0";D.paddingBottom="0";D.borderTopWidth="0";D.borderBottomWidth="0";D.height=0};var X=g.scrollHeight>g.clientHeight;if(a.scrollBarVis!==X&&a.scrollBarVis!==q)a.scrollBarVis=X,sa(a);else{a.scrollBarVis=X;w.children("thead, tfoot").remove();if(G){X=G.clone().prependTo(w);var ca=G.find("tr");var Ca=X.find("tr");X.find("[id]").removeAttr("id")}var Ua=x.clone().prependTo(w);x=x.find("tr");X=Ua.find("tr");Ua.find("th, td").removeAttr("tabindex");Ua.find("[id]").removeAttr("id");c||(p.width="100%",h[0].style.width="100%");l.each(Pa(a,Ua),function(D,W){Z=ta(a,D);W.style.width=a.aoColumns[Z].sWidth});G&&da(function(D){D.style.width=""},Ca);h=w.outerWidth();""===c?(C.width="100%",L&&(w.find("tbody").height()>g.offsetHeight||"scroll"==n.css("overflow-y"))&&(C.width=K(w.outerWidth()-b)),h=w.outerWidth()):""!==d&&(C.width=K(d),h=w.outerWidth());da(Ba,X);da(function(D){var W=y.getComputedStyle?y.getComputedStyle(D).width:K(l(D).width());H.push(D.innerHTML);O.push(W)},X);da(function(D,W){D.style.width=O[W]},x);l(X).css("height",0);G&&(da(Ba,Ca),da(function(D){fa.push(D.innerHTML);I.push(K(l(D).css("width")))},Ca),da(function(D,W){D.style.width=I[W]},ca),l(Ca).height(0));da(function(D,W){D.innerHTML='<div class="dataTables_sizing">'+H[W]+"</div>";D.childNodes[0].style.height="0";D.childNodes[0].style.overflow="hidden";D.style.width=O[W]},X);G&&da(function(D,W){D.innerHTML='<div class="dataTables_sizing">'+fa[W]+"</div>";D.childNodes[0].style.height="0";D.childNodes[0].style.overflow="hidden";D.style.width=I[W]},Ca);Math.round(w.outerWidth())<Math.round(h)?(ca=g.scrollHeight>g.offsetHeight||"scroll"==n.css("overflow-y")?h+b:h,L&&(g.scrollHeight>g.offsetHeight||"scroll"==n.css("overflow-y"))&&(C.width=K(ca-b)),""!==c&&""===d||ea(a,1,"Possible column misalignment",6)):ca="100%";p.width=K(ca);f.width=K(ca);G&&(a.nScrollFoot.style.width=K(ca));!e&&L&&(p.height=K(r.offsetHeight+b));c=w.outerWidth();m[0].style.width=K(c);k.width=K(c);d=w.height()>g.clientHeight||"scroll"==n.css("overflow-y");e="padding"+(ba.bScrollbarLeft?"Left":"Right");k[e]=d?b+"px":"0px";G&&(v[0].style.width=K(c),t[0].style.width=K(c),t[0].style[e]=d?b+"px":"0px");w.children("colgroup").insertBefore(w.children("thead"));n.trigger("scroll");!a.bSorted&&!a.bFiltered||a._drawHold||(g.scrollTop=0)}}function da(a,b,c){for(var d=0,e=0,h=b.length,f,g;e<h;){f=b[e].firstChild;for(g=c?c[e].firstChild:null;f;)1===f.nodeType&&(c?a(f,g,d):a(f,d),d++),f=f.nextSibling,g=c?g.nextSibling:null;e++}}function db(a){var b=a.nTable,c=a.aoColumns,d=a.oScroll,e=d.sY,h=d.sX,f=d.sXInner,g=c.length,k=Ka(a,"bVisible"),m=l("th",a.nTHead),n=b.getAttribute("width"),p=b.parentNode,t=!1,v,x=a.oBrowser;d=x.bScrollOversize;(v=b.style.width)&&-1!==v.indexOf("%")&&(n=v);for(v=0;v<k.length;v++){var w=c[k[v]];null!==w.sWidth&&(w.sWidth=cc(w.sWidthOrig,p),t=!0)}if(d||!t&&!h&&!e&&g==na(a)&&g==m.length)for(v=0;v<g;v++)k=ta(a,v),null!==k&&(c[k].sWidth=K(m.eq(v).width()));else{g=l(b).clone().css("visibility","hidden").removeAttr("id");g.find("tbody tr").remove();var r=l("<tr/>").appendTo(g.find("tbody"));g.find("thead, tfoot").remove();g.append(l(a.nTHead).clone()).append(l(a.nTFoot).clone());g.find("tfoot th, tfoot td").css("width","");m=Pa(a,g.find("thead")[0]);for(v=0;v<k.length;v++)w=c[k[v]],m[v].style.width=null!==w.sWidthOrig&&""!==w.sWidthOrig?K(w.sWidthOrig):"",w.sWidthOrig&&h&&l(m[v]).append(l("<div/>").css({width:w.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(v=0;v<k.length;v++)t=k[v],w=c[t],l(dc(a,t)).clone(!1).append(w.sContentPadding).appendTo(r);l("[name]",g).removeAttr("name");w=l("<div/>").css(h||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(g).appendTo(p);h&&f?g.width(f):h?(g.css("width","auto"),g.removeAttr("width"),g.width()<p.clientWidth&&n&&g.width(p.clientWidth)):e?g.width(p.clientWidth):n&&g.width(n);for(v=e=0;v<k.length;v++)p=l(m[v]),f=p.outerWidth()-p.width(),p=x.bBounding?Math.ceil(m[v].getBoundingClientRect().width):p.outerWidth(),e+=p,c[k[v]].sWidth=K(p-f);b.style.width=K(e);w.remove()}n&&(b.style.width=K(n));!n&&!h||a._reszEvt||(b=function(){l(y).on("resize.DT-"+a.sInstance,mb(function(){sa(a)}))},d?setTimeout(b,1E3):b(),a._reszEvt=!0)}function cc(a,b){if(!a)return 0;a=l("<div/>").css("width",K(a)).appendTo(b||A.body);b=a[0].offsetWidth;a.remove();return b}function dc(a,b){var c=ec(a,b);if(0>c)return null;var d=a.aoData[c];return d.nTr?d.anCells[b]:l("<td/>").html(T(a,c,b,"display"))[0]}function ec(a,b){for(var c,d=-1,e=-1,h=0,f=a.aoData.length;h<f;h++)c=T(a,h,b,"display")+"",c=c.replace(Cc,""),c=c.replace(/&nbsp;/g," "),c.length>d&&(d=c.length,e=h);return e}function K(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function oa(a){var b=[],c=a.aoColumns;var d=a.aaSortingFixed;var e=l.isPlainObject(d);var h=[];var f=function(n){n.length&&!Array.isArray(n[0])?h.push(n):l.merge(h,n)};Array.isArray(d)&&f(d);e&&d.pre&&f(d.pre);f(a.aaSorting);e&&d.post&&f(d.post);for(a=0;a<h.length;a++){var g=h[a][0];f=c[g].aDataSort;d=0;for(e=f.length;d<e;d++){var k=f[d];var m=c[k].sType||"string";h[a]._idx===q&&(h[a]._idx=l.inArray(h[a][1],c[k].asSorting));b.push({src:g,col:k,dir:h[a][1],index:h[a]._idx,type:m,formatter:u.ext.type.order[m+"-pre"]})}}return b}
function Lb(a){var b,c=[],d=u.ext.type.order,e=a.aoData,h=0,f=a.aiDisplayMaster;eb(a);var g=oa(a);var k=0;for(b=g.length;k<b;k++){var m=g[k];m.formatter&&h++;fc(a,m.col)}if("ssp"!=Q(a)&&0!==g.length){k=0;for(b=f.length;k<b;k++)c[f[k]]=k;h===g.length?f.sort(function(n,p){var t,v=g.length,x=e[n]._aSortData,w=e[p]._aSortData;for(t=0;t<v;t++){var r=g[t];var C=x[r.col];var G=w[r.col];C=C<G?-1:C>G?1:0;if(0!==C)return"asc"===r.dir?C:-C}C=c[n];G=c[p];return C<G?-1:C>G?1:0}):f.sort(function(n,p){var t,v=g.length,x=e[n]._aSortData,w=e[p]._aSortData;for(t=0;t<v;t++){var r=g[t];var C=x[r.col];var G=w[r.col];r=d[r.type+"-"+r.dir]||d["string-"+r.dir];C=r(C,G);if(0!==C)return C}C=c[n];G=c[p];return C<G?-1:C>G?1:0})}a.bSorted=!0}function gc(a){var b=a.aoColumns,c=oa(a);a=a.oLanguage.oAria;for(var d=0,e=b.length;d<e;d++){var h=b[d];var f=h.asSorting;var g=h.ariaTitle||h.sTitle.replace(/<.*?>/g,"");var k=h.nTh;k.removeAttribute("aria-sort");h.bSortable&&(0<c.length&&c[0].col==d?(k.setAttribute("aria-sort","asc"==c[0].dir?"ascending":"descending"),h=f[c[0].index+1]||f[0]):h=f[0],g+="asc"===h?a.sSortAscending:a.sSortDescending);k.setAttribute("aria-label",g)}}function rb(a,b,c,d){var e=a.aaSorting,h=a.aoColumns[b].asSorting,f=function(g,k){var m=g._idx;m===q&&(m=l.inArray(g[1],h));return m+1<h.length?m+1:k?null:0};"number"===typeof e[0]&&(e=a.aaSorting=[e]);c&&a.oFeatures.bSortMulti?(c=l.inArray(b,U(e,"0")),-1!==c?(b=f(e[c],!0),null===b&&1===e.length&&(b=0),null===b?e.splice(c,1):(e[c][1]=h[b],e[c]._idx=b)):(e.push([b,h[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=f(e[0]),e.length=1,e[0][1]=h[b],e[0]._idx=b):(e.length=0,e.push([b,h[0]]),e[0]._idx=0);ka(a);"function"==typeof d&&d(a)}function kb(a,b,c,d){var e=a.aoColumns[c];sb(b,{},function(h){!1!==e.bSortable&&(a.oFeatures.bProcessing?(V(a,!0),setTimeout(function(){rb(a,c,h.shiftKey,d);"ssp"!==Q(a)&&V(a,!1)},0)):rb(a,c,h.shiftKey,d))})}function Va(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=oa(a),e=a.oFeatures,h;if(e.bSort&&e.bSortClasses){e=0;for(h=b.length;e<h;e++){var f=b[e].src;l(U(a.aoData,"anCells",f)).removeClass(c+(2>e?e+1:3))}e=0;for(h=d.length;e<h;e++)f=d[e].src,l(U(a.aoData,"anCells",f)).addClass(c+(2>e?e+1:3))}a.aLastSort=d}function fc(a,b){var c=a.aoColumns[b],d=u.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,ua(a,b)));for(var h,f=u.ext.type.order[c.sType+"-pre"],g=0,k=a.aoData.length;g<k;g++)if(c=a.aoData[g],c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)h=d?e[g]:T(a,g,b,"sort"),c._aSortData[b]=f?f(h):h}
function Da(a){if(!a._bLoadingState){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:l.extend(!0,[],a.aaSorting),search:Zb(a.oPreviousSearch),columns:l.map(a.aoColumns,function(c,d){return{visible:c.bVisible,search:Zb(a.aoPreSearchCols[d])}})};a.oSavedState=b;F(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oFeatures.bStateSave&&!a.bDestroying&&a.fnStateSaveCallback.call(a.oInstance,a,b)}}function hc(a,b,c){if(a.oFeatures.bStateSave)return b=a.fnStateLoadCallback.call(a.oInstance,a,function(d){tb(a,d,c)}),b!==q&&tb(a,b,c),!0;c()}function tb(a,b,c){var d,e=a.aoColumns;a._bLoadingState=!0;var h=a._bInitComplete?new u.Api(a):null;if(b&&b.time){var f=F(a,"aoStateLoadParams","stateLoadParams",[a,b]);if(-1!==l.inArray(!1,f))a._bLoadingState=!1;else if(f=a.iStateDuration,0<f&&b.time<+new Date-1E3*f)a._bLoadingState=!1;else if(b.columns&&e.length!==b.columns.length)a._bLoadingState=!1;else{a.oLoadedState=l.extend(!0,{},b);b.length!==q&&(h?h.page.len(b.length):a._iDisplayLength=b.length);b.start!==q&&(null===h?(a._iDisplayStart=b.start,a.iInitDisplayStart=b.start):Ta(a,b.start/a._iDisplayLength));b.order!==q&&(a.aaSorting=[],l.each(b.order,function(k,m){a.aaSorting.push(m[0]>=e.length?[0,m[1]]:m)}));b.search!==q&&l.extend(a.oPreviousSearch,$b(b.search));if(b.columns){f=0;for(d=b.columns.length;f<d;f++){var g=b.columns[f];g.visible!==q&&(h?h.column(f).visible(g.visible,!1):e[f].bVisible=g.visible);g.search!==q&&l.extend(a.aoPreSearchCols[f],$b(g.search))}h&&h.columns.adjust()}a._bLoadingState=!1;F(a,"aoStateLoaded","stateLoaded",[a,b])}}else a._bLoadingState=!1;c()}function Wa(a){var b=u.settings;a=l.inArray(a,U(b,"nTable"));return-1!==a?b[a]:null}function ea(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+" - ":"")+c;d&&(c+=". For more information about this error, please see http://datatables.net/tn/"+d);if(b)y.console&&console.log&&console.log(c);else if(b=u.ext,b=b.sErrMode||b.errMode,a&&F(a,null,"error",[a,d,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"==typeof b&&b(a,d,c)}}function Y(a,b,c,d){Array.isArray(c)?l.each(c,function(e,h){Array.isArray(h)?Y(a,b,h[0],h[1]):Y(a,b,h)}):(d===q&&(d=c),b[c]!==q&&(a[d]=b[c]))}function ub(a,b,c){var d;for(d in b)if(b.hasOwnProperty(d)){var e=b[d];l.isPlainObject(e)?(l.isPlainObject(a[d])||(a[d]={}),l.extend(!0,a[d],e)):c&&"data"!==d&&"aaData"!==d&&Array.isArray(e)?a[d]=e.slice():a[d]=e}return a}function sb(a,b,c){l(a).on("click.DT",b,function(d){l(a).trigger("blur");c(d)}).on("keypress.DT",b,function(d){13===d.which&&(d.preventDefault(),c(d))}).on("selectstart.DT",function(){return!1})}function R(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function F(a,b,c,d){var e=[];b&&(e=l.map(a[b].slice().reverse(),function(h,f){return h.fn.apply(a.oInstance,d)}));null!==c&&(b=l.Event(c+".dt"),l(a.nTable).trigger(b,d),e.push(b.result));return e}function qb(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function lb(a,b){a=a.renderer;var c=u.ext.renderer[b];return l.isPlainObject(a)&&a[b]?c[a[b]]||c._:"string"===typeof a?c[a]||c._:c._}function Q(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function Ea(a,b){var c=ic.numbers_length,d=Math.floor(c/2);b<=c?a=pa(0,b):a<=d?(a=pa(0,c-2),a.push("ellipsis"),a.push(b-1)):(a>=b-1-d?a=pa(b-(c-2),b):(a=pa(a-d+2,a+d-1),a.push("ellipsis"),a.push(b-1)),a.splice(0,0,"ellipsis"),a.splice(0,0,0));a.DT_el="span";return a}function bb(a){l.each({num:function(b){return Xa(b,a)},"num-fmt":function(b){return Xa(b,a,vb)},"html-num":function(b){return Xa(b,a,Ya)},"html-num-fmt":function(b){return Xa(b,a,Ya,vb)}},function(b,c){M.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(M.type.search[b+a]=M.type.search.html)})}function jc(a,b,c,d,e){return y.moment?a[b](e):y.luxon?a[c](e):d?a[d](e):a}function Za(a,b,c){if(y.moment){var d=y.moment.utc(a,b,c,!0);if(!d.isValid())return null}else if(y.luxon){d=b?y.luxon.DateTime.fromFormat(a,b):y.luxon.DateTime.fromISO(a);if(!d.isValid)return null;d.setLocale(c)}else b?(kc||alert("DataTables warning: Formatted date without Moment.js or Luxon - https://datatables.net/tn/17"),kc=!0):d=new Date(a);return d}function wb(a){return function(b,c,d,e){0===arguments.length?(d="en",b=c=null):1===arguments.length?(d="en",c=b,b=null):2===arguments.length&&(d=c,c=b,b=null);var h="datetime-"+c;u.ext.type.order[h]||(u.ext.type.detect.unshift(function(f){return f===h?h:!1}),u.ext.type.order[h+"-asc"]=function(f,g){f=f.valueOf();g=g.valueOf();return f===g?0:f<g?-1:1},u.ext.type.order[h+"-desc"]=function(f,g){f=f.valueOf();g=g.valueOf();return f===g?0:f>g?-1:1});return function(f,g){if(null===f||f===q)"--now"===e?(f=new Date,f=new Date(Date.UTC(f.getFullYear(),f.getMonth(),f.getDate(),f.getHours(),f.getMinutes(),f.getSeconds()))):f="";if("type"===g)return h;if(""===f)return"sort"!==g?"":Za("0000-01-01 00:00:00",null,d);if(null!==c&&b===c&&"sort"!==g&&"type"!==g&&!(f instanceof Date))return f;var k=Za(f,b,d);if(null===k)return f;if("sort"===g)return k;f=null===c?jc(k,"toDate","toJSDate","")[a]():jc(k,"format","toFormat","toISOString",c);return"display"===g?$a(f):f}}}function lc(a){return function(){var b=[Wa(this[u.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return u.ext.internal[a].apply(this,b)}}var u=function(a,b){if(this instanceof u)return l(a).DataTable(b);b=a;this.$=function(f,g){return this.api(!0).$(f,g)};this._=function(f,g){return this.api(!0).rows(f,g).data()};this.api=function(f){return f?new B(Wa(this[M.iApiIndex])):new B(this)};this.fnAddData=function(f,g){var k=this.api(!0);f=Array.isArray(f)&&(Array.isArray(f[0])||l.isPlainObject(f[0]))?k.rows.add(f):k.row.add(f);(g===q||g)&&k.draw();return f.flatten().toArray()};this.fnAdjustColumnSizing=function(f){var g=this.api(!0).columns.adjust(),k=g.settings()[0],m=k.oScroll;f===q||f?g.draw(!1):(""!==m.sX||""!==m.sY)&&Ja(k)};this.fnClearTable=function(f){var g=this.api(!0).clear();(f===q||f)&&g.draw()};this.fnClose=function(f){this.api(!0).row(f).child.hide()};this.fnDeleteRow=function(f,g,k){var m=this.api(!0);f=m.rows(f);var n=f.settings()[0],p=n.aoData[f[0][0]];f.remove();g&&g.call(this,n,p);(k===q||k)&&m.draw();return p};this.fnDestroy=function(f){this.api(!0).destroy(f)};this.fnDraw=function(f){this.api(!0).draw(f)};this.fnFilter=function(f,g,k,m,n,p){n=this.api(!0);null===g||g===q?n.search(f,k,m,p):n.column(g).search(f,k,m,p);n.draw()};this.fnGetData=function(f,g){var k=this.api(!0);if(f!==q){var m=f.nodeName?f.nodeName.toLowerCase():"";return g!==q||"td"==m||"th"==m?k.cell(f,g).data():k.row(f).data()||null}return k.data().toArray()};this.fnGetNodes=function(f){var g=this.api(!0);return f!==q?g.row(f).node():g.rows().nodes().flatten().toArray()};this.fnGetPosition=function(f){var g=this.api(!0),k=f.nodeName.toUpperCase();return"TR"==k?g.row(f).index():"TD"==k||"TH"==k?(f=g.cell(f).index(),[f.row,f.columnVisible,f.column]):null};this.fnIsOpen=function(f){return this.api(!0).row(f).child.isShown()};this.fnOpen=function(f,g,k){return this.api(!0).row(f).child(g,k).show().child()[0]};this.fnPageChange=function(f,g){f=this.api(!0).page(f);(g===q||g)&&f.draw(!1)};this.fnSetColumnVis=function(f,g,k){f=this.api(!0).column(f).visible(g);(k===q||k)&&f.columns.adjust().draw()};this.fnSettings=function(){return Wa(this[M.iApiIndex])};this.fnSort=function(f){this.api(!0).order(f).draw()};this.fnSortListener=function(f,g,k){this.api(!0).order.listener(f,g,k)};this.fnUpdate=function(f,g,k,m,n){var p=this.api(!0);k===q||null===k?p.row(g).data(f):p.cell(g,k).data(f);(n===q||n)&&p.columns.adjust();(m===q||m)&&p.draw();return 0};this.fnVersionCheck=M.fnVersionCheck;var c=this,d=b===q,e=this.length;d&&(b={});this.oApi=this.internal=M.internal;for(var h in u.ext.internal)h&&(this[h]=lc(h));this.each(function(){var f={},g=1<e?ub(f,b,!0):b,k=0,m;f=this.getAttribute("id");var n=!1,p=u.defaults,t=l(this);if("table"!=this.nodeName.toLowerCase())ea(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{Db(p);Eb(p.column);P(p,p,!0);P(p.column,p.column,!0);P(p,l.extend(g,t.data()),!0);var v=u.settings;k=0;for(m=v.length;k<m;k++){var x=v[k];if(x.nTable==this||x.nTHead&&x.nTHead.parentNode==this||x.nTFoot&&x.nTFoot.parentNode==this){var w=g.bRetrieve!==q?g.bRetrieve:p.bRetrieve;if(d||w)return x.oInstance;if(g.bDestroy!==q?g.bDestroy:p.bDestroy){x.oInstance.fnDestroy();break}else{ea(x,0,"Cannot reinitialise DataTable",3);return}}if(x.sTableId==this.id){v.splice(k,1);break}}if(null===f||""===f)this.id=f="DataTables_Table_"+u.ext._unique++;var r=l.extend(!0,{},u.models.oSettings,{sDestroyWidth:t[0].style.width,sInstance:f,sTableId:f});r.nTable=this;r.oApi=c.internal;r.oInit=g;v.push(r);r.oInstance=1===c.length?c:t.dataTable();Db(g);la(g.oLanguage);g.aLengthMenu&&!g.iDisplayLength&&(g.iDisplayLength=Array.isArray(g.aLengthMenu[0])?g.aLengthMenu[0][0]:g.aLengthMenu[0]);g=ub(l.extend(!0,{},p),g);Y(r.oFeatures,g,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));Y(r,g,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]);Y(r.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);Y(r.oLanguage,g,"fnInfoCallback");R(r,"aoDrawCallback",g.fnDrawCallback,"user");R(r,"aoServerParams",g.fnServerParams,"user");R(r,"aoStateSaveParams",g.fnStateSaveParams,"user");R(r,"aoStateLoadParams",g.fnStateLoadParams,"user");R(r,"aoStateLoaded",g.fnStateLoaded,"user");R(r,"aoRowCallback",g.fnRowCallback,"user");R(r,"aoRowCreatedCallback",g.fnCreatedRow,"user");R(r,"aoHeaderCallback",g.fnHeaderCallback,"user");R(r,"aoFooterCallback",g.fnFooterCallback,"user");R(r,"aoInitComplete",g.fnInitComplete,"user");R(r,"aoPreDrawCallback",g.fnPreDrawCallback,"user");r.rowIdFn=ma(g.rowId);Fb(r);var C=r.oClasses;l.extend(C,u.ext.classes,g.oClasses);t.addClass(C.sTable);r.iInitDisplayStart===q&&(r.iInitDisplayStart=g.iDisplayStart,r._iDisplayStart=g.iDisplayStart);null!==g.iDeferLoading&&(r.bDeferLoading=!0,f=Array.isArray(g.iDeferLoading),r._iRecordsDisplay=f?g.iDeferLoading[0]:g.iDeferLoading,r._iRecordsTotal=f?g.iDeferLoading[1]:g.iDeferLoading);var G=r.oLanguage;l.extend(!0,G,g.oLanguage);G.sUrl?(l.ajax({dataType:"json",url:G.sUrl,success:function(I){P(p.oLanguage,I);la(I);l.extend(!0,G,I,r.oInit.oLanguage);F(r,null,"i18n",[r]);Aa(r)},error:function(){Aa(r)}}),n=!0):F(r,null,"i18n",[r]);null===g.asStripeClasses&&(r.asStripeClasses=[C.sStripeOdd,C.sStripeEven]);f=r.asStripeClasses;var ba=t.children("tbody").find("tr").eq(0);-1!==l.inArray(!0,l.map(f,function(I,H){return ba.hasClass(I)}))&&(l("tbody tr",this).removeClass(f.join(" ")),r.asDestroyStripes=f.slice());f=[];v=this.getElementsByTagName("thead");0!==v.length&&(wa(r.aoHeader,v[0]),f=Pa(r));if(null===g.aoColumns)for(v=[],k=0,m=f.length;k<m;k++)v.push(null);else v=g.aoColumns;k=0;for(m=v.length;k<m;k++)cb(r,f?f[k]:null);Hb(r,g.aoColumnDefs,v,function(I,H){Ia(r,I,H)});if(ba.length){var L=function(I,H){return null!==I.getAttribute("data-"+H)?H:null};l(ba[0]).children("th, td").each(function(I,H){var fa=r.aoColumns[I];if(fa.mData===I){var Z=L(H,"sort")||L(H,"order");H=L(H,"filter")||L(H,"search");if(null!==Z||null!==H)fa.mData={_:I+".display",sort:null!==Z?I+".@data-"+Z:q,type:null!==Z?I+".@data-"+Z:q,filter:null!==H?I+".@data-"+H:q},Ia(r,I)}})}var O=r.oFeatures;f=function(){if(g.aaSorting===q){var I=r.aaSorting;k=0;for(m=I.length;k<m;k++)I[k][1]=r.aoColumns[k].asSorting[0]}Va(r);O.bSort&&R(r,"aoDrawCallback",function(){if(r.bSorted){var Z=oa(r),Ba={};l.each(Z,function(X,ca){Ba[ca.src]=ca.dir});F(r,null,"order",[r,Z,Ba]);gc(r)}});R(r,"aoDrawCallback",function(){(r.bSorted||"ssp"===Q(r)||O.bDeferRender)&&Va(r)},"sc");I=t.children("caption").each(function(){this._captionSide=l(this).css("caption-side")});var H=t.children("thead");0===H.length&&(H=l("<thead/>").appendTo(t));r.nTHead=H[0];var fa=t.children("tbody");0===fa.length&&(fa=l("<tbody/>").insertAfter(H));r.nTBody=fa[0];H=t.children("tfoot");0===H.length&&0<I.length&&(""!==r.oScroll.sX||""!==r.oScroll.sY)&&(H=l("<tfoot/>").appendTo(t));0===H.length||0===H.children().length?t.addClass(C.sNoFooter):0<H.length&&(r.nTFoot=H[0],wa(r.aoFooter,r.nTFoot));if(g.aaData)for(k=0;k<g.aaData.length;k++)ia(r,g.aaData[k]);else(r.bDeferLoading||"dom"==Q(r))&&La(r,l(r.nTBody).children("tr"));r.aiDisplay=r.aiDisplayMaster.slice();r.bInitialised=!0;!1===n&&Aa(r)};R(r,"aoDrawCallback",Da,"state_save");g.bStateSave?(O.bStateSave=!0,hc(r,g,f)):f()}});c=null;return this},M,z,J,xb={},mc=/[\r\n\u2028]/g,Ya=/<.*?>/g,Dc=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,Ec=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\|\$|\^|\-)/g,vb=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,aa=function(a){return a&&!0!==a&&"-"!==a?!1:!0},nc=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},oc=function(a,b){xb[b]||(xb[b]=new RegExp(ob(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(xb[b],"."):a},yb=function(a,b,c){var d="string"===typeof a;if(aa(a))return!0;b&&d&&(a=oc(a,b));c&&d&&(a=a.replace(vb,""));return!isNaN(parseFloat(a))&&isFinite(a)},pc=function(a,b,c){return aa(a)?!0:aa(a)||"string"===typeof a?yb(a.replace(Ya,""),b,c)?!0:null:null},U=function(a,b,c){var d=[],e=0,h=a.length;if(c!==q)for(;e<h;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e<h;e++)a[e]&&d.push(a[e][b]);return d},Fa=function(a,b,c,d){var e=[],h=0,f=b.length;if(d!==q)for(;h<f;h++)a[b[h]][c]&&e.push(a[b[h]][c][d]);else for(;h<f;h++)e.push(a[b[h]][c]);return e},pa=function(a,b){var c=[];if(b===q){b=0;var d=a}else d=b,b=a;for(a=b;a<d;a++)c.push(a);return c},qc=function(a){for(var b=[],c=0,d=a.length;c<d;c++)a[c]&&b.push(a[c]);return b},Oa=function(a){a:{if(!(2>a.length)){var b=a.slice().sort();for(var c=b[0],d=1,e=b.length;d<e;d++){if(b[d]===c){b=!1;break a}c=b[d]}}b=!0}if(b)return a.slice();b=[];e=a.length;var h,f=0;d=0;a:for(;d<e;d++){c=a[d];for(h=0;h<f;h++)if(b[h]===c)continue a;b.push(c);f++}return b},rc=function(a,b){if(Array.isArray(b))for(var c=0;c<b.length;c++)rc(a,b[c]);else a.push(b);return a},sc=function(a,b){b===q&&(b=0);return-1!==this.indexOf(a,b)};Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});Array.prototype.includes||(Array.prototype.includes=sc);String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")});String.prototype.includes||(String.prototype.includes=sc);u.util={throttle:function(a,b){var c=b!==q?b:200,d,e;return function(){var h=this,f=+new Date,g=arguments;d&&f<d+c?(clearTimeout(e),e=setTimeout(function(){d=q;a.apply(h,g)},c)):(d=f,a.apply(h,g))}},escapeRegex:function(a){return a.replace(Ec,"\\$1")},set:function(a){if(l.isPlainObject(a))return u.util.set(a._);if(null===a)return function(){};if("function"===typeof a)return function(c,d,e){a(c,"set",d,e)};if("string"!==typeof a||-1===a.indexOf(".")&&-1===a.indexOf("[")&&-1===a.indexOf("("))return function(c,d){c[a]=d};var b=function(c,d,e){e=hb(e);var h=e[e.length-1];for(var f,g,k=0,m=e.length-1;k<m;k++){if("__proto__"===e[k]||"constructor"===e[k])throw Error("Cannot set prototype values");f=e[k].match(Ga);g=e[k].match(qa);if(f){e[k]=e[k].replace(Ga,"");c[e[k]]=[];h=e.slice();h.splice(0,k+1);f=h.join(".");if(Array.isArray(d))for(g=0,m=d.length;g<m;g++)h={},b(h,d[g],f),c[e[k]].push(h);else c[e[k]]=d;return}g&&(e[k]=e[k].replace(qa,""),c=c[e[k]](d));if(null===c[e[k]]||c[e[k]]===q)c[e[k]]={};c=c[e[k]]}if(h.match(qa))c[h.replace(qa,"")](d);else c[h.replace(Ga,"")]=d};return function(c,d){return b(c,d,a)}},get:function(a){if(l.isPlainObject(a)){var b={};l.each(a,function(d,e){e&&(b[d]=u.util.get(e))});return function(d,e,h,f){var g=b[e]||b._;return g!==q?g(d,e,h,f):d}}if(null===a)return function(d){return d};if("function"===typeof a)return function(d,e,h,f){return a(d,e,h,f)};if("string"!==typeof a||-1===a.indexOf(".")&&-1===a.indexOf("[")&&-1===a.indexOf("("))return function(d,e){return d[a]};var c=function(d,e,h){if(""!==h){var f=hb(h);for(var g=0,k=f.length;g<k;g++){h=f[g].match(Ga);var m=f[g].match(qa);if(h){f[g]=f[g].replace(Ga,"");""!==f[g]&&(d=d[f[g]]);m=[];f.splice(0,g+1);f=f.join(".");if(Array.isArray(d))for(g=0,k=d.length;g<k;g++)m.push(c(d[g],e,f));d=h[0].substring(1,h[0].length-1);d=""===d?m:m.join(d);break}else if(m){f[g]=f[g].replace(qa,"");d=d[f[g]]();continue}if(null===d||d[f[g]]===q)return q;d=d[f[g]]}}return d};return function(d,e){return c(d,e,a)}}};var S=function(a,b,c){a[b]!==q&&(a[c]=a[b])},Ga=/\[.*?\]$/,qa=/\(\)$/,ma=u.util.get,ha=u.util.set,ob=u.util.escapeRegex,Sa=l("<div>")[0],Bc=Sa.textContent!==q,Cc=/<.*?>/g,mb=u.util.throttle,tc=[],N=Array.prototype,Fc=function(a){var b,c=u.settings,d=l.map(c,function(h,f){return h.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase()){var e=l.inArray(a,d);return-1!==e?[c[e]]:null}if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?b=l(a):a instanceof l&&(b=a)}else return[];if(b)return b.map(function(h){e=l.inArray(this,d);return-1!==e?c[e]:null}).toArray()};var B=function(a,b){if(!(this instanceof B))return new B(a,b);var c=[],d=function(f){(f=Fc(f))&&c.push.apply(c,f)};if(Array.isArray(a))for(var e=0,h=a.length;e<h;e++)d(a[e]);else d(a);this.context=Oa(c);b&&l.merge(this,b);this.selector={rows:null,cols:null,opts:null};B.extend(this,this,tc)};u.Api=B;l.extend(B.prototype,{any:function(){return 0!==this.count()},concat:N.concat,context:[],count:function(){return this.flatten().length},each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b=this.context;return b.length>a?new B(b[a],this[a]):null},filter:function(a){var b=[];if(N.filter)b=N.filter.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)a.call(this,this[c],c,this)&&b.push(this[c]);return new B(this.context,b)},flatten:function(){var a=[];return new B(this.context,a.concat.apply(a,this.toArray()))},join:N.join,indexOf:N.indexOf||function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1},iterator:function(a,b,c,d){var e=[],h,f,g=this.context,k,m=this.selector;"string"===typeof a&&(d=c,c=b,b=a,a=!1);var n=0;for(h=g.length;n<h;n++){var p=new B(g[n]);if("table"===b){var t=c.call(p,g[n],n);t!==q&&e.push(t)}else if("columns"===b||"rows"===b)t=c.call(p,g[n],this[n],n),t!==q&&e.push(t);else if("column"===b||"column-rows"===b||"row"===b||"cell"===b){var v=this[n];"column-rows"===b&&(k=ab(g[n],m.opts));var x=0;for(f=v.length;x<f;x++)t=v[x],t="cell"===b?c.call(p,g[n],t.row,t.column,n,x):c.call(p,g[n],t,n,x,k),t!==q&&e.push(t)}}return e.length||d?(a=new B(g,a?e.concat.apply([],e):e),b=a.selector,b.rows=m.rows,b.cols=m.cols,b.opts=m.opts,a):this},lastIndexOf:N.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(a){var b=[];if(N.map)b=N.map.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)b.push(a.call(this,this[c],c));return new B(this.context,b)},pluck:function(a){var b=u.util.get(a);return this.map(function(c){return b(c)})},pop:N.pop,push:N.push,reduce:N.reduce||function(a,b){return Gb(this,a,b,0,this.length,1)},reduceRight:N.reduceRight||function(a,b){return Gb(this,a,b,this.length-1,-1,-1)},reverse:N.reverse,selector:null,shift:N.shift,slice:function(){return new B(this.context,this)},sort:N.sort,splice:N.splice,toArray:function(){return N.slice.call(this)},to$:function(){return l(this)},toJQuery:function(){return l(this)},unique:function(){return new B(this.context,Oa(this))},unshift:N.unshift});B.extend=function(a,b,c){if(c.length&&b&&(b instanceof B||b.__dt_wrapper)){var d,e=function(g,k,m){return function(){var n=k.apply(g,arguments);B.extend(n,n,m.methodExt);return n}};var h=0;for(d=c.length;h<d;h++){var f=c[h];b[f.name]="function"===f.type?e(a,f.val,f):"object"===f.type?{}:f.val;b[f.name].__dt_wrapper=!0;B.extend(a,b[f.name],f.propExt)}}};B.register=z=function(a,b){if(Array.isArray(a))for(var c=0,d=a.length;c<d;c++)B.register(a[c],b);else{d=a.split(".");var e=tc,h;a=0;for(c=d.length;a<c;a++){var f=(h=-1!==d[a].indexOf("()"))?d[a].replace("()",""):d[a];a:{var g=0;for(var k=e.length;g<k;g++)if(e[g].name===f){g=e[g];break a}g=null}g||(g={name:f,val:{},methodExt:[],propExt:[],type:"object"},e.push(g));a===c-1?(g.val=b,g.type="function"===typeof b?"function":l.isPlainObject(b)?"object":"other"):e=h?g.methodExt:g.propExt}}};B.registerPlural=J=function(a,b,c){B.register(a,c);B.register(b,function(){var d=c.apply(this,arguments);return d===this?this:d instanceof B?d.length?Array.isArray(d[0])?new B(d.context,d[0]):d[0]:q:d})};var uc=function(a,b){if(Array.isArray(a))return l.map(a,function(d){return uc(d,b)});if("number"===typeof a)return[b[a]];var c=l.map(b,function(d,e){return d.nTable});return l(c).filter(a).map(function(d){d=l.inArray(this,c);return b[d]}).toArray()};z("tables()",function(a){return a!==q&&null!==a?new B(uc(a,this.context)):this});z("table()",function(a){a=this.tables(a);var b=a.context;return b.length?new B(b[0]):a});J("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});J("tables().body()","table().body()",function(){return this.iterator("table",function(a){return a.nTBody},1)});J("tables().header()","table().header()",function(){return this.iterator("table",function(a){return a.nTHead},1)});J("tables().footer()","table().footer()",function(){return this.iterator("table",function(a){return a.nTFoot},1)});J("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});z("draw()",function(a){return this.iterator("table",function(b){"page"===a?ja(b):("string"===typeof a&&(a="full-hold"===a?!1:!0),ka(b,!1===a))})});z("page()",function(a){return a===q?this.page.info().page:this.iterator("table",function(b){Ta(b,a)})});z("page.info()",function(a){if(0===this.context.length)return q;a=this.context[0];var b=a._iDisplayStart,c=a.oFeatures.bPaginate?a._iDisplayLength:-1,d=a.fnRecordsDisplay(),e=-1===c;return{page:e?0:Math.floor(b/c),pages:e?1:Math.ceil(d/c),start:b,end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),recordsDisplay:d,serverSide:"ssp"===Q(a)}});z("page.len()",function(a){return a===q?0!==this.context.length?this.context[0]._iDisplayLength:q:this.iterator("table",function(b){pb(b,a)})});var vc=function(a,b,c){if(c){var d=new B(a);d.one("draw",function(){c(d.ajax.json())})}if("ssp"==Q(a))ka(a,b);else{V(a,!0);var e=a.jqXHR;e&&4!==e.readyState&&e.abort();Qa(a,[],function(h){Ma(a);h=za(a,h);for(var f=0,g=h.length;f<g;f++)ia(a,h[f]);ka(a,b);V(a,!1)})}};z("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});z("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});z("ajax.reload()",function(a,b){return this.iterator("table",function(c){vc(c,!1===b,a)})});z("ajax.url()",function(a){var b=this.context;if(a===q){if(0===b.length)return q;b=b[0];return b.ajax?l.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(c){l.isPlainObject(c.ajax)?c.ajax.url=a:c.ajax=a})});z("ajax.url().load()",function(a,b){return this.iterator("table",function(c){vc(c,!1===b,a)})});var zb=function(a,b,c,d,e){var h=[],f,g,k;var m=typeof b;b&&"string"!==m&&"function"!==m&&b.length!==q||(b=[b]);m=0;for(g=b.length;m<g;m++){var n=b[m]&&b[m].split&&!b[m].match(/[\[\(:]/)?b[m].split(","):[b[m]];var p=0;for(k=n.length;p<k;p++)(f=c("string"===typeof n[p]?n[p].trim():n[p]))&&f.length&&(h=h.concat(f))}a=M.selector[a];if(a.length)for(m=0,g=a.length;m<g;m++)h=a[m](d,e,h);return Oa(h)},Ab=function(a){a||(a={});a.filter&&a.search===q&&(a.search=a.filter);return l.extend({search:"none",order:"current",page:"all"},a)},Bb=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=a[b],a[0].length=1,a.length=1,a.context=[a.context[b]],a;a.length=0;return a},ab=function(a,b){var c=[],d=a.aiDisplay;var e=a.aiDisplayMaster;var h=b.search;var f=b.order;b=b.page;if("ssp"==Q(a))return"removed"===h?[]:pa(0,e.length);if("current"==b)for(f=a._iDisplayStart,a=a.fnDisplayEnd();f<a;f++)c.push(d[f]);else if("current"==f||"applied"==f)if("none"==h)c=e.slice();else if("applied"==h)c=d.slice();else{if("removed"==h){var g={};f=0;for(a=d.length;f<a;f++)g[d[f]]=null;c=l.map(e,function(k){return g.hasOwnProperty(k)?null:k})}}else if("index"==f||"original"==f)for(f=0,a=a.aoData.length;f<a;f++)"none"==h?c.push(f):(e=l.inArray(f,d),(-1===e&&"removed"==h||0<=e&&"applied"==h)&&c.push(f));return c},Gc=function(a,b,c){var d;return zb("row",b,function(e){var h=nc(e),f=a.aoData;if(null!==h&&!c)return[h];d||(d=ab(a,c));if(null!==h&&-1!==l.inArray(h,d))return[h];if(null===e||e===q||""===e)return d;if("function"===typeof e)return l.map(d,function(k){var m=f[k];return e(k,m._aData,m.nTr)?k:null});if(e.nodeName){h=e._DT_RowIndex;var g=e._DT_CellIndex;if(h!==q)return f[h]&&f[h].nTr===e?[h]:[];if(g)return f[g.row]&&f[g.row].nTr===e.parentNode?[g.row]:[];h=l(e).closest("*[data-dt-row]");return h.length?[h.data("dt-row")]:[]}if("string"===typeof e&&"#"===e.charAt(0)&&(h=a.aIds[e.replace(/^#/,"")],h!==q))return[h.idx];h=qc(Fa(a.aoData,d,"nTr"));return l(h).filter(e).map(function(){return this._DT_RowIndex}).toArray()},a,c)};z("rows()",function(a,b){a===q?a="":l.isPlainObject(a)&&(b=a,a="");b=Ab(b);var c=this.iterator("table",function(d){return Gc(d,a,b)},1);c.selector.rows=a;c.selector.opts=b;return c});z("rows().nodes()",function(){return this.iterator("row",function(a,b){return a.aoData[b].nTr||q},1)});z("rows().data()",function(){return this.iterator(!0,"rows",function(a,b){return Fa(a.aoData,b,"_aData")},1)});J("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){b=b.aoData[c];return"search"===a?b._aFilterData:b._aSortData},1)});J("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,c){va(b,c,a)})});J("rows().indexes()","row().index()",function(){return this.iterator("row",function(a,b){return b},1)});J("rows().ids()","row().id()",function(a){for(var b=[],c=this.context,d=0,e=c.length;d<e;d++)for(var h=0,f=this[d].length;h<f;h++){var g=c[d].rowIdFn(c[d].aoData[this[d][h]]._aData);b.push((!0===a?"#":"")+g)}return new B(c,b)});J("rows().remove()","row().remove()",function(){var a=this;this.iterator("row",function(b,c,d){var e=b.aoData,h=e[c],f,g;e.splice(c,1);var k=0;for(f=e.length;k<f;k++){var m=e[k];var n=m.anCells;null!==m.nTr&&(m.nTr._DT_RowIndex=k);if(null!==n)for(m=0,g=n.length;m<g;m++)n[m]._DT_CellIndex.row=k}Na(b.aiDisplayMaster,c);Na(b.aiDisplay,c);Na(a[d],c,!1);0<b._iRecordsDisplay&&b._iRecordsDisplay--;qb(b);c=b.rowIdFn(h._aData);c!==q&&delete b.aIds[c]});this.iterator("table",function(b){for(var c=0,d=b.aoData.length;c<d;c++)b.aoData[c].idx=c});return this});z("rows.add()",function(a){var b=this.iterator("table",function(d){var e,h=[];var f=0;for(e=a.length;f<e;f++){var g=a[f];g.nodeName&&"TR"===g.nodeName.toUpperCase()?h.push(La(d,g)[0]):h.push(ia(d,g))}return h},1),c=this.rows(-1);c.pop();l.merge(c,b);return c});z("row()",function(a,b){return Bb(this.rows(a,b))});z("row().data()",function(a){var b=this.context;if(a===q)return b.length&&this.length?b[0].aoData[this[0]]._aData:q;var c=b[0].aoData[this[0]];c._aData=a;Array.isArray(a)&&c.nTr&&c.nTr.id&&ha(b[0].rowId)(a,c.nTr.id);va(b[0],this[0],"data");return this});z("row().node()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]].nTr||null:null});z("row.add()",function(a){a instanceof l&&a.length&&(a=a[0]);var b=this.iterator("table",function(c){return a.nodeName&&"TR"===a.nodeName.toUpperCase()?La(c,a)[0]:ia(c,a)});return this.row(b[0])});l(A).on("plugin-init.dt",function(a,b){a=new B(b);a.on("stateSaveParams",function(d,e,h){d=e.rowIdFn;e=e.aoData;for(var f=[],g=0;g<e.length;g++)e[g]._detailsShow&&f.push("#"+d(e[g]._aData));h.childRows=f});var c=a.state.loaded();c&&c.childRows&&a.rows(l.map(c.childRows,function(d){return d.replace(/:/g,"\\:")})).every(function(){F(b,null,"requestChild",[this])})});var Hc=function(a,b,c,d){var e=[],h=function(f,g){if(Array.isArray(f)||f instanceof l)for(var k=0,m=f.length;k<m;k++)h(f[k],g);else f.nodeName&&"tr"===f.nodeName.toLowerCase()?e.push(f):(k=l("<tr><td></td></tr>").addClass(g),l("td",k).addClass(g).html(f)[0].colSpan=na(a),e.push(k[0]))};h(c,d);b._details&&b._details.detach();b._details=l(e);b._detailsShow&&b._details.insertAfter(b.nTr)},wc=u.util.throttle(function(a){Da(a[0])},500),Cb=function(a,b){var c=a.context;c.length&&(a=c[0].aoData[b!==q?b:a[0]])&&a._details&&(a._details.remove(),a._detailsShow=q,a._details=q,l(a.nTr).removeClass("dt-hasChild"),wc(c))},xc=function(a,b){var c=a.context;if(c.length&&a.length){var d=c[0].aoData[a[0]];d._details&&((d._detailsShow=b)?(d._details.insertAfter(d.nTr),l(d.nTr).addClass("dt-hasChild")):(d._details.detach(),l(d.nTr).removeClass("dt-hasChild")),F(c[0],null,"childRow",[b,a.row(a[0])]),Ic(c[0]),wc(c))}},Ic=function(a){var b=new B(a),c=a.aoData;b.off("draw.dt.DT_details column-sizing.dt.DT_details destroy.dt.DT_details");0<U(c,"_details").length&&(b.on("draw.dt.DT_details",function(d,e){a===e&&b.rows({page:"current"}).eq(0).each(function(h){h=c[h];h._detailsShow&&h._details.insertAfter(h.nTr)})}),b.on("column-sizing.dt.DT_details",function(d,e,h,f){if(a===e)for(e=na(e),h=0,f=c.length;h<f;h++)d=c[h],d._details&&d._details.children("td[colspan]").attr("colspan",e)}),b.on("destroy.dt.DT_details",function(d,e){if(a===e)for(d=0,e=c.length;d<e;d++)c[d]._details&&Cb(b,d)}))};z("row().child()",function(a,b){var c=this.context;if(a===q)return c.length&&this.length?c[0].aoData[this[0]]._details:q;!0===a?this.child.show():!1===a?Cb(this):c.length&&this.length&&Hc(c[0],c[0].aoData[this[0]],a,b);return this});z(["row().child.show()","row().child().show()"],function(a){xc(this,!0);return this});z(["row().child.hide()","row().child().hide()"],function(){xc(this,!1);return this});z(["row().child.remove()","row().child().remove()"],function(){Cb(this);return this});z("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var Jc=/^([^:]+):(name|visIdx|visible)$/,yc=function(a,b,c,d,e){c=[];d=0;for(var h=e.length;d<h;d++)c.push(T(a,e[d],b));return c},Kc=function(a,b,c){var d=a.aoColumns,e=U(d,"sName"),h=U(d,"nTh");return zb("column",b,function(f){var g=nc(f);if(""===f)return pa(d.length);if(null!==g)return[0<=g?g:d.length+g];if("function"===typeof f){var k=ab(a,c);return l.map(d,function(p,t){return f(t,yc(a,t,0,0,k),h[t])?t:null})}var m="string"===typeof f?f.match(Jc):"";if(m)switch(m[2]){case "visIdx":case "visible":g=parseInt(m[1],10);if(0>g){var n=l.map(d,function(p,t){return p.bVisible?t:null});return[n[n.length+g]]}return[ta(a,g)];case "name":return l.map(e,function(p,t){return p===m[1]?t:null});default:return[]}if(f.nodeName&&f._DT_CellIndex)return[f._DT_CellIndex.column];g=l(h).filter(f).map(function(){return l.inArray(this,h)}).toArray();if(g.length||!f.nodeName)return g;g=l(f).closest("*[data-dt-column]");return g.length?[g.data("dt-column")]:[]},a,c)};z("columns()",function(a,b){a===q?a="":l.isPlainObject(a)&&(b=a,a="");b=Ab(b);var c=this.iterator("table",function(d){return Kc(d,a,b)},1);c.selector.cols=a;c.selector.opts=b;return c});J("columns().header()","column().header()",function(a,b){return this.iterator("column",function(c,d){return c.aoColumns[d].nTh},1)});J("columns().footer()","column().footer()",function(a,b){return this.iterator("column",function(c,d){return c.aoColumns[d].nTf},1)});J("columns().data()","column().data()",function(){return this.iterator("column-rows",yc,1)});J("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});J("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,h){return Fa(b.aoData,h,"search"===a?"_aFilterData":"_aSortData",c)},1)});J("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return Fa(a.aoData,e,"anCells",b)},1)});J("columns().visible()","column().visible()",function(a,b){var c=this,d=this.iterator("column",function(e,h){if(a===q)return e.aoColumns[h].bVisible;var f=e.aoColumns,g=f[h],k=e.aoData,m;if(a!==q&&g.bVisible!==a){if(a){var n=l.inArray(!0,U(f,"bVisible"),h+1);f=0;for(m=k.length;f<m;f++){var p=k[f].nTr;e=k[f].anCells;p&&p.insertBefore(e[h],e[n]||null)}}else l(U(e.aoData,"anCells",h)).detach();g.bVisible=a}});a!==q&&this.iterator("table",function(e){xa(e,e.aoHeader);xa(e,e.aoFooter);e.aiDisplay.length||l(e.nTBody).find("td[colspan]").attr("colspan",na(e));Da(e);c.iterator("column",function(h,f){F(h,null,"column-visibility",[h,f,a,b])});(b===q||b)&&c.columns.adjust()});return d});J("columns().indexes()","column().index()",function(a){return this.iterator("column",function(b,c){return"visible"===a?ua(b,c):c},1)});z("columns.adjust()",function(){return this.iterator("table",function(a){sa(a)},1)});z("column.index()",function(a,b){if(0!==this.context.length){var c=this.context[0];if("fromVisible"===a||"toData"===a)return ta(c,b);if("fromData"===a||"toVisible"===a)return ua(c,b)}});z("column()",function(a,b){return Bb(this.columns(a,b))});var Lc=function(a,b,c){var d=a.aoData,e=ab(a,c),h=qc(Fa(d,e,"anCells")),f=l(rc([],h)),g,k=a.aoColumns.length,m,n,p,t,v,x;return zb("cell",b,function(w){var r="function"===typeof w;if(null===w||w===q||r){m=[];n=0;for(p=e.length;n<p;n++)for(g=e[n],t=0;t<k;t++)v={row:g,column:t},r?(x=d[g],w(v,T(a,g,t),x.anCells?x.anCells[t]:null)&&m.push(v)):m.push(v);return m}if(l.isPlainObject(w))return w.column!==q&&w.row!==q&&-1!==l.inArray(w.row,e)?[w]:[];r=f.filter(w).map(function(C,G){return{row:G._DT_CellIndex.row,column:G._DT_CellIndex.column}}).toArray();if(r.length||!w.nodeName)return r;x=l(w).closest("*[data-dt-row]");return x.length?[{row:x.data("dt-row"),column:x.data("dt-column")}]:[]},a,c)};z("cells()",function(a,b,c){l.isPlainObject(a)&&(a.row===q?(c=a,a=null):(c=b,b=null));l.isPlainObject(b)&&(c=b,b=null);if(null===b||b===q)return this.iterator("table",function(n){return Lc(n,a,Ab(c))});var d=c?{page:c.page,order:c.order,search:c.search}:{},e=this.columns(b,d),h=this.rows(a,d),f,g,k,m;d=this.iterator("table",function(n,p){n=[];f=0;for(g=h[p].length;f<g;f++)for(k=0,m=e[p].length;k<m;k++)n.push({row:h[p][f],column:e[p][k]});return n},1);d=c&&c.selected?this.cells(d,c):d;l.extend(d.selector,{cols:b,rows:a,opts:c});return d});J("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(a,b,c){return(a=a.aoData[b])&&a.anCells?a.anCells[c]:q},1)});z("cells().data()",function(){return this.iterator("cell",function(a,b,c){return T(a,b,c)},1)});J("cells().cache()","cell().cache()",function(a){a="search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,d){return b.aoData[c][a][d]},1)});J("cells().render()","cell().render()",function(a){return this.iterator("cell",function(b,c,d){return T(b,c,d,a)},1)});J("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(a,b,c){return{row:b,column:c,columnVisible:ua(a,c)}},1)});J("cells().invalidate()","cell().invalidate()",function(a){return this.iterator("cell",function(b,c,d){va(b,c,a,d)})});z("cell()",function(a,b,c){return Bb(this.cells(a,b,c))});z("cell().data()",function(a){var b=this.context,c=this[0];if(a===q)return b.length&&c.length?T(b[0],c[0].row,c[0].column):q;Ib(b[0],c[0].row,c[0].column,a);va(b[0],c[0].row,"data",c[0].column);return this});z("order()",function(a,b){var c=this.context;if(a===q)return 0!==c.length?c[0].aaSorting:q;"number"===typeof a?a=[[a,b]]:a.length&&!Array.isArray(a[0])&&(a=Array.prototype.slice.call(arguments));return this.iterator("table",function(d){d.aaSorting=a.slice()})});z("order.listener()",function(a,b,c){return this.iterator("table",function(d){kb(d,a,b,c)})});z("order.fixed()",function(a){if(!a){var b=this.context;b=b.length?b[0].aaSortingFixed:q;return Array.isArray(b)?{pre:b}:b}return this.iterator("table",function(c){c.aaSortingFixed=l.extend(!0,{},a)})});z(["columns().order()","column().order()"],function(a){var b=this;return this.iterator("table",function(c,d){var e=[];l.each(b[d],function(h,f){e.push([f,a])});c.aaSorting=e})});z("search()",function(a,b,c,d){var e=this.context;return a===q?0!==e.length?e[0].oPreviousSearch.sSearch:q:this.iterator("table",function(h){h.oFeatures.bFilter&&ya(h,l.extend({},h.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),1)})});J("columns().search()","column().search()",function(a,b,c,d){return this.iterator("column",function(e,h){var f=e.aoPreSearchCols;if(a===q)return f[h].sSearch;e.oFeatures.bFilter&&(l.extend(f[h],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),ya(e,e.oPreviousSearch,1))})});z("state()",function(){return this.context.length?this.context[0].oSavedState:null});z("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});z("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null});z("state.save()",function(){return this.iterator("table",function(a){Da(a)})});u.versionCheck=u.fnVersionCheck=function(a){var b=u.version.split(".");a=a.split(".");for(var c,d,e=0,h=a.length;e<h;e++)if(c=parseInt(b[e],10)||0,d=parseInt(a[e],10)||0,c!==d)return c>d;return!0};u.isDataTable=u.fnIsDataTable=function(a){var b=l(a).get(0),c=!1;if(a instanceof u.Api)return!0;l.each(u.settings,function(d,e){d=e.nScrollHead?l("table",e.nScrollHead)[0]:null;var h=e.nScrollFoot?l("table",e.nScrollFoot)[0]:null;if(e.nTable===b||d===b||h===b)c=!0});return c};u.tables=u.fnTables=function(a){var b=!1;l.isPlainObject(a)&&(b=a.api,a=a.visible);var c=l.map(u.settings,function(d){if(!a||a&&l(d.nTable).is(":visible"))return d.nTable});return b?new B(c):c};u.camelToHungarian=P;z("$()",function(a,b){b=this.rows(b).nodes();b=l(b);return l([].concat(b.filter(a).toArray(),b.find(a).toArray()))});l.each(["on","one","off"],function(a,b){z(b+"()",function(){var c=Array.prototype.slice.call(arguments);c[0]=l.map(c[0].split(/\s/),function(e){return e.match(/\.dt\b/)?e:e+".dt"}).join(" ");var d=l(this.tables().nodes());d[b].apply(d,c);return this})});z("clear()",function(){return this.iterator("table",function(a){Ma(a)})});z("settings()",function(){return new B(this.context,this.context)});z("init()",function(){var a=this.context;return a.length?a[0].oInit:null});z("data()",function(){return this.iterator("table",function(a){return U(a.aoData,"_aData")}).flatten()});z("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.oClasses,d=b.nTable,e=b.nTBody,h=b.nTHead,f=b.nTFoot,g=l(d);e=l(e);var k=l(b.nTableWrapper),m=l.map(b.aoData,function(p){return p.nTr}),n;b.bDestroying=!0;F(b,"aoDestroyCallback","destroy",[b]);a||(new B(b)).columns().visible(!0);k.off(".DT").find(":not(tbody *)").off(".DT");l(y).off(".DT-"+b.sInstance);d!=h.parentNode&&(g.children("thead").detach(),g.append(h));f&&d!=f.parentNode&&(g.children("tfoot").detach(),g.append(f));b.aaSorting=[];b.aaSortingFixed=[];Va(b);l(m).removeClass(b.asStripeClasses.join(" "));l("th, td",h).removeClass(c.sSortable+" "+c.sSortableAsc+" "+c.sSortableDesc+" "+c.sSortableNone);e.children().detach();e.append(m);h=b.nTableWrapper.parentNode;f=a?"remove":"detach";g[f]();k[f]();!a&&h&&(h.insertBefore(d,b.nTableReinsertBefore),g.css("width",b.sDestroyWidth).removeClass(c.sTable),(n=b.asDestroyStripes.length)&&e.children().each(function(p){l(this).addClass(b.asDestroyStripes[p%n])}));c=l.inArray(b,u.settings);-1!==c&&u.settings.splice(c,1)})});l.each(["column","row","cell"],function(a,b){z(b+"s().every()",function(c){var d=this.selector.opts,e=this;return this.iterator(b,function(h,f,g,k,m){c.call(e[b](f,"cell"===b?g:d,"cell"===b?d:q),f,g,k,m)})})});z("i18n()",function(a,b,c){var d=this.context[0];a=ma(a)(d.oLanguage);a===q&&(a=b);c!==q&&l.isPlainObject(a)&&(a=a[c]!==q?a[c]:a._);return a.replace("%d",c)});u.version="1.12.1";u.settings=[];u.models={};u.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0,"return":!1};u.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};u.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};u.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){return{}}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:l.extend({},u.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};E(u.defaults);u.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};E(u.defaults.column);u.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,jqXHR:null,json:q,oAjaxData:q,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==Q(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==Q(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,h=e.bPaginate;return e.bServerSide?!1===h||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!h||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};u.ext=M={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:u.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:u.version};l.extend(M,{afnFiltering:M.search,aTypes:M.type.detect,ofnSearch:M.type.search,oSort:M.type.order,afnSortData:M.order,aoFeatures:M.feature,oApi:M.internal,oStdClasses:M.classes,oPagination:M.pager});l.extend(u.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_desc_disabled",sSortableDesc:"sorting_asc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var ic=u.ext.pager;l.extend(ic,{simple:function(a,b){return["previous","next"]},full:function(a,b){return["first","previous","next","last"]},numbers:function(a,b){return[Ea(a,b)]},simple_numbers:function(a,b){return["previous",Ea(a,b),"next"]},full_numbers:function(a,b){return["first","previous",Ea(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",Ea(a,b),"last"]},_numbers:Ea,numbers_length:7});l.extend(!0,u.ext.renderer,{pageButton:{_:function(a,b,c,d,e,h){var f=a.oClasses,g=a.oLanguage.oPaginate,k=a.oLanguage.oAria.paginate||{},m,n,p=0,t=function(x,w){var r,C=f.sPageButtonDisabled,G=function(I){Ta(a,I.data.action,!0)};var ba=0;for(r=w.length;ba<r;ba++){var L=w[ba];if(Array.isArray(L)){var O=l("<"+(L.DT_el||"div")+"/>").appendTo(x);t(O,L)}else{m=null;n=L;O=a.iTabIndex;switch(L){case "ellipsis":x.append('<span class="ellipsis">&#x2026;</span>');break;case "first":m=g.sFirst;0===e&&(O=-1,n+=" "+C);break;case "previous":m=g.sPrevious;0===e&&(O=-1,n+=" "+C);break;case "next":m=g.sNext;if(0===h||e===h-1)O=-1,n+=" "+C;break;case "last":m=g.sLast;if(0===h||e===h-1)O=-1,n+=" "+C;break;default:m=a.fnFormatNumber(L+1),n=e===L?f.sPageButtonActive:""}null!==m&&(O=l("<a>",{"class":f.sPageButton+" "+n,"aria-controls":a.sTableId,"aria-label":k[L],"data-dt-idx":p,tabindex:O,id:0===c&&"string"===typeof L?a.sTableId+"_"+L:null}).html(m).appendTo(x),sb(O,{action:L},G),p++)}}};try{var v=l(b).find(A.activeElement).data("dt-idx")}catch(x){}t(l(b).empty(),d);v!==q&&l(b).find("[data-dt-idx="+v+"]").trigger("focus")}}});l.extend(u.ext.type.detect,[function(a,b){b=b.oLanguage.sDecimal;return yb(a,b)?"num"+b:null},function(a,b){if(a&&!(a instanceof Date)&&!Dc.test(a))return null;b=Date.parse(a);return null!==b&&!isNaN(b)||aa(a)?"date":null},function(a,b){b=b.oLanguage.sDecimal;return yb(a,b,!0)?"num-fmt"+b:null},function(a,b){b=b.oLanguage.sDecimal;return pc(a,b)?"html-num"+b:null},function(a,b){b=b.oLanguage.sDecimal;return pc(a,b,!0)?"html-num-fmt"+b:null},function(a,b){return aa(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);l.extend(u.ext.type.search,{html:function(a){return aa(a)?a:"string"===typeof a?a.replace(mc," ").replace(Ya,""):""},string:function(a){return aa(a)?a:"string"===typeof a?a.replace(mc," "):a}});var Xa=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=oc(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};l.extend(M.type.order,{"date-pre":function(a){a=Date.parse(a);return isNaN(a)?-Infinity:a},"html-pre":function(a){return aa(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return aa(a)?"":"string"===typeof a?a.toLowerCase():a.toString?a.toString():""},"string-asc":function(a,b){return a<b?-1:a>b?1:0},"string-desc":function(a,b){return a<b?1:a>b?-1:0}});bb("");l.extend(!0,u.ext.renderer,{header:{_:function(a,b,c,d){l(a.nTable).on("order.dt.DT",function(e,h,f,g){a===h&&(e=c.idx,b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass("asc"==g[e]?d.sSortAsc:"desc"==g[e]?d.sSortDesc:c.sSortingClass))})},jqueryui:function(a,b,c,d){l("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(l("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);l(a.nTable).on("order.dt.DT",function(e,h,f,g){a===h&&(e=c.idx,b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass("asc"==g[e]?d.sSortAsc:"desc"==g[e]?d.sSortDesc:c.sSortingClass),b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass("asc"==g[e]?d.sSortJUIAsc:"desc"==g[e]?d.sSortJUIDesc:c.sSortingClassJUI))})}}});var $a=function(a){Array.isArray(a)&&(a=a.join(","));return"string"===typeof a?a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):a},kc=!1,zc=",",Ac=".";if(Intl)try{for(var Ha=(new Intl.NumberFormat).formatToParts(100000.1),ra=0;ra<Ha.length;ra++)"group"===Ha[ra].type?zc=Ha[ra].value:"decimal"===Ha[ra].type&&(Ac=Ha[ra].value)}catch(a){}u.datetime=function(a,b){var c="datetime-detect-"+a;b||(b="en");u.ext.type.order[c]||(u.ext.type.detect.unshift(function(d){var e=Za(d,a,b);return""===d||e?c:!1}),u.ext.type.order[c+"-pre"]=function(d){return Za(d,a,b)||0})};u.render={date:wb("toLocaleDateString"),datetime:wb("toLocaleString"),time:wb("toLocaleTimeString"),number:function(a,b,c,d,e){if(null===a||a===q)a=zc;if(null===b||b===q)b=Ac;return{display:function(h){if("number"!==typeof h&&"string"!==typeof h||""===h||null===h)return h;var f=0>h?"-":"",g=parseFloat(h);if(isNaN(g))return $a(h);g=g.toFixed(c);h=Math.abs(g);g=parseInt(h,10);h=c?b+(h-g).toFixed(c).substring(2):"";0===g&&0===parseFloat(h)&&(f="");return f+(d||"")+g.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+h+(e||"")}}},text:function(){return{display:$a,filter:$a}}};l.extend(u.ext.internal,{_fnExternApiFunc:lc,_fnBuildAjax:Qa,_fnAjaxUpdate:Kb,_fnAjaxParameters:Tb,_fnAjaxUpdateDraw:Ub,_fnAjaxDataSrc:za,_fnAddColumn:cb,_fnColumnOptions:Ia,_fnAdjustColumnSizing:sa,_fnVisibleToColumnIndex:ta,_fnColumnIndexToVisible:ua,_fnVisbleColumns:na,_fnGetColumns:Ka,_fnColumnTypes:eb,_fnApplyColumnDefs:Hb,_fnHungarianMap:E,_fnCamelToHungarian:P,_fnLanguageCompat:la,_fnBrowserDetect:Fb,_fnAddData:ia,_fnAddTr:La,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==q?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return l.inArray(c,a.aoData[b].anCells)},_fnGetCellData:T,_fnSetCellData:Ib,_fnSplitObjNotation:hb,_fnGetObjectDataFn:ma,_fnSetObjectDataFn:ha,_fnGetDataMaster:ib,_fnClearTable:Ma,_fnDeleteIndex:Na,_fnInvalidate:va,_fnGetRowElements:gb,_fnCreateTr:fb,_fnBuildHead:Jb,_fnDrawHead:xa,_fnDraw:ja,_fnReDraw:ka,_fnAddOptionsHtml:Mb,_fnDetectHeader:wa,_fnGetUniqueThs:Pa,_fnFeatureHtmlFilter:Ob,_fnFilterComplete:ya,_fnFilterCustom:Xb,_fnFilterColumn:Wb,_fnFilter:Vb,_fnFilterCreateSearch:nb,_fnEscapeRegex:ob,_fnFilterData:Yb,_fnFeatureHtmlInfo:Rb,_fnUpdateInfo:ac,_fnInfoMacros:bc,_fnInitialise:Aa,_fnInitComplete:Ra,_fnLengthChange:pb,_fnFeatureHtmlLength:Nb,_fnFeatureHtmlPaginate:Sb,_fnPageChange:Ta,_fnFeatureHtmlProcessing:Pb,_fnProcessingDisplay:V,_fnFeatureHtmlTable:Qb,_fnScrollDraw:Ja,_fnApplyToChildren:da,_fnCalculateColumnWidths:db,_fnThrottle:mb,_fnConvertToWidth:cc,_fnGetWidestNode:dc,_fnGetMaxLenString:ec,_fnStringToCss:K,_fnSortFlatten:oa,_fnSort:Lb,_fnSortAria:gc,_fnSortListener:rb,_fnSortAttachListener:kb,_fnSortingClasses:Va,_fnSortData:fc,_fnSaveState:Da,_fnLoadState:hc,_fnImplementState:tb,_fnSettingsFromNode:Wa,_fnLog:ea,_fnMap:Y,_fnBindAction:sb,_fnCallbackReg:R,_fnCallbackFire:F,_fnLengthOverflow:qb,_fnRenderer:lb,_fnDataSource:Q,_fnRowAttributes:jb,_fnExtend:ub,_fnCalculateEnd:function(){}});l.fn.dataTable=u;u.$=l;l.fn.dataTableSettings=u.settings;l.fn.dataTableExt=u.ext;l.fn.DataTable=function(a){return l(this).dataTable(a).api()};l.each(u,function(a,b){l.fn.DataTable[a]=b});return u});(function($){$.fn.columnFilter=function(options){var customSearchIndexes=[];var properties={sPlaceHolder:"foot",sRangeSeparator:"|",aoColumns:null,sRangeFormat:"From {from} to {to}"};$.extend(properties,options);var oTable=this,columnIndex,sColumnLabel,th,tr,aoFilterCells;var serverSide=oTable.fnSettings().oFeatures.bServerSide;var afnSearch_=[];return this.each(function(){if(properties.sPlaceHolder==='head:before'){tr=$("tr:first",oTable.fnSettings().nTHead).detach();tr.appendTo($(oTable.fnSettings().nTHead));aoFilterCells=oTable.fnSettings().aoHeader[0]}else{aoFilterCells=oTable.fnSettings().aoFooter[0]}
$(aoFilterCells).each(function(index){columnIndex=index;var aoColumn={type:"text",bRegex:!1,bSmart:!0,iMaxLength:-1,iFilterLength:0};sColumnLabel=oTable.fnSettings().aoColumns[columnIndex].sTitle
sColumnLabel=sColumnLabel.replace(/<\/?span>/g,"");if(properties.aoColumns!==null){if(properties.aoColumns.length<columnIndex||properties.aoColumns[columnIndex]===null)
return;aoColumn=properties.aoColumns[columnIndex]}
if(typeof aoColumn.sSelector==='undefined'){if($(this)[0].cell.classList.contains('wdtheader')===!1||$(this)[0].cell.localName=='td'){th=$($(this)[0].cell)}}else{th=$(aoColumn.sSelector)}
th.addClass('column-'+aoColumn.origHeader.toString().toLowerCase().replace(/\ /g,'-'));if(typeof aoColumn.sRangeFormat!=='undefined')
sRangeFormat=aoColumn.sRangeFormat;else sRangeFormat=properties.sRangeFormat;if(aoColumn!==null){switch(aoColumn.type){case 'null':break;case 'text':case 'number':wdtCreateInput(oTable,aoColumn,columnIndex,sColumnLabel,th,serverSide);break;case 'number-range':wdtCreateNumberRangeInput(oTable,aoColumn,columnIndex,sColumnLabel,th,customSearchIndexes,serverSide);break;case 'date-range':wdtCreateDateRangeInput(oTable,aoColumn,columnIndex,sColumnLabel,th,customSearchIndexes,serverSide);break;case 'datetime-range':wdtCreateDateTimeRangeInput(oTable,aoColumn,columnIndex,sColumnLabel,th,customSearchIndexes,serverSide);break;case 'time-range':wdtCreateTimeRangeInput(oTable,aoColumn,columnIndex,sColumnLabel,th,customSearchIndexes,serverSide);break;case 'select':wdtCreateSelectbox(oTable,aoColumn,columnIndex,sColumnLabel,th,serverSide);break;case 'multiselect':wdtCreateMultiSelectbox(oTable,aoColumn,columnIndex,sColumnLabel,th,serverSide);break;case 'checkbox':wdtCreateCheckbox(oTable,aoColumn,columnIndex,sColumnLabel,th,serverSide);break;case 'text':default:wdtCreateInput(oTable,aoColumn,columnIndex,sColumnLabel,th,serverSide);break}}});for(var j=0;j<customSearchIndexes.length;j++){var fnSearch_=function(){var id=oTable.attr("id");if((typeof $("#"+id+"_range_from_"+customSearchIndexes[j]).val()==='undefined')||(typeof $("#"+id+"_range_to_"+customSearchIndexes[j]).val()==='undefined')){if(jQuery('#'+id).closest('.wpdt-c').find('.filter_column[data-index='+customSearchIndexes[j]+']').hasClass('wdt-filter-number-range-slider')){return jQuery('#'+id).closest('.wpdt-c').find('.filter_column[data-index='+customSearchIndexes[j]+']').find('#wdt-number-range-slider')[0].noUiSlider.get()[0]+properties.sRangeSeparator+jQuery('#'+id).closest('.wpdt-c').find('.filter_column[data-index='+customSearchIndexes[j]+']').find('#wdt-number-range-slider')[0].noUiSlider.get()[1]}
if(jQuery('.wpdt-c').find('.filter_column[data-index='+customSearchIndexes[j]+']').hasClass('wdt-filter-number-range-slider')){return jQuery('.wpdt-c').find('.filter_column[data-index='+customSearchIndexes[j]+']').find('#wdt-number-range-slider')[0].noUiSlider.get()[0]+properties.sRangeSeparator+jQuery('.wpdt-c').find('.filter_column[data-index='+customSearchIndexes[j]+']').find('#wdt-number-range-slider')[0].noUiSlider.get()[1]}else{return properties.sRangeSeparator}}
return $("#"+id+"_range_from_"+customSearchIndexes[j]).val()+properties.sRangeSeparator+$("#"+id+"_range_to_"+customSearchIndexes[j]).val()};afnSearch_.push(fnSearch_)}
if(oTable.fnSettings().oFeatures.bServerSide){if(typeof oTable.fnSettings().ajax.data!=='undefined'){var currentDataMethod=oTable.fnSettings().ajax.data}
oTable.fnSettings().ajax={url:oTable.fnSettings().ajax.url,type:'POST',data:function(d){if(typeof currentDataMethod!=='undefined'){currentDataMethod(d)}
for(j=0;j<customSearchIndexes.length;j++){var index=customSearchIndexes[j];d.columns[index].search.value=afnSearch_[j]()}
d.sRangeSeparator=properties.sRangeSeparator}}}
wdtClearFilters()})}})(jQuery);var sRangeFormat=wpdatatables_filter_strings.from+" {from} "+wpdatatables_filter_strings.to+" {to}";var fnOnFiltered=function(){};function wdtCreateInput(oTable,aoColumn,columnIndex,sColumnLabel,th,serverSide){var bIsNumber=aoColumn.type==='number';var sCSSClass=aoColumn.type==='number'?'number_filter':'text_filter';sColumnLabel=sColumnLabel.replace(/(^\s*)|(\s*$)/g,"");sColumnLabel=sColumnLabel.replace(/<\/?span>/g,"");var placeholder=aoColumn.filterLabel?aoColumn.filterLabel:sColumnLabel;var input=jQuery('<input type="'+aoColumn.type+'" class="form-control wdt-filter-control '+sCSSClass+'" placeholder="'+_.escape(placeholder)+'" aria-label="'+wpdatatables_filter_strings.filterInputString+_.escape(placeholder)+'"/>');th.html(input);if(bIsNumber)
th.wrapInner('<span class="filter_column wdt-filter-number" data-filter_type="number" data-index="'+columnIndex+'"/>');else th.wrapInner('<span class="filter_column wdt-filter-text" data-filter_type="text" data-index="'+columnIndex+'"/>');input.on('keyup input',_.debounce(function(e){inputSearch(this.value,e.keyCode)},serverSide?500:0))
function inputSearch(value,keyCode){if(typeof keyCode!=='undefined'&&jQuery.inArray(keyCode,[16,37,38,39,40])!==-1){return}
var tableId=oTable.attr('id');var search='';if(aoColumn.exactFiltering){search=serverSide?value:"^"+value+"$";oTable.api().column(columnIndex).search(value?search:'',!0,!1)}else{if(bIsNumber&&!serverSide){search="^";for(var i=0;i<value.length;i++){search+=value[i]+'(\\.|,)?'}}else{search=value}
oTable.api().column(columnIndex).search(search,bIsNumber,!1)}
if(typeof wpDataTables[tableId].drawTable==='undefined'||wpDataTables[tableId].drawTable===!0){oTable.api().draw()}
fnOnFiltered()}
if(aoColumn.defaultValue){var defaultValue='';if(typeof aoColumn.defaultValue==='object'){defaultValue=aoColumn.defaultValue.value}else if(jQuery.isArray(aoColumn.defaultValue)){defaultValue=aoColumn.defaultValue[0]}else{defaultValue=aoColumn.defaultValue}
jQuery(input).val(defaultValue);oTable.api().column(columnIndex).search(defaultValue,bIsNumber,!1);if(!serverSide){jQuery(document).ready(function(){jQuery(input).trigger('keyup')})}}}
function wdtCreateNumberRangeInput(oTable,aoColumn,columnIndex,sColumnLabel,th,customSearchIndexes,serverSide){var tableId=oTable.attr('id');var fromDefaultValue='',toDefaultValue='',defaultValue=aoColumn.defaultValue;var tableDescription=JSON.parse(jQuery('#'+oTable.data('described-by')).val());var numberFormat=(typeof tableDescription.number_format!=='undefined')?parseInt(tableDescription.number_format):1;var replaceFormat=numberFormat===1?/\./g:/,/g;if(defaultValue!==''){fromDefaultValue=defaultValue[0];toDefaultValue=defaultValue[1]}
th.html('');if(aoColumn.rangeSlider){if((tableDescription.tableType==='gravity'&&serverSide)||tableDescription.cascadeFiltering===1){var sFromId=oTable.attr("id")+'_range_from_'+columnIndex;var from=jQuery('<input type="number" class="form-control wdt-filter-control number-range-filter" id="'+sFromId+'" rel="'+columnIndex+'" placeholder="'+wpdatatables_filter_strings.from+'" aria-label="'+wpdatatables_filter_strings.filterInputNumber+wpdatatables_filter_strings.from+'"/>');th.append(from);var sToId=oTable.attr("id")+'_range_to_'+columnIndex;var to=jQuery('<input type="number" class="form-control wdt-filter-control number-range-filter" id="'+sToId+'" rel="'+columnIndex+'" placeholder="'+wpdatatables_filter_strings.to+'" aria-label="'+wpdatatables_filter_strings.filterInputNumber+wpdatatables_filter_strings.to+'"/>');th.append(to);th.wrapInner('<span class="filter_column wdt-filter-number-range" data-filter_type="number range" data-index="'+columnIndex+'"/>');customSearchIndexes.push(columnIndex);oTable.dataTableExt.afnFiltering.push(function(oSettings,aData,iDataIndex){if(oTable.attr("id")!==oSettings.sTableId)
return!0;if(document.getElementById(sFromId)==null)
return!0;var iMin=document.getElementById(sFromId).value.replace(replaceFormat,'');var iMax=document.getElementById(sToId).value.replace(replaceFormat,'');var iValue=aData[columnIndex]=="-"?'0':aData[columnIndex].replace(replaceFormat,'');if(numberFormat===1){iMin=iMin.replace(/,/g,'.');iMax=iMax.replace(/,/g,'.');iValue=iValue.replace(/,/g,'.')}
if(iMin!==''){iMin=iMin*1}
if(iMax!==''){iMax=iMax*1}
iValue=iValue*1;return(iMin===""&&iMax==="")||(iMin===""&&iValue<=iMax)||(iMin<=iValue&&""===iMax)||(iMin<=iValue&&iValue<=iMax)});jQuery('#'+sFromId+', #'+sToId,th).keyup(function(){numberRangeSearch()});if(fromDefaultValue){jQuery(from).val(fromDefaultValue);if(!serverSide){jQuery(document).ready(function(){jQuery(from).keyup()})}}
if(toDefaultValue){jQuery(to).val(toDefaultValue);if(!serverSide){jQuery(document).ready(function(){jQuery(to).keyup()})}}
function numberRangeSearch(){var iMin=document.getElementById(sFromId).value*1;var iMax=document.getElementById(sToId).value*1;if(iMin!=0&&iMax!=0&&iMin>iMax)
return;if(typeof wpDataTables[tableId].drawTable==='undefined'||wpDataTables[tableId].drawTable===!0){oTable.api().draw()}
fnOnFiltered()}}else{th.append('<div id="wdt-number-range-slider"></div>');th.wrapInner('<span class="filter_column wdt-filter-number-range wdt-filter-number-range-slider" data-filter_type="number range" data-index="'+columnIndex+'"/>');var slider=th.find('#wdt-number-range-slider')[0];customSearchIndexes.push(columnIndex);var numberArray=oTable.api().column(columnIndex).data();var formattedNumber=numberArray.map(function(numberArray){if(numberFormat===1){return parseFloat(numberArray.replace(/\./g,'').replace(',','.'))}
return parseFloat(numberArray.replace(/,/g,''))}).filter(function(el){return!isNaN(el)})
var minValue=serverSide===!1?Math.min.apply(Math,formattedNumber):aoColumn.minValue
var maxValue=serverSide===!1?Math.max.apply(Math,formattedNumber):aoColumn.maxValue
var sliderDecimals=aoColumn.columnType==='int'?0:aoColumn.numberOfDecimalPlaces
noUiSlider.create(slider,{start:[fromDefaultValue?fromDefaultValue:minValue,toDefaultValue?toDefaultValue:maxValue],connect:!0,behaviour:'drag',range:{'min':minValue,'max':maxValue},format:wNumb({decimals:sliderDecimals,thousand:numberFormat===1?aoColumn.columnType==='float'?aoColumn.thousandsSeparator:'.':',',mark:numberFormat===1?',':'.'}),tooltips:[!0,{to:function(value){if(value===maxValue&&aoColumn.rangeMaxValueDisplay!=='default'){switch(aoColumn.rangeMaxValueDisplay){case 'unlimited_text':return'Unlimited';case 'unlimited_symbol':return'<div style="">∞</div>';case 'custom_text':let returnMaxVal=aoColumn.customMaxRangeValue?aoColumn.customMaxRangeValue:maxValue;return'<div class="wdt-range-custom-unlimited">'+returnMaxVal+'</div>';case 'default':default:return maxValue}}
return value.toFixed(sliderDecimals)},from:function(value){return value}}]});if(tableDescription.table_wcag){var handles=slider.querySelectorAll('.noUi-handle');handles[0].setAttribute('aria-label',wpdatatables_filter_strings.minValue+minValue);handles[1].setAttribute('aria-label',wpdatatables_filter_strings.maxValue+maxValue)}
slider.noUiSlider.on('end',function(){slider.value=slider.noUiSlider.get();numberRangeSliderSearch()});slider.noUiSlider.on('set',function(){slider.value=slider.noUiSlider.get();numberRangeSliderSearch()});slider.noUiSlider.on('update',function(){var lowerValue=slider.noUiSlider.get()[0]
var maxValue=slider.noUiSlider.get()[1];slider.querySelector('.noUi-tooltip').innerHTML=(lowerValue===maxValue)?slider.noUiSlider.options.tooltips[1].to(slider.noUiSlider.options.range.max):lowerValue});function numberRangeSliderSearch(){if(typeof wpDataTables[tableId].drawTable==='undefined'||wpDataTables[tableId].drawTable===!0){oTable.api().draw()}
oTable.dataTableExt.afnFiltering.push(function(oSettings,aData,iDataIndex){if(oTable.attr("id")!==oSettings.sTableId)
return!0;var iMin=numberFormat===1?parseFloat(slider.value[0].replace(/\./g,'').replace(',','.')):parseFloat(slider.value[0].replace(/,/g,''))
var iMax=numberFormat===1?parseFloat(slider.value[1].replace(/\./g,'').replace(',','.')):parseFloat(slider.value[1].replace(/,/g,''))
var iValue=aData[columnIndex]=="-"?'0':aData[columnIndex];iValue=numberFormat===1?parseFloat(iValue.replace(/\./g,'').replace(',','.')):parseFloat(aData[columnIndex].replace(/,/g,''));return iMin<=iValue&&iValue<=iMax});fnOnFiltered()}
if(fromDefaultValue){if(!serverSide){slider.value=slider.noUiSlider.get();numberRangeSliderSearch()}}
if(toDefaultValue){if(!serverSide){slider.value=slider.noUiSlider.get();numberRangeSliderSearch()}}}}else{var sFromId=oTable.attr("id")+'_range_from_'+columnIndex;var from=jQuery('<input type="number" class="form-control wdt-filter-control number-range-filter" id="'+sFromId+'" rel="'+columnIndex+'" placeholder="'+wpdatatables_filter_strings.from+'" aria-label="'+wpdatatables_filter_strings.filterInputNumber+wpdatatables_filter_strings.from+'"/>');th.append(from);var sToId=oTable.attr("id")+'_range_to_'+columnIndex;var to=jQuery('<input type="number" class="form-control wdt-filter-control number-range-filter" id="'+sToId+'" rel="'+columnIndex+'" placeholder="'+wpdatatables_filter_strings.to+'" aria-label="'+wpdatatables_filter_strings.filterInputNumber+wpdatatables_filter_strings.to+'"/>');th.append(to);th.wrapInner('<span class="filter_column wdt-filter-number-range" data-filter_type="number range" data-index="'+columnIndex+'"/>');customSearchIndexes.push(columnIndex);oTable.dataTableExt.afnFiltering.push(function(oSettings,aData,iDataIndex){if(oTable.attr("id")!==oSettings.sTableId)
return!0;if(document.getElementById(sFromId)==null)
return!0;var iMin=document.getElementById(sFromId).value.replace(replaceFormat,'');var iMax=document.getElementById(sToId).value.replace(replaceFormat,'');var iValue=aData[columnIndex]=="-"?'0':aData[columnIndex].replace(replaceFormat,'');if(numberFormat===1){iMin=iMin.replace(/,/g,'.');iMax=iMax.replace(/,/g,'.');iValue=iValue.replace(/,/g,'.')}
if(iMin!==''){iMin=iMin*1}
if(iMax!==''){iMax=iMax*1}
iValue=iValue*1;return(iMin===""&&iMax==="")||(iMin===""&&iValue<=iMax)||(iMin<=iValue&&""===iMax)||(iMin<=iValue&&iValue<=iMax)});jQuery('#'+sFromId+', #'+sToId,th).keyup(function(){numberRangeSearch()});if(fromDefaultValue){jQuery(from).val(fromDefaultValue);if(!serverSide){jQuery(document).ready(function(){jQuery(from).keyup()})}}
if(toDefaultValue){jQuery(to).val(toDefaultValue);if(!serverSide){jQuery(document).ready(function(){jQuery(to).keyup()})}}
function numberRangeSearch(){var iMin=document.getElementById(sFromId).value*1;var iMax=document.getElementById(sToId).value*1;if(iMin!=0&&iMax!=0&&iMin>iMax)
return;if(typeof wpDataTables[tableId].drawTable==='undefined'||wpDataTables[tableId].drawTable===!0){oTable.api().draw()}
fnOnFiltered()}}}
function wdtCreateDateRangeInput(oTable,aoColumn,columnIndex,sColumnLabel,th,customSearchIndexes,serverSide){var tableId=oTable.attr('id');var fromDefaultValue='',toDefaultValue='',defaultValue=aoColumn.defaultValue;var dateFormat=getMomentWdtDateFormat();var tableDescription=JSON.parse(jQuery('#'+oTable.data('described-by')).val());if(defaultValue!==''){fromDefaultValue=defaultValue[0];toDefaultValue=defaultValue[1]}
th.html('');var sFromId=oTable.attr("id")+'_range_from_'+columnIndex;var from=jQuery('<input type="text" class="form-control wdt-filter-control date-range-filter wdt-datepicker wdt-datepicker-from" id="'+sFromId+'" rel="'+columnIndex+'" placeholder="'+wpdatatables_filter_strings.from+'" aria-label="'+wpdatatables_filter_strings.filterInputDate+wpdatatables_filter_strings.fromDate+'"/>');var sToId=oTable.attr("id")+'_range_to_'+columnIndex;var to=jQuery('<input type="text" class="form-control wdt-filter-control date-range-filter wdt-datepicker wdt-datepicker-to" id="'+sToId+'" rel="'+columnIndex+'" placeholder="'+wpdatatables_filter_strings.to+'" aria-label="'+wpdatatables_filter_strings.filterInputDate+wpdatatables_filter_strings.toDate+'"/>');th.append(from).append(to);th.wrapInner('<span class="filter_column wdt-filter-date-range" data-filter_type="date range" data-index="'+columnIndex+'"/>');customSearchIndexes.push(columnIndex);oTable.dataTableExt.afnFiltering.push(function(oSettings,aData,iDataIndex){if(oTable.attr("id")!=oSettings.sTableId)
return!0;var dStartDate=moment(from.val(),dateFormat).toDate();var dEndDate=moment(to.val(),dateFormat).toDate();if(isNaN(dStartDate.getTime())&&isNaN(dEndDate.getTime())){return!0}
var dCellDate=null;try{if(aData[columnIndex]===null||aData[columnIndex]==="")
return!1;dCellDate=moment(aData[columnIndex],dateFormat).toDate()}catch(ex){return!1}
if(isNaN(dCellDate.getTime()))
return!1;return(isNaN(dStartDate.getTime())&&dCellDate<=dEndDate)||(dStartDate<=dCellDate&&isNaN(dEndDate.getTime()))||(dStartDate<=dCellDate&&dCellDate<=dEndDate)});jQuery('#'+sFromId+', #'+sToId,th).on('blur',function(e){if((typeof wpDataTables[tableId].drawTable==='undefined')||wpDataTables[tableId].drawTable===!0){oTable.api().draw()}
if(tableDescription.table_wcag){wdtAddAttributesForDateTime(this,e,'wdt-datepicker-from')}
fnOnFiltered()});if(fromDefaultValue){jQuery(from).val(fromDefaultValue);if(tableDescription.table_wcag){jQuery(from).parent().parent().attr('data-value-from',fromDefaultValue)}
if(!serverSide){jQuery(document).ready(function(){jQuery(from).trigger('blur')})}}
if(toDefaultValue){jQuery(to).val(toDefaultValue);if(tableDescription.table_wcag){jQuery(to).parent().parent().attr('data-value-to',toDefaultValue)}
if(!serverSide){jQuery(document).ready(function(){jQuery(to).trigger('blur')})}}}
function wdtCreateDateTimeRangeInput(oTable,aoColumn,columnIndex,sColumnLabel,th,customSearchIndexes,serverSide){var tableId=oTable.attr('id');var fromDefaultValue='',toDefaultValue='',defaultValue=aoColumn.defaultValue;var dateFormat=getMomentWdtDateFormat();var timeFormat=getMomentWdtTimeFormat();var tableDescription=JSON.parse(jQuery('#'+oTable.data('described-by')).val());if(defaultValue!==''){fromDefaultValue=defaultValue[0];toDefaultValue=defaultValue[1]}
th.html('');var sFromId=oTable.attr("id")+'_range_from_'+columnIndex;var fromHTML='<input type="text" class="form-control wdt-filter-control date-time-range-filter wdt-datetimepicker wdt-datetimepicker-from" id="'+sFromId+'" rel="'+columnIndex+'" placeholder="'+wpdatatables_filter_strings.from+'" aria-label="'+wpdatatables_filter_strings.filterInputDateTime+wpdatatables_filter_strings.fromDateTime+'"/>';var from=jQuery(fromHTML);var sToId=oTable.attr("id")+'_range_to_'+columnIndex;var toHTML='<input type="text" class="form-control wdt-filter-control date-time-range-filter wdt-datetimepicker wdt-datetimepicker-to" id="'+sToId+'" rel="'+columnIndex+'" placeholder="'+wpdatatables_filter_strings.to+'" aria-label="'+wpdatatables_filter_strings.filterInputDateTime+wpdatatables_filter_strings.toDateTime+'"/>';var to=jQuery(toHTML);th.append(from).append(to);th.wrapInner('<span class="filter_column wdt-filter-date-time-range" data-filter_type="datetime range" data-index="'+columnIndex+'"/>');customSearchIndexes.push(columnIndex);oTable.dataTableExt.afnFiltering.push(function(oSettings,aData,iDataIndex){if(oTable.attr("id")!=oSettings.sTableId)
return!0;var dStartDate=moment(from.val(),dateFormat+' '+timeFormat).toDate();var dEndDate=moment(to.val(),dateFormat+' '+timeFormat).toDate();if(isNaN(dStartDate.getTime())&&isNaN(dEndDate.getTime())){return!0}
var dCellDate=null;try{if(aData[columnIndex]===null||aData[columnIndex]==='')
return!1;dCellDate=moment(aData[columnIndex],dateFormat+' '+timeFormat).toDate()}catch(ex){return!1}
if(isNaN(dCellDate.getTime()))
return!1;return(isNaN(dStartDate.getTime())&&dCellDate<=dEndDate)||(dStartDate<=dCellDate&&isNaN(dEndDate.getTime()))||(dStartDate<=dCellDate&&dCellDate<=dEndDate)});jQuery('#'+sFromId+', #'+sToId,th).on('blur',function(e){if(((typeof wpDataTables[tableId].drawTable==='undefined')||wpDataTables[tableId].drawTable===!0)&&e.oldDate!==null){oTable.api().draw()}
if(tableDescription.table_wcag){wdtAddAttributesForDateTime(this,e,'wdt-datetimepicker-from')}
fnOnFiltered()});if(fromDefaultValue){jQuery(from).val(fromDefaultValue);if(tableDescription.table_wcag){jQuery(from).parent().parent().attr('data-value-from',fromDefaultValue)}
if(!serverSide){jQuery(document).ready(function(){jQuery(to).trigger('blur')})}}
if(toDefaultValue){jQuery(to).val(toDefaultValue);if(tableDescription.table_wcag){jQuery(to).parent().parent().attr('data-value-from',toDefaultValue)}
if(!serverSide){jQuery(document).ready(function(){jQuery(to).trigger('blur')})}}}
function wdtCreateTimeRangeInput(oTable,aoColumn,columnIndex,sColumnLabel,th,customSearchIndexes,serverSide){var tableId=oTable.attr('id');var fromDefaultValue='',toDefaultValue='',defaultValue=aoColumn.defaultValue;var timeFormat=getMomentWdtTimeFormat();var tableDescription=JSON.parse(jQuery('#'+oTable.data('described-by')).val());if(defaultValue!==''){fromDefaultValue=defaultValue[0];toDefaultValue=defaultValue[1]}
th.html('');var sFromId=oTable.attr("id")+'_range_from_'+columnIndex;var fromHTML='<input type="text" class="form-control wdt-filter-control time-range-filter wdt-timepicker wdt-timepicker-from" id="'+sFromId+'" rel="'+columnIndex+'" placeholder="'+wpdatatables_filter_strings.from+'" aria-label="'+wpdatatables_filter_strings.filterInputTime+wpdatatables_filter_strings.fromTime+'"/>';var from=jQuery(fromHTML);var sToId=oTable.attr("id")+'_range_to_'+columnIndex;var toHTML='<input type="text" class="form-control wdt-filter-control time-range-filter wdt-timepicker wdt-timepicker-to" id="'+sToId+'" rel="'+columnIndex+'" placeholder="'+wpdatatables_filter_strings.to+'" aria-label="'+wpdatatables_filter_strings.filterInputTime+wpdatatables_filter_strings.toTime+'"/>';var to=jQuery(toHTML);th.append(from).append(to);th.wrapInner('<span class="filter_column filter_date_range" data-filter_type="time range" data-index="'+columnIndex+'"/>');customSearchIndexes.push(columnIndex);oTable.dataTableExt.afnFiltering.push(function(oSettings,aData,iDataIndex){if(oTable.attr("id")!=oSettings.sTableId)
return!0;var dStartTime=moment(from.val(),timeFormat).toDate();var dEndTime=moment(to.val(),timeFormat).toDate();if(isNaN(dStartTime.getTime())&&isNaN(dEndTime.getTime())){return!0}
var dCellTime=null;try{if(aData[columnIndex]===null||aData[columnIndex]==='')
return!1;dCellTime=moment(aData[columnIndex],timeFormat).toDate()}catch(ex){return!1}
if(isNaN(dCellTime.getTime()))
return!1;return(isNaN(dStartTime.getTime())&&dCellTime<=dEndTime)||(dStartTime<=dCellTime&&isNaN(dEndTime.getTime()))||(dStartTime<=dCellTime&&dCellTime<=dEndTime)});jQuery('#'+sFromId+', #'+sToId,th).on('blur',function(e){if(((typeof wpDataTables[tableId].drawTable==='undefined')||wpDataTables[tableId].drawTable===!0)&&e.oldDate!==null){oTable.api().draw()}
if(tableDescription.table_wcag){wdtAddAttributesForDateTime(this,e,'wdt-timepicker-from')}
fnOnFiltered()});if(fromDefaultValue){jQuery(from).val(fromDefaultValue);if(tableDescription.table_wcag){jQuery(from).parent().parent().attr('data-value-from',fromDefaultValue)}
if(!serverSide){jQuery(document).ready(function(){jQuery(to).trigger('blur')})}}
if(toDefaultValue){jQuery(to).val(toDefaultValue);if(tableDescription.table_wcag){jQuery(to).parent().parent().attr('data-value-from',toDefaultValue)}
if(!serverSide){jQuery(document).ready(function(){jQuery(to).trigger('blur')})}}}
function wdtCreateSelectbox(oTable,aoColumn,columnIndex,sColumnLabel,th,serverSide){var tableId=oTable.attr('id'),selected;var tableDescription=JSON.parse(jQuery('#'+oTable.data('described-by')).val());if(aoColumn.values===null)
aoColumn.values=getColumnDistinctValues(tableId,columnIndex,!1);if(aoColumn.possibleValuesAddEmpty===!0&&!serverSide){aoColumn.values.unshift('possibleValuesAddEmpty')}
if(aoColumn.defaultValue!==''){if(jQuery.isArray(aoColumn.defaultValue)){aoColumn.defaultValue=aoColumn.defaultValue[0]}}
var selectTitle=aoColumn.filterLabel?_.escape(aoColumn.filterLabel):wpdatatables_filter_strings.nothingSelected;var select='<select class="wdt-select-filter wdt-filter-control selectpicker" title="'+selectTitle+'" data-index="'+columnIndex+'" data-live-search="true" data-live-search-placeholder="'+wpdatatables_filter_strings.search+'">';if(aoColumn.possibleValuesAjax!==-1){if(typeof aoColumn.defaultValue==='object'){select+='<option selected value="'+aoColumn.defaultValue.value+'">'+aoColumn.defaultValue.text+'</option>';oTable.api().column(columnIndex).search(aoColumn.defaultValue.value)}else{select+='<option selected value="'+aoColumn.defaultValue+'">'+aoColumn.defaultValue+'</option>';oTable.api().column(columnIndex).search(aoColumn.defaultValue)}}else{select+='<option value="">'+' '+'</option>';var iLen=aoColumn.values?aoColumn.values.length:0;for(var j=0;j<iLen;j++){selected='';if(aoColumn.defaultValue!==''){if(typeof aoColumn.defaultValue==='object'){if(aoColumn.values[j].value==aoColumn.defaultValue.value){selected='selected="selected" '}}else{if(aoColumn.values[j].value==aoColumn.defaultValue){selected='selected="selected" '}}}
select+='<option '+selected+'value="'+encodeURI(aoColumn.values[j].value)+'">'+aoColumn.values[j].label+'</option>';if(selected){oTable.api().column(columnIndex).search(aoColumn.values[j].value)}}}
select=jQuery(select+'</select>');th.html(select);th.wrapInner('<span class="filter_column filter_select" data-filter_type="selectbox" data-index="'+columnIndex+'"/>');select.on('change.selectChange',function(){selectboxSearch.call(jQuery(this))});if(aoColumn.possibleValuesAjax!==-1){select.on('show.bs.select',function(e){select.closest('.filter_column').find('.bs-searchbox .form-control').val('').trigger('keyup');showSelectMultiSelectboxForFixedHeaderAndColumns(tableDescription,oTable,select)}).on('hide.bs.select',function(e){hideSelectMultiSelectboxForFixedHeaderAndColumns(select)});if((!tableDescription.groupingEnabled&&select.closest('th').index()!=tableDescription.groupingColumnIndex)||!tableDescription.filterInForm){select.closest('.wdtscroll').on('scroll',function(e){select.closest('.wdt-select-filter.open').removeClass('open');hideSelectMultiSelectboxForFixedHeaderAndColumns(select);if(!tableDescription.dataTableParams.fixedHeader.header&&tableDescription.dataTableParams.fixedColumns){wpDataTables[tableDescription.tableId].fnSettings().oInstance.api().draw()}})}
select.selectpicker('refresh').ajaxSelectPicker({ajax:{url:wdt_ajax_object.ajaxurl,method:'POST',data:{wdtNonce:jQuery('#wdtNonce').val(),action:'wpdatatables_get_column_possible_values',tableId:oTable.data('wpdatatable_id'),originalHeader:aoColumn.origHeader}},cache:!1,preprocessData:function(data){if(aoColumn.possibleValuesAddEmpty===!0){data.unshift({value:'possibleValuesAddEmpty',text:' '})}
data.unshift({value:''});return data},preserveSelected:!0,emptyRequest:!0,preserveSelectedPosition:'before',locale:{emptyTitle:wpdatatables_filter_strings.nothingSelected,statusSearching:wpdatatables_filter_strings.sLoadingRecords,currentlySelected:wpdatatables_filter_strings.currentlySelected,errorText:wpdatatables_filter_strings.errorText,searchPlaceholder:wpdatatables_filter_strings.search,statusInitialized:wpdatatables_filter_strings.statusInitialized,statusNoResults:wpdatatables_filter_strings.statusNoResults,statusTooShort:wpdatatables_filter_strings.statusTooShort}});if(aoColumn.defaultValue&&!serverSide){select.trigger('change').data('AjaxBootstrapSelect').list.cache={}}
if(aoColumn.searchInSelectBox!==1){jQuery(th).find('.bs-searchbox').hide()}else{jQuery(th).find('.bs-searchbox').show()}
wdtAddAttributesForWCAGSelectBox(select,'wdt-select-filter',tableDescription)}else{select.selectpicker('refresh');if(aoColumn.searchInSelectBox!==1){jQuery(th).find('.bs-searchbox').hide()}else{jQuery(th).find('.bs-searchbox').show()}
select.on('show.bs.select',function(e){showSelectMultiSelectboxForFixedHeaderAndColumns(tableDescription,oTable,select)}).on('hide.bs.select',function(e){hideSelectMultiSelectboxForFixedHeaderAndColumns(select)});wdtAddAttributesForWCAGSelectBox(select,'wdt-select-filter',tableDescription);if((!tableDescription.groupingEnabled&&select.closest('th').index()!=tableDescription.groupingColumnIndex)||!tableDescription.filterInForm){select.closest('.wdtscroll').on('scroll',function(e){select.closest('.wdt-select-filter.open').removeClass('open');hideSelectMultiSelectboxForFixedHeaderAndColumns(select);if(!tableDescription.dataTableParams.fixedHeader.header&&tableDescription.dataTableParams.fixedColumns){wpDataTables[tableDescription.tableId].fnSettings().oInstance.api().draw()}})}
if(aoColumn.defaultValue&&!serverSide){oTable.fnFilter(aoColumn.defaultValue,columnIndex)}}
function selectboxSearch(){if(jQuery(this).val()!==null){var search='';if(jQuery(this).val()==='possibleValuesAddEmpty'&&!serverSide){oTable.api().column(columnIndex).search('^$',!0,!1)}else{if(aoColumn.exactFiltering){search=serverSide?decodeURIComponent(jQuery(this).val()):'^'+decodeURIComponent(jQuery(this).val())+'$';oTable.api().column(columnIndex).search(jQuery(this).val()?search:'',!0,!1)}else{oTable.api().column(columnIndex).search(decodeURIComponent(jQuery(this).val()),!0,!1)}}
if(typeof wpDataTables[tableId].drawTable==='undefined'||wpDataTables[tableId].drawTable===!0){oTable.api().draw()}
fnOnFiltered()}}}
function wdtCreateMultiSelectbox(oTable,aoColumn,columnIndex,sColumnLabel,th,serverSide){var tableId=oTable.attr('id'),selected;var tableDescription=JSON.parse(jQuery('#'+oTable.data('described-by')).val());if(aoColumn.values===null)
aoColumn.values=getColumnDistinctValues(tableId,columnIndex,!1);if(!jQuery.isArray(aoColumn.defaultValue)){aoColumn.defaultValue=[aoColumn.defaultValue]}
var selectTitle=aoColumn.filterLabel?_.escape(aoColumn.filterLabel):wpdatatables_filter_strings.nothingSelected;var select='<select class="wdt-multiselect-filter wdt-filter-control selectpicker" title="'+selectTitle+'" data-index="'+columnIndex+'" multiple data-live-search="true" data-live-search-placeholder="'+wpdatatables_filter_strings.search+'">';if(aoColumn.possibleValuesAjax!==-1){if(aoColumn.defaultValue[0]){var search='';for(i=0;i<aoColumn.defaultValue.length;i++){if(typeof aoColumn.defaultValue[i]==='object'){select+='<option selected value="'+aoColumn.defaultValue[i].value+'">'+aoColumn.defaultValue[i].text+'</option>';search+=buildSearchStringForMultiFilters(aoColumn.defaultValue[i].value,aoColumn.exactFiltering);oTable.api().column(columnIndex).search(search.substring(0,search.length-1))}else{select+='<option selected value="'+aoColumn.defaultValue[i]+'">'+aoColumn.defaultValue[i]+'</option>';search+=buildSearchStringForMultiFilters(aoColumn.defaultValue[i],aoColumn.exactFiltering);oTable.api().column(columnIndex).search(search.substring(0,search.length-1))}}}}else{var iLen=aoColumn.values?aoColumn.values.length:0;var search='';for(var j=0;j<iLen;j++){if(typeof aoColumn.defaultValue[0]==='object'){jQuery.each(aoColumn.defaultValue,function(index,value){selected=aoColumn.values[j].value.toString()==value.value?'selected="selected" ':'';if(selected!=='')
return!1})}else{selected=jQuery.inArray(aoColumn.values[j].value.toString(),aoColumn.defaultValue)!==-1?selected='selected="selected" ':''}
select+='<option '+selected+'value="'+encodeURI(aoColumn.values[j].value)+'">'+aoColumn.values[j].label+'</option>';if(selected){search+=buildSearchStringForMultiFilters(aoColumn.values[j].value,aoColumn.exactFiltering);oTable.api().column(columnIndex).search(search.substring(0,search.length-1))}}}
select=jQuery(select+'</select>');th.html(select);th.wrapInner('<span class="filter_column filter_select" data-filter_type="multiselectbox" data-index="'+columnIndex+'" />');select.on('change.selectChange',function(e){multiSelectboxSearch.call(jQuery(this))});if(aoColumn.possibleValuesAjax!==-1){select.on('show.bs.select',function(e){select.closest('.filter_column').find('.bs-searchbox .form-control').val('').trigger('keyup');showSelectMultiSelectboxForFixedHeaderAndColumns(tableDescription,oTable,select)}).on('hide.bs.select',function(e){hideSelectMultiSelectboxForFixedHeaderAndColumns(select)});if((!tableDescription.groupingEnabled&&select.closest('th').index()!=tableDescription.groupingColumnIndex)||!tableDescription.filterInForm){select.closest('.wdtscroll').on('scroll',function(e){select.closest('.wdt-multiselect-filter.open').removeClass('open');hideSelectMultiSelectboxForFixedHeaderAndColumns(select);if(!tableDescription.dataTableParams.fixedHeader.header&&tableDescription.dataTableParams.fixedColumns){wpDataTables[tableDescription.tableId].fnSettings().oInstance.api().draw()}})}
select.selectpicker('refresh').ajaxSelectPicker({ajax:{url:wdt_ajax_object.ajaxurl,method:'POST',data:{wdtNonce:jQuery('#wdtNonce').val(),action:'wpdatatables_get_column_possible_values',tableId:oTable.data('wpdatatable_id'),originalHeader:aoColumn.origHeader}},cache:!1,preprocessData:function(data){return data},preserveSelected:!0,emptyRequest:!0,preserveSelectedPosition:'before',locale:{emptyTitle:wpdatatables_filter_strings.nothingSelected,statusSearching:wpdatatables_filter_strings.sLoadingRecords,currentlySelected:wpdatatables_filter_strings.currentlySelected,errorText:wpdatatables_filter_strings.errorText,searchPlaceholder:wpdatatables_filter_strings.search,statusInitialized:wpdatatables_filter_strings.statusInitialized,statusNoResults:wpdatatables_filter_strings.statusNoResults,statusTooShort:wpdatatables_filter_strings.statusTooShort}});if(aoColumn.defaultValue[0]&&!serverSide){select.trigger('change').data('AjaxBootstrapSelect').list.cache={}}
if(aoColumn.searchInSelectBox!==1){jQuery(th).find('.bs-searchbox').hide()}else{jQuery(th).find('.bs-searchbox').show()}
wdtAddAttributesForWCAGSelectBox(select,'wdt-multiselect-filter',tableDescription)}else{select.selectpicker('refresh');if(aoColumn.searchInSelectBox!==1){jQuery(th).find('.bs-searchbox').hide()}else{jQuery(th).find('.bs-searchbox').show()}
select.on('show.bs.select',function(e){showSelectMultiSelectboxForFixedHeaderAndColumns(tableDescription,oTable,select)}).on('hide.bs.select',function(e){hideSelectMultiSelectboxForFixedHeaderAndColumns(select)});if((!tableDescription.groupingEnabled&&select.closest('th').index()!=tableDescription.groupingColumnIndex)||!tableDescription.filterInForm){select.closest('.wdtscroll').on('scroll',function(e){select.closest('.wdt-multiselect-filter.open').removeClass('open');hideSelectMultiSelectboxForFixedHeaderAndColumns(select);if(!tableDescription.dataTableParams.fixedHeader.header&&tableDescription.dataTableParams.fixedColumns){wpDataTables[tableDescription.tableId].fnSettings().oInstance.api().draw()}})}
wdtAddAttributesForWCAGSelectBox(select,'wdt-multiselect-filter',tableDescription);if(aoColumn.defaultValue[0]&&!serverSide){var search='';if(aoColumn.andLogic){for(var i=0;i<aoColumn.defaultValue.length;i++){search+=buildAndSearchStringForMultiFilters(aoColumn.defaultValue[i],aoColumn.exactFiltering,i)}
if(aoColumn.exactFiltering){search=search.slice(0,-2);search+='$'}
oTable.fnFilter(search,columnIndex,!0,!1)}else{for(var i=0;i<aoColumn.defaultValue.length;i++){search+=buildSearchStringForMultiFilters(aoColumn.defaultValue[i],aoColumn.exactFiltering)}
oTable.fnFilter(search.substring(0,search.length-1),columnIndex,!0,!1)}
fnOnFiltered()}}
function multiSelectboxSearch(){var tableDescription=JSON.parse(jQuery('#'+oTable.data('described-by')).val());var columnType=tableDescription.dataTableParams.columnDefs[columnIndex].wdtType;var search='',selectedOptions;selectedOptions=jQuery(this).selectpicker('val');if(aoColumn.andLogic&&!serverSide){jQuery.each(selectedOptions,function(index,value){search+=buildAndSearchStringForMultiFilters(value,aoColumn.exactFiltering,index)});if(aoColumn.exactFiltering){search=search.slice(0,-2);search+='$'}
oTable.api().column(columnIndex).search(search,!0,!1)}else{jQuery.each(selectedOptions,function(index,value){if(columnType==='email'&&serverSide===!1){var startIndex=value.indexOf('mailto:')+7;var endIndex=value.lastIndexOf("%22");value=value.substr(startIndex,endIndex-startIndex)}
search+=buildSearchStringForMultiFilters(value,aoColumn.exactFiltering)});oTable.api().column(columnIndex).search(search.substring(0,search.length-1),!0,!1)}
if(typeof wpDataTables[tableId].drawTable==='undefined'||wpDataTables[tableId].drawTable===!0){oTable.api().draw()}
fnOnFiltered()}}
function wdtCreateCheckbox(oTable,aoColumn,columnIndex,sColumnLabel,th,serverSide){var tableId=oTable.attr('id');var tableDesc=JSON.parse(jQuery('#'+oTable.data('described-by')).val());if(!jQuery.isArray(aoColumn.defaultValue)){aoColumn.defaultValue=[aoColumn.defaultValue]}
if(aoColumn.values===null)
aoColumn.values=getColumnDistinctValues(tableId,columnIndex,!1);var r='',j,iLen=aoColumn.values?aoColumn.values.length:0,dialogRender=!0,orderCheckbox=[];if(typeof aoColumn.sSelector!=='undefined'){dialogRender=aoColumn.checkboxesInModal}
var labelBtn=aoColumn.filterLabel?aoColumn.filterLabel:sColumnLabel;var checkboxesDivId=oTable.attr('id')+'-checkbox-'+columnIndex;var useAndLogic=aoColumn.andLogic&&!serverSide;if(dialogRender){var buttonId="checkbox-button-"+checkboxesDivId;r+='<button id="'+buttonId+'" class="wdt-checkbox-filter btn" > '+labelBtn+'</button>'}
r+='<div id="'+checkboxesDivId+'">';var search='',i=0;for(j=0;j<iLen;j++){if(aoColumn.values[j]!==null){var value=typeof aoColumn.values[j]!=='object'?aoColumn.values[j]:aoColumn.values[j].value;var label=typeof aoColumn.values[j]!=='object'?aoColumn.values[j]:aoColumn.values[j].label;if(jQuery.isArray(aoColumn.defaultValue)){jQuery.each(aoColumn.defaultValue,function(index,value){if(aoColumn.possibleValuesType==="foreignkey"){checked=aoColumn.values[j].value.toString()==value.value?'checked="checked" ':''}else{checked=aoColumn.values[j].value.toString()==value?'checked="checked" ':''}
if(checked!=='')
return!1})}else{var checked=jQuery.inArray(value.toString(),aoColumn.defaultValue)!==-1?'checked="checked" ':''}
var ariaLabel='',modifyLabel='';if(tableDesc.table_wcag){ariaLabel=encodeURI(label);ariaLabel=ariaLabel.replace(/["']/g," ");ariaLabel=' aria-label="'+wpdatatables_filter_strings.filterCheckbox+ariaLabel+'" '}
r+='<div class="wdt_checkbox_option checkbox">'+'<label>'+'<input type="checkbox" class="wdt-checkbox-filter wdt-filter-control" value="'+encodeURI(value)+'" '+checked+ariaLabel+' >'+'<span class="wdt-checkbox-label">'+label+'</span>'+'</label>'+'</div>'}
if(checked&&!useAndLogic){search+=buildSearchStringForMultiFilters(encodeURI(value),aoColumn.exactFiltering);oTable.api().column(columnIndex).search(search.substring(0,search.length-1))}else if(checked){search+=buildAndSearchStringForMultiFilters(value,aoColumn.exactFiltering,i++)}}
jQuery(th).off('change.checkboxChange').on('change.checkboxChange','#'+checkboxesDivId+' input.wdt-checkbox-filter',function(){checkboxSearch.call(jQuery(this),columnIndex,checkboxesDivId)});th.html(r);th.wrapInner('<span class="filter_column filter_checkbox" data-filter_type="checkbox" data-index="'+columnIndex+'" />');if(useAndLogic){if(aoColumn.exactFiltering){search=search.slice(0,-2);search+='$'}
oTable.fnFilter(search,columnIndex,!0,!1);fnOnFiltered()}
if(aoColumn.defaultValue[0]&&!serverSide&&!useAndLogic){var search='';for(var i=0;i<aoColumn.defaultValue.length;i++){search+=buildSearchStringForMultiFilters(aoColumn.defaultValue[i],aoColumn.exactFiltering)}
oTable.fnFilter(search.substring(0,search.length-1),columnIndex,!0,!1);fnOnFiltered()}
if(dialogRender){var dlg=jQuery('#'+checkboxesDivId).wrap('<div class="wdt-checkbox-modal-wrap '+checkboxesDivId+'" />').hide();var $modal=jQuery('#wdt-frontend-modal');$modal.on('click','button.close',function(e){$modal.fadeOut(300,function(){jQuery(this).find('#'+checkboxesDivId).remove();$modal.removeClass('wdt-skin-'+tableDesc.tableSkin);$modal.removeClass('wpTableWCAG')})});$modal.on('keydown',function(e){if(e.keyCode===27){$modal.fadeOut(300,function(){jQuery(this).find('#'+checkboxesDivId).remove();$modal.removeClass('wdt-skin-'+tableDesc.tableSkin);$modal.removeClass('wpTableWCAG')})}});jQuery('#'+buttonId).on('click',function(e){e.preventDefault();jQuery('#wdt-frontend-modal .modal-title').html(labelBtn);jQuery('#wdt-frontend-modal .modal-body').append(dlg.show());jQuery('#wdt-frontend-modal .modal-footer').html('<button class="btn btn-danger btn-icon-text" id="wdt-checkbox-filter-reset" href="#">Reset</button><button class="btn btn-success btn-icon-text" id="wdt-checkbox-filter-close" href="#"><i class="wpdt-icon-check-full"></i>OK</button>');jQuery('#wdt-frontend-modal input.wdt-checkbox-filter').off('change').on('change',function(){checkboxSearch.call(jQuery(this),columnIndex,checkboxesDivId)});if(typeof wpDataTables[tableId].onRenderCheckboxFilterModal!=='undefined'){for(var i in wpDataTables[tableId].onRenderCheckboxFilterModal){wpDataTables[tableId].onRenderCheckboxFilterModal[i]($modal,columnIndex)}}
$modal.attr('data-current-checkbox-dialog',dlg.attr('id'));$modal.addClass('wdt-skin-'+tableDesc.tableSkin);$modal.addClass('wdt-checkbox-render-modal');if(tableDesc.table_wcag){$modal.addClass('wpTableWCAG')}
$modal.modal('show')});$modal.on('hide.bs.modal',function(){$modal.removeClass('wdt-checkbox-render-modal')});$modal.on('shown.bs.modal',function(){jQuery(this).off('click','#wdt-checkbox-filter-close').on('click','#wdt-checkbox-filter-close',function(e){e.preventDefault();e.stopImmediatePropagation();$modal.modal('hide');if(jQuery('#'+$modal.attr('data-current-checkbox-dialog')).length){jQuery('.wdt-checkbox-modal-wrap.'+$modal.attr('data-current-checkbox-dialog')).html(jQuery('#'+$modal.attr('data-current-checkbox-dialog'))).hide()}
$modal.find('.modal-body').html('')});jQuery(this).off('click','#wdt-checkbox-filter-reset').on('click.resetCheckboxFilter','#wdt-checkbox-filter-reset',function(e){e.preventDefault();e.stopImmediatePropagation();if(jQuery('#'+$modal.attr('data-current-checkbox-dialog')).length){jQuery('#'+$modal.attr('data-current-checkbox-dialog')).find(jQuery('input.wdt-checkbox-filter:checkbox:checked')).each(function(){jQuery(this).prop('checked',!1).change()})}
oTable.api().column(columnIndex).search('');fnOnFiltered()})})}
function checkboxSearch(columnIndex,checkboxesDivId){var tableDescription=JSON.parse(jQuery('#'+oTable.data('described-by')).val());var columnType=tableDescription.dataTableParams.columnDefs[columnIndex].wdtType;var search='',checkedInputs,useAndLogic;checkedInputs=jQuery(this).closest('#'+checkboxesDivId).find('input:checkbox:checked');useAndLogic=aoColumn.andLogic&&!serverSide;var checkedValue=jQuery(this).val();if(!jQuery(this).is(':checked')){orderCheckbox=orderCheckbox.filter(function(value){return value!==checkedValue})}else{if(!orderCheckbox.includes(checkedValue)){orderCheckbox.push(checkedValue)}
if(aoColumn.defaultValue[0]&&!orderCheckbox.includes(aoColumn.defaultValue[0])){orderCheckbox.push(aoColumn.defaultValue[0])}}
var i=0;jQuery.each(checkedInputs,function(){value=orderCheckbox[i]?orderCheckbox[i]:checkedInputs[i].value;if(columnType==='email'&&serverSide===!1){var startIndex=value.indexOf('mailto:')+7;var endIndex=value.lastIndexOf("%22");value=value.substr(startIndex,endIndex-startIndex)}
search+=useAndLogic?buildAndSearchStringForMultiFilters(value,aoColumn.exactFiltering,i):buildSearchStringForMultiFilters(value,aoColumn.exactFiltering);i++});if(useAndLogic){if(aoColumn.exactFiltering){search=search.slice(0,-2);search+='$'}
oTable.api().column(columnIndex).search(search,!0,!1)}else{oTable.api().column(columnIndex).search(search.substring(0,search.length-1),!0,!1)}
if(typeof wpDataTables[tableId].drawTable==='undefined'||wpDataTables[tableId].drawTable===!0){oTable.api().draw()}
fnOnFiltered()}}
function showSelectMultiSelectboxForFixedHeaderAndColumns(tableDescription,oTable,select){var leftPos='auto',topPos='auto',rightPos='auto',bottomPos='auto';if(select.closest('.wdtscroll').length){if(select.parents('table').hasClass('fixedHeader-floating')){jQuery('.dtfh-floatingparenthead').css('height',oTable[0].offsetHeight)}
if(tableDescription.renderFilter=="header"){if(select.parents('table').hasClass('fixedHeader-floating')&&(select.closest('th').hasClass('dtfc-fixed-left')||select.closest('th').hasClass('dtfc-fixed-right'))){if(select.closest('th').hasClass('dtfc-fixed-left')){leftPos=parseFloat(select.closest('th')[0].style.left)+select.closest('.wdtscroll').scrollLeft()+'px'}else if(select.closest('th').hasClass('dtfc-fixed-right')){rightPos=-(parseFloat(select.closest('th')[0].style.right)+select.closest('.wdtscroll').scrollLeft())+'px'}
topPos=select.closest('th').height()-select.height()+'px'}else if(select.closest('th').hasClass('dtfc-fixed-left')){leftPos=parseFloat(select.closest('th')[0].style.left)+15+'px';topPos=select.closest('thead').height()+'px'}else if(select.closest('th').hasClass('dtfc-fixed-right')){rightPos=parseFloat(select.closest('th')[0].style.right)+15+'px';topPos=select.closest('thead').height()+'px'}else if(select.parents('table').hasClass('fixedHeader-floating')){leftPos='auto'}else if(tableDescription.fixedColumns||tableDescription.fixedHeader){leftPos='auto'}else{leftPos=select.offset().left-select.closest('.wdtscroll').offset().left-select.closest('th').width()/2+'px'}
select.closest('div').find('.open').css('min-width',select.closest('th').width()+45);select.closest('th.dtfc-fixed-left').css('z-index',5);select.closest('th.dtfc-fixed-right').css('z-index',5);select.closest('th').css('position','')}else{if(select.parents('table').hasClass('fixedHeader-floating')&&(select.closest('td').hasClass('dtfc-fixed-left')||select.closest('td').hasClass('dtfc-fixed-right'))){if(select.closest('td').hasClass('dtfc-fixed-left')){leftPos=parseFloat(select.closest('td')[0].style.left)+select.closest('.wdtscroll').scrollLeft()+'px'}
if(select.closest('td').hasClass('dtfc-fixed-right')){rightPos=-(parseFloat(select.closest('td')[0].style.right)+select.closest('.wdtscroll').scrollLeft())+'px'}
bottomPos=select.closest('td').height()-select.height()+'px'}else if(select.closest('td').hasClass('dtfc-fixed-left')){leftPos=parseFloat(select.closest('td')[0].style.left)+15+'px';bottomPos=select.closest('tfoot').height()+'px'}else if(select.closest('td').hasClass('dtfc-fixed-right')){rightPos=parseFloat(select.closest('td')[0].style.right)+15+'px';bottomPos=select.closest('tfoot').height()+'px'}else{leftPos=select.offset().left-select.closest('.wdtscroll').offset().left-select.closest('td').width()/2+'px'}
select.closest('div').find('.open').css('min-width',select.closest('td').width()+45);select.closest('td.dtfc-fixed-left').css('z-index',5);select.closest('td.dtfc-fixed-right').css('z-index',5);select.closest('td').css('position','')}
select.closest('div').find('.open').css({"left":leftPos,"top":topPos,"right":rightPos,"bottom":bottomPos});select.closest('.btn-group').css('position','unset')}}
function hideSelectMultiSelectboxForFixedHeaderAndColumns(select){select.closest('.btn-group').css('position','relative');if(select.parents('table').hasClass('fixedHeader-floating')){jQuery('.dtfh-floatingparenthead').css({"height":"max-content"});select.closest('th').css('z-index',4)}
if(select.closest('th').hasClass('dtfc-fixed-left')||select.closest('th').hasClass('dtfc-fixed-right')){select.closest('th').css('position','sticky');select.closest('th').css('z-index',4)}
if(select.closest('td').hasClass('dtfc-fixed-left')||select.closest('td').hasClass('dtfc-fixed-right')){select.closest('td').css('position','sticky');select.closest('td').css('z-index',4)}}
function getColumnDistinctValues(tableId,columnIndex,applySearch){applySearch=applySearch?'applied':'none';var values=wpDataTables[tableId].api().column(columnIndex,{search:applySearch}).data().unique().toArray().filter(Boolean).sort();var result=[];for(var i=0;i<values.length;i++){result[i]=[];result[i].value=values[i];result[i].label=values[i]}
return result}
function buildSearchStringForMultiFilters(value,exactFiltering){var search='',or='|';if(exactFiltering){search=search+'^'+value.toString().replace(/\+/g,'\\+')+'$'+or}else{search=search+value.toString().replace(/\+/g,'\\+')+or}
return decodeURIComponent(search)}
function buildAndSearchStringForMultiFilters(value,exactFiltering,index){var search='';if(exactFiltering){if(index===0){search='^'}
search+=value.toString().replace(/\+/g,'\\+')+', '}else{search=search+'(?=.*'+value.toString().replace(/\+/g,'\\+')+')'}
return decodeURIComponent(search)}
function wdtClearFilters(){jQuery('.wdt-clear-filters-button, .wdt-clear-filters-widget-button').click(function(e){e.preventDefault();e.stopImmediatePropagation();e.preventDefault();var button=jQuery(e.target);if(button.is('.wdt-clear-filters-widget-button')){jQuery('.filter_column input:not([type="checkbox"])').val('');jQuery('.filter_column select').val('').trigger('change');jQuery('.filter_column select').selectpicker('val','');jQuery('.filter_column input:checkbox').removeAttr('checked');jQuery('.noUi-target').each(function(columnIndex){var columnMin=jQuery('.noUi-target')[columnIndex].noUiSlider.options.range.min;var columnMax=jQuery('.noUi-target')[columnIndex].noUiSlider.options.range.min;jQuery('.noUi-target')[columnIndex].noUiSlider.set([columnMin,columnMax])});for(var i in wpDataTables){wpDataTables[i].api().columns().search('').draw()}
jQuery('.filter_column select').find('.filter_column').eq(0).change()}else{var wpDataTableSelecter=jQuery(this).closest('.wpDataTables');wpDataTableSelecter.find('.filter_column input:not([type="checkbox"])').val('');wpDataTableSelecter.find('.filter_column select').val('').trigger('change');wpDataTableSelecter.find('.filter_column select').selectpicker('val','');wpDataTableSelecter.find('.filter_column input:checkbox').removeAttr('checked');wpDataTableSelecter.find('.noUi-target').each(function(columnIndex){var columnMin=wpDataTableSelecter.find('.noUi-target')[columnIndex].noUiSlider.options.range.min;var columnMax=wpDataTableSelecter.find('.noUi-target')[columnIndex].noUiSlider.options.range.max;wpDataTableSelecter.find('.noUi-target')[columnIndex].noUiSlider.set([columnMin,columnMax])});var tableId='';if(jQuery(this).parent().is('#wdt-clear-filters-button-block')){tableId=jQuery(this).data('table_id')}else{tableId=jQuery(this).closest('.wpDataTablesWrapper').find('table.wpDataTable').prop('id')}
wpDataTables[tableId].api().columns().search('').draw();wpDataTableSelecter.find('.wdt-filter-control').eq(0).change()}})}
function wdtAddAttributesForWCAGSelectBox(select,selector,tableDescription){if(tableDescription.table_wcag){select.on('shown.bs.select',function(){select.selectpicker('refresh');jQuery('div.'+selector+'.open .dropdown-menu.open').attr('aria-controls',tableDescription.tableId).attr('aria-expanded','false');jQuery('div.'+selector+'.open .dropdown-menu.open ul').attr('aria-controls',tableDescription.tableId).attr('role','listbox');jQuery('div.'+selector+'.open .dropdown-menu.open ul li').attr('role','list').attr('aria-required-parent','listbox')});select.on('refreshed.bs.select',function(){jQuery('div.'+selector+'.open').find('.dropdown-menu.open ul li').attr('role','option').attr('aria-label',selector==='wdt-multiselect-filter'?wpdatatables_filter_strings.multiSelectBoxOption:wpdatatables_filter_strings.selectBoxOption);jQuery('div.'+selector+'.open').find('.dropdown-menu.open ul li.divider').attr('aria-label',wpdatatables_filter_strings.dividerSearchBox);jQuery('div.'+selector+'.open').find('.dropdown-menu.open ul li a').removeAttr('tabindex').removeAttr('aria-selected').removeAttr('role')})}}
function wdtAddAttributesForDateTime(selector,element,selectorPicker){jQuery(selector).parent().parent().addClass('wpdt_using_wcag_filter');if(element.target.classList.contains(selectorPicker)){jQuery(selector).parent().parent().attr('data-value-from',jQuery(selector).val())}else{jQuery(selector).parent().parent().attr('data-value-to',jQuery(selector).val())}};(function($){"use strict";$.fn.rowGrouping=function(options){function _fnOnGrouped(){}
function _fnOnGroupCreated(oGroup,sGroup,iLevel){}
function _fnOnGroupCompleted(oGroup,sGroup,iLevel){}
function _getMonthName(iMonth){var asMonths=["January","February","March","April","May","June","July","August","September","October","November","December"];return asMonths[iMonth-1]}
var defaults={iGroupingColumnIndex:0,sGroupingColumnSortDirection:"",iGroupingOrderByColumnIndex:-1,sGroupingClass:"group",sGroupItemClass:"group-item",bHideGroupingColumn:!0,bHideGroupingOrderByColumn:!0,sGroupBy:"name",sGroupLabelPrefix:"",fnGroupLabelFormat:function(label){return label},bExpandableGrouping:!1,bExpandSingleGroup:!1,iExpandGroupOffset:100,asExpandedGroups:null,sDateFormat:"dd/MM/yyyy",sEmptyGroupLabel:"-",bSetGroupingClassOnTR:!1,iGroupingColumnIndex2:-1,sGroupingColumnSortDirection2:"",iGroupingOrderByColumnIndex2:-1,sGroupingClass2:"subgroup",sGroupItemClass2:"subgroup-item",bHideGroupingColumn2:!0,bHideGroupingOrderByColumn2:!0,sGroupBy2:"name",sGroupLabelPrefix2:"",fnGroupLabelFormat2:function(label){return label},bExpandableGrouping2:!1,fnOnGrouped:_fnOnGrouped,fnOnGroupCreated:_fnOnGroupCreated,fnOnGroupCompleted:_fnOnGroupCompleted,oHideEffect:null,oShowEffect:null,bUseFilteringForGrouping:!1};return this.each(function(index,elem){var oTable=$(elem).dataTable();var aoGroups=new Array();$(this).dataTableExt.aoGroups=aoGroups;function fnCreateGroupRow(sGroupCleaned,sGroup,iColspan,iColSpan2){var nGroup=document.createElement('tr');var nCell=document.createElement('td');var nCellFC=document.createElement('td');nGroup.id="group-id-"+oTable.attr("id")+"_"+sGroupCleaned;var oGroup={id:nGroup.id,key:sGroupCleaned,text:sGroup,level:0,groupItemClass:".group-item-"+sGroupCleaned,dataGroup:sGroupCleaned,aoSubgroups:new Array()};if(properties.bSetGroupingClassOnTR){nGroup.className=properties.sGroupingClass+" "+sGroupCleaned}else{nCell.className=properties.sGroupingClass+" "+sGroupCleaned;nCellFC.className=properties.sGroupingClass+" "+sGroupCleaned}
nCell.colSpan=iColspan;nCellFC.colSpan=iColSpan2;if(iColSpan2!=0){nCell.className+=' dtfc-fixed-left ';nCell.style.position='sticky';nCell.style.left='0px'}
nCell.innerHTML=properties.sGroupLabelPrefix+properties.fnGroupLabelFormat(sGroup==""?properties.sEmptyGroupLabel:sGroup,oGroup);if(properties.bExpandableGrouping){if(!_fnIsGroupCollapsed(sGroupCleaned)){nCell.className+=" expanded-group";oGroup.state="expanded"}else{nCell.className+=" collapsed-group";oGroup.state="collapsed"}
nCell.className+=" group-item-expander";$(nCell).attr('data-group',oGroup.dataGroup);$(nCell).attr("data-group-level",oGroup.level);$(nCell).click(_fnOnGroupClick)}
nGroup.appendChild(nCell)
if(iColSpan2!=0){nGroup.appendChild(nCellFC)}
aoGroups[sGroupCleaned]=oGroup;oGroup.nGroup=nGroup;properties.fnOnGroupCreated(oGroup,sGroupCleaned,1);return oGroup}
function _fnCreateGroup2Row(sGroup2,sGroupLabel,iColspan,oParentGroup){var nGroup2=document.createElement('tr');nGroup2.id=oParentGroup.id+"_"+sGroup2;var nCell2=document.createElement('td');var dataGroup=oParentGroup.dataGroup+'_'+sGroup2;var oGroup={id:nGroup2.id,key:sGroup2,text:sGroupLabel,level:oParentGroup.level+1,groupItemClass:".group-item-"+dataGroup,dataGroup:dataGroup,aoSubgroups:new Array()};if(properties.bSetGroupingClassOnTR){nGroup2.className=properties.sGroupingClass2+" "+sGroup2}else{nCell2.className=properties.sGroupingClass2+" "+sGroup2}
nCell2.colSpan=iColspan;nCell2.innerHTML=properties.sGroupLabelPrefix2+properties.fnGroupLabelFormat2(sGroupLabel==""?properties.sEmptyGroupLabel:sGroupLabel,oGroup);if(properties.bExpandableGrouping){nGroup2.className+=" group-item-"+oParentGroup.dataGroup}
if(properties.bExpandableGrouping&&properties.bExpandableGrouping2){if(!_fnIsGroupCollapsed(oGroup.dataGroup)){nCell2.className+=" expanded-group";oGroup.state="expanded"}else{nCell2.className+=" collapsed-group";oGroup.state="collapsed"}
nCell2.className+=" group-item-expander";$(nCell2).attr('data-group',oGroup.dataGroup);$(nCell2).attr("data-group-level",oGroup.level);$(nCell2).click(_fnOnGroupClick)}
nGroup2.appendChild(nCell2);oParentGroup.aoSubgroups[oGroup.dataGroup]=oGroup;aoGroups[oGroup.dataGroup]=oGroup;oGroup.nGroup=nGroup2;properties.fnOnGroupCreated(oGroup,sGroup2,2);return oGroup}
function _fnIsGroupCollapsed(sGroup){if(aoGroups[sGroup]!=null)
return(aoGroups[sGroup].state=="collapsed");else if(sGroup.indexOf("_")>-1)
!0;else if(bInitialGrouping&&(asExpandedGroups==null||asExpandedGroups.length==0))
return!1;else return($.inArray(sGroup,asExpandedGroups)==-1)}
function _fnGetYear(x){if(x.length<(iYearIndex+iYearLength))
return x;else return x.substr(iYearIndex,iYearLength)}
function _fnGetGroupByName(x){return x}
function _fnGetGroupByLetter(x){return x.substr(0,1)}
function _fnGetGroupByYear(x){return _fnGetYear(x)}
function _fnGetGroupByYearMonth(x){return x.substr(iYearIndex,iYearLength)+' '+_getMonthName(x.substr(iMonthIndex,iMonthLength))}
function _fnGetCleanedGroup(sGroup){if(typeof sGroup==="undefined"||sGroup==="")return properties.sEmptyGroupLabel;return sGroup.toLowerCase().replace(/[^a-zA-Z0-9\u0080-\uFFFF]+/g,"-")}
function _rowGroupingRowFilter(oSettings,aData,iDataIndex){if(oSettings.nTable.id!==oTable[0].id)return!0;var sColData=aData[properties.iGroupingColumnIndex];if(typeof sColData==="undefined")
sColData=aData[oSettings.aoColumns[properties.iGroupingColumnIndex].mData];if(_fnIsGroupCollapsed(_fnGetCleanedGroup(sColData))){if(oTable.fnIsOpen(oTable.fnGetNodes(iDataIndex))){if(properties.fnOnRowClosed!=null){properties.fnOnRowClosed(this)}
oTable.fnClose(oTable.fnGetNodes(iDataIndex))}
return!1};return!0}
function fnExpandGroup(sGroup){aoGroups[sGroup].state="expanded";$("td[data-group='"+sGroup+"']").removeClass("collapsed-group");$("td[data-group='"+sGroup+"']").addClass("expanded-group");if(properties.bUseFilteringForGrouping){oTable.fnDraw();return}
if(jQuery.inArray(sGroup,asExpandedGroups)==-1)
asExpandedGroups.push(sGroup);if(properties.oHideEffect!=null)
$(".group-item-"+sGroup,oTable)[properties.oShowEffect.method](properties.oShowEffect.duration,properties.oShowEffect.easing,function(){});else $(".group-item-"+sGroup,oTable).show()}
function fnCollapseGroup(sGroup){aoGroups[sGroup].state="collapsed";$("td[data-group='"+sGroup+"']").removeClass("expanded-group");$("td[data-group='"+sGroup+"']").addClass("collapsed-group");if(properties.bUseFilteringForGrouping){oTable.fnDraw();return}
$('.group-item-'+sGroup).each(function(){if(oTable.fnIsOpen(this)){if(properties.fnOnRowClosed!=null){properties.fnOnRowClosed(this)}
oTable.fnClose(this)}});if(properties.oHideEffect!=null)
$(".group-item-"+sGroup,oTable)[properties.oHideEffect.method](properties.oHideEffect.duration,properties.oHideEffect.easing,function(){});else $(".group-item-"+sGroup,oTable).hide()}
function _fnOnGroupClick(e){var sGroup=$(this).attr("data-group");var iGroupLevel=$(this).attr("data-group-level");var bIsExpanded=!_fnIsGroupCollapsed(sGroup);if(properties.bExpandSingleGroup){if(!bIsExpanded){var sCurrentGroup=$("td.expanded-group").attr("data-group");fnCollapseGroup(sCurrentGroup);fnExpandGroup(sGroup);if(properties.iExpandGroupOffset!=-1){var position=$("#group-id-"+oTable.attr("id")+"_"+sGroup).offset().top-properties.iExpandGroupOffset;window.scroll(0,position)}else{var position=oTable.offset().top;window.scroll(0,position)}}}else{if(bIsExpanded){fnCollapseGroup(sGroup)}else{fnExpandGroup(sGroup)}}
e.preventDefault()};function _fnDrawCallBackWithGrouping(oSettings){if(oTable.fnSettings().oFeatures.bServerSide)
bInitialGrouping=!0;var bUseSecondaryGrouping=!1;if(properties.iGroupingColumnIndex2!=-1)
bUseSecondaryGrouping=!0;if(oSettings.aiDisplayMaster.length==0){return}
var nTrs=$('tbody tr',oTable);var iColspan=0;var iColspanFC=0;for(var iColIndex=0;iColIndex<oSettings.aoColumns.length;iColIndex++){if(oSettings.aoColumns[iColIndex].bVisible)
iColspan+=1}
if(oSettings.oInstance.api().settings()[0]._fixedColumns!=undefined&&oSettings.oInstance.api().fixedColumns().left()!=0){iColspanFC=iColspan-oSettings.oInstance.api().fixedColumns().left();iColspan=oSettings.oInstance.api().fixedColumns().left()}
if(oSettings.oInstance.api().settings()[0]._fixedHeader!=undefined){oSettings.oInstance.api().fixedHeader.adjust()}
var sLastGroup=null;var sLastGroup2=null;if(oSettings.aiDisplay.length>0){for(var i=0;i<nTrs.length;i++){var iDisplayIndex=oSettings._iDisplayStart+i;if(oTable.fnSettings().oFeatures.bServerSide)
iDisplayIndex=i;var sGroupData="";var sGroup=null;var sGroupData2="";var sGroup2=null;sGroupData=this.fnGetData(nTrs[i],properties.iGroupingColumnIndex);var sGroup=sGroupData;if(properties.sGroupBy!="year")
sGroup=fnGetGroup(sGroupData);if(bUseSecondaryGrouping){sGroupData2=oSettings.aoData[oSettings.aiDisplay[iDisplayIndex]]._aData[properties.iGroupingColumnIndex2];if(sGroupData2==undefined)
sGroupData2=oSettings.aoData[oSettings.aiDisplay[iDisplayIndex]]._aData[oSettings.aoColumns[properties.iGroupingColumnIndex2].mData];if(properties.sGroupBy2!="year")
sGroup2=fnGetGroup(sGroupData2);}
if(sLastGroup==null||_fnGetCleanedGroup(sGroup)!=_fnGetCleanedGroup(sLastGroup)){var sGroupCleaned=_fnGetCleanedGroup(sGroup);if(sLastGroup!=null){properties.fnOnGroupCompleted(aoGroups[_fnGetCleanedGroup(sLastGroup)])}
if(properties.bAddAllGroupsAsExpanded&&jQuery.inArray(sGroupCleaned,asExpandedGroups)==-1)
asExpandedGroups.push(sGroupCleaned);var oGroup=fnCreateGroupRow(sGroupCleaned,sGroup,iColspan,iColspanFC);var nGroup=oGroup.nGroup;if(nTrs[i].parentNode!=null)
nTrs[i].parentNode.insertBefore(nGroup,nTrs[i]);else $(nTrs[i]).before(nGroup);sLastGroup=sGroup;sLastGroup2=null}
$(nTrs[i]).attr("data-group",aoGroups[sGroupCleaned].dataGroup);$(nTrs[i]).addClass(properties.sGroupItemClass);$(nTrs[i]).addClass("group-item-"+sGroupCleaned);if(properties.bExpandableGrouping){if(_fnIsGroupCollapsed(sGroupCleaned)&&!properties.bUseFilteringForGrouping){$(nTrs[i]).hide()}}
if(bUseSecondaryGrouping){if(sLastGroup2==null||_fnGetCleanedGroup(sGroup2)!=_fnGetCleanedGroup(sLastGroup2)){var sGroup2Id=_fnGetCleanedGroup(sGroup)+'-'+_fnGetCleanedGroup(sGroup2);var oGroup2=_fnCreateGroup2Row(sGroup2Id,sGroup2,iColspan,aoGroups[sGroupCleaned])
var nGroup2=oGroup2.nGroup;nTrs[i].parentNode.insertBefore(nGroup2,nTrs[i]);sLastGroup2=sGroup2}
$(nTrs[i]).attr("data-group",oGroup2.dataGroup).addClass(properties.sGroupItemClass2).addClass("group-item-"+oGroup2.dataGroup)}}};if(sLastGroup!=null){properties.fnOnGroupCompleted(aoGroups[_fnGetCleanedGroup(sLastGroup)])}
properties.fnOnGrouped(aoGroups);bInitialGrouping=!1};var iYearIndex=6;var iYearLength=4;var asExpandedGroups=new Array();var bInitialGrouping=!0;var properties=$.extend(defaults,options);if(properties.iGroupingOrderByColumnIndex==-1){properties.bCustomColumnOrdering=!1;properties.iGroupingOrderByColumnIndex=properties.iGroupingColumnIndex}else{properties.bCustomColumnOrdering=!0}
if(properties.sGroupingColumnSortDirection==""){if(properties.sGroupBy=="year")
properties.sGroupingColumnSortDirection="desc";else properties.sGroupingColumnSortDirection="asc"}
if(properties.iGroupingOrderByColumnIndex2==-1){properties.bCustomColumnOrdering2=!1;properties.iGroupingOrderByColumnIndex2=properties.iGroupingColumnIndex2}else{properties.bCustomColumnOrdering2=!0}
if(properties.sGroupingColumnSortDirection2==""){if(properties.sGroupBy2=="year")
properties.sGroupingColumnSortDirection2="desc";else properties.sGroupingColumnSortDirection2="asc"}
iYearIndex=properties.sDateFormat.toLowerCase().indexOf('yy');iYearLength=properties.sDateFormat.toLowerCase().lastIndexOf('y')-properties.sDateFormat.toLowerCase().indexOf('y')+1;var iMonthIndex=properties.sDateFormat.toLowerCase().indexOf('mm');var iMonthLength=properties.sDateFormat.toLowerCase().lastIndexOf('m')-properties.sDateFormat.toLowerCase().indexOf('m')+1;var fnGetGroup=_fnGetGroupByName;switch(properties.sGroupBy){case "letter":fnGetGroup=_fnGetGroupByLetter;break;case "year":fnGetGroup=_fnGetGroupByYear;break;case "month":fnGetGroup=_fnGetGroupByYearMonth;break;default:fnGetGroup=_fnGetGroupByName;break}
if(properties.asExpandedGroups!=null){if(properties.asExpandedGroups=="NONE"){properties.asExpandedGroups=[];asExpandedGroups=properties.asExpandedGroups;bInitialGrouping=!1}else if(properties.asExpandedGroups=="ALL"){properties.bAddAllGroupsAsExpanded=!0}else if(properties.asExpandedGroups.constructor==String){var currentGroup=properties.asExpandedGroups;properties.asExpandedGroups=new Array();properties.asExpandedGroups.push(_fnGetCleanedGroup(currentGroup));asExpandedGroups=properties.asExpandedGroups;bInitialGrouping=!1}else if(properties.asExpandedGroups.constructor==Array){for(var i=0;i<properties.asExpandedGroups.length;i++){asExpandedGroups.push(_fnGetCleanedGroup(properties.asExpandedGroups[i]));if(properties.bExpandSingleGroup)
break}
bInitialGrouping=!1}}else{properties.asExpandedGroups=new Array();properties.bAddAllGroupsAsExpanded=!0}
if(properties.bExpandSingleGroup){var nTrs=$('tbody tr',oTable);var sGroupData=oTable.fnGetData(nTrs[0],properties.iGroupingColumnIndex);var sGroup=sGroupData;if(properties.sGroupBy!="year")
sGroup=fnGetGroup(sGroupData);var sGroupCleaned=_fnGetCleanedGroup(sGroup);properties.asExpandedGroups=new Array();properties.asExpandedGroups.push(sGroupCleaned)}
oTable.fnSetColumnVis(properties.iGroupingColumnIndex,!properties.bHideGroupingColumn);if(properties.bCustomColumnOrdering){oTable.fnSetColumnVis(properties.iGroupingOrderByColumnIndex,!properties.bHideGroupingOrderByColumn)}
if(properties.iGroupingColumnIndex2!=-1){oTable.fnSetColumnVis(properties.iGroupingColumnIndex2,!properties.bHideGroupingColumn2)}
if(properties.bCustomColumnOrdering2){oTable.fnSetColumnVis(properties.iGroupingOrderByColumnIndex2,!properties.bHideGroupingOrderByColumn2)}
oTable.fnSettings().aoDrawCallback.push({"fn":_fnDrawCallBackWithGrouping,"sName":"fnRowGrouping"});var aaSortingFixed=new Array();aaSortingFixed.push([properties.iGroupingOrderByColumnIndex,properties.sGroupingColumnSortDirection]);if(properties.iGroupingColumnIndex2!=-1){aaSortingFixed.push([properties.iGroupingOrderByColumnIndex2,properties.sGroupingColumnSortDirection2])}
oTable.fnSettings().aaSortingFixed=aaSortingFixed;switch(properties.sGroupBy){case "name":break;case "letter":oTable.fnSettings().aoColumns[properties.iGroupingOrderByColumnIndex].sSortDataType="rg-letter";$.fn.dataTableExt.afnSortData['rg-letter']=function(oSettings,iColumn){var aData=[];$('td:eq('+iColumn+')',oSettings.oApi._fnGetTrNodes(oSettings)).each(function(){aData.push(_fnGetGroupByLetter(this.innerHTML))});return aData}
break;case "year":oTable.fnSettings().aoColumns[properties.iGroupingOrderByColumnIndex].sSortDataType="rg-date";$.fn.dataTableExt.afnSortData['rg-date']=function(oSettings,iColumn){var aData=[];var nTrs=oSettings.oApi._fnGetTrNodes(oSettings);for(i=0;i<nTrs.length;i++){aData.push(_fnGetYear(oTable.fnGetData(nTrs[i],iColumn)))}
return aData}
break;default:break}
if(properties.bUseFilteringForGrouping)
$.fn.dataTableExt.afnFiltering.push(_rowGroupingRowFilter);oTable.fnDraw()})}})(jQuery);/*!
 Buttons for DataTables 2.2.3
 ©2016-2022 SpryMedia Ltd - datatables.net/license
*/
(function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(A){return d(A,window,document)}):"object"===typeof exports?module.exports=function(A,C){A||(A=window);C&&C.fn.dataTable||(C=require("datatables.net")(A,C).$);return d(C,A,A.document)}:d(jQuery,window,document)})(function(d,A,C,p){function I(a,b,c){d.fn.animate?a.stop().fadeIn(b,c):(a.css("display","block"),c&&c.call(a))}function J(a,b,c){d.fn.animate?a.stop().fadeOut(b,c):(a.css("display","none"),c&&c.call(a))}
function L(a,b){a=new u.Api(a);b=b?b:a.init().buttons||u.defaults.buttons;return(new x(a,b)).container()}var u=d.fn.dataTable,O=0,P=0,D=u.ext.buttons,x=function(a,b){if(!(this instanceof x))return function(c){return(new x(c,a)).container()};"undefined"===typeof b&&(b={});!0===b&&(b={});Array.isArray(b)&&(b={buttons:b});this.c=d.extend(!0,{},x.defaults,b);b.buttons&&(this.c.buttons=b.buttons);this.s={dt:new u.Api(a),buttons:[],listenKeys:"",namespace:"dtb"+O++};this.dom={container:d("<"+this.c.dom.container.tag+"/>").addClass(this.c.dom.container.className)};this._constructor()};d.extend(x.prototype,{action:function(a,b){a=this._nodeToButton(a);if(b===p)return a.conf.action;a.conf.action=b;return this},active:function(a,b){var c=this._nodeToButton(a);a=this.c.dom.button.active;c=d(c.node);if(b===p)return c.hasClass(a);c.toggleClass(a,b===p?!0:b);return this},add:function(a,b,c){var e=this.s.buttons;if("string"===typeof b){b=b.split("-");var h=this.s;e=0;for(var f=b.length-1;e<f;e++)h=h.buttons[1*b[e]];e=h.buttons;b=1*b[b.length-1]}this._expandButton(e,a,a!==p?a.split:p,(a===p||a.split===p||0===a.split.length)&&h!==p,!1,b);c!==p&&!0!==c||this._draw();return this},collectionRebuild:function(a,b){a=this._nodeToButton(a);if(b!==p){var c;for(c=a.buttons.length-1;0<=c;c--)this.remove(a.buttons[c].node);for(c=0;c<b.length;c++){var e=b[c];this._expandButton(a.buttons,e,e!==p&&e.config!==p&&e.config.split!==p,!0,e.parentConf!==p&&e.parentConf.split!==p,c,e.parentConf)}}this._draw(a.collection,a.buttons)},container:function(){return this.dom.container},disable:function(a){a=this._nodeToButton(a);d(a.node).addClass(this.c.dom.button.disabled).attr("disabled",!0);return this},destroy:function(){d("body").off("keyup."+this.s.namespace);var a=this.s.buttons.slice(),b;var c=0;for(b=a.length;c<b;c++)this.remove(a[c].node);this.dom.container.remove();a=this.s.dt.settings()[0];c=0;for(b=a.length;c<b;c++)if(a.inst===this){a.splice(c,1);break}return this},enable:function(a,b){if(!1===b)return this.disable(a);a=this._nodeToButton(a);d(a.node).removeClass(this.c.dom.button.disabled).removeAttr("disabled");return this},index:function(a,b,c){b||(b="",c=this.s.buttons);for(var e=0,h=c.length;e<h;e++){var f=c[e].buttons;if(c[e].node===a)return b+e;if(f&&f.length&&(f=this.index(a,e+"-",f),null!==f))return f}return null},name:function(){return this.c.name},node:function(a){if(!a)return this.dom.container;a=this._nodeToButton(a);return d(a.node)},processing:function(a,b){var c=this.s.dt,e=this._nodeToButton(a);if(b===p)return d(e.node).hasClass("processing");d(e.node).toggleClass("processing",b);d(c.table().node()).triggerHandler("buttons-processing.dt",[b,c.button(a),c,d(a),e.conf]);return this},remove:function(a){var b=this._nodeToButton(a),c=this._nodeToHost(a),e=this.s.dt;if(b.buttons.length)for(var h=b.buttons.length-1;0<=h;h--)this.remove(b.buttons[h].node);b.conf.destroying=!0;b.conf.destroy&&b.conf.destroy.call(e.button(a),e,d(a),b.conf);this._removeKey(b.conf);d(b.node).remove();a=d.inArray(b,c);c.splice(a,1);return this},text:function(a,b){var c=this._nodeToButton(a);a=this.c.dom.collection.buttonLiner;a=c.inCollection&&a&&a.tag?a.tag:this.c.dom.buttonLiner.tag;var e=this.s.dt,h=d(c.node),f=function(g){return"function"===typeof g?g(e,h,c.conf):g};if(b===p)return f(c.conf.text);c.conf.text=b;a?h.children(a).eq(0).filter(":not(.dt-down-arrow)").html(f(b)):h.html(f(b));return this},_constructor:function(){var a=this,b=this.s.dt,c=b.settings()[0],e=this.c.buttons;c._buttons||(c._buttons=[]);c._buttons.push({inst:this,name:this.c.name});for(var h=0,f=e.length;h<f;h++)this.add(e[h]);b.on("destroy",function(g,l){l===c&&a.destroy()});d("body").on("keyup."+this.s.namespace,function(g){if(!C.activeElement||C.activeElement===C.body){var l=String.fromCharCode(g.keyCode).toLowerCase();-1!==a.s.listenKeys.toLowerCase().indexOf(l)&&a._keypress(l,g)}})},_addKey:function(a){a.key&&(this.s.listenKeys+=d.isPlainObject(a.key)?a.key.key:a.key)},_draw:function(a,b){a||(a=this.dom.container,b=this.s.buttons);a.children().detach();for(var c=0,e=b.length;c<e;c++)a.append(b[c].inserter),a.append(" "),b[c].buttons&&b[c].buttons.length&&this._draw(b[c].collection,b[c].buttons)},_expandButton:function(a,b,c,e,h,f,g){var l=this.s.dt,m=0,r=Array.isArray(b)?b:[b];b===p&&(r=Array.isArray(c)?c:[c]);c=0;for(var q=r.length;c<q;c++){var n=this._resolveExtends(r[c]);if(n)if(b=n.config!==p&&n.config.split?!0:!1,Array.isArray(n))this._expandButton(a,n,k!==p&&k.conf!==p?k.conf.split:p,e,g!==p&&g.split!==p,f,g);else{var k=this._buildButton(n,e,n.split!==p||n.config!==p&&n.config.split!==p,h);if(k){f!==p&&null!==f?(a.splice(f,0,k),f++):a.push(k);if(k.conf.buttons||k.conf.split){k.collection=d("<"+(b?this.c.dom.splitCollection.tag:this.c.dom.collection.tag)+"/>");k.conf._collection=k.collection;if(k.conf.split)for(var t=0;t<k.conf.split.length;t++)"object"===typeof k.conf.split[t]&&(k.conf.split[t].parent=g,k.conf.split[t].collectionLayout===p&&(k.conf.split[t].collectionLayout=k.conf.collectionLayout),k.conf.split[t].dropup===p&&(k.conf.split[t].dropup=k.conf.dropup),k.conf.split[t].fade===p&&(k.conf.split[t].fade=k.conf.fade));else d(k.node).append(d('<span class="dt-down-arrow">'+this.c.dom.splitDropdown.text+"</span>"));this._expandButton(k.buttons,k.conf.buttons,k.conf.split,!b,b,f,k.conf)}k.conf.parent=g;n.init&&n.init.call(l.button(k.node),l,d(k.node),n);m++}}}},_buildButton:function(a,b,c,e){var h=this.c.dom.button,f=this.c.dom.buttonLiner,g=this.c.dom.collection,l=this.c.dom.splitCollection,m=this.c.dom.splitDropdownButton,r=this.s.dt,q=function(v){return"function"===typeof v?v(r,k,a):v};if(a.spacer){var n=d("<span></span>").addClass("dt-button-spacer "+a.style+" "+h.spacerClass).html(q(a.text));return{conf:a,node:n,inserter:n,buttons:[],inCollection:b,isSplit:c,inSplit:e,collection:null}}!c&&e&&l?h=m:!c&&b&&g.button&&(h=g.button);!c&&e&&l.buttonLiner?f=l.buttonLiner:!c&&b&&g.buttonLiner&&(f=g.buttonLiner);if(a.available&&!a.available(r,a)&&!a.hasOwnProperty("html"))return!1;if(a.hasOwnProperty("html"))var k=d(a.html);else{var t=function(v,E,F,G){G.action.call(E.button(F),v,E,F,G);d(E.table().node()).triggerHandler("buttons-action.dt",[E.button(F),E,F,G])};g=a.tag||h.tag;var y=a.clickBlurs===p?!0:a.clickBlurs;k=d("<"+g+"/>").addClass(h.className).addClass(e?this.c.dom.splitDropdownButton.className:"").attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",function(v){v.preventDefault();!k.hasClass(h.disabled)&&a.action&&t(v,r,k,a);y&&k.trigger("blur")}).on("keypress.dtb",function(v){13===v.keyCode&&(v.preventDefault(),!k.hasClass(h.disabled)&&a.action&&t(v,r,k,a))});"a"===g.toLowerCase()&&k.attr("href","#");"button"===g.toLowerCase()&&k.attr("type","button");f.tag?(g=d("<"+f.tag+"/>").html(q(a.text)).addClass(f.className),"a"===f.tag.toLowerCase()&&g.attr("href","#"),k.append(g)):k.html(q(a.text));!1===a.enabled&&k.addClass(h.disabled);a.className&&k.addClass(a.className);a.titleAttr&&k.attr("title",q(a.titleAttr));a.attr&&k.attr(a.attr);a.namespace||(a.namespace=".dt-button-"+P++);a.config!==p&&a.config.split&&(a.split=a.config.split)}f=(f=this.c.dom.buttonContainer)&&f.tag?d("<"+f.tag+"/>").addClass(f.className).append(k):k;this._addKey(a);this.c.buttonCreated&&(f=this.c.buttonCreated(a,f));if(c){n=d("<div/>").addClass(this.c.dom.splitWrapper.className);n.append(k);var w=d.extend(a,{text:this.c.dom.splitDropdown.text,className:this.c.dom.splitDropdown.className,closeButton:!1,attr:{"aria-haspopup":"dialog","aria-expanded":!1},align:this.c.dom.splitDropdown.align,splitAlignClass:this.c.dom.splitDropdown.splitAlignClass});this._addKey(w);var B=function(v,E,F,G){D.split.action.call(E.button(d("div.dt-btn-split-wrapper")[0]),v,E,F,G);d(E.table().node()).triggerHandler("buttons-action.dt",[E.button(F),E,F,G]);F.attr("aria-expanded",!0)},z=d('<button class="'+this.c.dom.splitDropdown.className+' dt-button"><span class="dt-btn-split-drop-arrow">'+this.c.dom.splitDropdown.text+"</span></button>").on("click.dtb",function(v){v.preventDefault();v.stopPropagation();z.hasClass(h.disabled)||B(v,r,z,w);y&&z.trigger("blur")}).on("keypress.dtb",function(v){13===v.keyCode&&(v.preventDefault(),z.hasClass(h.disabled)||B(v,r,z,w))});0===a.split.length&&z.addClass("dtb-hide-drop");n.append(z).attr(w.attr)}return{conf:a,node:c?n.get(0):k.get(0),inserter:c?n:f,buttons:[],inCollection:b,isSplit:c,inSplit:e,collection:null}},_nodeToButton:function(a,b){b||(b=this.s.buttons);for(var c=0,e=b.length;c<e;c++){if(b[c].node===a)return b[c];if(b[c].buttons.length){var h=this._nodeToButton(a,b[c].buttons);if(h)return h}}},_nodeToHost:function(a,b){b||(b=this.s.buttons);for(var c=0,e=b.length;c<e;c++){if(b[c].node===a)return b;if(b[c].buttons.length){var h=this._nodeToHost(a,b[c].buttons);if(h)return h}}},_keypress:function(a,b){if(!b._buttonsHandled){var c=function(e){for(var h=0,f=e.length;h<f;h++){var g=e[h].conf,l=e[h].node;g.key&&(g.key===a?(b._buttonsHandled=!0,d(l).click()):!d.isPlainObject(g.key)||g.key.key!==a||g.key.shiftKey&&!b.shiftKey||g.key.altKey&&!b.altKey||g.key.ctrlKey&&!b.ctrlKey||g.key.metaKey&&!b.metaKey||(b._buttonsHandled=!0,d(l).click()));e[h].buttons.length&&c(e[h].buttons)}};c(this.s.buttons)}},_removeKey:function(a){if(a.key){var b=d.isPlainObject(a.key)?a.key.key:a.key;a=this.s.listenKeys.split("");b=d.inArray(b,a);a.splice(b,1);this.s.listenKeys=a.join("")}},_resolveExtends:function(a){var b=this,c=this.s.dt,e,h=function(m){for(var r=0;!d.isPlainObject(m)&&!Array.isArray(m);){if(m===p)return;if("function"===typeof m){if(m=m.call(b,c,a),!m)return!1}else if("string"===typeof m){if(!D[m])return{html:m};m=D[m]}r++;if(30<r)throw"Buttons: Too many iterations"}return Array.isArray(m)?m:d.extend({},m)};for(a=h(a);a&&a.extend;){if(!D[a.extend])throw"Cannot extend unknown button type: "+a.extend;var f=h(D[a.extend]);if(Array.isArray(f))return f;if(!f)return!1;var g=f.className;a.config!==p&&f.config!==p&&(a.config=d.extend({},f.config,a.config));a=d.extend({},f,a);g&&a.className!==g&&(a.className=g+" "+a.className);var l=a.postfixButtons;if(l){a.buttons||(a.buttons=[]);g=0;for(e=l.length;g<e;g++)a.buttons.push(l[g]);a.postfixButtons=null}if(l=a.prefixButtons){a.buttons||(a.buttons=[]);g=0;for(e=l.length;g<e;g++)a.buttons.splice(g,0,l[g]);a.prefixButtons=null}a.extend=f.extend}return a},_popover:function(a,b,c,e){e=this.c;var h=!1,f=d.extend({align:"button-left",autoClose:!1,background:!0,backgroundClassName:"dt-button-background",closeButton:!0,contentClassName:e.dom.collection.className,collectionLayout:"",collectionTitle:"",dropup:!1,fade:400,popoverTitle:"",rightAlignClassName:"dt-button-right",tag:e.dom.collection.tag},c),g=b.node(),l=function(){h=!0;J(d(".dt-button-collection"),f.fade,function(){d(this).detach()});d(b.buttons('[aria-haspopup="dialog"][aria-expanded="true"]').nodes()).attr("aria-expanded","false");d("div.dt-button-background").off("click.dtb-collection");x.background(!1,f.backgroundClassName,f.fade,g);d(A).off("resize.resize.dtb-collection");d("body").off(".dtb-collection");b.off("buttons-action.b-internal");b.off("destroy")};if(!1===a)l();else{c=d(b.buttons('[aria-haspopup="dialog"][aria-expanded="true"]').nodes());c.length&&(g.closest("div.dt-button-collection").length&&(g=c.eq(0)),l());c=d(".dt-button",a).length;e="";3===c?e="dtb-b3":2===c?e="dtb-b2":1===c&&(e="dtb-b1");var m=d("<div/>").addClass("dt-button-collection").addClass(f.collectionLayout).addClass(f.splitAlignClass).addClass(e).css("display","none").attr({"aria-modal":!0,role:"dialog"});a=d(a).addClass(f.contentClassName).attr("role","menu").appendTo(m);g.attr("aria-expanded","true");g.parents("body")[0]!==C.body&&(g=C.body.lastChild);f.popoverTitle?m.prepend('<div class="dt-button-collection-title">'+f.popoverTitle+"</div>"):f.collectionTitle&&m.prepend('<div class="dt-button-collection-title">'+f.collectionTitle+"</div>");f.closeButton&&m.prepend('<div class="dtb-popover-close">x</div>').addClass("dtb-collection-closeable");I(m.insertAfter(g),f.fade);c=d(b.table().container());var r=m.css("position");if("container"===f.span||"dt-container"===f.align)g=g.parent(),m.css("width",c.width());if("absolute"===r){var q=d(g[0].offsetParent);c=g.position();e=g.offset();var n=q.offset(),k=q.position(),t=A.getComputedStyle(q[0]);n.height=q.outerHeight();n.width=q.width()+parseFloat(t.paddingLeft);n.right=n.left+n.width;n.bottom=n.top+n.height;q=c.top+g.outerHeight();var y=c.left;m.css({top:q,left:y});t=A.getComputedStyle(m[0]);var w=m.offset();w.height=m.outerHeight();w.width=m.outerWidth();w.right=w.left+w.width;w.bottom=w.top+w.height;w.marginTop=parseFloat(t.marginTop);w.marginBottom=parseFloat(t.marginBottom);f.dropup&&(q=c.top-w.height-w.marginTop-w.marginBottom);if("button-right"===f.align||m.hasClass(f.rightAlignClassName))y=c.left-w.width+g.outerWidth();if("dt-container"===f.align||"container"===f.align)y<c.left&&(y=-c.left),y+w.width>n.width&&(y=n.width-w.width);k.left+y+w.width>d(A).width()&&(y=d(A).width()-w.width-k.left);0>e.left+y&&(y=-e.left);k.top+q+w.height>d(A).height()+d(A).scrollTop()&&(q=c.top-w.height-w.marginTop-w.marginBottom);k.top+q<d(A).scrollTop()&&(q=c.top+g.outerHeight());m.css({top:q,left:y})}else r=function(){var B=d(A).height()/2,z=m.height()/2;z>B&&(z=B);m.css("marginTop",-1*z)},r(),d(A).on("resize.dtb-collection",function(){r()});f.background&&x.background(!0,f.backgroundClassName,f.fade,f.backgroundHost||g);d("div.dt-button-background").on("click.dtb-collection",function(){});f.autoClose&&setTimeout(function(){b.on("buttons-action.b-internal",function(B,z,v,E){E[0]!==g[0]&&l()})},0);d(m).trigger("buttons-popover.dt");b.on("destroy",l);setTimeout(function(){h=!1;d("body").on("click.dtb-collection",function(B){if(!h){var z=d.fn.addBack?"addBack":"andSelf",v=d(B.target).parent()[0];(!d(B.target).parents()[z]().filter(a).length&&!d(v).hasClass("dt-buttons")||d(B.target).hasClass("dt-button-background"))&&l()}}).on("keyup.dtb-collection",function(B){27===B.keyCode&&l()}).on("keydown.dtb-collection",function(B){var z=d("a, button",a),v=C.activeElement;9===B.keyCode&&(-1===z.index(v)?(z.first().focus(),B.preventDefault()):B.shiftKey?v===z[0]&&(z.last().focus(),B.preventDefault()):v===z.last()[0]&&(z.first().focus(),B.preventDefault()))})},0)}}});x.background=function(a,b,c,e){c===p&&(c=400);e||(e=C.body);a?I(d("<div/>").addClass(b).css("display","none").insertAfter(e),c):J(d("div."+b),c,function(){d(this).removeClass(b).remove()})};x.instanceSelector=function(a,b){if(a===p||null===a)return d.map(b,function(f){return f.inst});var c=[],e=d.map(b,function(f){return f.name}),h=function(f){if(Array.isArray(f))for(var g=0,l=f.length;g<l;g++)h(f[g]);else"string"===typeof f?-1!==f.indexOf(",")?h(f.split(",")):(f=d.inArray(f.trim(),e),-1!==f&&c.push(b[f].inst)):"number"===typeof f?c.push(b[f].inst):"object"===typeof f&&c.push(f)};h(a);return c};x.buttonSelector=function(a,b){for(var c=[],e=function(l,m,r){for(var q,n,k=0,t=m.length;k<t;k++)if(q=m[k])n=r!==p?r+k:k+"",l.push({node:q.node,name:q.conf.name,idx:n}),q.buttons&&e(l,q.buttons,n+"-")},h=function(l,m){var r,q=[];e(q,m.s.buttons);var n=d.map(q,function(k){return k.node});if(Array.isArray(l)||l instanceof d)for(n=0,r=l.length;n<r;n++)h(l[n],m);else if(null===l||l===p||"*"===l)for(n=0,r=q.length;n<r;n++)c.push({inst:m,node:q[n].node});else if("number"===typeof l)m.s.buttons[l]&&c.push({inst:m,node:m.s.buttons[l].node});else if("string"===typeof l)if(-1!==l.indexOf(","))for(q=l.split(","),n=0,r=q.length;n<r;n++)h(q[n].trim(),m);else if(l.match(/^\d+(\-\d+)*$/))n=d.map(q,function(k){return k.idx}),c.push({inst:m,node:q[d.inArray(l,n)].node});else if(-1!==l.indexOf(":name"))for(l=l.replace(":name",""),n=0,r=q.length;n<r;n++)q[n].name===l&&c.push({inst:m,node:q[n].node});else d(n).filter(l).each(function(){c.push({inst:m,node:this})});else"object"===typeof l&&l.nodeName&&(q=d.inArray(l,n),-1!==q&&c.push({inst:m,node:n[q]}))},f=0,g=a.length;f<g;f++)h(b,a[f]);return c};x.stripData=function(a,b){if("string"!==typeof a)return a;a=a.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");a=a.replace(/<!\-\-.*?\-\->/g,"");if(!b||b.stripHtml)a=a.replace(/<[^>]*>/g,"");if(!b||b.trim)a=a.replace(/^\s+|\s+$/g,"");if(!b||b.stripNewlines)a=a.replace(/\n/g," ");if(!b||b.decodeEntities)M.innerHTML=a,a=M.value;return a};x.defaults={buttons:["copy","excel","csv","pdf","print"],name:"main",tabIndex:0,dom:{container:{tag:"div",className:"dt-buttons"},collection:{tag:"div",className:""},button:{tag:"button",className:"dt-button",active:"active",disabled:"disabled",spacerClass:""},buttonLiner:{tag:"span",className:""},split:{tag:"div",className:"dt-button-split"},splitWrapper:{tag:"div",className:"dt-btn-split-wrapper"},splitDropdown:{tag:"button",text:"&#x25BC;",className:"dt-btn-split-drop",align:"split-right",splitAlignClass:"dt-button-split-left"},splitDropdownButton:{tag:"button",className:"dt-btn-split-drop-button dt-button"},splitCollection:{tag:"div",className:"dt-button-split-collection"}}};x.version="2.2.3";d.extend(D,{collection:{text:function(a){return a.i18n("buttons.collection","Collection")},className:"buttons-collection",closeButton:!1,init:function(a,b,c){b.attr("aria-expanded",!1)},action:function(a,b,c,e){e._collection.parents("body").length?this.popover(!1,e):this.popover(e._collection,e);"keypress"===a.type&&d("a, button",e._collection).eq(0).focus()},attr:{"aria-haspopup":"dialog"}},split:{text:function(a){return a.i18n("buttons.split","Split")},className:"buttons-split",closeButton:!1,init:function(a,b,c){return b.attr("aria-expanded",!1)},action:function(a,b,c,e){this.popover(e._collection,e)},attr:{"aria-haspopup":"dialog"}},copy:function(a,b){if(D.copyHtml5)return"copyHtml5"},csv:function(a,b){if(D.csvHtml5&&D.csvHtml5.available(a,b))return"csvHtml5"},excel:function(a,b){if(D.excelHtml5&&D.excelHtml5.available(a,b))return"excelHtml5"},pdf:function(a,b){if(D.pdfHtml5&&D.pdfHtml5.available(a,b))return"pdfHtml5"},pageLength:function(a){a=a.settings()[0].aLengthMenu;var b=[],c=[];if(Array.isArray(a[0]))b=a[0],c=a[1];else for(var e=0;e<a.length;e++){var h=a[e];d.isPlainObject(h)?(b.push(h.value),c.push(h.label)):(b.push(h),c.push(h))}return{extend:"collection",text:function(f){return f.i18n("buttons.pageLength",{"-1":"Show all rows",_:"Show %d rows"},f.page.len())},className:"buttons-page-length",autoClose:!0,buttons:d.map(b,function(f,g){return{text:c[g],className:"button-page-length",action:function(l,m){m.page.len(f).draw()},init:function(l,m,r){var q=this;m=function(){q.active(l.page.len()===f)};l.on("length.dt"+r.namespace,m);m()},destroy:function(l,m,r){l.off("length.dt"+r.namespace)}}}),init:function(f,g,l){var m=this;f.on("length.dt"+l.namespace,function(){m.text(l.text)})},destroy:function(f,g,l){f.off("length.dt"+l.namespace)}}},spacer:{style:"empty",spacer:!0,text:function(a){return a.i18n("buttons.spacer","")}}});u.Api.register("buttons()",function(a,b){b===p&&(b=a,a=p);this.selector.buttonGroup=a;var c=this.iterator(!0,"table",function(e){if(e._buttons)return x.buttonSelector(x.instanceSelector(a,e._buttons),b)},!0);c._groupSelector=a;return c});u.Api.register("button()",function(a,b){a=this.buttons(a,b);1<a.length&&a.splice(1,a.length);return a});u.Api.registerPlural("buttons().active()","button().active()",function(a){return a===p?this.map(function(b){return b.inst.active(b.node)}):this.each(function(b){b.inst.active(b.node,a)})});u.Api.registerPlural("buttons().action()","button().action()",function(a){return a===p?this.map(function(b){return b.inst.action(b.node)}):this.each(function(b){b.inst.action(b.node,a)})});u.Api.registerPlural("buttons().collectionRebuild()","button().collectionRebuild()",function(a){return this.each(function(b){for(var c=0;c<a.length;c++)"object"===typeof a[c]&&(a[c].parentConf=b);b.inst.collectionRebuild(b.node,a)})});u.Api.register(["buttons().enable()","button().enable()"],function(a){return this.each(function(b){b.inst.enable(b.node,a)})});u.Api.register(["buttons().disable()","button().disable()"],function(){return this.each(function(a){a.inst.disable(a.node)})});u.Api.register("button().index()",function(){var a=null;this.each(function(b){b=b.inst.index(b.node);null!==b&&(a=b)});return a});u.Api.registerPlural("buttons().nodes()","button().node()",function(){var a=d();d(this.each(function(b){a=a.add(b.inst.node(b.node))}));return a});u.Api.registerPlural("buttons().processing()","button().processing()",function(a){return a===p?this.map(function(b){return b.inst.processing(b.node)}):this.each(function(b){b.inst.processing(b.node,a)})});u.Api.registerPlural("buttons().text()","button().text()",function(a){return a===p?this.map(function(b){return b.inst.text(b.node)}):this.each(function(b){b.inst.text(b.node,a)})});u.Api.registerPlural("buttons().trigger()","button().trigger()",function(){return this.each(function(a){a.inst.node(a.node).trigger("click")})});u.Api.register("button().popover()",function(a,b){return this.map(function(c){return c.inst._popover(a,this.button(this[0].node),b)})});u.Api.register("buttons().containers()",function(){var a=d(),b=this._groupSelector;this.iterator(!0,"table",function(c){if(c._buttons){c=x.instanceSelector(b,c._buttons);for(var e=0,h=c.length;e<h;e++)a=a.add(c[e].container())}});return a});u.Api.register("buttons().container()",function(){return this.containers().eq(0)});u.Api.register("button().add()",function(a,b,c){var e=this.context;e.length&&(e=x.instanceSelector(this._groupSelector,e[0]._buttons),e.length&&e[0].add(b,a,c));return this.button(this._groupSelector,a)});u.Api.register("buttons().destroy()",function(){this.pluck("inst").unique().each(function(a){a.destroy()});return this});u.Api.registerPlural("buttons().remove()","buttons().remove()",function(){this.each(function(a){a.inst.remove(a.node)});return this});var H;u.Api.register("buttons.info()",function(a,b,c){var e=this;if(!1===a)return this.off("destroy.btn-info"),J(d("#datatables_buttons_info"),400,function(){d(this).remove()}),clearTimeout(H),H=null,this;H&&clearTimeout(H);d("#datatables_buttons_info").length&&d("#datatables_buttons_info").remove();a=a?"<h2>"+a+"</h2>":"";I(d('<div id="datatables_buttons_info" class="dt-button-info"/>').html(a).append(d("<div/>")["string"===typeof b?"html":"append"](b)).css("display","none").appendTo("body"));c!==p&&0!==c&&(H=setTimeout(function(){e.buttons.info(!1)},c));this.on("destroy.btn-info",function(){e.buttons.info(!1)});return this});u.Api.register("buttons.exportData()",function(a){if(this.context.length)return Q(new u.Api(this.context[0]),a)});u.Api.register("buttons.exportInfo()",function(a){a||(a={});var b=a;var c="*"===b.filename&&"*"!==b.title&&b.title!==p&&null!==b.title&&""!==b.title?b.title:b.filename;"function"===typeof c&&(c=c());c===p||null===c?c=null:(-1!==c.indexOf("*")&&(c=c.replace("*",d("head > title").text()).trim()),c=c.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""),(b=K(b.extension))||(b=""),c+=b);b=K(a.title);b=null===b?null:-1!==b.indexOf("*")?b.replace("*",d("head > title").text()||"Exported data"):b;return{filename:c,title:b,messageTop:N(this,a.message||a.messageTop,"top"),messageBottom:N(this,a.messageBottom,"bottom")}});var K=function(a){return null===a||a===p?null:"function"===typeof a?a():a},N=function(a,b,c){b=K(b);if(null===b)return null;a=d("caption",a.table().container()).eq(0);return"*"===b?a.css("caption-side")!==c?null:a.length?a.text():"":b},M=d("<textarea/>")[0],Q=function(a,b){var c=d.extend(!0,{},{rows:null,columns:"",modifier:{search:"applied",order:"applied"},orthogonal:"display",stripHtml:!0,stripNewlines:!0,decodeEntities:!0,trim:!0,format:{header:function(t){return x.stripData(t,c)},footer:function(t){return x.stripData(t,c)},body:function(t){return x.stripData(t,c)}},customizeData:null},b);b=a.columns(c.columns).indexes().map(function(t){var y=a.column(t).header();return c.format.header(y.innerHTML,t,y)}).toArray();var e=a.table().footer()?a.columns(c.columns).indexes().map(function(t){var y=a.column(t).footer();return c.format.footer(y?y.innerHTML:"",t,y)}).toArray():null,h=d.extend({},c.modifier);a.select&&"function"===typeof a.select.info&&h.selected===p&&a.rows(c.rows,d.extend({selected:!0},h)).any()&&d.extend(h,{selected:!0});h=a.rows(c.rows,h).indexes().toArray();var f=a.cells(h,c.columns);h=f.render(c.orthogonal).toArray();f=f.nodes().toArray();for(var g=b.length,l=[],m=0,r=0,q=0<g?h.length/g:0;r<q;r++){for(var n=[g],k=0;k<g;k++)n[k]=c.format.body(h[m],r,k,f[m]),m++;l[r]=n}b={header:b,footer:e,body:l};c.customizeData&&c.customizeData(b);return b};d.fn.dataTable.Buttons=x;d.fn.DataTable.Buttons=x;d(C).on("init.dt plugin-init.dt",function(a,b){"dt"===a.namespace&&(a=b.oInit.buttons||u.defaults.buttons)&&!b._buttons&&(new x(b,a)).container()});u.ext.feature.push({fnInit:L,cFeature:"B"});u.ext.features&&u.ext.features.register("buttons",L);return x});/*!
 HTML5 export buttons for Buttons and DataTables.
 2016 SpryMedia Ltd - datatables.net/license

 FileSaver.js (1.3.3) - MIT license
 Copyright © 2016 Eli Grey - http://eligrey.com
*/
(function(n){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(u){return n(u,window,document)}):"object"===typeof exports?module.exports=function(u,x,E,F){u||(u=window);x&&x.fn.dataTable||(x=require("datatables.net")(u,x).$);x.fn.dataTable.Buttons||require("datatables.net-buttons")(u,x);return n(x,u,u.document,E,F)}:n(jQuery,window,document)})(function(n,u,x,E,F,B){function I(a){for(var c="";0<=a;)c=String.fromCharCode(a%26+65)+c,a=Math.floor(a/26)-1;return c}function O(a,c){J===B&&(J=-1===M.serializeToString((new u.DOMParser).parseFromString(P["xl/worksheets/sheet1.xml"],"text/xml")).indexOf("xmlns:r"));n.each(c,function(d,b){if(n.isPlainObject(b))d=a.folder(d),O(d,b);else{if(J){var m=b.childNodes[0],e,f=[];for(e=m.attributes.length-1;0<=e;e--){var g=m.attributes[e].nodeName;var p=m.attributes[e].nodeValue;-1!==g.indexOf(":")&&(f.push({name:g,value:p}),m.removeAttribute(g))}e=0;for(g=f.length;e<g;e++)p=b.createAttribute(f[e].name.replace(":","_dt_b_namespace_token_")),p.value=f[e].value,m.setAttributeNode(p)}b=M.serializeToString(b);J&&(-1===b.indexOf("<?xml")&&(b='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+b),b=b.replace(/_dt_b_namespace_token_/g,":"),b=b.replace(/xmlns:NS[\d]+="" NS[\d]+:/g,""));b=b.replace(/<([^<>]*?) xmlns=""([^<>]*?)>/g,"<$1 $2>");a.file(d,b)}})}function y(a,c,d){var b=a.createElement(c);d&&(d.attr&&n(b).attr(d.attr),d.children&&n.each(d.children,function(m,e){b.appendChild(e)}),null!==d.text&&d.text!==B&&b.appendChild(a.createTextNode(d.text)));return b}function V(a,c){var d=a.header[c].length;a.footer&&a.footer[c].length>d&&(d=a.footer[c].length);for(var b=0,m=a.body.length;b<m;b++){var e=a.body[b][c];e=null!==e&&e!==B?e.toString():"";-1!==e.indexOf("\n")?(e=e.split("\n"),e.sort(function(f,g){return g.length-f.length}),e=e[0].length):e=e.length;e>d&&(d=e);if(40<d)return 54}d*=1.35;return 6<d?d:6}var D=n.fn.dataTable;D.Buttons.pdfMake=function(a){if(!a)return F||u.pdfMake;F=a};D.Buttons.jszip=function(a){if(!a)return E||u.JSZip;E=a};var K=function(a){if(!("undefined"===typeof a||"undefined"!==typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var c=a.document.createElementNS("http://www.w3.org/1999/xhtml","a"),d="download"in c,b=/constructor/i.test(a.HTMLElement)||a.safari,m=/CriOS\/[\d]+/.test(navigator.userAgent),e=function(h){(a.setImmediate||a.setTimeout)(function(){throw h},0)},f=function(h){setTimeout(function(){"string"===typeof h?(a.URL||a.webkitURL||a).revokeObjectURL(h):h.remove()},4E4)},g=function(h){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(h.type)?new Blob([String.fromCharCode(65279),h],{type:h.type}):h},p=function(h,q,v){v||(h=g(h));var r=this,w="application/octet-stream"===h.type,C=function(){var l=["writestart","progress","write","writeend"];l=[].concat(l);for(var z=l.length;z--;){var G=r["on"+l[z]];if("function"===typeof G)try{G.call(r,r)}catch(A){e(A)}}};r.readyState=r.INIT;if(d){var k=(a.URL||a.webkitURL||a).createObjectURL(h);setTimeout(function(){c.href=k;c.download=q;var l=new MouseEvent("click");c.dispatchEvent(l);C();f(k);r.readyState=r.DONE})}else(function(){if((m||w&&b)&&a.FileReader){var l=new FileReader;l.onloadend=function(){var z=m?l.result:l.result.replace(/^data:[^;]*;/,"data:attachment/file;");a.open(z,"_blank")||(a.location.href=z);r.readyState=r.DONE;C()};l.readAsDataURL(h);r.readyState=r.INIT}else k||(k=(a.URL||a.webkitURL||a).createObjectURL(h)),w?a.location.href=k:a.open(k,"_blank")||(a.location.href=k),r.readyState=r.DONE,C(),f(k)})()},t=p.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(h,q,v){q=q||h.name||"download";v||(h=g(h));return navigator.msSaveOrOpenBlob(h,q)};t.abort=function(){};t.readyState=t.INIT=0;t.WRITING=1;t.DONE=2;t.error=t.onwritestart=t.onprogress=t.onwrite=t.onabort=t.onerror=t.onwriteend=null;return function(h,q,v){return new p(h,q||h.name||"download",v)}}}("undefined"!==typeof self&&self||"undefined"!==typeof u&&u||this.content);D.fileSave=K;var Q=function(a){var c="Sheet1";a.sheetName&&(c=a.sheetName.replace(/[\[\]\*\/\\\?:]/g,""));return c},R=function(a){return a.newline?a.newline:navigator.userAgent.match(/Windows/)?"\r\n":"\n"},S=function(a,c){var d=R(c);a=a.buttons.exportData(c.exportOptions);var b=c.fieldBoundary,m=c.fieldSeparator,e=new RegExp(b,"g"),f=c.escapeChar!==B?c.escapeChar:"\\",g=function(v){for(var r="",w=0,C=v.length;w<C;w++)0<w&&(r+=m),r+=b?b+(""+v[w]).replace(e,f+b)+b:v[w];return r},p=c.header?g(a.header)+d:"";c=c.footer&&a.footer?d+g(a.footer):"";for(var t=[],h=0,q=a.body.length;h<q;h++)t.push(g(a.body[h]));return{str:p+t.join(d)+c,rows:t.length}},T=function(){if(-1===navigator.userAgent.indexOf("Safari")||-1!==navigator.userAgent.indexOf("Chrome")||-1!==navigator.userAgent.indexOf("Opera"))return!1;var a=navigator.userAgent.match(/AppleWebKit\/(\d+\.\d+)/);return a&&1<a.length&&603.1>1*a[1]?!0:!1};try{var M=new XMLSerializer,J}catch(a){}var P={"_rels/.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>',"xl/_rels/workbook.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/></Relationships>',"[Content_Types].xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Default Extension="jpeg" ContentType="image/jpeg" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" /></Types>',"xl/workbook.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><fileVersion appName="xl" lastEdited="5" lowestEdited="5" rupBuild="24816"/><workbookPr showInkAnnotation="0" autoCompressPictures="0"/><bookViews><workbookView xWindow="0" yWindow="0" windowWidth="25600" windowHeight="19020" tabRatio="500"/></bookViews><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets><definedNames/></workbook>',"xl/worksheets/sheet1.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><sheetData/><mergeCells count="0"/></worksheet>',"xl/styles.xml":'<?xml version="1.0" encoding="UTF-8"?><styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><numFmts count="6"><numFmt numFmtId="164" formatCode="#,##0.00_- [$$-45C]"/><numFmt numFmtId="165" formatCode="&quot;£&quot;#,##0.00"/><numFmt numFmtId="166" formatCode="[$€-2] #,##0.00"/><numFmt numFmtId="167" formatCode="0.0%"/><numFmt numFmtId="168" formatCode="#,##0;(#,##0)"/><numFmt numFmtId="169" formatCode="#,##0.00;(#,##0.00)"/></numFmts><fonts count="5" x14ac:knownFonts="1"><font><sz val="11" /><name val="Calibri" /></font><font><sz val="11" /><name val="Calibri" /><color rgb="FFFFFFFF" /></font><font><sz val="11" /><name val="Calibri" /><b /></font><font><sz val="11" /><name val="Calibri" /><i /></font><font><sz val="11" /><name val="Calibri" /><u /></font></fonts><fills count="6"><fill><patternFill patternType="none" /></fill><fill><patternFill patternType="none" /></fill><fill><patternFill patternType="solid"><fgColor rgb="FFD9D9D9" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="FFD99795" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="ffc6efce" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="ffc6cfef" /><bgColor indexed="64" /></patternFill></fill></fills><borders count="2"><border><left /><right /><top /><bottom /><diagonal /></border><border diagonalUp="false" diagonalDown="false"><left style="thin"><color auto="1" /></left><right style="thin"><color auto="1" /></right><top style="thin"><color auto="1" /></top><bottom style="thin"><color auto="1" /></bottom><diagonal /></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" /></cellStyleXfs><cellXfs count="68"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="left"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="center"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="right"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="fill"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment textRotation="90"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment wrapText="1"/></xf><xf numFmtId="9"   fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="164" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="165" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="166" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="167" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="168" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="169" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="3" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="4" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="1" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="2" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="14" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0" /></cellStyles><dxfs count="0" /><tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleMedium4" /></styleSheet>'},U=[{match:/^\-?\d+\.\d%$/,style:60,fmt:function(a){return a/100}},{match:/^\-?\d+\.?\d*%$/,style:56,fmt:function(a){return a/100}},{match:/^\-?\$[\d,]+.?\d*$/,style:57},{match:/^\-?£[\d,]+.?\d*$/,style:58},{match:/^\-?€[\d,]+.?\d*$/,style:59},{match:/^\-?\d+$/,style:65},{match:/^\-?\d+\.\d{2}$/,style:66},{match:/^\([\d,]+\)$/,style:61,fmt:function(a){return-1*a.replace(/[\(\)]/g,"")}},{match:/^\([\d,]+\.\d{2}\)$/,style:62,fmt:function(a){return-1*a.replace(/[\(\)]/g,"")}},{match:/^\-?[\d,]+$/,style:63},{match:/^\-?[\d,]+\.\d{2}$/,style:64},{match:/^[\d]{4}\-[01][\d]\-[0123][\d]$/,style:67,fmt:function(a){return Math.round(25569+Date.parse(a)/864E5)}}];D.ext.buttons.copyHtml5={className:"buttons-copy buttons-html5",text:function(a){return a.i18n("buttons.copy","Copy")},action:function(a,c,d,b){this.processing(!0);var m=this;a=S(c,b);var e=c.buttons.exportInfo(b),f=R(b),g=a.str;d=n("<div/>").css({height:1,width:1,overflow:"hidden",position:"fixed",top:0,left:0});e.title&&(g=e.title+f+f+g);e.messageTop&&(g=e.messageTop+f+f+g);e.messageBottom&&(g=g+f+f+e.messageBottom);b.customize&&(g=b.customize(g,b,c));b=n("<textarea readonly/>").val(g).appendTo(d);if(x.queryCommandSupported("copy")){d.appendTo(c.table().container());b[0].focus();b[0].select();try{var p=x.execCommand("copy");d.remove();if(p){c.buttons.info(c.i18n("buttons.copyTitle","Copy to clipboard"),c.i18n("buttons.copySuccess",{1:"Copied one row to clipboard",_:"Copied %d rows to clipboard"},a.rows),2E3);this.processing(!1);return}}catch(q){}}p=n("<span>"+c.i18n("buttons.copyKeys","Press <i>ctrl</i> or <i>⌘</i> + <i>C</i> to copy the table data<br>to your system clipboard.<br><br>To cancel, click this message or press escape.")+"</span>").append(d);c.buttons.info(c.i18n("buttons.copyTitle","Copy to clipboard"),p,0);b[0].focus();b[0].select();var t=n(p).closest(".dt-button-info"),h=function(){t.off("click.buttons-copy");n(x).off(".buttons-copy");c.buttons.info(!1)};t.on("click.buttons-copy",h);n(x).on("keydown.buttons-copy",function(q){27===q.keyCode&&(h(),m.processing(!1))}).on("copy.buttons-copy cut.buttons-copy",function(){h();m.processing(!1)})},exportOptions:{},fieldSeparator:"\t",fieldBoundary:"",header:!0,footer:!1,title:"*",messageTop:"*",messageBottom:"*"};D.ext.buttons.csvHtml5={bom:!1,className:"buttons-csv buttons-html5",available:function(){return u.FileReader!==B&&u.Blob},text:function(a){return a.i18n("buttons.csv","CSV")},action:function(a,c,d,b){this.processing(!0);a=S(c,b).str;d=c.buttons.exportInfo(b);var m=b.charset;b.customize&&(a=b.customize(a,b,c));!1!==m?(m||(m=x.characterSet||x.charset),m&&(m=";charset="+m)):m="";b.bom&&(a=String.fromCharCode(65279)+a);K(new Blob([a],{type:"text/csv"+m}),d.filename,!0);this.processing(!1)},filename:"*",extension:".csv",exportOptions:{},fieldSeparator:",",fieldBoundary:'"',escapeChar:'"',charset:null,header:!0,footer:!1};D.ext.buttons.excelHtml5={className:"buttons-excel buttons-html5",available:function(){return u.FileReader!==B&&(E||u.JSZip)!==B&&!T()&&M},text:function(a){return a.i18n("buttons.excel","Excel")},action:function(a,c,d,b){this.processing(!0);var m=this,e=0;a=function(k){return n.parseXML(P[k])};var f=a("xl/worksheets/sheet1.xml"),g=f.getElementsByTagName("sheetData")[0];a={_rels:{".rels":a("_rels/.rels")},xl:{_rels:{"workbook.xml.rels":a("xl/_rels/workbook.xml.rels")},"workbook.xml":a("xl/workbook.xml"),"styles.xml":a("xl/styles.xml"),worksheets:{"sheet1.xml":f}},"[Content_Types].xml":a("[Content_Types].xml")};var p=c.buttons.exportData(b.exportOptions),t,h,q=function(k){t=e+1;h=y(f,"row",{attr:{r:t}});for(var l=0,z=k.length;l<z;l++){var G=I(l)+""+t,A=null;if(null===k[l]||k[l]===B||""===k[l])if(!0===b.createEmptyCells)k[l]="";else continue;var H=k[l];k[l]="function"===typeof k[l].trim?k[l].trim():k[l];for(var N=0,W=U.length;N<W;N++){var L=U[N];if(k[l].match&&!k[l].match(/^0\d+/)&&k[l].match(L.match)){A=k[l].replace(/[^\d\.\-]/g,"");L.fmt&&(A=L.fmt(A));A=y(f,"c",{attr:{r:G,s:L.style},children:[y(f,"v",{text:A})]});break}}A||("number"===typeof k[l]||k[l].match&&k[l].match(/^-?\d+(\.\d+)?([eE]\-?\d+)?$/)&&!k[l].match(/^0\d+/)?A=y(f,"c",{attr:{t:"n",r:G},children:[y(f,"v",{text:k[l]})]}):(H=H.replace?H.replace(/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F-\x9F]/g,""):H,A=y(f,"c",{attr:{t:"inlineStr",r:G},children:{row:y(f,"is",{children:{row:y(f,"t",{text:H,attr:{"xml:space":"preserve"}})}})}})));h.appendChild(A)}g.appendChild(h);e++};b.customizeData&&b.customizeData(p);var v=function(k,l){var z=n("mergeCells",f);z[0].appendChild(y(f,"mergeCell",{attr:{ref:"A"+k+":"+I(l)+k}}));z.attr("count",parseFloat(z.attr("count"))+1);n("row:eq("+(k-1)+") c",f).attr("s","51")},r=c.buttons.exportInfo(b);r.title&&(q([r.title],e),v(e,p.header.length-1));r.messageTop&&(q([r.messageTop],e),v(e,p.header.length-1));b.header&&(q(p.header,e),n("row:last c",f).attr("s","2"));d=e;var w=0;for(var C=p.body.length;w<C;w++)q(p.body[w],e);w=e;b.footer&&p.footer&&(q(p.footer,e),n("row:last c",f).attr("s","2"));r.messageBottom&&(q([r.messageBottom],e),v(e,p.header.length-1));q=y(f,"cols");n("worksheet",f).prepend(q);v=0;for(C=p.header.length;v<C;v++)q.appendChild(y(f,"col",{attr:{min:v+1,max:v+1,width:V(p,v),customWidth:1}}));q=a.xl["workbook.xml"];n("sheets sheet",q).attr("name",Q(b));b.autoFilter&&(n("mergeCells",f).before(y(f,"autoFilter",{attr:{ref:"A"+d+":"+I(p.header.length-1)+w}})),n("definedNames",q).append(y(q,"definedName",{attr:{name:"_xlnm._FilterDatabase",localSheetId:"0",hidden:1},text:Q(b)+"!$A$"+d+":"+I(p.header.length-1)+w})));b.customize&&b.customize(a,b,c);0===n("mergeCells",f).children().length&&n("mergeCells",f).remove();c=new(E||u.JSZip);d={type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};O(c,a);c.generateAsync?c.generateAsync(d).then(function(k){K(k,r.filename);m.processing(!1)}):(K(c.generate(d),r.filename),this.processing(!1))},filename:"*",extension:".xlsx",exportOptions:{},header:!0,footer:!1,title:"*",messageTop:"*",messageBottom:"*",createEmptyCells:!1,autoFilter:!1,sheetName:""};D.ext.buttons.pdfHtml5={className:"buttons-pdf buttons-html5",available:function(){return u.FileReader!==B&&(F||u.pdfMake)},text:function(a){return a.i18n("buttons.pdf","PDF")},action:function(a,c,d,b){this.processing(!0);d=c.buttons.exportData(b.exportOptions);a=c.buttons.exportInfo(b);var m=[];b.header&&m.push(n.map(d.header,function(g){return{text:"string"===typeof g?g:g+"",style:"tableHeader"}}));for(var e=0,f=d.body.length;e<f;e++)m.push(n.map(d.body[e],function(g){if(null===g||g===B)g="";return{text:"string"===typeof g?g:g+"",style:e%2?"tableBodyEven":"tableBodyOdd"}}));b.footer&&d.footer&&m.push(n.map(d.footer,function(g){return{text:"string"===typeof g?g:g+"",style:"tableFooter"}}));d={pageSize:b.pageSize,pageOrientation:b.orientation,content:[{table:{headerRows:1,body:m},layout:"noBorders"}],styles:{tableHeader:{bold:!0,fontSize:11,color:"white",fillColor:"#2d4154",alignment:"center"},tableBodyEven:{},tableBodyOdd:{fillColor:"#f3f3f3"},tableFooter:{bold:!0,fontSize:11,color:"white",fillColor:"#2d4154"},title:{alignment:"center",fontSize:15},message:{}},defaultStyle:{fontSize:10}};a.messageTop&&d.content.unshift({text:a.messageTop,style:"message",margin:[0,0,0,12]});a.messageBottom&&d.content.push({text:a.messageBottom,style:"message",margin:[0,0,0,12]});a.title&&d.content.unshift({text:a.title,style:"title",margin:[0,0,0,12]});b.customize&&b.customize(d,b,c);c=(F||u.pdfMake).createPdf(d);"open"!==b.download||T()?c.download(a.filename):c.open();this.processing(!1)},title:"*",filename:"*",extension:".pdf",exportOptions:{},orientation:"portrait",pageSize:"A4",header:!0,footer:!1,messageTop:"*",messageBottom:"*",customize:null,download:"download"};return D.Buttons});/*!
 Print button for Buttons and DataTables.
 2016 SpryMedia Ltd - datatables.net/license
*/
(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(d){return b(d,window,document)}):"object"===typeof exports?module.exports=function(d,h){d||(d=window);h&&h.fn.dataTable||(h=require("datatables.net")(d,h).$);h.fn.dataTable.Buttons||require("datatables.net-buttons")(d,h);return b(h,d,d.document)}:b(jQuery,window,document)})(function(b,d,h,y){var u=b.fn.dataTable,n=h.createElement("a"),v=function(a){n.href=a;a=n.host;-1===a.indexOf("/")&&0!==n.pathname.indexOf("/")&&(a+="/");return n.protocol+"//"+a+n.pathname+n.search};u.ext.buttons.print={className:"buttons-print",text:function(a){return a.i18n("buttons.print","Print")},action:function(a,e,p,k){a=e.buttons.exportData(b.extend({decodeEntities:!1},k.exportOptions));p=e.buttons.exportInfo(k);var w=e.columns(k.exportOptions.columns).flatten().map(function(f){return e.settings()[0].aoColumns[e.column(f).index()].sClass}).toArray(),r=function(f,g){for(var x="<tr>",l=0,z=f.length;l<z;l++)x+="<"+g+" "+(w[l]?'class="'+w[l]+'"':"")+">"+(null===f[l]||f[l]===y?"":f[l])+"</"+g+">";return x+"</tr>"},m='<table class="'+e.table().node().className+'">';k.header&&(m+="<thead>"+r(a.header,"th")+"</thead>");m+="<tbody>";for(var t=0,A=a.body.length;t<A;t++)m+=r(a.body[t],"td");m+="</tbody>";k.footer&&a.footer&&(m+="<tfoot>"+r(a.footer,"th")+"</tfoot>");m+="</table>";var c=d.open("","");if(c){c.document.close();var q="<title>"+p.title+"</title>";b("style, link").each(function(){var f=q,g=b(this).clone()[0];"link"===g.nodeName.toLowerCase()&&(g.href=v(g.href));q=f+g.outerHTML});try{c.document.head.innerHTML=q}catch(f){b(c.document.head).html(q)}c.document.body.innerHTML="<h1>"+p.title+"</h1><div>"+(p.messageTop||"")+"</div>"+m+"<div>"+(p.messageBottom||"")+"</div>";b(c.document.body).addClass("dt-print-view");b("img",c.document.body).each(function(f,g){g.setAttribute("src",v(g.getAttribute("src")))});k.customize&&k.customize(c,k,e);a=function(){k.autoPrint&&(c.print(),c.close())};navigator.userAgent.match(/Trident\/\d.\d/)?a():c.setTimeout(a,1E3)}else e.buttons.info(e.i18n("buttons.printErrorTitle","Unable to open print view"),e.i18n("buttons.printErrorMsg","Please allow popups in your browser for this site to be able to view the print view."),5E3)},title:"*",messageTop:"*",messageBottom:"*",exportOptions:{},header:!0,footer:!1,autoPrint:!0,customize:null};return u.Buttons});/*!
 Column visibility buttons for Buttons and DataTables.
 2016 SpryMedia Ltd - datatables.net/license
*/
(function(h){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(e){return h(e,window,document)}):"object"===typeof exports?module.exports=function(e,g){e||(e=window);g&&g.fn.dataTable||(g=require("datatables.net")(e,g).$);g.fn.dataTable.Buttons||require("datatables.net-buttons")(e,g);return h(g,e,e.document)}:h(jQuery,window,document)})(function(h,e,g,l){e=h.fn.dataTable;h.extend(e.ext.buttons,{colvis:function(b,a){var c=null,d={extend:"collection",init:function(f,k){c=k},text:function(f){return f.i18n("buttons.colvis","Column visibility")},className:"buttons-colvis",closeButton:!1,buttons:[{extend:"columnsToggle",columns:a.columns,columnText:a.columnText}]};b.on("column-reorder.dt"+a.namespace,function(f,k,m){b.button(null,b.button(null,c).node()).collectionRebuild([{extend:"columnsToggle",columns:a.columns,columnText:a.columnText}])});return d},columnsToggle:function(b,a){return b.columns(a.columns).indexes().map(function(c){return{extend:"columnToggle",columns:c,columnText:a.columnText}}).toArray()},columnToggle:function(b,a){return{extend:"columnVisibility",columns:a.columns,columnText:a.columnText}},columnsVisibility:function(b,a){return b.columns(a.columns).indexes().map(function(c){return{extend:"columnVisibility",columns:c,visibility:a.visibility,columnText:a.columnText}}).toArray()},columnVisibility:{columns:l,text:function(b,a,c){return c._columnText(b,c)},className:"buttons-columnVisibility",action:function(b,a,c,d){b=a.columns(d.columns);a=b.visible();b.visible(d.visibility!==l?d.visibility:!(a.length&&a[0]))},init:function(b,a,c){var d=this;a.attr("data-cv-idx",c.columns);b.on("column-visibility.dt"+c.namespace,function(f,k){k.bDestroying||k.nTable!=b.settings()[0].nTable||d.active(b.column(c.columns).visible())}).on("column-reorder.dt"+c.namespace,function(f,k,m){c.destroying||1!==b.columns(c.columns).count()||(d.text(c._columnText(b,c)),d.active(b.column(c.columns).visible()))});this.active(b.column(c.columns).visible())},destroy:function(b,a,c){b.off("column-visibility.dt"+c.namespace).off("column-reorder.dt"+c.namespace)},_columnText:function(b,a){var c=b.column(a.columns).index(),d=b.settings()[0].aoColumns[c].sTitle;d||(d=b.column(c).header().innerHTML);d=d.replace(/\n/g," ").replace(/<br\s*\/?>/gi," ").replace(/<select(.*?)<\/select>/g,"").replace(/<!\-\-.*?\-\->/g,"").replace(/<.*?>/g,"").replace(/^\s+|\s+$/g,"");return a.columnText?a.columnText(b,c,d):d}},colvisRestore:{className:"buttons-colvisRestore",text:function(b){return b.i18n("buttons.colvisRestore","Restore visibility")},init:function(b,a,c){c._visOriginal=b.columns().indexes().map(function(d){return b.column(d).visible()}).toArray()},action:function(b,a,c,d){a.columns().every(function(f){f=a.colReorder&&a.colReorder.transpose?a.colReorder.transpose(f,"toOriginal"):f;this.visible(d._visOriginal[f])})}},colvisGroup:{className:"buttons-colvisGroup",action:function(b,a,c,d){a.columns(d.show).visible(!0,!1);a.columns(d.hide).visible(!1,!1);a.columns.adjust()},show:[],hide:[]}});return e.Buttons});(function($){"use strict";var methods={destroy:function(){$(this).unbind(".maskMoney");return this},applyMask:function(value){var $input=$(this);var settings=$input.data("settings");return maskValue(value,settings)},mask:function(value){return this.each(function(){var $this=$(this);if(typeof value==="number"){$this.val(value)}
return $this.trigger("mask")})},unmasked:function(){return this.map(function(){var value=($(this).val()||"0"),isNegative=value.indexOf("-")!==-1,decimalPart;$(value.split(/\D/).reverse()).each(function(index,element){if(element){decimalPart=element;return!1}});value=value.replace(/\D/g,"");value=value.replace(new RegExp(decimalPart+"$"),"."+decimalPart);if(isNegative){value="-"+value}
return parseFloat(value)})},init:function(parameters){parameters=$.extend({prefix:"",suffix:"",affixesStay:!0,thousands:",",decimal:".",precision:2,allowZero:!1,allowNegative:!1,doubleClickSelection:!0,allowEmpty:!1},parameters);return this.each(function(){var $input=$(this),settings,onFocusValue;settings=$.extend({},parameters);settings=$.extend(settings,$input.data());$input.data("settings",settings);function getInputSelection(){var el=$input.get(0),start=0,end=0,normalizedValue,range,textInputRange,len,endRange;if(typeof el.selectionStart==="number"&&typeof el.selectionEnd==="number"){start=el.selectionStart;end=el.selectionEnd}else{range=document.selection.createRange();if(range&&range.parentElement()===el){len=el.value.length;normalizedValue=el.value.replace(/\r\n/g,"\n");textInputRange=el.createTextRange();textInputRange.moveToBookmark(range.getBookmark());endRange=el.createTextRange();endRange.collapse(!1);if(textInputRange.compareEndPoints("StartToEnd",endRange)>-1){start=end=len}else{start=-textInputRange.moveStart("character",-len);start+=normalizedValue.slice(0,start).split("\n").length-1;if(textInputRange.compareEndPoints("EndToEnd",endRange)>-1){end=len}else{end=-textInputRange.moveEnd("character",-len);end+=normalizedValue.slice(0,end).split("\n").length-1}}}}
return{start:start,end:end}}
function canInputMoreNumbers(){var haventReachedMaxLength=!($input.val().length>=$input.attr("maxlength")&&$input.attr("maxlength")>=0),selection=getInputSelection(),start=selection.start,end=selection.end,haveNumberSelected=(selection.start!==selection.end&&$input.val().substring(start,end).match(/\d/))?!0:!1,startWithZero=($input.val().substring(0,1)==="0");return haventReachedMaxLength||haveNumberSelected||startWithZero}
function setCursorPosition(pos){if(!!settings.formatOnBlur){return}
$input.each(function(index,elem){if(elem.setSelectionRange){elem.focus();elem.setSelectionRange(pos,pos)}else if(elem.createTextRange){var range=elem.createTextRange();range.collapse(!0);range.moveEnd("character",pos);range.moveStart("character",pos);range.select()}})}
function maskAndPosition(startPos){var originalLen=$input.val().length,newLen;$input.val(maskValue($input.val(),settings));newLen=$input.val().length;if(!settings.reverse){startPos=startPos-(originalLen-newLen)}
setCursorPosition(startPos)}
function mask(){var value=$input.val();if(settings.allowEmpty&&value===""){return}
if(settings.precision>0&&value.indexOf(settings.decimal)<0){value+=settings.decimal+new Array(settings.precision+1).join(0)}
$input.val(maskValue(value,settings))}
function changeSign(){var inputValue=$input.val();if(settings.allowNegative){if(inputValue!==""&&inputValue.charAt(0)==="-"){return inputValue.replace("-","")}else{return"-"+inputValue}}else{return inputValue}}
function preventDefault(e){if(e.preventDefault){e.preventDefault()}else{e.returnValue=!1}}
function keypressEvent(e){e=e||window.event;var key=e.which||e.charCode||e.keyCode,decimalKeyCode=settings.decimal.charCodeAt(0);if(key===undefined){return!1}
if((key<48||key>57)&&(key!==decimalKeyCode||!settings.reverse)){return handleAllKeysExceptNumericalDigits(key,e)}else if(!canInputMoreNumbers()){return!1}else{if(key===decimalKeyCode&&shouldPreventDecimalKey()){return!1}
if(settings.formatOnBlur){return!0}
preventDefault(e);applyMask(e);return!1}}
function shouldPreventDecimalKey(){if(isAllTextSelected()){return!1}
return alreadyContainsDecimal()}
function isAllTextSelected(){var length=$input.val().length;var selection=getInputSelection();return selection.start===0&&selection.end===length}
function alreadyContainsDecimal(){return $input.val().indexOf(settings.decimal)>-1}
function applyMask(e){e=e||window.event;var key=e.which||e.charCode||e.keyCode,keyPressedChar="",selection,startPos,endPos,value;if(key>=48&&key<=57){keyPressedChar=String.fromCharCode(key)}
selection=getInputSelection();startPos=selection.start;endPos=selection.end;value=$input.val();$input.val(value.substring(0,startPos)+keyPressedChar+value.substring(endPos,value.length));maskAndPosition(startPos+1)}
function handleAllKeysExceptNumericalDigits(key,e){if(key===45){$input.val(changeSign());return!1}else if(key===43){$input.val($input.val().replace("-",""));return!1}else if(key===13||key===9){return!0}else{preventDefault(e);return!0}}
function keydownEvent(e){e=e||window.event;var key=e.which||e.charCode||e.keyCode,selection,startPos,endPos,value,lastNumber;if(key===undefined){return!1}
selection=getInputSelection();startPos=selection.start;endPos=selection.end;if(key===8||key===46||key===63272){preventDefault(e);value=$input.val();if(startPos===endPos){if(key===8){if(settings.suffix===""){startPos-=1}else{lastNumber=value.split("").reverse().join("").search(/\d/);startPos=value.length-lastNumber-1;endPos=startPos+1}}else{endPos+=1}}
$input.val(value.substring(0,startPos)+value.substring(endPos,value.length));maskAndPosition(startPos);return!1}else if(key===9){return!0}else{return!0}}
function focusEvent(){onFocusValue=$input.val();mask();var input=$input.get(0),textRange;if(!!settings.selectAllOnFocus){input.select()}else if(input.createTextRange){textRange=input.createTextRange();textRange.collapse(!1);textRange.select()}}
function cutPasteEvent(){setTimeout(function(){mask()},0)}
function getDefaultMask(){var n=parseFloat("0")/Math.pow(10,settings.precision);return(n.toFixed(settings.precision)).replace(new RegExp("\\.","g"),settings.decimal)}
function blurEvent(e){if(!!settings.formatOnBlur&&$input.val()!==onFocusValue){applyMask(e)}
if($input.val()===""&&settings.allowEmpty){$input.val("")}else if($input.val()===""||$input.val()===setSymbol(getDefaultMask(),settings)){if(!settings.allowZero){$input.val("")}else if(!settings.affixesStay){$input.val(getDefaultMask())}else{$input.val(setSymbol(getDefaultMask(),settings))}}else{if(!settings.affixesStay){var newValue=$input.val().replace(settings.prefix,"").replace(settings.suffix,"");$input.val(newValue)}}
if($input.val()!==onFocusValue){$input.change()}}
function clickEvent(){var input=$input.get(0),length;if(!!settings.selectAllOnFocus){return}else if(input.setSelectionRange){length=$input.val().length;input.setSelectionRange(length,length)}else{$input.val($input.val())}}
function doubleClickEvent(){var input=$input.get(0),start,length;if(input.setSelectionRange){length=$input.val().length;start=settings.doubleClickSelection?0:length;input.setSelectionRange(start,length)}else{$input.val($input.val())}}
$input.unbind(".maskMoney");$input.bind("keypress.maskMoney",keypressEvent);$input.bind("keydown.maskMoney",keydownEvent);$input.bind("blur.maskMoney",blurEvent);$input.bind("focus.maskMoney",focusEvent);$input.bind("click.maskMoney",clickEvent);$input.bind("dblclick.maskMoney",doubleClickEvent);$input.bind("cut.maskMoney",cutPasteEvent);$input.bind("paste.maskMoney",cutPasteEvent);$input.bind("mask.maskMoney",mask)})}};function setSymbol(value,settings){var operator="";if(value.indexOf("-")>-1){value=value.replace("-","");operator="-"}
if(value.indexOf(settings.prefix)>-1){value=value.replace(settings.prefix,"")}
if(value.indexOf(settings.suffix)>-1){value=value.replace(settings.suffix,"")}
return operator+settings.prefix+value+settings.suffix}
function maskValue(value,settings){if(settings.allowEmpty&&value===""){return""}
if(!!settings.reverse){return maskValueReverse(value,settings)}
return maskValueStandard(value,settings)}
function maskValueStandard(value,settings){var negative=(value.indexOf("-")>-1&&settings.allowNegative)?"-":"",onlyNumbers=value.replace(/[^0-9]/g,""),integerPart=onlyNumbers.slice(0,onlyNumbers.length-settings.precision),newValue,decimalPart,leadingZeros;newValue=buildIntegerPart(integerPart,negative,settings);if(settings.precision>0){decimalPart=onlyNumbers.slice(onlyNumbers.length-settings.precision);leadingZeros=new Array((settings.precision+1)-decimalPart.length).join(0);newValue+=settings.decimal+leadingZeros+decimalPart}
return setSymbol(newValue,settings)}
function maskValueReverse(value,settings){var negative=(value.indexOf("-")>-1&&settings.allowNegative)?"-":"",valueWithoutSymbol=value.replace(settings.prefix,"").replace(settings.suffix,""),integerPart=valueWithoutSymbol.split(settings.decimal)[0],newValue,decimalPart="";if(integerPart===""){integerPart="0"}
newValue=buildIntegerPart(integerPart,negative,settings);if(settings.precision>0){var arr=valueWithoutSymbol.split(settings.decimal);if(arr.length>1){decimalPart=arr[1]}
newValue+=settings.decimal+decimalPart;var rounded=Number.parseFloat((integerPart+"."+decimalPart)).toFixed(settings.precision);var roundedDecimalPart=rounded.toString().split(settings.decimal)[1];newValue=newValue.split(settings.decimal)[0]+"."+roundedDecimalPart}
return setSymbol(newValue,settings)}
function buildIntegerPart(integerPart,negative,settings){integerPart=integerPart.replace(/^0*/g,"");integerPart=integerPart.replace(/\B(?=(\d{3})+(?!\d))/g,settings.thousands);if(integerPart===""){integerPart="0"}
return negative+integerPart}
$.fn.maskMoney=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1))}else if(typeof method==="object"||!method){return methods.init.apply(this,arguments)}else{$.error("Method "+method+" does not exist on jQuery.maskMoney")}}})(window.jQuery||window.Zepto);'use strict';function ResponsiveDatatablesHelper(tableSelector,breakpoints,options){if(typeof tableSelector==='string'){this.tableElement=jQuery(tableSelector)}else{this.tableElement=tableSelector}
this.api=this.tableElement.dataTable().api();this.columnIndexes=[];this.columnsShownIndexes=[];this.columnsHiddenIndexes=[];this.currentBreakpoint='';this.lastBreakpoint='';this.lastColumnsHiddenIndexes=[];var fileName=window.location.pathname.split("/").pop();var context=this.api.settings().context[0];this.tableId=context.sTableId;this.saveState=context.oInit.bStateSave;this.cookieName='DataTablesResponsiveHelper_'+this.tableId+(fileName?'_'+fileName:'');this.lastStateExists=!1;this.expandColumn=undefined;this.origBreakpointsDefs=undefined;this.breakpoints={};this.options={hideEmptyColumnsInRowDetail:!1,clickOn:'icon',showDetail:null,hideDetail:null};this.expandIconTemplate='<span class="responsiveExpander"></span>';this.rowTemplate='<tr class="row-detail"><td><ul><!--column item--></ul></td></tr>';this.rowLiTemplate='<li><span class="columnTitle"><!--column title--></span>: <span class="columnValue"><!--column value--></span></li>';this.disabled=!0;this.skipNextWindowsWidthChange=!1;this.init(breakpoints,options)}
ResponsiveDatatablesHelper.prototype.init=function(breakpoints,options){this.origBreakpointsDefs=breakpoints;this.initBreakpoints();this.disable(!1);jQuery.extend(this.options,options)};ResponsiveDatatablesHelper.prototype.initBreakpoints=function(){if(this.saveState){this.getState()}
if(!this.lastStateExists){var breakpointsSorted=[];for(var prop in this.origBreakpointsDefs){breakpointsSorted.push({name:prop,upperLimit:this.origBreakpointsDefs[prop],columnsToHide:[]})}
breakpointsSorted.sort(function(a,b){return a.upperLimit-b.upperLimit});var lowerLimit=0;for(var i=0;i<breakpointsSorted.length;i++){breakpointsSorted[i].lowerLimit=lowerLimit;lowerLimit=breakpointsSorted[i].upperLimit}
breakpointsSorted.push({name:'always',lowerLimit:lowerLimit,upperLimit:Infinity,columnsToHide:[]});this.breakpoints={};var i,l;for(i=0,l=breakpointsSorted.length;i<l;i++){this.breakpoints[breakpointsSorted[i].name]=breakpointsSorted[i]}
var columns=this.api.columns().header();var visibleColumnsHeadersTds=[];for(i=0,l=columns.length;i<l;i++){if(this.api.column(i).visible()){this.columnIndexes.push(i);visibleColumnsHeadersTds.push(columns[i])}}
for(var index=0;index<visibleColumnsHeadersTds.length;index++){var col=jQuery(visibleColumnsHeadersTds[index]);if(col.attr('data-class')==='expand'){this.expandColumn=this.columnIndexes[index]}
var dataHide=col.attr('data-hide');if(dataHide!==undefined){var splitBreakingPoints=dataHide.split(/,\s*/);for(var i=0;i<splitBreakingPoints.length;i++){var bp=splitBreakingPoints[i];if(bp==='always'){for(var prop in this.breakpoints){if(this.breakpoints[prop].name!=='default'){this.breakpoints[prop].columnsToHide.push(this.columnIndexes[index])}}}else if(this.breakpoints[bp]!==undefined){this.breakpoints[bp].columnsToHide.push(this.columnIndexes[index])}}}}}};ResponsiveDatatablesHelper.prototype.setWindowsResizeHandler=function(bindFlag){if(bindFlag===undefined){bindFlag=!0}
if(bindFlag){var that=this;jQuery(window).bind("resize",function(){that.respond()})}else{jQuery(window).unbind("resize")}};ResponsiveDatatablesHelper.prototype.respond=function(){if(this.disabled){return}
var that=this;var newWindowWidth=jQuery(window).width();var newColumnsToHide=[];for(var prop in this.breakpoints){var element=this.breakpoints[prop];if((!element.lowerLimit||newWindowWidth>element.lowerLimit)&&(!element.upperLimit||newWindowWidth<=element.upperLimit)){this.currentBreakpoint=element.name;newColumnsToHide=element.columnsToHide}}
var columnShowHide=!1;if(!this.skipNextWindowsWidthChange){if(this.lastBreakpoint.length===0&&newColumnsToHide.length){columnShowHide=!0}else if(this.lastBreakpoint!=this.currentBreakpoint){columnShowHide=!0}else if(this.columnsHiddenIndexes.length!==newColumnsToHide.length){columnShowHide=!0}else{var d1=this.difference(this.columnsHiddenIndexes,newColumnsToHide).length;var d2=this.difference(newColumnsToHide,this.columnsHiddenIndexes).length;columnShowHide=d1+d2>0}}
if(columnShowHide){this.skipNextWindowsWidthChange=!0;this.columnsHiddenIndexes=newColumnsToHide;this.columnsShownIndexes=this.difference(this.columnIndexes,this.columnsHiddenIndexes);this.showHideColumns();this.lastBreakpoint=this.currentBreakpoint;this.setState();this.skipNextWindowsWidthChange=!1}
if(this.columnsHiddenIndexes.length){this.tableElement.addClass('has-columns-hidden');jQuery('tr.detail-show',this.tableElement).each(function(index,element){var tr=jQuery(element);if(tr.next('.row-detail').length===0){ResponsiveDatatablesHelper.prototype.showRowDetail(that,tr)}})}else{this.tableElement.removeClass('has-columns-hidden');jQuery('tr.row-detail',this.tableElement).each(function(event){ResponsiveDatatablesHelper.prototype.hideRowDetail(that,jQuery(this).prev())})}};ResponsiveDatatablesHelper.prototype.showHideColumns=function(){for(var i=0,l=this.columnsShownIndexes.length;i<l;i++){this.api.column(this.columnsShownIndexes[i]).visible(!0)}
for(var i=0,l=this.columnsHiddenIndexes.length;i<l;i++){this.api.column(this.columnsHiddenIndexes[i]).visible(!1)}
var that=this;jQuery('tr.row-detail',this.tableElement).each(function(){ResponsiveDatatablesHelper.prototype.hideRowDetail(that,jQuery(this).prev())});if(this.tableElement.hasClass('has-columns-hidden')){jQuery('tr.detail-show',this.tableElement).each(function(index,element){ResponsiveDatatablesHelper.prototype.showRowDetail(that,jQuery(element))})}};ResponsiveDatatablesHelper.prototype.createExpandIcon=function(tr){if(this.disabled){return}
var tds=jQuery('td',tr);for(var i=0,l=tds.length;i<l;i++){var td=tds[i];var tdIndex=this.api.cell(td).index().column;td=jQuery(td);if(tdIndex===this.expandColumn){if(jQuery('span.responsiveExpander',td).length==0){td.prepend(this.expandIconTemplate);switch(this.options.clickOn){case 'cell':td.on('click',{responsiveDatatablesHelperInstance:this},this.showRowDetailEventHandler);td.addClass('wdt-responsive-cell-action');break;case 'row':jQuery(tr).on('click',{responsiveDatatablesHelperInstance:this},this.showRowDetailEventHandler);jQuery(tr).addClass('wdt-responsive-row-action');break;default:td.on('click','span.responsiveExpander',{responsiveDatatablesHelperInstance:this},this.showRowDetailEventHandler);break}}
break}}};ResponsiveDatatablesHelper.prototype.showRowDetailEventHandler=function(event){var responsiveDatatablesHelperInstance=event.data.responsiveDatatablesHelperInstance;if(responsiveDatatablesHelperInstance.disabled){return}
var td=jQuery(this);if(!td.closest('table').hasClass('has-columns-hidden')){return}
var tr=td.closest('tr');if(tr.hasClass('detail-show')){ResponsiveDatatablesHelper.prototype.hideRowDetail(responsiveDatatablesHelperInstance,tr)}else{ResponsiveDatatablesHelper.prototype.showRowDetail(responsiveDatatablesHelperInstance,tr)}
tr.toggleClass('detail-show');if(responsiveDatatablesHelperInstance.options.clickOn==='icon'){event.stopPropagation()}};ResponsiveDatatablesHelper.prototype.showRowDetail=function(responsiveDatatablesHelperInstance,tr){var api=responsiveDatatablesHelperInstance.api;var columns=api.columns().header();var rowGropuingTableDescription=JSON.parse(jQuery("#"+jQuery(responsiveDatatablesHelperInstance.tableElement[0]).data().describedBy).val());var newTr=jQuery(responsiveDatatablesHelperInstance.rowTemplate);var ul=jQuery('ul',newTr);for(var i=0;i<responsiveDatatablesHelperInstance.columnsHiddenIndexes.length;i++){var index=responsiveDatatablesHelperInstance.columnsHiddenIndexes[i];var rowIndex=api.row(tr).index();var td=api.cell(rowIndex,index).node();if(!responsiveDatatablesHelperInstance.options.hideEmptyColumnsInRowDetail||td.innerHTML.trim().length){var li=jQuery(responsiveDatatablesHelperInstance.rowLiTemplate);var hiddenColumnName=jQuery(columns[index]).attr('data-name');jQuery('.columnTitle',li).html(hiddenColumnName!==undefined?hiddenColumnName:columns[index].innerHTML);var contents=jQuery(td).contents();var clonedContents=contents.clone();for(var n=0,m=contents.length;n<m;n++){var node=contents[n];if(node.nodeType===Node.ELEMENT_NODE&&node.tagName==='SELECT'){clonedContents[n].selectedIndex=node.selectedIndex}}
jQuery('.columnValue',li).append(clonedContents).data('originalTdSource',td);li.attr('data-column',index);var tdClass=jQuery(td).attr('class');if(tdClass!=='undefined'&&tdClass!==!1&&tdClass!==''){li.addClass(tdClass)}
ul.append(li)}}
var colspan=responsiveDatatablesHelperInstance.columnIndexes.length-responsiveDatatablesHelperInstance.columnsHiddenIndexes.length;var colSpan2=0;if(rowGropuingTableDescription.dataTableParams.fixedColumns&&rowGropuingTableDescription.dataTableParams.fixedColumns.left!=0){colSpan2=colspan-rowGropuingTableDescription.dataTableParams.fixedColumns.left;colspan=rowGropuingTableDescription.dataTableParams.fixedColumns.left}
newTr.find('> td').attr('colspan',colspan);var tdFC='<td class="wdt_fixedColumns-responsive"><!--column item--></td>';if(rowGropuingTableDescription.dataTableParams.fixedColumns&&rowGropuingTableDescription.dataTableParams.fixedColumns.left!=0){newTr.find('> td:not(.wdt_fixedColumns-responsive)').css({'left':'0px','position':'sticky'});newTr.find('> td:not(.wdt_fixedColumns-responsive)').addClass('dtfc-fixed-left');newTr.append(tdFC);newTr.find('> td.wdt_fixedColumns-responsive').attr('colspan',colSpan2)}
tr.after(newTr);if(responsiveDatatablesHelperInstance.options.showDetail){responsiveDatatablesHelperInstance.options.showDetail(newTr);if(rowGropuingTableDescription.dataTableParams.fixedColumns&&rowGropuingTableDescription.dataTableParams.fixedColumns.left!=0){responsiveDatatablesHelperInstance.api.fixedColumns().left(rowGropuingTableDescription.dataTableParams.fixedColumns.left)
responsiveDatatablesHelperInstance.api.fixedColumns().right(rowGropuingTableDescription.dataTableParams.fixedColumns.right)}
if(rowGropuingTableDescription.dataTableParams.fixedHeader&&jQuery(rowGropuingTableDescription.selector).find('div.dtfh-floatingparent').length!=0){api.fixedHeader.adjust()}}};ResponsiveDatatablesHelper.prototype.hideRowDetail=function(responsiveDatatablesHelperInstance,tr){var rowDetail=tr.next('.row-detail');var rowGropuingTableDescription=JSON.parse(jQuery("#"+jQuery(responsiveDatatablesHelperInstance.tableElement[0]).data().describedBy).val());var api=responsiveDatatablesHelperInstance.api;if(responsiveDatatablesHelperInstance.options.hideDetail){responsiveDatatablesHelperInstance.options.hideDetail(rowDetail)}
rowDetail.find('li').each(function(){var columnValueContainer=jQuery(this).find('span.columnValue');var tdContents=columnValueContainer.contents();var td=columnValueContainer.data('originalTdSource');jQuery(td).empty().append(tdContents)});rowDetail.remove();if(rowGropuingTableDescription.dataTableParams.fixedColumns&&rowGropuingTableDescription.dataTableParams.fixedColumns.left!=0){responsiveDatatablesHelperInstance.api.fixedColumns().left(rowGropuingTableDescription.dataTableParams.fixedColumns.left)
responsiveDatatablesHelperInstance.api.fixedColumns().right(rowGropuingTableDescription.dataTableParams.fixedColumns.right)}
if(rowGropuingTableDescription.dataTableParams.fixedHeader&&jQuery(rowGropuingTableDescription.selector).find('div.dtfh-floatingparent').length!=0){api.fixedHeader.adjust()}};ResponsiveDatatablesHelper.prototype.disable=function(disable){this.disabled=(disable===undefined)||disable;if(this.disabled){this.setWindowsResizeHandler(!1);jQuery('tbody tr.row-detail',this.tableElement).remove();jQuery('tbody tr',this.tableElement).removeClass('detail-show');jQuery('tbody tr span.responsiveExpander',this.tableElement).remove();this.columnsHiddenIndexes=[];this.columnsShownIndexes=this.columnIndexes;this.showHideColumns();this.tableElement.removeClass('has-columns-hidden');this.tableElement.off('click','span.responsiveExpander',this.showRowDetailEventHandler)}else{this.setWindowsResizeHandler()}};ResponsiveDatatablesHelper.prototype.getState=function(){if(typeof(Storage)){var value=JSON.parse(localStorage.getItem(this.cookieName));if(value){this.columnIndexes=value.columnIndexes;this.breakpoints=value.breakpoints;this.expandColumn=value.expandColumn;this.lastBreakpoint=value.lastBreakpoint;this.lastStateExists=!0}}else{}};ResponsiveDatatablesHelper.prototype.setState=function(){if(typeof(Storage)){var d1=this.difference(this.lastColumnsHiddenIndexes,this.columnsHiddenIndexes).length;var d2=this.difference(this.columnsHiddenIndexes,this.lastColumnsHiddenIndexes).length;if(d1+d2>0){var tt;var value={columnIndexes:this.columnIndexes,columnsHiddenIndexes:this.columnsHiddenIndexes,breakpoints:this.breakpoints,expandColumn:this.expandColumn,lastBreakpoint:this.lastBreakpoint};var isSafari=!!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/);if(!isSafari){localStorage.setItem(this.cookieName,JSON.stringify(value))}
this.lastColumnsHiddenIndexes=this.columnsHiddenIndexes.slice(0)}}else{}};ResponsiveDatatablesHelper.prototype.difference=function(a,b){var arr=[],i,hash={};for(i=b.length-1;i>=0;i--){hash[b[i]]=!0}
for(i=a.length-1;i>=0;i--){if(hash[a[i]]!==!0){arr.push(a[i])}}
return arr};jQuery(document).ready(function($){var wdtDateFormat=getMomentWdtDateFormat();var wdtTimeFormat=getMomentWdtTimeFormat();jQuery('.wdt-preload-layer').animateFadeOut();if(typeof wpdatatables_functions_strings!=='undefined'){$.fn.DataTable.defaults.oLanguage.sInfo=wpdatatables_functions_strings.sInfo;$.fn.DataTable.defaults.oLanguage.sSearch=wpdatatables_functions_strings.sSearch;$.fn.DataTable.defaults.oLanguage.lengthMenu=wpdatatables_functions_strings.lengthMenu;$.fn.DataTable.defaults.oLanguage.sEmptyTable=wpdatatables_functions_strings.sEmptyTable;$.fn.DataTable.defaults.oLanguage.sInfoEmpty=wpdatatables_functions_strings.sInfoEmpty;$.fn.DataTable.defaults.oLanguage.sInfoFiltered=wpdatatables_functions_strings.sInfoFiltered;$.fn.DataTable.defaults.oLanguage.sInfoPostFix=wpdatatables_functions_strings.sInfoPostFix;$.fn.DataTable.defaults.oLanguage.sInfoThousands=wpdatatables_functions_strings.sInfoThousands;$.fn.DataTable.defaults.oLanguage.sLengthMenu=wpdatatables_functions_strings.sLengthMenu;$.fn.DataTable.defaults.oLanguage.sProcessing=wpdatatables_functions_strings.sProcessing;$.fn.DataTable.defaults.oLanguage.sZeroRecords=wpdatatables_functions_strings.sZeroRecords;$.fn.DataTable.defaults.oLanguage.oPaginate=wpdatatables_functions_strings.oPaginate;$.fn.DataTable.defaults.oLanguage.oAria=wpdatatables_functions_strings.oAria}
if(typeof($.fn.dataTableExt)!=='undefined'){$.fn.dataTableExt.errMode='throw';$.fn.dataTableExt.oApi.fnFilterClear=function(oSettings){oSettings.oPreviousSearch.sSearch="";if(typeof oSettings.aanFeatures.f!='undefined'){var n=oSettings.aanFeatures.f;for(var i=0,iLen=n.length;i<iLen;i++){$('input',n[i]).val('')}}
for(var i=0,iLen=oSettings.aoPreSearchCols.length;i<iLen;i++){oSettings.aoPreSearchCols[i].sSearch=""}
oSettings.oApi._fnReDraw(oSettings)};$.extend($.fn.dataTableExt.oSort,{"formatted-num-pre":function(a){if($(a).text()!=''){a=$(a).text()}
a=(a==="-"||a==="")?0:a.replace(/[^\d\-\.]/g,"");if(a!=-1&&a!=""){while(a.indexOf('.')!=-1){a=a.replace(".","")}
a=a.replace(',','.')}
return parseFloat(a)},"formatted-num-asc":function(a,b){return a-b},"formatted-num-desc":function(a,b){return b-a},"statuscol-pre":function(a){a=$(a).find('div.percents').text();return parseFloat(a)},"statuscol-asc":function(a,b){return a-b},"statuscol-desc":function(a,b){return b-a},"date-custom-pre":function(date){return wdtPrepareDate(date,wdtDateFormat,wdtTimeFormat)},"time-custom-pre":function(time){return wdtPrepareTime(time,wdtTimeFormat)}});$.fn.dataTableExt.oApi.fnGetColumnIndex=function(oSettings,sCol){var cols=oSettings.aoColumns;for(var x=0,xLen=cols.length;x<xLen;x++){if((typeof(cols[x].sTitle)=='string')&&(cols[x].sTitle.toLowerCase()==sCol.toLowerCase())){return x}}
return-1};$.fn.dataTableExt.aTypes.unshift(function(sData){"use strict";if(/^([0-2]?\d|3[0-1])-(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)-\d{4}/i.test(sData)){return'date-dd-mmm-yyyy'}
return null});$.fn.dataTableExt.oSort['date-dd-mmm-yyyy-asc']=function(a,b){"use strict";var ordA=wdtCustomDateDDMMMYYYYToOrd(a),ordB=wdtCustomDateDDMMMYYYYToOrd(b);return(ordA<ordB)?-1:((ordA>ordB)?1:0)};$.fn.dataTableExt.oSort['date-dd-mmm-yyyy-desc']=function(a,b){"use strict";var ordA=wdtCustomDateDDMMMYYYYToOrd(a),ordB=wdtCustomDateDDMMMYYYYToOrd(b);return(ordA<ordB)?1:((ordA>ordB)?-1:0)}}
$('body').on('focus','.wdt-datepicker',function(){var isHandsonTable=$(this).parent('.handsontableInputHolder').length
if(!isHandsonTable){var wpTableDescription=$(this).closest('.wdt-constructor-default-value').length||$(this).closest('.wpDataTableFilterSection').length||$(this).closest('.modal-body').length||$(this).closest('.wdt-editing-enabled-block').length||$(this).closest('.wdt-filter-default-value-from-block').length||$(this).closest('.wdt-filter-default-value-to-block').length||$(this).closest('.wdt-conditional-formatting-rule').length?'':JSON.parse(jQuery('#'+$(this).parents('table').data().describedBy).val());var filterElem='none';if($(this).closest('.wpDataTableFilterSection').length==0&&$(this).closest('.modal-body').length==0&&$(this).closest('.wdt-constructor-default-value').length==0&&$(this).closest('.wdt-editing-enabled-block').length==0&&$(this).closest('.wdt-filter-default-value-from-block').length==0&&$(this).closest('.wdt-filter-default-value-to-block').length==0&&$(this).closest('.wdt-conditional-formatting-rule').length==0){if(wpTableDescription.dataTableParams.fixedColumns||wpTableDescription.dataTableParams.fixedHeader.header){filterElem=wpTableDescription.renderFilter==="header"?'th':'td'}}}
$(this).datetimepicker({format:wdtDateFormat,showClear:!0,keepOpen:!1,useCurrent:!1}).off('dp.show').on('dp.show',function(){$(this).parent().find('div.bootstrap-datetimepicker-widget').addClass('wdt-datetimepicker-modal');if(!_.contains(['MM/Y','MMM Y','Y'],wdtDateFormat)){wdtAddDatePlaceholders($(this))}
if(!isHandsonTable){showDateTimePickerForFixedHeaderAndColumns($(this),filterElem,0)}}).on('dp.hide',function(){if(!isHandsonTable){hidePickerForFixedHeaderAndColumns($(this))}})});$('body').on('focus','.wdt-timepicker',function(){var isHandsonTable=$(this).parent('.handsontableInputHolder').length
if(!isHandsonTable){var wpTableDescription=$(this).closest('.wdt-constructor-default-value').length||$(this).closest('.wpDataTableFilterSection').length||$(this).closest('.modal-body').length||$(this).closest('.wdt-editing-enabled-block').length||$(this).closest('.wdt-filter-default-value-from-block').length||$(this).closest('.wdt-filter-default-value-to-block').length||$(this).closest('.wdt-conditional-formatting-rule').length?'':JSON.parse(jQuery('#'+$(this).parents('table').data().describedBy).val());var filterElem='none';if($(this).closest('.wpDataTableFilterSection').length==0&&$(this).closest('.modal-body').length==0&&$(this).closest('.wdt-constructor-default-value').length==0&&$(this).closest('.wdt-editing-enabled-block').length==0&&$(this).closest('.wdt-filter-default-value-from-block').length==0&&$(this).closest('.wdt-filter-default-value-to-block').length==0&&$(this).closest('.wdt-conditional-formatting-rule').length==0){if(wpTableDescription.dataTableParams.fixedColumns||wpTableDescription.dataTableParams.fixedHeader.header){filterElem=wpTableDescription.renderFilter==="header"?'th':'td'}}}
$(this).datetimepicker({format:wdtTimeFormat,showClear:!0,keepOpen:!0,useCurrent:!1}).off('dp.show').on('dp.show',function(){$(this).parent().find('div.bootstrap-datetimepicker-widget').addClass('wdt-datetimepicker-modal');if(!isHandsonTable){showDateTimePickerForFixedHeaderAndColumns($(this),filterElem,1)}}).on('dp.hide',function(){if(!isHandsonTable){hidePickerForFixedHeaderAndColumns($(this))}})});$('body').on('focus','.wdt-datetimepicker',function(){var isHandsonTable=$(this).parent('.handsontableInputHolder').length
if(!isHandsonTable){var wpTableDescription=$(this).closest('.wdt-constructor-default-value').length||$(this).closest('.wpDataTableFilterSection').length||$(this).closest('.modal-body').length||$(this).closest('.wdt-editing-enabled-block').length||$(this).closest('.wdt-filter-default-value-from-block').length||$(this).closest('.wdt-filter-default-value-to-block').length||$(this).closest('.wdt-conditional-formatting-rule').length?'':JSON.parse(jQuery('#'+$(this).parents('table').data().describedBy).val());var filterElem='none';if($(this).closest('.wpDataTableFilterSection').length==0&&$(this).closest('.modal-body').length==0&&$(this).closest('.wdt-constructor-default-value').length==0&&$(this).closest('.wdt-editing-enabled-block').length==0&&$(this).closest('.wdt-filter-default-value-from-block').length==0&&$(this).closest('.wdt-filter-default-value-to-block').length==0&&$(this).closest('.wdt-conditional-formatting-rule').length==0){if(wpTableDescription.dataTableParams.fixedColumns||wpTableDescription.dataTableParams.fixedHeader.header){filterElem=wpTableDescription.renderFilter==="header"?'th':'td'}}}
$(this).datetimepicker({format:wdtDateFormat+' '+wdtTimeFormat,showClear:!0,keepOpen:!0,useCurrent:!1}).off('dp.show').on('dp.show',function(){$(this).parent().find('div.bootstrap-datetimepicker-widget').addClass('wdt-datetimepicker-modal');if(!_.contains(['MM/Y','MMM Y','Y'],wdtDateFormat)){wdtAddDatePlaceholders($(this))}
if(!isHandsonTable){showDateTimePickerForFixedHeaderAndColumns($(this),filterElem,0)}}).on('dp.hide',function(){if(!isHandsonTable){hidePickerForFixedHeaderAndColumns($(this))}})})});var wdtCustomDateDDMMMYYYYToOrd=function(date){"use strict";var dateParts=date.split(/-/);return(dateParts[2]*10000)+(jQuery.inArray(dateParts[1].toUpperCase(),["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"])*100)+dateParts[0]};function wdtValidateURL(textval){var regex=/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?(||.*)?$/i;return regex.test(textval)}
function wdtPrepareDate(date,wdtDateFormat,wdtTimeFormat){var format=wdtDateFormat+' '+wdtTimeFormat;return moment(date,format).valueOf()}
function wdtPrepareTime(time,wdtTimeFormat){return moment(time,wdtTimeFormat).valueOf()}
function wdtValidateEmail(email){var regex=/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+(||.*)?$/;return regex.test(email)}
function wdtRandString(n){if(!n){n=5}
var text='';var possible='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';for(var i=0;i<n;i++){text+=possible.charAt(Math.floor(Math.random()*possible.length))}
return text}
function wdtFormatNumber(n,c,d,t){c=isNaN(c=Math.abs(c))?2:c,d=d==undefined?".":d,t=t==undefined?",":t,s=n<0?"-":"",i=parseInt(n=Math.abs(+n||0).toFixed(c))+"",j=(j=i.length)>3?j%3:0;return s+(j?i.substr(0,j)+t:"")+i.substr(j).replace(/(\d{3})(?=\d)/g,"$1"+t)+(c?d+Math.abs(n-i).toFixed(c).slice(2):"")}
function wdtUnformatNumber(number,thousandsSeparator,decimalsSeparator,isFloat){if(typeof isFloat=='undefined'){isFloat=!1}
var return_string=String(number).replace(new RegExp('\\'+thousandsSeparator,'g'),'');if(isFloat&&decimalsSeparator==','){return_string=return_string.replace(new RegExp('\\'+decimalsSeparator),'.')}
return return_string}
function wdtCalculateColumnSum(columnData,thousandsSeparator){if(columnData.length>0){if(thousandsSeparator=='.'){var sum=columnData.reduce(function(a,b){return parseFloat(a)+parseFloat(b.replace(/\./g,'').replace(',','.'))},0)}else{sum=columnData.reduce(function(a,b){return parseFloat(a)+parseFloat(b.replace(/\,/g,''))},0)}}else{sum=0}
return parseFloat(sum)}
function wdtCalculateColumnMin(columnData,thousandsSeparator){if(columnData.length>0){var min='';if(thousandsSeparator=='.'){if(columnData.length==1){min=parseFloat(typeof(columnData[0])=='number'?columnData[0]:columnData[0].replace(/\./g,'').replace(',','.'))}else{min=columnData.reduce(function(a,b){return parseInt(typeof(a)=='number'?a:a.replace(/\./g,''))<=parseInt(b.replace(/\./g,''))?parseFloat(typeof(a)=='number'?a:a.replace(/\./g,'').replace(',','.')):parseFloat(b.replace(/\./g,'').replace(',','.'))})}}else{min=columnData.reduce(function(a,b){return parseInt(typeof(a)=='number'?a:a.replace(/\,/g,''))<=parseInt(b.replace(/\,/g,''))?parseFloat(typeof(a)=='number'?a:a.replace(/\,/g,'')):parseFloat(b.replace(/\,/g,''))})}}else{min=0}
return min}
function wdtCalculateColumnMax(columnData,thousandsSeparator){if(columnData.length>0){var max='';if(thousandsSeparator=='.'){if(columnData.length==1){max=parseFloat(typeof(columnData[0])=='number'?columnData[0]:columnData[0].replace(/\./g,'').replace(',','.'))}else{max=columnData.reduce(function(a,b){return parseInt(typeof(a)=='number'?a:a.replace(/\./g,''))>=parseInt(b.replace(/\./g,''))?parseFloat(typeof(a)=='number'?a:a.replace(/\./g,'').replace(',','.')):parseFloat(b.replace(/\./g,'').replace(',','.'))})}}else{max=columnData.reduce(function(a,b){return parseInt(typeof(a)=='number'?a:a.replace(/\,/g,''))>=parseInt(b.replace(/\,/g,''))?parseFloat(typeof(a)=='number'?a:a.replace(/\,/g,'')):parseFloat(b.replace(/\,/g,''))})}}else{max=0}
return max}
function wdtFormatNumberByColumnType(number,columnType,columnDecimalPlaces,generalDecimalPlaces,decimalSeparator,thousandsSeparator){var numStr='';if(columnType=='int'){numStr=wdtFormatNumber(number,0,decimalSeparator,thousandsSeparator)}else{if(columnDecimalPlaces!=-1){numStr=wdtFormatNumber(number,columnDecimalPlaces,decimalSeparator,thousandsSeparator)}else{numStr=wdtFormatNumber(number,generalDecimalPlaces,decimalSeparator,thousandsSeparator)}}
return numStr}
function wdtFillPossibleValuesList(distValues){if(jQuery('#wdt-column-values-list').tagsinput('items').length>0){jQuery('#wdt-possible-values-merge-list-modal').modal('show');jQuery('.wdt-merge-possible-values').click(function(e){e.preventDefault();e.stopImmediatePropagation();var oldListValues=jQuery.extend([],jQuery('#wdt-column-values-list').tagsinput('items'));var mergedValues=jQuery.merge(oldListValues,distValues);jQuery('#wdt-column-values-list').tagsinput('removeAll');mergedValues.sort();mergedValues=jQuery.unique(mergedValues);jQuery('#wdt-column-values-list').tagsinput('add',mergedValues.join('|'));jQuery('#wdt-possible-values-merge-list-modal').modal('hide')});jQuery('.wdt-replace-possible-values').click(function(e){e.preventDefault();e.stopImmediatePropagation();jQuery('#wdt-column-values-list').tagsinput('removeAll');distValues.sort();jQuery('#wdt-column-values-list').tagsinput('add',distValues.join('|'));jQuery('#wdt-possible-values-merge-list-modal').modal('hide')})}else{distValues.sort();jQuery('#wdt-column-values-list').tagsinput('add',distValues.join('|'))}}
function wdtAddDatePlaceholders(input){if(input.hasClass("formatting-rule-cell-value")){var datePlaceholders='<div class="col-sm-12 text-center p-b-15">'+'<button class="btn btn-primary p-5 btn-xs wdt-date-placeholder wdt-today-placeholder" data-toggle="tooltip" data-placement="top" title="By settings %TODAY% placeholder, cell value will be compared with today\'s date.">%TODAY%</button> '+'<button class="btn btn-primary p-5 btn-xs wdt-date-placeholder wdt-last-week-placeholder" data-toggle="tooltip" data-placement="top" title="By settings %LAST_WEEK% placeholder, cell value will be compared with last week\'s date.">%LAST_WEEK%</button> '+'<button class="btn btn-primary p-5 btn-xs wdt-date-placeholder wdt-this-week-placeholder" data-toggle="tooltip" data-placement="top" title="By settings %THIS_WEEK% placeholder, cell value will be compared with this week\'s date.">%THIS_WEEK%</button> '+'<button class="btn btn-primary p-5 btn-xs wdt-date-placeholder wdt-next-week-placeholder" data-toggle="tooltip" data-placement="top" title="By settings %NEXT_WEEK% placeholder, cell value will be compared with next week\'s date.">%NEXT_WEEK%</button> '+'<button class="btn btn-primary p-5 btn-xs wdt-date-placeholder wdt-last-30-days-placeholder" data-toggle="tooltip" data-placement="top" title="By settings %LAST_30_DAYS% placeholder, cell value will be compared with last 30 days.">%LAST_30_DAYS%</button> '+'<button class="btn btn-primary p-5 btn-xs wdt-date-placeholder wdt-last-month-placeholder" data-toggle="tooltip" data-placement="top" title="By settings %LAST_MONTH% placeholder, cell value will be compared with last month.">%LAST_MONTH%</button> '+'<button class="btn btn-primary p-5 btn-xs wdt-date-placeholder wdt-this-month-placeholder" data-toggle="tooltip" data-placement="top" title="By settings %THIS_MONTH% placeholder, cell value will be compared with this month.">%THIS_MONTH%</button> '+'<button class="btn btn-primary p-5 btn-xs wdt-date-placeholder wdt-next-month-placeholder" data-toggle="tooltip" data-placement="top" title="By settings %NEXT_MONTH% placeholder, cell value will be compared with next month.">%NEXT_MONTH%</button> '+'</div>';jQuery('.datepicker').closest("ul.list-unstyled").append(datePlaceholders);jQuery('.wdt-date-placeholder').tooltip();jQuery('.wdt-today-placeholder').click(function(){jQuery(this).closest('.form-group').find('.formatting-rule-cell-value').val('%TODAY%').data("DateTimePicker").hide()})
jQuery('.wdt-last-week-placeholder').click(function(){jQuery(this).closest('.form-group').find('.formatting-rule-cell-value').val('%LAST_WEEK%').data("DateTimePicker").hide()})
jQuery('.wdt-this-week-placeholder').click(function(){jQuery(this).closest('.form-group').find('.formatting-rule-cell-value').val('%THIS_WEEK%').data("DateTimePicker").hide()})
jQuery('.wdt-next-week-placeholder').click(function(){jQuery(this).closest('.form-group').find('.formatting-rule-cell-value').val('%NEXT_WEEK%').data("DateTimePicker").hide()})
jQuery('.wdt-last-30-days-placeholder').click(function(){jQuery(this).closest('.form-group').find('.formatting-rule-cell-value').val('%LAST_30_DAYS%').data("DateTimePicker").hide()})
jQuery('.wdt-last-month-placeholder').click(function(){jQuery(this).closest('.form-group').find('.formatting-rule-cell-value').val('%LAST_MONTH%').data("DateTimePicker").hide()})
jQuery('.wdt-this-month-placeholder').click(function(){jQuery(this).closest('.form-group').find('.formatting-rule-cell-value').val('%THIS_MONTH%').data("DateTimePicker").hide()});jQuery('.wdt-next-month-placeholder').click(function(){jQuery(this).closest('.form-group').find('.formatting-rule-cell-value').val('%NEXT_MONTH%').data("DateTimePicker").hide()})
jQuery('.formatting-rule-cell-value.wdt-datepicker').on('dp.hide',function(e){e.stopImmediatePropagation();if(jQuery.inArray(jQuery(this).closest('.wdt-conditional-formatting-rule').find('.formatting-rule-cell-value').val(),['%LAST_WEEK%','%THIS_WEEK%','%NEXT_WEEK%','%LAST_30_DAYS%','%LAST_MONTH%','%NEXT_MONTH%','%THIS_MONTH%'])===-1){jQuery(this).closest('.wdt-conditional-formatting-rule').find('.formatting-rule-if-clause').prop('disabled',!1).selectpicker('val','lt')}else{jQuery(this).closest('.wdt-conditional-formatting-rule').find('.formatting-rule-if-clause').prop('disabled',!0).selectpicker('val','')}});jQuery('.formatting-rule-cell-value.wdt-datetimepicker').on('dp.hide',function(e){e.stopImmediatePropagation();if(jQuery.inArray(jQuery(this).closest('.wdt-conditional-formatting-rule').find('.formatting-rule-cell-value').val(),['%LAST_WEEK%','%THIS_WEEK%','%NEXT_WEEK%','%LAST_30_DAYS%','%LAST_MONTH%','%NEXT_MONTH%','%THIS_MONTH%'])===-1){jQuery(this).closest('.wdt-conditional-formatting-rule').find('.formatting-rule-if-clause').prop('disabled',!1).selectpicker('val','lt')}else{jQuery(this).closest('.wdt-conditional-formatting-rule').find('.formatting-rule-if-clause').prop('disabled',!0).selectpicker('val','')}})}}
function showDateTimePickerForFixedHeaderAndColumns(dateData,filterElem,timePicker){var topPos='auto',leftPos='auto',bottomPos='auto',rightPos='auto';var leftOffset=50;var leftOffset2=100;if(dateData.closest('.wdtscroll').length&&dateData.parents('table').length!=0){if(dateData.parents('table').hasClass('fixedHeader-floating')){jQuery('.dtfh-floatingparenthead').css('height',dateData.parents('table')[1].offsetHeight);dateData.closest('th').css('z-index',5)}
if(filterElem=='th'){if(dateData.parents('table').hasClass('fixedHeader-floating')&&(dateData.closest(filterElem).hasClass('dtfc-fixed-left')||dateData.closest(filterElem).hasClass('dtfc-fixed-right'))){if(timePicker){leftOffset=20;leftOffset2=55}
leftPos=dateData.closest('th').hasClass('dtfc-fixed-left')?dateData.offset().left-dateData.closest('.wdtscroll').offset().left-parseInt(dateData.closest('th').css('padding-left'),10)+dateData.closest('.wdtscroll').scrollLeft()+'px':dateData.closest('th').nextAll().length!=0?dateData.offset().left-dateData.closest('.wdtscroll').offset().left-parseInt(dateData.closest('th').css('padding-left'),10)+dateData.closest('.wdtscroll').scrollLeft()-leftOffset+'px':dateData.offset().left-dateData.closest('.wdtscroll').offset().left-parseInt(dateData.closest('th').css('padding-left'),10)+dateData.closest('.wdtscroll').scrollLeft()-leftOffset2+'px'
topPos=dateData.closest('th').height()-dateData.height()+parseInt(dateData.closest('th').css('padding-top'),10)+'px'
dateData.closest('th').css('position','');dateData.closest('th').css('z-index',5)}else if(dateData.closest('th').hasClass('dtfc-fixed-left')||dateData.closest('th').hasClass('dtfc-fixed-right')){leftPos=dateData.offset().left-dateData.closest('.wdtscroll').offset().left-parseInt(dateData.closest('th').css('padding-left'),10)+'px'
topPos=dateData.closest('th').height()+dateData.height()+parseInt(dateData.closest('th').css('padding-top'),10)+'px'
dateData.closest('th').css('position','');dateData.closest('th').css('z-index',5)}else{leftPos=!dateData.parents('table').hasClass('fixedHeader-floating')?dateData.offset().left-dateData.closest('.wdtscroll').offset().left+'px':dateData.closest('th').nextAll().length!=0?'auto':dateData.offset().left-dateData.closest('.wdtscroll').offset().left-parseInt(dateData.closest('th').css('padding-left'),10)+dateData.closest('.wdtscroll').scrollLeft()-leftOffset2+'px'}}else if(filterElem=='td'){if(dateData.closest('td').hasClass('dtfc-fixed-left')){if(timePicker){leftPos=dateData.closest('td').prevAll().length<=1?0+'px':dateData.offset().left-dateData.closest('.wdtscroll').offset().left-20+'px'}else{leftPos=dateData.offset().left-dateData.closest('.wdtscroll').offset().left-parseInt(dateData.closest('td').css('padding-left'),10)+'px'}
bottomPos=0+'px'
dateData.closest('td').css('position','');dateData.closest('td').css('z-index',5)}else if(dateData.closest('td').hasClass('dtfc-fixed-right')){if(timePicker){leftPos=dateData.closest('td').prevAll().length<=1?0+'px':dateData.offset().left-dateData.closest('.wdtscroll').offset().left-20+'px'}else{rightPos=dateData.closest('td').nextAll().length<=1?5+'px':dateData.closest('.wdtscroll').offset().left+'px'}
bottomPos=parseInt(jQuery(".bootstrap-datetimepicker-widget").css('bottom'),10)-dateData.height()+'px'
dateData.closest('td').css('position','');dateData.closest('td').css('z-index',5)}else{leftPos=dateData.offset().left-dateData.closest('.wdtscroll').offset().left+'px';bottomPos='auto'}}else{leftPos=dateData.offset().left-dateData.closest('.wdtscroll').offset().left+'px';topPos='auto'
bottomPos='auto';rightPos='auto'}
jQuery(".bootstrap-datetimepicker-widget").css('inset',topPos+' '+rightPos+' '+bottomPos+' '+leftPos)}else{jQuery(".bootstrap-datetimepicker-widget").css('inset',topPos+' '+rightPos+' '+bottomPos+' '+leftPos)}}
function hidePickerForFixedHeaderAndColumns(dateData){if(dateData.parents('table').hasClass('fixedHeader-floating')){jQuery('.dtfh-floatingparenthead').css({"height":"max-content"});dateData.closest('th').css('z-index',4)}
if(dateData.closest('th').hasClass('dtfc-fixed-left')||dateData.closest('th').hasClass('dtfc-fixed-right')){dateData.closest('th').css('position','sticky');dateData.closest('th').css('z-index',4)}
if(dateData.closest('td').hasClass('dtfc-fixed-left')||dateData.closest('td').hasClass('dtfc-fixed-right')){dateData.closest('td').css('position','sticky');dateData.closest('td').css('z-index',4)}}
function getMomentWdtDateFormat(){return wpdatatables_settings.wdtDateFormat.replace(/[DdMmYyFj]/g,function(match){switch(match){case 'D':return'ddd';case 'd':return'DD';case 'M':return'MMM';case 'm':return'MM';case 'Y':return'Y';case 'y':return'YY';case 'F':return'MMMM';case 'j':return'DD';default:return match}})}
function getMomentWdtTimeFormat(){return wpdatatables_settings.wdtTimeFormat.replace('H','HH').replace('i','mm')}
function searchQueryString(key){key=key.replace(/[*+?^$.\[\]{}()|\\\/]/g,"\\$&");var match=location.search.match(new RegExp("[?&]"+key+"=([^&]+)(&|$)"));return match&&decodeURIComponent(match[1].replace(/\+/g," "))}
function removeURLParameter(url,parameter){let urlParts=url.split('?')
if(urlParts.length>=2){let prefix=encodeURIComponent(parameter)+'='
let pars=urlParts[1].split(/[&;]/g)
for(let i=pars.length;i-->0;){if(pars[i].lastIndexOf(prefix,0)!==-1){pars.splice(i,1)}}
url=urlParts[0]+(pars.length>0?'?'+pars.join('&'):'')
return url}else{return url}}
function getAllUrlParams(url){var queryString=url?url.split('?')[1]:window.location.search.slice(1);var params={};if(queryString){var pairs=queryString.split('&');for(var i=0;i<pairs.length;i++){var pair=pairs[i].split('=');var key=decodeURIComponent(pair[0]);var value=decodeURIComponent(pair[1]||'');if(params[key]){if(Array.isArray(params[key])){params[key].push(value)}else{params[key]=[params[key],value]}}else{params[key]=value}}}
return params}
function createAceEditor(selector){if(jQuery('#'+selector).length){var aceEditorGlobal;var aceEditorFunc=function(e){if(aceEditorGlobal.getValue().length>0){if(selector=='wdt-custom-css'){wpdatatable_plugin_config.setCustomCss(aceEditorGlobal.getValue())}else if(selector=='wdt-custom-js'){wpdatatable_plugin_config.setCustomJs(aceEditorGlobal.getValue())}else if(selector=='wdt-table-custom-css'){wpdatatable_config.setTableCustomCss(aceEditorGlobal.getValue())}else if(selector=='wdt-mysql-query'){wpdatatable_config.setContent(aceEditorGlobal.getValue())}}else{if(selector=='wdt-custom-css'){wpdatatable_plugin_config.setCustomCss('')}else if(selector=='wdt-custom-js'){wpdatatable_plugin_config.setCustomJs('')}else if(selector=='wdt-table-custom-css'){wpdatatable_config.setTableCustomCss('')}else if(selector=='wdt-mysql-query'){wpdatatable_config.setContent('')}}};aceEditorGlobal=ace.edit(selector);aceEditorGlobal.$blockScrolling=Infinity;if(selector=='wdt-custom-css'||selector=='wdt-table-custom-css'){aceEditorGlobal.getSession().setMode("ace/mode/css");aceEditorGlobal.setTheme("ace/theme/monokai")}else if(selector=='wdt-custom-js'){aceEditorGlobal.getSession().setMode("ace/mode/javascript");aceEditorGlobal.setTheme("ace/theme/monokai")}else if(selector=='wdt-mysql-query'){aceEditorGlobal.getSession().setMode("ace/mode/sql");aceEditorGlobal.setTheme("ace/theme/idle_fingers")}
aceEditorGlobal.on('change',_.throttle(aceEditorFunc,3000));aceEditorGlobal.on('blur',aceEditorFunc)}
if(typeof aceEditorGlobal!=='undefined'){setTimeout(aceEditorGlobal.on("input",function(){var stringData;var shouldShow=!aceEditorGlobal.session.getValue().length;var node=aceEditorGlobal.renderer.emptyMessageNode;switch(selector){case 'wdt-custom-js':stringData='JS';break;case 'wdt-custom-css':stringData='CSS';break;case 'wdt-table-custom-css':stringData='table CSS. \n * \n *  You can use selector only for this table like \n * \n *  table.wpDataTable.wpDataTableID-'+wpdatatable_config.id+' { \n *    //Your custom code  \n *  }';break;case 'wdt-mysql-query':stringData='SQL query';break}
if(!shouldShow&&node){aceEditorGlobal.renderer.scroller.removeChild(aceEditorGlobal.renderer.emptyMessageNode);aceEditorGlobal.renderer.emptyMessageNode=null}else if(shouldShow&&!node){node=aceEditorGlobal.renderer.emptyMessageNode=document.createElement("div");node.textContent="/** \n *  Here you can insert custom "+stringData+" \n */"
node.className="ace_emptyMessage"
node.style.padding="0 9px"
node.style.position="absolute"
node.style.zIndex=9
node.style.opacity=0.5
aceEditorGlobal.renderer.scroller.appendChild(node)}}),100)}}
function typeNameInDatabaseForSelectedType(possibleValueInput){let type;switch(possibleValueInput){case 'input':case 'hidden':type='VARCHAR';break;case 'memo':type='TEXT';if((typeof constructedTableData!=='undefined'&&constructedTableData.connection_type=='mssql')||(jQuery('#wdt-table-connection').length&&jQuery('#wdt-table-connection').data('vendor')=='mssql')){type='VARCHAR'}
break;case 'select':case 'multiselect':case 'link':case 'image':case 'email':case 'file':type='VARCHAR';break;case 'int':type='INT';break;case 'float':type='DECIMAL';break;case 'date':type='DATE';break;case 'datetime':type='DATETIME';break;case 'time':type='TIME';break;default:type='VARCHAR';break}
return type}
function typeValueInDBFromTypeInDB(typeValue){let type;switch(typeValue){case 'VARCHAR':type='255';break;case 'DECIMAL':type='16,4';break;case 'SMALLINT':case 'TINYINT':type='1';break;case 'MEDIUMINT':case 'BIGINT':case 'INT':type='11';break;case 'DATE':typeValue='';break;case 'DATETIME':typeValue='';break;case 'TIME':typeValue='';break;default:type='';break}
return type}
function typeValueInDBFromWpcolumnType(possibleValueInput){let typeValue;switch(possibleValueInput){case 'input':case 'hidden':typeValue='255';break;case 'memo':typeValue='';if((typeof constructedTableData!=='undefined'&&constructedTableData.connection_type=='mssql')||(jQuery('#wdt-table-connection').length&&jQuery('#wdt-table-connection').data('vendor')=='mssql')){typeValue='8000'}
break;case 'select':case 'multiselect':case 'link':case 'image':case 'email':case 'file':typeValue='2000';break;case 'int':typeValue='11';break;case 'float':typeValue='16,4';break;case 'date':typeValue='';break;case 'datetime':typeValue='';break;case 'time':typeValue='';break;default:typeValue='';break}
return typeValue};var wpDataTables={};var wpDataTablesSelRows={};var wpDataTablesFunctions={};var wpDataTablesUpdatingFlags={};var wpDataTablesResponsiveHelpers={};var wpDataTablesHooks=wpDataTablesHooks||{onRenderFilter:[],onRenderDetails:[]};var wpDataTablesEditors={};var wdtBreakpointDefinition={tablet:1024,phone:480};var wdtCustomUploader=null;var wdtRenderDataTable=null;var singleClick=!1;(function($){$(function(){wdtRenderDataTable=function($table,tableDescription){var dataTableOptions=tableDescription.dataTableParams;if(tableDescription.responsive){wpDataTablesResponsiveHelpers[tableDescription.tableId]=!1;dataTableOptions.preDrawCallback=function(){if(!wpDataTablesResponsiveHelpers[tableDescription.tableId]){if(typeof tableDescription.mobileWidth!=='undefined'){wdtBreakpointDefinition.phone=parseInt(tableDescription.mobileWidth)}
if(typeof tableDescription.tabletWidth!=='undefined'){wdtBreakpointDefinition.tablet=parseInt(tableDescription.tabletWidth)}
wpDataTablesResponsiveHelpers[tableDescription.tableId]=new ResponsiveDatatablesHelper($(tableDescription.selector).dataTable(),wdtBreakpointDefinition,{clickOn:tableDescription.responsiveAction?tableDescription.responsiveAction:'icon',showDetail:function(detailsRow){if(tableDescription.conditional_formatting_columns){var responsive_rows=detailsRow.find('li');var oSettings=wpDataTables[tableDescription.tableId].fnSettings();var params={};params.thousandsSeparator=tableDescription.number_format==1?'.':',';params.decimalSeparator=tableDescription.number_format==1?',':'.';params.dateFormat=tableDescription.datepickFormat;params.momentDateFormat=params.dateFormat.replace('dd','DD').replace('M','MMM').replace('mm','MM');params.momentTimeFormat=tableDescription.timeFormat.replace('H','H').replace('i','mm');for(var i=0;i<tableDescription.conditional_formatting_columns.length;i++){var column=oSettings.oInstance.api().column(tableDescription.conditional_formatting_columns[i]+':name',{search:'applied'});var conditionalFormattingRules=oSettings.aoColumns[column.index()].conditionalFormattingRules;params.columnType=oSettings.aoColumns[column.index()].wdtType;for(var j in conditionalFormattingRules){responsive_rows.each(function(){$(this).find('.columnValue').contents().filter(function(){if(this.nodeType===8){$(this).remove()}});var value_cell=$(this).find('.columnValue').html();var column_index=$(this).data('column');if(column_index==column.index()){wdtCheckConditionalFormatting(conditionalFormattingRules[j],params,$(this),!0)}})}}}
if(tableDescription.transform_value_columns){var responsive_rows=detailsRow.find('li');var oSettings=wpDataTables[tableDescription.tableId].fnSettings();for(var i=0;i<tableDescription.transform_value_columns.length;i++){var column=oSettings.oInstance.api().column(tableDescription.transform_value_columns[i]+':name',{search:'applied'});var transformValueRules={};transformValueRules[0]=oSettings.aoColumns[column.index()].transformValueRules;var heleprTransformValue=0;for(var k=0;k<oSettings.aoColumns.length;k++){var col=oSettings.oInstance.api().column(oSettings.aoColumns[k].name+':name',{search:'applied'});responsive_rows.each(function(){$(this).find('.columnValue').contents().filter(function(){if(this.nodeType===8){$(this).remove()}});var column_index=$(this).data('column');if(column_index==column.index()){if(transformValueRules[0].includes('{'+oSettings.aoColumns[k].name+'.value}')){var array=oSettings.aiDisplay;var valueToFind=$(this).parent().parent().parent()[0].previousSibling._DT_RowIndex;var position=array.indexOf(valueToFind);wdtTransformValueResponsive(transformValueRules[heleprTransformValue].replaceAll('{'+oSettings.aoColumns[k].name+'.value}',col.data()[position]===null?'':col.data()[position]),params,$(this),0,oSettings.sTableId);transformValueRules[1]=transformValueRules[heleprTransformValue].replaceAll('{'+oSettings.aoColumns[k].name+'.value}',col.data()[position]===null?'':col.data()[position]);heleprTransformValue=1}}})}}}}})}
wdtAddOverlay('#'+tableDescription.tableId)}
dataTableOptions.fnRowCallback=function(nRow,aData,iDisplayIndex,iDisplayIndexFull){wpDataTablesResponsiveHelpers[tableDescription.tableId].createExpandIcon(nRow)}
if(!tableDescription.editable){dataTableOptions.fnDrawCallback=function(){wpDataTablesResponsiveHelpers[tableDescription.tableId].respond();wdtRemoveOverlay('#'+tableDescription.tableId)}}}else{dataTableOptions.fnPreDrawCallback=function(){wdtAddOverlay('#'+tableDescription.tableId)}}
if(tableDescription.editable){if(typeof wpDataTablesFunctions[tableDescription.tableId]==='undefined'){wpDataTablesFunctions[tableDescription.tableId]={}}
wpDataTablesSelRows[tableDescription.tableId]=-1;dataTableOptions.fnDrawCallback=function(){wdtRemoveOverlay('#'+tableDescription.tableId);if(tableDescription.responsive){wpDataTablesResponsiveHelpers[tableDescription.tableId].respond()}
$('.edit_table[aria-controls="'+tableDescription.tableId+'"]').addClass('disabled');$('.duplicate_table_entry[aria-controls="'+tableDescription.tableId+'"]').addClass('disabled');$('.delete_table_entry[aria-controls="'+tableDescription.tableId+'"]').addClass('disabled');$('.master_detail[aria-controls="'+tableDescription.tableId+'"]').addClass('disabled');if(wpDataTablesSelRows[tableDescription.tableId]==-2){var sel_row_index=wpDataTables[tableDescription.tableId].fnSettings()._iDisplayLength-1;$(tableDescription.selector+' > tbody > tr').removeClass('selected');wpDataTablesSelRows[tableDescription.tableId]=wpDataTables[tableDescription.tableId].fnGetPosition($(tableDescription.selector+' > tbody > tr:eq('+sel_row_index+')').get(0));$(tableDescription.selector+' > tbody > tr:eq('+sel_row_index+')').addClass('selected')}else if(wpDataTablesSelRows[tableDescription.tableId]==-3){var sel_row_index=0;$(tableDescription.selector+' > tbody > tr').removeClass('selected');wpDataTablesSelRows[tableDescription.tableId]=wpDataTables[tableDescription.tableId].fnGetPosition($(tableDescription.selector+' > tbody > tr:eq('+sel_row_index+')').get(0));$(tableDescription.selector+' > tbody > tr:eq('+sel_row_index+')').addClass('selected')}
$(tableDescription.selector+'_edit_dialog').parent().removeClass('overlayed');wpDataTablesUpdatingFlags[tableDescription.tableId]=!1};wpDataTablesFunctions[tableDescription.tableId].applyData=function(data,isDuplicate=!1,applyDuplicate=!1){$(data).each(function(index,el){var $inputElement=$('#'+tableDescription.tableId+'_edit_dialog .editDialogInput:not(.bootstrap-select):eq('+index+')');if(el){if($inputElement.data("key").toLowerCase()==='wdt_id'&&isDuplicate){val="0"}else{var val=el.toString()}}else{var val=''}
if(val.indexOf('span')!=-1){val=val.replace(/<span>/g,'').replace(/<\/span>/g,'')}
if(val.indexOf('<br/>')!=-1||val.indexOf('<br>')!=-1){val=val.replace(/<br\s*[\/]?>/g,"\n")}
var inputElementType=$inputElement.data('input_type');var columnType=$inputElement.data('column_type');if(inputElementType==='multi-selectbox'||inputElementType==='selectbox'){if($inputElement.hasClass('wdt-possible-values-ajax')){var $selectpickerBlock=$('select#'+tableDescription.tableId+'_'+$inputElement.data('key')).closest('.fg-line').parent();var mandatory=$inputElement.hasClass('mandatory')?'mandatory ':'';var foreignKeyRule=$inputElement.hasClass('wdt-foreign-key-select')?'wdt-foreign-key-select ':'';var searchInSelect=$inputElement.hasClass('wdt-search-in-select')?' wdt-search-in-select ':'';$selectpickerBlock.html('<div class="fg-line"><select id="'+tableDescription.tableId+'_'+$inputElement.data('key')+'" title="'+wpdatatables_frontend_strings.nothingSelected+'" data-input_type="'+inputElementType+'" data-key="'+$inputElement.data('key')+'" class="form-control editDialogInput selectpicker '+mandatory+'wdt-possible-values-ajax '+foreignKeyRule+searchInSelect+'" data-live-search="true" data-live-search-placeholder="'+wpdatatables_frontend_strings.search+'" data-column_header="'+$inputElement.data('column_header')+'"></select></div>');if(inputElementType==='multi-selectbox')
$selectpickerBlock.find('select').attr('multiple','multiple');if(inputElementType==='multi-selectbox'){var values=val.split(', ');$.each(values,function(index,value){if(value){$selectpickerBlock.find('select').append('<option selected value="'+value+'">'+value+'</option>')}})}else{$selectpickerBlock.find('select').append('<option selected value="'+val+'">'+val+'</option>')}
$inputElement=$selectpickerBlock.find('select');$inputElement.on('show.bs.select',function(e){jQuery(this).closest('div.editDialogInput').find('.bs-searchbox .form-control').val('').trigger('keyup')});$inputElement.selectpicker('refresh').ajaxSelectPicker({ajax:{url:tableDescription.adminAjaxBaseUrl,method:'POST',data:{wdtNonce:$('#wdtNonce').val(),action:'wpdatatables_get_column_possible_values',tableId:tableDescription.tableWpId,originalHeader:$inputElement.data('key')}},cache:!1,preprocessData:function(data){if($('.editDialogInput.open').find('select').data('input_type')==='selectbox'){data.unshift({value:''})}
return data},preserveSelected:!0,emptyRequest:!0,preserveSelectedPosition:'before',locale:{emptyTitle:wpdatatables_frontend_strings.nothingSelected,statusSearching:wpdatatables_frontend_strings.sLoadingRecords,currentlySelected:wpdatatables_frontend_strings.currentlySelected,errorText:wpdatatables_frontend_strings.errorText,searchPlaceholder:wpdatatables_frontend_strings.search,statusInitialized:wpdatatables_frontend_strings.statusInitialized,statusNoResults:wpdatatables_frontend_strings.statusNoResults,statusTooShort:wpdatatables_frontend_strings.statusTooShort}})}
if(inputElementType=='multi-selectbox'){values=val.split(', ');$inputElement.selectpicker();$inputElement.selectpicker('val',values);$inputElement.selectpicker('refresh')}else if(inputElementType=='selectbox'){$inputElement.selectpicker();if($inputElement.hasClass('wdt-foreign-key-select')&&val!=''){val=typeof $inputElement.find('option[data-label="'+val+'"]').val()!=='undefined'?$inputElement.find('option[data-label="'+val+'"]').val():val}
if(val==''){val='possibleValuesAddEmpty'}
$inputElement.selectpicker('val',val);$inputElement.selectpicker('refresh')}
if(searchInSelect===''){$inputElement.closest('div.editDialogInput').find('.bs-searchbox').hide()}else{$inputElement.closest('div.editDialogInput').find('.bs-searchbox').show()}}else{if(inputElementType=='attachment'||$.inArray(columnType,['icon'])!==-1){columnType=$inputElement.parent().data('column_type')===undefined?'link':$inputElement.parent().data('column_type');if(isDuplicate&&applyDuplicate){val=wpDataTablesFunctions[tableDescription.tableId].transformDataForDuplicate(val,columnType)}
if(val!=''){if($(val).children('img').first().attr('src')!=undefined){val=$(val).children('img').first().attr('src')+'||'+$(val).attr('href')}else if($(val).attr('href')!=undefined){val=$(val).attr('href')}else if($(val).attr('src')!=undefined){val=$(val).attr('src')}
$inputElement.parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');if(columnType=='icon'){$inputElement.parent().parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');if(val.indexOf('||')!=-1){$inputElement.parent().parent().parent().find('.fileinput-preview').html('<img src='+val.substring(val.indexOf('||')+2,val.length)+'>')}else{$inputElement.parent().parent().parent().find('.fileinput-preview').html('<img src='+val+'>')}}else{$inputElement.parent().parent().find('.fileinput-filename').text(val.split('/').pop())}}else{$inputElement.closest('.fileinput').removeClass('fileinput-exists').addClass('fileinput-new');$inputElement.closest('.fileinput').find('div.fileinput-exists').removeClass('fileinput-exists').addClass('fileinput-new');$inputElement.closest('.fileinput').find('.fileinput-filename').text('');$inputElement.closest('.fileinput').find('.fileinput-preview').html('')}}else{if(isDuplicate&&applyDuplicate&&$.inArray(columnType,['link','int'])!==-1){val=wpDataTablesFunctions[tableDescription.tableId].transformDataForDuplicate(val,columnType)}
if(val.indexOf('<a ')!=-1){if($.inArray(columnType,['link','email','icon'])!==-1){$link=$(val);if(applyDuplicate){val=$link.attr('href')}else if($link.attr('href').indexOf($link.html())===-1){val=$link.attr('href').replace('mailto:','')+'||'+$link.html()}else{val=$link.html()}}}
if(inputElementType=='mce-editor'){tinymce.execCommand('mceRemoveEditor',!0,$inputElement.attr('id'));tinymce.init({selector:'#'+$inputElement.attr('id'),init_instance_callback:function(editor){editor.setContent(val)},menubar:!1,plugins:'link image media lists hr colorpicker fullscreen textcolor code',toolbar:'undo redo formatselect bold italic underline strikethrough subscript superscript | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent blockquote | hr fullscreen | link unlink image | forecolor backcolor removeformat | code'})}}
$inputElement.val(val).css('border','')}})};wpDataTablesFunctions[tableDescription.tableId].transformDataForDuplicate=function(val,columnType){var transformedVal=val;if(val){if(columnType==='int'){var thousandsSeparator=tableDescription.number_format==1?'.':',';var decimalSeparator=tableDescription.number_format==1?',':'.';transformedVal=wdtFormatNumber(val,0,decimalSeparator,thousandsSeparator)}else if(columnType==='icon'){val=val.substring(val.lastIndexOf('|')+1);transformedVal="<a href='"+val+"' target='_blank' rel='lightbox[-1]'><img src='"+val+"' /></a>"}else if(columnType==='link'){transformedVal="<a href='"+val+"' rel='' target='_self'>att</a>"}}
return transformedVal}
wpDataTablesFunctions[tableDescription.tableId].saveTableData=function(forceRedraw,closeDialog,duplicateEntry){$(tableDescription.selector+'_edit_dialog').closest('.modal-dialog').find('.wdt-preload-layer').animateFadeIn();wpDataTablesUpdatingFlags[tableDescription.tableId]=!0;var formdata={table_id:tableDescription.tableWpId};var aoData=[];var valid=!0;var validation_message='';if(tableDescription.popoverTools){$('.wpDataTablesPopover.editTools').hide()}
if(typeof tinymce!='undefined'){tinymce.triggerSave()}
$(tableDescription.selector+'_edit_dialog .editDialogInput').not('.bootstrap-select').each(function(){if($(this).data('input_type')=='email'){if($(this).val()!=''){var field_valid=wdtValidateEmail($(this).val());if(!field_valid){valid=!1;$(this).addClass('error');validation_message+=wpdatatables_frontend_strings.invalid_email+' <b>'+$(this).data('column_header')+'</b><br>'}else{$(this).removeClass('error')}}}else if($(this).data('input_type')=='link'){if($(this).val()!=''){field_valid=wdtValidateURL($(this).val());if(!field_valid){valid=!1;$(this).addClass('error');validation_message+=wpdatatables_frontend_strings.invalid_link+' <b>'+$(this).data('column_header')+'</b><br>'}else{$(this).removeClass('error')}}}
if($(this).hasClass('mandatory')){if($(this).val()==''||$(this).val()==null){$(this).addClass('error');valid=!1;validation_message+='<b>'+$(this).data('column_header')+'</b> '+wpdatatables_frontend_strings.cannot_be_empty+'<br>'}else{if(valid){$(this).removeClass('error')}}}
if($(this).hasClass('datepicker')){formdata[$(this).data('key')]=$.datepicker.formatDate(tableDescription.datepickFormat,$.datepicker.parseDate(tableDescription.datepickFormat,$(this).val()))}else if($(this).hasClass('wdt-timepicker')||$(this).hasClass('wdt-datetimepicker')){let pattern=/^.*:[0-9]{2}:[0-9]{1}$/;if(pattern.test($(this).val())){formdata[$(this).data('key')]=$(this).val().replace(/:(\d)$/,':0$1')}else{formdata[$(this).data('key')]=$(this).val()}}else if($(this).data('input_type')=='multi-selectbox'){if($(this).val()){formdata[$(this).data('key')]=$(this).val().join(', ')}else{formdata[$(this).data('key')]=''}}else if($(this).data('column_type')=='int'){formdata[$(this).data('key')]=$(this).val().replace(/,/g,'').replace(/\./g,'')}else if($(this).data('column_type')=='hidden'){formdata[$(this).data('key')]=''}else{formdata[$(this).data('key')]=$(this).val()}
aoData.push(formdata[$(this).data('key')])});if(!valid){$(tableDescription.selector+'_edit_dialog').closest('.modal-dialog').find('.wdt-preload-layer').animateFadeOut();wdtNotify(wpdatatables_edit_strings.error,validation_message,'danger');return!1}
wpDataTablesUpdatingFlags[tableDescription.tableId]=!0;$.ajax({url:tableDescription.adminAjaxBaseUrl,type:'POST',dataType:'json',data:{action:'wdt_save_table_frontend',wdtNonce:$('#wdtNonceFrontendEdit_'+tableDescription.tableWpId).val(),isDuplicate:duplicateEntry,formdata:formdata,wdtAjaxURL:tableDescription.dataTableParams.ajax.url,queryParams:getAllUrlParams()},success:function(returnData){$(tableDescription.selector+'_edit_dialog').closest('.modal-dialog').find('.wdt-preload-layer').animateFadeOut();if(returnData.error==''){var insert_id=returnData.success;if(returnData.is_new){forceRedraw=!0}
if(insert_id){$(tableDescription.selector+'_edit_dialog tr.idRow .editDialogInput').val(insert_id);if(forceRedraw){wpDataTables[tableDescription.tableId].fnDraw(!1);$('.edit_table[aria-controls="'+tableDescription.tableId+'"]').addClass('disabled');$('.duplicate_table_entry[aria-controls="'+tableDescription.tableId+'"]').addClass('disabled')}}else{wpDataTables[tableDescription.tableId].fnDraw(!1);$('.edit_table[aria-controls="'+tableDescription.tableId+'"]').addClass('disabled');$('.duplicate_table_entry[aria-controls="'+tableDescription.tableId+'"]').addClass('disabled')}
wdtNotify(wpdatatables_edit_strings.success,wpdatatables_edit_strings.dataSaved,'success');setTimeout(function(){if(closeDialog){$('#wdt-frontend-modal').modal('hide')}else{$(tableDescription.selector+'_edit_dialog .editDialogInput').val('');$(tableDescription.selector+'_edit_dialog .editDialogInput').selectpicker('val','');$(tableDescription.selector+'_edit_dialog .editDialogInput').trigger('change.abs.preserveSelected').selectpicker('refresh');$('.fileinput').removeClass('fileinput-exists').addClass('fileinput-new');$('.fileinput').find('div.fileinput-exists').removeClass('fileinput-exists').addClass('fileinput-new');$('.fileinput').find('.fileinput-filename').text('');$('.fileinput').find('.fileinput-preview').html('');if(tinymce.activeEditor)
tinymce.activeEditor.setContent('');if(duplicateEntry===!0){wpDataTablesFunctions[tableDescription.tableId].applyData(aoData,!0,!0)}else{wpDataTablesFunctions[tableDescription.tableId].setPredefinedEditValues()}}},1000);if(!returnData.is_new&&$(tableDescription.selector+' > tbody > tr.selected').length){var cursor=wpDataTables[tableDescription.tableId].fnGetPosition($(tableDescription.selector+' > tbody > tr.selected').get(0));wpDataTables[tableDescription.tableId].fnSettings().aoData[cursor]._aData=aoData}}else{wdtNotify(wpdatatables_edit_strings.error,returnData.error,'danger')}},error:function(xhr,response){$(tableDescription.selector+'_edit_dialog').closest('.modal-dialog').find('.wdt-preload-layer').animateFadeOut();wdtNotify(wpdatatables_edit_strings.error,wpdatatables_frontend_strings.databaseInsertError,'danger')}});return!0}
wpDataTablesFunctions[tableDescription.tableId].setPredefinedEditValues=function(){for(let i in tableDescription.advancedEditingOptions.aoColumns){let column=tableDescription.advancedEditingOptions.aoColumns[i];let defaultValuesArr;if($.inArray(column.editorInputType,['selectbox','multi-selectbox'])!==-1){if(column.possibleValuesAjax!==-1){var $selectpickerBlock=$('select#'+tableDescription.tableId+'_'+column.origHeader).closest('.fg-line').parent();var mandatory=column.mandatory?'mandatory ':'';var possibleValuesAjax=(column.possibleValuesAjax)?'wdt-possible-values-ajax ':'';var foreignKeyRule=column.foreignKeyRule?'wdt-foreign-key-select ':'';var searchInSelect=column.searchInSelectBoxEditing?' wdt-search-in-select ':'';$selectpickerBlock.html('<div class="fg-line"><select id="'+tableDescription.tableId+'_'+column.origHeader+'" data-input_type="'+column.editorInputType+'" data-key="'+column.origHeader+'" class="form-control editDialogInput selectpicker '+mandatory+possibleValuesAjax+foreignKeyRule+searchInSelect+'" data-live-search="true" data-live-search-placeholder="'+wpdatatables_frontend_strings.search+'" data-column_header="'+column.displayHeader+'"></select></div>');if(column.editorInputType==='multi-selectbox')
$selectpickerBlock.find('select').attr('multiple','multiple');if(column.defaultValue){if(column.editorInputType==='multi-selectbox'){var defaultValues=!Array.isArray(column.defaultValue)?column.defaultValue.split('|'):column.defaultValue;$.each(defaultValues,function(index,value){if(value){$selectpickerBlock.find('select').append('<option selected value="'+value+'">'+value+'</option>')}})}else{if(typeof column.defaultValue==='object')
$selectpickerBlock.find('select').append('<option selected value="'+column.defaultValue.value+'">'+column.defaultValue.text+'</option>');else $selectpickerBlock.find('select').append('<option selected value="'+column.defaultValue+'">'+column.defaultValue+'</option>')}}
$('select#'+tableDescription.tableId+'_'+column.origHeader).on('show.bs.select',function(e){jQuery(this).closest('div.editDialogInput').find('.bs-searchbox .form-control').val('').trigger('keyup')});$('select#'+tableDescription.tableId+'_'+column.origHeader).selectpicker('refresh').ajaxSelectPicker({ajax:{url:tableDescription.adminAjaxBaseUrl,method:'POST',data:{wdtNonce:$('#wdtNonce').val(),action:'wpdatatables_get_column_possible_values',tableId:tableDescription.tableWpId,originalHeader:column.origHeader}},cache:!1,preprocessData:function(data){if($('.editDialogInput.open').find('select').data('input_type')==='selectbox'){data.unshift({value:''})}
return data},preserveSelected:!0,emptyRequest:!0,preserveSelectedPosition:'before',locale:{emptyTitle:wpdatatables_frontend_strings.nothingSelected,statusSearching:wpdatatables_frontend_strings.sLoadingRecords,currentlySelected:wpdatatables_frontend_strings.currentlySelected,errorText:wpdatatables_frontend_strings.errorText,searchPlaceholder:wpdatatables_frontend_strings.search,statusInitialized:wpdatatables_frontend_strings.statusInitialized,statusNoResults:wpdatatables_frontend_strings.statusNoResults,statusTooShort:wpdatatables_frontend_strings.statusTooShort}})}
if(column.searchInSelectBoxEditing!==1){$('select#'+tableDescription.tableId+'_'+column.origHeader).closest('div.editDialogInput').find('.bs-searchbox').hide()}else{$('select#'+tableDescription.tableId+'_'+column.origHeader).closest('div.editDialogInput').find('.bs-searchbox').show()}}
if(column.defaultValue){let columnDefaultValue=column.defaultValue;if($.inArray(column.editorInputType,['selectbox','multi-selectbox'])!==-1){if(typeof columnDefaultValue==='object'){defaultValuesArr=columnDefaultValue.value}else{defaultValuesArr=column.editorInputType==='multi-selectbox'&&!Array.isArray(columnDefaultValue)?columnDefaultValue.split('|'):column.defaultValue}
$('#wdt-frontend-modal .editDialogInput:not(.bootstrap-select):eq('+i+')').selectpicker('val',defaultValuesArr).trigger('change.abs.preserveSelected')}else if($.inArray(column.editorInputType,['attachment','image'])!==-1&&($('.fileupload-'+tableDescription.tableId).length)){var $fileUploadEl=$('.fileupload-'+tableDescription.tableId);$($fileUploadEl).each(function(){if($(this).data('column_type')=='icon'){$(this).parent().parent().find('.fileinput-preview').html('<img src='+columnDefaultValue+'>');$(this).parent().removeClass('fileinput-new').addClass('fileinput-exists');$(this).parent().parent().removeClass('fileinput-new').addClass('fileinput-exists')}else{$(this).parent().find('.fileinput-filename').val(columnDefaultValue);$(this).parent().removeClass('fileinput-new').addClass('fileinput-exists');$(this).parent().find('.fileinput-filename').text((columnDefaultValue).substring((columnDefaultValue).lastIndexOf("/")+1))}});$('#wdt-frontend-modal .editDialogInput:not(.bootstrap-select):eq('+i+')').val(column.defaultValue)}else if(column.editorInputType==='mce-editor'){if(tinymce.activeEditor){$inputElement=$('#'+tableDescription.tableId+'_edit_dialog .editDialogInput:not(.bootstrap-select):eq('+i+')');tinymce.execCommand('mceRemoveEditor',!0,$inputElement.attr('id'));tinymce.init({selector:'#'+$inputElement.attr('id'),init_instance_callback:function(editor){editor.setContent(column.defaultValue)},menubar:!1,plugins:'link image media lists hr colorpicker fullscreen textcolor code',toolbar:'undo redo formatselect bold italic underline strikethrough subscript superscript | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent blockquote | hr fullscreen | link unlink image | forecolor backcolor removeformat | code'})}}else{$('#wdt-frontend-modal .editDialogInput:not(.bootstrap-select):eq('+i+')').val(column.defaultValue)}}}}}
if(!tableDescription.responsive&&!tableDescription.editable){dataTableOptions.fnDrawCallback=function(){wdtRemoveOverlay('#'+tableDescription.tableId)}}
if($('.wdt-column-sum[data-table-id="'+tableDescription.tableWpId+'"]').length){var sumColumns=[];$('.wdt-column-sum[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){sumColumns.push($(this).data('column-orig-header'))})}
if($('.wdt-column-avg[data-table-id="'+tableDescription.tableWpId+'"]').length){var avgColumns=[];$('.wdt-column-avg[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){avgColumns.push($(this).data('column-orig-header'))})}
if($('.wdt-column-min[data-table-id="'+tableDescription.tableWpId+'"]').length){var minColumns=[];$('.wdt-column-min[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){minColumns.push($(this).data('column-orig-header'))})}
if($('.wdt-column-max[data-table-id="'+tableDescription.tableWpId+'"]').length){var maxColumns=[];$('.wdt-column-max[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){maxColumns.push($(this).data('column-orig-header'))})}
if(tableDescription.serverSide){dataTableOptions.ajax.data=function(data){data.sumColumns=sumColumns;data.avgColumns=avgColumns;data.minColumns=minColumns;data.maxColumns=maxColumns;data.currentUserId=$('#wdt-user-id-placeholder').val();data.currentUserLogin=$('#wdt-user-login-placeholder').val();data.currentPostIdPlaceholder=$('#wdt-post-id-placeholder').val();data.currentUserDisplayName=$('#wdt-user-display-name-placeholder').val();data.currentUserFirstName=$('#wdt-user-first-name-placeholder').val();data.currentUserLastName=$('#wdt-user-last-name-placeholder').val();data.currentUserEmail=$('#wdt-user-email-placeholder').val();data.currentDate=$('#wdt-date-placeholder').val();data.currentDateTime=$('#wdt-datetime-placeholder').val();data.currentTime=$('#wdt-time-placeholder').val();data.wpdbPlaceholder=$('#wdt-wpdb-placeholder').val();data.wdtNonce=$('#wdtNonceFrontendServerSide_'+tableDescription.tableWpId).val();data.showAllRows=$('#wdt-show-all-rows').val()}}
if(tableDescription.hideBeforeLoad){dataTableOptions.fnInitComplete=function(){$(tableDescription.selector).animateFadeIn();if(tableDescription.dataTableParams.fixedColumns){$(tableDescription.selector).DataTable().draw()}}}
if($.inArray(tableDescription.tableSkin,['raspberry-cream','mojito','dark-mojito'])!==-1){dataTableOptions.fnInitComplete=function(){let columnPos=tableDescription.dataTableParams.order[0][0];let columnTitle=tableDescription.dataTableParams.columnDefs[columnPos].className.substring(tableDescription.dataTableParams.columnDefs[columnPos].className.indexOf("column-")+7,);let tableId=tableDescription.tableId;addOutlineBorder(tableId,columnTitle);if(tableDescription.tableSkin==='mojito'||tableDescription.tableSkin==='dark-mojito'){cubeLoaderMojito(tableId);if(tableDescription.showRowsPerPage)
hideLabelShowXEntries(tableId);}
if(tableDescription.hideBeforeLoad){$(tableDescription.selector).animateFadeIn();$(tableDescription.selector).DataTable().draw()}}}
wpDataTables[tableDescription.tableId]=$(tableDescription.selector).dataTable(dataTableOptions);if(wpDataTables[tableDescription.tableId].fnSettings()._iDisplayLength>=wpDataTables[tableDescription.tableId].fnSettings().fnRecordsTotal()||dataTableOptions.iDisplayLength===-1){$('#'+tableDescription.tableId+'_paginate').hide()}
$(tableDescription.selector+'_wrapper').addClass('wpDataTables wpDataTablesWrapper wpDataTableID-'+tableDescription.tableWpId)
if(tableDescription.paginationAlign){switch(tableDescription.paginationAlign){case "right":$(tableDescription.selector+'_wrapper').addClass('wpdt-pagination-right');$(tableDescription.selector+'_wrapper').removeClass('wpdt-pagination-left');$(tableDescription.selector+'_wrapper').removeClass('wpdt-pagination-center');break;case "left":$(tableDescription.selector+'_wrapper').addClass('wpdt-pagination-left');$(tableDescription.selector+'_wrapper').removeClass('wpdt-pagination-right');$(tableDescription.selector+'_wrapper').removeClass('wpdt-pagination-center');break;case "center":$(tableDescription.selector+'_wrapper').addClass('wpdt-pagination-center');$(tableDescription.selector+'_wrapper').removeClass('wpdt-pagination-left');$(tableDescription.selector+'_wrapper').removeClass('wpdt-pagination-right');break;default:$(tableDescription.selector+'_wrapper').addClass('wpdt-pagination-right');$(tableDescription.selector+'_wrapper').removeClass('wpdt-pagination-left');$(tableDescription.selector+'_wrapper').removeClass('wpdt-pagination-center');break}}
if(tableDescription.pagination&&tableDescription.table_wcag){$(tableDescription.selector+'_paginate').addClass('wcag_paginate')}
if(tableDescription.table_wcag){$(tableDescription.selector+'_length label').attr('for',tableDescription.tableId+' length_menu');$(tableDescription.selector+'_length label').prepend('<span class="wpdt-c wpdt-visually-hidden">wpdatatables_frontend_strings.lenghtMenuWCAG</span>')
$(tableDescription.selector+'_filter input[type="search"]').attr('aria-label',wpdatatables_frontend_strings.globalSearchWCAG);$(tableDescription.selector+'_filter label').attr('for',tableDescription.tableId+' search');$(tableDescription.selector+'_filter label').prepend('<span class="wpdt-c wpdt-visually-hidden">wpdatatables_frontend_strings.searchTableWCAG</span>')}
if(tableDescription.tableSkin){$(tableDescription.selector+'_wrapper .dt-buttons .DTTT_button_export').on('click',function(){$('.dt-button-collection').addClass('wdt-skin-'+tableDescription.tableSkin)
if(tableDescription.table_wcag){$('.dt-button-collection.wdt-skin-'+tableDescription.tableSkin).attr('aria-label',wpdatatables_frontend_strings.chooseExportWCAG);$('.dt-button-collection.wdt-skin-'+tableDescription.tableSkin+' div').attr('role','listbox').attr('aria-label',wpdatatables_frontend_strings.chooseExportWCAG).removeAttr('aria-busy');$('.dt-button-collection .buttons-excel').attr('role','option').removeAttr('aria-controls').removeAttr('tabindex');$('.dt-button-collection .buttons-csv').attr('role','option').removeAttr('aria-controls').removeAttr('tabindex');$('.dt-button-collection .buttons-copy').attr('role','option').removeAttr('aria-controls').removeAttr('tabindex');$('.dt-button-collection .buttons-pdf').attr('role','option').removeAttr('aria-controls').removeAttr('tabindex')}});$(tableDescription.selector+'_wrapper .dt-buttons .DTTT_button_colvis').on('click',function(){$('.dt-button-collection').addClass('wdt-skin-'+tableDescription.tableSkin)
if(tableDescription.table_wcag){$('.dt-button-collection.wdt-skin-'+tableDescription.tableSkin).attr('aria-label',wpdatatables_frontend_strings.optionHideWCAG);$('.dt-button-collection.wdt-skin-'+tableDescription.tableSkin+' div').attr('role','listbox').attr('aria-label',wpdatatables_frontend_strings.optionHideWCAG).removeAttr('aria-busy');$('.dt-button-collection .buttons-columnVisibility').attr('role','option').removeAttr('aria-controls').removeAttr('tabindex')}});if(tableDescription.table_wcag){$(tableDescription.selector+'_wrapper .dt-buttons .dt-button.DTTT_button_colvis').attr('aria-label',wpdatatables_frontend_strings.columnVisibilityWCAG).attr('role','button');$(tableDescription.selector+'_wrapper .dt-buttons .dt-button.DTTT_button_spacer').attr('aria-label',wpdatatables_frontend_strings.spacerWCAG).attr('role','button');$(tableDescription.selector+'_wrapper .dt-buttons .dt-button.DTTT_button_print').attr('aria-label',wpdatatables_frontend_strings.printTableWCAG).attr('role','button');$(tableDescription.selector+'_wrapper .dt-buttons .dt-button.DTTT_button_export').attr('aria-label',wpdatatables_frontend_strings.exportTableWCAG).attr('role','button');$(tableDescription.selector+'_wrapper .dt-buttons .dt-button.DTTT_button_new').attr('aria-label',wpdatatables_frontend_strings.newEntryWCAG).attr('role','button');$(tableDescription.selector+'_wrapper .dt-buttons .dt-button.DTTT_button_delete').attr('aria-label',wpdatatables_frontend_strings.deleteRowWCAG).attr('role','button');$(tableDescription.selector+'_wrapper .dt-buttons .dt-button.DTTT_button_edit').attr('aria-label',wpdatatables_frontend_strings.editRowWCAG).attr('role','button');$(tableDescription.selector+'_wrapper .dt-buttons .dt-button.DTTT_button_duplicate').attr('aria-label',wpdatatables_frontend_strings.duplicateRowWCAG).attr('role','button');$(tableDescription.selector+'_wrapper .dt-buttons .dt-button.DTTT_button_clear_filters').attr('aria-label',wpdatatables_frontend_strings.clearFiltersWCAG).attr('role','button');if(tableDescription.masterDetail){$(tableDescription.selector+'_wrapper .dt-buttons .dt-button.master_detail').attr('aria-label',wpdatatables_frontend_strings.masterDetailWCAG).attr('role','button')}}}
if(tableDescription.showRowsPerPage){if(!(jQuery(tableDescription.selector+'_wrapper .dataTables_length .length_menu.bootstrap-select').length))
jQuery(tableDescription.selector+'_wrapper .dataTables_length .length_menu.wdt-selectpicker').selectpicker();if(tableDescription.table_wcag){jQuery(tableDescription.selector+'_length .dropdown-menu.open ul').attr('role','listbox');jQuery(tableDescription.selector+'_length .dropdown-menu.open').attr('aria-label',wpdatatables_frontend_strings.rowsPerPageWCAG).attr('aria-controls',tableDescription.tableId).attr('aria-expanded','false');jQuery(tableDescription.selector+'_length .dropdown-menu.open ul li').attr('role','option');jQuery(tableDescription.selector+'_length .dropdown-menu.open ul li a').removeAttr('tabindex').removeAttr('aria-selected').removeAttr('role');jQuery(tableDescription.selector+' .dataTables_length .dropdown-menu.open ul li').attr('role','list').attr('aria-required-parent','listbox');if(tableDescription.filterInForm){jQuery('.wpDataTableFilterSection .filter_column .dropdown-menu.open ul li').attr('role','option').attr('aria-required-parent','listbox')}}}
wpDataTables[tableDescription.tableId].fnSettings().aoDrawCallback.push({sName:'removePaginate',fn:function(oSettings){var api=oSettings.oInstance.api();if(typeof(api.page.info())!='undefined'){if(api.page.len()>=api.page.info().recordsDisplay||api.data().page.len()==-1){$('#'+tableDescription.tableId+'_paginate').hide()}else{$('#'+tableDescription.tableId+'_paginate').show()}}
if(tableDescription.table_wcag){this.fnSettings().oLanguage.oPaginate.sFirst=wpdatatables_frontend_strings.firstPageWCAG;this.fnSettings().oLanguage.oPaginate.sLast=wpdatatables_frontend_strings.lastPageWCAG;this.fnSettings().oLanguage.oPaginate.sNext=wpdatatables_frontend_strings.nextPageWCAG;this.fnSettings().oLanguage.oPaginate.sPrevious=wpdatatables_frontend_strings.previousPageWCAG;$(document).ready(function(){$('.paginate_button.first').attr('aria-label',wpdatatables_frontend_strings.firstPageWCAG).attr('role','link');$('.paginate_button.last').attr('aria-label',+wpdatatables_frontend_strings.lastPageWCAG).attr('role','link');$('.paginate_button.next').attr('aria-label',+wpdatatables_frontend_strings.nextPageWCAG).attr('role','link');$('.paginate_button.previous').attr('aria-label',+wpdatatables_frontend_strings.previousPageWCAG).attr('role','link');$('#'+tableDescription.tableId+'_paginate').find('span .paginate_button').each(function(index){$(this).attr('aria-label',wpdatatables_frontend_strings.pageWCAG+this.text).attr('role','link')})})}}});if(tableDescription.dataTableParams.fixedHeader||tableDescription.dataTableParams.fixedColumns||(tableDescription.hideBeforeLoad&&tableDescription.dataTableParams.fixedColumns)){wpDataTables[tableDescription.tableId].fnSettings().aoDrawCallback.push({sName:'addColumnFiltersFixedColumns',fn:function(oSettings){if(tableDescription.dataTableParams.fixedColumns&&tableDescription.filterInForm===!1){if(oSettings.oInstance.api().settings()[0]._fixedColumns!=undefined){oSettings.oInstance.api().fixedColumns().left(tableDescription.dataTableParams.fixedColumns.left);oSettings.oInstance.api().fixedColumns().right(tableDescription.dataTableParams.fixedColumns.right)}}
if(tableDescription.dataTableParams.fixedHeader){if(jQuery(tableDescription.selector).find('div.dtfh-floatingparent').length!=0){if(oSettings.oInstance.api().settings()[0]._fixedHeader!=undefined){oSettings.oInstance.api().fixedHeader.adjust()}}}}})}
wpDataTables[tableDescription.tableId].fnSettings().aoDrawCallback.push({sName:'addOutlineClass',fn:function(oSettings){if($.inArray(tableDescription.tableSkin,['raspberry-cream','mojito','dark-mojito'])!==-1){let columnPos=oSettings.aaSorting[0][0];let columnTitle=oSettings.aoColumns[columnPos].className.substring(oSettings.aoColumns[columnPos].className.indexOf("column-")+7,);let tableId=oSettings.sTableId;addOutlineBorder(tableId,columnTitle)}}});if(tableDescription.table_wcag){wpDataTables[tableDescription.tableId].fnSettings().aoDrawCallback.push({sName:'addFilteredValues',fn:function(oSettings){if(tableDescription.advancedFilterEnabled){var arrayofSearchedColumns=[];var numberOfSearchedColumn=0;var numberOfSearchedDateTimeColumn=0;var i=0;for(i=0;i<oSettings.aoPreSearchCols.length;i++){if(oSettings.aoPreSearchCols[i].sSearch!=''){arrayofSearchedColumns.push(i);numberOfSearchedColumn++}else if(($(oSettings.aoColumns[i].nTf).attr('data-value-to')!=undefined&&$(oSettings.aoColumns[i].nTf).attr('data-value-to')!='')||($(oSettings.aoColumns[i].nTf).attr('data-value-from')!=''&&$(oSettings.aoColumns[i].nTf).attr('data-value-from')!=undefined)){arrayofSearchedColumns.push(i);numberOfSearchedColumn++;numberOfSearchedDateTimeColumn++}else if($.inArray(tableDescription.advancedFilterOptions.aoColumns[i].type,['time-range','date-range','datetime-range'])!==-1&&tableDescription.advancedFilterOptions.aoColumns[i].defaultValue!==''){arrayofSearchedColumns.push(i);numberOfSearchedColumn++;numberOfSearchedDateTimeColumn++}else if(($('tr th.wpdt_using_wcag_filter span[data-index='+i+']').closest('th').attr('data-value-from')!=undefined&&$('tr th.wpdt_using_wcag_filter span[data-index='+i+']').closest('th').attr('data-value-from')!='')||($('tr th.wpdt_using_wcag_filter span[data-index='+i+']').closest('th').attr('data-value-to')!=''&&$('tr th.wpdt_using_wcag_filter span[data-index='+i+']').closest('th').attr('data-value-to')!=undefined)){arrayofSearchedColumns.push(i);numberOfSearchedColumn++;numberOfSearchedDateTimeColumn++}else if(($('div.wpDataTableFilterSection div span[data-index='+i+']').parent().attr('data-value-from')!=undefined&&$('div.wpDataTableFilterSection div span[data-index='+i+']').parent().attr('data-value-from')!='')||($('div.wpDataTableFilterSection div span[data-index='+i+']').parent().attr('data-value-to')!=''&&$('div.wpDataTableFilterSection div span[data-index='+i+']').parent().attr('data-value-to')!=undefined)){arrayofSearchedColumns.push(i);numberOfSearchedColumn++;numberOfSearchedDateTimeColumn++}}
oSettings.oLanguage.sInfo=wpdatatables_frontend_strings.sInfo;oSettings.oLanguage.sInfoEmpty=wpdatatables_frontend_strings.sInfoEmpty;if(tableDescription.globalSearch){if($('.dataTables_filter input[type="search"]').val()!=''){oSettings.oLanguage.sInfo=wpdatatables_frontend_strings.sInfoWCAG;oSettings.oLanguage.sInfoEmpty=wpdatatables_frontend_strings.sInfoEmptyWCAG;oSettings.oLanguage.sInfo=oSettings.oLanguage.sInfo.replace('_COLUMN_',wpdatatables_frontend_strings.forGloablWCAG);oSettings.oLanguage.sInfo=oSettings.oLanguage.sInfo.replace('_DATA_',$('.dataTables_filter input[type="search"]').val());oSettings.oLanguage.sInfoEmpty=oSettings.oLanguage.sInfoEmpty.replace('_COLUMN_',wpdatatables_frontend_strings.forGloablWCAG);oSettings.oLanguage.sInfoEmpty=oSettings.oLanguage.sInfoEmpty.replace('_DATA_',$('.dataTables_filter input[type="search"]').val())}}
if(tableDescription.renderFilter=="header"&&!tableDescription.filterInForm){addWCAGElementsForFilters(arrayofSearchedColumns,oSettings,this,numberOfSearchedColumn,'tr th.wpdt_using_wcag_filter span')}else if(tableDescription.renderFilter=="footer"&&!tableDescription.filterInForm){addWCAGElementsForFilters(arrayofSearchedColumns,oSettings,this,numberOfSearchedColumn,'')}else if(tableDescription.filterInForm){addWCAGElementsForFilters(arrayofSearchedColumns,oSettings,this,numberOfSearchedColumn,'div.wpDataTableFilterSection div span')}
$(tableDescription.selector+' .filter_column .wdt-select-filter .length_menu.open ul li').attr('role','list').attr('aria-required-parent','listbox');$(tableDescription.selector+' .dataTables_length .dropdown-menu.open ul li').attr('role','list').attr('aria-required-parent','listbox')}else if(tableDescription.globalSearch){oSettings.oLanguage.sInfo=wpdatatables_frontend_strings.sInfo;oSettings.oLanguage.sInfoEmpty=wpdatatables_frontend_strings.sInfoEmpty;if($('.dataTables_filter input[type="search"]').val()!=''){oSettings.oLanguage.sInfo=wpdatatables_frontend_strings.sInfoWCAG;oSettings.oLanguage.sInfoEmpty=wpdatatables_frontend_strings.sInfoEmptyWCAG;oSettings.oLanguage.sInfo=oSettings.oLanguage.sInfo.replace('_COLUMN_',wpdatatables_frontend_strings.forGloablWCAG);oSettings.oLanguage.sInfo=oSettings.oLanguage.sInfo.replace('_DATA_',$('.dataTables_filter input[type="search"]').val());oSettings.oLanguage.sInfoEmpty=oSettings.oLanguage.sInfoEmpty.replace('_COLUMN_',wpdatatables_frontend_strings.forGloablWCAG);oSettings.oLanguage.sInfoEmpty=oSettings.oLanguage.sInfoEmpty.replace('_DATA_',$('.dataTables_filter input[type="search"]').val())}}}})}
function addWCAGElementsForFilters(arrayofSearchedColumns,oSettings,thisTable,numberOfSearchedColumn,selector1){var selector;if(arrayofSearchedColumns.length>0){oSettings.oLanguage.sInfo=wpdatatables_frontend_strings.sInfoWCAG;oSettings.oLanguage.sInfoEmpty=wpdatatables_frontend_strings.sInfoEmptyWCAG;if(numberOfSearchedColumn=>1){for(var i=0;i<numberOfSearchedColumn;i++){if(tableDescription.renderFilter=="header"&&!tableDescription.filterInForm){selector=getElementDataValueTH(selector1+'[data-index='+arrayofSearchedColumns[i]+']')}else if(tableDescription.filterInForm){selector=getElementDataValueParent(selector1+'[data-index='+arrayofSearchedColumns[i]+']')}else if(tableDescription.renderFilter=="footer"&&!tableDescription.filterInForm){selector=$(oSettings.aoColumns[arrayofSearchedColumns[i]].nTf)}
if(i==0){oSettings.oLanguage.sInfo=oSettings.oLanguage.sInfo.replace('_COLUMN_',wpdatatables_frontend_strings.forWCAG+thisTable.fnSettings().aoColumns[arrayofSearchedColumns[0]].sTitle+wpdatatables_frontend_strings.columnSearchWCAG);oSettings.oLanguage.sInfo=oSettings.oLanguage.sInfo.replace('_DATA_',selector.attr('data-value-to')==undefined&&selector.attr('data-value-from')==undefined?thisTable.fnSettings().aoPreSearchCols[arrayofSearchedColumns[0]].sSearch+' ':($.inArray(selector.attr('data-value-from'),['',undefined])===-1?wpdatatables_frontend_strings.valueFromWCAG+selector.attr('data-value-from'):'')+($.inArray(selector.attr('data-value-to'),['',undefined])===-1?wpdatatables_frontend_strings.valueToWCAG+selector.attr('data-value-to'):'')+' ');oSettings.oLanguage.sInfoEmpty=oSettings.oLanguage.sInfoEmpty.replace('_COLUMN_',wpdatatables_frontend_strings.forWCAG+thisTable.fnSettings().aoColumns[arrayofSearchedColumns[0]].sTitle+wpdatatables_frontend_strings.columnSearchWCAG);oSettings.oLanguage.sInfoEmpty=oSettings.oLanguage.sInfoEmpty.replace('_DATA_',selector.attr('data-value-to')==undefined&&selector.attr('data-value-from')==undefined?thisTable.fnSettings().aoPreSearchCols[arrayofSearchedColumns[0]].sSearch+' ':($.inArray(selector.attr('data-value-from'),['',undefined])===-1?wpdatatables_frontend_strings.valueFromWCAG+selector.attr('data-value-from'):'')+($.inArray(selector.attr('data-value-to'),['',undefined])===-1?wpdatatables_frontend_strings.valueToWCAG+selector.attr('data-value-to'):'')+' ')}else{oSettings.oLanguage.sInfo+=wpdatatables_frontend_strings.andforWCAG+thisTable.fnSettings().aoColumns[arrayofSearchedColumns[i]].sTitle+wpdatatables_frontend_strings.columnSearchWCAG;oSettings.oLanguage.sInfo+=selector.attr('data-value-to')==undefined&&selector.attr('data-value-from')==undefined?thisTable.fnSettings().aoPreSearchCols[arrayofSearchedColumns[i]].sSearch+' ':($.inArray(selector.attr('data-value-from'),['',undefined])===-1?wpdatatables_frontend_strings.valueFromWCAG+selector.attr('data-value-from'):'')+($.inArray(selector.attr('data-value-to'),['',undefined])===-1?wpdatatables_frontend_strings.valueToWCAG+selector.attr('data-value-to'):'')+' ';oSettings.oLanguage.sInfoEmpty+=wpdatatables_frontend_strings.andforWCAG+thisTable.fnSettings().aoColumns[arrayofSearchedColumns[i]].sTitle+wpdatatables_frontend_strings.columnSearchWCAG;oSettings.oLanguage.sInfoEmpty+=selector.attr('data-value-to')==undefined&&selector.attr('data-value-from')==undefined?thisTable.fnSettings().aoPreSearchCols[arrayofSearchedColumns[i]].sSearch+' ':($.inArray(selector.attr('data-value-from'),['',undefined])===-1?wpdatatables_frontend_strings.valueFromWCAG+selector.attr('data-value-from'):'')+($.inArray(selector.attr('data-value-to'),['',undefined])===-1?wpdatatables_frontend_strings.valueToWCAG+selector.attr('data-value-to'):'')+' '}}
if($('.dataTables_filter input[type="search"]').val()!=''){oSettings.oLanguage.sInfo+=wpdatatables_frontend_strings.andforGloablWCAG+$('.dataTables_filter input[type="search"]').val();oSettings.oLanguage.sInfoEmpty+=wpdatatables_frontend_strings.andforGloablWCAG+$('.dataTables_filter input[type="search"]').val()}}}}
function getElementDataValueTH(selector){var closestElement=$(selector).closest('th');return closestElement}
function getElementDataValueParent(selector){var closestElement=$(selector).parent();return closestElement}
function addOutlineBorder(tableId,columnTitle){if(columnTitle.indexOf(' ')!==-1){columnTitle=columnTitle.substring(0,columnTitle.indexOf(' '))}
let colgroupList=document.getElementById("colgrup-"+tableId);colgroupList.replaceChildren();let visibleColumns=document.getElementById(tableId).tHead.getElementsByClassName('wdtheader');let fixedTable=document.getElementById(tableId);for(column of visibleColumns){let newCol=document.createElement('col');let colTitle=column.className.substring(column.className.indexOf("column-")+7,);colTitle=colTitle.substring(0,colTitle.indexOf(' '));newCol.setAttribute('id',tableId+'-column-'+colTitle+'-col');colgroupList.append(newCol)}
$('#'+tableId+'-column-'+columnTitle+'-col').addClass('outlined');let indexColOutlined=$('#'+tableId+'-column-'+columnTitle+'-col').index()+1;jQuery(fixedTable).find('th:not(.wdtheader)').removeClass('outlined');jQuery(fixedTable).find('tfoot tr td').removeClass('outlined');if(tableDescription.dataTableParams.fixedHeader.header||tableDescription.dataTableParams.fixedColumns){jQuery(fixedTable).find('th:not(.wdtheader):nth-child('+indexColOutlined+')').addClass('outlined');$('tfoot tr td.column-'+columnTitle).addClass('outlined')}}
function hideLabelShowXEntries(tableId){let showEntriesText=$('#'+tableId+'_length')[0].firstChild;showEntriesText.removeChild(showEntriesText.firstChild);showEntriesText.removeChild(showEntriesText.lastChild)}
function cubeLoaderMojito(tableId){let cubesAnimation='<div class="wdt_cubes">';for(let i=1;i<=9;i++){cubesAnimation+='<div class="wdt_cube wdt_cube-'+i+'"></div>'}
cubesAnimation+=' </div>';$('#'+tableId).append(cubesAnimation)}
if(tableDescription.serverSide){if(parseInt(tableDescription.autoRefreshInterval)>0){autoRefresh=setInterval(function(){wpDataTables[tableDescription.tableId].fnDraw(!1)},parseInt(tableDescription.autoRefreshInterval)*1000)}else{if(typeof autoRefresh!=="undefined"){clearInterval(autoRefresh)}}}
wpDataTables[tableDescription.tableId].addOnDrawCallback=function(callback){if(typeof callback!=='function'){return}
var index=wpDataTables[tableDescription.tableId].fnSettings().aoDrawCallback.length+1;wpDataTables[tableDescription.tableId].fnSettings().aoDrawCallback.push({sName:'user_callback_'+index,fn:callback})};if(tableDescription.hasSumColumns||tableDescription.hasAvgColumns||tableDescription.hasMinColumns||tableDescription.hasMaxColumns||$('.wdt-column-sum').length||$('.wdt-column-avg').length||$('.wdt-column-min').length||$('.wdt-column-max').length){var sumLabel=tableDescription.sumFunctionsLabel?tableDescription.sumFunctionsLabel:'&#8721; = ';var avgLabel=tableDescription.avgFunctionsLabel?tableDescription.avgFunctionsLabel:'Avg = ';var minLabel=tableDescription.minFunctionsLabel?tableDescription.minFunctionsLabel:'Min = ';var maxLabel=tableDescription.maxFunctionsLabel?tableDescription.maxFunctionsLabel:'Max = ';if(tableDescription.serverSide){wpDataTables[tableDescription.tableId].fnSettings().aoDrawCallback.push({sName:'updateFooterFunctions',fn:function(oSettings){var api=oSettings.oInstance.api();for(var columnName in api.ajax.json().sumFooterColumns){if(tableDescription.hasSumColumns){$('#'+tableDescription.tableId+' tfoot tr.wdt-sum-row td.wdt-sum-cell[data-column_header="'+columnName+'"]').html(sumLabel+' '+api.ajax.json().sumColumnsValues[columnName])}}
for(columnName in api.ajax.json().avgFooterColumns){if(tableDescription.hasAvgColumns){$('#'+tableDescription.tableId+' tfoot tr.wdt-avg-row td.wdt-avg-cell[data-column_header="'+columnName+'"]').html(avgLabel+' '+api.ajax.json().avgColumnsValues[columnName])}}
for(columnName in api.ajax.json().minFooterColumns){if(tableDescription.hasMinColumns){$('#'+tableDescription.tableId+' tfoot tr.wdt-min-row td.wdt-min-cell[data-column_header="'+columnName+'"]').html(minLabel+' '+api.ajax.json().minColumnsValues[columnName])}}
for(columnName in api.ajax.json().maxFooterColumns){if(tableDescription.hasMaxColumns){$('#'+tableDescription.tableId+' tfoot tr.wdt-max-row td.wdt-max-cell[data-column_header="'+columnName+'"]').html(maxLabel+' '+api.ajax.json().maxColumnsValues[columnName])}}
if($('.wdt-column-sum').length){$('.wdt-column-sum[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){$(this).find('.wdt-column-sum-value').text(api.ajax.json().sumColumnsValues[$(this).data('column-orig-header')])})}
if($('.wdt-column-avg').length){$('.wdt-column-avg[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){$(this).find('.wdt-column-avg-value').text(api.ajax.json().avgColumnsValues[$(this).data('column-orig-header')])})}
if($('.wdt-column-min').length){$('.wdt-column-min[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){$(this).find('.wdt-column-min-value').text(api.ajax.json().minColumnsValues[$(this).data('column-orig-header')])})}
if($('.wdt-column-max').length){$('.wdt-column-max[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){$(this).find('.wdt-column-max-value').text(api.ajax.json().maxColumnsValues[$(this).data('column-orig-header')])})}}})}else{wpDataTables[tableDescription.tableId].fnSettings().aoDrawCallback.push({sName:'updateFooterFunctions',fn:function(oSettings){var api=oSettings.oInstance.api();var thousandsSeparator=tableDescription.number_format==1?'.':',';var decimalSeparator=tableDescription.number_format==1?',':'.';for(var i in tableDescription.sumAvgColumns){var columnData=api.column(tableDescription.sumAvgColumns[i]+':name',{search:'applied'}).data().filter(function(el){return el!==''});var columnType=oSettings.aoColumns[api.column(tableDescription.sumAvgColumns[i]+':name').index()].wdtType;var sum=wdtCalculateColumnSum(columnData,thousandsSeparator);var nonNullLength=columnData.length;var sumStr=wdtFormatNumberByColumnType(parseFloat(sum),columnType,tableDescription.columnsDecimalPlaces[tableDescription.sumAvgColumns[i]],tableDescription.decimalPlaces,decimalSeparator,thousandsSeparator);if(_.contains(tableDescription.sumColumns,tableDescription.sumAvgColumns[i])){$('#'+tableDescription.tableId+' tfoot tr.wdt-sum-row td.wdt-sum-cell[data-column_header="'+tableDescription.sumAvgColumns[i]+'"]').html(sumLabel+' '+sumStr)}
if(_.contains(tableDescription.avgColumns,tableDescription.sumAvgColumns[i])){var avg=sum/nonNullLength;var avgStr=wdtFormatNumberByColumnType(avg,'float',tableDescription.columnsDecimalPlaces[tableDescription.sumAvgColumns[i]],tableDescription.decimalPlaces,decimalSeparator,thousandsSeparator);$('#'+tableDescription.tableId+' tfoot tr.wdt-avg-row td.wdt-avg-cell[data-column_header="'+tableDescription.sumAvgColumns[i]+'"]').html(avgLabel+' '+avgStr)}}
for(i in tableDescription.minColumns){columnData=api.column(tableDescription.minColumns[i]+':name',{search:'applied'}).data().filter(function(el){return el!==''});columnType=oSettings.aoColumns[api.column(tableDescription.minColumns[i]+':name').index()].wdtType;var min=wdtCalculateColumnMin(columnData,thousandsSeparator);var minStr=wdtFormatNumberByColumnType(parseFloat(min),columnType,tableDescription.columnsDecimalPlaces[tableDescription.minColumns[i]],tableDescription.decimalPlaces,decimalSeparator,thousandsSeparator);$('#'+tableDescription.tableId+' tfoot tr.wdt-min-row td.wdt-min-cell[data-column_header="'+tableDescription.minColumns[i]+'"]').html(minLabel+' '+minStr)}
for(i in tableDescription.maxColumns){columnData=api.column(tableDescription.maxColumns[i]+':name',{search:'applied'}).data().filter(function(el){return el!==''});columnType=oSettings.aoColumns[api.column(tableDescription.maxColumns[i]+':name').index()].wdtType;var max=wdtCalculateColumnMax(columnData,thousandsSeparator);var maxStr=wdtFormatNumberByColumnType(parseFloat(max),columnType,tableDescription.columnsDecimalPlaces[tableDescription.maxColumns[i]],tableDescription.decimalPlaces,decimalSeparator,thousandsSeparator);$('#'+tableDescription.tableId+' tfoot tr.wdt-max-row td.wdt-max-cell[data-column_header="'+tableDescription.maxColumns[i]+'"]').html(maxLabel+' '+maxStr)}
if($('.wdt-column-sum').length){$('.wdt-column-sum[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){var columnData=api.column($(this).data('column-orig-header')+':name',{search:'applied'}).data().filter(function(el){return el!==''});var columnType=oSettings.aoColumns[api.column($(this).data('column-orig-header')+':name').index()].wdtType;var sum=wdtCalculateColumnSum(columnData,thousandsSeparator);var sumStr=wdtFormatNumberByColumnType(parseFloat(sum),columnType,tableDescription.columnsDecimalPlaces[$(this).data('column-orig-header')],tableDescription.decimalPlaces,decimalSeparator,thousandsSeparator);$(this).find('.wdt-column-sum-value').text(sumStr)})}
if($('.wdt-column-avg').length){$('.wdt-column-avg[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){var columnData=api.column($(this).data('column-orig-header')+':name',{search:'applied'}).data().filter(function(el){return el!==''});var avg=wdtCalculateColumnSum(columnData,thousandsSeparator)/api.page.info().recordsDisplay;var avgStr=wdtFormatNumberByColumnType(parseFloat(avg),'float',tableDescription.columnsDecimalPlaces[$(this).data('column-orig-header')],tableDescription.decimalPlaces,decimalSeparator,thousandsSeparator);$(this).find('.wdt-column-avg-value').text(avgStr)})}
if($('.wdt-column-min').length){$('.wdt-column-min[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){var columnData=api.column($(this).data('column-orig-header')+':name',{search:'applied'}).data().filter(function(el){return el!==''});var columnType=oSettings.aoColumns[api.column($(this).data('column-orig-header')+':name').index()].wdtType;var min=wdtCalculateColumnMin(columnData,thousandsSeparator);var minStr=wdtFormatNumberByColumnType(parseFloat(min),columnType,tableDescription.columnsDecimalPlaces[$(this).data('column-orig-header')],tableDescription.decimalPlaces,decimalSeparator,thousandsSeparator);$(this).find('.wdt-column-min-value').text(minStr)})}
if($('.wdt-column-max').length){$('.wdt-column-max[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){var columnData=api.column($(this).data('column-orig-header')+':name',{search:'applied'}).data().filter(function(el){return el!==''});var columnType=oSettings.aoColumns[api.column($(this).data('column-orig-header')+':name').index()].wdtType;var max=wdtCalculateColumnMax(columnData,thousandsSeparator);var maxStr=wdtFormatNumberByColumnType(parseFloat(max),columnType,tableDescription.columnsDecimalPlaces[$(this).data('column-orig-header')],tableDescription.decimalPlaces,decimalSeparator,thousandsSeparator);$(this).find('.wdt-column-max-value').text(maxStr)})}}})}}
if(tableDescription.conditional_formatting_columns){wpDataTables[tableDescription.tableId].fnSettings().aoDrawCallback.push({sName:'updateConditionalFormatting',fn:function(oSettings){for(var i=0;i<tableDescription.conditional_formatting_columns.length;i++){var params={};var column=oSettings.oInstance.api().column(tableDescription.conditional_formatting_columns[i]+':name',{search:'applied'});var conditionalFormattingRules=oSettings.aoColumns[column.index()].conditionalFormattingRules;params.columnType=oSettings.aoColumns[column.index()].wdtType;params.thousandsSeparator=tableDescription.number_format==1?'.':',';params.decimalSeparator=tableDescription.number_format==1?',':'.';params.dateFormat=tableDescription.datepickFormat;params.momentDateFormat=params.dateFormat.replace('dd','DD').replace('M','MMM').replace('mm','MM').replace('yy','YYYY').replace('y','YY');params.momentTimeFormat=tableDescription.timeFormat.replace('H','H').replace('i','mm');for(var j in conditionalFormattingRules){var nodes=column.nodes();column.nodes().to$().each(function(){wdtCheckConditionalFormatting(conditionalFormattingRules[j],params,$(this))})}}}});if(!tableDescription.serverSide){wpDataTables[tableDescription.tableId].fnDraw()}}
if(tableDescription.transform_value_columns){wpDataTables[tableDescription.tableId].fnSettings().aoDrawCallback.push({sName:'updateTransformColumnValue',fn:function(oSettings){var columnNamesArray=[];for(var k=0;k<oSettings.aoColumns.length;k++){var columnName=oSettings.aoColumns[k].name;columnNamesArray.push(columnName)}
for(var i=0;i<tableDescription.transform_value_columns.length;i++){var params={};var column=oSettings.oInstance.api().column(tableDescription.transform_value_columns[i]+':name',{search:'applied'});var transformValueRules={};var position=0;var checkPosition=!1;var checkPositionFilter=!1;var checkPositionFilterHelper=!1;transformValueRules[0]=oSettings.aoColumns[column.index()].transformValueRules;for(var k=0;k<oSettings.aoColumns.length;k++){var col=oSettings.oInstance.api().column(oSettings.aoColumns[k].name+':name',{search:'applied'});var nodes=column.nodes();if(!tableDescription.serverSide&&oSettings.aiDisplay.length>=oSettings._iDisplayLength&&!tableDescription.groupingEnabled){position=parseInt($(tableDescription.selector+' tbody tr')[0].attributes[1].value)===undefined?0:oSettings.aiDisplayMaster.indexOf(parseInt($(tableDescription.selector+' tbody tr')[0].attributes[1].value));checkPosition=!0}
if(oSettings.aaSorting[0][1]==='desc'&&transformValueRules[0].includes('{'+oSettings.aoColumns[oSettings.aaSorting[0][0]].name+'.value}')&&checkPosition&&!tableDescription.serverSide){if(position+1===oSettings.aiDisplay.length){position=0}};column.nodes().to$().each(function(){if(transformValueRules[0].includes('{'+oSettings.aoColumns[k].name+'.value}')){for(var m=0;m<col.data().length;m++){if(tableDescription.serverSide){position=m}
if(position>=oSettings.aiDisplay.length){position=m}
if(!tableDescription.serverSide&&m===0&&position>oSettings.aiDisplay.length){position=m;checkPositionFilter=!1}
for(var n=0;n<oSettings.aoColumns.length;n++){if(oSettings.aoPreSearchCols[n].sSearch!=''){checkPositionFilterHelper=!0}}
if(!tableDescription.serverSide&&checkPositionFilterHelper&&!checkPositionFilter){position=m;if(oSettings._iDisplayLength-$(tableDescription.selector+' tbody tr').length!=0){position=oSettings.aiDisplay.length-$(tableDescription.selector+' tbody tr').length;checkPositionFilter=!0}else{position=oSettings._iDisplayStart;checkPositionFilter=!0}}
if(m!=0){if(transformValueRules[m+1]!=null){wdtTransformValue(transformValueRules[m+1].replaceAll(new RegExp('\\b'+col.data()[position-1]+'\\b','g'),col.data()[position]===null?'':col.data()[position]),params,$(this),m,oSettings.sTableId);transformValueRules[m+1]=transformValueRules[m+1].replaceAll('{'+oSettings.aoColumns[k].name+'.value}',col.data()[position]===null?'':col.data()[position])}else{wdtTransformValue(transformValueRules[m].replaceAll(new RegExp('\\b'+col.data()[position-1]+'\\b','g'),col.data()[position]===null?'':col.data()[position]),params,$(this),m,oSettings.sTableId);transformValueRules[m+1]=transformValueRules[m].replaceAll(col.data()[position-1],col.data()[position]===null?'':col.data()[position])}}else{if(transformValueRules[m+1]!=null){wdtTransformValue(transformValueRules[m+1].replaceAll('{'+oSettings.aoColumns[k].name+'.value}',col.data()[position]===null?'':col.data()[position]),params,$(this),m,oSettings.sTableId);transformValueRules[m+1]=transformValueRules[m+1].replaceAll('{'+oSettings.aoColumns[k].name+'.value}',col.data()[position]===null?'':col.data()[position])}else{wdtTransformValue(transformValueRules[m].replaceAll('{'+oSettings.aoColumns[k].name+'.value}',col.data()[position]===null?'':col.data()[position]),params,$(this),m,oSettings.sTableId);transformValueRules[m+1]=transformValueRules[m].replaceAll('{'+oSettings.aoColumns[k].name+'.value}',col.data()[position]===null?'':col.data()[position])}}
position++}}})}}}});if(!tableDescription.serverSide){wpDataTables[tableDescription.tableId].fnDraw()}}
wpDataTables[tableDescription.tableId].checkSelectedLimits=function(){if(wpDataTablesUpdatingFlags[tableDescription.tableId]){return}
var sel_row_index=$(tableDescription.selector+' > tbody > tr.selected').index();if(sel_row_index+wpDataTables[tableDescription.tableId].fnSettings()._iDisplayStart==wpDataTables[tableDescription.tableId].fnSettings()._iRecordsDisplay-1){$(tableDescription.selector+'_next_edit_dialog').prop('disabled',!0)}else{$(tableDescription.selector+'_next_edit_dialog').prop('disabled',!1)}
if((sel_row_index==0&&wpDataTables[tableDescription.tableId].fnSettings()._iDisplayStart==0)||wpDataTables[tableDescription.tableId].fnSettings()._iRecordsDisplay==0){$(tableDescription.selector+'_prev_edit_dialog').prop('disabled',!0)}else{$(tableDescription.selector+'_prev_edit_dialog').prop('disabled',!1)}};if(tableDescription.groupingEnabled){wpDataTables[tableDescription.tableId].rowGrouping({iGroupingColumnIndex:tableDescription.groupingColumnIndex})}
if(tableDescription.advancedFilterEnabled){$('#'+tableDescription.tableId).dataTable().columnFilter(tableDescription.advancedFilterOptions);for(var i in wpDataTablesHooks.onRenderFilter){if(!isNaN(i))
wpDataTablesHooks.onRenderFilter[i](tableDescription);}}
$(document).on('click','.wpdt-c .dt-button-collection .buttons-columnVisibility',function(e){$('#'+tableDescription.tableId).dataTable().columnFilter(tableDescription.advancedFilterOptions)});if(tableDescription.editable){$(document).on('click',tableDescription.selector+'_prev_edit_dialog',function(e){e.preventDefault();e.stopImmediatePropagation();var sel_row_index=$(tableDescription.selector+' > tbody > tr.selected').index();if(sel_row_index>0){$(tableDescription.selector+' > tbody > tr.selected').removeClass('selected');$(tableDescription.selector+' > tbody > tr:eq('+(sel_row_index-1)+')').addClass('selected',300);wpDataTablesSelRows[tableDescription.tableId]=wpDataTables[tableDescription.tableId].fnGetPosition($(tableDescription.selector+' > tbody > tr.selected').get(0));var data=wpDataTables[tableDescription.tableId].fnGetData(wpDataTablesSelRows[tableDescription.tableId]);wpDataTablesFunctions[tableDescription.tableId].applyData(data)}else{var cur_page=Math.ceil(wpDataTables[tableDescription.tableId].fnSettings()._iDisplayStart/wpDataTables[tableDescription.tableId].fnSettings()._iDisplayLength)+1;if(cur_page==1)
return;wpDataTablesSelRows[tableDescription.tableId]=-2;wpDataTablesUpdatingFlags[tableDescription.tableId]=!0;wpDataTables[tableDescription.tableId].fnPageChange('previous')}
wpDataTables[tableDescription.tableId].checkSelectedLimits()});$(document).on('click',tableDescription.selector+'_next_edit_dialog',function(e){e.preventDefault();e.stopImmediatePropagation();if(wpDataTables[tableDescription.tableId].fnSettings()._iDisplayLength==-1){wpDataTables[tableDescription.tableId].fnSettings()._iDisplayLength=wpDataTables[tableDescription.tableId].fnSettings()._iRecordsTotal}
var sel_row_index=$(tableDescription.selector+' > tbody > tr.selected').index();if(sel_row_index<wpDataTables[tableDescription.tableId].fnSettings()._iDisplayLength-1){$(tableDescription.selector+' > tbody > tr.selected').removeClass('selected');$(tableDescription.selector+' > tbody > tr:eq('+(sel_row_index+1)+')').addClass('selected',300);wpDataTablesSelRows[tableDescription.tableId]=wpDataTables[tableDescription.tableId].fnGetPosition($(tableDescription.selector+' > tbody > tr.selected').get(0));var data=wpDataTables[tableDescription.tableId].fnGetData(wpDataTablesSelRows[tableDescription.tableId]);wpDataTablesFunctions[tableDescription.tableId].applyData(data)}else{var cur_page=Math.ceil(wpDataTables[tableDescription.tableId].fnSettings()._iDisplayStart/wpDataTables[tableDescription.tableId].fnSettings()._iDisplayLength)+1;var total_pages=Math.ceil(wpDataTables[tableDescription.tableId].fnSettings()._iRecordsTotal/wpDataTables[tableDescription.tableId].fnSettings()._iDisplayLength);if(cur_page==total_pages)
return;wpDataTablesSelRows[tableDescription.tableId]=-3;wpDataTablesUpdatingFlags[tableDescription.tableId]=!0;wpDataTables[tableDescription.tableId].fnPageChange('next');wpDataTables[tableDescription.tableId].fnDraw(!1)}
wpDataTables[tableDescription.tableId].checkSelectedLimits()});$(document).on('click',tableDescription.selector+'_apply_edit_dialog',function(e){e.preventDefault();e.stopImmediatePropagation();e.preventDefault();wpDataTablesFunctions[tableDescription.tableId].saveTableData(!0,!1,!1)});$(document).on('click',tableDescription.selector+'_apply_duplicate_dialog',function(e){e.preventDefault();e.stopImmediatePropagation();e.preventDefault();wpDataTablesFunctions[tableDescription.tableId].saveTableData(!0,!1,!0)});$(document).on('click',tableDescription.selector+'_ok_edit_dialog',function(e){e.preventDefault();e.stopImmediatePropagation();e.preventDefault();if($(tableDescription.selector+'_edit_dialog_buttons').find('.wdt-apply-duplicate-button').hasClass('hidden')||$(tableDescription.selector+'_edit_dialog_buttons').find('.wdt-apply-duplicate-button').length==0){wpDataTablesFunctions[tableDescription.tableId].saveTableData(!0,!0,!1)}else{wpDataTablesFunctions[tableDescription.tableId].saveTableData(!0,!0,!0)}});$(document).on('keyup',tableDescription.selector+'_edit_dialog input',function(e){if(e.which==13){$(tableDescription.selector+'_ok_edit_dialog').click()}});$(tableDescription.selector+'_edit_dialog input.wdt-maskmoney[data-column_type="float"]').each(function(i){var decimalPlaces=tableDescription.columnsDecimalPlaces[$(this).data('key')]!=-1?tableDescription.columnsDecimalPlaces[$(this).data('key')]:parseInt(tableDescription.decimalPlaces);$(this).maskMoney({thousands:tableDescription.number_format==1?'.':',',decimal:tableDescription.number_format==1?',':'.',precision:decimalPlaces,allowNegative:!0,allowEmpty:!0,allowZero:!0})});$(tableDescription.selector+'_edit_dialog input.wdt-maskmoney[data-column_type="int"]').each(function(i){var thousandsSeparator=tableDescription.number_format==1?'.':',';if(tableDescription.columnsThousandsSeparator[$(this).data('key')]==0){thousandsSeparator=''}
$(this).maskMoney({thousands:thousandsSeparator,precision:0,allowNegative:!0,allowEmpty:!0,allowZero:!0})});var fileUploadInit=function(selector){if($('.fileupload-'+selector).length){var attachment=null;wdtCustomUploader=wp.media({title:wpdatatables_frontend_strings.select_upload_file,button:{text:wpdatatables_frontend_strings.choose_file},multiple:!1});$('span.fileupload-'+selector).click(function(e){e.preventDefault();var $button=$(this);var $relInput=$('#'+$button.data('rel_input'));$(document).off('focusin.modal');wdtCustomUploader=wp.media({title:wpdatatables_frontend_strings.select_upload_file,button:{text:wpdatatables_frontend_strings.choose_file},multiple:!1,library:{type:$button.data('column_type')=='icon'?'image':''}});if($button.data('column_type')=='icon'){wdtCustomUploader.off('select').on('select',function(){attachment=wdtCustomUploader.state().get('selection').first().toJSON();var val=attachment.url;$relInput.parent().parent().parent().find('.fileinput-preview').html('<img src='+val+'>');$relInput.parent().parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');$relInput.parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');if(attachment.sizes.thumbnail){val=attachment.sizes.thumbnail.url+'||'+val}
$relInput.val(val)})}else{wdtCustomUploader.off('select').on('select',function(){var attachment=wdtCustomUploader.state().get('selection').first().toJSON();$relInput.val(attachment.url);$relInput.parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');$relInput.parent().parent().find('.fileinput-filename').text(attachment.filename)})}
wdtCustomUploader.open()})}};fileUploadInit(tableDescription.tableId);$('.edit_table[aria-controls="'+tableDescription.tableId+'"]').click(function(){var modal=$('#wdt-frontend-modal');var newSkins=['dark','aqua','purple'];if($(this).hasClass('disabled'))
return!1;$('.wpDataTablesPopover.editTools').hide();modal.addClass('wdt-skin-'+tableDescription.tableSkin);if(tableDescription.table_wcag){modal.addClass('wpTableWCAG')}
modal.find('.modal-title').html(wpdatatables_frontend_strings.edit_entry);modal.find('.modal-body').html('');modal.find('.modal-footer').html('');var row=$(tableDescription.selector+' tr.selected').get(0);if(tableDescription.responsive==1&&$(row).hasClass('row-detail')){row=$(tableDescription.selector+' tr.selected').prev('.detail-show').get(0)}
if(['manual','mysql'].indexOf(tableDescription.tableType)===-1){if(typeof wpDataTablesEditors[tableDescription.tableType].edit=='function'){if(singleClick===!1){singleClick=!0;wpDataTablesEditors[tableDescription.tableType].edit(tableDescription,!1)}}}else{var data=wpDataTables[tableDescription.tableId].fnGetData(row);wpDataTablesFunctions[tableDescription.tableId].applyData(data);wpDataTables[tableDescription.tableId].checkSelectedLimits();modal.find('.modal-body').append($(tableDescription.selector+'_edit_dialog').show());modal.find('.modal-footer').append($(tableDescription.selector+'_edit_dialog_buttons').show());if(newSkins.includes(tableDescription.tableSkin)){modal.find(tableDescription.selector+'_prev_edit_dialog i').addClass('wpdt-icon-chevron-left');modal.find(tableDescription.selector+'_prev_edit_dialog i').removeClass('wpdt-icon-step-backward');modal.find(tableDescription.selector+'_next_edit_dialog i').addClass('wpdt-icon-chevron-right');modal.find(tableDescription.selector+'_next_edit_dialog i').removeClass('wpdt-icon-step-forward');modal.find(tableDescription.selector+'_apply_edit_dialog i').addClass('wpdt-icon-check-circle-full');modal.find(tableDescription.selector+'_apply_edit_dialog i').removeClass('wpdt-icon-check');modal.find(tableDescription.selector+'_ok_edit_dialog i').addClass('wpdt-icon-check-circle');modal.find(tableDescription.selector+'_ok_edit_dialog i').removeClass('wpdt-icon-check-double-reg')}else{modal.find(tableDescription.selector+'_prev_edit_dialog i').removeClass('wpdt-icon-chevron-left');modal.find(tableDescription.selector+'_prev_edit_dialog i').addClass('wpdt-icon-step-backward');modal.find(tableDescription.selector+'_next_edit_dialog i').removeClass('wpdt-icon-chevron-right');modal.find(tableDescription.selector+'_next_edit_dialog i').addClass('wpdt-icon-step-forward');modal.find(tableDescription.selector+'_apply_edit_dialog i').removeClass('wpdt-icon-check-circle-full');modal.find(tableDescription.selector+'_apply_edit_dialog i').addClass('wpdt-icon-check');modal.find(tableDescription.selector+'_ok_edit_dialog i').removeClass('wpdt-icon-check-circle');modal.find(tableDescription.selector+'_ok_edit_dialog i').addClass('wpdt-icon-check-double-reg')}
$('#wdt-frontend-modal .editDialogInput').each(function(index){if($(this).data('input_type')=='mce-editor'){if($(this).siblings().length){tinymce.execCommand('mceRemoveEditor',!0,$(this).attr('id'))}
tinymce.init({selector:'#'+$(this).attr('id'),menubar:!1,plugins:'link image media lists hr colorpicker fullscreen textcolor code',toolbar:'undo redo formatselect bold italic underline strikethrough subscript superscript | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent blockquote | hr fullscreen | link unlink image | forecolor backcolor removeformat | code'})}});modal.modal('show');$('.wdt-apply-edit-button').removeClass('hidden');$('.wdt-apply-duplicate-button').addClass('hidden')}
if(modal.find('.wdt-edit-dialog-fields-block').find('.form-group').length==0)
$('#wdt-frontend-modal div.wdt-no-editor-inputs-selected-alert').show();});if(tableDescription.inlineEditing){new inlineEditClass(tableDescription,dataTableOptions,$)}
$('.new_table_entry[aria-controls="'+tableDescription.tableId+'"]').click(function(){var modal=$('#wdt-frontend-modal');var newSkins=['dark','aqua','purple'];$('.wpDataTablesPopover.editTools').hide();modal.addClass('wdt-skin-'+tableDescription.tableSkin);if(tableDescription.table_wcag){modal.addClass('wpTableWCAG')}
modal.find('.modal-title').html(wpdatatables_frontend_strings.add_new_entry);modal.find('.modal-body').html('');modal.find('.modal-footer').html('');if(['manual','mysql'].indexOf(tableDescription.tableType)===-1){if(typeof wpDataTablesEditors[tableDescription.tableType]['new']=='function'){if(singleClick===!1){singleClick=!0;wpDataTablesEditors[tableDescription.tableType]['new'](tableDescription)}}}else{modal.find('.modal-body').append($(tableDescription.selector+'_edit_dialog').show());modal.find('.modal-footer').append($(tableDescription.selector+'_edit_dialog_buttons').show());if(newSkins.includes(tableDescription.tableSkin)){modal.find(tableDescription.selector+'_prev_edit_dialog i').addClass('wpdt-icon-chevron-left');modal.find(tableDescription.selector+'_prev_edit_dialog i').removeClass('wpdt-icon-step-backward');modal.find(tableDescription.selector+'_next_edit_dialog i').addClass('wpdt-icon-chevron-right');modal.find(tableDescription.selector+'_next_edit_dialog i').removeClass('wpdt-icon-step-forward');modal.find(tableDescription.selector+'_apply_edit_dialog i').addClass('wpdt-icon-check-circle-full');modal.find(tableDescription.selector+'_apply_edit_dialog i').removeClass('wpdt-icon-check');modal.find(tableDescription.selector+'_ok_edit_dialog i').addClass('wpdt-icon-check-circle');modal.find(tableDescription.selector+'_ok_edit_dialog i').removeClass('wpdt-icon-check-double-reg')}else{modal.find(tableDescription.selector+'_prev_edit_dialog i').removeClass('wpdt-icon-chevron-left');modal.find(tableDescription.selector+'_prev_edit_dialog i').addClass('wpdt-icon-step-backward');modal.find(tableDescription.selector+'_next_edit_dialog i').removeClass('wpdt-icon-chevron-right');modal.find(tableDescription.selector+'_next_edit_dialog i').addClass('wpdt-icon-step-forward');modal.find(tableDescription.selector+'_apply_edit_dialog i').removeClass('wpdt-icon-check-circle-full');modal.find(tableDescription.selector+'_apply_edit_dialog i').addClass('wpdt-icon-check');modal.find(tableDescription.selector+'_ok_edit_dialog i').removeClass('wpdt-icon-check-circle');modal.find(tableDescription.selector+'_ok_edit_dialog i').addClass('wpdt-icon-check-double-reg')}
$('#wdt-frontend-modal .editDialogInput').val('').css('border','');$('#wdt-frontend-modal tr.idRow .editDialogInput').val('0');$('#wdt-frontend-modal .fileinput').removeClass('fileinput-exists').addClass('fileinput-new');$('#wdt-frontend-modal .fileinput').find('div.fileinput-exists').removeClass('fileinput-exists').addClass('fileinput-new');$('#wdt-frontend-modal .fileinput').find('.fileinput-filename').text('');$('#wdt-frontend-modal .fileinput').find('.fileinput-preview').html('');$('#wdt-frontend-modal .editDialogInput').each(function(index){if($(this).data('input_type')=='mce-editor'){if(tinymce.activeEditor)
tinymce.activeEditor.setContent('');tinymce.execCommand('mceRemoveEditor',!0,$(this).attr('id'));tinymce.init({selector:'#'+$(this).attr('id'),menubar:!1,plugins:'link image media lists hr colorpicker fullscreen textcolor code',toolbar:'undo redo formatselect bold italic underline strikethrough subscript superscript | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent blockquote | hr fullscreen | link unlink image | forecolor backcolor removeformat | code'})}});wpDataTables[tableDescription.tableId].checkSelectedLimits();$('#wdt-frontend-modal .selectpicker').selectpicker('deselectAll').selectpicker('refresh');wpDataTablesFunctions[tableDescription.tableId].setPredefinedEditValues();if(modal.find('.wdt-edit-dialog-fields-block').find('.form-group').length==0){$('#wdt-frontend-modal div.wdt-no-editor-inputs-selected-alert').show()}
modal.modal('show');$('.wdt-apply-edit-button').removeClass('hidden');$('.wdt-apply-duplicate-button').addClass('hidden')}});$('.duplicate_table_entry[aria-controls="'+tableDescription.tableId+'"]').click(function(){var modal=$('#wdt-frontend-modal');var newSkins=['dark','aqua','purple'];var row=$(tableDescription.selector+' tr.selected').get(0);if(tableDescription.responsive==1&&$(row).hasClass('row-detail')){row=$(tableDescription.selector+' tr.selected').prev('.detail-show').get(0)}
$('.wpDataTablesPopover.editTools').hide();modal.addClass('wdt-skin-'+tableDescription.tableSkin);if(tableDescription.table_wcag){modal.addClass('wpTableWCAG')}
modal.find('.modal-title').html(wpdatatables_frontend_strings.duplicate_entry);modal.find('.modal-body').html('');modal.find('.modal-footer').html('');if(['manual','mysql'].indexOf(tableDescription.tableType)===-1){if(typeof wpDataTablesEditors[tableDescription.tableType].edit=='function'){if(singleClick===!1){singleClick=!0;wpDataTablesEditors[tableDescription.tableType].edit(tableDescription,!0)}}}else{var data=wpDataTables[tableDescription.tableId].fnGetData(row);wpDataTablesFunctions[tableDescription.tableId].applyData(data,!0,!1);wpDataTables[tableDescription.tableId].checkSelectedLimits();modal.find('.modal-body').append($(tableDescription.selector+'_edit_dialog').show());modal.find('.modal-footer').append($(tableDescription.selector+'_edit_dialog_buttons').show());if(newSkins.includes(tableDescription.tableSkin)){modal.find(tableDescription.selector+'_prev_edit_dialog i').addClass('wpdt-icon-chevron-left');modal.find(tableDescription.selector+'_prev_edit_dialog i').removeClass('wpdt-icon-step-backward');modal.find(tableDescription.selector+'_next_edit_dialog i').addClass('wpdt-icon-chevron-right');modal.find(tableDescription.selector+'_next_edit_dialog i').removeClass('wpdt-icon-step-forward');modal.find(tableDescription.selector+'_apply_edit_dialog i').addClass('wpdt-icon-check-circle-full');modal.find(tableDescription.selector+'_apply_edit_dialog i').removeClass('wpdt-icon-check');modal.find(tableDescription.selector+'_ok_edit_dialog i').addClass('wpdt-icon-check-circle');modal.find(tableDescription.selector+'_ok_edit_dialog i').removeClass('wpdt-icon-check-double-reg')}else{modal.find(tableDescription.selector+'_prev_edit_dialog i').removeClass('wpdt-icon-chevron-left');modal.find(tableDescription.selector+'_prev_edit_dialog i').addClass('wpdt-icon-step-backward');modal.find(tableDescription.selector+'_next_edit_dialog i').removeClass('wpdt-icon-chevron-right');modal.find(tableDescription.selector+'_next_edit_dialog i').addClass('wpdt-icon-step-forward');modal.find(tableDescription.selector+'_apply_edit_dialog i').removeClass('wpdt-icon-check-circle-full');modal.find(tableDescription.selector+'_apply_edit_dialog i').addClass('wpdt-icon-check');modal.find(tableDescription.selector+'_ok_edit_dialog i').removeClass('wpdt-icon-check-circle');modal.find(tableDescription.selector+'_ok_edit_dialog i').addClass('wpdt-icon-check-double-reg')}
$('#wdt-frontend-modal .editDialogInput').each(function(index){if($(this).data('input_type')=='mce-editor'){if(tinymce.activeEditor)
tinymce.activeEditor.setContent('');tinymce.execCommand('mceRemoveEditor',!0,$(this).attr('id'));tinymce.init({selector:'#'+$(this).attr('id'),menubar:!1,plugins:'link image media lists hr colorpicker fullscreen textcolor code',toolbar:'undo redo formatselect bold italic underline strikethrough subscript superscript | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent blockquote | hr fullscreen | link unlink image | forecolor backcolor removeformat | code'})}});wpDataTables[tableDescription.tableId].checkSelectedLimits();if(modal.find('.wdt-edit-dialog-fields-block').find('.form-group').length==0){$('#wdt-frontend-modal div.wdt-no-editor-inputs-selected-alert').show()}
modal.modal('show');$('.wdt-apply-edit-button').addClass('hidden');$('.wdt-apply-duplicate-button').removeClass('hidden')}});$(document).on('keyup','#wdt-frontend-modal',function(e){e.preventDefault();e.stopImmediatePropagation();if(e.which==27){$('#wdt-frontend-modal').modal('hide').removeClass('wdt-skin-'+tableDescription.tableSkin)
$('#wdt-frontend-modal').modal('hide').removeClass('wpTableWCAG')}});$('#wdt-frontend-modal').on('hidden.bs.modal',function(e){$(tableDescription.selector+'_wrapper').append($(tableDescription.selector+'_edit_dialog').hide());$(tableDescription.selector+'_wrapper').append($(tableDescription.selector+'_edit_dialog_buttons').hide());$(this).removeClass('wdt-skin-'+tableDescription.tableSkin);$(this).removeClass('wpTableWCAG')});$('#wdt-delete-modal').on('hidden.bs.modal',function(e){$(tableDescription.selector+'_wrapper').append($(tableDescription.selector+'_delete_dialog_buttons').hide());$(this).removeClass('wdt-skin-'+tableDescription.tableSkin);$(this).removeClass('wpTableWCAG')});$('.delete_table_entry[aria-controls="'+tableDescription.tableId+'"]').click(function(e){e.preventDefault();e.stopImmediatePropagation();if($(this).hasClass('disabled')){return!1}
$('.wpDataTablesPopover.editTools').hide();var modal=$('#wdt-delete-modal');modal.addClass('wdt-skin-'+tableDescription.tableSkin);if(tableDescription.table_wcag){modal.addClass('wpTableWCAG')}
modal.find('.modal-footer').html('');modal.find('.modal-footer').append($(tableDescription.selector+'_delete_dialog_buttons').show());modal.modal('show');$(tableDescription.selector+'_wdt-browse-delete-button').click(function(e){e.preventDefault();e.stopImmediatePropagation();if(['manual','mysql'].indexOf(tableDescription.tableType)===-1){if(typeof wpDataTablesEditors[tableDescription.tableType]['delete']=='function'){wpDataTablesEditors[tableDescription.tableType]['delete'](tableDescription)}}else{var row=$(tableDescription.selector+' tr.selected').get(0);if(tableDescription.responsive==1&&$(row).hasClass('row-detail')){row=$(tableDescription.selector+' tr.selected').prev('.detail-show').get(0)}
var data=wpDataTables[tableDescription.tableId].fnGetData(row);var id_val=data[tableDescription.idColumnIndex];$.ajax({url:tableDescription.adminAjaxBaseUrl,type:'POST',dataType:'json',data:{action:'wdt_delete_table_row',id_key:tableDescription.idColumnKey,id_val:id_val,table_id:tableDescription.tableWpId,wdtNonce:$('#wdtNonceFrontendEdit_'+tableDescription.tableWpId).val()},success:function(data){wpDataTables[tableDescription.tableId].fnDraw(!1);if(data.error==''){$('#wdt-delete-modal').modal('hide');wdtNotify(wpdatatables_edit_strings.success,wpdatatables_edit_strings.rowDeleted,'success')}else{wdtNotify(wpdatatables_edit_strings.error,data.error,'danger')}},error:function(){wdtNotify(wpdatatables_edit_strings.error,wpdatatables_edit_strings.databaseDeleteError,'danger')}})}})});if(tableDescription.popoverTools){$(tableDescription.selector+'_wrapper').css('position','relative');$('<div class="wpDataTablesPopover editTools '+tableDescription.tableId+'"></div>').prependTo(tableDescription.selector+'_wrapper').hide();$('.new_table_entry[aria-controls="'+tableDescription.tableId+'"]').prependTo(tableDescription.selector+'_wrapper .wpDataTablesPopover.editTools').css('float','right');$('.edit_table[aria-controls="'+tableDescription.tableId+'"]').prependTo(tableDescription.selector+'_wrapper .wpDataTablesPopover.editTools').css('float','right');$('.duplicate_table_entry[aria-controls="'+tableDescription.tableId+'"]').prependTo(tableDescription.selector+'_wrapper .wpDataTablesPopover.editTools').css('float','right');$('.delete_table_entry[aria-controls="'+tableDescription.tableId+'"]').prependTo(tableDescription.selector+'_wrapper .wpDataTablesPopover.editTools').css('float','right')}
var clickEvent=function(e){if(!$(e.target).is('a')&&!$(e.target).is('button')){e.preventDefault();e.stopImmediatePropagation();e.preventDefault()}
if($(this).hasClass('group')){return!1}
var popoverVerticalPosition=$(this).offset().top-$(tableDescription.selector+'_wrapper').offset().top-$('.wpDataTablesPopover.editTools').outerHeight()-7;var editedRow=($(this).children('').hasClass('editing'))?!0:!1;if($(this).hasClass('selected')){$(tableDescription.selector+' tbody tr').removeClass('selected');wpDataTablesSelRows[tableDescription.tableId]=-1}else if(!$(this).find('td').hasClass('dataTables_empty')||tableDescription.popoverTools){$(tableDescription.selector+'  tbody tr').removeClass('selected');$(this).addClass('selected');wpDataTablesSelRows[tableDescription.tableId]=wpDataTables[tableDescription.tableId].fnGetPosition($(tableDescription.selector+' tbody tr.selected').get(0))}
if($(tableDescription.selector+' tbody tr.selected').length>0){$('.edit_table[aria-controls="'+tableDescription.tableId+'"]').removeClass('disabled');$('.duplicate_table_entry[aria-controls="'+tableDescription.tableId+'"]').removeClass('disabled');$('.delete_table_entry[aria-controls="'+tableDescription.tableId+'"]').removeClass('disabled');$('.master_detail[aria-controls="'+tableDescription.tableId+'"]').removeClass('disabled');if(!editedRow){$('.wpDataTablesPopover.editTools.'+tableDescription.tableId+'').show().css('top',popoverVerticalPosition)}else{return!1}}else{$('.edit_table[aria-controls="'+tableDescription.tableId+'"]').addClass('disabled');$('.duplicate_table_entry[aria-controls="'+tableDescription.tableId+'"]').addClass('disabled');$('.delete_table_entry[aria-controls="'+tableDescription.tableId+'"]').addClass('disabled');$('.master_detail[aria-controls="'+tableDescription.tableId+'"]').addClass('disabled');$('.wpDataTablesPopover.editTools.'+tableDescription.tableId+'').hide()}};var ua=navigator.userAgent,event=(ua.match(/iPad/i))?"touchstart":"click";$(document).off(event,tableDescription.selector+' tbody tr').on(event,tableDescription.selector+' tbody tr',clickEvent);$(document).on('click',tableDescription.selector+'_edit_dialog a.wdt-detach-attachment-file, a.wdt-detach-attachment-file',function(e){e.preventDefault();e.stopImmediatePropagation();if($(this).parent().find('span.fileupload-'+tableDescription.tableId).data('column_type')=='icon'){$(this).parent().find('input.editDialogInput').val('');$(this).parent().parent().find('.fileinput-preview').html('');$(this).parents('.fileinput-exists').removeClass('fileinput-exists').addClass('fileinput-new')}else{$(this).parent().find('input.editDialogInput').val('');$(this).parent().find('.fileinput-filename').text('');$(this).parent().removeClass('fileinput-exists').addClass('fileinput-new')}})}
$(document).on('focusin',function(e){if($(e.target).closest(".mce-window").length){e.stopImmediatePropagation()}});if(tableDescription.dataTableParams.fixedHeader.header&&!tableDescription.serverSide){$(window).on("scroll",function(){wpDataTables[tableDescription.tableId].fnDraw(!1)})}
if(tableDescription.masterDetail!==undefined&&tableDescription.masterDetail){for(var i in wpDataTablesHooks.onRenderDetails){if(!isNaN(i))
wpDataTablesHooks.onRenderDetails[i](tableDescription);}}
if(tableDescription.filterInForm==!0){if($('#wdt-filter-widget').length){$('.wpDataTablesFilter').appendTo('#wdt-filter-widget')}}
$(document).on('click','.paginate_button',function(){var tableSelector=$(this)[0].attributes[1].value;if(JSON.parse($('#'+$('#'+tableSelector).data('described-by')).val()).pagination_top){function paginateScroll(){$('html, body').animate({scrollTop:$('#'+tableSelector+"_wrapper.dataTables_wrapper").offset().top},100)}
paginateScroll();$(this).closest(tableDescription.selector+"_paginate.paginate_button").off('click').on('click',paginateScroll)}});return wpDataTables[tableDescription.tableId]};$('table.wpDataTable:not(.wpdtSimpleTable)').each(function(){var tableDescription=JSON.parse($('#'+$(this).data('described-by')).val());wdtRenderDataTable($(this),tableDescription)});$('.wpdt-c .dataTables_length').on('shown.bs.select',function(e){var currentValue=e.target.value;$('.wpdt-c .dataTables_length').on('changed.bs.select',function(e,clickedIndex,isSelected,previousValue){var tableSelector=e.currentTarget.id.replace('_length','')
if(currentValue=='0'){$(document).ready(function(){wpDataTables[tableSelector].api().page(0).draw(!1)})}})})})})(jQuery);function wdtApplyCellAction($cell,action,setVal){let index=$cell.index()+1;let classArr=$cell.attr("class").split(/\s+/);switch(action){case 'setCellColor':$cell.attr('style','background-color: '+setVal+' !important');break;case 'defaultCellColor':$cell.attr('style','background-color: "" !important');break;case 'setCellContent':if($cell.children().hasClass('responsiveExpander')){$cell.html(setVal).prepend('<span class="responsiveExpander"></span>')}else{$cell.html(setVal)}
break;case 'setCellClass':$cell.addClass(setVal);break;case 'removeCellClass':$cell.removeClass(setVal);break;case 'setRowColor':$cell.closest('tr').find('td').attr('style','background-color: '+setVal+' !important');break;case 'defaultRowColor':$cell.closest('tr').find('td').attr('style','background-color: "" !important');break;case 'setRowClass':$cell.closest('tr').addClass(setVal);break;case 'addColumnClass':$cell.closest('table.wpDataTable').find('thead th:nth-child('+index+')').addClass(setVal).closest('table.wpDataTable').find('tbody td:nth-child('+index+')').addClass(setVal).closest('table.wpDataTable').find('tfoot td:nth-child('+index+')').addClass(setVal);break;case 'setColumnColor':$cell.closest('table.wpDataTable').find('thead th:nth-child('+index+')').attr('style','background-color: '+setVal+' !important').closest('table.wpDataTable').find('tbody td:nth-child('+index+')').attr('style','background-color: '+setVal+' !important').closest('table.wpDataTable').find('tfoot td:nth-child('+index+')').attr('style','background-color: '+setVal+' !important');break}}
function wdtAddOverlay(table_selector){jQuery(table_selector).not('.fixedHeader-floating').addClass('overlayed')}
function wdtRemoveOverlay(table_selector){jQuery(table_selector).removeClass('overlayed');jQuery('table.fixedHeader-floating').removeClass('overlayed')}
function getPurifiedValue(element,responsive){if(responsive){var cellVal=element.children('.columnValue').html()}else{cellVal=element.clone().children().remove().end().html()}
return cellVal}
function wdtCheckConditionalFormatting(conditionalFormattingRules,params,element,responsive){var cellVal='';var ruleVal='';var ruleMatched=!1;if((params.columnType=='int')||(params.columnType=='float')){if(responsive){cellVal=element.children('.columnValue').html()}else{cellVal=element.clone().html();if(cellVal.indexOf('<span class="responsiveExpander"></span>')!==-1)
cellVal=cellVal.replace('<span class="responsiveExpander"></span>','');}
cellVal=wdtUnformatNumber(cellVal,params.thousandsSeparator,params.decimalSeparator,!0);if(!isNaN(cellVal)){cellVal=cellVal===''?null:parseFloat(cellVal)}
ruleVal=conditionalFormattingRules.cellVal}else if(params.columnType=='date'){cellVal=moment(getPurifiedValue(element,responsive),params.momentDateFormat).toDate();if(conditionalFormattingRules.cellVal=='%TODAY%'){ruleVal=moment().startOf('day').toDate()}else{ruleVal=moment(conditionalFormattingRules.cellVal,params.momentDateFormat).toDate()}
if(conditionalFormattingRules.cellVal=='%LAST_WEEK%'){conditionalFormattingRules.ifClause='%LAST_WEEK%'
ruleVal=[moment().subtract(1,'weeks').startOf('isoWeek').toDate(),moment().subtract(1,'weeks').endOf('isoWeek').toDate()]}
if(conditionalFormattingRules.cellVal=='%THIS_WEEK%'){conditionalFormattingRules.ifClause='%THIS_WEEK%'
ruleVal=[moment().startOf('isoweek').toDate(),moment().endOf('isoweek').toDate()]}
if(conditionalFormattingRules.cellVal=='%NEXT_WEEK%'){conditionalFormattingRules.ifClause='%LAST_WEEK%'
ruleVal=[moment().add(1,'weeks').startOf('isoWeek').toDate(),moment().add(1,'weeks').endOf('isoWeek').toDate()]}
if(conditionalFormattingRules.cellVal=='%LAST_30_DAYS%'){conditionalFormattingRules.ifClause='%LAST_30_DAYS%'
ruleVal=[moment().add(-30,'days').startOf('day').toDate(),moment().toDate()]}
if(conditionalFormattingRules.cellVal=='%LAST_MONTH%'){conditionalFormattingRules.ifClause='%LAST_MONTH%'
ruleVal=[moment().add(-1,'months').startOf('months').toDate(),moment().startOf('month').toDate()]}
if(conditionalFormattingRules.cellVal=='%NEXT_MONTH%'){conditionalFormattingRules.ifClause='%NEXT_MONTH%'
ruleVal=[moment().add(1,'months').startOf('months').toDate(),moment().add(2,'months').startOf('months').toDate()]}
if(conditionalFormattingRules.cellVal=='%THIS_MONTH%'){conditionalFormattingRules.ifClause='%THIS_MONTH%'
ruleVal=[moment().startOf('months').toDate(),moment().endOf('month').toDate()]}}else if(params.columnType=='datetime'){if(conditionalFormattingRules.cellVal=='%TODAY%'){cellVal=moment(getPurifiedValue(element,responsive),params.momentDateFormat+' '+params.momentTimeFormat).startOf('day').toDate();ruleVal=moment().startOf('day').toDate()}else{cellVal=moment(getPurifiedValue(element,responsive),params.momentDateFormat+' '+params.momentTimeFormat).toDate();ruleVal=moment(conditionalFormattingRules.cellVal,params.momentDateFormat+' '+params.momentTimeFormat).toDate()}
if(conditionalFormattingRules.cellVal=='%LAST_WEEK%'){conditionalFormattingRules.ifClause='%LAST_WEEK%'
ruleVal=[moment().subtract(1,'weeks').startOf('isoWeek').toDate(),moment().subtract(1,'weeks').endOf('isoWeek').toDate()]}
if(conditionalFormattingRules.cellVal=='%THIS_WEEK%'){conditionalFormattingRules.ifClause='%THIS_WEEK%'
ruleVal=[moment().startOf('isoweek').toDate(),moment().endOf('isoweek').toDate()]}
if(conditionalFormattingRules.cellVal=='%NEXT_WEEK%'){conditionalFormattingRules.ifClause='%LAST_WEEK%'
ruleVal=[moment().add(1,'weeks').startOf('isoWeek').toDate(),moment().add(1,'weeks').endOf('isoWeek').toDate()]}
if(conditionalFormattingRules.cellVal=='%LAST_30_DAYS%'){conditionalFormattingRules.ifClause='%LAST_30_DAYS%'
ruleVal=[moment().add(-30,'days').startOf('day').toDate(),moment().toDate()]}
if(conditionalFormattingRules.cellVal=='%LAST_MONTH%'){conditionalFormattingRules.ifClause='%LAST_MONTH%'
ruleVal=[moment().add(-1,'months').startOf('months').toDate(),moment().startOf('month').toDate()]}
if(conditionalFormattingRules.cellVal=='%NEXT_MONTH%'){conditionalFormattingRules.ifClause='%NEXT_MONTH%'
ruleVal=[moment().add(1,'months').startOf('months').toDate(),moment().add(2,'months').startOf('months').toDate()]}
if(conditionalFormattingRules.cellVal=='%THIS_MONTH%'){conditionalFormattingRules.ifClause='%THIS_MONTH%'
ruleVal=[moment().startOf('months').toDate(),moment().endOf('month').toDate()]}}else if(params.columnType=='time'){cellVal=moment(getPurifiedValue(element,responsive),params.momentTimeFormat).toDate();ruleVal=moment(conditionalFormattingRules.cellVal,params.momentTimeFormat).toDate()}else if(params.columnType=='link'){if(responsive){cellVal=element.children('.columnValue').html()}else{cellVal=element.clone().html()}
ruleVal=conditionalFormattingRules.cellVal}else{if(responsive){cellVal=element.children('.columnValue').html()}else{cellVal=element.clone().html()}
ruleVal=conditionalFormattingRules.cellVal}
switch(conditionalFormattingRules.ifClause){case 'lt':ruleMatched=cellVal<ruleVal;break;case 'lteq':ruleMatched=cellVal<=ruleVal;break;case 'eq':if(params.columnType=='date'||params.columnType=='datetime'||params.columnType=='time'){cellVal=cellVal!=null?cellVal.getTime():null;ruleVal=ruleVal!=null?ruleVal.getTime():null}
ruleMatched=cellVal==ruleVal;break;case 'neq':if(params.columnType=='date'||params.columnType=='datetime'){cellVal=cellVal!=null?cellVal.getTime():null;ruleVal=ruleVal!=null?ruleVal.getTime():null}
ruleMatched=cellVal!=ruleVal;break;case 'gteq':ruleMatched=cellVal>=ruleVal;break;case 'gt':ruleMatched=cellVal>ruleVal;break;case 'contains':ruleMatched=cellVal.indexOf(ruleVal)!==-1;break;case 'contains_not':ruleMatched=cellVal.indexOf(ruleVal)==-1;break;case '%THIS_WEEK%':ruleMatched=moment(cellVal)>=moment(ruleVal[0])&&moment(cellVal)<=moment(ruleVal[1]);break;case '%LAST_WEEK%':ruleMatched=moment(cellVal)>=moment(ruleVal[0])&&moment(cellVal)<=moment(ruleVal[1]);break;case '%NEXT_WEEK%':ruleMatched=moment(cellVal)>=moment(ruleVal[0])&&moment(cellVal)<=moment(ruleVal[1]);break;case '%LAST_30_DAYS%':ruleMatched=moment(cellVal)>=moment(ruleVal[0])&&moment(cellVal)<=moment(ruleVal[1]);break;case '%LAST_MONTH%':ruleMatched=moment(cellVal)>=moment(ruleVal[0])&&moment(cellVal)<moment(ruleVal[1]);break;case '%NEXT_MONTH%':ruleMatched=moment(cellVal)>=moment(ruleVal[0])&&moment(cellVal)<moment(ruleVal[1]);break;case '%THIS_MONTH%':ruleMatched=moment(cellVal)>=moment(ruleVal[0])&&moment(cellVal)<=moment(ruleVal[1]);break}
if(ruleMatched){wdtApplyCellAction(element,conditionalFormattingRules.action,conditionalFormattingRules.setVal)}}
function wdtTransformValue(trasnsformValue,params,element,m,tableID){let index=element.index()+1;jQuery(jQuery('table#'+tableID+'.wpDataTable').find('tbody td:nth-child('+index+')')[m]).html(trasnsformValue)}
function wdtTransformValueResponsive(trasnsformValue,params,element,m,tableID){let index=element.index()+1;jQuery(element.find('.columnValue')[m]).html(trasnsformValue)}
jQuery.fn.dataTable.ext.classes.sLengthSelect='wdt-selectpicker length_menu';jQuery.fn.dataTable.ext.classes.sFilterInput='form-control';/*! FixedHeader 3.3.1
 * ©2009-2022 SpryMedia Ltd - datatables.net/license
 */
(function(factory){if(typeof define==='function'&&define.amd){define(['jquery','datatables.net'],function($){return factory($,window,document)})}else if(typeof exports==='object'){module.exports=function(root,$){if(!root){root=window}
if(!$){$=typeof window!=='undefined'?require('jquery'):require('jquery')(root)}
if(!$.fn.dataTable){require('datatables.net')(root,$)}
return factory($,root,root.document)}}else{factory(jQuery,window,document)}}(function($,window,document,undefined){'use strict';var DataTable=$.fn.dataTable;var _instCounter=0;var FixedHeader=function(dt,config){if(!(this instanceof FixedHeader)){throw "FixedHeader must be initialised with the 'new' keyword."}
if(config===!0){config={}}
dt=new DataTable.Api(dt);this.c=$.extend(!0,{},FixedHeader.defaults,config);this.wpDatatableDescription=JSON.parse(jQuery('#'+$(dt.table().header()).closest('table').data('described-by')).val());this.s={dt:dt,position:{theadTop:0,tbodyTop:0,tfootTop:0,tfootBottom:0,width:0,left:0,tfootHeight:0,theadHeight:0,windowHeight:$(window).height(),visible:!0},headerMode:null,footerMode:null,autoWidth:dt.settings()[0].oFeatures.bAutoWidth,namespace:'.dtfc'+(_instCounter++),scrollLeft:{header:-1,footer:-1},enable:!0};this.dom={floatingHeader:null,thead:$(dt.table().header()),tbody:$(dt.table().body()),tfoot:$(dt.table().footer()),header:{host:null,floating:null,floatingParent:$('<div class="dtfh-floatingparent">'),placeholder:null},footer:{host:null,floating:null,floatingParent:$('<div class="dtfh-floatingparent">'),placeholder:null}};this.dom.header.host=this.dom.thead.parent();this.dom.footer.host=this.dom.tfoot.parent();var dtSettings=dt.settings()[0];if(dtSettings._fixedHeader){throw "FixedHeader already initialised on table "+dtSettings.nTable.id}
dtSettings._fixedHeader=this;this._constructor()};$.extend(FixedHeader.prototype,{destroy:function(){var dom=this.dom;this.s.dt.off('.dtfc');$(window).off(this.s.namespace);if(dom.header.rightBlocker){dom.header.rightBlocker.remove()}
if(dom.header.leftBlocker){dom.header.leftBlocker.remove()}
if(dom.footer.rightBlocker){dom.footer.rightBlocker.remove()}
if(dom.footer.leftBlocker){dom.footer.leftBlocker.remove()}
if(this.c.header){this._modeChange('in-place','header',!0)}
if(this.c.footer&&dom.tfoot.length){this._modeChange('in-place','footer',!0)}},enable:function(enable,update){this.s.enable=enable;if(update||update===undefined){this._positions();this._scroll(!0)}},enabled:function(){return this.s.enable},headerOffset:function(offset){if(offset!==undefined){this.c.headerOffset=offset;this.update()}
return this.c.headerOffset},footerOffset:function(offset){if(offset!==undefined){this.c.footerOffset=offset;this.update()}
return this.c.footerOffset},update:function(force){if(!this.s.enable){return}
var table=this.s.dt.table().node();if($(table).is(':visible')){this.enable(!0,!1)}else{this.enable(!1,!1)}
if($(table).children('thead').length===0){return}
this._positions();this._scroll(force!==undefined?force:!0)},_constructor:function(){var that=this;var dt=this.s.dt;$(window).on('scroll'+this.s.namespace,function(){that._scroll()}).on('resize'+this.s.namespace,DataTable.util.throttle(function(){that.s.position.windowHeight=$(window).height();that.update()},50));var autoHeader=$('.fh-fixedHeader');if(!this.c.headerOffset&&autoHeader.length){this.c.headerOffset=autoHeader.outerHeight()}
var autoFooter=$('.fh-fixedFooter');if(!this.c.footerOffset&&autoFooter.length){this.c.footerOffset=autoFooter.outerHeight()}
dt.on('column-reorder.dt.dtfc column-visibility.dt.dtfc column-sizing.dt.dtfc responsive-display.dt.dtfc',function(e,ctx){that.update()}).on('draw.dt.dtfc',function(e,ctx){that.update(ctx===dt.settings()[0]?!1:!0)});dt.on('destroy.dtfc',function(){that.destroy()});this._positions();this._scroll()},_clone:function(item,force){var that=this;var dt=this.s.dt;var itemDom=this.dom[item];var itemElement=item==='header'?this.dom.thead:this.dom.tfoot;if(item==='footer'&&this._scrollEnabled()){return}
if(!force&&itemDom.floating){itemDom.floating.removeClass('fixedHeader-floating fixedHeader-locked')}else{var docScrollLeft=$(document).scrollLeft();var docScrollTop=$(document).scrollTop();if($(this.wpDatatableDescription.selector).find('thead tr th span.filter_select div.btn-group.open').length!=0){$(this.wpDatatableDescription.selector).find('thead tr th span.filter_select div.btn-group.open').removeClass('open')}
if(itemDom.floating){if(itemDom.placeholder!==null){itemDom.placeholder.remove()}
this._unsize(item);itemDom.floating.children().detach();itemDom.floating.remove()}
var tableNode=$(dt.table().node());var scrollBody=$(tableNode.parent());var scrollEnabled=this._scrollEnabled();itemDom.floating=$(dt.table().node().cloneNode(!1)).attr('aria-hidden','true').css({'table-layout':'fixed',top:0,left:0}).removeAttr('id').append(itemElement);itemDom.floatingParent.css({width:scrollBody.width(),overflow:'hidden',height:'fit-content',position:'fixed',left:scrollEnabled?tableNode.offset().left+scrollBody.scrollLeft():0}).css(item==='header'?{top:this.c.headerOffset,bottom:''}:{top:'',bottom:this.c.footerOffset}).addClass(item==='footer'?'dtfh-floatingparentfoot':'dtfh-floatingparenthead').append(itemDom.floating).prependTo(this.wpDatatableDescription.selector)
var scrollLeftUpdate=function(){var scrollLeft=scrollBody.scrollLeft()
that.s.scrollLeft={footer:scrollLeft,header:scrollLeft};itemDom.floatingParent.scrollLeft(that.s.scrollLeft.header)}
scrollLeftUpdate();scrollBody.off('scroll.dtfh').on('scroll.dtfh',scrollLeftUpdate);itemDom.placeholder=itemElement.clone(!1);itemDom.placeholder.find('*[id]').removeAttr('id');itemDom.host.prepend(itemDom.placeholder);this._matchWidths(itemDom.placeholder,itemDom.floating);$(document).scrollTop(docScrollTop).scrollLeft(docScrollLeft)}},_matchWidths:function(from,to){var get=function(name){return $(name,from).map(function(){return $(this).css('width').replace(/[^\d\.]/g,'')*1}).toArray()};var set=function(name,toWidths){$(name,to).each(function(i){$(this).css({width:toWidths[i],minWidth:toWidths[i]})})};var thWidths=get('th');var tdWidths=get('td');set('th',thWidths);set('td',tdWidths)},_unsize:function(item){var el=this.dom[item].floating;if(el&&(item==='footer'||(item==='header'&&!this.s.autoWidth))){if(!this.wpDatatableDescription.fixedLayout){$('th, td',el).css({width:'',minWidth:''})}}else if(el&&item==='header'){$('th, td',el).css('min-width','')}},_horizontal:function(item,scrollLeft){var itemDom=this.dom[item];var position=this.s.position;var lastScrollLeft=this.s.scrollLeft;if(itemDom.floating&&lastScrollLeft[item]!==scrollLeft){if(this._scrollEnabled()){var newScrollLeft=$($(this.s.dt.table().node()).parent()).scrollLeft()
itemDom.floating.scrollLeft(newScrollLeft);itemDom.floatingParent.scrollLeft(newScrollLeft)}
lastScrollLeft[item]=scrollLeft}},_modeChange:function(mode,item,forceChange){var dt=this.s.dt;var itemDom=this.dom[item];var position=this.s.position;var scrollEnabled=this._scrollEnabled();if(item==='footer'&&scrollEnabled){return}
var importantWidth=function(w){itemDom.floating.attr('style',function(i,s){return(s||'')+'width: '+w+'px !important;'});if(!scrollEnabled){itemDom.floatingParent.attr('style',function(i,s){return(s||'')+'width: '+w+'px !important;'})}};var tablePart=this.dom[item==='footer'?'tfoot':'thead'];var focus=$.contains(tablePart[0],document.activeElement)?document.activeElement:null;var scrollBody=$($(this.s.dt.table().node()).parent());if(mode==='in-place'){if(itemDom.placeholder){itemDom.placeholder.remove();itemDom.placeholder=null}
this._unsize(item);if(item==='header'){itemDom.host.prepend(tablePart)}else{itemDom.host.append(tablePart)}
if(itemDom.floating){itemDom.floating.remove();itemDom.floating=null}
if(itemDom.floatingParent){itemDom.floatingParent.remove()}
$($(itemDom.host.parent()).parent()).scrollLeft(scrollBody.scrollLeft())}else if(mode==='in'){this._clone(item,forceChange);var scrollOffset=scrollBody.offset();var windowTop=$(document).scrollTop();var windowHeight=$(window).height();var windowBottom=windowTop+windowHeight;var bodyTop=scrollEnabled?scrollOffset.top:position.tbodyTop;var bodyBottom=scrollEnabled?scrollOffset.top+scrollBody.outerHeight():position.tfootTop
var shuffle=item==='footer'?bodyTop>windowBottom?position.tfootHeight:bodyTop+position.tfootHeight-windowBottom:windowTop+this.c.headerOffset+position.theadHeight-bodyBottom
var prop=item==='header'?'top':'bottom';var val=this.c[item+'Offset']-(shuffle>0?shuffle:0);itemDom.floating.addClass('fixedHeader-floating');itemDom.floatingParent.css(prop,val).css({'left':position.left,'height':item==='header'?'max-content':position.tfootHeight,'z-index':4}).append(itemDom.floating);if(!(this.wpDatatableDescription.scrollable))
importantWidth(position.width);if(item==='footer'){itemDom.floating.css('top','')}}else if(mode==='below'){this._clone(item,forceChange);itemDom.floating.addClass('fixedHeader-locked');itemDom.floatingParent.css({position:'absolute',top:0,left:position.left+'px'});if(!(this.wpDatatableDescription.scrollable))
importantWidth(position.width);}else if(mode==='above'){this._clone(item,forceChange);itemDom.floating.addClass('fixedHeader-locked');itemDom.floatingParent.css({position:'absolute',top:position.tbodyTop,left:position.left+'px'});if(!(this.wpDatatableDescription.scrollable))
importantWidth(position.width);}
if(focus&&focus!==document.activeElement){setTimeout(function(){focus.focus()},10)}
this.s.scrollLeft.header=-1;this.s.scrollLeft.footer=-1;this.s[item+'Mode']=mode},_positions:function(){var dt=this.s.dt;var table=dt.table();var position=this.s.position;var dom=this.dom;var tableNode=$(table.node());var scrollEnabled=this._scrollEnabled();var thead=$(dt.table().header());var tfoot=$(dt.table().footer());var tbody=dom.tbody;var scrollBody=tableNode.parent();position.visible=tableNode.is(':visible');position.width=tableNode.outerWidth();position.left=tableNode.offset().left;position.theadTop=thead.offset().top;position.tbodyTop=scrollEnabled?scrollBody.offset().top:tbody.offset().top;position.tbodyHeight=scrollEnabled?scrollBody.outerHeight():tbody.outerHeight();position.theadHeight=thead.outerHeight();position.theadBottom=position.theadTop+position.theadHeight;if(tfoot.length){position.tfootTop=position.tbodyTop+position.tbodyHeight;position.tfootBottom=position.tfootTop+tfoot.outerHeight();position.tfootHeight=tfoot.outerHeight()}else{position.tfootTop=position.tbodyTop+tbody.outerHeight();position.tfootBottom=position.tfootTop;position.tfootHeight=position.tfootTop}},_scroll:function(forceChange){if(this.s.dt.settings()[0].bDestroying){return}
var scrollEnabled=this._scrollEnabled();var scrollBody=$(this.s.dt.table().node()).parent();var scrollOffset=scrollBody.offset();var scrollHeight=scrollBody.outerHeight();var windowLeft=$(document).scrollLeft();var windowTop=$(document).scrollTop();var windowHeight=$(window).height();var windowBottom=windowHeight+windowTop
var position=this.s.position;var headerMode,footerMode;var bodyTop=(scrollEnabled?scrollOffset.top:position.tbodyTop);var bodyLeft=(scrollEnabled?scrollOffset.left:position.left);var bodyBottom=(scrollEnabled?scrollOffset.top+scrollHeight:position.tfootTop);var bodyWidth=(scrollEnabled?scrollBody.outerWidth():position.tbodyWidth);var windowBottom=windowTop+windowHeight;if(this.c.header){if(!this.s.enable){headerMode='in-place'}else if(!position.visible||windowTop+this.c.headerOffset<=bodyTop){headerMode='in-place'}else if(windowTop+this.c.headerOffset+position.theadHeight>bodyTop&&windowTop+this.c.headerOffset+position.theadHeight<bodyBottom){headerMode='in';var scrollBody=$($(this.s.dt.table().node()).parent());if(windowTop+this.c.headerOffset+position.theadHeight>bodyBottom||this.dom.header.floatingParent===undefined){forceChange=!0}else{this.dom.header.floatingParent.css({'top':this.c.headerOffset,'position':'fixed'}).append(this.dom.header.floating)}}else{headerMode='below'}
if(forceChange||headerMode!==this.s.headerMode){this._modeChange(headerMode,'header',forceChange)}
this._horizontal('header',windowLeft)}
var header={offset:{top:0,left:0},height:0}
var footer={offset:{top:0,left:0},height:0}
if(this.c.footer&&this.dom.tfoot.length){if(!this.s.enable){footerMode='in-place'}else if(!position.visible||position.tfootBottom+this.c.footerOffset<=windowBottom){footerMode='in-place'}else if(bodyBottom+position.tfootHeight+this.c.footerOffset>windowBottom&&bodyTop+this.c.footerOffset<windowBottom){footerMode='in';forceChange=!0}else{footerMode='above'}
if(forceChange||footerMode!==this.s.footerMode){this._modeChange(footerMode,'footer',forceChange)}
this._horizontal('footer',windowLeft);var getOffsetHeight=function(el){return{offset:el.offset(),height:el.outerHeight()}};header=this.dom.header.floating?getOffsetHeight(this.dom.header.floating):getOffsetHeight(this.dom.thead);footer=this.dom.footer.floating?getOffsetHeight(this.dom.footer.floating):getOffsetHeight(this.dom.tfoot);if(scrollEnabled&&footer.offset.top>windowTop){var overlap=windowTop-scrollOffset.top;var newHeight=windowBottom+(overlap>-header.height?overlap:0)-(header.offset.top+(overlap<-header.height?header.height:0)+footer.height)
if(newHeight<0){newHeight=0}
scrollBody.outerHeight(newHeight);if(Math.round(scrollBody.outerHeight())>=Math.round(newHeight)){$(this.dom.tfoot.parent()).addClass("fixedHeader-floating")}else{$(this.dom.tfoot.parent()).removeClass("fixedHeader-floating")}}}
if(this.dom.header.floating){this.dom.header.floatingParent.css('left',bodyLeft-windowLeft)}
if(this.dom.footer.floating){this.dom.footer.floatingParent.css('left',bodyLeft-windowLeft)}
if(this.s.dt.settings()[0]._fixedColumns!==undefined){if(this.s.dt.settings()[0]._fixedColumns.c.left!==0||this.s.dt.settings()[0]._fixedColumns.c.right!==0){this.s.dt.settings()[0]._fixedColumns.left(this.s.dt.settings()[0]._fixedColumns.c.left);this.s.dt.settings()[0]._fixedColumns.right(this.s.dt.settings()[0]._fixedColumns.c.right)}
var adjustBlocker=function(side,end,el){if(el===undefined){var blocker=$('div.dtfc-'+side+'-'+end+'-blocker');el=blocker.length===0?null:blocker.clone().css('z-index',1)}
if(el!==null){if(headerMode==='in'||headerMode==='below'){el.appendTo('body').css({top:end==='top'?header.offset.top:footer.offset.top,left:side==='right'?bodyLeft+bodyWidth-el.width():bodyLeft})}else{el.detach()}}
return el}
this.dom.header.rightBlocker=adjustBlocker('right','top',this.dom.header.rightBlocker);this.dom.header.leftBlocker=adjustBlocker('left','top',this.dom.header.leftBlocker);this.dom.footer.rightBlocker=adjustBlocker('right','bottom',this.dom.footer.rightBlocker);this.dom.footer.leftBlocker=adjustBlocker('left','bottom',this.dom.footer.leftBlocker)}},_scrollEnabled:function(){var oScroll=this.s.dt.settings()[0].oScroll;if(this.wpDatatableDescription.scrollable){return!0}
return!1}});FixedHeader.version="3.3.1";FixedHeader.defaults={header:!0,footer:!1,headerOffset:0,footerOffset:0};$.fn.dataTable.FixedHeader=FixedHeader;$.fn.DataTable.FixedHeader=FixedHeader;$(document).on('init.dt.dtfh',function(e,settings,json){if(e.namespace!=='dt'){return}
var init=settings.oInit.fixedHeader;var defaults=DataTable.defaults.fixedHeader;if((init||defaults)&&!settings._fixedHeader){var opts=$.extend({},defaults,init);if(init!==!1){new FixedHeader(settings,opts)}}});DataTable.Api.register('fixedHeader()',function(){});DataTable.Api.register('fixedHeader.adjust()',function(){return this.iterator('table',function(ctx){var fh=ctx._fixedHeader;if(fh){fh.update()}})});DataTable.Api.register('fixedHeader.enable()',function(flag){return this.iterator('table',function(ctx){var fh=ctx._fixedHeader;flag=(flag!==undefined?flag:!0);if(fh&&flag!==fh.enabled()){fh.enable(flag)}})});DataTable.Api.register('fixedHeader.enabled()',function(){if(this.context.length){var fh=this.context[0]._fixedHeader;if(fh){return fh.enabled()}}
return!1});DataTable.Api.register('fixedHeader.disable()',function(){return this.iterator('table',function(ctx){var fh=ctx._fixedHeader;if(fh&&fh.enabled()){fh.enable(!1)}})});$.each(['header','footer'],function(i,el){DataTable.Api.register('fixedHeader.'+el+'Offset()',function(offset){var ctx=this.context;if(offset===undefined){return ctx.length&&ctx[0]._fixedHeader?ctx[0]._fixedHeader[el+'Offset']():undefined}
return this.iterator('table',function(ctx){var fh=ctx._fixedHeader;if(fh){fh[el+'Offset'](offset)}})})});return DataTable}));/*! FixedColumns 4.2.1
 * 2019-2022 SpryMedia Ltd - datatables.net/license
 */
(function(factory){if(typeof define==='function'&&define.amd){define(['jquery','datatables.net'],function($){return factory($,window,document)})}else if(typeof exports==='object'){module.exports=function(root,$){if(!root){root=window}
if(!$){$=typeof window!=='undefined'?require('jquery'):require('jquery')(root)}
if(!$.fn.dataTable){require('datatables.net')(root,$)}
return factory($,root,root.document)}}else{factory(jQuery,window,document)}}(function($,window,document,undefined){'use strict';var DataTable=$.fn.dataTable;(function(){'use strict';var $$1;var dataTable;function setJQuery(jq){$$1=jq;dataTable=$$1.fn.dataTable}
var FixedColumns=(function(){function FixedColumns(settings,opts){var _this=this;if(!dataTable||!dataTable.versionCheck||!dataTable.versionCheck('1.10.0')){throw new Error('StateRestore requires DataTables 1.10 or newer')}
var table=new dataTable.Api(settings);this.classes=$$1.extend(!0,{},FixedColumns.classes);this.c=$$1.extend(!0,{},FixedColumns.defaults,opts);if((!opts||opts.left===undefined)&&this.c.leftColumns!==undefined){this.c.left=this.c.leftColumns}
if((!opts||opts.right===undefined)&&this.c.rightColumns!==undefined){this.c.right=this.c.rightColumns}
this.s={barWidth:0,dt:table,rtl:$$1('body').css('direction')==='rtl'};var blockerCSS={'bottom':'0px','display':'block','position':'absolute','width':this.s.barWidth+1+'px'};this.dom={leftBottomBlocker:$$1('<div>').css(blockerCSS).css('left',0).addClass(this.classes.leftBottomBlocker),leftTopBlocker:$$1('<div>').css(blockerCSS).css({left:0,top:0}).addClass(this.classes.leftTopBlocker),rightBottomBlocker:$$1('<div>').css(blockerCSS).css('right',0).addClass(this.classes.rightBottomBlocker),rightTopBlocker:$$1('<div>').css(blockerCSS).css({right:0,top:0}).addClass(this.classes.rightTopBlocker)};if(this.s.dt.settings()[0]._bInitComplete){this._addStyles();this._setKeyTableListener()}else{table.one('init.dt',function(){_this._addStyles();_this._setKeyTableListener()})}
table.on('column-sizing.dt',function(){return _this._addStyles()});table.settings()[0]._fixedColumns=this;return this}
FixedColumns.prototype.left=function(newVal){if(newVal!==undefined){this.c.left=newVal;this._addStyles()}
return this.c.left};FixedColumns.prototype.right=function(newVal){if(newVal!==undefined){this.c.right=newVal;this._addStyles()}
return this.c.right};FixedColumns.prototype._addStyles=function(){this.wpDatatableDescription=JSON.parse(jQuery('#'+$(this.s.dt.table().header()).closest('table').data('described-by')).val());if(this.s.dt.settings()[0].oScroll.sY){var scroll_1=$$1(this.s.dt.table().node()).closest('div.dataTables_scrollBody')[0];var barWidth=this.s.dt.settings()[0].oBrowser.barWidth;if(scroll_1.offsetWidth-scroll_1.clientWidth>=barWidth){this.s.barWidth=barWidth}else{this.s.barWidth=0}
this.dom.rightTopBlocker.css('width',this.s.barWidth+1);this.dom.leftTopBlocker.css('width',this.s.barWidth+1);this.dom.rightBottomBlocker.css('width',this.s.barWidth+1);this.dom.leftBottomBlocker.css('width',this.s.barWidth+1)}
var parentDiv=null;var header=this.s.dt.column(0).header();var headerHeight=null;if(header!==null){header=$$1(header);headerHeight=header.outerHeight()+1;parentDiv=$$1(header.closest('div.dataTables_scroll')).css('position','relative')}
var footer=this.s.dt.column(0).footer();var footerHeight=null;if(footer!==null){footer=$$1(footer);footerHeight=footer.outerHeight();if(parentDiv===null){parentDiv=$$1(footer.closest('div.dataTables_scroll')).css('position','relative')}}
var numCols=this.s.dt.columns().data().toArray().length;var distLeft=0;var headLeft=0;var rows=$$1(this.s.dt.table().node()).children('tbody').children('tr');var invisibles=0;var prevInvisible=new Map();for(var i=0;i<numCols;i++){var column=this.s.dt.column(i);if(i>0){prevInvisible.set(i-1,invisibles)}
if(!column.visible()){invisibles++;continue}
var colHeader=$$1(column.header());var colFooter=$$1(column.footer());if(i-invisibles<this.c.left){$$1(this.s.dt.table().node()).addClass(this.classes.tableFixedLeft);parentDiv.addClass(this.classes.tableFixedLeft);if(i-invisibles>0){var prevIdx=i;while(prevIdx+1<numCols){var prevCol=this.s.dt.column(prevIdx-1,{page:'current'});if(prevCol.visible()){distLeft+=$$1(prevCol.nodes()[0]).outerWidth();headLeft+=prevCol.header()?$$1(prevCol.header()).outerWidth():prevCol.footer()?$$1(prevCol.header()).outerWidth():0;break}
prevIdx--}}
for(var _i=0,rows_1=rows;_i<rows_1.length;_i++){var row=rows_1[_i];if(!row.children[0].classList.contains('group')&&!row.classList.contains('row-detail')){$$1($$1(row).children()[i-invisibles]).css(this._getCellCSS(!1,distLeft,'left')).addClass(this.classes.fixedLeft)}}
var colHeaderIndex=colHeader.index()+1;colHeader.css(this._getCellCSS(!0,headLeft,'left')).addClass(this.classes.fixedLeft);if(this.wpDatatableDescription.renderFilter==="header"&&this.wpDatatableDescription.filterInForm===!1){if(!colHeader.closest('thead').find('th:not(".wdtheader"):nth-child('+colHeaderIndex+')').children().children('div').hasClass('open')){colHeader.closest('thead').find('th:not(".wdtheader"):nth-child('+colHeaderIndex+')').css(this._getCellCSS(!0,headLeft,'left')).addClass(this.classes.fixedLeft)}}
colFooter.css(this._getCellCSS(!0,headLeft,'left')).addClass(this.classes.fixedLeft)}else{for(var _a=0,rows_2=rows;_a<rows_2.length;_a++){var row=rows_2[_a];var cell=$$1($$1(row).children()[i-invisibles]);if(cell.hasClass(this.classes.fixedLeft)){cell.css(this._clearCellCSS('left')).removeClass(this.classes.fixedLeft)}}
if(colHeader.hasClass(this.classes.fixedLeft)){colHeader.css(this._clearCellCSS('left')).removeClass(this.classes.fixedLeft);if(this.wpDatatableDescription.renderFilter==="header"&&this.wpDatatableDescription.filterInForm===!1){if(!colHeader.closest('thead').find('th:not(".wdtheader"):nth-child('+colHeaderIndex+')').children().children('div').hasClass('open')){var colHeaderIndex=colHeader.index()+1;if(colHeader.closest('thead').find('th:not(".wdtheader"):nth-child('+colHeaderIndex+')').hasClass(this.classes.fixedLeft)){colHeader.closest('thead').find('th:not(".wdtheader"):nth-child('+colHeaderIndex+')').css(this._getCellCSS(!0,headLeft,'left')).addClass(this.classes.fixedLeft)}}}}
if(colFooter.hasClass(this.classes.fixedLeft)){colFooter.css(this._clearCellCSS('left')).removeClass(this.classes.fixedLeft)}}}
var distRight=0;var headRight=0;var rightInvisibles=0;for(var i=numCols-1;i>=0;i--){var column=this.s.dt.column(i);if(!column.visible()){rightInvisibles++;continue}
var colHeader=$$1(column.header());var colFooter=$$1(column.footer());var prev=prevInvisible.get(i);if(prev===undefined){prev=invisibles}
if(i+rightInvisibles>=numCols-this.c.right){$$1(this.s.dt.table().node()).addClass(this.classes.tableFixedRight);parentDiv.addClass(this.classes.tableFixedRight);if(i+1+rightInvisibles<numCols){var prevIdx=i;while(prevIdx+1<numCols){var prevCol=this.s.dt.column(prevIdx+1,{page:'current'});if(prevCol.visible()){distRight+=$$1(prevCol.nodes()[0]).outerWidth();headRight+=prevCol.header()?$$1(prevCol.header()).outerWidth():prevCol.footer()?$$1(prevCol.header()).outerWidth():0;break}
prevIdx++}}
for(var _b=0,rows_3=rows;_b<rows_3.length;_b++){var row=rows_3[_b];$$1($$1(row).children()[i-prev]).css(this._getCellCSS(!1,distRight,'right')).addClass(this.classes.fixedRight)}
var colHeaderIndex=colHeader.index()+1;colHeader.css(this._getCellCSS(!0,headRight,'right')).addClass(this.classes.fixedRight);if(this.wpDatatableDescription.renderFilter==="header"&&this.wpDatatableDescription.filterInForm===!1){if(!colHeader.closest('thead').find('th:not(".wdtheader"):nth-child('+colHeaderIndex+')').children().children('div').hasClass('open')){colHeader.closest('thead').find('th:not(".wdtheader"):nth-child('+colHeaderIndex+')').css(this._getCellCSS(!0,headRight,'right')).addClass(this.classes.fixedRight)}}
colFooter.css(this._getCellCSS(!0,headRight,'right')).addClass(this.classes.fixedRight)}else{for(var _c=0,rows_4=rows;_c<rows_4.length;_c++){var row=rows_4[_c];var cell=$$1($$1(row).children()[i-prev]);if(cell.hasClass(this.classes.fixedRight)){cell.css(this._clearCellCSS('right')).removeClass(this.classes.fixedRight)}}
if(colHeader.hasClass(this.classes.fixedRight)){colHeader.css(this._clearCellCSS('right')).removeClass(this.classes.fixedRight);var colHeaderIndex=colHeader.index()+1;if(this.wpDatatableDescription.renderFilter==="header"&&this.wpDatatableDescription.filterInForm===!1){if(!colHeader.closest('thead').find('th:not(".wdtheader"):nth-child('+colHeaderIndex+')').children().children('div').hasClass('open')){if(colHeader.closest('thead').find('th:not(".wdtheader"):nth-child('+colHeaderIndex+')').hasClass(this.classes.fixedRight)){colHeader.closest('thead').find('th:not(".wdtheader"):nth-child('+colHeaderIndex+')').css(this._getCellCSS(!0,headRight,'right')).addClass(this.classes.fixedRight)}}}}
if(colFooter.hasClass(this.classes.fixedRight)){colFooter.css(this._clearCellCSS('right')).removeClass(this.classes.fixedRight)}}}
if(header){if(!this.s.rtl){this.dom.rightTopBlocker.outerHeight(headerHeight);parentDiv.append(this.dom.rightTopBlocker)}else{this.dom.leftTopBlocker.outerHeight(headerHeight);parentDiv.append(this.dom.leftTopBlocker)}}
if(footer){if(!this.s.rtl){this.dom.rightBottomBlocker.outerHeight(footerHeight);parentDiv.append(this.dom.rightBottomBlocker)}else{this.dom.leftBottomBlocker.outerHeight(footerHeight);parentDiv.append(this.dom.leftBottomBlocker)}}};FixedColumns.prototype._getCellCSS=function(header,dist,lr){if(lr==='left'){return this.s.rtl?{position:'sticky',right:dist+'px'}:{left:dist+'px',position:'sticky'}}else{return this.s.rtl?{left:dist+'px',position:'sticky'}:{position:'sticky',right:dist+'px'}}};FixedColumns.prototype._clearCellCSS=function(lr){if(lr==='left'){return!this.s.rtl?{left:'',position:''}:{position:'',right:''}}else{return!this.s.rtl?{position:'',right:''}:{left:'',position:''}}};FixedColumns.prototype._setKeyTableListener=function(){var _this=this;this.s.dt.on('key-focus',function(e,dt,cell){var cellPos=$$1(cell.node()).offset();var scroll=$$1($$1(_this.s.dt.table().node()).closest('div.dataTables_scrollBody'));if(_this.c.left>0){var rightMost=$$1(_this.s.dt.column(_this.c.left-1).header());var rightMostPos=rightMost.offset();var rightMostWidth=rightMost.outerWidth();if(cellPos.left<rightMostPos.left+rightMostWidth){var currScroll=scroll.scrollLeft();scroll.scrollLeft(currScroll-(rightMostPos.left+rightMostWidth-cellPos.left))}}
if(_this.c.right>0){var numCols=_this.s.dt.columns().data().toArray().length;var cellWidth=$$1(cell.node()).outerWidth();var leftMost=$$1(_this.s.dt.column(numCols-_this.c.right).header());var leftMostPos=leftMost.offset();if(cellPos.left+cellWidth>leftMostPos.left){var currScroll=scroll.scrollLeft();scroll.scrollLeft(currScroll-(leftMostPos.left-(cellPos.left+cellWidth)))}}});this.s.dt.on('draw',function(){_this._addStyles()});this.s.dt.on('column-reorder',function(){_this._addStyles()});this.s.dt.on('column-visibility',function(e,settings,column,state,recalc){if(recalc&&!settings.bDestroying){setTimeout(function(){_this._addStyles()},50)}})};FixedColumns.version='4.2.1';FixedColumns.classes={fixedLeft:'dtfc-fixed-left',fixedRight:'dtfc-fixed-right',leftBottomBlocker:'dtfc-left-bottom-blocker',leftTopBlocker:'dtfc-left-top-blocker',rightBottomBlocker:'dtfc-right-bottom-blocker',rightTopBlocker:'dtfc-right-top-blocker',tableFixedLeft:'dtfc-has-left',tableFixedRight:'dtfc-has-right'};FixedColumns.defaults={i18n:{button:'FixedColumns'},left:1,right:0};return FixedColumns}());/*! FixedColumns 4.2.1
         * 2019-2022 SpryMedia Ltd - datatables.net/license
         */
setJQuery($);$.fn.dataTable.FixedColumns=FixedColumns;$.fn.DataTable.FixedColumns=FixedColumns;var apiRegister=DataTable.Api.register;apiRegister('fixedColumns()',function(){return this});apiRegister('fixedColumns().left()',function(newVal){var ctx=this.context[0];if(newVal!==undefined){ctx._fixedColumns.left(newVal);return this}else{return ctx._fixedColumns.left()}});apiRegister('fixedColumns().right()',function(newVal){var ctx=this.context[0];if(newVal!==undefined){ctx._fixedColumns.right(newVal);return this}else{return ctx._fixedColumns.right()}});DataTable.ext.buttons.fixedColumns={action:function(e,dt,node,config){if($(node).attr('active')){$(node).removeAttr('active').removeClass('active');dt.fixedColumns().left(0);dt.fixedColumns().right(0)}else{$(node).attr('active','true').addClass('active');dt.fixedColumns().left(config.config.left);dt.fixedColumns().right(config.config.right)}},config:{left:1,right:0},init:function(dt,node,config){if(dt.settings()[0]._fixedColumns===undefined){_init(dt.settings(),config)}
$(node).attr('active','true').addClass('active');dt.button(node).text(config.text||dt.i18n('buttons.fixedColumns',dt.settings()[0]._fixedColumns.c.i18n.button))},text:null};function _init(settings,options){if(options===void 0){options=null}
var api=new DataTable.Api(settings);var opts=options?options:api.init().fixedColumns||DataTable.defaults.fixedColumns;var fixedColumns=new FixedColumns(api,opts);return fixedColumns}
$(document).on('plugin-init.dt',function(e,settings){if(e.namespace!=='dt'){return}
if(settings.oInit.fixedColumns||DataTable.defaults.fixedColumns){if(!settings._fixedColumns){_init(settings,null)}}})}());return DataTable}));var wdtCustomUploader=null;var inlineEditClass=function(tableDescription,dataTableOptions,$){var obj={params:{tableId:tableDescription.tableId,currentCell:'',editInputId:'dt_cell_edit',editSelector:'#dt_cell_edit',validationPopover:'<div class="wpDataTablesPopover editError"></div>',value:'',table:'',cellData:'',cellInfo:'',rowId:'',columnId:'',columnType:'',inputType:'',columnHeader:'',notNull:'',code:'',expandButton:'',valid:!0,additionalValid:!0,dateFormat:tableDescription.datepickFormat.replace(/y/g,'yy').replace(/Y/g,'yyyy').replace(/M/g,'mmm'),timeFormat:tableDescription.timeFormat},datePicker:'',timePicker:'',removeSelection:function(){if(document.selection&&document.selection.empty){document.selection.empty()}else if(window.getSelection){var sel=window.getSelection();sel.removeAllRanges()}},setErrorPopoverPosition:function(element,popover){var position='';var offset=element.offset();var width=element.outerWidth(!0);var height=element.outerHeight(!0);var centerX=offset.left+(width/2)-(popover.width/2);var centerY=offset.top-(popover.height);position={"top":centerY,"left":centerX};return position},parseLink:function(){if(obj.params.value!==null){if(obj.params.value.indexOf('<a ')!==-1){var $link=$(obj.params.value);if($.inArray(obj.params.columnType,['link','email'])!==-1){if($link.attr('href').indexOf($link.html())===-1){obj.params.value=$link.attr('href').replace('mailto:','')+'||'+$link.html()}else{obj.params.value=$link.html()}}else if($.inArray(obj.params.columnType,['icon'])!==-1){var $linkthumb=$($link.html());if($link.attr('href').indexOf($link.html())===-1){obj.params.value=$link.attr('href')+'||'+$linkthumb.attr('src')}else{obj.params.value=$link.html()}}}else if(obj.params.value.indexOf('<img ')!==-1){$link=$(obj.params.value);obj.params.value=$link.attr('src')}}},saveData:function(val,rowId,columnId){if($.inArray(obj.params.columnHeader,['wdt_created_by','wdt_created_at','wdt_last_edited_by','wdt_last_edited_at'])!==-1){obj.params.currentCell.empty().html(wpdatatables_frontend_strings.cannot_be_edit);$(document).click(function(){$this.html($value)})}else{$(tableDescription.selector).addClass('overlayed');wpDataTables[obj.params.tableId].fnUpdate(val,rowId,columnId,0,0);var data=wpDataTables[obj.params.tableId].fnGetData(rowId);wpDataTablesFunctions[obj.params.tableId].applyData(data);wpDataTablesFunctions[obj.params.tableId].saveTableData(!0,!1,!1);$(tableDescription.selector).find('td').removeClass('editing')}},fieldValidation:function(type,element){if(obj.params.value!=''){if(type=='email'){var field_valid=wdtValidateEmail(obj.params.value);var message=wpdatatables_inline_strings.invalid_email}else if(type=='link'){var field_valid=wdtValidateURL(obj.params.value);var message=wpdatatables_inline_strings.invalid_link}
if(!field_valid){if(!element.closest('td').hasClass('error')){element.closest('td').addClass('error');$('body').prepend(obj.params.validationPopover);$('.wpDataTablesPopover.editError').html(message);var popoverSize={"width":$('.wpDataTablesPopover.editError').outerWidth(),"height":$('.wpDataTablesPopover.editError').outerHeight()+7};$('.wpDataTablesPopover.editError').css(obj.setErrorPopoverPosition(element,popoverSize));setTimeout(function(){$('.wpDataTablesPopover.editError').animateFadeOut('300',function(){$(this).remove();element.closest('td').removeClass('error')})},2000)}
obj.params.valid=!1;obj.params.additionalValid=!1}else{$(this).closest('td').removeClass('error');obj.params.valid=!0;obj.params.additionalValid=!0}}else{obj.params.valid=!0;obj.params.additionalValid=!0}},mandatoryFieldValidation:function(element){if(obj.params.value==''||!obj.params.additionalValid){if(!element.closest('td').hasClass('error')){element.closest('td').addClass('error');$('body').prepend(obj.params.validationPopover);$('.wpDataTablesPopover.editError').html(wpdatatables_inline_strings.cannot_be_empty);var popoverSize={"width":$('.wpDataTablesPopover.editError').outerWidth(),"height":$('.wpDataTablesPopover.editError').outerHeight()+7};$('.wpDataTablesPopover.editError').css(obj.setErrorPopoverPosition(element,popoverSize));setTimeout(function(){$('.wpDataTablesPopover.editError').animateFadeOut('300',function(){$(this).remove();element.closest('td').removeClass('error')})},2000);obj.params.valid=!1}}else{element.closest('td').removeClass('error');obj.params.valid=!0}},validateAndSave:function($this){var type_array=['email','link'];if($.inArray(obj.params.inputType,type_array)!==-1&&obj.params.columnType!='icon'){obj.fieldValidation(obj.params.inputType,$this);if(obj.params.notNull){obj.mandatoryFieldValidation($this)}}else{if(obj.params.notNull){obj.mandatoryFieldValidation($this)}}
if(obj.params.valid){$.when(obj.saveData(obj.params.value,obj.params.rowId,obj.params.columnId)).then(obj.params.currentCell.prepend(obj.params.expandButton))}},FieldTypeMethods:{noneditableCell:function(){obj.params.currentCell.removeClass('editing');var $this=obj.params.currentCell;var $value=obj.params.currentCell.html();obj.params.currentCell.empty().html(wpdatatables_inline_strings.cannot_be_edit);$(document).click(function(){$this.html($value)})},textCell:function(){obj.parseLink();var entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':'&quot;',"'":'&#39;',"/":'&#x2F;'};function escapeHtml(string){return String(string).replace(/[&<>"'\/]/g,function(s){return entityMap[s]})}
var value=obj.params.value==null?'':escapeHtml(obj.params.value);obj.params.code='<input type="text" data-input_type="'+obj.params.inputType+'" id="'+obj.params.editInputId+'" value="'+value+'" />';obj.params.currentCell.empty().append(obj.params.code);$(obj.params.editSelector).focus();$(obj.params.editSelector).blur(function(){obj.params.value=$(this).val();obj.validateAndSave($(this))})},textareaCell:function(){obj.parseLink();if(obj.params.value==null){obj.params.value=''}else if(obj.params.value.indexOf('<br/>')!=-1){obj.params.value=(obj.params.value).replace(/<br\/>/g,"\n")}
obj.params.code='<textarea data-input_type="'+obj.params.inputType+'" id="'+obj.params.editInputId+'" rows="3" columns="50">'+obj.params.value+'</textarea>';obj.params.currentCell.empty().append(obj.params.code);$(obj.params.editSelector).focus();$(obj.params.editSelector).blur(function(){obj.params.value=$(this).val();obj.validateAndSave($(this))})},tinymceCell:function(){obj.parseLink();if(obj.params.value.indexOf('<br/>')!=-1){obj.params.value=(obj.params.value).replace(/<br\/>/g,"\n")}
obj.params.code='<textarea class="wpdt-tiny-mce" data-input_type="'+obj.params.inputType+'" id="'+obj.params.editInputId+'" rows="3" columns="50">'+obj.params.value+'</textarea>';obj.params.currentCell.empty().append(obj.params.code);tinymce.init({selector:obj.params.editSelector,auto_focus:obj.params.editInputId,menubar:!1,plugins:'link image media lists hr colorpicker fullscreen textcolor code',toolbar:'undo redo formatselect bold italic underline strikethrough subscript superscript | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent blockquote | hr fullscreen | link unlink image | forecolor backcolor removeformat | code',init_instance_callback:function(editor){editor.on('blur',function(e){tinymce.triggerSave();obj.params.value=$(obj.params.editSelector).val();obj.validateAndSave($(obj.params.editSelector))})}})},linkCell:function(){obj.parseLink();if(obj.params.value==null){obj.params.value=''}
obj.params.code='<input type="text" data-input_type="'+obj.params.inputType+'" id="'+obj.params.editInputId+'" value="'+obj.params.value+'" />';obj.params.currentCell.empty().append(obj.params.code);$(obj.params.editSelector).focus();$(obj.params.editSelector).blur(function(){if(obj.params.columnType=='icon'){obj.params.value='<img src="'+$(this).val()+'" />'}else{obj.params.value=$(this).val()}
obj.validateAndSave($(this))})},dateCell:function(){obj.params.code='<input type="text" class="wdt-datepicker" data-input_type="'+obj.params.inputType+'" id="'+obj.params.editInputId+'" value="'+obj.params.value+'" />';obj.params.currentCell.empty().append(obj.params.code);$(obj.params.editSelector).focus();var hasFired=!1;$(obj.params.editSelector).blur(function(){if(!hasFired){hasFired=!0;obj.params.value=$(this).val();obj.validateAndSave($(this))}})},timeCell:function(){obj.params.code='<input type="text" class="wdt-timepicker" data-input_type="'+obj.params.inputType+'" id="'+obj.params.editInputId+'" value="'+obj.params.value+'" />';obj.params.currentCell.empty().append(obj.params.code);$(obj.params.editSelector).focus();var hasFired=!1;$(obj.params.editSelector).blur(function(){if(!hasFired){hasFired=!0;obj.params.value=$(this).val();obj.validateAndSave($(this))}})},datetimeCell:function(){obj.params.code='<input type="text" class="wdt-datetimepicker" data-input_type="'+obj.params.inputType+'" id="'+obj.params.editInputId+'" value="'+obj.params.value+'" />';obj.params.currentCell.empty().append(obj.params.code);$(obj.params.editSelector).focus();var hasFired=!1;$(obj.params.editSelector).blur(function(){if(!hasFired){hasFired=!0;obj.params.value=$(this).val();obj.validateAndSave($(this))}})},selectboxCell:function(){obj.params.code=$('#'+tableDescription.tableId+'_'+obj.params.columnHeader).clone();obj.params.currentCell.empty().append(obj.params.code.attr('id',obj.params.editInputId).removeClass('selecter-element'));if(obj.params.possibleValuesAjax===-1){if(obj.params.value!==null){$.each(obj.params.value.split(", "),function(i,e){$(obj.params.editSelector+' option[value="'+e+'"]').prop("selected",!0)})}}
$(obj.params.editSelector).selectpicker();if(obj.params.possibleValuesAjax!==-1){$(obj.params.editSelector).html('');$(obj.params.editSelector).selectpicker('val','').selectpicker('refresh');function loadAllPossibleValues(){$.ajax({url:tableDescription.adminAjaxBaseUrl,method:'POST',data:{wdtNonce:$('#wdtNonce').val(),action:'wpdatatables_get_column_possible_values',tableId:tableDescription.tableWpId,originalHeader:obj.params.columnHeader},success:function(data){data=JSON.parse(data);if(obj.params.inputType==='multi-selectbox'){var uniqueValues=[...new Set(data.map(item=>item.value.split(', ').map(val=>val.trim())).flat())]}
$(obj.params.editSelector).empty();if(obj.params.inputType==='multi-selectbox'){$.each(uniqueValues,function(index,item){var selected=obj.params.value!==null&&obj.params.value.includes(item);$(obj.params.editSelector).append('<option value="'+item+'"'+(selected?' selected':'')+'>'+item+'</option>')})}else{$.each(data,function(index,item){$(obj.params.editSelector).append('<option value="'+item.value+'">'+item.value+'</option>')})}
if(obj.params.value!==null&&obj.params.inputType==='selectbox'){$(obj.params.editSelector).append('<option selected value="'+obj.params.value+'">'+obj.params.value+'</option>')}
$(obj.params.editSelector).on('changed.bs.select',function(){if(obj.params.inputType==='selectbox'){$(obj.params.editSelector).data('changed',!0);obj.params.value=$(this).val();if($.type(obj.params.value)==='array'){obj.params.value=obj.params.value.join(', ')}
obj.validateAndSave($(this))}});$(obj.params.editSelector).selectpicker('refresh')}})}
$(obj.params.editSelector).on('show.bs.select',function(e){if(!tableDescription.advancedEditingOptions.aoColumns[obj.params.columnId].searchInSelectBoxEditing&&$(obj.params.editSelector).closest('.bootstrap-select').find('.bs-searchbox').length){$(obj.params.editSelector).closest('.bootstrap-select').find('.bs-searchbox')[0].style.display='none'}
setTimeout(function(){$(obj.params.editSelector).closest('.bootstrap-select').find('.bs-searchbox .form-control').val('').trigger('keyup')},500);loadAllPossibleValues()})}
obj.params.currentCell.css({'overflow':'initial'});$(obj.params.editSelector).selectpicker('toggle');if(obj.params.possibleValuesAjax===-1){if(obj.params.inputType==='selectbox'){$(obj.params.editSelector).on('changed.bs.select',function(){$(obj.params.editSelector).data('changed',!0);obj.params.value=$(this).val();if($.type(obj.params.value)==='array'){obj.params.value=obj.params.value.join(', ')}
obj.validateAndSave($(this))})}}
$(obj.params.editSelector).on('hidden.bs.select',function(){obj.params.value=$('#'+obj.params.editInputId).val();if($.type(obj.params.value)==='array'){obj.params.value=obj.params.value.join(', ')}
obj.validateAndSave($(this))})},attachmentCell:function(){obj.params.value='';var src='';if(obj.params.currentCell.find('img').length>0){if(obj.params.currentCell.find('img').attr('src').length>0){src=obj.params.currentCell.find('img').attr('src')}}else if(obj.params.currentCell.find('a').length>0){if(obj.params.currentCell.find('a').attr('href').length>0){src=obj.params.currentCell.find('a').attr('href')}}else{src=obj.params.currentCell.html()}
var fileName=src.substring(src.lastIndexOf('/')+1);obj.params.code='<span class="btn btn-primary m-r-10 fileupload_row_edit_'+tableDescription.tableId+'" '+'id="row_edit_'+tableDescription.tableId+'_sets_button" '+'data-column_type="icon" '+'data-rel_input="row_edit_'+tableDescription.tableId+'_sets">'+'<span class="fileinput-new">'+wpdatatables_inline_strings.selectFileAttachment+'</span>'+'<span class="fileinput-exists">'+wpdatatables_inline_strings.changeFileAttachment+'</span>'+'<input type="hidden" '+'id="row_edit_'+tableDescription.tableId+'_sets" '+'data-key="sets" '+'data-input_type="attachment" '+'value="'+src+'" '+'class="editDialogInput" '+'/>'+'</span>'+'<button class="btn btn-primary fileinput-save m-r-10">'+wpdatatables_inline_strings.saveFileAttachment+'</button>'+'<button class="btn btn-danger fileinput-exists wdt-detach-attachment-file-inline m-r-10" data-dismiss="fileinput">'+wpdatatables_inline_strings.removeFileAttachment+'</button>'+'<span class="fileinput-filename"></span>';obj.params.currentCell.empty().append(obj.params.code);obj.fileUploadInit('row_edit_'+tableDescription.tableId);var $inputElement=$('#row_edit_'+tableDescription.tableId+'_sets');if(fileName!=''){$inputElement.parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');$inputElement.parent().parent().find('.fileinput-filename').text(fileName)}else{$inputElement.parent().parent().removeClass('fileinput-exists').addClass('fileinput-new');$inputElement.parent().parent().find('.fileinput-filename').text('')}
$('.fileinput-save').click(function(){obj.params.value=$('#row_edit_'+tableDescription.tableId+'_sets').val();obj.params.value='<a href="'+obj.params.value+'"></a>';$('#row_edit_'+tableDescription.tableId+'_sets').closest('td').empty().html(obj.params.value);obj.validateAndSave($(this))})}},fileUploadInit:function(selector){if($('.fileupload_'+selector).length){var attachment=null;wdtCustomUploader=wp.media({title:wpdatatables_inline_strings.select_upload_file,button:{text:wpdatatables_inline_strings.choose_file},multiple:!1});$('.fileupload_'+selector).click(function(e){e.preventDefault();var $button=$(this);var $relInput=$('#'+$button.data('rel_input'));if(obj.params.columnType=='icon'){wdtCustomUploader=wp.media({title:wpdatatables_inline_strings.select_upload_file,button:{text:wpdatatables_inline_strings.choose_file},multiple:!1,library:{type:'image'}});wdtCustomUploader.off('select').on('select',function(){attachment=wdtCustomUploader.state().get('selection').first().toJSON();var val=attachment.url;$relInput.parent().parent().parent().find('.fileinput-preview').html('<img src='+val+'>');$relInput.parent().parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');$relInput.parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');if(attachment.sizes.thumbnail){val=attachment.sizes.thumbnail.url+'||'+val}
$relInput.val(val)})}else{wdtCustomUploader.off('select').on('select',function(){attachment=wdtCustomUploader.state().get('selection').first().toJSON();$relInput.val(attachment.url);$relInput.parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');$relInput.parent().parent().find('.fileinput-filename').text(attachment.filename)})}
wdtCustomUploader.open()});$('.wdt-detach-attachment-file-inline').click(function(e){e.preventDefault();e.stopImmediatePropagation();if($(this).parent().find('span.fileupload-'+tableDescription.tableId).data('column_type')=='icon'){$(this).parent().find('input.editDialogInput').val('');$(this).parent().parent().find('.fileinput-preview').html('');$(this).parent().parent().removeClass('fileinput-exists').addClass('fileinput-new');$(this).parent().removeClass('fileinput-exists').addClass('fileinput-new')}else{$(this).parent().find('input.editDialogInput').val('');$(this).parent().find('.fileinput-filename').text('');$(this).parent().removeClass('fileinput-exists').addClass('fileinput-new')}})}},bindClickEvent:function(){$(tableDescription.selector+' tbody').on('dblclick','td',function(e){e.preventDefault();e.stopImmediatePropagation();var target=e.target||e.srcElement;var elementName=target.tagName.toLowerCase();if(elementName=='input'||elementName=='span'||!obj.params.valid||$(this).hasClass('editing')){return!1}
obj.removeSelection();if(!$(this).hasClass("dataTables_empty")){$(this).addClass('editing').attr('aria-label',wpdatatables_inline_strings.inlineEditing+$(this)[0].innerText)}
obj.params.table=$(tableDescription.selector).DataTable();if(wpDataTables[obj.params.tableId].fnSettings().fnRecordsTotal()==0){return!1}
obj.params.cellData=obj.params.table.cell(this).data();obj.params.cellInfo=obj.params.table.cell(this).index();obj.params.columnId=obj.params.cellInfo.column;obj.params.columnType=wpDataTables[obj.params.tableId].fnSettings().aoColumns[obj.params.columnId].wdtType;obj.params.rowId=obj.params.cellInfo.row;obj.params.inputType=dataTableOptions.aoColumnDefs[obj.params.columnId].InputType;obj.params.columnHeader=dataTableOptions.aoColumnDefs[obj.params.columnId].origHeader;obj.params.notNull=dataTableOptions.aoColumnDefs[obj.params.columnId].notNull;obj.params.value=obj.params.cellData;obj.params.currentCell=$(this);obj.params.possibleValuesAjax=tableDescription.advancedEditingOptions.aoColumns[obj.params.columnId].possibleValuesAjax;if($(this).children('.responsiveExpander')!=''){obj.params.expandButton=$(this).children('.responsiveExpander')}
switch(obj.params.inputType){case 'none':obj.FieldTypeMethods.noneditableCell();break;case 'text':obj.FieldTypeMethods.textCell();break;case 'textarea':obj.FieldTypeMethods.textareaCell();break;case 'mce-editor':obj.FieldTypeMethods.tinymceCell();break;case 'link':case 'email':obj.FieldTypeMethods.linkCell();break;case 'date':obj.FieldTypeMethods.dateCell();break;case 'time':obj.FieldTypeMethods.timeCell();break;case 'datetime':obj.FieldTypeMethods.datetimeCell();break;case 'multi-selectbox':case 'selectbox':obj.FieldTypeMethods.selectboxCell();break;case 'attachment':obj.FieldTypeMethods.attachmentCell();break}})}};obj.bindClickEvent()}
;