"use strict";function ownKeys(t,o){var e,r=Object.keys(t);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(t),o&&(e=e.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,e)),r}function _objectSpread(t){for(var o=1;o").val(t).html(t)),0'+c(e[i])+"");o.find(".customize-control-adobe-font-selection").val(o.find(".adobe-font-family").val()+"|"+o.find(".adobe-font-weight").val()).trigger("change")}),a(".adobe-font-weight").on("change",function(){var o=a(this).closest(".adobe_fonts_select_control");o.find(".customize-control-adobe-font-selection").val(o.find(".adobe-font-family").val()+"|"+o.find(".adobe-font-weight").val()).trigger("change")})}),jQuery(document).ready(function(t){var e=!1;t(".botiga-devices-preview").find("button").on("click",function(o){return e?e=!1:(e=!0,void(t(this).hasClass("preview-desktop")?(t(".botiga-devices-preview").find(".preview-desktop").addClass("active"),t(".botiga-devices-preview").find(".preview-tablet").removeClass("active"),t(".botiga-devices-preview").find(".preview-mobile").removeClass("active"),t(".font-size-desktop").addClass("active"),t(".font-size-tablet").removeClass("active"),t(".font-size-mobile").removeClass("active"),t('.wp-full-overlay-footer .devices button[data-device="desktop"]').trigger("click")):t(this).hasClass("preview-tablet")?(t(".botiga-devices-preview").find(".preview-tablet").addClass("active"),t(".botiga-devices-preview").find(".preview-desktop").removeClass("active"),t(".botiga-devices-preview").find(".preview-mobile").removeClass("active"),t(".font-size-desktop").removeClass("active"),t(".font-size-tablet").addClass("active"),t(".font-size-mobile").removeClass("active"),t('.wp-full-overlay-footer .devices button[data-device="tablet"]').trigger("click")):(t(".botiga-devices-preview").find(".preview-mobile").addClass("active"),t(".botiga-devices-preview").find(".preview-desktop").removeClass("active"),t(".botiga-devices-preview").find(".preview-tablet").removeClass("active"),t(".font-size-desktop").removeClass("active"),t(".font-size-tablet").removeClass("active"),t(".font-size-mobile").addClass("active"),t('.wp-full-overlay-footer .devices button[data-device="mobile"]').trigger("click"))))}),t(" .wp-full-overlay-footer .devices button ").on("click",function(){if(e)return e=!1;var o=t(this).attr("data-device");t(".botiga-devices-preview").find(".preview-"+o).trigger("click")})}),jQuery(document).ready(function(r){function i(o,t){t='';o.find(".sortable").append(t),o.find(".sortable").find(".repeater:last").slideDown("slow",function(){r(this).find("input").focus()})}function e(o){var t=o.find(".repeater-input").map(function(){return r(this).val()}).toArray();o.find(".customize-control-sortable-repeater").val(t),o.find(".customize-control-sortable-repeater").trigger("change")}r(".botiga-sortable_repeater_control").each(function(){var o=r(this).find(".customize-control-sortable-repeater").val().split(","),t=o.length;if(0 input, #customize-control-custom_palette .custom-palettes .wp-color-result").each(function(){var o=_(this).css("background-color");t.push(o)}):_("#customize-control-color_palettes .saved-palette > span > div, #customize-control-color_palettes .saved-palette span.palette > div").each(function(){var o=_(this).css("background-color");t.push(o)}),t}function p(o){var t;return t=(o=o.replace(/ /g,"")).match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)?(t=100*parseFloat(o.match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)[1]).toFixed(2),parseInt(t)):100}function f(o,t,e,r){var i=t.data("a8cIris"),a=t.data("wpWpColorPicker");i._color._alpha=o,i=i._color.toString(),t.val(i),a.toggler.css({"background-color":i}),r&&h(o,e),t.wpColorPicker("color",i)}function h(o,t){t.slider("value",o),t.find(".ui-slider-handle").text(o.toString())}_(".alpha-color-control").each(function(){var a,r,c=_(this),i=c.val().replace(/\s+/g,""),o=c.attr("data-palette"),n=c.attr("data-show-opacity"),s=c.attr("data-default-color"),o=-1!==o.indexOf("|")?o.split("|"):"false"!=o,l={change:function(o,t){var e,r=c.attr("data-customize-setting-link"),i=c.wpColorPicker("color");s==i&&(e=p(i),a.find(".ui-slider-handle").text(e)),wp.customize(r,function(o){o.set(i)}),d.find(".transparency").css("background-color",t.color.toString("no-alpha"))},palettes:o},d=c.parents(".wp-picker-container:first");c.on("click",function(){var o=_(this),t=u(),t=_objectSpread(_objectSpread({},l),{},{palettes:t});o.wpColorPicker(t),(d=o.closest(".wp-picker-container")).find(".wp-picker-input-wrap").prependTo(d.find(".wp-picker-holder"));var e=o.closest(".wp-picker-container").find(".wp-color-result");e.on("click",function(o){var t=_(this).closest(".wp-picker-container").find("input.wp-color-picker"),e=u();t.data("a8cIris").option("palettes",e)}),_('
').appendTo(d.find(".wp-picker-holder")),a=d.find(".alpha-slider"),r=p(i),r={create:function(o,t){var e=_(this).slider("value");_(this).find(".ui-slider-handle").text(e),_(this).siblings(".transparency ").css("background-color",i)},value:r,range:"max",step:1,min:0,max:100,animate:300},a.slider(r),"true"==n&&a.find(".ui-slider-handle").addClass("show-opacity"),d.find(".min-click-zone").on("click",function(){f(0,c,a,!0)}),d.find(".max-click-zone").on("click",function(){f(100,c,a,!0)}),d.find(".iris-palette").on("click",function(){var o=_(this).css("background-color"),t=p(o);h(t,a),100!=t&&(o=o.replace(/[^,]+(?=\))/,(t/100).toFixed(2))),c.wpColorPicker("color",o)}),d.find(".button.wp-picker-clear").on("click",function(){var o=c.attr("data-customize-setting-link");c.wpColorPicker("color","#ffffff"),wp.customize(o,function(o){o.set("")}),h(100,a)}),d.find(".button.wp-picker-default").on("click",function(){h(p(s),a)}),c.on("input",function(){h(p(_(this).val()),a)}),a.slider().on("slide",function(o,t){f(parseFloat(t.value)/100,c,a,!1),_(this).find(".ui-slider-handle").text(t.value)}),setTimeout(function(){e.trigger("click")},100),c.off("click")})}),Color.prototype.toString=function(o){if("no-alpha"==o)return this.toCSS("rgba","1").replace(/\s+/g,"");if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var t=parseInt(this._color,10).toString(16);if(this.error)return"";if(t.length<6)for(var e=6-t.length-1;0<=e;e--)t="0"+t;return"#"+t}}),jQuery(document).ready(function(e){e(".customize-control-botiga-tab-control").each(function(){e(this).parent().find("li").not(".section-meta").not(".customize-control-botiga-tab-control").addClass("botiga-hide-control");var o=e(this).find(".control-tab-general").data("connected");e.each(o,function(o,t){e(this).removeClass("botiga-hide-control")}),e(this).find(".control-tab").on("click",function(){var o=e(this).data("connected");e(this).addClass("active"),e(this).siblings().removeClass("active"),e(this).parent().parent().parent().find("li").not(".section-meta").not(".customize-control-botiga-tab-control").addClass("botiga-hide-control"),e.each(o,function(o,t){e(this).removeClass("botiga-hide-control")})})})}),jQuery(document).ready(function(e){e(".customize-control-tinymce-editor").each(function(){var o=_wpCustomizeSettings.controls[e(this).attr("id")].botigatb1,t=_wpCustomizeSettings.controls[e(this).attr("id")].botigatb2;_wpCustomizeSettings.controls[e(this).attr("id")].botigatmb;wp.editor.initialize(e(this).attr("id"),{tinymce:{wpautop:!1,toolbar1:o,toolbar2:t},quicktags:!0,mediaButtons:!0})}),e(document).on("tinymce-editor-init",function(o,t){t.on("change",function(o){tinyMCE.triggerSave(),e("#"+t.id).trigger("change")})})}),jQuery(document).ready(function(t){function o(o){"col3"===t(o).val()||"col3-bigleft"===t(o).val()||"col3-bigright"===t(o).val()?(t(".footer-widget-area-link-1, .footer-widget-area-link-2, .footer-widget-area-link-3").show(),t(".footer-widget-area-link-4").hide()):"col4"===t(o).val()||"col4-bigleft"===t(o).val()||"col4-bigright"===t(o).val()?t(".footer-widget-area-link-1, .footer-widget-area-link-2, .footer-widget-area-link-3, .footer-widget-area-link-4").show():"col2"===t(o).val()||"col2-bigleft"===t(o).val()||"col2-bigright"===t(o).val()?(t(".footer-widget-area-link-1, .footer-widget-area-link-2").show(),t(".footer-widget-area-link-4, .footer-widget-area-link-3").hide()):"col1"===t(o).val()?(t(".footer-widget-area-link-1").show(),t(".footer-widget-area-link-4, .footer-widget-area-link-2, .footer-widget-area-link-3").hide()):t(".footer-widget-area-link-1, .footer-widget-area-link-2, .footer-widget-area-link-3, .footer-widget-area-link-4").hide()}o(t("#customize-control-footer_widgets").find("input:checked")),t("#customize-control-footer_widgets").find("input").change(function(){o(t(this))})}),wp.customize("color_palettes",function(x){var j=jQuery("#customize-control-color_palettes").find(".radio-buttons").data("palettes");x.bind(function(){for(var o=x.get(),t=0,e=["custom_color1","scrolltop_bg_color","button_background_color","button_border_color","color_link_default","footer_credits_links_color","single_product_tabs_border_color_active","single_product_tabs_text_color_active","single_product_tabs_text_color","shop_archive_header_button_color","shop_archive_header_button_border_color"];t a").trigger("click"))):(setTimeout(function(){o.focusAccordionOpenControl()},300),this)},getQueryParams:function(o){o=o.split("+").join(" ");for(var t,e={},r=/[?&]?([^=]+)=([^&]*)/g;t=r.exec(o);)e[decodeURIComponent(t[1])]=decodeURIComponent(t[2]);return e}};a(document).ready(function(o){t.init()}),0 .save").trigger("click"))}})}),i(document).on("click",".botiga-adobe_fonts_kit_onoff",function(o){o.preventDefault();var t=i(this),e=t.data("kit"),o=t.data("nonce");i(this).text(t.data("loading-text")),i(this).attr("disabled",!0),i.ajax({type:"post",url:ajaxurl,data:{action:"botiga_typography_adobe_kits_control_enable_disable",kit:e,nonce:o},success:function(o){o.kit_enabled?(t.text(t.data("disable-text")),t.closest(".botiga-adobe_fonts_kits_wrapper-item").removeClass("disabled")):(t.text(t.data("enable-text")),t.closest(".botiga-adobe_fonts_kits_wrapper-item").addClass("disabled")),t.closest(".botiga-adobe_fonts_kits_wrapper-item").find(".reload-message").addClass("show"),t.attr("disabled",!1)}})})});