<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">!function(a){window.WPUF_Uploader=function(b,c,d,e,f,g){if(this.removed_files=[],this.container=c,this.browse_button=b,this.max=d||1,this.count=a("#"+c).find(".wpuf-attachment-list &gt; li").length,this.perFileCount=0,this.UploadedFiles=0,a("#"+b).length)return a("ul.wpuf-attachment-list").sortable({placeholder:"highlight"}),a("ul.wpuf-attachment-list").disableSelection(),this.uploader=new plupload.Uploader({runtimes:"html5,html4",browse_button:b,container:c,multipart:!0,multipart_params:{action:"wpuf_upload_file",form_id:a("#"+b).data("form_id")},urlstream_upload:!0,file_data_name:"wpuf_file",max_file_size:g+"kb",url:wpuf_upload.plupload.url+"&amp;type="+e,flash_swf_url:wpuf_upload.flash_swf_url,filters:[{title:"Allowed Files",extensions:f}]}),this.uploader.bind("Init",a.proxy(this,"init")),this.uploader.bind("FilesAdded",a.proxy(this,"added")),this.uploader.bind("QueueChanged",a.proxy(this,"upload")),this.uploader.bind("UploadProgress",a.proxy(this,"progress")),this.uploader.bind("Error",a.proxy(this,"error")),this.uploader.bind("FileUploaded",a.proxy(this,"uploaded")),this.uploader.init(),a("#"+c).on("click","a.attachment-delete",a.proxy(this.removeAttachment,this)),this.uploader},WPUF_Uploader.prototype={init:function(b,c){this.showHide(),a("#"+this.container).prepend('&lt;div class="wpuf-file-warning"&gt;&lt;/div&gt;')},showHide:function(){if(this.count&gt;=this.max)return this.count,this.max,a("#"+this.container+" .wpuf-file-warning").html(wpuf_upload.warning),void a("#"+this.container).find(".file-selector").hide();a("#"+this.container+" .wpuf-file-warning").html(""),a("#"+this.container).find(".file-selector").show()},added:function(b,c){var d=a("#"+this.container).find(".wpuf-attachment-upload-filelist");this.showHide(),a.each(c,function(b,c){a(".wpuf-submit-button").attr("disabled","disabled"),d.append('&lt;div class="upload-item" id="'+c.id+'"&gt;&lt;div class="progress progress-striped active"&gt;&lt;div class="bar"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="filename original"&gt;'+c.name+" ("+plupload.formatSize(c.size)+") &lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;")}),b.refresh(),b.start()},upload:function(a){this.count=a.files.length-this.removed_files.length,this.showHide()},progress:function(b,c){var d=a("#"+c.id);a(".bar",d).css({width:c.percent+"%"}),a(".percent",d).html(c.percent+"%")},error:function(b,c){a("#"+this.container).find("#"+c.file.id).remove();var d="";switch(c.code){case-600:d=wpuf_upload.plupload.size_error;break;case-601:d=wpuf_upload.plupload.type_error;break;default:d="Error #"+c.code+": "+c.message}alert(d),this.count-=1,this.showHide(),this.uploader.refresh()},uploaded:function(b,c,d){try{var e=a.parseJSON(d.response)}catch(a){var f=!0}var g=this;if(a("#"+c.id+" b").html("100%"),a("#"+c.id).remove(),f){this.perFileCount++,this.UploadedFiles++;var h=a("#"+this.container).find(".wpuf-attachment-list");if(h.append(d.response),this.perFileCount&gt;this.max){var i=a(".wpuf-image-wrap:last a.attachment-delete",h).data("attach-id");g.removeExtraAttachment(i),a(".wpuf-image-wrap",h).last().remove(),this.perFileCount--}}else alert(e.data.replace(/(&lt;([^&gt;]+)&gt;)/gi,"")),b.files.pop(),this.count-=1,this.showHide();var j=this.UploadedFiles,k=b.files.length;if(this.count&gt;=this.max&amp;&amp;a("#"+this.container).find(".file-selector").hide(),k===j){if("undefined"!=typeof grecaptcha&amp;&amp;a(".wpuf-form-add #g-recaptcha-response").length&amp;&amp;!grecaptcha.getResponse().length)return;a(".wpuf-submit-button").removeAttr("disabled")}},removeAttachment:function(b){b.preventDefault();var c=this,d=a(b.currentTarget);Swal.fire({text:wpuf_upload.confirmMsg,icon:"warning",showCancelButton:!0,confirmButtonColor:"#d54e21",confirmButtonText:wpuf_upload.delete_it,cancelButtonText:wpuf_upload.cancel_it,customClass:{confirmButton:"btn btn-success",cancelButton:"btn btn-danger"}}).then(function(a){if(a.isConfirmed){var b={attach_id:d.data("attach-id"),nonce:wpuf_upload.nonce,action:"wpuf_file_del"};c.removed_files.push(b),jQuery("#del_attach").val(d.data("attach-id")),jQuery.post(wpuf_upload.ajaxurl,b,function(){c.perFileCount--,d.parent().parent().remove(),c.count-=1,c.showHide(),c.uploader.refresh()})}})},removeExtraAttachment:function(a){var b=this,c={attach_id:a,nonce:wpuf_upload.nonce,action:"wpuf_file_del"};this.removed_files.push(c),jQuery.post(wpuf_upload.ajaxurl,c,function(){b.count-=1,b.showHide(),b.uploader.refresh()})}}}(jQuery);</pre></body></html>