PageSourceSearch

https://www.saq.com/build/store/scripts/store-store.js?version1790185045

js saq.com collected 2026-10-02 02:25:49 UTC 11,071 bytes, 4 lines download raw bytes

1/*!
2 * @preserve Generated by nwayo 3.9.3 for saq:store
3 */
4!function(i,l){let e=l;var t=i.nwayo.project;let a=i[t];a.konstan;let r=i.nwayo.vows.DOMParsed;i.nwayo.vows.documentLoaded,i.nwayo.vows.globaljqueryLoaded;let n=i.nwayo.shortcuts;i.nwayo.helpers,i.nwayo.vendor.jQuery;let o=i.nwayo.vendor.jQuery;var s,d,u,c,f,v,p;i.nwayo.vendor.lodash;let g=i.nwayo.vendor.Modernizr,h=i.nwayo.vendor.pinki;t="undefined"!=typeof window?window:this,u=t.kafe,c=u.dependencies.jQuery,u.bonify({name:"geolocation",version:"1.1.0",obj:(s={fr:{search:"Recherche de votre positionnement",position:"Votre position",unavailable:"Service de localisation non-disponible",deactivated:"Service de localisation désactivé",notFound:"Position indisponible",timeout:"Délai expiré",error:"Il y a eu un problème"},en:{search:"Searching your location",position:"Your position",unavailable:"Location service unavailable",deactivated:"Location service deactivated",notFound:"Position not found",timeout:"Timeout",error:"There has been a problem"}},(d={}).locate=function(e){var o=s[t=e.lang,u.fn.lang(s,t)],a=c(e.selector),t=e.options||{},r=e.error,i=e.success;g.geolocation?(a.html("... "+o.search+" ..."),navigator.geolocation.getCurrentPosition(function(e){a.html(o.position+": "+e.coords.latitude+", "+e.coords.longitude),i&&i({coords:e.coords})},function(e){var t="";switch(e.code){case 1:t=o.deactivated;break;case 2:t=o.notFound;break;case 3:t=o.timeout}a.html(t),r&&r({message:t})},t)):(e=o.unavailable,a.html(e),r&&r({message:e}))},u.fn.plugIntojQuery("",{"geolocation.locate":function(e,t){d.locate(c.extend({},t[0],{selector:e}))}}),d)});{let o={userLatestGeolocated:null,alert:{en:"Location services are disabled or unavailable. Please enable them and try again. OR Please enter your location with your city or zip code.",fr:"Les services de localisation sont désactivés ou indisponibles. Veuillez les activer et réessayer. OU Entrez votre emplacement par ville ou code postal."},positionOptions:{enableHighAccuracy:!1,timeout:1e4,maximumAge:36e5},getGeolocation:t=>{kafe.geolocation.locate({success(e){o.userLatestGeolocated!==e.coords&&(o.userLatestGeolocated=e.coords,t?h.message.publish("absolunet.store.geolocate.reload",e.coords):h.vow.fulfill("absolunet.store.geolocate.get",e.coords))},error(){o.refuseGeolocation(t)},config:o.positionOptions})},refuseGeolocation:t=>{if(t){let e=n.$placeholder("messages");t="en"===a.env.lang?o.alert.en:o.alert.fr;e.html(t).addClass("message warning").delay(15e3).queue(()=>{e.empty().removeClass("message warning")})}h.vow.fulfill("absolunet.store.geolocate.get",!1)},bind:()=>{n.$action("locate-me").on("click",()=>{o.getGeolocation(!0)})},start:()=>{o.getGeolocation()},subscribe:()=>{h.message.subscribe("absolunet.store.navigation.trigger.geolocate",()=>{o.getGeolocation()})}};o.subscribe(),h.vow.when(r).then(()=>{o.bind(),o.start()})}t=function(){function s(){for(var e=0,t={};e<arguments.length;e++){var o,a=arguments[e];for(o in a)t[o]=a[o]}return t}function d(e){return e.replace(/(%[0-9A-Z]{2}
4)+/g,decodeURIComponent)}return function e(l){function n(){}function o(e,t,o){if("undefined"!=typeof document){"number"==typeof(o=s({path:"/"},n.defaults,o)).expires&&(o.expires=new Date(+new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var a=JSON.stringify(t);/^[\{\[]/.test(a)&&(t=a)}catch(e){}t=l.write?l.write(t,e):encodeURIComponent(String(t)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var r,i="";for(r in o)o[r]&&(i+="; "+r,!0!==o[r])&&(i+="="+o[r].split(";")[0]);return document.cookie=e+"="+t+i}}function t(e,t){if("undefined"!=typeof document){for(var o={},a=document.cookie?document.cookie.split("; "):[],r=0;r<a.length;r++){var i=a[r].split("="),n=i.slice(1).join("=");t||'"'!==n.charAt(0)||(n=n.slice(1,-1));try{var s=d(i[0]),n=(l.read||l)(n,s)||d(n);if(t)try{n=JSON.parse(n)}catch(e){}if(o[s]=n,e===s)break}catch(e){}}return e?o[e]:o}}return n.set=o,n.get=function(e){return t(e,!1)},n.getJSON=function(e){return t(e,!0)},n.remove=function(e,t){o(e,"",s(t,{expires:-1}))},n.defaults={},n.withConverter=e,n}(function(){})},"function"==typeof e&&e.amd&&(e(t),f=!0),"object"==typeof exports&&(module.exports=t(),f=!0),f||(v=window.Cookies,(p=window.Cookies=t()).noConflict=function(){return window.Cookies=v,p});{let e={},t={},s={};e.cacheDOM=()=>{t.offCanvas={},t.offCanvas.$wrapper=o(".off-canvas-wrapper"),t.offCanvas.$menu=o("#offCanvasPage",t.offCanvas.$wrapper),s.favoriteStoreMenu=o("[data-favorite-store-menu]"),s.headerStoreLocatorLink=o(".header-store-locator-link"),s.menuMobileStoreLocatorLink=o("#absolunet\\.locator\\.topheader\\.link"),s.windowLargeWidth=1024<=n.$window.width(),s.isAlreadyRetrieving=!1,s.parametersQueued=!1,s.isRendered=!1},e.start=()=>{t.offCanvas.$menu.find('[data-role="favorite-store-container-desktop"]').remove(),s.isGuest=!1,s.updateFavoriteStoreData()},e.subscribe=()=>{h.message.subscribe("absolunet.storelocator.favorite.action.set.success",()=>{s.getFavoriteStore()})},e.subscribe(),h.vow.when(r).then(()=>{e.cacheDOM(),e.start()}),h.vow.when("absolunet.store.geolocate.get").then(e=>{e&&e[0].latitude!==l&&e[0].longitude!==l&&(s.isAlreadyRetrieving?s.parametersQueued=e:s.updateFavoriteStoreData(e))}),s.updateFavoriteStoreHtml=()=>{s.isRendered=!0;let e="";var t,[o,a]=s.favoriteStoreData.pos.address,r=s.favoriteStoreMenu.find('[data-role="product-by-store"]').attr("data-url"),i=s.favoriteStoreMenu.find('[data-role="top-pick-link"]').attr("data-url");e=o,a!==l&&(e+=", "+a),o=s.favoriteStoreData.pos.city+", "+s.favoriteStoreData.pos.region,a=String(s.favoriteStoreData.pos.postcode),t=`https://www.google.com/maps/dir/?api=1&destination=${s.favoriteStoreData.pos.latitude},`+s.favoriteStoreData.pos.longitude;let n=s.favoriteStoreData.pos.telephone;s.favoriteStoreMenu.find('[data-role="name"]').html(s.favoriteStoreData.pos.name),s.favoriteStoreMenu.find('[data-role="address-line-1"]').html(e),s.favoriteStoreMenu.find('[data-role="address-line-2"]').html(o),s.favoriteStoreMenu.find('[data-role="address-line-3"]').html(a),s.favoriteStoreMenu.find('[data-role="telephone"]').html(()=>n.replace(/\((?<area>\d{3})\)(?<digits3>\d{3})-(?<digits4>\d{4})/,"$<area> $<digits3>-$<digits4>")).attr("href","tel:"+n),s.favoriteStoreMenu.find('[data-role="itinerary"]').attr("href",t),s.favoriteStoreMenu.find('[data-role="product-by-store"]').attr("href",r+s.favoriteStoreData.pos.identifier),s.favoriteStoreMenu.find('[data-role="top-pick-link"]').attr("href",i+s.favoriteStoreData.pos.identifier),null!==s.favoriteStoreData.pos.additional_attributes.type&&s.favoriteStoreMenu.find('[data-role="banner"]').html(s.favoriteStoreData.pos.additional_attributes.type.label),s.favoriteStoreData.pos.has_top_picks?s.favoriteStoreMenu.find('[data-role="top-pick-link"]').show():s.favoriteStoreMenu.find('[data-role="top-pick-link"]').hide(),s.favoriteStoreData.pos.temporarily_closed?(s.favoriteStoreMenu.find(".temporarily-closed").removeClass("hide"),s.favoriteStoreMenu.find(".opening-hours-container").addClass("hide"),s.favoriteStoreMenu.find('[data-role="product-by-store"]').addClass("hide")):s.favoriteStoreData.pos.has_opening_hours?(s.favoriteStoreMenu.find(".temporarily-closed").addClass("hide"),s.favoriteStoreMenu.find(".opening-hours-container").removeClass("hide"),s.favoriteStoreMenu.find('[data-role="product-by-store"]').removeClass("hide"),s.favoriteStoreMenu.find('[data-role="opening-hours"]').removeClass("hide"),s.favoriteStoreMenu.find('[data-role="no-hours-message"]').addClass("hide")):(s.favoriteStoreMenu.find('[data-role="opening-hours"]').addClass("hide"),s.favoriteStoreMenu.find('[data-role="no-hours-message"]').removeClass("hide")),(s.favoriteStoreData.pos.additional_attributes.is_page_active?s.favoriteStoreMenu.find('[data-role="store-action"]').attr("href",s.favoriteStoreData.pos.additional_attributes.url_key):s.favoriteStoreMenu.find('[data-role="store-action"]').attr("href",s.favoriteStoreData.pos.additional_attributes.url_locator)).text(s.favoriteStoreData.pos.action_label),s.favoriteStoreMenu.hasClass("hide")&&(s.favoriteStoreMenu.removeClass("hide"),s.headerStoreLocatorLink.hide()),s.menuMobileStoreLocatorLink.hide(),h.message.publish("absolunet.storelocator.favorite.action.updatehtml",s.favoriteStoreData.pos)},s.updateFavoriteStoreData=e=>{s.storeCacheTimeout=s.favoriteStoreMenu.data("store-cache-timeout").replaceAll("'",'"'),null!==localStorage.getItem("absolunet-favorite-store")&&(s.favoriteStoreData=JSON.parse(localStorage.getItem("absolunet-favorite-store")),s.storageIsGuest=s.favoriteStoreData.guest),0<o("[data-favorite-store-guest]").length&&(s.isGuest=!0),!1===s.isRendered&&(s.storeCacheTimeout!==Cookies.get("absolunet-store-cache-timeout")||s.isGuest!==s.storageIsGuest?(localStorage.removeItem("absolunet-favorite-store"),(!1===s.isGuest||e||s.storeCacheTimeout!==Cookies.get("absolunet-store-cache-timeout"))&&(s.getFavoriteStore(e),s.windowLargeWidth)&&s.headerStoreLocatorLink.css("display","inline-block")):s.updateFavoriteStoreHtml())},s.getHoursIncludingSpecial=(t,o)=>{var a=new Date;a.setHours(0,0,0,0);for(let e=0;e<o.length;e++)new Date(o[e].date+" 00:00:00").getMilliseconds()===a.getMilliseconds()&&(t[o[e].dayIndex].open=o[e].open,t[o[e].dayIndex].open_formatted=o[e].open_formatted,t[o[e].dayIndex].close=o[e].close,t[o[e].dayIndex].close_formatted=o[e].close_formatted);return t},s.getFavoriteStore=e=>{s.isAlreadyRetrieving=!0;
4let t=o("[data-get-favorite-store]").data("get-favorite-store");e&&(t=`${o("[data-get-closest-store]").data("get-closest-store")}?latitude=${e[0].latitude}&longitude=`+e[0].longitude),o.ajax({url:t,cache:!1,dataType:"json",success(e){var t;e.guest=s.isGuest,s.favoriteStoreData=e,s.isAlreadyRetrieving=!1,s.favoriteStoreData.pos.identifier?(localStorage.removeItem("absolunet-favorite-store"),t=new Date(Date.now()+18e5).toLocaleString("en-ca",{hour12:!1}),e.pos.next_refresh=t,localStorage.setItem("absolunet-favorite-store",JSON.stringify(e)),Cookies.remove("absolunet-store-cache-timeout"),Cookies.set("absolunet-store-cache-timeout",s.storeCacheTimeout,{domain:location.hostname,path:"/",expires:3650}),localStorage.removeItem("absolunet-pickupinstore"),Cookies.remove("absolunet_favorite_pos"),Cookies.set("absolunet_favorite_pos",e.pos.identifier,{domain:location.hostname,path:"/",expires:3650}),s.updateFavoriteStoreHtml()):s.parametersQueued?(s.getFavoriteStore(s.parametersQueued),s.parametersQueued=!1):h.message.publish("absolunet.store.navigation.trigger.geolocate")},error(e,t,o){s.isAlreadyRetrieving=!1,console.log("Request Failed: "+(t+", "+o))}})}}{let e={bind:()=>{},start:()=>{}};a.gtmPush=(e,t,o,a)=>{i.dataLayer=i.dataLayer||[];let r=o;o={event:"ga_event",eventCategory:e,eventAction:t,eventLabel:r=null!==a?r+" | "+a:r};i.dataLayer.push(o)},e.subscribe=()=>{},e.subscribe(),h.vow.when(r).then(()=>{e.bind(),e.start()})}}("undefined"!=typeof window?window:this);

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.