%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/shaban/laviva/wp-content/plugins/envato-market/js/
Upload File :
Create Path :
Current File : /var/www/html/shaban/laviva/wp-content/plugins/envato-market/js/updates.min.js

window.wp=window.wp||{},function(e,t){"use strict";t.envato={},t.envato.ajaxNonce=window._wpUpdatesSettings.ajax_nonce,t.envato.l10n=window._wpUpdatesSettings.l10n,t.envato.shouldRequestFilesystemCredentials=null,t.envato.filesystemCredentials={ftp:{host:null,username:null,password:null,connectionType:null},ssh:{publicKey:null,privateKey:null}},t.envato.updateLock=!1,t.envato.updateDoneSuccessfully=!1,t.envato.updateQueue=[],t.envato.$elToReturnFocusToFromCredentialsModal=null,t.envato.decrementCount=function(t){var a,n,o=e("#wp-admin-bar-updates .ab-label"),s=e('a[href="update-core.php"] .update-plugins'),u=e("#menu-plugins");if(a=o.text(),!((a=parseInt(a,10)-1)<0||isNaN(a))&&(e("#wp-admin-bar-updates .ab-item").removeAttr("title"),o.text(a),s.each(function(e,t){t.className=t.className.replace(/count-\d+/,"count-"+a)}),s.removeAttr("title"),s.find(".update-count").text(a),"plugin"===t)){if(n=u.find(".plugin-count").eq(0).text(),(n=parseInt(n,10)-1)<0||isNaN(n))return;u.find(".plugin-count").text(n),u.find(".update-plugins").each(function(e,t){t.className=t.className.replace(/count-\d+/,"count-"+n)}),n>0?e(".subsubsub .upgrade .count").text("("+n+")"):e(".subsubsub .upgrade").remove()}},t.envato.updatePlugin=function(a,n){var o,s=e(".envato-card-"+n).find(".update-now"),u=s.data("data-name");s.attr("aria-label",t.envato.l10n.updating.replace("%s",u)),s.addClass("updating-message"),s.html()!==t.envato.l10n.updating&&s.data("originaltext",s.html()),s.text(t.envato.l10n.updating),t.a11y.speak(t.envato.l10n.updatingMsg),t.envato.updateLock?t.envato.updateQueue.push({type:"update-plugin",data:{plugin:a,slug:n}}):(t.envato.updateLock=!0,o={_ajax_nonce:t.envato.ajaxNonce,plugin:a,slug:n,username:t.envato.filesystemCredentials.ftp.username,password:t.envato.filesystemCredentials.ftp.password,hostname:t.envato.filesystemCredentials.ftp.hostname,connection_type:t.envato.filesystemCredentials.ftp.connectionType,public_key:t.envato.filesystemCredentials.ssh.publicKey,private_key:t.envato.filesystemCredentials.ssh.privateKey},t.ajax.post("update-plugin",o).done(t.envato.updateSuccess).fail(t.envato.updateError))},t.envato.updateTheme=function(a){var n,o=e(".envato-card-"+a).find(".update-now"),s=o.data("data-name");o.attr("aria-label",t.envato.l10n.updating.replace("%s",s)),o.addClass("updating-message"),o.html()!==t.envato.l10n.updating&&o.data("originaltext",o.html()),o.text(t.envato.l10n.updating),t.a11y.speak(t.envato.l10n.updatingMsg),t.envato.updateLock?t.envato.updateQueue.push({type:"update-theme",data:{theme:a}}):(t.envato.updateLock=!0,n={_ajax_nonce:t.envato.ajaxNonce,theme:a,slug:a,username:t.envato.filesystemCredentials.ftp.username,password:t.envato.filesystemCredentials.ftp.password,hostname:t.envato.filesystemCredentials.ftp.hostname,connection_type:t.envato.filesystemCredentials.ftp.connectionType,public_key:t.envato.filesystemCredentials.ssh.publicKey,private_key:t.envato.filesystemCredentials.ssh.privateKey},t.ajax.post("update-theme",n).done(t.envato.updateSuccess).fail(t.envato.updateError))},t.envato.updateSuccess=function(a){var n,o,s,u,l,d,i;o=(n=e(".envato-card-"+a.slug)).find(".column-update"),s=n.find(".update-now"),u=n.find(".version"),l=s.data("name"),d=s.data("version"),i=u.attr("aria-label").replace("%s",d),s.addClass("disabled"),s.attr("aria-label",t.envato.l10n.updatedMsg.replace("%s",l)),u.text(i),s.removeClass("updating-message").addClass("updated-message"),s.text(t.envato.l10n.updated),t.a11y.speak(t.envato.l10n.updatedMsg),o.addClass("update-complete").delay(1e3).fadeOut(),t.envato.decrementCount("plugin"),t.envato.updateDoneSuccessfully=!0,t.envato.updateLock=!1,e(document).trigger("envato-update-success",a),t.envato.queueChecker()},t.envato.updateError=function(a){var n,o;t.envato.updateDoneSuccessfully=!1,a.errorCode&&"unable_to_connect_to_filesystem"===a.errorCode&&t.envato.shouldRequestFilesystemCredentials?t.envato.credentialError(a,"update-plugin"):(o=(n=e(".envato-card-"+a.slug).find(".update-now")).data("data-name"),n.attr("aria-label",t.envato.l10n.updateFailed.replace("%s",o)),n.removeClass("updating-message"),n.html(t.envato.l10n.updateFailed.replace("%s","string"!==a.errorMessage?a.errorMessage:a.error)),t.a11y.speak(t.envato.l10n.updateFailed),t.envato.updateLock=!1,e(document).trigger("envato-update-error",a),t.envato.queueChecker())},t.envato.showErrorInCredentialsForm=function(t){var a=e(".notification-dialog");a.find(".error").remove(),a.find("h3").after('<div class="error">'+t+"</div>")},t.envato.credentialError=function(e,a){t.envato.updateQueue.push({type:a,data:{plugin:e.plugin,slug:e.slug}}),t.envato.showErrorInCredentialsForm(e.error),t.envato.requestFilesystemCredentials()},t.envato.queueChecker=function(){var e;t.envato.updateLock||t.envato.updateQueue.length<=0||(e=t.envato.updateQueue.shift(),t.envato.updatePlugin(e.data.plugin,e.data.slug))},t.envato.requestFilesystemCredentials=function(a){!1===t.envato.updateDoneSuccessfully&&(t.envato.$elToReturnFocusToFromCredentialsModal=e(a.target),t.envato.updateLock=!0,t.envato.requestForCredentialsModalOpen())},t.envato.keydown=function(a){27===a.keyCode?t.envato.requestForCredentialsModalCancel():9===a.keyCode&&("upgrade"!==a.target.id||a.shiftKey?"hostname"===a.target.id&&a.shiftKey&&(e("#upgrade").focus(),a.preventDefault()):(e("#hostname").focus(),a.preventDefault()))},t.envato.requestForCredentialsModalOpen=function(){var a=e("#request-filesystem-credentials-dialog");e("body").addClass("modal-open"),a.show(),a.find("input:enabled:first").focus(),a.keydown(t.envato.keydown)},t.envato.requestForCredentialsModalClose=function(){e("#request-filesystem-credentials-dialog").hide(),e("body").removeClass("modal-open"),t.envato.$elToReturnFocusToFromCredentialsModal.focus()},t.envato.requestForCredentialsModalCancel=function(){var a,n;!1===t.envato.updateLock&&0===t.envato.updateQueue.length||(a=t.envato.updateQueue[0].data.slug,t.envato.updateLock=!1,t.envato.updateQueue=[],t.envato.requestForCredentialsModalClose(),(n=e(".envato-card-"+a).find(".update-now")).removeClass("updating-message"),n.html(n.data("originaltext")),t.a11y.speak(t.envato.l10n.updateCancel))},t.envato.beforeunload=function(){if(t.envato.updateLock)return t.envato.l10n.beforeunload},e(document).ready(function(){t.envato.shouldRequestFilesystemCredentials=!(e("#request-filesystem-credentials-dialog").length<=0),e("#request-filesystem-credentials-dialog form").on("submit",function(){return t.envato.filesystemCredentials.ftp.hostname=e("#hostname").val(),t.envato.filesystemCredentials.ftp.username=e("#username").val(),t.envato.filesystemCredentials.ftp.password=e("#password").val(),t.envato.filesystemCredentials.ftp.connectionType=e('input[name="connection_type"]:checked').val(),t.envato.filesystemCredentials.ssh.publicKey=e("#public_key").val(),t.envato.filesystemCredentials.ssh.privateKey=e("#private_key").val(),t.envato.requestForCredentialsModalClose(),t.envato.updateLock=!1,t.envato.queueChecker(),!1}),e('#request-filesystem-credentials-dialog [data-js-action="close"], .notification-dialog-background').on("click",function(){t.envato.requestForCredentialsModalCancel()}),e('#request-filesystem-credentials-dialog input[name="connection_type"]').on("change",function(){e(this).parents("form").find("#private_key, #public_key").parents("label").toggle("ssh"===e(this).val())}).change(),e(".envato-card.plugin").on("click",".update-now",function(a){var n=e(a.target);a.preventDefault(),t.envato.shouldRequestFilesystemCredentials&&!t.envato.updateLock&&t.envato.requestFilesystemCredentials(a),t.envato.updatePlugin(n.data("plugin"),n.data("slug"))}),e(".envato-card.theme").on("click",".update-now",function(a){var n=e(a.target);a.preventDefault(),t.envato.shouldRequestFilesystemCredentials&&!t.envato.updateLock&&t.envato.requestFilesystemCredentials(a),t.envato.updateTheme(n.data("slug"))}),e("#plugin_update_from_iframe").on("click",function(t){var a,n;a=window.parent===window?null:window.parent,e.support.postMessage=!!window.postMessage,!1!==e.support.postMessage&&null!==a&&-1===window.parent.location.pathname.indexOf("update-core.php")&&(t.preventDefault(),n={action:"updatePlugin",slug:e(this).data("slug")},a.postMessage(JSON.stringify(n),window.location.origin))})}),e(window).on("message",function(a){var n,o=a.originalEvent,s=document.location,u=s.protocol+"//"+s.hostname;if(o.origin===u){n=e.parseJSON(o.data);try{if(void 0===n.action)return}catch(e){}try{switch(n.action){case"decrementUpdateCount":t.envato.decrementCount(n.upgradeType);break;case"updatePlugin":tb_remove(),e(".envato-card-"+n.slug).find("h4 a").focus(),e(".envato-card-"+n.slug).find('[data-slug="'+n.slug+'"]').trigger("click")}}catch(e){}}}),e(window).on("beforeunload",t.envato.beforeunload)}(jQuery,window.wp,window.ajaxurl);

Zerion Mini Shell 1.0