let epGlobals={};(function($){'use strict';function ready(fn){if(document.readyState!=='loading'){fn();}else{document.addEventListener('DOMContentLoaded',fn);}} ready(function(){let option={forceObject:true,};let selector=document.querySelectorAll('.embedpress-embed-document-pdf');if(selector.length){selector.forEach((function(value,index,thisArg){let id=value.dataset['emid'];let src=value.dataset['emsrc'];PDFObject?.embed(src,"."+id,option);}));} if(typeof epGlobals.youtubeChannelGallery==='function'){epGlobals.youtubeChannelGallery();}});function embedPressResponsiveEmbeds(){var proportion,parentWidth;document.querySelectorAll('iframe').forEach(function(iframe){if(iframe.width&&iframe.height){proportion=parseFloat(iframe.width)/parseFloat(iframe.height);parentWidth=parseFloat(window.getComputedStyle(iframe.parentElement,null).width.replace('px',''));iframe.style.maxWidth='100%';iframe.style.maxHeight=Math.round(parentWidth/proportion).toString()+'px';}});} epGlobals.handlePosterImageLoad=function(){var posterImages=document.querySelectorAll(".plyr__poster");posterImages.forEach(function(posterImage){if(posterImage){var videoWrappers=document.querySelectorAll("[data-playerid]");videoWrappers.forEach(function(videoWrapper){var observer=new MutationObserver(function(mutationsList,observer){var posterImageStyle=window.getComputedStyle(posterImage);if(posterImageStyle.getPropertyValue('background-image')!=='none'){setTimeout(function(){videoWrapper.style.opacity="1";},200);observer.disconnect();}});observer.observe(posterImage,{attributes:true,attributeFilter:['style']});});}});} embedPressResponsiveEmbeds();window.onresize=embedPressResponsiveEmbeds;function hasClass(ele,cls){return!!ele.className.match(new RegExp("(\\s|^)"+cls+"(\\s|$)"));} function addClass(ele,cls){if(!hasClass(ele,cls))ele.className+=" "+cls;} function removeClass(ele,cls){if(hasClass(ele,cls)){var reg=new RegExp("(\\s|^)"+cls+"(\\s|$)");ele.className=ele.className.replace(reg," ");}} if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||function(s){var matches=(this.document||this.ownerDocument).querySelectorAll(s),i=matches.length;while(--i>=0&&matches.item(i)!==this){} return i>-1;};} var delegate=function(el,evt,sel,handler){el.addEventListener(evt,function(event){var t=event.target;while(t&&t!==this){if(t.matches(sel)){handler.call(t,event);} t=t.parentNode;}});};function sendRequest(url,postData,callback){var req=createXMLHTTPObject();if(!req)return;var method=postData?"POST":"GET";req.open(method,url,true);if(postData){req.setRequestHeader("Content-type","application/x-www-form-urlencoded");} req.onreadystatechange=function(){if(req.readyState!=4)return;if(req.status!=200&&req.status!=304){return;} callback(req);};if(req.readyState==4)return;req.send(postData);} var XMLHttpFactories=[function(){return new XMLHttpRequest();},function(){return new ActiveXObject("Msxml3.XMLHTTP");},function(){return new ActiveXObject("Msxml2.XMLHTTP.6.0");},function(){return new ActiveXObject("Msxml2.XMLHTTP.3.0");},function(){return new ActiveXObject("Msxml2.XMLHTTP");},function(){return new ActiveXObject("Microsoft.XMLHTTP");},];function createXMLHTTPObject(){var xmlhttp=false;for(var i=0;ii;i++){youtubeChannelEvents(playerWraps[i])}}} function youtubeChannelEvents(playerWrap){delegate(playerWrap,"click",".item",function(event){var embed="https://www.youtube.com/embed/";var vid=this.getAttribute("data-vid");var iframe=playerWrap.getElementsByTagName("iframe");if(vid){if(iframe){var vidSrc=iframe[0].src.replace(/(.*\/embed\/)([^\?&"'>]+)(.+)?/,`\$1${vid}\$3`);if(vidSrc.indexOf('autoplay')>0){vidSrc=vidSrc.replace('autoplay=0','autoplay=1');} else{vidSrc+='&autoplay=1';} iframe[0].src=vidSrc;playerWrap.scrollIntoView();}}});var currentPage=1;let nearestEpContentId=playerWrap.querySelector('.ep-youtube__content__block').getAttribute('data-unique-id');let epContentBlock=playerWrap.querySelector('.ep-youtube__content__block');let parentElement=epContentBlock.parentElement;let channelUrl=parentElement.querySelector('[data-channel-url]').getAttribute('data-channel-url');delegate(playerWrap,"click",".ep-next, .ep-prev",function(event){const totalPages=event.target.closest('.ose-youtube').getAttribute('data-total-pages');const closestClass=event.target.closest('.ose-youtube').classList;const activePage=document.querySelector(`.${closestClass[1]} .embedpress-page-active`);if(activePage){document.querySelector(`.${closestClass[1]} .embedpress-page-active`).classList.remove('embedpress-page-active');} var isNext=this.classList.contains("ep-next");if(isNext){currentPage++;}else{currentPage--;} var data={action:"youtube_rest_api",playlistid:this.getAttribute("data-playlistid"),pagetoken:this.getAttribute("data-pagetoken"),pagesize:this.getAttribute("data-pagesize"),channelUrl:channelUrl,currentpage:currentPage};var formBody=[];for(var property in data){var encodedKey=encodeURIComponent(property);var encodedValue=encodeURIComponent(data[property]);formBody.push(encodedKey+"="+encodedValue);} formBody=formBody.join("&");var galleryWrapper=playerWrap.getElementsByClassName("ep-youtube__content__block");playerWrap.setAttribute('data-current-page',currentPage);let x=1;sendRequest("/wp-admin/admin-ajax.php",formBody,function(request){if(galleryWrapper&&galleryWrapper[0]&&request.responseText){var response=JSON.parse(request.responseText);galleryWrapper[0].outerHTML=response.html;var currentPageNode=galleryWrapper[0].getElementsByClassName("current-page");if(currentPageNode&¤tPageNode[0]){currentPageNode[0].textContent=currentPage;}}});const intervalID=setInterval(()=>{x++ if(playerWrap.querySelector('.ep-youtube__content__block')){const newNearestEpContentId=playerWrap.querySelector('.ep-youtube__content__block').getAttribute('data-unique-id');if(newNearestEpContentId!==nearestEpContentId&&playerWrap.querySelector(`[data-page="${currentPage}"]`)){playerWrap.querySelector(`[data-page="${currentPage}"]`).classList.add('embedpress-page-active');nearestEpContentId=newNearestEpContentId;clearInterval(intervalID);}} if(x>100){clearInterval(intervalID);}},100);});} const epLoadMore=()=>{$('.embedpress-gutenberg-wrapper .ep-nft-gallery-wrapper').each(function(){let selctorEl=`[data-nftid='${$(this).data('nftid')}']`;let loadmorelabel=$(selctorEl).data('loadmorelabel');let iconcolor=$(selctorEl+" .nft-loadmore").data('iconcolor');let spinicon=``;$(selctorEl+` .ep_nft_item`).slice(0,$(selctorEl).data('itemparpage')).show();$('.embedpress-gutenberg-wrapper .ep-nft-gallery-wrapper .ep-loadmore-wrapper button').css('display','flex');$(selctorEl+" .nft-loadmore").click(function(e){$(this).html(loadmorelabel+spinicon);$(this).prop("disabled",true);setTimeout(function(){$(selctorEl+" .nft-loadmore").text(loadmorelabel);$(selctorEl+" .nft-loadmore").prop("disabled",false);$(selctorEl+" .ep_nft_item:hidden").slice(0,$(selctorEl).data('itemparpage')).fadeIn("slow");if($(selctorEl+" .ep_nft_item:hidden").length==0){$(selctorEl+" .nft-loadmore").fadeOut("slow");}},500);});});};if($('.embedpress-gutenberg-wrapper .ep-nft-gallery-wrapper').length>0){epLoadMore();} const unlockSubmitHander=(perentSel,that)=>{var ep_client_id=jQuery(that).closest('form').find('input[name="ep_client_id"]').val();var password=jQuery(`input[name="pass_${ep_client_id}"]`).val();var post_id=jQuery(`input[name="post_id"]`).val();const buttonText=jQuery(that).closest('.password-form-container').find('input[type="submit"]').val();const unlokingText=jQuery(that).data('unlocking-text');var data={'action':'lock_content_form_handler','client_id':ep_client_id,'password':password,'post_id':post_id,};jQuery('#'+perentSel+'-'+ep_client_id+' .password-form input[type="submit"]').val(unlokingText);jQuery.post(eplocalize.ajaxurl,data,function(response){if(response.success){if(!response.embedHtml){jQuery('#'+perentSel+'-'+ep_client_id+' .password-form input[type="submit"]').val(buttonText);jQuery('#'+perentSel+'-'+ep_client_id+' .password-form input[type="password"]').val('');jQuery(that).closest('.password-form-container').find('.error-message').removeClass('hidden');} else{jQuery('#'+perentSel+'-'+ep_client_id+' .ep-embed-content-wraper').html(response.embedHtml);if(jQuery('#'+perentSel+'-'+ep_client_id+' .ose-youtube').length>0){epGlobals.youtubeChannelGallery();} if($('.embedpress-gutenberg-wrapper .ep-nft-gallery-wrapper').length>0){epLoadMore();} document.querySelector('#'+perentSel+'-'+ep_client_id+' .ep-embed-content-wraper').classList.remove('plyr-initialized');initPlayer(document.querySelector('#'+perentSel+'-'+ep_client_id+' .ep-embed-content-wraper'));if(eplocalize.is_pro_plugin_active){const adIdEl=document.querySelector('#'+perentSel+'-'+ep_client_id+' [data-sponsored-id]');adInitialization(adIdEl,adIdEl?.getAttribute('data-ad-index'));}}}else{jQuery('#password-error_'+ep_client_id).html(response.form);jQuery('#password-error_'+ep_client_id).show();}},'json');} jQuery('.ep-gutenberg-content .password-form').submit(function(e){e.preventDefault();unlockSubmitHander('ep-gutenberg-content',this);});window.addEventListener('load',function(e){const urlParams=new URLSearchParams(window.location.search);const hash=urlParams.get('hash');const element=document.getElementById(hash);if(element){element.scrollIntoView({behavior:'smooth'});}});const getPopupTemplate=(instPost,hashtag='',accountType)=>{let instaPostData=JSON.parse(instPost);let likeIcon='';if(instaPostData.like_count>0){likeIcon='';} const commentsIcon='';const shareIcon='';const instaIcon='';const instaUserInfo=instPost.user_info;let getDate=new Date(instaPostData.timestamp);getDate=getDate.toLocaleString('en-US',{day:'numeric',month:'short',year:'numeric'});let getTime=new Date(instaPostData.timestamp);getTime=getTime.toLocaleString('en-US',{hour12:false,hour:'numeric',minute:'numeric',second:'numeric'});let captionText=instaPostData.caption?instaPostData.caption:'';const tagRegex=/(#\w+)/g;const wrapTag=(match)=>{const tag=match.substring(1);const tagUrl=`https://www.instagram.com/explore/tags/${tag}`;return`${match}`;};captionText=captionText.replace(tagRegex,wrapTag);let carouselTemplate='';if(instaPostData.media_type==='CAROUSEL_ALBUM'){carouselTemplate+=``;carouselTemplate+=``} else{if(instaPostData.media_type?.toLowerCase()==='video'){carouselTemplate+=``;} else{carouselTemplate+=`${instaPostData.caption || ''}`;}} let srcUrl=`https://www.instagram.com/${instaPostData.username}/`;if(hashtag){instaPostData.username='#'+hashtag;srcUrl=`https://www.instagram.com/explore/tags/${hashtag}/`;} let likeComments='';if(eplocalize.is_pro_plugin_active&&accountType==='business'){if(instaPostData.show_likes_count=='true'){likeComments+=` `;} if(instaPostData.show_comments_count=='true'){likeComments+=`
${commentsIcon} ${instaPostData.comments_count || 0}
`;}} let followBtn='';if(instaPostData.popup_follow_button_text=='false'){instaPostData.popup_follow_button_text='';} if(instaPostData.popup_follow_button=='true'||instaPostData.popup_follow_button=='yes'){followBtn=`
${instaPostData.popup_follow_button_text}
`;} let popupHtml='';popupHtml+=` `;return popupHtml;} epGlobals.instaPopup=(container)=>{container?.addEventListener('click',function(event){const instaItem=event.target.closest('.insta-gallery-item');if(instaItem){const postData=instaItem.dataset.postdata;const postid=instaItem.getAttribute('data-insta-postid');const accountType=container?.closest('.instagram-container')?.getAttribute('data-connected-acc-type');let hashtag='';if(instaItem.closest('.instagram-container').getAttribute('data-hashtag')){hashtag=instaItem?.closest('.instagram-container')?.getAttribute('data-hashtag');} const closestPopup=event.target.closest('.ose-instagram-feed')?.querySelector('.insta-popup');if(closestPopup){closestPopup.style.display='block';} var feedElement=event.target.closest('.ose-instagram-feed');if(feedElement){var popupElement=feedElement.querySelector('.popup-is-initialized');if(popupElement){popupElement.innerHTML=getPopupTemplate(postData,hashtag,accountType);}} if(!document.querySelector(`#post-${postid}`)?.classList.contains('carousel-is-initialized')){const carousel=new CgCarousel(`#post-${postid}`,{slidesPerView:1,loop:true},{});const next=document.querySelector(`#post-${postid} .js-carousel__next-1`);next?.addEventListener('click',()=>carousel.next());const prev=document.querySelector(`#post-${postid} .js-carousel__prev-1`);prev?.addEventListener('click',()=>carousel.prev());document.querySelector(`#post-${postid}`)?.classList.add('carousel-is-initialized');}}});} const instaContainers=document.querySelectorAll('.embedpress-gutenberg-wrapper .insta-gallery');if(instaContainers.length>0){instaContainers.forEach((container)=>{epGlobals.instaPopup(container);});} $('.popup-close').click(function(e){$('.insta-popup').hide();$('.popup-container').remove();});$(document).on('click',function(e){if(e.target.classList.contains('popup-wrapper')){$('.insta-popup').hide();$('.popup-container').remove();}});const instafeeds=document.querySelectorAll('.ose-instagram-feed');epGlobals.initializeTabs=(containerEl)=>{showItems('ALL');containerEl.addEventListener('click',function(event){const clickedElement=event.target;if(!clickedElement){return;} if(containerEl.querySelector('.load-more-button-container')&&(clickedElement.getAttribute('data-media-type')==='VIDEO'||clickedElement.getAttribute('data-media-type')==='CAROUSEL_ALBUM')){containerEl.querySelector('.load-more-button-container').style.display='none';} else if(containerEl.querySelector('.load-more-button-container')&&(clickedElement.getAttribute('data-media-type')==='ALL')){containerEl.querySelector('.load-more-button-container').style.display='flex';} if(clickedElement.matches('.tabs li')){if(clickedElement.classList.contains('active')){return;}else{const mediaType=clickedElement.getAttribute('data-media-type');showItems(mediaType);const tabs=containerEl.querySelectorAll('.tabs li');tabs.forEach(t=>t.classList.remove('active'));clickedElement.classList.add('active');}}});function showItems(mediaType){const items=containerEl.getElementsByClassName('insta-gallery-item');for(let i=0;i{$('.insta-load-more-button').off('click').on('click',function(e){const that=$(this);const loadmoreBtn=that.closest('.load-more-button-container');const loadmoreKey=loadmoreBtn.data('loadmorekey');const connectedAccount=that.closest('.instagram-container').data('connected-acc-type');const feedType=that.closest('.instagram-container').data('feed-type');const hashtagId=that.closest('.instagram-container').data('hashtag-id');const userId=that.closest('.instagram-container').data('uid');let loadedPosts=loadmoreBtn.data('loaded-posts')||0;let postsPerPage=loadmoreBtn.data('posts-per-page')||0;const params=JSON.stringify(that.closest('.instagram-container').data('params'));const instaContainer=that.closest('.instagram-container');const spinicon=``;if(instaContainer.find('.insta-loadmore-spinicon').length===0){that.append(spinicon);} that.attr('disabled',true);var data={'action':'loadmore_data_handler','user_id':userId,'loaded_posts':loadedPosts,'posts_per_page':postsPerPage,'feed_type':feedType,'connected_account_type':connectedAccount,'loadmore_key':loadmoreKey,'params':params,'_nonce':eplocalize.nonce};if(feedType==='hashtag_type'){data.hashtag_id=hashtagId;} jQuery.post(eplocalize.ajaxurl,data,function(response){if(response.total_feed_posts>=response.next_post_index){var $responseHtml=$(response.html);instaContainer.find('.insta-gallery').append($responseHtml);that.removeAttr('disabled');instaContainer.find('.insta-loadmore-spinicon').remove();loadedPosts=response.next_post_index;loadmoreBtn.data('loaded-posts',loadedPosts);const containerEl=loadmoreBtn.closest('.ose-instagram-feed')[0];epGlobals.initializeTabs(containerEl);if(response.total_feed_posts===response.next_post_index){loadmoreBtn.remove();}}else{loadmoreBtn.remove();}});});} if(instafeeds.length>0){instafeeds.forEach(function(feed){epGlobals.initializeTabs(feed);});} if($('.embedpress-gutenberg-wrapper .ose-instagram-feed').length>0){epGlobals.instaLoadMore();} $(document).on({mouseenter:function(){$('.embedpress-popup-share-buttons').addClass('show');},mouseleave:function(){var buttons=$('.embedpress-popup-share-buttons');setTimeout(function(){if(!buttons.is(':hover'))buttons.removeClass('show');},200);}},'.embedpress-href.embedpress-popup-share, .embedpress-popup-share-buttons');$(document).on({mouseenter:function(){$(this).addClass('show');},mouseleave:function(){$(this).removeClass('show');}},'.embedpress-popup-share-buttons');})(jQuery);document.addEventListener('DOMContentLoaded',function(){epGlobals.initCarousel=(carouselSelector,options,carouselId)=>{const carouselOptions={slidesPerView:options.slideshow,spacing:options.spacing,loop:options.loop,autoplay:options.autoplay,transitionSpeed:options.transitionspeed,autoplaySpeed:options.autoplayspeed,arrows:options.arrows,breakpoints:{768:{slidesPerView:parseInt(options.slideshow)-1},1024:{slidesPerView:parseInt(options.slideshow)}}};const carousel=new CgCarousel(carouselSelector,carouselOptions,{});const next=document.querySelector(`[data-carouselid="${carouselId}"] #js-carousel__next-1`);next?.addEventListener('click',()=>carousel.next());const prev=document.querySelector(`[data-carouselid="${carouselId}"] #js-carousel__prev-1`);prev?.addEventListener('click',()=>carousel.prev());} const instaWrappers=document.querySelectorAll('.ep-embed-content-wraper');if(instaWrappers.length>0){instaWrappers.forEach((wrapper)=>{const carouselId=wrapper.getAttribute('data-carouselid');if(!carouselId)return;let options=wrapper.getAttribute(`data-carousel-options`);options=JSON.parse(options);const carouselSelector=`[data-carouselid="${carouselId}"] .embedpress-insta-container`;if(options.arrows){document.querySelector(`[data-carouselid="${carouselId}"] .cg-carousel__btns`).classList.remove('hidden');} epGlobals.initCarousel(carouselSelector,options,carouselId);});} const youtubeCarouselWraper=document.querySelectorAll('[data-youtube-channel-carousel]');if(youtubeCarouselWraper.length>0){youtubeCarouselWraper.forEach((wrapper)=>{const carouselId=wrapper.getAttribute('data-youtube-channel-carousel');if(!carouselId)return;const carouselSelector=`[data-youtube-channel-carousel="${carouselId}"] .youtube__content__body`;const options={slidesPerView:2,autoplay:true,loop:true,breakpoints:{768:{slidesPerView:2},1024:{slidesPerView:4}}}});}});document.addEventListener('DOMContentLoaded',()=>{const carousel=document.querySelector('.youtube-carousel');if(!carousel){return;} const items=document.querySelectorAll('.item');const prevButton=document.querySelector('.preview');const nextButton=document.querySelector('.next');let itemsToShow=getItemsToShow();const totalItems=items.length;let currentIndex=0;function updateCarousel(){const offset=-currentIndex*(100/itemsToShow);carousel.style.transform=`translateX(${offset}%)`;} function nextSlide(){const remainingItems=totalItems-(currentIndex+itemsToShow);if(remainingItems>=itemsToShow){currentIndex+=itemsToShow;}else if(remainingItems>0){currentIndex+=remainingItems;}else{currentIndex=0;} updateCarousel();} function prevSlide(){if(currentIndex>0){currentIndex-=itemsToShow;if(currentIndex<0){currentIndex=0;}}else{currentIndex=totalItems-itemsToShow;} updateCarousel();} nextButton?.addEventListener('click',nextSlide);prevButton?.addEventListener('click',prevSlide);let autoplay=false;const autoplayInterval=3000;let autoplayId;function startAutoplay(){autoplayId=setInterval(nextSlide,autoplayInterval);} function stopAutoplay(){clearInterval(autoplayId);} if(autoplay){startAutoplay();carousel.addEventListener('mouseover',stopAutoplay);carousel.addEventListener('mouseout',startAutoplay);} window.addEventListener('resize',()=>{itemsToShow=getItemsToShow();updateCarousel();});function getItemsToShow(){const width=window.innerWidth;if(width>=1024){return 3;}else if(width>=768){return 2;}else{return 1;}}});jQuery(window).on("elementor/frontend/init",function(){var filterableGalleryHandler=function($scope,$){let classes=$scope[0].className;let selectorEl='.'+classes.split(' ').join('.');const epElLoadMore=()=>{const spinicon='';$('.elementor-widget-container .ep-nft-gallery-wrapper').each(function(){let selctorEl=`.elementor-widget-container [data-nftid='${$(this).data('nftid')}']`;let loadmorelabel=$(selctorEl).data('loadmorelabel');$(selctorEl+` .ep_nft_item`).slice(0,$(selctorEl).data('itemparpage')).show();$('.elementor-widget-container .ep-nft-gallery-wrapper .ep-loadmore-wrapper button').css('display','flex');$(selctorEl+" .nft-loadmore").click(function(e){$(this).html(loadmorelabel+spinicon);$(this).prop("disabled",true);setTimeout(function(){$(selctorEl+" .nft-loadmore").text(loadmorelabel);$(selctorEl+" .nft-loadmore").prop("disabled",false);$(selctorEl+" .ep_nft_item:hidden").slice(0,$(selctorEl).data('itemparpage')).fadeIn("slow");if($(selctorEl+" .ep_nft_item:hidden").length==0){$(selctorEl+" .nft-loadmore").fadeOut("slow");}},500);});});};if($('.elementor-widget-container .ep-nft-gallery-wrapper').length>0){epElLoadMore();} const unlockElSubmitHander=(perentSel,that)=>{var ep_client_id=jQuery(that).closest('form').find('input[name="ep_client_id"]').val();var password=jQuery(`input[name="pass_${ep_client_id}"]`).val();var post_id=jQuery(`input[name="post_id"]`).val();const buttonText=jQuery(that).closest('.password-form-container').find('input[type="submit"]').val();const unlokingText=jQuery(that).data('unlocking-text');var data={'action':'lock_content_form_handler','client_id':ep_client_id,'password':password,'post_id':post_id,};jQuery('#'+perentSel+'-'+ep_client_id+' .password-form input[type="submit"]').val(unlokingText);jQuery.post(eplocalize.ajaxurl,data,function(response){if(response.success){if(!response.embedHtml){jQuery('#'+perentSel+'-'+ep_client_id+' .password-form input[type="submit"]').val(buttonText);jQuery('#'+perentSel+'-'+ep_client_id+' .password-form input[type="password"]').val('');jQuery(that).closest('.password-form-container').find('.error-message').removeClass('hidden');} else{if($('.ep-content-locked').has('#'+perentSel+'-'+ep_client_id).length){$('.ep-content-locked').removeClass('ep-content-locked');} jQuery('#'+perentSel+'-'+ep_client_id+' .ep-embed-content-wraper').html(response.embedHtml);$('#'+perentSel+'-'+ep_client_id).removeClass('ep-content-protection-enabled');if(jQuery('#'+perentSel+'-'+ep_client_id+' .ose-youtube').length>0){epGlobals.youtubeChannelGallery();} if($('.elementor-widget-container .ep-nft-gallery-wrapper').length>0){epElLoadMore();}}}else{jQuery('#password-error_'+ep_client_id).html(response.form);jQuery('#password-error_'+ep_client_id).show();}},'json');} jQuery('.ep-elementor-content .password-form').submit(function(e){e.preventDefault();unlockElSubmitHander('ep-elementor-content',this);});const instaWrappers=document.querySelectorAll('.ep-embed-content-wraper');if(instaWrappers.length>0){instaWrappers.forEach((wrapper)=>{const carouselId=wrapper.getAttribute('data-carouselid');if(!carouselId)return;let options=wrapper.getAttribute(`data-carousel-options`);options=JSON.parse(options);const carouselSelector=`[data-carouselid="${carouselId}"] .embedpress-insta-container`;if(options.arrows){document.querySelector(`[data-carouselid="${carouselId}"] .cg-carousel__btns`).classList.remove('hidden');} epGlobals.initCarousel(carouselSelector,options,carouselId);});} const instaFeed=document.querySelector(`${selectorEl} .ose-instagram-feed`);const instaGallery=document.querySelector(`${selectorEl} .insta-gallery`);if(instaFeed){epGlobals.initializeTabs(instaFeed);} if(instaGallery){epGlobals.instaPopup(instaGallery);$('.popup-close').click(function(e){$('.insta-popup').hide();$('.popup-container').remove();});} if($('.elementor-widget-container .ose-instagram-feed').length>0){epGlobals.instaLoadMore();}};const adsHandler=function($scope,$){window.epAdIndex=typeof(window.epAdIndex)==='undefined'?0:window.epAdIndex+1;let classes=$scope[0].className;let classJoint='.'+classes.split(' ').join('.');const selectorEl=document.querySelector(classJoint+' [data-sponsored-id]');if(jQuery('body').hasClass('elementor-editor-active')&&eplocalize.is_pro_plugin_active){adInitialization(selectorEl,window.epAdIndex);}} elementorFrontend.hooks.addAction("frontend/element_ready/embedpres_elementor.default",filterableGalleryHandler);elementorFrontend.hooks.addAction("frontend/element_ready/embedpress_pdf.default",filterableGalleryHandler);elementorFrontend.hooks.addAction("frontend/element_ready/embedpres_document.default",filterableGalleryHandler);elementorFrontend.hooks.addAction("frontend/element_ready/embedpres_elementor.default",adsHandler);elementorFrontend.hooks.addAction("frontend/element_ready/embedpres_elementor.default",epGlobals.handlePosterImageLoad);});function presentationModeForIOS(iframes){iframes?.forEach(function(iframe){iframe.onload=function(){var iframeDoc=iframe.contentDocument||iframe.contentWindow.document;var button=iframeDoc?.querySelector('#presentationMode.presentationMode');button?.addEventListener('click',function(){iframe.classList.toggle('presentationModeEnabledIosDevice');});iframeDoc?.addEventListener('keydown',function(event){if(event.keyCode===27){iframe.classList.remove('presentationModeEnabledIosDevice');}});};});} function isIOSDevice(){return/iPhone|iPad|iPod/i.test(navigator.userAgent);} if(isIOSDevice()){var iframes=document.querySelectorAll('.embedpress-embed-document-pdf');presentationModeForIOS(iframes)} document.addEventListener("DOMContentLoaded",epGlobals.handlePosterImageLoad);jQuery(document).ready(function($){let currentIndex=-1;function createVideoPopup(){const videoPopupHtml=`
×
`;return $(videoPopupHtml).appendTo('body');} function openVideoPopup(index){const items=$('.layout-grid .item, .layout-list .item, .layout-carousel .item');if(index>=0&&index{closeVideoPopup(videoPopup);});$(window).on('click',function(event){if($(event.target).is(videoPopup)){closeVideoPopup(videoPopup);}});nextBtn.on('click',function(){if(currentIndex>=0&¤tIndex0){openVideoPopup(currentIndex-1);}});}}} function closeVideoPopup(videoPopup){videoPopup.remove();currentIndex=-1;} function updateNavigationButtons(nextBtn,prevBtn,items){prevBtn.toggle(currentIndex>0);nextBtn.toggle(currentIndex`).appendTo("head")),this._index=0,this.animate(),this.start()},animate:function(){this._index=this._index%this._settings.phrases.length;const t=document.createElement("span");t.classList.add("morphext__animated","animate__animated",`animate__${this._settings.animation}`),e(t).text(this._settings.phrases[this._index]),this.element.html(e(t).prop("outerHTML")),this._index+=1},start:function(){var t=this;this._interval=setInterval(function(){t.animate()},this._settings.speed)},stop:function(){this._interval=clearInterval(this._interval)}},e.fn[s]=function(t){return this.each(function(){e.data(this,"plugin_"+s)||e.data(this,"plugin_"+s,new n(this))})}}(jQuery);