{"version":3,"sources":["animations.js","calendar.js","clientQuote.js","contactSidebar.js","faq.js","facebook-brochure.js","formTracking.js","fullScreenSlider.js","homepageLocationsFilter.js","locationFilter.js","locations.js","maps.js","megamenu.js","mobilemenu.js","utilities.js","vacancies.js","video.js"],"names":["gsap","registerPlugin","ScrollTrigger","CSSRulePlugin","animations","init","intro","$","let","menu","shrinkMenu","addClass","unShrinkMenu","removeClass","timeline","scrollTrigger","trigger","pin","start","end","scrub","anticipatePin","once","onEnter","onEnterBack","length","indicator","updateIndicator","position","find","topOffset","height","css","top","utils","toArray","forEach","section","onLeaveBack","fillCalendar","url","kids","each","index","numOfKids","this","attr","numOfSupportedKids","i","kid","Math","floor","random","state","kidElement","parseInt","append","clientQuote","console","log","numberOfSlides","bar","width","slider","Flickity","wrapAround","prevNextButtons","pageDots","autoPlay","fade","on","ready","button","document","querySelector","progress","click","e","preventDefault","next","contactSidebar","closeSidebar","mainPanel","sidebar","toggleClass","target","parents","keyup","key","faq","jQuery","fbq","hasClass","slideUp","slideDown","el","setTimeout","offset","animate","scrollTop","formTracking","gtag","event_category","event_action","fullScreen","bgLazyLoad","flickity","asNavFor","contain","homepageLocationsFilter","globalSlider","homepageIntroLocations","cellAlign","element","global","map","currentLocation","lat","lng","getElementById","locations","JSON","parse","innerHTML","setDistance","id","distance","sortCards","sort","a","b","dataset","appendTo","input","closest","addEventListener","searchBox","google","maps","places","SearchBox","startSearch","getPlaces","classList","add","remove","place","geometry","location","origin","LatLng","destinations","data","destination","push","service","DistanceMatrixService","getDistanceMatrix","origins","travelMode","callback","response","status","location_id","rows","elements","value","addListener","locationFilter","detailsHandler","detailsEl","screen","removeAttribute","locationsSwitchToggle","toggleSlider","setToggle","view","currentSpan","outerWidth","left","megamenu","closeMegaMenu","loadMegaMenu","parent","mobilemenu","closeMobileMenu","hide","loadMobileMenu","siblings","show","openMenu","toggle","utilities","$img","imgID","imgClass","imgURL","get","$svg","removeAttr","replaceWith","resizeBLocks","mod02_holder","mod02_block","window","parseFloat","resize","outerHeight","after","vacancies","onlyUnique","self","indexOf","createFilterItems","parentElement","items","item","listItem","insertAdjacentHTML","createOptionItems","functionsFilter","hoursFilter","areaFilter","vacancy","function_group","hours","area","functions","filter","Boolean","filterButtons","querySelectorAll","filterButton","filterWithSelection","URL","searchParams","selected","results","filtered","keysUsed","finalResults","selectedItems","selectedItem","decodeURIComponent","innerText","result","search_tags","includes","parentNode","flat","lookup","reduce","createVacancies","container","html","last","title","description","vacanciesFilterToggle","buttons","contains","nextElementSibling","video","initVideo","closeButton","playButtons","videoHolder","playVideo","closeVideo","src","source","createElement","setAttribute","event"],"mappings":"AAAAA,KAAAC,eAAAC,aAAA,EACAF,KAAAC,eAAAE,aAAA,EAEA,MAAAC,WAAA,KAsHA,MAAA,CACAC,KAtHA,KACAC,CAMAC,EAAA,QAAA,EAAAC,IACAC,EAAAF,EAAA,cAAA,EAcA,SAAAG,IACAD,EAAAE,SAAA,aAAA,CACA,CAEA,SAAAC,IACAH,EAAAI,YAAA,aAAA,CACA,CAEAb,KAAAc,SAAA,CAEAC,cAAA,CACAC,QAAA,OACAC,IAAA,CAAA,EACAC,MAAA,WACAC,IAAA,OACAC,MAAA,EACAC,cAAA,EACAC,KAAA,CAAA,EACAC,QAAA,WAEAb,EAAA,CACA,EACAc,YAAA,WAEAZ,EAAA,CACA,CACA,CACA,CAAA,CAhDA,CA4EA,GAAA,GAAAL,EAAA,sBAAA,EAAAkB,OAAA,CAGAjB,IAAAkB,EAAAnB,EAAA,2BAAA,EAGA,SAAAoB,EAAAX,GAGAR,IAAAoB,GAFAZ,EAAAT,EAAAS,CAAA,EAAAa,KAAA,OAAA,GAEAD,SAAA,EAGAE,EADAd,EAAAe,OAAA,EACA,EAEAL,EAAAM,IAAA,0BAAAJ,EAAAK,IAAAH,EAAA,SAAA,CACA,CAGA9B,KAAAkC,MAAAC,QAAA,sBAAA,EAAAC,QAAA,SAAAC,GACArC,KAAAc,SAAA,CAEAC,cAAA,CACAC,QAAAqB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AAA,EAEA,CAAA,CA/PA,CACA,CAoQA,CACA,ECzQAsH,MAAA,KA8DA,MAAA,CACAjQ,KA9DA,KACAkQ,CAIA/P,IAAAyG,EAAAxC,SAAA8J,iBAAA,eAAA,EAsBAiC,EArBA,GAAA,IAAAvJ,EAAAxF,OAAA,CAIAjB,IAAAiQ,EAAAhM,SAAA8J,iBAAA,eAAA,EACAmC,EAAAjM,SAAAC,cAAA,eAAA,EAEA,IAAAlE,IAAAgE,KAAAiM,EACAjM,EAAA+D,iBAAA,QAAA,SAAA1D,GACAA,EAAAC,eAAA,EACA6L,EAAA9N,IAAA,CACA,CAAA,EAgBA,SAAA+N,IAKAF,EAAAhM,cAAA,QAAA,EACAmM,IAAA,GAEAH,EAAA3H,UAAAE,OAAA,eAAA,CACA,CAGA,SAAA0H,EAAAnM,GACAsM,EAAAtM,EAAA2D,QAAAmI,MAGAI,EAAAhM,cAAA,QAAA,EACAmM,IAAAC,EAGArM,SAAAsM,cAAA,OAAA,EACAC,aAAA,WAAA,EAAA,EAGAN,EAAA3H,UAAAC,IAAA,eAAA,CACA,CArCAvE,SAAA8D,iBAAA,UAAA,SAAA0I,GACA,WAAAA,EAAAzL,KACAoL,EAAA,CAEA,CAAA,EAEAF,EAAAhM,cAAA,qBAAA,EACA6D,iBAAA,QAAA,SAAA1D,GACAA,EAAAC,eAAA,EACA8L,EAAA,CACA,CAAA,CAvBA,CAPA,CACA,CA6DA,CACA","file":"scripts.js","sourcesContent":["gsap.registerPlugin(ScrollTrigger)\r\ngsap.registerPlugin(CSSRulePlugin)\r\n\r\nconst animations = () => {\r\n const init = () => {\r\n intro()\r\n timeline()\r\n }\r\n\r\n const intro = () => {\r\n // Cache variables\r\n let header = $('header'),\r\n menu = $('.main-navbar')\r\n //\r\n // // Functions for topbar\r\n // function hideTopbar() {\r\n // header.addClass('js-topbar-hidden')\r\n // }\r\n //\r\n // function showTopbar() {\r\n // // Check for session\r\n // // Defined in utilities/topbar\r\n // // TODO\r\n // header.removeClass('js-topbar-hidden')\r\n // }\r\n\r\n function shrinkMenu() {\r\n menu.addClass('js-shrinked')\r\n }\r\n\r\n function unShrinkMenu() {\r\n menu.removeClass('js-shrinked')\r\n }\r\n\r\n let tl = gsap.timeline({\r\n // yes, we can add it to an entire timeline!\r\n scrollTrigger: {\r\n trigger: 'body',\r\n pin: false, // pin the trigger element while active\r\n start: '48px top', // when the top of the trigger hits the top of the viewport\r\n end: '48px', // end after scrolling 500px beyond the start\r\n scrub: 0, // smooth scrubbing, takes 1 second to \"catch up\" to the scrollbar\r\n anticipatePin: 1,\r\n once: false,\r\n onEnter: function () {\r\n // hideTopbar()\r\n shrinkMenu()\r\n },\r\n onEnterBack: function () {\r\n // showTopbar()\r\n unShrinkMenu()\r\n },\r\n },\r\n })\r\n\r\n // Function for header shrink\r\n\r\n // add animations and labels to the timeline\r\n /*\r\n tl.addLabel('start')\r\n .to(\r\n '.header',\r\n {\r\n y: -33,\r\n },\r\n 0\r\n )\r\n .addLabel('topbar')\r\n .to(\r\n '.topbar__inner, .topbar__close',\r\n {\r\n y: -50,\r\n },\r\n 0\r\n )\r\n .addLabel('end')\r\n */\r\n }\r\n\r\n const timeline = () => {\r\n // Check for element\r\n if ($('.timeline__line-item').length == 0) return false\r\n\r\n // vars\r\n let indicator = $('.timeline .line-indicator')\r\n\r\n // Helper\r\n function updateIndicator(trigger) {\r\n trigger = $(trigger).find('.line')\r\n\r\n let position = trigger.position()\r\n // position is relative to .timeline-line container\r\n let height = trigger.height()\r\n let topOffset = height / 2\r\n\r\n indicator.css('transform', `translateY(${position.top + topOffset - 22.5}px)`)\r\n }\r\n\r\n // Create timelines for each item\r\n gsap.utils.toArray('.timeline__line-item').forEach(function (section) {\r\n let tl = gsap.timeline({\r\n // yes, we can add it to an entire timeline!\r\n scrollTrigger: {\r\n trigger: section,\r\n pin: false, // pin the trigger element while active\r\n start: '50% center', // when the top of the trigger hits the top of the viewport\r\n end: '100% 25%', // end after scrolling 500px beyond the start\r\n scrub: 0, // smooth scrubbing, takes 1 second to \"catch up\" to the scrollbar\r\n anticipatePin: 1,\r\n once: false,\r\n onEnter: function (section) {\r\n updateIndicator(section.trigger)\r\n },\r\n onLeaveBack: function (section) {\r\n updateIndicator(section.trigger)\r\n },\r\n },\r\n })\r\n })\r\n }\r\n\r\n return {\r\n init,\r\n }\r\n}\r\n","const fillCalendar = () => {\r\n\r\n const url = '/images/'\r\n\r\n const kids = [\r\n 'boy-1.svg',\r\n 'boy-2.svg',\r\n 'boy-3.svg',\r\n 'boy-4.svg',\r\n 'girl-1.svg',\r\n 'girl-2.svg',\r\n 'girl-3.svg',\r\n 'girl-4.svg',\r\n 'girl-5.svg'\r\n ]\r\n\r\n // Kids grid desktop\r\n $('.month .inner-calendar__kids').each(function (index) {\r\n let numOfKids = $(this).attr('data-kids'),\r\n numOfSupportedKids = $(this).attr('data-happy-kids'),\r\n i = 0\r\n\r\n if (numOfSupportedKids > 26) {\r\n numOfKids = numOfSupportedKids + 5\r\n }\r\n\r\n for (i = 0; i < numOfKids; i++) {\r\n //text += cars[i] + \"
\";\r\n\r\n // Get random kid from array\r\n let kid = kids[Math.floor(Math.random() * kids.length)]\r\n\r\n let state = 'class=\"kid\"';\r\n if (parseInt(i) + 1 > numOfSupportedKids) {\r\n state = 'class=\"kid not-happy\"';\r\n }\r\n\r\n\r\n // Create element to push to DOM\r\n let kidElement = ``\r\n\r\n // Push kid to DOM\r\n $(this).append(kidElement)\r\n }\r\n\r\n })\r\n\r\n // Single kid mobile\r\n $('.month .calendar-mobile').each(function (index) {\r\n\r\n // Get random kid from array\r\n let kid = kids[Math.floor(Math.random() * kids.length)]\r\n\r\n // Create element to push to DOM\r\n let kidElement = ``\r\n\r\n $(this).find('.kid').append(kidElement)\r\n\r\n })\r\n\r\n}\r\n","const clientQuote = () => {\r\n const init = () => {\r\n clientQuoteSlider()\r\n }\r\n\r\n const clientQuoteSlider = () => {\r\n console.log('load clientQuote')\r\n // Check for element\r\n if ($('.quote-slider').length == 0) return false\r\n\r\n // Vars\r\n let numberOfSlides = 0,\r\n bar = $('.slider-navigation-bar'),\r\n width = 0\r\n\r\n // Init slider\r\n let slider = new Flickity('.quote-slider', {\r\n wrapAround: false,\r\n prevNextButtons: false,\r\n pageDots: false,\r\n autoPlay: 8000,\r\n fade: true,\r\n on: {\r\n ready: function () {\r\n numberOfSlides = $('.quote-slider__item').length\r\n // Create width of the bar\r\n width = 100 / numberOfSlides\r\n bar.css('width', width + '%')\r\n },\r\n },\r\n })\r\n\r\n // Move progress bar on Change\r\n slider.on('change', function (index) {\r\n bar.css('left', width * index + '%')\r\n })\r\n\r\n // Progress bar - https://codepen.io/desandro/pen/obpVGa\r\n let progressBar = document.querySelector('.progress-bar')\r\n\r\n slider.on('scroll', function (progress) {\r\n //console.log(Math.max(0, Math.min(1, progress)))\r\n })\r\n\r\n // Bind next button\r\n let button = $('.slider-next-button a')\r\n\r\n button.click(function (e) {\r\n e.preventDefault()\r\n slider.next(true, false)\r\n })\r\n }\r\n\r\n return {\r\n init,\r\n }\r\n}\r\n","const contactSidebar = () => {\r\n const init = () => {\r\n sidebar()\r\n secondaryPanel()\r\n closePanel()\r\n closeSidebar()\r\n closeSidebarEvents()\r\n }\r\n\r\n const sidebar = () => {\r\n console.log('load contactSidebar')\r\n // Check for element\r\n if ($('.contact-sidebar').length == 0) return false\r\n\r\n let sidebar = $('.contact-sidebar')\r\n\r\n $('.contact-sidebar__button').click(function (e) {\r\n e.preventDefault()\r\n sidebar.toggleClass('js-open')\r\n })\r\n }\r\n\r\n const secondaryPanel = () => {\r\n // Check for element\r\n if ($('.contact-sidebar').length == 0) return false\r\n\r\n let mainPanel = $('.main-panel')\r\n\r\n $('.contact-sidebar .main-panel a.button[data-panel]').click(function (e) {\r\n e.preventDefault()\r\n let target = $(this).attr('data-panel')\r\n\r\n mainPanel.addClass('js-no-scroll')\r\n $('.secondary-panel').addClass('js-hidden')\r\n $('.secondary-panel[data-panel=\"' + target + '\"]').removeClass('js-hidden')\r\n })\r\n }\r\n\r\n const closePanel = () => {\r\n // Check for element\r\n if ($('.contact-sidebar').length == 0) return false\r\n\r\n let mainPanel = $('.main-panel')\r\n\r\n $('.js-panel-close').click(function (e) {\r\n e.preventDefault()\r\n $(this).parents('.panel').addClass('js-hidden')\r\n mainPanel.removeClass('js-no-scroll')\r\n })\r\n }\r\n\r\n const closeSidebar = () => {\r\n // Check for element\r\n if ($('.contact-sidebar').length == 0) return false\r\n\r\n let mainPanel = $('.main-panel')\r\n let sidebar = $('.contact-sidebar')\r\n mainPanel.removeClass('js-no-scroll')\r\n sidebar.removeClass('js-open')\r\n }\r\n\r\n const closeSidebarEvents = () => {\r\n $('.js-contact-sidebar-close').click(function (e) {\r\n e.preventDefault()\r\n closeSidebar()\r\n $('.panel').addClass('js-hidden')\r\n })\r\n\r\n $(document).keyup(function (e) {\r\n if (e.key === 'Escape') {\r\n // escape key maps to keycode `27`\r\n closeSidebar()\r\n $('.panel').addClass('js-hidden')\r\n }\r\n })\r\n }\r\n\r\n return {\r\n init,\r\n }\r\n}\r\n","const faq = () => {\r\n\r\n\tconst init = () => {\r\n\r\n\t\tfaqToggle()\r\n\r\n }\r\n\r\n const faqToggle = () => {\r\n\r\n $('.faq-item__toggle').click(function(e){\r\n \te.preventDefault();\r\n\r\n \tif($(this).hasClass('js-active')){\r\n\r\n \t\t\t$('.faq-item__toggle').removeClass('js-active');\r\n \t\t\t$('.faq-item__content').slideUp(500);\r\n\r\n \t}else{\r\n\r\n \t\t$('.faq-item__toggle').removeClass('js-active');\r\n $('.faq-item__content').slideUp(500);\r\n\r\n \t\t\t$(this).toggleClass('js-active');\r\n \t\t\t$(this).next().slideDown(500);\r\n\r\n \t\t\tlet el = $(this);\r\n\r\n setTimeout(function(){\r\n\r\n \tvar offset = el.offset();\r\n \toffset.top -= 200;\r\n \t$('html, body').animate({\r\n scrollTop: offset.top\r\n });\r\n\r\n },501);\r\n\r\n \t}\r\n\r\n });\r\n\r\n }\r\n\r\n return {\r\n init\r\n }\r\n}\r\n","(function ($, root, undefined) {\r\n\r\n 'use strict';\r\n\r\n\r\n /*\r\n * DOCUMENT READY\r\n */\r\n\r\n jQuery(document).ready(function () {\r\n\r\n\r\n jQuery(\"#gform_submit_button_2\").on( \"click\", function() {\r\n fbq('trackCustom','Brochure Aanvraag');\r\n });\r\n\r\n })\r\n\r\n})(jQuery, this);","const formTracking = () => {\r\n\r\n\tconst init = () => {\r\n\t\ttracking()\r\n }\r\n\r\n const tracking = () => {\r\n\t\t$(function() {\r\n\t\t\t// Brochure aanvragen sidebar\r\n\t\t\t$(\"#gform_submit_button_8\").on( \"click\", function() {\r\n\t\t\t\tgtag('event', 'brochure-aanvraag-sidebar', { event_category: 'brochure-aanvraag-sidebar', event_action: 'brochure-aanvraag-sidebar'});\r\n\t\t\t\tfbq('track', 'lead');\r\n\t\t\t});\r\n\r\n\t\t\t// Rondleiding plannen sidebar\r\n\t\t\t$(\"#gform_submit_button_10\").on( \"click\", function() {\r\n\t\t\t\tgtag('event', 'rondleiding-aanvraag-sidebar', { event_category: 'rondleiding-aanvraag-sidebar', event_action: 'rondleiding-aanvraag-sidebar'});\r\n\t\t\t});\r\n\r\n\t\t\t// Stel een vraag sidebar\r\n\t\t\t$(\"#gform_submit_button_11\").on( \"click\", function() {\r\n\t\t\t\tgtag('event', 'vraag-stellen-sidebar', { event_category: 'vraag-stellen-sidebar', event_action: 'vraag-stellen-sidebar'});\r\n\t\t\t});\r\n\r\n\t\t\t// Stel een vraag sidebar\r\n\t\t\t$(\"#gform_submit_button_15\").on( \"click\", function() {\r\n\t\t\t\tgtag('event', 'zorghotel-aanvraag-sidebar', { event_category: 'zorghotel-aanvraag-sidebar', event_action: 'zorghotel-aanvraag-sidebar'});\r\n\t\t\t});\r\n\r\n\t\t\t// Belafspaak sidebar\r\n\t\t\t$(\"#gform_submit_button_9\").on( \"click\", function() {\r\n\t\t\t\tgtag('event', 'belafspraak-plannen-sidebar', { event_category: 'belafspraak-plannen-sidebar', event_action: 'belafspraak-plannen-sidebar'});\r\n\t\t\t});\r\n\r\n\t\t\t// Direct bellen sidebar\r\n\t\t\t$(\".direct-call\").on( \"click\", function() {\r\n\t\t\t\tgtag('event', 'direct-bellen-sidebar', { event_category: 'direct-bellen-sidebar', event_action: 'direct-bellen-sidebar'});\r\n\t\t\t});\r\n\r\n\t\t});\r\n\r\n }\r\n return {\r\n init\r\n }\r\n}\r\n","const fullScreen = () => {\r\n const init = () => {\r\n fullScreenSlider()\r\n }\r\n\r\n const fullScreenSlider = () => {\r\n console.log('load fullScreen')\r\n\r\n // Check for element\r\n if ($('.full-screen-slider').length == 0) return false\r\n\r\n // Init slider\r\n let slider = new Flickity('.full-screen-slider', {\r\n wrapAround: false,\r\n prevNextButtons: false,\r\n pageDots: false,\r\n fade: true,\r\n bgLazyLoad: 1,\r\n })\r\n\r\n // Bind next button\r\n let button = $('.mod-16-slider-thumbnails-text .next-slide a')\r\n\r\n button.click(function (e) {\r\n e.preventDefault()\r\n slider.next(true, false)\r\n })\r\n\r\n // Navigation for the slider (optional)\r\n // Check for element\r\n if ($('.slider-navigation').length == 0) return false\r\n\r\n $('.slider-navigation').flickity({\r\n asNavFor: '.full-screen-slider',\r\n contain: true,\r\n pageDots: false,\r\n prevNextButtons: false,\r\n bgLazyLoad: 3,\r\n })\r\n }\r\n\r\n return {\r\n init,\r\n }\r\n}\r\n","const homepageLocationsFilter = () => {\r\n const init = () => {\r\n initFilter()\r\n homepageIntroLocations()\r\n }\r\n\r\n let globalSlider\r\n\r\n const homepageIntroLocations = () => {\r\n console.log('load homepageIntroLocations')\r\n // Init slider\r\n let slider = $('.homepage-intro__location-filter__results .results-slider').flickity({\r\n wrapAround: true,\r\n prevNextButtons: false,\r\n pageDots: false,\r\n cellAlign: 'left',\r\n contain: true,\r\n })\r\n\r\n // Bind next button\r\n let button = $('.homepage-intro__location-filter__next-result')\r\n\r\n button.click(function (e) {\r\n e.preventDefault()\r\n slider.flickity('next', false, false)\r\n })\r\n\r\n globalSlider = slider\r\n }\r\n\r\n const getLocationsData = () => {\r\n let element = document.getElementById('locations-data')\r\n let data = JSON.parse(element.innerHTML)\r\n return data\r\n }\r\n\r\n const global = {\r\n map: false,\r\n currentLocation: {\r\n lat: '',\r\n lng: '',\r\n },\r\n }\r\n\r\n let locations = getLocationsData()\r\n\r\n const initFilter = () => {\r\n const input = document.querySelector('.google-maps-places-input')\r\n //const searchButton = document.querySelector('.homepage-intro__location-filter__filters form .input--submit')\r\n\r\n //console.log(searchButton)\r\n\r\n if (input) {\r\n input.closest('form').addEventListener('submit', function (e) {\r\n e.preventDefault()\r\n })\r\n } else {\r\n return false\r\n }\r\n\r\n const searchBox = new google.maps.places.SearchBox(input)\r\n\r\n function startSearch() {\r\n const places = searchBox.getPlaces()\r\n\r\n //console.log(places)\r\n\r\n if (!places) {\r\n input.classList.add('js-error')\r\n return false\r\n }\r\n\r\n input.classList.remove('js-error')\r\n\r\n if (places.length == 0) {\r\n input.classList.add('js-error')\r\n return\r\n }\r\n\r\n places.forEach((place) => {\r\n if (!place.geometry) {\r\n //console.log('Returned place contains no geometry')\r\n input.classList.add('js-error')\r\n return\r\n }\r\n\r\n global.currentLocation.lat = place.geometry.location.lat()\r\n global.currentLocation.lng = place.geometry.location.lng()\r\n })\r\n\r\n // Set the origin location based on the Places input\r\n const origin = new google.maps.LatLng(global.currentLocation.lat, global.currentLocation.lng)\r\n\r\n // Create array of destinations. This has a max of 25. If there are more locations the call needs to split up.\r\n let destinations = []\r\n for (let location of locations) {\r\n // Check if location has lat en lng values\r\n if (location.data) {\r\n let lat = location.data.lat\r\n let lng = location.data.lng\r\n // Create destination object\r\n let destination = new google.maps.LatLng(lat, lng)\r\n destinations.push(destination)\r\n }\r\n }\r\n\r\n //console.log(destinations)\r\n\r\n // Create DistanceMatrixService\r\n const service = new google.maps.DistanceMatrixService()\r\n\r\n service.getDistanceMatrix(\r\n {\r\n origins: [origin],\r\n destinations: destinations,\r\n travelMode: 'DRIVING',\r\n },\r\n callback\r\n )\r\n\r\n function callback(response, status) {\r\n // See Parsing the Results for\r\n // the basics of a callback function.\r\n //console.log(response)\r\n // Loop through all the destinations and add their respective distance to the origin object\r\n // We loop through the JSON object we created and match their distance to it. Google always returns the destinations in the same order\r\n for (let index = 0; index < locations.length; index++) {\r\n setDistance(locations[index].location_id, response.rows[0].elements[index].distance.value)\r\n }\r\n }\r\n\r\n setTimeout(function () {\r\n sortCards()\r\n }, 250)\r\n }\r\n\r\n searchBox.addListener('places_changed', () => {\r\n startSearch()\r\n })\r\n }\r\n\r\n function setDistance(id, distance) {\r\n $('.results-slider__result[data-locatie=' + id + ']').attr('data-distance', distance)\r\n $('.results-slider__result[data-locatie=' + id + ']').attr('aria-hidden', 'false')\r\n }\r\n\r\n function sortCards() {\r\n $('.results-slider')\r\n .find('.results-slider__result')\r\n .sort(function (a, b) {\r\n return +a.dataset.distance - +b.dataset.distance\r\n })\r\n .appendTo($('.results-slider .flickity-slider'))\r\n\r\n globalSlider.flickity('destroy')\r\n homepageIntroLocations()\r\n }\r\n\r\n return {\r\n init,\r\n }\r\n}\r\n","const locationFilter = () => {\r\n\r\n const init = () => {\r\n\r\n detailsHandler()\r\n\r\n }\r\n\r\n const detailsHandler = () => {\r\n\r\n const detailsEl = document.querySelector('#location-filter');\r\n console.log(screen.width)\r\n if (screen.width < 980) {\r\n detailsEl.removeAttribute('open');\r\n }\r\n }\r\n\r\n return {\r\n init\r\n }\r\n}\r\n","const locations = () => {\r\n const init = () => {\r\n homepageIntroLocations()\r\n }\r\n\r\n const homepageIntroLocations = () => {\r\n console.log('load homepageIntroLocations')\r\n // Init slider\r\n let slider = $('.homepage-intro__location-filter__results .results-slider').flickity({\r\n wrapAround: true,\r\n prevNextButtons: false,\r\n pageDots: false,\r\n cellAlign: 'left',\r\n contain: true,\r\n })\r\n\r\n // Bind next button\r\n let button = $('.homepage-intro__location-filter__next-result')\r\n\r\n button.click(function (e) {\r\n e.preventDefault()\r\n slider.flickity('next', false, false)\r\n })\r\n }\r\n\r\n return {\r\n init,\r\n }\r\n}\r\n","const maps = () => {\r\n const init = () => {\r\n locationsSwitchToggle()\r\n }\r\n\r\n const locationsSwitchToggle = () => {\r\n // Cache the slider\r\n let toggleSlider = $('.toggle .toggle-slider')\r\n\r\n function setToggle() {\r\n let currentSpan = $('.toggle span.js-active')\r\n\r\n // Check for toggle\r\n if (currentSpan.length < 1) {\r\n return false\r\n }\r\n\r\n // get new left\r\n let position = currentSpan.position()\r\n\r\n toggleSlider.css('width', currentSpan.outerWidth() + 'px').css('left', position.left + 'px')\r\n\r\n // Set current screen\r\n let view = currentSpan.attr('data-view-toggle')\r\n $('.locations-map, .locations-grid').addClass('js-hidden')\r\n $('.locations-map, .filter-top').addClass('js-hidden')\r\n $(`.${view}`).removeClass('js-hidden')\r\n }\r\n\r\n // Listen to click\r\n $('.toggle span').click(function (e) {\r\n e.preventDefault()\r\n // Remove all js-active classes from span\r\n $('.toggle span').removeClass('js-active')\r\n // give clicked span js-active class\r\n $(this).addClass('js-active')\r\n setToggle()\r\n })\r\n\r\n // Set on load\r\n setToggle()\r\n }\r\n\r\n\r\n return {\r\n init,\r\n }\r\n}\r\n","const megamenu = () => {\r\n const init = () => {\r\n loadMegaMenu()\r\n closeEvents()\r\n }\r\n\r\n const closeMegaMenu = () => {\r\n let elements = $('.main-dropdown, .main-navbar-left__item__dropdown, .main-navbar-left__item__search, .main-dropdown__item')\r\n elements.removeClass('js-dropdown-open')\r\n }\r\n\r\n const closeEvents = () => {\r\n // Close using escape source: https://stackoverflow.com/questions/3369593/how-to-detect-escape-key-press-with-pure-js-or-jquery\r\n $(document).keyup(function (e) {\r\n if (e.key === 'Escape') {\r\n // escape key maps to keycode `27`\r\n closeMegaMenu()\r\n }\r\n })\r\n\r\n // Close when clicked outside the header\r\n $('header.header').on('mouseleave', function (e) {\r\n closeMegaMenu()\r\n })\r\n }\r\n\r\n const loadMegaMenu = () => {\r\n // Cache all links and dropdowns\r\n let elements = $(\r\n '.main-dropdown, .main-navbar-left__item__dropdown, .top-navbar-right__item__button, .main-navbar-left__item__search, .main-dropdown__item'\r\n )\r\n // Dropdown works on a click registered event. Hover can be hooked into this event.\r\n $('.main-navbar-left__item__dropdown, .top-navbar-right__item__button:not(.js-no-mega-menu), .main-navbar-left__item__search').on('mouseover', function(e) {\r\n e.preventDefault()\r\n // Get target dropdown\r\n let target = $(this).attr('data-dropdown')\r\n // remove all other dropdowns\r\n elements.removeClass('js-dropdown-open')\r\n // Open current targeted dropdown and add active state\r\n $(this).addClass('js-dropdown-open')\r\n $(`#${target}`)\r\n .addClass('js-dropdown-open')\r\n .parent()\r\n .addClass('js-dropdown-open')\r\n })\r\n\r\n }\r\n\r\n return {\r\n init,\r\n }\r\n}\r\n","const mobilemenu = () => {\r\n const init = () => {\r\n loadMobileMenu()\r\n openMenu()\r\n closeEvents()\r\n }\r\n\r\n const openMenu = () => {\r\n let toggle = $('.mobile-navbar-toggle__holder'),\r\n menu = $('.mobile-navbar')\r\n toggle.click(function (e) {\r\n e.preventDefault()\r\n menu.addClass('js-mobile-menu-open')\r\n })\r\n }\r\n\r\n const closeMobileMenu = () => {\r\n // Close menu\r\n let elements = $('.mobile-navbar')\r\n elements.removeClass('js-mobile-menu-open')\r\n // Close dropdowns in menu\r\n $('.mobile-navbar-menu__dropdown, .mobile-navbar-dropdown-menu').removeClass('js-dropdown-open')\r\n $('.mobile-navbar-dropdown-menu').hide(200)\r\n }\r\n\r\n const closeEvents = () => {\r\n // Close using escape source: https://stackoverflow.com/questions/3369593/how-to-detect-escape-key-press-with-pure-js-or-jquery\r\n $(document).keyup(function (e) {\r\n if (e.key === 'Escape') {\r\n // escape key maps to keycode `27`\r\n closeMobileMenu()\r\n }\r\n })\r\n\r\n $('.js-close-mobile-navbar').on('click', function (e) {\r\n e.preventDefault()\r\n closeMobileMenu()\r\n })\r\n }\r\n\r\n const loadMobileMenu = () => {\r\n console.log('Load mobilemenu')\r\n // Cache all links and dropdowns\r\n let elements = $('.mobile-navbar-menu__dropdown, .mobile-navbar-dropdown-menu')\r\n // Dropdown works on a click registered event. Hover can be hooked into this event.\r\n $('.mobile-navbar-menu__dropdown a.toggle').on('click', function (e) {\r\n e.preventDefault()\r\n // Close if already open\r\n if ($(this).parent().hasClass('js-dropdown-open')) {\r\n console.log('sluit')\r\n elements.removeClass('js-dropdown-open')\r\n $('.mobile-navbar-dropdown-menu').hide(200)\r\n return false\r\n }\r\n // Get target dropwdown\r\n let target = $(this).siblings('.mobile-navbar-dropdown-menu')\r\n // remove all other dropdowns\r\n elements.removeClass('js-dropdown-open')\r\n // Open current targeted dropdown and add active state\r\n $(this).parent().addClass('js-dropdown-open').show(200)\r\n target.addClass('js-dropdown-open').show(200)\r\n })\r\n }\r\n\r\n return {\r\n init,\r\n }\r\n}\r\n","const utilities = () => {\r\n const init = () => {\r\n imgToSVG()\r\n resizeBLocks()\r\n singeLocationDescriptionBG()\r\n moveErrors()\r\n }\r\n\r\n const imgToSVG = () => {\r\n $('img.svg').each(function () {\r\n let $img = $(this)\r\n let imgID = $img.attr('id')\r\n let imgClass = $img.attr('class')\r\n let imgURL = $img.attr('src')\r\n\r\n $.get(\r\n imgURL,\r\n function (data) {\r\n // Get the SVG tag, ignore the rest\r\n let $svg = $(data).find('svg')\r\n\r\n // Add replaced image's ID to the new SVG\r\n if (typeof imgID !== 'undefined') {\r\n $svg = $svg.attr('id', imgID)\r\n }\r\n // Add replaced image's classes to the new SVG\r\n if (typeof imgClass !== 'undefined') {\r\n $svg = $svg.attr('class', imgClass + ' replaced-svg')\r\n }\r\n\r\n // Remove any invalid XML tags as per http://validator.w3.org\r\n $svg = $svg.removeAttr('xmlns:a')\r\n\r\n // Replace image with new SVG\r\n $img.replaceWith($svg)\r\n },\r\n 'xml'\r\n )\r\n })\r\n }\r\n\r\n // jQuery fix to move the validation error to the bottom of the form\r\n const moveErrors = () => {\r\n $('.gform_footer').after(\r\n $('.validation_error')\r\n );\r\n }\r\n\r\n const resizeBLocks = () => {\r\n // Cache object\r\n let mod02_holder = $('.mod-02-text-image-dots .block.block-right'),\r\n mod02_block = $('.mod-02-text-image-dots .block.block-right .background-block')\r\n\r\n $(window)\r\n .on('resize', function () {\r\n // Mod 02\r\n let height = mod02_holder.height()\r\n mod02_block.css('height', parseFloat(height + 110) + 'px')\r\n })\r\n .resize()\r\n }\r\n\r\n const singeLocationDescriptionBG = () => {\r\n if (document.querySelector('.location-description')) {\r\n $(window)\r\n .on('resize', function () {\r\n // Get height\r\n let height = $('.location-description .title-block').outerHeight()\r\n $('.location-description .title-block .background').css('height', height + 'px')\r\n })\r\n .resize()\r\n }\r\n }\r\n\r\n return {\r\n init,\r\n }\r\n}\r\n","const vacancies = () => {\r\n const init = () => {\r\n vacanciesFilter()\r\n vacanciesFilterToggle()\r\n }\r\n\r\n function onlyUnique(value, index, self) {\r\n return self.indexOf(value) === index\r\n }\r\n\r\n function createFilterItems(parentElement, items) {\r\n let test = document.getElementById('filters')\r\n if (!test) {\r\n return false\r\n }\r\n let element = document.querySelector(parentElement)\r\n for (let item of items) {\r\n let listItem = `
  • ${item}
  • `\r\n element.insertAdjacentHTML('beforeend', listItem)\r\n }\r\n }\r\n\r\n function createOptionItems(parentElement, items) {\r\n let test = document.getElementById('search-vacancies-form')\r\n if (!test) {\r\n return false\r\n }\r\n let element = document.querySelector(parentElement)\r\n for (let item of items) {\r\n let listItem = ``\r\n element.insertAdjacentHTML('beforeend', listItem)\r\n }\r\n }\r\n\r\n const vacanciesFilter = () => {\r\n let element = document.getElementById('yy-data')\r\n let vacancies = JSON.parse(element.innerHTML)\r\n\r\n //console.log(vacancies)\r\n\r\n let functionsFilter = []\r\n let hoursFilter = []\r\n let locationFilter = []\r\n let areaFilter = []\r\n\r\n for (let vacancy of vacancies) {\r\n functionsFilter.push(vacancy.function_group)\r\n hoursFilter.push(vacancy.hours)\r\n locationFilter.push(vacancy.location)\r\n areaFilter.push(vacancy.area)\r\n }\r\n\r\n let functions = functionsFilter.filter(onlyUnique).sort()\r\n let hours = hoursFilter.filter(onlyUnique)\r\n let location = locationFilter.filter(onlyUnique).filter(Boolean).sort()\r\n let area = areaFilter.filter(onlyUnique).filter(Boolean).sort()\r\n\r\n // Create lists\r\n createFilterItems('.filter[data-filter=\"function_group\"]', functions)\r\n createFilterItems('.filter[data-filter=\"hours\"]', hours)\r\n createFilterItems('.filter[data-filter=\"area\"]', area)\r\n createFilterItems('.filter[data-filter=\"location\"]', location)\r\n\r\n createOptionItems('#function-group-select', functions)\r\n createOptionItems('#area-group-select', area)\r\n\r\n // Add filter event listener\r\n let filterButtons = document.querySelectorAll('.filters .filter .filter__option')\r\n for (let filterButton of filterButtons) {\r\n filterButton.addEventListener('click', function (e) {\r\n e.preventDefault()\r\n this.classList.toggle('js-selected')\r\n filterWithSelection()\r\n })\r\n }\r\n\r\n // Check url in combo with from\r\n let url = new URL(window.location)\r\n if (url.searchParams.get('function_group')) {\r\n console.log(url.searchParams.get('function_group'))\r\n let selected = document.querySelector(`li.filter__option[data-value=\"${url.searchParams.get('function_group')}\"]`)\r\n selected.classList.add('js-selected')\r\n }\r\n\r\n if (url.searchParams.get('area')) {\r\n let selected = document.querySelector(`li.filter__option[data-value=\"${url.searchParams.get('area')}\"]`)\r\n if (url.searchParams.get('area') === 'Geen voorkeur') {\r\n return false\r\n }\r\n selected.classList.add('js-selected')\r\n }\r\n\r\n if (url.searchParams.get('function_group') || url.searchParams.get('area')) {\r\n filterWithSelection()\r\n }\r\n\r\n // Test\r\n function filterWithSelection() {\r\n let results = []\r\n let filtered = false\r\n let keysUsed = []\r\n let finalResults = []\r\n\r\n console.log('========= NEW SEARCH =========')\r\n\r\n let selectedItems = document.querySelectorAll('.filter__option.js-selected')\r\n for (let selectedItem of selectedItems) {\r\n let value = decodeURIComponent(selectedItem.innerText)\r\n let result = vacancies.filter((element) => element.search_tags.includes(value))\r\n console.log(result)\r\n results.push(result)\r\n filtered = true\r\n\r\n // TYFUS\r\n let key = selectedItem.parentNode.dataset.filter\r\n keysUsed.push(key)\r\n }\r\n\r\n //console.log(keysUsed.filter(onlyUnique))\r\n\r\n results = results.flat()\r\n if (keysUsed.filter(onlyUnique).length === 1) {\r\n // Just 1 group active in filtering\r\n finalResults = results\r\n } else {\r\n // Multiple filtering groups active\r\n const lookup = results.reduce((a, e) => {\r\n a[e.id] = ++a[e.id] || 0\r\n return a\r\n }, {})\r\n\r\n results = results.filter((e) => lookup[e.id])\r\n finalResults = results.filter(onlyUnique)\r\n }\r\n\r\n //console.log(finalResults)\r\n\r\n if (filtered === false) {\r\n finalResults = vacancies\r\n }\r\n\r\n createVacancies(finalResults)\r\n }\r\n\r\n function createVacancies(vacancies) {\r\n let container = document.querySelector('.job-items')\r\n container.innerHTML = ''\r\n\r\n if (vacancies.length === 0) {\r\n let html = `\r\n
    \r\n

    We hebben geen resultaten gevonden op basis van uw zoekopdracht.

    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n

    Open Sollicitatie

    \r\n
    \r\n
    \r\n
    \r\n Niet gevonden wat je zocht? Stuur ons dan een open sollicitatie.\r\n
    \r\n\r\n
    \r\n Lees verder\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n `\r\n container.insertAdjacentHTML('beforeend', html)\r\n container.insertAdjacentHTML('beforeend', last)\r\n\r\n // Reset\r\n document.querySelector('.js-reset-vacancies').addEventListener('click', function (e) {\r\n e.preventDefault()\r\n for (let filterButton of filterButtons) {\r\n filterButton.classList.remove('js-selected')\r\n }\r\n filterWithSelection()\r\n })\r\n } else {\r\n for (let vacancy of vacancies) {\r\n console.log(vacancy);\r\n let html = `\r\n
    \r\n
    \r\n
    \r\n \r\n ${vacancy.hours} uur / ${vacancy.function_group}\r\n \r\n
    \r\n

    ${vacancy.title}

    \r\n
    \r\n
    \r\n
    \r\n

    ${vacancy.description}

    \r\n
    \r\n
    \r\n Lees verder\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    `\r\n\r\n\r\n container.insertAdjacentHTML('beforeend', html)\r\n }\r\n\r\n let last = `\r\n
    \r\n
    \r\n
    \r\n
    \r\n

    Open Sollicitatie

    \r\n
    \r\n
    \r\n
    \r\n Niet gevonden wat je zocht? Stuur ons dan een open sollicitatie.\r\n
    \r\n\r\n
    \r\n Lees verder\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    `\r\n container.insertAdjacentHTML('beforeend', last)\r\n }\r\n }\r\n }\r\n\r\n const vacanciesFilterToggle = () => {\r\n let buttons = document.querySelectorAll('.filters .filter-button')\r\n for (let button of buttons) {\r\n button.addEventListener('click', function (e) {\r\n e.preventDefault()\r\n\r\n if (this.classList.contains('js-active')) {\r\n this.classList.remove('js-active')\r\n this.nextElementSibling.classList.remove('is-open')\r\n } else {\r\n this.classList.add('js-active')\r\n this.nextElementSibling.classList.add('is-open')\r\n }\r\n })\r\n }\r\n }\r\n\r\n return {\r\n init,\r\n }\r\n}\r\n","const video = () => {\r\n const init = () => {\r\n initVideo()\r\n }\r\n\r\n const initVideo = () => {\r\n let element = document.querySelectorAll('a[data-video]')\r\n if (element.length === 0) {\r\n return false\r\n }\r\n\r\n let playButtons = document.querySelectorAll('a[data-video]')\r\n let videoHolder = document.querySelector('.modal-holder')\r\n\r\n for (let button of playButtons) {\r\n button.addEventListener('click', function (e) {\r\n e.preventDefault()\r\n playVideo(this)\r\n })\r\n }\r\n\r\n // Close video on escape\r\n document.addEventListener('keydown', function (event) {\r\n if (event.key === 'Escape') {\r\n closeVideo()\r\n }\r\n })\r\n\r\n let closeButton = videoHolder.querySelector('.modal_close-button')\r\n closeButton.addEventListener('click', function (e) {\r\n e.preventDefault()\r\n closeVideo()\r\n })\r\n\r\n function closeVideo() {\r\n //let videoElement = videoHolder.querySelector('video')\r\n //videoElement.pause()\r\n //videoHolder.classList.remove('js-play')\r\n\r\n let iframe = videoHolder.querySelector('iframe')\r\n iframe.src = ''\r\n\r\n videoHolder.classList.remove('js-open-video')\r\n }\r\n // End closing functions\r\n\r\n function playVideo(button) {\r\n let source = button.dataset.video\r\n\r\n // Remove previous video\r\n let iframe = videoHolder.querySelector('iframe')\r\n iframe.src = source\r\n\r\n // Add new video's\r\n let videoElement = document.createElement('video')\r\n videoElement.setAttribute('controls', '')\r\n\r\n // Open\r\n videoHolder.classList.add('js-open-video')\r\n }\r\n }\r\n\r\n return {\r\n init,\r\n }\r\n}\r\n"]}