!function(e,t,a){"use strict";a(document).ready((function(){var n;!function(){if(window.alpus_admin_vars&&alpus_admin_vars.page_links)for(const t in alpus_admin_vars.page_links)alpus_admin_vars.page_links[t].is_panel?e.panel(t)&&e.panel(t).expanded.bind((function(a){a&&alpus_admin_vars.page_links[t].url&&alpus_admin_vars.page_links[t].url!=e.previewer.previewUrl()&&e.previewer.previewUrl.set(alpus_admin_vars.page_links[t].url)})):e.section(t)&&e.section(t).expanded.bind((function(a){a&&alpus_admin_vars.page_links[t].url&&alpus_admin_vars.page_links[t].url!=e.previewer.previewUrl()&&e.previewer.previewUrl.set(alpus_admin_vars.page_links[t].url)}))}(),function(){function e(){var e=a("#customize-control-cs_menu_labels #label-select").children("option"),t={};e.length&&e.map((function(){t[a(this).text()]=a(this).val()}));var n=window.top.document.querySelector("#customize-control-menu_labels input"),o=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;"{}"==JSON.stringify(t)?o.call(n,""):o.call(n,JSON.stringify(t));var i=new Event("input",{bubbles:!0});n.dispatchEvent(i)}a(document.body).on("click","#customize-control-cs_new_menu_label .btn-add-label",(function(t){t.preventDefault();var n=function(){var e=a("#customize-control-menu_labels input").val();return e?JSON.parse(e):{}}(),o=a("#customize-control-cs_new_menu_label .label-text").val(),i=a("#customize-control-cs_new_menu_label .alpus-color-picker").val();o&&i?null!=n[o]?alert("This label already exists. Please add another one."):(a("#customize-control-cs_menu_labels select").children().prop("selected",!1),a("#customize-control-cs_menu_labels select").append('"),e(),a("#customize-control-cs_new_menu_label .label-text, #customize-control-cs_new_menu_label .alpus-color-picker").val(""),a("#customize-control-cs_new_menu_label .wp-color-result").css("background-color",""),a("#customize-control-cs_menu_labels #label-select").trigger("change")):alert("Please input label text and label color")})).on("click","#customize-control-cs_menu_labels .btn-change-label",(function(t){t.preventDefault();var n=a("#customize-control-cs_menu_labels .menu-label .label-text").val(),o=a("#customize-control-cs_menu_labels .menu-label .alpus-color-picker").val();n&&o&&(a("#customize-control-cs_menu_labels select option:selected").val(o).text(n),e())})).on("click","#customize-control-cs_menu_labels .btn-remove-label",(function(t){t.preventDefault();var n=a("#customize-control-cs_menu_labels select option:selected").text(),o=a("#customize-control-cs_menu_labels select option:selected").val();n&&o&&(a("#customize-control-cs_menu_labels select option[value="+o+"]").remove(),e(),a("#customize-control-cs_menu_labels select option").eq(0).prop("selected",!0),a("#customize-control-cs_menu_labels #label-select").trigger("change"))})).on("change","#customize-control-cs_menu_labels #label-select",(function(e){e.preventDefault(),a("#customize-control-cs_menu_labels .label-text").val(a(this).find("option:selected").text()),a("#customize-control-cs_menu_labels .alpus-color-picker").val(a(this).val()),a("#customize-control-cs_menu_labels .wp-color-result").css("background-color",a(this).val())}))}(),a(document.body).on("input","#customize-control-import_src input, #customize-control-export_src input",(function(e){a(this).closest("li").next().find("button").attr("disabled",!a(this).val())})).on("click","#alpus-import-options",(function(e){if(e.preventDefault(),a("#customize-control-import_src input").val()){if(confirm("Are you sure to import another theme options? All current options will be overwritten.")){var t=a(this);a(this).attr("disabled","disabled");var n=new FormData;n.append("wp_customize","on"),n.append("action","alpus_import_theme_options"),n.append("nonce",alpus_customizer_vars.nonce),n.append("file",a("#customize-control-import_src input")[0].files[0]),a.ajax({url:alpus_customizer_vars.ajax_url,data:n,type:"post",contentType:!1,processData:!1,success:function(e){t.removeAttr("disabled"),alert("Theme options imported seccessfully."),window.location.reload()}}).fail((function(e){alert("Something went wrong while importing theme options."),console.log(e)}))}}else alert("Please input source file pathname.")})).on("click","#alpus-reset-options",(function(e){e.preventDefault(),confirm("Are you sure to reset all theme options?")&&(a(this).attr("disabled","disabled"),a.ajax({url:alpus_customizer_vars.ajax_url,data:{wp_customize:"on",action:"alpus_reset_theme_options",nonce:alpus_customizer_vars.nonce},type:"post",success:function(e){window.location.reload()}}).fail((function(e){console.log(e)})))})),a(".customize-pane-child .accordion-section-title .panel-title").add(".customize-pane-child .customize-section-title h3").append(''),a(".customizer-nav-item").each((function(){a("#sub-accordion-"+("section"==a(this).data("type")?"section":"panel")+"-"+a(this).data("target")+" .section-nav-status").addClass("active")})),a(document.body).on("click",".navigator-toggle",(function(e){e.preventDefault(),a(this).closest(".customizer-nav").toggleClass("active")})).on("click",".customizer-nav-item",(function(t){t.preventDefault(),e[a(this).data("type")](a(this).data("target")).focus()})).on("click",".section-nav-status",(function(t){var n=a(this);if(t.preventDefault(),!n.hasClass("disabled")){var o=n.closest(".customize-pane-child"),i="",c="",s="";if(o.hasClass("control-panel")?(c=o[0].id.replace("sub-accordion-panel-",""),s="panel"):(c=o[0].id.replace("sub-accordion-section-",""),s="section"),n.addClass("disabled").toggleClass("active"),n.hasClass("active")){if(n.closest(".customize-section-title").length){var l=n.closest(".customize-section-title"),r=l.find(".customize-action").text(),u=l.find("h3").text().replace(r,""),d=r.indexOf("▸");r=-1!=d?r.slice(d+1):""}else r="",u=n.closest(".panel-title").text();r&&(r+=" / "),i=r+u,a(".customizer-nav-items").append('