@ntlab/ntjs-assets 2.113.0 → 2.114.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /*! ColReorder 2.1.1
1
+ /*! ColReorder 2.1.2
2
2
  * © SpryMedia Ltd - datatables.net/license
3
3
  */
4
4
 
@@ -878,7 +878,7 @@ var ColReorder = /** @class */ (function () {
878
878
  // }
879
879
  // }
880
880
  ColReorder.prototype._isRtl = function () {
881
- return $(this.dt.table()).css('direction') === 'rtl';
881
+ return $(this.dt.table().node()).css('direction') === 'rtl';
882
882
  };
883
883
  ColReorder.defaults = {
884
884
  columns: '',
@@ -886,17 +886,17 @@ var ColReorder = /** @class */ (function () {
886
886
  headerRows: null,
887
887
  order: null
888
888
  };
889
- ColReorder.version = '2.1.1';
889
+ ColReorder.version = '2.1.2';
890
890
  return ColReorder;
891
891
  }());
892
892
 
893
- /*! ColReorder 2.1.1
893
+ /*! ColReorder 2.1.2
894
894
  * © SpryMedia Ltd - datatables.net/license
895
895
  */
896
896
  /**
897
897
  * @summary ColReorder
898
898
  * @description Provide the ability to reorder columns in a DataTable
899
- * @version 2.1.1
899
+ * @version 2.1.2
900
900
  * @author SpryMedia Ltd
901
901
  * @contact datatables.net
902
902
  * @copyright SpryMedia Ltd.
@@ -1,7 +1,7 @@
1
- /*! ColReorder 2.1.1
1
+ /*! ColReorder 2.1.2
2
2
  * © SpryMedia Ltd - datatables.net/license
3
3
  */
4
- (r=>{var o,n;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(t){return r(t,window,document)}):"object"==typeof exports?(o=require("jquery"),n=function(t,e){e.fn.dataTable||require("datatables.net")(t,e)},"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||o(t),n(t,e),r(e,0,t.document)}:(n(window,o),module.exports=r(o,window,window.document))):r(jQuery,window,document)})(function(u,t,h){var n=u.fn.dataTable;function f(t,e,r,o){var n=t.splice(e,r);n.unshift(0),n.unshift(o<e?o:o-r+1),t.splice.apply(t,n)}function l(t){t.rows().invalidate("data"),t.column(0).visible(t.column(0).visible()),t.columns.adjust();var e=t.colReorder.order();t.trigger("columns-reordered",[{order:e,mapping:p(e)}])}function s(t){return t.settings()[0].aoColumns.map(function(t){return t._crOriginalIdx})}function g(t,e,r,o){for(var n=[],i=0;i<t.length;i++){var s=t[i];f(s,r[0],r.length,o);for(var l=0;l<s.length;l++){var a,c=s[l].cell;n.includes(c)||(a=c.getAttribute("data-dt-column").split(",").map(function(t){return e[t]}).join(","),c.setAttribute("data-dt-column",a),n.push(c))}}}function r(t){t.columns().iterator("column",function(t,e){t=t.aoColumns;void 0===t[e]._crOriginalIdx&&(t[e]._crOriginalIdx=e)})}function p(t){for(var e=[],r=0;r<t.length;r++)e[t[r]]=r;return e}function a(t,e,r){var o,n=t.settings()[0],i=n.aoColumns,s=i.map(function(t,e){return e});if(!e.includes(r)){f(s,e[0],e.length,r);var l=p(s);for(f(i,e[0],e.length,r),o=0;o<n.aoData.length;o++){var a=n.aoData[o];if(a){var c=a.anCells;if(c)for(f(c,e[0],e.length,r),u=0;u<c.length;u++)a.nTr&&c[u]&&i[u].bVisible&&a.nTr.appendChild(c[u]),c[u]&&c[u]._DT_CellIndex&&(c[u]._DT_CellIndex.column=u)}}for(o=0;o<i.length;o++){for(var d=i[o],u=0;u<d.aDataSort.length;u++)d.aDataSort[u]=l[d.aDataSort[u]];d.idx=l[d.idx],d.bVisible&&n.colgroup.append(d.colEl)}g(n.aoHeader,l,e,r),g(n.aoFooter,l,e,r),f(n.aoPreSearchCols,e[0],e.length,r),m(l,n.aaSorting),Array.isArray(n.aaSortingFixed)?m(l,n.aaSortingFixed):(n.aaSortingFixed.pre||n.aaSortingFixed.post)&&m(l,n.aaSortingFixed.pre),n.aLastSort.forEach(function(t){t.src=l[t.src]}),t.trigger("column-reorder",[t.settings()[0],{from:e,to:r,mapping:l}])}}function m(t,e){if(e)for(var r=0;r<e.length;r++){var o=e[r];"number"==typeof o?e[r]=t[o]:u.isPlainObject(o)&&void 0!==o.idx?o.idx=t[o.idx]:Array.isArray(o)&&"number"==typeof o[0]&&(o[0]=t[o[0]])}}function c(t,e,r){var o=!1;if(e.length!==t.columns().count())t.error("ColReorder - column count mismatch");else{for(var n=p(e=r?d(t,e,"toCurrent"):e),i=0;i<n.length;i++){var s=n.indexOf(i);i!==s&&(f(n,s,1,i),a(t,[s],i),o=!0)}o&&l(t)}}function d(t,e,r){var o=t.colReorder.order(),n=t.settings()[0].aoColumns;return"toCurrent"===r||"fromOriginal"===r?Array.isArray(e)?e.map(function(t){return o.indexOf(t)}):o.indexOf(e):Array.isArray(e)?e.map(function(t){return n[t]._crOriginalIdx}):n[e]._crOriginalIdx}function v(t,e,r){var o=t.columns().count();return!(e[0]<r&&r<e[e.length]||e[0]<0&&e[e.length-1]>o||r<0&&o<r||!e.includes(r)&&(!i(t.table().header.structure(),e,r)||!i(t.table().footer.structure(),e,r)))}function i(t,e,r){for(var o=(t=>{for(var e=[],r=0;r<t.length;r++){e.push([]);for(var o=0;o<t[r].length;o++){var n=t[r][o];if(n)for(var i=0;i<n.rowspan;i++){e[r+i]||(e[r+i]=[]);for(var s=0;s<n.colspan;s++)e[r+i][o+s]=n.cell}}}return e})(t),n=0;n<o.length;n++)f(o[n],e[0],e.length,r);for(n=0;n<o.length;n++)for(var i=[],s=0;s<o[n].length;s++){var l=o[n][s];if(i.includes(l)){if(i[i.length-1]!==l)return}else i.push(l)}return 1}y.prototype.disable=function(){return this.c.enable=!1,this},y.prototype.enable=function(t){return!1===(t=void 0===t?!0:t)?this.disable():(this.c.enable=!0,this)},y.prototype._addListener=function(t){var r=this;u(t).on("selectstart.colReorder",function(){return!1}).on("mousedown.colReorder touchstart.colReorder",function(t){var e;"mousedown"===t.type&&1!==t.which||!r.c.enable||(e=u("button.dtcc-button_reorder",this)).length&&t.target!==e[0]&&0===e.find(t.target).length||r._mouseDown(t,this)})},y.prototype._createDragNode=function(){var t=this.s.mouse.target,e=t.parent(),r=e.parent(),o=r.parent(),n=t.clone();this.dom.drag=u(o[0].cloneNode(!1)).addClass("dtcr-cloned").append(u(r[0].cloneNode(!1)).append(u(e[0].cloneNode(!1)).append(n[0]))).css({position:"absolute",top:0,left:0,width:u(t).outerWidth(),height:u(t).outerHeight()}).appendTo("body")},y.prototype._cursorPosition=function(t,e){return(-1!==t.type.indexOf("touch")?t.originalEvent.touches[0]:t)[e]},y.prototype._mouseDown=function(t,e){for(var r=this,o=u(t.target).closest("th, td"),n=o.offset(),i=this.dt.columns(this.c.columns).indexes().toArray(),s=u(e).attr("data-dt-column").split(",").map(function(t){return parseInt(t,10)}),l=0;l<s.length;l++)if(!i.includes(s[l]))return!1;this.s.mouse.start.x=this._cursorPosition(t,"pageX"),this.s.mouse.start.y=this._cursorPosition(t,"pageY"),this.s.mouse.offset.x=this._cursorPosition(t,"pageX")-n.left,this.s.mouse.offset.y=this._cursorPosition(t,"pageY")-n.top,this.s.mouse.target=o,this.s.mouse.targets=s;for(var a=0;a<s.length;a++){var c=this.dt.cells(null,s[a],{page:"current"}).nodes().to$(),d="dtcr-moving";0===a&&(d+=" dtcr-moving-first"),a===s.length-1&&(d+=" dtcr-moving-last"),c.addClass(d)}this._regions(s),this._scrollRegions(),u(h).on("mousemove.colReorder touchmove.colReorder",function(t){r._mouseMove(t)}).on("mouseup.colReorder touchend.colReorder",function(t){r._mouseUp(t)})},y.prototype._mouseMove=function(t){if(null===this.dom.drag){if(Math.pow(Math.pow(this._cursorPosition(t,"pageX")-this.s.mouse.start.x,2)+Math.pow(this._cursorPosition(t,"pageY")-this.s.mouse.start.y,2),.5)<5)return;u(h.body).addClass("dtcr-dragging"),this._createDragNode()}this.dom.drag.css({left:this._cursorPosition(t,"pageX")-this.s.mouse.offset.x,top:this._cursorPosition(t,"pageY")-this.s.mouse.offset.y});var e,r=this.dt.table().node(),o=u(r).offset().left,o=this._cursorPosition(t,"pageX")-o,r=(e=this._isRtl()?r.clientWidth-o:o,this.s.dropZones.find(function(t){return t.inlineStart<=e&&e<=t.inlineStart+t.width}));this.s.mouse.absLeft=this._cursorPosition(t,"pageX"),r&&!r.self&&this._move(r,e)},y.prototype._mouseUp=function(t){var e=this;u(h).off(".colReorder"),u(h.body).removeClass("dtcr-dragging"),this.dom.drag&&(this.dom.drag.remove(),this.dom.drag=null,this.s.mouse.target.on("click.dtcr",function(t){return!1}),setTimeout(function(){e.s.mouse.target.off(".dtcr")},10)),this.s.scrollInterval&&clearInterval(this.s.scrollInterval),this.dt.cells(".dtcr-moving").nodes().to$().removeClass("dtcr-moving dtcr-moving-first dtcr-moving-last")},y.prototype._move=function(t,e){var r,o,n=this,i=(this.dt.colReorder.move(this.s.mouse.targets,t.colIdx),this.s.mouse.targets=u(this.s.mouse.target).attr("data-dt-column").split(",").map(function(t){return parseInt(t,10)}),this._regions(this.s.mouse.targets),this.s.mouse.targets.filter(function(t){return n.dt.column(t).visible()})),t=this.s.dropZones.find(function(t){return t.colIdx===i[0]}),s=this.s.dropZones.indexOf(t);t.inlineStart>e&&(o=t.inlineStart-e,r=this.s.dropZones[s-1],t.inlineStart-=o,t.width+=o,r)&&(r.width-=o),(t=this.s.dropZones.find(function(t){return t.colIdx===i[i.length-1]})).inlineStart+t.width<e&&(r=e-(t.inlineStart+t.width),o=this.s.dropZones[s+1],t.width+=r,o)&&(o.inlineStart+=r,o.width-=r)},y.prototype._regions=function(n){var i=this,s=[],l=0,a=0,c=this.dt.columns(this.c.columns).indexes().toArray(),d=this.dt.columns().widths();this.dt.columns().every(function(t,e,r){var o;this.visible()&&(o=d[t],c.includes(t)&&(v(i.dt,n,t)?s.push({colIdx:t,inlineStart:l-a,self:n[0]<=t&&t<=n[n.length-1],width:o+a}):t<n[0]?s.length&&(s[s.length-1].width+=o):t>n[n.length-1]&&(a+=o)),l+=o)}),this.s.dropZones=s},y.prototype._isScrolling=function(){return this.dt.table().body().parentNode!==this.dt.table().header().parentNode},y.prototype._scrollRegions=function(){var e,r,o,n;this._isScrolling()&&(r=u((e=this).dt.table().container()).offset().left,o=u(this.dt.table().container()).outerWidth(),n=this.dt.table().body().parentElement.parentElement,this.s.scrollInterval=setInterval(function(){var t=e.s.mouse.absLeft;-1!==t&&(t<r+75&&n.scrollLeft?n.scrollLeft-=5:r+o-75<t&&n.scrollLeft<n.scrollWidth&&(n.scrollLeft+=5))},25))},y.prototype._isRtl=function(){return"rtl"===u(this.dt.table()).css("direction")},y.defaults={columns:"",enable:!0,headerRows:null,order:null},y.version="2.1.1";
5
- /*! ColReorder 2.1.1
4
+ (r=>{var o,n;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(t){return r(t,window,document)}):"object"==typeof exports?(o=require("jquery"),n=function(t,e){e.fn.dataTable||require("datatables.net")(t,e)},"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||o(t),n(t,e),r(e,0,t.document)}:(n(window,o),module.exports=r(o,window,window.document))):r(jQuery,window,document)})(function(u,t,h){var n=u.fn.dataTable;function f(t,e,r,o){var n=t.splice(e,r);n.unshift(0),n.unshift(o<e?o:o-r+1),t.splice.apply(t,n)}function l(t){t.rows().invalidate("data"),t.column(0).visible(t.column(0).visible()),t.columns.adjust();var e=t.colReorder.order();t.trigger("columns-reordered",[{order:e,mapping:p(e)}])}function s(t){return t.settings()[0].aoColumns.map(function(t){return t._crOriginalIdx})}function g(t,e,r,o){for(var n=[],i=0;i<t.length;i++){var s=t[i];f(s,r[0],r.length,o);for(var l=0;l<s.length;l++){var a,c=s[l].cell;n.includes(c)||(a=c.getAttribute("data-dt-column").split(",").map(function(t){return e[t]}).join(","),c.setAttribute("data-dt-column",a),n.push(c))}}}function r(t){t.columns().iterator("column",function(t,e){t=t.aoColumns;void 0===t[e]._crOriginalIdx&&(t[e]._crOriginalIdx=e)})}function p(t){for(var e=[],r=0;r<t.length;r++)e[t[r]]=r;return e}function a(t,e,r){var o,n=t.settings()[0],i=n.aoColumns,s=i.map(function(t,e){return e});if(!e.includes(r)){f(s,e[0],e.length,r);var l=p(s);for(f(i,e[0],e.length,r),o=0;o<n.aoData.length;o++){var a=n.aoData[o];if(a){var c=a.anCells;if(c)for(f(c,e[0],e.length,r),u=0;u<c.length;u++)a.nTr&&c[u]&&i[u].bVisible&&a.nTr.appendChild(c[u]),c[u]&&c[u]._DT_CellIndex&&(c[u]._DT_CellIndex.column=u)}}for(o=0;o<i.length;o++){for(var d=i[o],u=0;u<d.aDataSort.length;u++)d.aDataSort[u]=l[d.aDataSort[u]];d.idx=l[d.idx],d.bVisible&&n.colgroup.append(d.colEl)}g(n.aoHeader,l,e,r),g(n.aoFooter,l,e,r),f(n.aoPreSearchCols,e[0],e.length,r),m(l,n.aaSorting),Array.isArray(n.aaSortingFixed)?m(l,n.aaSortingFixed):(n.aaSortingFixed.pre||n.aaSortingFixed.post)&&m(l,n.aaSortingFixed.pre),n.aLastSort.forEach(function(t){t.src=l[t.src]}),t.trigger("column-reorder",[t.settings()[0],{from:e,to:r,mapping:l}])}}function m(t,e){if(e)for(var r=0;r<e.length;r++){var o=e[r];"number"==typeof o?e[r]=t[o]:u.isPlainObject(o)&&void 0!==o.idx?o.idx=t[o.idx]:Array.isArray(o)&&"number"==typeof o[0]&&(o[0]=t[o[0]])}}function c(t,e,r){var o=!1;if(e.length!==t.columns().count())t.error("ColReorder - column count mismatch");else{for(var n=p(e=r?d(t,e,"toCurrent"):e),i=0;i<n.length;i++){var s=n.indexOf(i);i!==s&&(f(n,s,1,i),a(t,[s],i),o=!0)}o&&l(t)}}function d(t,e,r){var o=t.colReorder.order(),n=t.settings()[0].aoColumns;return"toCurrent"===r||"fromOriginal"===r?Array.isArray(e)?e.map(function(t){return o.indexOf(t)}):o.indexOf(e):Array.isArray(e)?e.map(function(t){return n[t]._crOriginalIdx}):n[e]._crOriginalIdx}function v(t,e,r){var o=t.columns().count();return!(e[0]<r&&r<e[e.length]||e[0]<0&&e[e.length-1]>o||r<0&&o<r||!e.includes(r)&&(!i(t.table().header.structure(),e,r)||!i(t.table().footer.structure(),e,r)))}function i(t,e,r){for(var o=(t=>{for(var e=[],r=0;r<t.length;r++){e.push([]);for(var o=0;o<t[r].length;o++){var n=t[r][o];if(n)for(var i=0;i<n.rowspan;i++){e[r+i]||(e[r+i]=[]);for(var s=0;s<n.colspan;s++)e[r+i][o+s]=n.cell}}}return e})(t),n=0;n<o.length;n++)f(o[n],e[0],e.length,r);for(n=0;n<o.length;n++)for(var i=[],s=0;s<o[n].length;s++){var l=o[n][s];if(i.includes(l)){if(i[i.length-1]!==l)return}else i.push(l)}return 1}y.prototype.disable=function(){return this.c.enable=!1,this},y.prototype.enable=function(t){return!1===(t=void 0===t?!0:t)?this.disable():(this.c.enable=!0,this)},y.prototype._addListener=function(t){var r=this;u(t).on("selectstart.colReorder",function(){return!1}).on("mousedown.colReorder touchstart.colReorder",function(t){var e;"mousedown"===t.type&&1!==t.which||!r.c.enable||(e=u("button.dtcc-button_reorder",this)).length&&t.target!==e[0]&&0===e.find(t.target).length||r._mouseDown(t,this)})},y.prototype._createDragNode=function(){var t=this.s.mouse.target,e=t.parent(),r=e.parent(),o=r.parent(),n=t.clone();this.dom.drag=u(o[0].cloneNode(!1)).addClass("dtcr-cloned").append(u(r[0].cloneNode(!1)).append(u(e[0].cloneNode(!1)).append(n[0]))).css({position:"absolute",top:0,left:0,width:u(t).outerWidth(),height:u(t).outerHeight()}).appendTo("body")},y.prototype._cursorPosition=function(t,e){return(-1!==t.type.indexOf("touch")?t.originalEvent.touches[0]:t)[e]},y.prototype._mouseDown=function(t,e){for(var r=this,o=u(t.target).closest("th, td"),n=o.offset(),i=this.dt.columns(this.c.columns).indexes().toArray(),s=u(e).attr("data-dt-column").split(",").map(function(t){return parseInt(t,10)}),l=0;l<s.length;l++)if(!i.includes(s[l]))return!1;this.s.mouse.start.x=this._cursorPosition(t,"pageX"),this.s.mouse.start.y=this._cursorPosition(t,"pageY"),this.s.mouse.offset.x=this._cursorPosition(t,"pageX")-n.left,this.s.mouse.offset.y=this._cursorPosition(t,"pageY")-n.top,this.s.mouse.target=o,this.s.mouse.targets=s;for(var a=0;a<s.length;a++){var c=this.dt.cells(null,s[a],{page:"current"}).nodes().to$(),d="dtcr-moving";0===a&&(d+=" dtcr-moving-first"),a===s.length-1&&(d+=" dtcr-moving-last"),c.addClass(d)}this._regions(s),this._scrollRegions(),u(h).on("mousemove.colReorder touchmove.colReorder",function(t){r._mouseMove(t)}).on("mouseup.colReorder touchend.colReorder",function(t){r._mouseUp(t)})},y.prototype._mouseMove=function(t){if(null===this.dom.drag){if(Math.pow(Math.pow(this._cursorPosition(t,"pageX")-this.s.mouse.start.x,2)+Math.pow(this._cursorPosition(t,"pageY")-this.s.mouse.start.y,2),.5)<5)return;u(h.body).addClass("dtcr-dragging"),this._createDragNode()}this.dom.drag.css({left:this._cursorPosition(t,"pageX")-this.s.mouse.offset.x,top:this._cursorPosition(t,"pageY")-this.s.mouse.offset.y});var e,r=this.dt.table().node(),o=u(r).offset().left,o=this._cursorPosition(t,"pageX")-o,r=(e=this._isRtl()?r.clientWidth-o:o,this.s.dropZones.find(function(t){return t.inlineStart<=e&&e<=t.inlineStart+t.width}));this.s.mouse.absLeft=this._cursorPosition(t,"pageX"),r&&!r.self&&this._move(r,e)},y.prototype._mouseUp=function(t){var e=this;u(h).off(".colReorder"),u(h.body).removeClass("dtcr-dragging"),this.dom.drag&&(this.dom.drag.remove(),this.dom.drag=null,this.s.mouse.target.on("click.dtcr",function(t){return!1}),setTimeout(function(){e.s.mouse.target.off(".dtcr")},10)),this.s.scrollInterval&&clearInterval(this.s.scrollInterval),this.dt.cells(".dtcr-moving").nodes().to$().removeClass("dtcr-moving dtcr-moving-first dtcr-moving-last")},y.prototype._move=function(t,e){var r,o,n=this,i=(this.dt.colReorder.move(this.s.mouse.targets,t.colIdx),this.s.mouse.targets=u(this.s.mouse.target).attr("data-dt-column").split(",").map(function(t){return parseInt(t,10)}),this._regions(this.s.mouse.targets),this.s.mouse.targets.filter(function(t){return n.dt.column(t).visible()})),t=this.s.dropZones.find(function(t){return t.colIdx===i[0]}),s=this.s.dropZones.indexOf(t);t.inlineStart>e&&(o=t.inlineStart-e,r=this.s.dropZones[s-1],t.inlineStart-=o,t.width+=o,r)&&(r.width-=o),(t=this.s.dropZones.find(function(t){return t.colIdx===i[i.length-1]})).inlineStart+t.width<e&&(r=e-(t.inlineStart+t.width),o=this.s.dropZones[s+1],t.width+=r,o)&&(o.inlineStart+=r,o.width-=r)},y.prototype._regions=function(n){var i=this,s=[],l=0,a=0,c=this.dt.columns(this.c.columns).indexes().toArray(),d=this.dt.columns().widths();this.dt.columns().every(function(t,e,r){var o;this.visible()&&(o=d[t],c.includes(t)&&(v(i.dt,n,t)?s.push({colIdx:t,inlineStart:l-a,self:n[0]<=t&&t<=n[n.length-1],width:o+a}):t<n[0]?s.length&&(s[s.length-1].width+=o):t>n[n.length-1]&&(a+=o)),l+=o)}),this.s.dropZones=s},y.prototype._isScrolling=function(){return this.dt.table().body().parentNode!==this.dt.table().header().parentNode},y.prototype._scrollRegions=function(){var e,r,o,n;this._isScrolling()&&(r=u((e=this).dt.table().container()).offset().left,o=u(this.dt.table().container()).outerWidth(),n=this.dt.table().body().parentElement.parentElement,this.s.scrollInterval=setInterval(function(){var t=e.s.mouse.absLeft;-1!==t&&(t<r+75&&n.scrollLeft?n.scrollLeft-=5:r+o-75<t&&n.scrollLeft<n.scrollWidth&&(n.scrollLeft+=5))},25))},y.prototype._isRtl=function(){return"rtl"===u(this.dt.table().node()).css("direction")},y.defaults={columns:"",enable:!0,headerRows:null,order:null},y.version="2.1.2";
5
+ /*! ColReorder 2.1.2
6
6
  * © SpryMedia Ltd - datatables.net/license
7
7
  */var b=y;function y(o,n){this.dom={drag:null},this.c={columns:null,enable:null,headerRows:null,order:null},this.s={dropZones:[],mouse:{absLeft:-1,offset:{x:-1,y:-1},start:{x:-1,y:-1},target:null,targets:[]},scrollInterval:null};var t,e,i=this;o.settings()[0]._colReorder||((o.settings()[0]._colReorder=this).dt=o,u.extend(this.c,y.defaults,n),r(o),o.on("stateSaveParams",function(t,e,r){r.colReorder=s(o)}),o.on("destroy",function(){o.off(".colReorder"),o.colReorder.reset()}),t=o.state.loaded(),e=this.c.order,(e=t&&t.colReorder&&o.columns().count()===t.colReorder.length?t.colReorder:e)&&o.ready(function(){c(o,e,!0)}),o.table().header.structure().forEach(function(t,e){for(var r=n.headerRows,o=0;o<t.length;o++)r&&!r.includes(e)||t[o]&&t[o].cell&&i._addListener(t[o].cell)}))}return n.Api.register("colReorder.enable()",function(e){return this.iterator("table",function(t){t._colReorder&&t._colReorder.enable(e)})}),n.Api.register("colReorder.disable()",function(){return this.iterator("table",function(t){t._colReorder&&t._colReorder.disable()})}),n.Api.register("colReorder.move()",function(t,e){return r(this),v(this,t=Array.isArray(t)?t:[t],e)?this.tables().every(function(){a(this,t,e),l(this)}):(this.error("ColReorder - invalid move"),this)}),n.Api.register("colReorder.order()",function(t,e){return r(this),t?this.tables().every(function(){c(this,t,e)}):this.context.length?s(this):null}),n.Api.register("colReorder.reset()",function(){return r(this),this.tables().every(function(){var t=this.columns().every(function(t){return t}).flatten().toArray();c(this,t,!0)})}),n.Api.register("colReorder.transpose()",function(t,e){return r(this),d(this,t,e=e||"toCurrent")}),n.ColReorder=b,u(h).on("stateLoadInit.dt",function(t,e,r){if("dt"===t.namespace){t=new n.Api(e);if(r.colReorder&&t.columns().count()===r.colReorder.length)if(t.ready())c(t,r.colReorder,!0);else if(m(r.colReorder,r.order),r.columns){for(var o=0;o<r.columns.length;o++)r.columns[o]._cr_sort=r.colReorder[o];r.columns.sort(function(t,e){return t._cr_sort-e._cr_sort})}}}),u(h).on("preInit.dt",function(t,e){var r,o;"dt"===t.namespace&&(t=e.oInit.colReorder,o=n.defaults.colReorder,t||o)&&(r=u.extend({},o,t),!1!==t)&&(o=new n.Api(e),new b(o,r))}),n});
@@ -1,4 +1,4 @@
1
- /*! DateTime picker for DataTables.net v1.6.0
1
+ /*! DateTime picker for DataTables.net v1.6.1
2
2
  *
3
3
  * © SpryMedia Ltd, all rights reserved.
4
4
  * License: MIT datatables.net/license/mit
@@ -48,7 +48,7 @@
48
48
 
49
49
  /**
50
50
  * @summary DateTime picker for DataTables.net
51
- * @version 1.6.0
51
+ * @version 1.6.1
52
52
  * @file dataTables.dateTime.js
53
53
  * @author SpryMedia Ltd
54
54
  * @contact www.datatables.net/contact
@@ -879,6 +879,12 @@ $.extend(DateTime.prototype, {
879
879
  */
880
880
  _hide: function (destroy) {
881
881
  if (!destroy && (this.dom.input.attr('type') === 'hidden' || this.c.alwaysVisible)) {
882
+ // Normally we wouldn't need to redraw the calander if it changes
883
+ // and then hides, but if it is hidden, then we do need to make sure
884
+ // that it is correctly up to date.
885
+ this._setCalander();
886
+ this._setTime();
887
+
882
888
  return;
883
889
  }
884
890
 
@@ -1759,7 +1765,7 @@ DateTime.defaults = {
1759
1765
  yearRange: 25
1760
1766
  };
1761
1767
 
1762
- DateTime.version = '1.6.0';
1768
+ DateTime.version = '1.6.1';
1763
1769
 
1764
1770
  /**
1765
1771
  * CommonJS factory function pass through. Matches DataTables.
@@ -1793,6 +1799,7 @@ if (!window.DateTime) {
1793
1799
  // Global DataTable
1794
1800
  if (window.DataTable) {
1795
1801
  window.DataTable.DateTime = DateTime;
1802
+ DataTable.use('datetime', DateTime);
1796
1803
  }
1797
1804
 
1798
1805
  // Make available via jQuery
@@ -1,6 +1,6 @@
1
- /*! DateTime picker for DataTables.net v1.6.0
1
+ /*! DateTime picker for DataTables.net v1.6.1
2
2
  *
3
3
  * © SpryMedia Ltd, all rights reserved.
4
4
  * License: MIT datatables.net/license/mit
5
5
  */
6
- !function(s){var i;"function"==typeof define&&define.amd?define(["jquery"],function(t){return s(t,window,document)}):"object"==typeof exports?(i=require("jquery"),"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||i(t),s(e,t,t.document)}:module.exports=s(i,window,window.document)):s(jQuery,window,document)}(function(g,o,i){"use strict";function n(t,e){if(n.factory(t,e))return n;if(void 0===a&&(a=o.moment||o.dayjs||o.luxon||null),this.c=g.extend(!0,{},n.defaults,e),e=this.c.classPrefix,!a&&"YYYY-MM-DD"!==this.c.format)throw"DateTime: Without momentjs, dayjs or luxon only the format 'YYYY-MM-DD' can be used";this._isLuxon()&&"YYYY-MM-DD"==this.c.format&&(this.c.format="yyyy-MM-dd"),"string"==typeof this.c.minDate&&(this.c.minDate=new Date(this.c.minDate)),"string"==typeof this.c.maxDate&&(this.c.maxDate=new Date(this.c.maxDate));var s=g('<div class="'+e+'"><div class="'+e+'-date"><div class="'+e+'-title"><div class="'+e+'-iconLeft"><button type="button"></button></div><div class="'+e+'-iconRight"><button type="button"></button></div><div class="'+e+'-label"><span></span><select class="'+e+'-month"></select></div><div class="'+e+'-label"><span></span><select class="'+e+'-year"></select></div></div><div class="'+e+'-buttons"><a class="'+e+'-clear"></a><a class="'+e+'-today"></a><a class="'+e+'-selected"></a></div><div class="'+e+'-calendar"></div></div><div class="'+e+'-time"><div class="'+e+'-hours"></div><div class="'+e+'-minutes"></div><div class="'+e+'-seconds"></div></div><div class="'+e+'-error"></div></div>');this.dom={container:s,date:s.find("."+e+"-date"),title:s.find("."+e+"-title"),calendar:s.find("."+e+"-calendar"),time:s.find("."+e+"-time"),error:s.find("."+e+"-error"),buttons:s.find("."+e+"-buttons"),clear:s.find("."+e+"-clear"),today:s.find("."+e+"-today"),selected:s.find("."+e+"-selected"),previous:s.find("."+e+"-iconLeft"),next:s.find("."+e+"-iconRight"),input:g(t)},this.s={d:null,display:null,minutesRange:null,secondsRange:null,namespace:"datetime-"+n._instance++,parts:{date:null!==this.c.format.match(/[yYMDd]|L(?!T)|l/),time:null!==this.c.format.match(/[Hhm]|LT|LTS/),seconds:-1!==this.c.format.indexOf("s"),hours12:null!==this.c.format.match(/[haA]/)},showTo:null},this.dom.container.append(this.dom.date).append(this.dom.time).append(this.dom.error),this.dom.date.append(this.dom.title).append(this.dom.buttons).append(this.dom.calendar),this.dom.input.addClass("dt-datetime"),this._constructor()}var a;return g.extend(n.prototype,{destroy:function(){clearTimeout(this.s.showTo),this._hide(!0),this.dom.container.off().empty(),this.dom.input.removeClass("dt-datetime").removeAttr("autocomplete").off(".datetime")},display:function(t,e){return void 0!==t&&this.s.display.setUTCFullYear(t),void 0!==e&&this.s.display.setUTCMonth(e-1),void 0!==t||void 0!==e?(this._setTitle(),this._setCalander(),this):{month:this.s.display.getUTCMonth()+1,year:this.s.display.getUTCFullYear()}},errorMsg:function(t){var e=this.dom.error;return t?e.html(t):e.empty(),this},hide:function(){return this._hide(),this},max:function(t){return this.c.maxDate="string"==typeof t?new Date(t):t,this._optionsTitle(),this._setCalander(),this},min:function(t){return this.c.minDate="string"==typeof t?new Date(t):t,this._optionsTitle(),this._setCalander(),this},owns:function(t){return 0<g(t).parents().filter(this.dom.container).length},val:function(t,e){var s;return void 0===t?this.s.d:(s=this.s.d,t instanceof Date?this.s.d=this._dateToUtc(t):null===t||""===t?this.s.d=null:"--now"===t?this.s.d=this._dateToUtc(new Date):"string"==typeof t&&(this.s.d=this._dateToUtc(this._convert(t,this.c.format,null))),!e&&void 0!==e||(this.s.d?this._writeOutput(!1,null===s&&null!==this.s.d||null!==s&&null===this.s.d||s.toString()!==this.s.d.toString()):this.dom.input.val(t)),this.s.display=this.s.d?new Date(this.s.d.toString()):new Date,this.s.display.setUTCDate(1),this._setTitle(),this._setCalander(),this._setTime(),this)},valFormat:function(t,e){return e?(this.val(this._convert(e,t,null)),this):this._convert(this.val(),null,t)},_constructor:function(){function a(){var t=o.dom.input.val();t!==e&&(o.c.onChange.call(o,t,o.s.d,o.dom.input),e=t)}var o=this,d=this.c.classPrefix,e=this.dom.input.val();this.s.parts.date||this.dom.date.css("display","none"),this.s.parts.time||this.dom.time.css("display","none"),this.s.parts.seconds||(this.dom.time.children("div."+d+"-seconds").remove(),this.dom.time.children("span").eq(1).remove()),this.c.buttons.clear||this.dom.clear.css("display","none"),this.c.buttons.today||this.dom.today.css("display","none"),this.c.buttons.selected||this.dom.selected.css("display","none"),this._optionsTitle(),g(i).on("i18n.dt",function(t,e){e.oLanguage.datetime&&(g.extend(!0,o.c.i18n,e.oLanguage.datetime),o._optionsTitle())}),"hidden"!==this.dom.input.attr("type")&&!this.c.alwaysVisible||(this.dom.container.addClass("inline"),this.c.attachTo="input",this.val(this.dom.input.val(),!1),this._show()),e&&this.val(e,!1),this.dom.input.attr("autocomplete","off").on("focus.datetime click.datetime",function(){o.dom.container.is(":visible")||o.dom.input.is(":disabled")||(e=o.dom.input.val(),o.val(e,!1),o._show())}).on("keyup.datetime",function(){o.val(o.dom.input.val(),!1)}),this.dom.container[0].addEventListener("focusin",function(t){t.stopPropagation()}),this.dom.container.on("change","select",function(){var t,e,s=g(this),i=s.val();s.hasClass(d+"-month")?(o._correctMonth(o.s.display,i),o._setTitle(),o._setCalander()):s.hasClass(d+"-year")?(o.s.display.setUTCFullYear(i),o._setTitle(),o._setCalander()):s.hasClass(d+"-hours")||s.hasClass(d+"-ampm")?(o.s.parts.hours12?(t=+g(o.dom.container).find("."+d+"-hours").val(),e="pm"===g(o.dom.container).find("."+d+"-ampm").val(),o.s.d.setUTCHours(12!=t||e?e&&12!=t?12+t:t:0)):o.s.d.setUTCHours(i),o._setTime(),o._writeOutput(!0),a()):s.hasClass(d+"-minutes")?(o.s.d.setUTCMinutes(i),o._setTime(),o._writeOutput(!0),a()):s.hasClass(d+"-seconds")&&(o.s.d.setSeconds(i),o._setTime(),o._writeOutput(!0),a()),o.dom.input.focus(),o._position()}).on("click",function(t){var e=o.s.d,s="span"===t.target.nodeName.toLowerCase()?t.target.parentNode:t.target,i=s.nodeName.toLowerCase();if("select"!==i)if(t.stopPropagation(),"a"===i&&(t.preventDefault(),g(s).hasClass(d+"-clear")?(o.s.d=null,o.dom.input.val(""),o._writeOutput(),o._setCalander(),o._setTime(),a()):g(s).hasClass(d+"-today")?(o.s.display=new Date,o._setTitle(),o._setCalander()):g(s).hasClass(d+"-selected")&&(o.s.display=new Date(o.s.d.getTime()),o._setTitle(),o._setCalander())),"button"===i){t=g(s),i=t.parent();if(i.hasClass("disabled")&&!i.hasClass("range"))t.blur();else if(i.hasClass(d+"-iconLeft"))o.s.display.setUTCMonth(o.s.display.getUTCMonth()-1),o._setTitle(),o._setCalander(),o.dom.input.focus();else if(i.hasClass(d+"-iconRight"))o._correctMonth(o.s.display,o.s.display.getUTCMonth()+1),o._setTitle(),o._setCalander(),o.dom.input.focus();else{if(t.parents("."+d+"-time").length){var s=t.data("value"),n=t.data("unit"),e=o._needValue();if("minutes"===n){if(i.hasClass("disabled")&&i.hasClass("range"))return o.s.minutesRange=s,void o._setTime();o.s.minutesRange=null}if("seconds"===n){if(i.hasClass("disabled")&&i.hasClass("range"))return o.s.secondsRange=s,void o._setTime();o.s.secondsRange=null}if("am"===s){if(!(12<=e.getUTCHours()))return;s=e.getUTCHours()-12}else if("pm"===s){if(!(e.getUTCHours()<12))return;s=e.getUTCHours()+12}e["hours"===n?"setUTCHours":"minutes"===n?"setUTCMinutes":"setSeconds"](s),o._setCalander(),o._setTime(),o._writeOutput(!0)}else(e=o._needValue()).setUTCDate(1),e.setUTCFullYear(t.data("year")),e.setUTCMonth(t.data("month")),e.setUTCDate(t.data("day")),o._writeOutput(!0),o.s.parts.time?(o._setCalander(),o._setTime()):setTimeout(function(){o._hide()},10);a()}}else o.dom.input.focus()})},_compareDates:function(t,e){return this._isLuxon()?a.DateTime.fromJSDate(t).toUTC().toISODate()===a.DateTime.fromJSDate(e).toUTC().toISODate():this._dateToUtcString(t)===this._dateToUtcString(e)},_convert:function(t,e,s){var i;return t&&(a?this._isLuxon()?(i=t instanceof Date?a.DateTime.fromJSDate(t).toUTC():a.DateTime.fromFormat(t,e)).isValid?s?i.toFormat(s):i.toJSDate():null:(i=t instanceof Date?a.utc(t,void 0,this.c.locale,this.c.strict):a(t,e,this.c.locale,this.c.strict)).isValid()?s?i.format(s):i.toDate():null:!e&&!s||e&&s?t:e?(i=t.match(/(\d{4})\-(\d{2})\-(\d{2})/))?new Date(i[1],i[2]-1,i[3]):null:t.getUTCFullYear()+"-"+this._pad(t.getUTCMonth()+1)+"-"+this._pad(t.getUTCDate()))},_correctMonth:function(t,e){var s=this._daysInMonth(t.getUTCFullYear(),e),i=t.getUTCDate()>s;t.setUTCMonth(e),i&&(t.setUTCDate(s),t.setUTCMonth(e))},_daysInMonth:function(t,e){return[31,t%4==0&&(t%100!=0||t%400==0)?29:28,31,30,31,30,31,31,30,31,30,31][e]},_dateToUtc:function(t){return t&&new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()))},_dateToUtcString:function(t){return this._isLuxon()?a.DateTime.fromJSDate(t).toUTC().toISODate():t.getUTCFullYear()+"-"+this._pad(t.getUTCMonth()+1)+"-"+this._pad(t.getUTCDate())},_hide:function(t){(t||"hidden"!==this.dom.input.attr("type")&&!this.c.alwaysVisible)&&(t=this.s.namespace,this.dom.container.detach(),g(o).off("."+t),g(i).off("keydown."+t).off("keyup."+t).off("click."+t),g("div.dataTables_scrollBody").off("scroll."+t),g("div.DTE_Body_Content").off("scroll."+t),g(this.dom.input[0].offsetParent).off("."+t))},_hours24To12:function(t){return 0===t?12:12<t?t-12:t},_htmlDay:function(t){var e,s=this.c.classPrefix;return t.empty?'<td class="'+s+'-empty"></td>':(e=["selectable"],t.disabled&&e.push("disabled"),t.today&&e.push("now"),t.selected&&e.push("selected"),'<td data-day="'+t.day+'" class="'+e.join(" ")+'"><button class="'+s+"-button "+s+'-day" type="button" data-year="'+t.year+'" data-month="'+t.month+'" data-day="'+t.day+'"><span>'+t.day+"</span></button></td>")},_htmlMonth:function(t,e){for(var s=this._dateToUtc(new Date),i=this._daysInMonth(t,e),n=new Date(Date.UTC(t,e,1)).getUTCDay(),a=[],o=[],d=(0<this.c.firstDay&&(n-=this.c.firstDay)<0&&(n+=7),i+n),r=d;7<r;)r-=7;d+=7-r;var l=this.c.minDate,h=this.c.maxDate;l&&(l.setUTCHours(0),l.setUTCMinutes(0),l.setSeconds(0)),h&&(h.setUTCHours(23),h.setUTCMinutes(59),h.setSeconds(59));for(var c=0,u=0;c<d;c++){var m=new Date(Date.UTC(t,e,c-n+1)),f=!!this.s.d&&this._compareDates(m,this.s.d),p=this._compareDates(m,s),y=c<n||i+n<=c,T=l&&m<l||h&&h<m,v=this.c.disableDays,f={day:c-n+1,month:e,year:t,selected:f,today:p,disabled:T=Array.isArray(v)&&-1!==g.inArray(m.getUTCDay(),v)||"function"==typeof v&&!0===v(m)?!0:T,empty:y};o.push(this._htmlDay(f)),7==++u&&(this.c.showWeekNumber&&o.unshift(this._htmlWeekOfYear(c-n,e,t)),a.push("<tr>"+o.join("")+"</tr>"),o=[],u=0)}var _,D=this.c.classPrefix,C=D+"-table";return this.c.showWeekNumber&&(C+=" weekNumber"),l&&(_=l>=new Date(Date.UTC(t,e,1,0,0,0)),this.dom.title.find("div."+D+"-iconLeft").css("display",_?"none":"block")),h&&(_=h<new Date(Date.UTC(t,e+1,1,0,0,0)),this.dom.title.find("div."+D+"-iconRight").css("display",_?"none":"block")),'<table class="'+C+'"><thead>'+this._htmlMonthHead()+"</thead><tbody>"+a.join("")+"</tbody></table>"},_htmlMonthHead:function(){var t=[],e=this.c.firstDay,s=this.c.i18n;this.c.showWeekNumber&&t.push("<th></th>");for(var i=0;i<7;i++)t.push("<th>"+function(t){for(t+=e;7<=t;)t-=7;return s.weekdays[t]}(i)+"</th>");return t.join("")},_htmlWeekOfYear:function(t,e,s){e=new Date(s,e,t,0,0,0,0),e.setDate(e.getDate()+4-(e.getDay()||7)),t=new Date(s,0,1),s=Math.ceil(((e-t)/864e5+1)/7);return'<td class="'+this.c.classPrefix+'-week">'+s+"</td>"},_isLuxon:function(){return!!(a&&a.DateTime&&a.Duration&&a.Settings)},_needValue:function(){return this.s.d||(this.s.d=this._dateToUtc(new Date),this.s.parts.time)||(this.s.d.setUTCHours(0),this.s.d.setUTCMinutes(0),this.s.d.setSeconds(0),this.s.d.setMilliseconds(0)),this.s.d},_options:function(t,e,s){s=s||e;var i=this.dom.container.find("select."+this.c.classPrefix+"-"+t);i.empty();for(var n=0,a=e.length;n<a;n++)i.append('<option value="'+e[n]+'">'+s[n]+"</option>")},_optionSet:function(t,e){var t=this.dom.container.find("select."+this.c.classPrefix+"-"+t),s=t.parent().children("span"),e=(t.val(e),t.find("option:selected"));s.html(0!==e.length?e.text():this.c.i18n.unknown)},_optionsTime:function(n,a,o,d,t){var e,r=this.c.classPrefix,s=this.dom.container.find("div."+r+"-"+n),i=12===a?function(t){return t}:this._pad,l=r+"-table",h=this.c.i18n;if(s.length){var c="",u=10,m=function(t,e,s){12===a&&"number"==typeof t&&(12<=o&&(t+=12),12==t?t=0:24==t&&(t=12));var i=o===t||"am"===t&&o<12||"pm"===t&&12<=o?"selected":"";return"number"==typeof t&&d&&-1===g.inArray(t,d)&&(i+=" disabled"),s&&(i+=" "+s),'<td class="selectable '+i+'"><button class="'+r+"-button "+r+'-day" type="button" data-unit="'+n+'" data-value="'+t+'"><span>'+e+"</span></button></td>"};if(12===a){for(c+="<tr>",e=1;e<=6;e++)c+=m(e,i(e));for(c=(c+=m("am",h.amPm[0]))+"</tr>"+"<tr>",e=7;e<=12;e++)c+=m(e,i(e));c=c+m("pm",h.amPm[1])+"</tr>",u=7}else{if(24===a)for(var f=0,p=0;p<4;p++){for(c+="<tr>",e=0;e<6;e++)c+=m(f,i(f)),f++;c+="</tr>"}else{for(c+="<tr>",p=0;p<60;p+=10)c+=m(p,i(p),"range");var c=c+"</tr>"+('</tbody></thead><table class="'+l+" "+l+'-nospace"><tbody>'),y=null!==t?t:-1===o?0:10*Math.floor(o/10);for(c+="<tr>",p=y+1;p<y+10;p++)c+=m(p,i(p));c+="</tr>"}u=6}s.empty().append('<table class="'+l+'"><thead><tr><th colspan="'+u+'">'+h[n]+"</th></tr></thead><tbody>"+c+"</tbody></table>")}},_optionsTitle:function(){var t=this.c.i18n,e=this.c.minDate,s=this.c.maxDate,e=e?e.getFullYear():null,s=s?s.getFullYear():null,e=null!==e?e:(new Date).getFullYear()-this.c.yearRange,s=null!==s?s:(new Date).getFullYear()+this.c.yearRange;this._options("month",this._range(0,11),t.months),this._options("year",this._range(e,s)),this.dom.today.text(t.today).text(t.today),this.dom.selected.text(t.selected).text(t.selected),this.dom.clear.text(t.clear).text(t.clear),this.dom.previous.attr("title",t.previous).children("button").text(t.previous),this.dom.next.attr("title",t.next).children("button").text(t.next)},_pad:function(t){return t<10?"0"+t:t},_position:function(){var t,e,s,i="input"===this.c.attachTo?this.dom.input.position():this.dom.input.offset(),n=this.dom.container,a=this.dom.input.outerHeight();n.hasClass("inline")?n.insertAfter(this.dom.input):(this.s.parts.date&&this.s.parts.time&&550<g(o).width()?n.addClass("horizontal"):n.removeClass("horizontal"),"input"===this.c.attachTo?n.css({top:i.top+a,left:i.left}).insertAfter(this.dom.input):n.css({top:i.top+a,left:i.left}).appendTo("body"),t=n.outerHeight(),e=n.outerWidth(),s=g(o).scrollTop(),i.top+a+t-s>g(o).height()&&(a=i.top-t,n.css("top",a<0?0:a)),e+i.left>g(o).width()&&(s=g(o).width()-e-5,"input"===this.c.attachTo&&(s-=g(n).offsetParent().offset().left),n.css("left",s<0?0:s)))},_range:function(t,e,s){var i=[];s=s||1;for(var n=t;n<=e;n+=s)i.push(n);return i},_setCalander:function(){this.s.display&&this.dom.calendar.empty().append(this._htmlMonth(this.s.display.getUTCFullYear(),this.s.display.getUTCMonth()))},_setTitle:function(){this._optionSet("month",this.s.display.getUTCMonth()),this._optionSet("year",this.s.display.getUTCFullYear())},_setTime:function(){function t(t){return e.c[t+"Available"]||e._range(0,59,e.c[t+"Increment"])}var e=this,s=this.s.d,i=null,n=null!=(i=this._isLuxon()?a.DateTime.fromJSDate(s).toUTC():i)?i.hour:s?s.getUTCHours():-1;this._optionsTime("hours",this.s.parts.hours12?12:24,n,this.c.hoursAvailable),this._optionsTime("minutes",60,null!=i?i.minute:s?s.getUTCMinutes():-1,t("minutes"),this.s.minutesRange),this._optionsTime("seconds",60,null!=i?i.second:s?s.getSeconds():-1,t("seconds"),this.s.secondsRange)},_show:function(){var e=this,t=this.s.namespace,s=(this._position(),g(o).on("scroll."+t+" resize."+t,function(){e._position()}),g("div.DTE_Body_Content").on("scroll."+t,function(){e._position()}),g("div.dataTables_scrollBody").on("scroll."+t,function(){e._position()}),this.dom.input[0].offsetParent);s!==i.body&&g(s).on("scroll."+t,function(){e._position()}),g(i).on("keydown."+t,function(t){!e.dom.container.is(":visible")||9!==t.keyCode&&13!==t.keyCode||e._hide()}),g(i).on("keyup."+t,function(t){e.dom.container.is(":visible")&&27===t.keyCode&&(t.preventDefault(),e._hide())}),clearTimeout(this.s.showTo),this.dom.input.on("blur",function(t){e.s.showTo=setTimeout(function(){var t=i.activeElement.tagName.toLowerCase();i.activeElement===e.dom.input[0]||e.dom.container.find(i.activeElement).length||["input","select","button"].includes(t)&&e.hide()},10)}),setTimeout(function(){g(i).on("click."+t,function(t){g(t.target).parents().filter(e.dom.container).length||t.target===e.dom.input[0]||e._hide()})},10)},_writeOutput:function(t,e){var s=this.s.d,i="",n=this.dom.input;s&&(i=this._convert(s,null,this.c.format)),n.val(i),void 0!==e&&!e||(s=new Event("change",{bubbles:!0}),n[0].dispatchEvent(s)),"hidden"===n.attr("type")&&this.val(i,!1),t&&n.focus()}}),n.use=function(t){a=t},n._instance=0,n.type="DateTime",n.defaults={alwaysVisible:!1,attachTo:"body",buttons:{clear:!1,selected:!1,today:!1},classPrefix:"dt-datetime",disableDays:null,firstDay:1,format:"YYYY-MM-DD",hoursAvailable:null,i18n:{clear:"Clear",previous:"Previous",next:"Next",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],amPm:["am","pm"],hours:"Hour",minutes:"Minute",seconds:"Second",unknown:"-",today:"Today",selected:"Selected"},maxDate:null,minDate:null,minutesAvailable:null,minutesIncrement:1,strict:!0,locale:"en",onChange:function(){},secondsAvailable:null,secondsIncrement:1,showWeekNumber:!1,yearRange:25},n.version="1.6.0",n.factory=function(t,e){var s=!1;return t&&t.document&&(i=(o=t).document),e&&e.fn&&e.fn.jquery&&(g=e,s=!0),s},o.DateTime||(o.DateTime=n),o.DataTable&&(o.DataTable.DateTime=n),g.fn.dtDateTime=function(t){return this.each(function(){new n(this,t)})},g.fn.dataTable&&(g.fn.dataTable.DateTime=n,g.fn.DataTable.DateTime=n,g.fn.dataTable.Editor)&&(g.fn.dataTable.Editor.DateTime=n),n});
6
+ (s=>{var i;"function"==typeof define&&define.amd?define(["jquery"],function(t){return s(t,window,document)}):"object"==typeof exports?(i=require("jquery"),"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||i(t),s(e,t,t.document)}:module.exports=s(i,window,window.document)):s(jQuery,window,document)})(function(g,o,i){function n(t,e){if(n.factory(t,e))return n;if(void 0===a&&(a=o.moment||o.dayjs||o.luxon||null),this.c=g.extend(!0,{},n.defaults,e),e=this.c.classPrefix,!a&&"YYYY-MM-DD"!==this.c.format)throw"DateTime: Without momentjs, dayjs or luxon only the format 'YYYY-MM-DD' can be used";this._isLuxon()&&"YYYY-MM-DD"==this.c.format&&(this.c.format="yyyy-MM-dd"),"string"==typeof this.c.minDate&&(this.c.minDate=new Date(this.c.minDate)),"string"==typeof this.c.maxDate&&(this.c.maxDate=new Date(this.c.maxDate));var s=g('<div class="'+e+'"><div class="'+e+'-date"><div class="'+e+'-title"><div class="'+e+'-iconLeft"><button type="button"></button></div><div class="'+e+'-iconRight"><button type="button"></button></div><div class="'+e+'-label"><span></span><select class="'+e+'-month"></select></div><div class="'+e+'-label"><span></span><select class="'+e+'-year"></select></div></div><div class="'+e+'-buttons"><a class="'+e+'-clear"></a><a class="'+e+'-today"></a><a class="'+e+'-selected"></a></div><div class="'+e+'-calendar"></div></div><div class="'+e+'-time"><div class="'+e+'-hours"></div><div class="'+e+'-minutes"></div><div class="'+e+'-seconds"></div></div><div class="'+e+'-error"></div></div>');this.dom={container:s,date:s.find("."+e+"-date"),title:s.find("."+e+"-title"),calendar:s.find("."+e+"-calendar"),time:s.find("."+e+"-time"),error:s.find("."+e+"-error"),buttons:s.find("."+e+"-buttons"),clear:s.find("."+e+"-clear"),today:s.find("."+e+"-today"),selected:s.find("."+e+"-selected"),previous:s.find("."+e+"-iconLeft"),next:s.find("."+e+"-iconRight"),input:g(t)},this.s={d:null,display:null,minutesRange:null,secondsRange:null,namespace:"datetime-"+n._instance++,parts:{date:null!==this.c.format.match(/[yYMDd]|L(?!T)|l/),time:null!==this.c.format.match(/[Hhm]|LT|LTS/),seconds:-1!==this.c.format.indexOf("s"),hours12:null!==this.c.format.match(/[haA]/)},showTo:null},this.dom.container.append(this.dom.date).append(this.dom.time).append(this.dom.error),this.dom.date.append(this.dom.title).append(this.dom.buttons).append(this.dom.calendar),this.dom.input.addClass("dt-datetime"),this._constructor()}var a;return g.extend(n.prototype,{destroy:function(){clearTimeout(this.s.showTo),this._hide(!0),this.dom.container.off().empty(),this.dom.input.removeClass("dt-datetime").removeAttr("autocomplete").off(".datetime")},display:function(t,e){return void 0!==t&&this.s.display.setUTCFullYear(t),void 0!==e&&this.s.display.setUTCMonth(e-1),void 0!==t||void 0!==e?(this._setTitle(),this._setCalander(),this):{month:this.s.display.getUTCMonth()+1,year:this.s.display.getUTCFullYear()}},errorMsg:function(t){var e=this.dom.error;return t?e.html(t):e.empty(),this},hide:function(){return this._hide(),this},max:function(t){return this.c.maxDate="string"==typeof t?new Date(t):t,this._optionsTitle(),this._setCalander(),this},min:function(t){return this.c.minDate="string"==typeof t?new Date(t):t,this._optionsTitle(),this._setCalander(),this},owns:function(t){return 0<g(t).parents().filter(this.dom.container).length},val:function(t,e){var s;return void 0===t?this.s.d:(s=this.s.d,t instanceof Date?this.s.d=this._dateToUtc(t):null===t||""===t?this.s.d=null:"--now"===t?this.s.d=this._dateToUtc(new Date):"string"==typeof t&&(this.s.d=this._dateToUtc(this._convert(t,this.c.format,null))),!e&&void 0!==e||(this.s.d?this._writeOutput(!1,null===s&&null!==this.s.d||null!==s&&null===this.s.d||s.toString()!==this.s.d.toString()):this.dom.input.val(t)),this.s.display=this.s.d?new Date(this.s.d.toString()):new Date,this.s.display.setUTCDate(1),this._setTitle(),this._setCalander(),this._setTime(),this)},valFormat:function(t,e){return e?(this.val(this._convert(e,t,null)),this):this._convert(this.val(),null,t)},_constructor:function(){function a(){var t=o.dom.input.val();t!==e&&(o.c.onChange.call(o,t,o.s.d,o.dom.input),e=t)}var o=this,d=this.c.classPrefix,e=this.dom.input.val();this.s.parts.date||this.dom.date.css("display","none"),this.s.parts.time||this.dom.time.css("display","none"),this.s.parts.seconds||(this.dom.time.children("div."+d+"-seconds").remove(),this.dom.time.children("span").eq(1).remove()),this.c.buttons.clear||this.dom.clear.css("display","none"),this.c.buttons.today||this.dom.today.css("display","none"),this.c.buttons.selected||this.dom.selected.css("display","none"),this._optionsTitle(),g(i).on("i18n.dt",function(t,e){e.oLanguage.datetime&&(g.extend(!0,o.c.i18n,e.oLanguage.datetime),o._optionsTitle())}),"hidden"!==this.dom.input.attr("type")&&!this.c.alwaysVisible||(this.dom.container.addClass("inline"),this.c.attachTo="input",this.val(this.dom.input.val(),!1),this._show()),e&&this.val(e,!1),this.dom.input.attr("autocomplete","off").on("focus.datetime click.datetime",function(){o.dom.container.is(":visible")||o.dom.input.is(":disabled")||(e=o.dom.input.val(),o.val(e,!1),o._show())}).on("keyup.datetime",function(){o.val(o.dom.input.val(),!1)}),this.dom.container[0].addEventListener("focusin",function(t){t.stopPropagation()}),this.dom.container.on("change","select",function(){var t,e,s=g(this),i=s.val();s.hasClass(d+"-month")?(o._correctMonth(o.s.display,i),o._setTitle(),o._setCalander()):s.hasClass(d+"-year")?(o.s.display.setUTCFullYear(i),o._setTitle(),o._setCalander()):s.hasClass(d+"-hours")||s.hasClass(d+"-ampm")?(o.s.parts.hours12?(t=+g(o.dom.container).find("."+d+"-hours").val(),e="pm"===g(o.dom.container).find("."+d+"-ampm").val(),o.s.d.setUTCHours(12!=t||e?e&&12!=t?12+t:t:0)):o.s.d.setUTCHours(i),o._setTime(),o._writeOutput(!0),a()):s.hasClass(d+"-minutes")?(o.s.d.setUTCMinutes(i),o._setTime(),o._writeOutput(!0),a()):s.hasClass(d+"-seconds")&&(o.s.d.setSeconds(i),o._setTime(),o._writeOutput(!0),a()),o.dom.input.focus(),o._position()}).on("click",function(t){var e=o.s.d,s="span"===t.target.nodeName.toLowerCase()?t.target.parentNode:t.target,i=s.nodeName.toLowerCase();if("select"!==i)if(t.stopPropagation(),"a"===i&&(t.preventDefault(),g(s).hasClass(d+"-clear")?(o.s.d=null,o.dom.input.val(""),o._writeOutput(),o._setCalander(),o._setTime(),a()):g(s).hasClass(d+"-today")?(o.s.display=new Date,o._setTitle(),o._setCalander()):g(s).hasClass(d+"-selected")&&(o.s.display=new Date(o.s.d.getTime()),o._setTitle(),o._setCalander())),"button"===i){t=g(s),i=t.parent();if(i.hasClass("disabled")&&!i.hasClass("range"))t.blur();else if(i.hasClass(d+"-iconLeft"))o.s.display.setUTCMonth(o.s.display.getUTCMonth()-1),o._setTitle(),o._setCalander(),o.dom.input.focus();else if(i.hasClass(d+"-iconRight"))o._correctMonth(o.s.display,o.s.display.getUTCMonth()+1),o._setTitle(),o._setCalander(),o.dom.input.focus();else{if(t.parents("."+d+"-time").length){var s=t.data("value"),n=t.data("unit"),e=o._needValue();if("minutes"===n){if(i.hasClass("disabled")&&i.hasClass("range"))return o.s.minutesRange=s,void o._setTime();o.s.minutesRange=null}if("seconds"===n){if(i.hasClass("disabled")&&i.hasClass("range"))return o.s.secondsRange=s,void o._setTime();o.s.secondsRange=null}if("am"===s){if(!(12<=e.getUTCHours()))return;s=e.getUTCHours()-12}else if("pm"===s){if(!(e.getUTCHours()<12))return;s=e.getUTCHours()+12}e["hours"===n?"setUTCHours":"minutes"===n?"setUTCMinutes":"setSeconds"](s),o._setCalander(),o._setTime(),o._writeOutput(!0)}else(e=o._needValue()).setUTCDate(1),e.setUTCFullYear(t.data("year")),e.setUTCMonth(t.data("month")),e.setUTCDate(t.data("day")),o._writeOutput(!0),o.s.parts.time?(o._setCalander(),o._setTime()):setTimeout(function(){o._hide()},10);a()}}else o.dom.input.focus()})},_compareDates:function(t,e){return this._isLuxon()?a.DateTime.fromJSDate(t).toUTC().toISODate()===a.DateTime.fromJSDate(e).toUTC().toISODate():this._dateToUtcString(t)===this._dateToUtcString(e)},_convert:function(t,e,s){var i;return t&&(a?this._isLuxon()?(i=t instanceof Date?a.DateTime.fromJSDate(t).toUTC():a.DateTime.fromFormat(t,e)).isValid?s?i.toFormat(s):i.toJSDate():null:(i=t instanceof Date?a.utc(t,void 0,this.c.locale,this.c.strict):a(t,e,this.c.locale,this.c.strict)).isValid()?s?i.format(s):i.toDate():null:!e&&!s||e&&s?t:e?(i=t.match(/(\d{4})\-(\d{2})\-(\d{2})/))?new Date(i[1],i[2]-1,i[3]):null:t.getUTCFullYear()+"-"+this._pad(t.getUTCMonth()+1)+"-"+this._pad(t.getUTCDate()))},_correctMonth:function(t,e){var s=this._daysInMonth(t.getUTCFullYear(),e),i=t.getUTCDate()>s;t.setUTCMonth(e),i&&(t.setUTCDate(s),t.setUTCMonth(e))},_daysInMonth:function(t,e){return[31,t%4==0&&(t%100!=0||t%400==0)?29:28,31,30,31,30,31,31,30,31,30,31][e]},_dateToUtc:function(t){return t&&new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()))},_dateToUtcString:function(t){return this._isLuxon()?a.DateTime.fromJSDate(t).toUTC().toISODate():t.getUTCFullYear()+"-"+this._pad(t.getUTCMonth()+1)+"-"+this._pad(t.getUTCDate())},_hide:function(t){t||"hidden"!==this.dom.input.attr("type")&&!this.c.alwaysVisible?(t=this.s.namespace,this.dom.container.detach(),g(o).off("."+t),g(i).off("keydown."+t).off("keyup."+t).off("click."+t),g("div.dataTables_scrollBody").off("scroll."+t),g("div.DTE_Body_Content").off("scroll."+t),g(this.dom.input[0].offsetParent).off("."+t)):(this._setCalander(),this._setTime())},_hours24To12:function(t){return 0===t?12:12<t?t-12:t},_htmlDay:function(t){var e,s=this.c.classPrefix;return t.empty?'<td class="'+s+'-empty"></td>':(e=["selectable"],t.disabled&&e.push("disabled"),t.today&&e.push("now"),t.selected&&e.push("selected"),'<td data-day="'+t.day+'" class="'+e.join(" ")+'"><button class="'+s+"-button "+s+'-day" type="button" data-year="'+t.year+'" data-month="'+t.month+'" data-day="'+t.day+'"><span>'+t.day+"</span></button></td>")},_htmlMonth:function(t,e){for(var s=this._dateToUtc(new Date),i=this._daysInMonth(t,e),n=new Date(Date.UTC(t,e,1)).getUTCDay(),a=[],o=[],d=(0<this.c.firstDay&&(n-=this.c.firstDay)<0&&(n+=7),i+n),r=d;7<r;)r-=7;d+=7-r;var l=this.c.minDate,h=this.c.maxDate;l&&(l.setUTCHours(0),l.setUTCMinutes(0),l.setSeconds(0)),h&&(h.setUTCHours(23),h.setUTCMinutes(59),h.setSeconds(59));for(var c=0,u=0;c<d;c++){var m=new Date(Date.UTC(t,e,c-n+1)),f=!!this.s.d&&this._compareDates(m,this.s.d),p=this._compareDates(m,s),y=c<n||i+n<=c,T=l&&m<l||h&&h<m,v=this.c.disableDays,f={day:c-n+1,month:e,year:t,selected:f,today:p,disabled:T=Array.isArray(v)&&-1!==g.inArray(m.getUTCDay(),v)||"function"==typeof v&&!0===v(m)?!0:T,empty:y};o.push(this._htmlDay(f)),7==++u&&(this.c.showWeekNumber&&o.unshift(this._htmlWeekOfYear(c-n,e,t)),a.push("<tr>"+o.join("")+"</tr>"),o=[],u=0)}var _,D=this.c.classPrefix,C=D+"-table";return this.c.showWeekNumber&&(C+=" weekNumber"),l&&(_=l>=new Date(Date.UTC(t,e,1,0,0,0)),this.dom.title.find("div."+D+"-iconLeft").css("display",_?"none":"block")),h&&(_=h<new Date(Date.UTC(t,e+1,1,0,0,0)),this.dom.title.find("div."+D+"-iconRight").css("display",_?"none":"block")),'<table class="'+C+'"><thead>'+this._htmlMonthHead()+"</thead><tbody>"+a.join("")+"</tbody></table>"},_htmlMonthHead:function(){var t=[],e=this.c.firstDay,s=this.c.i18n;this.c.showWeekNumber&&t.push("<th></th>");for(var i=0;i<7;i++)t.push("<th>"+(t=>{for(t+=e;7<=t;)t-=7;return s.weekdays[t]})(i)+"</th>");return t.join("")},_htmlWeekOfYear:function(t,e,s){e=new Date(s,e,t,0,0,0,0),e.setDate(e.getDate()+4-(e.getDay()||7)),t=new Date(s,0,1),s=Math.ceil(((e-t)/864e5+1)/7);return'<td class="'+this.c.classPrefix+'-week">'+s+"</td>"},_isLuxon:function(){return!!(a&&a.DateTime&&a.Duration&&a.Settings)},_needValue:function(){return this.s.d||(this.s.d=this._dateToUtc(new Date),this.s.parts.time)||(this.s.d.setUTCHours(0),this.s.d.setUTCMinutes(0),this.s.d.setSeconds(0),this.s.d.setMilliseconds(0)),this.s.d},_options:function(t,e,s){s=s||e;var i=this.dom.container.find("select."+this.c.classPrefix+"-"+t);i.empty();for(var n=0,a=e.length;n<a;n++)i.append('<option value="'+e[n]+'">'+s[n]+"</option>")},_optionSet:function(t,e){var t=this.dom.container.find("select."+this.c.classPrefix+"-"+t),s=t.parent().children("span"),e=(t.val(e),t.find("option:selected"));s.html(0!==e.length?e.text():this.c.i18n.unknown)},_optionsTime:function(n,a,o,d,t){var e,r=this.c.classPrefix,s=this.dom.container.find("div."+r+"-"+n),i=12===a?function(t){return t}:this._pad,l=r+"-table",h=this.c.i18n;if(s.length){var c="",u=10,m=function(t,e,s){12===a&&"number"==typeof t&&(12<=o&&(t+=12),12==t?t=0:24==t&&(t=12));var i=o===t||"am"===t&&o<12||"pm"===t&&12<=o?"selected":"";return"number"==typeof t&&d&&-1===g.inArray(t,d)&&(i+=" disabled"),s&&(i+=" "+s),'<td class="selectable '+i+'"><button class="'+r+"-button "+r+'-day" type="button" data-unit="'+n+'" data-value="'+t+'"><span>'+e+"</span></button></td>"};if(12===a){for(c+="<tr>",e=1;e<=6;e++)c+=m(e,i(e));for(c=(c+=m("am",h.amPm[0]))+"</tr>"+"<tr>",e=7;e<=12;e++)c+=m(e,i(e));c=c+m("pm",h.amPm[1])+"</tr>",u=7}else{if(24===a)for(var f=0,p=0;p<4;p++){for(c+="<tr>",e=0;e<6;e++)c+=m(f,i(f)),f++;c+="</tr>"}else{for(c+="<tr>",p=0;p<60;p+=10)c+=m(p,i(p),"range");var c=c+"</tr>"+('</tbody></thead><table class="'+l+" "+l+'-nospace"><tbody>'),y=null!==t?t:-1===o?0:10*Math.floor(o/10);for(c+="<tr>",p=y+1;p<y+10;p++)c+=m(p,i(p));c+="</tr>"}u=6}s.empty().append('<table class="'+l+'"><thead><tr><th colspan="'+u+'">'+h[n]+"</th></tr></thead><tbody>"+c+"</tbody></table>")}},_optionsTitle:function(){var t=this.c.i18n,e=this.c.minDate,s=this.c.maxDate,e=e?e.getFullYear():null,s=s?s.getFullYear():null,e=null!==e?e:(new Date).getFullYear()-this.c.yearRange,s=null!==s?s:(new Date).getFullYear()+this.c.yearRange;this._options("month",this._range(0,11),t.months),this._options("year",this._range(e,s)),this.dom.today.text(t.today).text(t.today),this.dom.selected.text(t.selected).text(t.selected),this.dom.clear.text(t.clear).text(t.clear),this.dom.previous.attr("title",t.previous).children("button").text(t.previous),this.dom.next.attr("title",t.next).children("button").text(t.next)},_pad:function(t){return t<10?"0"+t:t},_position:function(){var t,e,s,i="input"===this.c.attachTo?this.dom.input.position():this.dom.input.offset(),n=this.dom.container,a=this.dom.input.outerHeight();n.hasClass("inline")?n.insertAfter(this.dom.input):(this.s.parts.date&&this.s.parts.time&&550<g(o).width()?n.addClass("horizontal"):n.removeClass("horizontal"),"input"===this.c.attachTo?n.css({top:i.top+a,left:i.left}).insertAfter(this.dom.input):n.css({top:i.top+a,left:i.left}).appendTo("body"),t=n.outerHeight(),e=n.outerWidth(),s=g(o).scrollTop(),i.top+a+t-s>g(o).height()&&(a=i.top-t,n.css("top",a<0?0:a)),e+i.left>g(o).width()&&(s=g(o).width()-e-5,"input"===this.c.attachTo&&(s-=g(n).offsetParent().offset().left),n.css("left",s<0?0:s)))},_range:function(t,e,s){var i=[];s=s||1;for(var n=t;n<=e;n+=s)i.push(n);return i},_setCalander:function(){this.s.display&&this.dom.calendar.empty().append(this._htmlMonth(this.s.display.getUTCFullYear(),this.s.display.getUTCMonth()))},_setTitle:function(){this._optionSet("month",this.s.display.getUTCMonth()),this._optionSet("year",this.s.display.getUTCFullYear())},_setTime:function(){function t(t){return e.c[t+"Available"]||e._range(0,59,e.c[t+"Increment"])}var e=this,s=this.s.d,i=null,n=null!=(i=this._isLuxon()?a.DateTime.fromJSDate(s).toUTC():i)?i.hour:s?s.getUTCHours():-1;this._optionsTime("hours",this.s.parts.hours12?12:24,n,this.c.hoursAvailable),this._optionsTime("minutes",60,null!=i?i.minute:s?s.getUTCMinutes():-1,t("minutes"),this.s.minutesRange),this._optionsTime("seconds",60,null!=i?i.second:s?s.getSeconds():-1,t("seconds"),this.s.secondsRange)},_show:function(){var e=this,t=this.s.namespace,s=(this._position(),g(o).on("scroll."+t+" resize."+t,function(){e._position()}),g("div.DTE_Body_Content").on("scroll."+t,function(){e._position()}),g("div.dataTables_scrollBody").on("scroll."+t,function(){e._position()}),this.dom.input[0].offsetParent);s!==i.body&&g(s).on("scroll."+t,function(){e._position()}),g(i).on("keydown."+t,function(t){!e.dom.container.is(":visible")||9!==t.keyCode&&13!==t.keyCode||e._hide()}),g(i).on("keyup."+t,function(t){e.dom.container.is(":visible")&&27===t.keyCode&&(t.preventDefault(),e._hide())}),clearTimeout(this.s.showTo),this.dom.input.on("blur",function(t){e.s.showTo=setTimeout(function(){var t=i.activeElement.tagName.toLowerCase();i.activeElement===e.dom.input[0]||e.dom.container.find(i.activeElement).length||["input","select","button"].includes(t)&&e.hide()},10)}),setTimeout(function(){g(i).on("click."+t,function(t){g(t.target).parents().filter(e.dom.container).length||t.target===e.dom.input[0]||e._hide()})},10)},_writeOutput:function(t,e){var s=this.s.d,i="",n=this.dom.input;s&&(i=this._convert(s,null,this.c.format)),n.val(i),void 0!==e&&!e||(s=new Event("change",{bubbles:!0}),n[0].dispatchEvent(s)),"hidden"===n.attr("type")&&this.val(i,!1),t&&n.focus()}}),n.use=function(t){a=t},n._instance=0,n.type="DateTime",n.defaults={alwaysVisible:!1,attachTo:"body",buttons:{clear:!1,selected:!1,today:!1},classPrefix:"dt-datetime",disableDays:null,firstDay:1,format:"YYYY-MM-DD",hoursAvailable:null,i18n:{clear:"Clear",previous:"Previous",next:"Next",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],amPm:["am","pm"],hours:"Hour",minutes:"Minute",seconds:"Second",unknown:"-",today:"Today",selected:"Selected"},maxDate:null,minDate:null,minutesAvailable:null,minutesIncrement:1,strict:!0,locale:"en",onChange:function(){},secondsAvailable:null,secondsIncrement:1,showWeekNumber:!1,yearRange:25},n.version="1.6.1",n.factory=function(t,e){var s=!1;return t&&t.document&&(i=(o=t).document),e&&e.fn&&e.fn.jquery&&(g=e,s=!0),s},o.DateTime||(o.DateTime=n),o.DataTable&&(o.DataTable.DateTime=n,DataTable.use("datetime",n)),g.fn.dtDateTime=function(t){return this.each(function(){new n(this,t)})},g.fn.dataTable&&(g.fn.dataTable.DateTime=n,g.fn.DataTable.DateTime=n,g.fn.dataTable.Editor)&&(g.fn.dataTable.Editor.DateTime=n),n});
@@ -8,10 +8,6 @@ div.dt-container span.select-item {
8
8
  margin-left: 0.5em;
9
9
  }
10
10
 
11
- table.dataTable.table-sm tbody td.select-checkbox::before {
12
- margin-top: -9px;
13
- }
14
-
15
11
  @media screen and (max-width: 640px) {
16
12
  div.dt-container span.select-info,
17
13
  div.dt-container span.select-item {
@@ -19,3 +15,6 @@ table.dataTable.table-sm tbody td.select-checkbox::before {
19
15
  display: block;
20
16
  }
21
17
  }
18
+ table.dataTable.table-sm tbody td.select-checkbox::before {
19
+ margin-top: -9px;
20
+ }
@@ -1 +1 @@
1
- table.dataTable>tbody>tr>.selected{background-color:rgb(13, 110, 253);color:rgb(var(--dt-row-selected-text))}div.dt-container span.select-info,div.dt-container span.select-item{margin-left:.5em}table.dataTable.table-sm tbody td.select-checkbox::before{margin-top:-9px}@media screen and (max-width: 640px){div.dt-container span.select-info,div.dt-container span.select-item{margin-left:0;display:block}}
1
+ table.dataTable>tbody>tr>.selected{background-color:rgb(13, 110, 253);color:rgb(var(--dt-row-selected-text))}div.dt-container span.select-info,div.dt-container span.select-item{margin-left:.5em}@media screen and (max-width: 640px){div.dt-container span.select-info,div.dt-container span.select-item{margin-left:0;display:block}}table.dataTable.table-sm tbody td.select-checkbox::before{margin-top:-9px}
@@ -1,6 +1,6 @@
1
1
  table.dataTable > tbody > tr > .selected {
2
2
  background-color: rgba(13, 110, 253, 0.9);
3
- color: white;
3
+ color: rgb(var(--dt-row-selected-text));
4
4
  }
5
5
 
6
6
  div.dt-container span.select-info,
@@ -8,6 +8,13 @@ div.dt-container span.select-item {
8
8
  margin-left: 0.5em;
9
9
  }
10
10
 
11
+ @media screen and (max-width: 640px) {
12
+ div.dt-container span.select-info,
13
+ div.dt-container span.select-item {
14
+ margin-left: 0;
15
+ display: block;
16
+ }
17
+ }
11
18
  table.dataTable > tbody > tr > .dt-select {
12
19
  text-align: center;
13
20
  vertical-align: middle;
@@ -93,11 +100,3 @@ html.dark table.dataTable input.dt-select-checkbox:indeterminate:after,
93
100
  html[data-bs-theme=dark] table.dataTable input.dt-select-checkbox:indeterminate:after {
94
101
  background-color: white;
95
102
  }
96
-
97
- @media screen and (max-width: 640px) {
98
- div.dt-container span.select-info,
99
- div.dt-container span.select-item {
100
- margin-left: 0;
101
- display: block;
102
- }
103
- }
@@ -1 +1 @@
1
- table.dataTable>tbody>tr>.selected{background-color:rgba(13, 110, 253, 0.9);color:white}div.dt-container span.select-info,div.dt-container span.select-item{margin-left:.5em}table.dataTable>tbody>tr>.dt-select{text-align:center;vertical-align:middle}table.dataTable>thead>tr>.dt-select{text-align:center;vertical-align:middle}table.dataTable>thead>tr>.dt-select input.dt-select-checkbox{margin-left:auto;margin-right:auto}table.dataTable input.dt-select-checkbox{appearance:none;position:relative;display:inline-block;width:12px;height:12px;border:1px solid;border-radius:3px;vertical-align:middle;margin-top:1px;color:inherit;font-size:20px;line-height:1em}table.dataTable input.dt-select-checkbox:checked:after{display:block;content:"✓";margin-top:-8px}table.dataTable input.dt-select-checkbox:indeterminate:after{display:block;position:absolute;content:" ";top:3px;left:3px;height:4px;width:4px;background-color:black;border-radius:2px}table.dataTable>tbody>tr.selected input.dt-select-checkbox:checked{border:1px solid}table.dataTable>tbody>tr>td.select-checkbox,table.dataTable>tbody>tr>th.select-checkbox{position:relative}table.dataTable>tbody>tr>td.select-checkbox:before,table.dataTable>tbody>tr>th.select-checkbox:before{display:block;position:absolute;top:50%;left:50%;width:12px;height:12px;box-sizing:border-box;content:" ";margin-top:-6px;margin-left:-6px;border:1px solid;border-radius:3px}table.dataTable>tbody>tr.selected>td.select-checkbox:before,table.dataTable>tbody>tr.selected>th.select-checkbox:before{border:1px solid;content:"✓";font-size:20px;line-height:6px;text-align:center}table.dataTable.compact>tbody>tr>td.select-checkbox:before,table.dataTable.compact>tbody>tr>th.select-checkbox:before{margin-top:-12px}table.dataTable.compact>tbody>tr.selected>td.select-checkbox:after,table.dataTable.compact>tbody>tr.selected>th.select-checkbox:after{margin-top:-16px}html.dark table.dataTable input.dt-select-checkbox:indeterminate:after,html[data-bs-theme=dark] table.dataTable input.dt-select-checkbox:indeterminate:after{background-color:white}@media screen and (max-width: 640px){div.dt-container span.select-info,div.dt-container span.select-item{margin-left:0;display:block}}
1
+ table.dataTable>tbody>tr>.selected{background-color:rgba(13, 110, 253, 0.9);color:rgb(var(--dt-row-selected-text))}div.dt-container span.select-info,div.dt-container span.select-item{margin-left:.5em}@media screen and (max-width: 640px){div.dt-container span.select-info,div.dt-container span.select-item{margin-left:0;display:block}}table.dataTable>tbody>tr>.dt-select{text-align:center;vertical-align:middle}table.dataTable>thead>tr>.dt-select{text-align:center;vertical-align:middle}table.dataTable>thead>tr>.dt-select input.dt-select-checkbox{margin-left:auto;margin-right:auto}table.dataTable input.dt-select-checkbox{appearance:none;position:relative;display:inline-block;width:12px;height:12px;border:1px solid;border-radius:3px;vertical-align:middle;margin-top:1px;color:inherit;font-size:20px;line-height:1em}table.dataTable input.dt-select-checkbox:checked:after{display:block;content:"✓";margin-top:-8px}table.dataTable input.dt-select-checkbox:indeterminate:after{display:block;position:absolute;content:" ";top:3px;left:3px;height:4px;width:4px;background-color:black;border-radius:2px}table.dataTable>tbody>tr.selected input.dt-select-checkbox:checked{border:1px solid}table.dataTable>tbody>tr>td.select-checkbox,table.dataTable>tbody>tr>th.select-checkbox{position:relative}table.dataTable>tbody>tr>td.select-checkbox:before,table.dataTable>tbody>tr>th.select-checkbox:before{display:block;position:absolute;top:50%;left:50%;width:12px;height:12px;box-sizing:border-box;content:" ";margin-top:-6px;margin-left:-6px;border:1px solid;border-radius:3px}table.dataTable>tbody>tr.selected>td.select-checkbox:before,table.dataTable>tbody>tr.selected>th.select-checkbox:before{border:1px solid;content:"✓";font-size:20px;line-height:6px;text-align:center}table.dataTable.compact>tbody>tr>td.select-checkbox:before,table.dataTable.compact>tbody>tr>th.select-checkbox:before{margin-top:-12px}table.dataTable.compact>tbody>tr.selected>td.select-checkbox:after,table.dataTable.compact>tbody>tr.selected>th.select-checkbox:after{margin-top:-16px}html.dark table.dataTable input.dt-select-checkbox:indeterminate:after,html[data-bs-theme=dark] table.dataTable input.dt-select-checkbox:indeterminate:after{background-color:white}
@@ -1,4 +1,4 @@
1
- /*! Select for DataTables 3.1.2
1
+ /*! Select for DataTables 3.1.3
2
2
  * © SpryMedia Ltd - datatables.net/license/mit
3
3
  */
4
4
 
@@ -56,7 +56,7 @@ DataTable.select.classes = {
56
56
  checkbox: 'dt-select-checkbox'
57
57
  };
58
58
 
59
- DataTable.select.version = '3.1.2';
59
+ DataTable.select.version = '3.1.3';
60
60
 
61
61
  DataTable.select.init = function (dt) {
62
62
  var ctx = dt.settings()[0];
@@ -1,4 +1,4 @@
1
- /*! Select for DataTables 3.1.2
1
+ /*! Select for DataTables 3.1.3
2
2
  * © SpryMedia Ltd - datatables.net/license/mit
3
3
  */
4
- (s=>{var l,c;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return s(e,window,document)}):"object"==typeof exports?(l=require("jquery"),c=function(e,t){t.fn.dataTable||require("datatables.net")(e,t)},"undefined"==typeof window?module.exports=function(e,t){return e=e||window,t=t||l(e),c(e,t),s(t,e,e.document)}:(c(window,l),module.exports=s(l,window,window.document))):s(jQuery,window,document)})(function(v,i,r){var w=v.fn.dataTable;function d(n,e,t){function s(t,s){s<t&&(e=s,s=t,t=e);var e,l=!1;return n.columns(":visible").indexes().filter(function(e){return e===t&&(l=!0),e===s?!(l=!1):l})}function l(t,s){var e,l=n.rows({search:"applied"}).indexes(),c=(l.indexOf(t)>l.indexOf(s)&&(e=s,s=t,t=e),!1);return l.filter(function(e){return e===t&&(c=!0),e===s?!(c=!1):c})}var c,t=n.cells({selected:!0}).any()||t?(c=s(t.column,e.column),l(t.row,e.row)):(c=s(0,e.column),l(0,e.row)),t=n.cells(t,c).flatten();n.cells(e,{selected:!0}).any()?n.cells(t).deselect():n.cells(t).select()}function g(e){var t=w.select.classes.checkbox;return e?t.replace(/ /g,"."):t}function n(e){var t=e.settings()[0]._select.selector;v(e.table().container()).off("mousedown.dtSelect",t).off("mouseup.dtSelect",t).off("click.dtSelect",t),v("body").off("click.dtSelect"+m(e.table().node()))}function c(o){var a,t=v(o.table().container()),s=o.settings()[0],l=s._select.selector;t.on("mousedown.dtSelect",l,function(e){(e.shiftKey||e.metaKey||e.ctrlKey)&&t.css("-moz-user-select","none").one("selectstart.dtSelect",l,function(){return!1}),i.getSelection&&(a=i.getSelection())}).on("mouseup.dtSelect",l,function(){t.css("-moz-user-select","")}).on("click.dtSelect",l,function(e){var t,s=o.select.items();if(a){var l=i.getSelection();if((!l.anchorNode||v(l.anchorNode).closest("table")[0]===o.table().node())&&l!==a)return}var c,l=o.settings()[0],n=o.table().container();v(e.target).closest("div.dt-container")[0]==n&&(n=o.cell(v(e.target).closest("td, th"))).any()&&(c=v.Event("user-select.dt"),u(o,c,[s,n,e]),c.isDefaultPrevented()||(c=n.index(),"row"===s?(t=c.row,p(e,o,l,"row",t)):"column"===s?(t=n.index().column,p(e,o,l,"column",t)):"cell"===s&&(t=n.index(),p(e,o,l,"cell",t)),l._select_lastCell=c))}),v("body").on("click.dtSelect"+m(o.table().node()),function(e){var t;!s._select.blurable||v(e.target).parents().filter(o.table().container()).length||0===v(e.target).parents("html").length||v(e.target).parents("div.DTE").length||(t=v.Event("select-blur.dt"),u(o,t,[e.target,e]),t.isDefaultPrevented())||_(s,!0)})}function u(e,t,s,l){l&&!e.flatten().length||("string"==typeof t&&(t+=".dt"),s.unshift(e),v(e.table().node()).trigger(t,s))}function b(e){return e.mRender&&"selectCheckbox"===e.mRender._name}function l(l,e){if("api"!==l.select.style()&&!1!==l.select.info()){var t=l.settings()[0],s=t._select_set;if(!l.page.info().serverSide)for(var c=s.length-1;0<=c;c--)t.aIds[s[c]]||s.splice(c,1);var n=s.length||l.rows({selected:!0}).count(),o=l.columns({selected:!0}).count(),a=l.cells({selected:!0}).count(),i=("subtractive"===t._select_mode&&(n=l.page.info().recordsDisplay-s.length),function(e,t,s){e.append(v('<span class="select-item"/>').append(l.i18n("select."+t+"s",{_:"%d "+t+"s selected",0:"",1:"1 "+t+" selected"},s)))}),e=v(e),r=v('<span class="select-info"/>'),n=(i(r,"row",n),i(r,"column",o),i(r,"cell",a),e.children("span.select-info"));n.length&&n.remove(),""!==r.text()&&e.append(r)}}function f(e,t,s){e.one("draw",function(){e.row(s).node().focus()}).page(t).draw(!1)}function o(o){var c,a=new w.Api(o);o._select_init=!0,o._select_mode="additive",o._select_set=[],o.aoRowCreatedCallback.push(function(e,t,s){var l,c,n=o.aoData[s],s=a.row(s).id();for((n._select_selected||"additive"===o._select_mode&&o._select_set.includes(s)||"subtractive"===o._select_mode&&!o._select_set.includes(s))&&(n._select_selected=!0,v(e).addClass(o._select.className).find("input."+g(!0)).prop("checked",!0)),l=0,c=o.aoColumns.length;l<c;l++)(o.aoColumns[l]._select_selected||n._selected_cells&&n._selected_cells[l])&&v(n.anCells[l]).addClass(o._select.className)}),(c=a).on("select",function(e,t,s,l){"row"===s&&("additive"===(s=c.settings()[0])._select_mode?y:x)(c,s._select_set,l)}),c.on("deselect",function(e,t,s,l){"row"===s&&("additive"===(s=c.settings()[0])._select_mode?x:y)(c,s._select_set,l)}),a.on("info.dt",function(e,t,s){t._select.infoEls.includes(s)||t._select.infoEls.push(s),l(a,s)}),a.on("select.dtSelect.dt deselect.dtSelect.dt",function(){o._select.infoEls.forEach(function(e){l(a,e)}),a.state.save()}),a.on("destroy.dtSelect",function(){v(a.rows({selected:!0}).nodes()).removeClass(a.settings()[0]._select.className),v("input."+g(!0),a.table().header()).remove(),n(a),a.off(".dtSelect"),v("body").off(".dtSelect"+m(a.table().node()))})}function h(e,t,s,l){var c,n=e[t+"s"]({search:"applied"}).indexes(),l=n.indexOf(l),o=n.indexOf(s);e[t+"s"]({selected:!0}).any()||-1!==l?(o<l&&(c=o,o=l,l=c),n.splice(o+1,n.length),n.splice(0,l)):n.splice(n.indexOf(s)+1,n.length),e[t](s,{selected:!0}).any()?(n.splice(n.indexOf(s),1),e[t+"s"](n).deselect()):e[t+"s"](n).select()}function _(e,t){!t&&"single"!==e._select.style||((t=new w.Api(e)).rows({selected:!0}).deselect(),t.columns({selected:!0}).deselect(),t.cells({selected:!0}).deselect())}function p(e,t,s,l,c){var n=t.select.style(),o=t.select.toggleable(),a=t[l](c,{selected:!0}).any();a&&!o||("os"===n?e.ctrlKey||e.metaKey?t[l](c).select(!a):e.shiftKey?"cell"===l?d(t,c,s._select_lastCell||null):h(t,l,c,s._select_lastCell?s._select_lastCell[l]:null):(o=t[l+"s"]({selected:!0}),a&&1===o.flatten().length?t[l](c).deselect():(o.deselect(),t[l](c).select())):"multi+shift"==n&&e.shiftKey?"cell"===l?d(t,c,s._select_lastCell||null):h(t,l,c,s._select_lastCell?s._select_lastCell[l]:null):t[l](c).select(!a))}function m(e){return e.id.replace(/[^a-zA-Z0-9\-\_]/g,"-")}function y(e,t,s){for(var l=0;l<s.length;l++){var c=e.row(s[l]).id();c&&"undefined"!==c&&!t.includes(c)&&t.push(c)}}function x(e,t,s){for(var l=0;l<s.length;l++){var c=e.row(s[l]).id(),c=t.indexOf(c);-1!==c&&t.splice(c,1)}}w.select={},w.select.classes={checkbox:"dt-select-checkbox"},w.select.version="3.1.2",w.select.init=function(a){var e,t,s,l,c,n,o,i,r,d,u,f,h,_,p,m=a.settings()[0];if(!w.versionCheck("2"))throw"Warning: Select requires DataTables 2 or newer";!m._select&&(e=a.state.loaded(),t=function(e,t,s){if(null!==s&&void 0!==s.select){if(a.rows({selected:!0}).any()&&a.rows().deselect(),void 0!==s.select.rows&&a.rows(s.select.rows).select(),a.columns({selected:!0}).any()&&a.columns().deselect(),void 0!==s.select.columns&&a.columns(s.select.columns).select(),a.cells({selected:!0}).any()&&a.cells().deselect(),void 0!==s.select.cells)for(var l=0;l<s.select.cells.length;l++)a.cell(s.select.cells[l].row,s.select.cells[l].column).select();a.state.save()}},a.on("stateSaveParams",function(e,t,s){s.select={},s.select.rows=a.rows({selected:!0}).ids(!0).toArray(),s.select.columns=a.columns({selected:!0})[0],s.select.cells=a.cells({selected:!0})[0].map(function(e){return{row:a.row(e.row).id(!0),column:e.column}})}).on("stateLoadParams",t).one("init",function(){t(0,0,e)}),l=m.oInit.select,s=w.defaults.select,s=void 0===l?s:l,l="row",o=!(n=!(c="api")),d="td, th",u="selected",p=_=h=!(f=r=!(i=null)),m._select={infoEls:[]},!0===s?(c="os",h=!0):"string"==typeof s?(c=s,h=!0):v.isPlainObject(s)&&(void 0!==s.blurable&&(n=s.blurable),void 0!==s.toggleable&&(o=s.toggleable),void 0!==s.info&&(r=s.info),void 0!==s.items&&(l=s.items),h=(c=void 0!==s.style?s.style:"os",!0),void 0!==s.selector&&(d=s.selector),void 0!==s.className&&(u=s.className),void 0!==s.headerCheckbox&&(f=s.headerCheckbox),void 0!==s.selectable&&(i=s.selectable),void 0!==s.keys&&(_=s.keys),void 0!==s.keysWrap)&&(p=s.keysWrap),a.select.selector(d),a.select.items(l),a.select.style(c),a.select.blurable(n),a.select.toggleable(o),a.select.info(r),a.select.keys(_,p),a.select.selectable(i),m._select.className=u,!h&&v(a.table().node()).hasClass("selectable")&&a.select.style("os"),f||"select-page"===f||"select-all"===f)&&a.ready(function(){var c,n,o;n=f,o=(c=a).settings()[0].aoColumns,c.columns().iterator("column",function(e,t){var s,l;b(o[t])&&(t=c.column(t).header(),(s=v("div.dt-column-header",t)).length&&(t=s),v("input",t).length||(l=v("<input>").attr({class:g(!1),type:"checkbox","aria-label":c.i18n("select.aria.headerCheckbox")||"Select all rows"}).appendTo(t).on("change",function(){this.checked?("select-page"==n?c.rows({page:"current"}):c.rows({search:"applied"})).select():("select-page"==n?c.rows({page:"current",selected:!0}):c.rows({selected:!0})).deselect()}).on("click",function(e){e.stopPropagation()}),c.on("draw select deselect",function(e,t,s){"row"!==s&&s||((s=((e,t)=>{var s=e.settings()[0],l=s._select.selectable,c=0,n=("select-page"==t?e.rows({page:"current",selected:!0}):e.rows({selected:!0})).count(),o=("select-page"==t?e.rows({page:"current",selected:!0}):e.rows({search:"applied",selected:!0})).count();if(l)for(var a=("select-page"==t?e.rows({page:"current"}):e.rows({search:"applied"})).indexes(),i=0;i<a.length;i++){var r=s.aoData[a[i]];l(r._aData,r.nTr,a[i])&&c++}else c=("select-page"==t?e.rows({page:"current"}):e.rows({search:"applied"})).count();return{available:c,count:n,search:o}})(c,n)).search&&s.search<=s.count&&s.search===s.available?l.prop("checked",!0).prop("indeterminate",!1):0===s.search&&0===s.count?l.prop("checked",!1).prop("indeterminate",!1):l.prop("checked",!1).prop("indeterminate",!0))})))})})},v.each([{type:"row",prop:"aoData"},{type:"column",prop:"aoColumns"}],function(e,i){w.ext.selector[i.type].push(function(e,t,s){var l,c=t.selected,n=[];if(!0!==c&&!1!==c)return s;for(var o=0,a=s.length;o<a;o++)(l=e[i.prop][s[o]])&&(!0===c&&!0===l._select_selected||!1===c&&!l._select_selected)&&n.push(s[o]);return n})}),w.ext.selector.cell.push(function(e,t,s){var l,c=t.selected,n=[];if(void 0===c)return s;for(var o=0,a=s.length;o<a;o++)(l=e.aoData[s[o].row])&&(!0===c&&l._selected_cells&&!0===l._selected_cells[s[o].column]||!1===c&&(!l._selected_cells||!l._selected_cells[s[o].column]))&&n.push(s[o]);return n});var e=w.Api.register,t=w.Api.registerPlural;function s(t,s){return function(e){return e.i18n("buttons."+t,s)}}function a(e){e=e._eventNamespace;return"draw.dt.DT"+e+" select.dt.DT"+e+" deselect.dt.DT"+e}e("select()",function(){return this.iterator("table",function(e){w.select.init(new w.Api(e))})}),e("select.blurable()",function(t){return void 0===t?this.context[0]._select.blurable:this.iterator("table",function(e){e._select.blurable=t})}),e("select.toggleable()",function(t){return void 0===t?this.context[0]._select.toggleable:this.iterator("table",function(e){e._select.toggleable=t})}),e("select.info()",function(t){return void 0===t?this.context[0]._select.info:this.iterator("table",function(e){e._select.info=t})}),e("select.items()",function(t){return void 0===t?this.context[0]._select.items:this.iterator("table",function(e){e._select.items=t,u(new w.Api(e),"selectItems",[t])})}),e("select.keys()",function(s,l){return void 0===s?this.context[0]._select.keys:this.iterator("table",function(e){var a,t,i;e._select||w.select.init(new w.Api(e)),e._select.keys=s,e._select.keysWrap=l,a=new w.Api(e),t=(e=a.settings()[0])._select.keys,i=e._select.keysWrap,e="dts-keys-"+e.sTableId,t?(v(a.rows({page:"current"}).nodes()).attr("tabindex",0),a.on("draw."+e,function(){v(a.rows({page:"current"}).nodes()).attr("tabindex",0)}),v(r).on("keydown."+e,function(e){var t,s,l,c,n=e.keyCode,o=r.activeElement;[9,13,32,38,40].includes(n)&&(s=(t=a.rows({page:"current"}).nodes().toArray()).indexOf(o),l=!0,c=a.page.info(),-1!==s)&&(9===n?!1===e.shift&&s===t.length-1?f(a,"next",":first-child"):!0===e.shift&&0===s?f(a,"previous",":last-child"):l=!1:13===n||32===n?(o=a.row(o)).selected()?o.deselect():o.select():38===n?0<s?t[s-1].focus():0<c.start?f(a,"previous",":last-child"):i&&f(a,"last",":last-child"):s<t.length-1?t[s+1].focus():c.page<c.pages-1?f(a,"next",":first-child"):i&&f(a,"first",":first-child"),l)&&(e.stopPropagation(),e.preventDefault())})):(v(a.rows().nodes()).removeAttr("tabindex"),a.off("draw."+e),v(r).off("keydown."+e))})}),e("select.style()",function(s){return void 0===s?this.context[0]._select.style:this.iterator("table",function(e){e._select||w.select.init(new w.Api(e)),e._select_init||o(e),e._select.style=s;var t=new w.Api(e);"api"!==s?t.ready(function(){n(t),c(t)}):n(t),u(new w.Api(e),"selectStyle",[s])})}),e("select.selector()",function(l){return void 0===l?this.context[0]._select.selector:this.iterator("table",function(e){var t=new w.Api(e),s=e._select.style;n(t),e._select.selector=l,s&&"api"!==s?t.ready(function(){n(t),c(t)}):n(t)})}),e("select.selectable()",function(e){var t=this.context[0];return e?(t._select.selectable=e,this):t._select.selectable}),e("select.last()",function(e){var t=this.context[0];return e?(t._select_lastCell=e,this):t._select_lastCell}),e("select.cumulative()",function(l){var e;return l?this.iterator("table",function(e){var t,s;e._select_mode!==l&&(t=new w.Api(e),"subtractive"===l?(s=t.rows({selected:!1}).ids().toArray(),e._select_mode=l,e._select_set.length=0,e._select_set.push.apply(e._select_set,s)):(s=t.rows({selected:!0}).ids().toArray(),e._select_mode=l,e._select_set.length=0,e._select_set.push.apply(e._select_set,s)))}).draw(!1):(e=this.context[0])&&e._select_set?{mode:e._select_mode,rows:e._select_set}:null}),t("rows().select()","row().select()",function(e){var o=this,a=[];return!1===e?this.deselect():(this.iterator("row",function(e,t){_(e);var s=e.aoData[t],l=e.aoColumns;if(e._select.selectable&&!1===e._select.selectable(s._aData,s.nTr,t))return;v(s.nTr).addClass(e._select.className),s._select_selected=!0,a.push(t);for(var c=0;c<l.length;c++){var n=l[c];null===n.sType&&o.columns().types(),b(n)&&((n=s.anCells)&&n[c]&&v("input."+g(!0),n[c]).prop("checked",!0),null!==s._aSortData)&&(s._aSortData[c]=null)}}),this.iterator("table",function(e){u(o,"select",["row",a],!0)}),this)}),e("row().selected()",function(){var e=this.context[0];return!!(e&&this.length&&e.aoData[this[0]]&&e.aoData[this[0]]._select_selected)}),e("row().focus()",function(){var e=this.context[0];e&&this.length&&e.aoData[this[0]]&&e.aoData[this[0]].nTr&&e.aoData[this[0]].nTr.focus()}),e("row().blur()",function(){var e=this.context[0];e&&this.length&&e.aoData[this[0]]&&e.aoData[this[0]].nTr&&e.aoData[this[0]].nTr.blur()}),t("columns().select()","column().select()",function(e){var s=this;return!1===e?this.deselect():(this.iterator("column",function(e,t){_(e),e.aoColumns[t]._select_selected=!0;t=new w.Api(e).column(t);v(t.header()).addClass(e._select.className),v(t.footer()).addClass(e._select.className),t.nodes().to$().addClass(e._select.className)}),this.iterator("table",function(e,t){u(s,"select",["column",s[t]],!0)}),this)}),e("column().selected()",function(){var e=this.context[0];return!!(e&&this.length&&e.aoColumns[this[0]]&&e.aoColumns[this[0]]._select_selected)}),t("cells().select()","cell().select()",function(e){var s=this;return!1===e?this.deselect():(this.iterator("cell",function(e,t,s){_(e);t=e.aoData[t];void 0===t._selected_cells&&(t._selected_cells=[]),t._selected_cells[s]=!0,t.anCells&&v(t.anCells[s]).addClass(e._select.className)}),this.iterator("table",function(e,t){u(s,"select",["cell",s.cells(s[t]).indexes().toArray()],!0)}),this)}),e("cell().selected()",function(){var e=this.context[0];if(e&&this.length){e=e.aoData[this[0][0].row];if(e&&e._selected_cells&&e._selected_cells[this[0][0].column])return!0}return!1}),t("rows().deselect()","row().deselect()",function(){var o=this;return this.iterator("row",function(e,t){var s=e.aoData[t],l=e.aoColumns;v(s.nTr).removeClass(e._select.className),s._select_selected=!1,e._select_lastCell=null;for(var c=0;c<l.length;c++){var n=l[c];null===n.sType&&o.columns().types(),b(n)&&((n=s.anCells)&&n[c]&&v("input."+g(!0),s.anCells[c]).prop("checked",!1),null!==s._aSortData)&&(s._aSortData[c]=null)}}),this.iterator("table",function(e,t){u(o,"deselect",["row",o[t]],!0)}),this}),t("columns().deselect()","column().deselect()",function(){var s=this;return this.iterator("column",function(l,e){l.aoColumns[e]._select_selected=!1;var t=new w.Api(l),s=t.column(e);v(s.header()).removeClass(l._select.className),v(s.footer()).removeClass(l._select.className),t.cells(null,e).indexes().each(function(e){var t=l.aoData[e.row],s=t._selected_cells;!t.anCells||s&&s[e.column]||v(t.anCells[e.column]).removeClass(l._select.className)})}),this.iterator("table",function(e,t){u(s,"deselect",["column",s[t]],!0)}),this}),t("cells().deselect()","cell().deselect()",function(){var s=this;return this.iterator("cell",function(e,t,s){t=e.aoData[t];void 0!==t._selected_cells&&(t._selected_cells[s]=!1),t.anCells&&!e.aoColumns[s]._select_selected&&v(t.anCells[s]).removeClass(e._select.className)}),this.iterator("table",function(e,t){u(s,"deselect",["cell",s[t]],!0)}),this});var C=0;return v.extend(w.ext.buttons,{selected:{text:s("selected","Selected"),className:"buttons-selected",limitTo:["rows","columns","cells"],init:function(s,e,l){var c=this;l._eventNamespace=".select"+C++,s.on(a(l),function(){var e,t;c.enable((e=s,!(-1===(t=l).limitTo.indexOf("rows")||!e.rows({selected:!0}).any())||!(-1===t.limitTo.indexOf("columns")||!e.columns({selected:!0}).any())||!(-1===t.limitTo.indexOf("cells")||!e.cells({selected:!0}).any())))}),this.disable()},destroy:function(e,t,s){e.off(s._eventNamespace)}},selectedSingle:{text:s("selectedSingle","Selected single"),className:"buttons-selected-single",init:function(t,e,s){var l=this;s._eventNamespace=".select"+C++,t.on(a(s),function(){var e=t.rows({selected:!0}).flatten().length+t.columns({selected:!0}).flatten().length+t.cells({selected:!0}).flatten().length;l.enable(1===e)}),this.disable()},destroy:function(e,t,s){e.off(s._eventNamespace)}},selectAll:{text:s("selectAll","Select all"),className:"buttons-select-all",action:function(e,t,s,l){var c=this.select.items(),n=l.selectorModifier;(n?("function"==typeof n&&(n=n.call(t,e,t,s,l)),this[c+"s"](n)):this[c+"s"]()).select()}},selectNone:{text:s("selectNone","Deselect all"),className:"buttons-select-none",action:function(){_(this.settings()[0],!0)},init:function(t,e,s){var l=this;s._eventNamespace=".select"+C++,t.on(a(s),function(){var e=t.rows({selected:!0}).flatten().length+t.columns({selected:!0}).flatten().length+t.cells({selected:!0}).flatten().length;l.enable(0<e)}),this.disable()},destroy:function(e,t,s){e.off(s._eventNamespace)}},showSelected:{text:s("showSelected","Show only selected"),className:"buttons-show-selected",action:function(e,t){var l;t.search.fixed("dt-select")?(t.search.fixed("dt-select",null),this.active(!1)):(l=t.settings()[0].aoData,t.search.fixed("dt-select",function(e,t,s){return l[s]._select_selected}),this.active(!0)),t.draw()}}}),v.each(["Row","Column","Cell"],function(e,t){var c=t.toLowerCase();w.ext.buttons["select"+t+"s"]={text:s("select"+t+"s","Select "+c+"s"),className:"buttons-select-"+c+"s",action:function(){this.select.items(c)},init:function(e){var l=this;this.active(e.select.items()===c),e.on("selectItems.dt.DT",function(e,t,s){l.active(s===c)})}}}),w.type("select-checkbox",{className:"dt-select",detect:w.versionCheck("2.1")?{oneOf:function(){return!1},allOf:function(){return!1},init:function(e,t,s){return b(t)}}:function(e){return"select-checkbox"===e&&e},order:{pre:function(e){return"X"===e?-1:0}}}),v.extend(!0,w.defaults.oLanguage,{select:{aria:{rowCheckbox:"Select row"}}}),w.render.select=function(e,t){function s(e,t,s,l){var c=l.settings.aoData[l.row],n=c._select_selected,o=l.settings.oLanguage.select.aria.rowCheckbox,a=l.settings._select.selectable;return"display"!==t?"type"===t?"select-checkbox":"filter"!==t&&n?"X":"":a&&!1===a(s,c.nTr,l.row)?"":v("<input>").attr({"aria-label":o,class:g(),name:r?r(s):null,type:"checkbox",value:i?i(s):null,checked:n}).on("input",function(e){e.preventDefault(),this.checked=v(this).closest("tr").hasClass("selected")})[0]}var i=e?w.util.get(e):null,r=t?w.util.get(t):null;return s._name="selectCheckbox",s},w.ext.order["select-checkbox"]=function(t,e){return this.api().column(e,{order:"index"}).nodes().map(function(e){return"row"===t._select.items?v(e).parent().hasClass(t._select.className).toString():"cell"===t._select.items&&v(e).hasClass(t._select.className).toString()})},v.fn.DataTable.select=w.select,v(r).on("i18n.dt.dtSelect preInit.dt.dtSelect",function(e,t){"dt"===e.namespace&&w.select.init(new w.Api(t))}),w});
4
+ (s=>{var l,c;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return s(e,window,document)}):"object"==typeof exports?(l=require("jquery"),c=function(e,t){t.fn.dataTable||require("datatables.net")(e,t)},"undefined"==typeof window?module.exports=function(e,t){return e=e||window,t=t||l(e),c(e,t),s(t,e,e.document)}:(c(window,l),module.exports=s(l,window,window.document))):s(jQuery,window,document)})(function(v,i,r){var w=v.fn.dataTable;function d(n,e,t){function s(t,s){s<t&&(e=s,s=t,t=e);var e,l=!1;return n.columns(":visible").indexes().filter(function(e){return e===t&&(l=!0),e===s?!(l=!1):l})}function l(t,s){var e,l=n.rows({search:"applied"}).indexes(),c=(l.indexOf(t)>l.indexOf(s)&&(e=s,s=t,t=e),!1);return l.filter(function(e){return e===t&&(c=!0),e===s?!(c=!1):c})}var c,t=n.cells({selected:!0}).any()||t?(c=s(t.column,e.column),l(t.row,e.row)):(c=s(0,e.column),l(0,e.row)),t=n.cells(t,c).flatten();n.cells(e,{selected:!0}).any()?n.cells(t).deselect():n.cells(t).select()}function g(e){var t=w.select.classes.checkbox;return e?t.replace(/ /g,"."):t}function n(e){var t=e.settings()[0]._select.selector;v(e.table().container()).off("mousedown.dtSelect",t).off("mouseup.dtSelect",t).off("click.dtSelect",t),v("body").off("click.dtSelect"+m(e.table().node()))}function c(o){var a,t=v(o.table().container()),s=o.settings()[0],l=s._select.selector;t.on("mousedown.dtSelect",l,function(e){(e.shiftKey||e.metaKey||e.ctrlKey)&&t.css("-moz-user-select","none").one("selectstart.dtSelect",l,function(){return!1}),i.getSelection&&(a=i.getSelection())}).on("mouseup.dtSelect",l,function(){t.css("-moz-user-select","")}).on("click.dtSelect",l,function(e){var t,s=o.select.items();if(a){var l=i.getSelection();if((!l.anchorNode||v(l.anchorNode).closest("table")[0]===o.table().node())&&l!==a)return}var c,l=o.settings()[0],n=o.table().container();v(e.target).closest("div.dt-container")[0]==n&&(n=o.cell(v(e.target).closest("td, th"))).any()&&(c=v.Event("user-select.dt"),u(o,c,[s,n,e]),c.isDefaultPrevented()||(c=n.index(),"row"===s?(t=c.row,p(e,o,l,"row",t)):"column"===s?(t=n.index().column,p(e,o,l,"column",t)):"cell"===s&&(t=n.index(),p(e,o,l,"cell",t)),l._select_lastCell=c))}),v("body").on("click.dtSelect"+m(o.table().node()),function(e){var t;!s._select.blurable||v(e.target).parents().filter(o.table().container()).length||0===v(e.target).parents("html").length||v(e.target).parents("div.DTE").length||(t=v.Event("select-blur.dt"),u(o,t,[e.target,e]),t.isDefaultPrevented())||_(s,!0)})}function u(e,t,s,l){l&&!e.flatten().length||("string"==typeof t&&(t+=".dt"),s.unshift(e),v(e.table().node()).trigger(t,s))}function b(e){return e.mRender&&"selectCheckbox"===e.mRender._name}function l(l,e){if("api"!==l.select.style()&&!1!==l.select.info()){var t=l.settings()[0],s=t._select_set;if(!l.page.info().serverSide)for(var c=s.length-1;0<=c;c--)t.aIds[s[c]]||s.splice(c,1);var n=s.length||l.rows({selected:!0}).count(),o=l.columns({selected:!0}).count(),a=l.cells({selected:!0}).count(),i=("subtractive"===t._select_mode&&(n=l.page.info().recordsDisplay-s.length),function(e,t,s){e.append(v('<span class="select-item"/>').append(l.i18n("select."+t+"s",{_:"%d "+t+"s selected",0:"",1:"1 "+t+" selected"},s)))}),e=v(e),r=v('<span class="select-info"/>'),n=(i(r,"row",n),i(r,"column",o),i(r,"cell",a),e.children("span.select-info"));n.length&&n.remove(),""!==r.text()&&e.append(r)}}function f(e,t,s){e.one("draw",function(){e.row(s).node().focus()}).page(t).draw(!1)}function o(o){var c,a=new w.Api(o);o._select_init=!0,o._select_mode="additive",o._select_set=[],o.aoRowCreatedCallback.push(function(e,t,s){var l,c,n=o.aoData[s],s=a.row(s).id();for((n._select_selected||"additive"===o._select_mode&&o._select_set.includes(s)||"subtractive"===o._select_mode&&!o._select_set.includes(s))&&(n._select_selected=!0,v(e).addClass(o._select.className).find("input."+g(!0)).prop("checked",!0)),l=0,c=o.aoColumns.length;l<c;l++)(o.aoColumns[l]._select_selected||n._selected_cells&&n._selected_cells[l])&&v(n.anCells[l]).addClass(o._select.className)}),(c=a).on("select",function(e,t,s,l){"row"===s&&("additive"===(s=c.settings()[0])._select_mode?y:x)(c,s._select_set,l)}),c.on("deselect",function(e,t,s,l){"row"===s&&("additive"===(s=c.settings()[0])._select_mode?x:y)(c,s._select_set,l)}),a.on("info.dt",function(e,t,s){t._select.infoEls.includes(s)||t._select.infoEls.push(s),l(a,s)}),a.on("select.dtSelect.dt deselect.dtSelect.dt",function(){o._select.infoEls.forEach(function(e){l(a,e)}),a.state.save()}),a.on("destroy.dtSelect",function(){v(a.rows({selected:!0}).nodes()).removeClass(a.settings()[0]._select.className),v("input."+g(!0),a.table().header()).remove(),n(a),a.off(".dtSelect"),v("body").off(".dtSelect"+m(a.table().node()))})}function h(e,t,s,l){var c,n=e[t+"s"]({search:"applied"}).indexes(),l=n.indexOf(l),o=n.indexOf(s);e[t+"s"]({selected:!0}).any()||-1!==l?(o<l&&(c=o,o=l,l=c),n.splice(o+1,n.length),n.splice(0,l)):n.splice(n.indexOf(s)+1,n.length),e[t](s,{selected:!0}).any()?(n.splice(n.indexOf(s),1),e[t+"s"](n).deselect()):e[t+"s"](n).select()}function _(e,t){!t&&"single"!==e._select.style||((t=new w.Api(e)).rows({selected:!0}).deselect(),t.columns({selected:!0}).deselect(),t.cells({selected:!0}).deselect())}function p(e,t,s,l,c){var n=t.select.style(),o=t.select.toggleable(),a=t[l](c,{selected:!0}).any();a&&!o||("os"===n?e.ctrlKey||e.metaKey?t[l](c).select(!a):e.shiftKey?"cell"===l?d(t,c,s._select_lastCell||null):h(t,l,c,s._select_lastCell?s._select_lastCell[l]:null):(o=t[l+"s"]({selected:!0}),a&&1===o.flatten().length?t[l](c).deselect():(o.deselect(),t[l](c).select())):"multi+shift"==n&&e.shiftKey?"cell"===l?d(t,c,s._select_lastCell||null):h(t,l,c,s._select_lastCell?s._select_lastCell[l]:null):t[l](c).select(!a))}function m(e){return e.id.replace(/[^a-zA-Z0-9\-\_]/g,"-")}function y(e,t,s){for(var l=0;l<s.length;l++){var c=e.row(s[l]).id();c&&"undefined"!==c&&!t.includes(c)&&t.push(c)}}function x(e,t,s){for(var l=0;l<s.length;l++){var c=e.row(s[l]).id(),c=t.indexOf(c);-1!==c&&t.splice(c,1)}}w.select={},w.select.classes={checkbox:"dt-select-checkbox"},w.select.version="3.1.3",w.select.init=function(a){var e,t,s,l,c,n,o,i,r,d,u,f,h,_,p,m=a.settings()[0];if(!w.versionCheck("2"))throw"Warning: Select requires DataTables 2 or newer";!m._select&&(e=a.state.loaded(),t=function(e,t,s){if(null!==s&&void 0!==s.select){if(a.rows({selected:!0}).any()&&a.rows().deselect(),void 0!==s.select.rows&&a.rows(s.select.rows).select(),a.columns({selected:!0}).any()&&a.columns().deselect(),void 0!==s.select.columns&&a.columns(s.select.columns).select(),a.cells({selected:!0}).any()&&a.cells().deselect(),void 0!==s.select.cells)for(var l=0;l<s.select.cells.length;l++)a.cell(s.select.cells[l].row,s.select.cells[l].column).select();a.state.save()}},a.on("stateSaveParams",function(e,t,s){s.select={},s.select.rows=a.rows({selected:!0}).ids(!0).toArray(),s.select.columns=a.columns({selected:!0})[0],s.select.cells=a.cells({selected:!0})[0].map(function(e){return{row:a.row(e.row).id(!0),column:e.column}})}).on("stateLoadParams",t).one("init",function(){t(0,0,e)}),l=m.oInit.select,s=w.defaults.select,s=void 0===l?s:l,l="row",o=!(n=!(c="api")),d="td, th",u="selected",p=_=h=!(f=r=!(i=null)),m._select={infoEls:[]},!0===s?(c="os",h=!0):"string"==typeof s?(c=s,h=!0):v.isPlainObject(s)&&(void 0!==s.blurable&&(n=s.blurable),void 0!==s.toggleable&&(o=s.toggleable),void 0!==s.info&&(r=s.info),void 0!==s.items&&(l=s.items),h=(c=void 0!==s.style?s.style:"os",!0),void 0!==s.selector&&(d=s.selector),void 0!==s.className&&(u=s.className),void 0!==s.headerCheckbox&&(f=s.headerCheckbox),void 0!==s.selectable&&(i=s.selectable),void 0!==s.keys&&(_=s.keys),void 0!==s.keysWrap)&&(p=s.keysWrap),a.select.selector(d),a.select.items(l),a.select.style(c),a.select.blurable(n),a.select.toggleable(o),a.select.info(r),a.select.keys(_,p),a.select.selectable(i),m._select.className=u,!h&&v(a.table().node()).hasClass("selectable")&&a.select.style("os"),f||"select-page"===f||"select-all"===f)&&a.ready(function(){var c,n,o;n=f,o=(c=a).settings()[0].aoColumns,c.columns().iterator("column",function(e,t){var s,l;b(o[t])&&(t=c.column(t).header(),(s=v("div.dt-column-header",t)).length&&(t=s),v("input",t).length||(l=v("<input>").attr({class:g(!1),type:"checkbox","aria-label":c.i18n("select.aria.headerCheckbox")||"Select all rows"}).appendTo(t).on("change",function(){this.checked?("select-page"==n?c.rows({page:"current"}):c.rows({search:"applied"})).select():("select-page"==n?c.rows({page:"current",selected:!0}):c.rows({selected:!0})).deselect()}).on("click",function(e){e.stopPropagation()}),c.on("draw select deselect",function(e,t,s){"row"!==s&&s||((s=((e,t)=>{var s=e.settings()[0],l=s._select.selectable,c=0,n=("select-page"==t?e.rows({page:"current",selected:!0}):e.rows({selected:!0})).count(),o=("select-page"==t?e.rows({page:"current",selected:!0}):e.rows({search:"applied",selected:!0})).count();if(l)for(var a=("select-page"==t?e.rows({page:"current"}):e.rows({search:"applied"})).indexes(),i=0;i<a.length;i++){var r=s.aoData[a[i]];l(r._aData,r.nTr,a[i])&&c++}else c=("select-page"==t?e.rows({page:"current"}):e.rows({search:"applied"})).count();return{available:c,count:n,search:o}})(c,n)).search&&s.search<=s.count&&s.search===s.available?l.prop("checked",!0).prop("indeterminate",!1):0===s.search&&0===s.count?l.prop("checked",!1).prop("indeterminate",!1):l.prop("checked",!1).prop("indeterminate",!0))})))})})},v.each([{type:"row",prop:"aoData"},{type:"column",prop:"aoColumns"}],function(e,i){w.ext.selector[i.type].push(function(e,t,s){var l,c=t.selected,n=[];if(!0!==c&&!1!==c)return s;for(var o=0,a=s.length;o<a;o++)(l=e[i.prop][s[o]])&&(!0===c&&!0===l._select_selected||!1===c&&!l._select_selected)&&n.push(s[o]);return n})}),w.ext.selector.cell.push(function(e,t,s){var l,c=t.selected,n=[];if(void 0===c)return s;for(var o=0,a=s.length;o<a;o++)(l=e.aoData[s[o].row])&&(!0===c&&l._selected_cells&&!0===l._selected_cells[s[o].column]||!1===c&&(!l._selected_cells||!l._selected_cells[s[o].column]))&&n.push(s[o]);return n});var e=w.Api.register,t=w.Api.registerPlural;function s(t,s){return function(e){return e.i18n("buttons."+t,s)}}function a(e){e=e._eventNamespace;return"draw.dt.DT"+e+" select.dt.DT"+e+" deselect.dt.DT"+e}e("select()",function(){return this.iterator("table",function(e){w.select.init(new w.Api(e))})}),e("select.blurable()",function(t){return void 0===t?this.context[0]._select.blurable:this.iterator("table",function(e){e._select.blurable=t})}),e("select.toggleable()",function(t){return void 0===t?this.context[0]._select.toggleable:this.iterator("table",function(e){e._select.toggleable=t})}),e("select.info()",function(t){return void 0===t?this.context[0]._select.info:this.iterator("table",function(e){e._select.info=t})}),e("select.items()",function(t){return void 0===t?this.context[0]._select.items:this.iterator("table",function(e){e._select.items=t,u(new w.Api(e),"selectItems",[t])})}),e("select.keys()",function(s,l){return void 0===s?this.context[0]._select.keys:this.iterator("table",function(e){var a,t,i;e._select||w.select.init(new w.Api(e)),e._select.keys=s,e._select.keysWrap=l,a=new w.Api(e),t=(e=a.settings()[0])._select.keys,i=e._select.keysWrap,e="dts-keys-"+e.sTableId,t?(v(a.rows({page:"current"}).nodes()).attr("tabindex",0),a.on("draw."+e,function(){v(a.rows({page:"current"}).nodes()).attr("tabindex",0)}),v(r).on("keydown."+e,function(e){var t,s,l,c,n=e.keyCode,o=r.activeElement;[9,13,32,38,40].includes(n)&&(s=(t=a.rows({page:"current"}).nodes().toArray()).indexOf(o),l=!0,c=a.page.info(),-1!==s)&&(9===n?!1===e.shift&&s===t.length-1?f(a,"next",":first-child"):!0===e.shift&&0===s?f(a,"previous",":last-child"):l=!1:13===n||32===n?(o=a.row(o)).selected()?o.deselect():o.select():38===n?0<s?t[s-1].focus():0<c.start?f(a,"previous",":last-child"):i&&f(a,"last",":last-child"):s<t.length-1?t[s+1].focus():c.page<c.pages-1?f(a,"next",":first-child"):i&&f(a,"first",":first-child"),l)&&(e.stopPropagation(),e.preventDefault())})):(v(a.rows().nodes()).removeAttr("tabindex"),a.off("draw."+e),v(r).off("keydown."+e))})}),e("select.style()",function(s){return void 0===s?this.context[0]._select.style:this.iterator("table",function(e){e._select||w.select.init(new w.Api(e)),e._select_init||o(e),e._select.style=s;var t=new w.Api(e);"api"!==s?t.ready(function(){n(t),c(t)}):n(t),u(new w.Api(e),"selectStyle",[s])})}),e("select.selector()",function(l){return void 0===l?this.context[0]._select.selector:this.iterator("table",function(e){var t=new w.Api(e),s=e._select.style;n(t),e._select.selector=l,s&&"api"!==s?t.ready(function(){n(t),c(t)}):n(t)})}),e("select.selectable()",function(e){var t=this.context[0];return e?(t._select.selectable=e,this):t._select.selectable}),e("select.last()",function(e){var t=this.context[0];return e?(t._select_lastCell=e,this):t._select_lastCell}),e("select.cumulative()",function(l){var e;return l?this.iterator("table",function(e){var t,s;e._select_mode!==l&&(t=new w.Api(e),"subtractive"===l?(s=t.rows({selected:!1}).ids().toArray(),e._select_mode=l,e._select_set.length=0,e._select_set.push.apply(e._select_set,s)):(s=t.rows({selected:!0}).ids().toArray(),e._select_mode=l,e._select_set.length=0,e._select_set.push.apply(e._select_set,s)))}).draw(!1):(e=this.context[0])&&e._select_set?{mode:e._select_mode,rows:e._select_set}:null}),t("rows().select()","row().select()",function(e){var o=this,a=[];return!1===e?this.deselect():(this.iterator("row",function(e,t){_(e);var s=e.aoData[t],l=e.aoColumns;if(e._select.selectable&&!1===e._select.selectable(s._aData,s.nTr,t))return;v(s.nTr).addClass(e._select.className),s._select_selected=!0,a.push(t);for(var c=0;c<l.length;c++){var n=l[c];null===n.sType&&o.columns().types(),b(n)&&((n=s.anCells)&&n[c]&&v("input."+g(!0),n[c]).prop("checked",!0),null!==s._aSortData)&&(s._aSortData[c]=null)}}),this.iterator("table",function(e){u(o,"select",["row",a],!0)}),this)}),e("row().selected()",function(){var e=this.context[0];return!!(e&&this.length&&e.aoData[this[0]]&&e.aoData[this[0]]._select_selected)}),e("row().focus()",function(){var e=this.context[0];e&&this.length&&e.aoData[this[0]]&&e.aoData[this[0]].nTr&&e.aoData[this[0]].nTr.focus()}),e("row().blur()",function(){var e=this.context[0];e&&this.length&&e.aoData[this[0]]&&e.aoData[this[0]].nTr&&e.aoData[this[0]].nTr.blur()}),t("columns().select()","column().select()",function(e){var s=this;return!1===e?this.deselect():(this.iterator("column",function(e,t){_(e),e.aoColumns[t]._select_selected=!0;t=new w.Api(e).column(t);v(t.header()).addClass(e._select.className),v(t.footer()).addClass(e._select.className),t.nodes().to$().addClass(e._select.className)}),this.iterator("table",function(e,t){u(s,"select",["column",s[t]],!0)}),this)}),e("column().selected()",function(){var e=this.context[0];return!!(e&&this.length&&e.aoColumns[this[0]]&&e.aoColumns[this[0]]._select_selected)}),t("cells().select()","cell().select()",function(e){var s=this;return!1===e?this.deselect():(this.iterator("cell",function(e,t,s){_(e);t=e.aoData[t];void 0===t._selected_cells&&(t._selected_cells=[]),t._selected_cells[s]=!0,t.anCells&&v(t.anCells[s]).addClass(e._select.className)}),this.iterator("table",function(e,t){u(s,"select",["cell",s.cells(s[t]).indexes().toArray()],!0)}),this)}),e("cell().selected()",function(){var e=this.context[0];if(e&&this.length){e=e.aoData[this[0][0].row];if(e&&e._selected_cells&&e._selected_cells[this[0][0].column])return!0}return!1}),t("rows().deselect()","row().deselect()",function(){var o=this;return this.iterator("row",function(e,t){var s=e.aoData[t],l=e.aoColumns;v(s.nTr).removeClass(e._select.className),s._select_selected=!1,e._select_lastCell=null;for(var c=0;c<l.length;c++){var n=l[c];null===n.sType&&o.columns().types(),b(n)&&((n=s.anCells)&&n[c]&&v("input."+g(!0),s.anCells[c]).prop("checked",!1),null!==s._aSortData)&&(s._aSortData[c]=null)}}),this.iterator("table",function(e,t){u(o,"deselect",["row",o[t]],!0)}),this}),t("columns().deselect()","column().deselect()",function(){var s=this;return this.iterator("column",function(l,e){l.aoColumns[e]._select_selected=!1;var t=new w.Api(l),s=t.column(e);v(s.header()).removeClass(l._select.className),v(s.footer()).removeClass(l._select.className),t.cells(null,e).indexes().each(function(e){var t=l.aoData[e.row],s=t._selected_cells;!t.anCells||s&&s[e.column]||v(t.anCells[e.column]).removeClass(l._select.className)})}),this.iterator("table",function(e,t){u(s,"deselect",["column",s[t]],!0)}),this}),t("cells().deselect()","cell().deselect()",function(){var s=this;return this.iterator("cell",function(e,t,s){t=e.aoData[t];void 0!==t._selected_cells&&(t._selected_cells[s]=!1),t.anCells&&!e.aoColumns[s]._select_selected&&v(t.anCells[s]).removeClass(e._select.className)}),this.iterator("table",function(e,t){u(s,"deselect",["cell",s[t]],!0)}),this});var C=0;return v.extend(w.ext.buttons,{selected:{text:s("selected","Selected"),className:"buttons-selected",limitTo:["rows","columns","cells"],init:function(s,e,l){var c=this;l._eventNamespace=".select"+C++,s.on(a(l),function(){var e,t;c.enable((e=s,!(-1===(t=l).limitTo.indexOf("rows")||!e.rows({selected:!0}).any())||!(-1===t.limitTo.indexOf("columns")||!e.columns({selected:!0}).any())||!(-1===t.limitTo.indexOf("cells")||!e.cells({selected:!0}).any())))}),this.disable()},destroy:function(e,t,s){e.off(s._eventNamespace)}},selectedSingle:{text:s("selectedSingle","Selected single"),className:"buttons-selected-single",init:function(t,e,s){var l=this;s._eventNamespace=".select"+C++,t.on(a(s),function(){var e=t.rows({selected:!0}).flatten().length+t.columns({selected:!0}).flatten().length+t.cells({selected:!0}).flatten().length;l.enable(1===e)}),this.disable()},destroy:function(e,t,s){e.off(s._eventNamespace)}},selectAll:{text:s("selectAll","Select all"),className:"buttons-select-all",action:function(e,t,s,l){var c=this.select.items(),n=l.selectorModifier;(n?("function"==typeof n&&(n=n.call(t,e,t,s,l)),this[c+"s"](n)):this[c+"s"]()).select()}},selectNone:{text:s("selectNone","Deselect all"),className:"buttons-select-none",action:function(){_(this.settings()[0],!0)},init:function(t,e,s){var l=this;s._eventNamespace=".select"+C++,t.on(a(s),function(){var e=t.rows({selected:!0}).flatten().length+t.columns({selected:!0}).flatten().length+t.cells({selected:!0}).flatten().length;l.enable(0<e)}),this.disable()},destroy:function(e,t,s){e.off(s._eventNamespace)}},showSelected:{text:s("showSelected","Show only selected"),className:"buttons-show-selected",action:function(e,t){var l;t.search.fixed("dt-select")?(t.search.fixed("dt-select",null),this.active(!1)):(l=t.settings()[0].aoData,t.search.fixed("dt-select",function(e,t,s){return l[s]._select_selected}),this.active(!0)),t.draw()}}}),v.each(["Row","Column","Cell"],function(e,t){var c=t.toLowerCase();w.ext.buttons["select"+t+"s"]={text:s("select"+t+"s","Select "+c+"s"),className:"buttons-select-"+c+"s",action:function(){this.select.items(c)},init:function(e){var l=this;this.active(e.select.items()===c),e.on("selectItems.dt.DT",function(e,t,s){l.active(s===c)})}}}),w.type("select-checkbox",{className:"dt-select",detect:w.versionCheck("2.1")?{oneOf:function(){return!1},allOf:function(){return!1},init:function(e,t,s){return b(t)}}:function(e){return"select-checkbox"===e&&e},order:{pre:function(e){return"X"===e?-1:0}}}),v.extend(!0,w.defaults.oLanguage,{select:{aria:{rowCheckbox:"Select row"}}}),w.render.select=function(e,t){function s(e,t,s,l){var c=l.settings.aoData[l.row],n=c._select_selected,o=l.settings.oLanguage.select.aria.rowCheckbox,a=l.settings._select.selectable;return"display"!==t?"type"===t?"select-checkbox":"filter"!==t&&n?"X":"":a&&!1===a(s,c.nTr,l.row)?"":v("<input>").attr({"aria-label":o,class:g(),name:r?r(s):null,type:"checkbox",value:i?i(s):null,checked:n}).on("input",function(e){e.preventDefault(),this.checked=v(this).closest("tr").hasClass("selected")})[0]}var i=e?w.util.get(e):null,r=t?w.util.get(t):null;return s._name="selectCheckbox",s},w.ext.order["select-checkbox"]=function(t,e){return this.api().column(e,{order:"index"}).nodes().map(function(e){return"row"===t._select.items?v(e).parent().hasClass(t._select.className).toString():"cell"===t._select.items&&v(e).hasClass(t._select.className).toString()})},v.fn.DataTable.select=w.select,v(r).on("i18n.dt.dtSelect preInit.dt.dtSelect",function(e,t){"dt"===e.namespace&&w.select.init(new w.Api(t))}),w});
@@ -65,8 +65,9 @@ var StateRestore = /** @class */ (function () {
65
65
  this.s.dt.i18n('stateRestore.renameTitle', this.c.i18n.renameTitle) +
66
66
  '</h2>')
67
67
  };
68
- // When a StateRestore instance is created the current state of the table should also be saved.
69
- this.save(state, successCallback);
68
+ // When a StateRestore instance is created the current state of the
69
+ // table should also be saved.
70
+ this.save(state, successCallback, !isPreDefined);
70
71
  }
71
72
  /**
72
73
  * Removes a state from storage and then triggers the dtsr-remove event
@@ -517,6 +518,9 @@ var StateRestore = /** @class */ (function () {
517
518
  else if (typeof this.c.ajax === 'function' && callAjax) {
518
519
  this.c.ajax.call(this.s.dt, ajaxData, successCallback);
519
520
  }
521
+ else if (!callAjax) {
522
+ successCallback();
523
+ }
520
524
  };
521
525
  /**
522
526
  * Encode HTML entities
@@ -706,7 +710,7 @@ var StateRestore = /** @class */ (function () {
706
710
  });
707
711
  $(document).on('keyup', function (e) { return _this._keyupFunction(e); });
708
712
  };
709
- StateRestore.version = '1.4.2';
713
+ StateRestore.version = '1.4.3';
710
714
  StateRestore.classes = {
711
715
  background: 'dtsr-background',
712
716
  closeButton: 'dtsr-popover-close',
@@ -1,4 +1,4 @@
1
- /*! StateRestore 1.4.2
1
+ /*! StateRestore 1.4.3
2
2
  * © SpryMedia Ltd - datatables.net/license
3
3
  */
4
4
 
@@ -118,8 +118,9 @@ var DataTable = $.fn.dataTable;
118
118
  this.s.dt.i18n('stateRestore.renameTitle', this.c.i18n.renameTitle) +
119
119
  '</h2>')
120
120
  };
121
- // When a StateRestore instance is created the current state of the table should also be saved.
122
- this.save(state, successCallback);
121
+ // When a StateRestore instance is created the current state of the
122
+ // table should also be saved.
123
+ this.save(state, successCallback, !isPreDefined);
123
124
  }
124
125
  /**
125
126
  * Removes a state from storage and then triggers the dtsr-remove event
@@ -570,6 +571,9 @@ var DataTable = $.fn.dataTable;
570
571
  else if (typeof this.c.ajax === 'function' && callAjax) {
571
572
  this.c.ajax.call(this.s.dt, ajaxData, successCallback);
572
573
  }
574
+ else if (!callAjax) {
575
+ successCallback();
576
+ }
573
577
  };
574
578
  /**
575
579
  * Encode HTML entities
@@ -759,7 +763,7 @@ var DataTable = $.fn.dataTable;
759
763
  });
760
764
  $$2(document).on('keyup', function (e) { return _this._keyupFunction(e); });
761
765
  };
762
- StateRestore.version = '1.4.2';
766
+ StateRestore.version = '1.4.3';
763
767
  StateRestore.classes = {
764
768
  background: 'dtsr-background',
765
769
  closeButton: 'dtsr-popover-close',
@@ -1954,7 +1958,7 @@ var DataTable = $.fn.dataTable;
1954
1958
  return StateRestoreCollection;
1955
1959
  }());
1956
1960
 
1957
- /*! StateRestore 1.4.2
1961
+ /*! StateRestore 1.4.3
1958
1962
  * © SpryMedia Ltd - datatables.net/license
1959
1963
  */
1960
1964
  setJQuery$1($);
@@ -1,4 +1,4 @@
1
- /*! StateRestore 1.4.2
1
+ /*! StateRestore 1.4.3
2
2
  * © SpryMedia Ltd - datatables.net/license
3
3
  */
4
- (s=>{var o,i;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return s(e,window,document)}):"object"==typeof exports?(o=require("jquery"),i=function(e,t){t.fn.dataTable||require("datatables.net")(e,t)},"undefined"==typeof window?module.exports=function(e,t){return e=e||window,t=t||o(e),i(e,t),s(t,0,e.document)}:(i(window,o),module.exports=s(o,window,window.document))):s(jQuery,window,document)})(function(y,e,g){var u,m,f,a,k,s,t,c=y.fn.dataTable;function n(e,t,s,o,i,a){if(void 0===o&&(o=void 0),void 0===i&&(i=!1),void 0===a&&(a=function(){return null}),!m||!m.versionCheck||!m.versionCheck("1.10.0"))throw new Error("StateRestore requires DataTables 1.10 or newer");if(!m.Buttons)throw new Error("StateRestore requires Buttons");e=new m.Api(e);this.classes=u.extend(!0,{},n.classes),this.c=u.extend(!0,{},n.defaults,t),this.s={dt:e,identifier:s,isPreDefined:i,savedState:o,tableId:o&&o.stateRestore?o.stateRestore.tableId:void 0},this.dom={background:u('<div class="'+this.classes.background+'"/>'),closeButton:u('<div class="'+this.classes.closeButton+'">&times;</div>'),confirmation:u('<div class="'+this.classes.confirmation+'"/>'),confirmationButton:u('<button class="'+this.classes.confirmationButton+" "+this.classes.dtButton+'">'),confirmationTitleRow:u('<div class="'+this.classes.confirmationTitleRow+'"></div>'),dtContainer:u(this.s.dt.table().container()),duplicateError:u('<span class="'+this.classes.modalError+'">'+this.s.dt.i18n("stateRestore.duplicateError",this.c.i18n.duplicateError)+"</span>"),emptyError:u('<span class="'+this.classes.modalError+'">'+this.s.dt.i18n("stateRestore.emptyError",this.c.i18n.emptyError)+"</span>"),removeContents:u('<div class="'+this.classes.confirmationText+'"><span>'+this.s.dt.i18n("stateRestore.removeConfirm",this.c.i18n.removeConfirm).replace(/%s/g,n.entityEncode(this.s.identifier))+"</span></div>"),removeError:u('<span class="'+this.classes.modalError+'">'+this.s.dt.i18n("stateRestore.removeError",this.c.i18n.removeError)+"</span>"),removeTitle:u('<h2 class="'+this.classes.confirmationTitle+'">'+this.s.dt.i18n("stateRestore.removeTitle",this.c.i18n.removeTitle)+"</h2>"),renameContents:u('<div class="'+this.classes.confirmationText+" "+this.classes.renameModal+'"><label class="'+this.classes.confirmationMessage+'">'+this.s.dt.i18n("stateRestore.renameLabel",this.c.i18n.renameLabel).replace(/%s/g,n.entityEncode(this.s.identifier))+"</label></div>"),renameInput:u('<input class="'+this.classes.input+'" type="text"></input>'),renameTitle:u('<h2 class="'+this.classes.confirmationTitle+'">'+this.s.dt.i18n("stateRestore.renameTitle",this.c.i18n.renameTitle)+"</h2>")},this.save(o,a)}function r(e,t){var o=this;if(!a||!a.versionCheck||!a.versionCheck("1.10.0"))throw new Error("StateRestore requires DataTables 1.10 or newer");if(!a.Buttons)throw new Error("StateRestore requires Buttons");var s,i,e=new a.Api(e);if(this.classes=f.extend(!0,{},r.classes),void 0===e.settings()[0]._stateRestore)return this.c=f.extend(!0,{},r.defaults,t),this.s={dt:e,hasColReorder:void 0!==a.ColReorder,hasScroller:void 0!==a.Scroller,hasSearchBuilder:void 0!==a.SearchBuilder,hasSearchPanes:void 0!==a.SearchPanes,hasSelect:void 0!==a.select,states:[]},this.s.dt.on("xhr",function(e,t,s){s&&s.stateRestore&&o._addPreDefined(s.stateRestore)}),this.dom={background:f('<div class="'+this.classes.background+'"/>'),checkboxInputRow:f('<div class="'+this.classes.formRow+'"><label class="'+this.classes.nameLabel+'">'+this.s.dt.i18n("stateRestore.creationModal.toggleLabel",this.c.i18n.creationModal.toggleLabel)+'</label><div class="dtsr-input"></div></div>'),closeButton:f('<div class="'+this.classes.closeButton+'">x</div>'),colReorderToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.colReorderToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.colReorder",this.c.i18n.creationModal.colReorder)+"</div>"),columnsSearchToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.columnsSearchToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.columns.search",this.c.i18n.creationModal.columns.search)+"</div>"),columnsVisibleToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.columnsVisibleToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.columns.visible",this.c.i18n.creationModal.columns.visible)+"</div>"),confirmation:f('<div class="'+this.classes.confirmation+'"/>'),confirmationTitleRow:f('<div class="'+this.classes.confirmationTitleRow+'"></div>'),createButtonRow:f('<div class="'+this.classes.formRow+" "+this.classes.modalFoot+'"><button class="'+this.classes.creationButton+" "+this.classes.dtButton+'">'+this.s.dt.i18n("stateRestore.creationModal.button",this.c.i18n.creationModal.button)+"</button></div>"),creation:f('<div class="'+this.classes.creation+'"/>'),creationForm:f('<div class="'+this.classes.creationForm+'"/>'),creationTitle:f('<div class="'+this.classes.creationText+'"><h2 class="'+this.classes.creationTitle+'">'+this.s.dt.i18n("stateRestore.creationModal.title",this.c.i18n.creationModal.title)+"</h2></div>"),dtContainer:f(this.s.dt.table().container()),duplicateError:f('<span class="'+this.classes.modalError+'">'+this.s.dt.i18n("stateRestore.duplicateError",this.c.i18n.duplicateError)+"</span>"),emptyError:f('<span class="'+this.classes.modalError+'">'+this.s.dt.i18n("stateRestore.emptyError",this.c.i18n.emptyError)+"</span>"),lengthToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.lengthToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.length",this.c.i18n.creationModal.length)+"</div>"),nameInputRow:f('<div class="'+this.classes.formRow+'"><label class="'+this.classes.nameLabel+'">'+this.s.dt.i18n("stateRestore.creationModal.name",this.c.i18n.creationModal.name)+'</label><div class="dtsr-input"><input class="'+this.classes.nameInput+'" type="text"></div></div>'),orderToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.orderToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.order",this.c.i18n.creationModal.order)+"</div>"),pagingToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.pagingToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.paging",this.c.i18n.creationModal.paging)+"</div>"),removeContents:f('<div class="'+this.classes.confirmationText+'"><span></span></div>'),removeTitle:f('<div class="'+this.classes.creationText+'"><h2 class="'+this.classes.creationTitle+'">'+this.s.dt.i18n("stateRestore.removeTitle",this.c.i18n.removeTitle)+"</h2></div>"),scrollerToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.scrollerToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.scroller",this.c.i18n.creationModal.scroller)+"</div>"),searchBuilderToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.searchBuilderToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.searchBuilder",this.c.i18n.creationModal.searchBuilder)+"</div>"),searchPanesToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.searchPanesToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.searchPanes",this.c.i18n.creationModal.searchPanes)+"</div>"),searchToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.searchToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.search",this.c.i18n.creationModal.search)+"</div>"),selectToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.selectToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.select",this.c.i18n.creationModal.select)+"</div>")},(e.settings()[0]._stateRestore=this)._searchForStates(),this._addPreDefined(this.c.preDefined),i={action:"load"},"function"==typeof this.c.ajax?s=function(){"function"==typeof o.c.ajax&&o.c.ajax.call(o.s.dt,i,function(e){return o._addPreDefined(e)})}:"string"==typeof this.c.ajax&&(s=function(){f.ajax({data:i,dataType:"json",success:function(e){o._addPreDefined(e)},type:"POST",url:o.c.ajax})}),"function"==typeof s&&(this.s.dt.settings()[0]._bInitComplete?s():this.s.dt.one("preInit.dtsr",function(){s()})),this.s.dt.on("destroy.dtsr",function(){o.destroy()}),this.s.dt.on("draw.dtsr buttons-action.dtsr",function(){return o.findActive()}),this}function o(e,t){l(e,new c.StateRestoreCollection(e,t.config))}function l(e,t){var s=e.stateRestore.states(),o=e.button("SaveStateRestore:name"),i=[];if(o[0])for(var a=o.index().split("-"),i=o[0].inst.c.buttons,n=0;n<a.length;n++){if(!i[a[n]].buttons){i=[];break}i=i[a[n]].buttons}var r=e.settings()[0]._stateRestore.c;for(n=0;n<i.length;n++)"stateRestore"===i[n].extend&&(i.splice(n,1),n--);if(r._createInSaved&&i.push("createState"),void 0===s||0===s.length)i.push('<span class="'+t.classes.emptyStates+'">'+e.i18n("stateRestore.emptyStates",t.c.i18n.emptyStates)+"</span>");else for(var c=0,l=s;c<l.length;c++){var d=l[c],h=r.splitSecondaries.slice();h.includes("updateState")&&!r.save&&h.splice(h.indexOf("updateState"),1),!h.includes("renameState")||r.save&&r.rename||h.splice(h.indexOf("renameState"),1),h.includes("removeState")&&!r.remove&&h.splice(h.indexOf("removeState"),1),i.push({_stateRestore:d,attr:{title:d.s.identifier},config:{split:h},extend:"stateRestore",text:k.entityEncode(d.s.identifier),popoverTitle:k.entityEncode(d.s.identifier)})}e.button("SaveStateRestore:name").collectionRebuild(i);for(var u=0,m=e.buttons();u<m.length;u++){var v=m[u];y(v.node).hasClass("dtsr-removeAllStates")&&(0===s.length?e.button(v.node).disable():e.button(v.node).enable())}}return n.prototype.remove=function(e){var t,s,o,i,a=this;return void 0===e&&(e=!1),!!this.c.remove&&(o={action:"remove",stateRestore:((t={})[this.s.identifier]=this.s.savedState,t)},i=function(){a.dom.confirmation.trigger("dtsr-remove"),u(a.s.dt.table().node()).trigger("stateRestore-change"),a.dom.background.click(),a.dom.confirmation.remove(),u(g).unbind("keyup",function(e){return a._keyupFunction(e)}),a.dom.confirmationButton.off("click")},this.c.ajax?"string"==typeof this.c.ajax&&this.s.dt.settings()[0]._bInitComplete?s=function(){return u.ajax({data:o,success:i,type:"POST",url:a.c.ajax}),!0}:"function"==typeof this.c.ajax&&(s=function(){return"function"==typeof a.c.ajax&&a.c.ajax.call(a.s.dt,o,i),!0}):s=function(){try{localStorage.removeItem("DataTables_stateRestore_"+a.s.identifier+"_"+location.pathname+(a.s.tableId?"_"+a.s.tableId:"")),i()}catch(e){return a.dom.confirmation.children("."+a.classes.modalError).remove(),a.dom.confirmation.append(a.dom.removeError),"remove"}return!0},e?(this.dom.confirmation.appendTo(this.dom.dtContainer),u(this.s.dt.table().node()).trigger("dtsr-modal-inserted"),s(),this.dom.confirmation.remove()):this._newModal(this.dom.removeTitle,this.s.dt.i18n("stateRestore.removeSubmit",this.c.i18n.removeSubmit),s,this.dom.removeContents),!0)},n.prototype.compare=function(e){if(this.c.saveState.order||(e.order=void 0),this.c.saveState.search||(e.search=void 0),this.c.saveState.columns&&e.columns)for(var t=0,s=e.columns.length;t<s;t++)"boolean"==typeof this.c.saveState.columns||this.c.saveState.columns.visible||(e.columns[t].visible=void 0),"boolean"==typeof this.c.saveState.columns||this.c.saveState.columns.search||(e.columns[t].search=void 0);else this.c.saveState.columns||(e.columns=void 0);this.c.saveState.paging||(e.page=void 0),this.c.saveState.searchBuilder||(e.searchBuilder=void 0),this.c.saveState.searchPanes||(e.searchPanes=void 0),this.c.saveState.select||(e.select=void 0),this.c.saveState.colReorder||(e.ColReorder=void 0),this.c.saveState.scroller||(e.scroller=void 0)!==m.Scroller&&(e.start=0),this.c.saveState.paging||(e.start=0),this.c.saveState.length||(e.length=void 0),delete e.time;var o=this.s.savedState;return delete o.time,delete o.c,delete o.stateRestore,this._deepCompare(e,o)},n.prototype.destroy=function(){u.each(this.dom,function(e,t){t.off().remove()})},n.prototype.load=function(){function e(){o.s.dt.one("preDraw",function(e,s){setTimeout(function(){var e=s._iDisplayStart/s._iDisplayLength,t=i.start/i.length;0<=e&&0<=t&&e!=t&&o.s.dt.page(t).draw(!1)},50)}),o.s.dt.draw(!1)}var o=this,i=this.s.savedState,t=this.s.dt.settings()[0];i.time=+new Date,t.oLoadedState=u.extend(!0,{},i),u("div.dt-button-background").click();return c.versionCheck("2")?(this.s.dt.state(i),e()):c.ext.oApi._fnImplementState(t,i,e),i},n.prototype.rename=function(s,o){var i=this;if(void 0===s&&(s=null),this.c.rename){var e=function(){if(null===s){var e=u("input."+i.classes.input.replace(/ /g,".")).val();if(0===e.length)return i.dom.confirmation.children("."+i.classes.modalError).remove(),i.dom.confirmation.append(i.dom.emptyError),"empty";if(o.includes(e))return i.dom.confirmation.children("."+i.classes.modalError).remove(),i.dom.confirmation.append(i.dom.duplicateError),"duplicate";s=e}function t(){i.s.identifier=s,i.save(i.s.savedState,function(){return null},!1),i.dom.removeContents=u('<div class="'+i.classes.confirmationText+'"><span>'+i.s.dt.i18n("stateRestore.removeConfirm",i.c.i18n.removeConfirm).replace(/%s/g,i.s.identifier)+"</span></div>"),i.dom.confirmation.trigger("dtsr-rename"),i.dom.background.click(),i.dom.confirmation.remove(),u(g).unbind("keyup",function(e){return i._keyupFunction(e)}),i.dom.confirmationButton.off("click")}e={action:"rename",stateRestore:((e={})[i.s.identifier]=s,e)};if(i.c.ajax)"string"==typeof i.c.ajax&&i.s.dt.settings()[0]._bInitComplete?u.ajax({data:e,success:t,type:"POST",url:i.c.ajax}):"function"==typeof i.c.ajax&&i.c.ajax.call(i.s.dt,e,t);else try{localStorage.removeItem("DataTables_stateRestore_"+i.s.identifier+"_"+location.pathname+(i.s.tableId?"_"+i.s.tableId:"")),t()}catch(e){return i.dom.confirmation.children("."+i.classes.modalError).remove(),i.dom.confirmation.append(i.dom.removeError),!1}return!0};if(null!==s){if(o.includes(s))throw new Error(this.s.dt.i18n("stateRestore.duplicateError",this.c.i18n.duplicateError));if(0===s.length)throw new Error(this.s.dt.i18n("stateRestore.emptyError",this.c.i18n.emptyError));this.dom.confirmation.appendTo(this.dom.dtContainer),u(this.s.dt.table().node()).trigger("dtsr-modal-inserted"),e(),this.dom.confirmation.remove()}else this.dom.renameInput.val(this.s.identifier),this.dom.renameContents.append(this.dom.renameInput),this._newModal(this.dom.renameTitle,this.s.dt.i18n("stateRestore.renameButton",this.c.i18n.renameButton),e,this.dom.renameContents)}},n.prototype.save=function(e,t,s){var o,i=this;if(void 0===s&&(s=!0),this.c.save){if(this.s.dt.state.save(),void 0===e)o=this.s.dt.state();else{if("object"!=typeof e)return;o=e}if(o.stateRestore?(o.stateRestore.isPreDefined=this.s.isPreDefined,o.stateRestore.state=this.s.identifier,o.stateRestore.tableId=this.s.tableId):o.stateRestore={isPreDefined:this.s.isPreDefined,state:this.s.identifier,tableId:this.s.tableId},this.s.savedState=o,this.c.saveState.order||(this.s.savedState.order=void 0),this.c.saveState.search||(this.s.savedState.search=void 0),this.c.saveState.columns&&this.s.savedState.columns)for(var a=0,n=this.s.savedState.columns.length;a<n;a++)"boolean"==typeof this.c.saveState.columns||this.c.saveState.columns.visible||(this.s.savedState.columns[a].visible=void 0),"boolean"==typeof this.c.saveState.columns||this.c.saveState.columns.search||(this.s.savedState.columns[a].search=void 0);else this.c.saveState.columns||(this.s.savedState.columns=void 0);if(this.c.saveState.searchBuilder||(this.s.savedState.searchBuilder=void 0),this.c.saveState.searchPanes||(this.s.savedState.searchPanes=void 0),this.c.saveState.select||(this.s.savedState.select=void 0),this.c.saveState.colReorder||(this.s.savedState.ColReorder=void 0),this.c.saveState.scroller||(this.s.savedState.scroller=void 0)!==m.Scroller&&(this.s.savedState.start=0),this.c.saveState.paging||(this.s.savedState.start=0),this.c.saveState.length||(this.s.savedState.length=void 0),this.s.savedState.c=this.c,this.s.savedState.c.splitSecondaries.length)for(var r=0,c=this.s.savedState.c.splitSecondaries;r<c.length;r++){var l=c[r];l.parent&&(l.parent=void 0)}var d={action:"save",stateRestore:((e={})[this.s.identifier]=this.s.savedState,e)},h=function(){t&&t.call(i),i.dom.confirmation.trigger("dtsr-save"),u(i.s.dt.table().node()).trigger("stateRestore-change")};this.c.ajax?"string"==typeof this.c.ajax&&s?this.s.dt.settings()[0]._bInitComplete?u.ajax({data:d,success:h,type:"POST",url:this.c.ajax}):this.s.dt.one("init",function(){u.ajax({data:d,success:h,type:"POST",url:i.c.ajax})}):"function"==typeof this.c.ajax&&s&&this.c.ajax.call(this.s.dt,d,h):(localStorage.setItem("DataTables_stateRestore_"+this.s.identifier+"_"+location.pathname+(this.s.tableId?"_"+this.s.tableId:""),JSON.stringify(this.s.savedState)),h())}else t&&t.call(this)},n.entityEncode=function(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):e},n.prototype._deepCompare=function(e,t){if(null!==e||null!==t){if(null===e||null===t)return!1;var s,o,i=[e,t],a=[Object.keys(e).sort(),Object.keys(t).sort()];for(a[0].includes("scroller")&&(s=a[0].indexOf("start"))&&a[0].splice(s,1),a[1].includes("scroller")&&(s=a[1].indexOf("start"))&&a[1].splice(s,1),o=0;o<a[0].length;o++)0!==a[0][o].indexOf("_")&&"baseRowTop"!==a[0][o]&&"baseScrollTop"!==a[0][o]&&"scrollTop"!==a[0][o]&&(this.c.saveState.paging||"page"!==a[0][o])||(a[0].splice(o,1),o--);for(o=0;o<a[1].length;o++)0!==a[1][o].indexOf("_")&&"baseRowTop"!==a[1][o]&&"baseScrollTop"!==a[1][o]&&"scrollTop"!==a[1][o]&&(this.c.saveState.paging||"page"!==a[0][o])||(a[1].splice(o,1),o--);if(0===a[0].length&&0<a[1].length||0===a[1].length&&0<a[0].length)return!1;for(o=0;o<a[0].length;o++)a[1].includes(a[0][o])||(a[0].splice(o,1),o--);for(o=0;o<a[1].length;o++)a[0].includes(a[1][o])||(a[1].splice(o,1),o--);for(o=0;o<a[0].length;o++){if(a[0][o]!==a[1][o]||typeof i[0][a[0][o]]!=typeof i[1][a[1][o]])return!1;if("object"==typeof i[0][a[0][o]]){if(Array.isArray(i[0][a[0][o]])&&Array.isArray(i[1][a[1][o]])&&i[0][a[0][o]].length!==i[1][a[0][o]].length)return!1;if(!this._deepCompare(i[0][a[0][o]],i[1][a[1][o]]))return!1}else if("number"==typeof i[0][a[0][o]]&&"number"==typeof i[1][a[1][o]]){if(Math.round(i[0][a[0][o]])!==Math.round(i[1][a[1][o]]))return!1}else if(i[0][a[0][o]]!==i[1][a[1][o]])return!1}}return!0},n.prototype._keyupFunction=function(e){"Enter"===e.key?this.dom.confirmationButton.click():"Escape"===e.key&&u("div."+this.classes.background.replace(/ /g,".")).click()},n.prototype._newModal=function(e,t,s,o){var i=this,e=(this.dom.background.appendTo(this.dom.dtContainer),this.dom.confirmationTitleRow.empty().append(e),this.dom.confirmationButton.html(t),this.dom.confirmation.empty().append(this.dom.confirmationTitleRow).append(o).append(u('<div class="'+this.classes.confirmationButtons+'"></div>').append(this.dom.confirmationButton)).appendTo(this.dom.dtContainer),u(this.s.dt.table().node()).trigger("dtsr-modal-inserted"),o.children("input")),a=((0<e.length?u(e[0]):this.dom.confirmationButton).focus(),u("div."+this.classes.background.replace(/ /g,".")));this.c.modalCloseButton&&(this.dom.confirmation.append(this.dom.closeButton),this.dom.closeButton.on("click",function(){return a.click()})),this.dom.confirmationButton.on("click",function(){return s()}),this.dom.confirmation.on("click",function(e){e.stopPropagation()}),a.one("click",function(){i.dom.background.remove(),i.dom.confirmation.remove(),u(g).unbind("keyup",function(e){return i._keyupFunction(e)})}),u(g).on("keyup",function(e){return i._keyupFunction(e)})},n.version="1.4.2",n.classes={background:"dtsr-background",closeButton:"dtsr-popover-close",confirmation:"dtsr-confirmation",confirmationButton:"dtsr-confirmation-button",confirmationButtons:"dtsr-confirmation-buttons",confirmationMessage:"dtsr-confirmation-message dtsr-name-label",confirmationText:"dtsr-confirmation-text",confirmationTitle:"dtsr-confirmation-title",confirmationTitleRow:"dtsr-confirmation-title-row",dtButton:"dt-button",input:"dtsr-input",modalError:"dtsr-modal-error",renameModal:"dtsr-rename-modal"},n.defaults={_createInSaved:!1,ajax:!1,create:!0,creationModal:!1,i18n:{creationModal:{button:"Create",colReorder:"Column Order:",columns:{search:"Column Search:",visible:"Column Visibility:"},length:"Page Length:",name:"Name:",order:"Sorting:",paging:"Paging:",scroller:"Scroll Position:",search:"Search:",searchBuilder:"SearchBuilder:",searchPanes:"SearchPanes:",select:"Select:",title:"Create New State",toggleLabel:"Includes:"},duplicateError:"A state with this name already exists.",emptyError:"Name cannot be empty.",emptyStates:"No saved states",removeConfirm:'Are you sure you want to remove "%s"?',removeError:"Failed to remove state.",removeJoiner:" and ",removeSubmit:"Remove",removeTitle:"Remove State",renameButton:"Rename",renameLabel:'New Name for "%s":',renameTitle:"Rename State"},modalCloseButton:!0,remove:!0,rename:!0,save:!0,saveState:{colReorder:!0,columns:{search:!0,visible:!0},length:!0,order:!0,paging:!0,scroller:!0,search:!0,searchBuilder:!0,searchPanes:!0,select:!0},splitSecondaries:["updateState","renameState","removeState"],toggle:{colReorder:!1,columns:{search:!1,visible:!1},length:!1,order:!1,paging:!1,scroller:!1,search:!1,searchBuilder:!1,searchPanes:!1,select:!1},createButton:null,createState:null},k=n,r.prototype.addState=function(e,u,m){var v=this;if(this.c.create&&this.c.save){var t=function(e,t){if(0===e.length)return"empty";if(u.includes(e))return"duplicate";v.s.dt.state.save();var s=v,o=v.s.dt.state();if(o.stateRestore={isPredefined:!1,state:e,tableId:v.s.dt.table().node().id},t.saveState){for(var i=v.c.saveState,a=0,n=Object.keys(t.saveState);a<n.length;a++){var r=n[a];if("object"==typeof t.saveState[r])for(var c=0,l=Object.keys(t.saveState[r]);c<l.length;c++){var d=l[c];t.saveState[r][d]||(i[r][d]=!1)}else t.saveState[r]||(i[r]=!1)}v.c.saveState=i}var h=new k(v.s.dt.settings()[0],f.extend(!0,{},v.c,m),e,o,!1,function(){s.s.states.push(this),s._collectionRebuild()});return f(v.s.dt.table().node()).on("dtsr-modal-inserted",function(){h.dom.confirmation.one("dtsr-remove",function(){return v._removeCallback(h.s.identifier)}),h.dom.confirmation.one("dtsr-rename",function(){return v._collectionRebuild()}),h.dom.confirmation.one("dtsr-save",function(){return v._collectionRebuild()})}),!0};if(null!==this.getState(e))throw new Error(this.s.dt.i18n("stateRestore.duplicateError",this.c.i18n.duplicateError));if(this.c.creationModal||void 0!==m&&m.creationModal)this._creationModal(t,e,m);else{t=t(e,{});if("empty"===t)throw new Error(this.s.dt.i18n("stateRestore.emptyError",this.c.i18n.emptyError));if("duplicate"===t)throw new Error(this.s.dt.i18n("stateRestore.duplicateError",this.c.i18n.duplicateError))}}},r.prototype.removeAll=function(e){var t,s;0!==this.s.states.length&&(s=(t=this.s.states.map(function(e){return e.s.identifier}))[0],1<t.length&&(s=t.slice(0,-1).join(", ")+this.s.dt.i18n("stateRestore.removeJoiner",this.c.i18n.removeJoiner)+t.slice(-1)),f(this.dom.removeContents.children("span")).html(this.s.dt.i18n("stateRestore.removeConfirm",this.c.i18n.removeConfirm).replace(/%s/g,s)),this._newModal(this.dom.removeTitle,this.s.dt.i18n("stateRestore.removeSubmit",this.c.i18n.removeSubmit),e,this.dom.removeContents))},r.prototype.destroy=function(){for(var e=0,t=this.s.states;e<t.length;e++)t[e].destroy();f.each(this.dom,function(e,t){t.off().remove()}),this.s.states=[],this.s.dt.off(".dtsr"),f(this.s.dt.table().node()).off(".dtsr")},r.prototype.findActive=function(){this.s.dt.state.save();for(var e=this.s.dt.state(),t=this.s.dt.buttons().nodes(),s=0,o=t;s<o.length;s++)d=o[s],(f(d).hasClass("dtsr-state")||f(d).children().hasClass("dtsr-state"))&&this.s.dt.button(d).active(!1);for(var i=[],a=0,n=this.s.states;a<n.length;a++){var r=n[a];if(r.compare(e)){i.push({data:r.s.savedState,name:r.s.identifier});for(var c=0,l=t;c<l.length;c++){var d=l[c],h=this.s.dt.button(d);if(h.text()===r.s.identifier){h.active(!0);break}}}}return i},r.prototype.getState=function(e){for(var t=0,s=this.s.states;t<s.length;t++){var o=s[t];if(o.s.identifier===e)return o}return null},r.prototype.getStates=function(e){if(void 0===e)return this.s.states;for(var t=[],s=0,o=e;s<o.length;s++){for(var i=o[s],a=!1,n=0,r=this.s.states;n<r.length;n++){var c=r[n];if(i===c.s.identifier){t.push(c),a=!0;break}}a||t.push(void 0)}return t},r.prototype._addPreDefined=function(n){for(var r=this,e=Object.keys(n).sort(function(e,t){return t<e?1:e<t?-1:0}),c=this,t=0,s=e;t<s.length;t++)(e=>{for(var t=0;t<c.s.states.length;t++)c.s.states[t].s.identifier===e&&c.s.states.splice(t,1);var s=c,o=c._fixTypes(n[e]),i=f.extend(!0,{},c.c,void 0!==o.c?{saveState:o.c.saveState,remove:o.c.remove,rename:o.c.rename,save:o.c.save}:void 0,!0),a=(c.c.createState&&c.c.createState(i,o),new k(c.s.dt,i,e,o,!0,function(){s.s.states.push(this),s._collectionRebuild()}));f(c.s.dt.table().node()).on("dtsr-modal-inserted",function(){a.dom.confirmation.one("dtsr-remove",function(){return r._removeCallback(a.s.identifier)}),a.dom.confirmation.one("dtsr-rename",function(){return r._collectionRebuild()}),a.dom.confirmation.one("dtsr-save",function(){return r._collectionRebuild()})})})(s[t])},r.prototype._collectionRebuild=function(){var e=this.s.dt.button("SaveStateRestore:name"),t=[];if(e[0])for(var s=e.index().split("-"),t=e[0].inst.c.buttons,o=0;o<s.length;o++){if(!t[s[o]].buttons){t=[];break}t=t[s[o]].buttons}for(o=0;o<t.length;o++)"stateRestore"===t[o].extend&&(t.splice(o,1),o--);this.c._createInSaved&&t.push("createState");var i='<span class="'+this.classes.emptyStates+'">'+this.s.dt.i18n("stateRestore.emptyStates",this.c.i18n.emptyStates)+"</span>";if(0===this.s.states.length)t.includes(i)||t.push(i);else{for(;t.includes(i);)t.splice(t.indexOf(i),1);this.s.states=this.s.states.sort(function(e,t){e=e.s.identifier,t=t.s.identifier;return t<e?1:e<t?-1:0});for(var a=0,n=this.s.states;a<n.length;a++){var r=n[a],c=this.c.splitSecondaries.slice(),c=(!c.includes("updateState")||this.c.save&&r.c.save||c.splice(c.indexOf("updateState"),1),!c.includes("renameState")||this.c.save&&r.c.save&&this.c.rename&&r.c.rename||c.splice(c.indexOf("renameState"),1),!c.includes("removeState")||this.c.remove&&r.c.remove||c.splice(c.indexOf("removeState"),1),{_stateRestore:r,attr:{title:r.s.identifier},config:{split:c},extend:"stateRestore",text:k.entityEncode(r.s.identifier),popoverTitle:k.entityEncode(r.s.identifier)});this.c.createButton&&this.c.createButton(c,r.s.savedState),t.push(c)}}e.collectionRebuild(t);for(var l=0,d=this.s.dt.buttons();l<d.length;l++){var h=d[l];f(h.node).hasClass("dtsr-removeAllStates")&&(0===this.s.states.length?this.s.dt.button(h.node).disable():this.s.dt.button(h.node).enable())}},r.prototype._creationModal=function(t,e,s){for(var o,i=this,e=(this.dom.creation.empty(),this.dom.creationForm.empty(),this.dom.nameInputRow.find("input").val(e),this.dom.creationForm.append(this.dom.nameInputRow),this.s.dt.settings()[0].oInit),a=[],n=void 0!==s&&void 0!==s.toggle,r=(((!n||void 0===s.toggle.order)&&this.c.toggle.order||n&&s.toggle.order)&&this.c.saveState.order&&(void 0===e.ordering||e.ordering)&&a.push(this.dom.orderToggle),((!n||void 0===s.toggle.search)&&this.c.toggle.search||n&&s.toggle.search)&&this.c.saveState.search&&(void 0===e.searching||e.searching)&&a.push(this.dom.searchToggle),((!n||void 0===s.toggle.paging)&&this.c.toggle.paging||n&&s.toggle.paging)&&this.c.saveState.paging&&(void 0===e.paging||e.paging)&&a.push(this.dom.pagingToggle),((!n||void 0===s.toggle.length)&&this.c.toggle.length||n&&s.toggle.length)&&this.c.saveState.length&&(void 0===e.length||e.length)&&a.push(this.dom.lengthToggle),this.s.hasColReorder&&((!n||void 0===s.toggle.colReorder)&&this.c.toggle.colReorder||n&&s.toggle.colReorder)&&this.c.saveState.colReorder&&a.push(this.dom.colReorderToggle),this.s.hasScroller&&((!n||void 0===s.toggle.scroller)&&this.c.toggle.scroller||n&&s.toggle.scroller)&&this.c.saveState.scroller&&a.push(this.dom.scrollerToggle),this.s.hasSearchBuilder&&((!n||void 0===s.toggle.searchBuilder)&&this.c.toggle.searchBuilder||n&&s.toggle.searchBuilder)&&this.c.saveState.searchBuilder&&a.push(this.dom.searchBuilderToggle),this.s.hasSearchPanes&&((!n||void 0===s.toggle.searchPanes)&&this.c.toggle.searchPanes||n&&s.toggle.searchPanes)&&this.c.saveState.searchPanes&&a.push(this.dom.searchPanesToggle),this.s.hasSelect&&((!n||void 0===s.toggle.select)&&this.c.toggle.select||n&&s.toggle.select)&&this.c.saveState.select&&a.push(this.dom.selectToggle),"boolean"==typeof this.c.toggle.columns&&((!n||void 0===s.toggle.order)&&this.c.toggle.columns||n&&s.toggle.order)&&this.c.saveState.columns?(a.push(this.dom.columnsSearchToggle),a.push(this.dom.columnsVisibleToggle)):(n&&void 0!==s.toggle.columns||"boolean"==typeof this.c.toggle.columns)&&"boolean"==typeof s.toggle.order||("boolean"!=typeof this.c.saveState.columns&&this.c.saveState.columns?((n&&void 0!==s.toggle.columns&&"boolean"!=typeof s.toggle.columns&&s.toggle.columns.search||(!n||void 0===s.toggle.columns||"boolean"!=typeof s.toggle.columns&&void 0===s.toggle.columns.search)&&"boolean"!=typeof this.c.toggle.columns&&this.c.toggle.columns.search)&&this.c.saveState.columns.search&&a.push(this.dom.columnsSearchToggle),(n&&void 0!==s.toggle.columns&&"boolean"!=typeof s.toggle.columns&&s.toggle.columns.visible||(!n||void 0===s.toggle.columns||"boolean"!=typeof s.toggle.columns&&void 0===s.toggle.columns.visible)&&"boolean"!=typeof this.c.toggle.columns&&this.c.toggle.columns.visible)&&this.c.saveState.columns.visible&&a.push(this.dom.columnsVisibleToggle)):this.c.saveState.columns&&(a.push(this.dom.columnsSearchToggle),a.push(this.dom.columnsVisibleToggle))),a.sort(function(e,t){e=e.text(),t=t.text();return e<t?-1:t<e?1:0}),this.dom.checkboxInputRow.css("display",a.length?"block":"none").appendTo(this.dom.creationForm).find("div.dtsr-input").empty()),c=0,l=a;c<l.length;c++)o=l[c],r.append(o);this.dom.background.appendTo(this.dom.dtContainer),this.dom.creation.append(this.dom.creationTitle).append(this.dom.creationForm).append(this.dom.createButtonRow).appendTo(this.dom.dtContainer),f(this.s.dt.table().node()).trigger("dtsr-modal-inserted");for(var d=0,h=a;d<h.length;d++)f((o=h[d]).children("label:last-child")).on("click",function(){o.children("input").prop("checked",!o.children("input").prop("checked"))});function u(e){"Enter"===e.key?m.click():"Escape"===e.key&&v.click()}var m=f("button."+this.classes.creationButton.replace(/ /g,".")),e=this.dom.creationForm.find("input"),v=((0<e.length?f(e[0]):m).focus(),f("div."+this.classes.background.replace(/ /g,".")));this.c.modalCloseButton&&(this.dom.creation.append(this.dom.closeButton),this.dom.closeButton.on("click",function(){return v.click()})),m.on("click",function(){var e={colReorder:i.dom.colReorderToggle.find("input").is(":checked"),columns:{search:i.dom.columnsSearchToggle.find("input").is(":checked"),visible:i.dom.columnsVisibleToggle.find("input").is(":checked")},length:i.dom.lengthToggle.find("input").is(":checked"),order:i.dom.orderToggle.find("input").is(":checked"),paging:i.dom.pagingToggle.find("input").is(":checked"),scroller:i.dom.scrollerToggle.find("input").is(":checked"),search:i.dom.searchToggle.find("input").is(":checked"),searchBuilder:i.dom.searchBuilderToggle.find("input").is(":checked"),searchPanes:i.dom.searchPanesToggle.find("input").is(":checked"),select:i.dom.selectToggle.find("input").is(":checked")},e=t(f("input."+i.classes.nameInput.replace(/ /g,".")).val(),{saveState:e});!0===e?(i.dom.background.remove(),i.dom.creation.remove(),f(g).unbind("keyup",u)):(i.dom.creation.children("."+i.classes.modalError).remove(),i.dom.creation.append(i.dom[e+"Error"]))}),v.one("click",function(){i.dom.background.remove(),i.dom.creation.remove(),f(g).unbind("keyup",u),i._collectionRebuild()}),f(g).on("keyup",u),this.s.dt.state.save()},r.prototype._fixTypes=function(e){function t(e,t){var s=e[t];void 0!==s&&(e[t]="number"==typeof s?s:parseInt(s))}function s(e,t){var s=e[t];void 0!==s&&(e[t]="string"!=typeof s?s:"true"===s)}var o;if(t(e,"start"),t(e,"length"),t(e,"time"),e.order)for(o=0;o<e.order.length;o++)t(e.order[o],0);if(e.search&&(s(e.search,"caseInsensitive"),s(e.search,"regex"),s(e.search,"smart"),s(e.search,"visible"),s(e.search,"return")),e.columns)for(o=0;o<e.columns.length;o++)s(e.columns[o],"caseInsensitive"),s(e.columns[o],"regex"),s(e.columns[o],"smart"),s(e.columns[o],"visible");if(e.colReorder)for(o=0;o<e.colReorder.length;o++)t(e.colReorder,o);return e},r.prototype._removeCallback=function(e){for(var t=0;t<this.s.states.length;t++)this.s.states[t].s.identifier===e&&(this.s.states.splice(t,1),t--);return this._collectionRebuild(),!0},r.prototype._newModal=function(e,t,s,o){function i(e){"Enter"===e.key?n.click():"Escape"===e.key&&r.click()}var a=this,n=(this.dom.background.appendTo(this.dom.dtContainer),this.dom.confirmationTitleRow.empty().append(e),f('<button class="'+this.classes.confirmationButton+" "+this.classes.dtButton+'">'+t+"</button>")),e=(this.dom.confirmation.empty().append(this.dom.confirmationTitleRow).append(o).append(f('<div class="'+this.classes.confirmationButtons+'"></div>').append(n)).appendTo(this.dom.dtContainer),f(this.s.dt.table().node()).trigger("dtsr-modal-inserted"),o.children("input")),r=((0<e.length?f(e[0]):n).focus(),f("div."+this.classes.background.replace(/ /g,".")));n.on("click",function(){var e=s(!0);!0===e?(a.dom.background.remove(),a.dom.confirmation.remove(),f(g).unbind("keyup",i),n.off("click")):(a.dom.confirmation.children("."+a.classes.modalError).remove(),a.dom.confirmation.append(a.dom[e+"Error"]))}),this.dom.confirmation.on("click",function(e){e.stopPropagation()}),r.one("click",function(){a.dom.background.remove(),a.dom.confirmation.remove(),f(g).unbind("keyup",i)}),f(g).on("keyup",i)},r.prototype._searchForStates=function(){for(var i=this,e=Object.keys(localStorage),a=this,t=0,s=e;t<s.length;t++)(e=>{if(e.startsWith("DataTables_stateRestore_")&&(e.endsWith(location.pathname)||e.endsWith(location.pathname+"_"+a.s.dt.table().node().id))){var t=JSON.parse(localStorage.getItem(e));if(t.stateRestore.isPreDefined||t.stateRestore.tableId&&t.stateRestore.tableId!==a.s.dt.table().node().id)return;var s=a,o=new k(a.s.dt,f.extend(!0,{},a.c,{saveState:t.c.saveState}),t.stateRestore.state,t,!1,function(){this.s.savedState=t,s.s.states.push(this),s._collectionRebuild()});f(a.s.dt.table().node()).on("dtsr-modal-inserted",function(){o.dom.confirmation.one("dtsr-remove",function(){return i._removeCallback(o.s.identifier)}),o.dom.confirmation.one("dtsr-rename",function(){return i._collectionRebuild()}),o.dom.confirmation.one("dtsr-save",function(){return i._collectionRebuild()})})}})(s[t])},r.version="1.0.0",r.classes={background:"dtsr-background",checkBox:"dtsr-check-box",checkLabel:"dtsr-check-label",checkRow:"dtsr-check-row",closeButton:"dtsr-popover-close",colReorderToggle:"dtsr-colReorder-toggle",columnsSearchToggle:"dtsr-columns-search-toggle",columnsVisibleToggle:"dtsr-columns-visible-toggle",confirmation:"dtsr-confirmation",confirmationButton:"dtsr-confirmation-button",confirmationButtons:"dtsr-confirmation-buttons",confirmationMessage:"dtsr-confirmation-message dtsr-name-label",confirmationText:"dtsr-confirmation-text",confirmationTitle:"dtsr-confirmation-title",confirmationTitleRow:"dtsr-confirmation-title-row",creation:"dtsr-creation",creationButton:"dtsr-creation-button",creationForm:"dtsr-creation-form",creationText:"dtsr-creation-text",creationTitle:"dtsr-creation-title",dtButton:"dt-button",emptyStates:"dtsr-emptyStates",formRow:"dtsr-form-row",leftSide:"dtsr-left",lengthToggle:"dtsr-length-toggle",modalError:"dtsr-modal-error",modalFoot:"dtsr-modal-foot",nameInput:"dtsr-name-input",nameLabel:"dtsr-name-label",orderToggle:"dtsr-order-toggle",pagingToggle:"dtsr-paging-toggle",rightSide:"dtsr-right",scrollerToggle:"dtsr-scroller-toggle",searchBuilderToggle:"dtsr-searchBuilder-toggle",searchPanesToggle:"dtsr-searchPanes-toggle",searchToggle:"dtsr-search-toggle",selectToggle:"dtsr-select-toggle",toggleLabel:"dtsr-toggle-title"},r.defaults={_createInSaved:!1,ajax:!1,create:!0,creationModal:!1,i18n:{creationModal:{button:"Create",colReorder:"Column Order",columns:{search:"Column Search",visible:"Column Visibility"},length:"Page Length",name:"Name:",order:"Sorting",paging:"Paging",scroller:"Scroll Position",search:"Search",searchBuilder:"SearchBuilder",searchPanes:"SearchPanes",select:"Select",title:"Create New State",toggleLabel:"Include:"},duplicateError:"A state with this name already exists.",emptyError:"Name cannot be empty.",emptyStates:"No saved states",removeConfirm:"Are you sure you want to remove %s?",removeError:"Failed to remove state.",removeJoiner:" and ",removeSubmit:"Remove",removeTitle:"Remove State",renameButton:"Rename",renameLabel:"New Name for %s:",renameTitle:"Rename State"},modalCloseButton:!0,preDefined:{},remove:!0,rename:!0,save:!0,saveState:{colReorder:!0,columns:{search:!0,visible:!0},length:!0,order:!0,paging:!0,scroller:!0,search:!0,searchBuilder:!0,searchPanes:!0,select:!0},splitSecondaries:["updateState","renameState","removeState"],toggle:{colReorder:!1,columns:{search:!1,visible:!1},length:!1,order:!1,paging:!1,scroller:!1,search:!1,searchBuilder:!1,searchPanes:!1,select:!1},createButton:null,createState:null},s=r,m=(u=y).fn.dataTable,a=(f=y).fn.dataTable,y.fn.dataTable.StateRestore=k,y.fn.DataTable.StateRestore=k,y.fn.dataTable.StateRestoreCollection=s,y.fn.DataTable.StateRestoreCollection=s,(t=c.Api.register)("stateRestore()",function(){return this}),t("stateRestore.state()",function(e){var t,s=this.context[0];return s._stateRestore||l(t=c.Api(s),new c.StateRestoreCollection(t,{})),this[0]=s._stateRestore.getState(e),this}),t("stateRestore.state.add()",function(e,t){var s,o=this.context[0];if(o._stateRestore||l(s=c.Api(o),new c.StateRestoreCollection(s,{})),!o._stateRestore.c.create)return this;if(o._stateRestore.addState){for(var i=[],a=0,n=o._stateRestore.s.states;a<n.length;a++){var r=n[a];i.push(r.s.identifier)}return o._stateRestore.addState(e,i,t),this}}),t("stateRestore.states()",function(e){var t,s=this.context[0];return s._stateRestore||l(t=c.Api(s),new c.StateRestoreCollection(t,{})),this.length=0,this.push.apply(this,s._stateRestore.getStates(e)),this}),t("stateRestore.state().save()",function(){var e=this[0];return e.c.save&&e.save(),this}),t("stateRestore.state().rename()",function(e){var t=this.context[0],s=this[0];if(s.c.save){for(var o=[],i=0,a=t._stateRestore.s.states;i<a.length;i++){var n=a[i];o.push(n.s.identifier)}s.rename(e,o)}return this}),t("stateRestore.state().load()",function(){return this[0].load(),this}),t("stateRestore.state().remove()",function(e){var t=this[0];return t.c.remove&&t.remove(e),this}),t("stateRestore.states().remove()",function(e){function t(e){for(var t=!0,s=i.toArray();0<s.length;){var o=s[0];if(void 0===o||!o.c.remove)break;o=o.remove(e);!0!==o?t=o:s.splice(0,1)}return t}var i=this;return this.context[0]._stateRestore&&this.context[0]._stateRestore.c.remove&&(e?t(e):this.context[0]._stateRestore.removeAll(t)),this}),t("stateRestore.activeStates()",function(){var e,t=this.context[0];return this.length=0,t._stateRestore||l(e=c.Api(t),new c.StateRestoreCollection(e,{})),t._stateRestore&&this.push.apply(this,t._stateRestore.findActive()),this}),c.ext.buttons.stateRestore={action:function(e,t,s,o){o._stateRestore.load(),s.blur()},className:"dtsr-state",config:{split:["updateState","renameState","removeState"]},text:function(e){return e.i18n("buttons.stateRestore","State %d",e.stateRestore.states()[0].length+1)}},c.ext.buttons.updateState={action:function(e,t,s,o){y("div.dt-button-background").click(),o.parent._stateRestore.save()},text:function(e){return e.i18n("buttons.updateState","Update")}},c.ext.buttons.savedStates={buttons:[],extend:"collection",init:function(e,t,s){e.on("stateRestore-change",function(){e.button(t).text(e.i18n("buttons.savedStates","Saved States",e.stateRestore.states().length))}),void 0===e.settings()[0]._stateRestore&&o(e,s)},name:"SaveStateRestore",text:function(e){return e.i18n("buttons.savedStates","Saved States",0)}},c.ext.buttons.savedStatesCreate={buttons:[],extend:"collection",init:function(e,t,s){e.on("stateRestore-change",function(){e.button(t).text(e.i18n("buttons.savedStates","Saved States",e.stateRestore.states().length))}),void 0===e.settings()[0]._stateRestore&&(void 0===s.config&&(s.config={}),s.config._createInSaved=!0,o(e,s))},name:"SaveStateRestore",text:function(e){return e.i18n("buttons.savedStates","Saved States",0)}},c.ext.buttons.createState={action:function(e,t,s,o){e.stopPropagation();var i=t.settings()[0]._stateRestore.c,e=t.settings()[0].oLanguage;if(i.create&&i.save){var a=t.stateRestore.states().toArray(),e=void 0!==e.buttons&&void 0!==e.buttons.stateRestore?e.buttons.stateRestore:"State ";if(e.indexOf("%d")===e.length-3)n=new RegExp(e.replace(/%d/g,""));else for(var e=e.split("%d"),n=[],r=0,c=e;r<c.length;r++){var l=c[r];n.push(new RegExp(l))}for(var d=function(e){if(Array.isArray(n)){i=e;for(var t=0,s=n;t<s.length;t++)var o=s[t],i=i.replace(o,"")}else i=e.replace(n,"");return isNaN(+i)||i.length===e?0:+i},e=a.map(function(e){return d(e.s.identifier)}).sort(function(e,t){return+e<+t?1:+t<+e?-1:0})[0],h=(t.stateRestore.state.add(t.i18n("buttons.stateRestore","State %d",void 0!==e?e+1:1),o.config),t.stateRestore.states().sort(function(e,t){e=+d(e.s.identifier),t=+d(t.s.identifier);return t<e?1:e<t?-1:0})),a=t.button("SaveStateRestore:name"),e=parseInt(a.index()),u=void 0!==a[0]&&void 0!==a[0].inst.c.buttons[e].buttons?a[0].inst.c.buttons[e].buttons:[],m=0;m<u.length;m++)"stateRestore"===u[m].extend&&(u.splice(m,1),m--);i._createInSaved&&u.push("createState");for(var v=0,g=h;v<g.length;v++){var f=g[v],p=i.splitSecondaries.slice();p.includes("updateState")&&!i.save&&p.splice(p.indexOf("updateState"),1),!p.includes("renameState")||i.save&&i.rename||p.splice(p.indexOf("renameState"),1),p.includes("removeState")&&!i.remove&&p.splice(p.indexOf("removeState"),1),u.push({_stateRestore:f,attr:{title:f.s.identifier},config:{split:p},extend:"stateRestore",text:k.entityEncode(f.s.identifier),popoverTitle:k.entityEncode(f.s.identifier)})}t.button("SaveStateRestore:name").collectionRebuild(u),s.blur();for(var b=0,S=t.buttons();b<S.length;b++){var R=S[b];y(R.node).hasClass("dtsr-removeAllStates")&&(0===h.length?t.button(R.node).disable():t.button(R.node).enable())}}},init:function(e,t,s){void 0===e.settings()[0]._stateRestore&&1<e.button("SaveStateRestore:name").length&&o(e,s)},text:function(e){return e.i18n("buttons.createState","Create State")}},c.ext.buttons.removeState={action:function(e,t,s,o){o.parent._stateRestore.remove(),s.blur()},text:function(e){return e.i18n("buttons.removeState","Remove")}},c.ext.buttons.removeAllStates={action:function(e,t,s){t.stateRestore.states().remove(!0),s.blur()},className:"dt-button dtsr-removeAllStates",init:function(e,t){e.settings()[0]._stateRestore&&0!==e.stateRestore.states().length||y(t).addClass("disabled")},text:function(e){return e.i18n("buttons.removeAllStates","Remove All States")}},c.ext.buttons.renameState={action:function(e,t,s,o){for(var i=[],a=0,n=t.settings()[0]._stateRestore.s.states;a<n.length;a++){var r=n[a];i.push(r.s.identifier)}o.parent._stateRestore.rename(void 0,i),s.blur()},text:function(e){return e.i18n("buttons.renameState","Rename")}},y(g).on("preInit.dt.dtsr",function(e,t){"dt"!==e.namespace||!t.oInit.stateRestore&&!c.defaults.stateRestore||t._stateRestore||(e=t,void 0===(t=null)&&(t=null),e=new c.Api(e),t=t||e.init().stateRestore||c.defaults.stateRestore,t=new s(e,t),l(e,t))}),c});
4
+ (s=>{var o,i;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return s(e,window,document)}):"object"==typeof exports?(o=require("jquery"),i=function(e,t){t.fn.dataTable||require("datatables.net")(e,t)},"undefined"==typeof window?module.exports=function(e,t){return e=e||window,t=t||o(e),i(e,t),s(t,0,e.document)}:(i(window,o),module.exports=s(o,window,window.document))):s(jQuery,window,document)})(function(y,e,g){var u,m,f,a,k,s,t,c=y.fn.dataTable;function n(e,t,s,o,i,a){if(void 0===o&&(o=void 0),void 0===i&&(i=!1),void 0===a&&(a=function(){return null}),!m||!m.versionCheck||!m.versionCheck("1.10.0"))throw new Error("StateRestore requires DataTables 1.10 or newer");if(!m.Buttons)throw new Error("StateRestore requires Buttons");e=new m.Api(e);this.classes=u.extend(!0,{},n.classes),this.c=u.extend(!0,{},n.defaults,t),this.s={dt:e,identifier:s,isPreDefined:i,savedState:o,tableId:o&&o.stateRestore?o.stateRestore.tableId:void 0},this.dom={background:u('<div class="'+this.classes.background+'"/>'),closeButton:u('<div class="'+this.classes.closeButton+'">&times;</div>'),confirmation:u('<div class="'+this.classes.confirmation+'"/>'),confirmationButton:u('<button class="'+this.classes.confirmationButton+" "+this.classes.dtButton+'">'),confirmationTitleRow:u('<div class="'+this.classes.confirmationTitleRow+'"></div>'),dtContainer:u(this.s.dt.table().container()),duplicateError:u('<span class="'+this.classes.modalError+'">'+this.s.dt.i18n("stateRestore.duplicateError",this.c.i18n.duplicateError)+"</span>"),emptyError:u('<span class="'+this.classes.modalError+'">'+this.s.dt.i18n("stateRestore.emptyError",this.c.i18n.emptyError)+"</span>"),removeContents:u('<div class="'+this.classes.confirmationText+'"><span>'+this.s.dt.i18n("stateRestore.removeConfirm",this.c.i18n.removeConfirm).replace(/%s/g,n.entityEncode(this.s.identifier))+"</span></div>"),removeError:u('<span class="'+this.classes.modalError+'">'+this.s.dt.i18n("stateRestore.removeError",this.c.i18n.removeError)+"</span>"),removeTitle:u('<h2 class="'+this.classes.confirmationTitle+'">'+this.s.dt.i18n("stateRestore.removeTitle",this.c.i18n.removeTitle)+"</h2>"),renameContents:u('<div class="'+this.classes.confirmationText+" "+this.classes.renameModal+'"><label class="'+this.classes.confirmationMessage+'">'+this.s.dt.i18n("stateRestore.renameLabel",this.c.i18n.renameLabel).replace(/%s/g,n.entityEncode(this.s.identifier))+"</label></div>"),renameInput:u('<input class="'+this.classes.input+'" type="text"></input>'),renameTitle:u('<h2 class="'+this.classes.confirmationTitle+'">'+this.s.dt.i18n("stateRestore.renameTitle",this.c.i18n.renameTitle)+"</h2>")},this.save(o,a,!i)}function r(e,t){var o=this;if(!a||!a.versionCheck||!a.versionCheck("1.10.0"))throw new Error("StateRestore requires DataTables 1.10 or newer");if(!a.Buttons)throw new Error("StateRestore requires Buttons");var s,i,e=new a.Api(e);if(this.classes=f.extend(!0,{},r.classes),void 0===e.settings()[0]._stateRestore)return this.c=f.extend(!0,{},r.defaults,t),this.s={dt:e,hasColReorder:void 0!==a.ColReorder,hasScroller:void 0!==a.Scroller,hasSearchBuilder:void 0!==a.SearchBuilder,hasSearchPanes:void 0!==a.SearchPanes,hasSelect:void 0!==a.select,states:[]},this.s.dt.on("xhr",function(e,t,s){s&&s.stateRestore&&o._addPreDefined(s.stateRestore)}),this.dom={background:f('<div class="'+this.classes.background+'"/>'),checkboxInputRow:f('<div class="'+this.classes.formRow+'"><label class="'+this.classes.nameLabel+'">'+this.s.dt.i18n("stateRestore.creationModal.toggleLabel",this.c.i18n.creationModal.toggleLabel)+'</label><div class="dtsr-input"></div></div>'),closeButton:f('<div class="'+this.classes.closeButton+'">x</div>'),colReorderToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.colReorderToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.colReorder",this.c.i18n.creationModal.colReorder)+"</div>"),columnsSearchToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.columnsSearchToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.columns.search",this.c.i18n.creationModal.columns.search)+"</div>"),columnsVisibleToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.columnsVisibleToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.columns.visible",this.c.i18n.creationModal.columns.visible)+"</div>"),confirmation:f('<div class="'+this.classes.confirmation+'"/>'),confirmationTitleRow:f('<div class="'+this.classes.confirmationTitleRow+'"></div>'),createButtonRow:f('<div class="'+this.classes.formRow+" "+this.classes.modalFoot+'"><button class="'+this.classes.creationButton+" "+this.classes.dtButton+'">'+this.s.dt.i18n("stateRestore.creationModal.button",this.c.i18n.creationModal.button)+"</button></div>"),creation:f('<div class="'+this.classes.creation+'"/>'),creationForm:f('<div class="'+this.classes.creationForm+'"/>'),creationTitle:f('<div class="'+this.classes.creationText+'"><h2 class="'+this.classes.creationTitle+'">'+this.s.dt.i18n("stateRestore.creationModal.title",this.c.i18n.creationModal.title)+"</h2></div>"),dtContainer:f(this.s.dt.table().container()),duplicateError:f('<span class="'+this.classes.modalError+'">'+this.s.dt.i18n("stateRestore.duplicateError",this.c.i18n.duplicateError)+"</span>"),emptyError:f('<span class="'+this.classes.modalError+'">'+this.s.dt.i18n("stateRestore.emptyError",this.c.i18n.emptyError)+"</span>"),lengthToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.lengthToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.length",this.c.i18n.creationModal.length)+"</div>"),nameInputRow:f('<div class="'+this.classes.formRow+'"><label class="'+this.classes.nameLabel+'">'+this.s.dt.i18n("stateRestore.creationModal.name",this.c.i18n.creationModal.name)+'</label><div class="dtsr-input"><input class="'+this.classes.nameInput+'" type="text"></div></div>'),orderToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.orderToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.order",this.c.i18n.creationModal.order)+"</div>"),pagingToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.pagingToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.paging",this.c.i18n.creationModal.paging)+"</div>"),removeContents:f('<div class="'+this.classes.confirmationText+'"><span></span></div>'),removeTitle:f('<div class="'+this.classes.creationText+'"><h2 class="'+this.classes.creationTitle+'">'+this.s.dt.i18n("stateRestore.removeTitle",this.c.i18n.removeTitle)+"</h2></div>"),scrollerToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.scrollerToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.scroller",this.c.i18n.creationModal.scroller)+"</div>"),searchBuilderToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.searchBuilderToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.searchBuilder",this.c.i18n.creationModal.searchBuilder)+"</div>"),searchPanesToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.searchPanesToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.searchPanes",this.c.i18n.creationModal.searchPanes)+"</div>"),searchToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.searchToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.search",this.c.i18n.creationModal.search)+"</div>"),selectToggle:f('<div class="'+this.classes.checkLabel+'"><input type="checkbox" class="'+this.classes.selectToggle+" "+this.classes.checkBox+'" checked>'+this.s.dt.i18n("stateRestore.creationModal.select",this.c.i18n.creationModal.select)+"</div>")},(e.settings()[0]._stateRestore=this)._searchForStates(),this._addPreDefined(this.c.preDefined),i={action:"load"},"function"==typeof this.c.ajax?s=function(){"function"==typeof o.c.ajax&&o.c.ajax.call(o.s.dt,i,function(e){return o._addPreDefined(e)})}:"string"==typeof this.c.ajax&&(s=function(){f.ajax({data:i,dataType:"json",success:function(e){o._addPreDefined(e)},type:"POST",url:o.c.ajax})}),"function"==typeof s&&(this.s.dt.settings()[0]._bInitComplete?s():this.s.dt.one("preInit.dtsr",function(){s()})),this.s.dt.on("destroy.dtsr",function(){o.destroy()}),this.s.dt.on("draw.dtsr buttons-action.dtsr",function(){return o.findActive()}),this}function o(e,t){l(e,new c.StateRestoreCollection(e,t.config))}function l(e,t){var s=e.stateRestore.states(),o=e.button("SaveStateRestore:name"),i=[];if(o[0])for(var a=o.index().split("-"),i=o[0].inst.c.buttons,n=0;n<a.length;n++){if(!i[a[n]].buttons){i=[];break}i=i[a[n]].buttons}var r=e.settings()[0]._stateRestore.c;for(n=0;n<i.length;n++)"stateRestore"===i[n].extend&&(i.splice(n,1),n--);if(r._createInSaved&&i.push("createState"),void 0===s||0===s.length)i.push('<span class="'+t.classes.emptyStates+'">'+e.i18n("stateRestore.emptyStates",t.c.i18n.emptyStates)+"</span>");else for(var c=0,l=s;c<l.length;c++){var d=l[c],h=r.splitSecondaries.slice();h.includes("updateState")&&!r.save&&h.splice(h.indexOf("updateState"),1),!h.includes("renameState")||r.save&&r.rename||h.splice(h.indexOf("renameState"),1),h.includes("removeState")&&!r.remove&&h.splice(h.indexOf("removeState"),1),i.push({_stateRestore:d,attr:{title:d.s.identifier},config:{split:h},extend:"stateRestore",text:k.entityEncode(d.s.identifier),popoverTitle:k.entityEncode(d.s.identifier)})}e.button("SaveStateRestore:name").collectionRebuild(i);for(var u=0,m=e.buttons();u<m.length;u++){var v=m[u];y(v.node).hasClass("dtsr-removeAllStates")&&(0===s.length?e.button(v.node).disable():e.button(v.node).enable())}}return n.prototype.remove=function(e){var t,s,o,i,a=this;return void 0===e&&(e=!1),!!this.c.remove&&(o={action:"remove",stateRestore:((t={})[this.s.identifier]=this.s.savedState,t)},i=function(){a.dom.confirmation.trigger("dtsr-remove"),u(a.s.dt.table().node()).trigger("stateRestore-change"),a.dom.background.click(),a.dom.confirmation.remove(),u(g).unbind("keyup",function(e){return a._keyupFunction(e)}),a.dom.confirmationButton.off("click")},this.c.ajax?"string"==typeof this.c.ajax&&this.s.dt.settings()[0]._bInitComplete?s=function(){return u.ajax({data:o,success:i,type:"POST",url:a.c.ajax}),!0}:"function"==typeof this.c.ajax&&(s=function(){return"function"==typeof a.c.ajax&&a.c.ajax.call(a.s.dt,o,i),!0}):s=function(){try{localStorage.removeItem("DataTables_stateRestore_"+a.s.identifier+"_"+location.pathname+(a.s.tableId?"_"+a.s.tableId:"")),i()}catch(e){return a.dom.confirmation.children("."+a.classes.modalError).remove(),a.dom.confirmation.append(a.dom.removeError),"remove"}return!0},e?(this.dom.confirmation.appendTo(this.dom.dtContainer),u(this.s.dt.table().node()).trigger("dtsr-modal-inserted"),s(),this.dom.confirmation.remove()):this._newModal(this.dom.removeTitle,this.s.dt.i18n("stateRestore.removeSubmit",this.c.i18n.removeSubmit),s,this.dom.removeContents),!0)},n.prototype.compare=function(e){if(this.c.saveState.order||(e.order=void 0),this.c.saveState.search||(e.search=void 0),this.c.saveState.columns&&e.columns)for(var t=0,s=e.columns.length;t<s;t++)"boolean"==typeof this.c.saveState.columns||this.c.saveState.columns.visible||(e.columns[t].visible=void 0),"boolean"==typeof this.c.saveState.columns||this.c.saveState.columns.search||(e.columns[t].search=void 0);else this.c.saveState.columns||(e.columns=void 0);this.c.saveState.paging||(e.page=void 0),this.c.saveState.searchBuilder||(e.searchBuilder=void 0),this.c.saveState.searchPanes||(e.searchPanes=void 0),this.c.saveState.select||(e.select=void 0),this.c.saveState.colReorder||(e.ColReorder=void 0),this.c.saveState.scroller||(e.scroller=void 0)!==m.Scroller&&(e.start=0),this.c.saveState.paging||(e.start=0),this.c.saveState.length||(e.length=void 0),delete e.time;var o=this.s.savedState;return delete o.time,delete o.c,delete o.stateRestore,this._deepCompare(e,o)},n.prototype.destroy=function(){u.each(this.dom,function(e,t){t.off().remove()})},n.prototype.load=function(){function e(){o.s.dt.one("preDraw",function(e,s){setTimeout(function(){var e=s._iDisplayStart/s._iDisplayLength,t=i.start/i.length;0<=e&&0<=t&&e!=t&&o.s.dt.page(t).draw(!1)},50)}),o.s.dt.draw(!1)}var o=this,i=this.s.savedState,t=this.s.dt.settings()[0];i.time=+new Date,t.oLoadedState=u.extend(!0,{},i),u("div.dt-button-background").click();return c.versionCheck("2")?(this.s.dt.state(i),e()):c.ext.oApi._fnImplementState(t,i,e),i},n.prototype.rename=function(s,o){var i=this;if(void 0===s&&(s=null),this.c.rename){var e=function(){if(null===s){var e=u("input."+i.classes.input.replace(/ /g,".")).val();if(0===e.length)return i.dom.confirmation.children("."+i.classes.modalError).remove(),i.dom.confirmation.append(i.dom.emptyError),"empty";if(o.includes(e))return i.dom.confirmation.children("."+i.classes.modalError).remove(),i.dom.confirmation.append(i.dom.duplicateError),"duplicate";s=e}function t(){i.s.identifier=s,i.save(i.s.savedState,function(){return null},!1),i.dom.removeContents=u('<div class="'+i.classes.confirmationText+'"><span>'+i.s.dt.i18n("stateRestore.removeConfirm",i.c.i18n.removeConfirm).replace(/%s/g,i.s.identifier)+"</span></div>"),i.dom.confirmation.trigger("dtsr-rename"),i.dom.background.click(),i.dom.confirmation.remove(),u(g).unbind("keyup",function(e){return i._keyupFunction(e)}),i.dom.confirmationButton.off("click")}e={action:"rename",stateRestore:((e={})[i.s.identifier]=s,e)};if(i.c.ajax)"string"==typeof i.c.ajax&&i.s.dt.settings()[0]._bInitComplete?u.ajax({data:e,success:t,type:"POST",url:i.c.ajax}):"function"==typeof i.c.ajax&&i.c.ajax.call(i.s.dt,e,t);else try{localStorage.removeItem("DataTables_stateRestore_"+i.s.identifier+"_"+location.pathname+(i.s.tableId?"_"+i.s.tableId:"")),t()}catch(e){return i.dom.confirmation.children("."+i.classes.modalError).remove(),i.dom.confirmation.append(i.dom.removeError),!1}return!0};if(null!==s){if(o.includes(s))throw new Error(this.s.dt.i18n("stateRestore.duplicateError",this.c.i18n.duplicateError));if(0===s.length)throw new Error(this.s.dt.i18n("stateRestore.emptyError",this.c.i18n.emptyError));this.dom.confirmation.appendTo(this.dom.dtContainer),u(this.s.dt.table().node()).trigger("dtsr-modal-inserted"),e(),this.dom.confirmation.remove()}else this.dom.renameInput.val(this.s.identifier),this.dom.renameContents.append(this.dom.renameInput),this._newModal(this.dom.renameTitle,this.s.dt.i18n("stateRestore.renameButton",this.c.i18n.renameButton),e,this.dom.renameContents)}},n.prototype.save=function(e,t,s){var o,i=this;if(void 0===s&&(s=!0),this.c.save){if(this.s.dt.state.save(),void 0===e)o=this.s.dt.state();else{if("object"!=typeof e)return;o=e}if(o.stateRestore?(o.stateRestore.isPreDefined=this.s.isPreDefined,o.stateRestore.state=this.s.identifier,o.stateRestore.tableId=this.s.tableId):o.stateRestore={isPreDefined:this.s.isPreDefined,state:this.s.identifier,tableId:this.s.tableId},this.s.savedState=o,this.c.saveState.order||(this.s.savedState.order=void 0),this.c.saveState.search||(this.s.savedState.search=void 0),this.c.saveState.columns&&this.s.savedState.columns)for(var a=0,n=this.s.savedState.columns.length;a<n;a++)"boolean"==typeof this.c.saveState.columns||this.c.saveState.columns.visible||(this.s.savedState.columns[a].visible=void 0),"boolean"==typeof this.c.saveState.columns||this.c.saveState.columns.search||(this.s.savedState.columns[a].search=void 0);else this.c.saveState.columns||(this.s.savedState.columns=void 0);if(this.c.saveState.searchBuilder||(this.s.savedState.searchBuilder=void 0),this.c.saveState.searchPanes||(this.s.savedState.searchPanes=void 0),this.c.saveState.select||(this.s.savedState.select=void 0),this.c.saveState.colReorder||(this.s.savedState.ColReorder=void 0),this.c.saveState.scroller||(this.s.savedState.scroller=void 0)!==m.Scroller&&(this.s.savedState.start=0),this.c.saveState.paging||(this.s.savedState.start=0),this.c.saveState.length||(this.s.savedState.length=void 0),this.s.savedState.c=this.c,this.s.savedState.c.splitSecondaries.length)for(var r=0,c=this.s.savedState.c.splitSecondaries;r<c.length;r++){var l=c[r];l.parent&&(l.parent=void 0)}var d={action:"save",stateRestore:((e={})[this.s.identifier]=this.s.savedState,e)},h=function(){t&&t.call(i),i.dom.confirmation.trigger("dtsr-save"),u(i.s.dt.table().node()).trigger("stateRestore-change")};this.c.ajax?"string"==typeof this.c.ajax&&s?this.s.dt.settings()[0]._bInitComplete?u.ajax({data:d,success:h,type:"POST",url:this.c.ajax}):this.s.dt.one("init",function(){u.ajax({data:d,success:h,type:"POST",url:i.c.ajax})}):"function"==typeof this.c.ajax&&s?this.c.ajax.call(this.s.dt,d,h):s||h():(localStorage.setItem("DataTables_stateRestore_"+this.s.identifier+"_"+location.pathname+(this.s.tableId?"_"+this.s.tableId:""),JSON.stringify(this.s.savedState)),h())}else t&&t.call(this)},n.entityEncode=function(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):e},n.prototype._deepCompare=function(e,t){if(null!==e||null!==t){if(null===e||null===t)return!1;var s,o,i=[e,t],a=[Object.keys(e).sort(),Object.keys(t).sort()];for(a[0].includes("scroller")&&(s=a[0].indexOf("start"))&&a[0].splice(s,1),a[1].includes("scroller")&&(s=a[1].indexOf("start"))&&a[1].splice(s,1),o=0;o<a[0].length;o++)0!==a[0][o].indexOf("_")&&"baseRowTop"!==a[0][o]&&"baseScrollTop"!==a[0][o]&&"scrollTop"!==a[0][o]&&(this.c.saveState.paging||"page"!==a[0][o])||(a[0].splice(o,1),o--);for(o=0;o<a[1].length;o++)0!==a[1][o].indexOf("_")&&"baseRowTop"!==a[1][o]&&"baseScrollTop"!==a[1][o]&&"scrollTop"!==a[1][o]&&(this.c.saveState.paging||"page"!==a[0][o])||(a[1].splice(o,1),o--);if(0===a[0].length&&0<a[1].length||0===a[1].length&&0<a[0].length)return!1;for(o=0;o<a[0].length;o++)a[1].includes(a[0][o])||(a[0].splice(o,1),o--);for(o=0;o<a[1].length;o++)a[0].includes(a[1][o])||(a[1].splice(o,1),o--);for(o=0;o<a[0].length;o++){if(a[0][o]!==a[1][o]||typeof i[0][a[0][o]]!=typeof i[1][a[1][o]])return!1;if("object"==typeof i[0][a[0][o]]){if(Array.isArray(i[0][a[0][o]])&&Array.isArray(i[1][a[1][o]])&&i[0][a[0][o]].length!==i[1][a[0][o]].length)return!1;if(!this._deepCompare(i[0][a[0][o]],i[1][a[1][o]]))return!1}else if("number"==typeof i[0][a[0][o]]&&"number"==typeof i[1][a[1][o]]){if(Math.round(i[0][a[0][o]])!==Math.round(i[1][a[1][o]]))return!1}else if(i[0][a[0][o]]!==i[1][a[1][o]])return!1}}return!0},n.prototype._keyupFunction=function(e){"Enter"===e.key?this.dom.confirmationButton.click():"Escape"===e.key&&u("div."+this.classes.background.replace(/ /g,".")).click()},n.prototype._newModal=function(e,t,s,o){var i=this,e=(this.dom.background.appendTo(this.dom.dtContainer),this.dom.confirmationTitleRow.empty().append(e),this.dom.confirmationButton.html(t),this.dom.confirmation.empty().append(this.dom.confirmationTitleRow).append(o).append(u('<div class="'+this.classes.confirmationButtons+'"></div>').append(this.dom.confirmationButton)).appendTo(this.dom.dtContainer),u(this.s.dt.table().node()).trigger("dtsr-modal-inserted"),o.children("input")),a=((0<e.length?u(e[0]):this.dom.confirmationButton).focus(),u("div."+this.classes.background.replace(/ /g,".")));this.c.modalCloseButton&&(this.dom.confirmation.append(this.dom.closeButton),this.dom.closeButton.on("click",function(){return a.click()})),this.dom.confirmationButton.on("click",function(){return s()}),this.dom.confirmation.on("click",function(e){e.stopPropagation()}),a.one("click",function(){i.dom.background.remove(),i.dom.confirmation.remove(),u(g).unbind("keyup",function(e){return i._keyupFunction(e)})}),u(g).on("keyup",function(e){return i._keyupFunction(e)})},n.version="1.4.3",n.classes={background:"dtsr-background",closeButton:"dtsr-popover-close",confirmation:"dtsr-confirmation",confirmationButton:"dtsr-confirmation-button",confirmationButtons:"dtsr-confirmation-buttons",confirmationMessage:"dtsr-confirmation-message dtsr-name-label",confirmationText:"dtsr-confirmation-text",confirmationTitle:"dtsr-confirmation-title",confirmationTitleRow:"dtsr-confirmation-title-row",dtButton:"dt-button",input:"dtsr-input",modalError:"dtsr-modal-error",renameModal:"dtsr-rename-modal"},n.defaults={_createInSaved:!1,ajax:!1,create:!0,creationModal:!1,i18n:{creationModal:{button:"Create",colReorder:"Column Order:",columns:{search:"Column Search:",visible:"Column Visibility:"},length:"Page Length:",name:"Name:",order:"Sorting:",paging:"Paging:",scroller:"Scroll Position:",search:"Search:",searchBuilder:"SearchBuilder:",searchPanes:"SearchPanes:",select:"Select:",title:"Create New State",toggleLabel:"Includes:"},duplicateError:"A state with this name already exists.",emptyError:"Name cannot be empty.",emptyStates:"No saved states",removeConfirm:'Are you sure you want to remove "%s"?',removeError:"Failed to remove state.",removeJoiner:" and ",removeSubmit:"Remove",removeTitle:"Remove State",renameButton:"Rename",renameLabel:'New Name for "%s":',renameTitle:"Rename State"},modalCloseButton:!0,remove:!0,rename:!0,save:!0,saveState:{colReorder:!0,columns:{search:!0,visible:!0},length:!0,order:!0,paging:!0,scroller:!0,search:!0,searchBuilder:!0,searchPanes:!0,select:!0},splitSecondaries:["updateState","renameState","removeState"],toggle:{colReorder:!1,columns:{search:!1,visible:!1},length:!1,order:!1,paging:!1,scroller:!1,search:!1,searchBuilder:!1,searchPanes:!1,select:!1},createButton:null,createState:null},k=n,r.prototype.addState=function(e,u,m){var v=this;if(this.c.create&&this.c.save){var t=function(e,t){if(0===e.length)return"empty";if(u.includes(e))return"duplicate";v.s.dt.state.save();var s=v,o=v.s.dt.state();if(o.stateRestore={isPredefined:!1,state:e,tableId:v.s.dt.table().node().id},t.saveState){for(var i=v.c.saveState,a=0,n=Object.keys(t.saveState);a<n.length;a++){var r=n[a];if("object"==typeof t.saveState[r])for(var c=0,l=Object.keys(t.saveState[r]);c<l.length;c++){var d=l[c];t.saveState[r][d]||(i[r][d]=!1)}else t.saveState[r]||(i[r]=!1)}v.c.saveState=i}var h=new k(v.s.dt.settings()[0],f.extend(!0,{},v.c,m),e,o,!1,function(){s.s.states.push(this),s._collectionRebuild()});return f(v.s.dt.table().node()).on("dtsr-modal-inserted",function(){h.dom.confirmation.one("dtsr-remove",function(){return v._removeCallback(h.s.identifier)}),h.dom.confirmation.one("dtsr-rename",function(){return v._collectionRebuild()}),h.dom.confirmation.one("dtsr-save",function(){return v._collectionRebuild()})}),!0};if(null!==this.getState(e))throw new Error(this.s.dt.i18n("stateRestore.duplicateError",this.c.i18n.duplicateError));if(this.c.creationModal||void 0!==m&&m.creationModal)this._creationModal(t,e,m);else{t=t(e,{});if("empty"===t)throw new Error(this.s.dt.i18n("stateRestore.emptyError",this.c.i18n.emptyError));if("duplicate"===t)throw new Error(this.s.dt.i18n("stateRestore.duplicateError",this.c.i18n.duplicateError))}}},r.prototype.removeAll=function(e){var t,s;0!==this.s.states.length&&(s=(t=this.s.states.map(function(e){return e.s.identifier}))[0],1<t.length&&(s=t.slice(0,-1).join(", ")+this.s.dt.i18n("stateRestore.removeJoiner",this.c.i18n.removeJoiner)+t.slice(-1)),f(this.dom.removeContents.children("span")).html(this.s.dt.i18n("stateRestore.removeConfirm",this.c.i18n.removeConfirm).replace(/%s/g,s)),this._newModal(this.dom.removeTitle,this.s.dt.i18n("stateRestore.removeSubmit",this.c.i18n.removeSubmit),e,this.dom.removeContents))},r.prototype.destroy=function(){for(var e=0,t=this.s.states;e<t.length;e++)t[e].destroy();f.each(this.dom,function(e,t){t.off().remove()}),this.s.states=[],this.s.dt.off(".dtsr"),f(this.s.dt.table().node()).off(".dtsr")},r.prototype.findActive=function(){this.s.dt.state.save();for(var e=this.s.dt.state(),t=this.s.dt.buttons().nodes(),s=0,o=t;s<o.length;s++)d=o[s],(f(d).hasClass("dtsr-state")||f(d).children().hasClass("dtsr-state"))&&this.s.dt.button(d).active(!1);for(var i=[],a=0,n=this.s.states;a<n.length;a++){var r=n[a];if(r.compare(e)){i.push({data:r.s.savedState,name:r.s.identifier});for(var c=0,l=t;c<l.length;c++){var d=l[c],h=this.s.dt.button(d);if(h.text()===r.s.identifier){h.active(!0);break}}}}return i},r.prototype.getState=function(e){for(var t=0,s=this.s.states;t<s.length;t++){var o=s[t];if(o.s.identifier===e)return o}return null},r.prototype.getStates=function(e){if(void 0===e)return this.s.states;for(var t=[],s=0,o=e;s<o.length;s++){for(var i=o[s],a=!1,n=0,r=this.s.states;n<r.length;n++){var c=r[n];if(i===c.s.identifier){t.push(c),a=!0;break}}a||t.push(void 0)}return t},r.prototype._addPreDefined=function(n){for(var r=this,e=Object.keys(n).sort(function(e,t){return t<e?1:e<t?-1:0}),c=this,t=0,s=e;t<s.length;t++)(e=>{for(var t=0;t<c.s.states.length;t++)c.s.states[t].s.identifier===e&&c.s.states.splice(t,1);var s=c,o=c._fixTypes(n[e]),i=f.extend(!0,{},c.c,void 0!==o.c?{saveState:o.c.saveState,remove:o.c.remove,rename:o.c.rename,save:o.c.save}:void 0,!0),a=(c.c.createState&&c.c.createState(i,o),new k(c.s.dt,i,e,o,!0,function(){s.s.states.push(this),s._collectionRebuild()}));f(c.s.dt.table().node()).on("dtsr-modal-inserted",function(){a.dom.confirmation.one("dtsr-remove",function(){return r._removeCallback(a.s.identifier)}),a.dom.confirmation.one("dtsr-rename",function(){return r._collectionRebuild()}),a.dom.confirmation.one("dtsr-save",function(){return r._collectionRebuild()})})})(s[t])},r.prototype._collectionRebuild=function(){var e=this.s.dt.button("SaveStateRestore:name"),t=[];if(e[0])for(var s=e.index().split("-"),t=e[0].inst.c.buttons,o=0;o<s.length;o++){if(!t[s[o]].buttons){t=[];break}t=t[s[o]].buttons}for(o=0;o<t.length;o++)"stateRestore"===t[o].extend&&(t.splice(o,1),o--);this.c._createInSaved&&t.push("createState");var i='<span class="'+this.classes.emptyStates+'">'+this.s.dt.i18n("stateRestore.emptyStates",this.c.i18n.emptyStates)+"</span>";if(0===this.s.states.length)t.includes(i)||t.push(i);else{for(;t.includes(i);)t.splice(t.indexOf(i),1);this.s.states=this.s.states.sort(function(e,t){e=e.s.identifier,t=t.s.identifier;return t<e?1:e<t?-1:0});for(var a=0,n=this.s.states;a<n.length;a++){var r=n[a],c=this.c.splitSecondaries.slice(),c=(!c.includes("updateState")||this.c.save&&r.c.save||c.splice(c.indexOf("updateState"),1),!c.includes("renameState")||this.c.save&&r.c.save&&this.c.rename&&r.c.rename||c.splice(c.indexOf("renameState"),1),!c.includes("removeState")||this.c.remove&&r.c.remove||c.splice(c.indexOf("removeState"),1),{_stateRestore:r,attr:{title:r.s.identifier},config:{split:c},extend:"stateRestore",text:k.entityEncode(r.s.identifier),popoverTitle:k.entityEncode(r.s.identifier)});this.c.createButton&&this.c.createButton(c,r.s.savedState),t.push(c)}}e.collectionRebuild(t);for(var l=0,d=this.s.dt.buttons();l<d.length;l++){var h=d[l];f(h.node).hasClass("dtsr-removeAllStates")&&(0===this.s.states.length?this.s.dt.button(h.node).disable():this.s.dt.button(h.node).enable())}},r.prototype._creationModal=function(t,e,s){for(var o,i=this,e=(this.dom.creation.empty(),this.dom.creationForm.empty(),this.dom.nameInputRow.find("input").val(e),this.dom.creationForm.append(this.dom.nameInputRow),this.s.dt.settings()[0].oInit),a=[],n=void 0!==s&&void 0!==s.toggle,r=(((!n||void 0===s.toggle.order)&&this.c.toggle.order||n&&s.toggle.order)&&this.c.saveState.order&&(void 0===e.ordering||e.ordering)&&a.push(this.dom.orderToggle),((!n||void 0===s.toggle.search)&&this.c.toggle.search||n&&s.toggle.search)&&this.c.saveState.search&&(void 0===e.searching||e.searching)&&a.push(this.dom.searchToggle),((!n||void 0===s.toggle.paging)&&this.c.toggle.paging||n&&s.toggle.paging)&&this.c.saveState.paging&&(void 0===e.paging||e.paging)&&a.push(this.dom.pagingToggle),((!n||void 0===s.toggle.length)&&this.c.toggle.length||n&&s.toggle.length)&&this.c.saveState.length&&(void 0===e.length||e.length)&&a.push(this.dom.lengthToggle),this.s.hasColReorder&&((!n||void 0===s.toggle.colReorder)&&this.c.toggle.colReorder||n&&s.toggle.colReorder)&&this.c.saveState.colReorder&&a.push(this.dom.colReorderToggle),this.s.hasScroller&&((!n||void 0===s.toggle.scroller)&&this.c.toggle.scroller||n&&s.toggle.scroller)&&this.c.saveState.scroller&&a.push(this.dom.scrollerToggle),this.s.hasSearchBuilder&&((!n||void 0===s.toggle.searchBuilder)&&this.c.toggle.searchBuilder||n&&s.toggle.searchBuilder)&&this.c.saveState.searchBuilder&&a.push(this.dom.searchBuilderToggle),this.s.hasSearchPanes&&((!n||void 0===s.toggle.searchPanes)&&this.c.toggle.searchPanes||n&&s.toggle.searchPanes)&&this.c.saveState.searchPanes&&a.push(this.dom.searchPanesToggle),this.s.hasSelect&&((!n||void 0===s.toggle.select)&&this.c.toggle.select||n&&s.toggle.select)&&this.c.saveState.select&&a.push(this.dom.selectToggle),"boolean"==typeof this.c.toggle.columns&&((!n||void 0===s.toggle.order)&&this.c.toggle.columns||n&&s.toggle.order)&&this.c.saveState.columns?(a.push(this.dom.columnsSearchToggle),a.push(this.dom.columnsVisibleToggle)):(n&&void 0!==s.toggle.columns||"boolean"==typeof this.c.toggle.columns)&&"boolean"==typeof s.toggle.order||("boolean"!=typeof this.c.saveState.columns&&this.c.saveState.columns?((n&&void 0!==s.toggle.columns&&"boolean"!=typeof s.toggle.columns&&s.toggle.columns.search||(!n||void 0===s.toggle.columns||"boolean"!=typeof s.toggle.columns&&void 0===s.toggle.columns.search)&&"boolean"!=typeof this.c.toggle.columns&&this.c.toggle.columns.search)&&this.c.saveState.columns.search&&a.push(this.dom.columnsSearchToggle),(n&&void 0!==s.toggle.columns&&"boolean"!=typeof s.toggle.columns&&s.toggle.columns.visible||(!n||void 0===s.toggle.columns||"boolean"!=typeof s.toggle.columns&&void 0===s.toggle.columns.visible)&&"boolean"!=typeof this.c.toggle.columns&&this.c.toggle.columns.visible)&&this.c.saveState.columns.visible&&a.push(this.dom.columnsVisibleToggle)):this.c.saveState.columns&&(a.push(this.dom.columnsSearchToggle),a.push(this.dom.columnsVisibleToggle))),a.sort(function(e,t){e=e.text(),t=t.text();return e<t?-1:t<e?1:0}),this.dom.checkboxInputRow.css("display",a.length?"block":"none").appendTo(this.dom.creationForm).find("div.dtsr-input").empty()),c=0,l=a;c<l.length;c++)o=l[c],r.append(o);this.dom.background.appendTo(this.dom.dtContainer),this.dom.creation.append(this.dom.creationTitle).append(this.dom.creationForm).append(this.dom.createButtonRow).appendTo(this.dom.dtContainer),f(this.s.dt.table().node()).trigger("dtsr-modal-inserted");for(var d=0,h=a;d<h.length;d++)f((o=h[d]).children("label:last-child")).on("click",function(){o.children("input").prop("checked",!o.children("input").prop("checked"))});function u(e){"Enter"===e.key?m.click():"Escape"===e.key&&v.click()}var m=f("button."+this.classes.creationButton.replace(/ /g,".")),e=this.dom.creationForm.find("input"),v=((0<e.length?f(e[0]):m).focus(),f("div."+this.classes.background.replace(/ /g,".")));this.c.modalCloseButton&&(this.dom.creation.append(this.dom.closeButton),this.dom.closeButton.on("click",function(){return v.click()})),m.on("click",function(){var e={colReorder:i.dom.colReorderToggle.find("input").is(":checked"),columns:{search:i.dom.columnsSearchToggle.find("input").is(":checked"),visible:i.dom.columnsVisibleToggle.find("input").is(":checked")},length:i.dom.lengthToggle.find("input").is(":checked"),order:i.dom.orderToggle.find("input").is(":checked"),paging:i.dom.pagingToggle.find("input").is(":checked"),scroller:i.dom.scrollerToggle.find("input").is(":checked"),search:i.dom.searchToggle.find("input").is(":checked"),searchBuilder:i.dom.searchBuilderToggle.find("input").is(":checked"),searchPanes:i.dom.searchPanesToggle.find("input").is(":checked"),select:i.dom.selectToggle.find("input").is(":checked")},e=t(f("input."+i.classes.nameInput.replace(/ /g,".")).val(),{saveState:e});!0===e?(i.dom.background.remove(),i.dom.creation.remove(),f(g).unbind("keyup",u)):(i.dom.creation.children("."+i.classes.modalError).remove(),i.dom.creation.append(i.dom[e+"Error"]))}),v.one("click",function(){i.dom.background.remove(),i.dom.creation.remove(),f(g).unbind("keyup",u),i._collectionRebuild()}),f(g).on("keyup",u),this.s.dt.state.save()},r.prototype._fixTypes=function(e){function t(e,t){var s=e[t];void 0!==s&&(e[t]="number"==typeof s?s:parseInt(s))}function s(e,t){var s=e[t];void 0!==s&&(e[t]="string"!=typeof s?s:"true"===s)}var o;if(t(e,"start"),t(e,"length"),t(e,"time"),e.order)for(o=0;o<e.order.length;o++)t(e.order[o],0);if(e.search&&(s(e.search,"caseInsensitive"),s(e.search,"regex"),s(e.search,"smart"),s(e.search,"visible"),s(e.search,"return")),e.columns)for(o=0;o<e.columns.length;o++)s(e.columns[o],"caseInsensitive"),s(e.columns[o],"regex"),s(e.columns[o],"smart"),s(e.columns[o],"visible");if(e.colReorder)for(o=0;o<e.colReorder.length;o++)t(e.colReorder,o);return e},r.prototype._removeCallback=function(e){for(var t=0;t<this.s.states.length;t++)this.s.states[t].s.identifier===e&&(this.s.states.splice(t,1),t--);return this._collectionRebuild(),!0},r.prototype._newModal=function(e,t,s,o){function i(e){"Enter"===e.key?n.click():"Escape"===e.key&&r.click()}var a=this,n=(this.dom.background.appendTo(this.dom.dtContainer),this.dom.confirmationTitleRow.empty().append(e),f('<button class="'+this.classes.confirmationButton+" "+this.classes.dtButton+'">'+t+"</button>")),e=(this.dom.confirmation.empty().append(this.dom.confirmationTitleRow).append(o).append(f('<div class="'+this.classes.confirmationButtons+'"></div>').append(n)).appendTo(this.dom.dtContainer),f(this.s.dt.table().node()).trigger("dtsr-modal-inserted"),o.children("input")),r=((0<e.length?f(e[0]):n).focus(),f("div."+this.classes.background.replace(/ /g,".")));n.on("click",function(){var e=s(!0);!0===e?(a.dom.background.remove(),a.dom.confirmation.remove(),f(g).unbind("keyup",i),n.off("click")):(a.dom.confirmation.children("."+a.classes.modalError).remove(),a.dom.confirmation.append(a.dom[e+"Error"]))}),this.dom.confirmation.on("click",function(e){e.stopPropagation()}),r.one("click",function(){a.dom.background.remove(),a.dom.confirmation.remove(),f(g).unbind("keyup",i)}),f(g).on("keyup",i)},r.prototype._searchForStates=function(){for(var i=this,e=Object.keys(localStorage),a=this,t=0,s=e;t<s.length;t++)(e=>{if(e.startsWith("DataTables_stateRestore_")&&(e.endsWith(location.pathname)||e.endsWith(location.pathname+"_"+a.s.dt.table().node().id))){var t=JSON.parse(localStorage.getItem(e));if(t.stateRestore.isPreDefined||t.stateRestore.tableId&&t.stateRestore.tableId!==a.s.dt.table().node().id)return;var s=a,o=new k(a.s.dt,f.extend(!0,{},a.c,{saveState:t.c.saveState}),t.stateRestore.state,t,!1,function(){this.s.savedState=t,s.s.states.push(this),s._collectionRebuild()});f(a.s.dt.table().node()).on("dtsr-modal-inserted",function(){o.dom.confirmation.one("dtsr-remove",function(){return i._removeCallback(o.s.identifier)}),o.dom.confirmation.one("dtsr-rename",function(){return i._collectionRebuild()}),o.dom.confirmation.one("dtsr-save",function(){return i._collectionRebuild()})})}})(s[t])},r.version="1.0.0",r.classes={background:"dtsr-background",checkBox:"dtsr-check-box",checkLabel:"dtsr-check-label",checkRow:"dtsr-check-row",closeButton:"dtsr-popover-close",colReorderToggle:"dtsr-colReorder-toggle",columnsSearchToggle:"dtsr-columns-search-toggle",columnsVisibleToggle:"dtsr-columns-visible-toggle",confirmation:"dtsr-confirmation",confirmationButton:"dtsr-confirmation-button",confirmationButtons:"dtsr-confirmation-buttons",confirmationMessage:"dtsr-confirmation-message dtsr-name-label",confirmationText:"dtsr-confirmation-text",confirmationTitle:"dtsr-confirmation-title",confirmationTitleRow:"dtsr-confirmation-title-row",creation:"dtsr-creation",creationButton:"dtsr-creation-button",creationForm:"dtsr-creation-form",creationText:"dtsr-creation-text",creationTitle:"dtsr-creation-title",dtButton:"dt-button",emptyStates:"dtsr-emptyStates",formRow:"dtsr-form-row",leftSide:"dtsr-left",lengthToggle:"dtsr-length-toggle",modalError:"dtsr-modal-error",modalFoot:"dtsr-modal-foot",nameInput:"dtsr-name-input",nameLabel:"dtsr-name-label",orderToggle:"dtsr-order-toggle",pagingToggle:"dtsr-paging-toggle",rightSide:"dtsr-right",scrollerToggle:"dtsr-scroller-toggle",searchBuilderToggle:"dtsr-searchBuilder-toggle",searchPanesToggle:"dtsr-searchPanes-toggle",searchToggle:"dtsr-search-toggle",selectToggle:"dtsr-select-toggle",toggleLabel:"dtsr-toggle-title"},r.defaults={_createInSaved:!1,ajax:!1,create:!0,creationModal:!1,i18n:{creationModal:{button:"Create",colReorder:"Column Order",columns:{search:"Column Search",visible:"Column Visibility"},length:"Page Length",name:"Name:",order:"Sorting",paging:"Paging",scroller:"Scroll Position",search:"Search",searchBuilder:"SearchBuilder",searchPanes:"SearchPanes",select:"Select",title:"Create New State",toggleLabel:"Include:"},duplicateError:"A state with this name already exists.",emptyError:"Name cannot be empty.",emptyStates:"No saved states",removeConfirm:"Are you sure you want to remove %s?",removeError:"Failed to remove state.",removeJoiner:" and ",removeSubmit:"Remove",removeTitle:"Remove State",renameButton:"Rename",renameLabel:"New Name for %s:",renameTitle:"Rename State"},modalCloseButton:!0,preDefined:{},remove:!0,rename:!0,save:!0,saveState:{colReorder:!0,columns:{search:!0,visible:!0},length:!0,order:!0,paging:!0,scroller:!0,search:!0,searchBuilder:!0,searchPanes:!0,select:!0},splitSecondaries:["updateState","renameState","removeState"],toggle:{colReorder:!1,columns:{search:!1,visible:!1},length:!1,order:!1,paging:!1,scroller:!1,search:!1,searchBuilder:!1,searchPanes:!1,select:!1},createButton:null,createState:null},s=r,m=(u=y).fn.dataTable,a=(f=y).fn.dataTable,y.fn.dataTable.StateRestore=k,y.fn.DataTable.StateRestore=k,y.fn.dataTable.StateRestoreCollection=s,y.fn.DataTable.StateRestoreCollection=s,(t=c.Api.register)("stateRestore()",function(){return this}),t("stateRestore.state()",function(e){var t,s=this.context[0];return s._stateRestore||l(t=c.Api(s),new c.StateRestoreCollection(t,{})),this[0]=s._stateRestore.getState(e),this}),t("stateRestore.state.add()",function(e,t){var s,o=this.context[0];if(o._stateRestore||l(s=c.Api(o),new c.StateRestoreCollection(s,{})),!o._stateRestore.c.create)return this;if(o._stateRestore.addState){for(var i=[],a=0,n=o._stateRestore.s.states;a<n.length;a++){var r=n[a];i.push(r.s.identifier)}return o._stateRestore.addState(e,i,t),this}}),t("stateRestore.states()",function(e){var t,s=this.context[0];return s._stateRestore||l(t=c.Api(s),new c.StateRestoreCollection(t,{})),this.length=0,this.push.apply(this,s._stateRestore.getStates(e)),this}),t("stateRestore.state().save()",function(){var e=this[0];return e.c.save&&e.save(),this}),t("stateRestore.state().rename()",function(e){var t=this.context[0],s=this[0];if(s.c.save){for(var o=[],i=0,a=t._stateRestore.s.states;i<a.length;i++){var n=a[i];o.push(n.s.identifier)}s.rename(e,o)}return this}),t("stateRestore.state().load()",function(){return this[0].load(),this}),t("stateRestore.state().remove()",function(e){var t=this[0];return t.c.remove&&t.remove(e),this}),t("stateRestore.states().remove()",function(e){function t(e){for(var t=!0,s=i.toArray();0<s.length;){var o=s[0];if(void 0===o||!o.c.remove)break;o=o.remove(e);!0!==o?t=o:s.splice(0,1)}return t}var i=this;return this.context[0]._stateRestore&&this.context[0]._stateRestore.c.remove&&(e?t(e):this.context[0]._stateRestore.removeAll(t)),this}),t("stateRestore.activeStates()",function(){var e,t=this.context[0];return this.length=0,t._stateRestore||l(e=c.Api(t),new c.StateRestoreCollection(e,{})),t._stateRestore&&this.push.apply(this,t._stateRestore.findActive()),this}),c.ext.buttons.stateRestore={action:function(e,t,s,o){o._stateRestore.load(),s.blur()},className:"dtsr-state",config:{split:["updateState","renameState","removeState"]},text:function(e){return e.i18n("buttons.stateRestore","State %d",e.stateRestore.states()[0].length+1)}},c.ext.buttons.updateState={action:function(e,t,s,o){y("div.dt-button-background").click(),o.parent._stateRestore.save()},text:function(e){return e.i18n("buttons.updateState","Update")}},c.ext.buttons.savedStates={buttons:[],extend:"collection",init:function(e,t,s){e.on("stateRestore-change",function(){e.button(t).text(e.i18n("buttons.savedStates","Saved States",e.stateRestore.states().length))}),void 0===e.settings()[0]._stateRestore&&o(e,s)},name:"SaveStateRestore",text:function(e){return e.i18n("buttons.savedStates","Saved States",0)}},c.ext.buttons.savedStatesCreate={buttons:[],extend:"collection",init:function(e,t,s){e.on("stateRestore-change",function(){e.button(t).text(e.i18n("buttons.savedStates","Saved States",e.stateRestore.states().length))}),void 0===e.settings()[0]._stateRestore&&(void 0===s.config&&(s.config={}),s.config._createInSaved=!0,o(e,s))},name:"SaveStateRestore",text:function(e){return e.i18n("buttons.savedStates","Saved States",0)}},c.ext.buttons.createState={action:function(e,t,s,o){e.stopPropagation();var i=t.settings()[0]._stateRestore.c,e=t.settings()[0].oLanguage;if(i.create&&i.save){var a=t.stateRestore.states().toArray(),e=void 0!==e.buttons&&void 0!==e.buttons.stateRestore?e.buttons.stateRestore:"State ";if(e.indexOf("%d")===e.length-3)n=new RegExp(e.replace(/%d/g,""));else for(var e=e.split("%d"),n=[],r=0,c=e;r<c.length;r++){var l=c[r];n.push(new RegExp(l))}for(var d=function(e){if(Array.isArray(n)){i=e;for(var t=0,s=n;t<s.length;t++)var o=s[t],i=i.replace(o,"")}else i=e.replace(n,"");return isNaN(+i)||i.length===e?0:+i},e=a.map(function(e){return d(e.s.identifier)}).sort(function(e,t){return+e<+t?1:+t<+e?-1:0})[0],h=(t.stateRestore.state.add(t.i18n("buttons.stateRestore","State %d",void 0!==e?e+1:1),o.config),t.stateRestore.states().sort(function(e,t){e=+d(e.s.identifier),t=+d(t.s.identifier);return t<e?1:e<t?-1:0})),a=t.button("SaveStateRestore:name"),e=parseInt(a.index()),u=void 0!==a[0]&&void 0!==a[0].inst.c.buttons[e].buttons?a[0].inst.c.buttons[e].buttons:[],m=0;m<u.length;m++)"stateRestore"===u[m].extend&&(u.splice(m,1),m--);i._createInSaved&&u.push("createState");for(var v=0,g=h;v<g.length;v++){var f=g[v],p=i.splitSecondaries.slice();p.includes("updateState")&&!i.save&&p.splice(p.indexOf("updateState"),1),!p.includes("renameState")||i.save&&i.rename||p.splice(p.indexOf("renameState"),1),p.includes("removeState")&&!i.remove&&p.splice(p.indexOf("removeState"),1),u.push({_stateRestore:f,attr:{title:f.s.identifier},config:{split:p},extend:"stateRestore",text:k.entityEncode(f.s.identifier),popoverTitle:k.entityEncode(f.s.identifier)})}t.button("SaveStateRestore:name").collectionRebuild(u),s.blur();for(var b=0,S=t.buttons();b<S.length;b++){var R=S[b];y(R.node).hasClass("dtsr-removeAllStates")&&(0===h.length?t.button(R.node).disable():t.button(R.node).enable())}}},init:function(e,t,s){void 0===e.settings()[0]._stateRestore&&1<e.button("SaveStateRestore:name").length&&o(e,s)},text:function(e){return e.i18n("buttons.createState","Create State")}},c.ext.buttons.removeState={action:function(e,t,s,o){o.parent._stateRestore.remove(),s.blur()},text:function(e){return e.i18n("buttons.removeState","Remove")}},c.ext.buttons.removeAllStates={action:function(e,t,s){t.stateRestore.states().remove(!0),s.blur()},className:"dt-button dtsr-removeAllStates",init:function(e,t){e.settings()[0]._stateRestore&&0!==e.stateRestore.states().length||y(t).addClass("disabled")},text:function(e){return e.i18n("buttons.removeAllStates","Remove All States")}},c.ext.buttons.renameState={action:function(e,t,s,o){for(var i=[],a=0,n=t.settings()[0]._stateRestore.s.states;a<n.length;a++){var r=n[a];i.push(r.s.identifier)}o.parent._stateRestore.rename(void 0,i),s.blur()},text:function(e){return e.i18n("buttons.renameState","Rename")}},y(g).on("preInit.dt.dtsr",function(e,t){"dt"!==e.namespace||!t.oInit.stateRestore&&!c.defaults.stateRestore||t._stateRestore||(e=t,void 0===(t=null)&&(t=null),e=new c.Api(e),t=t||e.init().stateRestore||c.defaults.stateRestore,t=new s(e,t),l(e,t))}),c});
@@ -1,10 +1,10 @@
1
- /*! StateRestore 1.4.2
1
+ /*! StateRestore 1.4.3
2
2
  * © SpryMedia Ltd - datatables.net/license
3
3
  */
