PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins1
/
wp-optimize-premium.3.0.16
/
js
function wpo_parse_json(s){try{var e=JSON.parse(s);return e}catch(o){console.log("WPO: Exception when trying to parse JSON (1) - will attempt to fix/re-parse"),console.log(s)}var i=s.indexOf("{"),a=s.lastIndexOf("}");if(i>-1&&a>-1){var n=s.slice(i,a+1);try{var t=JSON.parse(n);return console.log("WPO: JSON re-parse successful"),t}catch(o){console.log("WPO: Exception when trying to parse JSON (2) - will attempt to fix/re-parse based upon bracket counting");for(var m=i,_=0,r="",u=!1;(_>0||m==i)&&m<=a;){var c=s.charAt(m);u||"{"!=c?u||"}"!=c?'"'==c&&"\\"!=r&&(u=!u):_--:_++,r=c,m++}console.log("Started at cursor="+i+", ended at cursor="+m+" with result following:"),console.log(s.substring(i,m));try{var t=JSON.parse(s.substring(i,m));return console.log("WPO: JSON re-parse successful"),t}catch(o){throw o}}}throw"WPO: could not parse the JSON"}jQuery(document).ready(function(s){WP_Optimize_Smush=WP_Optimize_Smush()});var WP_Optimize_Smush=function(){function s(){var s=0==O('input[type="checkbox"]:checked',I).length;W.prop("disabled",s),C.prop("disabled",s)}function e(s){if(B){var i=O("#smush-information-modal-cancel-btn .smush-information");x("mark_all_as_uncompressed",{restore_backup:s?1:0},function(a){if(B)return a.hasOwnProperty("error")?(v(O("#smush-information-modal"),O.unblockUI),O("#smush-information-modal .smush-information").text(a.error),void o()):void(a.completed?(v(O("#smush-information-modal"),O.unblockUI),O("#smush-information-modal .smush-information").text(a.message),o()):(i.text(a.message),e(s)))})}}function o(e){var e="undefined"==typeof e||e,o={use_cache:e};console.log("Loading information about uncompressed images."),U.html("..."),z.hide(),f(!0),x("get_ui_update",o,function(e){console.log("Information about uncompressed images loaded."),y(e,r),g(),f(!1),s()})}function a(){O("#wpo_smush_images_grid input:checked").each(function(){image={attachment_id:O(this).val(),blog_id:O(this).data("blog")},X.push(image)}),data={optimization_id:"smush",selected_images:X,smush_options:{compression_server:O("input[name='compression_server']:checked").val(),image_quality:O("#image_quality").val(),lossy_compression:O("#smush-lossy-compression").is(":checked"),back_up_original:O("#smush-backup-original").is(":checked"),preserve_exif:O("#smush-preserve-exif").is(":checked")}},u(),x("process_bulk_smush",data)}function n(){if(O("#wp-optimize-wrap").length){O("#wpo_smush_images_save_options_spinner").show().delay(3e3).fadeOut(),O("#enable_custom_compression").is(":checked")?(image_quality=O("#custom_compression_slider").val(),lossy_compression=image_quality<100):(image_quality=O("#enable_lossy_compression").is(":checked")?90:100,lossy_compression=image_quality<100);var s={compression_server:O("input[name='compression_server']:checked").val(),image_quality:image_quality,lossy_compression:lossy_compression,back_up_original:O("#smush-backup-original").is(":checked"),back_up_delete_after:O("#smush-backup-delete").is(":checked"),back_up_delete_after_days:O("#smush-backup-delete-days").val(),preserve_exif:O("#smush-preserve-exif").is(":checked"),autosmush:O("#smush-automatically").is(":checked"),show_smush_metabox:O("#smush-show-metabox").is(":checked")};x("update_smush_options",s,function(s){O("#wpo_smush_images_save_options_spinner").hide(),s.hasOwnProperty("saved")&&s.saved?(O("#wpo_smush_images_save_options_done").show().delay(3e3).fadeOut(),q.hide()):(O("#wpo_smush_images_save_options_fail").show().delay(3e3).fadeOut(),q.show())})}}function t(){L=!0,D++,seconds=D%60+""<10?"0"+D%60:D%60,minutes=parseInt(D/60)+""<10?"0"+parseInt(D/60):parseInt(D/60),O("#smush_stats_timer").text(minutes+":"+seconds),m(D)}function m(s){0==s%3&&_(),0==s%60&&x("process_pending_images",{},function(s){y(s,c)})}function _(s){data={update_ui:!0,use_cache:!1},x("get_ui_update",data,function(s){y(s,c)})}function r(s){if(I.html(""),s&&s.hasOwnProperty("unsmushed_images")){s.unsmushed_images,s.pending_tasks;0==s.unsmushed_images.length&&0==s.pending_tasks&&I.text(wposmush.all_images_compressed).wrapInner("<div class='wpo-fieldgroup'> </div>"),0!=s.pending_tasks&&z.show().find(".red").text(s.pending);var e="post.php?post=",o="&action=edit";for(blog_id in s.unsmushed_images)for(i in s.unsmushed_images[blog_id])s.unsmushed_images[blog_id].hasOwnProperty(i)&&(image=s.unsmushed_images[blog_id][i],d(image,blog_id,s.admin_urls[blog_id]+e+image.id+o))}}function u(){L||(v(O("#wpo_smush_images_information_container")),service=O('.compression_server input[type="radio"]:checked + label small').text(),O("#wpo_smush_images_information_server").html(service),O("#smush_stats_pending_images").html("..."),O("#smush_stats_completed_images").html("..."),O("#smush_stats_bytes_saved").html("..."),O("#smush_stats_percent_saved").html("..."),O("#smush_stats_timer").html("..."),R=window.setInterval(t,1e3),f(!0))}function c(s){O("#smush_stats_pending_images").html(s.pending_tasks),O("#smush_stats_completed_images").html(s.completed_task_count),O("#smush_stats_bytes_saved").html(s.bytes_saved),O("#smush_stats_percent_saved").html(s.percent_saved),1==s.smush_complete&&setTimeout(l,1500)}function l(){data={update_ui:!0,use_cache:!1,image_list:X},x("get_ui_update",data,function(s){summary=s.session_stats,0!=s.completed_task_count&&(summary+="<hr>"+s.summary),h(summary)})}function h(s){Z||(O("#summary-message").html(s),p(),v(O("#smush-complete-summary")),Z=!0)}function p(){D=0,L=!1,Z=!1,X=[],window.clearInterval(R),f(!1)}function d(s,e,o){var i=["wpo_smush_",e,"_",s.id].join("");image_html='<div class="wpo_smush_image" data-filesize="'+s.filesize+'">',image_html+='<a class="button" href="'+o+'" target="_blank"> '+wposmush.view_image+" </a>",image_html+='<input id="'+i+'" type="checkbox" data-blog="'+e+'" class="wpo_smush_image__input" value="'+s.id+'">',image_html+='<label for="'+i+'"></a>',image_html+='<div class="thumbnail">',image_html+='<img class="lazyload" src="'+s.thumb_url+'">',image_html+="</div></label></div>",I.append(image_html)}function g(){features=wposmush.features,service=O("input[name^='compression_server']:checked").val();for(feature in features[service])O("."+feature).prop("disabled",!features[service][feature]);O(".wpo_smush_image").each(function(){O(this).data("filesize")>wposmush.features[service].max_filesize?O(this).hide():O(this).show()})}function f(s){O.each([W,j,J,q,S,P,C],function(e,o){o.prop("disabled",s)}),s?(O("#wpo_smush_images_refresh").hide(),O(".wpo_smush_images_loader").show()):(O("#wpo_smush_images_refresh").show(),O(".wpo_smush_images_loader").hide())}function w(s,e){0!=s.length&&(data={selected_image:s,smush_options:e},v(wposmush.compress_single_image_dialog),x("compress_single_image",data,function(s){y(s,k)}))}function b(s,e){if(0!=e.length){v(wposmush.please_wait,O.unblockUI);var o={blog_id:s,selected_image:e};x("restore_single_image",o,function(s){y(s,k)})}}function k(s){if(s.hasOwnProperty("success")&&s.success){O(".smush-information").text(s.summary),v(O("#smush-information-modal"),O.unblockUI),O(".toggle-smush-advanced.wpo_smush_single_image").removeClass("opened");var e=O("#smush_info").closest("#smush-metabox-inside-wrapper");"compress"==s.operation?(O(".wpo_smush_single_image").hide(),O(".wpo_restore_single_image").show(),O("#smush_info").text(s.summary),O(".wpo_smush_mark_single_image").hide(),s.restore_possible?O(".restore_possible").show():O(".restore_possible").hide()):(O(".wpo_smush_single_image").show(),O(".wpo_restore_single_image").hide(),O(".wpo_smush_mark_single_image").show(),O(".wpo_smush_unmark_single_image",e).hide())}else O(".smush-information").text(s.error_message),v(O("#smush-information-modal"),O.unblockUI)}function v(s,e){O.blockUI({message:s,onOverlayClick:e,baseZ:160001,css:{width:"400px",padding:"20px",cursor:"pointer"}})}function y(s,e){s&&s.hasOwnProperty("status")&&s.status?e&&e(s):(alert(wposmush.error_unexpected_response),console.log(s))}function x(s,e,o,i){i="undefined"==typeof i||i,e=O.isEmptyObject(e)?{use_cache:!1}:e;var a={action:"updraft_smush_ajax",subaction:s,nonce:wposmush.smush_ajax_nonce,data:e},n={type:"POST",url:ajaxurl,data:a,success:function(s){if(i){try{var e=wpo_parse_json(s)}catch(a){console.log("smush_manager_send_command JSON parse error"),console.log(a),console.log(s),alert(wposmush.error_unexpected_response)}"undefined"!=typeof o&&o(e)}else"undefined"!=typeof o&&o(s)},error:function(s,e,i){console.log("smush_manager_send_command AJAX parse error: "+e+" ("+i+")"),"undefined"!=typeof o?o(s):(console.log(s),alert(wposmush.error_unexpected_response))},dataType:"text"};O.ajax(n)}var O=jQuery,I=(O("#wp-optimize-images-nav-tab-smush"),O("#wpo_smush_images_grid")),U=O("#smush_info_images"),z=O("#wpo_smush_images_pending_tasks_container"),P=O("#wpo_smush_images_pending_tasks_button"),q=O(".wpo-fieldgroup #wpo_smush_images_save_options_button"),S=O("#wpo_smush_images_refresh"),j=O("#wpo_smush_images_select_all"),J=O("#wpo_smush_images_select_none"),N=O("#wpo_smush_clear_stats_btn"),W=O("#wpo_smush_images_btn"),C=O("#wpo_smush_mark_as_compressed"),T=(O(".wpo_smush_single_image .button"),O(".wpo_restore_single_image .button"),O("#wpo_smush_mark_all_as_uncompressed_btn")),A=O(".wpo_smush_get_logs"),E=O("#wpo_smush_delete_backup_btn"),Q=O(".compression_server"),D=0,L=!1,R=0,X=[],Z=!1,B=!1;O("#wp-optimize-nav-tab-wrapper__wpo_images .nav-tab").on("click",function(){O(this).is("#wp-optimize-nav-tab-wpo_images-smush")&&o()}),O("#wp-optimize-wrap").on("page-change",function(s,e){"wpo_images"==e.page&&O("#wp-optimize-nav-tab-wrapper__wpo_images .nav-tab-active").is("#wp-optimize-nav-tab-wpo_images-smush")&&o()}),O("#smush-metabox").length>0&&g(),I.on("change",'input[type="checkbox"]',function(){s()}),s(),Q.on("change",function(s){g(),n()}),W.off().on("click",function(){return 0==O('#wpo_smush_images_grid input[type="checkbox"]:checked').length?(O("#smush-information-modal .smush-information").text(wposmush.please_select_images),void v(O("#smush-information-modal"),O.unblockUI)):(O("#smush-information-modal .smush-information").text(wposmush.server_check),v(O("#smush-information-modal")),data={server:O("input[name='compression_server']:checked").val()},void x("check_server_status",data,function(s){s.online?a():(s.error?(error_message=s.error+"<br>"+wposmush.server_error,O("#smush-information-modal .smush-information").html(error_message)):O("#smush-information-modal .smush-information").text(wposmush.server_error),v(O("#smush-information-modal"),O.unblockUI))}))}),C.off().on("click",function(){if(0==O('#wpo_smush_images_grid input[type="checkbox"]:checked').length)return O("#smush-information-modal .smush-information").text(wposmush.please_select_compressed_images),void v(O("#smush-information-modal"),O.unblockUI);var s,e=[];O("#wpo_smush_images_grid input:checked").each(function(){s={attachment_id:O(this).val(),blog_id:O(this).data("blog")},e.push(s)}),v(wposmush.please_updating_images_info),x("mark_as_compressed",{selected_images:e},function(s){O("#smush-information-modal .smush-information").text(s.summary),v(O("#smush-information-modal"),O.unblockUI),o()})}),T.on("click",function(){if(confirm(wposmush.mark_all_images_uncompressed)){var s=confirm(wposmush.restore_images_from_backup);v(O("#smush-information-modal-cancel-btn")),O("#smush-information-modal-cancel-btn .smush-information").text(wposmush.please_wait),B=!0,e(s)}}),O('#smush-information-modal-cancel-btn input[type="button"]').on("click",function(){B=!1,o(),O.unblockUI()}),S.off().on("click",function(){o()}),j.off().on("click",function(){O('#wpo_smush_images_grid input[type="checkbox"]').prop("checked",!0),s()}),J.off().on("click",function(){O('#wpo_smush_images_grid input[type="checkbox"]').prop("checked",!1),s()}),A.off().on("click",function(){O("#log-panel").text("Please wait, fetching logs."),x("get_smush_logs",{},function(s){O.blockUI({message:O("#smush-log-modal"),onOverlayClick:O.unblockUI(),css:{width:"80%",height:"80%",top:"15%",left:"15%"}}),O("#log-panel").html("<pre>"+s+"</pre>"),download_link=ajaxurl+"?action=updraft_smush_ajax&subaction=get_smush_logs&nonce="+wposmush.smush_ajax_nonce,O("#smush-log-modal a").attr("href",download_link),console.log(download_link)},!1)}),E.on("click",function(){if(confirm(wposmush.delete_image_backup_confirm)){E.prop("disabled",!0);var s=O("#wpo_smush_delete_backup_spinner"),e=O("#wpo_smush_delete_backup_done");s.show(),x("clean_all_backup_images",{},function(){s.hide(),E.prop("disabled",!1),e.css("display","inline-block").delay(3e3).fadeOut()})}}),q.off().on("click",function(s){n()}),N.off().on("click",function(s){O("#wpo_smush_images_clear_stats_spinner").show().delay(3e3).fadeOut(),x("clear_smush_stats",{},function(s){O("#wpo_smush_images_clear_stats_spinner").hide(),O("#wpo_smush_images_clear_stats_done").show().delay(3e3).fadeOut()})}),P.off().on("click",function(s){O("#smush-information-modal .smush-information").text(wposmush.server_check),v(O("#smush-information-modal"),O.unblockUI),data={server:O("input[name='compression_server']:checked").val()},x("check_server_status",data,function(s){s.online?(u(),x("process_pending_images",{},function(s){y(s,c)})):(s.error?(error_message=s.error+"<br>"+wposmush.server_error,O("#smush-information-modal .smush-information").html(error_message)):O("#smush-information-modal .smush-information").text(wposmush.server_error),v(O("#smush-information-modal"),O.unblockUI))})}),O("body").on("click","#wpo_smush_images_pending_tasks_cancel_button",function(s){x("clear_pending_images",{},function(s){O.unblockUI(),s.status?(o(),p()):console.log("Cancelling pending images apparently failed.",s)})}),O("body").on("click",".wpo_smush_single_image .button",function(){image={attachment_id:O(this).data("id"),blog_id:O(this).data("blog")},O("#enable_custom_compression").is(":checked")?(image_quality=O("#custom_compression_slider").val(),lossy_compression=image_quality<100):(image_quality=O("#enable_lossy_compression").is(":checked")?90:100,lossy_compression=image_quality<100),smush_options={compression_server:O("input[name='compression_server_"+image.attachment_id+"']:checked").val(),image_quality:image_quality,lossy_compression:lossy_compression,back_up_original:O("#smush_backup_"+image.attachment_id).is(":checked"),preserve_exif:O("#smush_exif_"+image.attachment_id).is(":checked")},console.log("Compressing Image : "+image.attachment_id),data={server:O("input[name='compression_server_"+O(this).attr("id").substring(15)+"']:checked").val()},v(wposmush.server_check),x("check_server_status",data,function(s){s.online?w(image,smush_options):s.error?(error_message=s.error+"<br>"+wposmush.server_error,v(error_message,O.unblockUI)):v(wposmush.server_error,O.unblockUI)})}),O("body").on("click",".wpo_restore_single_image .button",function(){var s=O(this);blog_id=s.data("blog"),image_id=s.data("id"),image_id&&blog_id&&(console.log("Restoring Image : "+image_id),b(blog_id,image_id))}),O("body").on("click",".wpo_smush_mark_single_image .button",function(){var s={attachment_id:O(this).data("id"),blog_id:O(this).data("blog")},e=O(this).closest("#smush-metabox-inside-wrapper");v(wposmush.please_updating_images_info),x("mark_as_compressed",{selected_images:[s]},function(s){O("#smush-information-modal .smush-information").text(s.summary),v(O("#smush-information-modal"),O.unblockUI),s.status&&(O(".wpo_smush_single_image",e).hide(),O(".toggle-smush-advanced",e).removeClass("opened"),O(".wpo_smush_mark_single_image",e).hide(),O(".wpo_smush_unmark_single_image",e).show(),O(".wpo_restore_single_image",e).show(),O("#smush_info",e).text(s.info))})}),O("body").on("click",".wpo_smush_unmark_single_image .button",function(){var s={attachment_id:O(this).data("id"),blog_id:O(this).data("blog")},e=O(this).closest("#smush-metabox-inside-wrapper");v(wposmush.please_updating_images_info),x("mark_as_compressed",{selected_images:[s],unmark:!0},function(s){O("#smush-information-modal .smush-information").text(s.summary),v(O("#smush-information-modal"),O.unblockUI),s.status&&(O(".wpo_smush_single_image",e).show(),O(".wpo_smush_mark_single_image",e).show(),O(".wpo_smush_unmark_single_image",e).hide(),O(".wpo_restore_single_image",e).hide(),O("#smush_info",e).text(""))})}),O("body").on("click","#smush-log-modal .close, #smush-information-modal .information-modal-close",function(){O.unblockUI()}),O("body").on("click",".wpo_smush_stats_cta_btn, .wpo_smush_get_logs, #smush-complete-summary .close",function(){O.unblockUI(),o(),setTimeout(p,500)}),O("body").on("click",".toggle-smush-advanced",function(s){s.preventDefault(),O(this).toggleClass("opened")}),O(".wpo-fieldgroup .autosmush input, .wpo-fieldgroup .compression_level, .wpo-fieldgroup .image_options, #smush-show-metabox").on("change",function(s){n()}),O("body").on("change",".smush-options.compression_level",function(){O("#enable_custom_compression").is(":checked")?O(".smush-options.custom_compression").show():O(".smush-options.custom_compression").hide()}),O("body").on("change",'.smush-advanced input[type="radio"]',function(){g()})};
[+]
..
[-] jquery.blockUI.js
[edit]
[-] wpo-lazy-load.js
[edit]
[-] wpo-images-view-3-0-16.min.js
[edit]
[-] jquery.tablesorter.pager-3-0-16.min.js
[edit]
[+]
serialize-json
[-] wpo-premium-3-0-16.min.js
[edit]
[-] jquery.blockUI.min.js
[edit]
[+]
handlebars
[-] wpo-lazy-load-3-0-16.min.js
[edit]
[-] wposmush-3-0-16.min.js
[edit]
[+]
tablesorter
[-] wposmush.js
[edit]
[+]
select2
[-] wpo-images-view.js
[edit]
[-] queue-3-0-16.min.js
[edit]
[-] jquery.tablesorter.pager.js
[edit]
[-] cache-3-0-16.min.js
[edit]
[+]
jquery-timepicker
[+]
modernizr
[-] wpoadmin-3-0-16.min.js
[edit]
[-] wpoadmin.js
[edit]
[-] wpo-premium.js
[edit]
[-] queue.js
[edit]
[-] cache.js
[edit]