if(jQuery().daterangepicker){let n=moment().subtract(29,"days"),o=moment(),s={startDate:n,endDate:o,ranges:{Today:[moment(),moment()],Yesterday:[moment().subtract(1,"days"),moment().subtract(1,"days")],"Last 7 Days":[moment().subtract(6,"days"),moment()],"Last 30 Days":[moment().subtract(29,"days"),moment()],"This Month":[moment().startOf("month"),moment().endOf("month")],"Last Month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")]},locale:{format:"MM/DD/YYYY"},cancelClass:"btn-light",applyButtonClasses:"btn-success"},e=($('[data-toggle="date-picker-range"]').each(function(){var t=$(this),a=t.data(),a=$.extend(!0,{},s,a);let e=t.attr("data-target-display");t.daterangepicker(a,function(t,a){e&&$(e).html(t.format("MMMM D, YYYY")+" - "+a.format("MMMM D, YYYY"))}),e&&$(e).html(n.format("MMMM D, YYYY")+" - "+o.format("MMMM D, YYYY"))}),{singleDatePicker:!0,showDropdowns:!0,locale:{format:"MM/DD/YYYY"},cancelClass:"btn-light",applyButtonClasses:"btn-success"});$('[data-toggle="date-picker"]').each(function(){var t=$(this),a=t.data(),a=$.extend(!0,{},e,a);if("string"==typeof a.locale)try{a.locale=JSON.parse(a.locale.replace(/'/g,'"'))}catch(t){console.warn("Invalid JSON format in data-locale:",t)}t.daterangepicker(a)})}