!function(i){var n={};function o(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}o.m=i,o.c=n,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(i,n,function(t){return e[t]}.bind(null,n));return i},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="undefined/scripts/",o(o.s=29)}([function(e,t){function i(t){return e.exports=i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}e.exports=i},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var i=0;iPrevious',nextArrow:'',autoplay:false,autoplaySpeed:3e3,centerMode:false,centerPadding:"50px",cssEase:"ease",customPaging:function(t,e){return d('',nextArrow:'',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(t,e){return c('\n \n ');this.dom.body.append(t),this.dom.player=$("#youtube-popup-".concat(this.key)),this.dom.close=this.dom.player.find(".js-youtube-popup-close")}},{key:"initPlayer",value:function(){var e=this;this.player=new YT.Player("youtube-popup-iframe-".concat(this.key),{videoId:this.key,playerVars:this.playerSettings,events:{onStateChange:function(t){return e.onPlayerStateChange(t)}}})}},{key:"onPlayerStateChange",value:function(t){0===t.data&&this.close()}},{key:"play",value:function(){var t=this;this.dom.body.addClass("scroll-disable"),this.dom.player.addClass("is-playing"),this.player.playVideo(),this.dom.player.one(this.events.transitionEnd,function(){return t.dom.close.focus()})}},{key:"close",value:function(){var t=this;this.dom.body.removeClass("scroll-disable"),this.dom.player.removeClass("is-playing"),this.player.stopVideo(),this.dom.player.one(this.events.transitionEnd,function(){return t.dom.el.focus()})}}]),n}(i(5).a)},function(t,e,i){"use strict";i.r(e),i.d(e,"default",function(){return h});var n=i(1),o=i.n(n),s=i(2),r=i.n(s),a=i(3),l=i.n(a),c=i(4),d=i.n(c),u=i(0),f=i.n(u);function p(n){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,i=f()(n);return e=o?(t=f()(this).constructor,Reflect.construct(i,arguments,t)):i.apply(this,arguments),d()(this,e)}}var h=function(t){l()(n,t);var i=p(n);function n(t){var e;return o()(this,n),e=i.call(this,t),$.extend(e.dom,{}),e.player=null,e.playerSettings={rel:0,showinfo:0,modestbranding:1,theme:"dark",enablejsapi:1},e.keys={enter:13,escape:27,space:32},e.image=null,e.consoleStyles="background: #cc181e; color: #fff",e.guid=Date.now().toString(36)+Math.floor(1e6*Math.random()+1).toString(36),e.src=e.dom.el.attr("href"),e.state=null,e}return r()(n,[{key:"init",value:function(){this.getYoutubeKey(),this.getImage(),this.createPlayerHtml(),this.bindEvents()}},{key:"bindEvents",value:function(){var t=this;"undefined"!=typeof YT&&YT.Player?this.initPlayer():window.onYouTubeIframeAPIReady=function(){return t.initPlayer()},this.dom.el.on("click",function(t){return t.preventDefault()})}},{key:"toggleAction",value:function(t){t.preventDefault();var e=this.dom.el.hasClass("is-playing"),i=t.which===this.keys.space||t.which===this.keys.enter,n=t.which===this.keys.escape;e&&n?this.close():!e&&i&&this.play(t)}},{key:"getYoutubeKey",value:function(){this.src.match(/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/)?this.key=RegExp.$1:(this.key=this.src,this.dom.el.attr("href","https://www.youtube.com/watch?v=".concat(this.key)))}},{key:"getImage",value:function(){this.image=this.dom.el.data("image"),"string"==typeof this.image&&""!==this.image||(this.image="https://img.youtube.com/vi/".concat(this.key,"/default.jpg")),this.dom.el.css("background-image","url(".concat(this.image,")"))}},{key:"createPlayerHtml",value:function(){var t='\n \n
\n
\n
');this.dom.el.append(t),this.dom.player=$("#youtube-poster-player-".concat(this.guid))}},{key:"initPlayer",value:function(){var e=this;this.key&&(this.player=new YT.Player("youtube-poster-".concat(this.guid),{videoId:this.key,playerVars:this.playerSettings,events:{onReady:function(){e.dom.el.on("click",function(t){return e.play(t)}).on("keydown",function(t){return e.toggleAction(t)})},onStateChange:function(t){return e.onPlayerStateChange(t)}}}))}},{key:"onPlayerStateChange",value:function(t){this.state=t.data,0===t.data?this.close():1===t.data||t.data}},{key:"play",value:function(t){t.preventDefault(),this.dom.el.addClass("is-playing"),1!==this.state&&this.player.playVideo()}},{key:"close",value:function(){var t=this;this.dom.el.removeClass("is-playing"),1!==this.state&&3!==this.state||this.player.stopVideo(),this.dom.player.one(this.events.transitionEnd,function(){return t.dom.el.focus()})}}]),n}(i(5).a)},function(t,e,i){var n=i(0);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=n(t)););return t}},function(t,e){function d(e,i,n,o,s){var r=!1;return e.contents().detach().each(function(){var t=S(this);if(void 0===this||3==this.nodeType&&0==S.trim(this.data).length)return!0;if(t.is("script, .dotdotdot-keep"))e.append(t);else{if(r)return!0;e.append(t),s&&e[e.is("table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, blockquote, select, optgroup, option, textarea, script, style")?"after":"append"](s),g(n,o)&&((r=(3==this.nodeType?function(t,e,i,n,o){var s=t[0];if(!s)return!1;var r=b(s),a=-1!==r.indexOf(" ")?" ":" ",l="letter"==n.wrap?"":a,c=r.split(l),d=-1,u=-1,f=0,p=c.length-1;for(n.fallbackToLetter&&0==f&&0==p&&(l="",c=r.split(l),p=c.length-1);f<=p&&(0!=f||0!=p);){var h=Math.floor((f+p)/2);if(h==u)break;u=h,w(s,c.slice(0,u+1).join(l)+n.ellipsis),g(i,n)?(p=u,n.fallbackToLetter&&0==f&&0==p&&(l="",c=c[0].split(l),u=d=-1,f=0,p=c.length-1)):f=d=u}{var v,m;-1==d||1==c.length&&0==c[0].length?(v=t.parent(),t.detach(),m=o&&o.closest(v).length?o.length:0,v.contents().length>m?s=k(v.contents().eq(-1-m),e):(s=k(v,e,!0),m||v.detach()),s&&(r=y(b(s),n),w(s,r),m&&o&&S(s).parent().append(o))):(r=y(c.slice(0,d+1).join(l),n),w(s,r))}return!0}:d)(t,i,n,o,s))||(t.detach(),r=!0)),r||s&&s.detach()}}),r}function g(t,e){return t.innerHeight()>e.maxHeight}function y(t,e){for(;-1").append(e).contents()),e instanceof S&&(s=e)),(c=o.wrapInner('
').children()).contents().detach().end().append(s.clone(!0)).find("br").replaceWith("
").end().css({height:"auto",width:"auto",border:"none",padding:0,margin:0});var i=!1,n=!1;return a.afterElement&&((i=a.afterElement.clone(!0)).show(),a.afterElement.detach()),g(c,r)&&(n="children"==r.wrap?function(t,e,i){var n=t.children(),o=!1;t.empty();for(var s=0,r=n.length;s").text(t).html(),this.trigger("update",[t])):n.apply(this,arguments)})},function(t,e,i){"use strict";i.r(e),i.d(e,"default",function(){return k});var n=i(1),o=i.n(n),s=i(2),r=i.n(s),a=i(15),l=i.n(a),c=i(3),d=i.n(c),u=i(4),f=i.n(u),p=i(0),h=i.n(p),v=i(12),m=i.n(v),g=i(11),y=(i(96),{init:function(){var t=[].slice.call(document.querySelectorAll(".js-ellipsis:not(.is-dotdotdot)"));"requestIdleCallback"in window?window.requestIdleCallback(function(){return t.map(w)}):t.map(w)}});function w(t){$(t).dotdotdot({ellipsis:"... ",watch:"window",callback:function(){return t.classList.add("is-dotdotdot")}})}function b(n){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,i=h()(n);return e=o?(t=h()(this).constructor,Reflect.construct(i,arguments,t)):i.apply(this,arguments),f()(this,e)}}var k=function(t){d()(n,t);var i=b(n);function n(t){var e;return o()(this,n),e=i.call(this,t),$.extend(e.dom,{}),e}return r()(n,[{key:"init",value:function(){l()(h()(n.prototype),"init",this).call(this),this.bindEvents()}},{key:"bindEvents",value:function(){l()(h()(n.prototype),"bindEvents",this).call(this)}}]),n}(function(){function e(t){o()(this,e),this.dom={el:t,body:$("body"),html:$("html"),site:$("#site"),w:$(window),tooltips:$('[data-toggle="tooltip"]'),loginTriggers:$('[data-toggle="modal"][data-target="#LoginModal"]'),loginModal:$("#LoginModal")},this.ua=(new m.a).getResult()}return r()(e,[{key:"init",value:function(){this.setDeviceType(),this.setTooltip(),g.a.init(),y.init(),this.getDomChange()}},{key:"getDomChange",value:function(){var t=this;this.observer=new MutationObserver(function(){return t.setDomChange()}),setTimeout(function(){t.observer.observe(document.querySelector("#site"),{childList:!0,subtree:!0})},0)}},{key:"setDomChange",value:function(){g.a.init(),y.init()}},{key:"setDeviceType",value:function(){$("html").addClass("".concat(this.ua.os.name," ").concat(this.ua.browser.name))}},{key:"setTooltip",value:function(){this.dom.tooltips.tooltip()}},{key:"bindEvents",value:function(){var e=this;this.dom.site.on("click",".js-add-bookmark",function(t){return e.setBookmark(t)}),this.dom.loginTriggers.on("click",function(t){return e.openLoginModal(t)}),this.dom.site.on("domChanged",function(){return g.a.init()})}},{key:"openLoginModal",value:function(t){var e,i,n,o,s;t.target&&0!==this.dom.loginModal.length&&(e=this.dom.loginModal.find("input#PostLoginAction"),i=this.dom.loginModal.find("input#PostLoginActionParameters"),o=(n=$(t.target)).data("post-login-action"),s=n.data("post-login-action-params"),o&&e.val(o),s&&i.val(s))}},{key:"setBookmark",value:function(t){t.preventDefault(),this.dom.body.addClass("scroll-disable"),$(".js-bookmark-popup").addClass("is-visible")}}]),e}())},function(t,e,i){"use strict";i.r(e),i.d(e,"default",function(){return _});var n=i(14),s=i.n(n),o=i(28),r=i.n(o),a=i(1),l=i.n(a),c=i(2),d=i.n(c),u=i(3),f=i.n(u),p=i(4),h=i.n(p),v=i(0),m=i.n(v),g=i(5),y=i(6),w=i(8),b=i.n(w);b.a.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";function k(t,e){this.endpoint=t,this.lang=e,this.cancel=null}var S=b.a.CancelToken;k.prototype.fetch=function(t){var e=this;return b.a.get("".concat(this.endpoint,"/").concat(t),{cancelToken:new S(function(t){e.cancel=t})}).then(function(t){return t.data}).catch(function(t){return b.a.isCancel(t),null})};var x=k;function T(n){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,i=m()(n);return e=o?(t=m()(this).constructor,Reflect.construct(i,arguments,t)):i.apply(this,arguments),h()(this,e)}}var _=function(t){f()(o,t);var i,n=T(o);function o(t){var e;return l()(this,o),e=n.call(this,t),$.extend(!0,e.dom,{el:Object(y.a)(t),inputs:Object(y.a)(t.find("select")),conditionalInput:Object(y.a)(t.find(".control__input-conditional"))}),e.inputs=[],e.errors={endpoint:"data-endpoint is missing or is empty",options:"the select element should have defined options"},e}return d()(o,[{key:"init",value:function(){this.inputs=this.getSanitizedInputs(this.dom.inputs),this.disableElems(this.inputs),this.bindEvents()}},{key:"bindEvents",value:function(){var e=this;this.inputs.forEach(function(t){t.el.addEventListener("change",function(){return e.changeData(t)})})}},{key:"getSanitizedInputs",value:function(t){var n=this;return t.map(function(t,e){var i={};return i.useParentInRoute=n.getUseParentInRoute(t),i.el=t,i.placeholder=t.getAttribute("data-placeholder"),i.options=n.getOptions(t)?n.getOptions(t):null,n.getEndpoint(t)&&(i.endpoint=n.getEndpoint(t),i.api=new x(i.endpoint)),i.index=e,i})}},{key:"getUseParentInRoute",value:function(t){return null!==t.getAttribute("data-useparentinroute")&&""!==t.getAttribute("data-useparentinroute")&&"false"!==t.getAttribute("data-useparentinroute")&&!1!==t.getAttribute("data-useparentinroute")}},{key:"getEndpoint",value:function(t){return null===t.getAttribute("data-endpoint")||""===t.getAttribute("data-endpoint")?null:t.getAttribute("data-endpoint")}},{key:"getOptions",value:function(t){return t.options.length<1?null:t.options}},{key:"changeData",value:function(t){var e,i=t.el.value,n=t.index+1;0'.concat(this.inputs[i].placeholder,"")),this.inputs[i].el.disabled=o.length<=1,this.inputs[i].el.innerHTML=o,this.inputs[i].el.parentElement.parentElement.classList.remove("control--disabled"));case 4:case"end":return t.stop()}},t,this)})),function(t,e){return i.apply(this,arguments)})},{key:"convertDataToOptionHtmlElem",value:function(t){return t.map(function(t){return null!=t.other?'"):'")})}},{key:"disableElems",value:function(t){t.forEach(function(t){t.el.disabled=t.el.childElementCount<=1})}},{key:"displayConditionalInput",value:function(t){this.dom.conditionalInput&&("true"==t.el.options[t.el.selectedIndex].getAttribute("data-other")?this.dom.conditionalInput.parentElement.style.display="block":this.dom.conditionalInput.parentElement.style.display="none")}}]),o}(g.a)},function(t,e,i){"use strict";i.r(e),i.d(e,"default",function(){return w});var n=i(1),o=i.n(n),s=i(2),r=i.n(s),a=i(3),l=i.n(a),c=i(4),d=i.n(c),u=i(0),f=i.n(u),p=i(8),h=i.n(p),v=i(5);function m(n){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,i=f()(n);return e=o?(t=f()(this).constructor,Reflect.construct(i,arguments,t)):i.apply(this,arguments),d()(this,e)}}h.a.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var g=h.a.CancelToken,y=[{id:"1",text:"Montréal"},{id:"2",text:"Québec"},{id:"3",text:"Laval"},{id:"4",text:"Gatineau"},{id:"5",text:"Longueuil"},{id:"6",text:"Sherbrooke"},{id:"7",text:"Saguenay"},{id:"8",text:"Lévis"},{id:"9",text:"Trois-Rivières"},{id:"10",text:"Terrebonne"},{id:"2254e7ac-7285-4db7-8427-d52480c9ba15",text:"Trois-Rives"},{id:"0e1127e0-6201-453d-924e-01dfbdd70667",text:"Trois-Rivières"},{id:"d9d1b33f-cea9-4a03-8316-6f980e4797a9",text:"Trois-Rivières-Ouest"}],w=function(t){l()(n,t);var i=m(n);function n(t){var e;return o()(this,n),e=i.call(this,t),$.extend(!0,e.dom,{input:e.dom.el.find(".control__input"),results:e.dom.el.find(".control__results"),resultId:e.dom.el.find(".control__result-id")}),e.debugMode=e.dom.el.data("debugMode"),e.api=e.dom.el.data("api"),e.cancel=null,e.query="",e.results=null,e.isPresentInList=!0,e.toggler=null,e}return r()(n,[{key:"init",value:function(){this.bindEvents(),this.initToggler(this.dom.el[0])}},{key:"bindEvents",value:function(){var e=this;this.dom.input.on("input",function(t){e.search(t)}),this.dom.results.on("click",function(t){t.stopPropagation()}),this.dom.results.on("click","button",function(t){e.select(t)}),this.dom.body.on("click",function(){e.hideSuggestion()})}},{key:"getFormatedResults",value:function(i){var t,n=this,e=(t=this.query.replace(" ","|"))?t.charAt(0).toUpperCase()+t.slice(1):"",o=new RegExp("(".concat(e,")"),"gi");return i.filter(function(t){return o.test(t.text)}).map(function(t,e){return""===n.query||e===i.length?t:'
  • \n \n ').concat(t.text.replace(o,"$1"),"\n \n
  • ")})}},{key:"getDomToggler",value:function(t){var e=t.nextElementSibling;return e.hasAttribute("data-module")&&"Toggler"===e.getAttribute("data-module")?e:null}},{key:"initToggler",value:function(t){this.toggler=this.getDomToggler(t),this.toggler&&this.hideDomElement(this.toggler,"is-showing")}},{key:"search",value:function(t){var e=this;this.dom.resultId.val(""),t&&t.currentTarget&&(this.query=t.currentTarget.value),0===this.query.length&&(this.hideDomElement(this.dom.el,"has-suggestion-visible"),this.hideDomElement(this.dom.results)),this.query.length<3||(this.cancel&&this.cancel(),h.a.get(this.api,{params:{query:this.query},cancelToken:new g(function(t){e.cancel=t})}).then(function(t){e.results=t.data}).catch(function(t){h.a.isCancel(t)}).finally(function(){e.debugMode&&(e.results=y),e.showResults()}))}},{key:"select",value:function(t){this.dom.input.val($(t.currentTarget).data("text")),this.dom.resultId.val($(t.currentTarget).data("value")),this.hideDomElement(this.dom.results),this.hideDomElement(this.dom.el,"has-suggestion-visible")}},{key:"hideDomElement",value:function(t,e){1==t.length&&(t=this.getNodeElementFromJQuery(t)),e?t.classList.remove(e):t.style.display="none"}},{key:"showDomElement",value:function(t,e){1==t.length&&(t=this.getNodeElementFromJQuery(t)),e?t.classList.add(e):t.style.display="block"}},{key:"showResults",value:function(){var t;this.results&&(0<(t=this.getFormatedResults(this.results)).length?(this.hideDomElement(this.toggler,"is-showing"),this.dom.results.html(t),this.showDomElement(this.dom.results),this.showDomElement(this.dom.el,"has-suggestion-visible")):(this.showDomElement(this.toggler,"is-showing"),this.hideDomElement(this.dom.results),this.dom.el.removeClass("has-suggestion-visible")))}},{key:"getNodeElementFromJQuery",value:function(t){return t[0]}},{key:"hideSuggestion",value:function(){this.hideDomElement(this.dom.el,"has-suggestion-visible"),this.getNodeElementFromJQuery(this.dom.results).style.display="none"}}]),n}(v.a)}]);;