HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ns3133907 6.8.0-86-generic #87-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep 22 18:03:36 UTC 2025 x86_64
User: cssnetorguk (1024)
PHP: 8.2.28
Disabled: NONE
Upload Files
File: //home/diditleak.co.uk/public_html/wp-content/themes/sydney/js/customize-controls.min.js
"use strict";jQuery(document).ready(function(e){var o=e('li[id^="accordion-panel-sydney_panel_cpt_"]');o.first().css("margin-top","10px"),o.last().css("margin-bottom","10px")}),jQuery(document).ready(function(){jQuery('.customize-control-checkbox-multiple input[type="checkbox"]').on("change",function(){checkbox_values=jQuery(this).parents(".customize-control").find('input[type="checkbox"]:checked').map(function(){return this.value}).get().join(","),jQuery(this).parents(".customize-control").find('input[type="hidden"]').val(checkbox_values).trigger("change")})}),jQuery(document).ready(function(e){function o(e){var o={font:e.find(".google-fonts-list").val(),regularweight:e.find(".google-fonts-regularweight-style").val(),category:e.find(".google-fonts-category").val()};e.find(".customize-control-google-font-selection").val(JSON.stringify(o)).trigger("change")}e(".google-fonts-list").each(function(o,t){e(this).hasClass("select2-hidden-accessible")||e(this).select2()}),e(".google-fonts-list").on("change",function(){var t=e(this).parent().parent().find(".google-fonts-regularweight-style"),n=e(this).val(),s=e(this).attr("control-name");t.empty();var i=_wpCustomizeSettings.controls[s],a=e.map(i.sydneyfontslist,function(e,o){if(e.family===n)return o}),c=a[0];e.each(i.sydneyfontslist[c].variants,function(o,n){t.append(e("<option></option>").val(n).html(n)),e(t).find('option[value="regular"]').length>0?e(t).val("regular"):e(t).find('option[value="400"]').length>0?e(t).val("400"):e(t).find('option[value="300"]').length>0&&e(t).val("300")}),e(this).parent().parent().find(".google-fonts-category").val(i.sydneyfontslist[c].category),o(e(this).parent().parent().parent().parent())}),e(".google_fonts_select_control select").on("change",function(){o(e(this).parent().parent().parent().parent())})}),jQuery(document).ready(function(e){let o=!1;e(".sydney-devices-preview").find("button").on("click",function(t){if(o)return o=!1,!1;o=!0;e(this).hasClass("preview-desktop")?(e(".sydney-devices-preview").find(".preview-desktop").addClass("active"),e(".sydney-devices-preview").find(".preview-tablet").removeClass("active"),e(".sydney-devices-preview").find(".preview-mobile").removeClass("active"),e(".font-size-desktop").addClass("active"),e(".font-size-tablet").removeClass("active"),e(".font-size-mobile").removeClass("active"),e('.wp-full-overlay-footer .devices button[data-device="desktop"]').trigger("click")):e(this).hasClass("preview-tablet")?(e(".sydney-devices-preview").find(".preview-tablet").addClass("active"),e(".sydney-devices-preview").find(".preview-desktop").removeClass("active"),e(".sydney-devices-preview").find(".preview-mobile").removeClass("active"),e(".font-size-desktop").removeClass("active"),e(".font-size-tablet").addClass("active"),e(".font-size-mobile").removeClass("active"),e('.wp-full-overlay-footer .devices button[data-device="tablet"]').trigger("click")):(e(".sydney-devices-preview").find(".preview-mobile").addClass("active"),e(".sydney-devices-preview").find(".preview-desktop").removeClass("active"),e(".sydney-devices-preview").find(".preview-tablet").removeClass("active"),e(".font-size-desktop").removeClass("active"),e(".font-size-tablet").removeClass("active"),e(".font-size-mobile").addClass("active"),e('.wp-full-overlay-footer .devices button[data-device="mobile"]').trigger("click"))}),e(" .wp-full-overlay-footer .devices button ").on("click",function(){if(o)return o=!1,!1;var t=e(this).attr("data-device");e(".sydney-devices-preview").find(".preview-"+t).trigger("click")})}),jQuery(document).ready(function(e){function o(o){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n='<div class="repeater" style="display:none"><input type="text" value="'+t+'" class="repeater-input" placeholder="https://" /><span class="dashicons dashicons-menu"></span><a class="customize-control-sortable-repeater-delete" href="#"><span class="dashicons dashicons-no-alt"></span></a></div>';o.find(".sortable").append(n),o.find(".sortable").find(".repeater:last").slideDown("slow",function(){e(this).find("input").focus()})}function t(o){var t=o.find(".repeater-input").map(function(){return e(this).val()}).toArray();o.find(".customize-control-sortable-repeater").val(t),o.find(".customize-control-sortable-repeater").trigger("change")}e(".sydney-sortable_repeater_control").each(function(){var t,n=e(this).find(".customize-control-sortable-repeater").val().split(","),s=n.length;if(s>0&&(e(this).find(".repeater-input").val(n[0]),s>1))for(t=1;t<s;++t)o(e(this),n[t])}),e(this).find(".sydney-sortable_repeater.sortable").sortable({update:function(o,n){t(e(this).parent())}}),e(".sydney-sortable_repeater.sortable").on("click",".customize-control-sortable-repeater-delete",function(o){o.preventDefault();var n=e(this).parent().parent().find(".repeater").length;n>1?e(this).parent().slideUp("fast",function(){var o=e(this).parent().parent();e(this).remove(),t(o)}):(e(this).parent().find(".repeater-input").val(""),t(e(this).parent().parent().parent()))}),e(".customize-control-sortable-repeater-add").click(function(n){n.preventDefault(),o(e(this).parent()),t(e(this).parent())}),e(".sydney-sortable_repeater.sortable").change(function(){t(e(this).parent())}),e(".sydney-sortable_repeater.sortable").on("blur",".repeater-input",function(){var o=e(this),t=o.val();t&&!t.match(/^.+:\/\/.*/)&&o.val("https://"+t).trigger("change")})}),jQuery(document).ready(function(e){var o=e(".sydney-color-control");if(o.length&&Pickr){var t=function(){var o=[];return e("#customize-control-custom_palette .sydney-color-input").each(function(){o.push(e(this).val().toLowerCase())}),o},n=e(".global-colors-dropdown");n.each(function(){var o=t(),n=e(this),s=n.data("element"),i=n.next(".sydney-connected-global").val();e.each(o,function(e,o){n.append('<div class="global-color" data-global-setting="global_color_'+(e+1)+'" data-color="'+o+'"><span style="display:flex;align-items:center;"><span class="color-circle" style="background-color:'+o+'"></span>Global color '+(e+1)+'</span><span class="color-value">'+o+"</span></div>"),i=="global_color_"+(e+1)&&(n.find(".global-color").eq(e).addClass("active"),n.prev(".dashicons").addClass("active"))}),n.on("click",".global-color",function(){var o=e(this),t=o.parent().next(".sydney-connected-global");o.parent().prev(".dashicons").addClass("active"),o.toggleClass("active").siblings().removeClass("active"),o.hasClass("active")?(t.val(o.data("global-setting")),sydneyChangeElementColors(s,o.data("color"))):(t.val(""),o.parent().prev(".dashicons").removeClass("active")),t.trigger("change")})}),e(".sydney-global-control .dashicons").on("click",function(){e(this).next(".global-colors-dropdown").toggleClass("show"),e(".global-colors-dropdown").not(e(this).next(".global-colors-dropdown")).removeClass("show")}),e(document).on("click",function(o){e(o.target).closest(".sydney-global-control").length||e(".global-colors-dropdown").removeClass("show")}),o.each(function(){var o,t=e(this),n=t.find(".sydney-color-picker");n.on("click",function(){if(!o){var e=t.find(".sydney-color-input"),s=wp.customize(e.data("customize-setting-link")),i=new Pickr({el:n.get(0),container:"body",theme:"sydney",default:e.val()||"",position:"bottom-end",appClass:"sydney-pcr-app",sliders:"h",useAsButton:!0,components:{hue:!0,preview:!0,opacity:!0,interaction:{input:!0,clear:!0}},i18n:{"btn:clear":"Default"}});i.on("change",function(o){var t;1===o.a?(i.setColorRepresentation("HEX"),t=o.toHEXA().toString(0)):(i.setColorRepresentation("RGBA"),t=o.toRGBA().toString(0)),n.css({"background-color":t}),e.val(t),s.set(t)}),i.on("change",function(e,o){"slider"===o&&(n.parent().prev(".sydney-global-control").find(".dashicons").removeClass("active"),n.parent().prev(".sydney-global-control").find(".sydney-connected-global").val(""),n.parent().prev(".sydney-global-control").find(".global-color").removeClass("active"))}),i.on("clear",function(){var o=n.data("default-color");o?i.setColor(o):(n.css({"background-color":"white"}),e.val(""),s.set(""))}),n.data("pickr",i),setTimeout(function(){i.show()}),o=!0}})})}}),jQuery(document).ready(function(e){e(".customize-control-sydney-tab-control").each(function(){e(this).parent().find("li").not(".section-meta").not(".customize-control-sydney-tab-control").addClass("sydney-hide-control");var o=e(this).find(".control-tab-general").data("connected");e.each(o,function(o,t){e(this).removeClass("sydney-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-sydney-tab-control").addClass("sydney-hide-control"),e.each(o,function(o,t){e(this).removeClass("sydney-hide-control")})})})}),jQuery(document).ready(function(e){e(".customize-control-tinymce-editor").each(function(){var o=_wpCustomizeSettings.controls[e(this).attr("id")].sydneytb1,t=_wpCustomizeSettings.controls[e(this).attr("id")].sydneytb2;_wpCustomizeSettings.controls[e(this).attr("id")].sydneytmb;wp.editor.initialize(e(this).attr("id"),{tinymce:{wpautop:!0,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(e){function o(o){"3"===e(o).val()||"col3-bigleft"===e(o).val()||"col3-bigright"===e(o).val()?(e(".footer-widget-area-link-1, .footer-widget-area-link-2, .footer-widget-area-link-3").show(),e(".footer-widget-area-link-4").hide()):"4"===e(o).val()||"col4-bigleft"===e(o).val()||"col4-bigright"===e(o).val()?e(".footer-widget-area-link-1, .footer-widget-area-link-2, .footer-widget-area-link-3, .footer-widget-area-link-4").show():"2"===e(o).val()||"col2-bigleft"===e(o).val()||"col2-bigright"===e(o).val()?(e(".footer-widget-area-link-1, .footer-widget-area-link-2").show(),e(".footer-widget-area-link-4, .footer-widget-area-link-3").hide()):"1"===e(o).val()?(e(".footer-widget-area-link-1").show(),e(".footer-widget-area-link-4, .footer-widget-area-link-2, .footer-widget-area-link-3").hide()):e(".footer-widget-area-link-1, .footer-widget-area-link-2, .footer-widget-area-link-3, .footer-widget-area-link-4").hide()}var t=e("#customize-control-footer_widget_areas").find("input:checked");o(t),e("#customize-control-footer_widget_areas").find("input").change(function(){o(e(this))})}),wp.customize("color_palettes",function(e){var o=jQuery("#customize-control-color_palettes").find(".radio-buttons").data("palettes");e.bind(function(){for(var t=e.get(),n=["custom_color1","scrolltop_bg_color","button_background_color","button_border_color","color_link_default"],s=0,i=n;s<i.length;s++){var a=i[s];wp.customize(a).set(o[t][0]),jQuery("#customize-control-"+a).find(".wp-color-result").css("background-color",o[t][0])}for(var c=["custom_color2","footer_widgets_links_hover_color","scrolltop_bg_color_hover","button_background_color_hover","button_border_color_hover","color_link_hover"],r=0,l=c;r<l.length;r++){var d=l[r];wp.customize(d).set(o[t][1]),jQuery("#customize-control-"+d).find(".wp-color-result").css("background-color",o[t][1])}for(var u=["single_post_title_color","custom_color3","main_header_submenu_color","offcanvas_menu_color","mobile_header_color","footer_widgets_title_color","single_product_title_color","color_forms_text","shop_product_product_title","loop_post_meta_color","loop_post_title_color","main_header_color","site_title_color","site_description_color","color_heading_1","color_heading_2","color_heading_3","color_heading_4","color_heading_5","color_heading_6"],p=0,h=u;p<h.length;p++){var y=h[p];wp.customize(y).set(o[t][2]),jQuery("#customize-control-"+y).find(".wp-color-result").css("background-color",o[t][2])}for(var m=["custom_color4","footer_widgets_links_color","footer_widgets_text_color","color_body_text","footer_credits_text_color","color_forms_placeholder"],f=0,_=m;f<_.length;f++){var v=_[f];wp.customize(v).set(o[t][3]),jQuery("#customize-control-"+v).find(".wp-color-result").css("background-color",o[t][3])}for(var g=["custom_color5","color_forms_borders"],b=0,w=g;b<w.length;b++){var k=w[b];wp.customize(k).set(o[t][4]),jQuery("#customize-control-"+k).find(".wp-color-result").css("background-color",o[t][4])}for(var z=["custom_color6","footer_widgets_background","footer_credits_background","content_cards_background"],C=0,j=z;C<j.length;C++){var x=j[C];wp.customize(x).set(o[t][5]),jQuery("#customize-control-"+x).find(".wp-color-result").css("background-color",o[t][5])}for(var Q=["custom_color7","background_color","button_color","button_color_hover","scrolltop_color","scrolltop_color_hover","color_forms_background"],S=0,T=Q;S<T.length;S++){var E=T[S];wp.customize(E).set(o[t][6]),jQuery("#customize-control-"+E).find(".wp-color-result").css("background-color",o[t][6])}for(var D=["custom_color8","main_header_submenu_background","main_header_background","main_header_bottom_background","mobile_header_background","offcanvas_menu_background"],H=0,P=D;H<P.length;H++){var A=P[H];wp.customize(A).set(o[t][7]),jQuery("#customize-control-"+A).find(".wp-color-result").css("background-color",o[t][7])}})}),wp.customize.bind("ready",function(){wp.customize("custom_color1",function(e){e.bind(function(e){for(var o=["scrolltop_bg_color","button_background_color","button_border_color","color_link_default"],t=0,n=o;t<n.length;t++){var s=n[t];wp.customize(s).set(e),jQuery("#customize-control-"+s).find(".wp-color-result").css("background-color",e)}})}),wp.customize("custom_color2",function(e){e.bind(function(e){for(var o=["footer_widgets_links_hover_color","scrolltop_bg_color_hover","button_background_color_hover","button_border_color_hover","color_link_hover"],t=0,n=o;t<n.length;t++){var s=n[t];wp.customize(s).set(e),jQuery("#customize-control-"+s).find(".wp-color-result").css("background-color",e)}})}),wp.customize("custom_color3",function(e){e.bind(function(e){for(var o=["main_header_submenu_color","offcanvas_menu_color","mobile_header_color","footer_widgets_title_color","single_product_title_color","color_forms_text","shop_product_product_title","loop_post_meta_color","loop_post_title_color","main_header_color","site_title_color","site_description_color","color_heading_1","color_heading_2","color_heading_3","color_heading_4","color_heading_5","color_heading_6"],t=0,n=o;t<n.length;t++){var s=n[t];wp.customize(s).set(e),jQuery("#customize-control-"+s).find(".wp-color-result").css("background-color",e)}})}),wp.customize("custom_color4",function(e){e.bind(function(e){for(var o=["footer_widgets_links_color","footer_widgets_text_color","color_body_text","footer_credits_text_color","color_forms_placeholder"],t=0,n=o;t<n.length;t++){var s=n[t];wp.customize(s).set(e),jQuery("#customize-control-"+s).find(".wp-color-result").css("background-color",e)}})}),wp.customize("custom_color5",function(e){e.bind(function(e){for(var o=["color_forms_borders"],t=0,n=o;t<n.length;t++){var s=n[t];wp.customize(s).set(e),jQuery("#customize-control-"+s).find(".wp-color-result").css("background-color",e)}})}),wp.customize("custom_color6",function(e){e.bind(function(e){for(var o=["footer_widgets_background","footer_credits_background","content_cards_background"],t=0,n=o;t<n.length;t++){var s=n[t];wp.customize(s).set(e),jQuery("#customize-control-"+s).find(".wp-color-result").css("background-color",e)}})}),wp.customize("custom_color7",function(e){e.bind(function(e){for(var o=["background_color","button_color","button_color_hover","scrolltop_color","scrolltop_color_hover","color_forms_background"],t=0,n=o;t<n.length;t++){var s=n[t];wp.customize(s).set(e),jQuery("#customize-control-"+s).find(".wp-color-result").css("background-color",e)}})}),wp.customize("custom_color8",function(e){e.bind(function(e){for(var o=["main_header_submenu_background","main_header_background","main_header_bottom_background","mobile_header_background","offcanvas_menu_background"],t=0,n=o;t<n.length;t++){var s=n[t];wp.customize(s).set(e),jQuery("#customize-control-"+s).find(".wp-color-result").css("background-color",e)}})})}),jQuery(document).ready(function(e){e(".wp-picker-input-wrap").each(function(){e(this).prependTo(e(this).next(".wp-picker-holder"))})}),jQuery(document).ready(function(e){var o=e(".saved-palette");e(".saved-palette").on("click",function(){e(".palette-radio-buttons").toggleClass("open")}),e(".palette-radio-buttons").find(".palette").on("click",function(){o.empty(),e(".palette-radio-buttons").removeClass("open");var t=e(this).parent().clone();t.unwrap().appendTo(o).find("input").remove()})}),jQuery(document).ready(function(e){var o={init:function(){this.firstTime=!0,this.initialized||this.events(),this.initialized=!0},events:function(){var o=this;return e(document).on("click",".sydney-accordion-title",function(){var t=e(this);e(this).hasClass("expanded")&&(o.showOrHide(e(this),"hide"),e(this).removeClass("expanded").addClass("collapse"),setTimeout(function(){t.removeClass("collapse")},300)),e(this).hasClass("collapse")||(e(".sydney-accordion-item").addClass("sydney-accordion-hide"),e(".sydney-accordion-title").removeClass("expanded"),o.showOrHide(e(this),"show"),t.addClass("expanded"))}),e(document).on("click",".control-section",function(t){var n=e(".control-section.open");o.firstTime&&n.find(".sydney-accordion-title").length&&n.find(".sydney-accordion-title").each(function(){o.showOrHide(e(this),"hide"),e(this).removeClass("expanded"),o.firstTime=!1})}),e(document).on("click",".customize-section-back",function(){o.firstTime=!0}),this},showOrHide:function(o,t){var n="";n=o.closest(".customize-control").next();var s=[];if(n.attr("id")=="customize-control-"+o.data("until"))s.push(n[0].id);else for(;n.attr("id")!="customize-control-"+o.data("until");)s.push(n[0].id),n=n.next();s.length>=1&&s.push(n[0].id);for(var i=0;i<s.length;i++)e("#"+s[i]).addClass("sydney-accordion-item active"),"hide"==t?e("#"+s[i]).addClass("sydney-accordion-hide"):e("#"+s[i]).removeClass("sydney-accordion-hide"),0==i&&e("#"+s[i]).addClass("sydney-accordion-first-item"),(i==s.length-1&&s.length>1||1==s.length)&&e("#"+s[i]).addClass("sydney-accordion-last-item");return this}};e(document).ready(function(){o.init()})}),jQuery(document).ready(function(e){e(".customize-control-sydney-toggle-control").each(function(){e(this).find("label").on("keydown",function(o){var t="Enter"===o.key||13===o.keyCode;t&&e(this).click()})}),e(".customize-control-sydney-radio-buttons").each(function(){e(this).find("label").on("keydown",function(o){var t="Enter"===o.key||13===o.keyCode;t&&e(this).click()})})}),jQuery(document).ready(function(e){e(document).on("sydney-display-conditions-select2-initalize",function(o,t){var n=e(t),s=(n.closest(".sydney-display-conditions-control"),n.find(".sydney-display-conditions-select2-type")),i=s.find("select"),a=n.find(".sydney-display-conditions-select2-condition"),c=a.find("select"),r=n.find(".sydney-display-conditions-select2-id"),l=r.find("select");i.select2({width:"100%",minimumResultsForSearch:-1}),i.on("select2:select",function(e){s.attr("data-type",e.params.data.id)}),c.select2({width:"100%"}),c.on("select2:select",function(o){var t=e(o.params.data.element);t.data("ajax")?r.removeClass("hidden"):r.addClass("hidden"),l.val(null).trigger("change")});var d=c.find(":selected").data("ajax");d&&r.removeClass("hidden"),l.select2({width:"100%",placeholder:"",allowClear:!0,minimumInputLength:1,ajax:{url:ajaxurl,dataType:"json",delay:250,cache:!0,data:function(e){return{action:"sydney_display_conditions_select_ajax",term:e.term,nonce:syd_data.ajax_nonce,source:c.val()}},processResults:function(e,o){return e.success?{results:e.data}:{}}}})}),e(document).on("click",".sydney-display-conditions-modal-toggle",function(o){o.preventDefault();var t=e(this),n=wp.template("sydney-display-conditions-template"),s=t.closest(".sydney-display-conditions-control"),i=s.find(".sydney-display-conditions-modal");if(i.data("initialized"))i.toggleClass("open");else{s.append(n(s.data("condition-settings")));var a=s.find(".sydney-display-conditions-modal-content-list-item").not(".hidden");a.length&&a.each(function(){e(document).trigger("sydney-display-conditions-select2-initalize",this)}),i=s.find(".sydney-display-conditions-modal"),i.data("initialized",!0),i.addClass("open")}}),e(document).on("click",".sydney-display-conditions-modal",function(o){o.preventDefault();var t=e(this);e(o.target).is(t)&&t.removeClass("open")}),e(document).on("click",".sydney-display-conditions-modal-add",function(o){o.preventDefault();var t=e(this),n=t.closest(".sydney-display-conditions-control"),s=n.find(".sydney-display-conditions-modal"),i=s.find(".sydney-display-conditions-modal-content-list"),a=s.find(".sydney-display-conditions-modal-content-list-item").first().clone(),c=t.data("condition-group");a.removeClass("hidden"),a.find(".sydney-display-conditions-select2-condition").not('[data-condition-group="'+c+'"]').remove(),i.append(a),e(document).trigger("sydney-display-conditions-select2-initalize",a)}),e(document).on("click",".sydney-display-conditions-modal-remove",function(o){o.preventDefault();var t=e(this).closest(".sydney-display-conditions-modal-content-list-item");t.remove()}),e(document).on("click",".sydney-display-conditions-modal-save",function(o){o.preventDefault();var t=[],n=e(this),s=n.closest(".sydney-display-conditions-control"),i=s.find(".sydney-display-conditions-modal"),a=s.find(".sydney-display-conditions-textarea"),c=i.find(".sydney-display-conditions-modal-content-list-item").not(".hidden");c.each(function(){var o=e(this);t.push({type:o.find('select[name="type"]').val(),condition:o.find('select[name="condition"]').val(),id:o.find('select[name="id"]').val()})}),a.val(JSON.stringify(t)).trigger("change")})}),jQuery(document).ready(function(e){var o=["header_divider_1","main_header_settings_title","header_container","enable_sticky_header","sticky_header_type","transparent_header"],t=["main_header_menu_position"];wp.customize("header_layout_desktop",function(n){n.bind(function(t){e.each(o,function(e,o){var n=wp.customize.control(o);n&&("header_layout_6"===t||"header_layout_7"===t?n.deactivate():n.activate())})}),n.bind(function(o){e.each(t,function(e,t){"header_layout_2"===o?wp.customize.control(t).activate():wp.customize.control(t).deactivate()})}),n.bind(function(e){"header_layout_1"===e||"header_layout_2"===e?wp.customize.control("header_components_l1").activate():wp.customize.control("header_components_l1").deactivate()}),n.bind(function(e){"header_layout_3"===e?(wp.customize.control("header_components_l3left").activate(),wp.customize.control("header_components_l3right").activate()):(wp.customize.control("header_components_l3left").deactivate(),wp.customize.control("header_components_l3right").deactivate())}),n.bind(function(e){"header_layout_4"===e?(wp.customize.control("header_components_l4top").activate(),wp.customize.control("header_components_l4bottom").activate()):(wp.customize.control("header_components_l4top").deactivate(),wp.customize.control("header_components_l4bottom").deactivate())}),n.bind(function(e){"header_layout_5"===e?(wp.customize.control("header_components_l5topleft").activate(),wp.customize.control("header_components_l5topright").activate(),wp.customize.control("header_components_l5bottom").activate()):(wp.customize.control("header_components_l5topleft").deactivate(),wp.customize.control("header_components_l5topright").deactivate(),wp.customize.control("header_components_l5bottom").deactivate())})})}),wp.customize("enable_sticky_header",function(e){e.bind(function(e){!0===e?wp.customize.control("sticky_header_type").activate():wp.customize.control("sticky_header_type").deactivate()})}),jQuery(document).ready(function(e){wp.customize("enable_top_menu_typography",function(o){var t=["sydney_menu_font","menu_items_text_transform","sydney_menu_font_size","sydney_header_menu_adobe_font"];o.bind(function(o){!0===o?e.each(t,function(e,o){wp.customize.control(o).activate()}):e.each(t,function(e,o){wp.customize.control(o).deactivate()})})})}),jQuery(document).ready(function(e){wp.customize("blog_layout",function(e){e.bind(function(e){"layout3"===e||"layout5"===e||"layout7"===e?wp.customize.control("archives_grid_columns").activate():wp.customize.control("archives_grid_columns").deactivate()}),e.bind(function(e){"layout4"===e?wp.customize.control("archive_list_image_placement").activate():wp.customize.control("archive_list_image_placement").deactivate()}),e.bind(function(e){"layout4"===e||"layout6"===e?(wp.customize.control("archives_list_vertical_alignment").activate(),wp.customize.control("archive_featured_image_size").activate()):(wp.customize.control("archives_list_vertical_alignment").deactivate(),wp.customize.control("archive_featured_image_size").deactivate())})})}),jQuery(document).ready(function(e){var o=e('<div class="sydney-upsell-feature-wrapper" style="margin:5px 15px 15px;"><h3 style="max-width:100%;"><em>Take your site to the next level with Sydney Pro!</em></h3><p>You’ll get access to:</p><ul class="sydney-upsell-features"><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>Templates Builder</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>Breadcrumbs</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>Unlimited Sidebars</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>Modal Popup</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>Live Chat module</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>Offcanvas Content</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>Mailchimp support</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span><a href="https://athemes.com/sydney-upgrade/#features?utm_source=theme_customizer_deep&amp;utm_medium=sydney_customizer&amp;utm_campaign=Sydney" target="_blank">&hellip;and many more premium features</a></li></ul><p><a href="https://athemes.com/sydney-upgrade/?utm_source=theme_customizer_deep&amp;utm_medium=sydney_customizer&amp;utm_campaign=Sydney" role="button" class="button-secondary deep-upsell-button button" target="_blank">Upgrade to Sydney Pro</a></p></div>');o.appendTo("#sub-accordion-panel-sydney_panel_general");var t=e('<div class="sydney-upsell-feature-wrapper" style="margin:5px 15px 15px;"><h3><em>Take your store to the next level with Sydney Pro!</em></h3><p>You’ll get access to:</p><ul class="sydney-upsell-features"><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>Wishlist</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>Product Swatch</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>Product Gallery Layouts</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>Multistep checkout</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>Single sticky add to cart</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>Shop header styles</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>Product tab styles</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>More Shop pagination types</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>Advanced reviews</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>Extra single product elements</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>Extra shop sidebar layouts</li><li class="sydney-hide-control"><span class="dashicons dashicons-yes"></span>AJAX product search</li><a target="_blank" href="https://athemes.com/sydney-upgrade/#features?utm_source=theme_customizer_deep&amp;utm_medium=sydney_customizer&amp;utm_campaign=Sydney">&hellip;and many more premium features</a></ul><p><a href="https://athemes.com/sydney-upgrade/?utm_source=theme_customizer_deep&amp;utm_medium=sydney_customizer&amp;utm_campaign=Sydney" role="button" class="button-secondary deep-upsell-button button" target="_blank">Upgrade Now</a></p></div>');t.appendTo("#sub-accordion-panel-woocommerce")});var sydneyChangeElementColors=function(e,o,t){var n=jQuery('[data-control-id="'+e+'"]');if(n.length){if(t){var s=t.indexOf(o);t[s]&&(o=t[s])}var i=n.find(".sydney-color-picker");i.data("pickr")?i.data("pickr").setColor(o):(i.css("background-color",o),wp.customize(e).set(o))}else{var a=jQuery("#customize-control-"+e);if(a.length&&a.hasClass("global-color-connected")){i=a.find(".sydney-color-picker");i.data("pickr")?(i.data("pickr").setColor(o),wp.customize(e).set(o)):(i.css("background-color",o),wp.customize(e).set(o))}}};wp.customize.bind("ready",function(){for(let e=1;e<=9;e++)wp.customize("global_color_"+e,function(o){o.bind(function(o){let t=[];jQuery(".sydney-connected-global").each(function(){jQuery(this).val()==="global_color_"+e&&t.push(jQuery(this).data("customize-setting-link").replace("global_",""))});for(const e of t)void 0!==wp.customize(e)&&sydneyChangeElementColors(e,o);jQuery(".global-colors-dropdown").each(function(){var t=jQuery(this);t.find(".global-color").each(function(){var t=jQuery(this);t.data("global-setting")==="global_color_"+e&&(t.data("color",o),t.find(".color-circle").css("background-color",o),t.find(".color-value").text(o))})})})})}),jQuery(document).ready(function(e){var o=syd_data.sortable_config;e.each(o,function(o,t){e("#customize-control-"+o).length&&e.each(t,function(t,n){e.each(n.controls,function(n,s){e("#customize-control-"+o+' .kirki-sortable-item[data-value="'+t+'"]').find(".toggle-options").show();var i=e("#customize-control-"+s);i.length&&(i.addClass("sortable-child-hidden"),i.css("position","absolute"))})})}),e(".kirki-sortable-item .toggle-options").click(function(){var t=e(this).parent(),n=t.data("value");if(t.toggleClass("sortable-opened"),!t.hasClass("invisible")){var s=t.closest(".customize-pane-child"),i=t.outerHeight(),a=t.get(0).offsetTop,c=s.get(0).offsetTop,r=a-c+i+1;e(this).toggleClass("dashicons-arrow-down-alt2 dashicons-arrow-up-alt2"),e.each(o,function(o,s){t.parents(".customize-control").attr("id").includes(o)&&e.each(s,function(o,t){if(n===o){var s=e("#customize-control-"+t.controls[0]),i=s.hasClass("sortable-child-toggled");e(".customize-control.sortable-child-toggled").each(function(){e(this).removeClass("sortable-child-toggled"),e(this).addClass("sortable-child-hidden")});var a=0;e.each(t.controls,function(o,n){var s=e("#customize-control-"+n),c=s.prev();i||(s.addClass("sortable-child-toggled"),s.removeClass("sortable-child-hidden"),0===o?(s.addClass("first-control"),s.css({top:r+"px",right:"25px"})):(a+=c.outerHeight(),s.css({top:r+a+"px",right:"25px"}),"header_search_field_style"===n&&s.css({top:r+a-c.outerHeight()+"px"})),o===t.controls.length-1&&s.addClass("last-control"))})}})})}}),e(document).on("click mousedown",function(o){if(e(o.target).hasClass("sortable-opened")){if(e(o.target).hasClass("invisible"))return;e(o.target).removeClass("sortable-opened"),e(o.target).find(".toggle-options").toggleClass("dashicons-arrow-down-alt2 dashicons-arrow-up-alt2"),e(".customize-control.sortable-child-toggled").each(function(){e(this).removeClass("sortable-child-toggled"),e(this).addClass("sortable-child-hidden")})}})});