4
4
  /**
5
5
  * @summary StateRestore
6
6
  * @description StateRestore extension for DataTables
7
- * @version 1.4.2
7
+ * @version 1.4.3
8
8
  * @author SpryMedia Ltd
9
9
  * @contact datatables.net
10
10
  * @copyright Copyright SpryMedia Ltd.
@@ -66,11 +66,11 @@
66
66
  "datatables-extension": "buttons"
67
67
  },
68
68
  "DataTables-ColReorder": {
69
- "version": "2.1.1",
69
+ "version": "2.1.2",
70
70
  "datatables-extension": "colreorder"
71
71
  },
72
72
  "DataTables-DateTime": {
73
- "version": "1.6.0",
73
+ "version": "1.6.1",
74
74
  "datatables-extension": "datetime"
75
75
  },
76
76
  "DataTables-FixedColumns": {
@@ -114,11 +114,11 @@
114
114
  "datatables-extension": "searchpanes"
115
115
  },
116
116
  "DataTables-Select": {
117
- "version": "3.1.2",
117
+ "version": "3.1.3",
118
118
  "datatables-extension": "select"
119
119
  },
120
120
  "DataTables-StateRestore": {
121
- "version": "1.4.2",
121
+ "version": "1.4.3",
122
122
  "datatables-extension": "staterestore"
123
123
  },
124
124
  "exif-js": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ntlab/ntjs-assets",
3
- "version": "2.113.0",
3
+ "version": "2.114.0",
4
4
  "description": "Node Javascript assets",
5
5
  "main": "index.js",
6
6
  "scripts": {