!function(p,d,a){var e=wp.customize,c="data-customize-setting-link",o={cache:{},init:function(){o.buildFonts(),o.showFonts()},buildFonts:function(){o.cache.fonts="",o.cache.chosen={},p.each(a,function(t,e){var n="";void 0!==e.disabled&&(n=' disabled="disabled" '),o.cache.fonts+='"})},populateVariants:function(t,e){0'+n+""}),i}},t=function(){p('.customize-control-checkbox-multiple input[type="checkbox"]').on("change",function(){checkbox_values=p(this).parents(".customize-control").find('input[type="checkbox"]:checked').map(function(){return this.value}).get().join(","),p(this).parents(".customize-control").find('input[type="hidden"]').val(checkbox_values).trigger("change")})};p(d).ready(function(){t(),o.init(),p('.customize-control input[type="range"]').on("change input",function(){var t=p(this).attr("name");p('input[type="text"][data-name="'+t+'"]').val(p(this).val())}).trigger("change"),p(".social_profiles").each(function(){const n=p(this);var t=n.data("control-id"),e="."+t+"profile-add",i="."+t+"profile-remove",a="."+t+"profile-move",c=".social-profile";const o=n.find(".social_profiles_wrap"),r=wp.template(t+"-social-profile"),s=n.find("#"+t);let l;var h=t=>{t=t||!1;let e=[];l&&(clearTimeout(l),l=null),n.find(c).each(function(){const t=p(this);e.push({label:t.find("input.label").val(),url:t.find("input.url").val(),icon:t.find("input.icon").val()})}),s.val(JSON.stringify(e)),t?s.trigger("change"):l=setTimeout(()=>s.trigger("change"),1500)},u=(t,e)=>o.append(r({index:t,label:"",url:"",icon:"",...e})),f=()=>{try{o.empty(),p.each(JSON.parse(s.val()),u)}catch(t){}},a={handle:a,cancel:"input",connectWith:"."+t+"_social_profiles",items:"> "+c,update:()=>{o.find(c).each(function(t){const e=p(this).find(".field-title h3");e.text(e.text().replace(/([\d]+)/g,t+1))}),h(!0)}};f(),o.sortable(a),p(d).on("click",e,function(t){t.preventDefault(),u(o.find(c).length,{}),o.sortable("refresh")}),p(d).on("click",i,function(t){t.preventDefault();const e=p(this).closest(c);e.slideUp(100,"linear",()=>{e.remove(),o.sortable("refresh"),h(!0),f()})}),p(d).on("change","."+t+"-trigger",h)})})}(jQuery,document,themeooCustomizerFontsL10n);