!function(e){function o(e){var o={font:e.find(".google-fonts-list").val(),regularweight:e.find(".google-fonts-regularweight-style").val(),italicweight:e.find(".google-fonts-italicweight-style").val(),boldweight:e.find(".google-fonts-boldweight-style").val()};e.find(".customize-control-google-font-selection").val(JSON.stringify(o)).trigger("change")}function t(){var o={color1:e(".idtheme-color-picker-control").find(".idtcolgrad1").val(),color2:e(".idtheme-color-picker-control").find(".idtcolgrad2").val(),direction:e(".idtheme-color-picker-control").find(".idtcoldirection").val()};e(".idtheme-color-picker-control").find(".idtheme-colorgradient-selection").val(JSON.stringify(o)).trigger("change")}e(document).ready((function(){if("success"!==gmrobj.booluri){var t=document.querySelector("#sub-accordion-panel-panel-banner");if(null!==t){var i=t.querySelector("#accordion-section-verytopads");i&&(i.insertAdjacentHTML("beforebegin",'<li><div style="padding: 12px;">Please insert license before settings banner, if you bought from kentooz, you can get license key in your memberarea.</div></li>'),t.classList.add("importanthidden"))}var n=document.querySelector("#customize-control-gmr_copyright");null!==n&&(n.innerHTML='<div style="padding: 12px;">Please insert license before settings banner, if you bought from kentooz, you can get license key in your memberarea.</div>')}e(".google-fonts-list").each((function(o,t){e(t).hasClass("select2-hidden-accessible")||e(t).select2()})),e(".google-fonts-list").on("change",(function(){var t=e(this).parent().parent().find(".google-fonts-regularweight-style"),i=e(this).parent().parent().find(".google-fonts-italicweight-style"),n=e(this).parent().parent().find(".google-fonts-boldweight-style"),l=e(this).val(),r=e(this).attr("control-name"),a=0,c=0,s=0;t.empty(),i.empty(),n.empty(),t.prop("disabled",!1),i.prop("disabled",!1),n.prop("disabled",!1);var d=_wpCustomizeSettings.controls[r],p=e.map(d.idthemefontslist,(function(e,o){if(e.f===l)return o})),g=p[0];e.each(d.idthemefontslist[g].v,(function(o,l){l.indexOf("italic")>=0?(i.append(e("<option></option>").val(l).html(l)),c++):(t.append(e("<option></option>").val(l).html(l)),a++,n.append(e("<option></option>").val(l).html(l)),s++)})),0==a&&(t.append(e("<option></option>").val("").html("Not Available for this font")),t.prop("disabled","disabled")),0==c&&(i.append(e("<option></option>").val("").html("Not Available for this font")),i.prop("disabled","disabled")),0==s&&(n.append(e("<option></option>").val("").html("Not Available for this font")),n.prop("disabled","disabled")),o(e(this).parent().parent())})),e(".google_fonts_select_control select").on("change",(function(){o(e(this).parent().parent())}))})),e(document).ready((function(){e(".idtheme-color-picker").each((function(o,i){var n={palettes:_wpCustomizeSettings.controls[e(this).attr("id")].colorpickerpalette,change:_.throttle((function(){t()}),100,{leading:!1})};e(i).wpColorPicker(n)})),e(".idtheme-color-picker-control [type=range]").on("change",(function(){t()}))}))}(jQuery);