window.FF_DEBUG=-1!==location.href.indexOf("debug=1"),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),i=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var s=arguments[1],n=0;n",{class:t.classes.input,readonly:t.utils.isMobile()}),s=f("
",{class:t.classes.items,tabindex:-1}),n=f("
",{class:t.classes.scroll}),o=f("
",{class:t.classes.prefix,html:t.options.arrowButtonMarkup}),a=f("",{class:"label"}),r=t.$element.wrap("
").parent().append(o.prepend(a),s,i),l=f("
",{class:t.classes.hideselect});t.elements={input:i,items:s,itemsScroll:n,wrapper:o,label:a,outerWrapper:r},t.options.nativeOnMobile&&t.utils.isMobile()&&(t.elements.input=void 0,l.addClass(t.classes.prefix+"-is-native"),t.$element.on("change",function(){t.refresh()})),t.$element.on(t.eventTriggers).wrap(l),t.originalTabindex=t.$element.prop("tabindex"),t.$element.prop("tabindex",-1),t.populate(),t.activate(),t.utils.triggerCallback("Init",t)}},activate:function(){var e=this,t=e.elements.items.closest(":visible").children(":hidden").addClass(e.classes.tempshow),i=e.$element.width();t.removeClass(e.classes.tempshow),e.utils.triggerCallback("BeforeActivate",e),e.elements.outerWrapper.prop("class",e.utils.arrayToClassname([e.classes.wrapper,e.$element.prop("class").replace(/\S+/g,e.classes.prefix+"-$&"),e.options.responsive?e.classes.responsive:""])),e.options.inheritOriginalWidth&&0=i.options.multiple.maxLabelEntries+1?(s=s.slice(0,i.options.multiple.maxLabelEntries)).push(f.isFunction(t)?t({text:"..."}):i.utils.format(t,{text:"..."})):s.slice(s.length-1)),i.elements.label.html(s.join(i.options.multiple.separator))}else{var n=i.lookupItems[i.state.currValue];i.elements.label.html(f.isFunction(t)?t(n):i.utils.format(t,n))}},populate:function(){var s=this,e=s.$element.children(),t=s.$element.find("option"),i=t.filter(":selected"),n=t.index(i),o=0,a=s.state.multiple?[]:0;1";return f.isFunction(i.options.listBuilder)&&i.options.listBuilder&&(e=i.options.listBuilder(e)),f.each(e,function(e,t){void 0!==t.label?(s+=i.utils.format('
  • {3}
  • ',i.utils.arrayToClassname([i.classes.group,t.groupDisabled?"disabled":"",t.element.prop("class")]),i.classes.grouplabel,t.element.prop("label")),f.each(t.items,function(e,t){s+=i.getItemMarkup(t.index,t)}),s+="
"):s+=i.getItemMarkup(t.index,t)}),s+""},getItemMarkup:function(e,t){var i=this,s=i.options.optionsItemBuilder,n={value:t.value,text:t.text,slug:t.slug,index:t.index};return i.utils.format('
  • {3}
  • ',e,i.utils.arrayToClassname([t.className,e===i.items.length-1?"last":"",t.disabled?"disabled":"",t.selected?"selected":""]),f.isFunction(s)?i.utils.format(s(t),t):i.utils.format(s,n))},unbindEvents:function(){this.elements.wrapper.add(this.$element).add(this.elements.outerWrapper).add(this.elements.input).off(i)},bindEvents:function(){var s=this;s.elements.outerWrapper.on("mouseenter.sl mouseleave"+i,function(e){f(this).toggleClass(s.classes.hover,"mouseenter"===e.type),s.options.openOnHover&&(clearTimeout(s.closeTimer),"mouseleave"===e.type?s.closeTimer=setTimeout(f.proxy(s.close,s),s.options.hoverIntentTimeout):s.open())}),s.elements.wrapper.on("click"+i,function(e){s.state.opened?s.close():s.open(e)}),s.options.nativeOnMobile&&s.utils.isMobile()||(s.$element.on("focus"+i,function(){s.elements.input.focus()}),s.elements.input.prop({tabindex:s.originalTabindex,disabled:!1}).on("keydown"+i,f.proxy(s.handleKeys,s)).on("focusin"+i,function(e){s.elements.outerWrapper.addClass(s.classes.focus),s.elements.input.one("blur",function(){s.elements.input.blur()}),s.options.openOnFocus&&!s.state.opened&&s.open(e)}).on("focusout"+i,function(){s.elements.outerWrapper.removeClass(s.classes.focus)}).on("input propertychange",function(){var e=s.elements.input.val(),i=new RegExp("^"+s.utils.escapeRegExp(e),"i");clearTimeout(s.resetStr),s.resetStr=setTimeout(function(){s.elements.input.val("")},s.options.keySearchTimeout),e.length&&f.each(s.items,function(e,t){(!t.disabled&&i.test(t.text)||i.test(t.slug))&&s.highlight(e)})})),s.$li.on({mousedown:function(e){e.preventDefault(),e.stopPropagation()},click:function(){return s.select(f(this).data("index")),!1}})},handleKeys:function(e){var t=this,i=e.which,s=t.options.keys,n=-1i&&e.elements.items.height(i),t.removeClass(e.classes.tempshow)},isInViewport:function(){var e=this,t=r.scrollTop(),i=r.height(),s=e.elements.outerWrapper.offset().top,n=s+e.elements.outerWrapper.outerHeight()+e.itemsHeight<=t+i,o=s-e.itemsHeight>t,a=!n&&o;e.elements.outerWrapper.toggleClass(e.classes.above,a)},detectItemVisibility:function(e){var t=this,i=t.$li.filter("[data-index]");t.state.multiple&&(e=f.isArray(e)&&0===e.length?0:e,e=f.isArray(e)?Math.min.apply(Math,e):e);var s=i.eq(e).outerHeight(),n=i[e].offsetTop,o=t.elements.itemsScroll.scrollTop(),a=n+2*s;t.elements.itemsScroll.scrollTop(a>o+t.itemsHeight?a-t.itemsHeight:n-s▾',disableOnMobile:!1,nativeOnMobile:!0,openOnFocus:!0,openOnHover:!1,hoverIntentTimeout:500,expandToItemText:!1,responsive:!1,preventWindowScroll:!0,inheritOriginalWidth:!1,allowWrap:!0,stopPropagation:!0,optionsItemBuilder:"{text}",labelBuilder:"{text}",listBuilder:!1,keys:{previous:[37,38],next:[39,40],select:[9,13,27],open:[13,32,37,38,39,40],close:[9,27]},customClass:{prefix:d,camelCase:!1},multiple:{separator:", ",keepMenuOpen:!0,maxLabelEntries:!1}}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(d){"use strict";var n,a=window.Slick||{};n=0,(a=function(e,t){var i,s=this;s.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:d(e),appendDots:d(e),arrows:!0,asNavFor:null,prevArrow:'',nextArrow:'',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return d('
    "),g.attr("data-type",m.attr("data-type")).attr("post-id",m.attr("post-id")).attr("data-feed",m.attr("data-feed")),m.hasClass("ff-supports-comments")){g.addClass("ff-supports-comments ff-slide-"+y+(C?" ff-slide-media":" ff-slide-no-media"));var T=s.find(".ff-item-meta").outerHeight(),S=o-T;s.find(".ff-comments-list").css("min-height",S+"px")}else g.addClass("ff-no-comments ff-slide-"+y+(C?" ff-slide-media":" ff-slide-no-media"));if(m.data("opts")){var _=m.data("opts");if(_.cta&&_.cta.ltext){var I=P(''+_.cta.ltext+'');$?s.prepend(I):s.find(".ff-item-meta").after(I),v.data("cta",!0)}}if(F=F.add(g),O){if(v=(c=g.clone(!0)).find(".ff-slide-wrapper"),E)for(p={text:c.find(".ff-item-cont").detach(),image:c.find(".ff-media-wrapper").detach(),meta:c.find(".ff-item-header").detach()},u=0,h=E.length;udocument.documentElement.clientHeight,this.scrollbarWidth=this.measureScrollbar(),0',s?(r+='',r+=""+s+"",r+="",r+=""+a+""):r+='"'+a+'"',r+="
    "}):0'+(FlowFlowOpts&&FlowFlowOpts.check_first?FlowFlowOpts.check_first:"Check all comments →")+"
    ":r+="
    "+(FlowFlowOpts&&FlowFlowOpts.no_comments?FlowFlowOpts.no_comments:"No comments yet.")+' '+(FlowFlowOpts&&FlowFlowOpts.be_first?FlowFlowOpts.be_first:"Be the first!")+"
    ",a.html(r).data("comments","added"),setTimeout(function(){a.addClass("ff-comments-loaded")},0);var s=e.carousel;if(!(s.length<2)){var n=l.find(".ff-img-holder").outerWidth(),o=l.find(".ff-img-holder").outerHeight();l.find(".ff-media-wrapper").css("width",n+"px").css("height",o+"px"),l.find(".ff-media-wrapper").find(".ff-slideshow-carousel").remove(),l.find(".ff-media-wrapper").append(''),s.forEach(function(e,t){if("image"==e.media_type||"photo"==e.media_type||e.media_url.indexOf(".jpg")+1||e.media_url.indexOf(".png")+1)var i='';l.find(".ff-slideshow-carousel").append(i)});l.find(".ff-media-wrapper > .ff-img-holder").hide(),l.find(".ff-slideshow-carousel").slick({adaptiveHeight:!0,infinite:!0,arrows:!0,dots:!0,slidesToShow:1,slidesToScroll:1,prevArrow:'',nextArrow:''}),l.data("carousel","added")}},function(e){a.html("Sorry, something went wrong during loading comments for this post. Try to re-open lightbox.")})}},t.prototype._openSlideshow=function(e,t){this.isSlideshowVisible=!0,this.current=t,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("ff-modal-open"+(this.scrollbarVisible?" ff-modal-scrollbar":""));var i=this;i._setViewportItems();var s=P(i.currentItem),n=P(i.nextItem),o=P(i.prevItem),a=m(),r=g();i.$curr=s,this.loadCommentsAndCarousel(e,s.attr("data-feed"),s.attr("post-id")),s.find(".ff-media-wrapper").each(function(e,t){var i=P(this),s=i.parent().parent().data("type");if(i.data("media")&&"inserted"!==i.data("media")){if(i.data("media-image")){var n=new Image;n.src=i.data("media-image"),n.onload=function(){i.removeClass("ff-slide-img-loading")}}else i.removeClass("ff-slide-img-loading");"soundcloud"==s?i.parent().parent().find(".ff-item-meta").after(i.data("media")):i.append(i.data("media")),i.data("media","inserted")}}),n.add(o).find(".ff-media-wrapper").each(function(e,t){var i=P(this),s=i.data("media"),n=i.parent().parent().data("type");if(s&&"inserted"!==s&&!/iframe|video/.test(s)){if(i.data("media-image")){var o=new Image;o.src=i.data("media-image"),o.onload=function(){i.removeClass("ff-slide-img-loading")}}else i.removeClass("ff-slide-img-loading");"soundcloud"==n?i.parent().parent().find(".ff-item-meta").after(i.data("media")):i.append(i.data("media")),i.data("media","inserted")}}),s.addClass("ff-current ff-show"),setTimeout(function(){s.addClass("ff-show-cta")},2e3);var l=parseInt(Number(i.currentItem.offsetHeight/2*1));if(r<2*l?l=parseInt(r/2)-25:l-=25,h(i.currentItem,u?"translate3d("+parseInt(Number(i.currentItem.offsetWidth/2*-1))+"px, -"+l+"px, 0px)":"translate(-50%, -50%)"),i.prevItem){o.addClass("ff-show");var d=Number(-1*(a/2+i.prevItem.offsetWidth/2));h(i.prevItem,u?"translate3d("+(d+100)+"px, -50%, 0px)":"translate("+d+"px, -50%)")}if(i.nextItem){n.addClass("ff-show");d=Number(a/2+i.nextItem.offsetWidth/2);h(i.nextItem,u?"translate3d("+(d-100)+"px,-50%, 0px)":"translate("+d+"px, -50%)")}setTimeout(function(){i.$wrapper.addClass("ff-slideshow-open").scrollTop(0)},200)},t.prototype._navigate=function(s){if(!this.isAnimating)if("next"===s&&this.current===this.itemsCount-1||"prev"===s&&0===this.current)this._closeSlideshow();else{if("next"===s&&this.currentk){var O,E=o+S*(a.length-1)-k,A=(a.length,0);for($=0;$ h4"),l=(l=r.children()).not(".ff-overlay"),"label1"===g.streamOpts["icon-style"]&&p.is(".ff-meta-first")||(l=l.not(".ff-label-wrapper")),c=parseInt(l.first().css("marginTop")),f=parseInt(l.last().css("marginBottom")),n=.07*p.data("newWidth"),d=(l.length-1)*n+c+f,s=a.length?a.height():0,(t=p.data("newHeight")-s-v-44-d)<21&&(t=20<=t?20:s?0:t<0?21+t-n:t),h={height:t},o.css(h),0!==h.height&&o.length||(i=p.data("newHeight")-v-44-d,h={},(i=Math.floor(i))<=21&&(20<=i+n?(a.addClass("ff-header-min"),i=21):(i=i<0?21+i-n:i,h.textIndent="-9999px")),(h.height=i)<=0&&a.detach(),a.css(h))})}P.fn.rowGrid=function(o,a){return this.each(function(){var e,t,i,s,n=P(this);"appended"===o?(o=n.data("grid-options"),e=(t=n.children("."+o.lastRowClass)).nextAll(o.itemSelector).add(t),r(this,o,e)):"shuffle"===o?(o=n.data("grid-options"),e=n.data("items"),i=this,(s=function(s,e){var n=P(),o=P();return function(e,t,i){for(var s=0,n=e.length;s';case"likes":case"liked":return'';case"tag":return'';case"location":case"coordinates":return'';default:return""}}function f(e){var t=e.find(".ff-filter-holder"),i=e.find(".selectric-ff-filters-select"),s=e.find(".ff-filter-holder .ff-filter"),n=t.width(),o=(e.find(".ff-search").outerWidth(),0);M.each(s,function(){o+=M(this).outerWidth()+12}),i.hide(),s.show(),n=i.length?(s=i.length-1,r>i.length&&(a="insertAfter")):s=r,o[a](i.eq(s))),n.addClass("ff-"+(o.length?"":"no-")+"image")})}function L(r){var e,t,i,s,l=M(this),n=this,o=l.parent(),a=o.is("a")?o:l;(i=l.data("size"))&&(e=i.split(";")[1],t=e&&0!=e),t||(e=l.attr("height")||l.height(),t=e&&0!=e),i||l.data("size",{height:e,width:l.attr("width")||l.width()}),o.is(".ff-img-holder")||(l.removeAttr("width").removeAttr("height"),s=M(''),a.wrap(s)),n.onload=function(){t||M(document).trigger("ffimgloaded",{$grid:r});var e=l.closest(".ff-img-holder");e.removeClass("ff-img-loading"),setTimeout(function(){e.addClass("ff-img-loaded"),e=null},100),n=l=null},n.onerror=function(e){if(!(l.data("updated")&&3
    Pin CTA
    ",$+="
    "):$='
    Approve
    "),l.additional){"twitter"===l.type&&(h+=' '),-1<(w=parseInt(l.additional.views))&&"soundcloud"!==l.type&&(h+=' '+(w<0?"":K(w,2))+""),m=parseInt(l.additional.likes);var z=l.cta&&parseInt(l.cta.likes)?' +'+(1==parseInt(l.cta.likes)?1:G(2,9))+"":"";-1 '+(m<0?"":K(m,2))+""+z+""),-1<(v=parseInt(l.additional.shares))&&(h+=' '+(v<0?"":K(v,2))+""),-1 '+(m<0?"":K(m,2))+""+z+""),g=parseInt(l.additional.comments),"twitter"!==l.type&&-1 '+(-1")}i&&(O+=''),S=l.media?' data-media="'+l.media.width+";"+l.media.height+";"+("yep"===Q.forceHTTPS?l.media.url.replace("http:","https:"):l.media.url)+";"+l.media.type+(l.img?";"+l.img.width+";"+l.img.height:"")+'"':"",x=F&&l.media&&"image"===l.media.type?l.media:l.img;var N=l.text&&"posts"!=l.type?l.text:"";N=75<(N=R(N)).length?N.substring(0,75)+"...":N;var P=l.cta&&l.cta.text?''+l.cta.text+'':"";y.image=x?''+N+''+P+"":"",y.header=l.header?'

    '+l.header+"

    ":"",y.text='
    '+l.text+"
    ",y.meta='","flow_flow"==H&&(y.labelIcon=E?"":'
    '+l.type+"
    "),"insta_flow"==H&&(b=j(M[l.feed].type),y.labelIcon=E?"":'
    '+b+M[l.feed].content+"
    ");for(var L=0,W=n.template.length;L'),u+=y[n.template[L]],"meta"===n.template[L]&&(u+=y.labelIcon),L===W-1&&T&&(u+='
    '+h+O+"
    ",u+='
    ');0':l.media&&"video/mp4"==l.media.type&&(u+='
    '),I+='
    '+(s&&l.mod?$:"")+'
    '+u+"
    "+(T?"":'
    '+h+O+"
    "),Y&&(I+=''),I+="
    ",I+="
    "}else d="yep"===l.label?'data-label="'+l.labelTxt+";"+l.labelCol+'"':"",c='style="'+(l.textCol?"color:"+l.textCol+";":"")+("js"===l.adtype?"height:"+l.height+"px":"")+'"',I+='
    "+l.text.replace(/document\.write\((.+?)\)/i,function(e,t){return"jQuery("+t+').appendTo(jQuery("#ff-uid-'+A+' .ff-content"))'})+"
    ",l.permalink&&(I+=''),I+="
    ";A++}return I}function R(e,i){i=(((i||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");return e.replace(/\[.*?\]/gi,"").replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,function(e,t){return-1")?e:""})}function q(t,n){clearTimeout(d);var i=t.data("opts");C||(t.find(".ff-item").each(r),C=!0),d=setTimeout(function(){var e;t.find(".ff-highlight").each(function(){M(this).replaceWith(this.childNodes)}),"list"===i.trueLayout?t.find("li[post-id]").each(function(){var e;(e=M(this).find("*").filter(function(){var e=M(this),t=this.tagName.toUpperCase();if((!this.children.length||0<=this.className.indexOf("ff-content"))&&!/icon|share/.test(this.className)&&"IMG"!=t)return 0<=e.text().toUpperCase().indexOf(n.toUpperCase())})).length&&o(n,e)}):(e="justified"!==t.data("opts").layout?"shuffleCustom":"rowGrid",t[e]("shuffle",function(e,t){var i,s;return(!t||"all"===t.group||-1!==M.inArray(t.group,e.data("groups")))&&((i=e.find("*").filter(function(){M(this);var e=this.tagName.toUpperCase();if((!this.children.length||0<=this.className.indexOf("ff-content"))&&!/icon|share/.test(this.className)&&"IMG"!=e)return 0<=M(this).text().toUpperCase().indexOf(n.toUpperCase())})).length?o(n,i):s=-1!==(s=M.trim(e.attr("data-type")).toLowerCase()).indexOf(n),i.length||s)},"only_sort"))},100)}function o(s,e){e.each(function(e,t){var i=M(t);i.is(".ff-content")?q.finder=window.findAndReplaceDOMText(t,{find:new RegExp(s,"i"),wrap:"span",clss:"ff-highlight"}):i.html(function(e,t){return t.replace(new RegExp(s,"i"),function(e){return''+e+""})})})}function B(s,e,n){C||(e.find(".ff-item").each(r),C=!0);var t=e.data("opts");"list"===t.trueLayout?n?(e.find("li[post-id]").hide(),e.find('li[data-type="'+n+'"]').show()):e.find("li[post-id]").show():e["justified"!==t.layout?"shuffleCustom":"rowGrid"]("shuffle",function(e,t){return(!t||"all"===t.group||-1!==M.inArray(t.group,e.data("groups")))&&("flow_flow"==s&&(i=M.trim(e.attr("data-type")).toLowerCase()),"insta_flow"==s&&(i=M.trim(e.attr("data-feed")).toLowerCase()),n?-1!==i.indexOf(n):1);var i},"only_sort")}function a(C,i,e,t,T,S,_){C.find(".shuffle__sizer");var I,$,a,r,O,u,s=C.find(".ff-item"),n=S.data("plugin"),o=T.trueLayout,l="grid"===o?"":"masonry"===o?"m-":"carousel"===o?"c-":"j-",d={columns:[{size:1e4,val:T[l+"c-desktop"]},{size:1200,val:T[l+"c-laptop"]},{size:1024,val:T[l+"c-tablet-l"]},{size:768,val:T[l+"c-tablet-p"]},{size:480,val:T[l+"c-smart-l"]},{size:380,val:T[l+"c-smart-p"]}],rows:[{size:1e4,val:T[l+"r-desktop"]},{size:1200,val:T[l+"r-laptop"]},{size:1024,val:T[l+"r-tablet-l"]},{size:768,val:T[l+"r-tablet-p"]},{size:480,val:T[l+"r-smart-l"]},{size:380,val:T[l+"r-smart-p"]}],spacing:[{size:1e4,val:T[l+"s-desktop"]},{size:1200,val:T[l+"s-laptop"]},{size:1024,val:T[l+"s-tablet-l"]},{size:768,val:T[l+"s-tablet-p"]},{size:480,val:T[l+"s-smart-l"]},{size:380,val:T[l+"s-smart-p"]}],row:[{size:1e4,val:T[l+"h-desktop"]},{size:1200,val:T[l+"h-laptop"]},{size:1024,val:T[l+"h-tablet-l"]},{size:768,val:T[l+"h-tablet-p"]},{size:480,val:T[l+"h-smart-l"]},{size:380,val:T[l+"h-smart-p"]}]};function c(e,y){var b=M(this),x=S.find(".ff-loader"),k=S.find(".ff-item, li[post-id]").not(".ff-ad").length,t={shop:FlowFlowOpts.domain,action:("insta_flow"===n?"insta_flow_":"")+"fetch_posts","stream-id":T.id,page:T["next-page"],countOfPages:T.countOfPages,hash:T.hash,token:FlowFlowOpts.token};return y?b.addClass("ff-fetching-posts"):(b.css("opacity",0),x.insertAfter(b).show().removeClass("ff-squeezed")),M.get(FlowFlowOpts.ajaxurl,t,function(e){var t=e;if(T.ads){for(var i,s,n=T.ads,o=[],a=e.page*T["page-posts"],r=0,l=t.items.length;r li"))),x.addClass("ff-squeezed").delay(300).hide(),setTimeout(function(){u.filter(":lt(5)").addClass("in"),u.find(".ff-content").dotdotdot({ellipsis:"...",after:""}),setTimeout(function(){t.page+1!=t.countOfPages?y||b.css("opacity",1):y?S.off("beforeChange"):b.remove(),I.layout(),y&&b.removeClass("ff-fetching-posts")},200)},14),FlowFlowOpts.dependencies.ads&&t.ads){var w=jQuery.post(Q.ajaxurl,{action:"flow_flow_ad_action",status:"view",id:t.ads});M.when(w).always(function(e){})}}else console.log("FLOW-FLOW: Empty response from server")})}return a=C.parent(),U(s),setTimeout(p.bind(this,a,C),4),p.call(this,a,C),"justified"!==T.layout?(C.shuffleCustom({itemSelector:".ff-item",gutterWidth:function(e){var t=Array.prototype.slice.call(arguments);return t.push(d.spacing),function(e,t){var i,s,n;for(i=t.length;i--;)if(n=t[i].size,e
      '+FlowFlowOpts.scroll+'
      ')).find(".ff-infinite-content").append(CBPGridGallery.prototype._addSlideShowItems([].slice.call(C[0].querySelectorAll("list"==T.trueLayout?"li[class*=ff-slide]":"carousel"==T.trueLayout?".slick-slide:not(.slick-cloned ) .ff-item:not(.ff-ad)":".ff-item:not(.ff-ad)")),!1,!0)),"yep"===T.hidemeta&&r&&r.addClass("ff-hide-meta"),setTimeout(function(){var e,s,n="down",o=0;if("news"!=T["gallery-type"])y.append(r),p(r);else{y.append(O),p(O),e=M('
      '+(T.heading||"")+'
      '),O.after(e),O.on("click",function(e){M(e.target).closest("li").length||(O.removeClass("ff-infinite-open ff-scroll-up"),k(),y.removeClass("ff-modal-open ff-modal-scrollbar"),O.find("iframe, video").each(function(){var e=M(this);e.closest(".ff-media-wrapper").data("mediaInserted",!1),e.remove()}))}),e.on("click",function(){O.removeClass("ff-infinite-open ff-scroll-up"),k(),y.removeClass("ff-modal-open ff-modal-scrollbar")}),O.on("click",".ff-share-wrapper",function(e){var t=M(this);t.data("opened")?(t.removeClass("ff-popup__visible"),t.data("opened",!1)):(t.addClass("ff-popup__visible"),t.data("opened",!0))});var t=new FF_Viewport(T,".ff-infinite-outer");C.data("viewportForInfinite",t),C.on("click",".ff-item:not(.ff-ad), li[class*=ff-slide]",function(e){var t,i,s=M(this),n="carousel"==T.trueLayout?C.find(".slick-slide:not(.slick-cloned ) .ff-item:not(.ff-ad)"):C.find(".ff-item:not(.ff-ad)"),o=n.length?n.index(s):s.index(),a=M(e.target),r=a.closest('a, [class*="slick-nav"]'),l=a.closest("h4").length,d=a.closest(".ff-icon-share").length,c=a.closest(".ff-moderation-wrapper").length,f=O.find(".ff-media-wrapper").slice(0 li");if(r.length&&!a.is("img")||d||c){if("yep"===T.titles&&l)return;if(!l)return}e.preventDefault(),O.addClass("ff-infinite-open"),m=document.body.scrollHeight>document.documentElement.clientHeight,0<(h=function(){var e=document.createElement("div");e.className="ff-modal-scrollbar-measure",y.append(e);var t=e.offsetWidth-e.clientWidth;return y[0].removeChild(e),t}())&&(g=!0),i=parseInt(y.css("padding-right")||0,10),m&&y.css("padding-right",i+h),y.addClass("ff-modal-open"+(g?" ff-modal-scrollbar":"")),f.each(E).each(X(A,{$slides:p,origIdx:o})),t=p.eq(o).position().top,O.find(".ff-infinite-outer").scrollTop(t),O.removeClass("ff-scroll-up"),T.startingPos=t,T.observeLast=!0,V(C,p),setTimeout(function(){O.find(".ff-infinite-outer").one("scroll",function(){u=!0})},600),b&&("shown"===sessionStorage.getItem("ff-scroll-icon")?O.find(".mouse-scroll").hide():sessionStorage.setItem("ff-scroll-icon","shown")),setTimeout(function(){O.find(".mouse-scroll").fadeOut()},5e3)}),M(document).on("ff-comments-loaded",function(e,t){t.$slide&&void 0!==t.idx&&t.params&&(u||0!==t.idx||t.params.$slides.eq(t.params.origIdx).is(t.$slide)||O.find(".ff-infinite-outer").animate({scrollTop:t.$slide.next("li").position().top},0))}),O.on("scroll-direction",function(e,t){var i=n;(n=t.direction)!==i?o=0:(2===(o+=1)&&"down"===n&&O.removeClass("ff-scroll-up"),3===o&&"up"===n&&O.addClass("ff-scroll-up"))}).on("second-to-last-in-the-view",function(e,t){if(!s){var i=c();s=!0,i.then(function(){s=!1})}})}_||M(window).on("resize",x.bind(this,a,r||O,C))},0)),setTimeout(f.bind(this,a),4),"yep"!==T.viewportin&&"justified"!==T.layout&&!_||"list"===T.trueLayout||F(C,s,"yep"===T.viewportin),C.find(".ff-item:not(.ff-ad) .ff-content").dotdotdot({ellipsis:"...",after:""}),I=C.data("shuffle"),i&&(i=parseInt(i),C.addClass("ff-slider").parent().css("paddingBottom","70px"),function(t,o,e,i){var s,n=M(''),a=M(''),r=Math.ceil(e.$items.length/o);n.on("click",g),a.on("click",v),Y&&(l=t,d=g,c=v,l.bind("touchstart",function(e){u=(new Date).getTime(),f=e.originalEvent.touches[0].pageX,p=e.originalEvent.touches[0].clientY}).bind("touchmove",function(e){h=e.originalEvent.touches[0].pageX,m=e.originalEvent.touches[0].clientY}).bind("touchend",function(){var e=f').append(n).append(a)).data("currentSlide",1),t.on("layout.shuffle",function(){}),t.append(s)}(C,i,I,e),C.shuffleCustom("shuffle",function(e,t){return parseInt(e.attr("data-index"))<=i}),C.data("num",s.length),C.data("visible",0)),S.find(".ff-loadmore-wrapper span").click(c),S.on("slick-last-slide",c),S.on("slick-destroyed",function(){}),M(document).trigger("done.stream",[I,T.id]),I}function E(e){var t=M(this),i=t.data("media"),s=t.data("mediaInserted");if(i&&!s){if(t.data("media-image")){var n=new Image;n.src=t.data("media-image"),n.onload=function(){t.removeClass("ff-slide-img-loading")}}else t.removeClass("ff-slide-img-loading");t.append(i),t.data("mediaInserted","inserted")}}function A(a,e,l){var d=M(this).closest("li");if(d.length){var c=d.find(".ff-comments-list-inner");if(!d.data("comments")&&!d.data("carousel")){var t=M.get(FlowFlowOpts.ajaxurl,{shop:FlowFlowOpts.domain,action:H+"_load_comments_and_carousel",feed_id4post:d.data("feed"),post_id:d.attr("post-id"),permalink:d.find("a.ff-timestamp").attr("href")});l&&"nope"===l.comments?d.addClass("ff-comments-hidden"):c.find(".ff-slide-loader").show(),M.when(t).then(function(e){var t,r="",i=e.comments;i&&0!==i.length?(5<=i.length&&(t=i.length,i=i.slice(0,5)),i.forEach(function(e,t,i){var s,n,o="string"==typeof e.from&&e.from&&"Facebook user"!==e.from?JSON.parse(e.from):e.from,a=e.text;"instagram"==d.data("type")&&(n="https://www.instagram.com/"+(s=o.username)),"facebook"==d.data("type")&&(s=o&&o.name?o.name:o||"",n="https://www.facebook.com/"+(o?o.id:"")),"youtube"==d.data("type")&&(s=o.full_name,n="https://www.youtube.com/channel/"+o.id),"posts"==d.data("type")&&(n="/author/"+(s=o.name)),r+='
      ',s?(r+='',r+=""+s+"",r+="",r+=""+a+""):r+='"'+a+'"',r+="
      "})):r+="
      "+(FlowFlowOpts&&FlowFlowOpts.no_comments?FlowFlowOpts.no_comments:"No comments yet.")+' '+(FlowFlowOpts&&FlowFlowOpts.be_first?FlowFlowOpts.be_first:"Be the first!")+"
      ",t&&(r+='"),c.html(r),d.data("comments","added"),d.is(".ff-supports-comments")&&(l&&l.ignoreLoadedEvent||M(document).trigger("ff-comments-loaded",{idx:a,$slide:d,params:l})),setTimeout(function(){c.addClass("ff-comments-loaded"+(t?"":" ff-few-comments"))},0);var s=e.carousel;if(!(s.length<2||d.has(".ff-video").length)){var n=d.find(".ff-img-holder").outerWidth(),o=d.find(".ff-img-holder").outerHeight();d.find(".ff-media-wrapper").css("width",n+"px").css("height",o+"px"),d.find(".ff-media-wrapper").find(".ff-slideshow-carousel").remove(),d.find(".ff-media-wrapper").append(''),s.forEach(function(e,t){if("image"==e.media_type||"photo"==e.media_type)var i='';d.find(".ff-slideshow-carousel").append(i)});d.find(".ff-media-wrapper > .ff-img-holder").hide(),d.find(".ff-slideshow-carousel").slick({adaptiveHeight:!0,infinite:!0,arrows:!0,dots:!0,slidesToShow:1,slidesToScroll:1,prevArrow:'',nextArrow:''}),d.data("carousel","added")}},function(e){c.html("Sorry, something went wrong during loading comments for this post. Try to re-open lightbox.")}),d.data("carousel","pending").data("comments","pending")}}}function k(){y.css("padding-right","")}function F(e,t,i,s){s||(s=0);var n=e.data("viewport");t.each(function(e){n.add(new FF_ViewportItem({element:this,idx:e+s,threshold:130,enter:r,leave:l,needScroll:i}))})}function V(e,t,i){i||(i=0);var s=e.data("viewportForInfinite");t.each(function(t){var e=M(this);e.data("viewport-tracked")||(s.add(new FF_ViewportItem({element:this,threshold:0,idx:t+i,enter:function(){var e=M(this);e.addClass("ff-viewport-slide-in").data("viewport","in"),e.find(".ff-media-wrapper").each(function(){E.call(this)}),e.data("comments")||A.call(this,t)},leave:function(){M(this).data("viewport","out")},relativeToParentElem:!0})),e.data("viewport-tracked",!0))})}function U(e){e.find(".picture-item__inner").addClass("picture-item__inner--transition")}function r(){var e=M(this),t=e.find(".ff-img-holder img");t.length&&t.data("src")&&!t.data("mounted")&&(t.attr("src",t.data("src")),t.data("mounted",1)),e.addClass("in").data("viewport","in")}function l(){M(this).data("viewport","out")}function G(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}return{init:e,streams:z,addTransitionToItems:U,addViewportItems:F,prepareImageFor:L,adjustItems:P,shuffle:a,recalcLayout:function(e){e.$el.layout()},buildItems:W,buildStreamWith:function(e,n,t,i,s){var o,a,r,l,d,c,f,p,u,h,m,g,v="";if(e){if("yep"!==n.viewportin&&"justified"!==n.layout&&!s||"list"===n.trueLayout||(g=new FF_Viewport(n,window)),H=n.plugin,!n.feeds||"[]"===n.feeds)return"

      No feeds to show. Add at least one

      ";if(!n.layout)return"

      Please choose stream layout on options page

      ";"string"==typeof n.feeds&&(n.feeds=JSON.parse(n.feeds)),c=n.feeds,n.hash=e.hash,n["next-page"]=e.page+1,n.countOfPages=e.countOfPages;var w=e.items,y=0,b=w.length,x=M('[id^="ff-uid-"]').length+1||1;if("yep"===n.gallery&&"news"!=n["gallery-type"]&&(v+='
        '+window.FlowFlowOpts.lightbox_navigate+"
        "),v+='
        ',n.heading&&(v+="

        "+n.heading.replace(/\\/g,"")+"

        "),n.subheading&&(v+="

        "+n.subheading.replace(/\\/g,"")+"

        "),"yep"==n["show-profile"]&&0
        \t\t\t\t\t\t\t\t
        \t\t\t\t\t\t\t\t\t
        \t\t\t\t\t\t\t\t\t\t

        '+d.nickname+'

        \t\t\t\t\t\t\t\t\t\tfollow\t\t\t\t\t\t\t\t\t
        \t\t\t\t\t\t\t\t\t
          \t\t\t\t\t\t\t\t\t\t
        • '+N(d.user_counts_media,0)+" "+window.FlowFlowOpts.posts+"
        • "+N(d.user_counts_followed_by,0)+" "+window.FlowFlowOpts.followers+"
        • "+N(d.user_counts_follows,0)+" "+window.FlowFlowOpts.following+'
        • \t\t\t\t\t\t\t\t\t
        \t\t\t\t\t\t\t\t\t
        '+d.screenname+""+function(e,t){if(!e)return"";var i=!0===t||null==t?"_blank":"";return e.replace(/(http|ftp|https:\/\/[\w\-_]+\.{1}[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/gi,function(e){var t=/^(?:(?:https?|ftp):\/\/)/i.test(e)?e:"http://"+e;return''+e+""}).replace(/\@(\w+)(?!\w)/g,function(e){return''+e+""}).replace(/\#\w+(?!\w)/g,function(e){return''+e+""})}(d.user_bio)+"
        \t\t\t\t\t\t\t\t
        \t\t\t\t\t\t\t
        \t\t\t\t\t\t
        \t\t\t\t\t
        "),"yep"===n.filter){if("flow_flow"==H){for(p="",f={},y=m=0;y
        ',u+='");u=1'+Q.filter_all+""+u:u,p+='",v+='
        '+(1'+Q.filter_all+""+p:"")+'
        '}"insta_flow"==H&&(p=u="",h=[],m=0,c.forEach(function(e,t,i){var s=e.content;e.hasOwnProperty("location-meta")&&e["location-meta"].hasOwnProperty("name")&&(s=e["location-meta"].name),h.push({id:e.id,type:e["timeline-type"],label:s})}),h.forEach(function(e,t,i){if("ad"!==e.type){var s=j(e.type);m+=1,p+='\t\t\t\t\t\t'+s+""+e.label+"",u+='"}}),u=1'+Q.filter_all+""+u:u,p+='",v+='
        '+(1'+Q.filter_all+""+p:"")+'
        ')}t&&(Q.moderation=t,v+='

        PREMODERATION MODE IS ON. APPROVE POSTS AND HIT SAVE CHANGES.

        Save changesApprove new postsShow/hide UISave changes
        '),v+="",C=n["gc-style"],v+='
        ',v+=W(w,x,!0,t,n),"carousel"!==n.trueLayout&&"list"!==n.trueLayout&&(v+='
        '),v+="
        ",1'+window.FlowFlowOpts.show_more+""),"carousel"===n.trueLayout&&(v+='
        '+FlowFlowOpts.loading+"
        "),t&&(v+='
        • CTA

        Apply & Save Clear All

        '),(o=M(v)).each(function(e){if(this.className.indexOf("ff-stream-wrapper")+1)return a=M(this),!1}),l=(r=o.find(".ff-item")).not(".ff-ad"),a.data("opts",n).data("items",r).data("viewport",g);var C,T,S,_,I,$,O,E="";if(l.each(function(){var e=M(this);e.is(".ff-image")?e.find("img").not(".ff-initial-image").remove():e.find("img").not(":first").remove();var t=e.attr("post-id"),i=w.find(function(e){return e.id==t});i&&i.cta&&(i.cta.text||i.cta.ltext)&&(E+="#ff-stream-"+n.id+' .in[post-id="'+t+'"] .ff-post-cta,#ff-stream-infinite-'+n.id+' .ff-viewport-slide-in[post-id="'+t+'"] .ff-post-cta,#ff-stream-'+n.id+'-slideshow .ff-show-cta[post-id="'+t+'"] .ff-post-cta{background-color: '+i.cta.color+";}"),e.data("opts",i)}),(C=document.getElementById("ff-cta-css-"+n.id))&&C.parentNode.removeChild(C),E&&J(E,"ff-cta-css-"+n.id),o.find("p:empty, .ff-content a:empty").remove(),o.find(".ff-filters-select").selectric({nativeOnMobile:!1,labelBuilder:function(t){var e=n.feeds.find(function(e){return e.id==t.value});return(e?j(e["timeline-type"]):"")+t.text},optionsItemBuilder:function(t,e,i){var s=n.feeds.find(function(e){return e.id==t.value});return(s?j(s["timeline-type"]):"")+t.text}}).on("change",function(e){var t=this.value;B(H,a,t)}),o.find("img").each(function(){L.apply(this,[a])}),o.find(".ff-filter").click(function(){o.find(".ff-filter--active").removeClass("ff-filter--active");var e=M(this).addClass("ff-filter--active").attr("data-filter");B(H,a,e)}).mouseenter(function(){var e,t=M(this),i=t.data("filter");"flow_flow"==H&&(e=a.find(i?"[data-type="+i+"]":".ff-item, li[post-id]").length),"insta_flow"==H&&(e=a.find(i?"[data-feed="+i+"]":".ff-item, li[post-id]").length),t.attr("data-num",e)}),o.find(".ff-search input").on("keyup",function(){var e=this.value.toLowerCase();q(a,e)}),o.on("click",".ff-cta-likes",function(e){var t=M(this);e.preventDefault(),t.closest(".ff-item").click(),t.hide()}),o.on("click","a",function(e){var t=M(this),i=M(this).attr("href");return-1==i.indexOf("mailto:?")&&t.closest(".ff-share-popup").length?(window.open(i,"sharer","toolbar=0,status=0,width=626,height=436"),!1):(!t.is(".ff-no-link")||"nope"!==n.gallery&&!Y)&&void 0}),o.on("click",".ff-share-wrapper",function(e){var t=M(this);t.data("opened")?(t.removeClass("ff-popup__visible"),t.data("opened",!1)):(t.addClass("ff-popup__visible"),t.data("opened",!0))}),"nope"===n.gallery?(a.addClass("ff-gallery-off").on("click",'.ff-item:not(".ff-ad") .picture-item__inner',function(e){var t=M(e.target),i=M(this);if(!t.closest("a, .ff-share-wrapper").length||t.is("img"))return Y?i.toggleClass("ff-taped"):function(e){if(document.createEvent){var t=document.createEvent("MouseEvents");t.initEvent("click",!1,!0),e.dispatchEvent(t)}else document.createEventObject?e.fireEvent("onclick"):"function"==typeof e.onclick&&e.onclick()}(i.find(".ff-timestamp")[0]),!1}),a.on("click",".ff-timestamp",function(e){e.stopImmediatePropagation()})):a.addClass("ff-gallery-on"),"yep"===Q.open_in_new){var A=location.hostname;o.find("a").filter(function(){var e=this.href;return this.hostname!=A&&e&&-1==e.indexOf("mailto")}).attr("target","_blank").attr("rel","noreferrer")}for(var F in P(l,n),t&&(M.spectrum&&o.find(".ff-colorpicker").spectrum({type:"text",showAlpha:!1,allowEmpty:!1,showPalette:!1}),T=o,_=(S=n).id,I=S.hash,$={},O=FlowFlowOpts.token,T.find(".ff-moderation-apply").click(function(e){var t=M.post(FlowFlowOpts.ajaxurl,{action:"flow_flow_moderation_apply_action",moderation_action:"custom_approve",stream:_,changed:$,hash:I,token:O});M.when(t).then(function(e){location.reload()},function(){location.reload()})}),T.find(".ff-moderation-approve-new").click(function(e){var t=M.post(FlowFlowOpts.ajaxurl,{action:"flow_flow_moderation_apply_action",moderation_action:"new_posts_approve",stream:_,hash:I,token:O});M.when(t).then(function(e){location.reload()},function(){location.reload()})}),T.find(".ff-moderation-toggle-ui").click(function(e){var t=T.parent();t.toggleClass("ff-mod-ui-off");var i=t.find(".ff-stream-wrapper").data("shuffle");i&&i.layout()}),T.on("change",".ff-moderation-wrapper input",function(e){var t=M(this),i=t.is(":checked"),s=t.closest(".ff-item, li[class*=ff-slide]"),n=s.attr("post-id");t.closest(".ff-moderation-wrapper")[i?"addClass":"removeClass"]("ff-approved"),$[n]?$[n].approved=i:$[n]={approved:i},$[n].feedId=s.data("feed"),$[n].type=s.data("type"),s.closest(".ff-stream").find(".ff-header").addClass("ff-btn-apply-vis")}),T.on("click",".ff-post-controls__pin",function(e){var t=M(this),i=t.is(".ff-post-controls__pinned"),s=t.closest(".ff-item, li[class*=ff-slide]"),n=s.attr("post-id");t[i?"removeClass":"addClass"]("ff-post-controls__pinned");var o=i?"0":"1";$[n]?$[n].pinned=o:$[n]={pinned:o},$[n].feedId=s.data("feed"),$[n].type=s.data("type"),s.closest(".ff-stream").find(".ff-header").addClass("ff-btn-apply-vis")}),T.on("click",".ff-post-controls__edit",function(e){var t=M(this),i=T.parent();i.addClass("ff-settings-popup__visible");var s=t.closest(".ff-item, li[class*=ff-slide]"),n=(s.attr("post-id"),s.data("opts"));i.find("#ff-cta-text-"+S.id).val(n.cta?n.cta.text:""),i.find("#ff-cta-ltext-"+S.id).val(n.cta?n.cta.ltext:""),i.find("#ff-cta-url-"+S.id).val(n.cta?n.cta.url:""),i.find("#ff-cta-new-"+S.id).prop("checked",n.cta&&"yep"==n.cta.new),i.find("#ff-cta-open-"+S.id).prop("checked",n.cta&&"yep"==n.cta.open),i.find("#ff-cta-like-"+S.id).val(n.cta&&n.cta.likes?n.cta.likes:"0"),M.spectrum&&i.find("#ff-cta-color-"+S.id).spectrum("set",n.cta&&n.cta.color||"#e916b7"),i.find(".ff-settings-popup").data("current",s)}),T.on("click",".ff-popup-close",function(e){T.parent().removeClass("ff-settings-popup__visible")}),T.on("click",".ff-settings-btn",function(e){var t=M(this),i=T.parent(),s=i.find(".ff-settings-popup").data("current"),n=s.attr("post-id"),o=t.is(".ff-settings-btn--clear");o&&(i.find("#ff-cta-text-"+S.id).val(""),i.find("#ff-cta-ltext-"+S.id).val(""),i.find("#ff-cta-url-"+S.id).val(""),M.spectrum&&i.find("#ff-cta-color-"+S.id).spectrum("set","#e916b7"),i.find("#ff-cta-new-"+S.id).prop("checked",!1),i.find("#ff-cta-open-"+S.id).prop("checked",!1),i.find("#ff-cta-like-"+S.id).val("0"));var a=i.find("#ff-cta-text-"+S.id).val(),r=i.find("#ff-cta-ltext-"+S.id).val(),l=i.find("#ff-cta-new-"+S.id).prop("checked")?"yep":"nope",d=i.find("#ff-cta-url-"+S.id).val(),c=i.find("#ff-cta-open-"+S.id).prop("checked")?"yep":"nope",f=i.find("#ff-cta-color-"+S.id).val(),p=i.find("#ff-cta-like-"+S.id).val(),u={text:a,ltext:r,new:l,open:c,url:d,color:f,likes:p};$[n]?$[n].cta=u:$[n]={cta:u},$[n].feedId=s.data("feed"),$[n].type=s.data("type"),(a||r||d)&&s.find(".ff-post-controls__edit").addClass("ff-post-controls__cta"),o||i.removeClass("ff-settings-popup__visible"),t.is(".ff-settings-btn--apply")&&T.find(".ff-moderation-apply").click()})),z[n.id]=a,i)i[F]&&this[F].init(a);return o}console.log("FLOW-FLOW: Empty response from server")},setupGrid:function(e,t,i,s,n,o){setTimeout(function(){a(e,t,i,s,n,o)},0)},adjustImgHeight:function(e,n){e.find("img").each(function(){var e=M(this),t=parseInt(e.css("height")),i=parseInt(e.css("width")),s=n/i;e.css("height",Math.round(t*s)+"px")})}}}(s);window.FlowFlow=T.init();var X=function(t,i){return function(){var e=Array.prototype.slice.call(arguments);return e.push(i),t.apply(this,e)}};function K(e,t,i,s){return e=Number(e),!1!==(s=s||!1)?r(e,t,i,s):r(e,t,i,1e12<=e?"T":1e9<=e?"B":1e6<=e?"M":1e3<=e?"K":"")}function r(e,t,i,s){var n=0;switch(s){case"T":n=e/1e12;break;case"B":n=e/1e9;break;case"M":n=e/1e6;break;case"K":n=e/1e3;break;case"":n=e}!1!==t&&(new RegExp("\\.\\d{"+(t+1)+",}$").test(""+n)&&(n=n.toFixed(t)));return!1!==i&&(n=Number(n).toFixed(i)),n+s}function J(e,t){var i=document.createElement("style");return i.type="text/css",t&&(i.id=t),/WebKit|MSIE/i.test(navigator.userAgent)?i.styleSheet?i.styleSheet.cssText=e:i.innerText=e:i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}}(jQuery),jQuery(document).on("done.stream",function(e,t,i){jQuery(function(){setTimeout(function(){},500)})});