PageSourceSearch

https://internationalmidwives.org/wp-content/themes/friendly-sage/public/js/339.a8a0d6.js

js internationalmidwives.org collected 2026-10-02 02:31:47 UTC 12,081 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_roots_bud_sage_sage=self.webpackChunk_roots_bud_sage_sage||[]).push([[339],{
1"./scripts/helpers.js":(e,t,n)=>{n.d(t,{GJ:()=>o,I3:()=>s});const o=()=>document.body.classList.contains("wp-admin"),s=()=>"undefined"!=typeof wp&&void 0!==wp.blocks},
1"./scripts/views/blocks/accordion.js":(e,t,n)=>{var o=n("../node_modules/@roots/sage/lib/client/dom-ready.js"),s=n("./scripts/helpers.js");const i=(e=>{const t=()=>{if((0,s.GJ)()){const e=100;let t=0;const o=setInterval((()=>{t<e?((0,s.I3)()&&(n(),clearInterval(o)),t++):(console.log("initAccordion failed to find Gutenberg, exiting"),clearInterval(o))}),100)}else n()},n=function(){document.querySelectorAll(".accordion__section__header").forEach((function(e){e.addEventListener("click",(function(e){let t=this.dataset.target,n=this.closest(t);n.closest(".accordion").querySelectorAll(".accordion__section").forEach((e=>{e.id!=n.id&&e.classList.remove("accordion__open")})),n.classList.toggle("accordion__open"),this.blur(),e.preventDefault()}))}))};return{init:()=>{if(!(0,s.GJ)()){if(0===document.querySelectorAll(".has__accordion").length)return!1}t(),window.acf&&window.acf.addAction("remount",(e=>{e[0]&&e[0].classList.contains("has__accordion")&&t()}))}}})();(0,o.Z)(i.init)},
1"./scripts/views/blocks/ajax.js":(e,t,n)=>{var o=n("../node_modules/@roots/sage/lib/client/dom-ready.js"),s=n("./scripts/helpers.js");const i=(e=>{const t=()=>{if((0,s.GJ)()){const e=100;let t=0;const o=setInterval((()=>{t<e?((0,s.I3)()&&(n(),clearInterval(o)),t++):(console.log("initAjax failed to find Gutenberg, exiting"),clearInterval(o))}),100)}else n()},n=function(){const e=window.location.origin+"/wp-admin/admin-ajax.php";o(e),a(e)},o=function(e){document.querySelectorAll(".page-navigation--ajax").forEach((function(t){let n=document.getElementById(t.dataset.target),o=n.dataset.query,s=n.dataset.template,a=new FormData;a.append("action","ajax_pages"),a.append("query",o),a.append("template",s);let l=t.querySelectorAll("a");i(l,e,a,n,t)}))},i=function(e,t,n,s,i){e.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();let a=this.innerHTML;n.append("page",a),fetch(t,{method:"POST",body:n}).then((e=>e.json())).then((function(e){let n=e[0],a=e[1];s.innerHTML=n,i.innerHTML=a,o(t)})),this.blur()}))}))},a=function(e){const t=document.querySelectorAll(".filter--ajax");t.forEach((function(n){let s=document.getElementById(n.dataset.target),i=document.getElementById(n.dataset.target+"__nav"),a=s.dataset.query,l=s.dataset.template,c=n.dataset.taxonomy,r=n.dataset.value,d=new FormData;d.append("action","ajax_filter"),d.append("query",a),d.append("taxonomy",c),d.append("value",r),d.append("template",l),n.addEventListener("click",(function(a){a.preventDefault(),fetch(e,{method:"POST",body:d}).then((e=>e.json())).then((function(a){console.log(a);let l=a[0],c=a[1],r=a[2],d=a[3];s.innerHTML=l,c>1?(i.classList.remove("display--none"),i.innerHTML=r):i.classList.add("display--none"),s.dataset.query=d,t.forEach((function(e){e.classList.remove("active")})),n.classList.add("active"),o(e)})),this.blur()}))}))};return{init:()=>{if(!(0,s.GJ)()){if(0===document.querySelectorAll(".has__ajax").length)return!1}t(),window.acf&&window.acf.addAction("remount",(e=>{e[0]&&e[0].classList.contains("has__ajax")&&t()}))}}})();(0,o.Z)(i.init)},
1"./scripts/views/blocks/filter.js":(e,t,n)=>{var o=n("../node_modules/@roots/sage/lib/client/dom-ready.js"),s=n("./scripts/helpers.js");const i=(e=>{const t=()=>{if((0,s.GJ)()){const e=100;let t=0;const o=setInterval((()=>{t<e?((0,s.I3)()&&(n(),clearInterval(o)),t++):(console.log("initFilters failed to find Gutenberg, exiting"),clearInterval(o))}),100)}else n()},n=function(){let e=document.querySelectorAll(".filter");e.forEach((function(t){t.addEventListener("click",(function(t){let n=this.closest(".has__filter"),o=this.dataset.target;n.querySelectorAll(".filter__target").forEach((function(e){e.dataset.filter.split(",").includes(o)?e.classList.remove("hidden"):e.classList.add("hidden")})),e.forEach((function(e){e.classList.remove("active")})),this.classList.add("active"),this.blur(),t.preventDefault()}))}))};return{init:()=>{if(!(0,s.GJ)()){if(0===document.querySelectorAll(".has__filter").length)return!1}t(),window.acf&&window.acf.addAction("remount",(e=>{e[0]&&e[0].classList.contains("has__filter")&&t()}))}}})();(0,o.Z)(i.init)},
1"./scripts/views/blocks/filterbar.js":(e,t,n)=>{var o=n("../node_modules/@roots/sage/lib/client/dom-ready.js"),s=n("./scripts/helpers.js"),i=n("../node_modules/litepicker/dist/litepicker.umd.js");const a=(e=>{const t=()=>{if((0,s.GJ)()){const e=100;let t=0;const o=setInterval((()=>{t<e?((0,s.I3)()&&(n(),clearInterval(o)),t++):(console.log("initFilterBar failed to find Gutenberg, exiting"),clearInterval(o))}),100)}else n()},n=function(){document.querySelectorAll(".has__filterbar").forEach((function(e){let t=e.querySelectorAll(".calendar_picker");e.querySelectorAll("label").forEach((function(t){t.addEventListener("click",(function(t){const n=this.querySelector("input");t.preventDefault(),n.checked?(n.checked=!1,n.setAttribute("checked","")):(n.checked=!0,n.setAttribute("checked","checked")),e.submit()}))})),t.forEach((function(t){let n=t.dataset.language.replaceAll("_","-"),o=document.getElementById(t.dataset.targetStart),s=document.getElementById(t.dataset.targetEnd),a=t.dataset.dateStart,l=t.dataset.dateEnd;new i.Litepicker({element:t,inlineMode:!0,singleMode:!1,showTooltip:!1,numberOfMonths:2,numberOfColumns:2,format:"DD-MM-YYYY",lang:n,startDate:a,endDate:l}).on("selected",((t,n)=>{o.value=t.dateInstance.toLocaleDateString("en-GB").replaceAll("/","-"),s.value=n.dateInstance.toLocaleDateString("en-GB").replaceAll("/","-"),e.submit()}))}))}))};return{init:()=>{if(!(0,s.GJ)()){if(0===document.querySelectorAll(".has__filterbar").length)return!1}t(),window.acf&&window.acf.addAction("remount",(e=>{e[0]&&e[0].classList.contains("has__filterbar")&&t()}))}}})();(0,o.Z)(a.init)},
1"./scripts/views/blocks/hero.js":(e,t,n)=>{var o=n("../node_modules/@roots/sage/lib/client/dom-ready.js"),s=n("./scripts/helpers.js");const i=(e=>{const t=()=>{if((0,s.GJ)()){const e=100;let t=0;const o=setInterval((()=>{t<e?((0,s.I3)()&&(n(),clearInterval(o)),t++):(console.log("initHero failed to find Gutenberg, exiting"),clearInterval(o))}),100)}else n()},n=function(){const e=document.querySelector("#hero__email"),t=document.querySelector("#hero__email-signup"),n=t.href;void 0!==e&&null!=e&&e.addEventListener("input",(function(){let e=encodeURIComponent(this.value);e.length>0?t.href=n+"?email="+e:t.href=n}))};return{init:()=>{if(!(0,s.GJ)()){if(0===document.querySelectorAll(".hero").length)return!1}t(),window.acf&&window.acf.addAction("remount",(e=>{e[0]&&e[0].classList.contains("hero")&&t()}))}}})();(0,o.Z)(i.init)},
1"./scripts/views/blocks/map.js":(e,t,n)=>{var o=n("../node_modules/@roots/sage/lib/client/dom-ready.js"),s=n("./scripts/helpers.js"),i=n("../node_modules/mapbox-gl/dist/mapbox-gl.js");const a=(e=>{const t=()=>{if((0,s.GJ)()){const e=100;let t=0;const o=setInterval((()=>{t<e?((0,s.I3)()&&(n(),clearInterval(o)),t++):(console.log("initSlider failed to find Gutenberg, exiting"),clearInterval(o))}),100)}else n()},n=function(){let e=document.querySelectorAll(".map"),t=[];i.accessToken="pk.eyJ1IjoiaW50ZXJuYXRpb25hbG1pZHdpdmVzIiwiYSI6ImNsczA1YWl0cjI1YnMyaXRlY3ptdnRtMmEifQ.Wp9EFXheXivGus_gGX-wiw",e.forEach((function(e){const n=e.id,o=document.getElementById(n+"__script").innerHTML,s=JSON.parse(o);let a=[];const l=new i.Map({container:n,style:"mapbox://styles/kyle-conrad/clpk9rdyb00eu01p48w8i7fdt",zoom:-1,minZoom:-1,maxZoom:4,maxBounds:[[-199.392729,-64.840765],[213.466712,84.807696]],cooperativeGestures:!0,attributionControl:!1,logoPosition:"bottom-right"});t.push(l);for(const t of s.features){const e=document.createElement("div");new i.Marker({element:e,className:"map__marker",anchor:"bottom",offset:[0,0]}).setLngLat(t.geometry.coordinates).setPopup(new i.Popup({offset:36,closeButton:!1,maxWidth:"none"}).setHTML(t.properties.infobox)).addTo(l);a.push(e)}l.addControl(new i.NavigationControl,"bottom-left"),l.addControl(new i.FullscreenControl,"bottom-left"),l.on("click",(e=>{let t=e.originalEvent.target.closest(".mapboxgl-marker");a.forEach((function(e){e.classList.remove("active")})),t&&t.classList.add("active")}))}));const n=document.querySelector("body");let o=!0;const s=new MutationObserver((function(e,n){e.forEach((function(e){"attributes"===e.type&&"class"===e.attributeName&&(e.target.classList.contains("contrast")?(o=!1,t.forEach((e=>{let t=e.getStyle().layers;for(let n=0;n<t.length;n++)t[n].id.includes("contrast-")&&e.setPaintProperty(t[n].id,t[n].type+"-opacity",1)}))):o||(t.forEach((e=>{let t=e.getStyle().layers;for(let n=0;n<t.length;n++)t[n].id.includes("contrast-")&&e.setPaintProperty(t[n].id,t[n].type+"-opacity",0)})),o=!0))}))}));s.observe(n,{attributes:!0})};return{init:()=>{if(!(0,s.GJ)()){if(0===document.querySelectorAll(".has__map").length)return!1}t(),window.acf&&window.acf.addAction("remount",(e=>{e[0]&&e[0].classList.contains("has__map")&&t()}))}}})();(0,o.Z)(a.init)},
1"./scripts/views/blocks/sidebar.js":(e,t,n)=>{var o=n("../node_modules/@roots/sage/lib/client/dom-ready.js"),s=n("./scripts/helpers.js");const i=(e=>{const t=()=>{if((0,s.GJ)()){const e=100;let t=0;const o=setInterval((()=>{t<e?((0,s.I3)()&&(n(),clearInterval(o)),t++):(console.log("initAccordion failed to find Gutenberg, exiting"),clearInterval(o))}),100)}else n()},n=function(){document.querySelectorAll(".sidebar__scroll").forEach((function(e){e.addEventListener("click",(function(e){document.getElementById(this.dataset.target).scrollIntoView({behavior:"smooth"}),this.blur(),e.preventDefault()}))}))};return{init:()=>{if(!(0,s.GJ)()){if(0===document.querySelectorAll(".has__sidebar").length)return!1}t(),window.acf&&window.acf.addAction("remount",(e=>{e[0]&&e[0].classList.contains("has__sidebar")&&t()}))}}})();(0,o.Z)(i.init)},
1"./scripts/views/blocks/slider.js":(e,t,n)=>{var o=n("../node_modules/@roots/sage/lib/client/dom-ready.js"),s=n("./scripts/helpers.js");const i=(e=>{const t=()=>{if((0,s.GJ)()){const e=100;let t=0;const o=setInterval((()=>{t<e?((0,s.I3)()&&(n(),clearInterval(o)),t++):(console.log("initSlider failed to find Gutenberg, exiting"),clearInterval(o))}),100)}else n()},n=function(){let e=document.querySelectorAll(".crd__slider"),t=document.querySelectorAll(".pagination"),n=document.querySelectorAll(".control");e.forEach((function(e){e.addEventListener("scrollend",(function(){this.querySelectorAll(".crd__slide").forEach((function(o){let s=o.id;0===o.getBoundingClientRect().left&&(e.dataset.current=s,t.forEach((function(e){let t=e.dataset.slide;e.classList.remove("active"),s===t&&e.classList.add("active")})),o===o.parentElement.firstElementChild?n.forEach((function(t){t.classList.remove("inactive"),t.dataset.slider===e.id&&t.classList.contains("control--previous")&&t.classList.add("inactive")})):o===o.parentElement.lastElementChild?n.forEach((function(t){t.classList.remove("inactive"),t.dataset.slider===e.id&&t.classList.contains("control--next")&&t.classList.add("inactive")})):n.forEach((function(e){e.classList.remove("inactive")})))}))}))})),t.forEach((function(e){e.addEventListener("click",(function(){let t=document.getElementById(this.dataset.slider),n=document.getElementById(this.dataset.slide).offsetLeft;return t.scroll({top:0,left:n,behavior:"smooth"}),e.blur(),!1}))})),n.forEach((function(e){e.addEventListener("click",(function(){let t=document.getElementById(this.dataset.slider),n=document.getElementById(t.dataset.current);if(this.classList.contains("control--previous")){let e=n.previousElementSibling.offsetLeft;t.scroll({top:0,left:e,behavior:"smooth"})}else{let e=n.nextElementSibling.offsetLeft;t.scroll({top:0,left:e,behavior:"smooth"})}return e.blur(),!1}))}))};return{init:()=>{if(!(0,s.GJ)()){if(0===document.querySelectorAll(".has__slider").length)return!1}t(),window.acf&&window.acf.addAction("remount",(e=>{e[0]&&e[0].classList.contains("has__slider")&&t()}))}}})();(0,o.Z)(i.init)}
1}]);

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.