bnbweb/back/assets/js/jquery.dataTables.min.js

6 lines
81 KiB
JavaScript
Raw Permalink Normal View History

2022-11-14 15:49:28 +00:00
/*! DataTables 1.10.11
* ©2008-2015 SpryMedia Ltd - datatables.net/license
*/
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(b){return a(b,window,document)}):"object"==typeof exports?module.exports=function(b,c){return b||(b=window),c||(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c,b,b.document)}:a(jQuery,window,document)}(function(a,b,c,d){"use strict";function e(b){var c,d,f="a aa ai ao as b fn i m o s ",g={};a.each(b,function(a,h){c=a.match(/^([^A-Z]+?)([A-Z])/),c&&-1!==f.indexOf(c[1]+" ")&&(d=a.replace(c[0],c[2].toLowerCase()),g[d]=a,"o"===c[1]&&e(b[a]))}),b._hungarianMap=g}function f(b,c,g){b._hungarianMap||e(b);var h;a.each(c,function(e,i){h=b._hungarianMap[e],h===d||!g&&c[h]!==d||("o"===h.charAt(0)?(c[h]||(c[h]={}),a.extend(!0,c[h],c[e]),f(b[h],c[h],g)):c[h]=c[e])})}function g(a){var b=Ua.defaults.oLanguage,c=a.sZeroRecords;!a.sEmptyTable&&c&&"No data available in table"===b.sEmptyTable&&Ja(a,a,"sZeroRecords","sEmptyTable"),!a.sLoadingRecords&&c&&"Loading..."===b.sLoadingRecords&&Ja(a,a,"sZeroRecords","sLoadingRecords"),a.sInfoThousands&&(a.sThousands=a.sInfoThousands);var d=a.sDecimal;d&&Sa(d)}function h(a){qb(a,"ordering","bSort"),qb(a,"orderMulti","bSortMulti"),qb(a,"orderClasses","bSortClasses"),qb(a,"orderCellsTop","bSortCellsTop"),qb(a,"order","aaSorting"),qb(a,"orderFixed","aaSortingFixed"),qb(a,"paging","bPaginate"),qb(a,"pagingType","sPaginationType"),qb(a,"pageLength","iDisplayLength"),qb(a,"searching","bFilter"),"boolean"==typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":""),"boolean"==typeof a.scrollX&&(a.scrollX=a.scrollX?"100%":"");var b=a.aoSearchCols;if(b)for(var c=0,d=b.length;d>c;c++)b[c]&&f(Ua.models.oSearch,b[c])}function i(b){qb(b,"orderable","bSortable"),qb(b,"orderData","aDataSort"),qb(b,"orderSequence","asSorting"),qb(b,"orderDataType","sortDataType");var c=b.aDataSort;c&&!a.isArray(c)&&(b.aDataSort=[c])}function j(b){if(!Ua.__browser){var c={};Ua.__browser=c;var d=a("<div/>").css({position:"fixed",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(a("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(a("<div/>").css({width:"100%",height:10}))).appendTo("body"),e=d.children(),f=e.children();c.barWidth=e[0].offsetWidth-e[0].clientWidth,c.bScrollOversize=100===f[0].offsetWidth&&100!==e[0].clientWidth,c.bScrollbarLeft=1!==Math.round(f.offset().left),c.bBounding=!!d[0].getBoundingClientRect().width,d.remove()}a.extend(b.oBrowser,Ua.__browser),b.oScroll.iBarWidth=Ua.__browser.barWidth}function k(a,b,c,e,f,g){var h,i=e,j=!1;for(c!==d&&(h=c,j=!0);i!==f;)a.hasOwnProperty(i)&&(h=j?b(h,a[i],i,a):a[i],j=!0,i+=g);return h}function l(b,d){var e=Ua.defaults.column,f=b.aoColumns.length,g=a.extend({},Ua.models.oColumn,e,{nTh:d?d:c.createElement("th"),sTitle:e.sTitle?e.sTitle:d?d.innerHTML:"",aDataSort:e.aDataSort?e.aDataSort:[f],mData:e.mData?e.mData:f,idx:f});b.aoColumns.push(g);var h=b.aoPreSearchCols;h[f]=a.extend({},Ua.models.oSearch,h[f]),m(b,f,a(d).data())}function m(b,c,e){var g=b.aoColumns[c],h=b.oClasses,j=a(g.nTh);if(!g.sWidthOrig){g.sWidthOrig=j.attr("width")||null;var k=(j.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);k&&(g.sWidthOrig=k[1])}e!==d&&null!==e&&(i(e),f(Ua.defaults.column,e),e.mDataProp===d||e.mData||(e.mData=e.mDataProp),e.sType&&(g._sManualType=e.sType),e.className&&!e.sClass&&(e.sClass=e.className),a.extend(g,e),Ja(g,e,"sWidth","sWidthOrig"),e.iDataSort!==d&&(g.aDataSort=[e.iDataSort]),Ja(g,e,"aDataSort"));var l=g.mData,m=B(l),n=g.mRender?B(g.mRender):null,o=function(a){return"string"==typeof a&&-1!==a.indexOf("@")};g._bAttrSrc=a.isPlainObject(l)&&(o(l.sort)||o(l.type)||o(l.filter)),g._setter=null,g.fnGetData=function(a,b,c){var e=m(a,b,d,c);return n&&b?n(e,b,a,c):e},g.fnSetData=function(a,b,c){return C(l)(a,b,c)},"number"!=typeof l&&(b._rowReadObject=!0),b.oFeatures.bSort||(g.bSortable=!1,j.addClass(h.sSortableNone));var p=-1!==a.inArray("asc",g.asSorting),q=-1!==a.inArray("desc",g.asSorting);g.bSortable&&(p||q)?p&&!q?(g.sSortingClass=h.sSortableAsc,g.sSortingClassJUI=h.sSortJUIAscAllowed):!p&&q?(g.sSortingClass=h.sSortableDesc,g.sSortingCla
for(b=0,d=k.length;d>b;b++)g[k[b]]=b;j===f.length?k.sort(function(a,b){var c,d,e,h,j,k=f.length,l=i[a]._aSortData,m=i[b]._aSortData;for(e=0;k>e;e++)if(j=f[e],c=l[j.col],d=m[j.col],h=d>c?-1:c>d?1:0,0!==h)return"asc"===j.dir?h:-h;return c=g[a],d=g[b],d>c?-1:c>d?1:0}):k.sort(function(a,b){var c,d,e,j,k,l,m=f.length,n=i[a]._aSortData,o=i[b]._aSortData;for(e=0;m>e;e++)if(k=f[e],c=n[k.col],d=o[k.col],l=h[k.type+"-"+k.dir]||h["string-"+k.dir],j=l(c,d),0!==j)return j;return c=g[a],d=g[b],d>c?-1:c>d?1:0})}a.bSorted=!0}function Aa(a){for(var b,c,d=a.aoColumns,e=ya(a),f=a.oLanguage.oAria,g=0,h=d.length;h>g;g++){var i=d[g],j=i.asSorting,k=i.sTitle.replace(/<.*?>/g,""),l=i.nTh;l.removeAttribute("aria-sort"),i.bSortable?(e.length>0&&e[0].col==g?(l.setAttribute("aria-sort","asc"==e[0].dir?"ascending":"descending"),c=j[e[0].index+1]||j[0]):c=j[0],b=k+("asc"===c?f.sSortAscending:f.sSortDescending)):b=k,l.setAttribute("aria-label",b)}}function Ba(b,c,e,f){var g,h=b.aoColumns[c],i=b.aaSorting,j=h.asSorting,k=function(b,c){var e=b._idx;return e===d&&(e=a.inArray(b[1],j)),e+1<j.length?e+1:c?null:0};if("number"==typeof i[0]&&(i=b.aaSorting=[i]),e&&b.oFeatures.bSortMulti){var l=a.inArray(c,kb(i,"0"));-1!==l?(g=k(i[l],!0),null===g&&1===i.length&&(g=0),null===g?i.splice(l,1):(i[l][1]=j[g],i[l]._idx=g)):(i.push([c,j[0],0]),i[i.length-1]._idx=0)}else i.length&&i[0][0]==c?(g=k(i[0]),i.length=1,i[0][1]=j[g],i[0]._idx=g):(i.length=0,i.push([c,j[0]]),i[0]._idx=0);N(b),"function"==typeof f&&f(b)}function Ca(a,b,c,d){var e=a.aoColumns[c];La(b,{},function(b){e.bSortable!==!1&&(a.oFeatures.bProcessing?(oa(a,!0),setTimeout(function(){Ba(a,c,b.shiftKey,d),"ssp"!==Qa(a)&&oa(a,!1)},0)):Ba(a,c,b.shiftKey,d))})}function Da(b){var c,d,e,f=b.aLastSort,g=b.oClasses.sSortColumn,h=ya(b),i=b.oFeatures;if(i.bSort&&i.bSortClasses){for(c=0,d=f.length;d>c;c++)e=f[c].src,a(kb(b.aoData,"anCells",e)).removeClass(g+(2>c?c+1:3));for(c=0,d=h.length;d>c;c++)e=h[c].src,a(kb(b.aoData,"anCells",e)).addClass(g+(2>c?c+1:3))}b.aLastSort=h}function Ea(a,b){var c,d=a.aoColumns[b],e=Ua.ext.order[d.sSortDataType];e&&(c=e.call(a.oInstance,a,b,p(a,b)));for(var f,g,h=Ua.ext.type.order[d.sType+"-pre"],i=0,j=a.aoData.length;j>i;i++)f=a.aoData[i],f._aSortData||(f._aSortData=[]),f._aSortData[b]&&!e||(g=e?c[i]:y(a,i,b,"sort"),f._aSortData[b]=h?h(g):g)}function Fa(b){if(b.oFeatures.bStateSave&&!b.bDestroying){var c={time:+new Date,start:b._iDisplayStart,length:b._iDisplayLength,order:a.extend(!0,[],b.aaSorting),search:ca(b.oPreviousSearch),columns:a.map(b.aoColumns,function(a,c){return{visible:a.bVisible,search:ca(b.aoPreSearchCols[c])}})};Na(b,"aoStateSaveParams","stateSaveParams",[b,c]),b.oSavedState=c,b.fnStateSaveCallback.call(b.oInstance,b,c)}}function Ga(b,c){var e,f,g=b.aoColumns;if(b.oFeatures.bStateSave){var h=b.fnStateLoadCallback.call(b.oInstance,b);if(h&&h.time){var i=Na(b,"aoStateLoadParams","stateLoadParams",[b,h]);if(-1===a.inArray(!1,i)){var j=b.iStateDuration;if(!(j>0&&h.time<+new Date-1e3*j)&&g.length===h.columns.length){for(b.oLoadedState=a.extend(!0,{},h),h.start!==d&&(b._iDisplayStart=h.start,b.iInitDisplayStart=h.start),h.length!==d&&(b._iDisplayLength=h.length),h.order!==d&&(b.aaSorting=[],a.each(h.order,function(a,c){b.aaSorting.push(c[0]>=g.length?[0,c[1]]:c)})),h.search!==d&&a.extend(b.oPreviousSearch,da(h.search)),e=0,f=h.columns.length;f>e;e++){var k=h.columns[e];k.visible!==d&&(g[e].bVisible=k.visible),k.search!==d&&a.extend(b.aoPreSearchCols[e],da(k.search))}Na(b,"aoStateLoaded","stateLoaded",[b,h])}}}}}function Ha(b){var c=Ua.settings,d=a.inArray(b,kb(c,"nTable"));return-1!==d?c[d]:null}function Ia(a,c,d,e){if(d="DataTables warning: "+(a?"table id="+a.sTableId+" - ":"")+d,e&&(d+=". For more information about this error, please see http://datatables.net/tn/"+e),c)b.console&&console.log&&console.log(d);else{var f=Ua.ext,g=f.sErrMode||f.errMode;if(a&&Na(a,null,"error",[a,e,d]),"alert"==g)alert(d);else{if("throw"==g)throw new Error(d);"function"==typeof g&&g(a,e,d)}}}function Ja(b,c,e,f){return a.isArray(e)?void a.each(e,function(d,e){a.isArray(e)?Ja(b,c,e[0],e[1]):Ja(
return a="search"===a?"_aFilterData":"_aSortData",this.iterator("cell",function(b,c,d){return b.aoData[c][a][d]},1)}),Ya("cells().render()","cell().render()",function(a){return this.iterator("cell",function(b,c,d){return y(b,c,d,a)},1)}),Ya("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(a,b,c){return{row:b,column:c,columnVisible:p(a,c)}},1)}),Ya("cells().invalidate()","cell().invalidate()",function(a){return this.iterator("cell",function(b,c,d){G(b,c,a,d)})}),Xa("cell()",function(a,b,c){return Db(this.cells(a,b,c))}),Xa("cell().data()",function(a){var b=this.context,c=this[0];return a===d?b.length&&c.length?y(b[0],c[0].row,c[0].column):d:(z(b[0],c[0].row,c[0].column,a),G(b[0],c[0].row,"data",c[0].column),this)}),Xa("order()",function(b,c){var e=this.context;return b===d?0!==e.length?e[0].aaSorting:d:("number"==typeof b?b=[[b,c]]:a.isArray(b[0])||(b=Array.prototype.slice.call(arguments)),this.iterator("table",function(a){a.aaSorting=b.slice()}))}),Xa("order.listener()",function(a,b,c){return this.iterator("table",function(d){Ca(d,a,b,c)})}),Xa("order.fixed()",function(b){if(!b){var c=this.context,e=c.length?c[0].aaSortingFixed:d;return a.isArray(e)?{pre:e}:e}return this.iterator("table",function(c){c.aaSortingFixed=a.extend(!0,{},b)})}),Xa(["columns().order()","column().order()"],function(b){var c=this;return this.iterator("table",function(d,e){var f=[];a.each(c[e],function(a,c){f.push([c,b])}),d.aaSorting=f})}),Xa("search()",function(b,c,e,f){var g=this.context;return b===d?0!==g.length?g[0].oPreviousSearch.sSearch:d:this.iterator("table",function(d){d.oFeatures.bFilter&&X(d,a.extend({},d.oPreviousSearch,{sSearch:b+"",bRegex:null===c?!1:c,bSmart:null===e?!0:e,bCaseInsensitive:null===f?!0:f}),1)})}),Ya("columns().search()","column().search()",function(b,c,e,f){return this.iterator("column",function(g,h){var i=g.aoPreSearchCols;return b===d?i[h].sSearch:void(g.oFeatures.bFilter&&(a.extend(i[h],{sSearch:b+"",bRegex:null===c?!1:c,bSmart:null===e?!0:e,bCaseInsensitive:null===f?!0:f}),X(g,g.oPreviousSearch,1)))})}),Xa("state()",function(){return this.context.length?this.context[0].oSavedState:null}),Xa("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})}),Xa("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null}),Xa("state.save()",function(){return this.iterator("table",function(a){Fa(a)})}),Ua.versionCheck=Ua.fnVersionCheck=function(a){for(var b,c,d=Ua.version.split("."),e=a.split("."),f=0,g=e.length;g>f;f++)if(b=parseInt(d[f],10)||0,c=parseInt(e[f],10)||0,b!==c)return b>c;return!0},Ua.isDataTable=Ua.fnIsDataTable=function(b){var c=a(b).get(0),d=!1;return a.each(Ua.settings,function(b,e){var f=e.nScrollHead?a("table",e.nScrollHead)[0]:null,g=e.nScrollFoot?a("table",e.nScrollFoot)[0]:null;e.nTable!==c&&f!==c&&g!==c||(d=!0)}),d},Ua.tables=Ua.fnTables=function(b){var c=!1;a.isPlainObject(b)&&(c=b.api,b=b.visible);var d=a.map(Ua.settings,function(c){return!b||b&&a(c.nTable).is(":visible")?c.nTable:void 0});return c?new Wa(d):d},Ua.util={throttle:ta,escapeRegex:aa},Ua.camelToHungarian=f,Xa("$()",function(b,c){var d=this.rows(c).nodes(),e=a(d);return a([].concat(e.filter(b).toArray(),e.find(b).toArray()))}),a.each(["on","one","off"],function(b,c){Xa(c+"()",function(){var b=Array.prototype.slice.call(arguments);b[0].match(/\.dt\b/)||(b[0]+=".dt");var d=a(this.tables().nodes());return d[c].apply(d,b),this})}),Xa("clear()",function(){return this.iterator("table",function(a){E(a)})}),Xa("settings()",function(){return new Wa(this.context,this.context)}),Xa("init()",function(){var a=this.context;return a.length?a[0].oInit:null}),Xa("data()",function(){return this.iterator("table",function(a){return kb(a.aoData,"_aData")}).flatten()}),Xa("destroy()",function(c){return c=c||!1,this.iterator("table",function(d){var e,f=d.nTableWrapper.parentNode,g=d.oClasses,h=d.nTable,i=d.nTBody,j=d.nTHead,k=d.nTFoot,l=a(h),m=a(i),n=a(d.nTableWrapper),o=a.map(d.aoData,function(a){return a.nTr});d.bDestroying=!0,Na(d,"aoDe