1function WPTooltip(){}function Emitter(e){if(e)return mixin(e)}function mixin(e){for(var t in Emitter.prototype)e[t]=Emitter.prototype[t];return e}function WPApi(){}function ConnectionPage(){WPApi.call(this)}Object.create||(Object.create=function(){function e(){}return function(t){if(1!=arguments.length)throw new Error("Object.create implementation only accepts one parameter.");return e.prototype=t,new e}}()),WPTooltip.prototype={settings:{tooltipId:"bloc_erreur",openAnimation:"size",closeAnimation:"slide",openClick:!1,openSpeed:0,closeSpeed:0,closeDelay:4e3,width:270,tooltipHeight:0,maxWidth:450,offsetLeft:10,offsetTop:10,zindex:100,tooltipArrowPosition:"left",arrowCenterOffset:2,arrowOffsetLeft:3,outOfScreenArrowOffset:40,tooltipPosition:"top"},tooltipOn:!1,tooltip:null,timerTooltip:null},WPTooltip.prototype.init=function(e){this.initTooltip(e)},WPTooltip.prototype.getTooltip=function(){return $(this.tooltip)},WPTooltip.prototype.getSettings=function(){return this.settings},WPTooltip.prototype.initTooltip=function(e){if(void 0!==e)for(var t in e)this.settings[t]=e[t];"undefined"!=typeof mobileApi&&!0===mobileApi?(this.settings.openSpeed=500,this.settings.closeSpeed=500):(this.tooltip=$("#"+this.settings.tooltipId),$("body").append($(this.tooltip)),this.getTooltipHeight(),this.clearAllTimers(),this.addTooltipListeners())},WPTooltip.prototype.getTooltipHeight=function(){var e;return this.tooltip.show(),e=this.tooltip.height(),this.tooltip.hide(),this.setOption("tooltipHeight",e),e},WPTooltip.prototype.clearAllTimers=function(){timer&&(clearTimeout(timer),timer=null),"undefined"!=typeof tooltip_counter&&tooltip_counter&&(clearTimeout(tooltip_counter),tooltip_counter=null),this.timerTooltip&&(clearTimeout(this.timerTooltip),this.timerTooltip=null)},WPTooltip.prototype.fixOffsetLeft=function(e){var t="",i=$("#"+e);try{t=$(i).get(0).nodeName}catch(e){}return"IMG"==t?-($(i).width()/2+this.settings.arrowOffsetLeft-this.settings.offsetLeft):"SELECT"==t&&$("#"+e).hasClass("forceBottomTooltip")?$(i).width():"A"==t?0:this.settings.offsetLeft},WPTooltip.prototype.repportError=function(e){},WPTooltip.prototype.fixOffsetTop=function(e){var t="",i=$("#"+e);try{t=$(i).get(0).nodeName}catch(e){this.repportError(e)}return"IMG"==t?0:"A"==t?5:("bottom"==this.settings.tooltipPosition&&this.setOption("offsetTop",this.getTooltipHeight()+$("#"+e).height()+8),this.settings.offsetTop)},WPTooltip.prototype.showTooltip=function(e,t,i,o,n){var a=this;$("#"+e);if("undefined"!=typeof mobileApi&&!0===mobileApi)a.tooltipOn=!0;else{$("#erreur_msg").html(i),void 0===o&&(o=this.fixOffsetLeft(e)),void 0===n&&(n=this.fixOffsetTop(e)),this.stopTimer(),this.tooltip.width(this.settings.width),this.tooltip.show(this.settings.openSpeed),$("#erreur_msg").css("white-space","normal");var r=!1,l="";try{l=$("#"+e).get(0).nodeName}catch(e){this.repportError(e)}"IMG"==l&&(r=!0);try{var s=$("#"+e).offset(),c=s.top-this.tooltip.height()-5+n,p=s.left+o-1}catch(e){return this.repportError(e),!1}if(this.tooltip.find("td.bottom_tooltip").css("overflow","hidden"),this.tooltip.find("td.bottom_tooltip img").css("float","left"),"center"===this.settings.tooltipArrowPosition){var d=this.tooltip.find("td.bottom_tooltip img");d.css("marginLeft",parseInt(this.tooltip.width()/2-d.width()/2-this.settings.arrowCenterOffset)),p-=parseInt(this.tooltip.width()/2+d.width()/2+this.settings.arrowCenterOffset),c-=5}this.tooltip.find("td.bottom_tooltip img").css("margin-top","-3px"),parseInt(p)+parseInt(this.tooltip.width())>$(window).width()&&r&&(p=s.left+this.settings.outOfScreenArrowOffset-this.tooltip.width(),this.tooltip.find("td.bottom_tooltip img").css("float","right")),this.tooltip.css({position:"absolute",top:c,left:p,zIndex:"9999"}),a.tooltipOn||$(this).fadeIn(this.settings.openSpeed,function(){a.tooltipOn=!0}),t&&this.startTimer()}},WPTooltip.prototype.addTooltipListeners=function(){var e=this;this.tooltip.off(),this.tooltip.mouseenter(function(t){e.stopTimer()}),this.tooltip.mouseleave(function(t){e.startTimer()})},WPTooltip.prototype.hideTooltip=function(){this.stopTimer(),this.tooltipOn&&("undefined"!=typeof mobileApi&&!0===mobileApi?$(this.tooltip).slideUp(this.settings.closeSpeed):$(this.tooltip).hide(this.settings.closeSpeed),this.tooltipOn=!1)},WPTooltip.prototype.startTimer=function(){var e=this;this.stopTimer(),this.timerTooltip=setTimeout(function(){e.hideTooltip()},e.settings.closeDelay)},WPTooltip.prototype.stopTimer=function(){try{clearTimeout(this.timerTooltip),this.timerTooltip=null}catch(e){this.repportError(e)}},WPTooltip.prototype.clearError=function(e){var t=$("#"+e),i=t.parent();t.is("select")&&t.siblings(".select,.clone").length>0&&(i=t.parent().parent());var o=$("#iconErr"+e)||i.children("img").not(".valid_form"),n=t;if(t.is("select")&&t.siblings(".select,.clone").length>0&&(n=t.siblings(".select,.clone")),n.hasClass("inputForm")||t.children("input[type=radio]").length>0||n.addClass("inputForm"),t.children("input[type=radio]").length>0&&(t.children(".radio").css("box-shadow","none"),t.children("label").removeClass("mobilelabelErr")),n.removeClass("inputErr"),$("#"+e+"Label").removeClass("labelErr"),t.is("select"))n.siblings("select").off("mouseenter mouseleave");else if(o.animate({opacity:0}
1,600,function(){o.remove()}),"undefined"!=typeof activeValidWpApi&&!0===activeValidWpApi&&t.val().length>=2){if(0==$("#iconValid"+e).length){var a="img/";"undefined"!=typeof mobileApi&&!0===mobileApi&&(a="img/mobile/");var r=$("<img />",{class:"valid_form",id:"iconValid"+e,src:path_relative_root+a+"picto_panneau_valid.png"}).css({opacity:0});t.after(r),r.animate({opacity:1},600)}}else if($("#iconValid"+e).length>0&&t.val().length<2)$("#iconValid"+e).animate({opacity:0},600,function(){$("#iconValid"+e).remove()});else if(0==$("#iconValid"+e).length){a="img/";"undefined"!=typeof mobileApi&&!0===mobileApi&&(a="img/mobile/");r=$("<img />",{class:"valid_form",id:"iconValid"+e,src:path_relative_root+a+"picto_panneau_valid.png"}).css({opacity:0});t.after(r),r.animate({opacity:1},600)}},WPTooltip.prototype.clearAllErrors=function(){var e=this;setTimeout(function(){$(".inputErr, .labelErr").each(function(){e.clearError($(this).attr("id").replace("Label",""))})},1e3)},WPTooltip.prototype.getMessageWithTitle=function(e,t){var i;try{var o=$("#"+e+"Label").html();o=o.replace("<br>"," ").replace(":","");var n=$("<div>"+o+"</div>");n=(n=n.text()).replace("*",""),i=$.trim(n).replace(" :","");var a=$("<div>"+t+"</div>");""!=i&&0==a.find(".title_toolltip").length&&(t='<p class="title_toolltip">'+i+" :</p>"+t)}catch(e){this.repportError(e)}return t},WPTooltip.prototype.showError=function(e,t){var i=this,o=$("#"+e);"undefined"!=typeof activeValidWpApi&&!0===activeValidWpApi&&$("#iconValid"+e).length>0&&$("#iconValid"+e).animate({opacity:0}
1,600,function(){$("#iconValid"+e).remove()});var n=o;o.is("select")?(0==(n=o.siblings(".select,.clone")).length&&(n=o.parent().siblings(".select_item")),o.siblings(".clone").css("border","1px solid #F00"),o.addClass("inputErr")):o.children("input[type=radio]").length>0&&(n="",o.children("label").addClass("mobilelabelErr"));try{n.addClass("inputErr")}catch(e){}try{$("#"+e+"Label").addClass("labelErr")}catch(e){}t=this.getMessageWithTitle(e,t);var a,r=o.parent(),l=$("#iconErr"+e)||$("img",r).not(".valid_form");if(!o.is("select")){var s="img/";"undefined"!=typeof mobileApi&&!0===mobileApi&&(s="img/mobile/"),0===l.length?(l=$("<img />",{class:"img_error",id:"iconErr"+e,src:path_relative_root+s+"picto_panneau.png"}).css({opacity:0}),o.children("input[type=radio]").length>0&&0==o.children(".radio").length?o.append(l):o.parent().hasClass("intl-tel-input")?o.parent().after(l):(o.after(l),o.parent().find(".valid_form").remove())):this.unbindAll("iconErr"+e),$("#iconErr"+e).length>0&&(l=$("#iconErr"+e)),$("#iconErr"+e).is(":visible")&&0!=$("#iconErr"+e).css("opacity")||l.stop().animate({opacity:1},600)}l.length?"undefined"!=typeof mobileApi&&!0===mobileApi?i.showTooltip(o.prop("id"),!1,i.getMessageWithTitle(o.prop("id"),t)):(l.mouseenter(function(){clearTimeout(a);try{i.showTooltip($(this).prop("id"),!1,i.getMessageWithTitle($(this).prop("id"),t))}catch(e){this.repportError(e)}}),l.mouseout(function(){a=setTimeout(function(){i.hideTooltip()},350)})):o.is("select")&&n.siblings("select").on({mouseenter:function(){clearTimeout(a);try{i.showTooltip($(this).prop("id"),!1,i.getMessageWithTitle($(this).prop("id"),t))}catch(e){this.repportError(e)}},mouseleave:function(){a=setTimeout(function(){i.hideTooltip()},350)}})},Emitter.prototype.on=Emitter.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Emitter.prototype.once=function(e,t){function i(){this.off(e,i),t.apply(this,arguments)}return i.fn=t,this.on(e,i),this},Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,o=this._callbacks["$"+e];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n=0;n<o.length;n++)if((i=o[n])===t||i.fn===t){o.splice(n,1);break}return this},Emitter.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),i=this._callbacks["$"+e];if(i)for(var o=0,n=(i=i.slice(0)).length;o<n;++o)i[o].apply(this,t);return this},Emitter.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Emitter.prototype.hasListeners=function(e){return!!this.listeners(e).length},Object.create||(Object.create=function(){function e(){}return function(t){if(1!=arguments.length)throw new Error("Object.create implementation only accepts one parameter.");return e.prototype=t,new e}}()),"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),WPApi.prototype=mixin(Object.create(WPTooltip.prototype)),WPApi.prototype.init=function(e){this.initTooltip(e),this.resetAllEvents(),this.addListeners(),this.scanForErrors()},WPApi.prototype.repportError=function(e,t){},WPApi.prototype.resetAllEvents=function(){},WPApi.prototype.addListeners=function(){},WPTooltip.prototype.setOption=function(e,t){this.settings[e]=t},WPApi.prototype.scanForErrors=function(){var e=this;$(".img_error").each(function(){var t=this.id.replace("iconErr","");$("#textErr"+t).length>0&&e.showError(t,$("#textErr"+t).html())})},WPApi.prototype.checkPassword=function(e){if(void 0===window.password_validator_config||void 0===window.password_validator_config.enable||1!=window.password_validator_config.enable)return this.checkAlpha(e,"login_mdp");isPasswordValid($("#"+e).val())?this.clearError(e):this.showError(e)},WPApi.prototype.checkLastName=function(e){return this.checkAlpha(e,"login_nom",!0)},WPApi.prototype.checkFirstName=function(e){return this.checkAlpha(e,"login_prenom",!0)},WPApi.prototype.checkVAT=function(e){if(this.hideTooltip(),$("#"+e).val().length>13){var t=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_thanks_precise&arg2=login_vat");return this.showError(e,t),!1}return this.checkAlpha(e,"login_vat")},WPApi.prototype.checkClientTaxNbr=function(e){return this.hideTooltip(),!0},WPApi.prototype.checkNickName=function(e){return this.checkAlpha(e,"login_pseudo")},WPApi.prototype.checkAlpha=function(e,t,i){var o;if(void 0===i&&(i=!1),this.hideTooltip(),""==$("#"+e).val().trim())return o=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_thanks_precise&arg2="+t),this.showError(e,o),!1;var n="^[\\p{L}- ,_/.']+$";if(i||(n="clientPwd"==e||"clientPwdv"==e?"^[\\p{L}0-9\\s\\p{P}\\p{S}\\-_,\\/.']+$":"^[\\p{L}- ,_/.0-9']+$"),void 0===window.password_validator_config||void 0===window.password_validator_config.enable||1!=window.password_validator_config.enable||"clientPwd"!=e&&"clientPwdv"!=e)a=new XRegExp(n).test($("#"+e).val());else{var a=isPasswordValid($("#"+e).val())}if(a){if(("clientPwd"==e||"clientPwdv"==e)&&1==window.password_validator_config.enable){var r=$('input[name="'+e+'"]').closest("form");r.find(".button.valid").removeAttr("disabled"),this.comparePassword("clientPwdv","clientPwd")}return this.clearError(e),!0}return o=i?ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_wrong_input_alpha&arg2="+t):ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_wrong_input_alphanum&arg2="+t),this.showError(e,o),"clientPwd"!=e&&"clientPwdv"!=e||1!=window.password_validator_config.enable||!window.password_validator_config.disable_btn_wrong_password||r.find(".button.valid").attr("disabled","disabled"),!1},WPApi.prototype.checkNumber=function(e,t,i,o){var n,a;return this.hideTooltip(),""==$("#"+e).val().trim()?(n=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_thanks_precise&arg2="+t),this.showError(e,n),!1):(a=void 0===i||0==i?void 0===o||0==o?"^[0-9]+$":"^[0-9+]+$":void 0===o||0==o?"^[0-9]{"+i+"}$":"^[0-9+]{"+i+"}$",new XRegExp(a).test($("#"+e).val())?(this.clearError(e),!0):(n=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_wrong_input_num&arg2="+t),this.showError(e,n),!1))},WPApi.prototype.checkAlphaSpeChar=function(e,t,i){var o;if(void 0===i&&(i=!1),this.hideTooltip(),""==$("#"+e).val().trim())return o=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_thanks_precise&arg2="+t),this.showError(e,o),!1;var n="^[\\p{L}- ,_/.']+$";
1return i||(n="^[\\p{L}- ,_/.'0-9]+$"),new XRegExp(n).test($("#"+e).val())?(this.clearError(e),!0):(o=i?ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_wrong_input_alpha&arg2="+t):ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_wrong_input_alphanum&arg2="+t),this.showError(e,o),!1)},WPApi.prototype.checkCompany=function(e,t){var i;if(this.hideTooltip(),""==$("#"+e).val().trim())return i=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_thanks_precise&arg2="+t),this.showError(e,i),!1;return new XRegExp("^[-\\p{L}0-9'\\s,_/.&]{3,127}$","i").test($("#"+e).val())?(this.clearError(e),!0):(i=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_wrong_input_alphanum_02&arg2="+t),this.showError(e,i),!1)},WPApi.prototype.checkTextarea=function(e){return $("#"+e).val().length>2?(this.clearError(e),!0):(msg=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_thanks_precise&arg2=contact_field_message"),this.showError(e,msg),!1)},WPApi.prototype.compareText=function(e,t,i){return this.hideTooltip(),""!=$("#"+t).val()&&$("#"+e).val()!=$("#"+t).val()?(this.showError(e,i),!1):(this.clearError(e),!0)},WPApi.prototype.comparePassword=function(e,t){var i=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_same_mdp_confirm&arg2=login_mdp_conf");if(void 0!==window.password_validator_config&&void 0!==window.password_validator_config.enable&&1==window.password_validator_config.enable){var o=!1;isPasswordValid($("#"+e).val())&&isPasswordValid($("#"+t).val())?(o=!0,this.clearError(e),this.clearError(t)):(isPasswordValid($("#"+e).val())?this.clearError(e):this.showError(e),isPasswordValid($("#"+t).val())?this.clearError(t):this.showError(t));var n=$('input[name="'+e+'"]').closest("form");return o?(this.compareText(e,t,i),$('input[name="'+t+'"]').hasClass("inputErr")||n.find(".button.valid").removeAttr("disabled"),!0):(void 0!==window.password_validator_config.disable_btn_wrong_password&&1==window.password_validator_config.disable_btn_wrong_password&&n.find(".button.valid").attr("disabled","disabled"),!1)}return this.compareText(e,t,i)},WPApi.prototype.compareEmail=function(e,t){var i=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_same_email_confirm&arg2=login_email_verif");return this.compareText(e,t,i)},WPApi.prototype.checkUrl=function(e,t){var i;this.hideTooltip();var o=new XRegExp("^(https?://)?([da-z.-]+).([a-z.]{2,6})([/w .-]*)*/?$").test($("#"+e).val());return!0===t&&0==$elem.val().length||o?(this.clearError(e),!0):(i=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_wrong_url"),this.showError(e,i),!1)},WPApi.prototype.checkEmail=function(e){var t=this;return this.hideTooltip(),$.ajax({url:path_relative_root+"ajax_check_email.php",type:"POST",data:"email="+$("#"+e).val()+"&err_code=1",success:function(i){return"ok"!=i.trim()?(t.showError(e,i),t.showTooltip("iconErr"+e,!1,t.getMessageWithTitle(e,i)),!1):(t.clearError(e),!0)}}),!1},WPApi.prototype.checkPhoneNumber=function(e,t,i,o){void 0===t&&(t="login_telephone");var n=$("#"+e);return this.hideTooltip(),flag=verif_telephone(e,t,i),!0===o&&n.val().length<2||flag?(this.clearError(e),!0):("undefined"==typeof isWeddingSpace?this.showError(e,$("#erreur_msg").html()):this.showError(e,$("#erreur_msg_phone_wedding").html()),!1)},WPApi.prototype.checkPhoneNumberAuto=function(e,t,i,o){if("undefined"!=typeof phone_mobile_only&&phone_mobile_only&&(i=!0),"undefined"==typeof auto_completion_tel)return this.checkPhoneNumber(e,t,i,o);var n="",a=document.getElementById("telephone"),r=document.getElementById("mobile");a&&!a.value&&r&&!r.value?n=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_error_phone_mobile"):r&&!r.value&&(n=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_thanks_precise&arg2="+t)),this.hideTooltip();var l=verif_telephone(e,i);if(!0===o&&""===document.getElementById(e).value.trim()||"undefined"!=typeof phone_mandatory&&phone_mandatory&&""===document.getElementById(e).value)if("clientMobile"!==e&&"mobile"!==e||"undefined"==typeof mobile_mandatory||!mobile_mandatory)if("clientTel"!==e&&"telephone"!==e||"undefined"==typeof phone_mandatory||!phone_mandatory){if(!("clientTel"===e&&0===$("#clientMobile").length||"telephone"===e&&0===$("#mobile").length)||"undefined"==typeof mobile_mandatory||!mobile_mandatory)return this.clearError(e),!0}else;else;if(l){if(null!==document.getElementById("billtelephone")){var s="undefined"!=typeof phone_mobile_only&&phone_mobile_only?"#mobile":"#telephone";null!==document.getElementById("wrapper_bill")&&$("#wrapper_bill").is(":visible")&&$(s).intlTelInput("isValidNumber")&&(""!==document.getElementById("telephoneHidden").value?$("#billtelephone").val(document.getElementById("telephoneHidden").value.trim()):$("#billtelephone").val(document.getElementById("mobileHidden").value.trim()))}return null!==document.getElementById("billmobile")&&null!==document.getElementById("wrapper_bill")&&$("#wrapper_bill").is(":visible")&&$("#mobile").intlTelInput("isValidNumber")&&""!==document.getElementById("mobileHidden").value&&$("#billmobile").val(document.getElementById("mobileHidden").value.trim()),this.clearError(e),!0}return this.showError(e,n),!1},WPApi.prototype.checkBirthDate=function(e,t,i,o){void 0===o&&(o="login_naissance");var n=$("#"+e).val(),a=$("#"+t).val(),r=$("#"+i).val();if(""!=n||""!=a||""!=r){var l=new RegExp("^(\\d{2})/(\\d{2})/(\\d{4})$","gi").exec(n+"/"+a+"/"+r),s=31,c=!0,p=!0;if(""!=a&&""!=r){var d=[31,28,31,30,31,30,31,31,30,31,30,31];s=2!=a?d[a-1]:r%4!=0||r%100==0&&r%400!=0?d[1]:d[1]+1}return(n<1||n>s)&&(c=!1),(a<1||a>12)&&(p=!1),r<1900&&(p=!1),l&&c&&p?(this.clearError(i),!0):(this.showError(i,$("#erreur_msg").html()),!1)}return this.clearError(i),!0},WPApi.prototype.checkAddress=function(e){return this.checkAlphaSpeChar(e,"login_adresse",!1)},WPApi.prototype.checkPostalCode=function(e,t){this.hideTooltip();var i=5;$.inArray($("#"+t).val(),["B","BE","L","LU","S","CH","PT","TN","DK","SI"])>=0&&(i=4);var o=!0;return-1==$.inArray($("#"+t).val(),["AR","GB","ES","AU","IE","NL","CA","AE"])&&(o=verif_num(e,"login_cp",i))&&(o=verif_zip(e,"pays","login_cp",i)),o?(this.clearError(e),!0):(this.showError(e,$("#erreur_msg").html()),!1)},WPApi.prototype.checkPostalCodeInter=function(e,t){if(void 0!==t&&null!=t){var i=$("#"+t);let a=document.querySelector("#"+e);var o=i.val(),n=ajax_file(path_relative_root+create_link("ajax_regex_cp_par_pays")+"?code_pays="+o);if(""===o)return console.warn("No country code provided for postal code verification, skipping regex check"),this.clearError(e),!0;if(""===n)return a.style.display="none",a.value="",this.checkPostalCode(e,t);if(0===n)return a.style.display="none",a.value="",this.clearError(e),!0;setTimeout(function(){var t=n.trim(),i=new XRegExp(t).test(a.value);if(a.style.display="inline-block",i)return this.clearError(e),!0;var o=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_thanks_precise&arg2=login_cp");return this.showError(e,o),!1},500)}return this.checkPostalCode(e,t)},WPApi.prototype.checkSelectPays=function(e){var t=!0,i=$("#"+e).val();return(null==i||i.length<=0)&&(t=!1,msg=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_thanks_precise&arg2=login_pays")),t?(this.clearError(e),!0):(this.showError(e,msg),!1)},WPApi.prototype.checkGoogleAddr=function(e,t){var i=$("#"+e),o=$("#"+t),n=i.data("google-val"),a=i.data("bypass"),r=!0;if("pays"==t&&("S"==n&&(n="CH"),null==n?(r=!1,msg=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_wrong_adresse")):n.length>0&&("select-one"===o.prop("type")&&0==$("option[data-name="+n+"]",o).length||"hidden"===o.prop("type")&&""===o.val())&&(r=!1,msg=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_wrong_country"))),"zip"==t){var l=n.split("|"),s=l[0],c=l[1];null==s||""==s||-1==$.inArray(s,["BE","LU","MC","CH","FR","GP","MQ","GF","RE","PM","YT","TF","WF","PF","NC","PT"])?(r=!1,msg=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_wrong_country")):(null==c||0==$.isNumeric(c)||c.length<2)&&(r=!1,msg=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_wrong_postalCode_map"))}return null!=a&&1==a&&0==r&&(r=!0),r?(this.clearError(e),!0):(this.showError(e,msg),!1)},WPApi.prototype.checkParrainage=function(e){if(this.hideTooltip(),""==$("#"+e).val())return!0;flag=verif_alphanum(e,"login_code_parrainage",!1);var t="email="+$("#clientMail").val()+"&code="+$("#"+e).val();if(flag){if(flag=ajax_file_post(path_relative_root+"ajax_valid_code_parrain.php",t),"1"==flag||"2"==flag){var i="1"==flag?"js_erreur_parrain_1":"js_erreur_parrain_2",o=ajax_file(path_relative_root+"ajax_sprintf.php?arg1="+i);return this.showError(e,o),!1}return that.clearError(e),!0}return flag},WPApi.prototype.unbindAll=function(e){var t,i,o=$("#"+e);o.length>0&&((t=o.parent().hasClass("intl-tel-input"))&&(i=o.intlTelInput("get
1SelectedCountryData"),o.intlTelInput("destroy")),o.off(),o.removeAttr("onblur"),o.removeAttr("onfocus"),o.removeAttr("onclick"),o.removeAttr("onmouseover"),o.removeAttr("onmouseout"),t&&o.intlTelInput({onlyCountries:intlTelInputCountriesList,initialCountry:i.iso2,preferredCountries:intlTelInputFavCountries[0]}))},$.fn.submitEnter=function(){var e=$(this),t=e.closest("form");return $(function(){$("input[type=text], input[type=password]",t).on("keydown",function(t){13==t.keyCode&&e.trigger("click")})}),this},WPApi.prototype.submitForm=function(e,t,i){void 0===i&&(i="loader_1");var o=this;$("#"+i).show();var n=$("#"+e);n.trigger("submitFormEvent"),n.find("#societe").off("input").on("input",function(){$("#societeError").hide().text("")});var a=n.attr("action");""==a&&(a=document.location.href,n.attr("action",a));var r=n.attr("method");""==r&&(r="POST"),$.ajax({type:r,url:a,data:n.serialize(),success:function(e){if(1==e.error){var a=Object.keys(e.result);if(1===a.length&&"societe"===a[0])return $("#societeError").text(e.result.societe).show(),$("#"+t).show(),void $("#"+i).hide();for(var r in $(".deliveryBorneLightbox")&&($(".deliveryBorneShad").show(),$(".deliveryBorneLightbox").show()),e.result)"pays"===r&&(e.result[r]=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_thanks_precise&arg2=login_pays")),"societe"===r?$("#societeError").text(e.result[r]).show():o.showError(r,e.result[r]);$("#"+t).show(),$("#loader_1").hide();var l=$(".noaddr.delivery");$("#autocomplete_addr").length>=0&&$(".elem_addr_autocomplete").is(":hidden")&&($(".elem_addr_autocomplete .inputErr").length>0&&($(".elem_addr_autocomplete").show(),l.removeClass("show").stop().css({display:"block",opacity:1}).animate({opacity:0}
1,function(){l.css({display:"none",opacity:""})})),(!document.getElementById("type_delivery")||document.getElementById("type_delivery")&&"lad"==$("#type_delivery").val())&&$(".elem_global.delivery").advanceSlide("show")),document.getElementById("wrapper_optin")&&(o.checkRadio("wrapper_optin"),document.getElementById("wrapper_optin_sms")&&(o.checkRadio("wrapper_optin_sms"),document.getElementById("wrapper_optin_partners")&&(o.checkRadio("wrapper_optin_partners"),document.getElementById("wrapper_optin_geoloc")&&o.checkRadio("wrapper_optin_geoloc")))),$(".info_error").slideDown()}else{$(".info_error").slideUp();try{customSubmitForm(e)}catch(e){do_submit=!0,document.getElementById("wrapper_optin")&&(do_submit=o.checkRadio("wrapper_optin"),document.getElementById("wrapper_optin_sms")&&(do_submit_sms=o.checkRadio("wrapper_optin_sms"),do_submit&&!do_submit_sms&&(do_submit=!1),document.getElementById("wrapper_optin_partners")&&(do_submit_partners=o.checkRadio("wrapper_optin_partners"),do_submit&&!do_submit_partners&&(do_submit=!1),document.getElementById("wrapper_optin_geoloc")&&(do_submit_geoloc=o.checkRadio("wrapper_optin_geoloc"),do_submit&&!do_submit_geoloc&&(do_submit=!1))))),do_submit?($("#typeAccount").prop("checked")&&void 0!==window.dataLayer&&pushToWshopBus({event:"compte_invite_inscription_etape_livraison"}),n.submit()):($("#"+t).show(),$("#"+i).hide(),$(".deliveryBorneLightbox")&&($(".deliveryBorneShad").show(),$(".deliveryBorneLightbox").show()))}}},error:function(){$("#"+t).show(),$("#"+i).hide()}}).always(function(){n.trigger("endSubmitFormEvent")})},WPApi.prototype.buildURL=function(e){if("/"===e.charAt(0)&&(e=e.substr(1)),"undefined"!=typeof path_relative_root)return window.location.origin+path_relative_root+e;for(var t in pathParts=window.location.pathname.split("/"),selectedPathParts=new Array,pathParts)parseInt(t)+1<pathParts.length&&selectedPathParts.push(pathParts[t]);return window.location.origin+selectedPathParts.join("/")+"/"+e},WPApi.prototype.fetchMessage=function(e,t){var i=this;if(serviceURL=this.buildURL("ajax_sprintf.php"),requestData={arg1:e},t)for(var o=0;o<t.length;o++)requestData["arg"+(parseInt(o)+2)]=t[o];$.get(serviceURL,requestData,function(e){i.emit("messageAvailable",e)})},WPApi.prototype.changeVisuals=function(e,t){var i=jQuery.Deferred(),o=0;for(var n in i.pool=[],e)if($(n).length>0){var a=jQuery.Deferred(),r=$('<img style="position:absolute;left:-5000px;top:-5000px;" />');i.pool.push(a),a.always(function(){o++}),r.on("load",function(e,t,i){$(e).attr("src",this.src),$(this).remove(),i.resolve(e,t)}.bind(r.get(0),n,e[n],a)).on("error",function(e,t,i){if($(this).remove(),void 0!==t&&t.length>0){var o=new WPApi,n={};return n[e]=t,i.reject(e,n),o.changeVisuals(n)}}.bind(r.get(0),n,t,a)),$("body").prepend(r),r.attr("src",e[n])}var l=setInterval(function(){o==i.pool.length&&(i.resolve(e),clearInterval(l))},20);return i.promise()},ConnectionPage.prototype=Object.create(WPApi.prototype),ConnectionPage.prototype.resetAllEvents=function(){this.unbindAll("clientNom"),this.unbindAll("clientPrenom"),this.unbindAll("clientPseudo"),this.unbindAll("clientMail"),this.unbindAll("clientMailv"),this.unbindAll("clientMailAuth"),this.unbindAll("clientPwd"),this.unbindAll("clientPwdv"),this.unbindAll("clientPwdAuth"),this.unbindAll("clientVille"),this.unbindAll("codeParrainage"),this.unbindAll("auth"),this.unbindAll("clientForm"),this.unbindAll("bloc_erreur"),this.unbindAll("btn-pwdlost"),this.unbindAll("btn_creer_compte"),this.unbindAll("clientPwdAuthErr"),this.unbindAll("clientCompany"),this.unbindAll("clientVat"),this.unbindAll("clientTaxNbr"),this.unbindAll("clientTel"),this.unbindAll("clientPays"),this.unbindAll("codeP")},ConnectionPage.prototype.addListeners=function(){this.addListenersLoginForm(),this.addListenersRegisterForm(),this.addListenersLostPasswordForm()},ConnectionPage.prototype.addListenersLoginForm=function(){var e=this;$("#clientMailAuth").click(function(){$(this).focus()}),$("#clientPwdAuth").click(function(){$(this).focus()}),$("#clientMailAuth").blur(function(){e.checkClientEmailAuth()}),$("#clientPwdAuth").blur(function(){e.checkClientPasswordAuth()}),"undefined"!=typeof nb_try_auth&&"undefined"!=typeof max_try_auth&&nb_try_auth>max_try_auth&&e.generateCaptcha(),$("#AuthErr").click(function(){$("#auth").submit()}),$("#AuthErr").submitEnter(),$("#auth").submit(function(){if(elmt=$("#AuthErr"),loader=$("#loader_2"),"none"!=elmt.css("display"))if(prev_display=elmt.css("display"),elmt.css("display","none"),loader.css("display","block"),elmt.closest(":focus").length>0&&elmt.closest(":focus").blur(),document.getElementById("garantiePreuveAchat")){var t=document.getElementById("garantiePreuveAchat");if(t.files&&1==t.files.length){if(t.files[0].size>4194304)return $("#erreur_preuve_achat,#AuthErr").show(),$("#loader_2").hide(),$("#labelgarantiePreuveAchat").addClass("labelErr"),
1!1;document.getElementById("identification")&&$("#garantie_form").appendTo("#auth"),setTimeout(function(){e.checkLoginForm()},1e3)}else document.getElementById("identification")&&$("#garantie_form").appendTo("#auth"),setTimeout(function(){e.checkLoginForm()},1e3)}else setTimeout(function(){e.checkLoginForm()},1e3)})},ConnectionPage.prototype.addListenersLostPasswordForm=function(){var e=this;$("#mailLost").click(function(){$(this).focus()}),$("#mailLost").blur(function(){e.checkClientLostEmail()}),$("#btn-pwdlost").click(function(){elmt=$("#btn-pwdlost"),loader=$("#loader_3"),"none"!=elmt.css("display")&&(prev_display=elmt.css("display"),elmt.css("display","none"),loader.css("display","block"),setTimeout(function(){e.checkLostPasswordForm()},1e3))})},ConnectionPage.prototype.addListenersRegisterForm=function(){var e=this;$("#clientNom").blur(function(){e.checkLastName("clientNom")}),$("#clientPrenom").blur(function(){e.checkFirstName("clientPrenom")}),$("#clientPseudo").blur(function(){e.checkNickName("clientPseudo")}),$("#clientMail").on("blur",function(){e.checkClientEmail()}),$("#optin_y,#optin_n").click(function(){e.checkRadio("wrapper_optin")}),$("#sms_optin_y,#sms_optin_n").click(function(){e.checkRadio("wrapper_optin_sms")}),$("#clientMailv").blur(function(){e.compareEmail("clientMailv","clientMail")}),$("#clientPwd").blur(function(){e.checkClientPassword(),""!=$("#clientPwdv").val()&&1==window.password_validator_config.enable&&e.comparePassword("clientPwdv","clientPwd")}),$("#clientPwdv").blur(function(){e.comparePassword("clientPwdv","clientPwd")}),$("#codeParrainage").blur(function(){e.checkParrainage("codeParrainage")}),$("#clientVille").blur(function(){e.checkAlpha("clientVille","login_ville",!0)}),$("#clientMail").click(function(){$(this).focus()}),$("#clientMail").blur(function(){e.checkEmail("clientMail")}),$("#clientPwd").click(function(){$(this).focus()}),$("#clientCompany").blur(function(){e.checkCompany("clientCompany","login_company")}),$("#clientVat").blur(function(){e.checkVAT("clientVat")}),$("#clientTaxNbr").blur(function(){e.checkClientTaxNbr("clientTaxNbr")}),$("#clientTel").blur(function(){e.checkPhoneNumber("clientTel","login_telephone",!1,!1)}),$("#codeP").blur(function(){e.checkPostalCodeInter("codeP")}),$("#btn_creer_compte").click(function(){$("#clientForm").submit()}),$("#btn_creer_compte").submitEnter(),$("#clientForm").submit(function(){e.checkClientEmail()}),$("#clientForm").submit(function(){if(elmt=$("#btn_creer_compte"),loader=$("#loader_1"),"none"!=elmt.css("display")){if(prev_display=elmt.css("display"),elmt.css("display","none"),loader.css("display","block"),document.getElementById("garantiePreuveAchat")){var t=document.getElementById("garantiePreuveAchat");return t.files&&1==t.files.length&&t.files[0].size>4194304?($("#erreur_preuve_achat,#btn_creer_compte").show(),$("#labelgarantiePreuveAchat").addClass("labelErr"),!1):(document.getElementById("identification")&&$("#garantie_form").appendTo("#clientForm"),setTimeout(function(){e.checkRegisterForm()},1e3),!1)}return document.getElementById("identification")&&$("#garantie_form").appendTo("#clientForm"),setTimeout(function(){e.checkRegisterForm()},1e3),!1}return!1})},ConnectionPage.prototype.checkEmailRegister=function(e){var t=this;this.hideTooltip();var i=$("#"+e).closest("form").attr("action");$.ajax({url:path_relative_root+"ajax_email_exist.php",type:"POST",data:"mail="+$("#"+e).val()+"&err_code=1&action="+i,datatype:"html",success:function(i){if(isNaN(i)){if(isNaN(i))return t.showError(e,i),!1;t.clearError(e),do_submit_ajax=!0}else if(1==i){var o=1==i?"js_already_have_account":"login_inactif2";$.ajax({url:path_relative_root+"ajax_sprintf.php?arg1="+o}).done(function(i){$("#clientMailAuth").val($("#"+e).val()),"undefined"==typeof isWeddingSpace?($("#auth .message_mail_exist").addClass("on").show(),$(".text","#auth .message_mail_exist").html(t.getMessageWithTitle("clientMailAuth",i)).slideDown(),$("#AuthInactifErr").hide()):$("#existingCustomerMsg").html(t.getMessageWithTitle("clientMailAuth",i)).slideDown()});try{"undefined"==typeof isWeddingSpace?showBlocForm("is_client","from_div"):($(".authBloc").removeClass("actif"),$("#existingCustomer").addClass("actif")),t.clearAllErrors()}catch(e){t.repportError(e)}try{display_form_is_client(),t.clearAllErrors()}catch(e){t.repportError(e)}do_submit_ajax=!1}else if(3==i){$.ajax({url:path_relative_root+"ajax_sprintf.php?arg1="}),$("#clientMailAuth").val($("#"+e).val()),$("#AuthInactifErr").show(),$("#auth .message_mail_exist").slideUp();try{showBlocForm("is_client","from_div"),t.clearAllErrors()}catch(e){t.repportError(e)}try{display_form_is_client(),t.clearAllErrors()}catch(e){t.repportError(e)}do_submit_ajax=!1}else t.clearError(e),do_submit_ajax=!0}})},ConnectionPage.prototype.checkClientEmail=function(){return this.checkEmailRegister("clientMail")},ConnectionPage.prototype.checkClientPassword=function(){return this.checkPassword("clientPwd")},ConnectionPage.prototype.checkClientEmailAuth=function(){return this.checkEmail("clientMailAuth")},ConnectionPage.prototype.checkClientPasswordAuth=function(){return this.checkPassword("clientPwdAuth")},ConnectionPage.prototype.checkClientLostEmail=function(){return this.checkEmail("mailLost")};var allow_submit_create=!0,do_submit_ajax=!0;function BankPage(){WPApi.call(this)}function MyAccountPage(){WPApi.call(this)}function NewsletterPage(){WPApi.call(this)}function UnsubscribeNewsletterPage(){WPApi.call(this)}function subscriptionPage(){WPApi.call(this)}function CartPage(){WPApi.call(this)}function DeliveryPage(){WPApi.call(this)}function isPasswordValid(e){const t=window.password_validator_config;let i="^";return t.uppercase&&(i+="(?=.*?[A-Z])"),t.lowercase&&(i+="(?=.*?[a-z])"),t.digit&&(i+="(?=.*?[0-9])"),t.special&&(i+="(?=.*[^a-zA-Z0-9])"),t.min_length>0&&(i+=".{"+t.min_length+",}"),i+="$",new RegExp(i).test(e)}function verif_password(e,t,i,o){var n=0,a=document.getElementById(e),r=document.getElementById(e+"Label"),l=document.getElementById("erreur_msg");if(""==a.value)return 0==i&&(l.innerHTML='<p class="title_toolltip">'+ajax_file(path_relative_root+"ajax_sprintf.php?arg1="+t)+" :</p>"+ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_thanks_precise&arg2="+t)),a.className+=" inputErr",r&&(r.className+=" labelErr"),
1!1;var s=a.value.lastIndexOf(" "),c=a.value.indexOf(" ");if((s+1==a.value.length||c+1==1)&&a.value.length<=2)return 0==i&&(l.innerHTML='<p class="title_toolltip">'+ajax_file(path_relative_root+"ajax_sprintf.php?arg1="+t)+" :</p>"+ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_at_least_n_chars_space&arg2="+t+"&arg3=2")),a.className+=" inputErr",r&&(r.className+=" labelErr"),!1;if(a.value.length<2||a.value.length>50)return 0==i&&(l.innerHTML='<p class="title_toolltip">'+ajax_file(path_relative_root+"ajax_sprintf.php?arg1="+t)+" :</p>"+ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_at_least_n_chars&arg2=2&arg3="+t)),a.className=a.className.replace("inputForm",""),a.className+=" inputErr",r&&(r.className+=" labelErr"),!1;for(var p=0;p<a.value.length;p++){var d=a.value.substring(p,p+1);"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".indexOf(d)<0&&n++}return n>0?(0==i&&(l.innerHTML='<p class="title_toolltip">'+ajax_file(path_relative_root+"ajax_sprintf.php?arg1="+t)+" :</p>"+ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_wrong_input_alpha&arg2="+t)),a.className+=" inputErr",r&&(r.className+=" labelErr"),n=0,!1):1==i&&a.value==o?(a.className+=" inputErr",!1):(a.className=a.className.replace("inputErr",""),a.className+=" inputForm",r&&(r.className=r.className.replace("labelErr",""),r.className+=" labelForm"),!0)}function CustomGlassPage(){WPApi.call(this)}function ContactProPage(){WPApi.call(this)}function CallBackPage(){WPApi.call(this)}function ContactPage(){WPApi.call(this)}function ContactPageFaq(){WPApi.call(this)}function passwordThanks(){WPApi.call(this)}function deliveryChoice(){WPApi.call(this)}function formParrainage(){WPApi.call(this)}function formVdi(){WPApi.call(this)}function DemandeCataloguePage(){WPApi.call(this)}function ReclamationPage(){WPApi.call(this)}function paginationGoToPage(e){void 0===e&&(e=1),$("#pagination_content_bis").length>0&&$("#pagination_content_bis").css("display","none");var t=document.getElementById("type_tri").value,i=document.getElementById("id_page").value,o=parseInt(e-1),n="";if("product"==from_type)n=generateNewBlocProd(t,i,path_relative_root,o);else{var a=document.getElementById("query_string").value,r=document.getElementById("nb_prod").value;n=generateNewBlocSearch(a,o,path_relative_root,r)}$("#list_item").html(n);var l=document.getElementById("title_nb_articles").innerHTML;l=(l=l.replace(/[()]/g," ")).replace(" ","");var s=Math.ceil(parseInt(l)/document.getElementById("nb_prod").value);$.ajax({url:path_relative_root+"ajax_reload_pagination.php",data:{page:e,link:"paginationGoToPage()",nb_total_page:s},datatype:"html",type:"GET",success:function(e){$("#pagination_content").hasClass("pagination_content")?($(".pagination_content").html(e),$("#pagination_content_bis").length>0&&$("#pagination_content_bis").css("display","block")):$("#pagination_content").html(e)}}),window.scrollTo(0,0)}function SocialConnector(e){var t,i=this;if(this.ajaxSocialConnectURL=this.buildURL("ajax_social_connect.php"),void 0!==e&&void 0!==e.FBConnectButton&&$(e.FBConnectButton).length>0&&(this.addEventListener("FBLoginResponse",this._FBLoginCallback),$(document).on("click",e.FBConnectButton,function(t){$(e.FBConnectButton).attr("disabled",!0),i.emit("authRequest"),t.preventDefault(),FB.login(function(e){i.emit("FBLoginResponse",e)},{scope:"email"})})),void 0!==e&&void 0!==e.TTConnectButton&&$(e.TTConnectButton).length>0&&($(document).on("click",e.TTConnectButton,this._TTGetOAuthTkn.bind(this)),$(e.TTConnectButton).attr("disabled",!0)),void 0!==e&&void 0!==e.GOConnectButton&&$(e.GOConnectButton).length>0&&(this.addEventListener("GOLoginResponse",this._GOLoginCallback),gapi.load("auth2",function(){var e;auth2=gapi.auth2.init({client_id:google_connect_api_id,cookiepolicy:"single_host_origin"}),e=document.getElementById("go-connect"),auth2.attachClickHandler(e,{scope:"profile email"},function(e){i.emit("GOLoginResponse",e)},function(e){})}),$(document).on("click",e.GOConnectButton,function(t){$(e.GOConnectButton).attr("disabled",!0),i.emit("authRequest"),t.preventDefault()})),void 0!==e&&void 0!==e.GOSignUpButton&&$(e.GOSignUpButton).length>0){this.addEventListener("GOLoginResponseSignup",this._GOLoginCallback);var o=this;gapi.load("auth2",function(){var t;auth2=gapi.auth2.init({client_id:google_connect_api_id,cookiepolicy:"single_host_origin"}),t=document.getElementById("go-connect-up"),auth2.attachClickHandler(t,{scope:"profile email"},function(e){i.emit("GOLoginResponseSignup",e)},function(t){o.fetchMessage("social_signupin_error"),o.on("messageAvailable",function(o){t.message=o,i.emit("appError",t),$(e.GOSignUpButton).attr("disabled",!1)})})}),$(document).on("click",e.GOSignUpButton,function(e){i.emit("authRequest"),e.preventDefault()})}(void 0!==e&&void 0!==e.APConnectButton&&$(e.APConnectButton).length>0&&(this.addEventListener("APLoginResponse",this._APLoginCallback),$(document).on("click",e.APConnectButton,function(t){options={},options.scope="profile postal_code",options.scope_data={profile:{essential:!0},postal_code:{essential:!1}},amazon.Login.authorize(options,function(t){if(t.error)return $(e.APConnectButton).attr("disabled",!1),void alert("oauth error "+t.error);i.emit("APLoginResponse",t)}),$(e.APConnectButton).attr("disabled",!0),setTimeout(function(){$(e.APConnectButton).attr("disabled",!1)},4e3),i.emit("authRequest"),t.preventDefault()})),void 0!==e&&void 0!==e.PPConnectButton&&$(e.PPConnectButton).length>0)&&$(document).on("click",e.PPConnectButton,function(o){t=window.open(socialButtons.PPUriConnect+"&client_id="+socialButtons.PPConnectClientID+"&response_type=code&scope=openid profile email address&redirect_uri="+socialButtons.PPUriConnectRedirectUrl+"&fullPage=false","_blank","scrollbars=no, height=500, width=500, resizable=no, fullscreen=no"),function e(){if("1"==getCookie("PPConnect")){t.close();var i=new Date;i.setTime(i.getTime()+-864e5),expires="; expires="+i.toGMTString(),document.cookie="PPConnect="+expires+"; path=/",null!=window.dataLayer&&("undefined"!=typeof dataLayer_v2&&"1"===dataLayer_v2||"undefined"==typeof dataLayer_v2||"undefined"!=typeof dataLayer_v3&&"1"===dataLayer_v3)&&DataLayerTrigger.login("paypal"),document.location.reload(!0)}else setTimeout(e,100)}(),$(e.PPConnectButton).attr("disabled",!0),setTimeout(function(){$(e.PPConnectButton).attr("disabled",!1)},4e3),i.emit("authRequest"),o.preventDefault()})}function set_3ds2_datas(){$.ajax({url:path_relative_root+"ajax_3ds2_datas.php",type:"post",data:{colorDepth:screen.colorDepth,javaEnabled:navigator.javaEnabled(),language:navigator.language,screenHeight:screen.height,screenWidth:screen.width,timeZone:(new Date).getTimezoneOffset()}})}function ingenicoIframeSrc(e,t,i){$.ajax({url:path_relative_root+"ingenico/ingenico/geturi",type:"post",data:{brand:e,order_id:t,order_unique_id:i},success:function(e){e.uri&&($("#flex").attr("src",e.uri),$("#flex").hide("slow",function(){$("#flex").slideDown("slow")}))}})}function updateCartElements(){}function cartMultipleDeliveryChange(e){var t=$(e).val();"new"==t?($("#msg_unvalid_destination").hide(),$("#ajout_adresse").show(),$("#step_1_limit_message").hide(),$(e).removeClass("destination_error")):t>0&&$.inArray(t,arrayHasNoConveyor)>=0?($("#btn_validate_step_one").hide(),$("#msg_unvalid_destination").show(),$(e).addClass("destination_error")):($("#btn_validate_step_one").show(),$("#msg_unvalid_destination").hide(),$("#ajout_adresse").hide(),$("#step_1_limit_message").show(),$(e).removeClass("destination_error"));for(var i=$("#infos_livr_multiple_adresses").find("select[id^=address_step1_]"),o=new Array,n=new Array,a=!1,r=0;r<i.length;r++){var l=$(i[r]).val();n.push(l),"0"!=l&&"new"!=l&&-1===$.inArray(l,o)&&o.push(l),$.inArray(l,arrayHasNoConveyor)>=0&&(a=!0),"0"!=l?$(i[r]).parent().addClass("selected"):$(i[r]).parent().removeClass("selected")}if($("#destinations").val(n.join()),$("#btn_validate_step_one").prop("disabled",o.length<2),(o.length<2||a)&&($("#btn_validate_step_three").prop("disabled",!0),a&&($("#btn_validate_step_one").hide(),$("#msg_unvalid_destination").show())),"undefined"!=typeof addressOptions){let e=Translator.translate("livraison_multiple_adresse"),t=$(".destination_container select");for(var s=0;s<t.length;s++){for(var c=$(t[s]),p=(l=c.val(),'<option value="0">'+e.replace(/\%d/,s+1)+"</option>"),d=0;d<addressOptions.length;d++){var u=addressOptions[d];u.id!=l&&-1!==$.inArray(u.id,o)||(p+='<option value="'+u.id+'" '+(u.errorClass?'class="'+u.errorClass+'" ':""),p+=(u.id==l?"selected":"")+">",p+=u.label,p+="</option>")}p+='<option value="new">'+Translator.translate("btn_ajouter_adresse")+"</option>",c.html(p)}}}function cartMultipleDeliveryAdd(e){var t=$("#infos_livr_multiple_adresses").find("select[id^=address_step1_]").length;if(t>=20)return void $("#btn_add_destination").hide();let i=[];
1$(".destination_container select").each(function(){i.push($(this).val())});let o='<div class="destination_container">';o+='<select name="address[]" id="address_step1_'+t+'" onchange="cartMultipleDeliveryChange(this)" class="w-input-element">',o+='<option value="0">'+Translator.translate("livraison_multiple_adresse").replace(/\%d/,t+1)+"</option>";for(var n=0;n<addressOptions.length;n++){var a=addressOptions[n];-1===$.inArray(a.id,i)&&(o+='<option value="'+a.id+'" '+(a.errorClass?'class="'+a.errorClass+'" ':"")+">",o+=a.label,o+="</option>")}o+='<option value="new">'+Translator.translate("btn_ajouter_adresse")+"</option>",o+="</select>",o+="</div>",$("#infos_livr_multiple_adresses").append(o),$("#step1 .destination_container").length>=e?($("#step_1_max_locations").slideDown(),$("#btn_add_destination").slideUp()):($("#step_1_max_locations").slideUp(),$("#btn_add_destination").slideDown())}function cartMultipleDeliveryStep1(){var e=$("#infos_livr_multiple_adresses").find("select[id^=address_step1]"),t=new Array;$(".choix_delivery_multiple #step1 .loader_container").addClass("loading");for(var i=0;i<e.length;i++){var o=$(e[i]).val();"0"!=o&&"new"!=o&&-1===$.inArray(o,t)&&t.push(o)}if(t.length<2)return $("#btn_validate_step_one").prop("disabled",!0),!1;$.ajax({url:path_relative_root+"ajax_multi_deliveries_step_two.php",type:"POST",data:"ids="+JSON.stringify(t),success:function(e){e&&($("#step2_content").html(e),preload_step2(),$(".choix_delivery_multiple #step1 .loader_container").removeClass("loading"),$("#step1").hide(),$("#step2").show(),stepsUpdate())}})}function cartMultipleDeliveryStep2Change(){for(var e=!1,t=$(".choix_delivery_multiple #step3 #accept_cgv"),i=t.val(),o=$(".choix_delivery_multiple #step3 #err_cgv_compulsory"),n=$("#step2_content").find("select[id^=address_step2]"),a=new Array,r=0;r<n.length;r++){var l=$(n[r]).val();"0"!=l&&"new"!=l&&-1===$.inArray(l,a)&&a.push(l)}let s=a.length;return t.is(":visible")&&(1!=i?(o.show(),e=!0):o.hide()),s<2?($("#btn_validate_step_two").prop("disabled",!0),$("#msg_unvalid_step2").slideDown(),e=!0):($("#btn_validate_step_two").prop("disabled",!1),$("#msg_unvalid_step2").slideUp()),1!=i&&t.is(":visible")||s<2?($("#btn_validate_step_three").addClass("invalid_form").prop("disabled",!0),e=!0):$("#btn_validate_step_three").removeClass("invalid_form").prop("disabled",!1),e}function cartMultipleDeliveryStep2(){var e=$("#step2_content").find("select[id^=address_step2]"),t=new Array,i=new Array;$(".choix_delivery_multiple #step2 .loader_container").addClass("loading");for(var o=0;o<e.length;o++){var n=$(e[o]).val();-1===$.inArray(n,t)&&t.push(n);var a={};a.cart=$(e[o]).data("cart-id"),a.address=n,i[o]=a}if(t.length<2)return!1;$.ajax({url:path_relative_root+"ajax_multi_deliveries_step_three.php",type:"POST",data:"datas="+JSON.stringify(i),success:function(e){if(e){$("#step3_content").html(e);for(var t=$.find("input[id^=delivery-date-]"),i=0;i<t.length;i++){var o=$(t[i]).prop("id").replace("delivery-date-","");initCalendar(o,"","")}preload_step3(),$(".choix_delivery_multiple #step2 .loader_container").removeClass("loading"),$("#step2").hide(),$("#step3").show(400,function(){stepsUpdate()}),$("#accept_cgv").is(":checked")||$("#btn_validate_step_three").prop("disabled",!0).addClass("invalid_form")}}})}function cartMultipleDeliveryStep3(){var e=$("#step3_content").find("div[data-address-id]"),t={},i=new RegExp("^[0-9]{2}/[0-9]{2}/[0-9]{4}$"),o=!1;$("#btn_validate_step_three").hasClass("invalid_form")||$(".choix_delivery_multiple #step3 .loader_container").addClass("loading");for(var n=0;n<e.length;n++){var a=$(e[n]),r=a.data("address-id")+"-"+n,l=a.find("input[name^=cart]"),s=a.find("input[id^=delivery-date-]").length?a.find("input[id^=delivery-date-]").val().trim():null,c=a.find("textarea[id^=delivery-message-]").val().trim();let u=a.find("input[name=conveyor_id]").val();if(24!=u&&null===s&&"function"==typeof determinesFirstAvailableDeliveryDate){let e=(arrayDeliveryData[u]||{}).isPreco||"";(s=determinesFirstAvailableDeliveryDate(u,e))&&(s=s.toLocaleDateString("fr-FR"))}i.test(s)?a.find("div[id^=err_deliveryDate_]").hide():(a.find("div[id^=err_deliveryDate_]").show(),o=!0),t[r]={date:s,customMessage:c,products:{}}
1;for(var p=0;p<l.length;p++){var d=$(l[p]).val();void 0===t[r].products[d]&&(t[r].products[d]=0),t[r].products[d]++}}if(cartMultipleDeliveryStep2Change()&&(o=!0),o){setTimeout(function(){$(".choix_delivery_multiple #step3 .loader_container").removeClass("loading")},100);var u=new CustomEvent("errorDateDetected");return window.dispatchEvent(u),!1}$.ajax({url:path_relative_root+"ajax_multi_deliveries_process.php",type:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},data:JSON.stringify(t),success:function(e){var t=jQuery.parseJSON(e);t&&void 0!==t.success&&t.success&&(document.location.href=create_link("bank_index"))}})}function stepsUpdate(){var e=$("#step1, #step2, #step3").filter(":visible").closest("#infos_livr_multiple");e.removeClass("on_step_one on_step_two on_step_three"),$("#step1").is(":visible")?e.addClass("on_step_one"):$("#step2").is(":visible")?e.addClass("on_step_two"):$("#step3").is(":visible")&&e.addClass("on_step_three")}function multipleDeliveryAllStepsValidation(){var e=$(".choix_delivery_multiple #step3 #accept_cgv");e.on("change",function(){e.val(this.checked?"1":"0"),cartMultipleDeliveryStep2Change()})}function worldline_hosted_save_token_and_submit(e){$.ajax({url:path_relative_root+create_link("worldline_hosted_save_token"),type:"POST",data:"order_id="+$("#worldline_hosted_order_id").val()+"&token="+e,success:function(e){e&&void 0!==e.success&&e.success&&void 0!==e.alias&&e.alias&&($("#worldline_hosted_alias_id").val(e.alias),$("#worldline_hosted_has_subscription").val(e.alias),$("#worldline_hosted").submit())}})}ConnectionPage.prototype.checkRegisterForm=function(){var e=this;if(!allow_submit_create)return hideLoader(),!1;var t=!0;t&&document.getElementById("login_mdp")&&(t=verif_password("clientPwd","login_mdp",!1)),t=e.checkRadio("wrapper_optin"),document.getElementById("wrapper_optin_sms")&&(do_submit_sms=e.checkRadio("wrapper_optin_sms"),t&&!do_submit_sms&&(t=!1)),t&&(document.getElementById("clientPwdErr")||document.getElementById("erreur_clientPwd"))&&e.checkClientEmail(),setTimeout(function(){if(do_submit_ajax||(t=!1),!t)return hideLoader(),!1;if("undefined"==typeof isWeddingSpace)allow_submit_create=!1,clientForm.submit();else{var e=$("#clientForm").serialize();$.ajax({type:"post",url:path_relative_root+"ajax_inscription.php",data:e,success:function(e){try{1==$.parseJSON(e).success&&(refreshTopWedding(),getRecap())}catch(e){}return hideLoader(),!1}})}},1e3)},ConnectionPage.prototype.checkLoginForm=function(){var e=this,t="";document.getElementById("g-recaptcha-response")&&""!=document.getElementById("g-recaptcha-response").value&&(t="&g-recaptcha-response="+document.getElementById("g-recaptcha-response").value);var i="";document.getElementById("token_security_login")&&(i="&token_security="+document.getElementById("token_security_login").value),is_top="true","undefined"==typeof isWeddingSpace&&(is_top="false"),$.ajax({url:path_relative_root+"ajax_login_allowed.php",type:"POST",data:"mail="+$("#clientMailAuth").val()+"&mdp="+$("#clientPwdAuth").val()+"&is_top="+is_top+t+i,success:function(t){if(res=t.split("|"),1==res[0]){try{"undefined"!==res[1]&&$('<img src="'+res[1]+'" style="border :0px ;" />').appendTo("body")}catch(e){}return $("#garantie_form").appendTo("#auth"),"undefined"==typeof isWeddingSpace?document.getElementById("auth").submit():(refreshTopWedding(),getRecap()),!1}return"auth_delay"==res[1]&&(document.getElementById("script_captcha")||document.getElementById("recaptcha")||e.generateCaptcha()),2==res[0]?($("#AuthInactifErr").show(),$("#auth .message_mail_exist").removeClass("on").children(".text").hide(),hideLoader(),!1):($("#AuthErrErr").show(),$("#AuthInactifErr").hide(),$("#AuthAlreadyfErr").hide(),hideLoader(),!1)}})},ConnectionPage.prototype.checkLostPasswordForm=function(){var e=this;$.ajax({url:path_relative_root+"ajax_email_exist.php",type:"POST",data:"mail="+$("#mailLost").val()+"&err_code=1",datatype:"html",success:function(t){1==t?$.ajax({url:path_relative_root+"ajax_send_new_password_link.php",type:"POST",data:"mail="+$("#mailLost").val(),datatype:"html",success:function(t){$("#lostpwdErr").hide(),$("#lostpwdSuccesTitle").hide(),$("#lostpwdSucces1").hide(),$("#lostpwdSucces2").hide(),$("#lostpwdSucces3").show(),$("#lostpwdSucces4").show(),e.clearError("mailLost"),hideLoader()}}):0!=t?(e.showError("mailLost",t),hideLoader()):(e.showError("mailLost",$("#lostpwdErr").html()),hideLoader())},error:function(){hideLoader()}})},ConnectionPage.prototype.generateCaptcha=function(){var e=document.createElement("script");
1if(e.type="text/javascript",e.id="script_captcha",e.src="https://www.google.com/recaptcha/api.js?hl="+lang_iso,$("body").append(e),(i=$("#clientPwdAuth").closest("tr")).length>0)var t='<tr><td align="center"><div id="recaptcha" class="g-recaptcha" data-sitekey="'+captcha_google+'"></div><input type="hidden" id="token_security_login" value="'+token_security+'" /></td></tr>';else{var i=$("#clientPwdAuth").closest("div");t='<div class="form_item"><div id="recaptcha" class="g-recaptcha" data-sitekey="'+captcha_google+'"></div><input type="hidden" id="token_security_login" value="'+token_security+'" /></div>'}$(t).insertAfter(i)},WPApi.prototype.checkRadio=function(e){return!document.getElementById(e)||(0==$("#"+e).children("input[type=radio]:checked").length?(msg=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=please_select_optin"),this.showError(e,msg),!1):(this.clearError(e),!0))},BankPage.prototype=Object.create(WPApi.prototype),BankPage.prototype.resetAllEvents=function(){this.unbindAll("cvc_info"),this.unbindAll("alias_banque_info"),this.unbindAll("carte_secure")},BankPage.prototype.addListeners=function(){var e=this;$("#alias_info").on("mouseenter",function(){e.showTooltip("alias_info",!1,$("#infos_alias").html(),0)}),$("#alias_info").on("mouseleave",function(){e.timerTooltip=setTimeout(e.hideTooltip.bind(e),100)}),$("#cvc_info").on("mouseenter",function(){e.showTooltip("cvc_info",!1,$("#infos_carte").html(),0)}),$("#cvc_info").on("mouseleave",function(){e.timerTooltip=setTimeout(e.hideTooltip.bind(e),100)}),$("#alias_banque_info").on("mouseenter",function(){e.showTooltip("alias_banque_info",!1,$("#infos_alias").html())}),$("#alias_banque_info").on("mouseleave",function(){e.timerTooltip=setTimeout(e.hideTooltip.bind(e),100)}),$("#carte_secure").on("mouseenter",function(){e.showTooltip("carte_secure",!1,$("#infos_carte_secure").html())}),$("#carte_secure").on("mouseleave",function(){e.timerTooltip=setTimeout(e.hideTooltip.bind(e),100)})},MyAccountPage.prototype=Object.create(WPApi.prototype),MyAccountPage.prototype.resetAllEvents=function(){this.unbindAll("clientMail"),this.unbindAll("clientNom"),this.unbindAll("clientPrenom"),this.unbindAll("clientTel"),void 0!==$("#clientMobile").val()&&this.unbindAll("clientMobile"),this.unbindAll("clientPwd"),this.unbindAll("clientBlog")},MyAccountPage.prototype.addListeners=function(){var e=this,t=!0;$("#clientCiviliteMme,#clientCiviliteMlle,#clientCiviliteM").click(function(){e.checkRadio("clientCivilite")}),$("#clientMail").on("blur",function(){e.checkEmail("clientMail","old_clientMail")}),$("#clientMailv").on("blur",function(){e.compareEmail("clientMailv","clientMail")}),$("#clientPwd").on("blur",function(){if(""!=$("#clientPwd").val())e.checkPassword("clientPwd"),""!=$("#clientPwdv").val()&&1==window.password_validator_config.enable&&e.comparePassword("clientPwd","clientPwdv");else if(void 0!==window.password_validator_config&&void 0!==window.password_validator_config.enable&&1==window.password_validator_config.enable)try{$("#clientPwd").closest("form").find(".button.valid").removeAttr("disabled")}catch(e){console.warning(e)}}),$("select#clientDatenaisJ").on("change",function(){e.checkAlpha("clientDatenaisJ","login_naissance")}),$("select#clientDatenaisM").on("change",function(){e.checkAlpha("clientDatenaisM","login_naissance")}),$("select#clientDatenaisA").on("change",function(){e.checkAlpha("clientDatenaisA","login_naissance")}),$("input#clientDatenaisJ, input#clientDatenaisM, input#clientDatenaisA").on("blur",function(){e.checkBirthDate("clientDatenaisJ","clientDatenaisM","clientDatenaisA","login_naissance")}),"undefined"!=typeof auto_completion_tel&&auto_completion_tel?$("#clientTel, #clientMobile").on("blur",function(){t=e.checkPhoneNumberAuto("clientTel","login_telephone",!1,!1),!!document.getElementById("clientMobile")&&e.checkPhoneNumberAuto("clientMobile","login_mobile",!0,!1)?t=e.checkPhoneNumberAuto("clientTel","login_telephone",!1,!0):t&&document.getElementById("clientMobile")&&e.checkPhoneNumberAuto("clientMobile","login_mobile",!0,!0)}):(phone_optional=!1,"undefined"==typeof phone_mandatory&&(phone_optional=!0),$("#clientTel").on("blur",function(){e.checkPhoneNumber("clientTel","login_telephone",!1,phone_optional)}),document.getElementById("clientMobile")&&$("#clientMobile").on("blur",function(){e.checkPhoneNumber("clientMobile","login_mobile",!0,!0)})),$("#clientPwdv").on("blur",function(){e.comparePassword("clientPwdv","clientPwd")}
1),$("#codeParrainage").on("blur",function(){e.checkParrainage()}),$("#clientNom").on("blur",function(){e.checkLastName("clientNom")}),$("#clientPrenom").on("blur",function(){e.checkFirstName("clientPrenom")}),$("#clientBlog").on("blur",function(){e.checkUrl("clientBlog",!0)}),$("#autocomplete_addr").not("[data-form]").on("blur",function(){e.checkGoogleAddr($(this).prop("id"),"pays")}),$("#adresseLiv").on("blur",function(){e.checkAddress($(this).prop("id"))}),$("#codeP").on("blur",function(){e.checkPostalCodeInter("codeP")}),$("#ville").on("blur",function(){e.checkAlpha("ville","login_ville",!0)}),$("#clientLieunais").on("blur",function(){e.checkAlpha("clientLieunais","login_lieu_naissance",!0)}),$("select#epouxDatenaisJ").on("change",function(){e.checkAlpha("epouxDatenaisJ","login_naissance")}),$("select#epouxDatenaisM").on("change",function(){e.checkAlpha("epouxDatenaisM","login_naissance")}),$("select#epouxDatenaisA").on("change",function(){e.checkAlpha("epouxDatenaisA","login_naissance")}),$("input#epouxDatenaisJ, input#epouxDatenaisM, input#epouxDatenaisA").on("blur",function(){e.checkBirthDate("epouxDatenaisJ","epouxDatenaisM","epouxDatenaisA","login_naissance")}),$("#epouxNom").on("blur",function(){e.checkLastName("epouxNom")}),$("#epouxPrenom").on("blur",function(){e.checkFirstName("epouxPrenom")}),$("#autocomplete_addr_epoux").not("[data-form]").on("blur",function(){e.checkGoogleAddr($(this).prop("id"),"epouxPays")}),$("#adresseLivEpoux").on("blur",function(){e.checkAddress($(this).prop("id"))}),$("#epouxcodeP").on("blur",function(){e.checkPostalCodeInter("epouxcodeP")}),$("#epouxVille").on("blur",function(){e.checkAlpha("epouxVille","login_ville",!0)}),$("#epouxLieunais").on("blur",function(){e.checkAlpha("epouxLieunais","login_lieu_naissance",!0)}),$("#epouxTel").on("blur",function(){e.checkPhoneNumber("epouxTel","login_telephone",!1,!1)}),$("#btn_infos").on("click",function(){if("undefined"!=typeof auto_completion_tel&&auto_completion_tel){var t=e.checkPhoneNumberAuto("clientTel","login_telephone",!1,!1),i=!1;document.getElementById("clientMobile")&&(i=e.checkPhoneNumberAuto("clientMobile","login_mobile",!0,!1)),t&&document.getElementById("clientMobile")&&(i=e.checkPhoneNumberAuto("clientMobile","login_mobile",!0,!0)),i&&(t=e.checkPhoneNumberAuto("clientTel","login_telephone",!1,!0))}if(""!=$("#clientPwd").val()&&$("#clientPwd").val()==$("#clientPwdv").val()){var o=$("#clientPwd").val(),n=$("#clientPwdv").val();$("#clientPwd").val(o),$("#clientPwdv").val(n)}e.submitForm("clientForm","btn_infos")}),$("#btn_infos").submitEnter()},MyAccountPage.prototype.checkEmail=function(e,t){var i=this;if(this.hideTooltip(),$("#"+e).val()==$("#"+t).val())return!0;$.ajax({url:path_relative_root+"ajax_email_exist.php",type:"POST",data:"mail="+$("#"+e).val()+"&err_code=1",datatype:"html",success:function(t){if(1!=t)return 0!=t?(i.showError(e,t),!1):(i.clearError(e),!0);$.ajax({url:path_relative_root+"ajax_sprintf.php?arg1=js_already_have_account"}).done(function(t){i.showError(e,t),i.showTooltip("iconErr"+e,!1,i.getMessageWithTitle(e,t))})}})},NewsletterPage.prototype=Object.create(WPApi.prototype),NewsletterPage.prototype.resetAllEvents=function(){this.unbindAll("newsletterMail"),this.unbindAll("newsletterNom"),this.unbindAll("newsletterPrenom"),this.unbindAll("newsletterMailv"),this.unbindAll("newsletterCompany"),this.unbindAll("newsletterCp"),this.unbindAll("newsletterMobile")},NewsletterPage.prototype.addListeners=function(){var e=this;$("#newsletterMail").blur(function(){e.checkEmail("newsletterMail")}),$("#newsletterMailv").blur(function(){e.compareEmail("newsletterMailv","newsletterMail")}),$("#newsletterNom").blur(function(){e.checkLastName("newsletterNom")}),$("#newsletterPrenom").blur(function(){e.checkFirstName("newsletterPrenom")}),$("#newsletterCompany").blur(function(){e.checkCompany("newsletterCompany","login_company")}),$("#newsletterCp").blur(function(){e.checkNumber("newsletterCp","login_cp")}),$("#newsletterMobile").blur(function(){e.checkPhoneNumber("newsletterMobile","login_telephone",!0,!1)}),$("#optin_y,#optin_n").click(function(){e.checkRadio("wrapper_optin")}),$("#sms_optin_y,#sms_optin_n").click(function(){e.checkRadio("wrapper_optin_sms")}),$("#optin_partners_y,#optin_partners_n").click(function(){e.checkRadio("wrapper_optin_partners")}),$("#optin_geoloc_y,#optin_geoloc_n").click(function(){e.checkRadio("wrapper_optin_geoloc")}),$("#btn_news").click(function(){e.submitForm("newsletterForm","btn_news")}),$("#btn_news").submitEnter()},UnsubscribeNewsletterPage.prototype=Object.create(WPApi.prototype),UnsubscribeNewsletterPage.prototype.resetAllEvents=function(){this.unbindAll("newsletterMail"),this.unbindAll("btn_news_suppr")},UnsubscribeNewsletterPage.prototype.addListeners=function(){var e=this;$("#newsletterMail").blur(function(){e.checkEmail("newsletterMail")}),$("#btn_news_suppr").click(function(){return e.submitForm("newsletterForm","btn_news_suppr"),!1}),$("#btn_news_suppr").submitEnter()},subscriptionPage.prototype=Object.create(WPApi.prototype),subscriptionPage.prototype.resetAllEvents=function(){this.unbindAll("newsletterMail"),this.unbindAll("btn_subscription")},subscriptionPage.prototype.addListeners=function(){var e=this;$("#newsletterMail").blur(function(){e.checkEmail("newsletterMail")}),e.setupFidelityLightbox(),$("#btn_subscription").submitEnter()},subscriptionPage.prototype.setupFidelityLightbox=function(){var e=this,t=$("#subscribe_fidelity").is(":checked"),i="undefined"!=typeof lightboxOptoutFidEnabled&&lightboxOptoutFidEnabled;function o(){$("#subscribe_fidelity").prop("checked",!0),$("#confirm_unsubscribe_fidelity").prop("checked",!1),window.dispatchEvent(new CustomEvent("close-retention-lightbox"))}$("#close-lightbox-fidelity, #close-lightbox-fidelity-btn").click(o),$("#continue-unsubscribe-fidelity").click(function(){$("#confirm_unsubscribe_fidelity").is(":checked")?($("#fidelity-retention-lightbox").removeClass("actif").hide(),$("#subscribe_fidelity").prop("checked",!1),e.submitForm("subscriptionForm","btn_subscription")):o()}),$("#btn_subscription").click(function(){return t&&i&&!$("#subscribe_fidelity").is(":checked")?0===$("#fidelity-retention-lightbox").length?(e.submitForm("subscriptionForm","btn_subscription"),!1):($("#confirm_unsubscribe_fidelity").prop("checked",!0),window.dispatchEvent(new CustomEvent("open-retention-lightbox")),!1):(e.submitForm("subscriptionForm","btn_subscription"),!1)})},CartPage.prototype=Object.create(WPApi.prototype),CartPage.prototype.addListeners=function(){var e=this;$("#pack_illimite_accept_cgv_pack").click(function(){return!!$(".bloc_pack_illimitee input[name=accept_cgv_pack]").is(":checked")||($("#pack_illimite_error_picto").show(),e.settings.tooltipArrowPosition="center",errorMessage=$("#pack_illimite_accept_cgv_packErr").html(),e.showTooltip("accept_cgv_pack",!1,errorMessage),!1)}),$("#accept_cgv_pack").click(function(){e.hideTooltip(),$("#pack_illimite_error_picto").hide()})},DeliveryPage.prototype=Object.create(WPApi.prototype),DeliveryPage.prototype.resetAllEvents=function(){var e=new Array("");$("#billadresseTitre").length>0&&e.push("bill");for(var t=e.length,i=0;i<t;i++)this.unbindAll(e[i]+"adresseTitre"),this.unbindAll(e[i]+"adresseNom"),this.unbindAll(e[i]+"adressePrenom"),this.unbindAll(e[i]+"societe"),this.unbindAll(e[i]+"telephone"),this.unbindAll(e[i]+"mobile"),this.unbindAll(e[i]+"adresseLiv"),this.unbindAll(e[i]+"codeP"),this.unbindAll(e[i]+"ville"),this.unbindAll(e[i]+"etage"),this.unbindAll(e[i]+"ascenseur"),this.unbindAll(e[i]+"digicode");this.unbindAll("btn_addr_add"),this.unbindAll("btn_addr_up")},DeliveryPage.prototype.addListeners=function(){for(var e=this,t=new Array("","bill"),i=t.length,o=0;o<i;o++)$("#"+t[o]+"adresseTitre").blur(function(){e.checkAlpha($(this).prop("id"),"title_address")}),$("#"+t[o]+"adresseCiviliteM, #"+t[o]+"adresseCiviliteMlle, #"+t[o]+"adresseCiviliteMme, #"+t[o]+"inputadresseCiviliteM, #"+t[o]+"inputadresseCiviliteMlle, #"+t[o]+"inputadresseCiviliteMme").click(function(){e.clearError($(this).prop("name"))}),$("select#clientDatenaisJ").change(function(){e.checkAlpha("clientDatenaisJ","login_naissance")}),$("select#clientDatenaisM").change(function(){e.checkAlpha("clientDatenaisM","login_naissance")}),$("select#clientDatenaisA").change(function(){e.checkAlpha("clientDatenaisA","login_naissance")}),$("#"+t[o]+"adresseNom").on("blur",function(){e.checkLastName($(this).prop("id"))}),$("#"+t[o]+"department").on("change",function(){""!=$(this).val()?e.clearError($(this).prop("id")):e.showError($(this).prop("id"),""),null==$(this).val()&&($(this).val($(this).find("option:first").val()),e.showError($(this).prop("id"),""))}),$("#"+t[o]+"adressePrenom").blur(function(){e.checkFirstName($(this).prop("id"))}),$("#"+t[o]+"societe").blur(function(){""!=$(this).val()?e.checkCompany($(this).prop("id"),"js_ce_societe"):e.clearError($(this).prop("id"))}),$("input#clientDatenaisJ, input#clientDatenaisM, input#clientDatenaisA").blur(function(){e.checkBirthDate("clientDatenaisJ","clientDatenaisM","clientDatenaisA","login_naissance")}),"undefined"!=typeof auto_completion_tel&&auto_completion_tel?($("#"+t[o]+"telephone").blur(function(){e.checkPhoneNumberAuto($(this).prop("id"),"login_telephone",!1)}),null!==document.getElementById(t[o]+"mobile")&&$("#"+t[o]+"mobile").blur(function(){""!==this.value||"undefined"!=typeof mobile_mandatory&&mobile_mandatory?e.checkPhoneNumberAuto($(this).prop("id"),"login_mobile",!0):e.clearError($(this).prop("id"))})):($("#"+t[o]+"telephone").blur(function(){e.checkPhoneNumber($(this).prop("id"),"login_telephone",!1,!1)}),$("#"+t[o]+"mobile").blur(function(){""!==this.value?e.checkPhoneNumber($(this).prop("id"),"login_mobile",!0):e.clearError($(this).prop("id"))})),$("#"+t[o]+"adresseLiv").blur(function(){e.checkAddress($(this).prop("id"))}),$("#"+t[o]+"codeP").blur(function(){var i=void 0===t[o]?"pays":t[o]+"pays";e.checkPostalCodeInter($(this).prop("id"),i)}),$("#"+t[o]+"ville").blur(function(){e.checkAlpha($(this).prop("id"),"login_ville",!0)}),$("select#"+t[o]+"pays").change(function(){""!=$(this).val()&&null!=$(this).val()&&$(this).data("google-val",$(this).val()),e.checkSelectPays($(this).prop("id"));var i=void 0===t[o]?"codeP":t[o]+"codeP";e.checkPostalCodeInter(i,$(this).prop("id"))}),void 0!==$("#"+t[o]+"autocomplete_addr").val()&&$("#"+t[o]+"autocomplete_addr").not("[data-form]").on("place_changed blur",function(){e.checkGoogleAddr($(this).prop("id"),"pays")}),$("#"+t[o]+"etage").blur(function(){""!=$(this).val()?e.checkAlpha($(this).prop("id"),"login_etage|3"):e.clearError($(this).prop("id"))}),$("#"+t[o]+"ascenseur").blur(function(){""!=$(this).val()?e.checkAlpha($(this).prop("id"),"login_ascenseur|5"):e.clearError($(this).prop("id"))}),$("#"+t[o]+"digicode").blur(function(){""!=$(this).val()?e.checkAlpha($(this).prop("id"),"login_digicode|5"):e.clearError($(this).prop("id"))});$("#btn_addr_up, #btn_addr_add").click(function(){if("undefined"!=typeof auto_completion_tel&&auto_completion_tel)for(var o=0;o<i;o++){if(document.getElementById(t[o]+"telephone"))e.checkPhoneNumberAuto(t[o]+"telephone","login_telephone",!1)||(document.getElementById(t[o]+"telephoneHidden")&&""!=document.getElementById(t[o]+"telephoneHidden").value&&(document.getElementById(t[o]+"telephoneHidden").value=""),document.getElementById(t[o]+"mobileHidden")&&""!=document.getElementById(t[o]+"mobileHidden").value&&(document.getElementById(t[o]+"mobileHidden").value=""));if(document.getElementById(t[o]+"mobile")&&(""!==document.getElementById(t[o]+"mobile").value||"undefined"!=typeof mobile_mandatory&&mobile_mandatory))e.checkPhoneNumberAuto(t[o]+"mobile","login_mobile",!0)||(document.getElementById(t[o]+"telephoneHidden")&&(document.getElementById(t[o]+"telephoneHidden").value=""),document.getElementById(t[o]+"mobileHidden").value="undefined")}$("#typeAccount").prop("checked")?$("#clientPwdw").blur(function(){e.checkPassword($(this).prop("id"))}):void 0!==window.password_validator_config&&void 0!==window.password_validator_config.enable&&1==window.password_validator_config.enable&&$("#typeAccount").is(":checked")&&void 0!==$("#btn_addr_add").attr("disabled")&&$("#btn_addr_add").removeAttr("disabled")}),$("#btn_addr_add").click(function(){if($("#id_transp").attr("value",$(".choix_delivery.activate").data("id-trans
1porteur")),void 0!==window.password_validator_config&&void 0!==window.password_validator_config.enable&&1==window.password_validator_config.enable&&$("#typeAccount").is(":checked")&&$("#clientPwdw").val()){if(!isPasswordValid($("#clientPwdw").val()))return $("#clientPwdw").hasClass("inputErr")||$("#clientPwdw").addClass("inputErr"),void 0!==window.password_validator_config&&void 0!==window.password_validator_config.enable&&window.password_validator_config.disable_btn_wrong_password&&$("#btn_addr_add").attr("disabled","disabled"),!1}return e.submitForm("adresseForm","btn_addr_add"),!1}),$("#btn_addr_add").submitEnter(),$("#btn_addr_up").click(function(){return e.submitForm("adresseForm","btn_addr_up"),!1}),$("#btn_addr_up").submitEnter()},CustomGlassPage.prototype=Object.create(WPApi.prototype),CustomGlassPage.prototype.resetAllEvents=function(){this.unbindAll("customGlassNom"),this.unbindAll("customGlassPrenom"),this.unbindAll("customGlassTel"),this.unbindAll("customGlassTelRegion"),this.unbindAll("customGlassSociete"),this.unbindAll("customGlassSubmit")},CustomGlassPage.prototype.addListeners=function(){var e=this;$("form#customGlassForm").on({blur:function(){e.checkLastName("customGlassNom")}},"#customGlassNom").on({blur:function(){e.checkFirstName("customGlassPrenom")}},"#customGlassPrenom").on({blur:function(){e.checkSociete("customGlassSociete")}},"#customGlassSociete").on({blur:function(){e.checkNumber("customGlassTelRegion","login_indicatif")}},"#customGlassTelRegion").on({blur:function(){e.checkNumber("customGlassTel","login_telephone_custom")}},"#customGlassTel"),$("#customGlassSubmit").click(function(){return e.submitForm("customGlassForm","customGlassSubmit"),!1}),$("#customGlassSubmit").submitEnter()},CustomGlassPage.prototype.checkSociete=function(e){return this.checkCompany(e,"login_societe")},ContactProPage.prototype=Object.create(WPApi.prototype),ContactProPage.prototype.resetAllEvents=function(){this.unbindAll("contactProPoste"),this.unbindAll("contactProObjet"),this.unbindAll("contactProNom"),this.unbindAll("contactProPrenom"),this.unbindAll("contactProMail"),this.unbindAll("contactProTel"),this.unbindAll("contactProCompagnie"),this.unbindAll("contactProMessage"),this.unbindAll("contactProSubmit")},ContactProPage.prototype.addListeners=function(){var e=this;$("form#contactProForm").on({blur:function(){e.checkPoste("contactProPoste")}},"#contactProPoste").on({blur:function(){e.checkObjet("contactProObjet")}},"#contactProObjet").on({blur:function(){e.checkLastName("contactProNom")}},"#contactProNom").on({blur:function(){e.checkFirstName("contactProPrenom")}},"#contactProPrenom").on({blur:function(){e.checkEmail("contactProMail")}},"#contactProMail").on({blur:function(){e.checkNumber("contactProTel","login_telephone",!1,!0)}},"#contactProTel").on({blur:function(){e.checkCompagnie("contactProCompagnie")}},"#contactProCompagnie").on({blur:function(){e.checkTextarea("contactProMessage")}},"#contactProMessage"),$("#contactProSubmit").click(function(){return e.submitForm("contactProForm","contactProSubmit"),!1}),$("#contactProSubmit").submitEnter()},ContactProPage.prototype.checkCompagnie=function(e){return this.checkCompany(e,"login_compagnie")},ContactProPage.prototype.checkObjet=function(e){return this.checkAlphaSpeChar(e,"login_objet")},ContactProPage.prototype.checkPoste=function(e){var t=!0,i=$("#"+e).val();return(null==i||i.length<=0)&&(t=!1,msg=ajax_file(path_relative_root+"ajax_sprintf.php?arg1=js_thanks_precise&arg2=login_poste")),t?(this.clearError(e),!0):(this.showError(e,msg),!1)},CallBackPage.prototype=Object.create(WPApi.prototype),CallBackPage.prototype.resetAllEvents=function(){this.unbindAll("callBackIndicatif"),this.unbindAll("callBackTel"),this.unbindAll("callBackSociete"),this.unbindAll("callBackSubmit")},CallBackPage.prototype.addListeners=function(){var e=this;$("form#callBackForm").on({blur:function(){e.checkNumber("callBackIndicatif","login_indicatif",!1,!1)}},"#callBackIndicatif").on({blur:function(){e.checkNumber("callBackTel","login_telephone_custom",!1,!1)}},"#callBackTel").on({blur:function(){e.checkSociete("callBackSociete")}},"#callBackSociete"),$("#customGlassSubmit").click(function(){return e.submitForm("callBackForm","callBackSubmit"),!1}),$("#callBackSubmit").submitEnter()},CallBackPage.prototype.checkSociete=function(e){return this.checkCompany(e,"login_societe")},ContactPage.prototype=Object.create(WPApi.prototype),ContactPage.prototype.resetAllEvents=function(){this.unbindAll("contactNom"),this.unbindAll("contactPrenom"),this.unbindAll("contactMail"),this.unbindAll("contactRefProduit"),this.unbindAll("contactMessage"),this.unbindAll("btn_contact")},ContactPage.prototype.addListeners=function(){var e=this;$("form#service").on({blur:function(){e.checkLastName("contactNom")}},"#contactNom").on({blur:function(){e.checkFirstName("contactPrenom")}},"#contactPrenom").on({blur:function(){e.checkEmail("contactMail")}},"#contactMail").on({blur:function(){e.checkProductExist("contactRefProduit")}},"#contactRefProduit").on({blur:function(){e.checkTextarea("contactMessage")}},"#contactMessage"),"undefined"!=typeof auto_completion_tel&&auto_completion_tel&&$("#contactTel").length>0&&$("#contactTel").on("blur",function(){(e.checkPhoneNumberAuto("contactTel","login_telephone",!1)||(document.getElementById("telephoneHidden")&&""!=document.getElementById("telephoneHidden").value&&(document.getElementById("telephoneHidden").value=""),document.getElementById("mobileHidden")&&""!=document.getElementById("mobileHidden").value&&(document.getElementById("mobileHidden").value="")),document.getElementById("mobile")&&(""!==document.getElementById("mobile").value||"undefined"!=typeof mobile_mandatory&&mobile_mandatory))&&(e.checkPhoneNumberAuto("mobile","login_mobile",!0)||(document.getElementById("telephoneHidden").value="",document.getElementById("mobileHidden").value="undefined"))}),$("#btn_contact").click(function(){return e.submitForm("service","btn_contact"),!1}),$("#btn_contact").submitEnter()},ContactPage.prototype.checkProductExist=function(e){var t=$("#"+e).val(),i=ajax_file("ajax_verif_contact.php?refProduit="+t),o=(i=$.parseJSON(i))[0],n=i[1],a=!0;return"false"==o&&(a=!1),a?(this.clearError(e),!0):(this.showError(e,n),!1)},ContactPageFaq.prototype=Object.create(WPApi.prototype),ContactPageFaq.prototype.resetAllEvents=function(){this.unbindAll("contactNom"),this.unbindAll("contactPrenom"),this.unbindAll("contactMail"),this.unbindAll("contactMessage"),this.unbindAll("btn_contact")},ContactPageFaq.prototype.addListeners=function(){var e=this;$("form#contact_form").on({blur:function(){e.checkLastName("contactNom")}},"#contactNom").on({blur:function(){e.checkFirstName("contactPrenom")}},"#contactPrenom").on({blur:function(){e.checkEmail("contactMail")}},"#contactMail").on({blur:function(){e.checkTextarea("contactMessage")}},"#contactMessage").on({blur:function(){1==$("#checkContactNumCommande").val()?e.checkAlpha("contactNumCommande"):e.clearError("contactNumCommande")}},"#contactNumCommande"),$("#btn_contact").click(function(){return e.submitForm("contact_form","btn_contact"),!1}),$("#btn_contact").submitEnter()},passwordThanks.prototype=Object.create(WPApi.prototype),passwordThanks.prototype.resetAllEvents=function(){this.unbindAll("btn_pwd")},deliveryChoice.prototype=Object.create(WPApi.prototype),deliveryChoice.prototype.resetAllEvents=function(){this.unbindAll("autocomplete_addr_map")},deliveryChoice.prototype.addListeners=function(){var e=this;void 0!==$("#autocomplete_addr_map").val()&&$("#autocomplete_addr_map").on("place_changed",function(){e.checkGoogleAddr($(this).prop("id"),"zip")})},function(){"use strict";window.create_link=function(){if("object"==typeof arguments[0])var e=arguments[0];else e=function(e){for(var t={},i=0,o=e.length;i<o;i+=1)t["arg"+i]=e[i];return t}(arguments);var t=arguments[0];return $.ajax({url:path_relative_root+"ajax_createlink.php",type:"get",data:e,async:!1,success:function(e){t=e}}),t}}(),formParrainage.prototype=Object.create(WPApi.prototype),formParrainage.prototype.checkEmail=function(e){var t=this;this.hideTooltip();var i="email="+$("#"+e).val(),o=ajax_file_post(path_relative_root+"ajax_check_parrainage.php",i);if(""!=o&&""!=$("#"+e).val())return t.showError(e,o),$("#parrainage_nok").length&&$("#parrainage_nok").html(o),!1;$.ajax({url:path_relative_root+"ajax_check_email.php",type:"POST",data:"email="+$("#"+e).val()+"&err_code=1",success:function(i){return"ok"!=i?(t.showError(e,i),t.showTooltip("iconErr"+e,!1,t.getMessageWithTitle(e,i)),!1):(t.clearError(e),!0)}})},formParrainage.prototype.resetAllEvents=function(){var e=this;$(".bloc_parrain").each(function(t){t+=1,e.unbindAll("nomfilleul"+t),e.unbindAll("prenomf
1illeul"+t),e.unbindAll("mailfilleul"+t)}),e.unbindAll("envoyer_invitations")},formParrainage.prototype.addListeners=function(){var e=this;$("form#parrainage_form");$("form#parrainage_form").find('input[type="text"].inputForm').on("blur",function(t){for(var i=$(t.currentTarget).attr("id"),o=[/^nomfilleul\d/gi,/^prenomfilleul\d/gi,/^mailfilleul\d/gi],n=[e.checkLastName.bind(e),e.checkFirstName.bind(e),e.checkEmail.bind(e)],a=0;a<o.length;a++)o[a].test(i)&&n[a](i)}),$("#envoyer_invitations").click(function(){return e.submitForm("parrainage_form","envoyer_invitations"),!1}),$("#envoyer_invitations").submitEnter()},formVdi.prototype=Object.create(WPApi.prototype),formVdi.prototype.checkEmail=function(e){var t=this;this.hideTooltip(),$.ajax({url:path_relative_root+"ajax_check_vdi.php?email="+$("#"+e).val()}).done(function(i){if(""!=i&&""!=$("#"+e).val())return t.showError(e,i),!1;$.ajax({url:path_relative_root+"ajax_check_email.php?email="+$("#"+e).val()+"&err_code=1"}).done(function(i){return"ok"!=i?(t.showError(e,i),t.showTooltip("iconErr"+e,!1,t.getMessageWithTitle(e,i)),!1):(t.clearError(e),!0)})})},formVdi.prototype.resetAllEvents=function(){var e=this;$(".bloc_parrain").each(function(t){t+=1,e.unbindAll("mailfilleul"+t)}),e.unbindAll("envoyer_invitations")},formVdi.prototype.addListeners=function(){var e=this;$("form#vdi_form");$(".bloc_parrain").each(function(t){t+=1,$("#mailfilleul"+t).blur(function(){e.checkEmail("mailfilleul"+t)})}),$("#envoyer_invitations").click(function(){return e.submitForm("vdi_form","envoyer_invitations"),!1}),$("#envoyer_invitations").submitEnter()},DemandeCataloguePage.prototype=Object.create(WPApi.prototype),DemandeCataloguePage.prototype.resetAllEvents=function(){this.unbindAll("catalogueNom"),this.unbindAll("cataloguePrenom"),this.unbindAll("catalogueAdresse"),this.unbindAll("catalogueCp"),this.unbindAll("catalogueVille"),this.unbindAll("catalogueTelephone"),this.unbindAll("catalogueMobile"),this.unbindAll("catalogueMail")},DemandeCataloguePage.prototype.addListeners=function(){var e=this;$("#catalogueMail").blur(function(){e.checkEmail("catalogueMail")}),$("#catalogueNom").blur(function(){e.checkLastName("catalogueNom")}),$("#cataloguePrenom").blur(function(){e.checkFirstName("cataloguePrenom")}),$("#catalogueAdresse").blur(function(){e.checkAddress("catalogueAdresse","login_company")}),$("#catalogueCp").blur(function(){e.checkNumber("catalogueCp","login_cp")}),$("#catalogueVille").blur(function(){e.checkAlpha("catalogueVille","login_company")}),$("#optin_y,#optin_n").click(function(){e.checkRadio("wrapper_optin")}),$("#sms_optin_y,#sms_optin_n").click(function(){e.checkRadio("wrapper_optin_sms")}),$("#optin_partners_y,#optin_partners_n").click(function(){e.checkRadio("wrapper_optin_partners")}),$("#optin_geoloc_y,#optin_geoloc_n").click(function(){e.checkRadio("wrapper_optin_geoloc")}),$("#catalogueTelephone").blur(function(){""!=$("#catalogueMobile").val()||""!=$("#catalogueTelephone").val()?($(".cat_tel").removeClass("inputErr"),$("#iconErrcatalogueTelephone, #iconErrcatalogueMobile").css("opacity",0)):$(".cat_tel").addClass("inputErr"),""!=$("#catalogueTelephone").val()&&e.checkPhoneNumber("catalogueTelephone","login_telephone",!1,!1)}),$("#catalogueMobile").blur(function(){""!=$("#catalogueMobile").val()||""!=$("#catalogueTelephone").val()?($(".cat_tel").removeClass("inputErr"),$("#iconErrcatalogueTelephone, #iconErrcatalogueMobile").css("opacity",0)):$(".cat_tel").addClass("inputErr"),""!=$("#catalogueMobile").val()&&e.checkPhoneNumber("catalogueMobile","login_telephone",!0,!1)}),$("#btn_demande_catalogue").click(function(){$("#inputcatalogueSexeMr").hasClass("selected")||$("#inputcatalogueSexeMme").hasClass("selected")?$(".txt_civilite").removeClass("inputErr"):$(".txt_civilite").addClass("inputErr"),""!=$("#catalogueMobile").val()||""!=$("#catalogueTelephone").val()?($(".cat_tel").removeClass("inputErr"),$("#iconErrcatalogueTelephone, #iconErrcatalogueMobile").css("opacity",0)):$(".cat_tel").addClass("inputErr"),e.submitForm("catalogueForm","btn_demande_catalogue")}),$("#btn_demande_catalogue").submitEnter()},ReclamationPage.prototype=Object.create(WPApi.prototype),ReclamationPage.prototype.resetAllEvents=function(){this.unbindAll("contactNom"),this.unbindAll("contactPrenom"),this.unbindAll("contactMail"),this.unbindAll("productUsed"),this.unbindAll("batchNum"),this.unbindAll("dateBuyJ"),this.unbindAll("dateBuyM"),this.unbindAll("dateBuyA"),this.unbindAll("productLocationBuy"),this.unbindAll("dateFirstUseJ"),this.unbindAll("dateFirstUseM"),this.unbindAll("dateFirstUseA"),this.unbindAll("dateReactionJ"),this.unbindAll("dateReactionM"),this.unbindAll("dateReactionA"),this.unbindAll("continueUseProduct"),this.unbindAll("reactionType"),this.unbindAll("contactDoctor"),this.unbindAll("contactPictures")},ReclamationPage.prototype.addListeners=function(){var e=this;$("select#dateBuyJ").change(function(){e.checkAlpha("dateBuyJ","login_naissance")}),$("select#dateBuyM").change(function(){e.checkAlpha("dateBuyM","login_naissance")}),$("select#dateBuyA").change(function(){e.checkAlpha("dateBuyA","login_naissance")}),$("select#dateFirstUseJ").change(function(){e.checkAlpha("dateFirstUseJ","login_naissance")}),$("select#dateFirstUseM").change(function(){e.checkAlpha("dateFirstUseM","login_naissance")}),$("select#dateFirstUseA").change(function(){e.checkAlpha("dateFirstUseA","login_naissance")}),$("select#dateReactionJ").change(function(){e.checkAlpha("dateReactionJ","login_naissance")}),$("select#dateReactionM").change(function(){e.checkAlpha("dateReactionM","login_naissance")}),$("select#dateReactionA").change(function(){e.checkAlpha("dateReactionA","login_naissance")}),$("#contactNom").blur(function(){e.checkLastName($(this).prop("id"))}),$("#contactPrenom").blur(function(){e.checkFirstName($(this).prop("id"))}),$("#contactMail").blur(function(){e.checkEmail($(this).prop("id"))}),$("#productUsed").blur(function(){e.checkTextarea($(this).prop("id"))}),$("#batchNum").blur(function(){e.checkTextarea($(this).prop("id"))}),$("#productLocationBuy").blur(function(){e.checkTextarea($(this).prop("id"))}),$("#reactionType").blur(function(){e.checkTextarea($(this).prop("id"))}),$("#btn_contact").click(function(){return e.submitForm("contact_reclamation_form","btn_contact","loader_1"),!1}),$("#btn_contact").submitEnter()},SocialConnector.prototype=Object.create(WPApi.prototype),SocialConnector.prototype._FBLoginCallback=function(e){var t=this;"connected"==e.status&&e.authResponse&&e.authResponse.accessToken?$.ajax({url:this.ajaxSocialConnectURL,type:"post",data:{type:"facebook",accessToken:e.authResponse.accessToken,facebookUserId:e.authResponse.userID},headers:{accept:"application/json"},success:function(e){(e=JSON.parse(e))&&e.success?(null!=window.dataLayer&&("undefined"!=typeof dataLayer_v2&&"1"===dataLayer_v2||"undefined"==typeof dataLayer_v2||"undefined"!=typeof dataLayer_v3&&"1"===dataLayer_v3)&&(e.signup?DataLayerTrigger.signup("facebook"):DataLayerTrigger.login("facebook")),"undefined"==typeof isWeddingSpace?t.emit("connected",e):(refreshTopWedding(),getRecap())):e&&!e.success&&-1==e.result?($(".fb-connect").attr("disabled",!1),t.emit("appError",e)):($(".fb-connect").attr("disabled",!1),t.emit("connectFailure",e))}}):($(".fb-connect").attr("disabled",!1),this.fetchMessage("social_signupin_error"),this.on("messageAvailable",function(e){t.emit("connectFailure",{success:!1,result:0,message:e,signup:!1})}))},SocialConnector.prototype._TTGetOAuthTkn=function(e){var t,i=this,o=window.open("","_blank","scrollbars=no, height=500, width=500, resizable=no, fullscreen=no"),n="";this.once("TTConnectResponse",this._TTAuthenticate.bind(this)),e.preventDefault(),$.ajax({url:i.ajaxSocialConnectURL,type:"post",data:{type:"twitter",callbackURL:window.location.origin+window.location.pathname},headers:{accept:"application/json"},success:function(e){(e=JSON.parse(e))&&e.success?"1"==e.result?(o.close(),i.emit("connected",e)):(i.emit("authRequest"),o.location=e.result,t=setInterval(function(){try{o&&!o.closed||(i._TTOAuthCallback("?denied=closing"),clearInterval(t))}catch(e){}try{o.location.origin==window.location.origin&&o.location.search.length>0&&(n=o.location.search,o.close(),i._TTOAuthCallback(n),clearInterval(t))}catch(e){}},500)):e&&!e.success&&-1==e.result&&i.emit("appError",e)}})},SocialConnector.prototype._TTOAuthCallback=function(e){var t={};e=e.substr(1),queryStringArgs=e.split("&"),OAuthVars={};for(var i=[],o=0;o<queryStringArgs.length;o++)if(2!=(i=queryStringArgs[o].split("=")).length||"oauth_token"!==i[0]&&"oauth_verifier"!==i[0]){if(2==i.length&&"denied"===i[0]){t.status="denied";break}}else OAuthVars[i[0]]=i[1];void 0!==OAuthVars.oauth_token&&void 0!==OAuthVars.oauth_verifier?(t.status="connected",t.authResponse=OAuthVars):t.status="error",this.emit
1("TTConnectResponse",t)},SocialConnector.prototype._TTAuthenticate=function(e){var t=this;"connected"==e.status&&e.authResponse&&e.authResponse.oauth_token?$.ajax({url:this.ajaxSocialConnectURL,type:"post",data:{type:"twitter",oauth_token:e.authResponse.oauth_token,oauth_verifier:e.authResponse.oauth_verifier},headers:{accept:"application/json"},success:function(e){(e=JSON.parse(e))&&e.success?"undefined"==typeof isWeddingSpace?t.emit("connected",e):(refreshTopWedding(),getRecap()):e&&!e.success&&-1==e.result?t.emit("appError",e):t.emit("connectFailure",e)}}):(this.once("messageAvailable",function(e){t.emit("connectFailure",{success:!1,result:0,message:e,signup:!1})}),this.fetchMessage("social_signupin_error",[]))},SocialConnector.prototype._GOLoginCallback=function(e){var t=this,i=e.getAuthResponse(!0).access_token;$.ajax({url:this.ajaxSocialConnectURL,type:"post",data:{type:"google",accessToken:i},headers:{accept:"application/json"},success:function(e){(e=JSON.parse(e))&&e.success?(null!=window.dataLayer&&("undefined"!=typeof dataLayer_v2&&"1"===dataLayer_v2||"undefined"==typeof dataLayer_v2||"undefined"!=typeof dataLayer_v3&&"1"===dataLayer_v3)&&(e.signup?DataLayerTrigger.signup("google"):DataLayerTrigger.login("google")),"undefined"==typeof isWeddingSpace?t.emit("connected",e):(refreshTopWedding(),getRecap())):e&&!e.success&&-1==e.result?t.emit("appError",e):t.emit("connectFailure",e)}})},SocialConnector.prototype._APLoginCallback=function(e){var t=this,i=e.access_token;$.ajax({url:this.ajaxSocialConnectURL,type:"post",data:{type:"amazon",accessToken:i},headers:{accept:"application/json"},success:function(e){(e=JSON.parse(e))&&e.success?(null!=window.dataLayer&&("undefined"!=typeof dataLayer_v2&&"1"===dataLayer_v2||"undefined"==typeof dataLayer_v2||"undefined"!=typeof dataLayer_v3&&"1"===dataLayer_v3)&&(e.signup?DataLayerTrigger.signup("amazon"):DataLayerTrigger.login("amazon")),"undefined"==typeof isWeddingSpace?t.emit("connected",e):(refreshTopWedding(),getRecap())):e&&!e.success&&-1==e.result?t.emit("appError",e):t.emit("connectFailure",e)}})}
1,$(function(){var e=$("#return_to_step_one"),t=$("#return_to_step_two"),i=$("#step1"),o=$("#step2");$("#step3");e.on("click",function(){i.is(":visible")?(i.hide(),stepsUpdate()):(i.show(),stepsUpdate())}),t.on("click",function(){o.is(":visible")?(o.hide(),stepsUpdate()):(o.show(),stepsUpdate())})});var googlePayPaymentsClient,googlePayBaseRequest={},googlePayTokenizationSpecification={},googlePayAllowedCardNetworks=[],googlePayBaseCardPaymentMethod={};function googlePayDefineApiVersion(e,t){googlePayBaseRequest={apiVersion:e,apiVersionMinor:t}}function googlePayDefineTokenizationSpecification(e,t){googlePayTokenizationSpecification={type:"PAYMENT_GATEWAY",parameters:{gateway:e,gatewayMerchantId:t}}}function googlePayDefineAllowedCardNetworks(e){googlePayAllowedCardNetworks=e}function googlePayInitiate(e,t,i,o,n,a){googlePayBaseCardPaymentMethod={type:"CARD",parameters:{allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowedCardNetworks:googlePayAllowedCardNetworks}};Object.assign({tokenizationSpecification:googlePayTokenizationSpecification},googlePayBaseCardPaymentMethod);googlePayPaymentsClient=new google.payments.api.PaymentsClient({environment:e});const r=Object.assign({},googlePayBaseRequest);r.allowedPaymentMethods=[googlePayBaseCardPaymentMethod],googlePayPaymentsClient.isReadyToPay(r).then(function(e){if(e.result){const e=googlePayPaymentsClient.createButton({onClick:()=>onGooglePaymentButtonClicked(t,i,o,n,a),allowedPaymentMethods:[googlePayAllowedCardNetworks]});document.getElementById("worldline_google_pay").appendChild(e),$("#splitPaymentMethod").length>0?$('.payment_mode_btn[data-payment-mode="google_worldline"]').show():($("#google_worldline_bloc").show(),$("#google_worldline_title").show())}}).catch(function(e){})}function getGoogleTransactionInfo(e,t,i){return{countryCode:i,currencyCode:t,totalPriceStatus:"FINAL",totalPrice:e.toString()}}function getGooglePaymentDataRequest(e,t,i,o,n){var a=Object.assign({},googlePayBaseCardPaymentMethod,{tokenizationSpecification:googlePayTokenizationSpecification});const r=Object.assign({},googlePayBaseRequest);return r.allowedPaymentMethods=[a],r.transactionInfo=getGoogleTransactionInfo(e,t,i),r.merchantInfo={merchantId:o,merchantName:n},r}function onGooglePaymentButtonClicked(e,t,i,o,n){const a=getGooglePaymentDataRequest(e,t,i,o,n);googlePayPaymentsClient.loadPaymentData(a).then(function(e){processPayment(e)}).catch(function(e){})}var placeSearch,inAnime=!1,activeBlurPhone=!0;function initialize_google_place(e){"use strict";var t="delivery"===e?"":e,i=document.getElementById(t+"streetNumber")?"streetNumber":"adresseLiv",o=document.getElementById(t+"streetNumber")?"rue":"adresseLiv",n={street_number:{target:"[name="+t+i+"]",length:"short_name"},route:{target:"[name="+t+o+"]",length:"long_name"},locality:{target:"[name="+t+"ville]",length:"long_name"},country:{target:"[name="+t+"pays]",length:"short_name"},postal_code:{target:"[name="+t+"codeP]",length:"short_name"},administrative_area_level_1:{target:"[name="+t+"department]",length:"short_name"}};0==$("[name="+t+"adresseLiv]").length&&(n={street_number:{target:"input."+t+i,length:"short_name"},route:{target:"input."+t+o,length:"long_name"},locality:{target:"input."+t+"ville",length:"long_name"},country:{target:"select."+t+"pays",length:"short_name"},postal_code:{target:"input."+t+"codeP",length:"short_name"},administrative_area_level_1:{target:"input."+t+"department",length:"short_name"}});var a=document.getElementById(t+"autocomplete_addr"),r={types:["geocode"]};$("input#country").length>0&&""!=$("input#country").val()&&(r.componentRestrictions={country:$("input#country").val().split(",")});var l=$("#"+t+"autocomplete_addr"),s=new google.maps.Geocoder,c=new google.maps.places.Autocomplete(a,r);setTimeout(()=>{a.setAttribute("autocomplete","new-password")},200),google.maps.event.addListener(c,"place_changed",function(i){fillInAddressGoogle(c,n,!0,"#"+t+"autocomplete_addr",".noaddr."+e,".elem_addr_autocomplete."+e,"select#"+t+"pays"),showGlobalGoogle("#"+t+"autocomplete_addr",".noaddr."+e,".elem_global."+e,"finish",".elem_addr_autocomplete."+e);var o=l.attr("data-carte");if(""!=o){var a=l.val();s.geocode({address:a},function(e,t){if(t==google.maps.GeocoderStatus.OK&&$("#"+o).length){$("#"+o).css("display","block");var i=new google.maps.Map(document.getElementById(o));new google.maps.LatLng(e[0].lat,e[0].lng);i.setCenter(e[0].geometry.location),i.setZoom(13);var n=document.createElement("img");n.src=path_relative_root+"img/maps/marker.png";new google.maps.marker.AdvancedMarkerElement({map:i,position:e[0].geometry.location,content:n})}})}}),commonAction(a,c),$(".wrapper_form_adresse, .wrapper_autocomplete").on("click",".noaddr."+e,function(){var i=t+"autocomplete_addr";$("#iconInvalid"+i).length>0&&$("#iconInvalid"+i).hide(),$("#iconValid"+i).length>0&&$("#iconValid"+i).hide(),$(".elem_global."+e).advanceSlide("show"),$(".noaddr."+e).css({display:"block",opacity:1}).animate({opacity:0}
1,function(){$(".noaddr."+e).css({display:"none",opacity:""}),$(".elem_addr_autocomplete."+e).advanceSlide("show"),$("#"+t+"autocomplete_addr").parent().hide(),$("#"+t+"adresseLiv").focus()})}),l.on("keyup",function(t){showGlobalGoogle(t.target,".noaddr."+e,".elem_global."+e,"",".elem_addr_autocomplete."+e),$(this).val().length>=4&&$(".noaddr."+e).addClass("show").css({display:"block",opacity:0}).animate({opacity:1},function(){$(".noaddr."+e).css({opacity:""}),activateAddressError()})}),l.on("blur",function(i){var o=c.getPlace();if(l.is(":visible"))if(void 0!==o&&l.val().length>10)google.maps.event.trigger("place_changed"),$(".noaddr."+e).css({display:"block",opacity:1}).animate({opacity:0},function(){$(".noaddr."+e).css({display:"none",opacity:""})});else if($(".inputErr").length>0){var n=t+"autocomplete_addr",a=$("#"+t+"autocomplete_addr");if(0==$("#iconInvalid"+n).length){var r="img/";"undefined"!=typeof mobileApi&&!0===mobileApi&&(r="img/mobile/");var s=$("<img />",{id:"iconInvalid"+n,class:"valid_form",src:path_relative_root+r+"picto_panneau.png"}).css({opacity:0});a.parent().append(s),s.animate({opacity:1},600),$("#iconInvalid"+n).on({mouseenter:function(){showTooltip($("#iconInvalid"+n),"adress_not_exist_noaddr")},mouseleave:function(){hideTooltip()}})}else $("#iconInvalid"+n).show().animate({opacity:1},600);$("#iconValid"+n).length>0&&$("#iconValid"+n).hide()}activateAddressError()})}function initialize_map(e){var t={street_number:{target:".choix_relais_relais"+e+" #street",length:"short_name"},route:{target:".choix_relais_relais"+e+" #street",length:"long_name"},locality:{target:".choix_relais_relais"+e+" #city",length:"long_name"},country:{target:".choix_relais_relais"+e+" #country",length:"short_name"},postal_code:{target:".choix_relais_relais"+e+" #zip",length:"short_name"}},i=$(".choix_relais_relais"+e+" .autocomplete_addr_map")[0],o=new google.maps.places.Autocomplete(i,{types:["geocode"]});setTimeout(()=>{i.setAttribute("autocomplete","new-password")},200),google.maps.event.addListener(o,"place_changed",function(i){fillInAddressGoogle(o,t,!1,".choix_relais_relais"+e+" .autocomplete_addr_map","","","#zip"),$(".choix_relais_relais"+e+" .autocomplete_addr_map").trigger("place_changed");var n=$(".choix_relais_relais"+e+" #street").val(),a=$(".choix_relais_relais"+e+" #zip").val(),r=$(".choix_relais_relais"+e+" #city").val(),l=$(".choix_relais_relais"+e+" #country").val(),s=$(".choix_relais_relais"+e).parents(".bloc_livraison").find(".choix_delivery").attr("data-id-transporteur");""!=a&&""!=n||""==r||(n=r,r=""),loadMapDelivery(n+"|"+a+"|"+r+"|"+l,e,s)}),commonAction(i,o)}function initializeMapV2(e){var t={street_number:{target:".relay_choice_"+e+" #street",length:"short_name"},route:{target:".relay_choice_"+e+" #street",length:"long_name"},locality:{target:".relay_choice_"+e+" #city",length:"long_name"},country:{target:".relay_choice_"+e+" #country",length:"short_name"},postal_code:{target:".relay_choice_"+e+" #zip",length:"short_name"}},i=$(".relay_choice_"+e+" .autocomplete_addr_map")[0],o=new google.maps.places.Autocomplete(i,{types:["geocode"]});setTimeout(()=>{i.setAttribute("autocomplete","new-password")},200),google.maps.event.addListener(o,"place_changed",function(i){fillInAddressGoogle(o,t,!1,".relay_choice_"+e+" .autocomplete_addr_map","","","#zip"),$(".relay_choice_"+e+" .autocomplete_addr_map").trigger("place_changed");var n=$(".relay_choice_"+e+" #street").val(),a=$(".relay_choice_"+e+" #zip").val(),r=$(".relay_choice_"+e+" #city").val(),l=$(".relay_choice_"+e+" #country").val(),s=$(".relay_choice_"+e).parents(".bloc_livraison").find(".choix_delivery").attr("data-id-transporteur"),c=$(".relay_choice_"+e).hasClass("store");""==a&&""!=r&&(n=r,r=""),loadMapDelivery(n+"|"+a+"|"+r+"|"+l,e,s,c)}),commonAction(i,o)}function commonAction(e,t){$(e).on({focus:function(){geolocate(t)}})}function fillInAddressGoogle(e,t,i,o,n,a,r){var l=e.getPlace(),s=o.replace("#",""),c=$(o);if($("#iconInvalid"+s).length>0&&$("#iconInvalid"+s).hide(),void 0===l)return"persiste"!==$(o).attr("data-visible")&&$(o).parent().hide(),$(a).advanceSlide("show"),!1;l.address_components.length;var p,d={},u=!1,h=Object.getOwnPropertyNames(t),_=(h.length,{}),m={},g=!1,f={};
1if(l.address_components.forEach(function(e){var i=e.types[0];if(t[i]){var o="";("administrative_area_level_1"==i&&""!=e[t[i].length]||"administrative_area_level_1"!=i)&&(o=e[t[i].length],m[i]=o);var n=t[i].target;"country"==i?(p=o,null!=d[n]?d[n]=d[n]+" "+o:d[n]=o):null!=f[n]?f[n]=f[n]+" "+o:f[n]=o}}),$.each(f,function(e){d[e]=f[e]}),null==_.postal_code&&null!=_.administrative_area_level_2&&(d[t.postal_code.target]=l.address_components[_.administrative_area_level_2][t.postal_code.length]),h.forEach(function(e){var i=t[e].target;null==d[i]&&(d[i]=""),null==m[e]&&(g=!0,"persiste"===$(o).attr("data-visible")&&"hide"!==$(o).attr("data-visible")||$(o).parent().hide(),$(a).advanceSlide("show"))}),!g)if(0==$("#iconValid"+s).length){var v="img/";"undefined"!=typeof mobileApi&&!0===mobileApi&&(v="img/mobile/");var b=$("<img />",{id:"iconValid"+s,class:"valid_form",src:path_relative_root+v+"picto_panneau_valid.png"}).css({opacity:0});c.parent().append(b),b.animate({opacity:1},600)}else $("#iconValid"+s).show();var y={BE:"B",MC:"FR",FR:"FR",DO:"DO",TO:"TO"};null!=y[p]&&(p=y[p]);var w=Object.getOwnPropertyNames(d);w.length;if(activeBlurPhone=!1,w.forEach(function(e){i&&null!=r?$(e).is(r)?r.indexOf("pays")>0&&($(o).data("google-val",p),$("option[data-name="+p+"]",e).length?($("option",e).removeAttr("selected"),$("option[data-name="+p+"]",e).prop("selected","selected").trigger("change")):(activeBlurPhone=!0,$("option",e).removeAttr("selected"),$("option[data-name=null]",e).prop("selected","selected").trigger("change"),0==u&&(u=!0,$(n).css({display:"block",opacity:1}).animate({opacity:0}
1,function(){$(n).css({display:"none",opacity:""}),activateAddressError()}),setTimeout(function(){$("input",a).trigger("blur")},1e3)))):(e.indexOf("department")>0&&$(e)&&$(e).val(d[e]).trigger("change"),""!==$(e).val(d[e]).val()&&$(e).val(d[e]).trigger("blur")):(e.indexOf("department")>0&&$(e)&&$(e).val(d[e]).trigger("change"),$(e).val(d[e])),document.getElementById("bloc_store_det")||$(e).trigger("change")}),document.getElementById("streetNumber")&&($("#adresseLiv").val($("#streetNumber").val()+" "+$("#rue").val()),$("#billadresseLiv").val($("#billstreetNumber").val()+" "+$("#billrue").val())),document.getElementById("bloc_store_det")&&$(".bloc_input_autocomplete").hide(),activeBlurPhone=!0,null!=r&&(r.indexOf("pays")>0&&$(o).data("google-val",p),r.indexOf("zip")>0&&$(o).length>0&&$(o).data("google-val",p+"|"+$(r).val())),i){var P=Object.getOwnPropertyNames(t).length;for(k=0;k<P;k++){var A=t[Object.getOwnPropertyNames(t)[k]].target;-1==$.inArray(A,w)&&0==u&&(u=!0,$(n).css({display:"block",opacity:1}).animate({opacity:0}
1,function(){$(n).css({display:"none",opacity:""}),activateAddressError()}),setTimeout(function(){$("input",a).trigger("blur")},1e3))}}$(n).css({display:"block",opacity:1}).animate({opacity:0},function(){$(n).css({display:"none",opacity:""}),activateAddressError()})}function geolocate(e){navigator.geolocation&&-1==navigator.userAgent.indexOf("Firefox")&&navigator.geolocation.getCurrentPosition(function(t){var i=new google.maps.LatLng(t.coords.latitude,t.coords.longitude);e.setBounds(new google.maps.LatLngBounds(i,i))})}function showGlobalGoogle(e,t,i,o,n){var a=$(".pac-item",".pac-container");$(".pac-item",".pac-container").length;($(e).prop("value").length>=2||a.length)&&$(i).advanceSlide("show"),activateAddressError()}function activateAddressError(){setTimeout(function(){$(".wrapper_autocomplete #iconInvalidautocomplete_addr").length>0&&"none"!==$(".wrapper_autocomplete #iconInvalidautocomplete_addr").css("display")?$("#autocomplete_addr").addClass("inputErrGField"):$(".wrapper_autocomplete .noaddr").is(":hidden")||"none"==$(".wrapper_autocomplete .noaddr").css("display")||0==$(".wrapper_autocomplete .noaddr").css("opacity")?$("#autocomplete_addr").removeClass("inputErrGField"):$("#autocomplete_addr").addClass("inputErrGField")},10)}$.fn.advanceSlide=function(e,t){"use strict";var i=$(this),o=i.is(":visible"),n=function(){return!(!t||"function"!=typeof t)&&t()};void 0!==i.data("height")&&0!==i.data("height")||(o||i.css({display:"block",position:"absolute",opacity:0}),i.data("height",i.height()),o||i.css({display:"none",position:"",opacity:""}));var a=i.data("height");!1===inAnime&&(inAnime=!0,"show"!==e||o?"hide"===e&&o?i.stop().css({display:"block",height:a,overflow:"hidden"}).animate({height:0},function(){i.css({display:"none",height:"",overflow:""}),inAnime=!1,n()}):inAnime=!1:i.stop().css({display:"block",height:0,overflow:"hidden"}).animate({height:a},function(){i.css({height:"",overflow:""}),inAnime=!1,n()}))}; 2//# sourceMappingURL=maps/app.js.map
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.