/*! Bootstrap 5 integration for DataTables' Responsive
* © SpryMedia Ltd - datatables.net/license
*/
import jQuery from"jquery";import DataTable from"datatables.net-bs5";import Responsive from"datatables.net-responsive";let $=jQuery;var modal,_display=DataTable.Responsive.display,_original=_display.modal,_modal=$('
'),_bs=window.bootstrap;DataTable.Responsive.bootstrap=function(a){_bs=a},_display.modal=function(n){return!modal&&_bs.Modal&&(modal=new _bs.Modal(_modal[0])),function(a,d,o,e){if(modal){var l,t,i=o();if(!1===i)return!1;if(d){if(!$.contains(document,_modal[0])||a.index()!==_modal.data("dtr-row-idx"))return null;_modal.find("div.modal-body").empty().append(i)}else n&&n.header&&(t=(l=_modal.find("div.modal-header")).find("button").detach(),l.empty().append(''+n.header(a)+"
").append(t)),_modal.find("div.modal-body").empty().append(i),_modal.data("dtr-row-idx",a.index()).one("hidden.bs.modal",e).appendTo("body"),modal.show();return!0}return _original(a,d,o,e)}};export default DataTable;