text: /*!
   * @package   yii2-export
   * @author    Kartik Visweswaran <kartikv2@gmail.com>
   * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2018
   * @version   1.3.7
   *
   * Export Data Validation Module.
   *
   */
  !function(e){"use strict";var t,o;t={DIALOG:"kvExportDialog",IFRAME:"kvExportIframe",TARGET_POPUP:"_popup",TARGET_IFRAME:"_iframe",isEmpty:function(t,o){return null===t||void 0===t||t===[]||""===t||o&&""===e.trim(t)},createPopup:function(e,t,o){var n=screen.width/2-t/2,a=60,r=window.open("",name,"",!0);return r.close(),window.open("",e,"toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width="+t+", height="+o+", top="+a+", left="+n)},createIframe:function(t){var o=e('iframe[name="'+t+'"]');return o.length?o:e("<iframe/>",{name:t,css:{display:"none"}}).appendTo("body")},popupTemplate:'<html style="display:table;width:100%;height:100%;"><title>Export Data - &copy; Krajee</title><body style="display:table-cell;font-family:Helvetica,Arial,sans-serif;color:#888;font-weight:bold;line-height:1.4em;text-align:center;vertical-align:middle;width:100%;height:100%;padding:0 10px;">{msg}</body></html>'},o=function(t,o){var n=this;n.$element=e(t),e.each(o,function(e,t){n[e]=t}),n.popup="",n.iframe="",n.listen()},o.prototype={constructor:o,listen:function(){var o=this;e(document).on("click.exportmenu","#"+o.$element.attr("id"),function(n){var a,r,p,i,s,l="",d=window[o.settings.dialogLib];return a=e(this).data("format"),n.preventDefault(),n.stopPropagation(),o.settings.showConfirmAlert?(r=o.settings.messages,p=t.isEmpty(o.alertMsg)?"":o.alertMsg,i=t.isEmpty(r.allowPopups)?"":r.allowPopups,s=t.isEmpty(r.confirmDownload)?"":r.confirmDownload,l=p.length&&i.length?p+"\n\n"+i:!p.length&&i.length?i:p.length&&!i.length?p:"",s.length&&(l=l+"\n\n"+s),t.isEmpty(l)?void o.processExport(a):void d.confirm(l,function(e){e&&o.processExport(a)})):void o.processExport(a)})},setPopupAlert:function(e){var o=this;if(o.popup.document)if(arguments.length&&arguments[1]){var n=o.popup.document.getElementsByTagName("body");setTimeout(function(){n[0].innerHTML=e},1800)}else{var a=t.popupTemplate.replace("{msg}",e);o.popup.document.write(a)}},processExport:function(o){var n,a,r,p,i,s,l=this,d=[],u=window.yii,m=l.settings,c=function(t,o){return e("<input/>",{type:"hidden",name:t,value:o})};p=e.extend(!0,{},m.formOptions,{action:window.location.href,target:m.target,method:"post",css:{display:"none"}}),r=m.target===t.TARGET_POPUP,r&&(l.popup=t.createPopup(t.DIALOG,350,120),l.popup.focus(),l.setPopupAlert(l.settings.messages.downloadProgress),p.target=t.DIALOG),m.target===t.TARGET_IFRAME&&(l.iframe=t.createIframe(t.IFRAME),p.target=t.IFRAME),a=u?c(u.getCsrfParam()||"_csrf",u.getCsrfToken()||null):null,i="",t.isEmpty(m.colSelId)||(n=e("#"+m.colSelId).parent().find('input[name="export_columns_selector[]"]'),n.each(function(){var t=e(this);t.is(":checked")&&d.push(t.attr("data-key"))}),i=JSON.stringify(d)),s=e("<form/>",p).append(a).append(c(m.exportTypeParam,o),c(m.exportRequestParam,1)).append(c(m.exportColsParam,i),c(m.colSelFlagParam,m.colSelEnabled)).appendTo("body"),t.isEmpty(m.exportFormHiddenInputs)||e.each(m.exportFormHiddenInputs,function(t,o){var n={name:t,value:o.value||null,type:"hidden"};n=e.extend({},n,o.options||{}),s.append(e("<input/>",n))}),s.submit().remove(),r&&l.setPopupAlert(l.settings.messages.downloadComplete,!0)}},e.fn.exportdata=function(t){var n=Array.apply(null,arguments);return n.shift(),this.each(function(){var a=e(this),r=a.data("exportdata"),p="object"==typeof t&&t;r||a.data("exportdata",r=new o(this,e.extend({},e.fn.exportdata.defaults,p,e(this).data()))),"string"==typeof t&&r[t].apply(r,n)})},e.fn.exportdata.defaults={alertMsg:"",settings:{formOptions:{},exportType:"",colSelEnabled:"",exportRequestParam:"",exportTypeParam:"",exportColsParam:"",exportFormHiddenInputs:{},colSelId:null,target:"",showConfirmAlert:!0,dialogLib:"krajeeDialog",messages:{allowPopups:"",confirmDownload:"",downloadProgress:"",downloadComplete:""}}}}(window.jQuery);