PageSourceSearch

https://www.vieillescharrues.asso.fr/wp-content/themes/nc/dist/js/app.js?ver=1790843759

js vieillescharrues.asso.fr collected 2026-10-01 11:55:39 UTC 12,716 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunklegacy=self.webpackChunklegacy||[]).push([[804,260],{8298:function(e,t,n){var o=n(5671),i=n(3144),a=n(7757),r=n.n(a),c=(n(1539),n(8674),n(4747),n(4678),n(6358)),l=n(9092),s=n(2732),u=n.n(s),d=n(5440),f=n.n(d),v=n(1248),h=n.n(v),m=n(2442),p=n.n(m),y=n(2662),g=n.n(y),w=n(7885),S=function(e,t,n){return new Promise((function(o,i){var a=function(e){try{c(n.next(e))}catch(e){i(e)}},r=function(e){try{c(n.throw(e))}catch(e){i(e)}},c=function(e){return e.done?o(e.value):Promise.resolve(e.value).then(a,r)};c((n=n.apply(e,t)).next())}))};c.ZP.registerPlugin(l.i);var L=!0,P=document.querySelector("html");new w.Z({bodySelector:".body",transitionSelector:".transition-page",lottiePath:"".concat(WPTEMPLATE,"/static/bodymovin/transition/data.json"),duration:.7});var E=function(){function e(){(0,o.Z)(this,e),this.isLoaded(),this.lazyload=new(u())({unobserve_entered:!0,elements_selector:".js-lazy",threshold:.7*window.innerHeight,callback_enter:function(e){if(e.classList.contains("js-lazy-error-placeholder"))e.lazyLoadPlaceholder=e.src;else if(null==e.dataset.src){var t=e.closest("figure");t&&t.classList.add("img-is-loaded")}},callback_loaded:function(e){var t=e.closest("figure");t&&t.classList.add("img-is-loaded")},callback_error:function(e){e.lazyLoadPlaceholder&&(e.src=e.lazyLoadPlaceholder)}});var t=document.querySelector(".main-header");if(t){var n=0;window.addEventListener("scroll",(function(e){window.scrollY<n&&window.scrollY>.5*t.offsetHeight?(P.classList.remove("scroll-down"),P.classList.add("scroll-up")):window.scrollY>.5*t.offsetHeight?(P.classList.remove("scroll-up"),P.classList.add("scroll-down")):P.classList.remove("hide-header","scroll-up"),n=window.scrollY})),window.dispatchEvent(new Event("scroll"))}var i=document.querySelectorAll(".toggle-menu");i&&i.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault(),P.classList.toggle("open-menu")}))})),this.accordion(),this.programmation(),this.bodymovin(),this.newsletter(),this.carousel(),this.randomizeFocus(),this.tilt()}return(0,i.Z)(e,[{key:"isLoaded",value:function(){var e=this;c.ZP.to(document.querySelector(".body"),{autoAlpha:1,duration:.3,delay:.1,onComplete:function(){e.inViewport()}})}},{key:"randomizeFocus",value:function(){var e=document.querySelectorAll(".randomize-focus");window.innerWidth<992||e&&e.forEach((function(e){var t=e.querySelectorAll(".card"),n=[{xPercent:-1,yPercent:-5,rotation:-2},{xPercent:1,yPercent:2,rotation:0},{xPercent:2,yPercent:-6,rotation:4},{xPercent:-2,yPercent:3,rotation:-2}],o=e.clientWidth,i=t.length,a=0,r=e.querySelectorAll(".card .card-content");function l(e){var n={xPercent:20*(Math.random()-.5),yPercent:15*(Math.random()-.5),rotation:10*(Math.random()-.5),scale:1,duration:.8,ease:"elastic.out(1, 0.75)"};c.ZP.to(t[e],n)}t.forEach((function(e,t){c.ZP.set(e,n[t%4])})),e.addEventListener("mousemove",(function(n){var s,u=(n.clientX-e.getBoundingClientRect().left)/o,d=Math.ceil(u*i);a!==d&&d>0&&d<=i&&(0!==a&&l(a-1),s=(a=d)-1,c.ZP.to(t[s],{xPercent:0,yPercent:0,rotation:0,duration:.8,scale:1.2,ease:"elastic.out(1, 0.75)"}),r.forEach((function(e,t){t!==s?c.ZP.to(e,{xPercent:23/(t-s),ease:"elastic.out(1, 0.75)",duration:.8}):c.ZP.to(e,{xPercent:0,ease:"elastic.out(1, 0.75)",duration:.8})})))})),e.addEventListener("mouseleave",(function(){l(a-1),a=0,c.ZP.to(r,{xPercent:0,ease:"elastic.out(1, 0.75)",duration:.8})}))}))}},{key:"tilt",value:function(){var e=document.querySelectorAll(".js-tilt");e&&e.forEach((function(e){g().init(e,{max:14,speed:200,"mouse-event-element":e.dataset.tiltTrigger?e.dataset.tiltTrigger:null})}))}},{key:"menu",value:function(){var e=document.querySelectorAll(".main-nav .menu"),t=document.querySelectorAll(".main-nav .figures figure");e&&t&&e.forEach((function(e){var n=e.querySelectorAll("li"),o=e.querySelectorAll("a"),i=0,a=-1;function r(e){e!=a&&(t[e].classList.add("show"),a>=0&&t[a].classList.remove("show"),a=e)}n&&n.forEach((function(e,t){e.classList.contains("current_page_item")&&(i=t)})),o&&o.forEach((function(e,t){e.addEventListener("mouseenter",(function(){r(t)})),e.addEventListener("mouseleave",(function(){r(i)}))})),r(i)}))}},{key:"favicon",value:function(){var e=["".concat(urlTemplate,"/static/img/favicon1.png"),"".concat(urlTemplate,"/static/img/favicon2.png"),"".concat(urlTemplate,"/static/img/favicon3.png"),"".concat(urlTemplate,"/static/img/favicon4.png"),"".concat(urlTemplate,"/static/img/favicon5.png"),"".concat(urlTemplate,"/static/img/favicon6.png"),"".concat(urlTemplate,"/static/img/favicon7.png"),"".concat(urlTemplate,"/static/img/favicon8.png"),"".concat(urlTemplate,"/static/img/favicon9.png"),"".concat(urlTemplate,"/static/img/favicon10.png"),"".concat(urlTemplate,"/static/img/favicon11.png"),"".concat(urlTemplate,"/static/img/favicon12.png")],t=0;setInterval((function(){null!==document.querySelector("link[rel='icon']")&&document.querySelector("link[rel='icon']").remove(),null!==document.querySelector("link[rel='shortcut icon']")&&document.querySelector("link[rel='shortcut icon']").remove(),document.querySelector("head").insertAdjacentHTML("beforeend",'<link rel="icon" href="'.concat(e[t],'" type="image/png">')),t==e.length-1?t=0:t++}),100)}},{key:"programmation",value:function(){var e=this,t=document.querySelectorAll(".sticky-elts");t&&t.forEach((function(t){var n,o=t.querySelectorAll(".item");function i(){var e=t.offsetHeight;if(o){var i=t.querySelectorAll(".header"),a=(t.querySelectorAll(".content"),t.querySelector(".intro")),r=a?a.offsetHeight:0;o.forEach((function(e,t){c.ZP.set(e,{position:"absolute",top:0}),t<o.length-1?r+=i[t].offsetHeight:r+=e.offsetHeight})),c.ZP.set(t,{height:r-40}),n=c.ZP.timeline();var s=0,u=0;o.forEach((function(e,t){if(t>0){var i=o[t-1];s+=parseFloat(i.offsetHeight)-20,u+=parseFloat(i.querySelector(".header").offsetHeight),c.ZP.set(e,{y:s}),n.to(e,{y:u,duration:.5*t,ease:"none"},"start"),n.to(e.querySelector(".bg"),{width:"95%",duration:.5*t,ease:"none"},"<")}
1else c.ZP.to(e.querySelector(".bg"),{width:"95%",scrollTrigger:{trigger:e,start:"top top",end:"50% top",scrub:!0}})})),l.i.create({trigger:t,start:"top top",end:"+=".concat(e,"px bottom"),scrub:.1,pin:!0,animation:n})}}window.addEventListener("resize",(function(){e.throttle((function(){!function(){var e=l.i.getAll();if(e)for(var i=0;i<e.length;i++)e[i].kill(!0);n.kill(!0),c.ZP.set(t,{clearProps:"all"}),o&&o.forEach((function(e){c.ZP.set(e,{clearProps:"all"})}))}(),i()}),250)})),i()}))}},{key:"accordion",value:function(){var e=document.querySelectorAll(".accordion");e&&e.forEach((function(e){var t=e.querySelectorAll(".accordion-header"),n=e.querySelectorAll(".accordion-content");t&&n&&t.forEach((function(e,t){e.addEventListener("click",(function(o){o.preventDefault();var i=e.classList.contains("active")?0:n[t].children[0].offsetHeight;c.ZP.to(n[t],{duration:.4,ease:"circ.inOut",height:i}),e.classList.toggle("active")}))}))}))}},{key:"bodymovin",value:function(){var e=document.querySelectorAll("[data-bodymovin]");e&&e.forEach((function(e){e.addEventListener("inview",(function(){if(e.classList.contains("loaded"))e.lottie&&e.lottie.play();else{var t=e.dataset.bodymovin;fetch(t).then((function(n){if(200==n.status){var o=h().loadAnimation({container:e,renderer:"svg",loop:!0,autoplay:!0,path:t,onComplete:function(){}});e.classList.add("loaded"),e.lottie=o}}))}})),e.addEventListener("outview",(function(){e.lottie&&e.lottie.pause()}))}))}},{key:"inViewport",value:function(){f().offset({bottom:.15*window.innerHeight}),f()(".js-reveal:not(.is-visible)").on("enter",(function(e){e.dispatchEvent(new Event("inview")),e.classList.add("is-visible"),e.classList.remove("not-visible");var t=e.querySelector("video");if("VIDEO"===e.tagName&&""!==e.dataset.autoplay&&void 0!==e.dataset.autoplay||t&&""!==t.dataset.autoplay&&void 0!==t.dataset.autoplay){var n=t||e,o=n.play();null!==o&&o.catch((function(){n.play()}))}})).on("exit",(function(e){var t=e.querySelector("video");("VIDEO"===e.tagName&&""!==e.dataset.autoplay&&void 0!==e.dataset.autoplay||t&&""!==t.dataset.autoplay&&void 0!==t.dataset.autoplay)&&(t||e).pause();e.dispatchEvent(new Event("outview")),e.classList.add("not-visible")}))}},{key:"newsletter",value:function(){return S(this,null,r().mark((function e(){var t,n=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t=document.querySelectorAll("form.subscribe-nsl"))&&t.forEach((function(e){return S(n,null,r().mark((function t(){var n=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.addEventListener("submit",(function(t){return S(n,null,r().mark((function n(){var o;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.preventDefault(),e.classList.add("pointer-events-none"),"https://newsletter.vieillescharrues.workers.dev/",{action:e.querySelector("input[name=action]").value,
1nonce:e.querySelector("input[name=nonce]").value,email:e.querySelector("input[name=email]").value},(o=e.querySelectorAll(".msg"))&&o.forEach((function(e){return e.remove()})),jQuery.ajax({data:{email:e.querySelector("input[name=email]").value},url:"https://newsletter.vieillescharrues.workers.dev/",method:"POST",success:function(t,n,o){var i=document.createElement("div");i.classList.add("msg","msg-form"),i.innerText="Bravo pour votre inscription !",e.append(i),e.classList.remove("pointer-events-none"),e.querySelector("input[name=email]").value=""},error:function(t,n,o){var i=document.createElement("div");i.classList.add("msg","msg-form"),i.innerText="Une erreur est survenue",e.append(i),console.error(t,n,o),e.classList.remove("pointer-events-none")}}),n.abrupt("return");case 9:case"end":return n.stop()}}),n)})))}));case 1:case"end":return t.stop()}}),t)})))}));case 2:case"end":return e.stop()}}),e)})))}},{key:"carousel",value:function(){var e=document.querySelectorAll(".carousel");e&&e.forEach((function(e){new(p())(e,{cellAlign:e.dataset.carouselAlign?e.dataset.carouselAlign:"left",pageDots:!1,cellSelector:".item",contain:!0,prevNextButtons:!1,watchCSS:!!e.dataset.carouselWatchcss,wrapAround:!!e.dataset.carouselWraparound,on:{select:function(t){if(null==e.dataset.carouselWraparound){var n=Math.round(this.size.width/this.selectedCell.size.width);this.nextButton&&this.nextButton.element&&(n+t>=this.cells.length?(this.nextButton.element.classList.add("disabled"),t=this.cells.length-n):this.nextButton.element.classList.remove("disabled"))}}}})}))}},{key:"throttle",value:function(e,t){L&&window.clearTimeout(L),L=window.setTimeout(e,t)}}]),e}();window.addEventListener("DOMContentLoaded",(function(){new E})),window.addEventListener("load",(function(){}))},7885:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(5671),i=n(3144),a=(n(1539),n(4747),n(2772),n(8674),n(6358)),r=n(1248),c=n.n(r),l=function(){function e(t){var n=t.bodySelector,i=void 0===n?".body":n,a=t.transitionSelector,r=void 0===a?".transition-page":a,c=t.lottiePath,l=void 0===c?"":c,s=t.duration,u=void 0===s?.7:s,d=t.ease,f=void 0===d?"circ.in":d,v=t.offsetY,h=void 0===v?"4rem":v,m=t.linkSelector,p=void 0===m?'a:not([href*="#"]):not([target="_blank"]):not([href*="wp-admin"]):not([data-no-transition]):not([href*="#facil-iti"])':m;(0,o.Z)(this,e),this.body=document.querySelector(i),this.transitionContainer=document.querySelector(r),this.body&&this.transitionContainer&&(this.isTransitioning=!1,this.duration=u,this.ease=f,this.offsetY=h,this.initLottie(l),this.bindLinks(p),this.bindHistory())}return(0,i.Z)(e,[{key:"initLottie",value:function(e){this.lottie=c().loadAnimation({container:this.transitionContainer,renderer:"svg",loop:!1,autoplay:!1,path:e,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}})}},{key:"bindLinks",value:function(e){var t=this;document.querySelectorAll(e).forEach((function(e){e.href.indexOf(window.location.hostname)>=0&&e.addEventListener("click",(function(n){n.preventDefault(),t.navigate(e.href)}))}))}},{key:"bindHistory",value:function(){var e=this;history.replaceState({url:location.href},"",location.href),window.addEventListener("popstate",(function(t){var n;if(!e.isTransitioning){var o=(null==(n=t.state)?void 0:n.url)||document.referrer||"/";e.navigate(o,!0)}}))}},{key:"navigate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.isTransitioning||(this.isTransitioning=!0,t||history.pushState({url:e},"",e),this.play(),setTimeout((function(){window.location.href=e}),1240))}},{key:"play",value:function(){var e=this;return new Promise((function(t){e.lottie.goToAndPlay(0),a.ZP.to(e.body,{autoAlpha:0,marginTop:e.offsetY,duration:e.duration,ease:e.ease,onComplete:t})}))}}]),e}()}},function(e){e.O(0,[216],(function(){return t=8298,e(e.s=t);var t}));e.O()}]);
2//# sourceMappingURL=app.js.map

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.