1!function(){"use strict";!function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t){var n=function(t){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(n)?n:n+""}function n(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,t(a.key),a)}}function o(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){return Object.keys(e).map(function(t){var n=s(e[t]);return encodeURIComponent(t)+"="+n}).join("&")}function s(t){switch(e(t)){case"boolean":case"number":case"string":t=encodeURIComponent(t);break;case"object":t=s(JSON.stringify(t));break;case"function":t=s(t());break;default:t=""}return t}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var l=function(){return o(function e(){r(this,e)},[{key:"get",value:function(e,t){var n=this.buildQueryString(e,t||{});return fetch(n).then(function(e){return e.json()})}},{key:"post",value:function(t,n,r){var a=this.buildQueryString(t,n||{}),o={};return"object"==e(r=r||"")?(o["Content-Type"]="application/json",r=JSON.stringify(r)):r.matchAll(/^[^=&]+(=[^=&]*)?(&[^=&]+(=[^=&]*)?)+$/g)&&(o["Content-Type"]="application/x-www-form-urlencoded"),fetch(a,{method:"POST",headers:o,body:r}).then(function(e){return e.status>=400?e.json().then(function(e){return Promise.reject(e)}):e.json()})}},{key:"buildQueryString",value:function(e,t){return"/?"+i(u(u({},t),{},{marsapi:e,_wpnonce:wp.marsactu.nonces[e]||""}))}}])}(),d=function(){return o(function e(t){r(this,e),n(this,"_viewId",null),n(this,"_postId",null),this._postId=t},[{key:"view",value:function(){var e=this;if(document.body.classList.contains("logged-in")){var t={url:location.href||"",referrer:document.referrer||""};return this._postId&&(t.post=this._postId),wp.marsactu.api.post("relay-view",{},t).then(function(t){return e._viewId=!!t.success&&t.data.view,t})}}}])}();var f="form_async_",h={},p=function(){return o(function e(t){var a=this;r(this,e),n(this,"_form",null),n(this,"_auto",!1),n(this,"_name",null),n(this,"_callbacks",[]),this._form=t,this._auto="auto"===this._form.getAttribute("data-async"),this._name=this._form.getAttribute("data-name"),this._query=JSON.parse(this._form.getAttribute("data-query")||"{}"),this._cacheKey=this._name+(this._form.getAttribute("data-query")||"");var o=[];this._form.querySelectorAll('input:not([type="submit"]):not([type="hidden"]),select,textarea').forEach(function(e){if(e.required){e.required=!1;var t=function(){e.required=!0};o.push(t),e.addEventListener("input",t)}}),this._form.addEventListener("submit",function(e){return e.preventDefault(),o.forEach(function(e){return e()}),a._form.checkValidity()&&a.sendData(),!1}),"false"!==this._form.getAttribute("data-pull")&&this.retrieveData(),this._auto&&m(this._form,function(e){e.hasAttribute("data-ignore")||e.addEventListener("input",function(){return a.sendData()})})},[{key:"addListener",value:function(e){this._callbacks.push(e)}},{key:"getFormElement",value:function(){return this._form}},{key:"retrieveData",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._toggleLoadingMode(!0),!n&&h[this._cacheKey]?e=Promise.resolve(h[this._cacheKey]):(h[this._cacheKey]=wp.marsactu.api.get(f+this._name,this._query),e=h[this._cacheKey]),e.then(function(e){var n;v(t._form,null==e||null===(n=e.data)||void 0===n?void 0:n.value),t._toggleLoadingMode(!1)})}},{key:"sendData",value:function(){var e=this,t=function(e){var t=new FormData(e),n=Array.from(t.keys()).reduce(function(e,n){return e[n]?e[n]=t.getAll(n):e[n]=t.get(n),e},{});return e.querySelectorAll('input[type="checkbox"]').forEach(function(e){e.checked?"on"===n[e.name]&&(n[e.name]=!0):void 0===n[e.name]&&(n[e.name]=!1)}),n}(this._form);this._toggleLoadingMode(!0),wp.marsactu.api.post(f+this._name,this._query,t).then(function(n){if(n.data.message){var r=n.data.message;"string"==typeof r&&(r={id:"form-async-"+e._name,style:"success",title:r}),window.wp.marsactu.toast.post(r,n.data.toaster||"general")}
1if(n.data.slidebox&&document.querySelectorAll('input[data-slidebox-id="'+n.data.slidebox+'"]').forEach(function(e){return e.checked=!0}),n.data.html){var a=document.createElement("DIV");a.innerHTML=n.data.html;var o=[];a.childNodes.forEach(function(e){return o.push(e)}),o.forEach(function(t){return e._form.parentElement.insertBefore(t,e._form)}),e._form.parentElement.removeChild(e._form),e._callListeners(n,t)}else n.data.value&&v(e._form,n.data.value),e._callListeners(n,t),e._toggleLoadingMode(!1);n.data.goto?window.location=n.data.goto:n.data.reload&&window.location.reload()},function(n){if(null!==n.data.message&&""!==n.data.message){var r=null;n.data.message?"string"==typeof(r=n.data.message)&&(r={id:"form-async-"+e._name,style:"error",title:r}):r={id:"form-async-"+e._name,style:"error",title:"Une erreur est survenue. Merci de réessayer."},window.wp.marsactu.toast.post(r)}n.data.invalid&&Object.keys(n.data.invalid).forEach(function(t){var r=e._form.querySelector('[name="'.concat(t,'"]'));r&&e._toogleInvalidMode(r,!0,n.data.invalid[t])}),e._callListeners(n,t),e._toggleLoadingMode(!1)})}},{key:"_toogleInvalidMode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.classList.toggle("border-status-error",t),this._form.querySelectorAll('label[for="'.concat(e.id,'"]')).forEach(function(e){return e.classList.toggle("text-status-error",t)}),this._form.querySelectorAll('[data-error-for="'.concat(e.id,'"]')).forEach(function(e){e.innerHTML=n?"\n\t\t\t\t\t\t\t\t\t\t\t<span>".concat(n,"</span>\n\t\t\t\t\t\t\t\t\t\t"):""})}},{key:"_toggleLoadingMode",value:function(e){var t=this;this._form.classList.toggle("loading",e),m(this._form,function(n){n.hasAttribute("data-ignore")||(e?(n.setAttribute("disabled",""),t._toogleInvalidMode(n,!1)):n.removeAttribute("disabled"))})}},{key:"_callListeners",value:function(e,t){var n=this;this._callbacks.forEach(function(r){try{r(e,n._form,t)}catch(e){}})}}])}();function m(e,t){for(var n=e.elements,r=0;r<n.length;r++)t(n[r])}function v(t,n){m(t,function(t){var r=t.tagName.toLowerCase(),a=(t.name&&n?n[t.name]:"")||"";if("input"===r){var o=t.type;"checkbox"===o||"radio"===o?"boolean"==typeof a?t.checked=a:"string"==typeof a?t.checked=a===t.value:"object"===e(a)&&"function"==typeof a.indexOf&&(t.checked=a.map(function(e){return""+e}).indexOf(t.value)>=0):t.value=a}else if("select"===r){var i=t.querySelector("option[value="+a+"]");i&&(i.selected=!0)}else"textarea"===r&&(t.value=a)})}var g=Object.prototype.toString,y=Array.isArray||function(e){return"[object Array]"===g.call(e)};function w(e){return"function"==typeof e}function b(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function k(e,t){return null!=e&&"object"==typeof e&&t in e}function _(e,t){return null!=e&&"object"!=typeof e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var E=RegExp.prototype.test,j=/\S/;function L(e){return!function(e,t){return E.call(e,t)}(j,e)}var O={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="},S=/\s*/,A=/\s+/,x=/\s*=/,C=/\s*\}/,T=/#|\^|\/|>|\{|&|=|!/;function q(e){this.string=e,this.tail=e,this.pos=0}function P(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function I(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}q.prototype.eos=function(){return""===this.tail},q.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},q.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},P.prototype.push=function(e){return new P(e,this)},P.prototype.lookup=function(e){var t,n=this.cache;if(n.hasOwnProperty(e))t=n[e];else{for(var r,a,o,i=this,s=!1;i;){if(e.indexOf(".")>0)for(r=i.view,a=e.split("."),o=0;null!=r&&o<a.length;)o===a.length-1&&(s=k(r,a[o])||_(r,a[o])),r=r[a[o++]];else r=i.view[e],s=k(i.view,e);if(s){t=r;break}i=i.parent}n[e]=t}return w(t)&&(t=t.call(this.view)),t},I.prototype.clearCache=function(){void 0!==this.templateCache&&this.templateCache.clear()},I.prototype.parse=function(e,t){var n=this.templateCache,r=e+":"+(t||D.tags).join(":"),a=void 0!==n,o=a?n.get(r):void 0;return null==o&&(o=function(e,t){if(!e)return[];var n,r,a,o=!1,i=[],s=[],c=[],u=!1,l=!1,d="",f=0;function h(){if(u&&!l)for(;c.length;)delete s[c.pop()];else c=[];u=!1,l=!1}function p(e){if("string"==typeof e&&(e=e.split(A,2)),!y(e)||2!==e.length)throw new Error("Invalid tags: "+e);n=new RegExp(b(e[0])+"\\s*"),r=new RegExp("\\s*"+b(e[1])),a=new RegExp("\\s*"+b("}"+e[1]))}p(t||D.tags);for(var m,v,g,w,k,_,E=new q(e);!E.eos();){if(m=E.pos,g=E.scanUntil(n))for(var j=0,O=g.length;j<O;++j)L(w=g.charAt(j))?(c.push(s.length),d+=w):(l=!0,o=!0,d+=" "),s.push(["text",w,m,m+1]),m+=1,"\n"===w&&(h(),d="",f=0,o=!1);if(!E.scan(n))break;if(u=!0,v=E.scan(T)||"name",E.scan(S),"="===v?(g=E.scanUntil(x),E.scan(x),E.scanUntil(r)):"{"===v?(g=E.scanUntil(a),E.scan(C),E.scanUntil(r),v="&"):g=E.scanUntil(r),!E.scan(r))throw new Error("Unclosed tag at "+E.pos);if(k=">"==v?[v,g,m,E.pos,d,f,o]:[v,g,m,E.pos],f++,s.push(k),"#"===v||"^"===v)i.push(k);else if("/"===v){if(!(_=i.pop()))throw new Error('Unopened section "'+g+'" at '+m);if(_[1]!==g)throw new Error('Unclosed section "'+_[1]+'" at '+m)}else"name"===v||"{"===v||"&"===v?l=!0:"="===v&&p(g)}if(h(),_=i.pop())throw new Error('Unclosed section "'+_[1]+'" at '+E.pos);return function(e){for(var t,n=[],r=n,a=[],o=0,i=e.length;o<i;++o)switch((t=e[o])[0]){case"#":case"^":r.push(t),a.push(t),r=t[4]=[];break;case"/":a.pop()[5]=t[2],r=a.length>0?a[a.length-1][4]:n;break;default:r.push(t)}return n}(function(e){for(var t,n,r=[],a=0,o=e.length;a<o;++a)(t=e[a])&&("text"===t[0]&&n&&"text"===n[0]?(n[1]+=t[1],n[3]=t[3]):(r.push(t),n=t));return r}(s))}(e,t),a&&n.set(r,o)),o},I.prototype.render=function(e,t,n,r){var a=this.getConfigTags(r),o=this.parse(e,a),i=t instanceof P?t:new P(t,void 0);return this.renderTokens(o,i,n,e,r)},I.prototype.renderTokens=function(e,t,n,r,a){for(var o,i,s,c="",u=0,l=e.length;u<l;++u)s=void 0,"#"===(i=(o=e[u])[0])?s=this.renderSection(o,t,n,r,a):"^"===i?
1s=this.renderInverted(o,t,n,r,a):">"===i?s=this.renderPartial(o,t,n,a):"&"===i?s=this.unescapedValue(o,t):"name"===i?s=this.escapedValue(o,t,a):"text"===i&&(s=this.rawValue(o)),void 0!==s&&(c+=s);return c},I.prototype.renderSection=function(e,t,n,r,a){var o=this,i="",s=t.lookup(e[1]);if(s){if(y(s))for(var c=0,u=s.length;c<u;++c)i+=this.renderTokens(e[4],t.push(s[c]),n,r,a);else if("object"==typeof s||"string"==typeof s||"number"==typeof s)i+=this.renderTokens(e[4],t.push(s),n,r,a);else if(w(s)){if("string"!=typeof r)throw new Error("Cannot use higher-order sections without the original template");null!=(s=s.call(t.view,r.slice(e[3],e[5]),function(e){return o.render(e,t,n,a)}))&&(i+=s)}else i+=this.renderTokens(e[4],t,n,r,a);return i}},I.prototype.renderInverted=function(e,t,n,r,a){var o=t.lookup(e[1]);if(!o||y(o)&&0===o.length)return this.renderTokens(e[4],t,n,r,a)},I.prototype.indentPartial=function(e,t,n){for(var r=t.replace(/[^ \t]/g,""),a=e.split("\n"),o=0;o<a.length;o++)a[o].length&&(o>0||!n)&&(a[o]=r+a[o]);return a.join("\n")},I.prototype.renderPartial=function(e,t,n,r){if(n){var a=this.getConfigTags(r),o=w(n)?n(e[1]):n[e[1]];if(null!=o){var i=e[6],s=e[5],c=e[4],u=o;0==s&&c&&(u=this.indentPartial(o,c,i));var l=this.parse(u,a);return this.renderTokens(l,t,n,u,r)}}},I.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(null!=n)return n},I.prototype.escapedValue=function(e,t,n){var r=this.getConfigEscape(n)||D.escape,a=t.lookup(e[1]);if(null!=a)return"number"==typeof a&&r===D.escape?String(a):r(a)},I.prototype.rawValue=function(e){return e[1]},I.prototype.getConfigTags=function(e){return y(e)?e:e&&"object"==typeof e?e.tags:void 0},I.prototype.getConfigEscape=function(e){return e&&"object"==typeof e&&!y(e)?e.escape:void 0};var D={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){U.templateCache=e},get templateCache(){return U.templateCache}},U=new I;D.clearCache=function(){return U.clearCache()},D.parse=function(e,t){return U.parse(e,t)},D.render=function(e,t,n,r){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+(y(a=e)?"array":typeof a)+'" was given as the first argument for mustache#render(template, view, partials)');var a;return U.render(e,t,n,r)},D.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,function(e){return O[e]})},D.Scanner=q,D.Context=P,D.Writer=I;var M=D,V=function(){return o(function e(){r(this,e),n(this,"_toasters",{})},[{key:"addToaster",value:function(e,t){e||(e="general"),this._toasters[e]=t}},{key:"post",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"general";n||(n="general"),null===(t=this._toasters[n])||void 0===t||t.post(e)}},{key:"cancel",value:function(e,t){var n;t||(t="general"),null===(n=this._toasters[t])||void 0===n||n.cancel(e)}},{key:"clear",value:function(e){var t;e||(e="general"),null===(t=this._toasters[e])||void 0===t||t.clear()}}])}(),N=function(){return o(function e(t){var a;r(this,e),n(this,"_template",""),n(this,"_toast",{}),n(this,"_parents",null),this._parents=Array.prototype.slice.call(t),this._template=null===(a=document.getElementById("marsactu-template-toast"))||void 0===a?void 0:a.innerHTML},[{key:"post",value:function(e){var t,n=this;switch(e=Object.assign(new R,e),this.cancel(e.id),e.style){case"info":t="border-primary bg-info";break;case"error":t="border-error-dark bg-error";break;case"success":t="border-success-dark bg-success";break;case"warning":t="border-warning-dark bg-warning";break;default:t="bg-white border-primary"}var r=M.render(this._template,Object.assign({classes:t},e));this._toast[e.id]=this._parents.map(function(t){t.insertAdjacentHTML("beforeend",r);var a=t.querySelector(":scope > div:last-of-type");return a.querySelectorAll(".close-button").forEach(function(t){e.closeable?t.addEventListener("click",function(){return n.cancel(e.id)}):t.parentElement.removeChild(t)}),{element:a,timeout:e.timeout>0?setTimeout(function(){return n.cancel(e.id)},e.timeout):null}})}},{key:"cancel",value:function(e){this._toast[e]&&(this._toast[e].forEach(function(e){var t;clearTimeout(e.timeout),(t=e.element).style.setProperty("--height",t.offsetHeight+"px"),t.style.height="var(--height)",e.element.classList.remove("animate-skid-fade-in"),e.element.classList.add("animate-skid-fade-out"),setTimeout(function(){return e.element.parentElement.removeChild(e.element)},600)}),delete this._toast[e])}},{key:"clear",value:function(){var e=this;Object.keys(this._toast).forEach(function(t){e.cancel(t)})}}])}(),R=o(function e(){r(this,e),n(this,"id",""),n(this,"title",""),n(this,"message",""),n(this,"style",""),n(this,"linkURL",""),n(this,"linkLabel","Voir plus"),n(this,"timeout",3e3),n(this,"closeable",!0)});window.wp=window.wp||{},window.wp.marsactu=window.wp.marsactu||{},window.wp.marsactu.api=new l,window.wp.marsactu.calls=window.wp.marsactu.calls||[],window.addEventListener("DOMContentLoaded",function(){var e,t;document.body.classList.toggle("loaded",!0),window.wp.marsactu.toast=function(){var e=new V,t=document.querySelectorAll('.marsactu-toast-list:not([data-key]), .marsactu-toast-list[data-key=""]');if(0===t.length){var n=document.createElement("DIV");n.className="marsactu-toast-list fixed left-1/2 top-4 -translate-x-1/2 z-99999 max-w-xs md:max-w-full w-[45rem]",document.body.append(n),t=document.querySelectorAll('.marsactu-toast-list:not([data-key]), .marsactu-toast-list[data-key=""]')}
1e.addToaster("",new N(t));var r={};return document.querySelectorAll('.marsactu-toast-list[data-key]:not([data-key=""])').forEach(function(e){var t=e.getAttribute("data-key");r[t]||(r[t]=[]),r[t].push(e)}),Object.keys(r).forEach(function(t){e.addToaster(t,new N(r[t]))}),e}(),t=document.body.className.match(/postid-([0-9]+)/)&&Number(document.body.className.match(/postid-([0-9]+)/)[1])||null,new d(t).view(),window.wp.marsactu.forms={},document.querySelectorAll("form[data-async][data-name]").forEach(function(e){var t=e.getAttribute("data-name");window.wp.marsactu.forms[t]||(window.wp.marsactu.forms[t]=[]),window.wp.marsactu.forms[t].push(new p(e))}),function(){document.querySelectorAll(".modal-toggle").forEach(function(e){e.checked=!1,e.dispatchEvent(new Event("change"));var t="modal-".concat(e.id||"marsactu");window.addEventListener("hashchange",function(n){e.checked&&n.oldURL.indexOf(t)>=0&&n.newURL.indexOf(t)<0&&(e.checked=!1,e.dispatchEvent(new Event("change")))}),e.addEventListener("change",function(){e.checked?document.location.hash=t:document.location.hash.indexOf("modal-")>=0&&history.back(),document.documentElement.classList.toggle("has-modal-open",e.checked)})}),document.querySelectorAll('[data-auto-uncheck="click"]').forEach(function(e){var t=!1,n=function(){setTimeout(function(){e.checked&&(e.checked=!1,e.dispatchEvent(new Event("change"))),t&&(document.removeEventListener("click",n),t=!1)},50)};e.addEventListener("change",function(){e.checked&&!t?(t=!0,document.addEventListener("click",n)):!e.checked&&t&&(document.removeEventListener("click",n),t=!1)})});var e=document.getElementById("login-modal-toggle");if(e&&e.getAttribute("data-login-url")){var t,n=null===(t=e.getAttribute("data-login-url"))||void 0===t||null===(t=t.split(","))||void 0===t?void 0:t.map(function(e){return'a[href="'.concat(e,'"]')});document.querySelectorAll(n.join(",")).forEach(function(t){t.addEventListener("click",function(t){t.preventDefault(),e.checked=!0,e.dispatchEvent(new Event("change"))})})}}(),(e=document.getElementById("login-modal-toggle"))&&document.querySelectorAll('[data-micromodal-trigger="modal-login"]').forEach(function(t){t.addEventListener("click",function(t){t.preventDefault(),e.checked=!0,e.dispatchEvent(new Event("change"))})}),window.wp.marsactu.calls.forEach(function(e){setTimeout(function(){return e()})})})}()}();
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.