8889841cclixcotz/benson.clix.co.tz/wp-content/themes/skyhaus/assets/js/customizer/color-picker-alpha.min.js 0000644 00000015216 15052201533 0030523 0 ustar 00 home !function(n){var o,s,a,r,i,l,p,c,d;n.wp.wpColorPicker.prototype._hasAlpha||(void 0===o&&"undefined"!=typeof Skyhaus_ColorPicker_L10n&&(o=Skyhaus_ColorPicker_L10n),s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==",a='
',r='',i='',(l=void 0!==o&&void 0!==o.current)?p='':(p='',c="",d=''),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=t.length<6?("00000"+t).substr(-6):t)},n.widget("wp.wpColorPicker",n.wp.wpColorPicker,{_hasAlpha:!0,_create:function(){if(n.support.iris){var e=this,t=e.element;if(n.extend(e.options,t.data()),"hue"===e.options.type)return e._createHueOnly();e.close=n.proxy(e.close,e),e.initialValue=t.val(),t.addClass("wp-color-picker"),l?(t.hide().wrap(r),e.wrap=t.parent(),e.toggler=n(p).insertBefore(t).css({backgroundColor:e.initialValue}).attr("title",o.pick).attr("data-current",o.current),e.pickerContainer=n(a).insertAfter(t),e.button=n(i).addClass("hidden")):(t.parent("label").length||(t.wrap(c),e.wrappingLabelText=n(d).insertBefore(t).text(o.defaultLabel)),e.wrappingLabel=t.parent(),e.wrappingLabel.wrap(r),e.wrap=e.wrappingLabel.parent(),e.toggler=n(p).insertBefore(e.wrappingLabel).css({backgroundColor:e.initialValue}),e.toggler.find(".wp-color-result-text").text(o.pick),e.pickerContainer=n(a).insertAfter(e.wrappingLabel),e.button=n(i)),e.options.defaultColor?(e.button.addClass("wp-picker-default").val(o.defaultString),l||e.button.attr("aria-label",o.defaultAriaLabel)):(e.button.addClass("wp-picker-clear").val(o.clear),l||e.button.attr("aria-label",o.clearAriaLabel)),l?t.wrap('').after(e.button):(e.wrappingLabel.wrap('').after(e.button),e.inputWrapper=t.closest(".wp-picker-input-wrap")),t.iris({target:e.pickerContainer,hide:e.options.hide,width:e.options.width,mode:e.options.mode,palettes:e.options.palettes,change:function(t,o){e.options.alpha?(e.toggler.css({"background-image":"url("+s+")"}),l?e.toggler.html(''):(e.toggler.css({position:"relative"}),0==e.toggler.find("span.color-alpha").length&&e.toggler.append('')),e.toggler.find("span.color-alpha").css({width:"30px",height:"24px",position:"absolute",top:0,left:0,"border-top-left-radius":"2px","border-bottom-left-radius":"2px",background:o.color.toString()})):e.toggler.css({backgroundColor:o.color.toString()}),n.isFunction(e.options.change)&&e.options.change.call(this,t,o)}}),t.val(e.initialValue),e._addListeners(),e.options.hide||e.toggler.click()}},_addListeners:function(){var o=this;o.wrap.on("click.wpcolorpicker",function(t){t.stopPropagation()}),o.toggler.click(function(){o.toggler.hasClass("wp-picker-open")?o.close():o.open()}),o.element.on("change",function(t){""!==n(this).val()&&!o.element.hasClass("iris-error")||(o.options.alpha?(l&&o.toggler.removeAttr("style"),o.toggler.find("span.color-alpha").css("backgroundColor","")):o.toggler.css("backgroundColor",""),n.isFunction(o.options.clear)&&o.options.clear.call(this,t))}),o.button.on("click",function(t){n(this).hasClass("wp-picker-clear")?(o.element.val(""),o.options.alpha?(l&&o.toggler.removeAttr("style"),o.toggler.find("span.color-alpha").css("backgroundColor","")):o.toggler.css("backgroundColor",""),n.isFunction(o.options.clear)&&o.options.clear.call(this,t),o.element.trigger("change")):n(this).hasClass("wp-picker-default")&&o.element.val(o.options.defaultColor).change()})}}),n.widget("a8c.iris",n.a8c.iris,{_create:function(){var e,t,o,a,r,i;this._super(),this.options.alpha=this.element.data("alpha")||!1,this.element.is(":input")||(this.options.alpha=!1),void 0!==this.options.alpha&&this.options.alpha&&(t=(e=this).element,a=(o=n(' ').appendTo(e.picker.find(".iris-picker-inner"))).find(".iris-slider-offset-alpha"),o={aContainer:o,aSlider:a},void 0!==t.data("custom-width")?e.options.customWidth=parseInt(t.data("custom-width"))||0:e.options.customWidth=100,e.options.defaultWidth=t.width(),(e._color._alpha<1||-1!=e._color.toString().indexOf("rgb"))&&t.width(parseInt(e.options.defaultWidth+e.options.customWidth)),n.each(o,function(t,o){e.controls[t]=o}),e.controls.square.css({"margin-right":"0"}),a=e.picker.width()-e.controls.square.width()-20,r=Math.floor(a/6),i=a/2-r,0