%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/thread-self/root/var/www/pn/wp-content/plugins/wp-smushit/app/assets/js/
Upload File :
Create Path :
Current File : //proc/thread-self/root/var/www/pn/wp-content/plugins/wp-smushit/app/assets/js/smush-admin.min.js

!function(){var e={6111:function(e,t,s){"use strict";s.r(t);var i=s(9446),n=function(e,t){void 0===t&&(t=100),e.fadeTo(t,0,(function(){e.slideUp(t,(function(){e.remove()}))}))};jQuery((function(e){var t=function(t,s,n,o){if(!s.prop("disabled")){t.preventDefault(),e(".wp-smush-error").remove(),e(".smush-stats-wrapper").hide();var a="grid";"smush_restore_image"===n&&(a=e(document).find("div.media-modal.wp-core-ui").length>0||window.location.search.indexOf("item")>-1?"grid":"list");var r={action:n,attachment_id:s.data("id"),mode:a,_nonce:s.data("nonce")};!function(e){var t=e.parent();t.css({opacity:"0.5"}),t.find("a").prop("disabled",!0)}(s),s.html('<span class="spinner wp-smush-progress">'+wp_smush_msgs[o]+"</span>"),e.post(ajaxurl,r,(function(t){!function(e){var t=e.parent();t.css({opacity:"1"}),t.find("a").prop("disabled",!1)}(s),t.success&&void 0!==t.data?(void 0!==this.data&&this.data.indexOf("nextgen")>-1||"restore"===o?s.parents().eq(1).html(t.data.stats):s.parents().eq(1).html(t.data),void 0!==t.data&&"restore"===o&&i.Z.updateImageStats(t.data.new_size)):t.data&&t.data.error_msg&&(-1===this.data.indexOf("nextgen")&&"restore"===o?e(".smush-status").addClass("error").html(t.data.error_msg):s.parent().append(t.data.error_msg))}))}},s=function(e){var t=jQuery(".bulk-smush-wrapper .wp-smush-bulk-wrapper, #wp-smush-pending-to-smush-text"),s=jQuery(".bulk-smush-wrapper .wp-smush-all-done, .bulk-smush-wrapper .wp-smush-pagespeed-recommendation, #smush-box-bulk-upgrade, #wp-smush-all-smushed-text");if(t.length&&s.length)if(0===e)t.addClass("sui-hidden"),s.removeClass("sui-hidden");else{t.removeClass("sui-hidden"),s.addClass("sui-hidden");var i=jQuery(".sui-summary-smush .sui-summary-details .sui-tooltip");if(i.length){var n=1===e?"singular":"plural",o=i.data(n).replace("{count}",e);i.attr("data-tooltip",o)}}jQuery(".wp-smush-total-count").text(e)},o=function(t){e(t).length>0&&e("html, body").animate({scrollTop:e(t).offset().top-100},"slow")};if(e("#all-image-sizes").on("change",(function(){e('input[name^="wp-smush-image_sizes"]').prop("checked",!0)})),e(".sui-mobile-nav").on("change",(function(t){window.location.assign(e(t.currentTarget).val())})),e("#update-api-status").on("click",(function(t){t.preventDefault(),e(this).addClass("sui-button-onload"),e.post(ajaxurl,{action:"recheck_api_status"},(function(){location.reload()}))})),e("body").on("click","a.smush-stats-details",(function(t){if(e(this).prop("disabled"))return!1;t.preventDefault();var s=e(this).find(".stats-toggle");e(this).parents().eq(1).find(".smush-stats-wrapper").slideToggle(),s.text("+"==s.text()?"-":"+")})),e("body").on("click",".wp-smush-send:not(.wp-smush-resmush)",(function(t){t.preventDefault(),new i.Z(e(this),!1)})),e("body").on("click",".wp-smush-remove-skipped",(function(t){t.preventDefault();var s=e(this);e.post(ajaxurl,{action:"remove_from_skip_list",id:s.attr("data-id")}).done((function(e){e.success&&void 0!==e.data.links&&(s.parent().parent().find(".smush-status").text(wp_smush_msgs.not_processed),t.target.closest(".smush-status-links").innerHTML=e.data.links)}))})),e("body").on("click",".wp-smush-nextgen-send",(function(t){t.preventDefault(),new i.Z(e(this),!1,"nextgen")})),e("body").on("click",".wp-smush-nextgen-bulk",(function(t){if(t.preventDefault(),e(".wp-smush-resmush-notice").remove(),"undefined"==typeof wp_smushit_data||0===wp_smushit_data.unsmushed.length&&0===wp_smushit_data.resmush.length)return!1;jQuery(".wp-smush-all, .wp-smush-scan").prop("disabled",!0),e(".wp-smush-notice.wp-smush-remaining").hide(),new i.Z(e(this),!0,"nextgen")})),e("body").on("click",".wp-smush-action.wp-smush-restore",(function(s){var i=e(this);t(s,i,"smush_restore_image","restore")})),e("body").on("click",".wp-smush-action.wp-smush-resmush",(function(s){t(s,e(this),"smush_resmush_image","smushing")})),e("body").on("click",".wp-smush-action.wp-smush-nextgen-restore",(function(s){t(s,e(this),"smush_restore_nextgen_image","restore")})),e("body").on("click",".wp-smush-action.wp-smush-nextgen-resmush",(function(s){t(s,e(this),"smush_resmush_nextgen_image","smushing")})),e(".wp-smush-scan").on("click",(function(t){t.preventDefault(),function(t){var n=e(".wp-smush-scan");n.addClass("sui-button-onload");var o=n.data("type");o=void 0===o?"media":o,e(".wp-smush-all").removeAttr("data-smush");var a=e(".sui-notice-top.sui-notice-success");a.slideUp(100,(function(){a.remove()})),e(".wp-smush-all").prop("disabled",!0),e(".wp-smush-settings-changed").hide();var r={action:"scan_for_resmush",type:o,get_ui:!0,process_settings:t,wp_smush_options_nonce:jQuery("#wp_smush_options_nonce").val()};e.get(ajaxurl,r,(function(t){if(void 0!==t.data){if(void 0!==t.data.resmush_ids){wp_smushit_data.resmush=t.data.resmush_ids,"undefined"!=typeof wp_smushit_data&&(wp_smushit_data.count_smushed=void 0!==t.data.count_smushed?t.data.count_smushed:wp_smushit_data.count_smushed,wp_smushit_data.count_supersmushed=void 0!==t.data.count_supersmushed?t.data.count_supersmushed:wp_smushit_data.count_supersmushed,wp_smushit_data.count_images=void 0!==t.data.count_image?t.data.count_image:wp_smushit_data.count_images,wp_smushit_data.size_before=void 0!==t.data.size_before?t.data.size_before:wp_smushit_data.size_before,wp_smushit_data.size_after=void 0!==t.data.size_after?t.data.size_after:wp_smushit_data.size_after,wp_smushit_data.savings_resize=void 0!==t.data.savings_resize?t.data.savings_resize:wp_smushit_data.savings_resize,wp_smushit_data.savings_conversion=void 0!==t.data.savings_conversion?t.data.savings_conversion:wp_smushit_data.savings_conversion,wp_smushit_data.count_resize=void 0!==t.data.count_resize?t.data.count_resize:wp_smushit_data.count_resize,wp_smushit_data.unsmushed=void 0!==t.data.unsmushed?t.data.unsmushed:wp_smushit_data.unsmushed),"nextgen"===o&&(wp_smushit_data.bytes=parseInt(wp_smushit_data.size_before)-parseInt(wp_smushit_data.size_after));var n=e(".bulk-smush-wrapper .sui-notice:not(.smush-upsell-notice)");n.length>0&&(n.addClass("sui-hidden"),e(".wp-smush-pagespeed-recommendation").addClass("sui-hidden")),e(".wp-smush-resmush-notice").remove(),e(".wp-smush-bulk-wrapper").removeClass("sui-hidden")}if(void 0!==t.data.content&&e("#wp-smush-bulk-content").html(t.data.content),void 0!==t.data.notice){var a="success";void 0!==t.data.noticeType&&(a=t.data.noticeType),window.SUI.openNotice("wp-smush-ajax-notice","<p>"+t.data.notice+"</p>",{type:a,icon:"check-tick"})}e("div.smush-final-log").hide(),void 0!==t.data.super_smush&&t.data.super_smush&&"undefined"!==t.data.super_smush_stat&&e(".super-smush-attachments .wp-smush-stats").html(t.data.super_smush_stats),i.Z.updateStats(o);var r=t.data.count||0;i.Z.updateRemainingCount(r),s(r)}})).always((function(){jQuery(".bulk-smush-wrapper .wp-smush-bulk-progress-bar-wrapper").addClass("sui-hidden"),n.removeClass("sui-button-onload").addClass("smush-button-check-success");var t=n.find(".wp-smush-default-text"),s=n.find(".wp-smush-completed-text");t.addClass("sui-hidden-important"),s.removeClass("sui-hidden"),setTimeout((function(){n.removeClass("smush-button-check-success"),t.removeClass("sui-hidden-important"),s.addClass("sui-hidden")}),2e3),e(".wp-smush-all").prop("disabled",!1)}))}(!1)})),e("#wp-smush-welcome-box .smush-dismiss-welcome").on("click",(function(t){t.preventDefault();var s=e(this).parents().eq(1);n(s);e.post(ajaxurl,{action:"dismiss_welcome_notice"})})),e("body").on("click",".wp-smush-notice .icon-fi-close",(function(t){t.preventDefault();var s=e(this).parent();n(s)})),e("body").on("click",".wp-smush-skip-resmush",(function(t){t.preventDefault();var s=jQuery(this),o=s.parents().eq(1),a=s.parent();n(a),e(".sui-notice-top.sui-notice-success").remove(),o.find(".wp-smush-all").attr("data-smush","skip_resmush"),wp_smushit_data.count_smushed=parseInt(wp_smushit_data.count_smushed)+wp_smushit_data.resmush.length,wp_smushit_data.count_supersmushed=parseInt(wp_smushit_data.count_supersmushed)+wp_smushit_data.resmush.length,wp_smushit_data.count_smushed===wp_smushit_data.count_total&&(e(".wp-smush-notice.wp-smush-all-done, .wp-smush-pagespeed-recommendation").removeClass("sui-hidden"),e(".wp-smush-bulk-wrapper ").addClass("sui-hidden")),e(".wp-smush-resmush-notice").remove();var r=e(".wp-smush-scan").data("type");r=void 0===r?"media":r;var u=(void 0!==wp_smushit_data.count_smushed?wp_smushit_data.count_smushed:0)/wp_smushit_data.count_total*100;u=WP_Smush.helpers.precise_round(u,1),e(".wp-smush-images-percent").html(u);var d=jQuery(".bulk-smush-wrapper .wp-smush-progress-inner");if(!(d.length<1)){d.css("width",u+"%"),e(".wp-smush-bulk-wrapper").removeClass("sui-hidden"),e(".wp-smush-bulk-wrapper .sui-notice").removeClass("sui-hidden");var l={action:"delete_resmush_list",type:r};e.post(ajaxurl,l,(function(t){if(t.success&&void 0!==t.data.stats){var s=t.data.stats;"undefined"!=typeof wp_smushit_data&&(wp_smushit_data.count_images=void 0!==s.count_images?parseInt(wp_smushit_data.count_images)+s.count_images:wp_smushit_data.count_images,wp_smushit_data.size_before=void 0!==s.size_before?parseInt(wp_smushit_data.size_before)+s.size_before:wp_smushit_data.size_before,wp_smushit_data.size_after=void 0!==s.size_after?parseInt(wp_smushit_data.size_after)+s.size_after:wp_smushit_data.size_after,wp_smushit_data.savings_resize=void 0!==s.savings_resize?parseInt(wp_smushit_data.savings_resize)+s.savings_resize:wp_smushit_data.savings_resize,wp_smushit_data.savings_conversion=void 0!==s.savings_conversion?parseInt(wp_smushit_data.savings_conversion)+s.savings_conversion:wp_smushit_data.savings_conversion,void 0!==wp_smushit_data.savings_dir_smush&&void 0!==wp_smushit_data.savings_dir_smush.orig_size&&(wp_smushit_data.size_before=void 0!==wp_smushit_data.savings_dir_smush?parseInt(wp_smushit_data.size_before)+parseInt(wp_smushit_data.savings_dir_smush.orig_size):wp_smushit_data.size_before,wp_smushit_data.size_after=void 0!==wp_smushit_data.savings_dir_smush?parseInt(wp_smushit_data.size_after)+parseInt(wp_smushit_data.savings_dir_smush.image_size):wp_smushit_data.size_after),wp_smushit_data.count_resize=void 0!==s.count_resize?parseInt(wp_smushit_data.count_resize)+s.count_resize:wp_smushit_data.count_resize);var n=e(".bulk-smush-wrapper .wp-smush-remaining-count");n.length&&void 0!==wp_smushit_data.unsmushed&&n.html(wp_smushit_data.unsmushed.length),void 0===wp_smushit_data.unsmushed&&0!==wp_smushit_data.unsmushed.length||(e(".wp-smush-bulk-wrapper .sui-notice").removeClass("sui-hidden"),e(".sui-notice-success.wp-smush-all-done").addClass("sui-hidden")),i.Z.updateStats()}}))}})),e("a.wp-smush-lossy-enable").on("click",(function(e){e.preventDefault(),o("#column-lossy")})),e(".wp-smush-resize-enable").on("click",(function(e){e.preventDefault(),o("#column-resize")})),window.location.hash){var a="";switch(window.location.hash.substring(1)){case"enable-resize":a="#column-resize";break;case"backup-label":a="#backup";break;case"original-label":a="#original";break;case"enable-lossy":a="#column-lossy"}""!==a&&(o(a),document.getElementById(a.replace("#","")).focus())}if(e("body").on("click",".wp-smush-trigger-bulk",(function(t){t.preventDefault(),void 0!==t.target.dataset.type&&"nextgen"===t.target.dataset.type?e(".wp-smush-nextgen-bulk").trigger("click"):e(".wp-smush-all").trigger("click"),e("span.sui-notice-dismiss").trigger("click")})),e("body").on("click","#bulk-smush-top-notice-close",(function(t){t.preventDefault(),e(this).parent().parent().slideUp("slow")})),e(".wp-smush-setting-row .toggle-checkbox").on("focus",(function(){e(this).keypress((function(t){32==t.keyCode&&(t.preventDefault(),e(this).find(".toggle-checkbox").trigger("click"))}))})),e("body").on("blur",".wp-smush-resize-input",(function(){!function(e,t,s){var i=e.find("#resize");if(!s)var n=e.find("#wp-smush-resize_width"),o=e.find(".sui-notice-info.wp-smush-update-width");if(!t)var a=e.find("#wp-smush-resize_height"),r=e.find(".sui-notice-info.wp-smush-update-height");var u=!1,d=!1;!i.is(":checked")||void 0===wp_smushit_data.resize_sizes||void 0===wp_smushit_data.resize_sizes.width||(!s&&void 0!==n&&parseInt(wp_smushit_data.resize_sizes.width)>parseInt(n.val())?(n.parent().addClass("sui-form-field-error"),o.show("slow"),u=!0):(n.parent().removeClass("sui-form-field-error"),o.hide(),a.hasClass("error")&&r.show("slow")),!t&&void 0!==a&&parseInt(wp_smushit_data.resize_sizes.height)>parseInt(a.val())?(a.parent().addClass("sui-form-field-error"),u||r.show("slow"),d=!0):(a.parent().removeClass("sui-form-field-error"),r.hide(),n.hasClass("error")&&o.show("slow")))}(e(this).parents().eq(4),!1,!1)})),e("body").on("click","#resize",(function(){var t=e(this),s=e("#smush-resize-settings-wrap");t.is(":checked")?s.show():s.hide()})),e("#wp-smush-revalidate-member").on("click",(function(t){t.preventDefault();var s=e(this).parents().eq(1);s.addClass("loading-notice"),e.get(ajaxurl,{action:"smush_show_warning"},(function(e){s.removeClass("loading-notice").addClass("loaded-notice"),0==e?(s.attr("data-message",wp_smush_msgs.membership_valid),n(s,1e3)):(s.attr("data-message",wp_smush_msgs.membership_invalid),setTimeout((function(){s.removeClass("loaded-notice")}),1e3))}))})),e("li.smush-dir-savings").length>0){e.get(ajaxurl,{action:"get_dir_smush_stats"},(function(t){e("li.smush-dir-savings .sui-icon-loader").hide(),t.success||void 0===t.data.message?void 0===t.data||void 0===t.data.dir_smush?(e("li.smush-dir-savings span.wp-smush-stats").append(wp_smush_msgs.ajax_error),e("li.smush-dir-savings span.wp-smush-stats span").hide()):function(t){if(void 0!==t.dir_smush){var s=e("li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-human"),i=e("li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-percent");t.dir_smush.bytes>0?(e(".wp-smush-dir-link").addClass("sui-hidden"),e("li.smush-dir-savings .wp-smush-stats-label-message").hide(),s.length>0?s.html(t.dir_smush.human):t.dir_smush.bytes,t.dir_smush.percent>0&&(e("li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-sep").removeClass("sui-hidden"),i.length>0?i.html(t.dir_smush.percent+"%"):t.dir_smush.percent)):e(".wp-smush-dir-link").removeClass("sui-hidden")}if(void 0!==t.combined_stats&&t.combined_stats.length>0){var n=t.combined_stats,o=n.smushed/n.total_count*100;(o=WP_Smush.helpers.precise_round(o,1))&&e("div.wp-smush-count-total span.wp-smush-images-percent").html(o),n.total_count&&e("span.wp-smush-count-total span.wp-smush-total-optimised").html(n.total_count),n.savings&&e("span.wp-smush-savings span.wp-smush-stats-human").html(n.savings),n.percent&&e("span.wp-smush-savings span.wp-smush-stats-percent").html(n.percent)}}(t.data):e("div.wp-smush-scan-result div.content").prepend(t.data.message)}))}e("span.dismiss-recommendation").on("click",(function(t){t.preventDefault();var s=e(this).parent();s.hide("slow",(function(){s.remove()})),e.ajax({type:"POST",url:ajaxurl,data:{action:"hide_pagespeed_suggestion"}})})),e("#smush-updated-dialog").length&&window.SUI.openModal("smush-updated-dialog","wpbody-content",void 0,!1),e("input#original").on("change",(function(){e("#backup-notice").toggleClass("sui-hidden",e(this).is(":checked"))}))}))},7447:function(){!function(){"use strict";WP_Smush.restore={modal:document.getElementById("smush-restore-images-dialog"),contentContainer:document.getElementById("smush-bulk-restore-content"),settings:{slide:"start",success:0,errors:[]},items:[],success:[],errors:[],currentStep:0,totalSteps:0,init:function(){this.modal&&(this.settings={slide:"start",success:0,errors:[]},this.resetModalWidth(),this.renderTemplate(),window.SUI.openModal("smush-restore-images-dialog","wpbody-content",void 0,!1))},renderTemplate:function(){var e=WP_Smush.onboarding.template("smush-bulk-restore")(this.settings);e&&(this.contentContainer.innerHTML=e),this.bindSubmit()},resetModalWidth:function(){this.modal.style.maxWidth="460px",this.modal.querySelector(".sui-box").style.maxWidth="460px"},bindSubmit:function(){var e=this.modal.querySelector('button[id="smush-bulk-restore-button"]'),t=this;e&&e.addEventListener("click",(function(e){e.preventDefault(),t.resetModalWidth(),t.settings={slide:"progress"},t.errors=[],t.renderTemplate(),t.initScan()}))},cancel:function(){"start"===this.settings.slide||"finish"===this.settings.slide?window.SUI.closeModal():(this.updateProgressBar(!0),window.location.reload())},updateProgressBar:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;0<this.currentStep&&(t=Math.min(Math.round(100*this.currentStep/this.totalSteps),99)),t>100&&(t=100),this.modal.querySelector(".sui-progress-text span").innerHTML=t+"%",this.modal.querySelector(".sui-progress-bar span").style.width=t+"%";var s=this.modal.querySelector(".sui-progress-state-text");s.innerHTML=t>=90?"Finalizing...":e?"Cancelling...":this.currentStep+"/"+this.totalSteps+" images restored"},initScan:function(){var e=this,t=document.getElementById("_wpnonce"),s=new XMLHttpRequest;s.open("POST",ajaxurl+"?action=get_image_count",!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.onload=function(){if(200===s.status){var t=JSON.parse(s.response);void 0!==t.data.items&&(e.items=t.data.items,e.totalSteps=t.data.items.length,e.step())}else window.console.log("Request failed.  Returned status of "+s.status)},s.send("_ajax_nonce="+t.value)},step:function(){var e=this,t=this,s=document.getElementById("_wpnonce");if(0<this.items.length){var i=this.items.pop(),n=new XMLHttpRequest;n.open("POST",ajaxurl+"?action=restore_step",!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.onload=function(){if(e.currentStep++,200===n.status){var s=JSON.parse(n.response);void 0!==s.data.success&&s.data.success?t.success.push(i):t.errors.push({id:i,src:s.data.src,thumb:s.data.thumb,link:s.data.link})}t.updateProgressBar(),t.step()},n.send("item="+i+"&_ajax_nonce="+s.value)}else this.settings={slide:"finish",success:this.success.length,errors:this.errors,total:this.totalSteps},t.renderTemplate(),0<this.errors.length&&(this.modal.style.maxWidth="660px",this.modal.querySelector(".sui-box").style.maxWidth="660px")}},WP_Smush.restore.template=_.memoize((function(e){var t,s={evaluate:/<#([\s\S]+?)#>/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g,variable:"data"};return function(i){return _.templateSettings=s,(t=t||_.template(document.getElementById(e).innerHTML))(i)}}))}()},7413:function(e,t,s){"use strict";s.r(t);var i,n=s(9446);i=jQuery,WP_Smush.bulk={init:function(){i(".wp-smush-all").on("click",(function(e){e.preventDefault(),i(".sui-notice-top.sui-notice-success").remove();var t=document.getElementById("bulk_smush_warning");t.classList.add("sui-hidden");var s=i(".wp-smush-bulk-progress-bar-wrapper");if(s.removeClass("wp-smush-exceed-limit"),s.find(".sui-progress-block .wp-smush-all").addClass("sui-hidden"),s.find(".sui-progress-block .wp-smush-cancel-bulk").removeClass("sui-hidden"),t&&document.getElementById("bulk-smush-resume-button").classList.add("sui-hidden"),i(".wp-resmush.wp-smush-action, .wp-smush-scan, .wp-smush-all:not(.sui-progress-close), a.wp-smush-lossy-enable, button.wp-smush-resize-enable, button#save-settings-button").prop("disabled",!0),void 0===window.wp_smushit_data||0===window.wp_smushit_data.unsmushed.length&&0===window.wp_smushit_data.resmush.length)return!1;i(".wp-smush-remaining").addClass("sui-hidden"),s.find(".sui-progress-block i.sui-icon-info").removeClass("sui-icon-info").addClass("sui-loading").addClass("sui-icon-loader"),new n.Z(i(this),!0)})),i("body").on("click",".smush-ignore-image",(function(e){e.preventDefault();var t=i(this);t.prop("disabled",!0),t.attr("data-tooltip"),t.removeClass("sui-tooltip"),i.post(ajaxurl,{action:"ignore_bulk_image",id:t.attr("data-id")}).done((function(s){t.is("a")&&s.success&&void 0!==s.data.links&&(t.parent().parent().find(".smush-status").text(wp_smush_msgs.ignored),e.target.closest(".smush-status-links").innerHTML=s.data.links)}))}));var e=document.getElementById("smush-box-bulk-upgrade");!e||window.wp_smushit_data.unsmushed.length||window.wp_smushit_data.resmush.length||e.classList.remove("sui-hidden")}},WP_Smush.bulk.init()},2140:function(e,t,s){"use strict";s.r(t);var i,n=s(5445),o=function(e,t){e=parseInt(e),t=parseInt(t);var s=!1,i=0,n=0,o={scan:function(){var s=this,i=e-t;0!==t?a(i).fail(this.showScanError):jQuery.post(ajaxurl,{action:"directory_smush_start"},(function(){return a(i).fail(s.showScanError)})).fail(this.showScanError)},cancel:function(){return s=!0,jQuery.post(ajaxurl,{action:"directory_smush_cancel"})},getProgress:function(){if(s)return 0;var i=e-t;return Math.min(Math.round(100*parseInt(e-i)/e),99)},onFinishStep:function(s){jQuery(".wp-smush-progress-dialog .sui-progress-state-text").html(t-i+"/"+e+" "+window.wp_smush_msgs.progress_smushed),WP_Smush.directory.updateProgressBar(s)},onFinish:function(){WP_Smush.directory.updateProgressBar(100),window.location.href=window.wp_smush_msgs.directory_url+"&scan=done"},showScanError:function(e){var t=jQuery("#wp-smush-progress-dialog");t.removeClass("wp-smush-exceed-limit").addClass("wp-smush-scan-error"),t.find("#smush-scan-error").text("".concat(e.status," ").concat(e.statusText));var s=t.find(".smush-403-error-message");403!==e.status?s.addClass("sui-hidden"):s.removeClass("sui-hidden")},limitReached:function(){var e=jQuery("#wp-smush-progress-dialog");e.addClass("wp-smush-exceed-limit"),e.find("#cancel-directory-smush").attr("data-tooltip",window.wp_smush_msgs.bulk_resume),e.find(".sui-box-body .sui-icon-close").removeClass("sui-icon-close").addClass("sui-icon-play"),e.find("#cancel-directory-smush").attr("id","cancel-directory-smush-disabled")},resume:function(){var e=jQuery("#wp-smush-progress-dialog"),t=e.find("#cancel-directory-smush-disabled");e.removeClass("wp-smush-exceed-limit"),e.find(".sui-box-body .sui-icon-play").removeClass("sui-icon-play").addClass("sui-icon-close"),t.attr("data-tooltip","Cancel"),t.attr("id","cancel-directory-smush"),o.scan()}},a=function s(a){return a>=0?(t=e-a,jQuery.post(ajaxurl,{action:"directory_smush_check_step",step:t},(function(e){void 0!==e.success&&e.success?(void 0!==e.data&&void 0!==e.data.skipped&&!0===e.data.skipped&&n++,t++,a-=1,o.onFinishStep(o.getProgress()),s(a).fail(o.showScanError)):void 0!==e.data.error&&"dir_smush_limit_exceeded"===e.data.error?o.limitReached():(i++,t++,a-=1,o.onFinishStep(o.getProgress()),s(a).fail(o.showScanError))}))):jQuery.post(ajaxurl,{action:"directory_smush_finish",items:e-(i+n),failed:i,skipped:n},(function(e){return o.onFinish(e)}))};return o};i=jQuery,WP_Smush.directory={selected:[],tree:[],wp_smush_msgs:[],triggered:!1,init:function(){var e=this,t=i("#wp-smush-progress-dialog"),s=0,n=0;void 0!==window.wp_smushit_data.dir_smush&&(s=window.wp_smushit_data.dir_smush.totalSteps,n=window.wp_smushit_data.dir_smush.currentScanStep),this.scanner=new o(s,n),this.wp_smush_msgs=window.wp_smush_msgs||{},i("button.wp-smush-browse, a#smush-directory-open-modal").on("click",(function(t){t.preventDefault(),i(t.currentTarget).hasClass("wp-smush-browse")&&(i("div.wp-smush-scan-result div.wp-smush-notice").hide(),i("div.wp-smush-info").remove()),window.SUI.openModal("wp-smush-list-dialog",t.currentTarget,i("#wp-smush-list-dialog .sui-box-header [data-modal-close]")[0],!0),e.initFileTree()})),i("#wp-smush-select-dir").on("click",(function(t){if(t.preventDefault(),!i(this).prop("disabled")){var s=i(this);i("div.wp-smush-list-dialog div.sui-box-body").css({opacity:"0.8"}),i("div.wp-smush-list-dialog div.sui-box-body a").off("click"),s.prop("disabled",!0),s.addClass("sui-button-onload");var n=e.tree.getSelectedNodes(),a=[];n.forEach((function(e){a.push(e.key)}));var r={action:"image_list",smush_path:a,image_list_nonce:i('input[name="image_list_nonce"]').val()};i.post(ajaxurl,r,(function(t){window.SUI.closeModal(),t.success?(e.scanner=new o(t.data,0),e.showProgressDialog(t.data),e.scanner.scan()):window.SUI.openNotice("wp-smush-ajax-notice",t.data.message,{type:"warning"})}))}})),t.on("click","#cancel-directory-smush, #dialog-close-div, .wp-smush-cancel-dir",(function(t){t.preventDefault(),i(".wp-smush-cancel-dir").addClass("sui-button-onload"),e.scanner.cancel().done((function(){return window.location.href=e.wp_smush_msgs.directory_url}))})),t.on("click",".sui-icon-play, .wp-smush-resume-scan",(function(t){t.preventDefault(),e.scanner.resume()}));var a=window.location.search;new URLSearchParams(a).has("start")&&!this.triggered&&(this.triggered=!0,i("button.wp-smush-browse").trigger("click"))},initFileTree:function(){var e=this,t=i("button#wp-smush-select-dir"),s={type:"GET",url:ajaxurl,data:{action:"smush_get_directory_list",list_nonce:i('input[name="list_nonce"]').val()},cache:!1};Object.entries(e.tree).length>0||(e.tree=(0,n.createTree)(".wp-smush-list-dialog .content",{autoCollapse:!0,clickFolderMode:3,checkbox:!0,debugLevel:0,selectMode:3,tabindex:"0",keyboard:!0,quicksearch:!0,source:s,lazyLoad:function(e,t){t.result=new Promise((function(e,n){s.data.dir=t.node.key,i.ajax(s).done((function(t){return e(t)})).fail(n)}))},loadChildren:function(e,t){return t.node.fixSelection3AfterClick()},select:function(){return t.prop("disabled",!+e.tree.getSelectedNodes().length)},init:function(){return t.prop("disabled",!0)}}))},showProgressDialog:function(e){i(".wp-smush-progress-dialog .sui-progress-state-text").html("0/"+e+" "+self.wp_smush_msgs.progress_smushed),window.SUI.openModal("wp-smush-progress-dialog","dialog-close-div",void 0,!1)},updateProgressBar:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e>100&&(e=100),i(".sui-progress-block .sui-progress-text span").text(e+"%"),i(".sui-progress-block .sui-progress-bar span").width(e+"%"),e>=90&&i(".sui-progress-state .sui-progress-state-text").text("Finalizing..."),t&&i(".sui-progress-state .sui-progress-state-text").text("Cancelling...")}},WP_Smush.directory.init()},3065:function(){!function(){"use strict";WP_Smush.helpers={init:function(){},formatBytes:function(e,t){var s=1024,i=["KB","MB","GB","TB","PB"];if(Math.abs(e)<s)return e+" B";var n=-1;do{e/=s,++n}while(Math.abs(e)>=s&&n<i.length-1);return e.toFixed(t)+" "+i[n]},getSizeFromString:function(e){return e.replace(/[a-zA-Z]/g,"").trim()},getFormatFromString:function(e){return e.replace(/[0-9.]/g,"").trim()},precise_round:function(e,t){var s=e>=0?1:-1;return e=e>100?100:e,Math.round(e*Math.pow(10,t)+.001*s)/Math.pow(10,t)},showErrorNotice:function(e){if(void 0!==e){var t="<p>".concat(e,"</p>");SUI.openNotice("wp-smush-ajax-notice",t,{type:"error",icon:"info"});var s=document.querySelector(".sui-button-onload");s&&s.classList.remove("sui-button-onload")}},resetSettings:function(){var e=document.getElementById("wp_smush_reset"),t=new XMLHttpRequest;t.open("POST",ajaxurl+"?action=reset_settings",!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.onload=function(){if(200===t.status){var e=JSON.parse(t.response);void 0!==e.success&&e.success&&(window.location.href=wp_smush_msgs.smush_url)}else window.console.log("Request failed.  Returned status of "+t.status)},t.send("_ajax_nonce="+e.value)}},WP_Smush.helpers.init()}()},206:function(){!function(e){"use strict";if(e("#wp-smush-s3support-alert").length){var t={type:"warning",icon:"info",dismiss:{show:!0,label:wp_smush_msgs.noticeDismiss,tooltip:wp_smush_msgs.noticeDismissTooltip}};window.SUI.openNotice("wp-smush-s3support-alert",e("#wp-smush-s3support-alert").data("message"),t)}function s(t){var s=e(t.currentTarget).closest(".smush-notice");s.fadeTo(100,0,(function(){return s.slideUp(100,(function(){return s.remove()}))}))}e("#wp-smush-s3support-alert").on("click","button",(function(){e.post(ajaxurl,{action:"dismiss_s3support_alert"})})),e("#wp-smush-api-message button.sui-button-icon").on("click",(function(t){t.preventDefault();var s=e("#wp-smush-api-message");s.slideUp("slow",(function(){s.remove()})),e.post(ajaxurl,{action:"hide_api_message"})})),e(".smush-notice .smush-notice-act").on("click",(function(e){s(e)})),e(".smush-notice .smush-notice-dismiss").on("click",(function(t){s(t),e.post(ajaxurl,{action:"dismiss_upgrade_notice"})})),e(".wp-smush-update-info").on("click",".notice-dismiss",(function(t){t.preventDefault(),s(t),e.post(ajaxurl,{action:"dismiss_update_info"})}))}(jQuery)},3579:function(){!function(){"use strict";WP_Smush.onboarding={membership:"free",onboardingModal:document.getElementById("smush-onboarding-dialog"),scanFilesModal:document.getElementById("checking-files-dialog"),settings:{first:!0,last:!1,slide:"start",value:!1},selection:{auto:!0,lossy:!0,strip_exif:!0,original:!1,lazy_load:!0,usage:!1},contentContainer:document.getElementById("smush-onboarding-content"),onboardingSlides:["start","auto","lossy","strip_exif","original","lazy_load","usage"],touchX:null,touchY:null,init:function(){if(this.onboardingModal){var e=document.getElementById("smush-onboarding");this.membership=e.dataset.type,"pro"!==this.membership&&(this.onboardingSlides=["start","auto","strip_exif","lazy_load","usage"],this.selection.lossy=!1),"false"===e.dataset.tracking&&this.onboardingSlides.pop(),this.renderTemplate();var t=this.onboardingModal.querySelector(".smush-onboarding-skip-link");t&&t.addEventListener("click",this.skipSetup),window.SUI.openModal("smush-onboarding-dialog","checking-files-dialog",void 0,!1)}},handleTouchStart:function(e){var t=e.touches[0];this.touchX=t.clientX,this.touchY=t.clientY},handleTouchMove:function(e){if(this.touchX&&this.touchY){var t=e.touches[0].clientX,s=e.touches[0].clientY,i=this.touchX-t,n=this.touchY-s;Math.abs(i)>Math.abs(n)&&(i>0?!1===WP_Smush.onboarding.settings.last&&WP_Smush.onboarding.next(null,"next"):!1===WP_Smush.onboarding.settings.first&&WP_Smush.onboarding.next(null,"prev")),this.touchX=null,this.touchY=null}},renderTemplate:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"none",s=this.onboardingModal.querySelector('input[type="checkbox"]');s&&(this.selection[s.id]=s.checked);var i=WP_Smush.onboarding.template("smush-onboarding"),n=i(this.settings);n&&(this.contentContainer.innerHTML=n,"none"===t?this.contentContainer.classList.add("loaded"):(this.contentContainer.classList.remove("loaded"),this.contentContainer.classList.add(t),setTimeout((function(){e.contentContainer.classList.add("loaded"),e.contentContainer.classList.remove(t)}),600))),this.onboardingModal.addEventListener("touchstart",this.handleTouchStart,!1),this.onboardingModal.addEventListener("touchmove",this.handleTouchMove,!1),this.bindSubmit()},bindSubmit:function(){var e=this.onboardingModal.querySelector('button[type="submit"]'),t=this;e&&e.addEventListener("click",(function(e){e.preventDefault();var s=t.onboardingModal.querySelector('input[type="checkbox"]');s&&(t.selection[s.id]=s.checked);var i=document.getElementById("smush_quick_setup_nonce"),n=new XMLHttpRequest;n.open("POST",ajaxurl+"?action=smush_setup",!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.onload=function(){200===n.status?WP_Smush.onboarding.showScanDialog():window.console.log("Request failed.  Returned status of "+n.status)},n.send("smush_settings="+JSON.stringify(t.selection)+"&_ajax_nonce="+i.value)}))},next:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=this.onboardingSlides.indexOf(this.settings.slide),i=0;i=t?"next"===t?s+1:s-1:null!==e&&e.classList.contains("next")?s+1:s-1;var n=null!==e&&e.classList.contains("next")?"fadeInRight":"fadeInLeft";this.settings={first:0===i,last:i+1===this.onboardingSlides.length,slide:this.onboardingSlides[i],value:this.selection[this.onboardingSlides[i]]},this.renderTemplate(n)},goTo:function(e){var t=this.onboardingSlides.indexOf(e);this.settings={first:0===t,last:t+1===this.onboardingSlides.length,slide:e,value:this.selection[e]},this.renderTemplate()},skipSetup:function(){var e=document.getElementById("smush_quick_setup_nonce"),t=new XMLHttpRequest;t.open("POST",ajaxurl+"?action=skip_smush_setup&_ajax_nonce="+e.value),t.onload=function(){200===t.status?WP_Smush.onboarding.showScanDialog():window.console.log("Request failed.  Returned status of "+t.status)},t.send()},showScanDialog:function(){window.SUI.closeModal(),window.SUI.openModal("checking-files-dialog","wpbody-content",void 0,!1);var e=document.getElementById("wp_smush_options_nonce");setTimeout((function(){var t=new XMLHttpRequest;t.open("POST",ajaxurl+"?action=scan_for_resmush",!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.onload=function(){var e=document.querySelector("#smush-onboarding-dialog");e.parentNode.removeChild(e),200===t.status?setTimeout((function(){window.location.search="page=smush-bulk"}),1e3):window.console.log("Request failed.  Returned status of "+t.status)},t.send("type=media&get_ui=false&process_settings=false&wp_smush_options_nonce="+e.value)}),3e3)},hideUpgradeModal:function(){var e=new XMLHttpRequest;e.open("POST",ajaxurl+"?action=hide_new_features"),e.send()}},WP_Smush.onboarding.template=_.memoize((function(e){var t,s={evaluate:/<#([\s\S]+?)#>/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g,variable:"data"};return function(i){return _.templateSettings=s,(t=t||_.template(document.getElementById(e).innerHTML))(i)}})),window.addEventListener("load",(function(){return WP_Smush.onboarding.init()}))}()},1110:function(){!function(){"use strict";WP_Smush.CDN={cdnEnableButton:document.getElementById("smush-enable-cdn"),cdnDisableButton:document.getElementById("smush-cancel-cdn"),cdnStatsBox:document.querySelector(".smush-cdn-stats"),init:function(){var e=this;this.cdnEnableButton&&this.cdnEnableButton.addEventListener("click",(function(t){t.preventDefault(),t.currentTarget.classList.add("sui-button-onload"),e.toggle_cdn(!0)})),this.cdnDisableButton&&this.cdnDisableButton.addEventListener("click",(function(t){t.preventDefault(),t.currentTarget.classList.add("sui-button-onload"),e.toggle_cdn(!1)})),this.updateStatsBox()},toggle_cdn:function(e){var t=document.getElementsByName("wp_smush_options_nonce"),s=new XMLHttpRequest;s.open("POST",ajaxurl+"?action=smush_toggle_cdn",!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.onload=function(){if(200===s.status){var e=JSON.parse(s.response);void 0!==e.success&&e.success?window.location.search="page=smush-cdn":void 0!==e.data.message&&WP_Smush.helpers.showErrorNotice(e.data.message)}else WP_Smush.helpers.showErrorNotice("Request failed.  Returned status of "+s.status)},s.send("param="+e+"&_ajax_nonce="+t[0].value)},updateStatsBox:function(){var e=this;if(void 0!==this.cdnStatsBox&&this.cdnStatsBox&&window.location.search.includes("view=cdn")){this.toggleElements();var t=new XMLHttpRequest;t.open("POST",ajaxurl+"?action=get_cdn_stats",!0),t.onload=function(){if(200===t.status){var s=JSON.parse(t.response);void 0!==s.success&&s.success?e.toggleElements():void 0!==s.data.message&&WP_Smush.helpers.showErrorNotice(s.data.message)}else WP_Smush.helpers.showErrorNotice("Request failed.  Returned status of "+t.status)},t.send()}},toggleElements:function(){for(var e=this.cdnStatsBox.querySelector(".sui-icon-loader"),t=this.cdnStatsBox.querySelectorAll(".wp-smush-stats > :not(.sui-icon-loader)"),s=0;s<t.length;s++)t[s].classList.toggle("sui-hidden");e.classList.toggle("sui-hidden")}},WP_Smush.CDN.init()}()},5972:function(){!function(){"use strict";WP_Smush.Lazyload={lazyloadEnableButton:document.getElementById("smush-enable-lazyload"),lazyloadDisableButton:document.getElementById("smush-cancel-lazyload"),init:function(){var e=this,t=this;this.lazyloadEnableButton&&this.lazyloadEnableButton.addEventListener("click",(function(t){t.preventDefault(),t.currentTarget.classList.add("sui-button-onload"),e.toggle_lazy_load(!0)})),this.lazyloadDisableButton&&this.lazyloadDisableButton.addEventListener("click",(function(t){t.preventDefault(),t.currentTarget.classList.add("sui-button-onload"),e.toggle_lazy_load(!1)}));var s=document.getElementById("smush-remove-spinner");s&&s.addEventListener("click",(function(t){t.preventDefault(),e.removeLoaderIcon()}));var i=document.getElementById("smush-remove-placeholder");i&&i.addEventListener("click",(function(t){t.preventDefault(),e.removeLoaderIcon("placeholder")}));var n=document.querySelectorAll(".smush-ll-remove");n&&0<n.length&&n.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault(),e.target.closest("li").style.display="none",t.remove(e.target.dataset.id,e.target.dataset.type)}))})),this.handlePredefinedPlaceholders()},handlePredefinedPlaceholders:function(){var e=this,t=document.getElementById("placeholder-icon-1");t&&t.addEventListener("click",(function(){return e.changeColor("#F3F3F3")}));var s=document.getElementById("placeholder-icon-2");s&&s.addEventListener("click",(function(){return e.changeColor("#333333")}))},changeColor:function(e){document.getElementById("smush-color-picker").value=e,document.querySelector(".sui-colorpicker-hex .sui-colorpicker-value > span > span").style.backgroundColor=e,document.querySelector(".sui-colorpicker-hex .sui-colorpicker-value > input").value=e},toggle_lazy_load:function(e){var t=document.getElementsByName("wp_smush_options_nonce"),s=new XMLHttpRequest;s.open("POST",ajaxurl+"?action=smush_toggle_lazy_load",!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.onload=function(){if(200===s.status){var e=JSON.parse(s.response);void 0!==e.success&&e.success?window.location.search="page=smush-lazy-load":void 0!==e.data.message&&(WP_Smush.helpers.showErrorNotice(e.data.message),document.querySelector(".sui-button-onload").classList.remove("sui-button-onload"))}else WP_Smush.helpers.showErrorNotice("Request failed.  Returned status of "+s.status),document.querySelector(".sui-button-onload").classList.remove("sui-button-onload")},s.send("param="+e+"&_ajax_nonce="+t[0].value)},addLoaderIcon:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"spinner";e||(e=wp.media({title:"Select or upload an icon",button:{text:"Select icon"},multiple:!1})).on("select",(function(){var s=e.state().get("selection").first().toJSON(),i=document.getElementById("smush-"+t+"-icon-preview");i.style.backgroundImage='url("'+s.url+'")',i.style.display="block",document.getElementById("smush-"+t+"-icon-file").setAttribute("value",s.id),document.getElementById("smush-upload-"+t).style.display="none";var n=document.getElementById("smush-remove-"+t);n.querySelector("span").innerHTML=s.filename,n.style.display="block"})),e.open()},removeLoaderIcon:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"spinner",t=document.getElementById("smush-"+e+"-icon-preview");t.style.backgroundImage="",t.style.display="none",document.getElementById("smush-upload-"+e).style.display="block",document.getElementById("smush-remove-"+e).style.display="none",document.getElementById("smush-"+e+"-icon-file").setAttribute("value","")},remove:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"spinner",s=document.getElementsByName("wp_smush_options_nonce"),i=new XMLHttpRequest;i.open("POST",ajaxurl+"?action=smush_remove_icon",!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.send("id="+e+"&type="+t+"&_ajax_nonce="+s[0].value)}},WP_Smush.Lazyload.init()}()},4933:function(){!function(e){"use strict";function t(t,s){var i=new XMLHttpRequest;i.open("POST",ajaxurl+"?action=smush_save_settings",!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.onload=function(){if(e("#save-settings-button").removeClass("sui-button-onload-text sui-button-onload"),200===i.status){var t=JSON.parse(i.response);void 0!==t.success&&t.success?function(e){var t="<p>".concat(e,"</p>"),s={type:"success",icon:"check"};SUI.openNotice("wp-smush-ajax-notice",t,s);var i=document.querySelector(".sui-button-onload");i&&i.classList.remove("sui-button-onload")}(wp_smush_msgs.settingsUpdated):t.data&&t.data.message?WP_Smush.helpers.showErrorNotice(t.data.message):WP_Smush.helpers.showErrorNotice("Request failed.")}else WP_Smush.helpers.showErrorNotice("Request failed. Returned status of "+i.status)},i.send("page="+s+"&"+t+"&_ajax_nonce="+wp_smush_msgs.nonce)}e("form#smush-bulk-form").on("submit",(function(s){s.preventDefault(),e("#save-settings-button").addClass("sui-button-onload"),t(e(this).serialize(),"bulk"),function(){e("#save-settings-button").addClass("sui-button-onload");var t={action:"scan_for_resmush",wp_smush_options_nonce:e("#wp_smush_options_nonce").val(),type:"media"};e.post(ajaxurl,e.param(t)).done((function(){e("#save-settings-button").removeClass("sui-button-onload")}))}()})),e("form#smush-lazy-load-form").on("submit",(function(s){s.preventDefault(),e("#save-settings-button").addClass("sui-button-onload-text"),t(e(this).serialize(),"lazy-load")})),e("form#smush-cdn-form").on("submit",(function(s){s.preventDefault(),e("#save-settings-button").addClass("sui-button-onload-text"),t(e(this).serialize(),"cdn")})),e("form#smush-integrations-form").on("submit",(function(s){s.preventDefault(),e("#save-settings-button").addClass("sui-button-onload-text"),t(e(this).serialize(),"integrations")})),e("form#smush-tools-form").on("submit",(function(s){s.preventDefault(),e("#save-settings-button").addClass("sui-button-onload-text"),t(e(this).serialize(),"tools")})),e("form#smush-settings-form").on("submit",(function(s){s.preventDefault(),e("#save-settings-button").addClass("sui-button-onload-text"),t(e(this).serialize(),"settings")})),e("input[name=keep_data]").on("change",(function(e){var t="keep_data-true"===e.target.id?"keep_data-false":"keep_data-true";e.target.parentNode.classList.add("active"),document.getElementById(t).parentNode.classList.remove("active")})),e("input#detection").on("click",(function(){var t=e(".smush-highlighting-notice"),s=e(".smush-highlighting-warning");e(this).is(":checked")?t.length>0?t.show():s.show():(t.hide(),s.hide())}))}(jQuery)},9446:function(e,t){"use strict";function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var s=0;s<t.length;s++){var i=t[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var o=0,a=function(){function e(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"media";i(this,e),this.errors=[];var a=jQuery(".bulk-smush-wrapper .sui-progress-state-text");return this.smushed=parseInt(a.find("span:first-child").html()),this.total=parseInt(a.find("span:last-child").html()),this.skip_resmush=!(void 0===t.data("smush")||!t.data("smush")),this.button=jQuery(t[0]),this.is_bulk=!!s(n)&&n,this.url=ajaxurl,this.log=jQuery(".smush-final-log"),this.deferred=jQuery.Deferred(),this.deferred.errors=[],this.setIds(),this.is_bulk_resmush=0<wp_smushit_data.resmush.length&&!this.skip_resmush,this.status=this.button.parent().prev(".smush-status"),this.smush_type=o,this.single_ajax_suffix="nextgen"===this.smush_type?"smush_manual_nextgen":"wp_smushit_manual",this.bulk_ajax_suffix="nextgen"===this.smush_type?"wp_smushit_nextgen_bulk":"wp_smushit_bulk",this.url=this.is_bulk?e.smushAddParams(this.url,{action:this.bulk_ajax_suffix}):e.smushAddParams(this.url,{action:this.single_ajax_suffix}),this.start(),this.run(),this.bindDeferredEvents(),this.cancelAjax(),this.deferred}var t,a,r;return t=e,r=[{key:"smushAddParams",value:function(e,t){return jQuery.isEmptyObject(t)||(e+=(e.indexOf("?")>=0?"&":"?")+jQuery.param(t)),e}},{key:"membershipValidity",value:function(e){var t=jQuery("#wp-smush-invalid-member");void 0!==e&&void 0!==e.show_warning&&t.length>0&&(e.show_warning?t.show():t.hide())}},{key:"ajax",value:function(e,t,s,i){var n=jQuery.param({is_bulk_resmush:e,attachment_id:t,_nonce:i});return jQuery.ajax({type:"GET",data:n,url:s,timeout:wp_smushit_data.timeout,dataType:"json"})}},{key:"setProSavings",value:function(){var e=wp_smushit_data.savings_percent>0?wp_smushit_data.savings_percent:0,t=wp_smushit_data.savings_bytes>0?wp_smushit_data.savings_bytes:0,s=2.22058824;e>49&&(s=1.22054412),e>0&&(e*=s,t*=s),wp_smushit_data.pro_savings={percent:WP_Smush.helpers.precise_round(e,1),savings_bytes:WP_Smush.helpers.formatBytes(t,1)}}},{key:"updateStats",value:function(t){var s=void 0!==t&&"nextgen"===t,i=0;wp_smushit_data.savings_bytes=parseInt(wp_smushit_data.size_before)-parseInt(wp_smushit_data.size_after);var n=WP_Smush.helpers.formatBytes(wp_smushit_data.savings_bytes,1),o=jQuery(".wp-smush-savings .wp-smush-stats-human");s?o.html(n):(o.html(WP_Smush.helpers.getFormatFromString(n)),jQuery(".sui-summary-large.wp-smush-stats-human").html(WP_Smush.helpers.getSizeFromString(n))),wp_smushit_data.savings_percent=WP_Smush.helpers.precise_round(parseInt(wp_smushit_data.savings_bytes)/parseInt(wp_smushit_data.size_before)*100,1),isNaN(wp_smushit_data.savings_percent)||jQuery(".wp-smush-savings .wp-smush-stats-percent").html(wp_smushit_data.savings_percent),void 0!==wp_smushit_data.savings_bytes&&void 0!==wp_smushit_data.savings_resize&&(i=parseInt(wp_smushit_data.savings_bytes)-parseInt(wp_smushit_data.savings_resize))>0&&jQuery("li.super-smush-attachments span.smushed-savings").html(WP_Smush.helpers.formatBytes(i,1)),s?jQuery(".sui-summary-details span.wp-smush-total-optimised").html(wp_smushit_data.count_images):jQuery("span.smushed-items-count span.wp-smush-count-total span.wp-smush-total-optimised").html(wp_smushit_data.count_images),jQuery("span.smushed-items-count span.wp-smush-count-resize-total span.wp-smush-total-optimised").html(wp_smushit_data.count_resize);var a=jQuery("li.super-smush-attachments .smushed-count");a.length&&void 0!==wp_smushit_data.count_supersmushed&&a.html(wp_smushit_data.count_supersmushed);var r=jQuery(".smush-conversion-savings");if(r.length>0&&void 0!==wp_smushit_data.savings_conversion&&""!==wp_smushit_data.savings_conversion){var u=r.find(".wp-smush-stats");u.length>0&&u.html(WP_Smush.helpers.formatBytes(wp_smushit_data.savings_conversion,1))}var d=jQuery(".smush-resize-savings");if(d.length>0&&void 0!==wp_smushit_data.savings_resize&&""!==wp_smushit_data.savings_resize){var l=parseInt(wp_smushit_data.savings_resize),c=d.find(".wp-smush-stats"),h=d.find(".wp-smush-stats-label-message");l>0&&c.length>0&&(h.length>0&&h.hide(),c.html(WP_Smush.helpers.formatBytes(wp_smushit_data.savings_resize,1)))}if(e.setProSavings(),void 0!==wp_smushit_data.pro_savings){var p=jQuery(".smush-avg-pro-savings");if(p.length>0){var m=p.find(".wp-smush-stats-percent"),f=p.find(".wp-smush-stats-human");m.length>0&&void 0!==wp_smushit_data.pro_savings.percent&&""!==wp_smushit_data.pro_savings.percent&&m.html(wp_smushit_data.pro_savings.percent),f.length>0&&void 0!==wp_smushit_data.pro_savings.savings_bytes&&""!==wp_smushit_data.pro_savings.savings_bytes&&f.html(wp_smushit_data.pro_savings.savings_bytes)}}if(jQuery(".smush-sidenav .wp-smush-remaining-count").length){var g=0;void 0!==wp_smushit_data.unsmushed&&wp_smushit_data.unsmushed.length>0&&(g+=wp_smushit_data.unsmushed.length),void 0!==wp_smushit_data.resmush&&wp_smushit_data.resmush.length>0&&(g+=wp_smushit_data.resmush.length),e.updateRemainingCount(g)}}},{key:"updateImageStats",value:function(e){if(0!==e){var t=jQuery(".attachment-info .file-size");if(t.contents().filter((function(){return 3===this.nodeType})).text()!==" "+e){var s=t.contents().filter((function(){return 1===this.nodeType})).text();t.html("<strong>"+s+"</strong> "+e)}}}},{key:"updateRemainingCount",value:function(e){var t=jQuery(".wp-smush-remaining-count");t.length&&t.html(e);var s=jQuery(".smush-sidenav .wp-smush-remaining-count"),i=jQuery(".smush-sidenav .smush-bulk .sui-icon-check-tick");s.length&&i.length&&(e>0?(s.removeClass("sui-hidden"),i.addClass("sui-hidden")):(jQuery(".sui-summary-smush .smush-stats-icon").addClass("sui-hidden"),i.removeClass("sui-hidden"),s.addClass("sui-hidden")))}},{key:"updateLocalizedStats",value:function(e,t){void 0!==window.wp_smushit_data&&("media"===t?(wp_smushit_data.count_images=parseInt(wp_smushit_data.count_images)+parseInt(e.count),e.is_lossy&&(wp_smushit_data.count_supersmushed=parseInt(wp_smushit_data.count_supersmushed)+1),wp_smushit_data.savings_resize=void 0!==e.savings_resize.bytes?parseInt(wp_smushit_data.savings_resize)+parseInt(e.savings_resize.bytes):parseInt(wp_smushit_data.savings_resize),wp_smushit_data.count_resize=void 0!==e.savings_resize.bytes?parseInt(wp_smushit_data.count_resize)+1:wp_smushit_data.count_resize,wp_smushit_data.savings_conversion=void 0!==e.savings_conversion&&void 0!==e.savings_conversion.bytes?parseInt(wp_smushit_data.savings_conversion)+parseInt(e.savings_conversion.bytes):parseInt(wp_smushit_data.savings_conversion)):"directory_smush"===t?wp_smushit_data.count_images=parseInt(wp_smushit_data.count_images)+1:"nextgen"===t&&(wp_smushit_data.count_supersmushed=parseInt(wp_smushit_data.count_supersmushed)+1,wp_smushit_data.count_images=parseInt(wp_smushit_data.count_images)+parseInt(e.count)),e.size_before>e.size_after&&(wp_smushit_data.size_before=void 0!==e.size_before?parseInt(wp_smushit_data.size_before)+parseInt(e.size_before):parseInt(wp_smushit_data.size_before),wp_smushit_data.size_after=void 0!==e.size_after?parseInt(wp_smushit_data.size_after)+parseInt(e.size_after):parseInt(wp_smushit_data.size_after)),void 0!==e.savings_resize&&(wp_smushit_data.size_before=void 0!==e.savings_resize.size_before?parseInt(wp_smushit_data.size_before)+parseInt(e.savings_resize.size_before):parseInt(wp_smushit_data.size_before),wp_smushit_data.size_after=void 0!==e.savings_resize.size_after?parseInt(wp_smushit_data.size_after)+parseInt(e.savings_resize.size_after):parseInt(wp_smushit_data.size_after)),void 0!==e.savings_conversion&&(wp_smushit_data.size_before=void 0!==e.savings_conversion.size_before?parseInt(wp_smushit_data.size_before)+parseInt(e.savings_conversion.size_before):parseInt(wp_smushit_data.size_before),wp_smushit_data.size_after=void 0!==e.savings_conversion.size_after?parseInt(wp_smushit_data.size_after)+parseInt(e.savings_conversion.size_after):parseInt(wp_smushit_data.size_after)))}},{key:"prepareErrorRow",value:function(e,t,s,i,n){var o='<div class="smush-bulk-error-row"><div class="smush-bulk-image-data">'+(void 0===s?'<i class="sui-icon-photo-picture" aria-hidden="true"></i>':s)+'<span class="smush-image-name">'+("undefined"===t||void 0===t?"undefined":t)+'</span><span class="smush-image-error">'+e+"</span></div>";return"media"===n&&(o=o+'<div class="smush-bulk-image-actions"><button type="button" class="sui-button-icon sui-tooltip sui-tooltip-constrained sui-tooltip-top-right smush-ignore-image" data-tooltip="'+window.wp_smush_msgs.error_ignore+'" data-id="'+i+'"><i class="sui-icon-eye-hide" aria-hidden="true"></i></button></div>'),o+="</div>"}},{key:"updateSmushIds",value:function(e){if(void 0!==wp_smushit_data.unsmushed&&wp_smushit_data.unsmushed.length>0){var t=wp_smushit_data.unsmushed.indexOf(e);t>-1&&wp_smushit_data.unsmushed.splice(t,1)}if(void 0!==wp_smushit_data.resmush&&wp_smushit_data.resmush.length>0){var s=wp_smushit_data.resmush.indexOf(e);s>-1&&wp_smushit_data.resmush.splice(s,1)}}}],(a=[{key:"setIds",value:function(){var e=[];"object"===s(e=0<wp_smushit_data.resmush.length&&!this.skip_resmush?0<wp_smushit_data.unsmushed.length?wp_smushit_data.resmush.concat(wp_smushit_data.unsmushed):wp_smushit_data.resmush:wp_smushit_data.unsmushed)?this.ids=e.filter((function(e,t,s){return t===s.indexOf(e)})):this.ids=e}},{key:"start",value:function(){this.button.prop("disabled",!0),this.button.addClass("wp-smush-started"),this.bulkStart(),this.singleStart()}},{key:"bulkStart",value:function(){this.is_bulk&&(jQuery(".wp-smush-bulk-wrapper").addClass("sui-hidden"),jQuery(".sui-notice-top").remove(),jQuery(".wp-smush-bulk-progress-bar-wrapper .sui-notice-warning:first-of-type").hide(),0>=jQuery("div.smush-final-log .smush-bulk-error-row").length&&jQuery("div.smush-final-log").hide(),jQuery(".bulk-smush-wrapper .wp-smush-bulk-progress-bar-wrapper, #wp-smush-running-notice").removeClass("sui-hidden"))}},{key:"singleStart",value:function(){this.is_bulk||(this.button.html('<span class="spinner wp-smush-progress">'+window.wp_smush_msgs.smushing+"</span>"),this.status.removeClass("error"))}},{key:"enableButton",value:function(){this.button.prop("disabled",!1),jQuery(".wp-smush-all").prop("disabled",!1),jQuery("button.wp-smush-scan, a.wp-smush-lossy-enable, button.wp-smush-resize-enable, button#save-settings-button").prop("disabled",!1)}},{key:"singleDone",value:function(){if(!this.is_bulk){var t=this;this.button.html(window.wp_smush_msgs.all_done),this.request.done((function(s){if(void 0!==s.data){var i=t.status.parent();e.membershipValidity(s.data),s.success?i.html(s.data):(t.status.addClass("error"),t.status.html(s.data.error_msg),t.button.html(window.smush_vars.strings.stats_label)),e.updateImageStats(s.data.new_size)}t.enableButton()})).fail((function(e){t.status.html(e.data),t.status.addClass("error"),t.enableButton()}))}}},{key:"syncStats",value:function(){var t=jQuery("div.wp-smush-bulk-progress-bar-wrapper div.wp-smush-count.tc"),s=t.html();t.html(window.wp_smush_msgs.sync_stats),jQuery.ajax({type:"GET",url:this.url,data:{action:"get_stats"},success:function(t){t&&void 0!==t&&(t=t.data,jQuery.extend(wp_smushit_data,{count_images:t.count_images,count_smushed:t.count_smushed,count_total:t.count_total,count_resize:t.count_resize,count_supersmushed:t.count_supersmushed,savings_bytes:t.savings_bytes,savings_conversion:t.savings_conversion,savings_resize:t.savings_resize,size_before:t.size_before,size_after:t.size_after}),e.updateStats(this.smush_type))}}).always((function(){return t.html(s)}))}},{key:"bulkDone",value:function(){if(this.is_bulk){this.enableButton();var e=jQuery(".sui-summary-smush .smush-stats-icon");if(0===this.ids.length)e.addClass("sui-hidden"),jQuery(".bulk-smush-wrapper .wp-smush-all-done, .wp-smush-pagespeed-recommendation").removeClass("sui-hidden"),jQuery(".wp-smush-bulk-wrapper").addClass("sui-hidden"),jQuery(".wp-smush-bulk-progress-bar-wrapper").addClass("sui-hidden"),document.getElementById("smush-box-bulk-upgrade")&&(document.getElementById("smush-box-bulk-upgrade").classList.remove("sui-hidden"),document.getElementById("wp-smush-all-smushed-text").classList.remove("sui-hidden"),document.getElementById("wp-smush-pending-to-smush-text").classList.add("sui-hidden")),this._updateProgress(0,0);else{e.removeClass("sui-icon-loader sui-loading sui-hidden").addClass("sui-icon-info sui-warning");var t=jQuery(".bulk-smush-wrapper .wp-smush-resmush-notice");t.length>0?t.show():jQuery(".bulk-smush-wrapper .wp-smush-remaining").removeClass("sui-hidden")}jQuery(".wp-resmush.wp-smush-action, .wp-smush-scan").removeProp("disabled")}}},{key:"freeExceeded",value:function(){var e=jQuery(".wp-smush-bulk-progress-bar-wrapper");e.addClass("wp-smush-exceed-limit"),e.find(".sui-progress-block .wp-smush-cancel-bulk").addClass("sui-hidden"),e.find(".sui-progress-block .wp-smush-all").removeClass("sui-hidden"),e.find("i.sui-icon-loader").addClass("sui-icon-info").removeClass("sui-icon-loader").removeClass("sui-loading"),document.getElementById("bulk-smush-resume-button").classList.remove("sui-hidden"),document.getElementById("smush-box-bulk-upgrade")&&document.getElementById("smush-box-bulk-upgrade").classList.remove("sui-hidden")}},{key:"updateProgress",value:function(t){if(this.is_bulk_resmush||this.is_bulk){var s=0;t&&void 0!==t.data&&void 0!==t.data.stats&&e.updateLocalizedStats(t.data.stats,this.smush_type),this.is_bulk_resmush?(t.success&&(wp_smushit_data.resmush.length>0?jQuery(".wp-smush-images-remaining").html(wp_smushit_data.resmush.length):0===wp_smushit_data.resmush.length&&0===this.ids.length&&(jQuery(".bulk-resmush-wrapper .wp-smush-all-done, .wp-smush-pagespeed-recommendation").removeClass("sui-hidden"),jQuery(".wp-smush-resmush-wrap, .wp-smush-bulk-progress-bar-wrapper").addClass("sui-hidden"))),void 0!==this.ids&&void 0!==this.total&&this.total>0&&(s=(this.smushed+this.errors.length)/this.total*100)):s=(this.smushed+this.errors.length)/this.total*100,0===this.ids.length&&("nextgen"!==this.smush_type&&this.syncStats(),jQuery(".bulk-smush-wrapper .wp-smush-all-done, .wp-smush-pagespeed-recommendation").removeClass("sui-hidden"),jQuery(".wp-smush-bulk-wrapper").addClass("sui-hidden")),void 0!==this.ids&&e.updateRemainingCount(this.ids.length),this._updateProgress(this.smushed+this.errors.length,WP_Smush.helpers.precise_round(s,1)),0===this.ids.length&&"nextgen"!==this.smush_type||e.updateStats(this.smush_type)}}},{key:"_updateProgress",value:function(e,t){(this.is_bulk||this.is_bulk_resmush)&&(jQuery("span.wp-smush-images-percent").html(t+"%"),jQuery(".bulk-smush-wrapper .wp-smush-progress-inner").css("width",t+"%"),jQuery(".bulk-smush-wrapper .sui-progress-state-text").find("span:first-child").html(e).find("span:last-child").html(this.total))}},{key:"continue",value:function(){var e=this.button.attr("continue_smush");return void 0===e&&(e=!0),"false"!==e&&e||(e=!1),e&&this.ids.length>0&&this.is_bulk}},{key:"callAjax",value:function(){if(0!==o&&void 0!==o&&10>performance.now()-o)return this.freeExceeded(),this.deferred;var t="";this.current_id=this.is_bulk?this.ids.shift():this.button.data("id"),e.updateSmushIds(this.current_id);var s=this.button.parent().find("#_wp_smush_nonce");s&&(t=s.val());var i=this;return this.request=e.ajax(this.is_bulk_resmush,this.current_id,this.url,t).done((function(t){if(void 0===t.success||void 0!==t.success&&!1===t.success&&void 0!==t.data&&"limit_exceeded"!==t.data.error){i.errors.push(i.current_id);var s=e.prepareErrorRow(t.data.error_message,t.data.file_name,t.data.thumbnail,i.current_id,i.smush_type);i.log.show(),i.errors.length>5?jQuery(".smush-bulk-errors-actions").removeClass("sui-hidden"):i.log.find(".smush-bulk-errors").append(s)}else void 0!==t.success&&t.success&&i.smushed++;e.membershipValidity(t.data),void 0!==t.data&&"limit_exceeded"===t.data.error&&"resolved"!==i.deferred.state()?(document.getElementById("bulk_smush_warning").classList.remove("sui-hidden"),i.button.attr("continue_smush",!1),wp_smushit_data.unsmushed.unshift(i.current_id),i.ids.unshift(i.current_id),o=performance.now(),i.freeExceeded()):i.is_bulk?i.updateProgress(t):0===i.ids.length&&i.syncStats(),i.singleDone()})).always((function(){i.continue()&&i.is_bulk?i.callAjax():i.deferred.resolve()})),this.deferred.errors=this.errors,this.deferred}},{key:"run",value:function(){this.is_bulk&&this.ids.length>0&&this.callAjax(),this.is_bulk||this.callAjax()}},{key:"bindDeferredEvents",value:function(){var e=this;this.deferred.done((function(){if(e.button.removeAttr("continue_smush"),e.errors.length){var t=window.wp_smush_msgs.error_in_bulk.replace("{{errors}}",e.errors.length).replace("{{total}}",e.total).replace("{{smushed}}",e.smushed);jQuery(".wp-smush-all-done").addClass("sui-notice-warning").removeClass("sui-notice-success").find("p").html(t)}e.bulkDone(),jQuery(".wp-smush-all:not(.wp-smush-finished), .wp-smush-scan").prop("disabled",!1)}))}},{key:"cancelAjax",value:function(){var e=this;jQuery(".wp-smush-cancel-bulk").on("click",(function(){e.button.attr("continue_smush",!1),e.syncStats(),e.request.abort(),e.enableButton(),e.button.removeClass("wp-smush-started"),wp_smushit_data.unsmushed.unshift(e.current_id),jQuery(".wp-smush-bulk-wrapper").removeClass("sui-hidden"),jQuery(".wp-smush-bulk-progress-bar-wrapper").addClass("sui-hidden")}))}}])&&n(t.prototype,a),r&&n(t,r),e}();t.Z=a},1442:function(){!function(){"use strict";WP_Smush.WebP={nonceField:document.getElementsByName("wp_smush_options_nonce"),toggleModuleButton:document.getElementById("smush-toggle-webp-button"),recheckStatusButton:document.getElementById("smush-webp-recheck"),recheckStatusLink:document.getElementById("smush-webp-recheck-link"),showWizardButton:document.getElementById("smush-webp-toggle-wizard"),init:function(){var e=this;this.maybeShowDeleteAllSuccessNotice(),this.toggleModuleButton&&this.toggleModuleButton.addEventListener("click",(function(t){return e.toggleWebp(t)})),this.recheckStatusButton&&this.recheckStatusButton.addEventListener("click",(function(t){t.preventDefault(),e.recheckStatus()})),this.recheckStatusLink&&this.recheckStatusLink.addEventListener("click",(function(t){t.preventDefault(),e.recheckStatus()})),document.getElementById("wp-smush-webp-delete-all")&&document.getElementById("wp-smush-webp-delete-all").addEventListener("click",(function(t){return e.deleteAll(t)})),this.showWizardButton&&this.showWizardButton.addEventListener("click",this.toggleWizard)},toggleWebp:function(e){var t=this;e.preventDefault();var s=e.currentTarget,i="enable"===s.dataset.action;s.classList.add("sui-button-onload");var n=new XMLHttpRequest;n.open("POST",ajaxurl+"?action=smush_webp_toggle",!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.onload=function(){var e=JSON.parse(n.response);if(200===n.status){if(void 0!==e.success&&e.success)t.runScan().onload=function(){window.location.href=window.wp_smush_msgs.localWebpURL};else void 0!==e.data.message&&(t.showNotice(e.data.message),s.classList.remove("sui-button-onload"))}else{var i=window.wp_smush_msgs.generic_ajax_error;e&&void 0!==e.data.message&&(i=e.data.message),t.showNotice(i),s.classList.remove("sui-button-onload")}},n.send("param="+i+"&_ajax_nonce="+this.nonceField[0].value)},recheckStatus:function(){var e=this;this.recheckStatusButton.classList.add("sui-button-onload");var t=new XMLHttpRequest;t.open("POST",ajaxurl+"?action=smush_webp_get_status",!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.onload=function(){e.recheckStatusButton.classList.remove("sui-button-onload");var s=!1,i=JSON.parse(t.response);200===t.status?(i.success?"1":"0")!==e.recheckStatusButton.dataset.isConfigured&&location.reload():s=window.wp_smush_msgs.generic_ajax_error;i&&i.data&&(s=i.data),s&&e.showNotice(s)},t.send("_ajax_nonce="+window.wp_smush_msgs.webp_nonce)},deleteAll:function(e){var t=this,s=e.currentTarget;s.classList.add("sui-button-onload");var i=!1,n=new XMLHttpRequest;n.open("POST",ajaxurl+"?action=smush_webp_delete_all",!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.onload=function(){var e=JSON.parse(n.response);200===n.status?void 0!==e.success&&e.success?t.runScan().onload=function(){location.search=location.search+"&notice=webp-deleted"}:i=window.wp_smush_msgs.generic_ajax_error:i=window.wp_smush_msgs.generic_ajax_error;if(e&&e.data&&e.data.message&&(i=e.data.message),i){s.classList.remove("sui-button-onload");var o='<p style="text-align: left;">'.concat(i,"</p>");window.SUI.openNotice("wp-smush-webp-delete-all-error-notice",o,{type:"error",icon:"info",autoclose:{show:!1}})}},n.send("_ajax_nonce="+this.nonceField[0].value)},toggleWizard:function(e){e.currentTarget.classList.add("sui-button-onload");var t=new XMLHttpRequest;t.open("GET",ajaxurl+"?action=smush_toggle_webp_wizard&_ajax_nonce="+window.wp_smush_msgs.webp_nonce,!0),t.onload=function(){return location.reload()},t.send()},runScan:function(){var e=new XMLHttpRequest,t=document.getElementsByName("wp_smush_options_nonce");return e.open("POST",ajaxurl+"?action=scan_for_resmush",!0),e.setRequestHeader("Content-type","application/x-www-form-urlencoded"),e.send("_ajax_nonce="+t[0].value),e},showNotice:function(e,t){if(void 0!==e){var s="<p>".concat(e,"</p>"),i={type:t||"error",icon:"info",dismiss:{show:!0,label:window.wp_smush_msgs.noticeDismiss,tooltip:window.wp_smush_msgs.noticeDismissTooltip},autoclose:{show:!1}};window.SUI.openNotice("wp-smush-ajax-notice",s,i)}},maybeShowDeleteAllSuccessNotice:function(){if(document.getElementById("wp-smush-webp-delete-all-notice")){var e="<p>".concat(document.getElementById("wp-smush-webp-delete-all-notice").dataset.message,"</p>");window.SUI.openNotice("wp-smush-webp-delete-all-notice",e,{type:"success",icon:"check-tick",dismiss:{show:!0}})}}},WP_Smush.WebP.init()}()},5445:function(e,t,s){var i,n,o;n=[s(5311),s(3860)],i=function(e){"use strict";if(!e.ui||!e.ui.fancytree){var t,s,i=null,n=new RegExp(/\.|\//),o=/[&<>"'/]/g,a=/[<>"'/]/g,r="$recursive_request",u="$request_target_invalid",d={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},l={16:!0,17:!0,18:!0},c={8:"backspace",9:"tab",10:"return",13:"return",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},h={16:"shift",17:"ctrl",18:"alt",91:"meta",93:"meta"},p={0:"",1:"left",2:"middle",3:"right"},m="active expanded focus folder lazy radiogroup selected unselectable unselectableIgnore".split(" "),f={},g="columns types".split(" "),v="checkbox expanded extraClasses folder icon iconTooltip key lazy partsel radiogroup refKey selected statusNodeType title tooltip type unselectable unselectableIgnore unselectableStatus".split(" "),_={},w={},y={active:!0,children:!0,data:!0,focus:!0};for(t=0;t<m.length;t++)f[m[t]]=!0;for(t=0;t<v.length;t++)s=v[t],_[s]=!0,s!==s.toLowerCase()&&(w[s.toLowerCase()]=s);var b=Array.isArray;return k(e.ui,"Fancytree requires jQuery UI (http://jqueryui.com)"),Date.now||(Date.now=function(){return(new Date).getTime()}),A.prototype={_findDirectChild:function(e){var t,s,i=this.children;if(i)if("string"==typeof e){for(t=0,s=i.length;t<s;t++)if(i[t].key===e)return i[t]}else{if("number"==typeof e)return this.children[e];if(e.parent===this)return e}return null},_setChildren:function(e){k(e&&(!this.children||0===this.children.length),"only init supported"),this.children=[];for(var t=0,s=e.length;t<s;t++)this.children.push(new A(this,e[t]));this.tree._callHook("treeStructureChanged",this.tree,"setChildren")},addChildren:function(t,s){var i,n,o,a=this.getFirstChild(),r=this.getLastChild(),u=null,d=[];for(e.isPlainObject(t)&&(t=[t]),this.children||(this.children=[]),i=0,n=t.length;i<n;i++)d.push(new A(this,t[i]));if(u=d[0],null==s?this.children=this.children.concat(d):(s=this._findDirectChild(s),k((o=e.inArray(s,this.children))>=0,"insertBefore must be an existing child"),this.children.splice.apply(this.children,[o,0].concat(d))),a&&!s){for(i=0,n=d.length;i<n;i++)d[i].render();a!==this.getFirstChild()&&a.renderStatus(),r!==this.getLastChild()&&r.renderStatus()}else(!this.parent||this.parent.ul||this.tr)&&this.render();return 3===this.tree.options.selectMode&&this.fixSelection3FromEndNodes(),this.triggerModifyChild("add",1===d.length?d[0]:null),u},addClass:function(e){return this.toggleClass(e,!0)},addNode:function(e,t){switch(void 0!==t&&"over"!==t||(t="child"),t){case"after":return this.getParent().addChildren(e,this.getNextSibling());case"before":return this.getParent().addChildren(e,this);case"firstChild":var s=this.children?this.children[0]:null;return this.addChildren(e,s);case"child":case"over":return this.addChildren(e)}k(!1,"Invalid mode: "+t)},addPagingNode:function(t,s){var i,n;if(s=s||"child",!1!==t)return t=e.extend({title:this.tree.options.strings.moreData,statusNodeType:"paging",icon:!1},t),this.partload=!0,this.addNode(t,s);for(i=this.children.length-1;i>=0;i--)"paging"===(n=this.children[i]).statusNodeType&&this.removeChild(n);this.partload=!1},appendSibling:function(e){return this.addNode(e,"after")},applyCommand:function(e,t){return this.tree.applyCommand(e,this,t)},applyPatch:function(e){if(null===e)return this.remove(),L(this);var t,s,i={children:!0,expanded:!0,parent:!0};for(t in e)x(e,t)&&(s=e[t],i[t]||S(s)||(_[t]?this[t]=s:this.data[t]=s));return x(e,"children")&&(this.removeChildren(),e.children&&this._setChildren(e.children)),this.isVisible()&&(this.renderTitle(),this.renderStatus()),x(e,"expanded")?this.setExpanded(e.expanded):L(this)},collapseSiblings:function(){return this.tree._callHook("nodeCollapseSiblings",this)},copyTo:function(e,t,s){return e.addNode(this.toDict(!0,s),t)},countChildren:function(e){var t,s,i,n=this.children;if(!n)return 0;if(i=n.length,!1!==e)for(t=0,s=i;t<s;t++)i+=n[t].countChildren();return i},debug:function(e){this.tree.options.debugLevel>=4&&(Array.prototype.unshift.call(arguments,this.toString()),N("log",arguments))},discard:function(){return this.warn("FancytreeNode.discard() is deprecated since 2014-02-16. Use .resetLazy() instead."),this.resetLazy()},discardMarkup:function(e){var t=e?"nodeRemoveMarkup":"nodeRemoveChildMarkup";this.tree._callHook(t,this)},error:function(e){this.tree.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),N("error",arguments))},findAll:function(e){e=S(e)?e:R(e);var t=[];return this.visit((function(s){e(s)&&t.push(s)})),t},findFirst:function(e){e=S(e)?e:R(e);var t=null;return this.visit((function(s){if(e(s))return t=s,!1})),t},findRelatedNode:function(e,t){return this.tree.findRelatedNode(this,e,t)},_changeSelectStatusAttrs:function(e){var t=!1,s=this.tree.options,n=i.evalOption("unselectable",this,this,s,!1),o=i.evalOption("unselectableStatus",this,this,s,void 0);switch(n&&null!=o&&(e=o),e){case!1:t=this.selected||this.partsel,this.selected=!1,this.partsel=!1;break;case!0:t=!this.selected||!this.partsel,this.selected=!0,this.partsel=!0;break;case void 0:t=this.selected||!this.partsel,this.selected=!1,this.partsel=!0;break;default:k(!1,"invalid state: "+e)}return t&&this.renderStatus(),t},fixSelection3AfterClick:function(e){var t=this.isSelected();this.visit((function(e){if(e._changeSelectStatusAttrs(t),e.radiogroup)return"skip"})),this.fixSelection3FromEndNodes(e)},fixSelection3FromEndNodes:function(e){var t=this.tree.options;function s(e){var n,o,a,r,u,d,l,c,h=e.children;if(h&&h.length){for(d=!0,l=!1,n=0,o=h.length;n<o;n++)r=s(a=h[n]),i.evalOption("unselectableIgnore",a,a,t,!1)||(!1!==r&&(l=!0),!0!==r&&(d=!1));u=!!d||!!l&&void 0}else u=null==(c=i.evalOption("unselectableStatus",e,e,t,void 0))?!!e.selected:!!c;return e.partsel&&!e.selected&&e.lazy&&null==e.children&&(u=void 0),e._changeSelectStatusAttrs(u),u}k(3===t.selectMode,"expected selectMode 3"),s(this),this.visitParents((function(e){var s,n,o,a,r,u=e.children,d=!0,l=!1;for(s=0,n=u.length;s<n;s++)o=u[s],i.evalOption("unselectableIgnore",o,o,t,!1)||(((a=null==(r=i.evalOption("unselectableStatus",o,o,t,void 0))?!!o.selected:!!r)||o.partsel)&&(l=!0),a||(d=!1));a=!!d||!!l&&void 0,e._changeSelectStatusAttrs(a)}))},fromDict:function(t){for(var s in t)_[s]?this[s]=t[s]:"data"===s?e.extend(this.data,t.data):S(t[s])||y[s]||(this.data[s]=t[s]);t.children&&(this.removeChildren(),this.addChildren(t.children)),this.renderTitle()},getChildren:function(){if(void 0!==this.hasChildren())return this.children},getFirstChild:function(){return this.children?this.children[0]:null},getIndex:function(){return e.inArray(this,this.parent.children)},getIndexHier:function(t,s){t=t||".";var i,n=[];return e.each(this.getParentList(!1,!0),(function(e,t){i=""+(t.getIndex()+1),s&&(i=("0000000"+i).substr(-s)),n.push(i)})),n.join(t)},getKeyPath:function(e){var t=this.tree.options.keyPathSeparator;return t+this.getPath(!e,"key",t)},getLastChild:function(){return this.children?this.children[this.children.length-1]:null},getLevel:function(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e},getNextSibling:function(){if(this.parent){var e,t,s=this.parent.children;for(e=0,t=s.length-1;e<t;e++)if(s[e]===this)return s[e+1]}return null},getParent:function(){return this.parent},getParentList:function(e,t){for(var s=[],i=t?this:this.parent;i;)(e||i.parent)&&s.unshift(i),i=i.parent;return s},getPath:function(e,t,s){e=!1!==e,s=s||"/";var i,n=[],o=S(t=t||"title");return this.visitParents((function(e){e.parent&&(i=o?t(e):e[t],n.unshift(i))}),e),n.join(s)},getPrevSibling:function(){if(this.parent){var e,t,s=this.parent.children;for(e=1,t=s.length;e<t;e++)if(s[e]===this)return s[e-1]}return null},getSelectedNodes:function(e){var t=[];return this.visit((function(s){if(s.selected&&(t.push(s),!0===e))return"skip"})),t},hasChildren:function(){if(this.lazy){if(null==this.children)return;if(0===this.children.length)return!1;if(1===this.children.length&&this.children[0].isStatusNode())return;return!0}return!(!this.children||!this.children.length)},hasClass:function(e){return(" "+(this.extraClasses||"")+" ").indexOf(" "+e+" ")>=0},hasFocus:function(){return this.tree.hasFocus()&&this.tree.focusNode===this},info:function(e){this.tree.options.debugLevel>=3&&(Array.prototype.unshift.call(arguments,this.toString()),N("info",arguments))},isActive:function(){return this.tree.activeNode===this},isBelowOf:function(e){return this.getIndexHier(".",5)>e.getIndexHier(".",5)},isChildOf:function(e){return this.parent&&this.parent===e},isDescendantOf:function(t){if(!t||t.tree!==this.tree)return!1;for(var s=this.parent;s;){if(s===t)return!0;s===s.parent&&e.error("Recursive parent link: "+s),s=s.parent}return!1},isExpanded:function(){return!!this.expanded},isFirstSibling:function(){var e=this.parent;return!e||e.children[0]===this},isFolder:function(){return!!this.folder},isLastSibling:function(){var e=this.parent;return!e||e.children[e.children.length-1]===this},isLazy:function(){return!!this.lazy},isLoaded:function(){return!this.lazy||void 0!==this.hasChildren()},isLoading:function(){return!!this._isLoading},isRoot:function(){return this.isRootNode()},isPartsel:function(){return!this.selected&&!!this.partsel},isPartload:function(){return!!this.partload},isRootNode:function(){return this.tree.rootNode===this},isSelected:function(){return!!this.selected},isStatusNode:function(){return!!this.statusNodeType},isPagingNode:function(){return"paging"===this.statusNodeType},isTopLevel:function(){return this.tree.rootNode===this.parent},isUndefined:function(){return void 0===this.hasChildren()},isVisible:function(){var e,t,s=this.tree.enableFilter,i=this.getParentList(!1,!1);if(s&&!this.match&&!this.subMatchCount)return!1;for(e=0,t=i.length;e<t;e++)if(!i[e].expanded)return!1;return!0},lazyLoad:function(t){e.error("FancytreeNode.lazyLoad() is deprecated since 2014-02-16. Use .load() instead.")},load:function(e){var t,s,i=this,n=this.isExpanded();return k(this.isLazy(),"load() requires a lazy node"),e||this.isUndefined()?(this.isLoaded()&&this.resetLazy(),!1===(s=this.tree._triggerNodeEvent("lazyLoad",this))?L(this):(k("boolean"!=typeof s,"lazyLoad event must return source in data.result"),t=this.tree._callHook("nodeLoadChildren",this,s),n?(this.expanded=!0,t.always((function(){i.render()}))):t.always((function(){i.renderStatus()})),t)):L(this)},makeVisible:function(t){var s,i=this,n=[],o=new e.Deferred,a=this.getParentList(!1,!1),r=a.length,u=!(t&&!0===t.noAnimation),d=!(t&&!1===t.scrollIntoView);for(s=r-1;s>=0;s--)n.push(a[s].setExpanded(!0,t));return e.when.apply(e,n).done((function(){d?i.scrollIntoView(u).done((function(){o.resolve()})):o.resolve()})),o.promise()},moveTo:function(t,s,i){void 0===s||"over"===s?s="child":"firstChild"===s&&(t.children&&t.children.length?(s="before",t=t.children[0]):s="child");var n,o=this.tree,a=this.parent,r="child"===s?t:t.parent;if(this!==t){if(this.parent?r.isDescendantOf(this)&&e.error("Cannot move a node to its own descendant"):e.error("Cannot move system root"),r!==a&&a.triggerModifyChild("remove",this),1===this.parent.children.length){if(this.parent===r)return;this.parent.children=this.parent.lazy?[]:null,this.parent.expanded=!1}else k((n=e.inArray(this,this.parent.children))>=0,"invalid source parent"),this.parent.children.splice(n,1);if(this.parent=r,r.hasChildren())switch(s){case"child":r.children.push(this);break;case"before":k((n=e.inArray(t,r.children))>=0,"invalid target parent"),r.children.splice(n,0,this);break;case"after":k((n=e.inArray(t,r.children))>=0,"invalid target parent"),r.children.splice(n+1,0,this);break;default:e.error("Invalid mode "+s)}else r.children=[this];i&&t.visit(i,!0),r===a?r.triggerModifyChild("move",this):r.triggerModifyChild("add",this),o!==t.tree&&(this.warn("Cross-tree moveTo is experimental!"),this.visit((function(e){e.tree=t.tree}),!0)),o._callHook("treeStructureChanged",o,"moveTo"),a.isDescendantOf(r)||a.render(),r.isDescendantOf(a)||r===a||r.render()}},navigate:function(t,s){var i,n=e.ui.keyCode;switch(t){case"left":case n.LEFT:if(this.expanded)return this.setExpanded(!1);break;case"right":case n.RIGHT:if(!this.expanded&&(this.children||this.lazy))return this.setExpanded()}if(i=this.findRelatedNode(t)){try{i.makeVisible({scrollIntoView:!1})}catch(e){}return!1===s?(i.setFocus(),L()):i.setActive()}return this.warn("Could not find related node '"+t+"'."),L()},remove:function(){return this.parent.removeChild(this)},removeChild:function(e){return this.tree._callHook("nodeRemoveChild",this,e)},removeChildren:function(){return this.tree._callHook("nodeRemoveChildren",this)},removeClass:function(e){return this.toggleClass(e,!1)},render:function(e,t){return this.tree._callHook("nodeRender",this,e,t)},renderTitle:function(){return this.tree._callHook("nodeRenderTitle",this)},renderStatus:function(){return this.tree._callHook("nodeRenderStatus",this)},replaceWith:function(s){var i,n=this.parent,o=e.inArray(this,n.children),a=this;return k(this.isPagingNode(),"replaceWith() currently requires a paging status node"),(i=this.tree._callHook("nodeLoadChildren",this,s)).done((function(e){var s=a.children;for(t=0;t<s.length;t++)s[t].parent=n;n.children.splice.apply(n.children,[o+1,0].concat(s)),a.children=null,a.remove(),n.render()})).fail((function(){a.setExpanded()})),i},resetLazy:function(){this.removeChildren(),this.expanded=!1,this.lazy=!0,this.children=void 0,this.renderStatus()},scheduleAction:function(t,s){this.tree.timer&&(clearTimeout(this.tree.timer),this.tree.debug("clearTimeout(%o)",this.tree.timer)),this.tree.timer=null;var i=this;switch(t){case"cancel":break;case"expand":this.tree.timer=setTimeout((function(){i.tree.debug("setTimeout: trigger expand"),i.setExpanded(!0)}),s);break;case"activate":this.tree.timer=setTimeout((function(){i.tree.debug("setTimeout: trigger activate"),i.setActive(!0)}),s);break;default:e.error("Invalid mode "+t)}},scrollIntoView:function(t,s){if(void 0!==s&&E(s))throw Error("scrollIntoView() with 'topNode' option is deprecated since 2014-05-08. Use 'options.topNode' instead.");var i=e.extend({effects:!0===t?{duration:200,queue:!1}:t,scrollOfs:this.tree.options.scrollOfs,scrollParent:this.tree.options.scrollParent,topNode:null},s),n=i.scrollParent,o=this.tree.$container,a=o.css("overflow-y");n?n.jquery||(n=e(n)):n=this.tree.tbody?o.scrollParent():"scroll"===a||"auto"===a?o:o.scrollParent(),n[0]!==document&&n[0]!==document.body||(this.debug("scrollIntoView(): normalizing scrollParent to 'window':",n[0]),n=e(window));var r,u,d,l=new e.Deferred,c=this,h=e(this.span).height(),p=i.scrollOfs.top||0,m=i.scrollOfs.bottom||0,f=n.height(),g=n.scrollTop(),v=n,_=n[0]===window,w=i.topNode||null,y=null;return this.isRootNode()||!this.isVisible()?(this.info("scrollIntoView(): node is invisible."),L()):(_?(u=e(this.span).offset().top,r=w&&w.span?e(w.span).offset().top:0,v=e("html,body")):(k(n[0]!==document&&n[0]!==document.body,"scrollParent should be a simple element or `window`, not document or body."),d=n.offset().top,u=e(this.span).offset().top-d+g,r=w?e(w.span).offset().top-d+g:0,f-=Math.max(0,n.innerHeight()-n[0].clientHeight)),u<g+p?y=u-p:u+h>g+f-m&&(y=u+h-f+m,w&&(k(w.isRootNode()||w.isVisible(),"topNode must be visible"),r<y&&(y=r-p))),null===y?l.resolveWith(this):i.effects?(i.effects.complete=function(){l.resolveWith(c)},v.stop(!0).animate({scrollTop:y},i.effects)):(v[0].scrollTop=y,l.resolveWith(this)),l.promise())},setActive:function(e,t){return this.tree._callHook("nodeSetActive",this,e,t)},setExpanded:function(e,t){return this.tree._callHook("nodeSetExpanded",this,e,t)},setFocus:function(e){return this.tree._callHook("nodeSetFocus",this,e)},setSelected:function(e,t){return this.tree._callHook("nodeSetSelected",this,e,t)},setStatus:function(e,t,s){return this.tree._callHook("nodeSetStatus",this,e,t,s)},setTitle:function(e){this.title=e,this.renderTitle(),this.triggerModify("rename")},sortChildren:function(e,t){var s,i,n=this.children;if(n){if(e=e||function(e,t){var s=e.title.toLowerCase(),i=t.title.toLowerCase();return s===i?0:s>i?1:-1},n.sort(e),t)for(s=0,i=n.length;s<i;s++)n[s].children&&n[s].sortChildren(e,"$norender$");"$norender$"!==t&&this.render(),this.triggerModifyChild("sort")}},toDict:function(t,s){var i,n,o,a,r={},u=this;if(e.each(v,(function(e,t){(u[t]||!1===u[t])&&(r[t]=u[t])})),e.isEmptyObject(this.data)||(r.data=e.extend({},this.data),e.isEmptyObject(r.data)&&delete r.data),s){if(!1===(a=s(r,u)))return!1;"skip"===a&&(t=!1)}if(t&&b(this.children))for(r.children=[],i=0,n=this.children.length;i<n;i++)(o=this.children[i]).isStatusNode()||!1!==(a=o.toDict(!0,s))&&r.children.push(a);return r},toggleClass:function(t,s){var i,n,o=/\S+/g,a=t.match(o)||[],r=0,u=!1,d=this[this.tree.statusClassPropName],l=" "+(this.extraClasses||"")+" ";for(d&&e(d).toggleClass(t,s);i=a[r++];)if(n=l.indexOf(" "+i+" ")>=0,s=void 0===s?!n:!!s)n||(l+=i+" ",u=!0);else for(;l.indexOf(" "+i+" ")>-1;)l=l.replace(" "+i+" "," ");return this.extraClasses=C(l),u},toggleExpanded:function(){return this.tree._callHook("nodeToggleExpanded",this)},toggleSelected:function(){return this.tree._callHook("nodeToggleSelected",this)},toString:function(){return"FancytreeNode@"+this.key+"[title='"+this.title+"']"},triggerModifyChild:function(t,s,i){var n,o=this.tree.options.modifyChild;o&&(s&&s.parent!==this&&e.error("childNode "+s+" is not a child of "+this),n={node:this,tree:this.tree,operation:t,childNode:s||null},i&&e.extend(n,i),o({type:"modifyChild"},n))},triggerModify:function(e,t){this.parent.triggerModifyChild(e,this,t)},visit:function(e,t){var s,i,n=!0,o=this.children;if(!0===t&&(!1===(n=e(this))||"skip"===n))return n;if(o)for(s=0,i=o.length;s<i&&!1!==(n=o[s].visit(e,!0));s++);return n},visitAndLoad:function(t,s,i){var n,o,a,r=this;return!t||!0!==s||!1!==(o=t(r))&&"skip"!==o?r.children||r.lazy?(n=new e.Deferred,a=[],r.load().done((function(){for(var s=0,i=r.children.length;s<i;s++){if(!1===(o=r.children[s].visitAndLoad(t,!0,!0))){n.reject();break}"skip"!==o&&a.push(o)}e.when.apply(this,a).then((function(){n.resolve()}))})),n.promise()):L():i?o:L()},visitParents:function(e,t){if(t&&!1===e(this))return!1;for(var s=this.parent;s;){if(!1===e(s))return!1;s=s.parent}return!0},visitSiblings:function(e,t){var s,i,n,o=this.parent.children;for(s=0,i=o.length;s<i;s++)if(n=o[s],(t||n!==this)&&!1===e(n))return!1;return!0},warn:function(e){this.tree.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),N("warn",arguments))}},B.prototype={_makeHookContext:function(t,s,i){var n,o;return void 0!==t.node?(s&&t.originalEvent!==s&&e.error("invalid args"),n=t):t.tree?n={node:t,tree:o=t.tree,widget:o.widget,options:o.widget.options,originalEvent:s,typeInfo:o.types[t.type]||{}}:t.widget?n={node:null,tree:t,widget:t.widget,options:t.widget.options,originalEvent:s}:e.error("invalid args"),i&&e.extend(n,i),n},_callHook:function(t,s,i){var n=this._makeHookContext(s),o=this[t],a=Array.prototype.slice.call(arguments,2);return S(o)||e.error("_callHook('"+t+"') is not a function"),a.unshift(n),o.apply(this,a)},_setExpiringValue:function(e,t,s){this._tempCache[e]={value:t,expire:Date.now()+(+s||50)}},_getExpiringValue:function(e){var t=this._tempCache[e];return t&&t.expire>Date.now()?t.value:(delete this._tempCache[e],null)},_usesExtension:function(t){return e.inArray(t,this.options.extensions)>=0},_requireExtension:function(t,s,i,n){null!=i&&(i=!!i);var o=this._local.name,a=this.options.extensions,r=e.inArray(t,a)<e.inArray(o,a),u=s&&null==this.ext[t],d=!u&&null!=i&&i!==r;return k(o&&o!==t,"invalid or same name '"+o+"' (require yourself?)"),!u&&!d||(n||(u||s?(n="'"+o+"' extension requires '"+t+"'",d&&(n+=" to be registered "+(i?"before":"after")+" itself")):n="If used together, `"+t+"` must be registered "+(i?"before":"after")+" `"+o+"`"),e.error(n),!1)},activateKey:function(e,t){var s=this.getNodeByKey(e);return s?s.setActive(!0,t):this.activeNode&&this.activeNode.setActive(!1,t),s},addPagingNode:function(e,t){return this.rootNode.addPagingNode(e,t)},applyCommand:function(t,s,i){var n;switch(s=s||this.getActiveNode(),t){case"moveUp":(n=s.getPrevSibling())&&(s.moveTo(n,"before"),s.setActive());break;case"moveDown":(n=s.getNextSibling())&&(s.moveTo(n,"after"),s.setActive());break;case"indent":(n=s.getPrevSibling())&&(s.moveTo(n,"child"),n.setExpanded(),s.setActive());break;case"outdent":s.isTopLevel()||(s.moveTo(s.getParent(),"after"),s.setActive());break;case"remove":n=s.getPrevSibling()||s.getParent(),s.remove(),n&&n.setActive();break;case"addChild":s.editCreateNode("child","");break;case"addSibling":s.editCreateNode("after","");break;case"rename":s.editStart();break;case"down":case"first":case"last":case"left":case"parent":case"right":case"up":return s.navigate(t);default:e.error("Unhandled command: '"+t+"'")}},applyPatch:function(t){var s,i,n,o,a,r,u=t.length,d=[];for(i=0;i<u;i++)k(2===(n=t[i]).length,"patchList must be an array of length-2-arrays"),o=n[0],a=n[1],(r=null===o?this.rootNode:this.getNodeByKey(o))?(s=new e.Deferred,d.push(s),r.applyPatch(a).always(D(s,r))):this.warn("could not find node with key '"+o+"'");return e.when.apply(e,d).promise()},clear:function(e){this._callHook("treeClear",this)},count:function(){return this.rootNode.countChildren()},debug:function(e){this.options.debugLevel>=4&&(Array.prototype.unshift.call(arguments,this.toString()),N("log",arguments))},destroy:function(){this.widget.destroy()},enable:function(e){!1===e?this.widget.disable():this.widget.enable()},enableUpdate:function(e){return e=!1!==e,!!this._enableUpdate==!!e?e:(this._enableUpdate=e,e?(this.debug("enableUpdate(true): redraw "),this._callHook("treeStructureChanged",this,"enableUpdate"),this.render()):this.debug("enableUpdate(false)..."),!e)},error:function(e){this.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),N("error",arguments))},expandAll:function(e,t){var s=this.enableUpdate(!1);e=!1!==e,this.visit((function(s){!1!==s.hasChildren()&&s.isExpanded()!==e&&s.setExpanded(e,t)})),this.enableUpdate(s)},findAll:function(e){return this.rootNode.findAll(e)},findFirst:function(e){return this.rootNode.findFirst(e)},findNextNode:function(e,t){var s=null,i=this.getFirstChild();function n(i){if(e(i)&&(s=i),s||i===t)return!1}return e="string"==typeof e?O(e):e,t=t||i,this.visitRows(n,{start:t,includeSelf:!1}),s||t===i||this.visitRows(n,{start:i,includeSelf:!0}),s},findRelatedNode:function(t,s,i){var n=null,o=e.ui.keyCode;switch(s){case"parent":case o.BACKSPACE:t.parent&&t.parent.parent&&(n=t.parent);break;case"first":case o.HOME:this.visit((function(e){if(e.isVisible())return n=e,!1}));break;case"last":case o.END:this.visit((function(e){e.isVisible()&&(n=e)}));break;case"left":case o.LEFT:t.expanded?t.setExpanded(!1):t.parent&&t.parent.parent&&(n=t.parent);break;case"right":case o.RIGHT:t.expanded||!t.children&&!t.lazy?t.children&&t.children.length&&(n=t.children[0]):(t.setExpanded(),n=t);break;case"up":case o.UP:this.visitRows((function(e){return n=e,!1}),{start:t,reverse:!0,includeSelf:!1});break;case"down":case o.DOWN:this.visitRows((function(e){return n=e,!1}),{start:t,includeSelf:!1});break;default:this.tree.warn("Unknown relation '"+s+"'.")}return n},generateFormElements:function(t,s,i){i=i||{};var n,o="string"==typeof t?t:"ft_"+this._id+"[]",a="string"==typeof s?s:"ft_"+this._id+"_active",r="fancytree_result_"+this._id,u=e("#"+r),d=3===this.options.selectMode&&!1!==i.stopOnParents;function l(t){u.append(e("<input>",{type:"checkbox",name:o,value:t.key,checked:!0}))}u.length?u.empty():u=e("<div>",{id:r}).hide().insertAfter(this.$container),!1!==s&&this.activeNode&&u.append(e("<input>",{type:"radio",name:a,value:this.activeNode.key,checked:!0})),i.filter?this.visit((function(e){var t=i.filter(e);if("skip"===t)return t;!1!==t&&l(e)})):!1!==t&&(n=this.getSelectedNodes(d),e.each(n,(function(e,t){l(t)})))},getActiveNode:function(){return this.activeNode},getFirstChild:function(){return this.rootNode.getFirstChild()},getFocusNode:function(){return this.focusNode},getOption:function(e){return this.widget.option(e)},getNodeByKey:function(e,t){var s,i;return!t&&(s=document.getElementById(this.options.idPrefix+e))?s.ftnode?s.ftnode:null:(t=t||this.rootNode,i=null,e=""+e,t.visit((function(t){if(t.key===e)return i=t,!1}),!0),i)},getRootNode:function(){return this.rootNode},getSelectedNodes:function(e){return this.rootNode.getSelectedNodes(e)},hasFocus:function(){return!!this._hasFocus},info:function(e){this.options.debugLevel>=3&&(Array.prototype.unshift.call(arguments,this.toString()),N("info",arguments))},isLoading:function(){var e=!1;return this.rootNode.visit((function(t){if(t._isLoading||t._requestId)return e=!0,!1}),!0),e},loadKeyPath:function(t,s){var i,n,o,a=this,r=new e.Deferred,u=this.getRootNode(),d=this.options.keyPathSeparator,l=[],c=e.extend({},s);for("function"==typeof s?i=s:s&&s.callback&&(i=s.callback),c.callback=function(e,t,s){i&&i.call(e,t,s),r.notifyWith(e,[{node:t,status:s}])},null==c.matchKey&&(c.matchKey=function(e,t){return e.key===t}),b(t)||(t=[t]),n=0;n<t.length;n++)(o=t[n]).charAt(0)===d&&(o=o.substr(1)),l.push(o.split(d));return setTimeout((function(){a._loadKeyPathImpl(r,c,u,l).done((function(){r.resolve()}))}),0),r.promise()},_loadKeyPathImpl:function(t,s,i,n){var o,a,r,u,d,l,c,h,p,m,f=this;function g(e,t){var i,n,o=e.children;if(o)for(i=0,n=o.length;i<n;i++)if(s.matchKey(o[i],t))return o[i];return null}for(c={},a=0;a<n.length;a++)for(p=n[a],h=i;p.length;){if(r=p.shift(),!(u=g(h,r))){this.warn("loadKeyPath: key not found: "+r+" (parent: "+h+")"),s.callback(this,r,"error");break}if(0===p.length){s.callback(this,u,"ok");break}if(u.lazy&&void 0===u.hasChildren()){s.callback(this,u,"loaded"),c[r=u.key]?c[r].pathSegList.push(p):c[r]={parent:u,pathSegList:[p]};break}s.callback(this,u,"loaded"),h=u}function v(e,t,i){s.callback(f,t,"loading"),t.load().done((function(){f._loadKeyPathImpl.call(f,e,s,t,i).always(D(e,f))})).fail((function(i){f.warn("loadKeyPath: error loading lazy "+t),s.callback(f,u,"error"),e.rejectWith(f)}))}for(d in o=[],c)x(c,d)&&(l=c[d],m=new e.Deferred,o.push(m),v(m,l.parent,l.pathSegList));return e.when.apply(e,o).promise()},reactivate:function(e){var t,s=this.activeNode;return s?(this.activeNode=null,t=s.setActive(!0,{noFocus:!0}),e&&s.setFocus(),t):L()},reload:function(e){return this._callHook("treeClear",this),this._callHook("treeLoad",this,e)},render:function(e,t){return this.rootNode.render(e,t)},selectAll:function(e){this.visit((function(t){t.setSelected(e)}))},setFocus:function(e){return this._callHook("treeSetFocus",this,e)},setOption:function(e,t){return this.widget.option(e,t)},debugTime:function(e){this.options.debugLevel>=4&&window.console.time(this+" - "+e)},debugTimeEnd:function(e){this.options.debugLevel>=4&&window.console.timeEnd(this+" - "+e)},toDict:function(e,t){var s=this.rootNode.toDict(!0,t);return e?s:s.children},toString:function(){return"Fancytree@"+this._id},_triggerNodeEvent:function(e,t,s,i){var n=this._makeHookContext(t,s,i),o=this.widget._trigger(e,s,n);return!1!==o&&void 0!==n.result?n.result:o},_triggerTreeEvent:function(e,t,s){var i=this._makeHookContext(this,t,s),n=this.widget._trigger(e,t,i);return!1!==n&&void 0!==i.result?i.result:n},visit:function(e){return this.rootNode.visit(e,!1)},visitRows:function(e,t){if(!this.rootNode.hasChildren())return!1;if(t&&t.reverse)return delete t.reverse,this._visitRowsUp(e,t);var s,i,n,o,a=0,r=!1===(t=t||{}).includeSelf,u=!!t.includeHidden,d=!u&&this.enableFilter,l=t.start||this.rootNode.children[0];for(n=l.parent;n;){for(k((i=(o=n.children).indexOf(l)+a)>=0,"Could not find "+l+" in parent's children: "+n),s=i;s<o.length;s++)if(l=o[s],!d||l.match||l.subMatchCount){if(!r&&!1===e(l))return!1;if(r=!1,l.children&&l.children.length&&(u||l.expanded)&&!1===l.visit((function(t){return!d||t.match||t.subMatchCount?!1!==e(t)&&(u||!t.children||t.expanded?void 0:"skip"):"skip"}),!1))return!1}l=n,n=n.parent,a=1}return!0},_visitRowsUp:function(e,t){for(var s,i,n,o=!!t.includeHidden,a=t.start||this.rootNode.children[0];;){if((s=(n=a.parent).children)[0]===a){if(!(a=n).parent)break;s=n.children}else for(i=s.indexOf(a),a=s[i-1];(o||a.expanded)&&a.children&&a.children.length;)n=a,a=(s=a.children)[s.length-1];if((o||a.isVisible())&&!1===e(a))return!1}},warn:function(e){this.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),N("warn",arguments))}},e.extend(B.prototype,{nodeClick:function(e){var t,s,i=e.targetType,n=e.node;if("expander"===i){if(n.isLoading())return void n.debug("Got 2nd click while loading: ignored");this._callHook("nodeToggleExpanded",e)}else if("checkbox"===i)this._callHook("nodeToggleSelected",e),e.options.focusOnSelect&&this._callHook("nodeSetFocus",e,!0);else{if(s=!1,t=!0,n.folder)switch(e.options.clickFolderMode){case 2:s=!0,t=!1;break;case 3:t=!0,s=!0}t&&(this.nodeSetFocus(e),this._callHook("nodeSetActive",e,!0)),s&&this._callHook("nodeToggleExpanded",e)}},nodeCollapseSiblings:function(e,t){var s,i,n,o=e.node;if(o.parent)for(i=0,n=(s=o.parent.children).length;i<n;i++)s[i]!==o&&s[i].expanded&&this._callHook("nodeSetExpanded",s[i],!1,t)},nodeDblclick:function(e){"title"===e.targetType&&4===e.options.clickFolderMode&&this._callHook("nodeToggleExpanded",e),"title"===e.targetType&&e.originalEvent.preventDefault()},nodeKeydown:function(t){var s,n,o,a=t.originalEvent,r=t.node,u=t.tree,d=t.options,l=a.which,p=a.key||String.fromCharCode(l),m=!!(a.altKey||a.ctrlKey||a.metaKey),f=!h[l]&&!c[l]&&!m,g=e(a.target),v=!0,_=!(a.ctrlKey||!d.autoActivate);if(r||(o=this.getActiveNode()||this.getFirstChild())&&(o.setFocus(),(r=t.node=this.focusNode).debug("Keydown force focus on active node")),d.quicksearch&&f&&!g.is(":input:enabled"))return(n=Date.now())-u.lastQuicksearchTime>500&&(u.lastQuicksearchTerm=""),u.lastQuicksearchTime=n,u.lastQuicksearchTerm+=p,(s=u.findNextNode(u.lastQuicksearchTerm,u.getActiveNode()))&&s.setActive(),void a.preventDefault();switch(i.eventToString(a)){case"+":case"=":u.nodeSetExpanded(t,!0);break;case"-":u.nodeSetExpanded(t,!1);break;case"space":r.isPagingNode()?u._triggerNodeEvent("clickPaging",t,a):i.evalOption("checkbox",r,r,d,!1)?u.nodeToggleSelected(t):u.nodeSetActive(t,!0);break;case"return":u.nodeSetActive(t,!0);break;case"home":case"end":case"backspace":case"left":case"right":case"up":case"down":r.navigate(a.which,_);break;default:v=!1}v&&a.preventDefault()},nodeLoadChildren:function(t,s){var i,n,o,a=null,d=!0,l=t.tree,c=t.node,h=c.parent,p="nodeLoadChildren",m=Date.now();return S(s)&&k(!S(s=s.call(l,{type:"source"},t)),"source callback must not return another function"),S(s.then)?a=s:s.url?(i=e.extend({},t.options.ajax,s)).debugDelay?(n=i.debugDelay,delete i.debugDelay,b(n)&&(n=n[0]+Math.random()*(n[1]-n[0])),c.warn("nodeLoadChildren waiting debugDelay "+Math.round(n)+" ms ..."),a=e.Deferred((function(t){setTimeout((function(){e.ajax(i).done((function(){t.resolveWith(this,arguments)})).fail((function(){t.rejectWith(this,arguments)}))}),n)}))):a=e.ajax(i):e.isPlainObject(s)||b(s)?(a={then:function(e,t){e(s,null,null)}},d=!1):e.error("Invalid source type: "+s),c._requestId&&(c.warn("Recursive load request #"+m+" while #"+c._requestId+" is pending."),c._requestId=m),d&&(l.debugTime(p),l.nodeSetStatus(t,"loading")),o=new e.Deferred,a.then((function(i,n,a){var d,p;if("json"!==s.dataType&&"jsonp"!==s.dataType||"string"!=typeof i||e.error("Ajax request returned a string (did you get the JSON dataType wrong?)."),c._requestId&&c._requestId>m)o.rejectWith(this,[r]);else if(null!==c.parent||null===h){if(t.options.postProcess){try{(p=l._triggerNodeEvent("postProcess",t,t.originalEvent,{response:i,error:null,dataType:s.dataType})).error&&l.warn("postProcess returned error:",p)}catch(e){p={error:e,message:""+e,details:"postProcess failed"}}if(p.error)return d=e.isPlainObject(p.error)?p.error:{message:p.error},d=l._makeHookContext(c,null,d),void o.rejectWith(this,[d]);(b(p)||e.isPlainObject(p)&&b(p.children))&&(i=p)}else i&&x(i,"d")&&t.options.enableAspx&&(42===t.options.enableAspx&&l.warn("The default for enableAspx will change to `false` in the fututure. Pass `enableAspx: true` or implement postProcess to silence this warning."),i="string"==typeof i.d?e.parseJSON(i.d):i.d);o.resolveWith(this,[i])}else o.rejectWith(this,[u])}),(function(e,t,s){var i=l._makeHookContext(c,null,{error:e,args:Array.prototype.slice.call(arguments),message:s,details:e.status+": "+s});o.rejectWith(this,[i])})),o.done((function(s){var i,n,o;l.nodeSetStatus(t,"ok"),e.isPlainObject(s)?(k(c.isRootNode(),"source may only be an object for root nodes (expecting an array of child objects otherwise)"),k(b(s.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),n=s,i=s.children,delete n.children,e.each(g,(function(e,t){void 0!==n[t]&&(l[t]=n[t],delete n[t])})),e.extend(l.data,n)):i=s,k(b(i),"expected array of children"),c._setChildren(i),l.options.nodata&&0===i.length&&(S(l.options.nodata)?o=l.options.nodata.call(l,{type:"nodata"},t):!0===l.options.nodata&&c.isRootNode()?o=l.options.strings.noData:"string"==typeof l.options.nodata&&c.isRootNode()&&(o=l.options.nodata),o&&c.setStatus("nodata",o)),l._triggerNodeEvent("loadChildren",c)})).fail((function(e){var s;e!==r?e!==u?(e.node&&e.error&&e.message?s=e:"[object Object]"===(s=l._makeHookContext(c,null,{error:e,args:Array.prototype.slice.call(arguments),message:e?e.message||e.toString():""})).message&&(s.message=""),c.warn("Load children failed ("+s.message+")",s),!1!==l._triggerNodeEvent("loadError",s,null)&&l.nodeSetStatus(t,"error",s.message,s.details)):c.warn("Lazy parent node was removed while loading: discarding response."):c.warn("Ignored response for obsolete load request #"+m+" (expected #"+c._requestId+")")})).always((function(){c._requestId=null,d&&l.debugTimeEnd(p)})),o.promise()},nodeLoadKeyPath:function(e,t){},nodeRemoveChild:function(t,s){var i,n=t.node,o=e.extend({},t,{node:s}),a=n.children;if(1===a.length)return k(s===a[0],"invalid single child"),this.nodeRemoveChildren(t);this.activeNode&&(s===this.activeNode||this.activeNode.isDescendantOf(s))&&this.activeNode.setActive(!1),this.focusNode&&(s===this.focusNode||this.focusNode.isDescendantOf(s))&&(this.focusNode=null),this.nodeRemoveMarkup(o),this.nodeRemoveChildren(o),k((i=e.inArray(s,a))>=0,"invalid child"),n.triggerModifyChild("remove",s),s.visit((function(e){e.parent=null}),!0),this._callHook("treeRegisterNode",this,!1,s),a.splice(i,1)},nodeRemoveChildMarkup:function(t){var s=t.node;s.ul&&(s.isRootNode()?e(s.ul).empty():(e(s.ul).remove(),s.ul=null),s.visit((function(e){e.li=e.ul=null})))},nodeRemoveChildren:function(e){var t=e.tree,s=e.node;s.children&&(this.activeNode&&this.activeNode.isDescendantOf(s)&&this.activeNode.setActive(!1),this.focusNode&&this.focusNode.isDescendantOf(s)&&(this.focusNode=null),this.nodeRemoveChildMarkup(e),s.triggerModifyChild("remove",null),s.visit((function(e){e.parent=null,t._callHook("treeRegisterNode",t,!1,e)})),s.lazy?s.children=[]:s.children=null,s.isRootNode()||(s.expanded=!1),this.nodeRenderStatus(e))},nodeRemoveMarkup:function(t){var s=t.node;s.li&&(e(s.li).remove(),s.li=null),this.nodeRemoveChildMarkup(t)},nodeRender:function(t,s,i,n,o){var a,r,u,d,l,c,h,p=t.node,m=t.tree,f=t.options,g=f.aria,v=!1,_=p.parent,w=!_,y=p.children,b=null;if(!1!==m._enableUpdate&&(w||_.ul)){if(k(w||_.ul,"parent UL must exist"),w||(p.li&&(s||p.li.parentNode!==p.parent.ul)&&(p.li.parentNode===p.parent.ul?b=p.li.nextSibling:this.debug("Unlinking "+p+" (must be child of "+p.parent+")"),this.nodeRemoveMarkup(t)),p.li?this.nodeRenderStatus(t):(v=!0,p.li=document.createElement("li"),p.li.ftnode=p,p.key&&f.generateIds&&(p.li.id=f.idPrefix+p.key),p.span=document.createElement("span"),p.span.className="fancytree-node",g&&!p.tr&&e(p.li).attr("role","treeitem"),p.li.appendChild(p.span),this.nodeRenderTitle(t),f.createNode&&f.createNode.call(m,{type:"createNode"},t)),f.renderNode&&f.renderNode.call(m,{type:"renderNode"},t)),y){if(w||p.expanded||!0===i){for(p.ul||(p.ul=document.createElement("ul"),(!0!==n||o)&&p.expanded||(p.ul.style.display="none"),g&&e(p.ul).attr("role","group"),p.li?p.li.appendChild(p.ul):p.tree.$div.append(p.ul)),d=0,l=y.length;d<l;d++)h=e.extend({},t,{node:y[d]}),this.nodeRender(h,s,i,!1,!0);for(a=p.ul.firstChild;a;)(u=a.ftnode)&&u.parent!==p?(p.debug("_fixParent: remove missing "+u,a),c=a.nextSibling,a.parentNode.removeChild(a),a=c):a=a.nextSibling;for(a=p.ul.firstChild,d=0,l=y.length-1;d<l;d++)(r=y[d])===(u=a.ftnode)?a=a.nextSibling:p.ul.insertBefore(r.li,u.li)}}else p.ul&&(this.warn("remove child markup for "+p),this.nodeRemoveChildMarkup(t));w||v&&_.ul.insertBefore(p.li,b)}},nodeRenderTitle:function(t,s){var o,a,r,u,d,l,c,h=t.node,p=t.tree,m=t.options,f=m.aria,g=h.getLevel(),v=[];void 0!==s&&(h.title=s),h.span&&!1!==p._enableUpdate&&(d=f&&!1!==h.hasChildren()?" role='button'":"",g<m.minExpandLevel?(h.lazy||(h.expanded=!0),g>1&&v.push("<span "+d+" class='fancytree-expander fancytree-expander-fixed'></span>")):v.push("<span "+d+" class='fancytree-expander'></span>"),(o=i.evalOption("checkbox",h,h,m,!1))&&!h.isStatusNode()&&(d=f?" role='checkbox'":"",a="fancytree-checkbox",("radio"===o||h.parent&&h.parent.radiogroup)&&(a+=" fancytree-radio"),v.push("<span "+d+" class='"+a+"'></span>")),void 0!==h.data.iconClass&&(h.icon?e.error("'iconClass' node option is deprecated since v2.14.0: use 'icon' only instead"):(h.warn("'iconClass' node option is deprecated since v2.14.0: use 'icon' instead"),h.icon=h.data.iconClass)),!1!==(r=i.evalOption("icon",h,h,m,!0))&&(d=f?" role='presentation'":"",c=(c=i.evalOption("iconTooltip",h,h,m,null))?" title='"+W(c)+"'":"","string"==typeof r?n.test(r)?(r="/"===r.charAt(0)?r:(m.imagePath||"")+r,v.push("<img src='"+r+"' class='fancytree-icon'"+c+" alt='' />")):v.push("<span "+d+" class='fancytree-custom-icon "+r+"'"+c+"></span>"):r.text?v.push("<span "+d+" class='fancytree-custom-icon "+(r.addClass||"")+"'"+c+">"+i.escapeHtml(r.text)+"</span>"):r.html?v.push("<span "+d+" class='fancytree-custom-icon "+(r.addClass||"")+"'"+c+">"+r.html+"</span>"):v.push("<span "+d+" class='fancytree-icon'"+c+"></span>")),u="",m.renderTitle&&(u=m.renderTitle.call(p,{type:"renderTitle"},t)||""),u||(!0===(l=i.evalOption("tooltip",h,h,m,null))&&(l=h.title),u="<span class='fancytree-title'"+(l=l?" title='"+W(l)+"'":"")+(m.titlesTabbable?" tabindex='0'":"")+">"+(m.escapeTitles?i.escapeHtml(h.title):h.title)+"</span>"),v.push(u),h.span.innerHTML=v.join(""),this.nodeRenderStatus(t),m.enhanceTitle&&(t.$title=e(">span.fancytree-title",h.span),u=m.enhanceTitle.call(p,{type:"enhanceTitle"},t)||""))},nodeRenderStatus:function(t){var s,n=t.node,o=t.tree,a=t.options,r=n.hasChildren(),u=n.isLastSibling(),d=a.aria,l=a._classNames,c=[],h=n[o.statusClassPropName];h&&!1!==o._enableUpdate&&(d&&(s=e(n.tr||n.li)),c.push(l.node),o.activeNode===n&&c.push(l.active),o.focusNode===n&&c.push(l.focused),n.expanded&&c.push(l.expanded),d&&(!1===r?s.removeAttr("aria-expanded"):s.attr("aria-expanded",Boolean(n.expanded))),n.folder&&c.push(l.folder),!1!==r&&c.push(l.hasChildren),u&&c.push(l.lastsib),n.lazy&&null==n.children&&c.push(l.lazy),n.partload&&c.push(l.partload),n.partsel&&c.push(l.partsel),i.evalOption("unselectable",n,n,a,!1)&&c.push(l.unselectable),n._isLoading&&c.push(l.loading),n._error&&c.push(l.error),n.statusNodeType&&c.push(l.statusNodePrefix+n.statusNodeType),n.selected?(c.push(l.selected),d&&s.attr("aria-selected",!0)):d&&s.attr("aria-selected",!1),n.extraClasses&&c.push(n.extraClasses),!1===r?c.push(l.combinedExpanderPrefix+"n"+(u?"l":"")):c.push(l.combinedExpanderPrefix+(n.expanded?"e":"c")+(n.lazy&&null==n.children?"d":"")+(u?"l":"")),c.push(l.combinedIconPrefix+(n.expanded?"e":"c")+(n.folder?"f":"")),h.className=c.join(" "),n.li&&e(n.li).toggleClass(l.lastsib,u))},nodeSetActive:function(t,s,i){i=i||{};var n,o=t.node,a=t.tree,r=t.options,u=!0===i.noEvents,d=!0===i.noFocus,l=!1!==i.scrollIntoView;return o===a.activeNode==(s=!1!==s)?L(o):(l&&t.originalEvent&&e(t.originalEvent.target).is("a,:checkbox")&&(o.info("Not scrolling while clicking an embedded link."),l=!1),s&&!u&&!1===this._triggerNodeEvent("beforeActivate",o,t.originalEvent)?P(o,["rejected"]):(s?(a.activeNode&&(k(a.activeNode!==o,"node was active (inconsistency)"),n=e.extend({},t,{node:a.activeNode}),a.nodeSetActive(n,!1),k(null===a.activeNode,"deactivate was out of sync?")),r.activeVisible&&o.makeVisible({scrollIntoView:l}),a.activeNode=o,a.nodeRenderStatus(t),d||a.nodeSetFocus(t),u||a._triggerNodeEvent("activate",o,t.originalEvent)):(k(a.activeNode===o,"node was not active (inconsistency)"),a.activeNode=null,this.nodeRenderStatus(t),u||t.tree._triggerNodeEvent("deactivate",o,t.originalEvent)),L(o)))},nodeSetExpanded:function(t,s,i){i=i||{};var n,o,a,r,u,d,l=t.node,c=t.tree,h=t.options,p=!0===i.noAnimation,m=!0===i.noEvents;if(s=!1!==s,e(l.li).hasClass(h._classNames.animating))return l.warn("setExpanded("+s+") while animating: ignored."),P(l,["recursion"]);if(l.expanded&&s||!l.expanded&&!s)return L(l);if(s&&!l.lazy&&!l.hasChildren())return L(l);if(!s&&l.getLevel()<h.minExpandLevel)return P(l,["locked"]);if(!m&&!1===this._triggerNodeEvent("beforeExpand",l,t.originalEvent))return P(l,["rejected"]);if(p||l.isVisible()||(p=i.noAnimation=!0),o=new e.Deferred,s&&!l.expanded&&h.autoCollapse){u=l.getParentList(!1,!0),d=h.autoCollapse;try{for(h.autoCollapse=!1,a=0,r=u.length;a<r;a++)this._callHook("nodeCollapseSiblings",u[a],i)}finally{h.autoCollapse=d}}return o.done((function(){var e=l.getLastChild();s&&h.autoScroll&&!p&&e&&c._enableUpdate?e.scrollIntoView(!0,{topNode:l}).always((function(){m||t.tree._triggerNodeEvent(s?"expand":"collapse",t)})):m||t.tree._triggerNodeEvent(s?"expand":"collapse",t)})),n=function(i){var n=h._classNames,o=h.toggleEffect;if(l.expanded=s,c._callHook("treeStructureChanged",t,s?"expand":"collapse"),c._callHook("nodeRender",t,!1,!1,!0),l.ul)if("none"!==l.ul.style.display==!!l.expanded)l.warn("nodeSetExpanded: UL.style.display already set");else{if(o&&!p)return e(l.li).addClass(n.animating),void(S(e(l.ul)[o.effect])?e(l.ul)[o.effect]({duration:o.duration,always:function(){e(this).removeClass(n.animating),e(l.li).removeClass(n.animating),i()}}):(e(l.ul).stop(!0,!0),e(l.ul).parent().find(".ui-effects-placeholder").remove(),e(l.ul).toggle(o.effect,o.options,o.duration,(function(){e(this).removeClass(n.animating),e(l.li).removeClass(n.animating),i()}))));l.ul.style.display=l.expanded||!parent?"":"none"}i()},s&&l.lazy&&void 0===l.hasChildren()?l.load().done((function(){o.notifyWith&&o.notifyWith(l,["loaded"]),n((function(){o.resolveWith(l)}))})).fail((function(e){n((function(){o.rejectWith(l,["load failed ("+e+")"])}))})):n((function(){o.resolveWith(l)})),o.promise()},nodeSetFocus:function(t,s){var i,n=t.tree,o=t.node,a=n.options,r=!!t.originalEvent&&e(t.originalEvent.target).is(":input");if(s=!1!==s,n.focusNode){if(n.focusNode===o&&s)return;i=e.extend({},t,{node:n.focusNode}),n.focusNode=null,this._triggerNodeEvent("blur",i),this._callHook("nodeRenderStatus",i)}s&&(this.hasFocus()||(o.debug("nodeSetFocus: forcing container focus"),this._callHook("treeSetFocus",t,!0,{calledByNode:!0})),o.makeVisible({scrollIntoView:!1}),n.focusNode=o,a.titlesTabbable&&(r||e(o.span).find(".fancytree-title").focus()),a.aria&&e(n.$container).attr("aria-activedescendant",e(o.tr||o.li).uniqueId().attr("id")),this._triggerNodeEvent("focus",t),document.activeElement===n.$container.get(0)||e(document.activeElement,n.$container).length>=1||e(n.$container).focus(),a.autoScroll&&o.scrollIntoView(),this._callHook("nodeRenderStatus",t))},nodeSetSelected:function(e,t,s){s=s||{};var n=e.node,o=e.tree,a=e.options,r=!0===s.noEvents,u=n.parent;if(t=!1!==t,!i.evalOption("unselectable",n,n,a,!1)){if(n._lastSelectIntent=t,!!n.selected===t&&(3!==a.selectMode||!n.partsel||t))return t;if(!r&&!1===this._triggerNodeEvent("beforeSelect",n,e.originalEvent))return!!n.selected;t&&1===a.selectMode?(o.lastSelectedNode&&o.lastSelectedNode.setSelected(!1),n.selected=t):3!==a.selectMode||!u||u.radiogroup||n.radiogroup?u&&u.radiogroup?n.visitSiblings((function(e){e._changeSelectStatusAttrs(t&&e===n)}),!0):n.selected=t:(n.selected=t,n.fixSelection3AfterClick(s)),this.nodeRenderStatus(e),o.lastSelectedNode=t?n:null,r||o._triggerNodeEvent("select",e)}},nodeSetStatus:function(t,s,i,n){var o=t.node,a=t.tree;function r(){var e=o.children?o.children[0]:null;if(e&&e.isStatusNode()){try{o.ul&&(o.ul.removeChild(e.li),e.li=null)}catch(e){}1===o.children.length?o.children=[]:o.children.shift(),a._callHook("treeStructureChanged",t,"clearStatusNode")}}function u(s,i){var n=o.children?o.children[0]:null;return n&&n.isStatusNode()?(e.extend(n,s),n.statusNodeType=i,a._callHook("nodeRenderTitle",n)):(o._setChildren([s]),a._callHook("treeStructureChanged",t,"setStatusNode"),o.children[0].statusNodeType=i,a.render()),o.children[0]}switch(s){case"ok":r(),o._isLoading=!1,o._error=null,o.renderStatus();break;case"loading":o.parent||u({title:a.options.strings.loading+(i?" ("+i+")":""),checkbox:!1,tooltip:n},s),o._isLoading=!0,o._error=null,o.renderStatus();break;case"error":u({title:a.options.strings.loadError+(i?" ("+i+")":""),checkbox:!1,tooltip:n},s),o._isLoading=!1,o._error={message:i,details:n},o.renderStatus();break;case"nodata":u({title:i||a.options.strings.noData,checkbox:!1,tooltip:n},s),o._isLoading=!1,o._error=null,o.renderStatus();break;default:e.error("invalid node status "+s)}},nodeToggleExpanded:function(e){return this.nodeSetExpanded(e,!e.node.expanded)},nodeToggleSelected:function(e){var t=e.node,s=!t.selected;return t.partsel&&!t.selected&&!0===t._lastSelectIntent&&(s=!1,t.selected=!0),t._lastSelectIntent=s,this.nodeSetSelected(e,s)},treeClear:function(e){var t=e.tree;t.activeNode=null,t.focusNode=null,t.$div.find(">ul.fancytree-container").empty(),t.rootNode.children=null,t._callHook("treeStructureChanged",e,"clear")},treeCreate:function(e){},treeDestroy:function(e){this.$div.find(">ul.fancytree-container").remove(),this.$source&&this.$source.removeClass("fancytree-helper-hidden")},treeInit:function(t){var s=t.tree,i=s.options;s.$container.attr("tabindex",i.tabindex),e.each(g,(function(e,t){void 0!==i[t]&&(s.info("Move option "+t+" to tree"),s[t]=i[t],delete i[t])})),i.checkboxAutoHide&&s.$container.addClass("fancytree-checkbox-auto-hide"),i.rtl?s.$container.attr("DIR","RTL").addClass("fancytree-rtl"):s.$container.removeAttr("DIR").removeClass("fancytree-rtl"),i.aria&&(s.$container.attr("role","tree"),1!==i.selectMode&&s.$container.attr("aria-multiselectable",!0)),this.treeLoad(t)},treeLoad:function(t,s){var n,o,a,r=t.tree,u=t.widget.element,d=e.extend({},t,{node:this.rootNode});if(r.rootNode.children&&this.treeClear(t),s=s||this.options.source)"string"==typeof s&&e.error("Not implemented");else switch(o=u.data("type")||"html"){case"html":(a=u.find(">ul").not(".fancytree-container").first()).length?(a.addClass("ui-fancytree-source fancytree-helper-hidden"),s=e.ui.fancytree.parseHtml(a),this.data=e.extend(this.data,H(a))):(i.warn("No `source` option was passed and container does not contain `<ul>`: assuming `source: []`."),s=[]);break;case"json":s=e.parseJSON(u.text()),u.contents().filter((function(){return 3===this.nodeType})).remove(),e.isPlainObject(s)&&(k(b(s.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),n=s,s=s.children,delete n.children,e.each(g,(function(e,t){void 0!==n[t]&&(r[t]=n[t],delete n[t])})),e.extend(r.data,n));break;default:e.error("Invalid data-type: "+o)}return r._triggerTreeEvent("preInit",null),this.nodeLoadChildren(d,s).done((function(){r._callHook("treeStructureChanged",t,"loadChildren"),r.render(),3===t.options.selectMode&&r.rootNode.fixSelection3FromEndNodes(),r.activeNode&&r.options.activeVisible&&r.activeNode.makeVisible(),r._triggerTreeEvent("init",null,{status:!0})})).fail((function(){r.render(),r._triggerTreeEvent("init",null,{status:!1})}))},treeRegisterNode:function(e,t,s){e.tree._callHook("treeStructureChanged",e,t?"addNode":"removeNode")},treeSetFocus:function(t,s,i){var n;(s=!1!==s)!==this.hasFocus()&&(this._hasFocus=s,!s&&this.focusNode?this.focusNode.setFocus(!1):!s||i&&i.calledByNode||e(this.$container).focus(),this.$container.toggleClass("fancytree-treefocus",s),this._triggerTreeEvent(s?"focusTree":"blurTree"),s&&!this.activeNode&&(n=this._lastMousedownNode||this.getFirstChild())&&n.setFocus())},treeSetOption:function(t,s,i){var n=t.tree,o=!0,a=!1,r=!1;switch(s){case"aria":case"checkbox":case"icon":case"minExpandLevel":case"tabindex":a=!0,r=!0;break;case"checkboxAutoHide":n.$container.toggleClass("fancytree-checkbox-auto-hide",!!i);break;case"escapeTitles":case"tooltip":r=!0;break;case"rtl":!1===i?n.$container.removeAttr("DIR").removeClass("fancytree-rtl"):n.$container.attr("DIR","RTL").addClass("fancytree-rtl"),r=!0;break;case"source":o=!1,n._callHook("treeLoad",n,i),r=!0}n.debug("set option "+s+"="+i+" <"+typeof i+">"),o&&(this.widget._super?this.widget._super.call(this.widget,s,i):e.Widget.prototype._setOption.call(this.widget,s,i)),a&&n._callHook("treeCreate",n),r&&n.render(!0,!1)},treeStructureChanged:function(e,t){}}),e.widget("ui.fancytree",{options:{activeVisible:!0,ajax:{type:"GET",cache:!1,dataType:"json"},aria:!0,autoActivate:!0,autoCollapse:!1,autoScroll:!1,checkbox:!1,clickFolderMode:4,copyFunctionsToData:!1,debugLevel:null,disabled:!1,enableAspx:42,escapeTitles:!1,extensions:[],focusOnSelect:!1,generateIds:!1,icon:!0,idPrefix:"ft_",keyboard:!0,keyPathSeparator:"/",minExpandLevel:1,nodata:!0,quicksearch:!1,rtl:!1,scrollOfs:{top:0,bottom:0},scrollParent:null,selectMode:2,strings:{loading:"Loading...",loadError:"Load error!",moreData:"More...",noData:"No data."},tabindex:"0",titlesTabbable:!1,toggleEffect:{effect:"slideToggle",duration:200},tooltip:!1,treeId:null,_classNames:{active:"fancytree-active",animating:"fancytree-animating",combinedExpanderPrefix:"fancytree-exp-",combinedIconPrefix:"fancytree-ico-",error:"fancytree-error",expanded:"fancytree-expanded",focused:"fancytree-focused",folder:"fancytree-folder",hasChildren:"fancytree-has-children",lastsib:"fancytree-lastsib",lazy:"fancytree-lazy",loading:"fancytree-loading",node:"fancytree-node",partload:"fancytree-partload",partsel:"fancytree-partsel",radio:"fancytree-radio",selected:"fancytree-selected",statusNodePrefix:"fancytree-statusnode-",unselectable:"fancytree-unselectable"},lazyLoad:null,postProcess:null},_deprecationWarning:function(e){var t=this.tree;t&&t.options.debugLevel>=3&&t.warn("$().fancytree('"+e+"') is deprecated (see https://wwwendt.de/tech/fancytree/doc/jsdoc/Fancytree_Widget.html")},_create:function(){this.tree=new B(this),this.$source=this.source||"json"===this.element.data("type")?this.element:this.element.find(">ul").first();var t,s,i,n=this.options,o=n.extensions,a=this.tree;for(i=0;i<o.length;i++)s=o[i],(t=e.ui.fancytree._extensions[s])||e.error("Could not apply extension '"+s+"' (it is not registered, did you forget to include it?)"),this.tree.options[s]=j({},t.options,this.tree.options[s]),k(void 0===this.tree.ext[s],"Extension name must not exist as Fancytree.ext attribute: '"+s+"'"),this.tree.ext[s]={},z(this.tree,a,t,s),a=t;void 0!==n.icons&&(!0===n.icon?(this.tree.warn("'icons' tree option is deprecated since v2.14.0: use 'icon' instead"),n.icon=n.icons):e.error("'icons' tree option is deprecated since v2.14.0: use 'icon' only instead")),void 0!==n.iconClass&&(n.icon?e.error("'iconClass' tree option is deprecated since v2.14.0: use 'icon' only instead"):(this.tree.warn("'iconClass' tree option is deprecated since v2.14.0: use 'icon' instead"),n.icon=n.iconClass)),void 0!==n.tabbable&&(n.tabindex=n.tabbable?"0":"-1",this.tree.warn("'tabbable' tree option is deprecated since v2.17.0: use 'tabindex='"+n.tabindex+"' instead")),this.tree._callHook("treeCreate",this.tree)},_init:function(){this.tree._callHook("treeInit",this.tree),this._bind()},_setOption:function(e,t){return this.tree._callHook("treeSetOption",this.tree,e,t)},_destroy:function(){this._unbind(),this.tree._callHook("treeDestroy",this.tree)},_unbind:function(){var t=this.tree._ns;this.element.off(t),this.tree.$container.off(t),e(document).off(t)},_bind:function(){var t=this,s=this.options,n=this.tree,o=n._ns;this._unbind(),n.$container.on("focusin"+o+" focusout"+o,(function(t){var s=i.getNode(t),o="focusin"===t.type;if(!o&&s&&e(t.target).is("a"))s.debug("Ignored focusout on embedded <a> element.");else{if(o){if(n._getExpiringValue("focusin"))return void n.debug("Ignored double focusin.");n._setExpiringValue("focusin",!0,50),s||(s=n._getExpiringValue("mouseDownNode"))&&n.debug("Reconstruct mouse target for focusin from recent event.")}s?n._callHook("nodeSetFocus",n._makeHookContext(s,t),o):n.tbody&&e(t.target).parents("table.fancytree-container > thead").length?n.debug("Ignore focus event outside table body.",t):n._callHook("treeSetFocus",n,o)}})).on("selectstart"+o,"span.fancytree-title",(function(e){e.preventDefault()})).on("keydown"+o,(function(e){if(s.disabled||!1===s.keyboard)return!0;var t,i=n.focusNode,o=n._makeHookContext(i||n,e),a=n.phase;try{return n.phase="userEvent","preventNav"===(t=i?n._triggerNodeEvent("keydown",i,e):n._triggerTreeEvent("keydown",e))?t=!0:!1!==t&&(t=n._callHook("nodeKeydown",o)),t}finally{n.phase=a}})).on("mousedown"+o,(function(e){var t=i.getEventTarget(e);n._lastMousedownNode=t?t.node:null,n._setExpiringValue("mouseDownNode",n._lastMousedownNode)})).on("click"+o+" dblclick"+o,(function(e){if(s.disabled)return!0;var n,o=i.getEventTarget(e),a=o.node,r=t.tree,u=r.phase;if(!a)return!0;n=r._makeHookContext(a,e);try{switch(r.phase="userEvent",e.type){case"click":return n.targetType=o.type,a.isPagingNode()?!0===r._triggerNodeEvent("clickPaging",n,e):!1!==r._triggerNodeEvent("click",n,e)&&r._callHook("nodeClick",n);case"dblclick":return n.targetType=o.type,!1!==r._triggerNodeEvent("dblclick",n,e)&&r._callHook("nodeDblclick",n)}}finally{r.phase=u}}))},getActiveNode:function(){return this._deprecationWarning("getActiveNode"),this.tree.activeNode},getNodeByKey:function(e){return this._deprecationWarning("getNodeByKey"),this.tree.getNodeByKey(e)},getRootNode:function(){return this._deprecationWarning("getRootNode"),this.tree.rootNode},getTree:function(){return this._deprecationWarning("getTree"),this.tree}}),i=e.ui.fancytree,e.extend(e.ui.fancytree,{version:"2.38.1-0",buildType:"production",debugLevel:3,_nextId:1,_nextNodeKey:1,_extensions:{},_FancytreeClass:B,_FancytreeNodeClass:A,jquerySupports:{positionMyOfs:T(e.ui.version,1,9)},assert:function(e,t){return k(e,t)},createTree:function(t,s){var n=e(t).fancytree(s);return i.getTree(n)},debounce:function(e,t,s,i){var n;return 3===arguments.length&&"boolean"!=typeof s&&(i=s,s=!1),function(){var o=arguments;i=i||this,s&&!n&&t.apply(i,o),clearTimeout(n),n=setTimeout((function(){s||t.apply(i,o),n=null}),e)}},debug:function(t){e.ui.fancytree.debugLevel>=4&&N("log",arguments)},error:function(t){e.ui.fancytree.debugLevel>=1&&N("error",arguments)},escapeHtml:function(e){return(""+e).replace(o,(function(e){return d[e]}))},fixPositionOptions:function(t){if((t.offset||(""+t.my+t.at).indexOf("%")>=0)&&e.error("expected new position syntax (but '%' is not supported)"),!e.ui.fancytree.jquerySupports.positionMyOfs){var s=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(t.my),i=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(t.at),n=(s[2]?+s[2]:0)+(i[2]?+i[2]:0),o=(s[4]?+s[4]:0)+(i[4]?+i[4]:0);t=e.extend({},t,{my:s[1]+" "+s[3],at:i[1]+" "+i[3]}),(n||o)&&(t.offset=n+" "+o)}return t},getEventTarget:function(t){var s,n=t&&t.target?t.target.className:"",o={node:this.getNode(t.target),type:void 0};return/\bfancytree-title\b/.test(n)?o.type="title":/\bfancytree-expander\b/.test(n)?o.type=!1===o.node.hasChildren()?"prefix":"expander":/\bfancytree-checkbox\b/.test(n)?o.type="checkbox":/\bfancytree(-custom)?-icon\b/.test(n)?o.type="icon":/\bfancytree-node\b/.test(n)?o.type="title":t&&t.target&&((s=e(t.target)).is("ul[role=group]")?((o.node&&o.node.tree||i).debug("Ignoring click on outer UL."),o.node=null):s.closest(".fancytree-title").length?o.type="title":s.closest(".fancytree-checkbox").length?o.type="checkbox":s.closest(".fancytree-expander").length&&(o.type="expander")),o},getEventTargetType:function(e){return this.getEventTarget(e).type},getNode:function(t){if(t instanceof A)return t;for(t instanceof e?t=t[0]:void 0!==t.originalEvent&&(t=t.target);t;){if(t.ftnode)return t.ftnode;t=t.parentNode}return null},getTree:function(t){var s,i=t;return t instanceof B?t:(void 0===t&&(t=0),"number"==typeof t?t=e(".fancytree-container").eq(t):"string"==typeof t?(t=e("#ft-id-"+i).eq(0)).length||(t=e(i).eq(0)):t instanceof Element||t instanceof HTMLDocument?t=e(t):t instanceof e?t=t.eq(0):void 0!==t.originalEvent&&(t=e(t.target)),(s=(t=t.closest(":ui-fancytree")).data("ui-fancytree")||t.data("fancytree"))?s.tree:null)},evalOption:function(e,t,s,i,n){var o,a,r=t.tree,u=i[e],d=s[e];return S(u)?(o={node:t,tree:r,widget:r.widget,options:r.widget.options,typeInfo:r.types[t.type]||{}},null==(a=u.call(r,{type:e},o))&&(a=d)):a=null==d?u:d,null==a&&(a=n),a},setSpanIcon:function(t,s,i){var n=e(t);"string"==typeof i?n.attr("class",s+" "+i):(i.text?n.text(""+i.text):i.html&&(t.innerHTML=i.html),n.attr("class",s+" "+(i.addClass||"")))},eventToString:function(e){var t=e.which,s=e.type,i=[];return e.altKey&&i.push("alt"),e.ctrlKey&&i.push("ctrl"),e.metaKey&&i.push("meta"),e.shiftKey&&i.push("shift"),"click"===s||"dblclick"===s?i.push(p[e.button]+s):"wheel"===s?i.push(s):l[t]||i.push(c[t]||String.fromCharCode(t).toLowerCase()),i.join("+")},info:function(t){e.ui.fancytree.debugLevel>=3&&N("info",arguments)},keyEventToString:function(e){return this.warn("keyEventToString() is deprecated: use eventToString()"),this.eventToString(e)},overrideMethod:function(t,s,i,n){var o,a=t[s]||e.noop;t[s]=function(){var e=n||this;try{return o=e._super,e._super=a,i.apply(e,arguments)}finally{e._super=o}}},parseHtml:function(t){var s,i,n,o,a,r,u,d,l=t.find(">li"),c=[];return l.each((function(){var l,h,p=e(this),g=p.find(">span",this).first(),_=g.length?null:p.find(">a").first(),y={tooltip:null,data:{}};for(g.length?y.title=g.html():_&&_.length?(y.title=_.html(),y.data.href=_.attr("href"),y.data.target=_.attr("target"),y.tooltip=_.attr("title")):(y.title=p.html(),(a=y.title.search(/<ul/i))>=0&&(y.title=y.title.substring(0,a))),y.title=C(y.title),o=0,r=m.length;o<r;o++)y[m[o]]=void 0;for(s=this.className.split(" "),n=[],o=0,r=s.length;o<r;o++)i=s[o],f[i]?y[i]=!0:n.push(i);if(y.extraClasses=n.join(" "),(u=p.attr("title"))&&(y.tooltip=u),(u=p.attr("id"))&&(y.key=u),p.attr("hideCheckbox")&&(y.checkbox=!1),(l=H(p))&&!e.isEmptyObject(l)){for(h in w)x(l,h)&&(l[w[h]]=l[h],delete l[h]);for(o=0,r=v.length;o<r;o++)u=v[o],null!=(d=l[u])&&(delete l[u],y[u]=d);e.extend(y.data,l)}(t=p.find(">ul").first()).length?y.children=e.ui.fancytree.parseHtml(t):y.children=y.lazy?void 0:null,c.push(y)})),c},registerExtension:function(t){k(null!=t.name,"extensions must have a `name` property."),k(null!=t.version,"extensions must have a `version` property."),e.ui.fancytree._extensions[t.name]=t},trim:C,unescapeHtml:function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue},warn:function(t){e.ui.fancytree.debugLevel>=2&&N("warn",arguments)}}),e.ui.fancytree}function k(t,s){t||(s="Fancytree assertion failed"+(s=s?": "+s:""),e.ui.fancytree.error(s),e.error(s))}function x(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function S(e){return"function"==typeof e}function C(e){return null==e?"":e.trim()}function N(e,t){var s,i,n=window.console?window.console[e]:null;if(n)try{n.apply(window.console,t)}catch(e){for(i="",s=0;s<t.length;s++)i+=t[s];n(i)}}function E(e){return!(!e.tree||void 0===e.statusNodeType)}function T(t,s,i,n){var o,a,r,u=e.map(C(t).split("."),(function(e){return parseInt(e,10)})),d=e.map(Array.prototype.slice.call(arguments,1),(function(e){return parseInt(e,10)}));for(o=0;o<d.length;o++)if((a=u[o]||0)!==(r=d[o]||0))return a>r;return!0}function j(){var t,s,i,n,o,a=arguments[0]||{},r=1,u=arguments.length;if("object"==typeof a||S(a)||(a={}),r===u)throw Error("need at least two args");for(;r<u;r++)if(null!=(t=arguments[r]))for(s in t)if(x(t,s)){if(i=a[s],a===(n=t[s]))continue;n&&e.isPlainObject(n)?(o=i&&e.isPlainObject(i)?i:{},a[s]=j(o,n)):void 0!==n&&(a[s]=n)}return a}function I(e,t,s,i,n){var o,a,r,u,d,l=(o=t[e],a=i[e],r=t.ext[n],u=function(){return o.apply(t,arguments)},d=function(e){return o.apply(t,e)},function(){var e=t._local,s=t._super,i=t._superApply;try{return t._local=r,t._super=u,t._superApply=d,a.apply(t,arguments)}finally{t._local=e,t._super=s,t._superApply=i}});return l}function z(t,s,i,n){for(var o in i)"function"==typeof i[o]?"function"==typeof t[o]?t[o]=I(o,t,s,i,n):"_"===o.charAt(0)?t.ext[n][o]=I(o,t,s,i,n):e.error("Could not override tree."+o+". Use prefix '_' to create tree."+n+"._"+o):"options"!==o&&(t.ext[n][o]=i[o])}function L(t,s){return void 0===t?e.Deferred((function(){this.resolve()})).promise():e.Deferred((function(){this.resolveWith(t,s)})).promise()}function P(t,s){return void 0===t?e.Deferred((function(){this.reject()})).promise():e.Deferred((function(){this.rejectWith(t,s)})).promise()}function D(e,t){return function(){e.resolveWith(t)}}function H(t){var s=e.extend({},t.data()),i=s.json;return delete s.fancytree,delete s.uiFancytree,i&&(delete s.json,s=e.extend(s,i)),s}function W(e){return(""+e).replace(a,(function(e){return d[e]}))}function R(e){return e=e.toLowerCase(),function(t){return t.title.toLowerCase().indexOf(e)>=0}}function O(e){var t=new RegExp("^"+e,"i");return function(e){return t.test(e.title)}}function A(t,s){var n,o,a,r;for(this.parent=t,this.tree=t.tree,this.ul=null,this.li=null,this.statusNodeType=null,this._isLoading=!1,this._error=null,this.data={},n=0,o=v.length;n<o;n++)this[a=v[n]]=s[a];for(a in null==this.unselectableIgnore&&null==this.unselectableStatus||(this.unselectable=!0),s.hideCheckbox&&e.error("'hideCheckbox' node option was removed in v2.23.0: use 'checkbox: false'"),s.data&&e.extend(this.data,s.data),s)_[a]||!this.tree.options.copyFunctionsToData&&S(s[a])||y[a]||(this.data[a]=s[a]);null==this.key?this.tree.options.defaultKey?(this.key=""+this.tree.options.defaultKey(this),k(this.key,"defaultKey() must return a unique key")):this.key="_"+i._nextNodeKey++:this.key=""+this.key,s.active&&(k(null===this.tree.activeNode,"only one active node allowed"),this.tree.activeNode=this),s.selected&&(this.tree.lastSelectedNode=this),(r=s.children)?r.length?this._setChildren(r):this.children=this.lazy?[]:null:this.children=null,this.tree._callHook("treeRegisterNode",this.tree,!0,this)}function B(t){this.widget=t,this.$div=t.element,this.options=t.options,this.options&&(void 0!==this.options.lazyload&&e.error("The 'lazyload' event is deprecated since 2014-02-25. Use 'lazyLoad' (with uppercase L) instead."),void 0!==this.options.loaderror&&e.error("The 'loaderror' event was renamed since 2014-07-03. Use 'loadError' (with uppercase E) instead."),void 0!==this.options.fx&&e.error("The 'fx' option was replaced by 'toggleEffect' since 2014-11-30."),void 0!==this.options.removeNode&&e.error("The 'removeNode' event was replaced by 'modifyChild' since 2.20 (2016-09-10).")),this.ext={},this.types={},this.columns={},this.data=H(this.$div),this._id=""+(this.options.treeId||e.ui.fancytree._nextId++),this._ns=".fancytree-"+this._id,this.activeNode=null,this.focusNode=null,this._hasFocus=null,this._tempCache={},this._lastMousedownNode=null,this._enableUpdate=!0,this.lastSelectedNode=null,this.systemFocusElement=null,this.lastQuicksearchTerm="",this.lastQuicksearchTime=0,this.viewport=null,this.statusClassPropName="span",this.ariaPropName="li",this.nodeContainerAttrName="li",this.$div.find(">ul.fancytree-container").remove();var s,n={tree:this};this.rootNode=new A(n,{title:"root",key:"root_"+this._id,children:null,expanded:!0}),this.rootNode.parent=null,s=e("<ul>",{id:"ft-id-"+this._id,class:"ui-fancytree fancytree-container fancytree-plain"}).appendTo(this.$div),this.$container=s,this.rootNode.ul=s[0],null==this.options.debugLevel&&(this.options.debugLevel=i.debugLevel)}e.ui.fancytree.warn("Fancytree: ignored duplicate include")},void 0===(o="function"==typeof i?i.apply(t,n):i)||(e.exports=o)},3860:function(e,t,s){var i,n,o;n=[s(5311)],i=function(e){e.ui=e.ui||{},e.ui.version="1.12.1";var t,s,i=0,n=Array.prototype.slice;e.cleanData=e.cleanData||(t=e.cleanData,function(s){var i,n,o;for(o=0;null!=(n=s[o]);o++)try{(i=e._data(n,"events"))&&i.remove&&e(n).triggerHandler("remove")}catch(e){}t(s)}),e.widget=e.widget||function(t,s,i){var n,o,a,r={},u=t.split(".")[0],d=u+"-"+(t=t.split(".")[1]);return i||(i=s,s=e.Widget),e.isArray(i)&&(i=e.extend.apply(null,[{}].concat(i))),e.expr[":"][d.toLowerCase()]=function(t){return!!e.data(t,d)},e[u]=e[u]||{},n=e[u][t],o=e[u][t]=function(e,t){if(!this._createWidget)return new o(e,t);arguments.length&&this._createWidget(e,t)},e.extend(o,n,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),(a=new s).options=e.widget.extend({},a.options),e.each(i,(function(t,i){e.isFunction(i)?r[t]=function(){function e(){return s.prototype[t].apply(this,arguments)}function n(e){return s.prototype[t].apply(this,e)}return function(){var t,s=this._super,o=this._superApply;return this._super=e,this._superApply=n,t=i.apply(this,arguments),this._super=s,this._superApply=o,t}}():r[t]=i})),o.prototype=e.widget.extend(a,{widgetEventPrefix:n&&a.widgetEventPrefix||t},r,{constructor:o,namespace:u,widgetName:t,widgetFullName:d}),n?(e.each(n._childConstructors,(function(t,s){var i=s.prototype;e.widget(i.namespace+"."+i.widgetName,o,s._proto)})),delete n._childConstructors):s._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var s,i,o=n.call(arguments,1),a=0,r=o.length;a<r;a++)for(s in o[a])i=o[a][s],o[a].hasOwnProperty(s)&&void 0!==i&&(e.isPlainObject(i)?t[s]=e.isPlainObject(t[s])?e.widget.extend({},t[s],i):e.widget.extend({},i):t[s]=i);return t},e.widget.bridge=function(t,s){var i=s.prototype.widgetFullName||t;e.fn[t]=function(o){var a="string"==typeof o,r=n.call(arguments,1),u=this;return a?this.length||"instance"!==o?this.each((function(){var s,n=e.data(this,i);return"instance"===o?(u=n,!1):n?e.isFunction(n[o])&&"_"!==o.charAt(0)?(s=n[o].apply(n,r))!==n&&void 0!==s?(u=s&&s.jquery?u.pushStack(s.get()):s,!1):void 0:e.error("no such method '"+o+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+o+"'")})):u=void 0:(r.length&&(o=e.widget.extend.apply(null,[o].concat(r))),this.each((function(){var t=e.data(this,i);t?(t.option(o||{}),t._init&&t._init()):e.data(this,i,new s(o,this))}))),u}},e.Widget=e.Widget||function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,(function(e,s){t._removeClass(s,e)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,s){var i,n,o,a=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(a={},i=t.split("."),t=i.shift(),i.length){for(n=a[t]=e.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=s}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];a[t]=s}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var s,i,n;for(s in t)n=this.classesElementLookup[s],t[s]!==this.options.classes[s]&&n&&n.length&&(i=e(n.get()),this._removeClass(n,s),i.addClass(this._classes({element:i,keys:s,classes:t,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){var s=[],i=this;function n(n,o){var a,r;for(r=0;r<n.length;r++)a=i.classesElementLookup[n[r]]||e(),a=t.add?e(e.unique(a.get().concat(t.element.get()))):e(a.not(t.element).get()),i.classesElementLookup[n[r]]=a,s.push(n[r]),o&&t.classes[n[r]]&&s.push(t.classes[n[r]])}return t=e.extend({element:this.element,classes:this.options.classes||{}},t),this._on(t.element,{remove:"_untrackClassesElement"}),t.keys&&n(t.keys.match(/\S+/g)||[],!0),t.extra&&n(t.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(t){var s=this;e.each(s.classesElementLookup,(function(i,n){-1!==e.inArray(t.target,n)&&(s.classesElementLookup[i]=e(n.not(t.target).get()))}))},_removeClass:function(e,t,s){return this._toggleClass(e,t,s,!1)},_addClass:function(e,t,s){return this._toggleClass(e,t,s,!0)},_toggleClass:function(e,t,s,i){i="boolean"==typeof i?i:s;var n="string"==typeof e||null===e,o={extra:n?t:s,keys:n?e:t,element:n?this.element:e,add:i};return o.element.toggleClass(this._classes(o),i),this},_on:function(t,s,i){var n,o=this;"boolean"!=typeof t&&(i=s,s=t,t=!1),i?(s=n=e(s),this.bindings=this.bindings.add(s)):(i=s,s=this.element,n=this.widget()),e.each(i,(function(i,a){function r(){if(t||!0!==o.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof a?o[a]:a).apply(o,arguments)}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||e.guid++);var u=i.match(/^([\w:-]*)\s*(.*)$/),d=u[1]+o.eventNamespace,l=u[2];l?n.on(d,l,r):s.on(d,r)}))},_off:function(t,s){s=(s||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(s).off(s),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function s(){return("string"==typeof e?i[e]:e).apply(i,arguments)}var i=this;return setTimeout(s,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(e(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(e(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,s,i){var n,o,a=this.options[t];if(i=i||{},(s=e.Event(s)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),s.target=this.element[0],o=s.originalEvent)for(n in o)n in s||(s[n]=o[n]);return this.element.trigger(s,i),!(e.isFunction(a)&&!1===a.apply(this.element[0],[s].concat(i))||s.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},(function(t,s){e.Widget.prototype["_"+t]=function(i,n,o){var a;"string"==typeof n&&(n={effect:n});var r=n?!0===n||"number"==typeof n?s:n.effect||s:t;"number"==typeof(n=n||{})&&(n={duration:n}),a=!e.isEmptyObject(n),n.complete=o,n.delay&&i.delay(n.delay),a&&e.effects&&e.effects.effect[r]?i[t](n):r!==t&&i[r]?i[r](n.duration,n.easing,o):i.queue((function(s){e(this)[t](),o&&o.call(i[0]),s()}))}})),e.widget,function(){var t,s=Math.max,i=Math.abs,n=/left|center|right/,o=/top|center|bottom/,a=/[\+\-]\d+(\.[\d]+)?%?/,r=/^\w+/,u=/%$/,d=e.fn.position;function l(e,t,s){return[parseFloat(e[0])*(u.test(e[0])?t/100:1),parseFloat(e[1])*(u.test(e[1])?s/100:1)]}function c(t,s){return parseInt(e.css(t,s),10)||0}function h(t){var s=t[0];return 9===s.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(s)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:s.preventDefault?{width:0,height:0,offset:{top:s.pageY,left:s.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.position=e.position||{scrollbarWidth:function(){if(void 0!==t)return t;var s,i,n=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return e("body").append(n),s=o.offsetWidth,n.css("overflow","scroll"),s===(i=o.offsetWidth)&&(i=n[0].clientWidth),n.remove(),t=s-i},getScrollInfo:function(t){var s=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===s||"auto"===s&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?e.position.scrollbarWidth():0,height:n?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var s=e(t||window),i=e.isWindow(s[0]),n=!!s[0]&&9===s[0].nodeType;return{element:s,isWindow:i,isDocument:n,offset:i||n?{left:0,top:0}:e(t).offset(),scrollLeft:s.scrollLeft(),scrollTop:s.scrollTop(),width:s.outerWidth(),height:s.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return d.apply(this,arguments);t=e.extend({},t);var u,p,m,f,g,v,_=e(t.of),w=e.position.getWithinInfo(t.within),y=e.position.getScrollInfo(w),b=(t.collision||"flip").split(" "),k={};return v=h(_),_[0].preventDefault&&(t.at="left top"),p=v.width,m=v.height,f=v.offset,g=e.extend({},f),e.each(["my","at"],(function(){var e,s,i=(t[this]||"").split(" ");1===i.length&&(i=n.test(i[0])?i.concat(["center"]):o.test(i[0])?["center"].concat(i):["center","center"]),i[0]=n.test(i[0])?i[0]:"center",i[1]=o.test(i[1])?i[1]:"center",e=a.exec(i[0]),s=a.exec(i[1]),k[this]=[e?e[0]:0,s?s[0]:0],t[this]=[r.exec(i[0])[0],r.exec(i[1])[0]]})),1===b.length&&(b[1]=b[0]),"right"===t.at[0]?g.left+=p:"center"===t.at[0]&&(g.left+=p/2),"bottom"===t.at[1]?g.top+=m:"center"===t.at[1]&&(g.top+=m/2),u=l(k.at,p,m),g.left+=u[0],g.top+=u[1],this.each((function(){var n,o,a=e(this),r=a.outerWidth(),d=a.outerHeight(),h=c(this,"marginLeft"),v=c(this,"marginTop"),x=r+h+c(this,"marginRight")+y.width,S=d+v+c(this,"marginBottom")+y.height,C=e.extend({},g),N=l(k.my,a.outerWidth(),a.outerHeight());"right"===t.my[0]?C.left-=r:"center"===t.my[0]&&(C.left-=r/2),"bottom"===t.my[1]?C.top-=d:"center"===t.my[1]&&(C.top-=d/2),C.left+=N[0],C.top+=N[1],n={marginLeft:h,marginTop:v},e.each(["left","top"],(function(s,i){e.ui.position[b[s]]&&e.ui.position[b[s]][i](C,{targetWidth:p,targetHeight:m,elemWidth:r,elemHeight:d,collisionPosition:n,collisionWidth:x,collisionHeight:S,offset:[u[0]+N[0],u[1]+N[1]],my:t.my,at:t.at,within:w,elem:a})})),t.using&&(o=function(e){var n=f.left-C.left,o=n+p-r,u=f.top-C.top,l=u+m-d,c={target:{element:_,left:f.left,top:f.top,width:p,height:m},element:{element:a,left:C.left,top:C.top,width:r,height:d},horizontal:o<0?"left":n>0?"right":"center",vertical:l<0?"top":u>0?"bottom":"middle"};p<r&&i(n+o)<p&&(c.horizontal="center"),m<d&&i(u+l)<m&&(c.vertical="middle"),s(i(n),i(o))>s(i(u),i(l))?c.important="horizontal":c.important="vertical",t.using.call(this,e,c)}),a.offset(e.extend(C,{using:o}))}))},e.ui.position={fit:{left:function(e,t){var i,n=t.within,o=n.isWindow?n.scrollLeft:n.offset.left,a=n.width,r=e.left-t.collisionPosition.marginLeft,u=o-r,d=r+t.collisionWidth-a-o;t.collisionWidth>a?u>0&&d<=0?(i=e.left+u+t.collisionWidth-a-o,e.left+=u-i):e.left=d>0&&u<=0?o:u>d?o+a-t.collisionWidth:o:u>0?e.left+=u:d>0?e.left-=d:e.left=s(e.left-r,e.left)},top:function(e,t){var i,n=t.within,o=n.isWindow?n.scrollTop:n.offset.top,a=t.within.height,r=e.top-t.collisionPosition.marginTop,u=o-r,d=r+t.collisionHeight-a-o;t.collisionHeight>a?u>0&&d<=0?(i=e.top+u+t.collisionHeight-a-o,e.top+=u-i):e.top=d>0&&u<=0?o:u>d?o+a-t.collisionHeight:o:u>0?e.top+=u:d>0?e.top-=d:e.top=s(e.top-r,e.top)}},flip:{left:function(e,t){var s,n,o=t.within,a=o.offset.left+o.scrollLeft,r=o.width,u=o.isWindow?o.scrollLeft:o.offset.left,d=e.left-t.collisionPosition.marginLeft,l=d-u,c=d+t.collisionWidth-r-u,h="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,m=-2*t.offset[0];l<0?((s=e.left+h+p+m+t.collisionWidth-r-a)<0||s<i(l))&&(e.left+=h+p+m):c>0&&((n=e.left-t.collisionPosition.marginLeft+h+p+m-u)>0||i(n)<c)&&(e.left+=h+p+m)},top:function(e,t){var s,n,o=t.within,a=o.offset.top+o.scrollTop,r=o.height,u=o.isWindow?o.scrollTop:o.offset.top,d=e.top-t.collisionPosition.marginTop,l=d-u,c=d+t.collisionHeight-r-u,h="top"===t.my[1]?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,p="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];l<0?((n=e.top+h+p+m+t.collisionHeight-r-a)<0||n<i(l))&&(e.top+=h+p+m):c>0&&((s=e.top-t.collisionPosition.marginTop+h+p+m-u)>0||i(s)<c)&&(e.top+=h+p+m)}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}}}(),e.ui.position,e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},e.fn.scrollParent=function(t){var s=this.css("position"),i="absolute"===s,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter((function(){var t=e(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))})).eq(0);return"fixed"!==s&&o.length?o:e(this[0].ownerDocument||document)},e.fn.extend({uniqueId:(s=0,function(){return this.each((function(){this.id||(this.id="ui-id-"+ ++s)}))}),removeUniqueId:function(){return this.each((function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")}))}})},void 0===(o="function"==typeof i?i.apply(t,n):i)||(e.exports=o)},5311:function(e){"use strict";e.exports=jQuery}},t={};function s(i){var n=t[i];if(void 0!==n)return n.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,s),o.exports}s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){"use strict";var e=e||{};window.WP_Smush=e,String.prototype.includes||(String.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}),s(3065),s(6111),s(7413),s(3579),s(2140),s(1110),s(1442),s(5972),s(7447),s(4933),s(206)}()}();
//# sourceMappingURL=smush-admin.min.js.map

Zerion Mini Shell 1.0