!function(t){var e={};function a(d){if(e[d])return e[d].exports;var i=e[d]={i:d,l:!1,exports:{}};return t[d].call(i.exports,i,i.exports,a),i.l=!0,i.exports}a.m=t,a.c=e,a.d=function(t,e,d){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:d})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var d=Object.create(null);if(a.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)a.d(d,i,function(e){return t[e]}.bind(null,i));return d},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=8)}({8:function(t,e){var a;(a=jQuery)((function(){var t=a("#widgets-right"),e=a(".et_ads_widget");function d(t){var e=t.find(".et_ads_widget_ads_container"),d=t.find(".et_ads_ad_count"),i=t.find(".et_ads_add_ad"),n=t.find(".et_ads_ad_widget_number").val();t.on("click",".delete_ad",(function(){var e=a(this).parents(".et_ads_ad");e.slideUp("fast",(function(){e.remove();var a=t.find(".et_ads_ad");a.length<=1?a.find(".delete_ad").hide():a.find(".delete_ad").show()}))})),i.on("click",(function(a){a.preventDefault();var i=d.val();e.append('<div class="et_ads_ad group" data-ad_id="'+i+'">\t\t\t\t\t\t<div class="header">'+EXTRA.label_ad_number+i+'</div>\t\t\t\t\t\t<div class="content">\t\t\t\t\t\t\t<div class="delete_ad">X</div>\t\t\t\t\t\t\t<p class="field_wrap">\t\t\t\t\t\t\t\t<label for="widget-et_ads-'+n+"-[ads]["+i+'][img_url]">'+EXTRA.label_img_url+'</label>\t\t\t\t\t\t\t\t<input class="widefat" id="widget-et_ads-'+n+"-[ads]["+i+'][img_url]" name="widget-et_ads['+n+"][ads]["+i+'][img_url]" type="text" value="">\t\t\t\t\t\t\t</p>\t\t\t\t\t\t\t<p class="field_wrap">\t\t\t\t\t\t\t\t<label for="widget-et_ads-'+n+"-[ads]["+i+'][img_alt_text]">'+EXTRA.label_img_alt_text+'</label>\t\t\t\t\t\t\t\t<input class="widefat" id="widget-et_ads-'+n+"-[ads]["+i+'][img_alt_text]" name="widget-et_ads['+n+"][ads]["+i+'][img_alt_text]" type="text" value="">\t\t\t\t\t\t\t</p>\t\t\t\t\t\t\t<p class="field_wrap">\t\t\t\t\t\t\t\t<label for="widget-et_ads-'+n+"-[ads]["+i+'][link_url]">'+EXTRA.label_link_url+'</label>\t\t\t\t\t\t\t\t<input class="widefat" id="widget-et_ads-'+n+"-[ads]["+i+'][link_url]" name="widget-et_ads['+n+"][ads]["+i+'][link_url]" type="text" value="">\t\t\t\t\t\t\t</p>\t\t\t\t\t\t\t<p>'+EXTRA.label_or+'</p>\t\t\t\t\t\t\t<p class="field_wrap" >\t\t\t\t\t\t\t\t<label for="widget-et_ads-'+n+"-[ads]["+i+'][ad_html]">'+EXTRA.label_ad_html+'</label>\t\t\t\t\t\t\t\t<textarea class="widefat" rows="10" cols="20" id="widget-et_ads-'+n+"-[ads]["+i+'][ad_html]" name="widget-et_ads['+n+"][ads]["+i+'][ad_html]"></textarea>\t\t\t\t\t\t\t</p>\t\t\t\t\t\t\t<p class="field_wrap">\t\t\t\t\t\t\t\t<input id="widget-et_ads-'+n+"-[ads]["+i+'][new_line]" name="widget-et_ads['+n+"][ads]["+i+'][new_line]" type="checkbox" checked="checked">&nbsp;<label for="widget-et_ads-'+n+"-[ads]["+i+'][new_line]">'+EXTRA.label_new_line+"</label>\t\t\t\t\t\t\t</p>\t\t\t\t\t\t</div>\t\t\t\t\t</div>"),(e=t.find(".et_ads_widget_ads_container")).accordion("refresh"),e.find(".group").last().find(".header").trigger("click"),t.find(".delete_ad").show(),d.val(parseInt(i)+1)}))}function i(t){t.find(".et_ads_widget_ads_container").accordion({header:"> div > .header",heightStyle:"content",collapsible:!0})}t.on("change",".network-enabled",(function(){a(this).closest(".et-social-followers-network").find(".et-network-settings").slideToggle()})),t.on("click",".et-authorize-network",(function(){var t,e=a(this),d=e.data("et-network-name")||"",i=e.closest(".et-social-followers-network").find("input.et-autorize-required-field"),n=!0,l=e.closest("div").find(".spinner"),r=e.closest("form").find('input[name="savewidget"]');return""!==d&&(i.length&&(i.css({"border-color":"#ddd"}),t=[],i.each((function(){var e=a(this);""===e.val()?(e.css({"border-color":"#faa"}),n=!1):t.push({field_id:e.data("original_field_name"),field_val:e.val()})}))),!!n&&(r.trigger("click"),l.addClass("is-et-active"),void setTimeout((function(){a.ajax({type:"POST",dataType:"json",url:EXTRA.ajaxurl,data:{action:"et_social_authorize_network_"+d,et_extra_nonce:EXTRA.authorize_nonce,et_extra_fields_data:JSON.stringify(t)},success:function(t){if(void 0===t)return!1;void 0!==t.error_message?alert(t.error_message):void 0!==t.authorization_url&&(window.location=t.authorization_url)}})}),3e3)))})),e.length&&(e.each((function(){d(a(this)),i(a(this))})),a(document).on("et_ads_widget_init",(function(t){d(t.$el),i(t.$el)})))}))}});