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AAE,UAAU,OAAO,CAAC,SAAS,CAAC,EACP,IAAb,EAAE,OAAO,EACJ,EAAE,+BAA+B,QAAQ,CAAC,+BAC1C,EAAE,+BAA+B,WAAW,CAAC,6BACzD,EAAE,+BAA+B,QAAQ,CAAC,4BAC1C,EAAE,2BAA2B,IAAI,CAAC,eAAgB,CAAA,GAClD,EAAE,oBAAoB,IAAI,CAAC,WAAY,MACvC,EAAG,2BAA2B,WAAW,CAAE,YAC3C,EAAG,2BAA2B,QAAQ,CAAE,gBACxC,EAAE,2BAA2B,KAAK,GAGlC","sources":["","src/js/socialshare.js"],"sourcesContent":["(() => {\n(function($) {\n function checkSidebarState() {\n let $sidebar = $(\".et_social_sidebar_networks\");\n let $button = $(\".et_social_hide_sidebar\");\n if ($sidebar.length > 0) {\n if ($sidebar.hasClass(\"et_social_visible_sidebar\")) {\n $button.prop(\"ariaExpanded\", true);\n $(\".et_social_share\").prop(\"tabindex\", \"0\");\n $(\".et_social_hide_sidebar\").removeClass(\"fa-share-alt\");\n $(\".et_social_hide_sidebar\").addClass(\"fa-close\");\n } else {\n $button.prop(\"ariaExpanded\", false);\n $(\".et_social_share\").prop(\"tabindex\", \"-1\");\n $(\".et_social_hide_sidebar\").removeClass(\"fa-close\");\n $(\".et_social_hide_sidebar\").addClass(\"fa-share-alt\");\n }\n }\n }\n document.querySelectorAll(\".et_social_hide_sidebar\").forEach((button)=>{\n button.addEventListener(\"keydown\", function(event) {\n if (event.key === \"Enter\" || event.key === \" \") $(this).click();\n });\n });\n $(function() {\n $(\"body\").on(\"click\", \".et_social_share\", function() {\n var $this_el = $(this), social_type = $this_el.data(\"social_type\"), share_link = \"media\" == social_type ? $this_el.data(\"social_link\") : $this_el.prop(\"href\");\n var left = $(window).width() / 2 - 275;\n var top = $(window).height() / 2 - 225;\n var new_window = window.open(share_link, \"\", \"scrollbars=1, height=450, width=550, left=\" + left + \", top=\" + top);\n if (window.focus) new_window.focus();\n return false;\n });\n function get_url_parameter(param_name) {\n var page_url = window.location.search.substring(1);\n var url_variables = page_url.split(\"&\");\n for(var i = 0; i < url_variables.length; i++){\n var curr_param_name = url_variables[i].split(\"=\");\n if (curr_param_name[0] == param_name) return curr_param_name[1];\n }\n }\n function setCookieExpire(days) {\n var ms = days * 86400000;\n var date = new Date();\n date.setTime(date.getTime() + ms);\n return \"; expires=\" + date.toUTCString();\n }\n function checkCookieValue(cookieName, value) {\n return parseCookies()[cookieName] === value;\n }\n function parseCookies() {\n var cookies = document.cookie.split(\"; \");\n var ret = {};\n for(var i = cookies.length - 1; i >= 0; i--){\n var el = cookies[i].split(\"=\");\n ret[el[0]] = el[1];\n }\n return ret;\n }\n function set_cookie($expire) {\n cookieExpire = setCookieExpire($expire);\n document.cookie = \"etSocialCookie=true\" + cookieExpire;\n }\n //separate function for the setTimeout to make it work properly within the loop.\n function make_popup_visible($popup, $delay) {\n setTimeout(function() {\n $popup.addClass(\"et_social_visible et_social_animated\");\n if ($(\".et_social_resize\").length) $(\".et_social_resize\").each(function() {\n define_popup_position($(this));\n });\n }, $delay);\n }\n function auto_popup(this_el, delay) {\n var $current_popup_auto = this_el;\n if (!$current_popup_auto.hasClass(\"et_social_animated\")) {\n var $cookies_expire_auto = $current_popup_auto.data(\"cookie_duration\") ? $current_popup_auto.data(\"cookie_duration\") : false, $delay = delay;\n if (false !== $cookies_expire_auto && !checkCookieValue(\"etSocialCookie\", \"true\") || false == $cookies_expire_auto) {\n make_popup_visible($current_popup_auto, $delay);\n if (false !== $cookies_expire_auto) set_cookie($cookies_expire_auto);\n }\n }\n }\n function define_popup_position($this_popup) {\n setTimeout(function() {\n var this_popup = $this_popup, networks_div = this_popup.find(\".et_social_networks\"), header_height = this_popup.find(\".et_social_header\").outerHeight() || 0, total_count_height = this_popup.find(\".et_social_totalcount\").height(), extra_height = 0 < total_count_height ? 20 : 0;\n this_popup.height(this_popup.find(\".et_social_icons_container\").innerHeight() + header_height + total_count_height + 20 + extra_height);\n var popup_max_height = this_popup.hasClass(\"et_social_popup_content\") ? $(window).height() : $(window).height() - 60;\n if (this_popup.hasClass(\"et_social_popup_content\") && 768 < $(window).width()) popup_max_height = popup_max_height - 50;\n this_popup.css({\n \"max-height\": popup_max_height + \"px\"\n });\n if (this_popup.hasClass(\"et_social_popup_content\")) {\n var top_position = $(window).height() / 2 - this_popup.innerHeight() / 2;\n this_popup.css({\n \"top\": top_position + \"px\"\n });\n }\n var networks_div_height = this_popup.height() - header_height + total_count_height - extra_height;\n networks_div.height(networks_div_height);\n }, 400);\n }\n $(window).on(\"resize\", ()=>{\n if ($(\".et_social_resize\").length) $(\".et_social_resize\").each(function() {\n define_popup_position($(this));\n });\n });\n $(\".et_social_hide_sidebar\").on(\"click\", function() {\n $(\".et_social_hide_sidebar\").toggleClass(\"et_social_hidden_sidebar\");\n $(\".et_social_sidebar_networks\").toggleClass(\"et_social_hidden_sidebar et_social_visible_sidebar\");\n checkSidebarState();\n });\n });\n $(function() {\n $(\".et_social_sidebar_networks\").bind(\"focusout\", function(e) {\n if (e.currentTarget.contains(e.relatedTarget)) ;\n else {\n $(\".et_social_sidebar_networks\").removeClass(\"et_social_visible_sidebar\");\n $(\".et_social_sidebar_networks\").addClass(\"et_social_hidden_sidebar\");\n $(\".et_social_hide_sidebar\").prop(\"ariaExpanded\", false);\n $(\".et_social_share\").prop(\"tabindex\", \"-1\");\n $(\".et_social_hide_sidebar\").removeClass(\"fa-close\");\n $(\".et_social_hide_sidebar\").addClass(\"fa-share-alt\");\n }\n });\n });\n $(document).keydown(function(e) {\n if (e.keyCode == 27) {\n if ($(\".et_social_sidebar_networks\").hasClass(\"et_social_visible_sidebar\")) {\n $(\".et_social_sidebar_networks\").removeClass(\"et_social_visible_sidebar\");\n $(\".et_social_sidebar_networks\").addClass(\"et_social_hidden_sidebar\");\n $(\".et_social_hide_sidebar\").prop(\"ariaExpanded\", false);\n $(\".et_social_share\").prop(\"tabindex\", \"-1\");\n $(\".et_social_hide_sidebar\").removeClass(\"fa-close\");\n $(\".et_social_hide_sidebar\").addClass(\"fa-share-alt\");\n $(\".et_social_hide_sidebar\").focus();\n }\n }\n });\n})(jQuery);\n\n})();\n//# sourceMappingURL=socialshare.js.map\n","(function($){\r\n\tfunction checkSidebarState() {\r\n\t\tlet $sidebar = $('.et_social_sidebar_networks');\r\n\t\tlet $button = $('.et_social_hide_sidebar');\r\n\r\n\t\tif ($sidebar.length > 0) {\r\n\t\t\tif ($sidebar.hasClass('et_social_visible_sidebar')) {\r\n\t\t\t\t$button.prop('ariaExpanded', true);\r\n\t\t\t\t$('.et_social_share').prop('tabindex', '0');\r\n\t\t\t\t$( '.et_social_hide_sidebar').removeClass( 'fa-share-alt' );\r\n\t\t\t\t$( '.et_social_hide_sidebar').addClass( 'fa-close' );\r\n\t\t\t} else {\r\n\t\t\t\t$button.prop('ariaExpanded', false);\r\n\t\t\t\t$('.et_social_share').prop('tabindex', '-1');\r\n\t\t\t\t$( '.et_social_hide_sidebar').removeClass( 'fa-close' );\r\n\t\t\t\t$( '.et_social_hide_sidebar').addClass( 'fa-share-alt' );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tdocument.querySelectorAll('.et_social_hide_sidebar').forEach(button => {\r\n\t\tbutton.addEventListener('keydown', function(event) {\r\n\t\t\tif (event.key === 'Enter' || event.key === ' ') {\r\n\t\t\t\t$(this).click();\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n\t$( function () {\r\n\t\t$( 'body' ).on( 'click', '.et_social_share', function() {\r\n\t\t\tvar $this_el = $(this),\r\n\t\t\t\tsocial_type = $this_el.data( 'social_type' ),\r\n\t\t\t\tshare_link = 'media' == social_type ? $this_el.data( 'social_link' ) : $this_el.prop( 'href' );\r\n\r\n\t\t\tvar left = ( $( window ).width()/2 ) - ( 550/2 );\r\n\t\t\tvar top = ( $( window ).height()/2 ) - ( 450/2 );\r\n\t\t\tvar new_window = window.open( share_link, '', 'scrollbars=1, height=450, width=550, left=' + left + ', top=' + top );\r\n\r\n\t\t\tif ( window.focus ) {\r\n\t\t\t\tnew_window.focus();\r\n\t\t\t}\r\n\r\n\t\t\treturn false;\r\n\t\t});\r\n\r\n\t\tfunction get_url_parameter( param_name ) {\r\n\t\t\tvar page_url = window.location.search.substring(1);\r\n\t\t\tvar url_variables = page_url.split('&');\r\n\t\t\tfor ( var i = 0; i < url_variables.length; i++ ) {\r\n\t\t\t\t\tvar curr_param_name = url_variables[i].split( '=' );\r\n\t\t\t\tif ( curr_param_name[0] == param_name ) {\r\n\t\t\t\t\treturn curr_param_name[1];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction setCookieExpire(days) {\r\n\r\n\t\t\tvar ms = days*24*60*60*1000;\r\n\r\n\t\t\tvar date = new Date();\r\n\t\t\tdate.setTime(date.getTime() + ms);\r\n\r\n\t\t\treturn \"; expires=\" + date.toUTCString();\r\n\t\t}\r\n\r\n\t\tfunction checkCookieValue(cookieName, value) {\r\n\t\t\treturn parseCookies()[cookieName] === value;\r\n\t\t}\r\n\r\n\t\tfunction parseCookies() {\r\n\t\t\tvar cookies = document.cookie.split('; ');\r\n\r\n\t\t\tvar ret = {};\r\n\t\t\tfor (var i = cookies.length - 1; i >= 0; i--) {\r\n\t\t\t var el = cookies[i].split('=');\r\n\t\t\t ret[el[0]] = el[1];\r\n\t\t\t}\r\n\t\t\treturn ret;\r\n\t\t}\r\n\r\n\t\tfunction set_cookie( $expire ) {\r\n\t\t\tcookieExpire = setCookieExpire( $expire );\r\n\t\t\tdocument.cookie = 'etSocialCookie=true' + cookieExpire;\r\n\t\t}\r\n\r\n\t\t//separate function for the setTimeout to make it work properly within the loop.\r\n\t\tfunction make_popup_visible( $popup, $delay ){\r\n\t\t\tsetTimeout( function() {\r\n\t\t\t\t$popup.addClass( 'et_social_visible et_social_animated' );\r\n\t\t\t\tif ( $( '.et_social_resize' ).length ) {\r\n\t\t\t\t\t$( '.et_social_resize' ).each( function() {\r\n\t\t\t\t\t\tdefine_popup_position( $( this ) );\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}, $delay );\r\n\t\t}\r\n\r\n\t\tfunction auto_popup( this_el, delay ) {\r\n\t\t\tvar $current_popup_auto = this_el;\r\n\t\t\tif ( ! $current_popup_auto.hasClass( 'et_social_animated' ) ) {\r\n\t\t\t\tvar $cookies_expire_auto = $current_popup_auto.data( 'cookie_duration' ) ? $current_popup_auto.data( 'cookie_duration' ) : false,\r\n\t\t\t\t\t$delay = delay;\r\n\r\n\t\t\t\tif ( ( false !== $cookies_expire_auto && ! checkCookieValue( 'etSocialCookie', 'true' ) ) || false == $cookies_expire_auto ) {\r\n\r\n\t\t\t\t\tmake_popup_visible ( $current_popup_auto, $delay );\r\n\r\n\t\t\t\t\tif ( false !== $cookies_expire_auto ) {\r\n\t\t\t\t\t\tset_cookie( $cookies_expire_auto );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction define_popup_position( $this_popup ) {\r\n\t\t\tsetTimeout( function() { // make sure all css transitions are finished to calculate the heights correctly\r\n\t\t\t\tvar this_popup = $this_popup,\r\n\t\t\t\t\tnetworks_div = this_popup.find( '.et_social_networks' ),\r\n\t\t\t\t\theader_height = this_popup.find( '.et_social_header' ).outerHeight() || 0,\r\n\t\t\t\t\ttotal_count_height = this_popup.find( '.et_social_totalcount' ).height(),\r\n\t\t\t\t\textra_height = 0 < total_count_height ? 20 : 0;\r\n\r\n\t\t\t\tthis_popup.height( this_popup.find( '.et_social_icons_container' ).innerHeight() + header_height + total_count_height + 20 + extra_height );\r\n\r\n\t\t\t\tvar\tpopup_max_height = this_popup.hasClass( 'et_social_popup_content' ) ? $( window ).height() : $( window ).height() - 60;\r\n\r\n\t\t\t\tif ( this_popup.hasClass( 'et_social_popup_content' ) && 768 < $( window ).width() ) {\r\n\t\t\t\t\tpopup_max_height = popup_max_height - 50;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis_popup.css( { 'max-height' : popup_max_height + 'px' } );\r\n\r\n\t\t\t\tif( this_popup.hasClass( 'et_social_popup_content' ) ) {\r\n\t\t\t\t\tvar top_position = $( window ).height() / 2 - this_popup.innerHeight() / 2;\r\n\t\t\t\t\tthis_popup.css( { 'top' : top_position + 'px' } );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar networks_div_height = this_popup.height() - header_height + total_count_height - extra_height;\r\n\t\t\t\tnetworks_div.height( networks_div_height );\r\n\t\t\t}, 400 );\r\n\t\t}\r\n\r\n\t\t$( window ).on( 'resize', () => {\r\n\t\t\tif ( $( '.et_social_resize' ).length ) {\r\n\t\t\t\t$( '.et_social_resize' ).each( function() {\r\n\t\t\t\t\tdefine_popup_position( $( this ) );\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t$( '.et_social_hide_sidebar' ).on('click', function(){\r\n\t\t\t$( '.et_social_hide_sidebar' ).toggleClass( 'et_social_hidden_sidebar' );\r\n\t\t\t$( '.et_social_sidebar_networks' ).toggleClass( 'et_social_hidden_sidebar et_social_visible_sidebar' );\r\n\t\t\tcheckSidebarState();\r\n\t\t});\r\n\t});\r\n\r\n\t$(function(){\r\n\t\t$(\".et_social_sidebar_networks\").bind(\"focusout\", function (e) {\r\n\t\t\tif (e.currentTarget.contains(e.relatedTarget)) {\r\n\t\t\t} else {\r\n\t\t\t\t$('.et_social_sidebar_networks').removeClass('et_social_visible_sidebar');\r\n\t\t\t\t$('.et_social_sidebar_networks').addClass('et_social_hidden_sidebar');\r\n\t\t\t\t$('.et_social_hide_sidebar').prop('ariaExpanded', false);\r\n\t\t\t\t$('.et_social_share').prop('tabindex', '-1');\r\n\t\t\t\t$( '.et_social_hide_sidebar').removeClass( 'fa-close' );\r\n\t\t\t\t$( '.et_social_hide_sidebar').addClass( 'fa-share-alt' );\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n\r\n\t$(document).keydown(function(e){\r\n if(e.keyCode == 27) {\r\n if ($('.et_social_sidebar_networks').hasClass('et_social_visible_sidebar')) {\r\n $('.et_social_sidebar_networks').removeClass('et_social_visible_sidebar');\r\n\t\t\t\t$('.et_social_sidebar_networks').addClass('et_social_hidden_sidebar');\r\n\t\t\t\t$('.et_social_hide_sidebar').prop('ariaExpanded', false);\r\n\t\t\t\t$('.et_social_share').prop('tabindex', '-1');\r\n\t\t\t\t$( '.et_social_hide_sidebar').removeClass( 'fa-close' );\r\n\t\t\t\t$( '.et_social_hide_sidebar').addClass( 'fa-share-alt' );\r\n\t\t\t\t$('.et_social_hide_sidebar').focus();\r\n } \r\n } \r\n });\r\n\r\n})(jQuery)\r\n"],"names":["$","jQuery","document","querySelectorAll","forEach","button","addEventListener","event","key","click","on","$this_el","share_link","data","prop","left","window","width","top","height","new_window","open","focus","length","each","$this_popup","setTimeout","networks_div","this_popup","find","header_height","outerHeight","total_count_height","extra_height","innerHeight","popup_max_height","hasClass","css","top_position","networks_div_height","$sidebar","$button","toggleClass","removeClass","addClass","bind","e","currentTarget","contains","relatedTarget","keydown","keyCode"],"version":3,"file":"socialshare.js.map"}