PageSourceSearch

https://prime.co.za/wp-content/plugins/powerpack-elements/assets/js/min/frontend-timeline.min.js?ver=3.1.0

js prime.co.za collected 2026-10-04 23:51:09 UTC 19,048 bytes, 1 lines download raw bytes

1!function(c){c(window).on("elementor/frontend/init",()=>{class e extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{timeline:".pp-timeline",verticalTimeline:".pp-timeline-vertical",items:".pp-timeline-vertical .pp-timeline-item",swiperSlide:".pp-timeline-item",connector:".pp-timeline-vertical .pp-timeline-connector",progressBar:".pp-timeline-vertical .pp-timeline-connector-inner",markerClass:".pp-timeline-vertical .pp-timeline-marker-wrapper",carousel:".pp-timeline-horizontal .pp-timeline-items",sliderWrap:".pp-timeline-wrapper",sliderNav:".pp-timeline-navigation",status:".pp-timeline-status"},slidesToShow:{widescreen:3,desktop:3,laptop:3,tablet_extra:3,tablet:2,mobile_extra:2,mobile:1}}}getDefaultElements(){var e=this.getSettings("selectors");return{$timeline:this.$element.find(e.timeline),$verticalTimeline:this.$element.find(e.verticalTimeline),$items:this.$element.find(e.items),$swiperSlide:this.$element.find(e.swiperSlide),$connector:this.$element.find(e.connector),$progressBar:this.$element.find(e.progressBar),$markerClass:this.$element.find(e.markerClass),$carousel:this.$element.find(e.carousel),$sliderWrap:this.$element.find(e.sliderWrap),$sliderNav:this.$element.find(e.sliderNav)}}getI18n(){return"undefined"!=typeof ppTimelineScript&&ppTimelineScript.i18n||{}}getSlidesCount(){var e=this.getSettings("selectors");return this.$element.find(e.swiperSlide).not(".swiper-slide-duplicate").length||(this.elements.$swiperSlide?this.elements.$swiperSlide.length:0)}getDeviceSlidesPerView(e){let t=+this.getElementSettings("columns"+("desktop"===e?"":"_"+e));t||("widescreen"===e||"laptop"===e||"tablet_extra"===e?t=+this.getElementSettings("columns"):"mobile_extra"===e&&(t=+this.getElementSettings("columns_tablet")));var e=t||this.getSettings("slidesToShow")[e]||3,i=this.getSlidesCount();return i?Math.min(i,e):e}getDeviceSlidesToScroll(e){let t=+this.getElementSettings("slides_to_scroll"+("desktop"===e?"":"_"+e));t||("widescreen"===e||"laptop"===e||"tablet_extra"===e?t=+this.getElementSettings("slides_to_scroll"):"mobile_extra"===e&&(t=+this.getElementSettings("slides_to_scroll_tablet")));var e=t||1,i=this.getSlidesCount();return i?Math.min(i,e):e}getDeviceSpaceBetween(e){return elementorFrontend.utils.controls.getResponsiveControlValue(this.getElementSettings(),"items_spacing","size",e)||0}prefersReducedMotion(){return window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}getSwiperOptions(){var e=this.getElementSettings(),t=this.getI18n(),t={slidesPerView:this.getDeviceSlidesPerView("desktop"),slidesPerGroup:this.getDeviceSlidesToScroll("desktop"),spaceBetween:this.getDeviceSpaceBetween(),loop:"yes"===e.infinite_loop,centeredSlides:"yes"===e.center_mode,speed:e.slider_speed.size,watchSlidesVisibility:!0,watchSlidesProgress:!0,preventClicksPropagation:!1,slideToClickedSlide:!0,handleElementorBreakpoints:!0,a11y:{enabled:!0,prevSlideMessage:t.prevSlide||"Previous slide",nextSlideMessage:t.nextSlide||"Next slide",firstSlideMessage:t.firstSlide||"This is the first slide",lastSlideMessage:t.lastSlide||"This is the last slide",paginationBulletMessage:t.paginationBullet||"Go to slide {{index}}",slideLabelMessage:t.slideLabel||"Slide {{index}} of {{slidesLength}}",slideRole:"group",itemRoleDescriptionMessage:t.slideRoleDescription||"slide"}};"yes"!==e.autoplay||this.prefersReducedMotion()||(t.autoplay={delay:e.autoplay_speed,disableOnInteraction:"yes"===e.pause_on_hover,pauseOnMouseEnter:"yes"===e.pause_on_hover});const i={},n=elementorFrontend.config.responsive.activeBreakpoints;return Object.keys(n).forEach(e=>{i[n[e].value]={slidesPerView:this.getDeviceSlidesPerView(e),slidesPerGroup:this.getDeviceSlidesToScroll(e)},this.getDeviceSpaceBetween(e)&&(i[n[e].value].spaceBetween=this.getDeviceSpaceBetween(e))}),t.breakpoints=i,t}updateDirection(e,t){return{widescreen:t.direction_widescreen,desktop:t.direction,laptop:t.direction_laptop,tablet_extra:t.direction_tablet_extra,tablet:t.direction_tablet,mobile_extra:t.direction_mobile_extra,mobile:t.direction_mobile}[e]||t.direction}onElementChange(e){var t,i=this.getElementSettings();e&&(-1!==e.indexOf("columns")||-1!==e.indexOf("slides_to_scroll")||-1!==e.indexOf("items_spacing")||"layout"===e||"infinite_loop"===e||"center_mode"===e||"autoplay"===e||"autoplay_speed"===e||"pause_on_hover"===e||"dots"===e||"arrows"===e||"equal_height"===e?"horizontal"===i.layout?(t=this.getSettings("selectors"),this.$element.find(t.carousel).length&&this.initHorizontalLayout()):"vertical"===i.layout&&(this.destroySwipers(),this.initVerticalLayout()):"vertical"===i.layout&&-1!==e.indexOf("direction")&&(t=elementorFrontend.getCurrentDeviceMode(),e=this.updateDirection(t,i),this.updateTimelineDirection(t,e)))}bindEvents(){var e=this.getElementSettings();"vertical"===e.layout?this.initVerticalLayout():"horizontal"===e.layout&&this.initHorizontalLayout(),this.setPostsCount(1),this.initLoadMore(),this.initNumberedPagination(),this.initInfiniteScroll(),this.initKeyboardControls(),this.initRevealOnFocus()}unbindEvents(){var e=this.getEventNamespace();c(window).off(e).off(e+"-infinite"),clearTimeout(this.equalHeightTimer),this.$element.off(".ppTimelineAutoplay"),this.unbindNavigationIntent(),this.destroySwipers()}destroySwipers(){["timelineSwiper","timelineNavSwiper"].forEach(e
1=>{var t=this[e];t&&"function"==typeof t.destroy&&!t.destroyed&&t.destroy(!0,!0),this[e]=null})}initKeyboardControls(){this.$element.on("keydown",".pp-timeline-nav-item",e=>{"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),this.goToNavItem(e.currentTarget))}),this.$element.on("keydown",".pp-post-load-more",function(e){" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),c(this).trigger("click"))})}goToNavItem(e){var t;this.timelineSwiper&&(t=null!==(t=e.getAttribute("data-swiper-slide-index"))?parseInt(t,10):c(e).index(),isNaN(t)||(this.userNavigated=!0,this.timelineSwiper.params.loop?this.timelineSwiper.slideToLoop(t):this.timelineSwiper.slideTo(t)))}initRevealOnFocus(){this.$element.on("focusin",".pp-timeline-item-hidden",function(){c(this).removeClass("pp-timeline-item-hidden").addClass("bounce-in")})}getEventNamespace(){return".ppTimeline"+this.getID()}initVerticalLayout(){const e=this.getElementSettings(),t=this.getEventNamespace();let i=elementorFrontend.getCurrentDeviceMode(),n=this.updateDirection(i,e);this.updateTimelineDirection(i,n),this.window=c(window),this.window.off("scroll"+t+" resize"+t),this.window.on("resize"+t,c.proxy(function(){i=elementorFrontend.getCurrentDeviceMode(),n=this.updateDirection(i,e),this.updateTimelineDirection(i,n),this.winHeight=this.window.height(),this.scrollTop=this.window.scrollTop(),this.requestAnimation()},this)),this.winHeight=this.window.height(),this.scrollTop=this.window.scrollTop(),this.window.on("scroll"+t,c.proxy(function(){this.scrollTop=this.window.scrollTop(),this.requestAnimation()},this)),this.requestAnimation(),this.revealItems()}initHorizontalLayout(){this.initCarousel()}updateTimelineDirection(e,t){var i;undefined!==t&&((i=this.elements.$timeline).removeClass("pp-timeline-left pp-timeline-center pp-timeline-right"),i.addClass("pp-timeline-"+t))}requestAnimation(){this.isAnimating||requestAnimationFrame(this.reboot.bind(this)),this.isAnimating=!0}revealItems(){this.animationClass="bounce-in";var e=this.elements.$items.filter(".pp-timeline-item-hidden");if(e.length){const i=this.scrollTop+.95*(this.window||c(window)).outerHeight(),n=[];e.each((e,t)=>{c(t).offset().top<=i&&n.push(t)}),n.length&&c(n).removeClass("pp-timeline-item-hidden").addClass(this.animationClass)}}refreshTimelineItems(){var e=this.getSettings("selectors");this.elements.$items=this.$element.find(e.items),this.winHeight=c(window).height(),this.scrollTop=c(window).scrollTop(),this.requestAnimation()}setup(){var e,t,i,n=this.elements.$verticalTimeline,s=n.find(".pp-timeline-item"),l=n.find(".pp-timeline-connector");s.length&&l.length&&(e=s.first(),s=s.last(),e.length)&&s.length&&(t=e.find(".pp-timeline-marker-wrapper"),s=s.find(".pp-timeline-marker-wrapper"),t.length)&&s.length&&(i=s.outerHeight(),l.css({top:t.offset().top-e.offset().top,bottom:n.offset().top+n.outerHeight()-s.offset().top-i/2}))}reboot(){this.isAnimating=!1,this.winHeight!==this.lastWinHeight&&this.setup(),this.start(),this.revealItems()}start(){this.scrollTop===this.lastScrollTop&&this.winHeight===this.lastWinHeight||(this.lastScrollTop=this.scrollTop,this.lastWinHeight=this.winHeight,this.progress()),this.isAnimating=!1}progress(){const n=c(window);var t=this.getSettings("selectors"),t=this.$element.find(t.progressBar);if(t.length){this.elements.$items.each((e,t)=>{var i=c(t).find(this.elements.$markerClass);i.length&&(i=i.offset())&&(i.top<this.window.scrollTop()+n.outerHeight()/2?c(t).addClass("pp-timeline-item-active"):c(t).removeClass("pp-timeline-item-active"))});var i=this.elements.$items.last().find(".pp-timeline-marker-wrapper");if(i.length){var s=i.offset();if(s){s=s.top,i=i.outerHeight();let e=this.window.scrollTop()-t.offset().top+n.outerHeight()/2;s<=this.window.scrollTop()+n.outerHeight()/2&&(e=s-t.offset().top),e+=i/2,t.css("height",e+"px")}}}}isAutoplayActive(){var e=this.timelineSwiper;return!!(e&&e.autoplay&&e.params.autoplay&&e.params.autoplay.enabled)}stopAutoplay(){this.isAutoplayActive()&&this.timelineSwiper.autoplay.running&&this.timelineSwiper.autoplay.stop()}maybeStartAutoplay(){this.isHovered||this.hasFocus||!this.isAutoplayActive()||this.timelineSwiper.autoplay.running||this.timelineSwiper.autoplay.start()}bindAutoplayPause(e){var t=".ppTimelineAutoplay";this.$element.off(t),this.isHovered=!1,this.hasFocus=!1,this.isAutoplayActive()&&("yes"===e.pause_on_hover&&(this.$element.on("mouseenter"+t,()=>{this.isHovered=!0,this.stopAutoplay()}),this.$element.on("mouseleave"+t,()=>{this.isHovered=!1,this.maybeStartAutoplay()})),this.$element.on("focusin"+t,()=>{this.hasFocus=!0,this.stopAutoplay()}),this.$element.on("focusout"+t,e=>{e.relatedTarget&&this.$element[0].contains(e.relatedTarget)||(this.hasFocus=!1,this.maybeStartAutoplay())}))}bindNavigationIntent(){var e=this.$element[0];this.unbindNavigationIntent(),this.navIntentListener=e=>{"keydown"===e.type&&"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||e.target.closest&&e.target.closest(".pp-slider-arrow, .pp-timeline-nav-item, .swiper-pagination-bullet")&&(this.userNavigated=!0)},e.addEventListener("pointerdown",this.navIntentListener,!0),e.addEventListener("keydown",this.navIntentListener,!0);const t=()=>{this.userNavigated=!0},i=()=>{this.userNavigated=!1};
1[this.timelineSwiper,this.timelineNavSwiper].forEach(e=>{e&&(e.on("keyPress",t),e.on("sliderFirstMove",t),e.on("autoplay",i))})}unbindNavigationIntent(){this.navIntentListener&&(this.$element[0].removeEventListener("pointerdown",this.navIntentListener,!0),this.$element[0].removeEventListener("keydown",this.navIntentListener,!0),this.navIntentListener=null)}async initCarousel(){const e=this.getElementSettings(),t=this,i=this.getEventNamespace();this.destroySwipers();var n=this.getSettings("selectors"),s=this.$element.find(n.carousel);if(s.length){this.elements.$carousel=s,this.elements.$sliderNav=this.$element.find(n.sliderNav),this.elements.$swiperSlide=this.$element.find(n.swiperSlide);var s=this.getSwiperOptions(),n=this.getSwiperOptions(),l=(s.keyboard={enabled:!0,onlyInViewport:!0},n.a11y=Object.assign({},n.a11y,{slideRole:"",slideLabelMessage:null,itemRoleDescriptionMessage:null}),delete n.autoplay,"yes"===e.dots&&(s.pagination={el:".swiper-pagination-"+this.getID(),type:"bullets",clickable:!0}),"yes"===e.arrows&&(n.navigation={prevEl:".swiper-button-prev-"+this.getID(),nextEl:".swiper-button-next-"+this.getID()}),"yes"===e.equal_height&&(s.on={init:()=>this.setEqualHeight(),slideChangeTransitionEnd:()=>this.setEqualHeight()}),elementorFrontend.utils.swiper);if(this.timelineSwiper=await new l(this.elements.$carousel,s),this.elements.$sliderNav&&this.elements.$sliderNav.length&&(this.timelineNavSwiper=await new l(this.elements.$sliderNav,n)),this.timelineSwiper){this.timelineNavSwiper&&this.timelineSwiper.controller&&this.timelineNavSwiper.controller&&(this.timelineSwiper.controller.control=this.timelineNavSwiper,this.timelineNavSwiper.controller.control=this.timelineSwiper),this.bindAutoplayPause(e),this.bindNavigationIntent();const o=()=>{this.syncSlideVisibility(),this.updateNavCurrent(),this.announceSlidePosition()};this.syncSlideVisibility(),this.updateNavCurrent(),setTimeout(()=>this.syncSlideVisibility(),50),[this.timelineSwiper,this.timelineNavSwiper].forEach(e=>{e&&(e.on("slideChangeTransitionEnd",o),e.on("resize",()=>this.syncSlideVisibility()))}),"yes"===e.equal_height&&c(window).off("resize"+i).on("resize"+i,function(){clearTimeout(t.equalHeightTimer),t.equalHeightTimer=setTimeout(function(){t.setEqualHeight()},300)})}}}syncSlideVisibility(){[this.elements.$carousel,this.elements.$sliderNav].forEach(e=>{e&&e.length&&(e=e.find(".swiper-slide")).filter(".swiper-slide-visible").length&&e.each(function(){this.classList.contains("swiper-slide-visible")?(this.removeAttribute("aria-hidden"),this.removeAttribute("inert")):(this.setAttribute("aria-hidden","true"),this.setAttribute("inert",""))})})}updateNavCurrent(){if(this.timelineSwiper&&this.elements.$sliderNav&&this.elements.$sliderNav.length){const i=this.timelineSwiper.realIndex;this.elements.$sliderNav.find(".pp-timeline-nav-item").each(function(e){var t=this.getAttribute("data-swiper-slide-index");(null!==t?parseInt(t,10):e)===i?this.setAttribute("aria-current","true"):this.removeAttribute("aria-current")})}}announceSlidePosition(){var e;this.userNavigated&&this.timelineSwiper&&(this.userNavigated=!1,e=this.getI18n().slideStatus||"Showing Slide %1$s of %2$s",this.announce(e.replace("%1$s",this.timelineSwiper.realIndex+1).replace("%2$s",this.getSlidesCount())))}announce(e){const t=this.$element.find(this.getSettings("selectors").status).first();t.length&&e&&(clearTimeout(this.announceTimer),t.text(""),this.announceTimer=setTimeout(()=>t.text(e),100))}focusItem(t){if(t&&t.length){let e=t.find(".pp-timeline-card-title").first();(e=e.length?e:t).attr("tabindex","-1").one("blur",function(){c(this).removeAttr("tabindex")}),e[0].focus()}}setEqualHeight(){if("yes"===this.getElementSettings("equal_height")){var e=this.elements.$carousel.find(".swiper-slide");if(e.length){e.css("height","");let t=0;e.each(function(){var e=c(this).find(".pp-timeline-card").outerHeight();e>t&&(t=e)}),e.css("height",t+"px")}}}initNumberedPagination(){const o=this;o.$element.on("click",".pp-timeline-pagination-ajax .page-numbers:not(.dots)",function(i){var n=c(this).closest(".elementor-widget-pp-timeline"),s=n.find(".pp-timeline"),l=s.data("page");if("main"!=s.data("query-type")){i.preventDefault(),n.find(".pp-timeline-items").first().after('<div class="pp-post-loader"><div class="pp-loader"></div><div class="pp-loader-overlay"></div></div>');let e=1,t=parseInt(n.find(".pp-timeline-pagination .page-numbers.current").html());e=c(this).hasClass("next")?t+1:c(this).hasClass("prev")?t-1:c(this).html();s={page_id:l,widget_id:o.getID(),filter:n.find(".pp-filter-current").data("filter"),taxonomy:n.find(".pp-filter-current").data("taxonomy"),page_number:e,ajax_for:"timeline"},i=n.find(".pp-timeline-wrapper").offset().top-30;o.prefersReducedMotion()?window.scrollTo(0,i):c("html, body").animate({scrollTop:i}
1,"slow"),o.callAjax(o,s,!1,undefined,!0)}})}initLoadMore(){const o=this;this.loadStatus=!0,o.$element.on("click",".pp-post-load-more",function(e){var t=c(this).closest(".elementor-widget-pp-timeline"),e=(e.preventDefault(),t),t=e.find(".pp-posts-loader"),i=o.getPostsCount(),n=e.find(".pp-filter-current").data("filter"),s=e.find(".pp-filter-current").data("taxonomy"),l=e.find(".pp-timeline").data("page");if(elementorFrontend.isEditMode())return t.show(),!1;l={page_id:l,widget_id:o.getID(),filter:void 0!==n&&n?n:"",taxonomy:void 0!==s&&s?s:"",page_number:i+1,ajax_for:"timeline"};o.total=e.find(".pp-timeline-pagination").data("total"),1==o.loadStatus&&i<o.total&&(t.show(),c(this).attr({"aria-busy":"true","aria-disabled":"true"}),o.callAjax(o,l,!0,i,!0),o.loadStatus=!1)})}initInfiniteScroll(){let l=this,o=1,e=this.getEventNamespace(),a=this.$element.find(".pp-posts-loader");if(this.loadStatus=!0,this.elements.$sliderWrap.hasClass("pp-posts-infinite-scroll")){let n=c(window).outerHeight()/1.25,s=!1;const t=function(){var e,t,i;s=!1,elementorFrontend.isEditMode()?a.show():(l.total=l.$element.find(".pp-timeline-pagination").data("total"),!0!==l.loadStatus||o>=l.total||(e=l.$element,t=l.elements.$timeline,!(i=e.find(".pp-timeline-item:last")).length)||c(window).scrollTop()+n<i.offset().top||(i={page_id:t.data("page"),widget_id:l.getID(),filter:e.find(".pp-filter-current").data("filter"),taxonomy:e.find(".pp-filter-current").data("taxonomy"),page_number:e.find(".page-numbers.current").next("a").html(),ajax_for:"timeline"},a.show(),l.callAjax(l,i,!0),o++,l.loadStatus=!1))};c(window).off("scroll"+e+"-infinite").on("scroll"+e+"-infinite",function(){s||(s=!0,requestAnimationFrame(t))}),c(window).off("resize"+e+"-infinite").on("resize"+e+"-infinite",function(){n=c(window).outerHeight()/1.25})}}setPostsCount(e){this.$element.find(".pp-post-load-more").attr("data-count",e)}getPostsCount(){return this.$element.find(".pp-post-load-more").data("count")}callAjax(o,a,r,p,d){let h=this.$element.find(".pp-posts-loader");var m=this;c.ajax({url:ppTimelineScript.ajax_url,data:{action:"pp_get_post",page_id:a.page_id,widget_id:a.widget_id,category:a.filter,taxonomy:a.taxonomy,page_number:a.page_number,ajax_for:a.ajax_for,nonce:ppTimelineScript.timeline_nonce},dataType:"json",type:"POST",success:function(e){let t=o.elements.$sliderWrap,i=t.find(".pp-timeline"),n=t.find(".pp-timeline-items").first();n.length||(n=i);var s=1==r?n.find(".pp-timeline-item").length:0,l=t.find(".pp-posts-empty");l.remove(),0==c(l).length&&c(e.data.not_found).insertBefore(i),1==r?(l=e.data.html,n.append(l)):n.html(e.data.html),o.$element.find(".pp-post-loader").remove(),o.refreshTimelineItems(),o.setup(),t.find(".pp-timeline-pagination-wrap").html(e.data.pagination),o.loadStatus=!0,1==r&&(h.hide(),t.find(".pp-post-load-more").show().attr({"aria-busy":"false","aria-disabled":"false"})),o.setPostsCount(a.page_number),d&&o.focusItem(n.find(".pp-timeline-item").eq(s)),1==r?o.announce(ppTimelineScript.new_items_loaded):ppTimelineScript.page_loaded&&o.announce(ppTimelineScript.page_loaded.replace("%s",a.page_number)),(p+=1)==o.total&&t.find(".pp-post-load-more").hide(),o.$element.trigger("posts.rendered",[o.$element]),m.initVerticalLayout()},error:function(){o.loadStatus=!0,h.hide(),o.$element.find(".pp-post-loader").remove(),o.$element.find(".pp-post-load-more").attr({"aria-busy":"false","aria-disabled":"false"})}}).done(function(){0<o.$element.find(".elementor-invisible").length&&o.$element.find(".elementor-invisible").removeClass("elementor-invisible")})}}elementorFrontend.elementsHandler.attachHandler("pp-timeline",e)})}(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.