/*! Responsive 3.0.2 * © SpryMedia Ltd - datatables.net/license */ import jQuery from"jquery";import DataTable from"datatables.net";let $=jQuery;var Responsive=function(e,t){if(!DataTable.versionCheck||!DataTable.versionCheck("2"))throw"DataTables Responsive requires DataTables 2 or newer";this.s={childNodeStore:{},columns:[],current:[],dt:new DataTable.Api(e)},this.s.dt.settings()[0].responsive||(t&&"string"==typeof t.details?t.details={type:t.details}:t&&!1===t.details?t.details={type:!1}:t&&!0===t.details&&(t.details={type:"inline"}),this.c=$.extend(!0,{},Responsive.defaults,DataTable.defaults.responsive,t),(e.responsive=this)._constructor())},Api=($.extend(Responsive.prototype,{_constructor:function(){var s=this,r=this.s.dt,t=$(window).innerWidth(),e=(r.settings()[0]._responsive=this,$(window).on("orientationchange.dtr",DataTable.util.throttle(function(){var e=$(window).innerWidth();e!==t&&(s._resize(),t=e)})),r.on("row-created.dtr",function(e,t,n,i){-1!==$.inArray(!1,s.s.current)&&$(">td, >th",t).each(function(e){e=r.column.index("toData",e);!1===s.s.current[e]&&$(this).css("display","none").addClass("dtr-hidden")})}),r.on("destroy.dtr",function(){r.off(".dtr"),$(r.table().body()).off(".dtr"),$(window).off("resize.dtr orientationchange.dtr"),r.cells(".dtr-control").nodes().to$().removeClass("dtr-control"),$(r.table().node()).removeClass("dtr-inline collapsed"),$.each(s.s.current,function(e,t){!1===t&&s._setColumnVis(e,!0)})}),this.c.breakpoints.sort(function(e,t){return e.widtht.width?-1:0}),this._classLogic(),this._resizeAuto(),this.c.details);!1!==e.type&&(s._detailsInit(),r.on("column-visibility.dtr",function(){s._timer&&clearTimeout(s._timer),s._timer=setTimeout(function(){s._timer=null,s._classLogic(),s._resizeAuto(),s._resize(!0),s._redrawChildren()},100)}),r.on("draw.dtr",function(){s._redrawChildren()}),$(r.table().node()).addClass("dtr-"+e.type)),r.on("column-reorder.dtr",function(e,t,n){s._classLogic(),s._resizeAuto(),s._resize(!0)}),r.on("column-sizing.dtr",function(){s._resizeAuto(),s._resize()}),r.on("column-calc.dt",function(e,t){for(var n=s.s.current,i=0;i=r&&u(e,l[s].name);else if("not-"===n)for(s=0,o=l.length;s{e=e.filter(function(e){return!!e}).map(function(e){return $(e.cell).clone(!1).css("display","table-cell").css("width","auto").css("min-width",0)});$("").append(e).appendTo(i)}),$("").appendTo(d)),l=0;l");t.rows({page:"current"}).every(function(n){var i,e=this.node();e&&(i=e.cloneNode(!1),t.cells(n,s).every(function(e,t){t=r.s.childNodeStore[n+"-"+t];(t?$(this.node().cloneNode(!1)).append($(t).clone()):$(this.node()).clone(!1)).appendTo(i)}),d.append(i))}),d.find("th, td").css("display",""),t.table().footer.structure(s).forEach(e=>{e=e.filter(function(e){return!!e}).map(function(e){return $(e.cell).clone(!1).css("display","table-cell").css("width","auto").css("min-width",0)});$("").append(e).appendTo(o)}),"inline"===this.c.details.type&&$(e).addClass("dtr-inline collapsed"),$(e).find("[name]").removeAttr("name"),$(e).css("position","relative");e=$("
").css({width:1,height:1,overflow:"hidden",clear:"both"}).append(e);e.insertBefore(t.table().node()),a.children().each(function(e){e=t.column.index("fromVisible",e);n[e].minWidth=this.offsetWidth||0}),e.remove()}},_responsiveOnlyHidden:function(){var n=this.s.dt;return $.map(this.s.current,function(e,t){return!1===n.column(t).visible()||e})},_setColumnVis:function(e,t){var n=this,i=this.s.dt,r=t?"":"none";this._setHeaderVis(e,t,i.table().header.structure()),this._setHeaderVis(e,t,i.table().footer.structure()),i.column(e).nodes().to$().css("display",r).toggleClass("dtr-hidden",!t),$.isEmptyObject(this.s.childNodeStore)||i.cells(null,e).indexes().each(function(e){n._childNodesRestore(i,e.row,e.column)})},_setHeaderVis:function(n,i,e){var r=this,s=i?"":"none";e.forEach(function(e){if(e[n])$(e[n].cell).css("display",s).toggleClass("dtr-hidden",!i);else for(var t=n;0<=t;){if(e[t]){e[t].cell.colSpan=r._colspan(e,t);break}t--}})},_colspan:function(e,t){for(var n=1,i=t+1;itd:first-child, >th:first-child"),$(i,e.rows({page:"current"}).nodes()))).attr("tabIndex",n.iTabIndex).data("dtr-keyboard",1)}}),Responsive.breakpoints=[{name:"desktop",width:1/0},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}],Responsive.display={childRow:function(e,t,n){var i=$(e.node());return t?i.hasClass("dtr-expanded")?(e.child(n(),"child").show(),!0):void 0:i.hasClass("dtr-expanded")?(e.child(!1),!1):!1!==(t=n())&&(e.child(t,"child").show(),!0)},childRowImmediate:function(e,t,n){var i=$(e.node());return!t&&i.hasClass("dtr-expanded")||!e.responsive.hasHidden()?(e.child(!1),!1):!1!==(t=n())&&(e.child(t,"child").show(),!0)},modal:function(o){return function(e,t,n,i){n=n();if(!1===n)return!1;if(t){if(!(s=$("div.dtr-modal-content")).length||e.index()!==s.data("dtr-row-idx"))return null;s.empty().append(n)}else{function r(){s.remove(),$(document).off("keypress.dtr"),$(e.node()).removeClass("dtr-expanded"),i()}var s=$('
').append($('
').append($('
').data("dtr-row-idx",e.index()).append(n)).append($('
×
').click(function(){r()}))).append($('
').click(function(){r()})).appendTo("body");$(e.node()).addClass("dtr-expanded"),$(document).on("keyup.dtr",function(e){27===e.keyCode&&(e.stopPropagation(),r())})}return o&&o.header&&$("div.dtr-modal-content").prepend("

"+o.header(e)+"

"),!0}}},Responsive.renderer={listHiddenNodes:function(){return function(i,e,t){var r=this,s=$('
    '),o=!1;return $.each(t,function(e,t){var n;t.hidden&&(n=t.className?'class="'+t.className+'"':"",$("
  • '+t.title+"
  • ").append($('').append(r._childNodes(i,t.rowIndex,t.columnIndex))).appendTo(s),o=!0)}),!!o&&s}},listHidden:function(){return function(e,t,n){n=$.map(n,function(e){var t=e.className?'class="'+e.className+'"':"";return e.hidden?"
  • '+e.title+' '+e.data+"
  • ":""}).join("");return!!n&&$('
      ').append(n)}},tableAll:function(i){return i=$.extend({tableClass:""},i),function(e,t,n){n=$.map(n,function(e){return"'+e.title+": "+e.data+""}).join("");return $('').append(n)}}},Responsive.defaults={breakpoints:Responsive.breakpoints,auto:!0,details:{display:Responsive.display.childRow,renderer:Responsive.renderer.listHidden(),target:0,type:"inline"},orthogonal:"display"},$.fn.dataTable.Api);Api.register("responsive()",function(){return this}),Api.register("responsive.index()",function(e){return{column:(e=$(e)).data("dtr-index"),row:e.parent().data("dtr-index")}}),Api.register("responsive.rebuild()",function(){return this.iterator("table",function(e){e._responsive&&e._responsive._classLogic()})}),Api.register("responsive.recalc()",function(){return this.iterator("table",function(e){e._responsive&&(e._responsive._resizeAuto(),e._responsive._resize())})}),Api.register("responsive.hasHidden()",function(){var e=this.context[0];return!!e._responsive&&-1!==$.inArray(!1,e._responsive._responsiveOnlyHidden())}),Api.registerPlural("columns().responsiveHidden()","column().responsiveHidden()",function(){return this.iterator("column",function(e,t){return!!e._responsive&&e._responsive._responsiveOnlyHidden()[t]},1)}),Responsive.version="3.0.2",$.fn.dataTable.Responsive=Responsive,$.fn.DataTable.Responsive=Responsive,$(document).on("preInit.dt.dtr",function(e,t,n){"dt"===e.namespace&&($(t.nTable).hasClass("responsive")||$(t.nTable).hasClass("dt-responsive")||t.oInit.responsive||DataTable.defaults.responsive)&&!1!==(e=t.oInit.responsive)&&new Responsive(t,$.isPlainObject(e)?e:{})});export default DataTable;