/**! * wp-color-picker-alpha * * Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker * Only run in input and is defined data alpha in true * * Version: 2.1.4 * https://github.com/kallookoo/wp-color-picker-alpha * Licensed under the GPLv2 license or later. */ !function(t){if(!t.wp.wpColorPicker.prototype._hasAlpha){var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==",r='
',e='
',a='',i='',l=!1;if("undefined"!=typeof wpColorPickerL10n){(l=void 0!==wpColorPickerL10n.current)&&(i='');var n=wpColorPickerL10n.defaultLabel,s=wpColorPickerL10n.pick,p=wpColorPickerL10n.defaultString,c=wpColorPickerL10n.defaultAriaLabel,d=wpColorPickerL10n.clear,g=wpColorPickerL10n.clearAriaLabel}else{var h=wp.i18n.__;n=h("Color value"),s=h("Select Color"),p=h("Default"),c=h("Select default color"),d=h("Clear"),g=h("Clear color")}Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var t=parseInt(this._color,10).toString(16);return this.error?"":(t.length<6&&(t=("00000"+t).substr(-6)),"#"+t)},t.widget("wp.wpColorPicker",t.wp.wpColorPicker,{_hasAlpha:!0,_create:function(){if(t.support.iris){var h=this,u=h.element;if(t.extend(h.options,u.data()),"hue"===h.options.type)return h._createHueOnly();h.close=t.proxy(h.close,h),h.initialValue=u.val(),u.addClass("wp-color-picker"),l?(u.hide().wrap(e),h.wrap=u.parent(),h.toggler=t(i).insertBefore(u).css({backgroundColor:h.initialValue}).attr("title",s).attr("data-current",wpColorPickerL10n.current),h.pickerContainer=t(r).insertAfter(u),h.button=t(a).addClass("hidden")):(u.parent("label").length||(u.wrap(""),h.wrappingLabelText=t('').insertBefore(u).text(n)),h.wrappingLabel=u.parent(),h.wrappingLabel.wrap(e),h.wrap=h.wrappingLabel.parent(),h.toggler=t(i).insertBefore(h.wrappingLabel).css({backgroundColor:h.initialValue}),h.toggler.find(".wp-color-result-text").text(s),h.pickerContainer=t(r).insertAfter(h.wrappingLabel),h.button=t(a)),h.options.defaultColor?(h.button.addClass("wp-picker-default").val(p),l||h.button.attr("aria-label",c)):(h.button.addClass("wp-picker-clear").val(d),l||h.button.attr("aria-label",g)),l?u.wrap('').after(h.button):(h.wrappingLabel.wrap('