"use strict";var lpc=angular.module("lpc",["ngSanitize","ngLocale","ngMessages","ngAnimate","ipCookie","ngDropdowns","ab-base64","ui.sortable","taiPlaceholder","rzModule","ksSwiper","ngFileUpload","froala","chart.js"]).value("froalaConfig",{toolbarInline:!1,placeholderText:"Enter Text Here"});function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var o;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(e,t):void 0}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _regeneratorRuntime(){_regeneratorRuntime=function(){return r};var s,r={},e=Object.prototype,c=e.hasOwnProperty,d=Object.defineProperty||function(e,t,o){e[t]=o.value},t="function"==typeof Symbol?Symbol:{},n=t.iterator||"@@iterator",o=t.asyncIterator||"@@asyncIterator",i=t.toStringTag||"@@toStringTag";function a(e,t,o){return Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{a({},"")}catch(s){a=function(e,t,o){return e[t]=o}}function l(e,t,o,n){var i,a,r,l,t=t&&t.prototype instanceof P?t:P,t=Object.create(t.prototype),n=new b(n||[]);return d(t,"_invoke",{value:(i=e,a=o,r=n,l=p,function(e,t){if(l===g)throw new Error("Generator is already running");if(l===m){if("throw"===e)throw t;return{value:s,done:!0}}for(r.method=e,r.arg=t;;){var o=r.delegate;if(o){o=function e(t,o){var n=o.method,i=t.iterator[n];if(i===s)return o.delegate=null,"throw"===n&&t.iterator.return&&(o.method="return",o.arg=s,e(t,o),"throw"===o.method)||"return"!==n&&(o.method="throw",o.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;n=u(i,t.iterator,o.arg);if("throw"===n.type)return o.method="throw",o.arg=n.arg,o.delegate=null,h;i=n.arg;return i?i.done?(o[t.resultName]=i.value,o.next=t.nextLoc,"return"!==o.method&&(o.method="next",o.arg=s),o.delegate=null,h):i:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,h)}(o,r);if(o){if(o===h)continue;return o}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(l===p)throw l=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);l=g;o=u(i,a,r);if("normal"===o.type){if(l=r.done?m:f,o.arg===h)continue;return{value:o.arg,done:r.done}}"throw"===o.type&&(l=m,r.method="throw",r.arg=o.arg)}})}),t}function u(e,t,o){try{return{type:"normal",arg:e.call(t,o)}}catch(e){return{type:"throw",arg:e}}}r.wrap=l;var p="suspendedStart",f="suspendedYield",g="executing",m="completed",h={};function P(){}function E(){}function v(){}var t={},C=(a(t,n,function(){return this}),Object.getPrototypeOf),C=C&&C(C(S([]))),O=(C&&C!==e&&c.call(C,n)&&(t=C),v.prototype=P.prototype=Object.create(t));function y(e){["next","throw","return"].forEach(function(t){a(e,t,function(e){return this._invoke(t,e)})})}function w(r,l){var t;d(this,"_invoke",{value:function(o,n){function e(){return new l(function(e,t){!function t(e,o,n,i){var a,e=u(r[e],r,o);if("throw"!==e.type)return(o=(a=e.arg).value)&&"object"==_typeof(o)&&c.call(o,"__await")?l.resolve(o.__await).then(function(e){t("next",e,n,i)},function(e){t("throw",e,n,i)}):l.resolve(o).then(function(e){a.value=e,n(a)},function(e){return t("throw",e,n,i)});i(e.arg)}(o,n,e,t)})}return t=t?t.then(e,e):e()}})}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function S(t){if(t||""===t){var o,e=t[n];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return o=-1,(e=function e(){for(;++o<t.length;)if(c.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=s,e.done=!0,e}).next=e}throw new TypeError(_typeof(t)+" is not iterable")}return d(O,"constructor",{value:E.prototype=v,configurable:!0}),d(v,"constructor",{value:E,configurable:!0}),E.displayName=a(v,i,"GeneratorFunction"),r.isGeneratorFunction=function(e){e="function"==typeof e&&e.constructor;return!!e&&(e===E||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,a(e,i,"GeneratorFunction")),e.prototype=Object.create(O),e},r.awrap=function(e){return{__await:e}},y(w.prototype),a(w.prototype,o,function(){return this}),r.AsyncIterator=w,r.async=function(e,t,o,n,i){void 0===i&&(i=Promise);var a=new w(l(e,t,o,n),i);return r.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},y(O),a(O,i,"Generator"),a(O,n,function(){return this}),a(O,"toString",function(){return"[object Generator]"}),r.keys=function(e){var t,o=Object(e),n=[];for(t in o)n.push(t);return n.reverse(),function e(){for(;n.length;){var t=n.pop();if(t in o)return e.value=t,e.done=!1,e}return e.done=!0,e}},r.values=S,b.prototype={constructor:b,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(I),!e)for(var t in this)"t"===t.charAt(0)&&c.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=s)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(o){if(this.done)throw o;var n=this;function e(e,t){return a.type="throw",a.arg=o,n.next=e,t&&(n.method="next",n.arg=s),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var i=this.tryEntries[t],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var r=c.call(i,"catchLoc"),l=c.call(i,"finallyLoc");if(r&&l){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(r){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(e,t){for(var o=this.tryEntries.length-1;0<=o;--o){var n=this.tryEntries[o];if(n.tryLoc<=this.prev&&c.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}var a=(i=i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc?null:i)?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var o=this.tryEntries[t];if(o.finallyLoc===e)return this.complete(o.completion,o.afterLoc),I(o),h}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var o,n,i=this.tryEntries[t];if(i.tryLoc===e)return"throw"===(o=i.completion).type&&(n=o.arg,I(i)),n}throw new Error("illegal catch attempt")},delegateYield:function(e,t,o){return this.delegate={iterator:S(e),resultName:t,nextLoc:o},"next"===this.method&&(this.arg=s),h}},r}function asyncGeneratorStep(e,t,o,n,i,a,r){try{var l=e[a](r),s=l.value}catch(e){return void o(e)}l.done?t(s):Promise.resolve(s).then(n,i)}function _asyncToGenerator(l){return function(){var e=this,r=arguments;return new Promise(function(t,o){var n=l.apply(e,r);function i(e){asyncGeneratorStep(n,t,o,i,a,"next",e)}function a(e){asyncGeneratorStep(n,t,o,i,a,"throw",e)}i(void 0)})}}angular.module("lpc").run(["$rootScope","PopupHandler","Helper","ErrorHandler","ipCookie","ServerFunction","LpcNotificationsHandler","$timeout",function(o,e,t,n,i,a,r,l){o.mode=window.mode,o.lpcDomain=window.lpcDomain,o.domainName=window.domainName,o.subdomain=window.subdomain,o.subdomainType=window.subdomainType,o.editorIframeOrigin=window.editorIframeOrigin,delete window.mode,delete window.editorIframeOrigin,window.cookiesChoices&&(o.cookiesChoices=JSON.parse(window.cookiesChoices)),o.domains={FR:"FR",EN:"EN",ES:"ES",IT:"IT",DE:"DE"},o.subdomains={VOYAGES_SNCF:"sncf-connect",VOYAGES_SNCF_PETIT_GROUPE:"oui-sncf-petit-groupe",VOYAGES_SNCF_GROUPES:"sncf-connect-groupes",PACK_TRIBU:"oui-sncf-pack-tribu",GROUPCORNER:"groupcorner",EVANEOS:"evaneos",MASHAREECOLE:"mashareecole",VVF_VILLAGES:"vvf-villages",IZLY:"izly",BPALC_BANQUEPOPULAIRE:"bpalc-banquepopulaire",GUERI_D_UN_CANCER:"gueriduncancer",MASSILIA_SOCIOS_OM:"massilia-socios-club",CAISSE_EPARGNE_NORMANDIE:"cen",RELAIS_CHATEAU:"relaischateaux",RELAIS_CHATEAU_LISTES:"relaischateaux-liste-de-mariage",I_WANTIT:"iwantit",OUEST_BANQUEPOPULAIRE:"bpgo",CREDIT_COOPERATIF:"creditcooperatif",NATIXIS:"natixis",CADO_STORE:"cadostore",APEL:"apel",DANSNOSCOEURS:"dansnoscoeurs",NATURE_ET_DECOUVERTES:"natureetdecouvertes",GROUPE_M6:"groupem6",DINER_EN_BLANC:"deb",BANQUE_TAHITI:"banque-tahiti",GROUPE_BPCE:"groupebpce",NUMBERLY:"numberly",MAISONS_DU_MONDE:"maisonsdumonde",JCDECAUX:"jcdecaux",CRITEO:"criteo",NUMWORKS:"numworks",COMITEO:"macagnotteavantages",DECATHLON:"decathlon",BANQUE_NOUVELLE_CALEDONIE:"bnc",SNCF:"sncf",MACABANE:"macabane",VENTE_PRIVEE:"vente-privee",FNACDARTY:"fnacdarty",LEQUIPE:"lequipe",HOTELSPREFERENCE:"hotelspreference",DALENYS:"dalenys",SAFRANGROUP:"safrangroup",PUBLICIS:"publicis",GROUPE_TF1:"groupe-tf1",COPINES_DE_VOYAGE:"copinesdevoyage",SMARTBOX:"smartbox",CFV:"club-faune-voyages",BISCUIT_MISTRAL:"biscuitmistral",DONS_DANS_NOS_COEURS:"donsdansnoscoeurs"},o.isNewPotBoard="true"==window.isNewPotBoard,o.showRedirectToLpcPopup="true"==window.showRedirectToLpcPopup,o.LPC_ANGULAR_EVENT={FOCUS_ON_FIRST_INPUT:"focus-on-first-input"},o.showPotCreationEditionPopup=function(e){null==o.isSubdomainHeadquartersIP||i("intern-platforms-redirect-popup-already-shown")?"LPS_FR"!=o.lpcDomain&&"IT"!=o.lpcDomain?(o.showPopupV2("potCreationEdition",e),1==o.showRedirectToLpcPopup&&o.showPopupV2("redirect-to-lpc")):"LPS_FR"==o.lpcDomain?o.showPopupV2("cantCreatePotLps"):o.showPopupV2("cantCreatePotCollettiamo"):(i("intern-platforms-redirect-popup-already-shown",!0),o.potCreationEditionData=e,e={platformName:o.headquartersDetails.platformName,platformUrl:o.headquartersDetails.platformUrl},o.showPopupV2("intern-platform-redirect-popup",e))},o.hideInternPlatformRedirectPopup=function(){o.hidePopupV2("intern-platform-redirect-popup"),l(function(){o.showPopupV2("potCreationEdition",o.potCreationEditionData)},0)},o.createNewKittyWithPopup=function(){o.$broadcast("create-new-pot-popup"),"LPS_FR"!=o.lpcDomain&&"IT"!=o.lpcDomain?o.showPopupV2("potCreationEdition"):"LPS_FR"==o.lpcDomain?o.showPopupV2("cantCreatePotLps"):o.showPopupV2("cantCreatePotCollettiamo")},o.getPhoto=function(e){return e&&(e.startsWith("data:image")?e:"/photo/"+e)},o.ckeditorOptions={language:window.lpcUserLocale?window.lpcUserLocale.toLowerCase():"fr"},o.ckeditorReady=function(){o.$broadcast("ckeditor-ready-event")},o.froalaEditorUpdatePlaceholder=function(){o.$broadcast("froala-editor-update-placeholder-event")},o.isFromPotCreation=function(){return window&&window.location&&window.location.hash&&window.location.hash.toLowerCase().indexOf("from-pot-creation")},o.isFromSaleCreation=function(){return window&&window.location&&window.location.hash&&window.location.hash.toLowerCase().indexOf("from-sale-creation")},o.isFromListCreation=function(){return window&&window.location&&window.location.hash&&window.location.hash.toLowerCase().indexOf("from-list-creation")},o.scrollToElement=function(e){var t=angular.element(e);1!=t.length?console.error("selector : '"+e+"' selects "+t.length+" elements"):angular.element("html, body").animate({scrollTop:t.offset().top},500)},o.closeMobileAppSuggestionPopupForASession=function(){void 0===i("hide-mobile-suggestion-banner")&&i("hide-mobile-suggestion-banner","true",{path:"/",domain:window.domainName})},o.openDesktopMenu=function(){$(".dropdown-menu-container").addClass("display-block"),o.desktopMenuOpened=!0,o.stabilizeMenuTransparency(o.desktopMenuOpened)},o.switchDesktopMenu=function(){o.desktopMenuOpened?($(".dropdown-menu-container").removeClass("display-block"),o.desktopMenuOpened=!1):($(".dropdown-menu-container").addClass("display-block"),o.desktopMenuOpened=!0),o.stabilizeMenuTransparency(o.desktopMenuOpened)},o.stabilizeMenuTransparency=function(e){e?(angular.element(".menu-container").addClass("menu-container-no-transition"),angular.element(".menu-container").removeClass("menu-container-transparent"),setTimeout(function(){angular.element(".menu-container").removeClass("menu-container-no-transition")},0),o.lpcMenuZeroScroll=!1):0==angular.element(window).scrollTop()&&angular.element(".menu-container").is("[lpc-pot-menu]")&&(angular.element(".menu-container").addClass("menu-container-no-transition"),angular.element(".menu-container").addClass("menu-container-transparent"),setTimeout(function(){angular.element(".menu-container").removeClass("menu-container-no-transition")},0),o.lpcMenuZeroScroll=!0)},o.hideDesktopMenu=function(){$(".dropdown-menu-container").removeClass("display-block"),o.desktopMenuOpened=!1,o.stabilizeMenuTransparency(o.desktopMenuOpened)},$("body").on("click",function(e){$(e.target).is(".login-menu-content")||$(e.target).is(".see-more-notifications")||$(e.target).is(".dropdown")||$(e.target).is(".toggle-menu-button")||0<$(e.target).parents(".login-menu-content").length||0<$(e.target).parents(".toggle-menu-button").length||o.desktopMenuOpened&&(o.hideDesktopMenu(),o.$apply())}),o.showLeftMenuFunc=function(){var e,t;o.showRightMenu&&(o.showRightMenu=!1,o.hideRightMenuFunc()),o.showLeftMenu?o.hideLeftMenuFunc():(o.showLeftMenu=!0,e=$(".left-menu-container"),t=$("body"),e.addClass("display-block"),e.animate({left:0},400),t.addClass("mobile-menu-opened")),o.stabilizeMenuTransparency(o.showLeftMenu||o.showRightMenu)},o.hideLeftMenuFunc=function(){o.showLeftMenu=!1;var e=$(".left-menu-container"),t=$("body");e.animate({left:"-95%"},400,function(){e.removeClass("display-block")}),t.css("right",""),t.animate({left:"0"},400,function(){t.removeClass("mobile-menu-opened")}),o.stabilizeMenuTransparency(o.showLeftMenu||o.showRightMenu)},o.showRightMenuFunc=function(){var e,t;o.showLeftMenu&&(o.showLeftMenu=!1,o.hideLeftMenuFunc()),o.showRightMenu?o.hideRightMenuFunc():(o.showRightMenu=!0,e=$(".dropdown-menu-container"),t=$("body"),e.addClass("display-block"),e.animate({right:0},400),t.addClass("mobile-menu-opened"),t.css("left",""),t.animate({right:"95%"},400)),o.stabilizeMenuTransparency(o.showLeftMenu||o.showRightMenu)},o.hideRightMenuFunc=function(){o.showRightMenu=!1;var e=$(".dropdown-menu-container"),t=$("body");e.animate({right:"-95%"},400,function(){e.removeClass("display-block")}),t.css("left",""),t.animate({right:"0"},400,function(){t.removeClass("mobile-menu-opened")}),o.stabilizeMenuTransparency(o.showLeftMenu||o.showRightMenu)},o.showDemoImpossibleActionPopup=function(e){n.handle({data:{fieldErrors:[{popupError:"string:"+e}]}})},o.editorLoading=!0,o.showPopup=e.show,o.hidePopup=e.hide,o.clearPopup=e.clear,o.changePage=t.handleTag.changePage,o.resetPage=t.handleTag.resetPage,o.format=t.format,o.computeCom=t.computeCom,o.pushSuccessNotification=r.pushSuccess,o.pushErrorNotification=r.pushError,o.pushWarningNotification=r.pushWarning,o.logout=function(){a.logout().then(function(){window.location.href="DE"==o.lpcDomain?"/de":"/"})},o.parseFloat=function(e){return parseFloat(e)},o.birthOption={hideIfNoPrevNext:!0,defaultDate:"-20y -1d",maxDate:"-18y -1d",changeYear:!0,changeMonth:!0,yearRange:"1915:2015"},o.page={index:0,ajaxLoading:!1},o.errors||(o.errors={}),setTimeout(function(){n.fetchPageError(),o.$apply()},0),o.shareFB=function(e){t.pot.facebook.openSharer("facebook",e,640,320)},o.shareFbMobile=function(e){t.pot.facebook.openSharer("facebook-mobile",e,640,320)},o.shareMessengerMobile=function(e){t.pot.facebook.openSharer("messenger-mobile",e,640,320)},o.shareWhatsappMobile=function(e){t.pot.facebook.openSharer("whatsapp-mobile",e,640,320)},o.shareWhatsappDesktop=function(e){t.pot.facebook.openSharer("whatsapp-desktop",e,640,320)},o.shareTwitterMobile=function(e){t.pot.facebook.openSharer("twitter-mobile",e,640,320)},o.shareTwitterDesktop=function(e){t.pot.facebook.openSharer("twitter-desktop",e,640,320)},o.shareLinkedIn=function(e,t,o,n){var i=screen.height/2-160,a=screen.width/2-320;window.open("https://www.linkedin.com/shareArticle?mini=true&url="+e+"&title="+t+"&summary="+o+"&source="+n,"sharer","top="+i+",left="+a+",toolbar=0,status=0,width=640,height=320")},o.shareGoogle=function(e){t.pot.facebook.openSharer("google",e,640,320)},o.showCopyButton=!0,o.disableCopyButton=function(){o.showCopyButton=!1,l(function(){o.showCopyButton=!0},5e3)},o.hideCopiedButton={},o.disableCopyButton=function(e){o.hideCopiedButton[e]=!0,l(function(){o.hideCopiedButton[e]=!1},5e3)},o.isMobile=function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,t=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))?!0:t},window._troq=window._troq||[],o.milleMercis={},o.milleMercis.form=function(){_troq.push(["tagid","6558385-ac746f21db41c9bd4f457a3d88717e05"]),_troq.push(["rtgpg","form"]),_troq.push(["rtgidform","potForm"]),_troq.push(["rtglanguage",window.lpcUserLocale]),_troq.push(["rtgregistered",window.lpcUserLogged?"1":"0"]),window.lpcUserLogged&&_troq.push(["exclusion","1"])},o.milleMercis.convert=function(e){_troq.push(["tagid","6558385-ac746f21db41c9bd4f457a3d88717e05"]),_troq.push(["rtgpg","order"]),_troq.push(["exclusion","1"]),_troq.push(["rtgcmd","1"]),_troq.push(["rtgcmdid",e]),_troq.push(["rtglanguage",window.lpcUserLocale]),_troq.push(["rtgidform","potForm"])},o.milleMercis.allPage=function(){window._troq=window._troq||[],_troq.push(["tagid","6558385-ac746f21db41c9bd4f457a3d88717e05"]),_troq.push(["rtglanguage",window.lpcUserLocale]),_troq.push(["rtgregistered",window.lpcUserLogged?"1":"0"]),window.lpcUserLogged&&_troq.push(["exclusion","1"])},o.milleMercis.allPage();var s=i("google-event-cookie");if(s&&s.length){try{for(var c=0,d=s.length;c<d;c++){var u=s[c];"createPot"==u.category&&("undefined"!=typeof fbq&&fbq("track","Lead"),"ES"==window.lpcDomain?(loadImage("https://secure.adnxs.com/px?id=845389&other="+u.opt_label+"&t=2"),loadImage("https://secure.adnxs.com/seg?add=8517347&t=2")):"IT"==window.lpcDomain&&(loadImage("https://secure.adnxs.com/px?id=841342&other="+u.opt_label+"&t=2"),loadImage("https://secure.adnxs.com/seg?add=8413140&t=2")),"IT"==window.lpcDomain)&&"undefined"!==i("collettiamo-campagna")&&(loadImage("https://tbl.tradedoubler.com/report?organization=2155785&event=373879&leadNumber="+u.opt_label+"&type=iframe"),console.log("deleteing collettiamo-campagna cookie",window.domainName),i.remove("collettiamo-campagna",{path:"/",domain:window.domainName}))}}catch(e){console.error(e)}console.log("deleteing google-event-cookie domain",window.domainName),i.remove("google-event-cookie",{path:"/",domain:window.domainName})}function p(e,t){var o=0,n=!1,i=window.setInterval(function(){e()&&(window.clearInterval(i),t(n)),50<o++&&(window.clearInterval(i),t(n=!0))},10)}void 0!==window.notificationCount&&(o.notificationCount=window.notificationCount,delete window.notificationCount),o.fetchNotification=function(){(null==o.lastUpdateTime||20<Math.abs(Math.floor(Date.now()/1e3)-o.lastUpdateTime))&&a.account.retrive10().then(function(e){o.notifications=e.data.notifications,o.notificationCount=e.data.notificationCount,o.noMoreNotifications=!1,o.lastUpdateTime=Math.floor(Date.now()/1e3)})},o.fetchNotificationNewDashboard=function(){(null==o.lastUpdateTime||20<Math.abs(Math.floor(Date.now()/1e3)-o.lastUpdateTime))&&a.account.retrive10().then(function(e){o.notifications=e.data.notifications,o.noMoreNotifications=!1,o.lastUpdateTime=Math.floor(Date.now()/1e3)})},o.fetchNotificationOld=function(){a.account.retrive10().then(function(e){o.notifications=e.data.notifications,o.notificationCount=e.data.notificationCount,o.showPopup("notifPop"),o.noMoreNotifications=!1})},o.fetchMoreNotification=function(t){var e=o.notifications[o.notifications.length-1].notificationID;a.account.retrive10AfterNotificationID(e).then(function(e){if(e&&e.data&&e.data.notifications&&e.data.notifications.length)return o.notifications=o.notifications.concat(e.data.notifications),o.notificationCount=o.notificationCount,jQuery(t).animate({scrollTop:jQuery(t)[0].scrollHeight},"slow"),!1;o.noMoreNotifications=!0})},o.fetchMoreNotificationNewDashboard=function(){var e=o.notifications[o.notifications.length-1].notificationID;a.account.retrive10AfterNotificationID(e).then(function(e){if(e&&e.data&&e.data.notifications&&e.data.notifications.length)return o.notifications=o.notifications.concat(e.data.notifications),!1;o.noMoreNotifications=!0})},o.hasPopupError=function(e){if(e)for(var t in e)if(e.hasOwnProperty(t)&&1==e[t])return!0;return!1},o.detectPrivateMode=function(t){var o,n;if(window.webkitRequestFileSystem)window.webkitRequestFileSystem(window.TEMPORARY,1,function(){o=!1},function(e){console.log(e),o=!0});else if(window.indexedDB&&/Firefox/.test(window.navigator.userAgent)){try{n=window.indexedDB.open("test")}catch(e){o=!0}void 0===o&&p(function(){return"done"===n.readyState},function(e){e||(o=!n.result)})}else if(function(e){var e=e.toLowerCase();if(0!==e.indexOf("msie")||0!==e.indexOf("trident"))return!!((e=/(?:msie|rv:)\s?([\d\.]+)/.exec(e))&&10<=parseInt(e[1],10))}(window.navigator.userAgent)){o=!1;try{window.indexedDB||(o=!0)}catch(e){o=!0}}else if(window.localStorage&&/Safari/.test(window.navigator.userAgent)){try{window.localStorage.setItem("test",1)}catch(e){o=!0}void 0===o&&(o=!1,window.localStorage.removeItem("test"))}p(function(){return void 0!==o},function(e){t(o)})}}]),angular.module("lpc").config(["$provide",function(e){e.decorator("$browser",["$delegate",function(e){return e.onUrlChange=function(){},e.url=function(){return""},e}])}]),angular.module("lpc").config(["$provide",function(e){e.decorator("$exceptionHandler",["$delegate",function(o){return function(e,t){o(e,t),e&&(e.stack||e.message?throwLpcJavascriptError("exception.stack:"+e.stack+"\nexception.message:"+e.message+"\ncause:"+t,"angular",1):throwLpcJavascriptError("exception:"+JSON.stringify(e)))}}])}]),angular.module("lpc").config(["$httpProvider",function(e){e.defaults.headers.get||(e.defaults.headers.get={}),e.defaults.headers.get["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT",e.defaults.headers.get["Cache-Control"]="no-cache",e.defaults.headers.get.Pragma="no-cache",e.interceptors.push(["$q",function(t){return{request:function(e){return window.lpcDomain&&!window.lpcDomain.match(new RegExp("FR|ES|IT","gi"))&&(e.headers["Lpc-Domain"]=window.lpcDomain),e||t.when(e)}}}])}]),angular.module("lpc").controller("saleCreationEditionController",["$scope","$rootScope","ServerFunction","Helper","$window","$location",function(l,n,o,t,i,e){l.pot=window.pot,l.edit=void 0!==window.pot,delete window.pot,l.pot||(l.pot={commisionTypePO:"included",position:{}}),void 0===window.testJS?window.testJS={$scope:l}:window.testJS.$scope=l,t.handleTag.bindChange({creation2:1,login:2}),t.handleTag.resetPage(),l.froalaOptions={toolbarSticky:!1,key:window.froalaLicenseKey,placeholderText:window.default_desc,heightMin:200,heightMax:257,theme:"custom",language:window.locale,pluginsEnabled:["image","table","lists","colors","video","lineBreaker","fontFamily","fontSize","link","emoticons","align"],toolbarButtons:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsMD:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsSM:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsXS:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],imageUploadURL:"/desc-image",imageUploadMethod:"POST",imageUploadParam:"upload",imageMaxSize:15728640,imageAllowedTypes:["jpeg","jpg","png"],videoInsertButtons:["videoBack","|","videoByURL"],videoResize:!0,events:{"froalaEditor.blur":function(){l.$broadcast("forala-editor-on-blur")},"froalaEditor.focus":function(){l.$broadcast("forala-editor-on-focus")}}},l.initialize=function(e){l.initControls=e,l.initControls.initialize(l.froalaOptions),l.deleteAll=function(){e.getEditor()("html.set","")}},l.initName=function(){var e=t.queryString;void 0!==e["nom-ticketerie"]&&(l.pot.namePO=e["nom-ticketerie"])},l.edit&&(l.pot=t.sale.formatClient(l.pot)),l.reInitDropDown=function(){l.pot.categoryPO={text:CATEGORIE_POT_LABELS.SALE,img:"Sale.png?h=hash",value:"SALE"}},l.reInitDropDown(),l.$on("lpc-popup-close-event",function(e,t){t&&"confirmRedirectionPopup"==t.popupName&&l.reInitDropDown()}),l.ddSelectOptions=t.pot.initCategoryArraySale(),l.changeIfRedirection=function(e){"SALE"!==e.value&&(n.showPopup("confirmRedirectionPopupLocal"),"REPAY"===e.value?l.selectedCategory=window.saleURLS.REPAY:"BIRTH"===e.value||"WEDDING"===e.value?(l.selectedCategory=window.saleURLS[e.value],l.selectedCategory.link=l.selectedCategory.link+"#from-sale-creation"):(l.selectedCategory=window.saleURLS.KITTY,l.selectedCategory.link=l.selectedCategory.link+"#"+e.value))},l.checkAdress=function(){o.pot.invite.checkAdress(l.person.emailPE).then(function(e){e.is_valid?l.propablyWrongMail=!1:l.propablyWrongMail=!0},function(e){l.propablyWrongMail=!1})},l.initPosition=function(o,n,e,i){i&&void 0!==i&&(a=1e3*i/100);var a,r=new Image;r.onload=function(){var e=r.width,t=r.height;l.maxWidthAutorized=e/t*460,a&&void 0!==a?a<=l.maxWidthAutorized&&(a=l.maxWidthAutorized):a=1e3,l.pot.position={x:o,y:n,w:a,wpercent:i},$("#photoPoInner").width(a),$("#photoPoInner").fadeTo("fast",1)},r.src=e},l.fakeZoomOn=function(){l.pot.position.w=Number(l.pot.position.w),$("#photoPoInner").animate({width:"+=30px"},150,function(){var e=100*$("#photoPoInner").width()/$("#photoPoInner").offsetParent().width();l.pot.position.w=$("#photoPoInner").width(),l.pot.position.wpercent=e})},$(window).on("resize",function(){var e=Math.min(window.innerWidth,1e3)*l.pot.position.wpercent/100;e<l.maxWidthAutorized&&(e=l.maxWidthAutorized),l.pot.position.w=e,$("#photoPoInner").width(e)}),l.initRepositonatePhoto=function(){l.dragShow=!0},l.exitRepositonatePhoto=function(){l.dragShow=!1},l.fakeZoomOut=function(){l.pot.position.w=Number(l.pot.position.w),!l.pot.photoPO.startsWith("data")&&$("#photoPoInner").width()-30<=l.maxWidthAutorized||$("#photoPoInner").animate({width:"-=30px"},150,function(){var e=100*$("#photoPoInner").width()/$("#photoPoInner").offsetParent().width();l.pot.position.w=$("#photoPoInner").width(),l.pot.position.wpercent=e})},l.submitEditSaleStepTwo=function(){o.billetterie.saleEdit(l.pot)},l.updateValidityQuantityTicket=function(){l.pot.quantityTicketPOActive||l.potCreationStepTwo.quantityTicketPO.$setValidity("numeric",!0)},l.updateReservedPlaceTicket=function(){l.pot.reservedPlacePOActive||l.potCreationStepTwo.reservedPlacePO.$setValidity("numeric",!0)};function a(){o.billetterie.saleNew(l.pot)}l.login=function(){if(void 0!==l.toLogUser.tfaCode){for(var e="",t=0;t<Object.keys(l.toLogUser.tfaCode).length;t++)e+=l.toLogUser.tfaCode[t];l.toLogUser.tfaCode=e}o.login(l.toLogUser).then(function(e){1==e.needSMSOrGoogleTfa?(n.hidePopupV2("lpcLoginSignupPopup"),n.showPopupV2("googleValidatorPopup",{toLogUser:l.toLogUser,afterSignin:reload})):1==e.needGoogleTfa?(n.hidePopupV2("lpcLoginSignupPopup"),n.showPopupV2("googleValidatorPopup",{toLogUser:l.toLogUser,afterSignin:a})):1==e.needSmsTfa?(n.hidePopupV2("lpcLoginSignupPopup"),n.showPopupV2("smsValidatorPopup",{toLogUser:l.toLogUser,afterSignin:a,telPE:e.telPE})):a()},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)if(e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"==e.data.fieldErrors[t].smsLimitSmsExceeded){n.hidePopupV2("lpcLoginSignupPopup"),n.showPopupV2("accountBlockedPopup");break}})},l.loginFB=function(){try{FB.login(function(e){e.authResponse&&(window.authResponse=e.authResponse,window.lpcLog("response "+JSON.stringify(e)),o.account.facebookConnect(JSON.stringify(e.authResponse)).then(function(e){o.billetterie.saleNew(l.pot)},function(e){"askForAnEmail"==e.data.fieldErrors[0].fb?n.showPopup("facebookPop"):l.facebookError=!0}))},{scope:"email,user_birthday",return_scopes:!0})}catch(e){n.detectPrivateMode(function(e){document.getElementsByClassName("cannot-load-facebook-api-error-message")[0].innerHTML=void 0!==e&&e?i.fbCannotLoadMessage:""})}},l.submitCreateSaleStepTwo=function(){l.logged?o.billetterie.saleNew(l.pot):t.handleTag.changePage("login")},l.submitCreateAccount=function(){o.billetterie.saleAndAccountNew(l.pot,l.person)}}]),angular.module("lpc").controller("billeterieDashbordController",["Helper","$scope","$rootScope","ServerFunction","$sce","$location",function(d,u,n,l,e,t){u.simpleDateOption={hideIfNoPrevNext:!0,changeYear:!0,changeMonth:!0,yearRange:"-100:+0"},u.showHideInvitePop=function(e){u.inviteID=e,n.showPopup("confirmDeleteInvite")},u.isPcWindow=function(){return d.isPcScreen()},u.fakeZoomOn=function(){u.pot.position.w=Number(u.pot.position.w),$("#photoPoInner").animate({width:"+=30px"},150,function(){var e=100*$("#photoPoInner").width()/$("#photoPoInner").offsetParent().width();u.pot.position.w=$("#photoPoInner").width(),u.pot.position.wpercent=e,o(e)})},setTimeout(function(){u.isIframe&&0!=u.isIframe||$(window).on("resize",function(){var e=window.innerWidth*u.pot.position.wpercent/100;e<u.maxWidthAutorized&&(e=u.maxWidthAutorized),u.pot.position.w=e,$("#photoPoInner").width(e)})},0),u.initRepositonatePhoto=function(){u.dragShow=!0},u.fakeZoomOut=function(){u.pot.position.w=Number(u.pot.position.w),$("#photoPoInner").width()-30<=u.maxWidthAutorized||$("#photoPoInner").animate({width:"-=30px"},150,function(){var e=100*$("#photoPoInner").width()/$("#photoPoInner").offsetParent().width();u.pot.position.w=$("#photoPoInner").width(),u.pot.position.wpercent=e,o(e)})};var o=function(e){l.pot.potEditPhotoZoom(u.pot.uniqPO,e).then(function(e){u.dragShow=!1},function(e){console.log(JSON.stringify(e))})},i=(u.applyPosition=function(){u.pot.position.loading=!0,l.pot.potEditPhotoPosition(u.pot.uniqPO,u.pot.position.x,u.pot.position.y).then(function(e){u.pot.position.loading=!1,u.dragShow=!1},function(e){u.pot.position.loading=!1,console.log(JSON.stringify(e))})},u.initPosition=function(e,t,o,n){n&&void 0!==n&&(i=n*window.innerWidth/100),u.pot.position={},u.pot.position.x=e,u.pot.position.y=t;var i,a=new Image;a.onload=function(){var e=a.width,t=a.height;u.maxWidthAutorized=e/t*460,i&&void 0!==i?i<=u.maxWidthAutorized&&(i=u.maxWidthAutorized):i=window.innerWidth,u.pot.position.w=i,u.pot.position.wpercent=n,$("#photoPoInner").width(i),$("#photoPoInner").fadeTo("fast",1)},a.src=o},setTimeout(function(){u.isFinished||d.handleTag.bindChange({participate:1,confirm:2})}),d.handleTag.resetPage(),u.editPayantInfo=function(){d.handleTag.changePage("information")},!(u.pot={})),p=(u.invites=[],u.closeSale=function(){l.updatePotStatus(u.pot.uniqPO,"closed")},u.activateSale=function(){l.updatePotStatus(u.pot.uniqPO,"running")},u.deleteInvite=function(){l.deleteInvite(u.inviteID).then(function(e){for(var t=0,o=u.invites.length;t<o;t++)if(u.invites[t].inviteID==e.inviteID)return u.invites.splice(t,1),n.hidePopup("confirmDeleteInvite"),0})},u.submitPromoCode=function(){l.billetterie.userpromocode(u.pot.uniqPO,u.promocode.codePC).then(function(e){u.promocode=e,u.caddie.codePC=e.codePC},function(e){u.promocodeError=!0,delete u.caddie.codePC})},u.$watch("caddie",function(e){p();var t=!1,o=(u.participation={total:0,com:0},u.promocode?u.promocode.leftPC:0);if(e)for(var n in e.tickets)if(e.tickets.hasOwnProperty(n)&&(delete u.tickets[n].reduction,e.tickets[n].quantity)){for(var i=0,a=0,r=0,l=e.tickets[n].quantity;r<l;r++){var s,c=u.tickets[n].price;for(s in e.tickets[n].option)e.tickets[n].option.hasOwnProperty(s)&&e.tickets[n].option[s].checked&&(c+=u.tickets[n].option[s].price);u.promocode&&u.promocode.uniqTIs&&u.promocode.uniqTIs.contains(n)&&!t?(u.promocode.oneShotPC&&!--o&&(t=!0),u.tickets[n].reduction&&(u.tickets[n].reduction+=Math.min(u.promocode.pricePC,c))||(u.tickets[n].reduction=Math.min(u.promocode.pricePC,c)),i+=c-Math.min(u.promocode.pricePC,c),a+=d.computeCom(c-Math.min(u.promocode.pricePC,c),u.pot)):(i+=c,a+=d.computeCom(c,u.pot))}u.participation.total+=i,u.participation.com+=a}return e},!0),u.showInviteList=function(){n.showPopup("inviteDlg"),i||l.billetterie.fetchInvites(u.pot.uniqPO).then(function(e){i=!0,u.invites=e})},u.goTo=function(){jQuery(".saleButtonFixed").length&&jQuery("html, body").animate({scrollTop:$("#sale-menu").offset().top},500)},u.participate=function(){$("html, body").animate({scrollTop:0},0),d.handleTag.changePage("participate")},function(){if(void 0!==u.ticketsForm){for(var e in u.caddie.tickets)if(u.caddie.tickets.hasOwnProperty(e)&&u.caddie.tickets[e].quantity&&0<u.caddie.tickets[e].quantity)return u.ticketsForm.$setValidity("quantityRequired",!0),!0;return u.ticketsForm.$setValidity("quantityRequired",!1),!1}});u.partInfoformSubmit=function(){var e,t=angular.copy(u.caddie);for(e in t.tickets)if(t.tickets.hasOwnProperty(e))if(t.tickets[e].quantity&&"0"!=t.tickets[e].quantity){for(var o in t.tickets[e].option)!t.tickets[e].option.hasOwnProperty(o)||t.tickets[e].option[o].checked||delete t.tickets[e].option[o];for(var n=0,i=t.tickets[e].person.length;n<i;n++){var a,r=t.tickets[e].person[n];for(a in r)r.hasOwnProperty(a)&&r[a]&&"object"==_typeof(r[a])&&r[a].getDate&&r[a].getMonth&&r[a].getFullYear&&(r[a]=d.formatDate(r[a]))}}else delete t.tickets[e];l.billetterie.createCaddie(u.pot.uniqPO,JSON.stringify(t)).then(function(e){for(var t={},o=0,n=(u.caddie.result=e).tickets.length;o<n;o++){var i=e.tickets[o];t[i.uniqTI]||(t[i.uniqTI]={},t[i.uniqTI].nameTI=i.nameTI,t[i.uniqTI].priceTI=i.priceTI,t[i.uniqTI].comTI=i.comTI,t[i.uniqTI].reduction=0,t[i.uniqTI].optionsAmount=0,t[i.uniqTI].quantity=0),t[i.uniqTI].quantity++,t[i.uniqTI].reduction+=i.reduction,t[i.uniqTI].optionsAmount+=i.optionsAmount}u.caddie.result.ticketsRecap=t,u.caddie.result.cardPayment&&!u.caddie.result.inscription?($("html, body").animate({scrollTop:0},0),d.handleTag.changePage("confirm"),u.$on("lpc-payment-iframe-directive-ready",function(){u.$broadcast("lpc-payment-iframe-ready",{href:u.caddie.result.cardPayment.href})})):window.location=u.caddie.result.inscriptionUrl})},u.totalQuantity=function(){var e=0;if(u.caddie&&u.caddie.tickets)for(var t in u.caddie.tickets)!u.caddie.tickets.hasOwnProperty(t)||isNaN(u.caddie.tickets[t].quantity)||(e+=parseInt(u.caddie.tickets[t].quantity));return e},u.smoneyCeilingReached=function(){return 3e3<u.participation.total},u.editPayantInfo=function(){d.handleTag.changePage("participate")}}]),angular.module("lpc").controller("addTicketController",["$scope","$rootScope","ServerFunction","Helper","$window","$sce",function(i,t,e,o,n,a){i.replaceLineBreaks=function(e){return e?a.trustAsHtml(e.replace(/\n\r?/g,"<br />")):a.trustAsHtml("")},i.submitUpdate=function(){e.billetterie.ticket.update(i.pot.uniqPO,i.ticket.uniqTI,i.ticket.nameTI,i.ticket.priceTI,i.ticket.quantityTI,i.ticket.quantityMinTI,i.ticket.quantityMaxTI,i.ticket.descTI,i.ticket.bloccolor&&i.ticket.bloccolor.hex,i.ticket.textcolor&&i.ticket.textcolor.hex,i.ticket.bloccolor&&i.ticket.bloccolor.rgb.t,i.ticket.image&&i.ticket.image.data?i.ticket.image.data:void 0,i.ticket.image&&i.ticket.image.corp&&i.ticket.image.corp.cord&&i.ticket.image.corp.cord.original.selection&&i.ticket.image.corp.cord.original.selection.x,i.ticket.image&&i.ticket.image.corp&&i.ticket.image.corp.cord&&i.ticket.image.corp.cord.original.selection&&i.ticket.image.corp.cord.original.selection.y,i.ticket.image&&i.ticket.image.corp&&i.ticket.image.corp.cord&&i.ticket.image.corp.cord.original.selection&&i.ticket.image.corp.cord.original.selection.width,i.ticket.image&&i.ticket.image.corp&&i.ticket.image.corp.cord&&i.ticket.image.corp.cord.original.selection&&i.ticket.image.corp.cord.original.selection.height)},i.submitAdd=function(){e.billetterie.ticket.create(i.pot.uniqPO,i.ticket.nameTI,i.ticket.priceTI,i.ticket.quantityTI,i.ticket.quantityMinTI,i.ticket.quantityMaxTI,i.ticket.descTI,i.ticket.bloccolor&&i.ticket.bloccolor.hex,i.ticket.textcolor&&i.ticket.textcolor.hex,i.ticket.bloccolor&&i.ticket.bloccolor.rgb.t,i.ticket.image&&i.ticket.image.data?i.ticket.image.data:void 0,i.ticket.image&&i.ticket.image.corp&&i.ticket.image.corp.cord&&i.ticket.image.corp.cord.original.selection&&i.ticket.image.corp.cord.original.selection.x,i.ticket.image&&i.ticket.image.corp&&i.ticket.image.corp.cord&&i.ticket.image.corp.cord.original.selection&&i.ticket.image.corp.cord.original.selection.y,i.ticket.image&&i.ticket.image.corp&&i.ticket.image.corp.cord&&i.ticket.image.corp.cord.original.selection&&i.ticket.image.corp.cord.original.selection.width,i.ticket.image&&i.ticket.image.corp&&i.ticket.image.corp.cord&&i.ticket.image.corp.cord.original.selection&&i.ticket.image.corp.cord.original.selection.height)},i.loadcallback=function(e){t.showPopup("idPopupCropeBackgroudTicket")},i.$watch("ticket.image.corp.cord",function(){var e,t,o,n;i.ticket&&i.ticket.image&&i.ticket.image.corp&&i.ticket.image.corp.cord&&i.ticket.image.corp.cord.boundx&&(e=Math.round(700/i.ticket.image.corp.cord.selection.w*i.ticket.image.corp.cord.boundx)+"px",t=Math.round(300/i.ticket.image.corp.cord.selection.h*i.ticket.image.corp.cord.boundy)+"px",o="-"+Math.round(700/i.ticket.image.corp.cord.selection.w*i.ticket.image.corp.cord.selection.x)+"px",n="-"+Math.round(300/i.ticket.image.corp.cord.selection.h*i.ticket.image.corp.cord.selection.y)+"px",i.ticket.image.previewStyle="width:"+e+";height:"+t+";margin-left:"+o+";margin-top:"+n+";")},!0),i.$watch("ticket.bloccolor",function(){var e="rgb";i.ticket&&i.ticket.bloccolor&&i.ticket.bloccolor.rgb&&(void 0!==i.ticket.bloccolor.rgb.t&&(e+="a"),e+="("+i.ticket.bloccolor.rgb.r+","+i.ticket.bloccolor.rgb.g+","+i.ticket.bloccolor.rgb.b,void 0!==i.ticket.bloccolor.rgb.t&&(e+=","+i.ticket.bloccolor.rgb.t/100),i.ticket.bloccolor.rgb.css=e+=")")},!0),i.hexToRgb=function(e){e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null}}]),angular.module("lpc").controller("addOptionController",["$scope","$rootScope","ServerFunction","Helper","$window",function(t,e,o,n,i){t.submitEditOption=function(){var e="string"==typeof t.option.dateLimitTO?t.option.dateLimitTO:t.option.dateLimitTO&&t.option.dateLimitTO.toLocaleDateString&&t.option.dateLimitTO.toLocaleDateString()||void 0;o.billetterie.ticket.option.update(t.pot.uniqPO,t.option.uniqTO,t.option.nameTO,t.option.priceTO,t.option.quantityTO,e,JSON.stringify(t.option.tickets))},t.submitCreateOption=function(){var e="string"==typeof t.option.dateLimitTO?t.option.dateLimitTO:t.option.dateLimitTO&&t.option.dateLimitTO.toLocaleDateString&&t.option.dateLimitTO.toLocaleDateString()||void 0;o.billetterie.ticket.option.create(t.pot.uniqPO,t.option.nameTO,t.option.priceTO,t.option.quantityTO,e,JSON.stringify(t.option.tickets))}}]),angular.module("lpc").controller("addPromoCodeController",["$scope","$rootScope","ServerFunction","Helper","$window",function(e,t,o,n,i){e.submitEditPromocode=function(){o.billetterie.ticket.promocode.update(e.pot.uniqPO,e.promocode.uniqPC,e.promocode.codePC,e.promocode.pricePC,e.promocode.oneShotPC,JSON.stringify(e.promocode.tickets))},e.submitCreatePromocode=function(){o.billetterie.ticket.promocode.create(e.pot.uniqPO,e.promocode.codePC,e.promocode.pricePC,e.promocode.oneShotPC,e.promocode.tickets&&JSON.stringify(e.promocode.tickets)||void 0)},e.randomCodePC=function(){e.promocode.codePC=n.getUniq(5)}}]),angular.module("lpc").controller("manageTicketsController",["$scope","$rootScope","ServerFunction","Helper","$window",function(o,t,n,e,i){o.activeTickets=window.activeTickets,delete window.activeTickets,o.activeTicketOptions=window.activeTicketOptions,delete window.activeTicketOptions,o.activePromoCode=window.activePromoCode,delete window.activePromoCode;o.updateticketCallback=function(e,t){n.billetterie.ticketpositionupdate(o.pot.uniqPO,JSON.stringify(e)).then(function(e){o.activeTickets=e},function(e){t()})},o.deleteTicketInit=function(e){o.actionticket={name:e.nameTI,uniq:e.uniqTI},t.showPopup("confirmationDeleteTicketPopUp")},o.deleteTicket=function(){n.billetterie.ticket.delete(o.pot.uniqPO,o.actionticket.uniq).then(function(e){o.activeTickets=e},function(e){}).then(function(){t.hidePopup("confirmationDeleteTicketPopUp")})},o.updateoptionCallback=function(e,t){n.billetterie.optionpositionupdate(o.pot.uniqPO,JSON.stringify(e)).then(function(e){o.activeTicketOptions=e},function(e){t()})},o.deleteOptionInit=function(e){o.actionoption={name:e.nameTO,uniq:e.uniqTO},t.showPopup("confirmationDeleteOptionPopUp")},o.deleteOption=function(){n.billetterie.ticket.option.delete(o.pot.uniqPO,o.actionoption.uniq).then(function(e){o.activeTicketOptions=e},function(e){}).then(function(){t.hidePopup("confirmationDeleteOptionPopUp")})},o.updatepromocodeCallback=function(e,t){n.billetterie.promocodepositionupdate(o.pot.uniqPO,JSON.stringify(e)).then(function(e){o.activePromoCode=e},function(e){t()})},o.deletePromocodeInit=function(e){o.actionpromocode={name:e.codePC,uniq:e.uniqPC},t.showPopup("confirmationDeletePromoCodePopUp")},o.deletePromocode=function(e){n.billetterie.ticket.promocode.delete(o.pot.uniqPO,o.actionpromocode.uniq).then(function(e){o.activePromoCode=e},function(e){}).then(function(){t.hidePopup("confirmationDeletePromoCodePopUp")})}}]),angular.module("lpc").controller("manageParticipantsController",["$scope","$rootScope","ServerFunction",function(o,n,i){o.participants=[],o.filterParticipants=function(e){return!o.filter||-1!=e.firstNameIN.toLowerCase().indexOf(o.filter.toLowerCase())||-1!=e.lastNameIN.toLowerCase().indexOf(o.filter.toLowerCase())||-1!=e.emailPE.toLowerCase().indexOf(o.filter.toLowerCase())},o.selectParticipant=function(e,t){o.selectedParticipantLoading=!0,n.showPopup("participantDetailsPopup"),i.billetterie.getParticipantInfo(e,t).then(function(e){null!=e&&(o.selectedParticipant=e,console.log(o.selectedParticipant)),o.selectedParticipantLoading=!1})},o.$on("lpc-paginator-begin-loading",function(){o.dataLoading=!0}),o.$on("lpc-paginator-done-loading",function(){o.dataLoading=!1}),o.updateSuccess=function(e){o.$broadcast("lpc-paginator-refresh-event")},o.refresh=function(){o.filter&&o.$broadcast("lpc-paginator-refresh-event")},o.updateError=function(e){console.log(e)},o.deleteParticipant=function(e){i.billetterie.ticket.deleteAdminAddedTickets(e,o.selectedParticipant.uniqIN).then(function(){o.refresh()})}}]),angular.module("lpc").controller("manageTransfersController",["$scope","$rootScope","ServerFunction",function(t,e,o){t.transfers=[],t.filterTransfers=function(e){return!t.filter||-1!=e.nameIB.toLowerCase().indexOf(t.filter.toLowerCase())},t.refresh=function(){t.filter&&t.$broadcast("lpc-paginator-refresh-event")},t.$on("lpc-paginator-begin-loading",function(){t.dataLoading=!0}),t.$on("lpc-paginator-done-loading",function(){t.dataLoading=!1})}]),angular.module("lpc").controller("manageFormsController",["$scope","$rootScope","ServerFunction","Helper","$window",function(e,t,o,n,i){e.validateDeleteForm=function(){o.billetterie.form.delete(e.pot.uniqPO,e.formToDelete.uniqFO).then(function(){i.location.reload()})}}]),angular.module("lpc").controller("ticketScanController",["$scope","$rootScope","ServerFunction","Helper","$window",function(e,t,o,n,i){e.ticketScanResetSubmit=function(e){o.billetterie.ticket.resetScan(e)}}]),angular.module("lpc").controller("formAddUpdateController",["$scope","$rootScope","ServerFunction","Helper","$window",function(a,e,t,o,n){a.form||(a.form={}),a.form.formFieldsOrdredByPosition=window.formFieldsOrdredByPosition,delete window.formFieldsOrdredByPosition;var i=0;a.addField=function(){i++,a.form.formFieldsOrdredByPosition||(a.form.formFieldsOrdredByPosition=[]),a.form.formFieldsOrdredByPosition.push({uniqFF:"new"+i}),a.form.order&&a.form.order.push("new"+i)},a.submitEditForm=function(){t.billetterie.form.edit(a.pot.uniqPO,a.form.uniqFO,a.form.nameFO,a.form.askEmailPerTicketFO,a.form.tickets&&JSON.stringify(a.form.tickets)||void 0,a.form.formFieldsOrdredByPosition&&JSON.stringify(a.form.formFieldsOrdredByPosition)||void 0,a.form.order&&JSON.stringify(a.form.order)||void 0)},a.submitCreateForm=function(){t.billetterie.form.create(a.pot.uniqPO,a.form.nameFO,a.form.askEmailPerTicketFO,a.form.tickets&&JSON.stringify(a.form.tickets)||void 0,a.form.formFieldsOrdredByPosition&&JSON.stringify(a.form.formFieldsOrdredByPosition)||void 0,a.form.order&&JSON.stringify(a.form.order)||void 0)},a.updatefieldsCallback=function(e,t){var o,n=[];for(o in e)for(var i in a.form.formFieldsOrdredByPosition)(i=a.form.formFieldsOrdredByPosition[i]).uniqFF==e[o]&&n.push(i);a.form.formFieldsOrdredByPosition=n,a.form.order=e}}]),angular.module("lpc").controller("trustpilotcontroller",["$scope",function(e){e.trustpilot=[{id:0,date:"Il y a 6 heures",desc:"C’est génial car facile d’utilisation et par ailleurs, j’apprécie la sécurité de paiement.",name:"June"},{id:1,date:"il y a 20 heures",desc:"C’est génial car facile d’utilisation et par ailleurs, j’apprécie la sécurité de paiement.",name:"Sophia"},{id:2,date:"Il y a un jour",desc:"D’une simplicité et rapidité déconcertantes ! Pour se réconcilier avec le paiement en ligne...",name:"Françoise"}],e.showAll=!1,e.delayHideTruspilotMobile=function(){setTimeout(function(){e.showAll=!1},3e3)}}]),angular.module("lpc").controller("solidaryKittiesSearchController",["$window","$scope","Helper","ServerFunction",function(n,a,i,e){a.showSearchTitle=!0,a.pots={},a.offset=0,a.potsPerPage=6,a.loadKittiesOnPageLoad=!0,String.prototype.endsWith||(String.prototype.endsWith=function(e){return-1!==this.indexOf(e,this.length-e.length)}),a.setImageStyle=function(e,t){return{"background-image":"url('"+e.photoDisp+"')","background-position":e.positionXPhotoPO?e.positionXPhotoPO+"%":(e.positionYPhotoPO,e.positionYPhotoPO+"%")}},a.progressTextStatic=$(document).find(".card--lps"),a.loadMore=function(){a.offset++,a.partialLoading=!0,e.pot.getSolidaryKitties(o()).then(function(e){a.partialLoading=!1,a.pots?a.pots.push.apply(a.pots,a.detectPotExtraFlag(e)):a.pots=e,e&&e.length&&0<e.length&&$("body, html").animate({scrollTop:$("#load-more-button").offset().top-120},1e3)})};function t(e){return(e=e.substr(2)).split("&").reduce(function(e,t){t=t.split("=");return e[t[0]]=t[1],e},{})}var o=function(){var e,t={},o=i.parseHashGetParams(window.location.hash);for(e in o)o.hasOwnProperty(e)&&o[e].length&&0<o[e].length&&(e&&e.toLowerCase&&e.toLowerCase().endsWith("sortby")?t.sortBy=o[e][0]:e&&e.toLowerCase&&e.toLowerCase().endsWith("filter")?t.filter=o[e][0]:e&&e.toLowerCase&&e.toLowerCase().endsWith("query")&&(t.query=o[e][0]));return t.sortBy||t.filter||t.query||(t.sortBy="most_recent",t.filter="all"),t.offset=a.offset,t.potsPerPage=a.potsPerPage,void 0!==n.overrideSortByFilter&&(t.sortBy=n.overrideSortByFilter),void 0!==n.overridePotsPerPage&&(t.potsPerPage=n.overridePotsPerPage),t};a.intializeKitties=function(){a.globalLoading=!0,e.pot.getSolidaryKitties(o()).then(function(e){a.pots=a.detectPotExtraFlag(e),a.globalLoading=!1})},a.detectPotExtraFlag=function(e){return e.forEach(function(e){null!=e.specificDataPO&&void 0!==e.specificDataPO&&JSON.parse(e.specificDataPO).hasOwnProperty("CcoLaureatAmount")&&(e.CcoLaureatAmount=!0)}),e},a.hashChangeCallback=function(){a.canChange=!0},$(window).on("hashchange",function(){a.adjustSolidaryFilterModal(),a.canChange&&(a.offset=0,a.globalLoading=!0,e.pot.getSolidaryKitties(o()).then(function(e){a.pots=a.detectPotExtraFlag(e),a.globalLoading=!1}))});a.SolidaryFilterModalState={initialHash:window.location.hash,canApplySolidaryModalFilter:!1,canApplySolidaryCategoryFilter:!1,canApplySolidaryClassFilter:!1,selectedSolidaryCategory:t(window.location.hash).filter,selectedSolidaryClass:t(window.location.hash).sortBy},$(window).width()<767&&$("input[name='searchKey']").attr("placeholder","Nom d'une collecte"),a.openMobileSolidaryFilterModal=function(){a.SolidaryFilterModalState={initialHash:window.location.hash,canApplySolidaryModalFilter:!1,canApplySolidaryCategoryFilter:!1,canApplySolidaryClassFilter:!1,selectedSolidaryCategory:t(window.location.hash).filter,selectedSolidaryClass:t(window.location.hash).sortBy},a.solidaryModalView=1,$("#solidaryFilterModal").fadeIn("fast"),angular.element("body").css({"overflow-y":"hidden"}),a.filterCanApplyMobile=!1},a.closeAndApplyMobileSolidaryFilterModal=function(){$("#solidaryFilterModal").fadeOut("fast"),angular.element("body").css({"overflow-y":"scroll"})},a.canceleMobileSolidaryFilterModal=function(){window.location.hash=a.SolidaryFilterModalState.initialHash,setTimeout(function(){$("[lpc-sort-item]").removeClass("active"),$("[lpc-filter-item]").removeClass("active"),$("[lpc-sort-item='"+t(a.SolidaryFilterModalState.initialHash).sortBy+"']").addClass("active"),$("[lpc-filter-item='"+t(a.SolidaryFilterModalState.initialHash).filter+"']").addClass("active")}),$("#solidaryFilterModal").fadeOut("fast"),angular.element("body").css({"overflow-y":"scroll"}),a.filterCanApplyMobile=!1},a.changeModalView=function(e){1==e&&$("#solidaryModalMainView").add($("#modal-main-title")).add($("#modal-main-button")).fadeIn("fast"),2==e&&($("#solidaryModalClassView").add($(".modal__header--back").add($("#modal-class-title")).add($("#modal-class-button"))).fadeIn("fast"),a.SolidaryFilterModalState.canApplySolidaryClassFilter=!1),3==e&&($("#solidaryModalCategoryView").add($(".modal__header--back").add($("#modal-category-title")).add($("#modal-category-button"))).fadeIn("fast"),a.SolidaryFilterModalState.canApplySolidaryCategoryFilter=!1),a.solidaryModalView=e},a.adjustSolidaryFilterModal=function(){a.SolidaryFilterModalState.canApplySolidaryModalFilter=!0,2==a.solidaryModalView&&(a.SolidaryFilterModalState.canApplySolidaryClassFilter=!0),3==a.solidaryModalView&&(a.SolidaryFilterModalState.canApplySolidaryCategoryFilter=!0)},a.resetFilter=function(){$("[lpc-sort-item='most_recent']").click(),$("[lpc-filter-item='all']").click(),a.search=""},a.searchKeyFocus=0,a.toggleSearchTitle=function(e){var t=document.getElementById("lps-search-kitty-title"),o=document.getElementById("lps-search-kitty-title-mobile"),n=angular.element(document.querySelector(".lpc-popup-v2-close-btn")),i=navigator.userAgent.match(/iPhone|iPad|iPod/i)?1:2;"focus"==e.type&&a.searchKeyFocus<i?($("input[name='searchKey']").blur(),a.searchKeyFocus+=1):("focus"==e.type&&a.searchKeyFocus>=i&&(t.style.opacity=1,o.style.opacity=1),"click"==e.type&&a.searchKeyFocus>=i&&n.addClass("lower-btn"),"blur"==e.type&&(t.style.opacity=0,o.style.opacity=0,n.removeClass("lower-btn")))},a.goToSolidarySearch=function(e){void 0===a.searchKey&&(a.searchKey="");var t=window.location.origin;window.location.pathname===e?(window.location.href=t+e+"#?query="+a.searchKey,window.location.reload(!1)):window.location.href=t+e+"#?query="+a.searchKey}}]),angular.module("lpc").controller("solidaryKittiesController",["$window","$scope","Helper","ServerFunction",function(n,i,a,e){i.pots={},i.offset=0,i.potsPerPage=18,String.prototype.endsWith||(String.prototype.endsWith=function(e){return-1!==this.indexOf(e,this.length-e.length)}),i.setImageStyle=function(e,t){return{"background-image":"url('"+e.photoDisp+"')","background-position":e.positionXPhotoPO?e.positionXPhotoPO+"%":(e.positionYPhotoPO,e.positionYPhotoPO+"%")}},i.loadMore=function(){i.offset++,i.partialLoading=!0,e.pot.getSolidaryKitties(t()).then(function(e){i.partialLoading=!1,i.pots?i.pots.push.apply(i.pots,i.detectPotExtraFlag(e)):i.pots=e,e&&e.length&&0<e.length&&$("body, html").animate({scrollTop:$("#load-more-button").offset().top-120},1e3)})};var t=function(){var e,t={},o=a.parseHashGetParams(window.location.hash);for(e in o)o.hasOwnProperty(e)&&o[e].length&&0<o[e].length&&(e&&e.toLowerCase&&e.toLowerCase().endsWith("sortby")?t.sortBy=o[e][0]:e&&e.toLowerCase&&e.toLowerCase().endsWith("filter")?t.filter=o[e][0]:e&&e.toLowerCase&&e.toLowerCase().endsWith("query")&&(t.query=o[e][0]));return t.sortBy||t.filter||t.query||(console.log("no data specified"),t.sortBy="most_recent",t.filter="all"),t.offset=i.offset,t.potsPerPage=i.potsPerPage,void 0!==n.overrideSortByFilter&&(t.sortBy=n.overrideSortByFilter),void 0!==n.overridePotsPerPage&&(t.potsPerPage=n.overridePotsPerPage),t};i.globalLoading=!0,e.pot.getSolidaryKitties(t()).then(function(e){i.pots=i.detectPotExtraFlag(e),i.globalLoading=!1}),i.detectPotExtraFlag=function(e){return e.forEach(function(e){null!=e.specificDataPO&&void 0!==e.specificDataPO&&JSON.parse(e.specificDataPO).hasOwnProperty("CcoLaureatAmount")&&(e.CcoLaureatAmount=!0)}),e},i.hashChangeCallback=function(){console.log("callback"),i.canChange=!0},$(window).on("hashchange",function(){i.canChange&&(i.offset=0,i.globalLoading=!0,e.pot.getSolidaryKitties(t()).then(function(e){i.pots=i.detectPotExtraFlag(e),i.globalLoading=!1}))})}]),angular.module("lpc").controller("solidaryKittiesHomeController",["$window","$scope","Helper","ServerFunction",function(e,t,o,n){t.progressTextStaticInit=$(document).find(".card--lps"),t.progressTextStaticInit&&t.progressTextStatic}]),angular.module("lpc").controller("signalPotController",["$scope","$rootScope","ServerFunction","ErrorHandler",function(e,t,o,n){e.signalPotToAdmin=function(){void 0===e.person.selectionOption&&(e.person.selectionOption=0),o.sendReportEmail(e.pot.uniqPO,e.person.email,e.person.message,e.person.selectionOption).then(function(){t.hidePopupV2("signalPot"),e.person.email="",e.person.message="",e.signalPotForm.$setPristine(!0),n.handle({data:{fieldErrors:[{msgok:"msgorgasendok"}]}})})}}]),angular.module("lpc").controller("potWebuyController",["$scope","$rootScope","ServerFunction","$filter",function(t,e,o,n){t.pots=window.pots,delete window.pots,t.filterconfig={},t.externalPotFilter=function(){return function(e){if(t.filterconfig.activated&&0==e.sumContributionIN)return!1;if(t.filterconfig.empty&&0==e.amountLeft)return!1;if(t.filterconfig.underLpc&&"IT"==e.creationDomainPO)return!1;if(t.filterconfig.underCollettiamo&&"FR"==e.creationDomainPO)return!1;if(t.filterconfig.active&&"RUNNING"!=e.statusPO)return!1;if(t.filterconfig.searchPE){e=angular.copy(e);if(e.creationDatePO=e.creationDatePO&&n("datetime")(e.creationDatePO),e.op6DateLimitePO=e.op6DateLimitePO&&n("datetime")(e.op6DateLimitePO),-1==JSON.stringify(e).indexOf(t.filterconfig.searchPE))return!1}return!0}}}]),angular.module("lpc").controller("potUtilisationArgentController",["$scope","$rootScope","ServerFunction","ErrorHandler","$window",function(n,e,t,o,i){n.isDisabledCancel=!1,n.getDisabledCancel=function(){return n.isDisabledCancel},n.setDisabledCancel=function(e){return n.isDisabledCancel=e},n.cancelOfferRequest=function(e){n.setDisabledCancel(!0),console.log(e),t.pot.potOfferCancel(e).then(function(){},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)e.data.fieldErrors[t].msgok&&"requestok"==e.data.fieldErrors[t].msgok?setTimeout(function(){i.location.href=i.location.href.substring(0,i.location.href.lastIndexOf("/"))},2e3):n.setDisabledCancel(!1)})},n.goToLink=function(e){i.location.href=e},n.applyStyleException=function(e){e&&$(window).load(function(){1===useMoneyChild.length&&768<=windowWidth&&(useMoneyGrid.css("height",300),setTimeout(function(){useMoneyGrid.css("height",useMoneyChild.innerHeight())},500))})}}]),angular.module("lpc").controller("potThanksController",["$scope","ServerFunction","Helper","ErrorHandler","$location",function(n,o,e,i,t){if(n.invites=window.invites,window.adminEmail){for(var a in n.invites)n.invites[a].emailPE==window.adminEmail&&(n.invites[a].admin=!0,n.invites[a].contributionIN)&&(n.inculdeAdmin=!0);delete window.adminEmail}delete window.invites,n.editorIframeUrl=$sce.trustAsResourceUrl($rootScope.editorIframeOrigin+"/custom-editor");var r=window.addEventListener?"addEventListener":"attachEvent";(0,window[r])("attachEvent"==r?"onmessage":"message",function(e){e.origin===$rootScope.editorIframeOrigin&&e.data&&e.data.description&&(n.message=e.data.description)}),n.initEditorIframe=function(){n.editorIframe=document.getElementById("editor-iframe"),n.editorIframe&&(n.editorIframe.onload=function(){n.editorIframe.contentWindow.postMessage({description:""},$rootScope.editorIframeOrigin)})},n.initEditorIframe(),n.froalaOptions={toolbarSticky:!1,key:window.froalaLicenseKey,placeholderText:"",heightMin:200,heightMax:257,theme:"custom",language:window.locale,pluginsEnabled:["image","table","lists","colors","video","lineBreaker","fontFamily","fontSize","link","emoticons","align"],toolbarButtons:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsMD:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsSM:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsXS:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],imageUploadURL:"/desc-image",imageUploadMethod:"POST",imageUploadParam:"upload",imageMaxSize:15728640,imageAllowedTypes:["jpeg","jpg","png"],videoInsertButtons:["videoBack","|","videoByURL"],videoResize:!0,events:{"froalaEditor.blur":function(){n.$broadcast("forala-editor-on-blur")},"froalaEditor.focus":function(){n.$broadcast("forala-editor-on-focus")}}},n.initialize=function(e){n.initControls=e,n.initControls.initialize(n.froalaOptions),n.deleteAll=function(){e.getEditor()("html.set","")}},n.customFilter=function(e){return!(!e||!e.emailPE||e.hide||!(!e.thankedIN&&!e.admin||e.admin&&n.inculdeAdmin||n.alreadyThanked&&!e.admin))},n.delete=function(o){angular.forEach(n.invites,function(e,t){e.inviteID==o.inviteID&&n.invites.splice(t,1)})},n.hide=function(e){e.admin?n.inculdeAdmin=!1:e.hide=!0},n.submitRevive=function(){0==n.invites.length?i.handle({data:{fieldErrors:[{page:"invite_liste_empty"}]}}):o.pot.potNewRevive(n.uniqPO,n.message,n.invites,n.typePO)},n.submitThanks=function(){var e,t=[];for(e in n.invites)n.invites[e]&&n.customFilter(n.invites[e])&&t.push(n.invites[e]);0==t?i.handle({data:{fieldErrors:[{page:"invite_liste_empty"}]}}):o.pot.potNewThanks(n.uniqPO,n.message,t,n.typePO)}}]),angular.module("lpc").controller("potReviveController",["$scope","ServerFunction","$filter","$timeout",function(o,e,t,n){function i(t){return function(e){return t==e.email}}var a,r="thank-offer-zero-popup",l=(o.showView2=!1,o.selectedContacts=[],o.contacts=[],o.allContactsSelected=!1,o.popupIndex=0,o.searchTextOnfocus=!1,o.searchText="",o.message="",o.pot=_.pick(window.currentPot,["uniqPO","namePO","potID"]),document.querySelector(".contacts-list")),s=(angular.element(".contacts").children().first().addClass("ready-to-be-selected"),o.refocus=function(){n(function(){angular.element(".revive-search").focus()},300)},o.$watch("searchText",function(e){angular.element(".ready-to-be-selected").removeClass("ready-to-be-selected"),n(function(){var e;angular.element(".contacts").children().first().addClass("ready-to-be-selected"),0!=(e=o.filteredContact()).length&&_.filter(e,function(e){return e.selected}).length==e.length?o.allContactsSelected=!0:o.allContactsSelected=!1},500)}),o.$watch("message",function(e){0<e.length?angular.element("textarea").addClass("not-transparent"):angular.element("textarea").removeClass("not-transparent")}),o.watchKeyPress=function(e){13==e.keyCode&&e.preventDefault()},angular.element(".search-block").bind("keydown",function(e){var t;38==e.keyCode&&0!=(t=angular.element(".ready-to-be-selected")).prev().length&&(t.removeClass("ready-to-be-selected"),t.prev().addClass("ready-to-be-selected"),t=document.querySelector(".ready-to-be-selected"),p(l,t,"up")),40==e.keyCode&&0!=(t=angular.element(".ready-to-be-selected")).next().length&&(t.removeClass("ready-to-be-selected"),t.next().addClass("ready-to-be-selected"),t=document.querySelector(".ready-to-be-selected"),p(l,t,"down")),13==e.keyCode&&(t=angular.element(".ready-to-be-selected p").text(),u(t))}),"revive-popup"==o.type?a=e.pot.revive.getReviveContacts:"thank-popup"==o.type?a=e.pot.thank.getThankContacts:o.type===r&&(a=e.pot.thank.getThankContactsOfferZero),null==o.pot.uniqPO&&(o.pot.uniqPO=o.$parent.$parent.$parent.popupData.uniqPO),a(o.pot.uniqPO).then(function(e){o.contacts=e.data;o.contacts=o.contacts.map(function(e){return e.selected=!1,e}),o.contacts.sort(function(e,t){e=e.email.toLowerCase(),t=t.email.toLowerCase();return e<t?-1:t<e?1:0})},function(e){console.log("ko")}),o.addRemoveAllContactsToRevive=function(){o.allContactsSelected?(o.allContactsSelected=!1,o.selectedContacts.length==o.contacts.length?(o.selectedContacts=[],o.contacts=o.contacts.map(c)):_.remove(o.selectedContacts,function(t){return null!=_.find(o.filteredContact(),function(e){return e.email==t.email})}).map(c)):(o.selectedContacts=o.selectedContacts.concat(o.filteredContact().filter(d).map(s)),o.allContactsSelected=!0)},o.filteredContactsCount=function(){return t("filter")(o.contacts,{email:o.searchText}).length},o.filteredContact=function(){return t("filter")(o.contacts,{email:o.searchText})},o.selectDiselectContact=function(e){0==e.selected?(e.selected=!0,o.selectedContacts.push(e),o.selectedContacts.length===o.contacts.length&&(o.allContactsSelected=!0)):(e.selected=!1,o.allContactsSelected=!1,o.selectedContacts.splice(o.selectedContacts.indexOf(e),1))},o.revive=function(){e.pot.revive.potRevive(o.pot.uniqPO,o.message,o.selectedContacts).then(function(e){o.popupIndex=1},function(e){o.popupIndex=2})},o.thank=function(){o.selectedContacts.map(function(e){e.emailPE=e.email}),o.allowNotAdmin=o.type===r,e.pot.thank.potThank(o.pot.uniqPO,o.message,o.selectedContacts,o.allowNotAdmin).then(function(e){o.popupIndex=1},function(e){o.popupIndex=2})},o.submit=function(){o.potRevive.$valid&&("revive-popup"==o.type?o.revive():o.thank())},o.showView2FN=function(){0==o.selectedContacts.length?(angular.element(".next-button").addClass("wiggle"),n(function(){angular.element(".next-button").removeClass("wiggle")},1e3)):o.showView2=!0},function(e){return e.selected=!0,e}),c=function(e){return e.selected=!1,e},d=function(e){return 0==o.selectedContacts.filter(i(e.email)).length},u=function(e){e=o.contacts.filter(i(e))[0];null==e?o.addRemoveAllContactsToRevive():o.selectDiselectContact(e)},p=function(e,t,o){var n=e.getBoundingClientRect(),i=e.clientHeight,t=(e.clientWidth,t.getBoundingClientRect());t.top>=n.top&&t.top+20<n.top+i||(e.scrollTop="down"==o?e.scrollTop+45:e.scrollTop-45,console.log(e.scrollTop))}}]),angular.module("lpc").controller("potPublicController",["$window","$scope",function(t,o){o.submitSearch=function(e){o.searchPotPublicKey&&""!=o.searchPotPublicKey&&(t.location=e+o.searchPotPublicKey)}}]),angular.module("lpc").controller("potParticipationRecapController",["$scope","ServerFunction","Helper","$sce","$location","ErrorHandler",function(r,o,n,t,e,i){r.invites=window.invites,delete window.invites,r.selectedPot={},r.participationAmountXPF=1e3*r.invites[0].contributionAndCommissionIN/8.38,r.editInvite=function(t){t.editing?o.pot.invite.editInviteParticipation(r.order_id,t.inviteID,t.firstNameIN,t.lastNameIN).then(function(e){angular.copy(e,t)}):t.editing=!0},r.stupidFun=function(e,t,o){console.log(e,t,o)},r.checkHideNameChange=function(t,e){t.hideNameIN&&0==e?o.pot.invite.editInviteHideName(r.order_id,t.inviteID,!1).then(function(e){angular.copy(e,t),i.handle({data:{fieldErrors:[{msgok:"pot_recap_identity_unhided"}]}})}):t.hideNameIN||1!=e||o.pot.invite.editInviteHideName(r.order_id,t.inviteID,!0).then(function(e){angular.copy(e,t),i.handle({data:{fieldErrors:[{msgok:"pot_recap_identity_hided"}]}})})},r.checkHideContributionINChange=function(t,e){t.hideContributionIN&&0==e?o.pot.invite.editInviteHideParticipation(r.order_id,t.inviteID,!1).then(function(e){angular.copy(e,t),i.handle({data:{fieldErrors:[{msgok:"pot_recap_amount_unhided"}]}})}):t.hideContributionIN||1!=e||o.pot.invite.editInviteHideParticipation(r.order_id,t.inviteID,!0).then(function(e){angular.copy(e,t),i.handle({data:{fieldErrors:[{msgok:"pot_recap_amount_hided"}]}})})},r.showSelectedPotFieldset=!1,r.initPartitipation=function(e,t){var o=window.location.origin;window.location=o+n.getUrl(e,t)+"?participation-amount="+((r.participationAmount||"")+"").replace(/,/g,".")},r.initSelectedPot=function(e){r.selectedPot=e,r.showSelectedPotFieldset=!0;var t=document.getElementsByClassName("text"),o=document.getElementsByClassName("filter"),n=document.getElementsByClassName("read-more"),i=document.getElementsByClassName("read-less"),a=document.getElementsByClassName("text-container");r.$watch(function(){return angular.element(t)[0].offsetHeight},function(){setTimeout(function(){300<angular.element(t)[0].scrollHeight?(angular.element(t).removeClass("no-max-height"),angular.element(t).addClass("set-max-height"),angular.element(o).removeClass("hide-element"),angular.element(o).addClass("show-element"),angular.element(n).removeClass("hide-element"),angular.element(n).addClass("show-element"),angular.element(a).removeClass("remove-margin"),angular.element(a).addClass("add-margin")):(angular.element(t).removeClass("set-max-height"),angular.element(t).addClass("no-max-height"),angular.element(n).removeClass("show-element"),angular.element(n).addClass("hide-element"),angular.element(o).removeClass("show-element"),angular.element(o).addClass("hide-element"),angular.element(i).removeClass("show-element"),angular.element(i).addClass("hide-element"),angular.element(a).removeClass("add-margin"),angular.element(a).addClass("remove-margin"))})},500)},r.trustAsHtml=function(e){return t.trustAsHtml(e)},r.setImageStyle=function(e,t){return{"background-image":"url('"+e.photoDisp+"')","background-position":e.positionXPhotoPO?e.positionXPhotoPO+"%":(e.positionYPhotoPO,e.positionYPhotoPO+"%")}}}]),angular.module("lpc").controller("potParticipationController",["$window","$scope","ServerFunction","Helper","$sce","$location","$interval",function(e,i,n,o,a,t,r){var l;function s(e){return{minutes:moment.duration(e).minutes(),seconds:moment.duration(e).seconds()}}i.$watch("caddie.payman.contributionMP",function(){null!=i.caddie.payman&&null!=i.caddie.payman.contributionMP&&(i.participationAmountXPF=1e3*i.caddie.payman.contributionMP/8.38)}),i.caddie||(i.caddie={}),window.payman&&(i.retry={payman:window.payman},i.caddie.payman||(i.caddie.payman={}),i.caddie.payman.firstNameMP=i.retry.payman.firstNameMP,i.caddie.payman.lastNameMP=i.retry.payman.lastNameMP,i.caddie.payman.emailMP=i.retry.payman.emailMP,i.caddie.messageCA=i.retry.payman.messageCA,l=i.$watch("pot.commissionIncludedPO",function(e){void 0!==e&&(i.caddie.payman.contributionMP=e?parseFloat(i.retry.payman.contributionAndComMP):parseFloat(i.retry.payman.contributionMP),l())}),delete window.payman),i.pot||(i.pot={}),o.handleTag.bindChange({participate2:1}),o.handleTag.resetPage(),i.initComs=function(e,t,o,n){i.pot.comFloorPO=o,i.pot.com1PO=e,i.pot.com2PO=t,i.pot.comMinPO=n},i.$watch("caddie.payman.contributionMP",function(){i.calculateTotalAndCom()},!0),i.calculateTotalAndCom=function(){var e;i.caddie&&i.caddie.payman&&i.caddie.payman.contributionMP&&0!==i.caddie.payman.length&&(0==i.caddie.payman.contributionMP&&(i.caddie.totalAndCom=0),e=i.caddie.payman.contributionMP.replace?parseFloat(i.caddie.payman.contributionMP.replace(/,|;/g,".")):i.caddie.payman.contributionMP,i.caddie.com=o.computeCom(e,i.pot),i.caddie.totalAndCom=i.caddie.com+e)},i.submitPaymentStepOne=function(){i.caddie.payman.contributionMP&&i.caddie.payman.contributionMP.replace&&(i.caddie.payman.contributionMP=parseFloat(i.caddie.payman.contributionMP.replace(/,|;/g,"."))),i.caddie.disabled=!0,n.pot.potNewCaddie(i.uniqPO,i.caddie).then(function(e){for(var t in e)e.hasOwnProperty(t)&&(i.caddie[t]=e[t]);i.caddie.messageCA=a.trustAsHtml(i.caddie.messageCA),o.handleTag.changePage("participate2"),i.smOperationId=e.result.cardPayment.operationId,i.smPayinTokenId=e.result.cardPayment.payinTokenId,i.smExtraData=e.result.cardPayment.extraData,setTimeout(function(){hostedFields.load()},500),$("html, body").animate({scrollTop:0},0)},function(e){i.caddie.disabled=!1})},i.submitPaymentStepOneNumworks=function(){i.caddie.payman.contributionMP&&i.caddie.payman.contributionMP.replace&&(i.caddie.payman.contributionMP=parseFloat(i.caddie.payman.contributionMP.replace(/,|;/g,"."))),i.caddie.disabled=!0,n.pot.potNewCaddieNumworks(i.uniqPO,i.caddie).then(function(e){for(var t in e)e.hasOwnProperty(t)&&(i.caddie[t]=e[t]);i.caddie.messageCA=a.trustAsHtml(i.caddie.messageCA),o.handleTag.changePage("participate2"),i.smOperationId=e.result.cardPayment.operationId,i.smPayinTokenId=e.result.cardPayment.payinTokenId,i.smExtraData=e.result.cardPayment.extraData,setTimeout(function(){hostedFields.load()},500),$("html, body").animate({scrollTop:0},0)},function(e){i.caddie.disabled=!1})},i.submitPaymentOM=function(e){var t=!!i.caddie.hideContributionCA,o=!!i.caddie.hideNameCA;n.pot.addOMParticipation(e,i.caddie.payman.firstNameMP,i.caddie.payman.lastNameMP,i.caddie.payman.emailMP,i.caddie.payman.contributionMP,o,t)},i.submitPaymentWithStoredCardPayment=function(){n.pot.potStoredCardPayment(i.uniqPO,i.caddie)},i.submitCreatePotStepTwo=function(){n.pot.potEdit(i.pot)},i.editPayantInfo=function(){i.caddie.disabled=!1,i.caddie.result&&(i.caddie.result.cardPayment.formContent=void 0,i.caddie.result.cardPayment.formAction=void 0),o.handleTag.resetPage()},i.dateLimit=moment(i.caddie.dateInitCA).add(10,"minutes"),i.remainingTime=s(i.dateLimit.diff(moment(),"milliseconds")),r(function(){i.dateLimit.diff(moment(),"milliseconds")<0?(i.remainingTime={minutes:0,seconds:0},e.location.reload()):i.remainingTime=s(i.dateLimit.diff(moment(),"milliseconds"))},1e3)}]),angular.module("lpc").controller("potOfferController",["$scope","ServerFunction","Helper","$sce","$location","$rootScope","$timeout",function(t,e,o,n,i,a,r){o.handleTag.bindChange({offer2:1}),o.handleTag.resetPage(),t.froalaOptions={toolbarSticky:!1,key:window.froalaLicenseKey,placeholderText:window.default_offer_desc,heightMin:200,heightMax:257,theme:"custom",language:window.locale,pluginsEnabled:["image","table","lists","colors","video","lineBreaker","fontFamily","fontSize","link","emoticons","align"],toolbarButtons:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsMD:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsSM:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsXS:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],imageUploadURL:"/desc-image",imageUploadMethod:"POST",imageUploadParam:"upload",imageMaxSize:15728640,imageAllowedTypes:["jpeg","jpg","png"],videoInsertButtons:["videoBack","|","videoByURL"],videoResize:!0,events:{"froalaEditor.blur":function(){t.$broadcast("forala-editor-on-blur")},"froalaEditor.focus":function(){t.$broadcast("forala-editor-on-focus")}}},t.initialize=function(e){t.initControls=e,t.initControls.initialize(t.froalaOptions)},t.editorIframeUrl=n.trustAsResourceUrl(a.editorIframeOrigin+"/custom-editor");n=window.addEventListener?"addEventListener":"attachEvent";(0,window[n])("attachEvent"==n?"onmessage":"message",function(e){e.origin===a.editorIframeOrigin&&e.data&&e.data.description&&(t.person.messagePE=e.data.description)}),t.initEditorIframe=function(){t.editorIframe=document.getElementById("editor-iframe"),t.editorIframe&&(t.editorIframe.onload=function(){var e=t.person&&t.person.messagePE?t.person.messagePE:"";t.editorIframe.contentWindow.postMessage({description:e},a.editorIframeOrigin)})},t.initEditorIframe(),t.submit=function(e){e===t.person.emailPE?(a.showPopup("sameemail"),r(function(){0<jQuery("[data-lpc-popup=sameemail]:visible").size()&&a.hidePopup("sameemail")},3e3)):o.handleTag.changePage("offer2")},t.submitNewOffer=function(){e.pot.potNewOffer(t.uniqPO,t.person).then(function(e){},function(e){o.kyc.handleKycErrorsNew(t,e,"kyc-block")})},t.submitPotOffer=function(){e.pot.potNewOfferCheckKyc(t.uniqPO).then(function(e){a.showPopupV2("confirmPotOffer")},function(e){o.kyc.handleKycErrorsNew(t,e,"kyc-block")})}}]),angular.module("lpc").controller("potOfferConfirmationController",["$scope","ServerFunction","Helper","$sce","$location","$rootScope","$timeout","$window",function(o,n,i,e,t,a,r,l){o.isWaitingForServer=!0,o.init=function(e,t){o.uniqPO=t,o.confirmationUniq=e,n.pot.potOfferValidation(e).then(function(e){o.isWaitingForServer=!1,o.okServer=!0},function(e){o.isWaitingForServer=!1,o.okServer=!1,i.kyc.handleKycErrors(o,e,"kyc-block","kyc-iframe-container","kycFrame")})},i.handleTag.bindChange({offer2:1}),o.froalaOptions={toolbarSticky:!1,key:window.froalaLicenseKey,toolbarButtons:["bold","italic","underline","strikeThrough","|","fontFamily","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],placeholderText:window.default_desc,heightMin:200,heightMax:257,theme:"custom",language:window.locale,pluginsEnabled:["image","table","lists","colors","video","lineBreaker","fontFamily","fontSize","link","emoticons"],events:{"froalaEditor.blur":function(){o.$broadcast("forala-editor-on-blur")},"froalaEditor.focus":function(){o.$broadcast("forala-editor-on-focus")}}},o.initialize=function(e){o.initControls=e,o.initControls.initialize(o.froalaOptions)},o.submit=function(e){e===o.person.emailPE?(a.showPopup("sameemail"),r(function(){0<jQuery("[data-lpc-popup=sameemail]:visible").size()&&a.hidePopup("sameemail")},3e3)):n.pot.potNewOfferCheckKyc(o.uniqPO).then(function(e){i.handleTag.changePage("offer2"),$("html, body").animate({scrollTop:0},0)},function(e){i.kyc.handleKycErrorsNew(o,e,"kyc-block")})}}]),angular.module("lpc").controller("potGenerateCardController",["$scope","ServerFunction","Helper","$sce","$location","$rootScope","$timeout",function(e,t,o,n,i,a,r){o.handleTag.bindChange({generate2:1}),o.handleTag.resetPage(),e.submit=function(e){o.handleTag.changePage("generate2"),$("html, body").animate({scrollTop:0},0)},e.submitNewOffer=function(){t.pot.potNewOffer(e.uniqPO,e.person)}}]),angular.module("lpc").controller("potExternalController",["$scope","$rootScope","ServerFunction","$filter",function(t,o,n,i){t.pots=window.pots,delete window.pots,t.filterconfig={},t.showcollectPoppup=function(e){t.selection.pot=e,t.selection.amount=e.amountLeft,o.showPopup("collect")},t.collectBenefciary=function(e){n.pot.collect.benefciary(e.uniqPO,t.selection.amount,t.selection.uniqIB).then(function(e){t.pots=e,o.hidePopup("collect")})},t.externalPotFilter=function(){return function(e){if(t.filterconfig.activated&&0==e.sumContributionIN)return!1;if(t.filterconfig.empty&&0==e.amountLeft)return!1;if(t.filterconfig.active&&"RUNNING"!=e.statusPO)return!1;if(t.filterconfig.searchPE){e=angular.copy(e);if(e.creationDatePO=e.creationDatePO&&i("datetime")(e.creationDatePO),e.op6DateLimitePO=e.op6DateLimitePO&&i("datetime")(e.op6DateLimitePO),-1==JSON.stringify(e).indexOf(t.filterconfig.searchPE))return!1}return!0}},t.closePot=function(t){n.updatePotStatus(t.uniqPO,"closed").then(function(e){t.statusPO=e})},t.activatePot=function(t){n.updatePotStatus(t.uniqPO,"running").then(function(e){t.statusPO=e})},t.proCollect=function(e){}}]),angular.module("lpc").controller("potDashboardV2Controller",["Helper","$window","$scope","$rootScope","ServerFunction","$location","$timeout","$sce","$filter",function(e,t,r,n,o,i,a,l,s){var c=0,d=(r.deleteGoalToReach=!1,r.deleteDeadlineToParticipate=!1,r.showOffercancellation=!0,r.trustAsHtml=function(e){return l.trustAsHtml(e)},r.editorIframeUrl=l.trustAsResourceUrl(n.editorIframeOrigin+"/custom-editor"),window.addEventListener?"addEventListener":"attachEvent");(0,window[d])("attachEvent"==d?"onmessage":"message",function(e){e.origin===n.editorIframeOrigin&&e.data&&e.data.description&&(r.pot.descriptionPO=e.data.description)}),r.initEditorIframe=function(){var e;r.editorIframe=document.getElementById("editor-iframe"),r.editorIframe&&(e=r.pot&&r.pot.descriptionPO?r.pot.descriptionPO:r.getPotDescription(),r.editorIframe.contentWindow.postMessage({description:e},n.editorIframeOrigin))},r.pot=e.pot.formatClient(angular.copy(window.currentPot)),n.showPopupSolidaryKitty=localStorage.getItem("showPopupSolidaryKitty"),r.pot.totalDisplay=window.totalDisplay,r.pot.totalAndComDisplay=window.totalAndComDisplay,r.isParticipant=window.isParticipant,delete window.totalDisplay,delete window.totalAndComDisplay,delete window.isParticipant,null!=window.deadlineToParticipate&&(r.deadlineToParticipate=window.deadlineToParticipate.date),delete window.deadlineToParticipate,r.goalToReachPercentage=function(){var e=0,e=r.pot.commissionIncludedPO?("number"!=typeof r.pot.totalAndComDisplay&&(r.pot.totalAndComDisplay=r.pot.totalAndComDisplay.trim().replace(/\s/g,""),r.pot.totalAndComDisplay=Number(r.pot.totalAndComDisplay.replace(/,/g,"."))),r.pot.totalAndComDisplay/r.pot.amountToReachPO*100):("number"!=typeof r.pot.totalDisplay&&(r.pot.totalDisplay=r.pot.totalDisplay.trim().replace(/\s/g,""),r.pot.totalDisplay=Number(r.pot.totalDisplay.replace(/,/g,"."))),r.pot.totalDisplay/r.pot.amountToReachPO*100);return s("number")(100<e?100:e,0)},r.showEditPotGeneralInfo=function(){n.$broadcast("edit-pot-general-info"),n.showPopupV2("potCreationEdition")},r.getPotDescription=function(){return null!=r.pot.categoryPO.description?r.pot.categoryPO.description.replace("'","&acute;"):window.default_desc},r.descPlaceholder=r.getPotDescription(),null!=window.domain&&(r.domain=window.domain),r.froalaOptions={key:window.froalaLicenseKey,placeholderText:r.descPlaceholder,heightMin:200,heightMax:257,theme:"custom",fullPage:!1,language:window.locale,pluginsEnabled:["image","table","lists","colors","video","lineBreaker","fontFamily","fontSize","link","emoticons","align"],toolbarButtons:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsMD:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsSM:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsXS:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],imageUploadURL:"/desc-image",imageUploadMethod:"POST",imageUploadParam:"upload",imageMaxSize:15728640,imageAllowedTypes:["jpeg","jpg","png"],videoInsertButtons:["videoBack","|","videoByURL"],videoResize:!0,events:{"froalaEditor.blur":function(){r.$broadcast("forala-editor-on-blur")},"froalaEditor.focus":function(){r.$broadcast("forala-editor-on-focus")}}},r.minlength=function(){return"SOLIDARY_KITTY"==r.pot.categoryPO.value&&"FR"!=r.domain?200:0},r.initialize=function(e){r.initControls=e,r.initControls.initialize(r.froalaOptions),r.deleteAll=function(){e.getEditor()("html.set","")}},r.oldPotDescription=r.pot.descriptionPO,r.submitPotDescription=function(){r.oldPotDescription=r.pot.descriptionPO,o.pot.potEditDecription(r.pot.uniqPO,r.pot.descriptionPO).then(function(e){r.showDescriptionEditor=!1,r.pot.descriptionPO=e.data.description},function(e){r.showDescriptionEditor=!1,r.pot.descriptionPO=r.oldPotDescription})},r.cancelPotDescriptionEdition=function(){r.pot.descriptionPO=r.oldPotDescription,r.showDescriptionEditor=!1},r.showDescriptionEditorFN=function(){r.pot.descriptionPO;r.showDescriptionEditor=!0,angular.element("pot-description-display").addClass("hide-border"),a(function(){r.initEditorIframe()})},r.submitAmountToReach=function(){0==r.pot.amountToReachPO&&null!=r.pot.amountToReachPO?n.showPopup("deleteGoalToReach"):o.pot.potEditAmountToReach(r.pot.uniqPO,r.pot.amountToReachPO).then(function(e){r.showGoalToReachInput=!1,r.$broadcast("change-goal-to-reach")},function(e){r.showGoalToReachInput=!1,r.pot.amountToReachPO=oldAmountToReach})},r.cancelAmountToReachEdition=function(){r.pot.amountToReachPO=r.oldAmountToReach,r.showGoalToReachInput=!1},r.showGoalToReachInputFN=function(){r.oldAmountToReach=r.pot.amountToReachPO,r.showGoalToReachInput=!0},r.deleteGoalToReachFN=function(){o.pot.potDeleteAmountToReach(r.pot.uniqPO).then(function(e){r.deleteGoalToReach=!0},function(e){})},r.submitDeadLineToParticipate=function(){null==r.pot.op6DateLimitePO?n.showPopup("deleteDeadlineToParticipate"):o.pot.potEditOp6DateLimitePO(r.pot.uniqPO,r.pot.op6DateLimitePO).then(function(e){r.showDeadLineToParticipate=!1,console.log(e.data.deadlineToParticipate),r.deadlineToParticipate=e.data.deadlineToParticipate},function(e){r.showDeadLineToParticipate=!1,r.pot.op6DateLimitePO=r.oldOp6DateLimitePO})},r.showDeadLineToParticipateFN=function(){r.oldOp6DateLimitePO=r.pot.op6DateLimitePO,r.showDeadLineToParticipate=!0},r.cancelDeadlineToParticipateEdition=function(){r.pot.op6DateLimitePO=r.oldOp6DateLimitePO,r.showDeadLineToParticipate=!1},r.deleteDeadlineToParticipateFN=function(){o.pot.potDeleteDeadlineToParticipate(r.pot.uniqPO).then(function(e){r.deleteDeadlineToParticipate=!0},function(e){})},r.showLoadMoreParticipants=!0,r.showFakeBorder=!1,r.loadMoreParticipants=function(){0===c&&(r.invites=[]),o.pot.getParticipantsPage(r.pot.uniqPO,48,c).then(function(e){r.invites=r.invites.concat(e.data),r.showLoadMoreParticipants=48===e.data.length&&r.invites.length<r.pot.participantCountPO,0===c&&r.invites.length<r.pot.participantCountPO&&(r.showFakeBorder=!0),c+=48})},(!r.isParticipant||r.isParticipant&&!r.pot.hidePartCountPO)&&r.pot.participantCountPO&&0<r.pot.participantCountPO&&r.loadMoreParticipants(),r.showCopyButton=!0,r.disableCopyButton=function(){console.log("$scope.showCopyButton : ",r.showCopyButton),r.showCopyButton=!1,a(function(){r.showCopyButton=!0},5e3)},r.initPosition=function(e,t,o,n){n&&void 0!==n&&(i=n*window.innerWidth/100),r.pot.position={},r.pot.position.x=e,r.pot.position.y=t;var i,a=new Image;a.onload=function(){var e=a.width,t=a.height;r.maxWidthAutorized=e/t*460,i&&void 0!==i?i<=r.maxWidthAutorized&&(i=r.maxWidthAutorized):i=window.innerWidth,r.pot.position.w=i,r.pot.position.wpercent=n,$("#generalInfoPhoto").width(i),$("#generalInfoPhoto").fadeTo("fast",1)},a.src=o},r.initImage=function(e,t){r.pot.size={w:e,h:t}};r.closePot=function(){o.updatePotStatus(r.pot.uniqPO,"closed")},r.activatePot=function(){o.updatePotStatus(r.pot.uniqPO,"running")},r.showHideInvitePop=function(e){r.inviteID=e,n.showPopup("confirmDeleteInvite")},r.deleteInvite=function(){o.deleteInvite(r.inviteID).then(function(e){for(var t=0,o=r.invites.length;t<o;t++)if(r.invites[t].inviteID==e.inviteID)return r.invites.splice(t,1),n.hidePopup("confirmDeleteInvite"),0})},r.showParticipationList=function(){n.showPopupV2("participantsListPopup")},r.goToLocation=function(e,t,o){e.preventDefault(),e.stopPropagation(),t&&(o?window.open(t,"_blank"):window.location=t)},r.showcancelOffering=!0,r.isDisabledCancel=!1,r.getDisabledCancel=function(){return r.isDisabledCancel},r.setDisabledCancel=function(e){return r.isDisabledCancel=e},r.cancelOfferRequest=function(e){o.pot.potOfferCancel(e).then(function(e){},function(e){if(console.log(e),e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)e.data.fieldErrors[t].msgok&&"requestok"==e.data.fieldErrors[t].msgok?(r.showInviteBlock=!0,r.showcancelOffering=!1,setTimeout(function(){var e=angular.element(".waiting-container"),t=e.outerHeight();e.css("height",t-4+"px"),setTimeout(function(){e.addClass("height0")},100)},2e3)):r.setDisabledCancel(!1)})}}]),angular.module("lpc").controller("potDashboardV1Controller",["Helper","$window","$scope","$rootScope","ServerFunction","$location",function(e,t,r,n,o,i){r.potCollectiamo=function(){r.pot=e.pot.formatClient(angular.copy($(window).currentPot)),r.pot.totalDisplay=$(window).totalDisplay,r.pot.totalAndComDisplay=$(window).totalAndComDisplay},r.initPartitipation=function(e){t.location=e+"?participation-amount="+((r.participationAmount||"")+"").replace(/,/g,".")},r.fakeZoomOn=function(){r.pot.position.w=Number(r.pot.position.w),$("#photoPoInner").animate({width:"+=30px"},150,function(){var e=100*$("#photoPoInner").width()/$("#photoPoInner").offsetParent().width();r.pot.position.w=$("#photoPoInner").width(),r.pot.position.wpercent=e,a(e)})},$(window).on("resize",function(){var e;void 0!==r.pot.position&&void 0!==r.pot.position.wpercent&&((e=window.innerWidth*r.pot.position.wpercent/100)<r.maxWidthAutorized&&(e=r.maxWidthAutorized),r.pot.position.w=e,$("#photoPoInner").width(e))}),r.initRepositonatePhoto=function(){r.dragShow=!0},r.fakeZoomOut=function(){r.pot.position.w=Number(r.pot.position.w),$("#photoPoInner").width()-30<=r.maxWidthAutorized||$("#photoPoInner").animate({width:"-=30px"},150,function(){var e=100*$("#photoPoInner").width()/$("#photoPoInner").offsetParent().width();r.pot.position.w=$("#photoPoInner").width(),r.pot.position.wpercent=e,a(e)})};var a=function(e){o.pot.potEditPhotoZoom(r.pot.uniqPO,e).then(function(e){r.dragShow=!1},function(e){console.log(JSON.stringify(e))})},l=(r.applyPosition=function(){r.pot.position.loading=!0,o.pot.potEditPhotoPosition(r.pot.uniqPO,r.pot.position.x,r.pot.position.y).then(function(e){r.pot.position.loading=!1,r.dragShow=!1},function(e){r.pot.position.loading=!1,console.log(JSON.stringify(e))})},r.isPcWindow=function(){return e.isPcScreen()},r.initPosition=function(e,t,o,n){n&&void 0!==n&&(i=n*window.innerWidth/100),r.pot.position={},r.pot.position.x=e,r.pot.position.y=t;var i,a=new Image;a.onload=function(){var e=a.width,t=a.height;r.maxWidthAutorized=e/t*460,i&&void 0!==i?i<=r.maxWidthAutorized&&(i=r.maxWidthAutorized):i=window.innerWidth,r.pot.position.w=i,r.pot.position.wpercent=n,$("#photoPoInner").width(i),$("#photoPoInner").fadeTo("fast",1)},a.src=o},!(r.initImage=function(e,t){r.pot.size={w:e,h:t}}));r.closePot=function(){o.updatePotStatus(r.pot.uniqPO,"closed")},r.activatePot=function(){o.updatePotStatus(r.pot.uniqPO,"running")},r.showHideInvitePop=function(e){r.inviteID=e,n.showPopup("confirmDeleteInvite")},r.deleteInvite=function(){o.deleteInvite(r.inviteID).then(function(e){for(var t=0,o=r.invites.length;t<o;t++)if(r.invites[t].inviteID==e.inviteID)return r.invites.splice(t,1),n.hidePopup("confirmDeleteInvite"),0})},r.showInviteList=function(){n.showPopup("inviteDlg"),l||o.pot.fetchInvites(r.pot.uniqPO).then(function(e){l=!0,r.invites=e})},r.showParticipationList=function(){n.showPopup("participantDlg"),l||o.pot.fetchInvites(r.pot.uniqPO).then(function(e){l=!0,r.invites=e})},r.demoSwitchToAdminMode=function(){o.pot.demo.enableAdminMode(!0)},r.demoSwitchToInviteMode=function(){o.pot.demo.enableAdminMode(!1)},r.goToLocation=function(e,t){console.log("here!!"),e&&(t?window.open(e,"_blank"):window.location=e)},r.isDisabledCancel=!1,r.getDisabledCancel=function(){return r.isDisabledCancel},r.setDisabledCancel=function(e){return r.isDisabledCancel=e},r.cancelOfferRequest=function(e){r.setDisabledCancel(!0),console.log(e),o.pot.potOfferCancel(e).then(function(){},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)e.data.fieldErrors[t].msgok&&"requestok"==e.data.fieldErrors[t].msgok?setTimeout(function(){var e=angular.element(".waiting-container"),t=e.outerHeight();e.css("height",t-4+"px"),setTimeout(function(){e.addClass("height0")},100)},2e3):r.setDisabledCancel(!1)})},r.$watch("participationAmount",function(){null!=r.participationAmount&&(r.participationAmountXPF=1e3*r.participationAmount/8.38)})}]),angular.module("lpc").controller("potCreationController",["$window","$scope","ipCookie","ServerFunction","Helper","ErrorHandler","$rootScope","$location","$timeout","$filter","$sce",function(t,d,u,n,p,i,a,e,o,r,l){d.hide=a.hidePopup,d.editorIframeUrl=l.trustAsResourceUrl(a.editorIframeOrigin+"/custom-editor");function s(e,t){if(t=void 0!==t?t:window.subdomain,"SILVER"===a.subdomainType&&t!==a.subdomains.SMARTBOX)d.ddSelectOptions=p.pot.initSilverCategoriesArray();else if("INTERNAL"===a.subdomainType)d.ddSelectOptions=p.pot.initNatixisCategoryArray();else switch(t){case a.subdomains.MASHAREECOLE:d.ddSelectOptions=p.pot.initMashareecoleCategoryArray();break;case a.subdomains.RELAIS_CHATEAU:case a.subdomains.SMARTBOX:d.ddSelectOptions=p.pot.initRelaisChateauCategoryArray();break;case a.subdomains.CFV:d.ddSelectOptions=p.pot.initCfvCategoryArray();break;case a.subdomains.CAISSE_EPARGNE_NORMANDIE:d.ddSelectOptions=p.pot.initCaisseEpargneNormandieCategoryArray();break;case a.subdomains.CADO_STORE:d.ddSelectOptions=p.pot.initCadostoreCategoryArray();break;case a.subdomains.OUEST_BANQUEPOPULAIRE:d.ddSelectOptions=p.pot.initOuestBanquePopulaireCategoryArray();break;case a.subdomains.NATIXIS:case a.subdomains.MAISONS_DU_MONDE:case a.subdomains.JCDECAUX:case a.subdomains.GROUPE_M6:case a.subdomains.VOYAGES_SNCF:case a.subdomains.GROUPE_BPCE:case a.subdomains.BPALC_BANQUEPOPULAIRE:case a.subdomains.VENTE_PRIVEE:case a.subdomains.NUMBERLY:case a.subdomains.SNCF:case a.subdomains.COMITEO:case a.subdomains.LEQUIPE:case a.subdomains.DALENYS:case a.subdomains.PUBLICIS:case a.subdomains.SAFRANGROUP:case a.subdomains.FNACDARTY:case a.subdomains.GROUPE_TF1:d.ddSelectOptions=p.pot.initNatixisCategoryArray();break;case a.subdomains.DECATHLON:d.ddSelectOptions=p.pot.initDecathlonCategoryArray();break;case a.subdomains.APEL:d.ddSelectOptions=p.pot.initApelCategoryArray();break;case a.subdomains.IZLY:d.ddSelectOptions=p.pot.initIzlyCategoryArray();break;case a.subdomains.NATURE_ET_DECOUVERTES:d.ddSelectOptions=p.pot.initNatureetdecouvertesCategoryArray();break;case a.subdomains.BANQUE_TAHITI:d.ddSelectOptions=p.pot.initBanqueDeTahitiCategoryArray();break;case a.subdomains.BANQUE_NOUVELLE_CALEDONIE:d.ddSelectOptions=p.pot.initBanqueDeNouvelleCaledonieCategoryArray();break;case a.subdomains.BISCUIT_MISTRAL:d.ddSelectOptions=p.pot.initBiscuitMistralCategoryArray();break;case a.subdomains.DONS_DANS_NOS_COEURS:d.ddSelectOptions=p.pot.initDncCategoryArray();break;case a.subdomains.CREDIT_COOPERATIF:d.ddSelectOptions=p.pot.initCreditCooperatifCategoryArray(),d.solidarySelectOptions=p.pot.initAssociationCategoryArray();break;case a.subdomains.MACABANE:d.ddSelectOptions=p.pot.initMacabaneCategoryArray();break;case a.subdomains.HOTELSPREFERENCE:d.ddSelectOptions=p.pot.initHotelsPreferenceCategoryArray();break;case a.subdomains.CRITEO:case a.subdomains.COPINES_DE_VOYAGE:case a.subdomains.DANSNOSCOEURS:case a.subdomains.GUERI_D_UN_CANCER:d.ddSelectOptions=p.pot.initCriteoCategoryArray();break;default:"DE"==window.domain?d.ddSelectOptions=p.pot.initCategoryArrayDE():d.ddSelectOptions=e?p.pot.initCategoryArrayWithoutRepay():p.pot.initCategoryArray(),d.solidarySelectOptions=p.pot.initSolidaryCategoryArray()}}function c(){d.pot.promoCode&&""!==d.pot.promoCode||(d.potCreationStepTwo.namePCC.$setValidity("Code promo invalide",!1),d.potCreationStepTwo.namePCC.$setValidity("serverError",!1),d.potCreationStepTwo.namePCC.$setValidity("required",!1),d.promoCodeError="",d.promoCodeSuccess="",angular.element(document.querySelector("#promoCode")).removeClass("greenValid"))}function f(){n.pot.potNew(d.pot).then(function(){d.$broadcast("create-edit-pot-done-event",{index:2})},function(e){if(d.$broadcast("create-edit-pot-error-event",{index:2}),e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t in e.data.fieldErrors)!e.data.fieldErrors[t]||"notlogged"!=e.data.fieldErrors[t].person||p.cookieEnabled()||i.handle({data:{fieldErrors:[{page:"needCookiePot"}]}})})}function g(){function t(){n.pot.potNewReduced(d.pot).then(function(){},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t in e.data.fieldErrors)!e.data.fieldErrors[t]||"notlogged"!=e.data.fieldErrors[t].person||p.cookieEnabled()||i.handle({data:{fieldErrors:[{page:"needCookiePot"}]}})})}d.pot.promoCode?n.pot.promoCode.submitPromoCode(d.pot.promoCode).then(function(e){t()},function(e){}):t()}function m(e,t){for(var o in d[e])if(o==t)return 1}function h(){d.logged?(d.$broadcast("create-edit-pot-loading-event",{index:2}),n.pot.potNew(d.pot).then(function(){d.$broadcast("create-edit-pot-done-event",{index:2})},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t,o=!1,n=e.data.fieldErrors.length,i=0;i<n;i++){for(t in e=e.data.fieldErrors[i])m("potCreationStepOne",t)&&(o=!0),m("potCreationStepTwo",t);if(o)break}o?d.stepOneSubmitted||p.handleTag.resetPage():p.handleTag.changePage("creation2"),d.$broadcast("create-edit-pot-error-event",{index:2})})):(p.handleTag.changePage("login"),$("html, body").animate({scrollTop:0},0))}var l=window.addEventListener?"addEventListener":"attachEvent",l=((0,window[l])("attachEvent"==l?"onmessage":"message",function(e){e.origin===a.editorIframeOrigin&&e.data&&e.data.description&&(d.pot.descriptionPO=e.data.description)}),d.initEditorIframe=function(){d.editorIframe=document.getElementById("editor-iframe"),d.editorIframe&&(d.editorIframe.onload=function(){var e=d.pot&&d.pot.descriptionPO?d.pot.descriptionPO:d.getPotDescription();d.editorIframe.contentWindow.postMessage({description:e},a.editorIframeOrigin)})},d.initEditorIframe(),window.isPotCreationEditionPopup?d.isPotCreationEditionPopup=!0:d.isPotCreationEditionPopup=!1,"numworks"===t.location.host.split(".")[0]&&angular.element("#content").css("background-color","#f1f4f9"),d.getCategoryLabel=function(e){return"undefined"==typeof CATEGORIE_POT_LABELS?"":window.CATEGORIE_POT_LABELS[e]},a.$on("reset-categoryPO",function(){d.editorIframe&&d.editorIframe.contentWindow.postMessage(CATEGORIE_POT_DESCRIPTION.BIRTHDAY,a.editorIframeOrigin),d.pot.categoryPO={text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY",description:CATEGORIE_POT_DESCRIPTION.BIRTHDAY,header:HEADER_POT_DESCRIPTION.BIRTHDAY}}),d.getSolidaryCategoryLabel=function(e){return"undefined"==typeof CATEGORIE_POT_LABELS?"":window.SOLIDARY_KITTIES_CATEGORIES_LABELS[e]},d.potInit=function(e,t){if(void 0!==d.pot||void 0!==window.currentPot&&e)d.isPotCreation=!1,d.pot=void 0===d.pot?p.pot.formatClient(angular.copy(window.currentPot)):d.pot,d.potCopy=angular.copy(d.pot),d.originalPO=angular.copy(window.currentPot),s(e,t),d.pot.position={};else{d.isPotCreation=!0,d.pot={op7TypeContributionPO:"REGULAR",position:{}},s(e,t);e=t;if(e=void 0!==e?e:window.subdomain,void 0!==window.location.hash.substr(1)){var o=window.location.hash.substr(1),n=!0;if(angular.forEach(d.ddSelectOptions,function(e,t){if(n&&-1!==o.toUpperCase().indexOf(e.value.toUpperCase())&&(n=!1,d.pot.categoryPO={text:e.text,img:e.img,value:e.value,description:e.description,header:e.header},"SOLIDARY_KITTY"==e.value))switch(window.subdomain){case"creditcooperatif":d.pot.solidaryCategoryPO={text:SOLIDARY_KITTIES_CATEGORIES_LABELS.SOCIAL,img:"SolidaryCreditCop8.png",value:"SOCIAL"};break;case"dansnoscoeurs":d.pot.solidaryCategoryPO={text:SOLIDARY_KITTIES_CATEGORIES_LABELS.ASSOCIATION,img:"Solidary1.png",value:"ASSOCIATION"};break;default:d.pot.solidaryCategoryPO={text:SOLIDARY_KITTIES_CATEGORIES_LABELS.ANIMALS,img:"Solidary0.png",value:"ANIMALS"}}}),window.isLpsDomain&&(d.pot.categoryPO={text:CATEGORIE_POT_LABELS.SOLIDARY_KITTY,img:"Pot17.png",value:"SOLIDARY_KITTY",description:CATEGORIE_POT_DESCRIPTION.SOLIDARY_KITTY,header:HEADER_POT_DESCRIPTION.SOLIDARY_KITTY},d.pot.solidaryCategoryPO={text:SOLIDARY_KITTIES_CATEGORIES_LABELS.ANIMALS,img:"Solidary0.png",value:"ANIMALS"},n=!1),n)if("undefined"!=typeof CATEGORIE_POT_LABELS)if("SILVER"===a.subdomainType&&e!==a.subdomains.SMARTBOX)d.pot.categoryPO={text:CATEGORIE_POT_LABELS.BIRTHDAY,img:a.subdomain,value:"BIRTHDAY"};else switch(e){case a.subdomains.CREDIT_COOPERATIF:d.pot.categoryPO={text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"creditcooperatif0.png?h=hash",value:"BIRTHDAY"};break;case a.subdomains.CFV:d.pot.categoryPO={text:CATEGORIE_POT_LABELS.CFV_WEDDING,img:"wedding-mini.jpg?h=hash",value:"CFV_WEDDING"};break;case a.subdomains.NATIXIS:d.editorIframe&&d.editorIframe.contentWindow.postMessage(CATEGORIE_POT_DESCRIPTION.BIRTHDAY,a.editorIframeOrigin),d.pot.categoryPO={text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"Pot1.png?h=hash",value:"DEPARTURE_KITTY",description:CATEGORIE_POT_DESCRIPTION.DEPARTURE_KITTY,header:HEADER_POT_DESCRIPTION.DEPARTURE_KITTY};break;case a.subdomains.APEL:d.pot.categoryPO={text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"Pot12.png?h=hash",value:"COMMON_GIFT"};break;case a.subdomains.NATURE_ET_DECOUVERTES:d.pot.categoryPO={text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"natureetdecouvertes.png?h=hash",value:"BIRTHDAY"};break;case a.subdomains.BANQUE_TAHITI:d.pot.categoryPO={text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"banque-tahiti0.png?h=hash",value:"BIRTHDAY"};break;case a.subdomains.BANQUE_NOUVELLE_CALEDONIE:d.pot.categoryPO={text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"bnc0.png?h=hash",value:"BIRTHDAY",header:HEADER_POT_DESCRIPTION.BIRTHDAY};break;case a.subdomains.BISCUIT_MISTRAL:d.pot.categoryPO={text:CATEGORIE_POT_LABELS.MISTRAL_GROUPED_ORDER,img:"biscuitMistralPot.png?h=hash",value:"MISTRAL_GROUPED_ORDER"};break;case a.subdomains.DONS_DANS_NOS_COEURS:d.pot.categoryPO={text:CATEGORIE_POT_LABELS.DNC,img:"donsDansNosCoeursPot.png?h=hash",value:"DNC"};break;case a.subdomains.NUMWORKS:d.pot.categoryPO={text:CATEGORIE_POT_LABELS.NUMWORKS,img:"numworks50.png?h=hash",value:"NUMWORKS"};break;case a.subdomains.MACABANE:d.pot.categoryPO={text:CATEGORIE_POT_LABELS.OTHER,img:"Pot11.png?h=hash",value:"OTHER"};break;case a.subdomains.HOTELSPREFERENCE:d.pot.categoryPO={text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"hotelspreference.jpg?h=hash",value:"BIRTHDAY"};break;default:"undefined"!=typeof HEADER_POT_DESCRIPTION&&"undefined"!=typeof CATEGORIE_POT_DESCRIPTION?(d.editorIframe&&d.editorIframe.contentWindow.postMessage(CATEGORIE_POT_DESCRIPTION.BIRTHDAY,a.editorIframeOrigin),d.pot.categoryPO={text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY",description:CATEGORIE_POT_DESCRIPTION.BIRTHDAY,header:HEADER_POT_DESCRIPTION.BIRTHDAY}):d.pot.categoryPO={text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY"}}else d.pot.categoryPO={}}else"undefined"!=typeof CATEGORIE_POT_LABELS?d.pot.categoryPO={text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY"}:d.pot.categoryPO={};t=p.queryString;void 0!==t["nom-pot"]&&(d.pot.namePO=t["nom-pot"])}},d.potInit(!0,window.subdomain),p.handleTag.serachHash()),P=(l&&void 0!==l.category&&!isNaN(l.category)&&(d.pot.categoryPO=d.ddSelectOptions[l.category]),d.initVvfVillagesPot=function(){d.pot.categoryPO.img="Pot20.png",d.pot.categoryPO.value="VVF_VILLAGES",d.pot.categoryPO.text="VVF_VILLAGES"},d.initVvfVillagesPotEdit=function(){d.pot.categoryPO.img="Pot20.png",d.pot.categoryPO.value="VVF_VILLAGES",d.pot.categoryPO.text="VVF_VILLAGES"},d.initVvfVillagesCarteCadeauPot=function(){d.pot.categoryPO.img="Pot29.png",d.pot.categoryPO.value="VVF_VILLAGES_CARTE_CADEAU",d.pot.categoryPO.text="VVF_VILLAGES_CARTE_CADEAU"},d.initVvfVillagesCarteCadeauPotEdit=function(){d.pot.categoryPO.img="Pot29.png",d.pot.categoryPO.value="VVF_VILLAGES_CARTE_CADEAU",d.pot.categoryPO.text="VVF_VILLAGES_CARTE_CADEAU"},d.initIwantitPot=function(){d.pot.categoryPO.img="Pot30.png",d.pot.categoryPO.value="I_WANTIT",d.pot.categoryPO.text="I_WANTIT"},d.initIwantitPotEdit=function(){d.pot.categoryPO.img="Pot30.png",d.pot.categoryPO.value="I_WANTIT",d.pot.categoryPO.text="I_WANTIT"},d.initGroupcornerPot=function(){d.pot.categoryPO.img="Pot31.png",d.pot.categoryPO.value="GROUPCORNER",d.pot.categoryPO.text="GROUPCORNER",d.pot.amountToReachPO=!0,d.pot.op7TypeContributionPO="SUGGESTED"},d.initGroupcornerPotEdit=function(){d.pot.categoryPO.img="Pot31.png",d.pot.categoryPO.value="GROUPCORNER",d.pot.categoryPO.text="GROUPCORNER"},d.initEvaneosPot=function(){d.pot.categoryPO.img="Pot32.png",d.pot.categoryPO.value="EVANEOS",d.pot.categoryPO.text="EVANEOS"},d.initEvaneosPotEdit=function(){d.pot.categoryPO.img="Pot32.png",d.pot.categoryPO.value="EVANEOS",d.pot.categoryPO.text="EVANEOS"},d.initRelaisChateauListesPot=function(){d.pot.categoryPO.img="Pot34.png",d.pot.categoryPO.value="RELAISCHATEAULISTES",d.pot.categoryPO.text="RELAISCHATEAULISTES"},d.initRelaisChateauListesPotEdit=function(){d.pot.categoryPO.img="Pot34.png",d.pot.categoryPO.value="RELAISCHATEAULISTES",d.pot.categoryPO.text="RELAISCHATEAULISTES"},d.initMacabanePot=function(){d.pot.categoryPO.value="MACABANE",d.pot.categoryPO.text="MACABANE"},d.initSncfPotEdit=function(){d.pot.categoryPO.img="sncf-default.jpg",d.pot.categoryPO.value="sncf"},d.initSncfPot=function(){var e,t,o,n,i=p.queryString,a={},r=u("lpc-sncf-params"),r=r&&decodeURIComponent(r.replace(/\+/g,"%20"));if(void 0!==r)for(var l=r.split("|||"),s=0;s<l.length;s++){var c=l[s].split("=");void 0===a[c[0]]?a[c[0]]=c[1]:"string"==typeof a[c[0]]?a[c[0]]=[a[c[0]],c[1]]:a[c[0]].push(c[1])}d.pot.op7TypeContributionPO="SUGGESTED",d.pot.commisionTypePO="CLIENT",d.pot.categoryPO.img="default-sncf.jpg",d.pot.categoryPO.imgSncfPetitGroupe="sncf-petit-groupe-default.jpg",d.pot.categoryPO.value="sncf",d.pot.askForMessage=!0,d.pot.inviteCanInvite=!0,d.pot.disableGreetingCardPO=!0,void 0!==a&&void 0!==a.vsc_prix_moyen?d.pot.op7AmountContributionPOS=a.vsc_prix_moyen:void 0!==i.vsc_prix_moyen&&(d.pot.op7AmountContributionPOS=i.vsc_prix_moyen),void 0!==a&&void 0!==a.vsc_passagers?d.pot.passangers=JSON.parse(a.vsc_passagers):void 0!==i.vsc_passagers&&(d.pot.passangers=JSON.parse(i.vsc_passagers)),void 0!==a&&void 0!==a.vsc_options?d.pot.options=JSON.parse(a.vsc_options):void 0!==i.vsc_options&&(d.pot.options=JSON.parse(i.vsc_options)),void 0!==a&&void 0!==a.vsc_montant_total?d.pot.amountToReachPO=a.vsc_montant_total:void 0!==i.vsc_montant_total&&(d.pot.amountToReachPO=i.vsc_montant_total),void 0!==a&&void 0!==a.vsc_ref_dv?(d.pot.refVoyagesSncfPO=a.vsc_ref_dv,d.disableRef=!0):void 0!==i.vsc_ref_dv&&(d.pot.refVoyagesSncfPO=i.vsc_ref_dv,d.disableRef=!0),void 0!==a&&void 0!==a.vsc_date_exp?(d.pot.dateExp=p.getDate(a.vsc_date_exp),(e=p.getDate(a.vsc_date_exp)).setDate(e.getDate()-1),d.pot.op6DateLimitePO=e,d.pot.op6DateLimitePOString=p.formatDate(d.pot.dateExp),d.pot.hourLimit=a.vsc_date_exp.substring(a.vsc_date_exp.length-5)):void 0!==i.vsc_date_exp&&(d.pot.dateExp=p.getDate(i.vsc_date_exp),(e=p.getDate(i.vsc_date_exp)).setDate(e.getDate()-1),d.pot.op6DateLimitePO=e,d.pot.op6DateLimitePOString=p.formatDate(d.pot.dateExp),d.pot.hourLimit=i.vsc_date_exp.substring(i.vsc_date_exp.length-5)),void 0!==a&&void 0!==a.vsc_org_date?(t=p.getDate(a.vsc_org_date),o=a.vsc_org_date.substring(a.vsc_org_date.length-5),d.pot.dateDepart=a.vsc_org_date.substring(0,10)):void 0!==i.vsc_org_date&&(t=p.getDate(i.vsc_org_date),o=i.vsc_org_date.substring(i.vsc_org_date.length-5),d.pot.dateDepart=i.vsc_org_date.substring(0,10)),void 0!==a&&void 0!==a.vsc_nb_passagers?d.pot.nbPassagers=n=a.vsc_nb_passagers:void 0!==i.vsc_nb_passagers&&(n=i.vsc_nb_passagers,d.pot.nbPassagers=i.vsc_nb_passagers),void 0!==a&&void 0!==a.vsc_org&&void 0!==a.vsc_dest?(d.pot.namePO=" VOYAGE / "+a.vsc_org+" - "+a.vsc_dest+("undefined"!==o?" / "+p.formatDate(t)+" à "+o:"")+" / Ref. "+d.pot.refVoyagesSncfPO,d.pot.gareOrg=a.vsc_org,d.pot.gareDst=a.vsc_dest):void 0!==i.vsc_org&&void 0!==i.vsc_dest&&(d.pot.namePO=" VOYAGE / "+i.vsc_org+" - "+i.vsc_dest+" / "+("undefined"!==o?" / "+p.formatDate(t)+" à "+o:"")+" / Ref. "+d.pot.refVoyagesSncfPO,d.pot.gareOrg=i.vsc_org,d.pot.gareDst=i.vsc_dest),void 0!==t&&void 0!==d.pot.refVoyagesSncfPO&&void 0!==d.pot.dateExp&&void 0!==n&&void 0!==d.pot.op7AmountContributionPOS&&void 0!==o&&(d.pot.descriptionPO="Bonjour à tous,<br> j'ai posé une option sur Voyages-sncf.com pour notre voyage en groupe du "+p.formatDate(t)+" à "+o+" (Ref. "+d.pot.refVoyagesSncfPO+").<br>Je dois payer la réservation avant le "+d.pot.op6DateLimitePOString+" à "+d.pot.hourLimit+" pour payer la réservation.<br><br>Pouvez-vous d'ici là tous participer à cette cagnotte de voyage afin que je puisse ensuite procéder au paiement svp ?<br><br><strong>Prix du voyage pour "+n+" personnes: "+p.fixFloat(d.pot.op7AmountContributionPOS*n)+" €</strong><br><strong>Prix moyen/pers: "+d.pot.op7AmountContributionPOS+" €</strong><br><br>Merci et à très vite."),d.toogleMoreOptions()},d.$watch("pot.categoryPO.value",function(){"creditcooperatif"===subdomain&&(d.pot.askForAddress="SOLIDARY_KITTY"==d.pot.categoryPO.value),d.pot&&d.pot.descriptionPO||!CATEGORIE_POT_DESCRIPTION[d.pot.categoryPO.value]||!d.editorIframe||d.editorIframe.contentWindow.postMessage({description:CATEGORIE_POT_DESCRIPTION[d.pot.categoryPO.value]},a.editorIframeOrigin)}),d.$watch("promoCodeError",function(){d.promoCodeError&&d.toogleMoreOptions()}),d.$watch("pot.op7AmountContributionPOS",function(){isNaN(d.pot.op7AmountContributionPOS)?d.pot.op7AmountContributionWithComPOS="":d.pot.op7AmountContributionWithComPOS=p.fixFloat(1.0096*d.pot.op7AmountContributionPOS)},!0),d.checkAdress=function(){n.pot.invite.checkAdress(d.person.emailPE).then(function(e){d.propablyWrongMail=!e.is_valid},function(e){d.propablyWrongMail=!1})},d.initPosition=function(e,t,o,n){n&&void 0!==n&&(i=1e3*n/100);var i,a=new Image;a.onload=function(){a.width,a.height;d.pot.position={x:e,y:t,w:i,wpercent:n},d.pot.initialPosition={x:e,y:t,w:i,wpercent:n},$("#photoPoInner").width(i),$("#photoPoInner").fadeTo("fast",1)},a.src=o},d.fakeZoomOn=function(){d.pot.position.w=Number(d.pot.position.w),$("#photoPoInner").animate({width:"+=30px"},150,function(){var e=100*$("#photoPoInner").width()/$("#photoPoInner").offsetParent().width();d.pot.position.w=$("#photoPoInner").width(),d.pot.position.wpercent=e})},d.reinitializePhoto=function(){d.dragShow=!1,d.pot.photoPO=void 0,setTimeout(function(){angular.element("#photoPoInner").css("width","100%"),d.pot.position.wpercent=d.pot.initialPosition?d.pot.initialPosition.wpercent:void 0,d.pot.position.w=d.pot.initialPosition?d.pot.initialPosition.w:void 0},0)},$(window).on("resize",function(){var e=Math.min(window.innerWidth,1e3)*d.pot.position.wpercent/100;e<d.maxWidthAutorized&&(e=d.maxWidthAutorized),d.pot.position.w=e,$("#photoPoInner").width(e)}),d.initRepositonatePhoto=function(){d.dragShow=!0},d.exitRepositonatePhoto=function(){d.dragShow=!1},d.fakeZoomOut=function(){d.pot.position.w=Number(d.pot.position.w),(!d.pot.photoPO.startsWith||!d.pot.photoPO.startsWith("data"))&&$("#photoPoInner").width()-30<=d.maxWidthAutorized||$("#photoPoInner").animate({width:"-=30px"},150,function(){var e=100*$("#photoPoInner").width()/$("#photoPoInner").offsetParent().width();d.pot.position.w=$("#photoPoInner").width(),d.pot.position.wpercent=e})},d.getPotDefaultImage=function(){return("SOLIDARY_KITTY"==d.pot.categoryPO.value?d.pot.solidaryCategoryPO:d.pot.categoryPO).img},d.getPotDescription=function(){return null!=d.pot.categoryPO.description?d.pot.categoryPO.description.replace("'","&acute;"):window.default_desc},d.descPlaceholder=d.getPotDescription(),null!=window.domain&&(d.domain=window.domain),d.froalaOptions={toolbarSticky:!1,key:window.froalaLicenseKey,placeholderText:d.descPlaceholder,heightMin:d.isPotCreationEditionPopup?150:200,heightMax:257,theme:"custom",fullPage:!1,language:window.locale,pluginsEnabled:["image","table","lists","colors","video","lineBreaker","fontFamily","fontSize","link","emoticons","align"],toolbarButtons:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsMD:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsSM:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsXS:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],imageUploadURL:"/desc-image",imageUploadMethod:"POST",imageUploadParam:"upload",imageMaxSize:15728640,imageAllowedTypes:["jpeg","jpg","png"],videoInsertButtons:["videoBack","|","videoByURL"],videoResize:!0,events:{"froalaEditor.blur":function(){d.$broadcast("forala-editor-on-blur")},"froalaEditor.focus":function(){d.$broadcast("forala-editor-on-focus")}}},d.minlength=function(){return"SOLIDARY_KITTY"==d.pot.categoryPO.value&&"FR"!=d.domain?200:0},d.initialize=function(e){d.initControls=e,d.initControls.initialize(d.froalaOptions),d.deleteAll=function(){e.getEditor()("html.set","")}},d.$on("froala-editor-update-placeholder-event",function(e){d.descPlaceholder=d.getPotDescription(),d.froalaOptions.placeholderText=d.descPlaceholder,null!=d.initControls&&(d.initControls.destroy(),d.initControls.initialize(d.froalaOptions))}),d.getPotHeader=function(e){if(null!=d.pot.categoryPO.header)return d.pot.categoryPO.header.replace("'","&acute;")},d.changeIfRedirection=function(e){if("SOLIDARY_KITTY"!==e.value)d.pot.solidaryCategoryPO=void 0;else{if("creditcooperatif"!==window.subdomain&&"FR"==window.domain)return d.isPotCreationEditionPopup?a.showPopupV2("confirmRedirectionPopup"):a.showPopup("confirmRedirectionPopup"),d.selectedCategory=window.URLS[e.value],void(d.selectedCategory.link=d.selectedCategory.link+"#from-pot-creation");"creditcooperatif"===window.subdomain?d.pot.solidaryCategoryPO={text:SOLIDARY_KITTIES_CATEGORIES_LABELS.SOCIAL,img:"SolidaryCreditCop8.png",value:"SOCIAL"}:d.pot.solidaryCategoryPO={text:SOLIDARY_KITTIES_CATEGORIES_LABELS.ANIMALS,img:"Solidary0.png",value:"ANIMALS"}}"REPAY"===e.value?t.location=window.URLS.REPAY.link:"BIRTH"===e.value||"WEDDING"===e.value||"SALE"===e.value?(d.isPotCreationEditionPopup?a.showPopupV2("confirmRedirectionPopup"):a.showPopup("confirmRedirectionPopup"),d.selectedCategory=window.URLS[e.value],d.selectedCategory.link=d.selectedCategory.link+"#from-pot-creation"):t.location.hash=e.value},d.reInitDropDown=function(e){e?"SOLIDARY_KITTY"==e.categoryPO.value?(d.pot.categoryPO={text:e.categoryPO.text,img:e.categoryPO.img,value:e.categoryPO.value,description:CATEGORIE_POT_DESCRIPTION.SOLIDARY_KITTY,header:HEADER_POT_DESCRIPTION.SOLIDARY_KITTY},d.pot.solidaryCategoryPO={text:e.solidaryCategoryPO.text,img:e.solidaryCategoryPO.img,value:e.solidaryCategoryPO.value}):"undefined"==typeof CATEGORIE_POT_DESCRIPTION||"undefined"==typeof HEADER_POT_DESCRIPTION?(d.editorIframe&&d.editorIframe.contentWindow.postMessage(CATEGORIE_POT_DESCRIPTION.BIRTHDAY,a.editorIframeOrigin),d.pot.categoryPO={text:e.categoryPO.text,img:e.categoryPO.img,value:e.categoryPO.value,description:CATEGORIE_POT_DESCRIPTION.BIRTHDAY,header:HEADER_POT_DESCRIPTION.BIRTHDAY}):d.pot.categoryPO={text:e.categoryPO.text,img:e.categoryPO.img,value:e.categoryPO.value}:"natureetdecouvertes"==subdomain?d.pot.categoryPO={text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"pot_natureetdecouvertes.jpg?h=hash",value:"BIRTHDAY"}:"numworks"==subdomain?d.pot.categoryPO={text:CATEGORIE_POT_LABELS.NUMWORKS,img:"numworks50.jpg?h=hash",value:"NUMWORKS"}:d.pot.categoryPO={text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY"}},d.$on("lpc-popup-close-event",function(e,t){t&&"confirmRedirectionPopup"==t.popupName&&d.reInitDropDown(d.originalPO||void 0)}),d.checkIdeaBoxCompatible=function(){switch(d.pot.categoryPO.value){case"BIRTHDAY":case"COMMON_GIFT":case"DEPARTURE_KITTY":case"HOUSEWARMING":return!0;default:return!1}},!0),E=(d.resetPromoCodeIfEmpty=function(e){d.promoCode&&""!==d.promoCode||((e?(d.potParamsEdition.namePCC.$setValidity("Code promo invalide",!0),d.potParamsEdition.namePCC.$setValidity("serverError",!0),d.potParamsEdition):(d.potCreationStepTwo.namePCC.$setValidity("Code promo invalide",!0),d.potCreationStepTwo.namePCC.$setValidity("serverError",!0),d.potCreationStepTwo)).namePCC.$setValidity("required",!0),d.promoCodeError="",d.promoCodeSuccess=""),d.pot.promoCode&&""!==d.pot.promoCode&&P&&(P=!1,o(function(){d.submitPromoCode(d.pot.promoCode).then(c,c),P=!0},1e3))},d.resetPromoCode=function(e){d.pot.opPromoCode||((e?(d.potParamsEdition.namePCC.$setValidity("Code promo invalide",!0),d.potParamsEdition.namePCC.$setValidity("serverError",!0),d.potParamsEdition):(d.potCreationStepTwo.namePCC.$setValidity("Code promo invalide",!0),d.potCreationStepTwo.namePCC.$setValidity("serverError",!0),d.potCreationStepTwo)).namePCC.$setValidity("required",!0),d.promoCodeError="",d.promoCodeSuccess="")},d.resetContribution=function(){"REGULAR"===d.pot.op7TypeContributionPO?(d.pot.op7AmountContributionTemp=d.pot.op7AmountContributionPOS,d.pot.op7AmountContributionPOS="",d.pot.op7AmountContributionPOF="",d.potCreationStepTwo.op7AmountContributionSuggested.$setValidity("numeric",!0),d.potCreationStepTwo.op7AmountContributionFixed&&d.potCreationStepTwo.op7AmountContributionFixed.$setValidity("numeric",!0)):"SUGGESTED"===d.pot.op7TypeContributionPO?(d.pot.op7AmountContributionPOF="",void 0!==d.pot.op7AmountContributionTemp&&(d.pot.op7AmountContributionPOS=d.pot.op7AmountContributionTemp),d.potCreationStepTwo.op7AmountContributionFixed&&d.potCreationStepTwo.op7AmountContributionFixed.$setValidity("numeric",!0)):"FIXED"===d.pot.op7TypeContributionPO&&(d.pot.op7AmountContributionPOS="",d.potCreationStepTwo.op7AmountContributionSuggested.$setValidity("numeric",!0))},d.dateLimiteChange=function(){d.pot.aop6DateLimitePOActive?d.pot.op6DateLimitePO=d.pot.op6DateLimitePO||d.pot.op6DateLimitePOTmp:(d.pot.op6DateLimitePOTmp=d.pot.op6DateLimitePO,d.pot.op6DateLimitePO=void 0)},d.sncfResetAmountToReach=function(){d.pot.amountToReachPOActive?d.pot.amountToReachPO=d.pot.amountToReachPO||d.pot.amountToReachPOTmp:(d.pot.amountToReachPOTmp=d.pot.amountToReachPO,d.pot.amountToReachPO=void 0)},d.toogleMoreOptions=function(){angular.element("#moreOptions").slideToggle(),angular.element("#moreOptionsBTN").toggleClass("minuis")},null!=d.isPotCreationEditionPopup&&0==d.isPotCreationEditionPopup&&(p.handleTag.bindChange({creation2:1,login:2}),p.handleTag.resetPage()),d.submitEditPotStepOne=function(){p.handleTag.changePage("creation2"),$("html, body").animate({scrollTop:0},0)},d.submitEditPotStepTwo=function(){d.pot.opPromoCode?d.submitPromoCode(d.pot.promoCode,"editPotStepTwo").then(E):E()},function(){n.pot.potEdit(d.pot)});d.person={},d.toLogUser={},d.login=function(){if(d.$broadcast("create-edit-pot-loading-event",{index:2}),void 0!==d.toLogUser.tfaCode){for(var e="",t=0;t<Object.keys(d.toLogUser.tfaCode).length;t++)e+=d.toLogUser.tfaCode[t];d.toLogUser.tfaCode=e}n.login(d.toLogUser).then(function(e){1==e.needSMSOrGoogleTfa?(a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("googleValidatorPopup",{toLogUser:d.toLogUser,afterSignin:reload})):1==e.needGoogleTfa?(a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("googleValidatorPopup",{toLogUser:d.toLogUser,afterSignin:f})):1==e.needSmsTfa?(a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("smsValidatorPopup",{toLogUser:d.toLogUser,afterSignin:f,telPE:e.telPE})):f()},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++){if(e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"==e.data.fieldErrors[t].smsLimitSmsExceeded){a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("accountBlockedPopup");break}d.$broadcast("create-edit-pot-error-event",{index:2})}})},d.potCreationPopupLogin=function(e){n.login(e).then(function(e){1==e.needGoogleTfa?(a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("googleValidatorPopup",{toLogUser:d.toLogUser,afterSignin:g})):1==e.needSmsTfa?(a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("smsValidatorPopup",{toLogUser:d.toLogUser,afterSignin:g,telPE:e.telPE})):g()},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)if(e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"==e.data.fieldErrors[t].smsLimitSmsExceeded){a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("accountBlockedPopup");break}})},d.loginFB=function(){try{FB.login(function(e){e.authResponse&&(window.authResponse=e.authResponse,window.lpcLog("response "+JSON.stringify(e)),d.$broadcast("create-edit-pot-loading-event",{index:2}),n.account.facebookConnect(JSON.stringify(e.authResponse)).then(function(e){n.pot.potNew(d.pot).then(function(){d.$broadcast("create-edit-pot-done-event",{index:2})},function(e){d.$broadcast("create-edit-pot-error-event",{index:2})})},function(e){if(d.$broadcast("create-edit-pot-error-event",{index:2}),"askForAnEmail"==e.data.fieldErrors[0].fb)a.showPopup("facebookPop");else if(d.facebookError=!0,e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t in e.data.fieldErrors)!e.data.fieldErrors[t]||"notlogged"!=e.data.fieldErrors[t].person||p.cookieEnabled()||i.handle({data:{fieldErrors:[{page:"needCookiePot"}]}})}))},{scope:"email,user_birthday",return_scopes:!0})}catch(e){a.detectPrivateMode(function(e){document.getElementsByClassName("cannot-load-facebook-api-error-message")[0].innerHTML=void 0!==e&&e?t.fbCannotLoadMessage:""})}},d.potCreationPopupLoginFB=function(){try{FB.login(function(e){e.authResponse&&(window.authResponse=e.authResponse,window.lpcLog("response "+JSON.stringify(e)),n.account.facebookConnect(JSON.stringify(e.authResponse)).then(function(e){d.submitCreateReducedPot()},function(e){if("askForAnEmail"==e.data.fieldErrors[0].fb)a.showPopup("facebookPop");else if(d.facebookError=!0,e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t in e.data.fieldErrors)!e.data.fieldErrors[t]||"notlogged"!=e.data.fieldErrors[t].person||p.cookieEnabled()||i.handle({data:{fieldErrors:[{page:"needCookiePot"}]}})}))},{scope:"email,user_birthday",return_scopes:!0})}catch(e){a.detectPrivateMode(function(e){document.getElementsByClassName("cannot-load-facebook-api-error-message")[0].innerHTML=void 0!==e&&e?t.fbCannotLoadMessage:""})}},d.submitPromoCode=function(e,t){var o;return t&&(o=d[t],i.setForm(t,o)),n.pot.promoCode.submitPromoCode(e).then(function(e){return d.pot.pc=e,d.promoCodeSuccess=!0,d.promoCodeError=!1,angular.element(document.querySelector("#promoCode")).addClass("greenValid"),e},function(e){throw 400==e.status&&(d.promoCodeError=!0,d.promoCodeSuccess=!1,angular.element(document.querySelector("#promoCode")).removeClass("greenValid")),e})},d.submitCreatePotStepOne=function(){"REPAY"===d.pot.categoryPO.value&&(t.location=d.linkRefund),d.stepOneSubmitted=!1,p.handleTag.changePage("creation2");try{a.milleMercis.form()}catch(e){console.error(e)}};d.submitCreatePotStepTwo=function(){d.pot.opPromoCode?d.submitPromoCode(d.pot.promoCode,"potCreationStepTwo").then(h):h()},d.pickerSelected=function(e){console.log(e)},d.submitCreateAccount=function(){d.$broadcast("create-edit-pot-loading-event",{index:2}),n.pot.potAndAccountNew(d.pot,d.person).then(function(){d.$broadcast("create-edit-pot-done-event",{index:2})},function(e){if(d.$broadcast("create-edit-pot-error-event",{index:2}),e&&e.data&&e.data.fieldErrors)for(var t in e.data.fieldErrors)for(var o in e.data.fieldErrors[t])if(-1<jQuery.inArray(o,["op6DateLimitePO","op7AmountContributionFixed","op7AmountContributionSuggested","op6DateLimitePO"]))return p.handleTag.changePage("creation2"),0})},d.isIdeaBoxCompatible=function(){switch(d.pot.categoryPO.value){case"BIRTHDAY":case"COMMON_GIFT":case"DEPARTURE_KITTY":case"PARTY_HONEY_NIGHT":return!0;default:return!1}},n.pot.potCreationPopupData().then(function(e){d.potCreationPopupData=e.data,a.headquartersDetails=d.potCreationPopupData.headquartersDetails,a.isSubdomainHeadquartersIP=d.potCreationPopupData.isSubdomainHeadquartersIP,null!=d.potCreationPopupData.promoCode&&(d.pot.promoCode=d.potCreationPopupData.promoCode)},function(e){}),d.submitCreateReducedPot=function(){function t(){n.pot.potNewReduced(d.pot).then(function(e){console.log(e),"SOLIDARY_KITTY"==d.pot.categoryPO.value&&localStorage.setItem("showPopupSolidaryKitty",!0)},function(e){console.log(e)})}d.pot.promoCode?n.pot.promoCode.submitPromoCode(d.pot.promoCode).then(function(e){t()},function(e){}):t()},d.submitEditReducedPot=function(){console.log(d.pot),n.pot.potEditReduced(d.pot).then(function(e){console.log(e)},function(e){console.log(e)})},d.submitPotParmasEdition=function(){function e(){n.pot.potEditParmas(d.pot)}d.pot.opPromoCode?d.submitPromoCode(d.pot.promoCode,"potParamsEdition").then(e,function(){}):e()},d.submitCreateBiscuitMistralPot=function(){d.pot.op2ContributionPO=!0,d.pot.inviteCanInvite=!0,d.pot.disableGreetingCardPO=!0,d.pot.askForMessage=!0,d.pot.op4AmountPO=!0,n.pot.potNew(d.pot)},d.isLogged=window.lpcUserLogged,d.submitPotCreationEdition=function(){d.isLogged||"bimpli"===subdomain?d.isPotCreation?"biscuitmistral"!==subdomain?d.submitCreateReducedPot():d.submitCreateBiscuitMistralPot():d.submitEditReducedPot():a.showPopupV2("lpcLoginSignupPopup",{pot:d.pot,isPotCreationEditionPopup:!0})},d.$on("edit-pot-general-info",function(e){d.pot=angular.copy(d.potCopy),d.isPotCreation=!1,d.potInit(!0,d.potCopy.subdomainCreationPO)}),d.$on("create-new-pot-popup",function(e){d.potCopy=angular.copy(d.pot),d.pot=void 0,d.potInit(!1,window.subdomain),d.isPotCreation=!0}),d.$on("edit-pot-with-popup",function(e,t){d.pot=p.pot.formatClient(angular.copy(t)),d.isPotCreation=!1,d.potInit(!0,d.pot.subdomainCreationPO)}),d.$watch("pot.op7AmountContributionPOF",function(e){0<d.pot.op7AmountContributionPOF&&(d.fixedContributionAfterCom=r("number")(.96*d.pot.op7AmountContributionPOF,2))}),a.$on("name-pot",function(e,t){d.pot.namePO=t}),d.showContributionTooltip=function(){return null!=d.pot.op7AmountContributionPOF&&(d.pot.op7AmountContributionPOF=d.pot.op7AmountContributionPOF.replace(",",".")),"FIXED"==d.pot.op7TypeContributionPO&&0<d.pot.op7AmountContributionPOF},d.showEventDatePicker=function(){return"BIRTHDAY"==d.pot.categoryPO.value||"PARTY_HONEY_NIGHT"==d.pot.categoryPO.value||"HOUSEWARMING"==d.pot.categoryPO.value||"COMMON_GIFT"==d.pot.categoryPO.value||"NEW_YEAR"==d.pot.categoryPO.value||"DEPARTURE_KITTY"==d.pot.categoryPO.value||"FRIENDSHOLIDAYS"==d.pot.categoryPO.value||"WEDDING_REGULAR"==d.pot.categoryPO.value||"BIRTH_REGULAR"==d.pot.categoryPO.value||"CFV_PACS"==d.pot.categoryPO.value||"CFV_WEDDING"==d.pot.categoryPO.value||"CFV_GIFTS"==d.pot.categoryPO.value||"HONEY_MOON"==d.pot.categoryPO.value||"GIFT_BIRTH"==d.pot.categoryPO.value}}]),angular.module("lpc").controller("potCollectorController",["$window","$scope","ServerFunction","Helper","$sce","$location","$rootScope",function(e,t,o,n,i,a,r){var l=!(t.submitCreateAccount=function(){o.account.accountAdd(t.person).then(function(){e.location.reload()})});t.showParticipationList=function(){r.showPopup("participantDlg"),l||o.pot.fetchInvites(t.pot.uniqPO).then(function(e){l=!0,t.invites=e})}}]),angular.module("lpc").controller("potCadoCarteController",["$window","$scope","ServerFunction","Helper","$sce","$location","$rootScope","$http",function(e,o,t,n,i,a,r,l){o.cities=null,n.handleTag.bindChange({order1:0,order2:1,order3:2}),n.handleTag.resetPage(),o.orderTotalPrice=0,o.$watch("card.package",function(e){o.setTotalPriceCard(),o.card.amount=n.fixFloat(o.maximummCardValue(2))}),o.$watch("card.credit",function(e){o.setTotalPriceCard(),o.card.amount=n.fixFloat(o.maximummCardValue(2))}),o.$watch("card.amount",function(e){o.setTotalPriceCard()}),o.setTotalPriceCard=function(){void 0!==o.card&&""!=o.card&&null!=o.card&&""!=o.card.amount&&null!=o.card.package&&""!=o.card.package&&(o.orderTotalPrice=0,"CREDIT_LATER"==o.card.credit?o.orderTotalPrice=0:o.orderTotalPrice+=parseInt(o.card.amount),"COFFRET"==o.card.package?o.orderTotalPrice+=2:o.orderTotalPrice+=0)},o.$watch("card.creditTotal",function(){1==o.card.creditTotal&&(o.card.amount=n.fixFloat(o.maximummCardValue(2)))}),o.submitOrderCardStepOne=function(){"CREDIT_NOW"==o.card.credit?o.orderCardFormSubmit("ORDER"):n.handleTag.changePage("order2")},o.submitOrderCardStepTwo=function(){var e=o.orderCardForm;o.orderCardForm.$setDirty(),o.orderCardForm.$setSubmitted(),e.$invalid?r.hidePopupV2("adressValidation-popin"):r.showPopupV2("adressValidation-popin")},o.editOrder=function(){n.handleTag.changePage("order1")},o.orderCardFormSubmit=function(e){"true"==o.card.collectTotal&&(o.card.amount=n.fixFloat(o.maximummCardValue(2))),t.pot.cadoCarte.init(o.pot.uniqPO,o.person.tmpPwd,"true"==o.card.creditTotal,o.card.amount,e).then(function(e){o.person||(o.person={}),o.person.totalCollectPE=e.totalCollectPE,o.person.authorized=!0,n.handleTag.changePage("order2")},function(e){n.kyc.handleKycErrorsNew(o,e,"kyc-block")})},o.submitOrderCardStepThree=function(){t.pot.cadoCarte.valid(o.pot.uniqPO,o.person.tmpPwd,"true"==o.card.creditTotal,"CREDIT_NOW"==o.card.credit,"LETTER"==o.card.package,o.card.amount,o.card.civility,o.card.firstName,o.card.lastName,o.card.company,o.card.street_1,o.card.street_2,o.card.zipcode,o.card.city,o.card.country,o.card.phoneNumber).then(function(){},function(e){e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length&&n.handleTag.changePage("order2"),n.kyc.handleKycErrors(o,e,"kyc-block","kyc-iframe-container","kycFrame")})},o.maximummCardValue=function(e){var t=o.pot.amountLeft;return"COFFRET"==o.card.package&&(t-=e),n.fixFloat(Math.min(t,2e3))},o.submitcreditOrderedCard=function(){o.orderCardFormSubmit("CREDIT")},o.getCities=function(e,t){e&&5===e.length?l.get("/api/address/"+e).then(function(e){e=_toConsumableArray(new Map(e.data.records.map(function(e){return[e.fields.libelle_d_acheminement,e]})).values());o.cities=e.map(function(e){return e.fields.libelle_d_acheminement}),1===e.length&&(t.city.$invalid=!1,t.city.$valid=!0,t.city.$viewValue=e[0].fields.libelle_d_acheminement,o.card.city=e[0].fields.libelle_d_acheminement)}):(o.cities=null,t.city.$touched=!0,o.card.city=null,t.city.$dirty=!0),t.city.$validate()}}]),angular.module("lpc").controller("mobileParticipationController",["$window","$scope","ServerFunction","Helper","$sce","$location",function(e,t,o,n,i,a){console.log(window.paymentData),t.smOperationId=window.paymentData.dalenysOperationId,t.smPayinTokenId=window.paymentData.dalenysPayinTokenId,t.smExtraData=window.paymentData.dalenysExtraData,setTimeout(function(){hostedFields.load()},500)}]),angular.module("lpc").controller("mesPotsController",["$scope","$rootScope","ServerFunction","$window",function(e,t,o,n){var i={};e.initDecline=function(e){i={uniqPO:e},t.showPopup("declineInvite")},e.initHide=function(e){i={uniqPO:e},t.showPopup("hideInvite")},e.initDeletePot=function(e){i={uniqPO:e},t.showPopup("deletePot")},e.deletepot=function(){o.potDelete(i.uniqPO).then(function(e){"DELETED"==e.status.toUpperCase()&&angular.element(".owned-kitty").each(function(){if(angular.element(this).data("uniqpo")==e.uniqPO)return angular.element(this).remove(),t.hidePopup("deletePot"),0})})},e.hideinvite=function(){o.inviteDelete(i.uniqPO).then(function(e){1==e.hideInvite&&angular.element(".invitedPot").each(function(){if(angular.element(this).data("uniqpo")==e.uniqPO)return angular.element(this).remove(),t.hidePopup("hideInvite"),0})})},e.declineinvite=function(){o.inviteDelete(i.uniqPO).then(function(e){1==e.declineInvite&&n.location.reload()})}}]),angular.module("lpc").controller("homeV2Controller",["$scope","$rootScope",function(e,t){}]),angular.module("lpc").controller("greetingCardPhysicalController",["$window","$scope","$rootScope","ServerFunction","Helper","$sce","$location",function(t,a,e,o,n,i,r){a.pot||(a.pot={}),a.panelEmpty=!0,a.selectedCards={},a.totalCardNumber=0,a.totalPayment=0,a.delivery={},a.order={};n.handleTag.bindChange({selectCards:1,cardOrderDelivery:2}),a.initPageIndex=function(){1==t.pageIndex?n.handleTag.changePage("selectCards"):2==t.pageIndex?n.handleTag.changePage("cardOrderDelivery"):n.handleTag.resetPage()},a.initOrderData=function(){void 0!==t.items&&t.items.forEach(function(e){a.selectedCards[e.greetingPhysicalCardID]=e.copyNumberGPCOI,a.totalCardNumber=a.totalCardNumber+e.copyNumberGPCOI}),void 0!==t.existingOrder&&(a.totalPayment=t.existingOrder.totalAmountGPCO/100,this.delivery.firstName=t.existingOrder.deliveryFirstNameGPCO,this.delivery.lastName=t.existingOrder.deliveryLastNameGPCO,this.delivery.street_1=t.existingOrder.deliveryStreetGPCO,this.delivery.street_2=t.existingOrder.deliveryStreetAdditionalGPCO,this.delivery.zipcode=t.existingOrder.deliveryZipcodeGPCO,this.delivery.city=t.existingOrder.deliveryCityGPCO)},a.choosePhysicalCards=function(){setTimeout(function(){n.handleTag.changePage("selectCards")},300)},a.goToLandingPage=function(){setTimeout(function(){n.handleTag.resetPage()},300)},a.goToCardOrderDelivery=function(){this.delivery=a.delivery,setTimeout(function(){n.handleTag.changePage("cardOrderDelivery")},300)},a.openMobileSelectionPanelView=function(){angular.element(".greeting-card-physical-select-card-selection-mobile-full-panel").css({"max-height":"100%",top:"0"}),angular.element("body").css({"overflow-y":"hidden"})},a.closeMobileSelectionPanelView=function(){angular.element(".greeting-card-physical-select-card-selection-mobile-full-panel").css({"max-height":"0",top:"100%"}),angular.element("body").css({"overflow-y":"scroll"})},a.toggleInspectorPopupImage=function(e){var e=angular.element(e.target),t=angular.element(document.getElementsByClassName("greeting-card-physical-inspect-card-popup-inspector-view")[0]);angular.element(document.getElementsByClassName("greeting-card-physical-inspect-card-popup-inspector-selector-item")[0]).css("border","0"),angular.element(document.getElementsByClassName("greeting-card-physical-inspect-card-popup-inspector-selector-item")[1]).css("border","0"),angular.element(document.getElementsByClassName("greeting-card-physical-inspect-card-popup-inspector-selector-item")[2]).css("border","0"),e.css("border","2px solid #e22b76"),t.css("background-image",e.css("background-image"))},a.removeCard=function(e,t){void 0!==a.selectedCards&&null!=a.selectedCards[e]&&0<a.selectedCards[e]&&(a.selectedCards[e]--,a.totalPayment=a.totalPayment-t/100,a.totalCardNumber--)},a.addCard=function(e,t){void 0!==a.selectedCards&&(null!=a.selectedCards[e]?a.selectedCards[e]++:a.selectedCards[e]=1,a.totalPayment=a.totalPayment+t/100,a.totalCardNumber++)},a.showCardSeperator=function(e){for(var t=a.selectedCards[e]&&0<a.selectedCards[e],o=!1,n=Object.getOwnPropertyNames(a.selectedCards),i=0;i<n.length;i++)if(n[i]>e&&0<a.selectedCards[n[i]]){o=!0;break}return t&&o},a.persistOrderGoToRecap=function(e){e.$valid&&(a.delivery=this.delivery,a.order={delivery:a.delivery,selectedCards:JSON.stringify(a.selectedCards),totalPayment:100*a.totalPayment},void 0!==t.existingOrder&&t.existingOrder.uniqGPCO?(a.order.uniqGPCO=t.existingOrder.uniqGPCO,o.pot.greetingCard.persistExistingOrderPhysicalCards(a.uniqPO,a.order).then(function(e){console.log(e)},function(e){console.log(e)})):o.pot.greetingCard.persistOrderPhysicalCards(a.uniqPO,a.order).then(function(e){console.log(e)},function(e){console.log(e)}))}}]),angular.module("lpc").controller("greetingCardPhysicalRecapController",["$window","$scope","$rootScope","ServerFunction","Helper","$sce","$location",function(e,a,t,o,n,i,r){a.pot||(a.pot={}),a.panelEmpty=!0,a.selectedCards={},a.totalCardNumber=0,a.order={},a.extrapayment={total:0},a.items=e.items;n.handleTag.bindChange({cardAdditionalPayment:1}),n.handleTag.resetPage(),a.initSelectedItems=function(){a.items.forEach(function(e){a.selectedCards[e.greetingPhysicalCardID]=e.copyNumberGPCOI})},a.goToLandingPage=function(){setTimeout(function(){n.handleTag.resetPage()},300)},a.goToCardOrderAdditionalPayment=function(){setTimeout(function(){n.handleTag.changePage("cardAdditionalPayment")},300),a.$on("lpc-payment-iframe-directive-ready",function(){a.$broadcast("lpc-payment-iframe-ready",{href:a.extrapayment.href})})},a.removeCard=function(e,t){void 0!==a.selectedCards&&(null!=a.selectedCards[e]&&0<a.selectedCards[e]&&(a.selectedCards[e]--,a.totalPayment=a.totalPayment-t/100,a.totalCardNumber--),0==a.totalPayment)&&setTimeout(function(){jQuery("html, body").animate({scrollTop:0},500)},200)},a.addCard=function(e,t){void 0!==a.selectedCards&&(null!=a.selectedCards[e]?a.selectedCards[e]++:a.selectedCards[e]=1,a.totalPayment=a.totalPayment+t/100,a.totalCardNumber++)},a.pluralizeCardName=function(e){return e.replace(/carte/gi,"Cartes")},a.showCardSeperator=function(e){for(var t=a.selectedCards[e]&&0<a.selectedCards[e],o=!1,n=Object.getOwnPropertyNames(a.selectedCards),i=0;i<n.length;i++)if(n[i]>e&&0<a.selectedCards[n[i]]){o=!0;break}return t&&o},a.confirmOrder=function(e){a.order={uniqGPCO:e,selectedCards:JSON.stringify(a.selectedCards),totalPayment:parseInt(100*a.totalPayment,10)},o.pot.greetingCard.orderPhysicalCards(a.uniqPO,a.order).then(function(e){console.log(e)},function(e){console.log(e)})},a.cardOrderAdditionalPayment=function(e,t){a.extrapayment.total=a.totalPayment-parseFloat(e).toFixed(2),a.order={uniqGPCO:t,selectedCards:JSON.stringify(a.selectedCards),totalPayment:parseInt(100*a.totalPayment,10),extraPaymentSum:parseInt(100*a.totalPayment-100*parseFloat(e).toFixed(2),10)},o.pot.greetingCard.extraPaymentPhysicalCards(a.uniqPO,a.order).then(function(e){e&&(a.extrapayment.href=e.href),a.goToCardOrderAdditionalPayment()})}}]),angular.module("lpc").controller("disableNotificationController",["$scope","$rootScope","ServerFunction","ErrorHandler",function(e,t,o,n){e.disableNotification=function(e,t){o.pot.desactiverNotificationValidate(e,t).then(function(){window.location.reload()})}}]),angular.module("lpc").controller("declineInviteController",["$scope","$rootScope","ServerFunction","ErrorHandler",function(e,t,o,n){e.declineInvite=function(e,t){o.pot.invite.invitedecline(e+"_"+t)}}]),angular.module("lpc").controller("contactOrgaController",["$scope","$rootScope","ServerFunction","ErrorHandler",function(t,o,n,i){t.sendContactMessage=function(){null!=t.pot.uniqPO&&"demo"==t.pot.uniqPO?(o.hidePopupV2("contactOrgPop"),t.contactEmail="",t.contactMessage="",t.fAdminContact.$setPristine(!0),i.handle({data:{fieldErrors:[{msgok:"msgorgasendok"}]}})):n.sendEmail(t.pot.uniqPO,t.contactEmail,t.contactMessage).then(function(){o.hidePopupV2("contactOrgPop"),t.contactEmail="",t.contactMessage="",t.fAdminContact.$setPristine(!0),i.handle({data:{fieldErrors:[{msgok:"msgorgasendok"}]}})})},t.sendContactMessageSncf=function(e){n.sendEmail(e,t.contactEmail,t.contactMessage).then(function(){o.hidePopup("contactOrgPop"),t.contactEmail="",t.contactMessage="",t.fAdminContact.$setPristine(!0),i.handle({data:{fieldErrors:[{msgok:"msgorgasendok"}]}})})}}]),angular.module("lpc").controller("CadoCarteShopsController",["$scope","ServerFunction",function(t,e){t.cadoCarte={},t.cadoCarte.loadingShops=!0,e.pot.cadoCarte.getShops().then(function(e){t.cadoCarte.shops=e.data,t.cadoCarte.loadingShops=!1},function(e){t.cadoCarte.loadingShops=!1}),t.getMissingCols=function(e){var t=1e3<angular.element(window).width()?6:768<angular.element(window).width()?4:2;return e<=t?new Array(0):new Array((t-e%t)%t)}}]),angular.module("lpc").controller("repayCreationController",["$scope","ServerFunction","Helper","$location","$rootScope","$window",function(l,o,n,e,i,t){l.getCategoryLabel=function(e){return window.CATEGORIE_POT_LABELS[e]},l.froalaOptions={toolbarSticky:!1,key:window.froalaLicenseKey,placeholderText:"",heightMin:200,heightMax:257,theme:"custom",language:window.locale,pluginsEnabled:["image","table","lists","colors","video","lineBreaker","fontFamily","fontSize","link","emoticons","align"],toolbarButtons:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsMD:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsSM:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsXS:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],imageUploadURL:"/desc-image",imageUploadMethod:"POST",imageUploadParam:"upload",imageMaxSize:15728640,imageAllowedTypes:["jpeg","jpg","png"],videoInsertButtons:["videoBack","|","videoByURL"],videoResize:!0,events:{"froalaEditor.blur":function(){l.$broadcast("forala-editor-on-blur")},"froalaEditor.focus":function(){l.$broadcast("forala-editor-on-focus")}}},l.initialize=function(e){l.initControls=e,l.initControls.initialize(l.froalaOptions)},l.person||(l.person={}),l.pot||(l.pot={}),l.pot.position||(l.pot.position={}),l.ddSelectOptions=n.pot.initCategoryArray(),"undefined"!=typeof CATEGORIE_POT_DESCRIPTION&&"undefined"!=typeof HEADER_POT_DESCRIPTION?l.pot.categoryPO={text:CATEGORIE_POT_LABELS.REPAY,img:"Pot19.png?h=hash",value:"REPAY",description:CATEGORIE_POT_DESCRIPTION.REPAY,header:HEADER_POT_DESCRIPTION.REPAY}:l.pot.categoryPO={text:CATEGORIE_POT_LABELS.REPAY,img:"Pot19.png?h=hash",value:"REPAY"},l.toLogUser={},n.handleTag.bindChange({login:1}),n.handleTag.resetPage(),l.changeIfRedirection=function(e){console.log(e),"BIRTH"===e.value||"WEDDING"===e.value||"SALE"===e.value?(console.log(e.value),i.showPopup("confirmRedirectionPopup"),l.selectedCategory=window.URLS[e.value]):"REPAY"!==e.value&&(t.location=window.URLS.KITTY.link+"#"+e.value)},l.reInitDropDown=function(){l.pot.categoryPO={text:CATEGORIE_POT_LABELS.REPAY,img:"Pot19.png?h=hash",value:"REPAY"}},l.$on("lpc-popup-close-event",function(e,t){t&&"confirmRedirectionPopup"==t.popupName&&l.reInitDropDown()});function a(){o.repay.create(l.pot.namePO,l.pot.photoPO,l.pot.organizerPO,l.pot.descriptionPO,l.pot.position.x,l.pot.position.y).then(void 0,function(e){if(e&&e.data&&e.data.fieldErrors)for(var t in e.data.fieldErrors)for(var o in e.data.fieldErrors[t])if(-1<jQuery.inArray(o,["organizerPO"]))return n.handleTag.resetPage(),0}),l.toLogUser={}}l.login=function(){for(var e="",t=0;t<Object.keys(l.person.tfaCode).length;t++)e+=l.person.tfaCode[t];l.person.tfaCode=e,o.login(l.toLogUser).then(function(){1==result.needSMSOrGoogleTfa?(i.hidePopupV2("lpcLoginSignupPopup"),i.showPopupV2("googleValidatorPopup",{toLogUser:l.toLogUser,afterSignin:reload})):1==result.needGoogleTfa?(i.hidePopupV2("lpcLoginSignupPopup"),i.showPopupV2("googleValidatorPopup",{toLogUser:l.toLogUser,afterSignin:a})):1==result.needSmsTfa?(i.hidePopupV2("lpcLoginSignupPopup"),i.showPopupV2("smsValidatorPopup",{toLogUser:l.toLogUser,afterSignin:a,telPE:result.telPE})):a()},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)if(e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"==e.data.fieldErrors[t].smsLimitSmsExceeded){i.hidePopupV2("lpcLoginSignupPopup"),i.showPopupV2("accountBlockedPopup");break}})},l.checkAdress=function(){o.pot.invite.checkAdress(l.person.emailPE).then(function(e){e.is_valid?l.propablyWrongMail=!1:l.propablyWrongMail=!0},function(e){l.propablyWrongMail=!1})},l.loginFB=function(){try{FB.login(function(e){e.authResponse&&(window.authResponse=e.authResponse,window.lpcLog("response "+JSON.stringify(e)),o.account.facebookConnect(JSON.stringify(e.authResponse)).then(function(e){o.repay.create(l.pot.namePO,l.pot.photoPO,l.pot.descriptionPO,l.pot.position.x,l.pot.position.y).then(void 0,function(e){if(e&&e.data&&e.data.fieldErrors)for(var t in e.data.fieldErrors)for(var o in e.data.fieldErrors[t])if(-1<jQuery.inArray(o,["organizerPO"]))return n.handleTag.resetPage(),0})},function(e){"askForAnEmail"==e.data.fieldErrors[0].fb?i.showPopup("facebookPop"):l.facebookError=!0}))},{scope:"email,user_birthday",return_scopes:!0})}catch(e){i.detectPrivateMode(function(e){document.getElementsByClassName("cannot-load-facebook-api-error-message")[0].innerHTML=void 0!==e&&e?t.fbCannotLoadMessage:""})}},l.repayCreationFormSubmit=function(){l.logged?o.repay.create(l.pot.namePO,l.pot.photoPO,l.pot.organizerPO,l.pot.descriptionPO,l.pot.position.x,l.pot.position.y):(n.handleTag.changePage("login"),$("html, body").animate({scrollTop:0},0))},l.repayEditFormSubmit=function(){o.repay.edit(l.pot.uniqPO,l.pot.namePO,l.pot.photoPO,l.pot.organizerPO,l.pot.descriptionPO,l.pot.position.x,l.pot.position.y)},l.submitCreateAccount=function(){o.repay.createWithAccount(l.pot.namePO,l.pot.namePO.photoPO,l.pot.organizerPO,l.pot.descriptionPO,l.pot.position.x,l.pot.position.y,l.person).then(void 0,function(e){if(e&&e.data&&e.data.fieldErrors)for(var t in e.data.fieldErrors)for(var o in e.data.fieldErrors[t])if(-1<jQuery.inArray(o,["organizerPO"]))return n.handleTag.resetPage(),0})},l.initPosition=function(o,n,e,i){i&&void 0!==i&&(a=1e3*i/100);var a,r=new Image;r.onload=function(){var e=r.width,t=r.height;l.maxWidthAutorized=e/t*460,a&&void 0!==a?a<=l.maxWidthAutorized&&(a=l.maxWidthAutorized):a=1e3,l.pot.position={x:o,y:n,w:a,wpercent:i},console.log(l.pot.position),l.pot.initialPosition={x:o,y:n,w:a,wpercent:i},$("#photoPoInner").width(a),$("#photoPoInner").fadeTo("fast",1)},r.src=e},l.fakeZoomOn=function(){l.pot.position.w=Number(l.pot.position.w),$("#photoPoInner").animate({width:"+=30px"},150,function(){var e=100*$("#photoPoInner").width()/$("#photoPoInner").offsetParent().width();l.pot.position.w=$("#photoPoInner").width(),l.pot.position.wpercent=e})},l.reinitializePhoto=function(){l.pot.photoPO=void 0,setTimeout(function(){angular.element("#photoPoInner").css("width","100%"),l.pot.position.wpercent=l.pot.initialPosition?l.pot.initialPosition.wpercent:void 0,l.pot.position.w=l.pot.initialPosition?l.pot.initialPosition.w:void 0},0)},$(window).on("resize",function(){var e=Math.min(window.innerWidth,1e3)*l.pot.position.wpercent/100;e<l.maxWidthAutorized&&(e=l.maxWidthAutorized),l.pot.position.w=e,$("#photoPoInner").width(e)}),l.initRepositonatePhoto=function(){l.dragShow=!0},l.exitRepositonatePhoto=function(){l.dragShow=!1},l.getPotDefaultImage=function(){return"PotRepayement.png"},l.fakeZoomOut=function(){l.pot.position.w=Number(l.pot.position.w),!l.pot.photoPO.startsWith("data")&&$("#photoPoInner").width()-30<=l.maxWidthAutorized||$("#photoPoInner").animate({width:"-=30px"},150,function(){var e=100*$("#photoPoInner").width()/$("#photoPoInner").offsetParent().width();l.pot.position.w=$("#photoPoInner").width(),l.pot.position.wpercent=e})}}]),angular.module("lpc").controller("repayBoardController",["$scope","$rootScope","ServerFunction","$window",function(t,e,o,n){t.addRepayInviteFormSumit=function(){o.repay.invite.add(t.pot.uniqPO,t.newInvite.firstNameIN,t.newInvite.lastNameIN,t.newInvite.email,t.newInvite.repayementAmountIN,t.newInvite.relance3day,t.newInvite.relance1week).then(function(){n.location.reload()})},t.inviteSendEmail=function(e){o.repay.invite.sendEmail(t.pot.uniqPO,e).then(function(){n.location.reload()})},t.inviteSendRelance=function(){o.repay.invite.sendRelance(t.pot.uniqPO,t.selection.uniqIN,t.selection.message).then(function(){n.location.reload()})}}]),angular.module("lpc").controller("repayBoradParticipantController",["$scope","Helper","ServerFunction","$sce","$location",function(t,o,e,n,i){t.initRepayBoardParticipant=function(){t.pot.uniqPO=t.invite.uniqPO},o.handleTag.bindChange({participation:1}),o.handleTag.resetPage(),t.repayParticipate=function(){e.repay.participation.init(t.invite.uniqIN,t.invite.firstNameIN,t.invite.lastNameIN,t.invite.emailPE).then(function(e){t.caddie.result.cardPayment=e,o.handleTag.changePage("participation"),t.$on("lpc-payment-iframe-directive-ready",function(){t.$broadcast("lpc-payment-iframe-ready",{href:t.caddie.result.cardPayment.href})})})},t.editPayantInfo=function(){o.handleTag.resetPage()}}]),angular.module("lpc").controller("repayBoradParticipantSncfController",["$scope","Helper","ServerFunction","$sce","$location",function(t,o,e,n,i){t.initRepayBoardParticipant=function(){void 0!==window.groupes&&(t.groupes=window.groupes,delete window.groupes),t.pot.uniqPO=t.invite.uniqPO},setTimeout(t.initRepayBoardParticipant,0),o.handleTag.bindChange({participation:1}),o.handleTag.resetPage(),t.repayParticipate=function(){console.log("lkhlkjlkj"),e.repay.participation.init(t.invite.uniqIN,t.payer.firstNameIN,t.payer.lastNameIN,t.payer.emailPE).then(function(e){t.caddie.result.cardPayment=e,o.handleTag.changePage("participation"),t.$on("lpc-payment-iframe-directive-ready",function(){t.$broadcast("lpc-payment-iframe-ready",{href:t.caddie.result.cardPayment.href})})})},t.editPayantInfo=function(){o.handleTag.resetPage()}}]),angular.module("lpc").controller("sncfPetitGroupeRepayCreationController",["$window","$scope","ipCookie","ServerFunction","Helper","ErrorHandler","$rootScope","$location",function(o,m,h,n,P,e,i,t){if(m.addRepayInviteFormSubmit=function(){n.repay.invite.add(m.pot.uniqPO,m.newInvite.firstNameIN,m.newInvite.lastNameIN,m.newInvite.email,m.newInvite.repayementAmountIN,m.newInvite.relance3day,m.newInvite.relance1week).then(function(){o.location.reload()})},m.repayCreationFormSubmit=function(){m.logged?n.repay.createRepaySncf(m.pot.namePO,m.pot.photoPO,m.pot.organizerPO,m.pot.descriptionPO,m.pot.position.x,m.pot.position.y,m.pot.adminMessage,JSON.stringify(m.pot.passengers),JSON.stringify(m.pot.childsArray),m.pot.relance2day,m.pot.relance3day,m.pot.relance5day,m.pot.trajetVoyagesSncf,m.pot.dateVoyagesSncf,m.pot.expirationDateVoyagesSncf,m.pot.expirationHeureVoyagesSncf,m.pot.refVoyagesSncfPO):(P.handleTag.changePage("login"),$("html, body").animate({scrollTop:0},0))},m.repayEditFormSubmit=function(e){n.repay.editRepaySncf(e,m.pot.namePO,m.pot.photoPO,m.pot.organizerPO,m.pot.descriptionPO,0,0,m.pot.adminMessage,JSON.stringify(m.pot.invites),m.pot.relance2day,m.pot.relance3day,m.pot.relance5day,m.pot.trajetVoyagesSncf,m.pot.dateVoyagesSncf,m.pot.expirationDateVoyagesSncf,m.pot.expirationHeureVoyagesSncf)},void 0!==window.pot){if(m.pot=window.pot,delete window.pot,m.pot.invites&&0<m.pot.invites.length)for(var a=0;a<m.pot.invites.length;a++)m.pot.invites[a].num=a,m.pot.invites[a].groupIdSncfIN&&(m.pot.invites[a].groupID=m.pot.invites[a].groupIdSncfIN)}else{m.pot={op7TypeContributionPO:"REGULAR",position:{}};var r,l,s=P.queryString;void 0!==s["nom-pot"]&&(m.pot.namePO=s["nom-pot"]),void 0!==window.location.hash.substr(1)&&(r=window.location.hash.substr(1),l=!0,angular.forEach(m.ddSelectOptions,function(e,t){l&&e.img.toUpperCase()===(r+".png").toUpperCase()&&(m.pot.categoryPO={text:e.text,img:e.img,value:e.value},l=!1)}),l)&&(m.pot.categoryPO={text:"REPAY",img:"remboursement.png",value:"REPAY"})}function c(){n.repay.createRepaySncf(m.pot.namePO,m.pot.photoPO,m.pot.organizerPO,m.pot.descriptionPO,m.pot.position.x,m.pot.position.y,m.pot.adminMessage,JSON.stringify(m.pot.passengers),JSON.stringify(m.pot.childsArray),m.pot.relance2day,m.pot.relance3day,m.pot.relance5day,m.pot.trajetVoyagesSncf,m.pot.dateVoyagesSncf,m.pot.expirationDateVoyagesSncf,m.pot.expirationHeureVoyagesSncf,m.pot.refVoyagesSncfPO).then(void 0,function(e){if(e&&e.data&&e.data.fieldErrors)for(var t in e.data.fieldErrors)for(var o in e.data.fieldErrors[t])if(-1<jQuery.inArray(o,["organizerPO"]))return P.handleTag.resetPage(),0}),m.toLogUser={}}s=P.handleTag.serachHash();s&&void 0!==s.category&&!isNaN(s.category)&&(m.pot.categoryPO=m.ddSelectOptions[s.category]),m.addPassenferFunc=function(){for(var e=0;e<m.pot.passengers.length;e++)m.pot.passengers[e].num=e+1;var t={num:m.pot.passengers.length+1,lastName:m.newPassengerLastName,firstName:m.newPassengerFirstName,preference:m.newPassengerEmail,prix:m.newPassengerPrix,groupID:0};m.pot.passengers.push(t),m.addPassenger=!1,m.newPassengerLastName="",m.newPassengerFirstName="",m.newPassengerEmail="",m.newPassengerPrix=""},m.addPassenferFuncEdit=function(){var e={num:m.pot.invites.length,lastNameIN:m.newPassengerLastName,firstNameIN:m.newPassengerFirstName,emailPE:m.newPassengerEmail,repayementAmountIN:m.newPassengerPrix,groupIdSncfIN:0,groupID:0};m.pot.invites.push(e),m.addPassenger=!1,m.newPassengerLastName="",m.newPassengerFirstName="",m.newPassengerEmail="",m.newPassengerPrix=""},m.deletePassenger=function(e){m.pot.passengers.splice(e,1);for(var t=0;t<m.pot.passengers.length;t++)m.pot.passengers[t].num=t+1;m.fixOrphans(m.pot)},m.deletePassengerEdit=function(e,t){m.pot.invites.splice(e,1),n.repay.deleteInvite(t),m.fixOrphansEdit(m.pot)},m.initPackTribuPot=function(){m.pot.op7TypeContributionPO="SUGGESTED",m.pot.commisionTypePO="CLIENT",m.pot.categoryPO.imgSncfPetitGroupe="pack-tribu-default.png",m.pot.categoryPO.value="PACK_TRIBU",m.pot.askForMessage=!0,m.pot.inviteCanInvite=!0,m.pot.disableGreetingCardPO=!0,null==m.pot.passengers&&(m.pot.passengers=[{num:1,groupID:0},{num:2,groupID:0},{num:3,groupID:0}]),m.pot.relance2day=!1,m.pot.relance3day=!1,m.pot.relance5day=!1,m.toogleMoreOptions()},m.initSncfPot=function(){var e=P.queryString,t={},o=h("lpc-sncf-params"),o=o&&decodeURIComponent(o.replace(/\+/g,"%20"));if(void 0!==o)for(var n=o.split("|||"),i=0;i<n.length;i++){var a,r=n[i].split("=");void 0===t[r[0]]?t[r[0]]=r[1]:"string"==typeof t[r[0]]?(a=[t[r[0]],r[1]],t[r[0]]=a):t[r[0]].push(r[1])}void 0!==t&&void 0!==t.vsc_prix_moyen?m.pot.op7AmountContributionPOS=t.vsc_prix_moyen:void 0!==e.vsc_prix_moyen&&(m.pot.op7AmountContributionPOS=e.vsc_prix_moyen),void 0!==t&&void 0!==t.vsc_passagers?m.pot.passengers=JSON.parse(t.vsc_passagers):void 0!==e.vsc_passagers&&(m.pot.passengers=JSON.parse(e.vsc_passagers)),m.pot.op7TypeContributionPO="SUGGESTED",m.pot.commisionTypePO="CLIENT",m.pot.categoryPO.imgSncfPetitGroupe="sncf-petit-groupe-default.jpg",m.pot.categoryPO.value="sncf",m.pot.askForMessage=!0,m.pot.inviteCanInvite=!0,m.pot.disableGreetingCardPO=!0,null==m.pot.passengers&&(m.pot.passengers=[{num:1},{num:2},{num:3}]);for(var l=[],s=0,i=0;i<m.pot.passengers.length;i++)0==m.pot.passengers[i].prix&&(s++,l.push(m.pot.passengers[i]),m.pot.passengers.splice(i,1));m.pot.childsArray=l,m.pot.countChilds=s;for(var c=m.pot.passengers.length,i=0;i<c;i++)m.pot.passengers[i].groupID=0,m.pot.passengers[i].num=i+1;for(var d,u,p,f,g=c;g<c+m.pot.childsArray.length;g++)m.pot.childsArray[g-c].groupID=0,m.pot.childsArray[g-c].num=g+1;void 0!==t&&void 0!==t.vsc_options?m.pot.options=JSON.parse(t.vsc_options):void 0!==e.vsc_options&&(m.pot.options=JSON.parse(e.vsc_options)),void 0!==t&&void 0!==t.vsc_montant_total?m.pot.amountToReachPO=t.vsc_montant_total:void 0!==e.vsc_montant_total&&(m.pot.amountToReachPO=e.vsc_montant_total),void 0!==t&&void 0!==t.vsc_ref_dv?(m.pot.refVoyagesSncfPO=t.vsc_ref_dv,m.disableRef=!0):void 0!==e.vsc_ref_dv&&(m.pot.refVoyagesSncfPO=e.vsc_ref_dv,m.disableRef=!0),void 0!==t&&void 0!==t.vsc_date_exp?(m.pot.dateExp=P.getDate(t.vsc_date_exp),(d=P.getDate(t.vsc_date_exp)).setDate(d.getDate()-1),m.pot.op6DateLimitePO=d,m.pot.op6DateLimitePOString=P.formatDate(m.pot.dateExp),m.pot.hourLimit=t.vsc_date_exp.substring(t.vsc_date_exp.length-5)):void 0!==e.vsc_date_exp&&(m.pot.dateExp=P.getDate(e.vsc_date_exp),(d=P.getDate(e.vsc_date_exp)).setDate(d.getDate()-1),m.pot.op6DateLimitePO=d,m.pot.op6DateLimitePOString=P.formatDate(m.pot.dateExp),m.pot.hourLimit=e.vsc_date_exp.substring(e.vsc_date_exp.length-5)),void 0!==t&&void 0!==t.vsc_org_date?(u=P.getDate(t.vsc_org_date),p=t.vsc_org_date.substring(t.vsc_org_date.length-5),m.pot.dateDepart=t.vsc_org_date.substring(0,10)):void 0!==e.vsc_org_date&&(u=P.getDate(e.vsc_org_date),p=e.vsc_org_date.substring(e.vsc_org_date.length-5),m.pot.dateDepart=e.vsc_org_date.substring(0,10)),void 0!==t&&void 0!==t.vsc_nb_passagers?m.pot.nbPassagers=f=t.vsc_nb_passagers:void 0!==e.vsc_nb_passagers&&(f=e.vsc_nb_passagers,m.pot.nbPassagers=e.vsc_nb_passagers),void 0!==t&&void 0!==t.vsc_org&&void 0!==t.vsc_dest?(m.pot.namePO=" VOYAGE / "+t.vsc_org+" - "+t.vsc_dest+("undefined"!==p?" / "+P.formatDate(u)+" à "+p:""),m.pot.gareOrg=t.vsc_org,m.pot.gareDst=t.vsc_dest):void 0!==e.vsc_org&&void 0!==e.vsc_dest&&(m.pot.namePO=" VOYAGE / "+e.vsc_org+" - "+e.vsc_dest+" / "+("undefined"!==p?" / "+P.formatDate(u)+" à "+p:""),m.pot.gareOrg=e.vsc_org,m.pot.gareDst=e.vsc_dest),void 0!==u&&void 0!==m.pot.refVoyagesSncfPO&&void 0!==m.pot.dateExp&&void 0!==f&&void 0!==m.pot.op7AmountContributionPOS&&void 0!==p&&(m.pot.descriptionPO="Bonjour,Vous trouverez ci-dessous le détail de votre participation pour le voyage "+m.pot.gareOrg+"-"+m.pot.gareDst+" du "+P.formatDate(u)+". Pensez à faire votre règlement avant le "+m.pot.op6DateLimitePOString+m.pot.hourLimit+", date de l'expiration de l'option.Merci,Le Pot Commun"),m.pot.relance2day=!1,m.pot.relance3day=!1,m.pot.relance5day=!1,m.pot.trajetVoyagesSncf=m.pot.gareOrg+" - "+m.pot.gareDst,m.pot.dateVoyagesSncf=m.pot.dateDepart,m.pot.expirationDateVoyagesSncf=m.pot.op6DateLimitePOString,m.pot.expirationHeureVoyagesSncf=m.pot.hourLimit,m.toogleMoreOptions()},m.$watch("promoCodeError",function(){m.promoCodeError&&m.toogleMoreOptions()}),m.$watch("pot.op7AmountContributionPOS",function(){isNaN(m.pot.op7AmountContributionPOS)?m.pot.op7AmountContributionWithComPOS="":m.pot.op7AmountContributionWithComPOS=P.fixFloat(1.0096*m.pot.op7AmountContributionPOS)},!0),m.checkAdress=function(){n.pot.invite.checkAdress(m.person.emailPE).then(function(e){e.is_valid?m.propablyWrongMail=!1:m.propablyWrongMail=!0},function(e){m.propablyWrongMail=!1})},m.coutTotal=function(){var e=0;null==m.pot.passengers&&(m.pot.passengers=[]);for(var t=0;t<m.pot.passengers.length;t++)e+=m.pot.passengers[t].prix;return e},m.nombreTotal=function(){return null==m.pot.passengers&&(m.pot.passengers=[]),m.pot.passengers.length},m.maxGroup=function(){for(var e=0,t=0;t<m.pot.passengers.length;t++)m.pot.passengers[t].groupID&&Math.abs(m.pot.passengers[t].groupID)>e&&(e=Math.abs(m.pot.passengers[t].groupID));return e},m.maxGroupEdit=function(){for(var e=0,t=0;t<m.pot.invites.length;t++)m.pot.invites[t].groupIdSncfIN&&Math.abs(m.pot.invites[t].groupIdSncfIN)>e&&(e=Math.abs(m.pot.invites[t].groupIdSncfIN));return e},m.clearGroup=function(){for(var e=0;e<m.pot.passengers.length;e++)m.pot.passengers[e].group=!1;return m.group=!1,null},m.clearGroupEdit=function(){for(var e=0;e<m.pot.invites.length;e++)m.pot.invites[e].group=!1;return m.group=!1,null},m.coutTotalEdit=function(){for(var e=0,t=0;t<m.pot.invites.length;t++)e+=m.pot.invites[t].repayementAmountIN;return e},m.contains=function(e,t){for(var o=0;o<e.length;o++)if(e[o]==-1*t)return!0;return!1},m.getByField=function(e,t,o){for(var n in e)if(e[n][t]==o)return e[n]},m.fixMastersTab=function(e){for(var t=[],o=0;o<e.passengers.length;o++)e.passengers[o].groupID<0&&t.push(e.passengers[o].groupID);t.sort();for(o=0;o<t.length;o++)Math.abs(t[o])!=o+1&&(e=m.fixAll(Math.abs(t[o]),o+1,e));return e},m.fixAll=function(e,t,o){for(var n=0;n<o.passengers.length;n++)o.passengers[n].groupID==-1*e?o.passengers[n].groupID=-1*t:o.passengers[n].groupID==e&&(o.passengers[n].groupID=t);return o},m.fixMastersTabEdit=function(e){for(var t=[],o=0;o<e.invites.length;o++)e.invites[o].groupIdSncfIN<0&&t.push(e.invites[o].groupIdSncfIN);t.sort();for(o=0;o<t.length;o++)Math.abs(t[o])!=o+1&&(e=m.fixAllEdit(Math.abs(t[o]),o+1,e));return e},m.fixAllEdit=function(e,t,o){for(var n=0;n<o.invites.length;n++)o.invites[n].groupIdSncfIN==-1*e?o.invites[n].groupIdSncfIN=-1*t:o.invites[n].groupIdSncfIN==e&&(o.invites[n].groupIdSncfIN=t);return o},m.fixOrphans=function(e){for(var t=[],o=0;o<e.passengers.length;o++)e.passengers[o].groupID<0&&t.push(e.passengers[o].groupID);for(o=0;o<e.passengers.length;o++)0<e.passengers[o].groupID&&(m.contains(t,e.passengers[o].groupID)||(e.passengers[o].groupID=0));return e},m.fixOrphansEdit=function(e){for(var t=[],o=0;o<e.invites.length;o++)e.invites[o].groupIdSncfIN<0&&t.push(e.invites[o].groupIdSncfIN);for(o=0;o<e.invites.length;o++)0<e.invites[o].groupIdSncfIN&&(m.contains(t,e.invites[o].groupIdSncfIN)||(e.invites[o].groupID=0,e.invites[o].groupIdSncfIN=0));return e},m.fixOrphanMaster=function(e){for(var t=0;t<e.passengers.length;t++)e.passengers[t].groupID<0&&0==m.countChilds(e,e.passengers[t].groupID)&&(e.passengers[t].groupID=0);return e},m.fixOrphanMasterEdit=function(e){for(var t=0;t<e.invites.length;t++)e.invites[t].groupIdSncfIN<0&&0==m.countChildsEdit(e,e.invites[t].groupIdSncfIN)&&(e.invites[t].groupIdSncfIN=0);return e},m.countChilds=function(e,t){for(var o=0,n=0;n<e.passengers.length;n++)e.passengers[n].groupID==-1*t&&o++;return o},m.countChildsEdit=function(e,t){for(var o=0,n=0;n<e.invites.length;n++)e.invites[n].groupIdSncfIN==-1*t&&o++;return o},m.removeTempGroups=function(){angular.forEach(m.pot.passengers,function(e){delete e.group})},m.isOdd=function(e){return!(Math.abs(e)%2==0)},m.isEmailTypedForAGroupButThis=function(e,t){if(0!=e)for(var o=0;o<m.pot.passengers.length;o++)if(Math.abs(m.pot.passengers[o].groupID)==Math.abs(e)&&m.pot.passengers[o].preference&&m.pot.passengers[o].num!=t)return!0;return!1},m.isEmailTypedForAGroupButThisEdit=function(e,t){if(0!=e)for(var o=0;o<m.pot.invites.length;o++)if(Math.abs(m.pot.invites[o].groupIdSncfIN)==Math.abs(e)&&m.pot.invites[o].emailPE&&m.pot.invites[o].num!=t)return!0;return!1},m.findProperMaster=function(e,t){for(var o=0;o<t.length;o++){if(t[o].num==e&&null!=t[o].preference&&0<t[o].preference.length)return e;null!=t[o].preference&&0<t[o].preference.length&&(e=t[o].num)}return e},m.fixProperMasterOnTouch=function(e,t){if(0!=e){for(var o=!1,n=0,i=0;i<m.pot.passengers.length;i++)Math.abs(m.pot.passengers[i].groupID)==Math.abs(e)&&null!=m.pot.passengers[i].preference&&0<m.pot.passengers[i].preference.length&&(m.pot.passengers[i].groupID=-Math.abs(e),n=m.pot.passengers[i].num,o=!0);if(o)for(i=0;i<m.pot.passengers.length;i++)Math.abs(m.pot.passengers[i].groupID)==Math.abs(e)&&m.pot.passengers[i].groupID<0&&m.pot.passengers[i].num!=n&&(m.pot.passengers[i].groupID=Math.abs(e))}},m.fixProperMasterOnTouchEdit=function(e,t){if(0!=e){for(var o=!1,n=0,i=0;i<m.pot.invites.length;i++)Math.abs(m.pot.invites[i].groupIdSncfIN)==Math.abs(e)&&null!=m.pot.invites[i].emailPE&&0<m.pot.invites[i].emailPE.length&&(m.pot.invites[i].groupIdSncfIN=-Math.abs(e),n=m.pot.invites[i].num,o=!0);if(o)for(i=0;i<m.pot.invites.length;i++)Math.abs(m.pot.invites[i].groupIdSncfIN)==Math.abs(e)&&m.pot.invites[i].groupIdSncfIN<0&&m.pot.invites[i].num!=n&&(m.pot.invites[i].groupIdSncfIN=Math.abs(e))}},m.groupPassengersFunc=function(){for(var e=m.maxGroup(),t=-255,o=[],n=[],i=0;i<m.pot.passengers.length;i++)m.pot.passengers[i].group&&(-255===t&&(t=m.pot.passengers[i].num),o.push(m.pot.passengers[i].num),n.push(m.pot.passengers[i]));for(t=m.findProperMaster(t,n),i=0;i<o.length;i++)m.getByField(m.pot.passengers,"num",o[i]).groupID=t==o[i]?-1*(e+1):e+1;for(var a=!1,i=0;i<m.pot.passengers.length;i++)Math.abs(m.pot.passengers[i].groupID)==e+1&&(a?m.pot.passengers[i].preference="":m.pot.passengers[i].preference&&0<m.pot.passengers[i].preference.length&&(a=!0));return m.pot=m.fixOrphans(m.pot),m.pot=m.fixMastersTab(m.pot),m.pot=m.fixOrphanMaster(m.pot),m.clearGroup(),m.pot.passengers.sort(function(e,t){return e.groupID||t.groupID?e.groupID?t.groupID?Math.abs(e.groupID)-Math.abs(t.groupID):-1:1:0}),null},m.findProperMasterEdit=function(e,t){for(var o=0;o<t.length;o++){if(t[o].num==e&&null!=t[o].emailPE)return e;if(null!=t[o].emailPE)return e=t[o].num}return e},m.fixAllProperMasters=function(e){for(var t=[],o=0;o<e.length;o++)e[o].groupID<0&&t.push(e[o]);for(o=0;o<t.length;o++){var n=!1;if(!(0<t[o].preference.length))for(var i=t[o].num,a=0;a<e.length;a++)Math.abs(t[o].groupID)==Math.abs(e[a].groupID)&&0<e[a].preference.length&&(e[a].groupID=t[o].groupID,n=!0,a=e.length);if(n)for(a=0;a<e.length;a++)e[o].num==i&&(e[o].num=-1*e[o].num)}return e},m.dispersePassengersFunc=function(){for(var e=0;e<m.pot.passengers.length;e++)m.pot.passengers[e].groupID=0},m.dispersePassengersFuncEdit=function(){for(var e=0;e<m.pot.invites.length;e++)0==m.pot.invites[e].contributionIN&&(m.pot.invites[e].groupIdSncfIN=0);m.pot=m.fixMastersTabEdit(m.pot)},m.groupPassengersFuncEdit=function(){for(var e=m.maxGroupEdit(),t=-255,o=[],n=[],i=0;i<m.pot.invites.length;i++)m.pot.invites[i].group&&(-255==t&&(t=m.pot.invites[i].num),o.push(m.pot.invites[i].num),n.push(m.pot.invites[i]));for(t=m.findProperMasterEdit(t,n),i=0;i<o.length;i++)m.getByField(m.pot.invites,"num",o[i]).groupIdSncfIN=t==o[i]?-1*(e+1):e+1;for(var a=!1,i=0;i<m.pot.invites.length;i++)Math.abs(m.pot.invites[i].groupIdSncfIN)==e+1&&0!=Math.abs(m.pot.invites[i].groupIdSncfIN)&&(a?m.pot.invites[i].emailPE="":m.pot.invites[i].emailPE&&0<m.pot.invites[i].emailPE.length&&(a=!0));return m.pot=m.fixOrphansEdit(m.pot),m.pot=m.fixMastersTabEdit(m.pot),m.pot=m.fixOrphanMasterEdit(m.pot),m.clearGroupEdit(),m.pot.invites.sort(function(e,t){return e.groupIdSncfIN||t.groupIdSncfIN?e.groupIdSncfIN?t.groupIdSncfIN?Math.abs(e.groupIdSncfIN)-Math.abs(t.groupIdSncfIN):-1:1:0}),null},m.nombreTotalEdit=function(){return m.pot.invites.length},m.initPosition=function(o,n,e,i){i&&void 0!==i&&(a=1e3*i/100);var a,r=new Image;r.onload=function(){var e=r.width,t=r.height;m.maxWidthAutorized=e/t*460,a&&void 0!==a?a<=m.maxWidthAutorized&&(a=m.maxWidthAutorized):a=1e3,m.pot.position={x:o,y:n,w:a,wpercent:i},$("#photoPoInner").width(a),$("#photoPoInner").fadeTo("fast",1)},r.src=e},m.fakeZoomOn=function(){m.pot.position.w=Number(m.pot.position.w),$("#photoPoInner").animate({width:"+=30px"},150,function(){var e=100*$("#photoPoInner").width()/$("#photoPoInner").offsetParent().width();m.pot.position.w=$("#photoPoInner").width(),m.pot.position.wpercent=e})},$(window).on("resize",function(){var e=Math.min(window.innerWidth,1e3)*m.pot.position.wpercent/100;e<m.maxWidthAutorized&&(e=m.maxWidthAutorized),m.pot.position.w=e,$("#photoPoInner").width(e)}),m.initRepositonatePhoto=function(){m.dragShow=!0},m.exitRepositonatePhoto=function(){m.dragShow=!1},m.fakeZoomOut=function(){m.pot.position.w=Number(m.pot.position.w),!m.pot.photoPO.startsWith("data")&&$("#photoPoInner").width()-30<=m.maxWidthAutorized||$("#photoPoInner").animate({width:"-=30px"},150,function(){var e=100*$("#photoPoInner").width()/$("#photoPoInner").offsetParent().width();m.pot.position.w=$("#photoPoInner").width(),m.pot.position.wpercent=e})},m.changeIfRepay=function(e,t){"REPAY"===e.value&&(o.location=t)},m.resetPromoCodeIfEmpty=function(){m.promoCode&&""!==m.promoCode||(m.potCreationStepTwo.namePCC.$setValidity("Code promo invalide",!0),m.potCreationStepTwo.namePCC.$setValidity("serverError",!0),m.potCreationStepTwo.namePCC.$setValidity("required",!0),m.promoCodeError="",m.promoCodeSuccess="")},m.resetPromoCode=function(){m.pot.opPromoCode||(m.potCreationStepTwo.namePCC.$setValidity("Code promo invalide",!0),m.potCreationStepTwo.namePCC.$setValidity("serverError",!0),m.potCreationStepTwo.namePCC.$setValidity("required",!0),m.promoCodeError="",m.promoCodeSuccess="")},m.resetContribution=function(){"REGULAR"===m.pot.op7TypeContributionPO?(m.pot.op7AmountContributionTemp=m.pot.op7AmountContributionPOS,m.pot.op7AmountContributionPOS="",m.pot.op7AmountContributionPOF="",m.potCreationStepTwo.op7AmountContributionSuggested.$setValidity("numeric",!0),m.potCreationStepTwo.op7AmountContributionFixed&&m.potCreationStepTwo.op7AmountContributionFixed.$setValidity("numeric",!0)):"SUGGESTED"===m.pot.op7TypeContributionPO?(m.pot.op7AmountContributionPOF="",void 0!==m.pot.op7AmountContributionTemp&&(m.pot.op7AmountContributionPOS=m.pot.op7AmountContributionTemp),m.potCreationStepTwo.op7AmountContributionFixed&&m.potCreationStepTwo.op7AmountContributionFixed.$setValidity("numeric",!0)):"FIXED"===m.pot.op7TypeContributionPO&&(m.pot.op7AmountContributionPOS="",m.potCreationStepTwo.op7AmountContributionSuggested.$setValidity("numeric",!0))},m.dateLimiteChange=function(){m.pot.aop6DateLimitePOActive?m.pot.op6DateLimitePO=m.pot.op6DateLimitePO||m.pot.op6DateLimitePOTmp:(m.pot.op6DateLimitePOTmp=m.pot.op6DateLimitePO,m.pot.op6DateLimitePO=void 0)},m.sncfResetAmountToReach=function(){m.pot.amountToReachPOActive?m.pot.amountToReachPO=m.pot.amountToReachPO||m.pot.amountToReachPOTmp:(m.pot.amountToReachPOTmp=m.pot.amountToReachPO,m.pot.amountToReachPO=void 0)},m.toogleMoreOptions=function(){angular.element("#moreOptions").slideToggle(),angular.element("#moreOptionsBTN").toggleClass("minuis")},P.handleTag.bindChange({creation2:1,login:2}),P.handleTag.resetPage(),m.submitEditPotStepTwo=function(){n.pot.potEdit(m.pot)},m.person={},m.toLogUser={},m.login=function(){if(void 0!==m.toLogUser.tfaCode){for(var e="",t=0;t<Object.keys(m.toLogUser.tfaCode).length;t++)e+=m.toLogUser.tfaCode[t];m.toLogUser.tfaCode=e}n.login(m.toLogUser).then(function(e){1==e.needGoogleTfa?(i.hidePopupV2("lpcLoginSignupPopup"),i.showPopupV2("googleValidatorPopup",{toLogUser:m.toLogUser,afterSignin:c})):1==e.needSmsTfa?(i.hidePopupV2("lpcLoginSignupPopup"),i.showPopupV2("smsValidatorPopup",{toLogUser:m.toLogUser,afterSignin:c,telPE:e.telPE})):c()},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)if(e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"==e.data.fieldErrors[t].smsLimitSmsExceeded){i.hidePopupV2("lpcLoginSignupPopup"),i.showPopupV2("accountBlockedPopup");break}})},m.loginFB=function(){try{FB.login(function(e){e.authResponse&&(window.authResponse=e.authResponse,window.lpcLog("response "+JSON.stringify(e)),n.account.facebookConnect(JSON.stringify(e.authResponse)).then(function(e){n.repay.createRepaySncf(m.pot.namePO,m.pot.photoPO,m.pot.organizerPO,m.pot.descriptionPO,m.pot.position.x,m.pot.position.y,m.pot.adminMessage,JSON.stringify(m.pot.passengers),m.pot.relance2day,m.pot.relance3day,m.pot.relance5day,m.pot.trajetVoyagesSncf,m.pot.dateVoyagesSncf,m.pot.expirationDateVoyagesSncf,m.pot.expirationHeureVoyagesSncf,m.pot.refVoyagesSncfPO)},function(e){"askForAnEmail"==e.data.fieldErrors[0].fb?i.showPopup("facebookPop"):m.facebookError=!0}))},{scope:"email,user_birthday",return_scopes:!0})}catch(e){i.detectPrivateMode(function(e){document.getElementsByClassName("cannot-load-facebook-api-error-message")[0].innerHTML=void 0!==e&&e?o.fbCannotLoadMessage:""})}},m.submitPromoCode=function(e){return n.pot.promoCode.submitPromoCode(e).then(function(e){return m.pot.pc=e,m.promoCodeSuccess=!0,!(m.promoCodeError=!1)},function(e){throw(m.promoCodeError=e.data.fieldErrors[0].codePromo)&&(m.promoCodeError=e.data.fieldErrors[0].codePromo),m.promoCodeError=!0,m.promoCodeSuccess=!1,e})};m.submitCreateAccount=function(){n.repay.createWithAccountSncf(m.pot.namePO,m.pot.namePO.photoPO,m.pot.organizerPO,m.pot.descriptionPO,m.pot.position.x,m.pot.position.y,m.person,m.pot.adminMessage,JSON.stringify(m.pot.passengers),JSON.stringify(m.pot.childsArray),m.pot.relance2day,m.pot.relance3day,m.pot.relance5day,m.pot.trajetVoyagesSncf,m.pot.dateVoyagesSncf,m.pot.expirationDateVoyagesSncf,m.pot.expirationHeureVoyagesSncf,m.pot.refVoyagesSncfPO).then(void 0,function(e){if(e&&e.data&&e.data.fieldErrors)for(var t in e.data.fieldErrors)for(var o in e.data.fieldErrors[t])if(-1<jQuery.inArray(o,["organizerPO"]))return P.handleTag.resetPage(),0})},m.isIdeaBoxCompatible=function(){switch(m.pot.categoryPO.value){case"BIRTHDAY":case"COMMON_GIFT":case"DEPARTURE_KITTY":case"PARTY_HONEY_NIGHT":return!0;default:return!1}}}]),angular.module("lpc").controller("listCreationEditionController",["$scope","ServerFunction","Helper","$location","$rootScope","$window","$sce",function(l,o,n,e,i,a,t){l.person={},l.toLogUser={},l.pot=window.pot||{},l.typePO=window.typePO,l.pot.typePO=l.typePO,l.edit=null!=window.edit,l.urlPersonalized=!1,delete window.pot,delete window.typePO,l.editorIframeUrl=t.trustAsResourceUrl(i.editorIframeOrigin+"/custom-editor");function r(e){if(e&&e.data&&e.data.fieldErrors){for(var t in e.data.fieldErrors)for(var o in e.data.fieldErrors[t])if(-1<jQuery.inArray(o,["namePO","bridesNamePO","descriptionPO","commisionTypePO","uniqPO"]))return n.handleTag.resetPage(),0;throw e}}function s(){o.list.listAdd(l.pot).then(function(e){return e},r),l.toLogUser={}}t=window.addEventListener?"addEventListener":"attachEvent",(0,window[t])("attachEvent"==t?"onmessage":"message",function(e){e.origin===i.editorIframeOrigin&&e.data&&e.data.description&&(l.pot.descriptionPO=e.data.description)}),l.initEditorIframe=function(){l.editorIframe=document.getElementById("editor-iframe"),l.editorIframe&&(l.editorIframe.onload=function(){var e=l.pot&&l.pot.descriptionPO?l.pot.descriptionPO:window.default_desc;l.editorIframe.contentWindow.postMessage({description:e},i.editorIframeOrigin)})},l.initEditorIframe(),l.froalaOptions={toolbarSticky:!1,key:window.froalaLicenseKey,placeholderText:window.default_desc,heightMin:200,heightMax:257,theme:"custom",language:window.locale,pluginsEnabled:["image","table","lists","colors","video","lineBreaker","fontFamily","fontSize","link","emoticons","align"],toolbarButtons:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsMD:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsSM:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsXS:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],imageUploadURL:"/desc-image",imageUploadMethod:"POST",imageUploadParam:"upload",imageMaxSize:15728640,imageAllowedTypes:["jpeg","jpg","png"],videoInsertButtons:["videoBack","|","videoByURL"],videoResize:!0,events:{"froalaEditor.blur":function(){l.$broadcast("forala-editor-on-blur")},"froalaEditor.focus":function(){l.$broadcast("forala-editor-on-focus")}}},l.$watch("pot.uniqPO",function(e){l.listeCreationForm.uniqPO&&(l.listeCreationForm.uniqPO.$dirty=l.listeCreationForm.uniqPO.$dirty||null!=e)}),l.initialize=function(e){l.initControls=e,l.initControls.initialize(l.froalaOptions),l.deleteAll=function(){e.getEditor()("html.set","")}},l.pot||(l.pot={}),i.isFromPotCreation()||i.isFromSaleCreation()?l.ddSelectOptions=n.pot.initCategoryArrayLists():l.ddSelectOptions=n.pot.initCategoryArrayListsReduced(),l.reInitDropDown=function(){"LISTE_DE_MARIAGE"==l.typePO?l.pot.categoryPO={text:CATEGORIE_POT_LABELS.WEDDING,img:"Wedding.png?h=hash",value:"WEDDING"}:l.pot.categoryPO={text:CATEGORIE_POT_LABELS.BIRTH,img:"Birth.png?h=hash",value:"BIRTH"}},l.reInitDropDown(),l.$on("lpc-popup-close-event",function(e,t){t&&"confirmRedirectionPopup"==t.popupName&&l.reInitDropDown()}),l.changeIfRedirection=function(e){var t;"BIRTH"===e.value&&"LISTE_DE_MARIAGE"==l.typePO||"WEDDING"===e.value&&"LISTE_DE_NAISSANCE"==l.typePO?(t=i.isFromPotCreation()?window.URLS[e.value].link+"#from-pot-creation":i.isFromSaleCreation()?window.URLS[e.value].link+"#from-sale-creation":window.URLS[e.value].link,a.location=t):"BIRTH"!==e.value&&"WEDDING"!==e.value&&(i.showPopup("confirmRedirectionPopup"),"REPAY"===e.value?l.selectedCategory=window.URLS.REPAY:"SALE"===e.value?(l.selectedCategory=window.URLS.SALE,l.selectedCategory.link=l.selectedCategory.link+"#from-list-creation"):(l.selectedCategory=window.URLS.KITTY,l.selectedCategory.link=l.selectedCategory.link+"#"+e.value))},null!=l.pot?l.pot=n.list.formatClient(l.pot):l.pot={position:{}},t=n.queryString;void 0!==t["nom-pot"]&&(l.pot.namePO=t["nom-pot"]),l.initPosition=function(o,n,e,i){i&&void 0!==i&&(a=1e3*i/100);var a,r=new Image;r.onload=function(){var e=r.width,t=r.height;l.maxWidthAutorized=e/t*460,a&&void 0!==a?a<=l.maxWidthAutorized&&(a=l.maxWidthAutorized):a=1e3,l.pot.position={x:o,y:n,w:a,wpercent:i},$("#photoPoInner").width(a),$("#photoPoInner").fadeTo("fast",1)},r.src=e},l.checkAdress=function(){o.pot.invite.checkAdress(l.person.emailPE).then(function(e){e.is_valid?l.propablyWrongMail=!1:l.propablyWrongMail=!0},function(e){l.propablyWrongMail=!1})},l.fakeZoomOn=function(){l.pot.position.w=Number(l.pot.position.w),$("#photoPoInner").animate({width:"+=30px"},150,function(){var e=100*$("#photoPoInner").width()/$("#photoPoInner").offsetParent().width();l.pot.position.w=$("#photoPoInner").width(),l.pot.position.wpercent=e})},$(window).on("resize",function(){var e=Math.min(window.innerWidth,1e3)*l.pot.position.wpercent/100;e<l.maxWidthAutorized&&(e=l.maxWidthAutorized),l.pot.position.w=e,$("#photoPoInner").width(e)}),l.initRepositonatePhoto=function(){l.dragShow=!0},l.exitRepositonatePhoto=function(){l.dragShow=!1},l.reinitializePhoto=function(){l.pot.photoPO=void 0,setTimeout(function(){angular.element("#photoPoInner").css("width","100%"),l.pot.position.wpercent=l.pot.initialPosition?l.pot.initialPosition.wpercent:void 0,l.pot.position.w=l.pot.initialPosition?l.pot.initialPosition.w:void 0},0)},l.fakeZoomOut=function(){l.pot.position.w=Number(l.pot.position.w),!l.pot.photoPO.startsWith("data")&&$("#photoPoInner").width()-30<=l.maxWidthAutorized||$("#photoPoInner").animate({width:"-=30px"},150,function(){var e=100*$("#photoPoInner").width()/$("#photoPoInner").offsetParent().width();l.pot.position.w=$("#photoPoInner").width(),l.pot.position.wpercent=e})},l.submitEditList=function(){o.list.listEdit(l.pot)},n.handleTag.bindChange({login:1}),n.handleTag.resetPage(),l.login=function(){if(void 0!==l.toLogUser.tfaCode){for(var e="",t=0;t<Object.keys(l.toLogUser.tfaCode).length;t++)e+=l.toLogUser.tfaCode[t];l.toLogUser.tfaCode=e}o.login(l.toLogUser).then(function(e){1==e.needSMSOrGoogleTfa?(i.hidePopupV2("lpcLoginSignupPopup"),i.showPopupV2("googleValidatorPopup",{toLogUser:l.toLogUser,afterSignin:reload})):1==e.needGoogleTfa?(i.hidePopupV2("lpcLoginSignupPopup"),i.showPopupV2("googleValidatorPopup",{toLogUser:l.toLogUser,afterSignin:s})):1==e.needSmsTfa?(i.hidePopupV2("lpcLoginSignupPopup"),i.showPopupV2("smsValidatorPopup",{toLogUser:l.toLogUser,afterSignin:s,telPE:e.telPE})):s()},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)if(e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"==e.data.fieldErrors[t].smsLimitSmsExceeded){i.hidePopupV2("lpcLoginSignupPopup"),i.showPopupV2("accountBlockedPopup");break}})},l.loginFB=function(){try{FB.login(function(e){e.authResponse&&(window.authResponse=e.authResponse,window.lpcLog("response "+JSON.stringify(e)),o.account.facebookConnect(JSON.stringify(e.authResponse)).then(function(e){o.list.listAdd(l.pot,function(e){return e},r)},function(e){"askForAnEmail"==e.data.fieldErrors[0].fb?i.showPopup("facebookPop"):l.facebookError=!0}))},{scope:"email,user_birthday",return_scopes:!0})}catch(e){i.detectPrivateMode(function(e){document.getElementsByClassName("cannot-load-facebook-api-error-message")[0].innerHTML=void 0!==e&&e?a.fbCannotLoadMessage:""})}},l.submitCreateList=function(){l.logged?o.list.listAdd(l.pot):(n.handleTag.changePage("login"),$("html, body").animate({scrollTop:0},0))},l.submitCreateAccount=function(){o.list.listAndAccountAdd(l.pot,l.person).then(function(e){return e},r)};l.generateUniqPO=function(){l.pot.namePO&&(l.pot.uniqPO=function(e){if(0<e.length){var t=e.toLowerCase();for(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(new RegExp(/\s/g),"-")).replace(new RegExp(/[àáâãäå]/g),"a")).replace(new RegExp(/æ/g),"ae")).replace(new RegExp(/ç/g),"c")).replace(new RegExp(/[èéêë]/g),"e")).replace(new RegExp(/[ìíîï]/g),"i")).replace(new RegExp(/ñ/g),"n")).replace(new RegExp(/[òóôõö]/g),"o")).replace(new RegExp(/œ/g),"oe")).replace(new RegExp(/[ùúûü]/g),"u")).replace(new RegExp(/[ýÿ]/g),"y")).replace(new RegExp(/[^\w|-]/g),"")).replace(new RegExp(/[-]{2}/g),"-");t.lastIndexOf("-")==t.length||0==t.indexOf("-");)t.lastIndexOf("-")==t.length?t=t.substr(0,t.length-1):0==t.indexOf("-")&&(t=t.substr(1,t.length-1))}return t.toLowerCase()}(l.pot.namePO))}}]),angular.module("lpc").controller("classicStoryListController",["$scope","ServerFunction",function(t,o){t.giftClicked=function(e){e.checked=!e.checked,!1===e.checked&&(e.hovered=!1)},t.submit=function(e){o.list.listGiftClassicAdd(t.uniqPO,e,t.gifts)}}]),angular.module("lpc").controller("storyListFreeParticipationController",["$scope","$rootScope","ServerFunction","ipCookie","$sce","$location","Helper",function(t,e,o,n,i,a,r){r.handleTag.bindChange({recapitulatif:1}),r.handleTag.resetPage(),t.pot={},t.$watch("caddie.totalAndCom",function(){t.calculateTotalAndCom()},!0),t.calculateTotalAndCom=function(){var e;t.caddie&&t.caddie.payman&&t.caddie.payman.contributionMP&&0!==t.caddie.payman.length&&(0==t.caddie.payman.contributionMP&&(t.caddie.totalAndCom=0),e=t.caddie.payman.contributionMP.replace?parseFloat(t.caddie.payman.contributionMP.replace(/,|;/g,".")):t.caddie.payman.contributionMP,t.caddie.com=r.computeCom(e,t.pot),t.caddie.totalAndCom=t.caddie.com+e)},t.parseFloatContribution=function(){void 0!==t.caddie.payman.contributionMP&&("number"==typeof t.caddie.payman.contributionMP&&(t.caddie.payman.contributionMP=""+t.caddie.payman.contributionMP),","!==t.caddie.payman.contributionMP.slice(-1)&&";"!==t.caddie.payman.contributionMP.slice(-1)||(t.caddie.payman.contributionMP=t.caddie.payman.contributionMP.replace(",","."),t.caddie.payman.contributionMP=t.caddie.payman.contributionMP.replace(";",".")),"."===t.caddie.payman.contributionMP.slice(-1)||"0"===t.caddie.payman.contributionMP.slice(-1)&&-1!=t.caddie.payman.contributionMP.lastIndexOf(".")&&t.caddie.payman.contributionMP.lastIndexOf("0")>t.caddie.payman.contributionMP.lastIndexOf(".")||(t.caddie.payman.contributionMP=parseFloat(t.caddie.payman.contributionMP)))},t.$watch("caddie.payman.contributionMP",function(){t.calculateTotalAndComContribution()}),t.calculateTotalAndComContribution=function(){t.caddie.payman.contributionMP&&0!=t.caddie.payman.contributionMP&&void 0!==t.pot&&(t.caddie.com=r.computeCom(t.caddie.payman.contributionMP,t.pot),t.caddie.totalAndCom=t.caddie.com+t.caddie.payman.contributionMP)},t.submitNewCaddieFree=function(){t.caddie.disabled=!0,o.list.listNewCaddieFree(t.uniqPO,t.caddie).then(function(e){t.caddie=angular.copy(e),lpcLog("submitNewCaddieFree caddie "+JSON.stringify(t.caddie)),r.handleTag.changePage("recapitulatif"),t.smOperationId=e.result.cardPayment.operationId,t.smPayinTokenId=e.result.cardPayment.payinTokenId,t.smExtraData=e.result.cardPayment.extraData,setTimeout(function(){hostedFields.load()},500),$("html, body").animate({scrollTop:0},0)},function(){t.caddie.disabled=!1})},t.editPayantInfo=function(){r.handleTag.resetPage()}}]),angular.module("lpc").controller("storyListParticipationController",["$scope","$rootScope","ServerFunction","ipCookie","$sce","$location","Helper",function(t,a,e,r,o,n,i){i.handleTag.bindChange({recapitulatif:1}),i.handleTag.resetPage(),t.$watch("uniqPO",function(){t.giftsInCart=null!=r("cart_"+t.uniqPO)?r("cart_"+t.uniqPO):Array()}),t.pot={},t.$watch("totalInCart",function(){t.calculateTotalAndCom()}),t.calculateTotalAndCom=function(){t.totalInCart&&0!=t.totalInCart&&void 0!==t.pot&&(t.caddie.com=i.computeCom(t.totalInCart,t.pot),t.caddie.totalAndCom=t.caddie.com+t.totalInCart)};var l={selectedGift:{}},s=(t.$watch("giftsInCart",function(){null==t.giftsInCart||0==t.giftsInCart.length?t.totalInCart=0:(t.totalInCart=s(),lpcLog("$scope.$watch:giftsInCart totalInCart "+t.totalInCart))},!0),function(){var o=0;return angular.forEach(t.giftsInCart,function(e,t){o+=e.amountInCart}),o});t.initDeleteGift=function(e){l.selectedGift={action:"delete",uniqPO:t.uniqPO,gift:e},a.showPopup("deleteGift")},t.deleteGift=function(){var o,n,i;t.giftsInCart.splice((o=l.selectedGift.gift.uniqSG,n=!0,i=-1,angular.forEach(t.giftsInCart,function(e,t){n&&e.uniqSG==o&&(i=t,n=!1)}),i),1),r("cart_"+t.uniqPO,t.giftsInCart,{path:"/"}),a.hidePopup("deleteGift")},t.submitNewCaddieCart=function(){e.list.listNewCaddieCart(t.uniqPO,t.caddie).then(function(e){e&&(t.caddie=angular.copy(e),lpcLog("submitNewCaddieCart caddie "+JSON.stringify(t.caddie)),i.handleTag.changePage("recapitulatif"),t.smOperationId=e.result.cardPayment.operationId,t.smPayinTokenId=e.result.cardPayment.payinTokenId,t.smExtraData=e.result.cardPayment.extraData,setTimeout(function(){hostedFields.load()},500),$("html, body").animate({scrollTop:0},0))},function(){t.caddie.disabled=!1})},t.deleteCart=function(e){r.remove("cart_"+e)},t.editPayantInfo=function(){i.handleTag.resetPage()}}]),angular.module("lpc").controller("listGiftCtrl",["Helper","$filter","$scope","$rootScope","ServerFunction","ipCookie","$timeout",function(e,o,n,i,a,t,r){n.gifts=window.allGifts,delete window.allGifts,n.isPcWindow=function(){return e.isPcScreen()};n.initAddGift=function(){i.showPopupV2("addGiftList");n.nameSG,n.giftImage,n.quantitySGP,n.price;gift.disabled=!0,null==gift.uniqSG&&a.list.listGiftAdd(uniqPO,gift.nameSG,gift.pricePerUnitSGP,gift.quantitySGP,gift.image).then(function(e){e.uniqPO==uniqPO&&(angular.copy(e.gift,gift),console.log("copied"),n.sortableOptions={disabled:!1})},function(e){gift.disabled=!1})},n.initEditGift=function(){},n.initDeleteGift=function(e,t){null==t.uniqSG?n.gifts.splice(getIndexByID(t.indexNew,!0),1):(actionGift={uniqPO:e,gift:t},i.showPopupV2("deleteGift"))},n.sortableOptions={stop:function(e,t){a.list.listGiftEditOrder(n.pot.uniqPO,l(n.gifts)).then(function(e){for(var t in n.gifts)n.gifts[t].orderSGP=t},function(e){n.gifts=o("orderBy")(n.gifts,"orderSGP")})}};var l=function(e){var o=[];return angular.forEach(e,function(e,t){o[t]={uniqSG:e.uniqSG,orderSGP:t}}),o}}]),angular.module("lpc").controller("storyGiftController",["Helper","$filter","$scope","$rootScope","ServerFunction","ipCookie","$timeout","$window",function(e,o,r,l,n,i,t,a){r.initPartitipation=function(e){a.location=e+"?participation-amount="+((r.participationAmount||"")+"").replace(/,/g,".")},r.gifts=window.allGifts,r.admin=window.admin,delete window.allGifts,delete window.admin,r.admin&&n.list.listFetchInvites(uniqPO.uniqPO.toString()).then(function(e){d=!0,r.invites=e}),r.percentageReached=function(e,t){e=100*e/t;return o("number")(100<e?100:e,0)},r.goToLocation=function(e,t,o){e.preventDefault(),e.stopPropagation(),t&&(o?window.open(t,"_blank"):window.location=t)},r.getMinquantitySGP=function(){return null!=r.giftED&&null!=r.giftED.offeredQuantitySGP&&1<=r.giftED.offeredQuantitySGP?r.giftED.offeredQuantitySGP:1},r.showCopyButton=!0,r.disableCopyButton=function(){r.showCopyButton=!1,t(function(){r.showCopyButton=!0},5e3)},r.initGiftED=function(e){r.giftED=angular.copy(e)},r.addEditGift=function(e){r.popupData=e.$parent.$parent.popupData,r.initGiftED(e.giftED),r.popupData.edit?((null==r.giftED.photoSG&&"/static/img/default-sg.png"!==r.giftED.photoDisp||null!=r.giftED.photoSG&&r.giftED.photoSG!=r.giftED.photoDisp)&&(r.giftED.photoSG=r.giftED.photoDisp),n.list.listGiftEdit(r.pot.uniqPO,r.giftED.uniqSG,r.giftED.nameSG,r.giftED.pricePerUnitSGP,r.giftED.quantitySGP,r.giftED.photoSG).then(function(e){e.gift.uniqSG==r.giftED.uniqSG&&e.uniqPO==r.uniqPO&&(angular.copy(e.gift,s(e.gift.uniqSG)),l.hidePopupV2("addEditGift"))},function(e){console.log(e)})):n.list.listGiftAdd(r.pot.uniqPO,r.giftED.nameSG,r.giftED.pricePerUnitSGP,r.giftED.quantitySGP,r.giftED.photoDisp).then(function(e){console.log(e),l.hidePopupV2("addEditGift"),r.gifts.push(e.gift)},function(e){console.log(e)})},r.deleteGift=function(e){r.uniqPO=e.$parent.$parent.popupData.uniqPO,r.uniqSG=e.$parent.$parent.popupData.uniqSG,n.list.listGiftDelete(r.uniqPO,r.uniqSG).then(function(e){if(lpcLog("deleteGift resultData "+JSON.stringify(e)),e.gift.uniqSG==r.uniqSG&&e.uniqPO==r.uniqPO)return r.giftsInCart.splice(f(r.uniqSG),1),i("cart_"+r.uniqPO,r.giftsInCart,{path:"/"}),_.remove(r.gifts,function(e){return e.uniqSG==r.uniqSG}),l.hidePopupV2("delete-gift"),0},function(e){console.log(e)})};var s=function(t){return _.filter(r.gifts,function(e){return t==e.uniqSG})[0]},c=(r.sortableOptions={stop:function(e,t){n.list.listGiftEditOrder(r.pot.uniqPO,c(r.gifts)).then(function(e){for(var t in r.gifts)r.gifts[t].orderSGP=t},function(e){r.gifts=o("orderBy")(r.gifts,"orderSGP")})}},function(e){var o=[];return angular.forEach(e,function(e,t){o[t]={uniqSG:e.uniqSG,orderSGP:t}}),o}),d=!1,u=(r.pot={},r.closePot=function(){n.updatePotStatus(r.pot.uniqPO,"closed")},r.activatePot=function(){n.updatePotStatus(r.pot.uniqPO,"running")},r.showInviteList=function(e){l.showPopup("inviteDlg"),d||n.list.listFetchInvites(e).then(function(e){d=!0,r.invites=e})},r.showHideInvitePop=function(e){r.inviteID=e,l.showPopup("confirmDeleteInvite")},r.deleteInvite=function(){n.deleteInvite(r.inviteID).then(function(e){for(var t=0,o=r.invites.length;t<o;t++)if(r.invites[t].inviteID==e.inviteID)return r.invites.splice(t,1),l.hidePopup("confirmDeleteInvite"),0})},r.$watch("uniqPO",function(){r.giftsInCart=null!=i("cart_"+r.uniqPO)?i("cart_"+r.uniqPO):Array(),r.totalInCart=0}),r.getListSize=function(e){var t,o=Array();for(o.push("--"),t=1;t<=e;t++)o.push(""+t);return o},r.clearCart=function(){i.remove("cart_"+r.uniqPO),r.giftsInCart=[]},r.checkQuantity=function(e){e.quantitySGP<e.offeredQuantitySGP&&(e.quantitySGP=e.offeredQuantitySGP)},r.updateGiftBox=function(e){var t;1===e.quantitySGP?(e.totalAmountSG+parseFloat(e.selectedAmount)>e.pricePerUnitSGP&&(e.selectedAmount=e.pricePerUnitSGP-e.totalAmountSG),t=parseFloat(e.selectedAmount),isNaN(t)&&(t=0),e.totalAmountSG||(e.totalAmountSG=0),e.variableTotalAmountSG=e.totalAmountSG+t):1<e.quantitySGP&&(e.offeredQuantitySGP||(e.offeredQuantitySGP=0),e.variableOfferedQuantitySGP=e.offeredQuantitySGP+parseFloat(e.selectedQuantity))},r.displayBoxPopup=function(e){e.offered||(lpcLog("displayBoxPopup popupGiftBox"+e.uniqSG),l.showPopup("popupGiftBox"+e.uniqSG))},r.updateGiftLocal=function(e){if(null!=s(e.uniqSG)){for(var t=0;t<r.gifts.length;t++)if(r.gifts[t].uniqSG==e.uniqSG)return void angular.copy(e,r.gifts[t])}else console.log("error when trying to find gift")},l.$on("add-to-basket",function(e,t){r.addToCart(t)}),r.addToCart=function(e){var t=f(e.uniqSG),o=(lpcLog("addToCart index "+t),1<e.quantitySGP&&void 0!==e.selectedQuantity?parseInt(e.selectedQuantity)*e.pricePerUnitSGP:parseFloat(null!=e.selectedAmount&&0<=e.selectedAmount?e.selectedAmount:e.pricePerUnitSGP));3e3<r.totalInCart+o?(e.variableTotalAmountSG=0,e.variableOfferedQuantitySGP=0,e.maxExceeded=!0):(e.maxExceeded=!1,e.amountInCart=o,-1==t?r.giftsInCart.push(e):r.giftsInCart.splice(t,1,e),i("cart_"+r.uniqPO,r.giftsInCart,{path:"/"}),l.hidePopupV2("offer-gift"),r.updateGiftLocal(e))},r.$watch("giftsInCart",function(){null==r.giftsInCart||0==r.giftsInCart.length?r.totalInCart=0:(r.totalInCart=g(),lpcLog("$scope.$watch:giftsInCart totalInCart "+r.totalInCart))},!0),r.toggleNewOptions=function(){angular.element("#newGiftSetting").slideToggle()},r.toggleParticipateOptions=function(){angular.element("#participateSetting").slideToggle()},0),p=(r.initAddNew=function(){var e;p()?(e={nameSG:"",customSG:!0,photoDisp:"/static/img/default-sg.png",photoSG:"/static/img/default-gp.png",editing:!0,offered:!1,quantitySGP:1,pricePerUnitSGP:0,offeredQuantitySGP:0,totalAmountSG:0,indexNew:u},r.gifts.splice(0,0,e),r.sortableOptions={disabled:!0},$("html, body").animate({scrollTop:$(".divTableBlockFixed").offset().top},"normal"),u++):(l.showPopup("accessDenied"),t(function(){0<jQuery("[data-lpc-popup=access-denied]:visible").size()&&l.hidePopup("accessDenied")},2500))},function(){var o=!0;return angular.forEach(r.gifts,function(e,t){o&&void 0===e.uniqSG&&(o=!1)}),o}),f=function(o){var n=!0,i=-1;return angular.forEach(r.giftsInCart,function(e,t){n&&e.uniqSG==o&&(i=t,n=!1)}),i},g=(r.getQuantityFromCart=function(e){if(null!=r.giftsInCart)for(var t in r.giftsInCart)if(r.giftsInCart[t].uniqSG==e)return 1<r.giftsInCart[t].quantitySGP?r.giftsInCart[t].selectedQuantity:r.giftsInCart[t].selectedAmount;return 0},function(){var o=0;return angular.forEach(r.giftsInCart,function(e,t){o+=e.amountInCart}),o});r.initDeleteGift=function(e,t){var o,n,i,a;null==t.uniqSG?(r.gifts.splice((o=t.indexNew,i=n=!0,a=-1,angular.forEach(r.gifts,function(e,t){i&&(n?e.indexNew:e.uniqSG)==o&&(a=t,i=!1)}),a),1),r.sortableOptions={disabled:!1}):l.showPopup("deleteGift")},r.cancelDeleteGift=function(){l.hidePopup("deleteGift"),0},r.initEditGift=function(t,o){o.editing?o.pricePerUnitSGP<1||(r.checkQuantity(o),o.disabled=!0,null==o.uniqSG?n.list.listGiftAdd(t,o.nameSG,o.pricePerUnitSGP,o.quantitySGP,o.image).then(function(e){e.uniqPO==t&&(angular.copy(e.gift,o),r.sortableOptions={disabled:!1})},function(e){o.disabled=!1}):n.list.listGiftEdit(t,o.uniqSG,o.nameSG,o.pricePerUnitSGP,o.quantitySGP,o.image).then(function(e){lpcLog("listGiftEdit data "+JSON.stringify(e)),e.gift.uniqSG==o.uniqSG&&e.uniqPO==t&&angular.copy(e.gift,o)},function(e){if(void 0!==e.data.fieldErrors&&"unchanged"==e.data.fieldErrors[0].gift)o.disabled=!1,o.editing=!1;else if(void 0!==e.data.fieldErrors)for(var t in e.data.fieldErrors){t=e.data.fieldErrors[t];t.min="minimum",r.form_0.nameSG.$setValidity(t.min,!1)}})):o.editing=!0}}]),angular.module("lpc").controller("offerGiftController",["Helper","$filter","$scope","$rootScope","ServerFunction","ipCookie","$timeout",function(e,t,o,n,i,a,r){o.initGift=function(e){o.giftOffer=angular.copy(e)},o.addToBasket=function(e){n.$broadcast("add-to-basket",e)},o.getListSize=function(e){for(var t=Array(),o=1;o<=e;o++)t.push(""+o);return t},o.updateGiftBox=function(e){var t;1===e.quantitySGP?(e.totalAmountSG+parseFloat(e.selectedAmount)>e.pricePerUnitSGP&&(e.selectedAmount=e.pricePerUnitSGP-e.totalAmountSG),t=parseFloat(e.selectedAmount),isNaN(t)&&(t=0),e.totalAmountSG||(e.totalAmountSG=0),e.variableTotalAmountSG=e.totalAmountSG+t):1<e.quantitySGP&&(e.offeredQuantitySGP||(e.offeredQuantitySGP=0),e.variableOfferedQuantitySGP=e.offeredQuantitySGP+parseFloat(e.selectedQuantity))}}]),angular.module("lpc").controller("trustpilotcontroller",["$scope",function(e){e.trustpilot=[{id:0,date:"9 avril 2019",title:"Très pratique",desc:"Très pratique, si on a un problème une personne répond très vite au téléphone. Elle explique bien les démarches à suivre ... Exelllent",name:"Cecile"},{id:1,date:"18 janvier 2019",title:"Le Pot Solidaire fait un travail...",desc:"Le Pot Solidaire fait un travail formidable et d'utilité publique pour aider des gens dans le besoin ou dans la peine. Que cela continue dans le temps",name:"Julien"},{id:2,date:"30 mars 2019",title:"Site vraiment excellent",desc:"Site vraiment excellent, pratique et bien conçu qui permet une collecte rapide et simple. Il est surtout sécurisé et très bien connecté aux messageries. Nous l'avons utilisé pour une cause humanitaire en Afrique et cela a permis de secourir une petite fille gravement malade. Encore toutes mes félicitations!",name:"Olivier Salazar-Ferrer"},{id:3,date:"20 février 2019",title:"Parfait :)",desc:"L'idée du petit mot associé est super, le reçu du don est immédiat et la promenade dans le site très agréable. Belle découverte!",name:"Gwladys"},{id:4,date:"16 janvier 2019",title:"Je trouve ce concept très intéressant...",desc:"Je trouve ce concept très intéressant car parfois des personnes que l'on veut aider ne veulent pas et celà permet de le faire d'une façon super sympa je garde votre idée. merci",name:"Mme LANGONNE"},{id:5,date:"15 janvier 2019",title:"Bel hommage!",desc:"Très belle initiative. Le site est facile d'accès. Bon moyen pour rendre hommage à nos héros du feu.",name:"Isabelle"},{id:6,date:"14 janvier 2019",title:"Bonjour à toute l'équipe du Pot Commun",desc:"Bonjour à toute l'équipe du Pot Commun, Merci à vous qui gérez ce site très utile pour soutenir financièrement ceux qui sont dans le malheur et qui ont besoin d'un soutien moral.Gilbert",name:"Gilbert"},{id:7,date:"14 janvier 2018",title:"Super pratique",desc:"Super pratique. Voici une plateforme qui aide à participer à une bonne cause sans perdre trop de temps à chercher comment faire. Continuez comme ça.",name:"Christian"},{id:8,date:"13 janvier 2019",title:"La méthode est la plus simple et sécurisée",desc:"La méthode est la plus simple et sécurisée pour faire un don. Bravo.",name:"Marcel Fourey"},{id:9,date:"13 janvier 2019",title:"Parfait pour moi",desc:"La cause est expliquée, L anonymat est possible. Paiement rapide. Parfait",name:"Annick Wijschogrod"},{id:10,date:"7 décembre 2018",title:"C'est une première expérience",desc:"C'est une première expérience, qui est extrêmement favorable. Facile d'utilisation pour la personne qui crée le pot comme pour les utilisateurs. Les interlocutrices du site sont très disponibles, agréables et facilement joinables ce qui est vraiment très rassurant. Je recommande ce site et renouvèlerai volontiers si cela devait se reproduire. Encore une fois merci pour votre aide, votre disponibilité et votre gentillesse. A+++",name:"Anne Marie"},{id:11,date:"14 novembre 2018",title:"excellent service pour récolter des...",desc:"excellent service pour récolter des fonds quelque soit le motif, Je recommande vivement.",name:"Isabelle"},{id:12,date:"11 novembre 2018",title:"Site utile",desc:"Site utile, simple et qui permet de gagner du temps. Une bonne idée qui rend service. Bravo.",name:"Matou"},{id:13,date:"24 septembre 2018",title:"Réactivité, efficacité et gentillesse : tout pour un bon pot ! ",desc:"Merci à l'équipe du PotCommun de répondre au téléphone rapidement, de faire du tutorat en ligne pour les débutants ou les non initiés, d'être agréable et patient. Je reviendrai, c'est sûr et j'en parlerai autour de moi !",name:"E. BINET"},{id:14,date:"12 avril 2019",title:"La création du pot commun est simple",desc:"La création du pot commun est simple. J ai eu besoin de conseil pour finaliser le pot et j ai eu un très bon accueil téléphonique et une bonne explication. Parfait",name:"MANUELLA"}]}]),angular.module("lpc").controller("FaqCtrl",["$scope","initFaq","$timeout",function(o,e,t){var n=window.matchMedia("only screen and (max-width: 766px)"),i=window.matchMedia("only screen and (min-width: 767px)"),a=(t(function(){o.mobile=n.matches,o.desktop=i.matches}),n.addListener(function(e){t(function(){o.mobile=e.matches},0)}),i.addListener(function(e){t(function(){o.desktop=e.matches},0)}),o.faq=angular.copy(e),o.selectedIndex=1,o.suggestions=[],window.s=o,e=o.faq.reduce(function(e,t){return e.concat(t.questions.map((o=t.id,function(e){return{id:o,question:e.question,original:e,tokenize:!0}})));var o},[]),new Fuse(e,{includeMatches:!0,shouldSort:!0,tokenize:!0,threshold:.6,distance:100,keys:["question"]}));o.handleQuery=function(){var e,t;o.query&&(o.highlightedQuestion&&(o.highlightedQuestion.highlighted=!1,o.highlightedQuestion.large=!1),e=a.search(o.query),t={},e=e.filter(function(e){return!t.hasOwnProperty(e.item.question)&&(t[e.item.question]=!0)}).slice(0,5),o.suggestions=e)},o.cancelQuery=function(){t(function(){o.suggestions=[]},100)},o.handleClick=function(e){o.highlightedQuestion&&(o.highlightedQuestion.highlighted=!1,o.highlightedQuestion.large=!1),e.original.highlighted=!0,e.original.large=!0,o.highlightedQuestion=e.original,o.selectedIndex=e.id,o.suggestions=[],o.query=""},o.minimizeText=function(e,t,o){return!o&&e.length>t?e.substr(0,t)+"...":e},o.scrollToSection=function(e,t){var o=angular.element(e);t&&setTimeout(function(){angular.element("body").animate({scrollTop:o.offset().top-73})},100)}}]),angular.module("lpc").controller("sncfcontroller",["Helper","$scope","ipCookie","$window","ServerFunction",function(l,s,c,e,t){s.showVideo=function(){$("#sncfContainer").slideDown(),$("html, body").animate({scrollTop:$("#sncfContainer").offset().top-70},500,function(){window.player.playVideo()})},s.initLink=function(){var e=l.queryString,t={},o=c("lpc-sncf-params"),o=o&&decodeURIComponent(o.replace(/\+/g,"%20"));if(void 0!==o)for(var n=o.split("|||"),i=0;i<n.length;i++){var a,r=n[i].split("=");void 0===t[r[0]]?t[r[0]]=r[1]:"string"==typeof t[r[0]]?(a=[t[r[0]],r[1]],t[r[0]]=a):t[r[0]].push(r[1])}void 0!==t.vsc_ref_dv?s.link="https://www.voyages-train-groupes.sncf.fr/#/initialisationAp?ID_AGENCE=MBGVSC&CODE_LANGUE=FR&PAYS_DISTRIBUTION=FR&REFDV="+t.vsc_ref_dv:void 0!==e.vsc_ref_dv?s.link="https://www.voyages-train-groupes.sncf.fr/#/initialisationAp?ID_AGENCE=MBGVSC&CODE_LANGUE=FR&PAYS_DISTRIBUTION=FR&REFDV="+e.vsc_ref_dv:s.link="http://www.voyages-sncf.com/billet-train-groupe"}}]),angular.module("lpc").controller("sncfPetitGroupecontroller",["Helper","$scope","ipCookie","$window","ServerFunction",function(l,s,c,o,n){s.inviteSendEmail=function(e,t){n.repay.invite.sendEmail(e,t).then(function(){o.location.reload()})},s.inviteSendRelance=function(e){n.repay.invite.sendRelance(e,s.selection.uniqIN,s.selection.message).then(function(){o.location.reload()})},s.nombreTotalEdit=function(){return null},s.calculateArrondi=function(){s.montantParticipation=+s.montantBillet+.0096*s.montantBillet},s.showVideo=function(){$("#sncfContainer").slideDown(),$("html, body").animate({scrollTop:$("#sncfContainer").offset().top-70},500,function(){window.player.playVideo()})},s.initLink=function(){var e=l.queryString,t={},o=c("lpc-sncf-params"),o=o&&decodeURIComponent(o.replace(/\+/g,"%20"));if(void 0!==o)for(var n=o.split("|||"),i=0;i<n.length;i++){var a,r=n[i].split("=");void 0===t[r[0]]?t[r[0]]=r[1]:"string"==typeof t[r[0]]?(a=[t[r[0]],r[1]],t[r[0]]=a):t[r[0]].push(r[1])}void 0!==t.vsc_ref_dv?s.link="https://www.voyages-train-groupes.sncf.fr/#/initialisationAp?ID_AGENCE=MBGVSC&CODE_LANGUE=FR&PAYS_DISTRIBUTION=FR&REFDV="+t.vsc_ref_dv:void 0!==e.vsc_ref_dv?s.link="https://www.voyages-train-groupes.sncf.fr/#/initialisationAp?ID_AGENCE=MBGVSC&CODE_LANGUE=FR&PAYS_DISTRIBUTION=FR&REFDV="+e.vsc_ref_dv:s.link="http://www.voyages-sncf.com/billet-train-groupe"}}]),angular.module("lpc").controller("localeController",["$scope","ipCookie","$window","ServerFunction",function(e,o,n,i){e.setCookie=function(e,t){t?i.account.updateLocale(e).then(function(){o("lpc-locale",e,{path:"/"}),n.location.reload()}):(o("lpc-locale",e,{path:"/"}),n.location.reload())}}]),angular.module("lpc").controller("domainsController",["$scope",function(e){e.redirect=function(e){window.location=e}}]),angular.module("lpc").controller("passwordForgottenController",["$scope","ServerFunction","Helper","$sce","$location","$window",function(o,n,e,t,i,a){var r=angular.element(document.querySelectorAll("[name=email]"));o.recaptchaResponse=null,setTimeout(function(){r.blur()},0),o.initRecaptcha=function(){a.grecaptcha.render("recaptcha-container",{sitekey:"6Let6EEUAAAAADzcTpl4DUnMoReVEMfBqs_5jN1K",callback:o.onRecaptchaSuccess})},o.onRecaptchaSuccess=function(e){o.$apply(function(){o.recaptchaResponse=e})},o.initRecaptcha(),o.submitPasswordForgotten=function(){var t=_asyncToGenerator(_regeneratorRuntime().mark(function e(t){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n.account.passwordForgotten(o.email,t||o.recaptchaResponse,o.reload).catch(function(e){a.grecaptcha.reset()});case 1:case"end":return e.stop()}},e)}));return function(e){return t.apply(this,arguments)}}(),a.submitPasswordForgotten=o.submitPasswordForgotten}]),angular.module("lpc").controller("deleteProfileImagePopupController",["$scope","ServerFunction",function(e,t){e.deleteProfileImage=function(){var e=angular.element("#dashboard-profile-image-container");t.deleteProfileImage(),e.hide(),setTimeout(function(){window.location.reload()},200)}}]),angular.module("lpc").controller("passwordForgottenConfirmController",["$scope","ServerFunction","Helper","$sce","$location",function(e,t,o,n,i){e.submitPasswordForgotten=function(){t.account.newPassword(e.uniqUP,e.passwordPE,e.confirmPasswordPE)}}]),angular.module("lpc").controller("contactController",["$scope","$rootScope","ServerFunction",function(e,t,o){e.submitContactForm=function(){o.account.sendContact(e.person)}}]),angular.module("lpc").controller("organizerConfirmCguController",["$scope","$rootScope","ServerFunction",function(e,t,o){t.showPopupV2("organizerConfirmCguPopup"),e.submitContactForm=function(){o.account.sendContact(e.person)}}]),angular.module("lpc").controller("ideaBoxController",["$scope","$rootScope","ServerFunction",function(i,n,a){i.isANumber=function(e){return!isNaN(e)},i.products=window.products,delete window.products;var t={selectedGift:{}},e=(i.initDeleteGift=function(e){t.selectedGift=e,n.showPopup("deleteGift")},i.deleteGift=function(){a.pot.ideaBox.deleteGiftProposal(i.uniqPO,t.selectedGift).then(function(o){angular.forEach(i.products,function(e,t){e.uniqGP==o.uniqGP&&i.products.splice(t,1)}),t={},n.hidePopup("deleteGift")},function(e){giftProposal.votersShowing=!1,t={},n.hidePopup("deleteGift")})},i.cancelDeleteGift=function(){n.hidePopup("deleteGift"),t={}},i.edit=function(e){e.editing||(e.editing=!0)},i.getVoters=function(t){t.votersShowing=!0,a.pot.ideaBox.getVoters(i.uniqPO,t).then(function(e){t.voters=e},function(e){t.votersShowing=!1})},i.addTemporayGiftProposal=function(){var e=i.products[0];(!e||e.editing)&&e||i.products.unshift({editing:!0,giftProposalCommentOp:[]})},i.addNewGiftProposal=function(t){null==t.priceGP&&(t.priceGP=0),t.priceGP=e(t.priceGP),null!=t.uniqGP?a.pot.ideaBox.editGiftProposal(i.uniqPO,t).then(function(e){angular.copy(e,t)}):a.pot.ideaBox.addNewGiftProposal(i.uniqPO,t).then(function(e){angular.copy(e,t)})},function(e){return e+"".replace(/[^0-9]/g,"")});i.showComments=function(e){e.displayingComments?e.displayingComments=!1:e.displayingComments=!0},i.vote=function(t,e){a.pot.ideaBox.vote(i.uniqPO,t,e).then(function(e){t.points=e.newPoints,n.page.voteerror={}})},i.delete=function(o,n){a.pot.ideaBox.deleteComment(i.uniqPO,o,n).then(function(e){angular.forEach(n.giftProposalCommentOp,function(e,t){e.giftProposalCommentID==o.giftProposalCommentID&&n.giftProposalCommentOp.splice(t,1)})})},i.addComment=function(t){a.pot.ideaBox.addComment(i.uniqPO,t).then(function(e){null!=t.giftProposalCommentOp&&void 0!==t.giftProposalCommentOp||(t.giftProposalCommentOp=[]),t.giftProposalCommentOp.unshift(e),t.currentMessage=""})}}]),angular.module("lpc").controller("greetingCardController",["$http","$scope","ServerFunction","$rootScope","$timeout",function(e,n,t,i,o){n.invites=window.invites,delete window.invites,n.cardsTemplates=window.cardsTemplates,delete window.cardsTemplates,n.pages=[],n.visibleGreetingCards=[],n.pageIndex=0,n.pageAlreadyCreated=!1,n.nextGreetingsPage=_.clone(n.invites),n.invites=_.remove(n.nextGreetingsPage,function(e){return n.nextGreetingsPage.indexOf(e)<20}),n.$watch("invites.length",function(e){n.showDownload=0<e});function a(){n.pages[n.pages.length]=_.clone(n.visibleGreetingCards),n.invitesCopy=_.clone(n.invites),_.remove(n.invitesCopy,function(t){return null!=_.find(n.visibleGreetingCards,function(e){return null!=e&&e.inviteID==t.inviteID})}),n.nextGreetingsPage=_.concat(n.nextGreetingsPage,n.invitesCopy),n.visibleGreetingCards=[],l=0,s=1,c=2}function r(){return _.filter(n.invites,function(e){return null!=e&&e.isMine})[0]}var l=0,s=1,c=2,d=(n.gotToNextGreetingsPage=function(){n.pages.length>n.pageIndex+1?(n.pageAlreadyCreated=!0,n.pageIndex++,n.invites=_.clone(n.pages[n.pageIndex])):(n.pageAlreadyCreated=!1,n.invites=_.remove(n.nextGreetingsPage,function(e){return n.nextGreetingsPage.indexOf(e)<20}),n.$broadcast("lpc-hide-if-cropped-event"),o(a,200),n.pageIndex++)},n.goToPreviousGreetingPage=function(){n.pageIndex--,n.pageAlreadyCreated=!0,n.invites=_.clone(n.pages[n.pageIndex])},o(a,200),n.$on("visible-wish-event",function(e,t){t%3==0?(n.visibleGreetingCards[l]=n.invites[t],l+=3):t%3==1?(n.visibleGreetingCards[s]=n.invites[t],s+=3):(n.visibleGreetingCards[c]=n.invites[t],c+=3)}),n.getMine=r,n.exportCard=function(){t.pot.greetingCard.drawCard(n.uniqPO)},n.addMessage=function(){t.pot.greetingCard.addOrUpdate(n.uniqPO,n.greetingCard).then(function(e){e&&(r()&&n.invites.shift(),n.invites.unshift(e),n.participate=!0,n.initData(),angular.element("html,body").animate({scrollTop:0})),n.greetingCardForm.$setValidity("server-error",!0),n.greetingCardForm.$setPristine()})},n.randomColor=function(e){return n.supportedColors[e%n.supportedColors.length]},n.randomFont=function(e){return n.supportedFonts[e%n.supportedFonts.length]},n.initData=function(){n.isEditing=!1,n.isCreating=!1;var e=void 0,e=(n.greetingCard&&(e=n.greetingCard.greetingCardType),n.greetingCard={},n.greetingCard.greetingCardType=e,n.greetingCard.greetingCardTypeDesktop=n.greetingCard.greetingCardType,r());e?(n.greetingCard.greetingCardMessage=e.messageGCM||e.greetingMessageIN,n.greetingCard.greetingCardFont=e.fontGCM||"Open Sans",n.greetingCard.greetingCardColor=e.colorGCM||"#556270",n.greetingCard.greetingCardSignature=e.signatureGCM||e.firstNameIN+" "+e.lastNameIN):(n.greetingCard.greetingCardFont="Open Sans",n.greetingCard.greetingCardColor="#556270"),n.$broadcast("lpc-hide-if-cropped-event")},n.getInputIdFromColor=function(e){return e+n.greetingCard.greetingCardColor.replace("#","")},n.initData(),{});n.cancelDeleteCard=function(){i.hidePopup("deleteCard"),d={}},n.initDeleteCard=function(e){d={invite:e},i.showPopup("deleteCard")},n.prepareEditing=function(e){n.isEditing=!0,n.$broadcast("lpc-adjustable-refresh-event");var t=angular.element(e);setTimeout(function(){var e=new MobileDetect(window.navigator.userAgent);e.is("iOS")||e.is("AndroidOS")||(t.focus(),t.select(),t[0].scrollTop=0,n.$broadcast("lpc-hide-if-cropped-event")),n.$broadcast("lpc-adjustable-refresh-event")},0)},n.prepareCreation=function(e){n.isLogged||"club-faune-voyages"===n.subdomain?(n.greetingCardFormMobile.$setPristine(!0),n.isCreating=!0):i.showPopupV2("lpcLoginSignupPopup")},n.changeCardType=function(){t.pot.greetingCard.changeCardType(n.uniqPO,n.greetingCard.greetingCardTypeDesktop).then(function(e){n.greetingCard.greetingCardType=n.greetingCard.greetingCardTypeDesktop},function(e){n.greetingCard.greetingCardTypeDesktop=n.greetingCard.greetingCardType})},n.deleteCard=function(){var o=d.invite;t.pot.greetingCard.delete(n.uniqPO,o).then(function(e){angular.forEach(n.invites,function(e,t){e.inviteID===o.inviteID&&n.invites.splice(t,1),r()||(n.participate=!1),n.initData()}),i.hidePopup("deleteCard")})},n.edit=function(e){$("html, body").animate({scrollTop:$("#downloadButton").offset().top-150},700),n.message=e.greetingMessageIN,n.participate=!1,$("#messageText").focus()}}]),angular.module("lpc").controller("wellcomeEmail",["$http","$scope","ServerFunction",function(e,t,o){t.blo="bla",t.personID=83836,t.smoneyAccount="",t.uniqPO="17h30u55",t.pot=!1,t.sendedEmails=[],t.sendEmail=function(){e.get("/testOmar/sendMail/"+t.emailToSend).then(function(e){t.sendedEmails.push({recipient:e.data.recipient,id:t.sendedEmails.length,status:e.data.status})})},t.getAppUserPE=function(){e.get("/testOmar/getSmoneyAccount/"+t.personID).then(function(e){t.smoneyAccount=e.data.user})},t.getPot=function(){e.get("/testOmar/getPot/"+t.uniqPO).then(function(e){t.pot=e.data})},t.emailExist=function(){o.emailExist(t.testemail)}}]),angular.module("lpc").controller("rootpotInviteController",["$sce","$timeout","Helper","$scope","ServerFunction","base64","googleLogin","$rootScope","$filter",function(e,o,t,i,n,a,r,l,s){function c(e,t){var o=e.getBoundingClientRect(),n=e.clientHeight;e.clientWidth,(t=t.getBoundingClientRect()).top>=o.top&&t.top<o.top+n||(e.scrollTop=t.top+e.scrollTop-o.top)}var d,u=["txt","csv","xlsx"],p=(i.importErrorMsgIndex=0,i.showTitle=!0,i.invitationErrorMessageIndex=0,i.invitePopupIndex=0,i.onLoad=!0,i.showMobileStep2=!1,i.allContactSelected=!1,i.emailsToAdd="",i.contacts=[],i.contactsToInvite=[],i.invites=window.invites,$(window).width()<700&&(angular.element(".lpc-popup-v2-content").css("height",$(window).height()-30),$(window).height()-30<650&&(angular.element(".mailing-list-wrapper").css("height","40%"),angular.element(".popup-textarea-container").css("height","30%")),$(window).height()-30<600)&&(angular.element(".mailing-list-wrapper").css("height","30%"),angular.element(".popup-textarea-container").css("height","30%")),i.showCopyButton=!0,i.disableCopyButton=function(){console.log("$scope.showCopyButton : ",i.showCopyButton),i.showCopyButton=!1,o(function(){i.showCopyButton=!0},5e3)},$(window).width()),f=(o(function(){766<p&&(d=document.querySelector(".mailing-list.desktop"),angular.element(".mailing-list.desktop .contact li:nth-child(2)").addClass("ready-to-be-selected"))},300),String.prototype.replaceAll=function(e,t){return this.replace(new RegExp(e,"g"),t)},i.getName=function(e){return""==e?"":e.replaceAll("&apos;","'").replaceAll("&quot;",'"')},i.$watch("emailsToAdd",function(e){angular.element(".ready-to-be-selected").removeClass("ready-to-be-selected"),o(function(){1<i.showFilteredMailingList()?766<p&&angular.element(".mailing-list.desktop .contact li:nth-child(2)").addClass("ready-to-be-selected"):766<p&&angular.element(".mailing-list.desktop .contact li:nth-child(1)").addClass("ready-to-be-selected")},500)}),angular.element(".emails-to-add").bind("keydown",function(e){var t;766<p&&(38==e.keyCode&&0!=(t=angular.element(".ready-to-be-selected")).prev().length&&(t.removeClass("ready-to-be-selected"),t.prev().addClass("ready-to-be-selected"),t=document.querySelector(".ready-to-be-selected"),c(d,t)),40==e.keyCode&&0!=(t=angular.element(".ready-to-be-selected")).next().length&&(t.removeClass("ready-to-be-selected"),t.next().addClass("ready-to-be-selected"),t=document.querySelector(".ready-to-be-selected"),c(d,t)),13==e.keyCode)&&(0<i.showFilteredMailingList()&&(t=angular.element(".ready-to-be-selected p").text(),null==(t=i.contacts.filter(P(t))[0])?i.addRemoveAllToContactsToInvite():i.addRemoveToContactToInvite(t)),e.preventDefault())}),angular.element(".contact").bind("click",function(){angular.element(".contacts-to-invite-container").focus(),angular.element(".emails-to-add").focus(),o(function(){i.showTitle=!1},500)}),i.$watch("uniqPO",function(){void 0!==i.uniqPO?n.pot.invite.getUserPotContacts(i.uniqPO).then(function(e){i.contacts=e.map(function(e){return e.selected=!1,e}),i.checkEmailToAdd()}):n.pot.invite.getUserContacts().then(function(e){i.contacts=e.map(function(e){return e.selected=!1,e}),i.checkEmailToAdd()})}),i.getExtension=function(){i.fileExtension=jQuery("#file").val().split(".").pop(),0<=u.indexOf(i.fileExtension)||(i.invitePopupIndex=4,i.importErrorMsgIndex=1)},i.getExtensionMobile=function(){i.fileExtension=jQuery("#file-mobile").val().split(".").pop(),0<=u.indexOf(i.fileExtension)||(i.invitePopupIndex=4,i.importErrorMsgIndex=1)},i.getEmailsFromFile=function(){var e;0<=u.indexOf(i.fileExtension)&&i.file&&(i.fileExtension&&"xlsx"===i.fileExtension?e=i.file:"data:"!=i.file?e=a.decode(i.file.substring(i.file.indexOf(",")+1)):(i.invitePopupIndex=4,i.importErrorMsgIndex=2),"data:"!=i.file)&&n.pot.invite.getEmailsFromFile(e,i.fileExtension).then(function(e){0!=e.length?(i.invitePopupIndex=3,f(e)):(i.invitePopupIndex=4,i.importErrorMsgIndex=2)},function(e){i.invitePopupIndex=4,i.importErrorMsgIndex=0})},i.copyPasted=function(e){void 0!==e.originalEvent.clipboardData?(g(e.originalEvent.clipboardData.getData("text/plain")),o(function(){i.emailsToAdd=""})):o(function(){g(angular.element(e.currentTarget).val()),i.emailsToAdd=""})},i.checkEmail=function(e,t){var o,n={};0<i.contactsToInvite.length&&""==i.emailsToAdd&&null!=e&&8===e.keyCode&&(o=i.contactsToInvite[i.contactsToInvite.length-1],i.deleteFromContactsToInvite(o)),(null!=e&&32===e.keyCode&&""!=i.emailsToAdd||null!=e&&13===e.keyCode&&""!=i.emailsToAdd&&0==i.showFilteredMailingList()||t&&void 0!==i.emailsToAdd&&0<i.emailsToAdd.length)&&(null!=e&&(e.preventDefault(),e.stopPropagation()),o=i.emailsToAdd,i.emailsToAdd="",t=m(o),n.email=o,n.selected=!0,t==o.trim()?n.valid=!0:n.valid=!1,C(n))},i.deleteFromContactsToInvite=function(e){i.contactsToInvite.splice(i.contactsToInvite.indexOf(e),1),e.selected=!1,i.allContactSelected=!1},i.onBlur=function(){o(function(){i.checkEmail(void 0,!0)},200),o(function(){i.focus&&i.trueFocus&&(i.focus=!1,i.showTitle=!0),!1===i.trueFocus&&(angular.element(".emails-to-add").focus(),i.trueFocus=!0)},500)},i.focus=!1,i.trueFocus=!0,i.onFocus=function(e){!1===i.focus?(i.focus=!0,i.trueFocus=!0,e.stopPropagation(),e.preventDefault(),i.showTitle=!1,angular.element(".emails-to-add").focus()):i.trueFocus=!1},i.addRemoveToContactToInvite=function(e){var t;(e=i.contacts.filter((t=e.email,function(e){return t==e.email}))[0]).selected?(i.allContactSelected=!1,e.selected=!1,i.contactsForm.emailsToAdd.$valid=!0,i.contactsToInvite.splice(i.contactsToInvite.indexOf(e),1)):i.contactsToInvite.length>=i.maxInviteNumber?(e.selected=!1,i.contactsForm.emailsToAdd.$valid=!1):(e.selected=!0,e.valid=!0,i.contactsForm.emailsToAdd.$valid=!0,i.contactsToInvite.push(e)),o(function(){i.emailsToAdd=""})},i.addRemoveAllToContactsToInvite=function(){i.allContactSelected=!i.allContactSelected;var t;i.contacts=i.contacts.filter((t=i.allContactSelected,function(e){return t?E(e.email)||(i.contactsToInvite.length>=i.maxInviteNumber?i.contactsForm.emailsToAdd.$valid=!1:(e.selected=!0,e.valid=!0,i.contactsForm.emailsToAdd.$valid=!0,i.contactsToInvite.push(e))):(e.selected=!1,i.contactsToInvite.splice(i.contactsToInvite.indexOf(e),1),i.contactsForm.emailsToAdd.$valid=!0),e})),i.emailsToAdd=""},i.test=function(){console.log("yo  oy")},i.sendInvitations=function(){var e=i.contactsToInvite.map(function(e){return e.email});n.pot.invite.sendInvites(i.messageContacts,i.uniqPO,e,i.relance3DayContacts,i.relance1WeekContacts,i.typePO).then(function(e){i.serverInvites=e,i.invitePopupIndex=1},function(e){var t;null!=e.data&&0<e.data.fieldErrors.filter((t="invitation_number_excceded_limit",function(e){return!(void 0===e[t])})).length?i.invitationErrorMessageIndex=1:i.invitationErrorMessageIndex=0,i.invitePopupIndex=2})},i.writeMessage=function(){0==i.contactsToInvite.length||O(i.contactsToInvite)||(i.showMobileStep2=!0)},i.changeInputWidth=function(){var e;0==i.emailsToAdd.length?angular.element(".emails-to-add").css("width","100%"):(e=1==i.emailsToAdd.length?i.emailsToAdd.length:15*(i.emailsToAdd.length+1),angular.element(".emails-to-add").css("width",e))},i.getInvalidEmails=function(e){return e.filter(function(e){if(!e.valid)return e})},i.disableCopyButton=function(){i.showCopyButton=!1,o(function(){i.showCopyButton=!0},5e3)},i.showFilteredMailingList=function(){return s("filter")(i.contacts,{email:i.emailsToAdd}).length},i.$watch("contactsToInvite",function(e){!O(e)&&(O(e)||0!=e.length)||i.onLoad?i.onLoad||(i.isValidListOfEmail=!0):i.isValidListOfEmail=!1,i.onLoad=!1},!0),i.$watch("contactsForm.emailsToAdd",function(e){void 0!==i.uniqPO&&n.pot.invite.getMaxInvites(i.uniqPO).then(function(e){i.maxInviteNumber=e[0].emailsLeftToInvite}),i.getMaxEmail=function(){return i.contactsForm.emailsToAdd.$valid}}),i.$watch("emailsToAdd",function(e,t){i.checkEmailToAdd()}),i.checkEmailToAdd=function(){0==i.emailsToAdd.length&&angular.element(".emails-to-add").css("width","4"),i.filteredContacts=s("filter")(i.contacts,i.emailsToAdd),0<i.contacts.length&&(""==i.emailsToAdd||0<i.filteredContacts.length)&&angular.element("#mailing-list-contacts-wrapper").removeClass("ng-hide")},function(e){e.forEach(function(e){null==v(e.email)&&(i.contacts.push(e),i.checkEmailToAdd())})}),g=function(e){h(e).forEach(function(e){var t={},o=m(e);t.email=e,t.selected=!0,t.valid=o==e,C(t)})},m=function(e){e=e.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);return null!=e?e:""},h=function(e){var t=[" ","\\+","\\(","\\)","\\*","/",":",";","\\?",","];return console.log(t.join("|")),e.split(new RegExp(t.join("|"),"g")).filter(function(e){return 0<e.length})},P=function(t){return function(e){return t==e.email}},E=function(e){return i.contactsToInvite.filter(P(e))[0]},v=function(e){return i.contacts.filter(P(e))[0]},C=function(e){null==E(e.email)&&(i.contactsToInvite.length>=i.maxInviteNumber?(e.selected=!1,i.contactsForm.emailsToAdd.$valid=!1):(e.selected=!0,e.valid=!0,i.contactsForm.emailsToAdd.$valid=!0,i.contactsToInvite.push(e)),e.valid)&&null!=(e=v(e.email))&&(e.selected=!0)},O=function(e){return 0!=e.filter(function(e){return!e.valid}).length}}]),angular.module("lpc").controller("inscriptionController",["$scope","$rootScope","ServerFunction","Helper","ipCookie","$window",function(o,n,i,a,e,r){o.person={},"undefined"===o.person.cspCodePE&&(o.person.cspCodePE=0);var t=a.queryString;n.cookiesChoices&&n.cookiesChoices.analytics&&e("lpc-bot-params",t),null!=t.facebook_id?o.isBot=!0:o.isBot=!1,o.isBot&&(o.botPot={namePO:t.name,categoryPO:t.category,solidaryCategoryPO:t.solidaryCategoryPO,organizerPO:t.organizer,redirectUri:t.redirect_uri,accountLinkingToken:t.account_linking_token,facebookID:t.facebook_id}),o.submitCreateAccount=function(){null!=o.isPotCreationEditionPopup&&1==o.isPotCreationEditionPopup?(o.pot.pc=o.pot.promoCode,i.pot.potAndAccountNew(o.pot,o.person)):o.isBot?(o.person.notDefaultRedirect=!0,i.account.accountAdd(o.person).then(function(e){r.location.replace("".concat(o.botPot.redirectUri,"=").concat(o.botPot.accountLinkingToken,"&authorization_code=test")),i.pot.createPotWithBot(o.botPot)},function(e){})):i.account.accountAdd(o.person)},o.checkAdress=function(){i.pot.invite.checkAdress(o.person.emailPE).then(function(e){e.is_valid?o.propablyWrongMail=!1:o.propablyWrongMail=!0},function(e){o.propablyWrongMail=!1})},o.fbConnect=function(){if(null!=o.isPotCreationEditionPopup&&1==o.isPotCreationEditionPopup||o.isBot)o.isBot?o.potCreationLoginFB(i.pot.createPotWithBot):o.potCreationLoginFB(o.submitCreateReducedPot);else try{FB.login(function(e){e.authResponse&&(window.authResponse=e.authResponse,i.account.facebookConnect(JSON.stringify(e.authResponse)).then(function(e){a.cookieEnabled()?r.location.reload():(ErrorHandler.handle({data:{fieldErrors:[{page:"needCookiePot"}]}}),setTimeout(function(){r.location.reload()},4e3))},function(e){"askForAnEmail"==e.data.fieldErrors[0].fb?n.showPopup("facebookPop"):o.facebookError=!0}))},{scope:"email,user_birthday",return_scopes:!0})}catch(e){n.detectPrivateMode(function(e){document.getElementsByClassName("cannot-load-facebook-api-error-message")[0].innerHTML=void 0!==e&&e?r.fbCannotLoadMessage:""})}},o.potCreationLoginFB=function(t){try{FB.login(function(e){e.authResponse&&(window.authResponse=e.authResponse,window.lpcLog("response "+JSON.stringify(e)),i.account.facebookConnect(JSON.stringify(e.authResponse)).then(function(e){o.isBot?(r.location.replace("".concat(o.botPot.redirectUri,"=").concat(o.botPot.accountLinkingToken,"&authorization_code=test")),t(o.botPot)):t()},function(e){if("askForAnEmail"==e.data.fieldErrors[0].fb)n.showPopup("facebookPop");else if(o.facebookError=!0,e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t in e.data.fieldErrors)!e.data.fieldErrors[t]||"notlogged"!=e.data.fieldErrors[t].person||a.cookieEnabled()||ErrorHandler.handle({data:{fieldErrors:[{page:"needCookiePot"}]}})}))},{scope:"email,user_birthday",return_scopes:!0})}catch(e){n.detectPrivateMode(function(e){document.getElementsByClassName("cannot-load-facebook-api-error-message")[0].innerHTML=void 0!==e&&e?r.fbCannotLoadMessage:""})}}}]),angular.module("lpc").controller("createAccountLoginController",["$window","$scope","$rootScope","ServerFunction","Helper",function(i,a,r,o,e){a.initRecaptcha=function(){i.grecaptcha.render("recaptcha-container-login",{sitekey:"6Let6EEUAAAAADzcTpl4DUnMoReVEMfBqs_5jN1K",callback:a.onRecaptchaSuccess})},a.onRecaptchaSuccess=function(e){a.$apply(function(){a.token=e,a.wrongCaptcha=!1})},r.$on("$viewContentLoaded",function(){a.initRecaptcha()}),setTimeout(function(){a.initRecaptcha()},1e3),a.submitCreateAccount=function(){o.account.accountAdd(a.person).then(function(){i.location.reload()})};function n(){i.location.reload()}a.wrongCaptcha=!1,a.checkAdress=function(){o.pot.invite.checkAdress(a.person.emailPE).then(function(e){e.is_valid?a.propablyWrongMail=!1:a.propablyWrongMail=!0},function(e){a.propablyWrongMail=!1})},a.login=function(){if(void 0!==a.toLogUser.tfaCode){for(var e="",t=0;t<Object.keys(a.toLogUser.tfaCode).length;t++)e+=a.toLogUser.tfaCode[t];a.toLogUser.tfaCode=e}a.toLogUser.token=a.token,o.login(a.toLogUser).then(function(e){!0===e.needSMSOrGoogleTfa||!0===e.needGoogleTfa?(r.hidePopupV2("lpcLoginSignupPopup"),r.showPopupV2("googleValidatorPopup",{toLogUser:a.toLogUser,afterSignin:n})):!0===e.needSmsTfa?(r.hidePopupV2("lpcLoginSignupPopup"),r.showPopupV2("smsValidatorPopup",{toLogUser:a.toLogUser,afterSignin:n,telPE:e.telPE})):n()},function(e){if(i.grecaptcha.reset(),e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++){if(e.data.fieldErrors[t].captcha&&(a.wrongCaptcha=!0),e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"===e.data.fieldErrors[t].smsLimitSmsExceeded){r.hidePopupV2("lpcLoginSignupPopup"),r.showPopupV2("accountBlockedPopup"),localStorage.setItem("tfaFailCount",0);break}if(e.data.fieldErrors[t].tfaCode&&"tfaFail"===e.data.fieldErrors[t].tfaCode){n=void 0,null!==(n=localStorage.getItem("tfaFailCount"))?n++:n=0,localStorage.setItem("tfaFailCount",n),a.tfaFailCounted=3-(n+1),a.tfaFailCounted<=0&&(a.tfaFailCounted=0,r.hidePopupV2("lpcLoginSignupPopup"),r.showPopupV2("accountBlockedPopup"));break}}var n})}}]),angular.module("lpc").controller("remindMeLaterPopupController",["$window","$scope","$rootScope","ServerFunction","Helper","ipCookie",function(e,t,o,n,i,a){t.showPromoCode=!1,t.submitGetWelcomePromoCode=function(){n.pot.remindMeLater(t.person.emailPE).then(function(e){e&&e.data&&e.data.promoCode&&(t.showPromoCode=!0,t.promoCode=e.data.promoCode)})},t.$on("lpc-popup-close-event",function(e,t){"welcomePromoCodePopup"==t.popupName&&(t=a("welcome-cookie"),a("welcome-cookie",t?{displayTimes:2}:{displayTimes:1}))})}]),angular.module("lpc").controller("accountController",["$window","ErrorHandler","$scope","$rootScope","ServerFunction","Helper",function(o,n,i,a,r,t){function l(){var e=localStorage.getItem("tfaFailCount");null!==e?e++:e=0,localStorage.setItem("tfaFailCount",e),i.tfaFailCounted=3-(e+1),i.tfaFailCounted<=0&&(i.tfaFailCounted=0,a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("accountBlockedPopup"))}$(".tfa-popin__code__box").bind("keyup",function(e){handleCharacter.call(e.target,e)}),$(".tfa-popin__code__box").on("keydown",handleBackspace),i.activateGoogleTfa=function(){if(void 0!==i.person.googleValidationCode){for(var e="",t=0;t<Object.keys(i.person.googleValidationCode).length;t++)e+=i.person.googleValidationCode[t];6!==e.length&&i.tfaCopiedCode&&(e=i.tfaCopiedCode),i.tfaCode=e}r.account.activateGoogleTfa(e,i.person.password).then(function(){n.handle({data:{fieldErrors:[{msgok:"editSuccess"}]}},!0),a.hidePopupV2("initGoogleAuthPopup"),o.location.reload()},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++){if(e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"==e.data.fieldErrors[t].smsLimitSmsExceeded){a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("accountBlockedPopup"),localStorage.setItem("tfaFailCount",0);break}if(e.data.fieldErrors[t].tfaCode&&"tfaFail"===e.data.fieldErrors[t].tfaCode){l();break}}})},$("#birthdayPE").bind("keyup","keydown",function(e){var t=e.target.value.length;8==e.keyCode||2!==t&&5!==t||(t=e.target.value,t+="/",$(e.target).val(t))}),i.getCSPValues=function(){r.account.getCSPValues(i.person.cspCategoryPE).then(function(e){i.cspCodes=e})},i.downloadBackupCodes=function(){r.account.downloadCodes().then(function(e){var e=(e=JSON.stringify(e)).replaceAll(",","\n").replaceAll('"',"").replaceAll("]","").replaceAll("[",""),e=new Blob([e],{type:"text/plain;charset=utf-8"}),e=URL.createObjectURL(e),t=document.createElement("a");t.href=e,t.download="codes_secours.txt",t.click(),URL.revokeObjectURL(e)})},i.showCopyButton=!0,i.disableCopyButton=function(){console.log("$scope.showCopyButton : ",i.showCopyButton),i.showCopyButton=!1,$timeout(function(){i.showCopyButton=!0},5e3)},i.resendSmsCodeValidation=function(){r.resendSmsCodeValidation().then(function(){n.handle({data:{fieldErrors:[{msgok:"smsSent"}]}},!0)})},i.phoneNumberMask=function(){$(document).on("keyup",function(e){var t="",o=$("#phone").val().replace(/\s/g,"");if("phone"==e.target.id){for(var n=1;n<=o.length;n++)isNaN(parseInt(o[n-1]))||(t+=o[n-1],o.startsWith("0")?n%2==0&&n<o.length&&(t+=" "):(10===o.length&&(o=o.substring(0,o.length-1)),n%2!=0&&n<o.length&&(t+=" ")));$("#phone").val(t)}})},i.changeNumber=function(){a.hidePopupV2("activateSmsTfaPopup"),a.showPopupV2("initSmsPopup",{password:i.person.password})},i.activateSmsTfa=function(){if(void 0!==i.person.smsCode){for(var e="",t=0;t<Object.keys(i.person.smsCode).length;t++)e+=i.person.smsCode[t];6!==e.length&&i.tfaCopiedCode&&(e=i.tfaCopiedCode),i.tfaCode=e}r.account.smsCodeValidation(e).then(function(){n.handle({data:{fieldErrors:[{msgok:"editSuccess"}]}},!0),a.hidePopupV2("activateSmsTfaPopup"),o.location.reload()},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++){if(e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"==e.data.fieldErrors[t].smsLimitSmsExceeded){a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("accountBlockedPopup"),localStorage.setItem("tfaFailCount",0);break}if(e.data.fieldErrors[t].tfaCode&&"tfaFail"===e.data.fieldErrors[t].tfaCode){l();break}}})},i.sendSms=function(){r.account.sendSmsTfa().then(function(){a.showPopupV2("desactivateTfaPopup")},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)if(e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"==e.data.fieldErrors[t].smsLimitSmsExceeded){a.hidePopupV2("initSmsPopup"),a.showPopupV2("doubleAuthNoActivatedPopup");break}})},i.tfaAuthOff=function(){if(void 0!==i.person.desactivateTfaCode){for(var e="",t=0;t<Object.keys(i.person.desactivateTfaCode).length;t++)e+=i.person.desactivateTfaCode[t];6!==e.length&&i.tfaCopiedCode&&(e=i.tfaCopiedCode),i.tfaCode=e}r.account.tfaAuthOff(i.tfaCode).then(function(){n.handle({data:{fieldErrors:[{msgok:"smsSent"}]}},!0),a.hidePopupV2("desactivateTfaPopup"),o.location.reload()},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++){if(e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"==e.data.fieldErrors[t].smsLimitSmsExceeded){a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("accountBlockedPopup"),localStorage.setItem("tfaFailCount",0);break}if(e.data.fieldErrors[t].tfaCode&&"tfaFail"===e.data.fieldErrors[t].tfaCode){l();break}}})},i.transformEntry=function(e,t){i.person.telPE;var o=e[0]+e[1]+e[2];if("tel"!==t)throw new Error("Undefined type: "+t);return o+"*".repeat(e.length-6)+e.slice(-2)},i.initSms=function(){r.account.initSmsTfa(i.person.smsCountry,i.person.telPE,i.person.password).then(function(){n.handle({data:{fieldErrors:[{msgok:"smsSent"}]}},!0),a.hidePopupV2("initSmsPopup"),a.showPopupV2("activateSmsTfaPopup",{password:i.person.password})},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++){if(e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"==e.data.fieldErrors[t].smsLimitSmsExceeded){a.hidePopupV2("initSmsPopup"),a.showPopupV2("doubleAuthNoActivatedPopup");break}e.data.fieldErrors[t].passwordTfaPE&&"notfound"==e.data.fieldErrors[t].passwordTfaPE&&(a.hidePopupV2("initSmsPopup"),a.showPopupV2("TfaSelectAuthPopup",{passwordNotfound:!0}))}})},i.person||(i.person={}),i.person.contacts=window.contacts,delete window.contacts,i.editProfilFormSubmit=function(){i.profileupdated=!1,r.account.updateProfil(i.person.firstNamePE,i.person.lastNamePE,angular.isDate(i.person.birthdayPE)?t.formatDate(i.person.birthdayPE):i.person.birthdayPE,i.person.cspCodePE,i.avatar,i.selectedImage).then(function(e){i.person.firstNamePE=e.firstNamePE,i.person.lastNamePE=e.lastNamePE,i.person.birthdayPE=e.birthdayPE,i.person.cspCodePE=e.cspCodePE,i.person.avatarPE=e.avatarPE,i.person.urlProfileImgPE=e.urlProfileImgPE,i.editProfilForm.$setPristine(!0),i.profileupdated=!0,n.handle({data:{fieldErrors:[{msgok:"editSuccess"}]}},!0)}),$route.reload()};i.editEmailFormSubmit=function(t){i.emailupdated=!1,r.account.updateEmail(i.person.emailPE,i.person.newEmailPE,i.person.passwordPE).then(function(e){i.person.emailPE=e.emailPE,i.person.newEmailPE="",i.person.newEmailPE2="",t.$setPristine(!0),i.emailupdated=!0,a.hidePopupV2("editMailPasswordPopup"),n.handle({data:{fieldErrors:[{msgok:"editSuccess"}]}},!1)},function(e){e=e.data;e&&e.fieldErrors&&e.fieldErrors.length&&function(e){for(var t,o=0;o<e.length;o++)for(t in e[o])if("passwordPE"==t)return!0;return!1}(e.fieldErrors)||a.hidePopupV2("editMailPasswordPopup")})},i.editPwdFormSubmit=function(){var t=!!i.person.passwordPE;r.account.updatePassword(i.person.passwordPE,i.person.newPasswordPE).then(function(e){t?(i.person.passwordPE="",i.person.newPasswordPE="",i.person.newPasswordPE2="",i.editPwdForm.$setPristine(!0),n.fetchPageError()):window.location.reload(),n.handle({data:{fieldErrors:[{msgok:"editSuccess"}]}})})},i.linkResolver=function(){var e;arguments&&0!=arguments.length&&(e=t.getUrlWithArgs(arguments))&&(window.location=e)},i.formatDate=function(e){if(void 0!==e&&null!=e&&""!=e)return e.slice(0,2).concat("/",e.charAt(3),e.charAt(4),"/",e.charAt(6),e.charAt(7),e.charAt(8),e.charAt(9))},i.CopyButton=function(){$(document).ready(function(){var e=document.getElementById("to-copy");$("#copy").on("click",function(){return e.select(),document.execCommand("copy"),$(function(){setTimeout(function(){},5e3)}),!1})})},i.submitTfaSelectType=function(){i.person.tfaType&&i.person.tfaType!=i.initialKycPersonTypeValue&&(0==i.person.tfaType?(a.hidePopupV2("TfaSelectAuthPopup"),a.showPopupV2("desactivateTfaPopup")):1==i.person.tfaType?(a.hidePopupV2("TfaSelectAuthPopup"),a.showPopupV2("initSmsPopup",{password:i.person.password})):2==i.person.tfaType&&r.initGoogleValidation(i.tfa).then(function(e){a.hidePopupV2("TfaSelectAuthPopup"),a.showPopupV2("initGoogleAuthPopup",{googleAuthKeyPE:e.data.googleAuthKeyPE,password:i.person.password})}))},i.firstRender=!0,i.avatar=null,i.chooseAvatar=function(e){i.avatar=e,i.IsVisibleAvatars=!1,i.firstRender=!1},i.maxSizeExceeded=!1,i.selectedImage=void 0,i.IsVisibleAvatars=!1,i.ShowOrHideAvatars=function(){i.IsVisibleAvatars=!i.IsVisibleAvatars},i.emojiModel=["DOG","CAT","MOUSE","RABBIT","BEAR","PANDA","KOALA","LION","COW","FROG","MONKEY","SEE_NO_EVIL_MONKEY","ORANGUTAN","CHICKEN","PENGUIN","BIRD","HATCHING_CHICK","WOLF","FOX","RACCOON","GIRAFFE","DEER","SLOTH","OTTER","UNICORN","HONEYBEE","BUG","BUTTERFLY","LADY_BEETLE","LIZARD","OCTOPUS","BLOWFISH","SPOUTING_WHALE","ELEPHANT","BAT","OWL","FLAMINGO","PARROT","CHIPMUNK","HEDGEHOG","GHOST","EXTRATERRESTRIAL_ALIEN","ROBOT"]}]),angular.module("lpc").controller("cguChoiceController",["$scope","$rootScope","ServerFunction",function(e,t,o){e.submitConfirmCguOrganizer=function(){o.account.confirmCguOrganizer(e.person.cguChoice)}}]),angular.module("lpc").controller("completeMissingInformationsController",["$window","$scope","$rootScope","ServerFunction","ErrorHandler","ipCookie",function(e,t,o,n,i,a){t.submitMissingInformations=function(){n.account.submitMissingInformations(t.person.missingInformations).then(function(){i.handle({data:{fieldErrors:[{msgok:"editSuccess"}]}},!0),e.location.reload()})},t.cancelMissingInformations=function(){a.remove("session-cookie-informations-missing",{path:"/",domain:e.domainName})},t.getCSPValues=function(){n.account.getCSPValues(t.person.cspCategoryPE).then(function(e){t.cspCodes=e})}}]),angular.module("lpc").controller("listsAccountController",["$window","ipCookie","$scope","$rootScope","ServerFunction","Helper",function(e,t,o,n,i,a){a.handleTag.bindChange({owned:0,invited:1,participated:2}),o.updateListsFilter=function(e,t){if(!t){t=a.handleTag.serachHash();if(t.page&&("owned"==t.page||"invited"==t.page||"participated"==t.page))return}1==e?a.handleTag.changePage("invited"):2==e?a.handleTag.changePage("participated"):a.handleTag.resetPage()},o.activatePot=function(e){i.updatePotStatus(e,"running")},o.deletePot=function(e){i.potDelete(e).then(function(e){"DELETED"==e.status.toUpperCase()&&angular.element(".owned-list").each(function(){if(angular.element(this).data("uniqpo")==e.uniqPO)return angular.element(this).remove(),0})})},o.declineAndHideInvitation=function(e){i.declineAndHideInvitation(e).then(function(){angular.element(".invitedPot").each(function(){if(angular.element(this).data("uniqpo")==e)return angular.element(this).remove(),0})})},o.hideInvitation=function(e){i.inviteDelete(e).then(function(){angular.element(".invitedPot").each(function(){if(angular.element(this).data("uniqpo")==e)return angular.element(this).remove(),0})})}}]),angular.module("lpc").controller("salesAccountController",["$window","ipCookie","$scope","$rootScope","ServerFunction","Helper",function(e,t,o,n,i,a){a.handleTag.bindChange({owned:0,invited:1,bought:2}),o.updateSalesFilter=function(e,t){if(!t){t=a.handleTag.serachHash();if(t.page&&("owned"==t.page||"invited"==t.page||"bought"==t.page))return}1==e?a.handleTag.changePage("invited"):2==e?a.handleTag.changePage("bought"):a.handleTag.resetPage()},o.activatePot=function(e){i.updatePotStatus(e,"running")},o.deletePot=function(e){i.potDelete(e).then(function(e){"DELETED"==e.status.toUpperCase()&&angular.element(".owned-sale").each(function(){if(angular.element(this).data("uniqpo")==e.uniqPO)return angular.element(this).remove(),0})})},o.declineAndHideInvitation=function(e){i.declineAndHideInvitation(e).then(function(){angular.element(".invited-ticket").each(function(){if(angular.element(this).data("uniqpo")==e)return angular.element(this).remove(),0})})},o.hideInvitation=function(e){i.inviteDelete(e).then(function(){angular.element(".invitedPot").each(function(){if(angular.element(this).data("uniqpo")==e)return angular.element(this).remove(),0})})}}]),angular.module("lpc").controller("kittiesAccountController",["$window","ipCookie","$scope","$rootScope","ServerFunction","Helper",function(e,t,o,n,i,a){o.ownedPots=window.ownedPots,delete window.ownedPots,a.handleTag.bindChange({owned:0,invited:1,offered:2}),o.updateKittiesFilter=function(e,t){if(!t){t=a.handleTag.serachHash();if(t.page&&("owned"==t.page||"invited"==t.page||"offered"==t.page))return}1==e?a.handleTag.changePage("invited"):2==e?a.handleTag.changePage("offered"):a.handleTag.resetPage()},o.activatePot=function(e){i.updatePotStatus(e,"running")},o.deletePot=function(e){i.potDelete(e).then(function(e){"DELETED"==e.status.toUpperCase()&&angular.element(".owned-kitty").each(function(){if(angular.element(this).data("uniqpo")==e.uniqPO)return angular.element(this).remove(),0})})},o.declineAndHideInvitation=function(e){i.declineAndHideInvitation(e).then(function(){angular.element(".invitedPot").each(function(){if(angular.element(this).data("uniqpo")==e)return angular.element(this).remove(),0})})},o.hideInvitation=function(e){i.inviteDelete(e).then(function(){angular.element(".invitedPot").each(function(){if(angular.element(this).data("uniqpo")==e)return angular.element(this).remove(),0})})},o.editPot=function(t){o.pot=_.filter(o.ownedPots,function(e){return e.uniqPO==t})[0],n.$broadcast("edit-pot-with-popup",o.pot),n.showPopupV2("potCreationEdition")}}]),angular.module("lpc").controller("ibanController",["$window","ipCookie","$scope","$rootScope","ServerFunction",function(e,t,o,n,i){o.person||(o.person={}),o.ibanAuthentificationFormSubmit=function(){i.account.iban.getAll(o.person.tmpPwd).then(function(e){o.person.ibans=e.ibans,o.person.totalCollectPE=e.totalCollectPE,o.person.autorized=!0})},o.addIbanFormSubmit=function(t){var e=o.person.newIban;i.account.iban.add(o.person.tmpPwd,!0===e.external,e.firstName,e.lastName,e.bicIB,e.iban).then(function(e){o.person.ibans=e.ibans,t.addIbanForm.$setPristine(),o.person.newIban={},o.selection.selectedIban=o.person.ibans[o.person.ibans.length-1],n.hidePopupV2("addIbanPopup")})},o.deleteIban=function(){i.account.iban.delete(o.person.tmpPwd,o.selection.actioniban.uniqIB).then(function(e){o.person.ibans=e.ibans,o.selection.selectedIban=void 0,n.hidePopup("deleteIban")})}}]),angular.module("lpc").controller("createAmazonGiftController",["$window","ipCookie","$scope","$rootScope","ServerFunction","Helper",function(e,t,n,o,i,a){n.person||(n.person={}),n.createAmazonGiftControllerSubmit=function(){i.pot.agc.create(n.pot.uniqPO,n.person.tmpPwd,n.amazonGiftCard.valueAGC).then(function(e){},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)if(e.data.fieldErrors[t].kyc&&("needkycKycFloor"==e.data.fieldErrors[t].kyc||"lmneedkyc"==e.data.fieldErrors[t].kyc||"needkyc"==e.data.fieldErrors[t].kyc)){console.log(e.data.fieldErrors[t].kyc),n.collect||(n.collect={}),n.collect.showkyc=!0,n.collect.forceneedKyc=e.data.fieldErrors[t].kyc,setTimeout(function(){jQuery("html, body").animate({scrollTop:$("#kyc-block").offset().top},500)},100);break}})}}]),angular.module("lpc").controller("createSmartboxGiftController",["$window","ipCookie","$scope","$rootScope","ServerFunction","Helper",function(e,t,n,o,i,a){n.person||(n.person={}),n.createSmartboxGiftCardControllerSubmit=function(){i.pot.partners.smartbox.create(n.pot.uniqPO,n.person.tmpPwd,n.smartboxGiftCard.valueSmartboxGC).then(function(e){},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)if(e.data.fieldErrors[t].kyc&&("needkycKycFloor"==e.data.fieldErrors[t].kyc||"lmneedkyc"==e.data.fieldErrors[t].kyc||"needkyc"==e.data.fieldErrors[t].kyc)){console.log(e.data.fieldErrors[t].kyc),n.collect||(n.collect={}),n.collect.showkyc=!0,n.collect.forceneedKyc=e.data.fieldErrors[t].kyc,console.log("error.data.fieldErrors[i].kyc : ",e.data.fieldErrors[t].kyc),setTimeout(function(){jQuery("html, body").animate({scrollTop:$("#kyc-block").offset().top},500)},100);break}})}}]),angular.module("lpc").controller("createZalandoController",["$window","ipCookie","$scope","$rootScope","ServerFunction","Helper",function(e,t,n,o,i){var a=$("#valueZalandoGC"),r=$(".decathlon-tooltip"),l=$(".decathlon-max-value"),s=(r.css("display","none"),l.fadeOut(),250);n.setMaxVal=function(e){console.log("val : ",e),s=e},n.getMaxVal=function(){return console.log("maxVal : ",s),s},a.on("keyup",function(e){e=e.target.value;s<e?(setTimeout(function(){l.fadeIn()},500),r.css("display","block"),setTimeout(function(){setTimeout(function(){l.fadeOut()},3e4),r.css("display","none")},30500)):r.css("display","none"),a.removeClass("shake"),s<e&&(a.toggleClass("shake"),$(".max-participation__tooltip").fadeIn(),setTimeout(function(){$(".max-participation__tooltip").fadeOut()},8e3))}),n.person||(n.person={}),n.createZalandoGiftCardControllerSubmit=function(){i.pot.partners.zalando.create(n.pot.uniqPO,n.person.tmpPwd,n.zalandoGiftCard.valueZalandoGC).then(function(e){},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)if(e.data.fieldErrors[t].kyc&&("needkycKycFloor"==e.data.fieldErrors[t].kyc||"lmneedkyc"==e.data.fieldErrors[t].kyc||"needkyc"==e.data.fieldErrors[t].kyc)){console.log(e.data.fieldErrors[t].kyc),n.collect||(n.collect={}),n.collect.showkyc=!0,n.collect.forceneedKyc=e.data.fieldErrors[t].kyc,console.log("error.data.fieldErrors[i].kyc : ",e.data.fieldErrors[t].kyc),setTimeout(function(){jQuery("html, body").animate({scrollTop:$("#kyc-block").offset().top},500)},100);break}})}}]),angular.module("lpc").controller("createDecathlonGiftController",["$window","ipCookie","$scope","$rootScope","ServerFunction","Helper",function(e,t,o,n,i,a){o.person||(o.person={}),o.createDecathlonGiftCardControllerSubmit=function(){i.pot.partners.decathlon.create(o.pot.uniqPO,o.person.tmpPwd,o.decathlonGiftCard.valueGC)}}]),angular.module("lpc").controller("createClickAndGiftGiftController",["$window","ipCookie","$scope","$rootScope","ServerFunction",function(e,t,n,o,i){n.person||(n.person={}),n.isWaitingForSubmition=!0,n.phonePattern="(^\\d{9})$",n.stepIndex=1,n.submitFirstStep=function(){var e=n.valueClickAndGiftGCForm;n.valueClickAndGiftGCForm.$setDirty(),n.valueClickAndGiftGCForm.$setSubmitted(),e.$invalid&&angular.forEach(e.$error,function(e,t){angular.forEach(e,function(e){e.$setDirty()})}),n.valueClickAndGiftGCForm.$valid&&1==n.stepIndex&&(n.isWaitingForSubmition=!n.isWaitingForSubmition),n.valueClickAndGiftGCForm.$invalid?setTimeout(function(){jQuery("html, body").animate({scrollTop:angular.element("input.ng-invalid").first().offset().top-100},500)},100):n.isWaitingForSubmition||1!=n.stepIndex||setTimeout(function(){jQuery("html, body").animate({scrollTop:$("#cardImage").offset().top-100},500)},100),2==n.stepIndex&&(n.isWaitingForSubmition=!1,n.stepIndex=1,angular.element(document.activeElement).blur())},n.createGiftCardControllerSubmit=function(){n.isWaitingForSubmition&&1==n.stepIndex?(n.stepIndex=2,setTimeout(function(){n.submitFirstStep()},100)):(n.stepIndex=2,i.pot.partners.clickAndGift.create(n.pot.uniqPO,n.person.tmpPwd,n.clickAndGiftGiftCard.valueGC,n.clickAndGiftGiftCard.firstName,n.clickAndGiftGiftCard.lastName,n.clickAndGiftGiftCard.email,n.clickAndGiftGiftCard.telephone).catch(function(e){if(n.valueClickAndGiftGCForm.$invalid&&setTimeout(function(){jQuery("html, body").animate({scrollTop:angular.element("input.ng-invalid").first().offset().top-100},500)},100),n.isWaitingForSubmition=!0,n.stepIndex=1,angular.element("input.ng-invalid").first().focus(),e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)if(e.data.fieldErrors[t].kyc&&("needkycKycFloor"==e.data.fieldErrors[t].kyc||"lmneedkyc"==e.data.fieldErrors[t].kyc||"needkyc"==e.data.fieldErrors[t].kyc)){n.collect||(n.collect={}),n.collect.showkyc=!0,n.collect.forceneedKyc=e.data.fieldErrors[t].kyc,setTimeout(function(){jQuery("html, body").animate({scrollTop:$("#kyc-block").offset().top-100},500)},100);break}}))},n.checkAdress=function(){i.pot.invite.checkAdress(n.clickAndGiftGiftCard.email).then(function(e){e.is_valid?n.propablyWrongMail=!1:n.propablyWrongMail=!0},function(e){n.propablyWrongMail=!1,n.valueClickAndGiftGCForm.$setDirty()})}}]),angular.module("lpc").controller("createGiftController",["$window","ipCookie","$scope","$rootScope","ServerFunction","Helper",function(e,t,n,o,i,a){n.person||(n.person={});function r(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++){if(e.data.fieldErrors[t].kyc&&("needkycKycFloor"==e.data.fieldErrors[t].kyc||"lmneedkyc"==e.data.fieldErrors[t].kyc||"needkyc"==e.data.fieldErrors[t].kyc)){n.collect||(n.collect={}),n.collect.showkyc=!0,n.collect.forceneedKyc=e.data.fieldErrors[t].kyc,setTimeout(function(){jQuery("html, body").animate({scrollTop:$("#kyc-block").offset().top},500)},100);break}n.exceededlimit="exceededlimit"==e.data.fieldErrors[t].valueJackpotGC}}n.createCitadiumGiftCardControllerSubmit=function(){i.pot.partners.citadium.create(n.pot.uniqPO,n.person.tmpPwd,n.giftCard.valueGC).then(function(e){},function(e){r(e)})},n.createPrintempsGiftCardControllerSubmit=function(){i.pot.partners.printemps.create(n.pot.uniqPO,n.person.tmpPwd,n.giftCard.valueGC).then(function(e){},function(e){r(e)})},n.createPrintempsVoyagesGiftCardControllerSubmit=function(){i.pot.partners.printempsVoyages.create(n.pot.uniqPO,n.person.tmpPwd,n.giftCard.valueGC).then(function(e){},function(e){r(e)})},n.createDecathlonGiftCardControllerSubmit=function(){i.pot.partners.decathlon.create(n.pot.uniqPO,n.person.tmpPwd,n.giftCard.valueGC).then(function(e){},function(e){r(e)})},n.createJackpotGiftCardControllerSubmit=function(e){i.pot.partners.jackpot.create(n.pot.uniqPO,e,n.person.tmpPwd,n.giftCard.valueGC).then(function(e){},function(e){r(e)})}}]),lpc.controller("jackpotVoucherPartnerController",["$scope","$timeout","ServerFunction","$window",function(n,e,t,o){n.person||(n.person={}),e(function(){$(".carousel-3d-container").height("auto"),$(".carousel-3d-container").css("overflow","visible"),$(".carousel-3d-slide").css("overflow","visible")},100),n.offersValueList=o.offersValueList,n.offers=new Object;for(var i=0;i<n.offersValueList.length;i++)Object.assign(n.offers,n.offersValueList);n.selectedOffer=-1,n.select=function(e,t){e!==n.selectedOffer&&(angular.element(".offer-container").removeClass("selected-offer"),angular.element(".swiper-button").removeClass("inverted-primary-button"),angular.element(".swiper-button").text(n.selectText),angular.element(".offer"+e).addClass("inverted-primary-button"),angular.element(".offer"+e).addClass("selected-offer"),angular.element(".offer"+e).text(n.selectedText),n.selectedOffer=e)},n.$watch("selectedOffer",function(e,t){null!=n.notEnoughMoneyText&&(n.notEnoughMoney=n.notEnoughMoneyText.replace("{1}",(n.offers[e]-n.pot.amountLeft).toFixed(2)))}),n.getElementToScrollTo=function(){return"block"==angular.element(".bein-swiper").css("display")?"swiper-carousel":"createCoupon"},n.createVoucherPartnerGiftCardControllerSubmit=function(e){-1!==n.selectedOffer&&t.pot.partners.jackpot.create(n.pot.uniqPO,e,n.person.tmpPwd,offersValueList[n.selectedOffer]).then(function(e){},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)if(e.data.fieldErrors[t].kyc&&("needkycKycFloor"==e.data.fieldErrors[t].kyc||"lmneedkyc"==e.data.fieldErrors[t].kyc||"needkyc"==e.data.fieldErrors[t].kyc)){console.log(e.data.fieldErrors[t].kyc),n.collect||(n.collect={}),n.collect.showkyc=!0,n.collect.forceneedKyc=e.data.fieldErrors[t].kyc,console.log("error.data.fieldErrors[i].kyc : ",e.data.fieldErrors[t].kyc),setTimeout(function(){jQuery("html, body").animate({scrollTop:$("#kyc-block").offset().top},500)},100);break}})}}]),angular.module("lpc").controller("collectInfoController",["$window","ipCookie","$scope","$rootScope","ServerFunction","Helper",function(e,t,o,n,i,a){o.person||(o.person={}),o.editInfo=function(){o.person.autorized=!1,delete o.collect.showkyc,delete o.collect.forceneedKyc},o.collectTotalChanged=function(e){"false"===o.collect.collectTotal&&(o.collect.amountTR=null,e)&&setTimeout(function(){angular.element("#"+e).focus()},0)},o.$watch("collect.collectTotal",function(e){return"true"==e&&(o.collect.amountTR=a.fixFloat(o.pot.amountLeft)),e}),o.collectInfoFormSubmit=function(){"true"==o.collect.collectTotal&&(o.collect.amountTR=a.fixFloat(o.pot.amountLeft)),"biscuitmistral"===subdomain&&o.collect.collectTotal&&(o.collect.close=!0),i.pot.collect.init(o.pot.uniqPO,o.person.tmpPwd,"true"==o.collect.collectTotal,o.collect.amountTR,o.collect.close).then(function(e){o.person.ibans=e.ibans,o.person.totalCollectPE=e.totalCollectPE,o.person.autorized=!0})}}]),angular.module("lpc").controller("collectRibController",["$window","ipCookie","$scope","$rootScope","ServerFunction","ErrorHandler","Helper",function(e,t,n,o,i,a,r){n.collectValid=function(){i.pot.collect.valid(n.pot.uniqPO,n.person.tmpPwd,"true"==n.collect.collectTotal,n.collect.amountTR,n.collect.close,n.selection.selectedIban.uniqIB).then(function(){},function(e){r.kyc.handleKycErrorsNew(n,e,"kyc-block")})},n.collectForMerchant=function(){i.pot.collect.validMerchant(n.pot.uniqPO,n.person.tmpPwd,"true"==n.collect.collectTotal,n.collect.amountTR,n.collect.close).then(function(){},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)!e.data.fieldErrors[t].kyc||"needkycKycFloor"!=e.data.fieldErrors[t].kyc&&"lmneedkyc"!=e.data.fieldErrors[t].kyc&&"needkyc"!=e.data.fieldErrors[t].kyc||(n.collect.showkyc=!0,n.collect.forceneedKyc=e.data.fieldErrors[t].kyc,setTimeout(function(){jQuery("#kyc-block").scrollToTop(!0)},0))})},n.collectForSilver=function(){i.pot.collect.validMerchantEvaneos(n.pot.uniqPO,n.person.tmpPwd,"true"==n.collect.collectTotal,n.collect.amountTR,n.collect.refDossierEvaneos,n.collect.close).then(function(){},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)!e.data.fieldErrors[t].kyc||"needkycKycFloor"!=e.data.fieldErrors[t].kyc&&"lmneedkyc"!=e.data.fieldErrors[t].kyc&&"needkyc"!=e.data.fieldErrors[t].kyc||(n.collect.showkyc=!0,n.collect.forceneedKyc=e.data.fieldErrors[t].kyc,setTimeout(function(){jQuery("#kyc-block").scrollToTop(!0)},0))})},n.collectForMerchantEvaneos=function(){i.pot.collect.validMerchantEvaneos(n.pot.uniqPO,n.person.tmpPwd,"true"==n.collect.collectTotal,n.collect.amountTR,n.collect.refDossierEvaneos,n.collect.close).then(function(){},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)!e.data.fieldErrors[t].kyc||"needkycKycFloor"!=e.data.fieldErrors[t].kyc&&"lmneedkyc"!=e.data.fieldErrors[t].kyc&&"needkyc"!=e.data.fieldErrors[t].kyc||(n.collect.showkyc=!0,n.collect.forceneedKyc=e.data.fieldErrors[t].kyc,setTimeout(function(){jQuery("#kyc-block").scrollToTop(!0)},0))})},n.$on("kycUploaded",function(e,t){t&&t.kycUploaded&&(n.collect.forceneedKyc&&(n.collect.showkyc=!1,n.collect.forceneedKyc=!1,jQuery(document).scrollTop(0),a.handle({data:{fieldErrors:[{msgok:"collectkycUploaded"}]}})),n.$apply())})}]),angular.module("lpc").controller("collectFinalizeController",["$window","Helper","ipCookie","$scope","$rootScope","ServerFunction","$sce",function(e,l,s,c,t,o,n){c.initLink=function(){var e=l.queryString,t={},o=s("lpc-sncf-params"),o=o&&decodeURIComponent(o.replace(/\+/g,"%20"));if(void 0!==o)for(var n=o.split("|||"),i=0;i<n.length;i++){var a,r=n[i].split("=");void 0===t[r[0]]?t[r[0]]=r[1]:"string"==typeof t[r[0]]?(a=[t[r[0]],r[1]],t[r[0]]=a):t[r[0]].push(r[1])}void 0!==t.vsc_ref_dv?c.link="https://www.voyages-train-groupes.sncf.fr/#/initialisationAp?ID_AGENCE=MBGVSC&CODE_LANGUE=FR&PAYS_DISTRIBUTION=FR&REFDV="+t.vsc_ref_dv:void 0!==e.vsc_ref_dv?c.link="https://www.voyages-train-groupes.sncf.fr/#/initialisationAp?ID_AGENCE=MBGVSC&CODE_LANGUE=FR&PAYS_DISTRIBUTION=FR&REFDV="+e.vsc_ref_dv:c.link="http://www.voyages-sncf.com/billet-train-groupe"},c.sendClotureMails=function(e){o.pot.sendClotureMail(e).then(function(){c.clotureMailsSended=!0})},c.previewClotureMails=function(e){o.pot.previewClotureMail(e).then(function(e){c.previewClotureHtml=n.trustAsHtml(e.body),t.showPopup("previewcolturepop")})}}]),angular.module("lpc").controller("limonetikController",["$window","ipCookie","$scope","$rootScope","ServerFunction","$sce",function(i,e,a,r,o,t){a.initRecaptcha=function(){i.grecaptcha.render("recaptcha-container-login",{sitekey:"6Let6EEUAAAAADzcTpl4DUnMoReVEMfBqs_5jN1K",callback:a.onRecaptchaSuccess})},a.token=null,a.onRecaptchaSuccess=function(e){a.$apply(function(){a.token=e})},setTimeout(function(){a.initRecaptcha()},1e3),a.toLogUser={},a.person={},a.wrongCaptcha=!1,a.amountLeft=0,a.pots=window.pots,a.$watch("selection.pot.uniqPO",function(e,t){"undefined"!==e&&(a.checkPotKyc=o.limonetik.checkPotKyc(e,a.amountLeft,a.uniqLT).then(function(e){a.potKyc=e}))}),a.hideBlockOnClick=function(){$(".greeting-card-physical-select-card-selection-mobile-full-panel").removeClass("show-full-panel")},a.cancelTransaction=function(){o.limonetik.cancel(a.uniqLT).then(function(){i.location.reload()})},a.extraPaymentInit=function(){o.limonetik.extraPaiement(a.uniqLT,a.selection.pot.uniqPO).then(function(e){a.caddie={result:{cardPayment:e}},a.cardPayment=e,a.smOperationId=e.operationId,a.smPayinTokenId=e.payinTokenId,a.smExtraData=e.extraData,setTimeout(function(){hostedFields.load()},500)})},a.paymentFinalize=function(){o.limonetik.payWithPot(a.uniqLT,a.selection.pot.uniqPO)},a.programmaticallySubmitSmoney=function(){setTimeout(function(e){document.getElementById("smoney-payment-submit").click()},0)},a.getPotFromUniq=function(e){if(e&&a.pots&&a.pots.length)for(var t=0;t<a.pots.length;t++)if(a.pots[t].uniqPO==e)return a.pots[t]},a.isEligible=function(e){return!!e&&!!window.potsEligibleByUniq&&window.potsEligibleByUniq[e]};function n(){i.location.reload()}a.login=function(){if(void 0!==a.toLogUser.tfaCode){for(var e="",t=0;t<Object.keys(a.toLogUser.tfaCode).length;t++)e+=a.toLogUser.tfaCode[t];a.toLogUser.tfaCode=e}a.toLogUser.token=a.token,o.login(a.toLogUser).then(function(e){1==e.needGoogleTfa?(r.hidePopupV2("lpcLoginSignupPopup"),r.showPopupV2("googleValidatorPopup",{toLogUser:a.toLogUser,afterSignin:n})):1==e.needSmsTfa?(r.hidePopupV2("lpcLoginSignupPopup"),r.showPopupV2("smsValidatorPopup",{toLogUser:a.toLogUser,afterSignin:n,telPE:e.telPE})):n()},function(e){if(i.grecaptcha.reset(),e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++){if(e.data.fieldErrors[t].captcha&&(a.wrongCaptcha=!0),e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"==e.data.fieldErrors[t].smsLimitSmsExceeded){r.hidePopupV2("lpcLoginSignupPopup"),r.showPopupV2("accountBlockedPopup"),localStorage.setItem("tfaFailCount",0);break}if(e.data.fieldErrors[t].tfaCode&&"tfaFail"===e.data.fieldErrors[t].tfaCode){n=void 0,null!==(n=localStorage.getItem("tfaFailCount"))?n++:n=0,localStorage.setItem("tfaFailCount",n),a.tfaFailCounted=3-(n+1),a.tfaFailCounted<=0&&(a.tfaFailCounted=0,r.hidePopupV2("lpcLoginSignupPopup"),r.showPopupV2("accountBlockedPopup"));break}}var n})},a.submitCreateAccount=function(){a.person.notDefaultRedirect=!0,o.account.accountAdd(a.person).then(function(){i.location.reload()})},a.getPotImage=function(e){return window.potsImages[e]||"/static/img/limonetik-banner-no-pots.jpg?h=hash"},a.getLimonetikHeader=function(e){return{backgroundImage:'url("'+a.getPotImage(e)+'")'}},a.selectElementShowButton2=function(){$element.is(":checked")?(document.getElementsByClassName("pot-select").hide(),document.getElementsByClassName("pot-selected").show()):(document.getElementsByClassName("pot-select").show(),document.getElementsByClassName("pot-selected").hide())}}]),angular.module("lpc").controller("loginController",["$window","ipCookie","$scope","$rootScope","ServerFunction","Helper","ErrorHandler",function(n,e,i,a,r,o,l){function s(){var e=localStorage.getItem("tfaFailCount");null!==e?e++:e=0,localStorage.setItem("tfaFailCount",e),i.tfaFailCounted=3-(e+1),i.tfaFailCounted<=0&&(i.tfaFailCounted=0,a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("accountBlockedPopup"))}i.initRecaptcha=function(){n.grecaptcha.render("recaptcha-container-login",{sitekey:"6Let6EEUAAAAADzcTpl4DUnMoReVEMfBqs_5jN1K",callback:i.onRecaptchaSuccess})},i.token=null,i.onRecaptchaSuccess=function(e){i.$apply(function(){i.token=e,i.wrongCaptcha=!1})},setTimeout(function(){i.initRecaptcha()},1e3);function c(){n.location.reload()}function t(){r.pot.potNewReduced(i.pot).then(function(){},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t in e.data.fieldErrors)!e.data.fieldErrors[t]||"notlogged"!=e.data.fieldErrors[t].person||o.cookieEnabled()||l.handle({data:{fieldErrors:[{page:"needCookiePot"}]}})})}function d(){n.location.replace("".concat(botPot.redirectUri,"=").concat(botPot.accountLinkingToken,"&authorization_code=test")),r.pot.createPotWithBot(botPot)}var u=o.queryString,p=(a.cookiesChoices&&a.cookiesChoices.analytics&&e("lpc-bot-params",u),null!=u.facebook_id?i.isBot=!0:i.isBot=!1,i.isBot&&(i.botPot={namePO:u.name,categoryPO:u.category,solidaryCategoryPO:u.solidaryCategoryPO,organizerPO:u.organizer,redirectUri:u.redirect_uri,accountLinkingToken:u.account_linking_token,facebookID:u.facebook_id}),i.toLogUser={},i.wrongCaptcha=!1,i.sendEmailForFacebook=function(){window.authResponse.email=i.facebookEmail,r.account.facebookConnect(JSON.stringify(window.authResponse)).then(function(e){n.location.reload()},function(e){"askForAnEmail"==e.data.fieldErrors[0].fb?a.showPopup("facebookEmail-pop"):i.facebookError=!0})},i.fbConnect=function(){if(null!=i.isPotCreationEditionPopup&&1==i.isPotCreationEditionPopup||i.isBot)i.isBot?i.potCreationLoginFB(r.pot.createPotWithBot):i.potCreationLoginFB(i.submitCreateReducedPot);else try{FB.login(function(e){e.authResponse&&(window.authResponse=e.authResponse,r.account.facebookConnect(JSON.stringify(e.authResponse)).then(function(e){o.cookieEnabled()?n.location.reload():(l.handle({data:{fieldErrors:[{page:"needCookiePot"}]}}),setTimeout(function(){n.location.reload()},4e3))},function(e){"askForAnEmail"==e.data.fieldErrors[0].fb?a.showPopup("facebookPop"):i.facebookError=!0}))},{scope:"email,user_birthday",return_scopes:!0})}catch(e){a.detectPrivateMode(function(e){document.getElementsByClassName("cannot-load-facebook-api-error-message")[0].innerHTML=void 0!==e&&e?n.fbCannotLoadMessage:""})}},i.login=function(){if(null!=i.isPotCreationEditionPopup&&1==i.isPotCreationEditionPopup)i.potCreationPopupLogin(i.toLogUser);else if(i.isBot)p(i.toLogUser,i.botPot);else{if(void 0!==i.toLogUser.tfaCode){for(var e="",t=0;t<Object.keys(i.toLogUser.tfaCode).length;t++)e+=i.toLogUser.tfaCode[t];i.toLogUser.tfaCode=e}i.toLogUser.token=i.token,r.login(i.toLogUser).then(function(e){o.cookieEnabled()?1==e.needGoogleTfa?(a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("googleValidatorPopup",{toLogUser:i.toLogUser,afterSignin:c})):1==e.needSmsTfa?(a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("smsValidatorPopup",{toLogUser:i.toLogUser,afterSignin:c,telPE:e.telPE})):c():(l.handle({data:{fieldErrors:[{page:"needCookiePot"}]}}),setTimeout(function(){n.location.reload()},4e3))},function(e){if(n.grecaptcha.reset(),e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++){if(e.data.fieldErrors[t].captcha&&(i.wrongCaptcha=!0),e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"==e.data.fieldErrors[t].smsLimitSmsExceeded){a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("accountBlockedPopup"),localStorage.setItem("tfaFailCount",0);break}if(e.data.fieldErrors[t].tfaCode&&"tfaFail"===e.data.fieldErrors[t].tfaCode){s();break}}})}},i.logout=function(){r.logout().then(function(){window.location.reload()})},i.isDisabled=!1,i.resendActivation=function(){console.log("hello"),r.account.resendActivation().then(function(){return i.activation||(i.activation={}),i.activation.sended=!0,!(i.isDisabled=!0)})},i.potCreationPopupLogin=function(e){function o(e){1==e.needGoogleTfa?(a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("googleValidatorPopup",{toLogUser:i.toLogUser,afterSignin:t})):1==e.needSmsTfa?(a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("smsValidatorPopup",{toLogUser:i.toLogUser,afterSignin:t,telPE:e.telPE})):t()}e.token=i.token,r.login(e).then(function(t){i.pot.promoCode?r.pot.promoCode.submitPromoCode(i.pot.promoCode).then(function(e){o(t)},function(e){}):o(t)},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++){if(e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"==e.data.fieldErrors[t].smsLimitSmsExceeded){a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("accountBlockedPopup"),localStorage.setItem("tfaFailCount",0);break}if(e.data.fieldErrors[t].tfaCode&&"tfaFail"===e.data.fieldErrors[t].tfaCode){s();break}}})},function(e,t){r.login(e).then(function(e){1==e.needGoogleTfa?(a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("googleValidatorPopup",{toLogUser:i.toLogUser,afterSignin:d})):1==e.needSmsTfa?(a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("smsValidatorPopup",{toLogUser:i.toLogUser,afterSignin:d,telPE:e.telPE})):d()},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++){if(e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"==e.data.fieldErrors[t].smsLimitSmsExceeded){a.hidePopupV2("lpcLoginSignupPopup"),a.showPopupV2("accountBlockedPopup"),localStorage.setItem("tfaFailCount",0);break}if(e.data.fieldErrors[t].tfaCode&&"tfaFail"===e.data.fieldErrors[t].tfaCode){s();break}}})});i.potCreationLoginFB=function(t){try{FB.login(function(e){e.authResponse&&(window.authResponse=e.authResponse,window.lpcLog("response "+JSON.stringify(e)),r.account.facebookConnect(JSON.stringify(e.authResponse)).then(function(e){i.isBot?(n.location.replace("".concat(i.botPot.redirectUri,"=").concat(i.botPot.accountLinkingToken,"&authorization_code=test")),t(i.botPot)):t()},function(e){if("askForAnEmail"==e.data.fieldErrors[0].fb)a.showPopup("facebookPop");else if(i.facebookError=!0,e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t in e.data.fieldErrors)!e.data.fieldErrors[t]||"notlogged"!=e.data.fieldErrors[t].person||o.cookieEnabled()||l.handle({data:{fieldErrors:[{page:"needCookiePot"}]}})}))},{scope:"email,user_birthday",return_scopes:!0})}catch(e){a.detectPrivateMode(function(e){document.getElementsByClassName("cannot-load-facebook-api-error-message")[0].innerHTML=void 0!==e&&e?n.fbCannotLoadMessage:""})}}}]),angular.module("lpc").controller("smsTfaController",["$window","Helper","ipCookie","$scope","$rootScope","ServerFunction","ErrorHandler",function(n,i,e,a,r,l,s){$(".tfa-popin__code__box").bind("keyup",function(e){handleCharacter.call(e.target,e)}),$(".tfa-popin__code__box").on("keydown",handleBackspace),a.login=function(t){if(null!=a.isPotCreationEditionPopup&&1==a.isPotCreationEditionPopup)a.potCreationPopupLogin(a.toLogUser);else if(a.isBot)lpcBotLoginAndPotCreation(a.toLogUser,a.botPot);else{if(void 0!==a.user.codeTfa){for(var e="",o=0;o<Object.keys(a.user.codeTfa).length;o++)e+=a.user.codeTfa[o];6!==e.length&&a.tfaCopiedCode&&(e=a.tfaCopiedCode),a.toLogUser.tfaCode=e}a.toLogUser.token=a.token,l.login(a.toLogUser).then(function(e){i.cookieEnabled()?!0===e.needSMSOrGoogleTfa||!0===e.needGoogleTfa?(r.hidePopupV2("lpcLoginSignupPopup"),r.showPopupV2("googleValidatorPopup",{toLogUser:a.toLogUser,afterSignin:reload})):!0===e.needSmsTfa?(r.hidePopupV2("lpcLoginSignupPopup"),r.showPopupV2("smsValidatorPopup",{toLogUser:a.toLogUser,afterSignin:reload,telPE:e.telPE})):t():(s.handle({data:{fieldErrors:[{page:"needCookiePot"}]}}),setTimeout(function(){n.location.reload()},4e3))},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++){if(e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"===e.data.fieldErrors[t].smsLimitSmsExceeded){r.hidePopupV2("lpcLoginSignupPopup"),r.showPopupV2("accountBlockedPopup"),localStorage.setItem("tfaFailCount",0);break}if(e.data.fieldErrors[t].tfaCode&&"tfaFail"===e.data.fieldErrors[t].tfaCode){n=void 0,null!==(n=localStorage.getItem("tfaFailCount"))?n++:n=0,localStorage.setItem("tfaFailCount",n),a.tfaFailCounted=3-(n+1),a.tfaFailCounted<=0&&(a.tfaFailCounted=0,r.hidePopupV2("lpcLoginSignupPopup"),r.showPopupV2("accountBlockedPopup"));break}}var n})}},a.smsCodeValidation=function(){l.smsCodeValidation(a.tfaCode).then(function(){s.handle({data:{fieldErrors:[{msgok:"tfaSuccess"}]}},!0),n.location.reload()})},a.resendSmsCodeValidation=function(){l.resendSmsCodeValidation(a.toLogUser.email).then(function(){s.handle({data:{fieldErrors:[{msgok:"smsSent"}]}},!0)},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)if(e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"==e.data.fieldErrors[t].smsLimitSmsExceeded){null==a.toLogUser?(r.hidePopupV2("initSmsPopup"),r.showPopupV2("doubleAuthNoActivatedPopup")):(r.hidePopupV2("lpcLoginSignupPopup"),r.showPopupV2("accountBlockedPopup"));break}})}}]),angular.module("lpc").controller("newsletterUnsuscribeController",["$window","ipCookie","$scope","$rootScope","ServerFunction",function(e,t,o,n,i){o.newsletterUnsuscribe=function(e,t){i.account.desabonnementValid(e,t)}}]),angular.module("lpc").controller("amazonItemsController",["$scope","ServerAdminFunction","Helper","$location","$rootScope","$timeout","$anchorScroll",function(a,r,l,e,t,o,n){function i(e){r.amazon.getRootCategoryCriterias(e).then(function(e){a.currentRootCategorySearchCriterias=e})}var s;l.handleTag.bindChange({nodes:2,itemDetails:3}),a.getRootCategories=function(){r.amazon.getRootCategories().then(function(e){s=l.handleTag.serachHash(),angular.equals({},s)||(window.location.hash="#/"),a.rootCategories=e,a.nodes=null,a.items=null,a.chemin=[],a.currentRootCategory=null,a.currentRootCategorySearchCriterias=null,a.criteriasValues={},a.currentItem=null,l.handleTag.resetPage()})},a.getAllDBCategories=function(){r.giftCategoriesBackOffice.getAllEnabledDBCategories().then(function(e){a.dbCategories=e,angular.forEach(a.dbCategories,function(e){e.root=!0})})},a.getItemCategoriesBelongIndices=function(e){r.giftBackOffice.getItemCategoriesBelongIndices(e).then(function(e){a.dbCategoriesBelongIndices=e})},a.displayItem=function(o){r.amazon.getAmazonItemDetails(o).then(function(e){for(var t in s=l.handleTag.serachHash())s.hasOwnProperty(t)&&"page"!==t&&delete s[t];s.itemASIN=o,window.location.hash="/?"+l.serializeData(s),a.currentItem=e,a.getAllDBCategories(),a.getItemCategoriesBelongIndices(a.currentItem.itemID),l.handleTag.changePage("itemDetails")})};a.selectRootCatgeory=function(e,t){a.currentRootCategory=e,i(e.searchIndex),a.getNodes(e.nodeId,t,!1)},a.getNodes=function(o,n,i){r.amazon.getNodes(o).then(function(e){for(var t in s=l.handleTag.serachHash())s.hasOwnProperty(t)&&"page"!==t&&delete s[t];if(s.nodeId=o,s.nodeLabel=n,s.searchIndex=a.currentRootCategory.searchIndex,window.location.hash="/?"+l.serializeData(s),a.nodes=e,i)for(a.currentItem=null;a.chemin[a.chemin.length-1].id!==o;)a.chemin.pop();else a.chemin||(a.chemin=[]),a.chemin.push({id:o,label:n});a.nodes&&l.handleTag.changePage("nodes")})},a.nbrItems={},a.nbrItems.nbrToShow=10,a.itemShow={},a.itemShow.show="all",a.criteriasValues={},a.numberItems=[10,20,50,100],"itemDetails"===(s=l.handleTag.serachHash()).page&&s.itemASIN?(t.page.index=3,a.displayItem(s.itemASIN)):"nodes"===s.page&&s.nodeId&&s.nodeLabel&&s.searchIndex?(t.page.index=2,a.currentRootCategory={},a.currentRootCategory.searchIndex=s.searchIndex,a.getNodes(s.nodeId,s.nodeLabel,!1),i(s.searchIndex)):a.getRootCategories(),a.getItemsInNode=function(e,t,o){r.amazon.getItemsInNode(e,t,o,a.nbrItems.nbrToShow,JSON.stringify(a.criteriasValues)).then(function(e){a.items=e})},a.persistAmazonItemWithCategoriesIndices=function(t,e){r.amazon.persistAmazonItemWithCategoriesIndices(t,e).then(function(e){t.existInDB=!0,r.showSuccessMsgSlider("Produit ajouté avec succès")})},a.insertOrUpdateItemCategoriesIndices=function(e,t){r.amazon.insertOrUpdateItemCategoriesIndices(e.asinIT,t).then(function(e){r.showSuccessMsgSlider("Indices de correspondance mis à jour")})}}]),angular.module("lpc").controller("manualGiftAddController",["$scope","ServerAdminFunction","Helper","$location","$rootScope","$timeout","$anchorScroll",function(o,n,e,t,i,a,r){o.getAllSellers=function(){n.giftBackOffice.getAllsellers().then(function(e){o.sellers=e})},o.getAllDBCategories=function(){n.giftCategoriesBackOffice.getAllEnabledDBCategories().then(function(e){o.dbCategories=e,angular.forEach(o.dbCategories,function(e){e.root=!0})})},o.getAllSellers(),o.getAllDBCategories(),o.item||(o.item={}),o.dbCategoriesBelongIndices||(o.dbCategoriesBelongIndices={}),o.submitItemCreation=function(){n.giftBackOffice.addItem(o.item,o.dbCategoriesBelongIndices).then(function(e){for(var t in o.item={descriptionIT:""},o.itemCreationForm.$setPristine(),o.dbCategoriesBelongIndices)o.dbCategoriesBelongIndices.hasOwnProperty(t)&&(o.dbCategoriesBelongIndices[t]=0);n.showSuccessMsgSlider("Produit ajouté avec succès")},function(e){window.location.hash="#",r()})},o.$watch("item.principalImageData",function(){o.image&&delete o.image.error}),o.getImageBase64FromUrl=function(e){n.giftBackOffice.getImageBase64FromUrl(e).then(function(e){o.item.principalImageData=e&&"null"!==e?e:void 0})}}]),angular.module("lpc").controller("sellersManageController",["$scope","ServerAdminFunction","Helper","$location","$rootScope","$timeout","$anchorScroll",function(t,o,n,e,i,a,r){t.sellers=window.sellers,delete window.sellers,angular.forEach(t.sellers,function(e){e.startDateISE=n.getDate(e.startDateISE),e.endDateISE=n.getDate(e.endDateISE)}),t.initSeller=function(e){e.editable||(e.editable=!1)},t.updateSeller=function(t){o.sellersBackOffice.updateSeller(t).then(function(e){o.showSuccessMsgSlider(t.nameISE+" mis à jour"),t.editable=!1})},t.newSeller=function(){t.sellers.unshift({editable:!0,new:!0,startDateISE:new Date})},t.addSeller=function(t){o.sellersBackOffice.addSeller(t).then(function(e){t.itemSellerID=e,t.new=!1,t.editable=!1,o.showSuccessMsgSlider(t.nameISE+" créé avec succès")})},t.deleteSeller=function(e){e=t.sellers.indexOf(e);t.sellers.splice(e,1)}}]),angular.module("lpc").controller("sellerItemsController",["$scope","ServerAdminFunction","Helper","$location","$rootScope","$timeout","$anchorScroll",function(e,t,o,n,i,a,r){e.seller=window.seller,delete window.seller,e.items=window.items,delete window.items,e.itemShow={},e.itemShow.show="all"}]),angular.module("lpc").controller("editItemController",["$scope","ServerAdminFunction","Helper","$location","$rootScope","$timeout","$anchorScroll",function(e,t,o,n,i,a,r){e.sellers=window.sellers,delete window.sellers,e.itemToEdit=window.item,delete window.item,e.dbCategoriesBelongIndices=window.dbCategoriesBelongIndices,delete window.dbCategoriesBelongIndices,e.dbCategories=window.dbCategories,delete window.dbCategories,e.submitItemEdit=function(){t.showSuccessMsgSlider("Mise à jour effectuée")}}]),angular.module("lpc").controller("itemEditController",["$scope","ServerAdminFunction","Helper","$location","$rootScope","$timeout","$anchorScroll",function(t,o,e,n,i,a,r){t.froalaOptions={toolbarSticky:!1,key:window.froalaLicenseKey,placeholderText:window.default_desc,heightMin:200,heightMax:257,theme:"custom",language:window.locale,pluginsEnabled:["image","table","lists","colors","video","lineBreaker","fontFamily","fontSize","link","emoticons","align"],toolbarButtons:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsMD:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsSM:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],toolbarButtonsXS:["bold","italic","underline","strikeThrough","|","fontFamily","align","fontSize","color","|","insertLink","insertImage","insertVideo","embedly","insertTable","|","emoticons","insertHR","|","undo","redo"],imageUploadURL:"/desc-image",imageUploadMethod:"POST",imageUploadParam:"upload",imageMaxSize:15728640,imageAllowedTypes:["jpeg","jpg","png"],videoInsertButtons:["videoBack","|","videoByURL"],videoResize:!0,events:{"froalaEditor.blur":function(){t.$broadcast("forala-editor-on-blur")},"froalaEditor.focus":function(){t.$broadcast("forala-editor-on-focus")}}},t.initialize=function(e){t.initControls=e,t.initControls.initialize(t.froalaOptions),t.deleteAll=function(){e.getEditor()("html.set","")}},t.submitItemEdit=function(){o.giftBackOffice.updateItem(t.$parent.itemToEdit,t.$parent.dbCategoriesBelongIndices).then(function(e){t.$parent.submitItemEdit&&t.$parent.submitItemEdit()})},t.getImageBase64FromUrl=function(e){o.giftBackOffice.getImageBase64FromUrl(e).then(function(e){t.$parent.itemToEdit.principalImageData=e&&"null"!==e?e:void 0})}}]),angular.module("lpc").controller("categoriesManagementController",["$scope","ServerAdminFunction","Helper","$location","$rootScope","$timeout","$anchorScroll",function(n,o,t,e,i,a,r){n.dbCategories=window.dbCategories,delete window.dbCategories,n.newRootCategory=function(){n.dbCategories.unshift({labelICA:"",objectiveICA:!1,disabledICA:!1,subCategories:[],editable:!0,new:!0,parentID:0})},n.addSubCategory=function(e){e.subCategories.unshift({labelICA:"",objectiveICA:!1,disabledICA:!1,subCategories:[],editable:!0,new:!0,parentID:e.itemCategoryID})},n.updateCategory=function(t){o.giftCategoriesBackOffice.updateCategory(t).then(function(e){t.editable=!1})},n.insertCategory=function(t){o.giftCategoriesBackOffice.insertCategory(t).then(function(e){t.new=!1,t.editable=!1,t.itemCategoryID=e})},n.deleteCategoryScope=function(e,t){var o;(null===e?(o=n.dbCategories.indexOf(t),n.dbCategories):(o=e.subCategories.indexOf(t),e.subCategories)).splice(o,1)},n.editCategory=function(e,t,o){!0===e.staticICA?alert("Cette catégorie ne doit pas être modifiée. Elle est nécessaire pour le moteur d'idées cadeau"):(e.parentID=t,e.parentLabel=o,n.selectedCategory=e,n.selectedCategoryCopy=angular.copy(e),i.showPopup("categoryEditPopup"))},n.selectParentCategory=function(e,t){n.selectedCategoryCopy.parentID=e,n.selectedCategoryCopy.parentLabel=t,n.showDialog2=!1},n.submitCategoryEdit=function(){o.giftCategoriesBackOffice.updateCategory(n.selectedCategoryCopy).then(function(e){n.selectedCategoryCopy.parentID!==n.selectedCategory.parentID&&o.giftCategoriesBackOffice.getAllDBCategories().then(function(e){n.dbCategories=e}),t.copyAttribute(n.selectedCategoryCopy,n.selectedCategory),n.selectedCategoryCopy=void 0,n.selectedCategory=void 0,i.hidePopup("categoryEditPopup")})}}]),angular.module("lpc").controller("categoriesMissingLinksManagementController",["$scope","ServerAdminFunction","Helper","$location","$rootScope","PopupHandler",function(t,o,e,n,i,a){t.dbCategories=window.dbCategories,delete window.dbCategories,t.categoriesMissingLinks=window.categoriesMissingLinks,delete window.categoriesMissingLinks,t.getEnabledItemNotHavingLinkWithCategory=function(e){t.itemsBelongIndices={},t.selectedCategory=e,o.giftCategoriesBackOffice.getEnabledItemsNotHavingLinkWithCategory(e.itemCategoryID).then(function(e){t.itemsMissingLink=e})},t.insertItemsLinkWithOneCategory=function(){o.giftCategoriesBackOffice.insertItemsLinkWithOneCategory(t.selectedCategory.itemCategoryID,t.itemsBelongIndices).then(function(e){a.hide("categoryMissingLinks"),t.itemsBelongIndices={},t.selectedCategory=void 0,t.itemsMissingLink=void 0})}}]),angular.module("lpc").controller("missingLinksByItemController",["$scope","ServerAdminFunction","Helper","$location","$rootScope","$timeout","$anchorScroll",function(o,t,e,n,i,a,r){o.items=window.items,delete window.items,o.dbCategories=window.dbCategories,delete window.dbCategories,o.itemShow={},o.itemShow.show="all",o.selectedItemDBCategoriesBelongIndices={},o.selectItem=function(e){o.selectedItem=e,e=e.itemID,t.giftCategoriesBackOffice.getEnabledCategoriesNotHavingLinkWithItem(e).then(function(e){o.categoriesToLink=e,i.showPopup("belongIndicesPopup")})},o.insertCategoriesBelongIndices=function(){t.giftCategoriesBackOffice.insertCategoriesBelongIndices(o.selectedItem.itemID,o.selectedItemDBCategoriesBelongIndices).then(function(e){o.categoriesToLink=void 0,i.hidePopup("belongIndicesPopup");var t=o.items.indexOf(o.selectedItem);o.items.splice(t,1),o.selectedItem=void 0,o.selectedItemDBCategoriesBelongIndices={}})}}]),angular.module("lpc").controller("itemsToUpdateController",["$scope","ServerAdminFunction","Helper","PopupHandler","$rootScope",function(n,t,e,o,i){n.items=window.items,delete window.items,n.sellers=window.sellers,delete window.sellers,n.sellers.unshift({itemSellerID:void 0,nameISE:"Tous les vendeurs"}),n.updateItemPrices=function(o){t.giftBackOffice.updateItemPrices(o).then(function(e){var t=n.items.indexOf(o);n.items.splice(t,1)})},n.editItem=function(e){n.itemToEdit=e,n.itemToEdit.updateNotValidLinkIT||(n.itemToEdit.itemPriceCorrected=!1),i.showPopup("itemEditPopup")},n.submitItemEdit=function(){var e;n.itemToEdit.updateNotValidLinkIT||void 0!==n.itemToEdit.itemPriceCorrected&&!0!==n.itemToEdit.itemPriceCorrected||(e=n.items.indexOf(n.itemToEdit),n.items.splice(e,1)),i.hidePopup("itemEditPopup"),n.itemToEdit=void 0,t.showSuccessMsgSlider("Mise à jour effectuée")}}]),angular.module("lpc").controller("statsNbrItemsPerCatController",["$scope","ServerAdminFunction","Helper","PopupHandler",function(e,t,o,n){e.minBelongIndice=window.minBelongIndice,delete window.minBelongIndice,window.operator?(e.operator=window.operator,delete window.operator):e.operator="eq"}]),angular.module("lpc").controller("giftItemsSearchController",["$scope","ServerAdminFunction","Helper","PopupHandler","$rootScope","ErrorHandler",function(o,t,e,n,i,a){o.selection={},o.selection.searchKeyword="",o.selection.searchUrl="",o.sellers=window.sellers,delete window.sellers,o.sellers.unshift({itemSellerID:0,nameISE:"Tous les vendeurs"}),o.categories=window.categories,delete window.categories,o.categories.unshift({itemCategoryID:0,labelICA:"Tous les univers"}),o.sexes=window.sexes,delete window.sexes,o.sexes.unshift({itemSexeID:0,labelICA:"Tous les sexes"}),o.occasions=window.occasions,delete window.occasions,o.occasions.unshift({itemOccasionID:0,labelICA:"Toutes les occasions"}),o.ages=window.ages,delete window.ages,o.ages.unshift({itemAgeID:0,labelICA:"Tous les ages"}),o.itemShow={},o.itemShow.show="",window.selectedSellerID?(o.selection.searchSellerID=window.selectedSellerID,delete window.selectedSellerID):o.selection.searchSellerID=0,window.selectedCategoryID?(o.selection.searchCategoryID=window.selectedCategoryID,delete window.selectedCategoryID):o.selection.searchCategoryID=0,window.selectedAgeID?(o.selection.searchAgeID=window.selectedAgeID,delete window.selectedAgeID):o.selection.searchAgeID=0,window.selectedOccasionID?(o.selection.searchOccasionID=window.selectedOccasionID,delete window.selectedOccasionID):o.selection.searchOccasionID=0,window.selectedSexeID?(o.selection.searchSexeID=window.selectedSexeID,delete window.selectedSexeID):o.selection.searchSexeID=0,window.items&&(o.items=window.items,delete window.items),o.deleteItem=function(e){t.giftBackOffice.deleteItem(e).then(function(e){t.giftBackOffice.searchItems(o.selection.searchKeyword.trim(),o.selection.searchUrl,o.selection.searchSellerID,o.selection.searchOccasionID,o.selection.searchCategoryID,o.selection.searchSexeID,o.selection.searchAgeID).then(function(e){o.items=e})})},o.searchItems=function(){t.giftBackOffice.searchItems(o.selection.searchKeyword.trim(),o.selection.searchUrl,o.selection.searchSellerID,o.selection.searchOccasionID,o.selection.searchCategoryID,o.selection.searchSexeID,o.selection.searchAgeID).then(function(e){o.items=e})},o.$watch("selection",function(e,t){e!==t&&o.searchItems()},!0),o.editItem=function(e){o.itemToEdit=e,t.giftCategoriesBackOffice.getAllDBCategories().then(function(e){o.dbCategories=e}),t.giftBackOffice.getItemCategoriesBelongIndices(o.itemToEdit.itemID).then(function(e){o.dbCategoriesBelongIndices=e}),i.showPopup("itemEditPopup")},o.submitItemEdit=function(){i.hidePopup("itemEditPopup"),o.itemToEdit=void 0,o.dbCategories=void 0,o.dbCategoriesBelongIndices=void 0,t.showSuccessMsgSlider("Mise à jour effectuée")}}]),angular.module("lpc").controller("bonusLPCManageController",["$scope","ServerAdminFunction","Helper","PopupHandler","$rootScope",function(o,t,e,n,i){o.items=window.items,delete window.items,o.sellers=window.sellers,delete window.sellers,o.sellers.unshift({itemSellerID:0,nameISE:"Tous les vendeurs"}),o.selection={},o.selection.sellerID=0,o.selection.belongIndice=0,o.selection.operator=">=",o.selection.itemsCondition="all",o.updateBelongIndices={},o.searchItems=function(){t.giftBackOffice.bonusLPCManageSearchItems(o.selection).then(function(e){o.updateBelongIndices={},o.items=e})},o.$watch("selection",function(e,t){e!==t&&o.searchItems()},!0),o.isEmpty=function(e){return 0===Object.keys(e).length},o.updateBonusLpcBelongIndices=function(){o.isEmpty(o.updateBelongIndices)||t.giftBackOffice.bonusLPCUpdateItemsBelongIndices(o.updateBelongIndices).then(function(e){o.updateBelongIndices={},t.showSuccessMsgSlider("Mise à jour effectuée")})},o.editItem=function(e){o.itemToEdit=e,t.giftCategoriesBackOffice.getAllDBCategories().then(function(e){o.dbCategories=e}),t.giftBackOffice.getItemCategoriesBelongIndices(o.itemToEdit.itemID).then(function(e){o.dbCategoriesBelongIndices=e}),i.showPopup("itemEditPopup")},o.submitItemEdit=function(){i.hidePopup("itemEditPopup"),o.itemToEdit=void 0,o.dbCategories=void 0,o.dbCategoriesBelongIndices=void 0,t.showSuccessMsgSlider("Mise à jour effectuée")}}]),angular.module("lpc").controller("giftIdeaController",["$scope","ServerFunction","ServerAdminFunction","Helper","$location","$rootScope","$timeout","$anchorScroll","$sce",function(a,o,n,e,t,i,r,l,s){a.uniqPO=window.uniqPO,delete window.uniqPO,a.occasions=window.occasions,delete window.occasions,angular.forEach(a.occasions,function(e,t){e.text=window.OCCASIONOTLABELS[e.url.toUpperCase()]}),a.passions=window.passions,delete window.passions,angular.forEach(a.passions,function(e,t){e.labelICA=window.PASSIONTLABELS[e.labelICA]}),a.sexes=window.sexes,delete window.sexes,angular.forEach(a.sexes,function(e,t){e.labelICA=window.SEXLABELS[e.labelICA]}),a.selection={},a.selection.sex=window.selectedSexe,delete window.selectedSexe,a.selection.age=window.selectedAge,delete window.selectedAge,void 0!==window.selectedOccasion?(a.selection.occasion=window.selectedOccasion,delete window.selectedOccasion):a.selection.occasion=angular.copy(a.occasions[0]),a.nbrProductsPerOffset=28,a.hideShowMoreIdeas=!1,a.loadingItems=!1,void 0!==window.items&&(a.items=window.items,delete window.items,a.items.length<a.nbrProductsPerOffset)&&(a.hideShowMoreIdeas=!0),a.offset=0,a.checkAdress=function(){o.pot.invite.checkAdress(a.person.emailPE).then(function(e){e.is_valid?a.propablyWrongMail=!1:a.propablyWrongMail=!0},function(e){a.propablyWrongMail=!1})},a.showMoreItems=function(){a.offset=a.offset+a.nbrProductsPerOffset,a.testGetBestMarkedItems()},void 0!==window.amountToReachPO?(a.selection.budget=window.amountToReachPO,delete window.amountToReachPO):a.selection.budget="0;800",a.options={from:0,to:2e3,step:1,dimension:" €",css:{background:{"background-color":"#62585f"},before:{"background-color":"#39be9d"},default:{"background-color":"rgba(255, 255, 255, 0)"},after:{"background-color":"#39be9d"},pointer:{"background-color":"#ffffff"}}},a.selection.passions=[],a.selectionItems={},a.selectionItems.items=[],a.getBestMarkedItems=function(){n.giftIdea.getBestMarkedItems(a.selection.passions).then(function(e){a.items=e})},a.getBestMarkedItems2=function(){n.giftIdea.getBestMarkedItems2(a.selection).then(function(e){a.items=e})},a.getBestMarkedItems3=function(){n.giftIdea.getBestMarkedItems3(a.selection).then(function(e){a.items=e})},a.getBestMarkedItems4=function(){n.giftIdea.getBestMarkedItems4(a.selection).then(function(e){a.items=e})},a.getBestMarkedItemsV1=function(){n.giftIdea.getBestMarkedItemsV1(a.selection).then(function(e){a.items=e})},a.getBestMarkedItemsV2=function(){n.giftIdea.getBestMarkedItemsV2(a.selection).then(function(e){a.items=e})},a.getBestMarkedItemsV3=function(){n.giftIdea.getBestMarkedItemsV3(a.selection).then(function(e){a.items=e})},a.getBestMarkedItemsAlpha=function(){n.giftIdea.getBestMarkedItemsAlpha(a.selection).then(function(e){a.items=e})},a.getBestMarkedItemsBeta=function(){n.giftIdea.getBestMarkedItemsBeta(a.selection).then(function(e){a.items=e})},a.getBestMarkedItemsBeta2=function(){n.giftIdea.getBestMarkedItemsBeta2(a.selection).then(function(e){a.items=e})},a.getBestMarkedItemsBeta2_1=function(){n.giftIdea.getBestMarkedItemsBeta2_1(a.selection).then(function(e){a.items=e})},a.getBestMarkedItemsBeta2_2=function(){a.loadingItems=!0,n.giftIdea.getBestMarkedItemsBeta2_2(a.selection,a.offset).then(function(e){0<e.length?(e.length<a.nbrProductsPerOffset&&(a.hideShowMoreIdeas=!0),0===a.offset?a.items=e:a.items=a.items.concat(e)):a.hideShowMoreIdeas=!0,a.loadingItems=!1})},a.getBestMarkedItemsBeta2_3=function(){a.loadingItems=!0,a.selection.age&&(a.selection.age=(a.selection.age+"").replace(/\D+/g,"")),n.giftIdea.getBestMarkedItemsBeta2_3(a.selection,a.offset).then(function(e){0<e.length?(e.length<a.nbrProductsPerOffset&&(a.hideShowMoreIdeas=!0),0===a.offset?a.items=e:a.items=a.items.concat(e)):a.hideShowMoreIdeas=!0,a.loadingItems=!1})},a.getBestMarkedItemsBetaDataMining=function(){n.giftIdea.getBestMarkedItemsDataMining(a.selection,a.offset).then(function(e){a.items=e})},a.version="beta2_3",a.testGetBestMarkedItems=function(){switch(a.selectionItems.items=[],a.version){case"1":a.getBestMarkedItems();break;case"2":a.getBestMarkedItems2();break;case"3":a.getBestMarkedItems3();break;case"4":a.getBestMarkedItems4();break;case"v1":a.getBestMarkedItemsV1();break;case"v2":a.getBestMarkedItemsV2();break;case"v3":a.getBestMarkedItemsV3();break;case"alpha":a.getBestMarkedItemsAlpha();break;case"beta":a.getBestMarkedItemsBeta();break;case"beta2":a.getBestMarkedItemsBeta2();break;case"beta2_1":a.getBestMarkedItemsBeta2_1();break;case"beta2_2":a.getBestMarkedItemsBeta2_2();break;case"beta2_3":a.getBestMarkedItemsBeta2_3();break;case"data_mining":a.getBestMarkedItemsBetaDataMining()}};function c(){void 0!==a.uniqPO&&a.addItemsToKitty()}a.updateUrl=window.updateUrl,delete window.updateUrl,a.$watch("selection",function(e,t){if(e!==t){if(a.updateUrl){var o=a.ideaPrefix+" ",n=window.url;if(0<a.selection.occasion.value&&(n+="/"+a.selection.occasion.url.split(" ").join("-").toLowerCase(),o=o+a.selection.occasion.text.toLowerCase()+" "),void 0!==a.selection.sex)for(var i=0;i<a.sexes.length;i++)if(a.selection.sex===a.sexes[i].itemCategoryID){n+="/"+a.sexes[i].labelICA.toLowerCase(),o=o+a.sexes[i].labelICA.toLowerCase()+" ";break}0<a.selection.age&&(18===parseInt(a.selection.age)?n+="/18ans":n+="/"+((e=parseInt(a.selection.age)%5)<=2?parseInt(a.selection.age)-e:parseInt(a.selection.age)+5-e)+"ans"),document.title=o.trim(),window.history.pushState("",window.document.title,n),a.title=o}a.items=[],a.offset=0,a.hideShowMoreIdeas=!1,a.testGetBestMarkedItems()}},!0),a.getItemLinksDetails=function(e){a.selectedItem=e,n.giftIdea.getItemLinksDetails(e.itemID).then(function(e){a.linksSexe=e.sexe,a.linksAge=e.age,a.linksOccasion=e.occasion,a.linksUnivers=e.passion,i.showPopup("itemBelongIndices")})},a.testIfAgeInInterval=function(e,t){var o=t.substring(0,t.indexOf("-")),t=t.substring(t.indexOf("-")+1);return e>=parseInt(o)&&e<=parseInt(t)},e.handleTag.bindChange({login:1}),e.handleTag.resetPage(),a.isLoggedPerson=window.isLoggedPerson,delete window.isLoggedPerson,a.selectionPots={},a.addItem=function(e){a.selectionItems.items.push(e),a.submitItemsChoice()},a.submitItemsChoice=function(){0<a.selectionItems.items.length&&void 0!==a.uniqPO?(a.isLoggedPerson?a.addItemsToKitty():e.handleTag.changePage("login"),$("html, body").animate({scrollTop:0},0)):void 0===a.uniqPO&&(window.location=a.urlCreatePot)},a.login=function(){if(void 0!==a.toLogUser.tfaCode){for(var e="",t=0;t<Object.keys(a.toLogUser.tfaCode).length;t++)e+=a.toLogUser.tfaCode[t];a.toLogUser.tfaCode=e}a.toLogUser.token=a.token,o.login(a.toLogUser).then(function(e){1==e.needGoogleTfa?(i.hidePopupV2("lpcLoginSignupPopup"),i.showPopupV2("googleValidatorPopup",{toLogUser:a.toLogUser,afterSignin:c})):1==e.needSmsTfa?(i.hidePopupV2("lpcLoginSignupPopup"),i.showPopupV2("smsValidatorPopup",{toLogUser:a.toLogUser,afterSignin:c,telPE:e.telPE})):c()},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)if(e.data.fieldErrors[t].smsLimitSmsExceeded&&"smsLimitExceeded"==e.data.fieldErrors[t].smsLimitSmsExceeded){i.hidePopupV2("lpcLoginSignupPopup"),i.showPopupV2("accountBlockedPopup");break}})},a.addItemsToKitty=function(){var e;0<a.selectionItems.items.length&&void 0!==a.uniqPO&&(e=[],void 0!==a.selection.sex&&e.push(a.selection.sex),0!==a.selection.occasion.value&&e.push(a.selection.occasion.value),0<a.selection.passions.length&&(e=e.concat(a.selection.passions)),n.giftIdea.addItemsToKitties(a.selectionItems.items,a.uniqPO,e,a.selection.age).then(function(e){void 0!==a.uniqPO&&(window.location=a.urlIdeabox)}))},a.showItemDetails=function(e){var t;a.selectedItem=e,a.selectedItemDescription=s.trustAsHtml(e.descriptionIT),i.showPopup("itemDescriptionPopup"),e=e.itemID,t=[],void 0!==a.selection.sex&&t.push(a.selection.sex),0!==a.selection.occasion.value&&t.push(a.selection.occasion.value),0<a.selection.passions.length&&(t=t.concat(a.selection.passions)),n.giftIdea.incrementItemClicksNumber(e,t,a.selection.age)};a.editItem=function(e){void 0===a.sellers&&n.giftBackOffice.getAllsellers().then(function(e){a.sellers=e}),void 0===a.dbCategories&&n.giftCategoriesBackOffice.getAllEnabledDBCategories().then(function(e){a.dbCategories=e}),a.itemToEdit=e,n.giftBackOffice.getItemCategoriesBelongIndices(a.itemToEdit.itemID).then(function(e){a.dbCategoriesBelongIndices=e}),i.showPopup("itemEditPopup")},a.submitItemEdit=function(){i.hidePopup("itemEditPopup"),a.itemToEdit=void 0,a.dbCategories=void 0,a.dbCategoriesBelongIndices=void 0,n.showSuccessMsgSlider("Mise à jour effectuée")}}]),angular.module("lpc").controller("newsletterController",["$scope","ServerFunction",function(t,o){t.twitterText=window.twitterText,delete window.twitterText,t.submitRegister=function(e){o.newsletter.registerCamilleVirgin(e,t.person)}}]),angular.module("lpc").controller("formPageController",["$scope","$rootScope","$controller","ServerFunction","Helper",function(o,e,t,n,i){angular.extend(this,t("lpcGameCommonController",{$scope:o})),o.partnersNumberSlider={value:1,options:{floor:1,ceil:6,translate:function(e){return 6==e?"6+":e},showTicks:!1,showTicksValues:!0,showSelectionBar:!0,getSelectionBarColor:function(e){return"#7b11aa"}}},o.getImageStyle=function(){return o.request&&o.request.eventPhoto?{"background-image":"url('"+o.request.eventPhoto+"')"}:{}},o.getEventImage=function(e){return e||"/static/img/marketing/default-image.png?h=hash"};function a(e){if(!e)return 0;var t,o=0;for(t in e)1==e[t]&&o++;return o}o.correctPartnersNumberSelected=function(e){return!(!e||!o.request)&&(e<6?e==a(o.request.eventPartners):a(o.request.eventPartners)<=10&&5<=a(o.request.eventPartners))},o.correctAccessoriesNumberSelected=function(e){return!(!e||!o.request)&&e==a(o.request.eventBagContents)},o.isAtLeastTwoActivitiesSet=function(){if(!o.request||!o.request.eventActivities)return!1;var e,t=0;for(e in o.request.eventActivities)o.request.eventActivities[e]&&o.request.eventActivities[e].length&&t++;return 2<=t},o.shouldDisablePartner=function(e,t){return!angular.element("#"+t).is(":checked")&&(t=o.request?a(o.request.eventPartners):0,e<6?t==e:10==t)},o.shouldDisableBagContent=function(e,t){return!angular.element("#"+t).is(":checked")&&(o.request?a(o.request.eventBagContents):0)==e},o.submitStepOne=function(){i.handleTag.changePage("page2")},o.submitStepTwo=function(){o.submitting=!1,o.requestToBeSent={},angular.copy(o.request,o.requestToBeSent),o.requestToBeSent.partnersCount=o.requestToBeSent.partnersCount||o.partnersNumberSlider.value,o.requestToBeSent.drinkingLevel=o.drinkingSlider.value,o.requestToBeSent.ageRange=o.ageRangeSlider.value||0,o.requestToBeSent.eventPartners=JSON.stringify(o.requestToBeSent.eventPartners),o.requestToBeSent.eventBagContents=JSON.stringify(o.requestToBeSent.eventBagContents),o.requestToBeSent.eventActivities=JSON.stringify(o.requestToBeSent.eventActivities),n.lpcGameFormSubmit(o.requestToBeSent).then(function(e){o.submitting=!1})},i.handleTag.bindChange({page1:0,page2:1}),i.handleTag.changePage("page1")}]),angular.module("lpc").controller("sociosSubscriptionChoiceController",["$scope","$rootScope","$controller","Helper","ServerFunction",function(o,e,t,n,i){window&&window.subscriptionModels&&(o.subscriptionModels=window.subscriptionModels),window&&window.maxAmount&&(o.maxParticipationAmount=Number(window.maxAmount.replace(/,/g,".").replace(/\s/g,""))),o.round=function(e){return Math.round(e)},o.allFreeSubscriptions=function(){if(!o.activeSubscriptionModels||!o.activeSubscriptionModels.length)return!1;for(var e=0;e<o.activeSubscriptionModels.length;e++)if(2!=o.activeSubscriptionModels[e].subscriptionType)return!1;return!0},o.getCardStyle=function(e){return{"background-image":"url('/static/plateforms/massilia-socios-club/img/contents/socios-"+e.type.toLowerCase()+".png?h=hash"}},o.sociosBirthOptions={hideIfNoPrevNext:!0,defaultDate:"-20y -1d",changeYear:!0,changeMonth:!0,yearRange:"1915:2016"},o.calculateTotal=function(){var t=0;return o.subscriptionModels&&(o.subscriptionModels.forEach(function(e){t+=e.promotionEntryPrice*e.count}),o.setActiveSubscriptionModels(),o.request)&&o.request.additionalContribution&&!isNaN(o.request.additionalContribution)?t+Number(o.request.additionalContribution):t},o.calculateSubscriptionsTotal=function(){var t=0;return o.subscriptionModels&&o.subscriptionModels.forEach(function(e){t+=e.promotionEntryPrice*e.count}),t},o.calculateSubscriptionsOriginalTotal=function(){var t=0;return o.subscriptionModels&&o.subscriptionModels.forEach(function(e){t+=e.originalEntryPrice*e.count}),t},o.$on("lpc-counter-changer-refresh-controller",function(){o.$broadcast("lpc-counter-changer-refresh-directives")}),o.$watch("request.additionalContribution",function(){o.request&&o.request.additionalContribution&&o.calculateTotal()>o.maxParticipationAmount&&(o.request.additionalContribution-=o.calculateTotal()-o.maxParticipationAmount),o.$broadcast("lpc-counter-changer-refresh-directives")}),o.changeTitles=function(){"undefined"!=typeof PAGE_TITLES&&(o.titleDisplay=PAGE_TITLES[e.page.index].titleDisplay,o.titleDisplayDesc=PAGE_TITLES[e.page.index].titleDisplayDesc,window.document.title=PAGE_TITLES[e.page.index].title)},n.handleTag.bindChange({"participation-step-1":1,"participation-step-2":2,"participation-step-3":3}),n.handleTag.resetPage(),n.handleTag.changePage("participation-step-1"),o.goToStep3=function(){n.handleTag.changePage("participation-step-3")},o.goToStep2=function(){o.setActiveSubscriptionModels(),n.handleTag.changePage("participation-step-2"),setTimeout(function(){$("html, body").animate({scrollTop:0})},10)},o.backToStep1=function(){o.request&&(o.request.entries=void 0,o.request.payerFirstName=void 0,o.request.payerLastName=void 0,o.request.payerEmail=void 0),o.agreement=void 0,o.stepTwoForm.$setValidity(),o.stepTwoForm.$setPristine(),o.stepTwoForm.$setUntouched(),n.handleTag.changePage("participation-step-1")},o.backToStep2=function(){n.handleTag.changePage("participation-step-2")},angular.element(window).on("hashchange",function(e){o.changeTitles(),o.$apply()}),o.setActiveSubscriptionModels=function(){o.activeSubscriptionModels=[],angular.forEach(o.subscriptionModels,function(e){0<e.count&&o.activeSubscriptionModels.push(e)}),o.activeSubscriptionModels.sort(function(e,t){return t.count-e.count})},o.getNumber=function(e){return new Array(e)},o.prepareRequest=function(){o.request||(o.request={});for(var e=0;e<o.activeSubscriptionModels.length;e++)if(0<o.activeSubscriptionModels[e].count)for(var t=0;t<o.activeSubscriptionModels[e].count;t++)o.request.entries&&o.request.entries[e][t]&&(o.request.entries[e][t].type=o.activeSubscriptionModels[e].type)},o.submitNewCaddieForm=function(e){o.prepareRequest(),o.request.isPro=e,i.plateforms.massiliaSociosClub.newCaddie(o.request).then(function(e){o.goToStep3(),o.payment={},o.payment.href=e.cardPayment.href,setTimeout(function(){o.$broadcast("lpc-payment-iframe-ready",{href:e.cardPayment.href})},0)})}}]),angular.module("lpc").controller("cookiesController",["Helper","$scope","ipCookie","ServerFunction","$window","$rootScope","ErrorHandler",function(e,t,o,n,i,a,r){t.deleteCookie=function(e){n.account.removeCookie(e).then(function(){})},t.cookieManage=a.cookiesChoices,t.submitOnManageCookie=function(){!0!==t.cookieManage.functional&&(t.cookieManage.functional=!0),!0!==t.cookieManage.analytics&&(t.cookieManage.analytics=!1),!0!==t.cookieManage.social&&(t.cookieManage.social=!1),!0!==t.cookieManage.technical&&(t.cookieManage.technical=!1),n.account.manageCookie(t.cookieManage).then(function(){r.handle({data:{fieldErrors:[{msgok:"editSuccess"}]}},!0),a.hidePopupV2("cookiesManageForm")})},t.logout=function(){o.remove("lpc-cookie",{path:"/"}),i.location.reload()};window.location.href===window.location.origin+"/utilisation-des-cookies"&&$(".cookies-manage-popin").hide(),$(".cookies-card__checkbox");t.personalizeCookie=function(){$(".personalize").on("click",function(){$(".cookies-manage-popin").hide()})},t.uncheckAll=function(){n.account.refuseAllCookies().then(function(){r.handle({data:{fieldErrors:[{msgok:"editSuccess"}]}},!0),t.cookieManage.technical=!1,t.cookieManage.social=!1,t.cookieManage.analytics=!1,t.$apply(),$(".cookies-manage-popin").hide()})},t.checkAll=function(){n.account.acceptAllCookies().then(function(){r.handle({data:{fieldErrors:[{msgok:"editSuccess"}]}},!0),t.cookieManage.technical=!0,t.cookieManage.social=!0,t.cookieManage.analytics=!0,t.$apply(),$(".cookies-manage-popin").hide()})}}]),angular.module("lpc").controller("kycIframeController",["$scope","ServerFunction","$window",function(i,a,r){i.showParentPopup=function(e,t,o){var n,i=window.parent.angular.element(window.frameElement).scope().$parent.$root;o&&t&&((n=window.parent.angular.element(window.frameElement).scope()).popupData={documentName:o,action:function(){r.location=t,i.hidePopup(e)}},n.$$phase||n.$apply()),i.showPopup(e)},i.adressformSubmit=function(){a.account.address.edit(i.person.addressStreetPE,i.person.addressZipCodePE,i.person.addressCityPE,i.person.countryPE).then(function(){i.editingAddress=!1})},i.changePaperCustomName=function(e,t,o){console.log(r.top.angular.element("body").scope());var n=r.top.angular.element("body").scope();n.$broadcast("show-lpc-material-progress-bar"),a.account.kyc.editCustomKycName(e,t).then(function(e){i[o]=!1,n.$broadcast("hide-lpc-material-progress-bar")})},i.displayPicture=function(e,t){window.parent.angular.element("#kycFrame").trigger("kyc",[e,t])}}]),angular.module("lpc").controller("feesController",["$scope",function(e){}]),angular.module("lpc").controller("DashboardParticipantsController",["$scope","ServerFunction","$rootScope",function(o,t,e){o.pots=window.pots,o.showParticipationList=function(e){t.pot.fetchInvites(e).then(function(e){o.invites=e},function(e){0})},o.editPot=function(t){o.pot=_.filter(o.pots,function(e){return e.uniqPO==t})[0],e.$broadcast("edit-pot-with-popup",o.pot),e.showPopupV2("potCreationEdition")}}]),angular.module("lpc").controller("partnersAndExplanationController",["$rootScope","$scope","$window","ServerFunction","$filter","$location",function(e,n,t,i,a,o){switch(n.all="",window.lpcUserLocale){case"FR":n.all="Tous";break;case"EN":n.all="All";break;case"DE":n.all="Alle";break;case"ES":n.all="Todos";break;case"IT":n.all="Tutti"}n.allCategories={partnerCategoryID:-1,namePC:n.all},n.selectAllCategories=!0,n.partners=[],n.monthPartners=[],n.filterByStateMobile=[],n.filterCanApplyMobile=!1,n.filterBy=[],i.pot.partners.getPartners(window.uniqPO).then(function(e){n.data=e.data,n.partners=n.data.partners,n.monthPartners=n.data.monthPartners;var e=new URLSearchParams(window.location.search),o=Object.fromEntries(e.entries());o.partnerCategory&&i.pot.partners.getAllPartnersCategories().then(function(e){var t=a("filter")(e.data,{nameKeyPC:o.partnerCategory});void 0===t||-1===t.partnerCategoryID?(n.filterBy=[],n.selectAllCategories=!0,n.partners=a("partnerByCategories")(n.data.partners,n.filterBy),n.filterCanApplyMobile=!0,$(window).trigger("scroll")):(n.filterBy.some(function(e){return e.partnerCategoryID===t.partnerCategoryID})?n.remove(n.filterBy,t):n.filterBy.push(t),0===n.filterBy.length?n.selectAllCategories=!0:n.selectAllCategories=!1,n.partners=a("partnerByCategories")(n.data.partners,t),n.filterCanApplyMobile=!0,$(window).trigger("scroll"),n.selected=function(e){return e.nameKeyPC===o.partnerCategory})})},function(e){}),i.pot.partners.getAllPartnersCategories().then(function(e){n.partnersCategories=e.data},function(e){}),n.pastilleVisibility=function(){return 0<n.filterBy.length?"visible":"hidden"},n.openMobilePartnersFilterModal=function(){$("#partnersFilterModal").fadeIn("slow"),angular.element("body").css({"overflow-y":"hidden"}),n.filterByStateMobile=n.filterBy.slice(),n.filterCanApplyMobile=!1},n.closeAndApplyMobilePartnersFilterModal=function(){$("#partnersFilterModal").fadeOut("slow"),angular.element("body").css({"overflow-y":"scroll"})},n.canceleMobilePartnersFilterModal=function(){$("#partnersFilterModal").fadeOut("slow"),angular.element("body").css({"overflow-y":"scroll"}),angular.forEach(n.filterBy,function(e,t){e=angular.element(document.getElementById("partner_"+e.partnerCategoryID));$(e).removeClass(),$(e).addClass("category-checkbox")}),angular.forEach(n.filterByStateMobile,function(e,t){e=angular.element(document.getElementById("partner_"+e.partnerCategoryID));$(e).removeClass(),$(e).addClass("category-selected-checkbox")}),n.filterBy=n.filterByStateMobile.slice(),0===n.filterBy.length?n.selectAllCategories=!0:n.selectAllCategories=!1,n.partners=a("partnerByCategories")(n.data.partners,n.filterBy),n.filterCanApplyMobile=!1},angular.element(t).bind("resize",function(){767<t.innerWidth&&t.displayFilterDesktop&&(n.filterToggled=!0),n.$digest()}),n.openFilter=function(e){0!=e&&null!=e||(n.filterToggled=!0)},n.closeFilter=function(e,t){1==e&&(n.filterToggled=!1,t.stopPropagation())},n.getPartnerURL=function(e){if(1===n.countAttr(n.data))return e.urlPAR;if(null!=e.urlNamePAR)return"/pot/"+window.uniqPO+"/creer-une-e-carte-cadeau-"+e.urlNamePAR;if(e.voucherPartner)return e.relativeUrlVP;switch(e.descriptionKeyPAR){case"amazon_desc":return n.data.amazonRelativeUrl;case"decathlon_desc":return n.data.decathlonRelativeUrl;case"clickandgift_desc":return n.data.clickAndGiftRelativeUrl;case"beinsportsconnect_desc":return n.data.beinRelativeUrl;case"printemps_deposit":return n.data.printempsRelativeUrl;case"printemps_voyages_deposit":return n.data.printempsVoyagesRelativeUrl;case"citadium_deposit":return n.data.citadiumRelativeUrl;case"zalando_desc":return n.data.zalandoRelativeUrl;default:return"/pot/"+window.uniqPO+"/partenaire/"+n.getPartnerNameFromDescKey(e.descriptionKeyPAR)}},n.getPartnerNameFromDescKey=function(e){var t=e.indexOf("_");return e.substring(0,t)},n.getTarget=function(e){return null!=n.data.amazonRelativeUrl&&"amazon_desc"===e.descriptionKeyPAR||null!=n.data.decathlonRelativeUrl&&"decathlon_desc"===e.descriptionKeyPAR||null!=n.data.decathlonRelativeUrl&&"beinsportsconnect_desc"===e.descriptionKeyPAR?"_self":"_blank"},n.updateFilterBy=function(t){void 0===t||-1===t.partnerCategoryID?(n.filterBy=[],n.selectAllCategories=!0,n.partners=a("partnerByCategories")(n.data.partners,n.filterBy),n.filterCanApplyMobile=!0,$(window).trigger("scroll")):(n.filterBy.some(function(e){return e.partnerCategoryID===t.partnerCategoryID})?n.remove(n.filterBy,t):n.filterBy.push(t),0===n.filterBy.length?n.selectAllCategories=!0:n.selectAllCategories=!1,n.partners=a("partnerByCategories")(n.data.partners,n.filterBy),n.filterCanApplyMobile=!0,$(window).trigger("scroll"),n.$apply())},n.remove=function(e,t){t=e.indexOf(t);e.splice(t,1)},n.countAttr=function(e){var t,o=0;for(t in e)o++;return o}}]),angular.module("lpc").controller("emailChangeConfirmationController",["$scope","ServerFunction","Helper","$sce","$location","$rootScope","$timeout","$window",function(i,t,e,o,n,a,r,l){i.isWaitingForServer=!0,i.initEmailChangeConfirm=function(e,n){i.uniqPO=n,i.confirmationUniq=e,t.account.updateEmailConfirmation(e).then(function(e){i.isWaitingForServer=!1,i.okServer=!0,r(function(){l.location.href="/"},5e3)},function(e){if(e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length)for(var t=0,o=e.data.fieldErrors.length;t<o;t++)e.data.fieldErrors[t].page&&"insufficient-funds"==e.data.fieldErrors[t].page&&r(function(){l.location.href=n},2e3);i.isWaitingForServer=!1,i.okServer=!1})}}]),angular.module("lpc").controller("jeuxConcoursController",["$scope","ServerFunction","Helper","$sce","$location","$rootScope","$timeout","$window",function(e,t,o,n,i,a,r,l){e.resetBanner=function(){angular.element("html,body").find(".reset").on("click",function(){$(".jeu-banner").toggleClass("hidden")})}}]),angular.module("lpc").controller("osflm2020Controller",["$scope","ServerFunction","Helper","$sce","$location","$rootScope","$timeout","$window",function(o,n,e,t,i,a,r,l){o.signalPotToAdmin=function(){n.sendOsflmResult(o.person.lastName,o.person.firstName,o.person.email,o.person.phoneNumber,o.person.question1,o.person.question2,o.person.question3,o.person.question4,o.person.question5).then(function(){o.person.lastName="",o.person.firstName="",o.person.email="",o.person.phoneNumber="",o.person.question1="",o.person.question2="",o.person.question3="",o.person.question4="",o.person.question5="",o.osflm2020Form.$setPristine(!0)})};var s=$(".next-button5"),c=(null!==s&&s.on("click",function(e){s.hasClass("enable-button")?($("#drink-00").attr("src","/static/app/assets/build/img/marketing/osflm-2020/items/drink/drink-02@3x.png?h=hash").css("animation","pulse-oflm 2s ease-in-out both"),window.location=this.href):(e.preventDefault(),o.$apply(function(){o.unvalidQ3=!0}))}),$(".next-button1")),d=(null!==c&&c.on("click",function(e){c.hasClass("enable-button")?($("#drink-00").attr("src","/static/app/assets/build/img/marketing/osflm-2020/items/drink/drink-03@3x.png?h=hash").css("animation","pulse-oflm 2s ease-in-out both"),window.location=this.href):(e.preventDefault(),o.$apply(function(){o.unvalidQ3=!0}))}),$(".next-button2")),u=(null!==d&&d.on("click",function(e){d.hasClass("enable-button")?($("#drink-00").attr("src","/static/app/assets/build/img/marketing/osflm-2020/items/drink/drink-04@3x.png?h=hash").css("animation","pulse-oflm 2s ease-in-out both"),window.location=this.href):(e.preventDefault(),o.$apply(function(){o.unvalidQ3=!0}))}),$(".next-button3")),p=(null!==u&&u.on("click",function(e){u.hasClass("enable-button")?($("#drink-00").attr("src","/static/app/assets/build/img/marketing/osflm-2020/items/drink/drink-05@3x.png?h=hash").css("animation","pulse-oflm 2s ease-in-out both"),window.location=this.href):(e.preventDefault(),o.$apply(function(){o.unvalidQ3=!0}))}),$(".next-button4")),f=(null!==p&&p.on("click",function(e){p.hasClass("enable-button")?(o.$apply(function(){o.unvalidQ3=!1}),$("#drink-00").attr("src","/static/app/assets/build/img/marketing/osflm-2020/items/drink/drink-01@3x.png?h=hash"),window.location=this.href):(e.preventDefault(),o.$apply(function(){o.unvalidQ3=!0}))}),$(".submit-button"));null!==f&&f.on("click",function(e){f.hasClass("enable-button")?o.$apply(function(){o.unvalidQ3=!1}):(e.preventDefault(),o.$apply(function(){o.unvalidQ3=!0}))});$(".osflm-form").on("change",function(e){var e=e.target,t=e.parentElement;"radio"===e.type&&t&&"label"===t.tagName.toLowerCase()&&((e=$('label.checked input[name="'+e.name+'"]'))&&e.parent().removeClass("checked"),t.classList.add("checked"),o.$apply(function(){o.unvalidQ3=!1}))});var g=$("#email"),m=(null!==g&&g.on("input",function(e){g.val()&&g.prop("validity").valid&&n.checkOsflmEmail(g.val()).then(function(e){},function(e){})}),$("#phoneNumber"));null!==m&&m.on("input",function(e){var t=m.val();t&&10===t.trim().length&&n.checkOsflmPhone(m.val()).then(function(e){},function(e){})}),o.resetBanner=function(){angular.element("html,body").find(".reset").on("click",function(){$(".jeu-banner").toggleClass("hidden")})}}]),angular.module("lpc").controller("kycRemediationController",["$scope","ServerFunction","$rootScope",function(e,t,o){e.validateKycRemediation=function(){t.account.kyc.validateKycRemediation().then(function(){"/tableau-de-bord-mes-documents"===window.location.pathname||"/tableau-de-bord-kyc"===window.location.pathname?window.location.reload():o.hidePopupV2("kyc-remediation")})}}]),angular.module("lpc").controller("FaqCtrl",["$scope","initFaq","$timeout",function(o,e,t){var n=window.matchMedia("only screen and (max-width: 766px)"),i=window.matchMedia("only screen and (min-width: 767px)"),a=(t(function(){o.mobile=n.matches,o.desktop=i.matches}),n.addListener(function(e){t(function(){o.mobile=e.matches},0)}),i.addListener(function(e){t(function(){o.desktop=e.matches},0)}),o.faq=angular.copy(e),o.selectedIndex=1,o.suggestions=[],window.s=o,e=o.faq.reduce(function(e,t){return e.concat(t.questions.map((o=t.id,function(e){return{id:o,question:e.question,original:e,tokenize:!0}})));var o},[]),new Fuse(e,{includeMatches:!0,shouldSort:!0,tokenize:!0,threshold:.6,distance:100,keys:["question"]}));o.handleQuery=function(){var e,t;o.query||(o.highlightedQuestion&&(o.highlightedQuestion.highlighted=!1,o.highlightedQuestion.large=!1),e=a.search(o.query),t={},e=e.filter(function(e){return!t.hasOwnProperty(e.item.question)&&(t[e.item.question]=!0)}).slice(0,5),o.suggestions=e)},o.cancelQuery=function(){t(function(){o.suggestions=[]},100)},o.handleClick=function(e){o.highlightedQuestion&&(o.highlightedQuestion.highlighted=!1,o.highlightedQuestion.large=!1),e.original.highlighted=!0,e.original.large=!0,o.highlightedQuestion=e.original,o.selectedIndex=e.id,o.suggestions=[],o.query="",angular.element(o.highlightedQuestion).on("click",function(){o.scrollToSection=function(e,t){var o=angular.element(e);t&&setTimeout(function(){angular.element("body").animate({scrollTop:o.offset().top-73})},100)}})},o.minimizeText=function(e,t,o){return!o&&e.length>t?e.substr(0,t)+"...":e}}]),angular.module("lpc").controller("collecttiamoTrustpilotController",["$scope",function(e){e.trustpilot=[{id:0,stars:5,date:"26 Marzo 2019",title:"Assolutamente senza problemi",desc:"Assolutamente senza problemi. Continuate così.",name:"Mar Kissy",url:"5c9a5d931254d8a7e0ea2f05"},{id:1,stars:5,date:"23 Luglio 2019",title:"Ottima esperienza",desc:"Ottima esperienza. Nessum problema a soldi raccolti in tempi brevi.",name:"Ricardo R",url:"5d35b9c4adcf320a819ac6fd"},{id:2,stars:5,date:"6 Aprile 2019",title:"Molto comodo.",desc:"Ottimo servizio, semplice, comodo e al passo con i tempi. Lo userò spesso.",name:"Rosa Maugeri",url:"59e0d2cf0000ff000ad4a39b"},{id:3,stars:5,date:"16 Novembre 2018",title:"Eccezionale veramente",desc:"La mia prima esperienza su 'Collettiamo.it ... ECCEZIONALE VERAMENTE...alla prossima colletta!! :)",name:"David",url:"5bee9cdc533741273881e12c"},{id:4,stars:5,date:"28 Novembre 2018",title:"Molto comodo ed immediato",desc:"Molto comodo ed immediato.",name:"Alberto",url:"5bfe6808183c1e049ce71f54"},{id:5,stars:5,date:"4 Dicembre 2018",title:"Veloci discreto semplici",desc:"Veloci discreti semplici.",name:"Mara",url:"5c06442c59b62433f00db7b2"}]}]);try{window.onerror=function(e,t,o){return(void 0===e||"string"==typeof e&&""==e)&&(void 0===t||"string"==typeof t&&""==t)&&(void 0===o||"string"==typeof o&&""==o||0==o)||throwLpcJavascriptError(e,t,o),!1}}catch(e){console.error(e)}function throwLpcJavascriptError(e,t,o){if(window.uniq&&window.errorsSentCount<=window.errorsMaxToSend)try{window.errorsSentCount++,jQuery.ajax({url:"/jsError",type:"POST",data:{uniq:window.uniq,localLog:window.localLog&&JSON.stringify(window.localLog).replace(/(password|photo|photoPO|image)=([^&]+)/g,"$1=******"),angular:void 0!==window.angular&&void 0!==window.angular.version,errorMsg:e&&e.replace(/(password|photo|photoPO|image)=([^&]+)/g,"$1=******"),scriptUrl:t,lineNumber:o,currentUrl:document.URL},dataType:"json"}).done(function(){window.localLog&&delete window.localLog})}catch(e){}}function createScriptElement(e,t,o){var n=document.createElement("script");if(void 0!==t){if(document.getElementById(t))return void o();n.id=t}void 0!==e&&(n.src=e),n.async=!0,n.type="text/javascript",void 0!==o&&n.addEventListener("load",function(e){o(null,e)},!1);t=document.getElementsByTagName("script")[0];void 0===window.afters&&(window.afters=[]),window.afters.push(t),t.parentNode.insertBefore(n,t)}function loadImage(e){var t=new Image;t.src=e,t.onload=function(){console.log("image loaded")}}function LpcException(e,t){this.name=e,this.message=t}function TurnVideoPlugin(){function t(){var e,n=l[o.index];c.setAttribute("style","background-image: url('"+n.image+"')"),c.style.backgroundPosition="50% "+n.position.y+"%",a!=u.NONE?(s.style.opacity=.01,s.setAttribute("poster",n.image),s.src=n.video[d[a]],s.play(),r.makeItOpaqueDone=!1,s.oncanplay=e=function(){function t(e){var t=c.offsetHeight,t=(s.offsetHeight-t)*e/100;s.style.left="0",s.style.top=-(0<t&&t||0)+"px"}var o;r.makeItOpaqueDone||(r.makeItOpaqueDone=!0,o=n.position.y,window.onresize=function(e){t(o)},t(o),s.style.opacity=1,i.style.background="none",setTimeout(g,300))},setTimeout(e,2e3)):setTimeout(function(){g(),t()},1e4)}var i,o,a,r={},l=[],s=document.getElementById("header-video"),c=document.getElementById("header-video-wrapper"),n=[],d=["","mp4","webm","ogg"],u={NONE:0,MP4:1,WEBM:2,OGG:3},p=function(){for(var e=0;e<l.length;e++)n.push({index:e,priority:!(!l[e]||!l[e].priority)})},e=function(){1==n.length&&p();var e=n.indexOf(o);n.splice(e,1)},f=function(){for(var e=[],t=0;t<n.length;t++)n[t]&&n[t].priority&&e.push(t);return e&&e.length?e[Math.floor(Math.random()*e.length)]:Math.floor(Math.random()*n.length)},g=function(){e(),o=n[f()],u.NONE,i.style.backgroundImage="url('"+l[o.index].image+"')"};this.init=function(e){l=e,(a=""!=s.canPlayType('video/webm; codecs="vp8, vorbis"')?u.WEBM:""!=s.canPlayType('video/mp4; codecs="avc1.42E01E"')?u.MP4:""!=s.canPlayType('video/ogg; codecs="theora"')?u.OGG:u.NONE)!=u.NONE&&(s.onended=t,s.style.opacity=.01),(i=document.createElement("div")).style.position="absolute",i.style.top="0",i.style.left="0",i.style.width="1px",i.style.height="1px",i.style.opacity="0.1",document.body.appendChild(i),p(),o=n[f()],t(),window.vis(function(){window.vis()?s&&s.play&&s.paused&&s.play():s&&s.pause&&s.pause()})},TurnVideoPlugin.prototype.init=function(){return this.init}}function getLogoDiv(){var e={};switch(e.element=$("#logoContainer img"),$("#logoContainer img").attr("id")){case"logo":e.height1=85,e.width1=180,e.height2=70,e.width2=145;break;case"logoSncf":e.element=$("#logoSncf"),e.height1=101.29,e.width1=180,e.height2=70,e.width2=124.4;break;default:e.height1=85,e.width1=180,e.height2=70,e.width2=145}return e}function animateLogo1(e){e.element.animate({height:e.height2+"px",width:e.width2+"px","margin-top":"0px"})}function animateLogo2(e){e.element.animate({height:e.height1+"px","margin-top":"2%",width:e.width1+"px"})}function animateLogo3(e){e.element.animate({height:e.height2+"px",width:e.width2+"px","margin-top":"0px"})}function animateLogo4(e){e.element.animate({height:e.height2+"px","margin-top":"2%",width:e.width2+"px"})}function handleMenu(){jQuery(window).width()<768||jQuery(".optionMenuWrapper").length&&angular.element(document).ready(function(){function e(){isScrolledIntoViewBottom(jQuery(".optionMenuWrapper").prev(),95)?(jQuery(".optionMenuWrapper").next().css("margin-top","inherit"),jQuery(".optionMenuWrapper").removeClass("optionMenuFixed")):(jQuery(".optionMenuWrapper").next().css("margin-top","100px"),jQuery(".optionMenuWrapper").addClass("optionMenuFixed"))}e(),$(window).scroll(function(){e()})})}function handleParticipate(){jQuery(window).width()<768||jQuery("#participateMenu").length&&angular.element(document).ready(function(){function e(){isScrolledIntoViewBottom(jQuery("#participateMenu").prev(),95)?(jQuery("#participateMenu").prev().css("margin-bottom","inherit"),jQuery("#participateMenu").removeClass("participateFixed")):(jQuery("#participateMenu").prev().css("margin-bottom","100px"),jQuery("#participateMenu").addClass("participateFixed"))}e(),jQuery(window).scroll(function(){e()})})}function handleParticipateSale(){jQuery(window).width()<768||jQuery("#sale-buy-button").length&&angular.element(document).ready(function(){function e(){isScrolledIntoViewBottom(jQuery("#sale-menu").prev(),95)?jQuery("#sale-buy-button").removeClass("saleButtonFixed"):jQuery("#sale-buy-button").addClass("saleButtonFixed")}e(),jQuery(window).scroll(function(){e()})})}function isScrolledIntoViewBottom(e,t){var e=$(e),o=$(window),o=o.scrollTop()+o.height();return e.offset().top+e.height()+t<o}function isScrolledIntoViewTop(e,t){var e=$(e),o=$(window),n=o.scrollTop(),o=(o.height(),e.offset().top);e.height();return o+t<n}window.lpcLog=function(e){window.localLog||(window.localLog=[]),window.localLog.push(e)},Array.prototype.contains=function(e){for(var t in this)if(this[t]==e)return!0;return!1},LpcException.prototype=new Error,LpcException.prototype.constructor=LpcException,window.vis=function(){var t,o,e={hidden:"visibilitychange",webkitHidden:"webkitvisibilitychange",mozHidden:"mozvisibilitychange",msHidden:"msvisibilitychange"};for(t in e)if(t in document){o=e[t];break}return function(e){return e&&document.addEventListener(o,e),!document[t]}}(),angular.element(document).ready(function(){jQuery("#mobileMenuBtn, .mobileMenuContainer").on("click",function(){0<angular.element("#mobileMenu:visible").size()?(angular.element(".mobileMenuContainer").hide(),angular.element("#mobileMenu").hide(),angular.element("#header").removeClass("blurOut"),angular.element("body").removeClass("menu-fixe-body")):(angular.element(".mobileMenuContainer").show(),angular.element("#header").addClass("blurOut"),angular.element("body").addClass("menu-fixe-body"),angular.element("#mobileMenu").slideDown(300))});var e=!0,t=($(window).resize(function(){e?767<=$(window).width()&&($("#mobileMenu").show(),$("#mobileMenu").attr("style",""),$(".mobileMenuContainer").attr("style",""),angular.element("#header").removeClass("blurOut"),e=!1):$(window).width()<767&&(e=!0)}),angular.element("#logoContainer").click(function(){return angular.element(window).scrollTop()<=70||(console.log(" position "+angular.element(window).scrollTop()),$("html, body").animate({scrollTop:0},500),!1)}),new Swiper(".swiper-container",{slidesPerView:1,paginationClickable:!0,nextButton:".swiper-button-next",initialSlide:0,prevButton:".swiper-button-prev"}),new Swiper(".swiper-container-partners-special-offer",{slidesPerView:1,paginationClickable:!0,initialSlide:0,autoplay:2500,autoplayDisableOnInteraction:!1,loop:!0}),new Swiper(".plateform-home-banner-carousel",{slidesPerView:1,initialSlide:0,centeredSlides:!0,nextButton:".banner-com-swiper-button-next",prevButton:".banner-com-swiper-button-prev",loop:!0}),new Swiper(".offer-50__carousel",{slidesPerView:4,initialSlide:0,centeredSlides:!0,autoplay:2500,speed:1700,loop:!0,breakpoints:{640:{slidesPerView:3}}}),new Swiper(".swiper-container-home-chrismas",{slidesPerView:1,paginationClickable:!0,initialSlide:0,autoplayDisableOnInteraction:!1,onSlideChangeEnd:function(e){$(".swiper-container-home-chrismas .swiper-button-next").trigger("click")}})),o=(setTimeout(function(){t&&t.slideTo&&t.slideTo(1)},1e4),new Swiper(".swiper-container-partenaire",{slidesPerView:3,slidesPerColumn:2,paginationClickable:!0,autoplay:2500,autoplayDisableOnInteraction:!1,nextButton:".swiper-button-next",initialSlide:0,prevButton:".swiper-button-prev"}),new Swiper(".swiper-container-home",{slidesPerView:3,slidesPerColumn:2,paginationClickable:!0,autoplay:2500,autoplayDisableOnInteraction:!1,nextButton:".swiper-button-nextt",initialSlide:0,prevButton:".swiper-button-prevv"}),new Swiper(".swiper-container-adv-desktop",{slidesPerView:12,initialSlide:1,autoplay:2500,autoplayDisableOnInteraction:!1,loop:!0})),n=new Swiper(".home-page-partners-swiper",{slidesPerView:4,initialSlide:0,autoplay:2500,autoplayDisableOnInteraction:!1,loop:!0,spaceBetween:20,breakpoints:{640:{slidesPerView:3}}}),i=(new Swiper(".home-credit-coop-swiper",{slidesPerView:4,initialSlide:0,autoplay:2500,autoplayDisableOnInteraction:!1,loop:!0,spaceBetween:20,breakpoints:{640:{slidesPerView:3}}}),new Swiper(".carousel-wallpaper",{slidesPerView:1,initialSlide:0,autoplayDisableOnInteraction:!1,spaceBetween:0}),new Swiper(".collettiamo-tuto-youtube",{slidesPerView:4,slidesPerColumn:1,spaceBetween:20,initialSlide:0,autoplay:3e3,speed:1700,loop:!1,centeredSlides:!1,nextButton:".ccm-int-swiper-button-next",prevButton:".ccm-int-swiper-button-prev",breakpoints:{1001:{slidesPerView:3,centeredSlides:!0},768:{slidesPerView:2},600:{slidesPerView:1}}}),new Swiper("b2b-bandeau-swiper",{centeredSlides:!0,slidesPerView:1,spaceBetween:20,initialSlide:0,autoplay:1500,speed:1e3,loop:!0,nextButton:".b2b-swiper-button-next",prevButton:".b2b-swiper-button-prev"}),new Swiper(".smartbox-swiper",{slidesPerView:4,initialSlide:0,autoplay:2500,speed:1e3,autoplayDisableOnInteraction:!1,loop:!0,spaceBetween:20,nextButton:".swiper-button-next",prevButton:".swiper-button-prev",breakpoints:{1e3:{slidesPerView:3},768:{slidesPerView:2,spaceBetween:0}}}),new Swiper(".natixis-home-partners-swiper",{slidesPerView:4,initialSlide:1,autoplay:2500,autoplayDisableOnInteraction:!1,loop:!0,spaceBetween:20,breakpoints:{640:{slidesPerView:3}}}),new Swiper(".platform-home-partners-swiper",{slidesPerView:4,initialSlide:1,autoplay:2500,autoplayDisableOnInteraction:!1,loop:!0,spaceBetween:20,breakpoints:{640:{slidesPerView:3}}}),new Swiper(".partners-carousel",{slidesPerView:4,initialSlide:1,autoplay:2500,autoplayDisableOnInteraction:!1,loop:!0,spaceBetween:20,breakpoints:{640:{slidesPerView:3}}}),new Swiper(".swiper-container-adv",{slidesPerView:1,nextButton:".swiper-how-to-use-button-next",initialSlide:1,prevButton:".swiper-how-to-use-button-prev"}),new Swiper(".top-10-events-swiper-container",{slidesPerView:2,paginationClickable:!0,nextButton:".top-ten-swiper-button-next",initialSlide:0,preventClicks:!0,prevButton:".top-ten-swiper-button-prev",pagination:".swiper-pagination",loop:!0})),a=new Swiper(".solidary-swiper-container",{slidesPerView:4,paginationClickable:!0,nextButton:".solidary-swiper-button-next",initialSlide:0,preventClicks:!0,prevButton:".solidary-swiper-button-prev",pagination:".swiper-pagination",loop:!0});new Swiper(".landing-offre-50-ccm-mobile-container",{slidesPerView:2,preventClicks:!0,paginationClickable:!0,initialSlide:0,nextButton:".landing-offre-50-swiper-button-next",prevButton:".landing-offre-50-swiper-button-prev",pagination:".swiper-pagination",spaceBetween:10,autoplay:4500,speed:1e3,centeredSlides:!0,loop:!1,breakpoints:{530:{slidesPerView:1,spaceBetween:10}}}),new Swiper(".home-int-swiper-container",{pagination:".swiper-pagination",centeredSlides:!0,paginationClickable:!0,slidesPerView:2,spaceBetween:20,initialSlide:0,autoplay:2e3,speed:1e3,nextButton:".next",prevButton:".prev",autoplayDisableOnInteraction:!1}),new Swiper(".twil-swiper-container",{pagination:".swiper-pagination",centeredSlides:!0,paginationClickable:!1,slidesPerView:2,spaceBetween:20,initialSlide:0,autoplay:2e3,speed:1e3,nextButton:".home-int-swiper-button-next",prevButton:".home-int-swiper-button-prev",autoplayDisableOnInteraction:!1}),new Swiper(".payement-failure-swiper-container",{pagination:".swiper-pagination",centeredSlides:!0,paginationClickable:!1,slidesPerView:3,spaceBetween:20,initialSlide:1,autoplay:2e3,speed:1e3,autoplayDisableOnInteraction:!1}),new Swiper(".rounded-step-section-carousel",{pagination:".swiper-pagination",centeredSlides:!0,paginationClickable:!0,slidesPerView:2,spaceBetween:20,initialSlide:0,autoplay:2e3,speed:1e3,nextButton:".next",prevButton:".prev",autoplayDisableOnInteraction:!1}),new Swiper(".list-more-carousel",{pagination:".swiper-pagination",centeredSlides:!0,paginationClickable:!0,slidesPerView:1,spaceBetween:20,initialSlide:0,autoplay:2500,speed:1e3,nextButton:".next",prevButton:".prev",autoplayDisableOnInteraction:!1}),new Swiper(".ccm-section-swiper-container",{pagination:".swiper-pagination",centeredSlides:!0,paginationClickable:!0,slidesPerView:1,spaceBetween:20,initialSlide:0,autoplay:2500,speed:1e3,nextButton:".ccm-section-swiper-button-next",prevButton:".ccm-section-swiper-button-prev",autoplayDisableOnInteraction:!1}),new Swiper(".how-to-use-your-kitty-swiper",{pagination:".swiper-pagination",centeredSlides:!0,paginationClickable:!1,slidesPerView:1,spaceBetween:5,initialSlide:0,autoplay:1e3,speed:1e3,autoplayDisableOnInteraction:!0}),new Swiper(".pot-board-little-extras-swiper",{preventClicks:!0,pagination:".swiper-pagination",slidesPerView:3,spaceBetween:10,prevButton:".little-extras-swiper-button-prev",nextButton:".little-extras-swiper-button-next",slideNextClass:"swiper-slide-next",initialSlide:0,autoplay:8e3,speed:1e3,autoplayDisableOnInteraction:!1,breakpoints:{1e3:{slidesPerView:2,spaceBetween:10}}}),new Swiper(".home-page-section-what-swiper-container",{centeredSlides:!0,pagination:".swiper-pagination",paginationClickable:!1,slidesPerView:2,spaceBetween:20,initialSlide:0,autoplay:2e3,speed:1e3,nextButton:".home-page-section-what-swiper-button-next",prevButton:".home-page-section-what-swiper-button-prev",autoplayDisableOnInteraction:!1}),new Swiper(".dashboard-home-tips-swiper-container",{slidesPerView:1,preventClicks:!0,paginationClickable:!1,initialSlide:0,nextButton:".dashboard-home-tips-swiper-button-next",prevButton:".dashboard-home-tips-swiper-button-prev",autoplay:4500,speed:1250,centeredSlides:!0,loop:!1}),new Swiper(".dashboard-home-cado-carte-swiper-container",{slidesPerView:1,preventClicks:!0,paginationClickable:!1,initialSlide:0,nextButton:".dashboard-home-cado-carte-swiper-button-next",prevButton:".dashboard-home-cado-carte-swiper-button-prev",autoplay:3e3,speed:1250,centeredSlides:!0,loop:!1}),new Swiper(".new-solidarytile-swiper-container",{slidesPerView:3,paginationClickable:!0,centeredSlides:!1,loop:!1,nextButton:".solidary-swiper-button-next",initialSlide:0,spaceBetween:0,preventClicks:!0,prevButton:".solidary-swiper-button-prev",pagination:".swiper-pagination",autoplay:2e3,speed:1e3,breakpoints:{768:{slidesPerView:1,spaceBetween:10},1e3:{slidesPerView:2,spaceBetween:20}}}),new Swiper(".trustpilot__carousel__container",{slidesPerView:5,initialSlide:0,speed:1e3,autoplayDisableOnInteraction:!1,loop:!0,spaceBetween:20,nextButton:".swiper-next",prevButton:".swiper-prev",breakpoints:{640:{slidesPerView:1},800:{slidesPerView:2},1e3:{slidesPerView:3},1200:{slidesPerView:4}}}),new Swiper(".trustpilot__carousel__container__collettiamo",{slidesPerView:3,initialSlide:0,speed:1e3,autoplayDisableOnInteraction:!1,loop:!0,spaceBetween:20,prevButton:".swiper-prev",nextButton:".swiper-next",breakpoints:{640:{slidesPerView:1},800:{slidesPerView:2},1e3:{slidesPerView:3}}});$(window).resize(function(){var e=$(window).width();1200<e&&(o.params.slidesPerView=12,i.params.slidesPerView=2,a.params.slidesPerView=4,n.params.slidesPerView=5),1e3<e&&e<=1200&&(a.params.slidesPerView=3),767<e&&e<=1200&&(i.params.slidesPerView=2,o.params.slidesPerView=6,a.params.slidesPerView=2,n.params.slidesPerView=3),e<767&&(i.params.slidesPerView=1,a.params.slidesPerView=1,n.params.slidesPerView=3),o&&o.update&&o.update(!0),i&&i.update&&i.update(!0),a&&a.update&&a.update(!0)}),$(window).trigger("resize")}),angular.element(document).ready(function(){jQuery.fn.scrollMinimal=function(e){var t=this.offset().top+100,o=this.outerHeight(!0),n=$(window).scrollTop(),i=$(window).height();t<n?e?$("body").animate({scrollTop:t},"fast","swing"):$(window).scrollTop(t):n+i<t+o&&(e?$("body").animate({scrollTop:t-i+o},"fast","swing"):$(window).scrollTop(t-i+o))},jQuery.fn.scrollUnil=function(e){var t=this.offset().top+100,o=this.outerHeight(!0),n=$(window).scrollTop(),i=$(window).height();t<n?e?$("body").animate({scrollTop:t},"fast","swing"):$(window).scrollTop(t):n+i<t+o&&(e?$("body").animate({scrollTop:t-i+o},"fast","swing"):$(window).scrollTop(t-i+o))},jQuery.fn.scrollMinimal=function(e){var t=this.offset().top+100,o=this.outerHeight(!0),n=$(window).scrollTop(),i=$(window).height();t<n?e?$("body").animate({scrollTop:t},"fast","swing"):$(window).scrollTop(t):n+i<t+o&&(e?$("body").animate({scrollTop:t-i+o},"fast","swing"):$(window).scrollTop(t-i+o))},jQuery.fn.scrollToTop=function(e){var t=this.offset().top-200;$(window).scrollTop(),$(window).height();e?$("body").animate({scrollTop:t},"fast","swing"):$(window).scrollTop(t)}}),function(e,t,o,n,i){e.fbq||(o=e.fbq=function(){o.callMethod?o.callMethod.apply(o,arguments):o.queue.push(arguments)},e._fbq||(e._fbq=o),(o.push=o).loaded=!0,o.version="2.0",o.queue=[],(n=t.createElement("script")).async=!0,n.src="//connect.facebook.net/en_US/fbevents.js",(i=t.getElementsByTagName("script")[0]).parentNode.insertBefore(n,i))}(window,document),"IT"==window.lpcDomain?fbq("init","669728226501278"):"ES"==window.lpcDomain?fbq("init","599717600204614"):"DE"==window.lpcDomain?fbq("init","194248458049066"):fbq("init","635948429875488"),fbq("track","PageView");var inputVal=$("#valueGC"),maxValEcard=$(".decathlon-tooltip"),tooltip=$(".decathlon-max-value");function filterVal(e){250<e?(setTimeout(function(){inputVal.val(250),tooltip.fadeIn()},500),maxValEcard.css("display","block"),setTimeout(function(){setTimeout(function(){tooltip.fadeOut()},13500),maxValEcard.css("display","none")},14e3)):maxValEcard.css("display","none")}maxValEcard.css("display","none"),tooltip.fadeOut(),inputVal.on("keyup",function(e){e.target.value;inputVal.removeClass("shake")});var useMoneyGrid=$("#useMoneyDS"),useMoneyChild=$(".lpc-col"),windowWidth=$(window).outerWidth();function handleCharacter(e){var t=$(this),o=getIndex(t),n=t.val().slice(0,1),i=t.val().slice(1),a=$('.tfa-popin__code__box[name="tfaCode['+(o+1)+']"]'),r=t.val();0<r.length&&(0<i.length&&(t.val(n),a.focus(),0<a.length)&&(a.val(i),a.blur(),handleCharacter.call(a,e)),a.focus()),6===r.length&&(this.tfaCopiedCode=r),6===this.tfaCopiedCode.length&&1===r.length&&(this.tfaCopiedCode=this.tfaCopiedCode.substring(0,o-1)+n+this.tfaCopiedCode.substring(o))}function handleBackspace(e){var e=e.which||e.keyCode,t=getIndex($(this));8!==e||$(this).val()||$('.tfa-popin__code__box[name="tfaCode['+(t-1)+']"]').focus()}function getIndex(e){return Number.isNaN(parseInt(e.selector.split(/[\[\]]/)[2]))?parseInt(e.attr("name").split(/[\[\]]/)[1],10):parseInt(e.selector.split(/[\[\]]/)[2])}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}$(window).load(function(){1===useMoneyChild.length&&768<=windowWidth&&(useMoneyGrid.css("height","inherit"),useMoneyGrid.css("max-height",300),setTimeout(function(){useMoneyGrid.css("height",useMoneyChild.innerHeight())},400))}),$(document).scroll(function(){0<$(this).scrollTop()?$(".transparant-logo").attr("src","/static/plateforms/creditcooperatif/img/logos/logo-cc.png?h=hash"):$(".transparant-logo").attr("src","/static/plateforms/creditcooperatif/img/logos/logo-cc-transparant.png?h=hash")}),$(document).ready(function(){$(".across-close-up").click(function(e){e.preventDefault(),$(".button-close-up").css("display","none")})}),angular.module("lpc").filter("com",["Helper",function(e){e=e.computeCom;return e.$stateful=!0,e}]),angular.module("lpc").filter("to_trusted",["$sce",function(t){return function(e){return t.trustAsHtml(e)}}]),angular.module("lpc").filter("dateDiffDown",[function(){return function(e){var t;return console.log("val "+e),e&&null!=e&&void 0!==e?(e=new Date(e),t=new Date,Math.floor((t.getTime()-e.getTime())/864e5)):""}}]),angular.module("lpc").filter("abs",function(){return function(e){return Math.abs(e)}}),angular.module("lpc").filter("percentage",["$filter",function(o){return function(e,t){return o("number")(100*e,t)+"%"}}]),angular.module("lpc").filter("modulo",function(){return function(e,o,n){return e.filter(function(e,t){return t%o===(n||0)})}}),angular.module("lpc").filter("format",["Helper",function(e){e=e.format;return e.$stateful=!0,e}]),angular.module("lpc").filter("formatString",["Helper",function(o){function e(e,t){return t?(t=[e].concat(JSON.parse(t)),o.getUrl.apply(null,t)):e}return e.$stateful=!0,e}]),angular.module("lpc").filter("fixFloat",["Helper",function(e){e=e.fixFloat;return e.$stateful=!0,e}]),angular.module("lpc").filter("intervallTime",function(){function e(e){var e=parseInt(e,10),t=Math.floor(e/86400),o=Math.floor((e-3600*t*24)/3600),n=Math.floor((e-3600*o-3600*t*24)/60);return{days:t,hours:o,minutes:n,seconds:e-3600*o-60*n-3600*t*24}}return e.$stateful=!0,e}),angular.module("lpc").filter("formatIban",function(){function e(e){if(e=e&&e.replace?e.replace(/;|\s/g,""):e){for(var t="",o=0,n=e.length;o<n;o++)0<o&&!(o%4)&&(t+=" "),t+=e.charAt(o);return t}}return e.$stateful=!0,e}),angular.module("lpc").filter("datetime",["Helper",function(e){return e.datetime}]),angular.module("lpc").filter("time",function(){function o(e,t){return(e=e.toString()).length<t?o("0"+e,t):e}return function(e){return e?o(e.hour,2)+"h"+o(e.minute,2):""}}),angular.module("lpc").filter("fflabel",function(){function e(e,t){if(void 0===e)return"";switch(t){case"IT":return n[e]?n[e]:e;case"EN":return a[e]?a[e]:e;case"ES":return i[e]?i[e]:e;default:return o[e]?o[e]:e}}var o={PHONE:"Téléphone",DATEOFBIRTH:"Date de naissance",ADDRESS:"Adresse",ZIP_CODE:"Code postal",COUNTRY:"Pays",CITY:"Ville"},n={PHONE:"Telefono",DATEOFBIRTH:"Data di nascita",ADDRESS:"Indirizzo",ZIP_CODE:"Codice postale",COUNTRY:"Paese",CITY:"Città"},i={PHONE:"Teléfono móvil",DATEOFBIRTH:"Fecha de nacimiento",ADDRESS:"Dirección",ZIP_CODE:"Código postal",COUNTRY:"País",CITY:"Ciudad"},a={PHONE:"Phone number",DATEOFBIRTH:"Date of birth",ADDRESS:"Address",ZIP_CODE:"Zip Code",COUNTRY:"Country",CITY:"City"};return e.$stateful=!0,e}),angular.module("lpc").filter("fftype",function(){function e(e){return void 0===e?"":t[e]||e}var t={PHONE:"number",DATEOFBIRTH:"text",ADDRESS:"text",ZIP_CODE:"text",COUNTRY:"text",CITY:"text"};return e.$stateful=!0,e}),angular.module("lpc").filter("range",function(){return function(e,t){t=parseInt(t);for(var o=0;o<t;o++)e.push(o);return e}}),angular.module("lpc").filter("sanitize",["$sce",function(t){return function(e){return t.trustAsHtml(e)}}]),angular.module("lpc").filter("boCountDown",["Helper",function(o){function e(e){if(e&&e.date&&e.date.year&&e.date.month&&e.date.day){var t=e.time?new Date(e.date.year,e.date.month-1,e.date.day,e.time.hour,e.time.minute,e.time.second):new Date(e.date.year,e.date.month-1,e.date.day),t=Math.round(Math.abs(((new Date).getTime()-t.getTime())/864e5));if(0<t)return"J+"+t}return e=o.datetime(e)}return e.$stateful=!0,e}]),angular.module("lpc").filter("getFromNow",function(){function e(e){return e}return e.$stateful=!0,e}),angular.module("lpc").filter("linkify",["$sce",function(t){function e(e){if(e&&e.replace)return e=(e=(e=e.replace(/(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim,'<a href="$1" target="_blank">$1</a>')).replace(/(^|[^\/])(www\.[\S]+(\b|$))/gim,'$1<a href="http://$2" target="_blank">$2</a>')).replace(/(([a-zA-Z0-9\-\_\.])+@[a-zA-Z\_]+?(\.[a-zA-Z]{2,6})+)/gim,'<a href="mailto:$1">$1</a>'),t.trustAsHtml(e)}return e.$stateful=!0,e}]),angular.module("lpc").filter("parseInt",function(){return function(e){return parseInt(e,10)}}),angular.module("lpc").filter("objectOrderBy",function(){return function(e,o,t){var n=[];return angular.forEach(e,function(e){n.push(e)}),n.sort(function(e,t){return e[o]>t[o]?1:-1}),t&&n.reverse(),n}}),angular.module("lpc").filter("urlEncode",function(){return window.encodeURIComponent}),angular.module("lpc").filter("formatInternational",[function(){function e(e){var t;return isNaN(e)?"0,00":-1!=(e=String(e)).indexOf(".")||-1!=e.indexOf(",")?-1!=e.indexOf(".")?1==(t=e.substring(e.indexOf(".")+1,e.length)).length?e.replace(/\./g,",")+"0":2==t.length?e.replace(/\./g,","):2<t.length?e.substring(0,e.indexOf(".")+3).replace(/\./g,","):void 0:1==(t=e.substring(e.indexOf(",")+1,e.length)).length?e+"0":2==t.length?e:2<t.length?e.substring(0,e.indexOf(",")+3):void 0:e+",00"}return e.$stateful=!0,e}]),angular.module("lpc").filter("toTrusted",["$sce",function(t){return function(e){return t.trustAsHtml(e)}}]),angular.module("lpc").filter("detectLineBreaks",function(){function e(e){return e&&e.length?e.replace(/\n|\r/g,"<br/>"):e}return e.$stateful=!0,e}),angular.module("lpc").filter("dateformat",["DateConverter",function(n){return function(e,t,o){return n.getStringFromDate(o,n.getDateFromStringWithPattern(t,e))}}]),angular.module("lpc").filter("partnerByCategories",function(){return function(e,t){var o=[];if(null!=e){if(0<t.length){for(var n=0;n<e.length;n++){for(var i=0,a=e[n].partnerCategories,r=0;r<t.length;r++)for(var l=0;l<a.length;l++)t[r].partnerCategoryID===a[l].partnerCategoryID&&i++;0<i&&o.push(e[n])}return o}return e}}}),angular.module("lpc").filter("F_CFP_Currency",["$filter","$timeout",function(n,e){return function(e,t,o){return e=null!=(e=n("currency")(e,t,o))?e.replace("XPF",""):e}}]),angular.module("lpc").factory("Helper",["$location","$rootScope",function(B,a){function r(e,t){function o(e,t){return(e=e.toString()).length<t?o("0"+e,t):e}function n(e,t){if(t=t&&t.toLowerCase(),void 0!==e.hour&&void 0!==e.minute)return o(e.hour,2)+("fr"==t?"h":":")+o(e.minute,2)}var i,a;if(void 0!==e)return void 0!==e.date||void 0!==e.time?(i="",void 0!==e.date&&(i+=r(e.date),e.time)&&(i+=" "),void 0!==e.time&&(i+=r(e.time)),i):e&&void 0!==e.day&&void 0!==e.month&&e.month.toLocaleString&&void 0!==e.year?(a=e?o(e.day,2)+"/"+o(e.month.toLocaleString(),2)+"/"+e.year:"",void 0!==e.hour&&void 0!==e.minute&&(a+=" "+n(e,t)),a):void 0!==e.hour&&void 0!==e.minute?n(e,t):(i=/(\d{4})-(\d{2})-(\d{2})/g.exec(e),t=/(\d{2}):(\d{2}):(\d{2})/g.exec(e),a="",i&&4<=i.length&&(a+=o(i[3],2)+"/"+o(i[2],2)+"/"+i[1],t)&&4<=t.length&&(a+=" "),t&&4<=t.length&&(a+=o(t[1],2)+":"+o(t[2],2)+":"+o(t[3],2)),a.length?a:e)}function l(e){return Math.round(Math.round(Math.round(1e5*e)/1e5*100*1e3)/1e3)/100}function s(e){return void 0===e?0:"string"==typeof e?parseFloat(e.replace(",",".")):"number"!=typeof e?parseFloat(e):e}function o(e){var t,o,n,i,a=e.indexOf("?")+1,r=e.length+1,l=(a=e.slice(a,r-1)).replace(/\+/g," ").split("&"),s={};if(a!==e&&""!==a)for(t=0;t<l.length;t++)i=l[t].split("="),o=decodeURIComponent(i[0]),n=decodeURIComponent(i[1]),s.hasOwnProperty(o)||(s[o]=[]),s[o].push(2===i.length?n:null);return s}function n(e){return e.getDate&&e.getMonth&&e.getFullYear?isNaN(e.getDate())||isNaN(e.getMonth())||isNaN(e.getFullYear())?null:(e.getDate()<10?"0":"")+e.getDate()+"/"+(e.getMonth()<9?"0":"")+(e.getMonth()+1)+"/"+e.getFullYear():e}function i(e){var t;return-1!=e.indexOf("-")?(t=new RegExp("\\-","g"),e.replace(t,"/")):e}function t(e){if(null==e)return null;if("string"==typeof e){var t=e.match(/(\d{4})-(\d{2})-(\d{2})/);if(t&&4<=t.length)return new Date(t[1],t[2]-1,t[3])}return new Date(e.year,e.month-1,e.day)}function c(e){var t;try{t=new URL(e)}catch(e){return}return"http:"===t.protocol||"https:"===t.protocol}function d(e,o){var n=!0,i={};return angular.forEach(e,function(e,t){n&&e.value==o&&(i=e,n=!1)}),i}function u(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY"},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"Pot1.png?h=hash",value:"DEPARTURE_KITTY"},{text:CATEGORIE_POT_LABELS.GIFT_BIRTH,img:"Pot45.png?h=hash",value:"GIFT_BIRTH"},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"Pot12.png?h=hash",value:"COMMON_GIFT"}]}function p(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"Pot1.png?h=hash",value:"DEPARTURE_KITTY"},{text:CATEGORIE_POT_LABELS.GIFT_BIRTH,img:"Pot45.png?h=hash",value:"GIFT_BIRTH"},{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY"},{text:CATEGORIE_POT_LABELS.NEWYEAR,img:"Pot16.png?h=hash",value:"NEWYEAR"},{text:CATEGORIE_POT_LABELS.HOUSEWARMING,img:"Pot9.png?h=hash",value:"HOUSEWARMING"},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"Pot12.png?h=hash",value:"COMMON_GIFT"},{text:CATEGORIE_POT_LABELS.BEREAVEMENT,img:"Pot6.png?h=hash",value:"BEREAVEMENT"},{text:CATEGORIE_POT_LABELS.BIRTH_REGULAR,img:"Pot36.png?h=hash",value:"BIRTH_REGULAR"},{text:CATEGORIE_POT_LABELS.WEDDING_REGULAR,img:"Pot37.png?h=hash",value:"WEDDING_REGULAR"}]}function f(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY"},{text:CATEGORIE_POT_LABELS.NEWYEAR,img:"Pot16.png?h=hash",value:"NEWYEAR"},{text:CATEGORIE_POT_LABELS.REPAY,img:"Pot19.png?h=hash",value:"REPAY"},{text:CATEGORIE_POT_LABELS.HOUSEWARMING,img:"Pot9.png?h=hash",value:"HOUSEWARMING"},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"Pot12.png?h=hash",value:"COMMON_GIFT"},{text:CATEGORIE_POT_LABELS.FRIENDSHOLIDAYS,img:"Pot7.png?h=hash",value:"FRIENDSHOLIDAYS"},{text:CATEGORIE_POT_LABELS.THESIS,img:"Pot13.png?h=hash",value:"THESIS"},{text:CATEGORIE_POT_LABELS.SALE,img:"Sale.png?h=hash",value:"SALE"}]}function g(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"natureetdecouvertes.png?h=hash",value:"BIRTHDAY"},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"natureetdecouvertes.png?h=hash",value:"DEPARTURE_KITTY"},{text:CATEGORIE_POT_LABELS.HOUSEWARMING,img:"natureetdecouvertes.png?h=hash",value:"HOUSEWARMING"},{text:CATEGORIE_POT_LABELS.WEDDING_REGULAR,img:"natureetdecouvertes.png?h=hash",value:"WEDDING_REGULAR"},{text:CATEGORIE_POT_LABELS.BIRTH_REGULAR,img:"natureetdecouvertes.png?h=hash",value:"BIRTH_REGULAR"},{text:CATEGORIE_POT_LABELS.TEACHER,img:"natureetdecouvertes.png?h=hash",value:"TEACHER"},{text:CATEGORIE_POT_LABELS.MOTHER,img:"natureetdecouvertes.png?h=hash",value:"MOTHER"},{text:CATEGORIE_POT_LABELS.FATHER,img:"natureetdecouvertes.png?h=hash",value:"FATHER"},{text:CATEGORIE_POT_LABELS.OTHER,img:"natureetdecouvertes.png?h=hash",value:"OTHER"}]}function m(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"hotelspreference.jpg?h=hash",value:"BIRTHDAY"},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"hotelspreference.jpg?h=hash",value:"DEPARTURE_KITTY"},{text:CATEGORIE_POT_LABELS.HOUSEWARMING,img:"hotelspreference.jpg?h=hash",value:"HOUSEWARMING"},{text:CATEGORIE_POT_LABELS.WEDDING_REGULAR,img:"hotelspreference.jpg?h=hash",value:"WEDDING_REGULAR"},{text:CATEGORIE_POT_LABELS.BIRTH_REGULAR,img:"hotelspreference.jpg?h=hash",value:"BIRTH_REGULAR"},{text:CATEGORIE_POT_LABELS.TEACHER,img:"hotelspreference.jpg?h=hash",value:"TEACHER"},{text:CATEGORIE_POT_LABELS.MOTHER,img:"hotelspreference.jpg?h=hash",value:"MOTHER"},{text:CATEGORIE_POT_LABELS.FATHER,img:"hotelspreference.jpg?h=hash",value:"FATHER"},{text:CATEGORIE_POT_LABELS.OTHER,img:"hotelspreference.jpg?h=hash",value:"OTHER"}]}function h(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.MISTRAL_GROUPED_ORDER,img:"biscuitMistralPot.png?h=hash",value:"MISTRAL_GROUPED_ORDER",description:CATEGORIE_POT_DESCRIPTION.MISTRAL_GROUPED_ORDER,header:HEADER_POT_DESCRIPTION.MISTRAL_GROUPED_ORDER}]}function P(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.DNC,img:"donsDansNosCoeursPot.png?h=hash",value:"DNC",description:CATEGORIE_POT_DESCRIPTION.DNC,header:HEADER_POT_DESCRIPTION.DNC}]}function E(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"bnc0.png?h=hash",value:"BIRTHDAY",description:CATEGORIE_POT_DESCRIPTION.BIRTHDAY,header:HEADER_POT_DESCRIPTION.BIRTHDAY},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"bnc1.png?h=hash",value:"DEPARTURE_KITTY",description:CATEGORIE_POT_DESCRIPTION.DEPARTURE_KITTY,header:HEADER_POT_DESCRIPTION.DEPARTURE_KITTY},{text:CATEGORIE_POT_LABELS.HOUSEWARMING,img:"bnc9.png?h=hash",value:"HOUSEWARMING",description:CATEGORIE_POT_DESCRIPTION.HOUSEWARMING,header:HEADER_POT_DESCRIPTION.HOUSEWARMING},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"bnc12.png?h=hash",value:"COMMON_GIFT",description:CATEGORIE_POT_DESCRIPTION.COMMON_GIFT,header:HEADER_POT_DESCRIPTION.COMMON_GIFT},{text:CATEGORIE_POT_LABELS.FRIENDS_EVENING,img:"bnc58.png?h=hash",value:"FRIENDS_EVENING",description:CATEGORIE_POT_DESCRIPTION.FRIENDS_EVENING,header:HEADER_POT_DESCRIPTION.FRIENDS_EVENING},{text:CATEGORIE_POT_LABELS.PARTY_HONEY_NIGHT,img:"bnc2.png?h=hash",value:"PARTY_HONEY_NIGHT",description:CATEGORIE_POT_DESCRIPTION.PARTY_HONEY_NIGHT,header:HEADER_POT_DESCRIPTION.PARTY_HONEY_NIGHT},{text:CATEGORIE_POT_LABELS.WEDDING_PACS_GIFT,img:"bnc44.png?h=hash",value:"WEDDING_PACS_GIFT",description:CATEGORIE_POT_DESCRIPTION.WEDDING_PACS_GIFT,header:HEADER_POT_DESCRIPTION.WEDDING_PACS_GIFT},{text:CATEGORIE_POT_LABELS.BABY_SHOWER,img:"bnc36.png?h=hash",value:"BABY_SHOWER",description:CATEGORIE_POT_DESCRIPTION.BABY_SHOWER,header:HEADER_POT_DESCRIPTION.BABY_SHOWER},{text:CATEGORIE_POT_LABELS.FRIENDSHOLIDAYS,img:"bnc7.png?h=hash",value:"FRIENDSHOLIDAYS",description:CATEGORIE_POT_DESCRIPTION.FRIENDSHOLIDAYS,header:HEADER_POT_DESCRIPTION.FRIENDSHOLIDAYS},{text:CATEGORIE_POT_LABELS.CULTURAL,img:"bnc52.png?h=hash",value:"CULTURAL",description:CATEGORIE_POT_DESCRIPTION.CULTURAL,header:HEADER_POT_DESCRIPTION.CULTURAL},{text:CATEGORIE_POT_LABELS.ENTREPRISE,img:"bnc53.png?h=hash",value:"ENTREPRISE",description:CATEGORIE_POT_DESCRIPTION.ENTREPRISE,header:HEADER_POT_DESCRIPTION.ENTREPRISE},{text:CATEGORIE_POT_LABELS.ENVIRONMENT,img:"bnc54.png?h=hash",value:"ENVIRONMENT",description:CATEGORIE_POT_DESCRIPTION.ENVIRONMENT,header:HEADER_POT_DESCRIPTION.ENVIRONMENT},{text:CATEGORIE_POT_LABELS.SOLIDARY_REGULAR,img:"bnc12.png?h=hash",value:"SOLIDARY_REGULAR",description:CATEGORIE_POT_DESCRIPTION.SOLIDARY_REGULAR,header:HEADER_POT_DESCRIPTION.SOLIDARY_REGULAR},{text:CATEGORIE_POT_LABELS.SPORTS,img:"bnc55.png?h=hash",value:"SPORTS",description:CATEGORIE_POT_DESCRIPTION.SPORTS,header:HEADER_POT_DESCRIPTION.SPORTS},{text:CATEGORIE_POT_LABELS.OTHER,img:"bnc14.png?h=hash",value:"OTHER",description:CATEGORIE_POT_DESCRIPTION.OTHER,header:HEADER_POT_DESCRIPTION.OTHER}]}function v(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"banque-tahiti0.png?h=hash",value:"BIRTHDAY",description:CATEGORIE_POT_DESCRIPTION.BIRTHDAY,header:HEADER_POT_DESCRIPTION.BIRTHDAY},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"banque-tahiti1.png?h=hash",value:"DEPARTURE_KITTY",description:CATEGORIE_POT_DESCRIPTION.DEPARTURE_KITTY,header:HEADER_POT_DESCRIPTION.DEPARTURE_KITTY},{text:CATEGORIE_POT_LABELS.NEWYEAR,img:"banque-tahiti16.png?h=hash",value:"NEWYEAR",description:CATEGORIE_POT_DESCRIPTION.NEWYEAR,header:HEADER_POT_DESCRIPTION.NEWYEAR},{text:CATEGORIE_POT_LABELS.PARTY_HONEY_NIGHT,img:"banque-tahiti2.png?h=hash",value:"PARTY_HONEY_NIGHT",description:CATEGORIE_POT_DESCRIPTION.PARTY_HONEY_NIGHT,header:HEADER_POT_DESCRIPTION.PARTY_HONEY_NIGHT},{text:CATEGORIE_POT_LABELS.HOUSEWARMING,img:"banque-tahiti9.png?h=hash",value:"HOUSEWARMING",description:CATEGORIE_POT_DESCRIPTION.HOUSEWARMING,header:HEADER_POT_DESCRIPTION.HOUSEWARMING},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"banque-tahiti12.png?h=hash",value:"COMMON_GIFT",description:CATEGORIE_POT_DESCRIPTION.COMMON_GIFT,header:HEADER_POT_DESCRIPTION.COMMON_GIFT},{text:CATEGORIE_POT_LABELS.EXAM_SUCCESS,img:"banque-tahiti48.png?h=hash",value:"EXAM_SUCCESS"},{text:CATEGORIE_POT_LABELS.BIRTH_GIFT,img:"banque-tahiti43.png?h=hash",value:"BIRTH_GIFT"},{text:CATEGORIE_POT_LABELS.BRINGUE,img:"banque-tahiti49.png?h=hash",value:"BRINGUE"},{text:CATEGORIE_POT_LABELS.OTHER,img:"banque-tahiti11.png?h=hash",value:"OTHER",description:CATEGORIE_POT_DESCRIPTION.OTHER,header:HEADER_POT_DESCRIPTION.OTHER}]}function C(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.NUMWORKS,img:"Numworks50.png?h=hash",value:"NUMWORKS",description:CATEGORIE_POT_DESCRIPTION.BIRTHDAY,header:HEADER_POT_DESCRIPTION.BIRTHDAY}]}function O(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.MACABANE,img:"defaultPot56.png?h=hash",value:"MACABANE",description:CATEGORIE_POT_DESCRIPTION.OTHER}]}function y(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"Pot12.png?h=hash",value:"COMMON_GIFT"},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"Pot1.png?h=hash",value:"DEPARTURE_KITTY"},{text:CATEGORIE_POT_LABELS.GIFT_BIRTH,img:"Pot45.png?h=hash",value:"GIFT_BIRTH"},{text:CATEGORIE_POT_LABELS.SOLIDARY_REGULAR,img:"Pot38.png?h=hash",value:"SOLIDARY_REGULAR"},{text:CATEGORIE_POT_LABELS.SCHOOL_TRIP,img:"Pot39.png?h=hash",value:"SCHOOL_TRIP"},{text:CATEGORIE_POT_LABELS.CHOCOLAT,img:"Pot40.png?h=hash",value:"CHOCOLAT"},{text:CATEGORIE_POT_LABELS.SAPIN,img:"Pot41.png?h=hash",value:"SAPIN"},{text:CATEGORIE_POT_LABELS.SALE,img:"Sale.png?h=hash",value:"SALE"}]}function w(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"Pot1.png?h=hash",value:"DEPARTURE_KITTY"},{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY"},{text:CATEGORIE_POT_LABELS.NEWYEAR,img:"Pot16.png?h=hash",value:"NEWYEAR"},{text:CATEGORIE_POT_LABELS.HOUSEWARMING,img:"Pot9.png?h=hash",value:"HOUSEWARMING"},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"Pot12.png?h=hash",value:"COMMON_GIFT"},{text:CATEGORIE_POT_LABELS.BIRTH_REGULAR,img:"Pot36.png?h=hash",value:"BIRTH_REGULAR"},{text:CATEGORIE_POT_LABELS.WEDDING_REGULAR,img:"Pot37.png?h=hash",value:"WEDDING_REGULAR"}]}function T(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"creditcooperatif0.png?h=hash",value:"BIRTHDAY"},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"creditcooperatif1.png?h=hash",value:"DEPARTURE_KITTY"},{text:CATEGORIE_POT_LABELS.NEWYEAR,img:"Pot16.png?h=hash",value:"NEWYEAR"},{text:CATEGORIE_POT_LABELS.PARTY_HONEY_NIGHT,img:"creditcooperatif2.png?h=hash",value:"PARTY_HONEY_NIGHT"},{text:CATEGORIE_POT_LABELS.HOUSEWARMING,img:"creditcooperatif9.png?h=hash",value:"HOUSEWARMING"},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"creditcooperatif12.png?h=hash",value:"COMMON_GIFT"},{text:CATEGORIE_POT_LABELS.FRIENDSHOLIDAYS,img:"creditcooperatif7.png?h=hash",value:"FRIENDSHOLIDAYS"},{text:CATEGORIE_POT_LABELS.BEREAVEMENT,img:"creditcooperatif6.png?h=hash",value:"BEREAVEMENT"},{text:CATEGORIE_POT_LABELS.THESIS,img:"creditcooperatif13.png?h=hash",value:"THESIS"},{text:CATEGORIE_POT_LABELS.BIRTH_REGULAR,img:"creditcooperatif36.png?h=hash",value:"BIRTH_REGULAR"},{text:CATEGORIE_POT_LABELS.WEDDING_REGULAR,img:"creditcooperatif37.png?h=hash",value:"WEDDING_REGULAR"}]}function I(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.PROFESSOR_GIFT,img:"Pot22.png?h=hash",value:"PROFESSOR_GIFT"},{text:CATEGORIE_POT_LABELS.BIRTHDAY_MASHAREECOLE,img:"Pot23.png?h=hash",value:"BIRTHDAY_MASHAREECOLE"},{text:CATEGORIE_POT_LABELS.PARENTS_EVENT,img:"Pot24.png?h=hash",value:"PARENTS_EVENT"},{text:CATEGORIE_POT_LABELS.GROUPED_PAYMENT,img:"Pot25.jpg?h=hash",value:"GROUPED_PAYMENT"},{text:CATEGORIE_POT_LABELS.PARENTS_ASSOCIATION,img:"Pot26.jpg?h=hash",value:"PARENTS_ASSOCIATION"},{text:CATEGORIE_POT_LABELS.FINANCE_PROJECT,img:"Pot27.jpg?h=hash",value:"FINANCE_PROJECT"},{text:CATEGORIE_POT_LABELS.OTHER_MASHAREECOLE,img:"Pot28.jpg?h=hash",value:"OTHER_MASHAREECOLE"}]}function b(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY"},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"Pot1.png?h=hash",value:"DEPARTURE_KITTY"},{text:CATEGORIE_POT_LABELS.HONEY_MOON,img:"Pot29.png?h=hash",value:"HONEY_MOON"},{text:CATEGORIE_POT_LABELS.HOUSEWARMING,img:"Pot9.png?h=hash",value:"HOUSEWARMING"},{text:CATEGORIE_POT_LABELS.FRIENDSHOLIDAYS,img:"Pot7.png?h=hash",value:"FRIENDSHOLIDAYS"},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"Pot12.png?h=hash",value:"COMMON_GIFT"}]}function S(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY"},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"Pot1.png?h=hash",value:"DEPARTURE_KITTY"},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"Pot12.png?h=hash",value:"COMMON_GIFT"},{text:CATEGORIE_POT_LABELS.BEREAVEMENT,img:"Pot6.png?h=hash",value:"BEREAVEMENT"},{text:CATEGORIE_POT_LABELS.WEDDING_PACS_GIFT,img:"Pot44.png?h=hash",value:"WEDDING_PACS_GIFT"},{text:CATEGORIE_POT_LABELS.BIRTH_GIFT,img:"Pot43.png?h=hash",value:"BIRTH_GIFT"},{text:CATEGORIE_POT_LABELS.CONVALESCENCE,img:"Pot42.png?h=hash",value:"CONVALESCENCE"}]}function A(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY",description:CATEGORIE_POT_DESCRIPTION.BIRTHDAY,header:HEADER_POT_DESCRIPTION.BIRTHDAY},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"Pot1.png?h=hash",value:"DEPARTURE_KITTY",description:CATEGORIE_POT_DESCRIPTION.DEPARTURE_KITTY,header:HEADER_POT_DESCRIPTION.DEPARTURE_KITTY},{text:CATEGORIE_POT_LABELS.NEWYEAR,img:"Pot16.png?h=hash",value:"NEWYEAR",description:CATEGORIE_POT_DESCRIPTION.NEWYEAR,header:HEADER_POT_DESCRIPTION.NEWYEAR},{text:CATEGORIE_POT_LABELS.PARTY_HONEY_NIGHT,img:"Pot2.png?h=hash",value:"PARTY_HONEY_NIGHT",description:CATEGORIE_POT_DESCRIPTION.PARTY_HONEY_NIGHT,header:HEADER_POT_DESCRIPTION.PARTY_HONEY_NIGHT},{text:CATEGORIE_POT_LABELS.HOUSEWARMING,img:"Pot9.png?h=hash",value:"HOUSEWARMING",description:CATEGORIE_POT_DESCRIPTION.HOUSEWARMING,header:HEADER_POT_DESCRIPTION.HOUSEWARMING},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"Pot12.png?h=hash",value:"COMMON_GIFT",description:CATEGORIE_POT_DESCRIPTION.COMMON_GIFT,header:HEADER_POT_DESCRIPTION.COMMON_GIFT},{text:CATEGORIE_POT_LABELS.FRIENDSHOLIDAYS,img:"Pot7.png?h=hash",value:"FRIENDSHOLIDAYS",description:CATEGORIE_POT_DESCRIPTION.FRIENDSHOLIDAYS,header:HEADER_POT_DESCRIPTION.FRIENDSHOLIDAYS},{text:CATEGORIE_POT_LABELS.BEREAVEMENT,img:"Pot6.png?h=hash",value:"BEREAVEMENT",description:CATEGORIE_POT_DESCRIPTION.BEREAVEMENT,header:HEADER_POT_DESCRIPTION.BEREAVEMENT},{text:CATEGORIE_POT_LABELS.BABY_SHOWER,img:"Pot57.png?h=hash",value:"BABY_SHOWER",description:CATEGORIE_POT_DESCRIPTION.BABY_SHOWER,header:HEADER_POT_DESCRIPTION.BABY_SHOWER},{text:CATEGORIE_POT_LABELS.THESIS,img:"Pot13.png?h=hash",value:"THESIS",description:CATEGORIE_POT_DESCRIPTION.THESIS,header:HEADER_POT_DESCRIPTION.THESIS},{text:CATEGORIE_POT_LABELS.GROUPED_ORDER,img:"Pot51.png?h=hash",value:"GROUPED_ORDER",description:CATEGORIE_POT_DESCRIPTION.GROUPED_ORDER,header:HEADER_POT_DESCRIPTION.GROUPED_ORDER},{text:CATEGORIE_POT_LABELS.BIRTH,img:"Birth.png?h=hash",value:"BIRTH",description:CATEGORIE_POT_DESCRIPTION.BIRTH,header:HEADER_POT_DESCRIPTION.BIRTH},{text:CATEGORIE_POT_LABELS.WEDDING,img:"Wedding.png?h=hash",value:"WEDDING",description:CATEGORIE_POT_DESCRIPTION.WEDDING,header:HEADER_POT_DESCRIPTION.WEDDING},{text:CATEGORIE_POT_LABELS.SALE,img:"Sale.png?h=hash",value:"SALE",description:CATEGORIE_POT_DESCRIPTION.SALE,header:HEADER_POT_DESCRIPTION.SALE}]}function R(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:"undefined"!=typeof CATEGORIE_POT_DESCRIPTION&&"undefined"!=typeof HEADER_POT_DESCRIPTION?[{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY",description:CATEGORIE_POT_DESCRIPTION.BIRTHDAY,header:HEADER_POT_DESCRIPTION.BIRTHDAY},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"Pot1.png?h=hash",value:"DEPARTURE_KITTY",description:CATEGORIE_POT_DESCRIPTION.DEPARTURE_KITTY,header:HEADER_POT_DESCRIPTION.DEPARTURE_KITTY},{text:CATEGORIE_POT_LABELS.GIFT_BIRTH,img:"Pot45.png?h=hash",value:"GIFT_BIRTH",description:CATEGORIE_POT_DESCRIPTION.GIFT_BIRTH,header:HEADER_POT_DESCRIPTION.GIFT_BIRTH},{text:CATEGORIE_POT_LABELS.NEWYEAR,img:"Pot16.png?h=hash",value:"NEWYEAR",description:CATEGORIE_POT_DESCRIPTION.NEWYEAR,header:HEADER_POT_DESCRIPTION.NEWYEAR},{text:CATEGORIE_POT_LABELS.PARTY_HONEY_NIGHT,img:"Pot2.png?h=hash",value:"PARTY_HONEY_NIGHT",description:CATEGORIE_POT_DESCRIPTION.PARTY_HONEY_NIGHT,header:HEADER_POT_DESCRIPTION.PARTY_HONEY_NIGHT},{text:CATEGORIE_POT_LABELS.HOUSEWARMING,img:"Pot9.png?h=hash",value:"HOUSEWARMING",description:CATEGORIE_POT_DESCRIPTION.HOUSEWARMING,header:HEADER_POT_DESCRIPTION.HOUSEWARMING},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"Pot12.png?h=hash",value:"COMMON_GIFT",description:CATEGORIE_POT_DESCRIPTION.COMMON_GIFT,header:HEADER_POT_DESCRIPTION.COMMON_GIFT},{text:CATEGORIE_POT_LABELS.FRIENDSHOLIDAYS,img:"Pot7.png?h=hash",value:"FRIENDSHOLIDAYS",description:CATEGORIE_POT_DESCRIPTION.FRIENDSHOLIDAYS,header:HEADER_POT_DESCRIPTION.FRIENDSHOLIDAYS},{text:CATEGORIE_POT_LABELS.BEREAVEMENT,img:"Pot6.png?h=hash",value:"BEREAVEMENT",description:CATEGORIE_POT_DESCRIPTION.BEREAVEMENT,header:HEADER_POT_DESCRIPTION.BEREAVEMENT},{text:CATEGORIE_POT_LABELS.BABY_SHOWER,img:"Pot57.png?h=hash",value:"BABY_SHOWER",description:CATEGORIE_POT_DESCRIPTION.BABY_SHOWER,header:HEADER_POT_DESCRIPTION.BABY_SHOWER},{text:CATEGORIE_POT_LABELS.THESIS,img:"Pot13.png?h=hash",value:"THESIS",description:CATEGORIE_POT_DESCRIPTION.THESIS,header:HEADER_POT_DESCRIPTION.THESIS},{text:CATEGORIE_POT_LABELS.GROUPED_ORDER,img:"Pot51.png?h=hash",value:"GROUPED_ORDER",description:CATEGORIE_POT_DESCRIPTION.GROUPED_ORDER,header:HEADER_POT_DESCRIPTION.GROUPED_ORDER},{text:CATEGORIE_POT_LABELS.BIRTH,img:"Birth.png?h=hash",value:"BIRTH",description:CATEGORIE_POT_DESCRIPTION.BIRTH,header:HEADER_POT_DESCRIPTION.BIRTH},{text:CATEGORIE_POT_LABELS.WEDDING,img:"Wedding.png?h=hash",value:"WEDDING",description:CATEGORIE_POT_DESCRIPTION.WEDDING,header:HEADER_POT_DESCRIPTION.WEDDING},{text:CATEGORIE_POT_LABELS.SALE,img:"Sale.png?h=hash",value:"SALE",description:CATEGORIE_POT_DESCRIPTION.SALE,header:HEADER_POT_DESCRIPTION.SALE}]:[{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY"},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"Pot1.png?h=hash",value:"DEPARTURE_KITTY"},{text:CATEGORIE_POT_LABELS.GIFT_BIRTH,img:"Pot45.png?h=hash",value:"GIFT_BIRTH"},{text:CATEGORIE_POT_LABELS.NEWYEAR,img:"Pot16.png?h=hash",value:"NEWYEAR"},{text:CATEGORIE_POT_LABELS.PARTY_HONEY_NIGHT,img:"Pot2.png?h=hash",value:"PARTY_HONEY_NIGHT"},{text:CATEGORIE_POT_LABELS.HOUSEWARMING,img:"Pot9.png?h=hash",value:"HOUSEWARMING"},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"Pot12.png?h=hash",value:"COMMON_GIFT"},{text:CATEGORIE_POT_LABELS.FRIENDSHOLIDAYS,img:"Pot7.png?h=hash",value:"FRIENDSHOLIDAYS"},{text:CATEGORIE_POT_LABELS.BEREAVEMENT,img:"Pot6.png?h=hash",value:"BEREAVEMENT"},{text:CATEGORIE_POT_LABELS.BABY_SHOWER,img:"Pot57.png?h=hash",value:"BABY_SHOWER"},{text:CATEGORIE_POT_LABELS.THESIS,img:"Pot13.png?h=hash",value:"THESIS"},{text:CATEGORIE_POT_LABELS.BIRTH,img:"Birth.png?h=hash",value:"BIRTH"},{text:CATEGORIE_POT_LABELS.WEDDING,img:"Wedding.png?h=hash",value:"WEDDING"},{text:CATEGORIE_POT_LABELS.SALE,img:"Sale.png?h=hash",value:"SALE"}]}function k(){return"undefined"==typeof SOLIDARY_KITTIES_CATEGORIES_LABELS?[]:[{text:SOLIDARY_KITTIES_CATEGORIES_LABELS.ANIMALS,img:"Solidary0.png",value:"ANIMALS"},{text:SOLIDARY_KITTIES_CATEGORIES_LABELS.ASSOCIATION,img:"Solidary1.png",value:"ASSOCIATION"},{text:SOLIDARY_KITTIES_CATEGORIES_LABELS.HUMANITARIAN,img:"Solidary2.png",value:"HUMANITARIAN"},{text:SOLIDARY_KITTIES_CATEGORIES_LABELS.SOLIDARITY,img:"Solidary3.png",value:"SOLIDARITY"},{text:SOLIDARY_KITTIES_CATEGORIES_LABELS.TOPICALITY,img:"Solidary4.png",value:"TOPICALITY"},{text:SOLIDARY_KITTIES_CATEGORIES_LABELS.MEDICAL,img:"Solidary5.png",value:"MEDICAL"},{text:SOLIDARY_KITTIES_CATEGORIES_LABELS.PROJECTS,img:"Solidary6.png",value:"PROJECTS"},{text:SOLIDARY_KITTIES_CATEGORIES_LABELS.VARIOUS,img:"Solidary7.png",value:"VARIOUS"}]}function _(){return"undefined"==typeof SOLIDARY_KITTIES_CATEGORIES_LABELS?[]:[{text:SOLIDARY_KITTIES_CATEGORIES_LABELS.SOCIAL,img:"SolidaryCreditCop8.png",value:"SOCIAL"},{text:SOLIDARY_KITTIES_CATEGORIES_LABELS.HUMANITARIAN,img:"SolidaryCreditCop2.png",value:"HUMANITARIAN"},{text:SOLIDARY_KITTIES_CATEGORIES_LABELS.CULTURE,img:"SolidaryCreditCop9.png",value:"CULTURE"},{text:SOLIDARY_KITTIES_CATEGORIES_LABELS.TEACHING,img:"SolidaryCreditCop10.png",value:"TEACHING"},{text:SOLIDARY_KITTIES_CATEGORIES_LABELS.ENVIRONMENT,img:"SolidaryCreditCop11.png",value:"ENVIRONMENT"},{text:SOLIDARY_KITTIES_CATEGORIES_LABELS.SOLIDARITY,img:"SolidaryCreditCop12.png",value:"SOLIDARITY"},{text:SOLIDARY_KITTIES_CATEGORIES_LABELS.INNOVATION,img:"SolidaryCreditCop3.png",value:"INNOVATION"},{text:SOLIDARY_KITTIES_CATEGORIES_LABELS.LOCAL_LIFE,img:"SolidaryCreditCop13.png",value:"LOCAL_LIFE"}]}function e(e){var t=N();if(void 0!==e)t.page=e;else{if(!t||void 0===t.page)return!0;delete t.page}angular.equals({},t)?(window.location.hash="#",setTimeout(function(){M()},0)):window.location.hash="/?"+x(t),jQuery("html, body").animate({scrollTop:0},0)}function D(){return"undefined"==typeof CATEGORIE_POT_LABELS||"undefined"==typeof CATEGORIE_POT_DESCRIPTION||"undefined"==typeof HEADER_POT_DESCRIPTION?[]:[{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY",description:CATEGORIE_POT_DESCRIPTION.BIRTHDAY,header:HEADER_POT_DESCRIPTION.BIRTHDAY},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"Pot1.png?h=hash",value:"DEPARTURE_KITTY",description:CATEGORIE_POT_DESCRIPTION.DEPARTURE_KITTY,header:HEADER_POT_DESCRIPTION.DEPARTURE_KITTY},{text:CATEGORIE_POT_LABELS.GIFT_BIRTH,img:"Pot45.png?h=hash",value:"GIFT_BIRTH",description:CATEGORIE_POT_DESCRIPTION.GIFT_BIRTH,header:HEADER_POT_DESCRIPTION.GIFT_BIRTH},{text:CATEGORIE_POT_LABELS.NEWYEAR,img:"Pot16.png?h=hash",value:"NEWYEAR",description:CATEGORIE_POT_DESCRIPTION.NEWYEAR,header:HEADER_POT_DESCRIPTION.NEWYEAR},{text:CATEGORIE_POT_LABELS.PARTY_HONEY_NIGHT,img:"Pot45.png?h=hash",value:"PARTY_HONEY_NIGHT",description:CATEGORIE_POT_DESCRIPTION.PARTY_HONEY_NIGHT,header:HEADER_POT_DESCRIPTION.PARTY_HONEY_NIGHT},{text:CATEGORIE_POT_LABELS.HOUSEWARMING,img:"Pot9.png?h=hash",value:"HOUSEWARMING",description:CATEGORIE_POT_DESCRIPTION.HOUSEWARMING,header:HEADER_POT_DESCRIPTION.HOUSEWARMING},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"Pot12.png?h=hash",value:"COMMON_GIFT",description:CATEGORIE_POT_DESCRIPTION.COMMON_GIFT,header:HEADER_POT_DESCRIPTION.COMMON_GIFT},{text:CATEGORIE_POT_LABELS.FRIENDSHOLIDAYS,img:"Pot7.png?h=hash",value:"FRIENDSHOLIDAYS",description:CATEGORIE_POT_DESCRIPTION.FRIENDSHOLIDAYS,header:HEADER_POT_DESCRIPTION.FRIENDSHOLIDAYS},{text:CATEGORIE_POT_LABELS.BEREAVEMENT,img:"Pot6.png?h=hash",value:"BEREAVEMENT",description:CATEGORIE_POT_DESCRIPTION.BEREAVEMENT,header:HEADER_POT_DESCRIPTION.BEREAVEMENT},{text:CATEGORIE_POT_LABELS.BABY_SHOWER,img:"Pot57.png?h=hash",value:"BABY_SHOWER",description:CATEGORIE_POT_DESCRIPTION.BABY_SHOWER,header:HEADER_POT_DESCRIPTION.BABY_SHOWER},{text:CATEGORIE_POT_LABELS.THESIS,img:"Pot13.png?h=hash",value:"THESIS",description:CATEGORIE_POT_DESCRIPTION.THESIS,header:HEADER_POT_DESCRIPTION.THESIS},{text:CATEGORIE_POT_LABELS.BIRTH,img:"Birth.png?h=hash",value:"BIRTH",description:CATEGORIE_POT_DESCRIPTION.BIRTH,header:HEADER_POT_DESCRIPTION.BIRTH},{text:CATEGORIE_POT_LABELS.WEDDING,img:"Wedding.png?h=hash",value:"WEDDING",description:CATEGORIE_POT_DESCRIPTION.WEDDING,header:HEADER_POT_DESCRIPTION.WEDDING}]}var L=function(){var e,t={};try{e=decodeURIComponent(window.location.search.substring(1).replace(/\+/g,"%20"))}catch(e){return{}}for(var o=e.split("&"),n=0;n<o.length;n++){var i,a=o[n].split("=");void 0===t[a[0]]?t[a[0]]=a[1]:"string"==typeof t[a[0]]?(i=[t[a[0]],a[1]],t[a[0]]=i):t[a[0]].push(a[1])}return t}(),x=function(e){if(!angular.isObject(e))return null==e?"":e.toString();var t,o,n=[];for(t in e)e.hasOwnProperty(t)&&(o=e[t],n.push(encodeURIComponent(t)+"="+encodeURIComponent(null==o?"":o)));return n.join("&").replace(/%20/g,"+")},M=function(){var e,t=window.location;"pushState"in window.history?window.history.pushState("",window.document.title,t.pathname+t.search):(t=window.document.body.scrollTop,e=window.document.body.scrollLeft,window.location.hash="#",window.document.body.scrollTop=t,window.document.body.scrollLeft=e)},N=function(){var e=window.location.hash,t={};if(e)for(var o=e.replace(/[#?/]+/,"").split("&"),n=0,i=o.length;n<i;n++){var a=o[n].split("=");t[a[0]]=a[1]}return t};return{setUrlParameter:function(e,t){o(window.location.hash)[e]?window.location.hash=window.location.hash.replace(new RegExp(e+"=[^&]*","g"),e+"="+encodeURIComponent(t)):(e=e,t=encodeURIComponent(t),-1!=window.location.hash.indexOf("?")?window.location.hash=window.location.hash+"&"+e+"="+t:window.location.hash=window.location.hash+"?"+e+"="+t)},isPcScreen:function(){return 1e3<jQuery(window).width()},cookieEnabled:function(){var e=!!navigator.cookieEnabled;return void 0!==navigator.cookieEnabled||e||(document.cookie="testcookie",e=-1!=document.cookie.indexOf("testcookie")),!!e},pot:{facebook:{openSharer:function(e,t,o,n){var i=screen.height/2-n/2,a=screen.width/2-o/2;"facebook"==e?window.open("http://www.facebook.com/sharer.php?u="+t,"sharer","top="+i+",left="+a+",toolbar=0,status=0,width="+o+",height="+n):"facebook-mobile"==e?window.open("http://m.facebook.com/sharer.php?u="+t,"sharer"):"messenger-mobile"==e?window.open("fb-messenger://share/?link="+t,"_top","sharer"):"twitter-desktop"==e?window.open("https://twitter.com/intent/tweet?text="+t,"sharer","top="+i+",left="+a+",toolbar=0,status=0,width="+o+",height="+n):"twitter-mobile"==e?window.open("https://twitter.com/intent/tweet?text="+t,"_top","sharer"):"whatsapp-mobile"==e?window.open("whatsapp://send?text="+t,"_top","sharer"):"whatsapp-desktop"==e?window.open("https://web.whatsapp.com/send?text="+t,"_blank"):"google"==e&&window.open("https://plus.google.com/share?url="+t,"sharer","top="+i+",left="+a+",toolbar=0,status=0,width="+o+",height="+n)}},formatClient:function(e){return e.commisionTypePO=e.commissionIncludedPO?"INCLUDED":"CLIENT","SUGGESTED"==e.op7TypeContributionPO?e.op7AmountContributionPOS=e.op7AmountContributionPO:"FIXED"==e.op7TypeContributionPO&&(e.op7AmountContributionPOF=e.op7AmountContributionPO),null!=e.subdomainCreationPO?"mashareecole"==e.subdomainCreationPO?e.categoryPO=d(I(),e.categoryPO):"relaischateaux"==e.subdomainCreationPO?e.categoryPO=d(b(),e.categoryPO):"cen"==e.subdomainCreationPO?e.categoryPO=d(S(),e.categoryPO):"creditcooperatif"==e.subdomainCreationPO?e.categoryPO=d(T(),e.categoryPO):"ouest-banquepopulaire"==e.subdomainCreationPO||"bpgo"==e.subdomainCreationPO?e.categoryPO=d(u(),e.categoryPO):"natixis"==e.subdomainCreationPO?e.categoryPO=d(p(),e.categoryPO):"decathlon"==e.subdomainCreationPO?e.categoryPO=d(w(),e.categoryPO):"apel"==e.subdomainCreationPO?e.categoryPO=d(y(),e.categoryPO):"izly"==e.subdomainCreationPO?e.categoryPO=d(f(),e.categoryPO):"natureetdecouvertes"==e.subdomainCreationPO?e.categoryPO=d(g(),e.categoryPO):"banque-tahiti"==e.subdomainCreationPO?e.categoryPO=d(v(),e.categoryPO):"bnc"==e.subdomainCreationPO?e.categoryPO=d(E(),e.categoryPO):"biscuitmistral"==e.subdomainCreationPO?e.categoryPO=d(h(),e.categoryPO):"donsdansnoscoeurs"==e.subdomainCreationPO?e.categoryPO=d(P(),e.categoryPO):"numworks"==e.subdomainCreationPO?e.categoryPO=d(C(),e.categoryPO):e.subdomainCreationPO===a.subdomains.MACABANE?e.categoryPO=d(O(),e.categoryPO):e.subdomainCreationPO===a.subdomains.HOTELSPREFERENCE?e.categoryPO=d(m(),e.categoryPO):e.subdomainCreationPO===a.subdomains.CRITEO||e.subdomainCreationPO===a.subdomains.COPINES_DE_VOYAGE||e.subdomainCreationPO===a.subdomains.DANSNOSCOEURS||e.subdomainCreationPO===a.subdomains.GUERI_D_UN_CANCER?e.categoryPO=d(A(),e.categoryPO):e.categoryPO=d(R(),e.categoryPO):"DE"==window.domain?e.categoryPO=d(D(),e.categoryPO):e.categoryPO=d(R(),e.categoryPO),null!=e.subdomainCreationPO?"creditcooperatif"==e.subdomainCreationPO?e.solidaryCategoryPO=d(_(),e.solidaryCategoryPO):"izly"==e.subdomainCreationPO&&(e.solidaryCategoryPO=d(k(),e.solidaryCategoryPO)):e.solidaryCategoryPO=d(k(),e.solidaryCategoryPO),e.op6DateLimitePO=t(e.op6DateLimitePO),e.position={x:e.positionXPhotoPO,y:e.positionYPhotoPO,w:e.widthPhotoPO},null==e.photoPO||c(e.photoPO)||(e.photoPO="/photo/"+e.photoPO),e},initCategoryArray:function(){return"undefined"==typeof CATEGORIE_POT_LABELS||"undefined"==typeof CATEGORIE_POT_DESCRIPTION||"undefined"==typeof HEADER_POT_DESCRIPTION?[]:[{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY",description:CATEGORIE_POT_DESCRIPTION.BIRTHDAY,header:HEADER_POT_DESCRIPTION.BIRTHDAY},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"Pot1.png?h=hash",value:"DEPARTURE_KITTY",description:CATEGORIE_POT_DESCRIPTION.DEPARTURE_KITTY,header:HEADER_POT_DESCRIPTION.DEPARTURE_KITTY},{text:CATEGORIE_POT_LABELS.GIFT_BIRTH,img:"Pot45.png?h=hash",value:"GIFT_BIRTH",description:CATEGORIE_POT_DESCRIPTION.GIFT_BIRTH,header:HEADER_POT_DESCRIPTION.GIFT_BIRTH},{text:CATEGORIE_POT_LABELS.PARTY_HONEY_NIGHT,img:"Pot2.png?h=hash",value:"PARTY_HONEY_NIGHT",description:CATEGORIE_POT_DESCRIPTION.PARTY_HONEY_NIGHT,header:HEADER_POT_DESCRIPTION.PARTY_HONEY_NIGHT},{text:CATEGORIE_POT_LABELS.REPAY,img:"Pot19.png?h=hash",value:"REPAY",description:CATEGORIE_POT_DESCRIPTION.REPAY,header:HEADER_POT_DESCRIPTION.REPAY},{text:CATEGORIE_POT_LABELS.HOUSEWARMING,img:"Pot9.png?h=hash",value:"HOUSEWARMING",description:CATEGORIE_POT_DESCRIPTION.HOUSEWARMING,header:HEADER_POT_DESCRIPTION.HOUSEWARMING},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"Pot12.png?h=hash",value:"COMMON_GIFT",description:CATEGORIE_POT_DESCRIPTION.COMMON_GIFT,header:HEADER_POT_DESCRIPTION.COMMON_GIFT},{text:CATEGORIE_POT_LABELS.FRIENDSHOLIDAYS,img:"Pot7.png?h=hash",value:"FRIENDSHOLIDAYS",description:CATEGORIE_POT_DESCRIPTION.FRIENDSHOLIDAYS,header:HEADER_POT_DESCRIPTION.FRIENDSHOLIDAYS},{text:CATEGORIE_POT_LABELS.BEREAVEMENT,img:"Pot6.png?h=hash",value:"BEREAVEMENT",description:CATEGORIE_POT_DESCRIPTION.BEREAVEMENT,header:HEADER_POT_DESCRIPTION.BEREAVEMENT},{text:CATEGORIE_POT_LABELS.BABY_SHOWER,img:"Pot57.png?h=hash",value:"BABY_SHOWER",description:CATEGORIE_POT_DESCRIPTION.BABY_SHOWER,header:HEADER_POT_DESCRIPTION.BABY_SHOWER},{text:CATEGORIE_POT_LABELS.THESIS,img:"Pot13.png?h=hash",value:"THESIS",description:CATEGORIE_POT_DESCRIPTION.THESIS,header:HEADER_POT_DESCRIPTION.THESIS},{text:CATEGORIE_POT_LABELS.GROUPED_ORDER,img:"Pot51.png?h=hash",value:"GROUPED_ORDER",description:CATEGORIE_POT_DESCRIPTION.GROUPED_ORDER,header:HEADER_POT_DESCRIPTION.GROUPED_ORDER},{text:CATEGORIE_POT_LABELS.BIRTH,img:"Birth.png?h=hash",value:"BIRTH",description:CATEGORIE_POT_DESCRIPTION.BIRTH,header:HEADER_POT_DESCRIPTION.BIRTH},{text:CATEGORIE_POT_LABELS.WEDDING,img:"Wedding.png?h=hash",value:"WEDDING",description:CATEGORIE_POT_DESCRIPTION.WEDDING,header:HEADER_POT_DESCRIPTION.WEDDING},{text:CATEGORIE_POT_LABELS.SALE,img:"Sale.png?h=hash",value:"SALE",description:CATEGORIE_POT_DESCRIPTION.SALE,header:HEADER_POT_DESCRIPTION.SALE}]},initVvfVillagesCategoryArray:function(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY"},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"Pot1.png?h=hash",value:"DEPARTURE_KITTY"},{text:CATEGORIE_POT_LABELS.PARTY_HONEY_NIGHT,img:"Pot2.png?h=hash",value:"PARTY_HONEY_NIGHT"},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"Pot12.png?h=hash",value:"COMMON_GIFT"},{text:CATEGORIE_POT_LABELS.FRIENDSHOLIDAYS,img:"Pot7.png?h=hash",value:"FRIENDSHOLIDAYS"},{text:CATEGORIE_POT_LABELS.THESIS,img:"Pot13.png?h=hash",value:"THESIS"}]},initMashareecoleCategoryArray:I,initRelaisChateauCategoryArray:b,initCfvCategoryArray:function(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.CFV_WEDDING,img:"wedding-mini.jpg?h=hash",value:"CFV_WEDDING"},{text:CATEGORIE_POT_LABELS.CFV_PACS,img:"pacs-mini.jpg?h=hash",value:"CFV_PACS"},{text:CATEGORIE_POT_LABELS.CFV_GIFTS,img:"gift-mini.jpg?h=hash",value:"CFV_GIFTS"}]},initCaisseEpargneNormandieCategoryArray:S,initCadostoreCategoryArray:function(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY"},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"Pot1.png?h=hash",value:"DEPARTURE_KITTY"},{text:CATEGORIE_POT_LABELS.HOUSEWARMING,img:"Pot9.png?h=hash",value:"HOUSEWARMING"},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"Pot12.png?h=hash",value:"COMMON_GIFT"}]},initOuestBanquePopulaireCategoryArray:u,initNatixisCategoryArray:p,initIzlyCategoryArray:f,initNatureetdecouvertesCategoryArray:g,initBanqueDeTahitiCategoryArray:v,initBanqueDeNouvelleCaledonieCategoryArray:E,initBiscuitMistralCategoryArray:h,initDncCategoryArray:P,initNumworksCategoryArray:C,initMacabaneCategoryArray:O,initApelCategoryArray:y,initDecathlonCategoryArray:w,initCreditCooperatifCategoryArray:T,initHotelsPreferenceCategoryArray:m,initCriteoCategoryArray:A,initCategoryArrayWithoutRepay:R,initCategoryArrayLists:function(){return"undefined"==typeof CATEGORIE_POT_LABELS||"undefined"==typeof CATEGORIE_POT_DESCRIPTION||"undefined"==typeof HEADER_POT_DESCRIPTION?[]:[{text:CATEGORIE_POT_LABELS.BIRTH,img:"Birth.png?h=hash",value:"BIRTH",description:CATEGORIE_POT_DESCRIPTION.BIRTH,header:HEADER_POT_DESCRIPTION.BIRTH},{text:CATEGORIE_POT_LABELS.WEDDING,img:"Wedding.png?h=hash",value:"WEDDING",description:CATEGORIE_POT_DESCRIPTION.WEDDING,header:HEADER_POT_DESCRIPTION.WEDDING},{text:CATEGORIE_POT_LABELS.SALE,img:"Sale.png?h=hash",value:"SALE",description:CATEGORIE_POT_DESCRIPTION.SALE,header:HEADER_POT_DESCRIPTION.SALE},{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY",description:CATEGORIE_POT_DESCRIPTION.BIRTHDAY,header:HEADER_POT_DESCRIPTION.BIRTHDAY},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"Pot1.png?h=hash",value:"DEPARTURE_KITTY",description:CATEGORIE_POT_DESCRIPTION.SOLIDARY_KITTY,header:HEADER_POT_DESCRIPTION.DEPARTURE_KITTY},{text:CATEGORIE_POT_LABELS.GIFT_BIRTH,img:"Pot45.png?h=hash",value:"GIFT_BIRTH",description:CATEGORIE_POT_DESCRIPTION.GIFT_BIRTH,header:HEADER_POT_DESCRIPTION.GIFT_BIRTH},{text:CATEGORIE_POT_LABELS.NEWYEAR,img:"Pot16.png?h=hash",value:"NEWYEAR",description:CATEGORIE_POT_DESCRIPTION.NEWYEAR,header:HEADER_POT_DESCRIPTION.NEWYEAR},{text:CATEGORIE_POT_LABELS.PARTY_HONEY_NIGHT,img:"Pot2.png?h=hash",value:"PARTY_HONEY_NIGHT",description:CATEGORIE_POT_DESCRIPTION.PARTY_HONEY_NIGHT,header:HEADER_POT_DESCRIPTION.PARTY_HONEY_NIGHT},{text:CATEGORIE_POT_LABELS.REPAY,img:"Pot19.png?h=hash",value:"REPAY",description:CATEGORIE_POT_DESCRIPTION.REPAY,header:HEADER_POT_DESCRIPTION.REPAY},{text:CATEGORIE_POT_LABELS.HOUSEWARMING,img:"Pot9.png?h=hash",value:"HOUSEWARMING",description:CATEGORIE_POT_DESCRIPTION.HOUSEWARMING,header:HEADER_POT_DESCRIPTION.HOUSEWARMING},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"Pot12.png?h=hash",value:"COMMON_GIFT",description:CATEGORIE_POT_DESCRIPTION.COMMON_GIFT,header:HEADER_POT_DESCRIPTION.COMMON_GIFT},{text:CATEGORIE_POT_LABELS.FRIENDSHOLIDAYS,img:"Pot7.png?h=hash",value:"FRIENDSHOLIDAYS",description:CATEGORIE_POT_DESCRIPTION.FRIENDSHOLIDAYS,header:HEADER_POT_DESCRIPTION.FRIENDSHOLIDAYS},{text:CATEGORIE_POT_LABELS.BEREAVEMENT,img:"Pot6.png?h=hash",value:"BEREAVEMENT",description:CATEGORIE_POT_DESCRIPTION.BEREAVEMENT,header:HEADER_POT_DESCRIPTION.BEREAVEMENT},{text:CATEGORIE_POT_LABELS.BABY_SHOWER,img:"Pot57.png?h=hash",value:"BABY_SHOWER",description:CATEGORIE_POT_DESCRIPTION.BABY_SHOWER,header:HEADER_POT_DESCRIPTION.BABY_SHOWER},{text:CATEGORIE_POT_LABELS.THESIS,img:"Pot13.png?h=hash",value:"THESIS",description:CATEGORIE_POT_DESCRIPTION.THESIS,header:HEADER_POT_DESCRIPTION.THESIS}]},initCategoryArraySale:function(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.SALE,img:"Sale.png?h=hash",value:"SALE"},{text:CATEGORIE_POT_LABELS.BIRTH,img:"Birth.png?h=hash",value:"BIRTH"},{text:CATEGORIE_POT_LABELS.WEDDING,img:"Wedding.png?h=hash",value:"WEDDING"},{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:"Pot0.png?h=hash",value:"BIRTHDAY"},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:"Pot1.png?h=hash",value:"DEPARTURE_KITTY"},{text:CATEGORIE_POT_LABELS.GIFT_BIRTH,img:"Pot45.png?h=hash",value:"GIFT_BIRTH"},{text:CATEGORIE_POT_LABELS.NEWYEAR,img:"Pot16.png?h=hash",value:"NEWYEAR"},{text:CATEGORIE_POT_LABELS.PARTY_HONEY_NIGHT,img:"Pot2.png?h=hash",value:"PARTY_HONEY_NIGHT"},{text:CATEGORIE_POT_LABELS.REPAY,img:"Pot19.png?h=hash",value:"REPAY"},{text:CATEGORIE_POT_LABELS.HOUSEWARMING,img:"Pot9.png?h=hash",value:"HOUSEWARMING"},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:"Pot12.png?h=hash",value:"COMMON_GIFT"},{text:CATEGORIE_POT_LABELS.FRIENDSHOLIDAYS,img:"Pot7.png?h=hash",value:"FRIENDSHOLIDAYS"},{text:CATEGORIE_POT_LABELS.BEREAVEMENT,img:"Pot6.png?h=hash",value:"BEREAVEMENT"},{text:CATEGORIE_POT_LABELS.BABY_SHOWER,img:"Pot57.png?h=hash",value:"BABY_SHOWER"},{text:CATEGORIE_POT_LABELS.THESIS,img:"Pot13.png?h=hash",value:"THESIS"}]},initCategoryArrayListsReduced:function(){return"undefined"==typeof CATEGORIE_POT_LABELS?[]:[{text:CATEGORIE_POT_LABELS.BIRTH,img:"Birth.png?h=hash",value:"BIRTH"},{text:CATEGORIE_POT_LABELS.WEDDING,img:"Wedding.png?h=hash",value:"WEDDING"}]},initSolidaryCategoryArray:k,initAssociationCategoryArray:_,getSelectedCategory:d,initSilverCategoriesArray:function(){return[{text:CATEGORIE_POT_LABELS.BIRTHDAY,img:a.subdomain,value:"BIRTHDAY"},{text:CATEGORIE_POT_LABELS.COMMON_GIFT,img:a.subdomain,value:"COMMON_GIFT"},{text:CATEGORIE_POT_LABELS.DEPARTURE_KITTY,img:a.subdomain,value:"DEPARTURE_KITTY"},,{text:CATEGORIE_POT_LABELS.GIFT_BIRTH,img:a.subdomain,value:"GIFT_BIRTH"},{text:CATEGORIE_POT_LABELS.OTHER,img:a.subdomain,value:"OTHER"}]},initCategoryArrayDE:D},sale:{formatClient:function(e){return e.commisionTypePO=e.commissionIncludedPO?"INCLUDED":"CLIENT",e.dateEventPO=t(e.dateEventPO),e.dateStartPO=t(e.dateStartPO),e.op6DateLimitePO=t(e.op6DateLimitePO),e.position={x:e.positionXPhotoPO,y:e.positionYPhotoPO,w:e.widthPhotoPO},null==e.photoPO||c(e.photoPO)||(e.photoPO="/photo/"+e.photoPO),e}},list:{formatClient:function(e){return e.commisionTypePO="undefined"==e.commissionIncludedPO||0==e.commissionIncludedPO?"CLIENT":"INCLUDED",e.dateEventPO=t(e.dateEventPO),e.position={x:e.positionXPhotoPO,y:e.positionYPhotoPO,w:e.widthPhotoPO},null==e.photoPO||c(e.photoPO)||(e.photoPO="/photo/"+e.photoPO),e}},kyc:{handleKycErrors:function(e,t,o,n,i){function a(e){return null!=e.contentWindow.angular}function r(e,t,o){var n,i,a,r=e.contentWindow.angular.element("#"+t).scope(),l=r.adressform;for(n in l.$setPristine(!0),console.log("setting address form"),o)o.hasOwnProperty(n)&&(r[n]=o[n],a=function(e,t){function o(e){return n.$setValidity(t,!0),n.$setValidity("serverError",!0),e}var n=e;n.$parsers.push(o),n.$formatters.push(o)},l[i=n.substring(5,6).toLowerCase()+n.substring(6,n.length)])&&(l[i].$setValidity("required",!o[n]),a(l[i],"required"));r.$$phase||r.$apply()}if(t&&t.data&&t.data.fieldErrors&&t.data.fieldErrors.length){for(var l={},s=(console.log(l),0),c=t.data.fieldErrors.length;s<c;s++)!t.data.fieldErrors[s].kyc||"needkycKycFloor"!=t.data.fieldErrors[s].kyc&&"lmneedkyc"!=t.data.fieldErrors[s].kyc&&"needkyc"!=t.data.fieldErrors[s].kyc||(e.collect||(e.collect={}),e.collect.showkyc=!0,e.collect.forceneedKyc=t.data.fieldErrors[s].kyc,setTimeout(function(){jQuery("#"+o).scrollToTop(!0)},0)),l.errorId||(l.errorId=null!=t.data.fieldErrors[s].kycid),l.errorKycUploaded||(l.errorKycUploaded=null!=t.data.fieldErrors[s].kycuploaded),l.errorAddressStreetPE||(l.errorAddressStreetPE=null!=t.data.fieldErrors[s].addressStreetPE),l.errorAddressZipCodePE||(l.errorAddressZipCodePE=null!=t.data.fieldErrors[s].addressZipCodePE),l.errorCountryPE||(l.errorCountryPE=null!=t.data.fieldErrors[s].countryPE),l.errorAddressCityPE||(l.errorAddressCityPE=null!=t.data.fieldErrors[s].addressCityPE);setTimeout(function(){var e=document.getElementById(i),t=angular.copy(l);e&&(console.log(a(e)),a(e)?r(e,n,t):angular.element(e).on("load",function(){r(e,n,t)})),l={}},0)}},handleKycErrorsNew:function(e,t,o){if(t&&t.data&&t.data.fieldErrors&&t.data.fieldErrors.length){console.log(t.data.fieldErrors);for(var n=0,i=t.data.fieldErrors.length;n<i;n++)!t.data.fieldErrors[n].kyc||"needkycKycFloor"!=t.data.fieldErrors[n].kyc&&"lmneedkyc"!=t.data.fieldErrors[n].kyc&&"needkyc"!=t.data.fieldErrors[n].kyc||(e.collect||(e.collect={}),e.collect.showkyc=!0,e.collect.forceneedKyc=t.data.fieldErrors[n].kyc,setTimeout(function(){$("html, body").animate({scrollTop:angular.element("#"+o).offset().top-50},500)},0))}}},formatDate:function(t){if(null==t)return null;if("string"!=typeof t)return n(t);try{var e=new Date(i(t));return n(e)}catch(e){throw console.error("invalid date format ["+i(t)+"]"),e}},getDate:t,getElementByData:function(e,t,o){var n;return angular.element(e).each(function(){if(angular.element(this).data(t)==o)return n=angular.element(this),!1}),n},getUrl:function(){if(0!==arguments.length){for(var e=arguments[0],t=1;t<arguments.length;t++)e=e.replace(new RegExp("\\{"+t+"\\}","g"),arguments[t]);return e}},getUrlWithArgs:function(){if(arguments&&0!==arguments.length&&0!==arguments[0].length){for(var e=arguments[0],t=e[0],o=1;o<e.length;o++)t=t.replace(new RegExp("\\{(.*?)\\}","g"),e[o]);return t}},computeCom:function(e,t){var o,n,i;return 0==e?0:"COMMISSION_OUT"==t.comTypePO?(i=s(t.comOutMaxPO),l(e*i)):(i=s(t.comFloorPO),o=s(t.com1PO),n=s(t.com2PO),t=s(t.comMinPO),i=0!=i&&i<=e?e*n:e*o,l(i=0!=t&&i<t?t:i))},fixFloat:l,toFloat:s,format:function(e){if(void 0===(e=e&&e.replace?e.replace(/,/g,"."):e)||isNaN(e)||null==e)return"";e=parseInt(e)==parseFloat(e)?""+e:e.toFixed&&e.toFixed(2).replace(/^0+([1-9])/,"$1")||e;try{if(e.split){var t=e.split(".");if(t.length){var o=t[0].length;if(4<=o)for(var n=o-4;0<=n;n-=3)t[0]=t[0].substring(0,n+1)+" "+t[0].substring(n+1);e=1<t.length?t[0]+"."+t[1]:t[0]}}}catch(e){}return e},parseHashGetParams:o,queryString:L,getUniq:function(e){void 0===e&&(e=8);for(var t="",o="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",n=0;n<e;n++)t+=o.charAt(Math.floor(Math.random()*o.length));return t},serializeData:x,handleTag:{resetPage:function(){void 0!==N().page&&e(void 0)},changePage:e,bindChange:function(i){angular.element(window).bind("hashchange",function(){var e,t,o,n=!1;for(e in i)i.hasOwnProperty(e)&&(t=i[e],(o=N()).page)&&o.page==e&&(a.page.index=t,n=!0);n||(a.page.index=0),a.$$phase||a.$apply()}).trigger("hashchange")},serachHash:N},copyAttribute:function(e,t,o){for(var n in e)e.hasOwnProperty(n)&&(o?(r=t,(i=e)[a=n].constructor===Array?r[a]=copyAttribute(i[a],[],!0):null!==i[a]&&"object"===_typeof(i[a])?r[a]=copyAttribute(i[a],{},!0):r[a]=i[a]):t[n]=e[n]);var i,a,r;return t},gift:{initOccasionGift:function(){return[{text:"Anniversaire",img:"gift/anniversaire.png",value:"BIRTHDAY"},{text:"Pot de départ",img:"gift/pot-de-depart.png",value:"DEPARTURE_KITTY"},{text:"EVG/EVJF",img:"gift/evg.png",value:"PARTY_HONEY_NIGHT"},{text:"Pendaison de crémaillère",img:"gift/cremaillere.png",value:"HOUSEWARMING"},{text:"Cadeau commun",img:"gift/cadeau-commun.png",value:"COMMON_GIFT"},{text:"Dettes entre amis",img:"gift/remboursement.png",value:"REPAY"},{text:"Cotisation",img:"gift/cotisation.png",value:"CONTRIBUTIONS"},{text:"Week-end vacances entre amis",img:"gift/vacances-entre-amis.png",value:"FRIENDSHOLIDAYS"},{text:"Voyage",img:"gift/voyage.png",value:"TRIP"},{text:"Collecte de dons",img:"gift/collecte-de-dons.png",value:"FUNDRAISING"},{text:"Obsèques",img:"gift/obseque.png",value:"BEREAVEMENT"},{text:"Autres",img:"gift/autre.png",value:"OTHER"}]}},datetime:r,prorata:function(e,t,o){return o*t/e}}}]),angular.module("lpc").factory("ErrorHandler",["ipCookie","$rootScope","PopupHandler",function(o,S,A){function R(e,t,o){var n,i,a=[];for(r in o=o||1,t)t.hasOwnProperty(r)&&e===r&&(n=t[r],a.push(n));if(o<2)for(var r in t)t.hasOwnProperty(r)&&(i=R(e,t[r],o+1))&&i.length&&(a=a.concat(i));return a.length&&a||!1}function n(e,t){if(e&&e.length)for(var o=0,n=e.length;o<n;o++){var i,a=e[o];for(i in a)if(a.hasOwnProperty(i)){var r=a[i];if("page"==i)I=r,b=t,_&&_.length&&0===I.indexOf("string:")?(I=I.replace(/^string:/,""),_.html(I)):(S.errors||(S.errors={}),S.errors.page={},S.errors.page[I]=!0,S.$$phase||S.$apply()),k.fadeIn(),k.find(".lpc-page-message-close-btn").on("click",function(){k.fadeOut()}),b||angular.element("html, body").animate({scrollTop:0},0),setTimeout(function(){k.fadeOut(),_&&_.length&&_.html("")},1e4);else if("msgok"==i)I=r,b=t,_&&_.length&&0===I.indexOf("string:")?(I=I.replace(/^string:/,""),_.html(I)):(S.page.msgok={},S.page.msgok[I]=!0),L.fadeIn(),L.find(".lpc-page-message-close-btn").on("click",function(){L.fadeOut()}),b||angular.element("html, body").animate({scrollTop:0},0),setTimeout(function(){L.fadeOut(),_&&_.length&&_.html("")},5e3);else if("msgwarning"==i)w=r,T=t,console.log("value :  = ",w),_&&_.length&&0===w.indexOf("string:")?(w=w.replace(/^string:/,""),_.html(w)):(S.page.msgwarning={},S.page.msgwarning[w]=!0),x.fadeIn(),x.find(".lpc-page-message-close-btn").on("click",function(){x.fadeOut()}),T||angular.element("html, body").animate({scrollTop:0},0),setTimeout(function(){x.fadeOut(),_&&_.length&&_.html("")},5e3);else if("popupError"==i)console.log("handling popupError..."),0===(w=r).indexOf("string:")?(w=w.replace(/^string:/,""),S.popup={},S.popup.popupError||(S.popup.popupError={}),S.popup.popupError[w]=!0,$(".msg-popup .error-block").text(w)):(S.popup||(S.popup={}),S.popup.popupError||(S.popup.popupError={}),S.popup.popupError[w]=!0),console.log(D),A.show(D);else if("popupInfo"==i)0===(T=r).indexOf("string:")?(T=T.replace(/^string:/,""),S.popup={},S.popup.popupInfo||(S.popup.popupInfo={}),$(".msg-popup .info-block").text(T)):(S.popup||(S.popup={}),S.popup.popupInfo||(S.popup.popupInfo={})),S.popup.popupInfo[T]=!0,A.show(D);else if(0==i.indexOf("model:")){p=u=d=c=s=void 0;for(var l=r,s=i.replace(/^model:/,"").split("."),c=S,d=0,u=s.length;d<u;d++){var p=s[d];d!=u-1?(c[p]||(c[p]={}),c=c[p]):0===l.indexOf("string:")?c[p]=l.replace(/^string:/,""):(c[p]={},c[p][l]=!0)}}else if(-1==jQuery.inArray(i,["fb","kyc","kycuploaded","kycid","addressStreetPE","addressZipCodePE","countryPE","addressCityPE"])){var f=i.split(".");if(f&&f.length){var g=N,m=[];if(g)for(var h=0,P=f.length;h<P;h++){var E=f[h],E=R(E,g);E&&E.length&&(m=m.concat(g=E))}var v=function(e,t){function o(e){return n.$setValidity(t,!0),n.$setValidity("serverError",!0),e}var n=e;n.$parsers.push(o),n.$formatters.push(o)};if(m&&m.length)for(var C=0,O=m.length;C<O;C++){var y=m[C];y.$setValidity(r,!1),y.$setValidity("serverError",!1),v(y,r)}else throwLpcJavascriptError("Unremoted Error fieldErrors:"+JSON.stringify(e),"UnremotedError",1)}S.$broadcast("find-and-scroll-to-first-invalid-element-event")}}}var w,T,I,b}var k=angular.element(document.getElementById("lpc-page-errors")),_=angular.element("#error-server-message, #ok-server-message, #warning-server-message, #server-message"),D="msgPopup",L=angular.element(document.getElementById("lpc-page-msgok")),x=angular.element(document.getElementById("lpc-page-warnings")),N={};return{setForm:function(e,t){N[e]=t},handle:function(e,t){e&&e.data&&e.data.fieldErrors&&e.data.fieldErrors.length&&n(e.data.fieldErrors,t)},fetchPageError:function(e){var t=o("lpc-errors");t&&t.length&&(n(t,e),o.remove("lpc-errors",{path:"/"})),window.errorFields&&errorFields.length&&n(window.errorFields,e)}}}]),angular.module("lpc").factory("lpcHttp",["$http","$rootScope","ErrorHandler","$window",function(t,o,n,i){var a;function e(){o.page||(o.page={}),o.page.ajaxLoading=!0,setTimeout(function(){a&&a.size&&a.size()&&angular.element("[type=submit]",a).addClass("loadingParticipate")},0);try{arguments[0].headers={htmlUniq:window.uniq},arguments&&arguments[0]&&("post"==arguments[0].method||"POST"==arguments[0].method)&&window.localLog&&""!=window.localLog&&arguments[0].data&&(arguments[0].data+="&"+serializeData({localLog:JSON.stringify(window.localLog)}))}catch(e){}var e;return arguments[0]&&arguments[0].chunked&&oboe?(delete arguments[0].chunked,(e=oboe.apply(null,arguments)).done(function(){angular.element("[type=submit]",a).removeClass("loadingParticipate"),o.page.ajaxLoading=!1,o.$$phase||o.$apply()}),e.fail(function(e){try{console.log(e),angular.element("[type=submit]",a).removeClass("loadingParticipate");var t=e.body&&JSON.parse(e.body)||{fieldErrors:[{page:"unknown"}]};angular.element("[type=submit]",a).removeClass("loadingParticipate"),o.page.ajaxLoading=!1,n.handle({data:t}),o.$$phase||o.$apply()}catch(e){}}),e):t.apply(null,arguments).then(function(e){if(e&&e.data&&e.data.urlredirect)i.location=e.data.urlredirect;else{if(!(e&&e.data&&e.data.reload))return angular.element("[type=submit]",a).removeClass("loadingParticipate"),o.page.ajaxLoading=!1,e;i.location.reload()}},function(e){if(throwLpcJavascriptError(e,"angular rest",1),e&&e.data){angular.element("[type=submit]",a).removeClass("loadingParticipate"),o.page.ajaxLoading=!1;try{n.handle(e,!!a&&a.attr("do-not-scroll")),window.console&&window.console.log("error:"+JSON.stringify(e).replace(/(password|photo|photoPO|image)=([^&]+)/g,"$1=******"))}catch(e){}}else try{angular.element("[type=submit]",a).removeClass("loadingParticipate"),n.handle({data:{fieldErrors:[{page:"unknown"}]}})}catch(e){}if(e&&e.config&&e.config.forwardError)return e;throw e})}return e.setLastSubmitForm=function(e){a=e},e}]),angular.module("lpc").constant("DateFormatConfig",""),angular.module("lpc").service("LpcPopupV2Helper",["$rootScope","$timeout",function(n,a){function r(e){for(var t=0;t<i.length;t++)if(i[t].id==e)return i[t]}function e(e){var t=r(e);if(!t)throw new Error("The popup with the id : "+e+" doesn't exist");t.elem.removeClass("lpc-popup-v2-shown"),angular.element("body").removeClass("no-scroll");for(var o=t.id,n=[],i=0;i<l.length;i++)l[i].id!=o&&n.push(l[i]);(l=n)&&l.length||t.alreadyFixedBody||(angular.element("body").removeClass("no-scroll"),t.alreadyFixedBody=!1),a(function(){t.scope.lpcPopupV2Shown=!1},300)}var i=[],l=[];return n.hidePopupV2=e,n.showPopupV2=function(e,t){var o=r(e);o&&(o.scope.popupData=t,"confirmRedirectionPopupCityvent"===e&&(n.popupShown=!0),n.showPopupSolidaryKitty&&(n.showPopupSolidaryKitty=!1,localStorage.removeItem("showPopupSolidaryKitty")),a(function(){o.scope.lpcPopupV2Shown=!0,a(function(){o.elem.find("input[type='text'], input[type='number'], input[type='email'], input[type='tel'], input[type='search']")[0]&&o.elem.find("input[type='text'], input[type='number'], input[type='email'], input[type='tel'], input[type='search']")[0].focus(),"potCreationEdition"==e&&"function"==typeof ga&&ga("send","pageview",{page:"/popin-creation-pot"}),"function"==typeof ga&&ga("send","pageview",{page:"/"+e+"-popin"}),"lpcLoginSignupPopup"==e&&"function"==typeof ga&&ga("send","pageview",{page:"/popin-login"})},0)},0),l.push(o))},{register:function(n,e,t){if(r(n))throw new Error("The popup with the id : "+n+" already exists in this page");t.$on("$destroy",function(){console.log("destroying popup : "+n);for(var e=n,t=[],o=0;o<i.length;o++)i[o].id!=e&&t.push(i[o]);i=t}),i.push({id:n,elem:e,scope:t}),t.$watch("lpcPopupV2Shown",function(e,t){e&&e!==t&&(e=r(n),t=function(){for(var e=100001e3,t=0;t<l.length;t++){var o=Number(l[t].elem.find(".lpc-popup-v2-wrapper").css("z-index"));e<o&&(e=o)}return e+1}(),e.elem.find(".lpc-popup-v2-wrapper").css("z-index",t),angular.element("body").hasClass("no-scroll")?e.alreadyFixedBody=!0:angular.element("body").addClass("no-scroll"),e.elem.addClass("lpc-popup-v2-shown"))})},hide:e}}]),angular.module("lpc").factory("DateConverter",["DateFormatConfig",function(o){function n(e,t){return e?moment(t).toDate():(e=new Date(t),isNaN(e.getTime())?null:e)}function i(e,t){return t.month--,e?moment(t).toDate():(e=moment(t).toDate(),isNaN(e.getTime())?null:e)}function a(e,t){return e?moment(t).format(e):t.toISOString?t.toISOString():void 0}return{stringToDate:function(e,t){return e=e||o,(angular.isString(t)?n:i)(e,t)},dateToString:function(e,t){return e=e||o,t?a(e,t):null},getStringFromDate:a,getDateFromObject:i,getDateFromString:n,getDateFromStringWithPattern:function(e,t){return e?moment(t,e).toDate():(e=new Date(t),isNaN(e.getTime())?null:e)}}}]),angular.module("lpc").factory("JQueryUiDateConverter",["DateFormatConfig","DateConverter",function(o,n){return{stringToDate:function(e,t){return e=e||o,angular.isString(t)?jQuery.datepicker.parseDate(e,t):n.getDateFromObject(e,t)},dateToString:function(e,t){if(e=e||o,t){if(e)return jQuery.datepicker.formatDate(e,t);if(t.toISOString)return t.toISOString()}return null}}}]),angular.module("lpc").factory("LpcImageCache",[function(){var n=[];return{addToCache:function(e,t,o){e={original:e};e[t]=o,n.push(e)},getCachedImage:function(e){if(n&&n.length)for(var t=0;t<n.length;t++)if(n[t].original==e)return n[t]},imageCached:function(e,t){if(n&&n.length)if(t){for(var o=0;o<n.length;o++)if(n[o].original==e&&n[o][t])return!0}else for(o=0;o<n.length;o++)if(n[o].original==e)return!0;return!1}}}]),angular.module("lpc").factory("LpcNotificationsHandler",[function(){function t(e,t){if(e&&e.text){var o=angular.element(n);switch(t){case"success":o.addClass("lpc-notification-success");break;case"error":o.addClass("lpc-notification-error");break;case"warning":o.addClass("lpc-notification-warning");break;default:o.addClass("lpc-notification-success")}e.image&&((t=angular.element(i)).css("background-image","url('"+e.image+"')"),o.append(t));t=angular.element(a);t.append(e.text),o.append(t),o.find(".lpc-notification-close-btn").on("click",function(e){o.fadeOut()}),angular.element(r).append(o),o.fadeIn(),setTimeout(function(){o.fadeOut(400,function(){o.remove()})},l)}}var n='<div class="lpc-notification"><a class="lpc-notification-close-btn"></a></div>',i='<div class="lpc-notification-image"></div>',a='<div class="lpc-notification-text"></div>',r="#lpc-notifications-container",l=5e3;return{pushError:function(e){t(e,"error")},pushSuccess:function(e){t(e,"success")},pushWarning:function(e){t(e,"warning")}}}]),angular.module("lpc").factory("MenuHelper",["$rootScope",function(t){function o(e){if(void 0===e)return n;for(var t=e,o=0;o<n.length;o++)if(n[o].id==t)return n[o]}var n=[],i=angular.element(window);return i.on("scroll",function(){var e;o()&&o().length&&o()[0]&&((e=i.scrollTop())<=o()[0].offset?t.showMenuHeaderText=!1:t.showMenuHeaderText=!0,e=function(e){if(!(e<=n[0].offset)){for(var t=n[0],o=1;o<n.length;o++)e>n[o].offset&&(t=n[o]);return t}}(e),t.headerTitle=e?e.content:void 0,t.$$phase||t.$apply())}).trigger("scroll"),{add:function(e,t,o){n.push({id:e,content:t,offset:o}),n.sort(function(e,t){return e.offset>t.offset?1:t.offset>e.offset?-1:0})}}}]),angular.module("lpc").factory("PopupHandler",["$rootScope","Helper",function(n,i){function e(){var e,t,o=i.handleTag.serachHash();for(e in l)l.hasOwnProperty(e)&&"msgPopup"!=e&&(l[e].hide(),o&&o[e]&&delete o[e],!window.bo)&&n.isMobile()&&(t=i.serializeData(o),window.location.hash=t&&t.length?t:"")}function a(t,e){var o;l[t]&&!jQuery(l[t]).is(":visible")&&(s.show(),0==c&&(d=jQuery(document).scrollTop(),document.body.style.top="-"+d+"px"),c++,0<jQuery(".visible-ms:visible").length?l[t].show():l[t].fadeIn(300),angular.element("body").addClass("fixe-body"),o={popupName:t},e&&(o.extraParams=e),n.$broadcast("lpc-popup-show-event",o),!window.bo)&&n.isMobile()&&((e=i.handleTag.serachHash())&&e[t]||((e=e||{})[t]=!0),window.location.hash="/"+i.serializeData(e),angular.element(window).on("hashchange",function(){var e=i.handleTag.serachHash();e&&e[t]||r(t)}))}function r(e){var t;l[e]&&jQuery(l[e]).is(":visible")&&(l[e].fadeOut(300),--c||(console.log("hidden"),angular.element("body").removeClass("fixe-body"),jQuery(document).scrollTop(d),s.hide(),document.body.style.top="0"),n.$broadcast("lpc-popup-close-event",{popupName:e}),!window.bo)&&n.isMobile()&&(t=i.handleTag.serachHash())&&t[e]&&(delete t[e],window.location.hash="/"+i.serializeData(t))}var l={},s=angular.element(document.getElementById("lpc-popup-container")),c=0,d=0;return angular.element(window).on("hashchange",function(){setTimeout(function(){if(!window.bo&&void 0!==n.isMobile&&n.isMobile()){var e=i.handleTag.serachHash();if(e)for(var t in e)e.hasOwnProperty(t)&&l[t]&&a(t)}},0)}).trigger("hashchange"),{add:function(e,t,o){l[e]=t,o&&a(e)},show:a,hide:r,clear:function(){window.console&&window.console.log("clear popup"),s.hide(),angular.element("body").removeClass("fixe-body"),console.log("removed fix"),jQuery(document).scrollTop(d),e(),c=0},hideAll:function(){e()}}}]),angular.module("lpc").factory("ServerFunction",["Helper","$q","lpcHttp","$http",function(h,o,E,n){function v(e){if(!angular.isObject(e))return null==e?"":e.toString();var t,o,n=[];for(t in e)e.hasOwnProperty(t)&&(o=e[t],n.push(encodeURIComponent(t)+"="+encodeURIComponent(null==o?"":o)));return n.join("&").replace(/%20/g,"+")}var t="/retrive10",i="/cookies-consent",P="/create-repay",C="/create-repay-account",O="/remboursementAdmin/{1}/option/submit",r="/pot/{1}/collect/valid-merchant",a="/pot/{1}/new-caddie",l="/pot/{1}/thanks",s="/pot/{1}/revive";return{list:{listAdd:function(e){return E({method:"post",url:"/story-list-new",data:v({photoPO:e.photoPO,positionX:e.position.x,positionY:e.position.y,widthPhotoPO:e.position.wpercent,typePO:e.typePO,namePO:e.namePO,bridesNamePO:e.bridesNamePO,descriptionPO:e.descriptionPO,opNotificationPO:e.opNotificationPO,uniqPO:e.uniqPO,dateEventPO:e.dateEventPO,placePO:e.placePO,commisionTypePO:e.commisionTypePO})})},listEdit:function(e){return E({method:"post",url:"/list-edit",data:v({photoPO:e.photoPO,positionX:e.position.x,positionY:e.position.y,widthPhotoPO:e.position.wpercent,typePO:e.typePO,namePO:e.namePO,bridesNamePO:e.bridesNamePO,descriptionPO:e.descriptionPO,opNotificationPO:e.opNotificationPO,uniqPO:e.uniqPO,dateEventPO:e.dateEventPO,placePO:e.placePO,commisionTypePO:e.commisionTypePO})})},listAndAccountAdd:function(e,t){return E({method:"post",url:"/story-list-account-new",data:v({typePO:e.typePO,namePO:e.namePO,bridesNamePO:e.bridesNamePO,descriptionPO:e.descriptionPO,photoPO:e.photoPO,positionX:e.position.x,positionY:e.position.y,widthPhotoPO:e.position.wpercent,placePO:e.placePO,opNotificationPO:e.opNotificationPO,uniqPO:e.uniqPO,dateEventPO:e.dateEventPO,firstNamePE:t.firstNamePE,lastNamePE:t.lastNamePE,birthdayPE:t.birthdayPE,emailPE:t.emailPE,passwordPE:t.passwordPE,confirmPasswordPE:t.confirmPasswordPE,entityNamePE:t.entityNamePE,entityIdentifierPE:t.entityIdentifierPE})})},listGiftGetAll:function(e){return E({method:"post",url:h.getUrl("/listeMariage/{1}/gifts-pot",e)}).then(function(e){return e.data})},listGiftEdit:function(e,t,o,n,i,a){return E({method:"post",url:h.getUrl("/listeMariage/{1}/gift-edit",e),data:v({uniqSG:t,name:o,price:n,quantity:i,image:a})}).then(function(e){return e.data})},listGiftEditOrder:function(e,t){return E({method:"post",url:h.getUrl("/list/{1}/gift-order",e),data:v({orderSGPArray:JSON.stringify(t)})}).then(function(e){return e.data})},listGiftAdd:function(e,t,o,n,i){return E({method:"post",url:h.getUrl("/listeMariage/{1}/gift-add",e),data:v({name:t,price:o,quantity:n,image:i})}).then(function(e){return e.data})},listGiftDelete:function(e,t){return E({method:"post",url:h.getUrl("/listeMariage/{1}/gift-delete",e),data:v({uniqSG:t})}).then(function(e){return e.data})},listGiftClassicAdd:function(e,t,o){t="LISTE_DE_NAISSANCE"==t?h.getUrl("/listeMariage/{1}/add-classic-gifts",e):h.getUrl("/listeNaissance/{1}/add-classic-gifts",e);return E({method:"post",url:t,data:"classicGifts="+JSON.stringify(o)}).then(function(e){return e&&e.data})},listFetchInvites:function(e){return E({method:"post",url:h.getUrl("/list/{1}/fetch-invites",e),data:v({uniqPO:e})}).then(function(e){return e.data})},listNewCaddieCart:function(e,t){return E({method:"post",url:h.getUrl("/list/{1}/new-caddie-cart",e),data:v({firstName:t.payman.firstNameMP,lastName:t.payman.lastNameMP,email:t.payman.emailMP,message:t.message,adresse:t.payman.addressMP})}).then(function(e){if(e)return e.data})},listNewCaddieFree:function(e,t){return E({method:"post",url:h.getUrl("/list/{1}/new-caddie-free",e),data:v({firstName:t.payman.firstNameMP,lastName:t.payman.lastNameMP,email:t.payman.emailMP,message:t.message,adresse:t.payman.adresseMP,contributionMP:t.payman.contributionMP})}).then(function(e){return e.data})},demo:{enableAdminMode:function(e,t){return E({method:"post",url:"LISTE_DE_MARIAGE"===t?"/list-mariage-demo/enable-admin-mode":"/list-naissance-demo/enable-admin-mode",data:v({adminMode:e})})}}},pot:{addOMParticipation:function(e,t,o,n,i,a,r){return E({method:"post",url:h.getUrl("/pot/{1}/create-promesse-paiement",e),data:v({uniqPO:e,firstNameIN:t,lastNameIN:o,emailPE:n,externalContributionIN:i,hideNameIN:a,hideContributionIN:r})})},getSolidaryKitties:function(e){return E({method:"get",url:"/get-solidary-kitties?"+v(e)}).then(function(e){return e.data})},potNew:function(e){return E({method:"post",url:"/pot-new",data:v({categoryPO:e.categoryPO.value,solidaryCategoryPO:e.solidaryCategoryPO?e.solidaryCategoryPO.value:void 0,associationCategoryPO:e.associationCategoryPO?e.associationCategoryPO.value:void 0,namePO:e.namePO,organizerPO:e.organizerPO,descriptionPO:e.descriptionPO,commisionTypePO:e.commisionTypePO,op7TypeContributionPO:e.op7TypeContributionPO,op1ParticipantNamePO:e.op1ParticipantNamePO,op7AmountContributionPO:"FIXED"==e.op7TypeContributionPO?e.op7AmountContributionPOF:e.op7AmountContributionPOS,op4AmountPO:e.op4AmountPO,op2ContributionPO:e.op2ContributionPO,op5publicPO:e.op5publicPO,amountToReachPO:e.amountToReachPO,op11NotificationPO:e.op11NotificationPO,askForAddress:e.askForAddress,askForMessage:e.askForMessage,inviteCanInvite:e.inviteCanInvite,op6DateLimitePO:e.op6DateLimitePO,dateEventPO:e.dateEventPO,disableIdeaBoxPO:e.disableIdeaBoxPO,disableGreetingCardPO:e.disableGreetingCardPO,photoPO:e.photoPO,positionX:e.position.x,positionY:e.position.y,widthPhotoPO:e.position.wpercent,codePromo:e.pc,refVoyagesSncfPO:e.refVoyagesSncfPO})})},potNewReduced:function(e){return E({method:"post",url:"/pot-new-reduced",data:v({categoryPO:e.categoryPO.value,solidaryCategoryPO:e.solidaryCategoryPO?e.solidaryCategoryPO.value:void 0,namePO:e.namePO,organizerPO:e.organizerPO,dateEventPO:e.dateEventPO,photoPO:e.photoPO,positionX:e.position.x,positionY:e.position.y,widthPhotoPO:e.position.wpercent,descriptionPO:e.descriptionPO,codePromo:e.promoCode})})},potEdit:function(e){return E({method:"post",url:"/pot-edit",data:v({uniqPO:e.uniqPO,categoryPO:e.categoryPO.value,solidaryCategoryPO:e.solidaryCategoryPO?e.solidaryCategoryPO.value:void 0,associationCategoryPO:e.associationCategoryPO?e.associationCategoryPO.value:void 0,namePO:e.namePO,organizerPO:e.organizerPO,descriptionPO:e.descriptionPO,commisionTypePO:e.commisionTypePO,op7TypeContributionPO:e.op7TypeContributionPO,op1ParticipantNamePO:e.op1ParticipantNamePO,op7AmountContributionPO:"SUGGESTED"==e.op7TypeContributionPO?e.op7AmountContributionPOS:e.op7AmountContributionPOF,op4AmountPO:e.op4AmountPO,op2ContributionPO:e.op2ContributionPO,op5publicPO:e.op5publicPO,amountToReachPO:e.amountToReachPO,op11NotificationPO:e.op11NotificationPO,askForAddress:e.askForAddress,askForMessage:e.askForMessage,inviteCanInvite:e.inviteCanInvite,op6DateLimitePO:e.op6DateLimitePO,dateEventPO:e.dateEventPO,op6DateLimitePOCheckbox:e.op6DateLimitePOCheckbox,disableIdeaBoxPO:e.disableIdeaBoxPO,disableGreetingCardPO:e.disableGreetingCardPO,photoPO:e.photoPO,positionX:e.position.x,positionY:e.position.y,widthPhotoPO:e.position.wpercent,codePromo:e.promoCode,refVoyagesSncfPO:e.refVoyagesSncfPO})})},potEditReduced:function(e){return E({method:"post",url:"/pot-edit-reduced",data:v({uniqPO:e.uniqPO,categoryPO:e.categoryPO.value,solidaryCategoryPO:e.solidaryCategoryPO?e.solidaryCategoryPO.value:void 0,namePO:e.namePO,organizerPO:e.organizerPO,dateEventPO:e.dateEventPO,photoPO:e.photoPO,positionX:e.position.x,positionY:e.position.y,widthPhotoPO:e.position.wpercent,descriptionPO:e.descriptionPO})})},potEditParmas:function(e){return E({method:"post",url:"/pot-edit-params",data:v({uniqPO:e.uniqPO,customUrlSuffixPO:e.customUrlSuffixPO,op7TypeContributionPO:e.op7TypeContributionPO,op4AmountPO:e.op4AmountPO,op6DateLimitePO:e.op6DateLimitePO,amountToReachPO:e.amountToReachPO,inviteCanInvite:e.inviteCanInvite,op5publicPO:e.op5publicPO,askForAddress:e.askForAddress,disableGreetingCardPO:e.disableGreetingCardPO,askForMessage:e.askForMessage,op11NotificationPO:e.op11NotificationPO,op1ParticipantNamePO:e.op1ParticipantNamePO,op2ContributionPO:e.op2ContributionPO,promoCode:e.promoCode,commisionTypePO:e.commisionTypePO,op7AmountContributionPO:"SUGGESTED"==e.op7TypeContributionPO?e.op7AmountContributionPOS:e.op7AmountContributionPOF,hidePartCountPO:e.hidePartCountPO})})},potEditDecription:function(e,t){return E({method:"post",url:"/pot-edit-description",data:v({uniqPO:e,description:t})})},potEditAmountToReach:function(e,t){return E({method:"post",url:"/pot-edit-amount-to-reach",data:v({uniqPO:e,amountToReachPO:t})})},potEditOp6DateLimitePO:function(e,t){return E({method:"post",url:"/pot-edit-deadline-to-participate",data:v({uniqPO:e,op6DateLimitePO:t})})},potDeleteAmountToReach:function(e){return E({method:"post",url:"/pot-delete-goal-to-reach",data:v({uniqPO:e})})},potDeleteDeadlineToParticipate:function(e,t){return E({method:"post",url:"/pot-delete-deadline-to-participate",data:v({uniqPO:e})})},potAndAccountNew:function(e,t){return E({method:"post",url:"/pot-account-new",data:v({categoryPO:e.categoryPO.value,solidaryCategoryPO:e.solidaryCategoryPO?e.solidaryCategoryPO.value:void 0,associationCategoryPO:e.associationCategoryPO?e.associationCategoryPO.value:void 0,namePO:e.namePO,organizerPO:e.organizerPO,descriptionPO:e.descriptionPO,commisionTypePO:e.commisionTypePO,op7TypeContributionPO:e.op7TypeContributionPO,op1ParticipantNamePO:e.op1ParticipantNamePO,op7AmountContributionPO:"FIXED"==e.op7TypeContributionPO?e.op7AmountContributionPOF:e.op7AmountContributionPOS,op4AmountPO:e.op4AmountPO,op5publicPO:e.op5publicPO,amountToReachPO:e.amountToReachPO,op11NotificationPO:e.op11NotificationPO,askForAddress:e.askForAddress,askForMessage:e.askForMessage,inviteCanInvite:e.inviteCanInvite,op6DateLimitePO:e.op6DateLimitePO,dateEventPO:e.dateEventPO,op6DateLimitePOCheckbox:e.op6DateLimitePOCheckbox,disableIdeaBoxPO:e.disableIdeaBoxPO,disableGreetingCardPO:e.disableGreetingCardPO,photoPO:e.photoPO,positionX:e.position.x,positionY:e.position.y,widthPhotoPO:e.position.wpercent,codePromo:e.pc,firstNamePE:t.firstNamePE,lastNamePE:t.lastNamePE,birthdayPE:t.birthdayPE,emailPE:t.emailPE,passwordPE:t.passwordPE,confirmPasswordPE:t.confirmPasswordPE,entityNamePE:t.entityNamePE,entityIdentifierPE:t.entityIdentifierPE,refVoyagesSncfPO:e.refVoyagesSncfPO,telPE:t.telPE})})},potStoredCardPayment:function(e,t){return E({method:"post",url:h.getUrl("/pot/{1}/storedcardpayment",e),data:v({order_id:t.order_id,appCardIdPC:t.appCardIdPC})}).then(function(e){return e.data})},potNewCaddie:function(e,t){return E({method:"post",url:h.getUrl(a,e),data:v({firstName:t.payman.firstNameMP,lastName:t.payman.lastNameMP,email:t.payman.emailMP,messageCA:t.messageCA,adresseCA:t.payman.addressMP,contributionMP:t.payman.contributionMP,hideNameCA:t.hideNameCA,hideContributionCA:t.hideContributionCA,optInCA:t.optInCA,saveCard:t.saveCard,appCardIdPC:t.appCardIdPC,useStoredCard:t.useStoredCard,confirmNewsletter:t.confirmNewsletter,confirmCommercialsPE:t.confirmCommercialsPE})}).then(function(e){return e&&e.data})},potNewCaddieNumworks:function(e,t){return console.log("caddie.payman.grade : ",t.payman.grade),E({method:"post",url:h.getUrl(a,e),data:v({firstName:t.payman.firstNameMP,lastName:t.payman.lastNameMP,email:t.payman.emailMP,specificData:JSON.stringify({grade:t.payman.grade}),messageCA:t.messageCA,adresseCA:t.payman.addressMP,contributionMP:t.payman.contributionMP,hideNameCA:t.hideNameCA,hideContributionCA:t.hideContributionCA,optInCA:t.optInCA,saveCard:t.saveCard,appCardIdPC:t.appCardIdPC,useStoredCard:t.useStoredCard})}).then(function(e){return e&&e.data})},potNewThanks:function(e,t,o,n){var i;switch(n){case"STORY_LISTE":case"LISTE_DE_MARIAGE":case"LISTE_DE_NAISSANCE":i=h.getUrl("/list/{1}/thanks",e);break;default:i=h.getUrl(l,e)}return E({method:"post",url:i,data:v({invites:JSON.stringify(o),message:t})})},potNewRevive:function(e,t,o,n){var i;switch(n){case"STORY_LISTE":case"LISTE_DE_MARIAGE":case"LISTE_DE_NAISSANCE":i=h.getUrl("/list/{1}/revive",e);break;default:i=h.getUrl(s,e)}return E({method:"post",url:i,data:v({invites:JSON.stringify(o),message:t})})},potNewOffer:function(e,t){return E({method:"post",url:h.getUrl("/pot/{1}/offer",e),data:v({firstNamePE:t.firstNamePE,lastNamePE:t.lastNamePE,emailPE:t.emailPE,messagePE:t.messagePE})})},potOfferValidation:function(e){return E({method:"get",url:"/pot-offer-step-2/"+e})},potOfferCancel:function(e){return E({method:"get",url:"/pot-offer-cancel/"+e})},potNewOfferCheckKyc:function(e){return E({method:"post",url:h.getUrl("/pot/{1}/check-pot-offer-kyc-validity",e),data:{}})},sendClotureMail:function(e){return E({method:"post",url:h.getUrl("/pot/{1}/send-cloture-mail",e)}).then(function(e){return e.data})},previewClotureMail:function(e){return E({method:"post",url:h.getUrl("/pot/{1}/preview-cloture-mail",e)}).then(function(e){return e.data})},fetchInvites:function(e){return E({method:"get",url:h.getUrl("/pot/{1}/fetch-invites",e)}).then(function(e){return e.data})},desactiverNotificationValidate:function(e,t){return E({method:"post",url:h.getUrl("/desactiver-notification/{1}/{2}/validate",e,t)}).then(function(e){return e.data})},potEditPhotoPosition:function(e,t,o){return E({method:"post",url:h.getUrl("/pot/{1}/position",e),data:v({positionX:t,positionY:o})}).then(function(e){return e.data})},potEditPhotoZoom:function(e,t){return E({method:"post",url:h.getUrl("/pot/{1}/zoom",e),data:v({width:t})}).then(function(e){return e.data})},remindMeLater:function(e){return console.log("eee"),E({method:"post",url:"/pot-reminder-me-later",data:v({emailPE:e})})},potCreationPopupData:function(){return E({method:"get",url:"/get-pot-creation-popup-data"})},createPotWithBot:function(e){return E({method:"POST",url:"/bot/create-pot-with-bot",data:e,headers:{"Content-Type":"application/json"}})},getParticipantsPage:function(e,t,o){return E({method:"get",url:"".concat("/get-participants-page","?uniqPO=").concat(e,"&pageSize=").concat(t,"&cursor=").concat(o)})},greetingCard:{drawCard:function(e){return E({method:"get",url:h.getUrl("/pot/{1}/carteDeVoeux/export.pdf",e)}).then(function(e){return e.data})},addOrUpdate:function(e,t){return E({method:"post",url:h.getUrl("/pot/{1}/carteDeVoeux/add-update",e),data:v({greetingCardType:t.greetingCardType,greetingCardMessage:t.greetingCardMessage,greetingCardSignature:t.greetingCardSignature,greetingCardFont:t.greetingCardFont,greetingCardColor:t.greetingCardColor})}).then(function(e){return e.data})},changeCardType:function(e,t){return E({method:"post",url:h.getUrl("/pot/{1}/carteDeVoeux/update-card-type",e),data:v({greetingCardType:t})}).then(function(e){return e.data})},delete:function(e,t){return E({method:"post",url:h.getUrl("/pot/{1}/carteDeVoeux/delete",e),data:v({inviteID:t.inviteID})}).then(function(e){return e.data})},orderPhysicalCards:function(e,t){return E({method:"post",url:h.getUrl("/pot/{1}/carte-de-voeux-physique/order/{2}",e,t.uniqGPCO),data:v({totalPayment:t.totalPayment,selectedCards:t.selectedCards})})},extraPaymentPhysicalCards:function(e,t){return E({method:"post",url:h.getUrl("/pot/{1}/carte-de-voeux-physique/extra-payment/{2}",e,t.uniqGPCO),data:v({totalPayment:t.totalPayment,extraPaymentSum:t.extraPaymentSum,selectedCards:t.selectedCards})}).then(function(e){return e.data})},persistOrderPhysicalCards:function(e,t){return E({method:"post",url:h.getUrl("/pot/{1}/carte-de-voeux-physique/persist-order",e),data:v({totalPayment:t.totalPayment,selectedCards:t.selectedCards,deliveryFirstName:t.delivery.firstName,deliveryLastName:t.delivery.lastName,deliveryStreet1:t.delivery.street_1,deliveryStreet2:t.delivery.street_2,deliveryZipcode:t.delivery.zipcode,deliveryCity:t.delivery.city,deliveryCountry:t.delivery.country})})},persistExistingOrderPhysicalCards:function(e,t){return E({method:"post",url:h.getUrl("/pot/{1}/carte-de-voeux-physique/persist-order/{2}",e,t.uniqGPCO),data:v({totalPayment:t.totalPayment,selectedCards:t.selectedCards,deliveryFirstName:t.delivery.firstName,deliveryLastName:t.delivery.lastName,deliveryStreet1:t.delivery.street_1,deliveryStreet2:t.delivery.street_2,deliveryZipcode:t.delivery.zipcode,deliveryCity:t.delivery.city,deliveryCountry:t.delivery.country})})}},promoCode:{submitPromoCode:function(e){return E({method:"post",url:"/submit-promo-code",data:v({namePCC:e})}).then(function(e){return e.data})}},ideaBox:{addComment:function(e,t){return E({method:"post",url:h.getUrl("/pot/{1}/ideaBox/add-comment",e),data:v({uniqGP:t.uniqGP,message:t.currentMessage})}).then(function(e){return e.data})},deleteComment:function(e,t,o){return E({method:"post",url:h.getUrl("/pot/{1}/ideaBox/delete-comment",e),data:v({commentID:t.giftProposalCommentID,uniqGP:o.uniqGP})}).then(function(e){return e.data})},vote:function(e,t,o){return E({method:"post",url:h.getUrl("/pot/{1}/ideaBox/vote",e),data:v({uniqGP:t.uniqGP,vote:o})}).then(function(e){return e.data})},getVoters:function(e,t){return E({method:"post",url:h.getUrl("/pot/{1}/ideaBox/voters",e),data:v({uniqGP:t.uniqGP})}).then(function(e){return e.data})},deleteGiftProposal:function(e,t){return E({method:"post",url:h.getUrl("/pot/{1}/ideaBox/delete",e),data:v({uniqGP:t.uniqGP})}).then(function(e){return e.data})},editGiftProposal:function(e,t){return E({method:"post",url:h.getUrl("/pot/{1}/ideaBox/edit",e),data:v({uniqGP:t.uniqGP,nameGP:t.nameGP,descriptifGP:t.descriptifGP,photoGP:t.photoGP,priceGP:t.priceGP})}).then(function(e){return e.data})},addNewGiftProposal:function(e,t){return E({method:"post",url:h.getUrl("/pot/{1}/ideaBox/new",e),data:v({nameGP:t.nameGP,descriptifGP:t.descriptifGP,photoGP:t.photoGP,priceGP:t.priceGP})}).then(function(e){return e.data})}},collect:{init:function(e,t,o,n,i){return E({method:"post",url:h.getUrl("/pot/{1}/collect/init",e),data:v({passwordPE:t,collectTotal:o,amount:n,close:i})}).then(function(e){return e.data})},valid:function(e,t,o,n,i,a){return E({method:"post",url:h.getUrl("/pot/{1}/collect/valid",e),data:v({passwordPE:t,collectTotal:o,amountTR:n,close:i,uniqIB:a})})},validMerchant:function(e,t,o,n,i){return E({method:"post",url:h.getUrl(r,e),data:v({passwordPE:t,collectTotal:o,amountTR:n,refDossierEvaneos:"",close:i})})},validMerchantEvaneos:function(e,t,o,n,i,a){return E({method:"post",url:h.getUrl(r,e),data:v({passwordPE:t,collectTotal:o,amountTR:n,refDossierEvaneos:i,close:a})})},validMerchantSilver:function(e,t,o,n,i,a){return E({method:"post",url:h.getUrl(r,e),data:v({passwordPE:t,collectTotal:o,amountTR:n,refDossierEvaneos:i,close:a})})},benefciary:function(e,t,o){return E({method:"post",url:h.getUrl("/pot/{1}/collect/beneficiary",e),data:v({amountTR:t,uniqIB:o})}).then(function(e){return e.data})}},cadoCarte:{init:function(e,t,o,n,i){i="CREDIT"==i?"/pot/{1}/cadocarte/init-credit":"/pot/{1}/cadocarte/init";return E({method:"post",url:h.getUrl(i,e),data:v({passwordPE:t,collectTotal:o,amount:n})})},valid:function(e,t,o,n,i,a,r,l,s,c,d,u,p,f,g,m){return E({method:"post",url:h.getUrl("/pot/{1}/cadocarte/valid",e),data:v({passwordPE:t,collectTotal:o,creditNow:n,packaging:i,amount:a,civility:r,firstName:l,lastName:s,company:c,street_1:d,street_2:u,zipcode:p,city:f,country:g,phoneNumber:m})})},getShops:function(){return E({method:"get",url:"/cado-carte/get-shop-elements"})}},agc:{create:function(e,t,o){return E({method:"post",url:h.getUrl("/pot/{1}/agc/create",e),data:v({passwordPE:t,valueAGC:o})})}},partners:{getPartners:function(e){return E({method:"get",url:h.getUrl("/{1}/partners",e)})},getAllPartnersCategories:function(){return E({method:"get",url:"/partnersCategories"})},smartbox:{create:function(e,t,o){return E({method:"post",url:h.getUrl("/pot/{1}/smartbox/create",e),data:v({passwordPE:t,valueSmartboxGC:o})})}},bein:{create:function(e,t,o){return E({method:"post",url:h.getUrl("/pot/{1}/bein/create",e),data:v({passwordPE:t,numMonths:o})})}},decathlon:{create:function(e,t,o){return E({method:"post",url:h.getUrl("/pot/{1}/decathlon/create",e),data:v({passwordPE:t,valueGC:o})})}},printemps:{create:function(e,t,o){return E({method:"post",url:h.getUrl("/pot/{1}/printemps/create",e),data:v({passwordPE:t,valueGC:o})})}},printempsVoyages:{create:function(e,t,o){return E({method:"post",url:h.getUrl("/pot/{1}/printemps-voyages/create",e),data:v({passwordPE:t,valueGC:o})})}},citadium:{create:function(e,t,o){return E({method:"post",url:h.getUrl("/pot/{1}/citadium/create",e),data:v({passwordPE:t,valueGC:o})})}},clickAndGift:{create:function(e,t,o,n,i,a,r){return E({method:"post",url:h.getUrl("/pot/{1}/click-and-gift/create",e),data:v({passwordPE:t,valueGC:o,firstName:n,lastName:i,email:a,telephone:r})})}},jackpot:{create:function(e,t,o,n){return E({method:"post",url:h.getUrl("/pot/{1}/createGC-{2}",e,t),data:v({passwordPE:o,valueGC:n})})}},zalando:{create:function(e,t,o){return E({method:"post",url:h.getUrl("/pot/{1}/zalando/create",e),data:v({passwordPE:t,valueGC:o})})}},voucherPartner:{create:function(e,t,o,n){return E({method:"post",url:h.getUrl("/pot/{1}/vp/{2}/create",e,n),data:v({passwordPE:t,offerOrdinal:o})})}}},invite:{checkAdress:function(e){var t=o.defer();return n({method:"POST",url:"/check-email-validity",data:v({email:e})}).then(function(e){e.is_valid=!0,t.resolve(e)},function(e){t.reject(e)}),t.promise},getContacts:function(e,t,o,n){return lpcLog("sending data to mail gun : inputStream:"+t),t&&t.replace&&(t=(t=t.replace(/"/g," ")).replace(/\s+/g,";")),E({method:"post",url:"/addresses/parse",data:v({addresses:t,uniqPO:e,existingNumber:o,extension:n})}).then(function(e){return e&&e.data})},sendInvites:function(e,t,o,n,i){return E({method:"post",url:"/send-invite",data:v({message:e,uniqPO:t,relance3Day:n,relance1Week:i,invites:JSON.stringify(o)})}).then(function(e){return e.data})},getMaxInvites:function(e){return E({method:"post",url:"/invite/max-invites",data:v({uniqPO:e})}).then(function(e){return e.data})},editInviteHideName:function(e,t,o){return E({method:"post",url:h.getUrl("/espace-participant/{1}/edit-hide-name",e),data:v({inviteID:t,value:o})}).then(function(e){return e.data})},editInviteHideParticipation:function(e,t,o){return E({method:"post",url:h.getUrl("/espace-participant/{1}/edit-hide-participation",e),data:v({inviteID:t,value:o})}).then(function(e){return e.data})},editInviteParticipation:function(e,t,o,n){return E({method:"post",url:h.getUrl("/espace-participant/{1}/edit-name",e),data:v({inviteID:t,firstName:o,lastName:n})}).then(function(e){return e.data})},invitedecline:function(e){return E({method:"post",url:h.getUrl("/decliner/{1}/validate",e)})},getEmailsFromFile:function(e,t){return lpcLog("sending data to mail gun : inputStream:"+e),e&&e.replace&&(e=(e=e.replace(/"/g," ")).replace(/\s+/g,";")),E({method:"post",url:"/get-emails-from-file",data:v({emailsStream:e,extension:t})}).then(function(e){return e&&e.data})},getUserContacts:function(){return E({method:"GET",url:"/get-user-contacts"}).then(function(e){return e&&e.data})},getUserPotContacts:function(e){return E({method:"GET",url:h.getUrl("/get-user-pot-contacts/{1}",e)}).then(function(e){return e&&e.data})}},revive:{getReviveContacts:function(e){return E({method:"GET",url:h.getUrl("/get-revive-contacts/{1}",e)})},potRevive:function(e,t,o){e=h.getUrl(s,e);return E({method:"post",url:e,data:v({invites:JSON.stringify(o),message:t})})}},thank:{getThankContacts:function(e){return E({method:"GET",url:h.getUrl("/get-thank-contacts/{1}",e)})},getThankContactsOfferZero:function(e){return E({method:"GET",url:h.getUrl("/get-thank-contacts-offer-zero/{1}",e)})},potThank:function(e,t,o,n){e=h.getUrl(l,e);return E({method:"post",url:e,data:v({invites:JSON.stringify(o),message:t,allowNotAdmin:n})})}},demo:{enableAdminMode:function(e,t){return E({method:"post",url:"/pot-demo/enable-admin-mode",data:v({adminMode:e})})}}},limonetik:{payWithPot:function(e,t){return E({method:"post",url:h.getUrl("/paiement-via-pot-commun-choix/{1}/payWithPot",e),data:v({uniqPO:t})})},cancel:function(e){return E({method:"delete",url:h.getUrl("/paiement-via-pot-commun-choix/{1}/cancel",e)})},extraPaiement:function(e,t){return E({method:"post",url:h.getUrl("/paiement-via-pot-commun-choix/{1}/extraPaiement",e),data:v({uniqPO:t})}).then(function(e){return e.data})},checkPotKyc:function(e,t,o){return E({method:"post",url:h.getUrl("/paiement-via-pot-commun-choix/{1}/check-pot-kyc",e),data:v({complementaryAmountCentimes:t,uniqLT:o})}).then(function(e){return e.data})}},repay:{create:function(e,t,o,n,i,a){return E({method:"post",url:P,data:v({namePO:e,photoPO:t,organizerPO:o,descriptionPO:n,positionX:i,positionY:a})})},createRepaySncf:function(e,t,o,n,i,a,r,l,s,c,d,u,p,f,g,m,h){return E({method:"post",url:P,data:v({namePO:e,photoPO:t,organizerPO:o,descriptionPO:n,positionX:i,positionY:a,adminMessage:r,passengers:l,childs:s,relance2day:c,relance3day:d,relance5day:u,trajetVoyagesSncf:p,dateVoyagesSncf:f,expirationDateVoyagesSncf:g,expirationHeureVoyagesSncf:m,refVoyagesSncfPO:h})})},edit:function(e,t,o,n,i,a,r){return E({method:"post",url:h.getUrl(O,e),data:v({namePO:t,photoPO:o,organizerPO:n,descriptionPO:i,positionX:a,positionY:r})})},editRepaySncf:function(e,t,o,n,i,a,r,l,s,c,d,u,p,f,g,m){return E({method:"post",url:h.getUrl(O,e),data:v({namePO:t,photoPO:o,organizerPO:n,descriptionPO:i,positionX:a,positionY:r,adminMessage:l,passengers:s,relance2day:c,relance3day:d,relance5day:u,trajetVoyagesSncf:p,dateVoyagesSncf:f,expirationDateVoyagesSncf:g,expirationHeureVoyagesSncf:m})})},createWithAccount:function(e,t,o,n,i,a,r){return E({method:"post",url:C,data:v({namePO:e,photoPO:t,organizerPO:o,descriptionPO:n,positionX:i,positionY:a,firstNamePE:r.firstNamePE,lastNamePE:r.lastNamePE,birthdayPE:r.birthdayPE,emailPE:r.emailPE,passwordPE:r.passwordPE,confirmPasswordPE:r.confirmPasswordPE,entityNamePE:r.entityNamePE,entityIdentifierPE:r.entityIdentifierPE})}).then(function(e){return e.data})},createWithAccountSncf:function(e,t,o,n,i,a,r,l,s,c,d,u,p,f,g,m,h,P){return E({method:"post",url:C,data:v({namePO:e,photoPO:t,organizerPO:o,descriptionPO:n,positionX:i,positionY:a,adminMessage:l,passengers:s,childs:c,relance2day:d,relance3day:u,relance5day:p,trajetVoyagesSncf:f,dateVoyagesSncf:g,expirationDateVoyagesSncf:m,expirationHeureVoyagesSncf:h,refVoyagesSncf:P,firstNamePE:r.firstNamePE,lastNamePE:r.lastNamePE,birthdayPE:r.birthdayPE,emailPE:r.emailPE,passwordPE:r.passwordPE,confirmPasswordPE:r.confirmPasswordPE,entityNamePE:r.entityNamePE,entityIdentifierPE:r.entityIdentifierPE})}).then(function(e){return e.data})},deleteInvite:function(e){return E({method:"post",url:"/delete-invite-repay",data:v({uniqIN:e})}).then(function(e){return e.data})},invite:{add:function(e,t,o,n,i,a,r){return E({method:"post",url:h.getUrl("/remboursementAdmin/{1}/add-invite",e),data:v({firstNameIN:t,lastNameIN:o,email:n,repayementAmountIN:i,relance3day:a,relance1week:r})})},sendEmail:function(e,t){return E({method:"post",url:h.getUrl("/remboursementAdmin/{1}/send-email-invite",e),data:v({uniqIN:t})}).then(function(e){return e.data})},sendRelance:function(e,t,o){return E({method:"post",url:h.getUrl("/remboursementAdmin/{1}/send-relance-invite",e),data:v({uniqIN:t,message:o})}).then(function(e){return e.data})}},participation:{init:function(e,t,o,n){return E({method:"post",url:h.getUrl("/remboursement/{1}/participate",e),data:v({firstNameIN:t,lastNameIN:o,emailPE:n})}).then(function(e){return e.data})}}},billetterie:{saleNew:function(e){return E({method:"post",url:"/sale-new",data:v({namePO:e.namePO,organizerPO:e.organizerPO,descriptionPO:e.descriptionPO,commisionTypePO:e.commisionTypePO,op5publicPO:e.op5publicPO,op11NotificationPO:e.op11NotificationPO,dateStartPO:e.dateStartPO,dateEventPO:e.dateEventPO,op6DateLimitePO:e.op6DateLimitePO,quantityTicketPO:!1===e.quantityTicketPOActive?null:e.quantityTicketPO,reservedPlacePO:!1===e.reservedPlacePOActive?null:e.reservedPlacePO,hidePartCountPO:e.hidePartCountPO,placePO:e.placePO,photoPO:e.photoPO,positionX:e.position.x,positionY:e.position.y,widthPhotoPO:e.position.wpercent})})},saleEdit:function(e){return E({method:"post",url:"/sale-edit",data:v({uniqPO:e.uniqPO,namePO:e.namePO,organizerPO:e.organizerPO,descriptionPO:e.descriptionPO,commisionTypePO:e.commisionTypePO,op5publicPO:e.op5publicPO,op11NotificationPO:e.op11NotificationPO,dateStartPO:e.dateStartPO,dateEventPO:e.dateEventPO,op6DateLimitePO:e.op6DateLimitePO,quantityTicketPO:!1===e.quantityTicketPOActive?null:e.quantityTicketPO,reservedPlacePO:!1===e.reservedPlacePOActive?null:e.reservedPlacePO,hidePartCountPO:e.hidePartCountPO,placePO:e.placePO,photoPO:e.photoPO,positionX:e.position.x,positionY:e.position.y,widthPhotoPO:e.position.wpercent})})},saleAndAccountNew:function(e,t){return E({method:"post",url:"/sale-account-new",data:v({namePO:e.namePO,organizerPO:e.organizerPO,descriptionPO:e.descriptionPO,commisionTypePO:e.commisionTypePO,op5publicPO:e.op5publicPO,op11NotificationPO:e.op11NotificationPO,dateStartPO:e.dateStartPO,dateEventPO:e.dateEventPO,op6DateLimitePO:e.op6DateLimitePO,quantityTicketPO:!1===e.quantityTicketPOActive?null:e.quantityTicketPO,reservedPlacePO:!1===e.reservedPlacePOActive?null:e.reservedPlacePO,hidePartCountPO:e.hidePartCountPO,placePO:e.placePO,photoPO:e.photoPO,positionX:e.position.x,positionY:e.position.y,widthPhotoPO:e.position.wpercent,firstNamePE:t.firstNamePE,lastNamePE:t.lastNamePE,birthdayPE:t.birthdayPE,emailPE:t.emailPE,passwordPE:t.passwordPE,confirmPasswordPE:t.confirmPasswordPE,entityNamePE:t.entityNamePE,entityIdentifierPE:t.entityIdentifierPE})})},fetchInvites:function(e){return E({method:"post",url:"/billet/fetch-invites",data:v({uniqPO:e})}).then(function(e){return e.data})},ticketpositionupdate:function(e,t){return E({method:"post",url:h.getUrl("/billet/{1}/tickets/ticketpositionupdate",e),data:v({uniqsInOrder:t})}).then(function(e){return e&&e.data})},optionpositionupdate:function(e,t){return E({method:"post",url:h.getUrl("/billet/{1}/tickets/optionpositionupdate",e),data:v({uniqsInOrder:t})}).then(function(e){return e.data})},promocodepositionupdate:function(e,t){return E({method:"post",url:h.getUrl("/billet/{1}/tickets/promocodepositionupdate",e),data:v({uniqsInOrder:t})}).then(function(e){return e.data})},userpromocode:function(e,t){return E({method:"post",url:h.getUrl("/billet/{1}/user-promocode",e),data:v({codePC:t})}).then(function(e){return e.data})},createCaddie:function(e,t){return E({method:"post",url:h.getUrl("/billet/{1}/acheter",e),data:v({caddie:t})}).then(function(e){return e.data})},getParticipantInfo:function(e,t){return E({method:"get",url:h.getUrl("/billet/{1}/load-participant/{2}",e,t)}).then(function(e){return e.data},function(e){})},getParticipantsPaginated:function(e,t,o,n){return E({method:"get",url:e+"?page="+t+"&itemsPerPage="+o+"&filter="+n}).then(function(e){return e.data},function(e){})},form:{create:function(e,t,o,n,i,a){return E({method:"post",url:h.getUrl("/billet/{1}/form/addForm/submit",e),data:v({nameFO:t,askEmailPerTicketFO:o,tickets:n,formFields:i,formFieldsOrder:a})})},edit:function(e,t,o,n,i,a,r){return E({method:"post",url:h.getUrl("/billet/{1}/form/edit/{2}/submit",e,t),data:v({nameFO:o,askEmailPerTicketFO:n,tickets:i,formFields:a,formFieldsOrder:r})})},delete:function(e,t){return E({method:"post",url:h.getUrl("/billet/{1}/forms/delete-form",e),data:v({uniqFO:t})}).then(function(e){return e.data})}},ticket:{resetScan:function(e){return E({method:"post",url:h.getUrl(BILLETTERIE_TICKETresetSCAN,e)})},delete:function(e,t){return E({method:"post",url:h.getUrl("/billet/{1}/tickets/delete-ticket",e),data:v({uniqTI:t})}).then(function(e){return e.data})},update:function(e,t,o,n,i,a,r,l,s,c,d,u,p,f,g,m){return E({method:"post",url:h.getUrl("/billet/{1}/ticket/edit/{2}/submit",e,t),data:v({nameTI:o,priceTI:n,quantityTI:i,quantityMinTI:a,quantityMaxTI:r,descTI:l,blockBackgroundColor:s,textColor:c,blockOpacity:d,image:u,corpX:p,corpY:f,corpWidth:g,corpHeight:m})}).then(function(e){return e&&e.data})},create:function(e,t,o,n,i,a,r,l,s,c,d,u,p,f,g){return E({method:"post",url:h.getUrl("/billet/{1}/ticket/addTicket/submit",e),data:v({nameTI:t,priceTI:o,quantityTI:n,quantityMinTI:i,quantityMaxTI:a,descTI:r,blockBackgroundColor:l,textColor:s,blockOpacity:c,image:d,corpX:u,corpY:p,corpWidth:f,corpHeight:g})})},deleteAdminAddedTickets:function(e,t){return console.log("uniqPO",e),console.log("uniqIN",t),E({method:"post",url:h.getUrl("/billet/{1}/tickets/delete-admin-added-tickets",e),data:v({uniqIN:t})})},option:{create:function(e,t,o,n,i,a){return E({method:"post",url:h.getUrl("/billet/{1}/ticket/addOption/submit",e),data:v({nameTO:t,priceTO:o,quantityTO:n,dateLimitTO:i,tickets:a})}).then(function(e){return e&&e.data})},delete:function(e,t){return E({method:"post",url:h.getUrl("/billet/{1}/tickets/delete-option",e),data:v({uniqTO:t})}).then(function(e){return e.data})},update:function(e,t,o,n,i,a,r){return E({method:"post",url:h.getUrl("/billet/{1}/option/edit/{2}/submit",e,t),data:v({nameTO:o,priceTO:n,quantityTO:i,dateLimitTO:a,tickets:r})}).then(function(e){return e&&e.data})}},promocode:{create:function(e,t,o,n,i){return E({method:"post",url:h.getUrl("/billet/{1}/promoCode/addPromoCode/submit",e),data:v({codePC:t,pricePC:o,oneShotPC:n,tickets:i})}).then(function(e){return e&&e.data})},update:function(e,t,o,n,i,a){return E({method:"post",url:h.getUrl("/billet/{1}/promoCode/edit/{2}/submit",e,t),data:v({codePC:o,pricePC:n,oneShotPC:i,tickets:a})}).then(function(e){return e&&e.data})},delete:function(e,t){return E({method:"post",url:h.getUrl("/billet/{1}/tickets/delete-promocode",e),data:v({uniqPC:t})}).then(function(e){return e.data})}}}},account:{facebookConnect:function(e){return E({method:"post",url:"/facebook-connect",data:v({facebookData:e})}).then(function(e){return e.data})},newPassword:function(e,t,o){return E({method:"post",url:h.getUrl("/new-password/{1}",e),data:v({passwordPE:t,confirmPasswordPE:o})})},removeCookie:function(e){return console.log("cookieName= "+e),E({method:"post",url:"/delete-cookie",data:v({cookieName:e})})},manageCookie:function(e){return E({method:"post",url:i,data:v({functional:e.functional,technical:e.technical,social:e.social,analytics:e.analytics})})},acceptAllCookies:function(){return E({method:"post",url:i,data:v({functional:!0,technical:!0,social:!0,analytics:!0})})},refuseAllCookies:function(){return E({method:"post",url:i,data:v({functional:!0,technical:!1,social:!1,analytics:!1})})},confirmCguOrganizer:function(e){return E({method:"post",url:"/person/cgu-choice",data:v({cguChoice:e})}).then(function(e){return e.data})},submitMissingInformations:function(e){return E({method:"post",url:"/api/account/missing-informations",data:JSON.stringify({emailPE:e.emailPE,cspCodePE:e.cspCodePE,acceptNewsLetterPE:e.acceptNewsLetterPE,acceptCommercialsPE:e.acceptCommercialsPE,birthDayPE:angular.isDate(e.birthDayPE)?h.formatDate(e.birthDayPE):e.birthDayPE})}).then(function(e){return e.data})},passwordForgotten:function(e,t,o){return E({method:"post",url:"/password-forget",data:v({email:e,relaod:o,token:t})})},kyc:{editCustomKycName:function(e,t){return E({method:"post",url:h.getUrl("/kyc/{1}/change-custom-name",e),data:v({newName:t})}).then(function(e){return e.data})},validateKycRemediation:function(){return E({method:"post",url:h.getUrl("/api/kyc-remediation/validate")}).then(function(e){return e.data})}},address:{edit:function(e,t,o,n){return E({method:"post",url:"/kyc/edit-adress",data:v({addressStreetPE:e,addressZipCodePE:t,addressCityPE:o,countryPE:n})}).then(function(e){return e.data})}},iban:{add:function(e,t,o,n,i,a){return E({method:"post",url:"/monCompte/add-iban",data:v({passwordPE:e,external:t,firstName:o,lastName:n,bicIB:i,iban:a})}).then(function(e){return e.data})},delete:function(e,t){return E({method:"post",url:"/monCompte/delete-iban",data:v({passwordPE:e,uniqIB:t})}).then(function(e){return e.data})},getAll:function(e){return E({method:"post",url:"/monCompte/fetch-ibans",data:v({passwordPE:e})}).then(function(e){return e.data})}},updateProfil:function(e,t,o,n,i,a){return E({method:"post",url:"/monCompte/update-profil",data:v({firstNamePE:e,lastNamePE:t,birthdayPE:o,cspCodePE:n,avatar:i,personalizedImage:a})}).then(function(e){return e.data})},updateEmail:function(e,t,o){return E({method:"post",url:"/monCompte/update-email",data:v({emailPE:e,newEmailPE:t,passwordPE:o})}).then(function(e){return e.data})},activateGoogleTfa:function(e,t){return E({method:"post",url:"/activate-google-tfa",data:v({googleValidationCode:e,passwordPE:t})}).then(function(e){return e.data})},getCSPValues:function(e){return E({method:"get",url:"/get-csp-values/"+e}).then(function(e){return e.data})},smsCodeValidation:function(e){return E({method:"post",url:"/sms-activation",data:v({smsCode:e})}).then(function(e){return e.data})},tfaAuthOff:function(e){return E({method:"post",url:"/tfa-deactivate",data:v({tfaCode:e})}).then(function(e){return e.data})},sendSmsTfa:function(){return E({method:"post",url:"/send-sms-tfa"}).then(function(e){return e.data})},initSmsTfa:function(e,t,o){return E({method:"post",url:"/init-sms-tfa",data:v({smsCountry:e,telPE:t,passwordPE:o})}).then(function(e){return e.data})},updateEmailConfirmation:function(e){return E({method:"get",url:"/monCompte/update-email-step-2/"+e})},updatePassword:function(e,t){return E({method:"post",url:"/monCompte/update-password",data:v({passwordPE:e,newPasswordPE:t})}).then(function(e){return e.data})},downloadCodes:function(){return E({method:"get",url:"/api/backup-codes/download"}).then(function(e){return e.data})},accountAdd:function(e){return E({method:"post",url:"/account-new",data:v({firstNamePE:e.firstNamePE,lastNamePE:e.lastNamePE,birthdayPE:e.birthdayPE,cspCodePE:e.cspCodePE,emailPE:e.emailPE,passwordPE:e.passwordPE,confirmPasswordPE:e.confirmPasswordPE,entityNamePE:e.entityNamePE,entityIdentifierPE:e.entityIdentifierPE,notDefaultRedirect:e.notDefaultRedirect,telPE:e.telPE,confirmNewsletter:e.confirmNewsletter,confirmCommercialsPE:e.confirmCommercialsPE})})},sendContact:function(e){return E({method:"post",url:"/send-contact",data:v({firstName:e.firstName,lastName:e.lastName,email:e.email,message:e.message,tel:e.tel})})},desabonnementValid:function(e,t){return E({method:"post",url:"/desabonnement-valid",data:v({uniqPE:e,fromEmailType:t})})},retrive10:function(){return E({method:"get",url:t})},updateLocale:function(e){return E({method:"post",url:h.getUrl("/update-locale/{1}",e)})},retrive10AfterNotificationID:function(e){return E({method:"get",url:t+"?notificationID="+encodeURIComponent(e)})},resendActivation:function(){return E({method:"post",url:"/resend-activation"}).then(function(e){return e.data})}},newsletter:{registerCamilleVirgin:function(e,t){return console.log(e),E({method:"post",url:e,data:v(t)}).then(function(e){})}},plateforms:{massiliaSociosClub:{newCaddie:function(e){return E({method:"post",url:"/om-new-caddie",data:v({payerFirstName:e.payerFirstName,payerLastName:e.payerLastName,payerEmail:e.payerEmail,isPro:e.isPro,additionalContribution:e.additionalContribution,entries:JSON.stringify(e.entries)})}).then(function(e){return e&&e.data})}}},emailExist:function(e){return E({method:"post",url:"/emailunique",data:v({email:e})}).then(function(e){return e.data},function(e){if(void 0!==e.data.fieldErrors)for(var t in e.data.fieldErrors){t=e.data.fieldErrors[t];if(null!=_typeof(t.email))return t.email}return!1})},urlExistAndValid:function(e){return E({method:"post",url:"/story-list-validate-url",data:v({url:e})})},deleteProfileImage:function(e){return E({method:"post",url:"/delete-profile-image",data:v({url:e})})},login:function(e){return E({method:"post",url:"/login",data:v({email:e.email,password:e.password,stayConnected:e.stayConnected,tfaCode:e.tfaCode,token:e.token})}).then(function(e){return e.data})},smsCodeValidation:function(e){return E({method:"post",url:"/sms-validation",data:v({smsCode:e.smsCode})})},resendSmsCodeValidation:function(e){return E({method:"post",url:"/resend-sms-validation",data:v({email:e})})},initSmsValidation:function(e){return n({url:"/init-sms-validator",method:"POST",data:e,headers:{"Content-Type":"application/json"}})},initGoogleValidation:function(e){return n({url:"/init-google-validator",method:"POST",data:e,headers:{"Content-Type":"application/json"}})},logout:function(){return E({method:"get",url:"/logOut"})},updatePotStatus:function(e,t){return E({method:"post",url:"/update-pot-status",data:v({uniqPO:e,status:t})})},deleteInvite:function(e){return E({method:"post",url:"/delete-invite",data:v({inviteID:e})}).then(function(e){return e.data})},sendEmail:function(e,t,o){return E({method:"post",url:"/send-mail",data:v({uniqPO:e,email:t,message:o})}).then(function(e){return e.data})},sendOsflmResult:function(e,t,o,n,i,a,r){return E({method:"post",url:"/send-osflm-result",data:v({lastName:e,firstName:t,email:o,phoneNumber:n,question1:i,question2:a,question3:r})}).then(function(e){return e.data})},checkOsflmEmail:function(e){return E({method:"post",url:"/osflm-email-validity",data:v({email:e})}).then(function(e){return e.data})},checkOsflmPhone:function(e){return E({method:"post",url:"/osflm-phone-validity",data:v({phone:e})}).then(function(e){return e.data})},sendReportEmail:function(e,t,o,n){return E({method:"post",url:"/send-pot-report-mail",data:v({uniqPO:e,email:t,message:o,selectionOption:n})}).then(function(e){return e.data})},inviteDelete:function(e){return E({method:"post",url:"/mesPots/invite-delete",data:v({uniqPO:e})}).then(function(e){return e&&e.data})},declineAndHideInvitation:function(e){return E({method:"post",url:"/decline-hide-invitation",data:v({uniqPO:e})}).then(function(e){return e&&e.data})},potDelete:function(e){return E({method:"post",url:"/mesPots/pot-delete",data:v({uniqPO:e})}).then(function(e){return e.data})},lpcEditableSubmit:function(e,t){return E({method:"post",url:e,data:v(t)})},charts:{templates:{createdMoneyPots:"/chart/template/chart_created_money_pots",activatedMoneyPots:"/chart/template/chart_activated_money_pots",avgNumberParticipantsPerPot:"/chart/template/chart_avg_number_of_participants_per_pot",participationsNumber:"/chart/template/chart_participations_number",volume:"/chart/template/chart_volume",ratioSpendingsTransfers:"/chart/template/chart_ratio_spendings_transfers"},csv:{createdMoneyPots:"/chart/csv/chart_created_money_pots/",activatedMoneyPots:"/chart/csv/chart_activated_money_pots/",avgNumberParticipantsPerPot:"/chart/csv/chart_avg_number_of_participants_per_pot/",participationsNumber:"/chart/csv/chart_participations_number/",volume:"/chart/csv/chart_volume/",ratioSpendingsTransfers:"/chart/csv/chart_ratio_spendings_transfers/"}}}}]),angular.module("lpc").factory("StringService",function(){return{toCamelCase:function(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}}}),angular.module("lpc").factory("LpcInfoTooltipsHandler",[function(){var t=[];return{add:function(){var e=t.length,e={id:e+1,name:"tooltip"+(e+1)};return t.push(t),e}}}]),angular.module("lpc").factory("$LpcTemplateCache",["$http","$q",function(n,i){var a=[];return{get:function(t){var e=i.defer(),o=function(e,t){for(var o=0;o<e.length;o++)if(e[o].url==t)return e[o]}(a,t);return o?e.resolve(o.content):n.get(t).then(function(e){return a.push({url:t,content:e.data}),e.data})}}}]),angular.module("lpc").factory("ServerAdminFunction",["$http","Helper","$window","ErrorHandler","$rootScope","lpcHttp",function(e,i,t,o,n,a){return{showSuccessMsgSlider:function(e){var t=angular.element(document.getElementById("admin-page-msgok"));n.rootSuccessMsg=e,t.slideDown(),angular.element("html, body").animate({scrollTop:0},0),setTimeout(function(){t.slideUp()},3e3)},giftIdea:{getBestMarkedItems:function(e){return a({method:"get",url:"/idee-cadeau-api/best-marked-items-1/get-items?"+i.serializeData({categoriesIDsArray:JSON.stringify(e)})}).then(function(e){return e.data})},getBestMarkedItems2:function(e){return a({method:"get",url:"/idee-cadeau-api/best-marked-items-2/get-items?"+i.serializeData({sexID:e.sex,age:e.age,occasionID:e.occasion.value,budget:e.budget,passionsIDsArray:JSON.stringify(e.passions)})}).then(function(e){return e.data})},getBestMarkedItems3:function(e){return a({method:"get",url:"/idee-cadeau-api/best-marked-items-3/get-items?"+i.serializeData({sexID:e.sex,age:e.age,occasionID:e.occasion.value,budget:e.budget,passionsIDsArray:JSON.stringify(e.passions)})}).then(function(e){return e.data})},getBestMarkedItems4:function(e){return a({method:"get",url:"/idee-cadeau-api/best-marked-items-4/get-items?"+i.serializeData({sexID:e.sex,age:e.age,occasionID:e.occasion.value,budget:e.budget,passionsIDsArray:JSON.stringify(e.passions)})}).then(function(e){return e.data})},getBestMarkedItemsV1:function(e){return a({method:"get",url:"/idee-cadeau-api/best-marked-items-v1/get-items?"+i.serializeData({sexID:e.sex,age:e.age,occasionID:e.occasion.value,budget:e.budget,passionsIDsArray:JSON.stringify(e.passions)})}).then(function(e){return e.data})},getBestMarkedItemsV2:function(e){return a({method:"get",url:"/idee-cadeau-api/best-marked-items-v2/get-items?"+i.serializeData({sexID:e.sex,age:e.age,occasionID:e.occasion.value,budget:e.budget,passionsIDsArray:JSON.stringify(e.passions)})}).then(function(e){return e.data})},getBestMarkedItemsV3:function(e){return a({method:"get",url:"/idee-cadeau-api/best-marked-items-v3/get-items?"+i.serializeData({sexID:e.sex,age:e.age,occasionID:e.occasion.value,budget:e.budget,passionsIDsArray:JSON.stringify(e.passions)})}).then(function(e){return e.data})},getBestMarkedItemsAlpha:function(e){return a({method:"get",url:"/idee-cadeau-api/best-marked-items-alpha/get-items?"+i.serializeData({sexID:e.sex,age:e.age,occasionID:e.occasion.value,budget:e.budget,passionsIDsArray:JSON.stringify(e.passions)})}).then(function(e){return e.data})},getBestMarkedItemsBeta:function(e){return a({method:"get",url:"/idee-cadeau-api/best-marked-items-beta/get-items?"+i.serializeData({sexID:e.sex,age:e.age,occasionID:e.occasion.value,budget:e.budget,passionsIDsArray:JSON.stringify(e.passions)})}).then(function(e){return e.data})},getBestMarkedItemsBeta2:function(e){return a({method:"get",url:"/idee-cadeau-api/best-marked-items-beta2/get-items?"+i.serializeData({sexID:e.sex,age:e.age,occasionID:e.occasion.value,budget:e.budget,passionsIDsArray:JSON.stringify(e.passions)})}).then(function(e){return e.data})},getBestMarkedItemsBeta2_1:function(e){return a({method:"get",url:"/idee-cadeau-api/best-marked-items-beta2-1/get-items?"+i.serializeData({sexID:e.sex,age:e.age,occasionID:e.occasion.value,budget:e.budget,passionsIDsArray:JSON.stringify(e.passions)})}).then(function(e){return e.data})},getBestMarkedItemsBeta2_2:function(e,t){return a({method:"get",url:"/idee-cadeau-api/best-marked-items-beta2-2/get-items?"+i.serializeData({sexID:e.sex,age:e.age,occasionID:e.occasion.value,budget:e.budget,passionsIDsArray:JSON.stringify(e.passions),offset:t})}).then(function(e){return e.data})},getBestMarkedItemsBeta2_3:function(e,t){return a({method:"get",url:"/idee-cadeau-api/best-marked-items-beta2-3/get-items?"+i.serializeData({sexID:e.sex,age:e.age,occasionID:e.occasion.value,budget:e.budget,passionsIDsArray:JSON.stringify(e.passions),offset:t})}).then(function(e){return e.data})},getBestMarkedItemsDataMining:function(e,t){return a({method:"get",url:"/idee-cadeau-api/best-marked-items-data-mining/get-items?"+i.serializeData({sexID:e.sex,age:e.age,occasionID:e.occasion.value,budget:e.budget,passionsIDsArray:JSON.stringify(e.passions),offset:t})}).then(function(e){return e.data})},addItemsToKitties:function(e,t,o,n){return a({method:"post",url:"/idee-cadeau/add-items-to-idea-box",data:i.serializeData({selectedItems:JSON.stringify(e),selectedKitty:t,selectedCategories:JSON.stringify(o),age:n})}).then(function(e){return e.data})},incrementItemClicksNumber:function(e,t,o){return a({method:"post",url:"/idee-cadeau-api/item-details/increment-clicks-number",data:i.serializeData({selectedItem:e,selectedCategories:JSON.stringify(t),age:o})}).then(function(e){return e.data})}}}}]),angular.module("lpc").directive("integer",function(){return{require:"ngModel",link:function(e,t,o,n){function i(e){return null===e?n.$error&&n.$error.integer&&n.$setValidity("integer",!0):""+e==""+parseInt(e,10)?n.$setValidity("integer",!0):n.$setValidity("integer",!1),e}n.$parsers.push(i),n.$formatters.push(i)}}}),angular.module("lpc").directive("advblock",function(){return{link:function(e,t,o){t.on("mouseover",function(){e.hovers.hover1=!1,e.hovers.hover2=!1,e.hovers.hover3=!1,e.hovers.hover4=!1,e.hovers[""+o.advblock]=!0,e.$apply()}),t.on("mouseleave",function(){e.hovers[""+o.advblock]=!1,e.$apply()})}}}),angular.module("lpc").directive("homeuse",function(){return{link:function(o,e,t){e.on("mouseover",function(){angular.forEach(o.useblocks,function(e,t){o.useblocks[t]=!1}),o.useblocks[""+t.homeuse]=!0,o.$apply()}),e.on("mouseleave",function(){angular.forEach(o.useblocks,function(e,t){o.useblocks[t]=!1}),o.useblocks[""+t.homeuse]||(o.useblocks[""+t.homeuse]=!0),o.$apply()})}}}),angular.module("lpc").directive("footerh3",function(){return{link:function(e,t,o){t.on("click",function(){window.innerWidth<769&&(t.toggleClass("bigTitleBas"),t.next(["div"]).slideToggle())})}}}),angular.module("lpc").directive("faqsection",function(){return{link:function(e,t,o){t.on("click",function(){$(".faqList li").removeClass("faqListActive"),t.addClass("faqListActive"),$(".faqResponseCat").hide(),$(".faqResponseCat").eq(t.index()).show()})}}}),angular.module("lpc").directive("faq",function(){return{link:function(e,t,o){t.on("click",function(){t.is(":hidden")?ga("send","pageview","faq/"+o.id):window.location.href="#"+o.id.substring(8),t.toggleClass("faqPictoBG"),t.next(["div"]).toggle(),$("html, body").animate({scrollTop:$("#"+o.id).offset().top-80},500)})}}}),angular.module("lpc").directive("info",["$rootScope",function(i){return{link:function(e,t,o){t.addClass("info");var n=t.clone().removeAttr("info");n.insertAfter(t),t.addClass("visible-l"),n.addClass("visible-ms"),t.on("click",function(){t.children(["p"]).show()}),t.on("mouseover touchstart",function(){t.children(["p"]).show()}),t.on("mouseout touchmove",function(){t.children(["p"]).hide()}),n.on("click touchstart",function(){jQuery("[data-lpc-popup=info]").html("").append(n.children(["p"]).clone()),i.showPopup("info")})}}}]),angular.module("lpc").directive("lpcMin",function(){return{require:"ngModel",restrict:"A",link:function(e,t,o,n){function i(e){var t;return void 0===e||""==e?n.$setValidity("lpcmin",!0):(t=null!=_typeof("testAttr.lpcStrict")&&"true"==o.lpcStrict?parseFloat(n.$modelValue)<=parseFloat(o.lpcMin):0<parseFloat(n.$modelValue)?parseFloat(n.$modelValue)>=parseFloat(o.lpcMin):parseFloat(n.$modelValue)>parseFloat(o.lpcMin),n.$setValidity("lpcmin",t)),e}t.bind("blur",function(e){n.$parsers.push(i),n.$formatters.push(i),o.$observe("lpcMin",i)})}}}),angular.module("lpc").directive("lpcMax",function(){return{require:"ngModel",restrict:"A",link:function(e,t,n,i){function o(e){var t=null!=_typeof("testAttr.lpcStrict")&&"true"==n.lpcStrict,o=!0;return void 0===e||""==e||isNaN(e)||(o=t?parseFloat(e)<parseFloat(n.lpcMax):parseFloat(e)<=parseFloat(n.lpcMax)),i.$setValidity("lpcmax",o),e}i.$parsers.push(o),i.$formatters.push(o),n.$observe("lpcMax",o)}}}),angular.module("lpc").directive("lpcMaxLimitTo",function(){return{require:"ngModel",restrict:"A",link:function(i,a,r,l){a.on("blur",function(){var e,t,o,n=a.val();n&&(e=void 0===(n=n)||""==n?"":(t=null!=_typeof("testAttr.lpcStrict")&&"true"==r.lpcStrict,o=r.lpcMaxLimitTo.toString().replace(",","."),(t?parseFloat(n)<parseFloat(o):parseFloat(n)<=parseFloat(o))?n:parseFloat(o)),i.$apply(function(){a.val(e),l.$setViewValue(e)}))})}}}),angular.module("lpc").directive("lpcMinLimitTo",function(){return{require:"ngModel",restrict:"A",link:function(o,n,i,a){n.on("keyup",function(){var e,t=n.val();t&&(e=void 0===(t=t)||""==t?"":(null!=_typeof("testAttr.lpcStrict")&&"true"==i.lpcStrict?parseFloat(t)>parseFloat(i.lpcMinLimitTo):parseFloat(t)>=parseFloat(i.lpcMinLimitTo))?t:parseFloat(i.lpcMinLimitTo),o.$apply(function(){n.val(e),a.$setViewValue(e)}))})}}}),angular.module("lpc").directive("email",function(){return{require:"ngModel",restrict:"A",link:function(e,t,o,n){t.attr("type","email");function i(e){var t;return e&&(t=new RegExp("^[\\w]([+_\\-\\.\\w])*@([a-zA-Z0-9\\-]+\\.)+[A-Z]{2,}$","i").test(e.replace(/^\s+|\s+$/g,"")),n.$setValidity("lpcemail",t)),e}n.$parsers.push(i),n.$formatters.push(i),t.attr("type","email")}}}),angular.module("lpc").directive("emailLiveValidation",function(){return{require:"ngModel",restrict:"A",link:function(e,t,n,i){n.setTouchedOnFocus&&t.on("focus",function(){i.$setTouched(),e.$apply()}),t.attr("type","email");function o(e){var t,o;return e&&(t=new RegExp("^[\\w]([+_\\-\\.\\w])*@([a-zA-Z0-9\\-]+\\.)+[A-Z]{2,}$","i").test(e.replace(/^\s+|\s+$/g,"")),o=!0,i.$setValidity("lpcemail",t),n.emailLiveValidation&&(o=e.replace(/^\s+|\s+$/g,"").toLowerCase()!=n.emailLiveValidation.trim().toLowerCase()),i.$setValidity("sameemailoffererror",o)),e}i.$parsers.push(o),i.$formatters.push(o)}}}),angular.module("lpc").directive("validPotUrl",["ServerFunction",function(r){return{require:["ngModel","^form"],restrict:"A",link:function(e,t,o,n){var i=n[0],a=n[1];i.$$setOptions({updateOn:"blur"}),i.$validators.validPotUrl=function(e,t){return t&&(t=t.toLowerCase(),r.urlExistAndValid(t).then(function(e){a.uniqPO.$error={},i.$setValidity("uniqPO",!0)},function(e){if(i.$setValidity("uniqPO",!1),void 0!==e.data.fieldErrors)switch(e.data.fieldErrors[0].uniqPO){case"url-less-5":a.uniqPO.$error={URL_LESS_5:!0};break;case"url-more-100":a.uniqPO.$error={URL_MORE_100:!0};break;case"url-no-space":a.uniqPO.$error={URL_NO_SPACE_:!0};break;case"url-already-used":a.uniqPO.$error={URL_ALREADY_USED:!0};break;default:a.uniqPO.$error={WRONG_FORMAT:!0}}void 0===e.data.fieldErrors&&console.log("emptyyyyy")})),t}}}}]),angular.module("lpc").directive("passwordVerify",function(){return{require:"ngModel",scope:!1,link:function(e,t,o,n){n.$$setOptions({updateOn:"blur"}),e.$watch(function(){return o.passwordVerify+"_"+n.$viewValue},function(e){e&&(o.passwordVerify!==n.$viewValue?n.$setValidity("passwordVerify",!1):n.$setValidity("passwordVerify",!0))})}}}),angular.module("lpc").directive("uniqEmail",["ServerFunction",function(a){return{require:"ngModel",restrict:"A",link:function(e,t,o,n){function i(e){var t,o;return e&&(t=e.replace(/^\s+|\s+$/g,""),o=new RegExp("^[\\w]([+_\\-\\.\\w])*@([a-zA-Z0-9\\-]+\\.)+[A-Z]{2,}$","i").test(t),n.$setValidity("email",o),n.$$setOptions(o?{updateOn:"blur"}:null),o)&&a.emailExist(t).then(function(e){e&&"emailexist"==e?n.$setValidity(e,!1):n.$setValidity("emailexist",!0)}),e}n.$parsers.push(i),n.$formatters.push(i),n.$$setOptions({updateOn:"blur"})}}}]),angular.module("lpc").directive("birthdayValidator",["ServerFunction",function(e){return{require:"ngModel",restrict:"A",link:function(e,t,o,n){function i(e){var t;if(e)return t=e.replace(/\s/g,""),t=new Date(t.substring(6),t.substring(3,5)-1,t.substring(0,2)),t=Date.now()-t.getTime(),t=new Date(t),(t=Math.abs(t.getUTCFullYear()-1970))<18?n.$setValidity("under-18",!1):n.$setValidity("under-18",!0),115<t?n.$setValidity("upper-115",!1):n.$setValidity("upper-115",!0),e}n.$parsers.push(i),n.$formatters.push(i)}}}]),angular.module("lpc").directive("numeric",function(){return{require:"ngModel",restrict:"A",link:function(e,t,o,n){function i(e){var t;return e?(t=new RegExp("^-{0,1}[0-9]*[.,]{0,1}[0-9]*$","i").test((""+e).replace(/^\s+|\s+$|^/g,"")),n.$setValidity("numeric",t)):n.$setValidity("numeric",!0),e}n.$parsers.push(i),n.$formatters.push(i),t.attr("type","number")}}}),angular.module("lpc").directive("lpcPopup",["StringService","PopupHandler","$rootScope",function(c,d,e){return{restrict:"A",replace:!0,scope:!1,link:function(r,l,s){function e(){var e="",t=("true"==s.noMobilePadding&&(e=" not-padded"),"true"==s.lpcPopupNotClosable),o="",n=(s.noPadding&&(o="lpcpopup-no-padding"),s.noPadding?"":"<a class='lpc-popup-close-button-desktop hide-mobile'></a>"),i=t?"":"<a class='lpc-popup-close-button-desktop hide-desktop-tablet'></a>",e=angular.element("<table>").addClass("table-lpc-popup-container"+e).append(angular.element("<tr>").addClass("tr-lpc-popup-container").append(angular.element("<td>").addClass("td-lpc-popup-container").append(l.addClass("lpcpopup").addClass(o).addClass(s.lpcPopupClasses||"").append(n)))).append(i),o=s.lpcPopup,a=c.toCamelCase(o),n=(t&&l.find(".lpc-popup-close-button-desktop").hide(),l.find(".lpc-popup-close-button-desktop").on("click",function(e){t||(d.hide(a),e.stopPropagation())}),angular.element(window).on("keyup",function(e){27!=e.which||t||d.hide(a)}),void 0!==s.initShow&&"true"==s.initShow);l.bind("click",function(e){e.stopPropagation()}),e.bind("click",function(e){0!=angular.element("#mobile-close-popup:visible").size()||t||r.$apply(function(){d.hide(a)})}),angular.element("#mobile-close-popup").bind("click touchend",function(e){t||(d.clear(),e.stopPropagation())}),e.appendTo(document.getElementById("lpc-popup-container")),e.addClass(a+"-container"),d.add(a,e,n)}s.delay&&!isNaN(s.delay)?setTimeout(e,s.delay):e()}}}]),angular.module("lpc").directive("input",["$compile",function(n){return{restrict:"E",link:function(e,t,o){"submit"==o.type&&(o.ngDisabled?-1==o.ngDisabled.indexOf("page.ajaxLoading")&&(o.ngDisabled="("+o.ngDisabled+") || page.ajaxLoading"):t[0].disabled||(t.attr("ng-disabled","page.ajaxLoading"),n(t)(e)))}}}]),angular.module("lpc").directive("form",["ErrorHandler",function(n){return{restrict:"E",link:function(e,t,o){e=e[o.name];n.setForm(o.name,e)}}}]),angular.module("lpc").directive("form",["lpcHttp","$rootScope",function(a,r){return{restrict:"E",link:function(o,n,i){n.on("submit",function(){i.noLoadStyle&&"true"==i.noLoadStyle||a.setLastSubmitForm(n);function e(){var e;i.doNotScroll&&"true"==i.doNotScroll||((i.scrollToInvalidElement&&"true"==i.scrollToInvalidElement?n.find(".ng-invalid"):angular.element(".ng-invalid")).each(function(){(!e||angular.element(this).offset().top<e.offset().top)&&(e=angular.element(this))}),e&&e.length&&jQuery("html,body").animate({scrollTop:e.offset().top-100},150,function(){e.focus()}))}if(o){for(var t in o.idAddUpdateForm)o.idAddUpdateForm.hasOwnProperty(t)&&o.idAddUpdateForm[t]&&o.idAddUpdateForm[t].$setDirty&&o.idAddUpdateForm[t].$setDirty();o.$digest()}setTimeout(e,100),r.$on("find-and-scroll-to-first-invalid-element-event",function(){setTimeout(e,100)})})}}}]),angular.module("lpc").directive("validateOnBlur",[function(){return{restrict:"A",require:"ngModel",scope:{},link:function(e,t,o,n){t.addClass("no-error"),t.on("blur",function(){n.$showValidationMessage=n.$dirty,e.$$phase||e.$apply(),t.removeClass("no-error")})}}}]),angular.module("lpc").directive("progressBar",function(){return{restrict:"A",scope:{sumContribution:"@"},controller:["$scope","$element","$attrs",function(e,o,n){function t(){var e=parseFloat(n.amounttoreach),t=parseFloat(n.sumcontribution);0<=(t=isNaN(t)?0:t)&&(1<(t=t/e)&&(t=1),o.show(),o.css("width",100*t+"%"))}n.$observe("sumcontribution",t),t()}]}}),angular.module("lpc").directive("lpcTabs",["Helper",function(r){function l(e){s.find("."+o).removeClass(o),angular.element(d[e]).addClass(o),c.find("."+n).removeClass(n);var t=angular.element(u[e]);t.addClass(n),p=e,t.trigger("showTab")}var s,c,d,u,o="head-tab-active",n="content-tab-active",p=-1;return{restrict:"A",link:function(e,t,o){(s=t.find("[lpc-tabs-head]")).addClass("lpc-tabs-head"),d=s.children(),(c=t.find("[lpc-tabs-content]")).addClass("lpc-tabs-content"),u=c.children();function n(){var e=r.handleTag.serachHash();e&&void 0!==e.tab&&(e=e.tab,isNaN(e)||(e=parseInt(e))<i&&(p=e))}var i=Math.min(d.length,u.length);d.addClass("head-tab"),u.addClass("content-tab");if(n(),angular.element(window).bind("hashchange",function(){p=0,n(),l(p)}),-1!=p)for(var a=0;a<d.length;a++)d[a].hasAttribute("tab-active")&&d[a].removeAttribute("tab-active");else{for(a=i-1;a<d.length;a++)d[a].hasAttribute("tab-active")&&d[a].removeAttribute("tab-active");for(a=0;a<i;a++)d[a].hasAttribute("tab-active")&&(-1==p?d[a].removeAttribute("tab-active"):p=a);-1==p&&(p=0)}l(p),s.prepend(angular.element("<a>").addClass("leftArrow").addClass("visible-s").click(function(){var e=r.handleTag.serachHash();e.tab=(p+i-1)%i,window.location.hash="/?"+r.serializeData(e)}).bind("touchstart",function(e){angular.element(this).click(),e.preventDefault()})),s.append(angular.element("<a>").addClass("rightArrow").addClass("visible-s").click(function(){var e=r.handleTag.serachHash();e.tab=(p+1)%i,window.location.hash="/?"+r.serializeData(e)}).bind("touchstart",function(e){angular.element(this).click(),e.preventDefault()})),d.splice(i),d.click(function(e){var t=r.handleTag.serachHash();t.tab=d.index(this),window.location.hash="/?"+r.serializeData(t)})}}}]),angular.module("lpc").directive("mapInit",["$window","$http",function(e,o){function n(){var e,t;console.log("creating map inti: ",i),e=i,(t=document.createElement("meta")).name="referrer",t.content="no-referrer",document.getElementsByTagName("head")[0].appendChild(t),o({method:"GET",url:"https://nominatim.openstreetmap.org/search/"+e+"?format=json&addressdetails=1&limit=1&polygon_svg=1"}).then(function(e){var t,o,n;console.log("data : ",e.data),null!=e.data&&null!=e.data[0]&&null!=e.data[0].lat&&null!=e.data[0].lon?(t=e.data[0].lat,e=e.data[0].lon,o={zoom:14,scrollwheel:!1,center:new google.maps.LatLng(t,e),mapTypeId:google.maps.MapTypeId.ROADMAP},n=new google.maps.Map(a,o),new google.maps.Marker({map:n,position:new google.maps.LatLng(t,e)})):(o={zoom:5,scrollwheel:!1,center:new google.maps.LatLng(46.227638,2.213749),mapTypeId:google.maps.MapTypeId.ROADMAP},n=new google.maps.Map(document.getElementById("map_canvas"),o),document.querySelector("[name='referrer']").remove())})}var i,a;return{restrict:"A",link:function(e,t,o){i=o.mapInit,a=t[0],e.$on("reload-map",function(e){n()})}}}]),angular.module("lpc").directive("fileread",["ErrorHandler",function(r){return{scope:{fileread:"=",fileonload:"=",fileonloadstart:"="},link:function(n,i,a){i.bind("change",function(e){var t,o=e&&e.target&&e.target.files&&e.target.files[0]&&e.target.files[0].name&&e.target.files[0].name.split&&e.target.files[0].name.split(".").length&&1<e.target.files[0].name.split(".").length&&e.target.files[0].name.split(".").pop().toLowerCase();-1<["tiff","tif"].indexOf(o)?r.handle({data:{fieldErrors:[{page:"extentionnotsupported"}]}}):((t=new FileReader).onload=function(e){n.$apply(function(){n.fileread=e.target.result}),void 0!==a.fileonload&&""!=a.fileonload&&("function"==typeof window.self[a.fileonload]?window.self[a.fileonload](e):"function"==typeof n.fileonload?n.fileonload(e):window.console&&window.console.error("function not found:"+a.fileonload)),i.trigger("fileonload",e),angular.element("body").removeClass("progressBody"),i.val("")},t.onloadstart=function(e){e&&e.total&&15728640<e.total?(t.abort(),r.handle({data:{fieldErrors:[{page:"fileoversize"}]}})):(angular.element("body").addClass("progressBody"),void 0!==a.fileonloadstart&&""!=a.fileonloadstart&&("function"==typeof window.self[a.fileonloadstart]?window.self[a.fileonloadstart](e):"function"==typeof n.fileonloadstart?n.fileonloadstart(e):window.console&&window.console.error("function not found:"+a.fileonloadstart)),i.trigger("fileonloadstart",e))},e.target.files&&e.target.files[0]&&t.readAsDataURL(e.target.files[0]))})}}}]),angular.module("lpc").directive("aDisabled",function(){return{compile:function(e,t,o){return t.ngClick="!("+t.aDisabled+") && ("+t.ngClick+")",function(t,o,n){n.$observe("aDisabled",function(e){void 0!==e&&o.toggleClass("a-disabled",e=1==e||"true"==e)}),o.on("click",function(e){t.$eval(n.aDisabled)&&e.preventDefault()})}}}}),angular.module("lpc").directive("lpcSortable",function(){return{link:function(n,i,a){jQuery().sortable&&i.sortable({items:"[lpc-sortable-item]",update:function(e,t){var o=[];angular.element("[lpc-sortable-item]",i).each(function(){o.push(angular.element(this).attr("lpc-sortable-item"))}),n.$apply(function(e){e[a.lpcSortableCallback](o,function(){i.sortable("cancel")})})}})}}}),angular.module("lpc").directive("corp",function(){function n(e){0<parseInt(e.w)&&(i.selection=e,"object"!=_typeof(i.original.selection)&&(i.original.selection={}),i.original.selection.x=Math.round(i.original.width*e.x/i.boundx),i.original.selection.y=Math.round(i.original.height*e.y/i.boundy),i.original.selection.width=Math.round(i.original.width*e.w/i.boundx),i.original.selection.height=Math.round(i.original.height*e.h/i.boundy))}var i,a={};return{scope:{corp:"="},link:function(t,o,e){void 0!==e.corp&&(i={}),o.load(function(){void 0!==a[o.uniqueId().attr("id")]&&(a[o.uniqueId().attr("id")].destroy(),o.css({width:"",height:"",display:"",visibility:""}));var e=new Image;e.src=o.attr("src"),e.onload=function(){i.original={width:e.width,height:e.height},t.$apply(function(){t.corp={cord:i}}),o.Jcrop({allowSelect:!1,onChange:n,onSelect:n,aspectRatio:700/300},function(){(a[o.uniqueId().attr("id")]=this).animateTo([100,100,400,300]);var e=this.getBounds();i.boundx=e[0],i.boundy=e[1]})}})}}}),angular.module("lpc").directive("colorpic",function(){return{scope:{colorpic:"="},link:function(i,e,t){e.colpick({color:i.colorpic&&i.colorpic.hex?i.colorpic.hex:"d4eee8",submit:0,onChange:function(e,t,o,n){i.$apply(function(){i.colorpic||(i.colorpic={}),i.colorpic.hex=t,i.colorpic.rgb||(i.colorpic.rgb={}),i.colorpic.rgb.r=o.r,i.colorpic.rgb.g=o.g,i.colorpic.rgb.b=o.b})}})}}}),angular.module("lpc").directive("slider",function(){return{scope:{slider:"="},link:function(o,e,t){jQuery().slider&&e.slider({value:o.slider||50,slide:function(e,t){o.$apply(function(){o.slider=t.value})}})}}}),angular.module("lpc").directive("putDirective",["$compile",function(l){return{restrict:"A",replace:!1,priority:1e3,link:function(e,t,o){var n;if(o.putDirective&&(n=JSON.parse(o.putDirective)))for(var i=0,a=n.length;i<a;i++){var r=n[i];r.active&&r.attr&&t.attr(r.attr,r.value&&r.value||"")}t.removeAttr("put-directive"),t.removeAttr("data-put-directive"),l(t)(e)}}}]),angular.module("lpc").directive("equal",[function(){return{require:"ngModel",link:function(e,t,o,n){var i="#"+o.equal;t.add(i).on("keyup",function(){e.$apply(function(){var e=t.val()===$(i).val();n.$setValidity("equal",e)})})}}}]),angular.module("lpc").directive("ibanInput",function(){var c=[];return{require:"ngModel",link:function(r,t,e,o){var l=angular.element("[iban-input]",t.parent()).index(t),s=angular.element("[iban-input]",t.parent()).size();c[l]=o,t.on("keydown keyup",function(e){if(!(8<=e.which&&e.which<=46)&&4<=this.value.length){if(!(l<s-1))return!1;t.next().focus().select()}}),t.on("paste",function(e){var t;if(e.originalEvent.clipboardData&&e.originalEvent.clipboardData.getData)t=e.originalEvent.clipboardData.getData("text/plain").replace(/\s/g,"");else{if(!window.clipboardData)return!0;t=window.clipboardData.getData("Text").replace(/\s/g,"")}e.preventDefault();for(var o=angular.element(this),n=l,i=0;i<t.length&&i<28&&n<=s;i+=4){var a=t.substr(i,4);o.val(a),o=o.next(),r.$apply(function(){c[n].$setViewValue(a)}),n++}jQuery(".num").blur()})}}}),angular.module("lpc").directive("formatName",["$filter",function(i){return{require:"?ngModel",link:function(e,t,o,n){n&&(n.$formatters.unshift(function(e){return i(o.formatName)(n.$modelValue)}),n.$parsers.unshift(function(e){e=e.replace(/[^\d|\-+|\.+|a-z|A-Z]/g,"");return t.val(i(o.formatName)(e)),e}))}}}]),angular.module("lpc").directive("maxlength",function(){return{link:function(e,t,o){t.on("keydown keyup",function(e){if(!(8<=e.which&&e.which<=46||isNaN(o.maxlength))){e=parseInt(o.maxlength);if(this.value.length>=e)return!1}})}}}),angular.module("lpc").directive("bic",function(){return{require:"ngModel",restrict:"A",link:function(t,e,o,n){e.on("keydown",function(e){if(!(8<=e.which&&e.which<=46))return!(11<=this.value.length)&&void("FPELFR21"===this.value.trim().substring(0,8)?n.$setValidity("bicnotnickel",!1):"PRNSFRP1"===this.value.trim().substring(0,8)?n.$setValidity("bicnotprns",!1):"DEUTDEDBPAL"===this.value.trim().substring(0,11)?n.$setValidity("bicpaypal",!1):t.$apply(function(){n.$setValidity("bicnotnickel",!0),n.$setValidity("bicnotprns",!0)}))}),e.on("keyup",function(){"FPELFR21"===this.value.trim().substring(0,8)?n.$setValidity("bicnotnickel",!1):"PRNSFRP1"===this.value.trim().substring(0,8)?n.$setValidity("bicnotprns",!1):"DEUTDEDBPAL"===this.value.trim().substring(0,11)?n.$setValidity("bicpaypal",!1):t.$apply(function(){n.$setValidity("bicnotnickel",!0),n.$setValidity("bicnotprns",!0)}),this.value&&11!=jQuery.trim(this.value).length&&8!=jQuery.trim(this.value).length?n.$setValidity("biclength",!1):t.$apply(function(){n.$setValidity("biclength",!0)})})}}}),angular.module("lpc").directive("ticketsMinimum",function(){return{require:"ngModel",restrict:"A",link:function(t,e,o,n){e.on("keydown",function(e){parseFloat(this.value)<.59&&0<parseFloat(this.value)?n.$setValidity("minimumTicketPrice",!1):t.$apply(function(){n.$setValidity("minimumTicketPrice",!0)})}),e.on("keyup",function(){parseFloat(this.value)<.59&&0<parseFloat(this.value)?n.$setValidity("minimumTicketPrice",!1):t.$apply(function(){n.$setValidity("minimumTicketPrice",!0)})})}}}),angular.module("lpc").directive("amount",function(){return{require:"ngModel",restrict:"A",link:function(e,t,o,n){t.on("keyup",function(){this.value>e.pot.amountLeft?n.$setValidity("amountExceed",!1):n.$setValidity("amountExceed",!0)})}}}),angular.module("lpc").directive("lpcFrame",["$rootScope",function(i){var o=!1;return{restrict:"A",link:function(n,e,t){void 0===window.testJS?window.testJS={element:e}:window.testJS.element=e,e.on("load",function(){e.height(e.contents().find("body").height())}),angular.element(window).on("resize load showTab",function(){o||(o=!0,setTimeout(function(){e.height(e.contents().find("body").height()),o=!1},250))}),e.on("kyc",function(e,t,o){n.$apply(function(){n.kyc=t,n.title=o,i.showPopup("kyc")})}),e.on("kycUploaded",function(e,t){n.$emit("kycUploaded",t)})}}}]),angular.module("lpc").directive("lpcEditor",["$rootScope",function(a){return{transclude:!0,require:"?ngModel",restrict:"A",link:function(e,t,o,n){if(!o.lang)throw new Error("editor language has to be specified, you have to specify attribute lang");if(!o.id)throw new Error("the text area id has to be specified");$.extend(!0,$.trumbowyg.upload,{serverPath:"/desc-image",fileFieldName:"upload",statusPropertyName:"status",urlPropertyName:"path"});var i={semantic:!0,resetCss:!0,mobile:!0,tablet:!0,fullscreenable:!1,removeformatPasted:!0,lang:o.lang.toLowerCase(),btnsDef:{image:{dropdown:["insertImage","upload"],ico:"insertImage"},linkImproved:{dropdown:["createLink","editLink","unlink"],ico:"link"}},btns:["fontSize","","btnGrp-design","","linkImproved","","image","","btnGrp-justify","","btnGrp-lists","","horizontalRule","","removeformat"]};$("#"+o.id).trumbowyg(i),n.$render=function(){$("#"+o.id).trumbowyg("html",n.$viewValue)},$("#"+o.id).on("tbwchange",function(){e.$apply(function(){n.$setViewValue($("#"+o.id).trumbowyg("html"))})}),a.editorLoading=!1}}}]),angular.module("lpc").directive("lpcdrag",function(){function a(e){(l=e.closest("[lpcdrag-container]")).css("overflow-x","hidden"),s=angular.element("<div>"),l.append(s),e.appendTo(s)}var r,l,s,c={};return{scope:{lpcdrag:"=",lpcdragfinalise:"=",lpcdragstop:"="},link:function(i,o,e){a(o);var n=(n=!(!i.lpcdrag||void 0===i.lpcdrag.x||void 0===i.lpcdrag.y)&&{x:i.lpcdrag.x,y:i.lpcdrag.y})||{x:50,y:50};o.load(function(){i.$apply(function(){i.lpcdragfinalise=function(){s.length&&(s.remove(),a(o),o.draggable({disabled:!0}))}}),c.container={width:l.width(),height:l.height(),ratio:l.width()/l.height()};var t=new Image;t.src=o.attr("src"),t.onload=function(){c.original={width:t.width,height:t.height,ratio:t.width/t.height};var e={};c.original.ratio<c.container.ratio?(o.css({width:c.container.width,height:"auto"}),e.axis="y"):(o.css({height:c.container.height,width:"auto"}),e.axis="x"),c.displayed={width:o.width(),height:o.height(),ratio:o.width()/o.height()},c.dragarea={width:2*c.displayed.width-c.container.width,height:2*c.displayed.height-c.container.height},s.css({width:c.dragarea.width+"px",height:c.dragarea.height+"px",marginTop:"-"+(c.dragarea.height-c.container.height)/2+"px",marginLeft:"-"+(c.dragarea.width-c.container.width)/2+"px",position:"relative"}),o.css({top:(c.dragarea.height-c.displayed.height)*((100-n.y)/100)+"px",left:(c.dragarea.width-c.displayed.width)*((100-n.x)/100)+"px",position:"absolute"}),e.containment="parent",e.scrollSpeed=50,e.drag=function(e,t){var o=c.dragarea.width-c.displayed.width,n=c.dragarea.height-c.displayed.height;r={x:0<o?100-100*t.position.left/o:50,y:0<n?100-100*t.position.top/n:50},i.$apply(function(){i.lpcdrag.x=r.x,i.lpcdrag.y=r.y})},o.on("dragstop",function(e,t){i.lpcdragstop&&i.lpcdragstop()}),i.$apply(function(){i.lpcdrag||(i.lpcdrag={}),i.lpcdrag.x=n.x,i.lpcdrag.y=n.y}),o.draggable(e)}})}}}),angular.module("lpc").directive("lpcHistoryReturn",function(){return{link:function(e,t,o){void 0===window.testJS?window.testJS={element:t}:window.testJS.element=t,t[0].onclick=function(){-1<document.referrer.indexOf("//localhost")||document.referrer.match(/.*(commonbox|lepotcommun|elbote|collettiamo).*/)?history.go(-1):document.location="/"}}}}),angular.module("lpc").directive("shareUrl",function(){var n;function o(){var e=window.getSelection(),t=n.text().replace(/(^\s+|\s+$)/g,""),t=/^http/.test(t)?t:"https://"+t,o=document.createElement("div");o.style.position="absolute",o.style.left="-99999px",document.body.appendChild(o),o.innerHTML=t,e.selectAllChildren(o),window.setTimeout(function(){document.body.removeChild(o)},100)}return{link:function(e,t){t.size&&t.size()&&(n=t)[0].addEventListener("copy",o)}}}),angular.module("lpc").directive("returnToParticipate",function(){return{scope:{kittySuffix:"@",participatePrefix:"@"},link:function(e,t){var o;e.kittySuffix||(e.kittySuffix="/pot/"),e.participatePrefix||(e.participatePrefix="/participer"),window.document.referrer&&window.document.referrer.indexOf&&-1!=window.document.referrer.indexOf(e.kittySuffix)?(o=new RegExp("^(((?!"+e.kittySuffix+").)*"+e.kittySuffix+"[^/]+).*$","g"),o=window.document.referrer.replace(o,"$1")+e.participatePrefix,t.attr("href",o)):-1==window.document.referrer.indexOf(e.kittySuffix)&&t.remove()}}}),angular.module("lpc").directive("backImg",function(){return{restrict:"A",scope:{backImg:"@"},controller:["$element","$attrs",function(t,e){function o(e){t.css({"background-image":"url("+e+")","background-repeat":"no-repeat","background-position":"center","background-size":"cover "})}e.$observe("backImg",o),o()}]}}),angular.module("lpc").directive("ngIf",function(){return{link:function(e,t){setTimeout(function(){t.addClass("lpc-active")},0)}}}),angular.module("lpc").directive("ngShow",function(){return{link:function(e,t){setTimeout(function(){t.addClass("lpc-active")},0)}}}),angular.module("lpc").directive("checklistModel",["$parse","$compile",function(n,d){function u(e,t,o){if(angular.isArray(e))for(var n=e.length;n--;)if(o(e[n],t))return!0;return!1}function o(i,e,t){d(e)(i);var a=n(t.checklistModel),r=a.assign,l=n(t.checklistChange),s=n(t.checklistValue)(i.$parent),c=angular.equals;function o(e,t){i.checked=u(e,s,c)}t.hasOwnProperty("checklistComparator")&&(c=n(t.checklistComparator)(i.$parent)),i.$watch("checked",function(e,t){var o,n;e!==t&&(t=a(i.$parent),r(i.$parent,!0===e?(e=t,o=s,n=c,u(e=angular.isArray(e)?e:[],o,n)||e.push(o),e):function(e,t,o){if(angular.isArray(e))for(var n=e.length;n--;)if(o(e[n],t)){e.splice(n,1);break}return e}(t,s,c)),l)&&l(i)}),angular.isFunction(i.$parent.$watchCollection)?i.$parent.$watchCollection(t.checklistModel,o):i.$parent.$watch(t.checklistModel,o,!0)}return{restrict:"A",priority:1e3,terminal:!0,scope:!0,compile:function(e,t){if("INPUT"!==e[0].tagName||"checkbox"!==t.type)throw'checklist-model should be applied to `input[type="checkbox"]`.';if(t.checklistValue)return e.removeAttr("checklist-model"),e.attr("ng-model","checked"),o;throw"You should provide `checklist-value`."}}}]),angular.module("lpc").directive("imgCheckbox",function(){return{restrict:"A",scope:{imgChecked:"@",imgNoChecked:"@",imgRadio:"@"},link:function(t,e,o){function n(e){e.prop("checked")?e.next().css("background-image","url("+t.imgChecked+")"):e.next().css("background-image","url("+t.imgNoChecked+")")}n(e),e.on("change",function(){n(e)})}}}),angular.module("lpc").directive("imgRadio",function(){return{restrict:"A",link:function(e,t,o){function n(e){$("input[name="+e+"]").each(function(e){$(this).prop("checked")?$(this).next().css("background-image","url("+$(this).attr("img-checked")+")"):$(this).next().css("background-image","url("+$(this).attr("img-no-checked")+")")})}$(document).ready(function(){n(o.name),$("input[name="+o.name+"]").on("change",function(){n(o.name)})})}}}),angular.module("lpc").directive("backImgRatio",function(t){return{restrict:"A",scope:{backImgRatio:"@"},controller:["$scope","$element","$attrs",function(o,n,e){function i(){n.prop("offsetWidth")/n.prop("offsetHeight")>o.imageRatio?n.css({"background-size":"auto 100%","-webkit-background-size":"auto 100%","-moz-background-size":"auto 100%","-o-background-size":"auto 100%"}):n.css({"background-size":"100% auto","-webkit-background-size":"100% auto","-moz-background-size":"100% auto","-o-background-size":"100% auto"})}e.$observe("backImgRatio",function(e){n.css({"background-image":"url("+e+")","background-repeat":"no-repeat","background-position":"center"});var t=new Image;t.src=e,t.onload=function(){o.imageRatio=this.width/this.height,i()}}),t.addEventListener("resize",function(){i()},!0)}]}}),angular.module("lpc").directive("inputNumber",function(){return{restrict:"A",link:function(e,o,t){o.on("keyup",function(e){var t=(t=o.val()).replace(/\D+/g,"");o.val(t),e.preventDefault()}),jQuery(o).bind("copy paste",function(e){e.preventDefault()})}}}),angular.module("lpc").directive("inputAmount",function(){return{require:"?ngModel",restrict:"A",link:function(e,t,o,n){e.$watch(o.ngModel,function(e,t){e&&e!=t&&isNaN(e.replace(/,/g,"."))&&(n.$setViewValue(t),n.$render())})}}}),angular.module("lpc").directive("lpcCaractersCount",function(){return{require:"ngModel",restrict:"A",link:function(e,t,o,n){function i(e,t){return e=e&&e.length?e.length>=t?0:t-e.length:""===e?t:0}if(!o.ngModel)throw new Error("ngModel has to be specified!");if(!o.messageTemplate)throw new Error("messageTemplate has to be specified!");if(!o.ngMaxlength)throw new Error("ngMaxlength has to be specified!");t.after("<span class='smallFont2' id='"+n.$name+"'>"+o.messageTemplate.replace("%s",i(n.$viewValue,o.ngMaxlength))+"</span>"),e.$watch(o.ngModel,function(e){var t=o.ngMaxlength;$("#"+n.$name).text(o.messageTemplate.replace("%s",i(e,t)))})}}}),angular.module("lpc").directive("lpcEditableText",["ServerFunction",function(n){return{restrict:"E",scope:{editableModel:"=editableModel",required:"@",editableTable:"@",editableField:"@",editableTableId:"@",editableTableIdValue:"@",editableUrl:"@",editableSuccessCallback:"&editableSuccessCallback",editableFailureCallback:"&editableFailureCallback"},templateUrl:"/static/partial/lpc-editable.html",link:function(t,o,e){if(t.required||(t.required=!1),!t.editableTable)throw new Error("editableTable attributes must be defined");if(!t.editableField)throw new Error("editableField attributes must be defined");if(!t.editableTableId)throw new Error("editableTableId attributes must be defined");if(!t.editableUrl)throw new Error("editableUrl attributes must be defined");t.$watch("editableModel",function(){t.changingValue=angular.copy(t.editableModel)}),$("html").click(function(e){o.find("div").hide(),o.find("span").show()}),o.find("div").on("click",function(e){e.stopPropagation()}),o.on("click",function(){if(!t.editableTableIdValue)throw new Error("tableIdValue attributes must be defined");$(".lpcEditableSpan").show(),$(".lpcEditableDiv").hide(),t.$apply(function(){t.changingValue=angular.copy(t.editableModel)}),o.find("span").hide(),o.find("div").show(),o.find("div input").focus(),o.find("div input").select()}),t.cancel=function(){o.find("div").hide(),o.find("span").show()},t.submit=function(){t.changingValue!=t.editableModel&&n.lpcEditableSubmit(t.editableUrl,{table:t.editableTable,tableId:t.editableTableId,tableIdValue:t.editableTableIdValue,field:t.editableField,fieldValue:t.changingValue}).then(function(e){t.editableSuccessCallback&&t.editableSuccessCallback({data:e.data}),t.editableModel=angular.copy(t.changingValue),t.cancel()},function(e){t.editableFailureCallback&&t.editableFailureCallback({data:e.data})})}}}}]),angular.module("lpc").directive("lpcPaginator",["ServerFunction","Helper",function(a,r){return{restrict:"E",scope:{paginatorData:"=paginatorData",paginatorUrl:"@",paginatorElementsCount:"@",itemsPerPage:"@",paginatorId:"@",paginatorFilter:"="},templateUrl:"/static/partial/lpc-paginator.html",link:function(o,e,t){if(!o.paginatorData)throw new Error("paginatorData attribute must be defined");if(!o.paginatorId)throw new Error("paginatorId attribute must be defined");if(!o.paginatorUrl)throw new Error("paginatorUrl attribute must be defined");if(!o.paginatorElementsCount)throw new Error("paginatorElementsCount attribute must be defined");o.itemsPerPage||(o.itemsPerPage=10),o.paginatorFilter||(o.paginatorFilter=""),$(window).on("hashchange",function(e,t){n(o.getPage(),o.itemsPerPage)});var n=function(e,t){o.$emit("lpc-paginator-begin-loading"),o.processing=!0,a.billetterie.getParticipantsPaginated(o.paginatorUrl,e,t,o.paginatorFilter).then(function(e){null!=e&&(i(o.getPagelabel(),e.page),o.paginatorElementsCount=e.elementsCount,o.paginatorData=e.data),o.processing=!1,o.$emit("lpc-paginator-done-loading")})},i=function(e,t){r.parseHashGetParams(window.location.hash)[e]?window.location.hash=window.location.hash.replace(new RegExp(e+"=[0-9]*","g"),e+"="+t):(e=e,t=t,-1!=window.location.hash.indexOf("?")?window.location.hash=window.location.hash+"&"+e+"="+t:window.location.hash=window.location.hash+"?"+e+"="+t)};o.$watch("paginatorFilter",function(){o.paginatorFilter&&""!=o.paginatorFilter||n(o.getPage(),o.itemsPerPage)}),o.getPagelabel=function(){return o.paginatorId+"Page"},o.getPagesNumber=function(){return Math.ceil(Number(o.paginatorElementsCount)/Number(o.itemsPerPage))},o.getPage=function(){var e=r.parseHashGetParams(window.location.hash),e=!e[o.getPagelabel()]||e[o.getPagelabel()][0]>o.getPagesNumber()?(i(o.getPagelabel(),1),1):e[o.getPagelabel()][0];return o.canDoNext=o.getPagesNumber()>e,o.canDoPrevious=1<e,e},o.next=function(){var e=o.getPage();1!=o.canDoNext||o.processing||i(o.getPagelabel(),Number(e)+1)},o.previous=function(){var e=o.getPage();1!=o.canDoPrevious||o.processing||i(o.getPagelabel(),Number(e)-1)},o.goToPage=function(e){o.processing||i(o.getPagelabel(),e)},o.currentPageActive=function(e){return e==o.getPage()},o.getNumber=function(e){return isNaN(e)?new Array(0):new Array(e)},o.getPaginatorNumbers=function(){var e=[];if(!(11<=o.getPagesNumber())){for(t=1;t<=o.getPagesNumber();t++)e.push(t);return e}if(o.getPage()<=Math.ceil(5.5)){for(var t=1;t<=11;t++)e.push(t);return e}if(Number(o.getPage())+Math.ceil(5.5)>o.getPagesNumber()){for(var t=o.getPagesNumber()-11+1;t<=o.getPagesNumber();t++)e.push(t);return e}if(o.getPage()>Math.ceil(5.5)){for(t=o.getPage()-Math.ceil(5.5)+1;t<=o.getPage()-Math.ceil(5.5)+11;t++)e.push(t);return e}},o.$on("lpc-paginator-refresh-event",function(){n(o.getPage(),o.itemsPerPage)})}}}]),angular.module("lpc").directive("lpcBindHtml",function(){return{restrict:"A",scope:{lpcBindHtml:"="},link:function(e,t,o){t.append(e.lpcBindHtml)}}}),angular.module("lpc").directive("lpcSelectContent",function(){return{restrict:"E",link:function(e,t,o){var n,i=o.copySuccessText,a=o.spanClass||"linkTextContainer",a=(n=(n=o.value).replace("/de/de","/de"),"<span id='"+o.id+"Span' class='"+a+"' contenteditable='true'>"+n+"</span><span class='copy-state-indicator-container'><span class='copy-state-indicator'>"+i+"</span></span>"),r=(t.append(a),angular.element("#"+o.id+"Span")),l=!1,s=[17,224,17,91,93],c=o.showIndicator;r.on("click",function(){var e,t=r,o=c;if(t&&t.select)try{document.execCommand("selectAll"),document.execCommand("copy"),o&&((e=angular.element(".copy-state-indicator-container")).fadeIn(),setTimeout(function(){e.fadeOut()},1e3))}catch(e){throw e}}),r.on("keydown",function(){$.inArray(event.keyCode,s)&&(l=!0)}).on("keyup",function(){$.inArray(event.keyCode,s)&&(l=!1)}).on("keydown",function(){return!(!l||67!=event.keyCode)})}}}),angular.module("lpc").directive("lpcTextLength",function(){return{require:"ngModel",restrict:"A",link:function(e,t,n,i){function o(e){var t,o=!0;return void 0!==e&&""!=e&&((t=$("<div/>")).append(e),o=t.text().length<=n.lpcTextLength),i.$setValidity("lpcTextLength",o),e}i.$parsers.push(o),i.$formatters.push(o)}}}),angular.module("lpc").directive("lpcMaxlines",function(){return{require:"ngModel",restrict:"A",link:function(e,t,n,i){function o(e){var t,o;if(e)return t=!0,o=e.split(/\n|\r/),console.log(o.length),o.length>n.lpcMaxlines&&(t=!1),i.$setValidity("maxLines",t),e}i.$parsers.push(o),i.$formatters.push(o)}}}),angular.module("lpc").directive("lpcInfoBlock",function(){return{restrict:"E",scope:{text:"@"},template:'<div class="wrap"><div class="movimg1"><span class="h1d1">{{text}}</span></div></div><div ></div>',link:function(e,t,o){$(function(){var e=0;setInterval(function(){(e-=.1)<=-100&&(e=100),$(".movimg1").css("left",e+"%")},20)})}}}),angular.module("lpc").directive("fixFloatModel",["$filter",function(i){return{require:"?ngModel",link:function(e,t,o,n){n&&(n.$formatters.unshift(function(e){return i(o.fixFloatModel)(n.$modelValue)}),n.$parsers.unshift(function(e){return t.val(i(o.fixFloatModel)(plainText)),plainText}))}}}]),angular.module("lpc").directive("lpcProgressBar",function(){return{restrict:"E",scope:{color:"@",progressBarHeight:"@",maxValue:"@",currentValue:"@",doAnimate:"@",progressTextStatic:"@",small:"@",upsiteDown:"@",hideProgressScrollLevel:"@",removeProgressText:"@",showAmountToReach:"@",showPercentStatus:"@"},template:'<div class="lpc-progressbar-container"><div class="progress-text"></div><span class="amount-to-reach"></span><div class="filled-part"></div><div class="arrow-down"></div></div>',link:function(r,l,e,t){if("true"==r.removeProgressText&&angular.element(".arrow-down").remove(),!r.maxValue)throw new Error("MaxValue has to be defined");if(!r.currentValue)throw new Error("currentValue has to be defined");if(r.hideProgressScrollLevel&&isNaN(r.hideProgressScrollLevel))throw new Error("hideProgressScrollLevel value must be a number");if("number"!=typeof r.currentValue&&(r.currentValue=r.currentValue.trim().replace(/\s/g,""),r.currentValue=Number(r.currentValue.replace(/,/g,"."))),"number"!=typeof r.maxValue&&(r.maxValue=r.maxValue.trim().replace(/\s/g,""),r.maxValue=Number(r.maxValue.replace(/,/g,"."))),isNaN(r.currentValue))throw new Error("currentValue has to be a number");if(isNaN(r.maxValue))throw new Error("maxValue has to be a number");function o(e){0==s?(l.find(".arrow-down").addClass("arrow-down-border-left"),l.find(".arrow-down").removeClass("arrow-down-border-right")):100<=s&&(l.find(".arrow-down").addClass("arrow-down-border-right"),l.find(".arrow-down").removeClass("arrow-down-border-left"));var t,o=$(l.find(".arrow-down")).outerWidth()/$(l.find(".lpc-progressbar-container")).outerWidth()*100,n=$(l.find(".progress-text")).outerWidth()/$(l.find(".lpc-progressbar-container")).outerWidth()*100,i=s-o/2,a=s-n/2;100<o+s&&(i=100-o),100<n+s&&(a=100-n),s-o<0&&(i=0),s-n<0&&(a=0),0==s&&(a=i=0),"true"==r.doAnimate&&e?(t=!0,$(l.find(".arrow-down")).animate({left:i+"%"},{duration:2e3,easing:"swing"}),"true"==r.progressTextStatic?$(l.find(".progress-text")).prop("Counter",0).animate({Counter:s,right:"5px"},{duration:2e3,easing:"swing",step:function(e){t?($(this).text(Math.ceil(e)+"%"),t=!1):$(this).text()!=s+"%"&&$(this).text(Math.ceil(e)+"%")}}):$(l.find(".progress-text")).prop("Counter",0).animate({Counter:s,left:a+"%"},{duration:2e3,easing:"swing",step:function(e){t?($(this).text(Math.ceil(e)+"%"),t=!1):$(this).text()!=s+"%"&&$(this).text(Math.ceil(e)+"%")}}),$(l.find(".filled-part")).animate({width:s+"%"},{duration:2e3,easing:"swing"})):(l.find(".arrow-down").css("left",i+"%"),"true"==r.progressTextStatic?l.find(".progress-text").css("right","5px"):l.find(".progress-text").css("left",a+"%"),l.find(".filled-part").css("width",s+"%"))}function n(){r.hideProgressScrollLevel&&(angular.element(window).scrollTop()>r.hideProgressScrollLevel?l.find(".arrow-down").fadeOut():(l.find(".arrow-down").fadeIn(),l.find(".progress-text").fadeIn()))}var s;r.progressBarHeight&&(l.find(".lpc-progressbar-container").css("height",r.progressBarHeight+"px"),l.find(".filled-part").css("height",r.progressBarHeight+"px")),r.upsiteDown&&l.find(".lpc-progressbar-container").addClass("upsite-down"),s=r.currentValue>r.maxValue?(console.warn("currentValue has to be less than the max value"),100):Math.ceil(r.currentValue/r.maxValue*100),r.currentValue>=r.maxValue?l.find(".lpc-progressbar-container").addClass("hide-progress-bar"):(r.currentValue,r.maxValue,l.find(".lpc-progressbar-container").removeClass("hide-progress-bar")),r.percentage=s,"true"==r.showPercentStatus&&l.find(".percentage-number").html(s),"true"==r.showAmountToReach&&l.find(".amount-to-reach").html(r.maxValue);setTimeout(function(){o(!0),angular.element(window).on("resize",function(){o(!1)}),angular.element(window).on("scroll",n)},0),r.$on("change-goal-to-reach",function(e){"number"!=typeof r.currentValue&&(r.currentValue=r.currentValue.trim().replace(/\s/g,""),r.currentValue=Number(r.currentValue.replace(/,/g,"."))),"number"!=typeof r.maxValue&&(r.maxValue=r.maxValue.trim().replace(/\s/g,""),r.maxValue=Number(r.maxValue.replace(/,/g,"."))),s=r.currentValue>r.maxValue?(console.warn("currentValue has to be less than the max value"),100):Math.ceil(r.currentValue/r.maxValue*100),r.currentValue>=r.maxValue?l.find(".lpc-progressbar-container").addClass("hide-progress-bar"):(r.currentValue,r.maxValue,l.find(".lpc-progressbar-container").removeClass("hide-progress-bar")),setTimeout(function(){o(!0),angular.element(window).on("resize",function(){o(!1)}),angular.element(window).on("scroll",n)},0)})}}}),angular.module("lpc").directive("lpcProgressBarV2",function(){return{restrict:"E",scope:{color:"@",progressBarHeight:"@",maxValue:"@",currentValue:"@",doAnimate:"@",small:"@",upsiteDown:"@",hideProgressScrollLevel:"@",removeProgressText:"@",showPercentStatus:"@",updateWhenValuesChange:"@",staticPercentage:"@"},template:'<div class="lpc-progressbar-container"><div class="percentage-number"></div><div class="filled-part"></div><div class="arrow-down"></div></div>',link:function(a,r,e,t){if("true"==a.removeProgressText&&(angular.element(".arrow-down").remove(),angular.element(".percentage-number").css("top","-22px")),!a.maxValue)throw new Error("MaxValue has to be defined");if(!a.currentValue)throw new Error("currentValue has to be defined");if(a.hideProgressScrollLevel&&isNaN(a.hideProgressScrollLevel))throw new Error("hideProgressScrollLevel value must be a number");if("number"!=typeof a.currentValue&&(a.currentValue=a.currentValue.trim().replace(/\s/g,""),a.currentValue=Number(a.currentValue.replace(/,/g,"."))),"number"!=typeof a.maxValue&&(a.maxValue=a.maxValue.trim().replace(/\s/g,""),a.maxValue=Number(a.maxValue.replace(/,/g,"."))),isNaN(a.currentValue))throw new Error("currentValue has to be a number");if(isNaN(a.maxValue))throw new Error("maxValue has to be a number");function o(e){0==l?r.find(".arrow-down").css("border-left","0px solid transparent"):100==l&&(r.find(".arrow-down").css("border-right","0px solid transparent"),r.find(".filled-part").css("border-radius",0));var t=$(r.find(".arrow-down")).outerWidth()/$(r.find(".lpc-progressbar-container")).outerWidth()*100,o=$(r.find(".percentage-number")).outerWidth()/$(r.find(".lpc-progressbar-container")).outerWidth()*100,n=l-t/2,i=l-o/2;100<t+l&&(n=100-t),100<o+l&&(i=100-o),l-t<0&&(n=0),l-o<0&&(i=0),0==l&&(i=n=0),"true"==a.doAnimate&&e?($(r.find(".arrow-down")).animate({left:n+"%"},{duration:2e3,easing:"swing"}),$(r.find(".filled-part")).animate({width:l+"%"},{duration:2e3,easing:"swing"}),$(r.find(".arrow-down")&&!0!==a.staticPercentage)?$(r.find(".percentage-number")).animate({left:n-3.5+"%"},{duration:2e3,easing:"swing"}):!0!==a.staticPercentage&&$(r.find(".percentage-number")).animate({left:n-1.5+"%"},{duration:2e3,easing:"swing"})):(r.find(".arrow-down").css("left",n+"%"),!0!==a.staticPercentage&&r.find(".percentage-number").css("left",i+"%"),r.find(".filled-part").css("width",l+"%"))}function n(){a.hideProgressScrollLevel&&(angular.element(window).scrollTop()>a.hideProgressScrollLevel?(r.find(".arrow-down").fadeOut(),r.find(".percentage-number").fadeOut()):(r.find(".arrow-down").fadeIn(),r.find(".percentage-number").fadeIn()))}function i(){l=Math.ceil(a.currentValue/a.maxValue*100),"true"==a.showPercentStatus&&r.find(".percentage-number").html(l+"%"),o(!1)}var l;a.color&&r.find(".filled-part").css("background",a.color),a.progressBarHeight&&(r.find(".lpc-progressbar-container").css("height",a.progressBarHeight+"px"),r.find(".filled-part").css("height",a.progressBarHeight+"px")),a.upsiteDown&&r.find(".lpc-progressbar-container").addClass("upsite-down"),l=a.currentValue>a.maxValue?(console.warn("currentValue has to be less than the max value"),100):Math.ceil(a.currentValue/a.maxValue*100),a.percentage=l,"true"==a.showPercentStatus&&r.find(".percentage-number").html(l+"%");e.$observe("currentValue",function(e){a.updateWhenValuesChange&&i()}),e.$observe("maxValue",function(e){a.updateWhenValuesChange&&i()}),setTimeout(function(){o(!0),angular.element(window).on("resize",function(){o(!1)}),angular.element(window).on("scroll",n)},0),a.$on("change-goal-to-reach",function(e){"number"!=typeof a.currentValue&&(a.currentValue=a.currentValue.trim().replace(/\s/g,""),a.currentValue=Number(a.currentValue.replace(/,/g,"."))),"number"!=typeof a.maxValue&&(a.maxValue=a.maxValue.trim().replace(/\s/g,""),a.maxValue=Number(a.maxValue.replace(/,/g,"."))),l=a.currentValue>a.maxValue?(console.warn("currentValue has to be less than the max value"),100):Math.ceil(a.currentValue/a.maxValue*100),setTimeout(function(){o(!0),angular.element(window).on("resize",function(){o(!1)}),angular.element(window).on("scroll",n)},0)})}}}),angular.module("lpc").directive("lpcFilter",["Helper",function(a){return{restrict:"A",scope:{defaultFilter:"@",filterLabel:"@",filterClick:"&"},link:function(o,n,e){if(!o.defaultFilter)throw new Error("defaultFilter has to be defined");var i=o.filterLabel?o.filterLabel+"Filter":"filter",t=a.parseHashGetParams(window.location.hash);t[i]&&t[i].length&&!(0<!t[i].length)&&""!=t[i]||a.setUrlParameter(i,o.defaultFilter),t[i]&&setTimeout(function(){n.find("[lpc-filter-item]").removeClass("active"),$("[lpc-filter-item='"+t[i]+"']").addClass("active")}),n.find("[lpc-filter-item]").on("click",function(e){o.filterClick();var t=$(e.target).attr("lpc-filter-item");a.setUrlParameter(i,t),n.find("[lpc-filter-item]").removeClass("active"),$(e.target).addClass("active")})}}}]),angular.module("lpc").directive("lpcSort",["Helper",function(a){return{restrict:"A",scope:{defaultSort:"@",sortLabel:"@",sortClick:"&"},link:function(o,n,e){if(!o.defaultSort)throw new Error("defaultSort has to be defined");var i=o.sortLabel?o.sortLabel+"SortBy":"sortBy",t=a.parseHashGetParams(window.location.hash);t[i]&&t[i].length&&!(0<!t[i].length)&&""!=t[i]||a.setUrlParameter(i,o.defaultSort),t[i]&&setTimeout(function(){n.find("[lpc-sort-item]").removeClass("active"),$("[lpc-sort-item='"+t[i]+"']").addClass("active")}),n.find("[lpc-sort-item]").on("click",function(e){o.sortClick();var t=$(e.target).attr("lpc-sort-item");a.setUrlParameter(i,t),n.find("[lpc-sort-item]").removeClass("active"),$(e.target).addClass("active")})}}}]),angular.module("lpc").directive("lpcSearch",["Helper",function(a){return{restrict:"A",scope:{searchLabel:"@",searchSubmit:"&"},link:function(o,e,t){var n=o.sortLabel?o.sortLabel+"Query":"query",i=a.parseHashGetParams(window.location.hash);i[n]&&setTimeout(function(){$(e).find("input[type=text]").val(i[n][0])}),e.on("submit",function(e){o.searchSubmit();e=$(e.target).find("input").val();a.setUrlParameter(n,e)}),o.$watch(function(){return $(e).find("input[type=text]").val()},function(e,t){e!=t&&""==e&&(o.searchSubmit(),a.setUrlParameter(n,""))})}}}]),angular.module("lpc").directive("lpcScrollToTop",[function(){return{restrict:"A",link:function(e,t,o){angular.element(window).on("scroll load",function(){100<angular.element(this).scrollTop()?t.fadeIn():t.fadeOut()}),t.on("click",function(){return $("html, body").animate({scrollTop:0},800),!1})}}}]),angular.module("lpc").directive("lpcSimpleTabs",["$rootScope",function(e){return{restrict:"A",link:function(e,o,t){o.find("[lpc-simple-tab]").attr("class","onglet-nonactif onglet"),o.find("[lpc-simple-tab='"+t.lpcSimpleTabs+"']").attr("class","onglet-actif onglet"),o.find("[lpc-tab-content]").css("display","none"),o.find("[lpc-tab-content='"+t.lpcSimpleTabs+"']").css("display","block"),o.find("[lpc-simple-tab]").on("mouseenter",function(e){var t=$(this).attr("lpc-simple-tab");o.find("[lpc-simple-tab]").attr("class","onglet-nonactif onglet"),$(this).attr("class","onglet-actif onglet"),o.find("[lpc-tab-content]").css("display","none"),o.find("[lpc-tab-content='"+t+"']").css("display","block")})}}}]),angular.module("lpc").directive("lpcFloatingMenu",["$rootScope",function(e){return{restrict:"A",scope:{topElement:"@",englobingElement:"@",elementToPush:"@"},link:function(n,i,e){setTimeout(function(){var t=$(n.englobingElement),o=$(n.elementToPush),e=($(window).on("hashchange",function(){e(),jQuery("html,body").animate({scrollTop:t.offset().top-73},500)}),function(){var e=$(i).outerHeight()<o.outerHeight();768<$(window).width()&&e?(e=$(window).height()-$(i).outerHeight()-73,isScrolledIntoViewBottom(t,e)&&!isScrolledIntoViewTop(t,0)?(i.removeClass("lepotsolidaire-menu-fixed"),i.removeClass("col-bottom-vertical-aligned")):isScrolledIntoViewBottom(t,e)?i.addClass("col-bottom-vertical-aligned"):isScrolledIntoViewTop(t,0)||(i.removeClass("lepotsolidaire-menu-fixed"),i.removeClass("col-bottom-vertical-aligned")),isScrolledIntoViewTop(t,-73)&&!isScrolledIntoViewBottom(t,e)?(i.addClass("lepotsolidaire-menu-fixed"),i.removeClass("col-bottom-vertical-aligned")):isScrolledIntoViewTop(t,-73)&&i.removeClass("lepotsolidaire-menu-fixed")):i.removeClass("lepotsolidaire-menu-fixed")});e(),$(window).on("scroll resize",e)},0)}}}]),angular.module("lpc").directive("lpcFloatingDiv",[function(){return{restrict:"A",scope:{classToApply:"@",minScreenSize:"@",maxScreenSize:"@",extraSpace:"@"},link:function(e,t,o){function n(){e.extraSpace&&!isNaN(e.extraSpace)?e.extraSpace=Number(e.extraSpace):e.extraSpace=0,!(i&&$(window).width()>e.minScreenSize&&$(window).width()<e.maxScreenSize)||isScrolledIntoViewBottom($(t).prev(),$(t).outerHeight()+e.extraSpace)?t.hasClass(e.classToApply)&&$(t).removeClass(e.classToApply):t.hasClass(e.classToApply)||$(t).addClass(e.classToApply)}var i=!1;e.minScreenSize&&e.maxScreenSize?isNaN(e.minScreenSize)||isNaN(e.maxScreenSize)||(i=!0,e.minScreenSize=Number(e.minScreenSize),e.maxScreenSize=Number(e.maxScreenSize)):(e.minScreenSize=768,e.maxScreenSize=3e3,i=!0);setTimeout(function(){n(),$(window).on("scroll resize",n),$("body").bind("touchmove",n),$("body").bind("touchstart",n),$("body").bind("touchend",n)},0)}}}]),angular.module("lpc").directive("lpcCustomLink",[function(){return{restrict:"A",scope:{lpcCustomLink:"@"},link:function(e,t,o){t.on("click",function(){window.location=e.lpcCustomLink})}}}]),angular.module("lpc").directive("popupTimeoutDisplayer",["$rootScope",function(i){return{restrict:"A",scope:{popupTimeoutDisplayer:"@"},link:function(e,t,o){var n=0;e.popupTimeoutDisplayer&&!isNaN(e.popupTimeoutDisplayer)&&(n=e.popupTimeoutDisplayer),setTimeout(function(){i.showPopup(o.lpcPopup)},n)}}}]),angular.module("lpc").directive("popupTimeoutDisplayerV2",["$rootScope",function(i){return{restrict:"A",scope:!1,link:function(e,t,o){var n=0;o.popupTimeoutDisplayerV2&&!isNaN(o.popupTimeoutDisplayerV2)&&(n=Number(o.popupTimeoutDisplayerV2)),setTimeout(function(){i.showPopupV2(o.id)},n)}}}]),angular.module("lpc").directive("lpcMobileAppBanner",["$rootScope","ipCookie","$document",function(p,f,e){return{restrict:"A",scope:{bannerType:"@",domainLpc:"@"},transclude:!0,link:function(r,l,e,t,o){o(r,function(e){l.append(e)});var n,i=["iOS","AndroidOS"],a=new MobileDetect(window.navigator.userAgent);for(n in e)-1!=n.indexOf("StoreLink")&&(r[n.toLowerCase()]=e[n]);if(!r.bannerType)throw new Error("the banner-type attribute has to be set");function s(e){try{ga("send",{hitType:"event",eventCategory:e.category,eventAction:e.action,eventLabel:e.label})}catch(e){console.error(e)}}function c(o,n){var e=!1;angular.forEach(i,function(t){a.is(t)&&!e&&(setTimeout(function(){var e={category:t,action:n,label:r.bannerType};o(e)},0),e=!0)})}function d(){var t,o=!1;return angular.forEach(i,function(e){a.is(e)&&!o&&(t=e,o=!0)}),t}function u(){for(var e=0;e<i.length;e++)if(a.is(i[e]))return i[e]}c(function(e){var t,o,n,i,a;f("hide-mobile-suggestion-banner")||(l.css("display","block"),r.$emit("top-floating-elements-container"),t=angular.element(".mobile-store-banner-container").outerHeight(),o=$(".top-floating-elements-container").outerHeight(),i=(n=+t+ +o)+$("#dashboardMenuSelect").outerHeight(),a=$("#content"),"iOS"!==d()&&"AndroidOS"!==d())||($(".home-int-topContent").css("height","calc( 100% - ("+n+"px )"),$(".top-floating-elements-container").css("position","sticky"),$(".top-floating-elements-container").css("position","-webkit-sticky"),$("#dashboardMenuSelect").css("top",n+"px"),$("#content").css("width","100%"),$(".dashboard-container").css("margin-top",+i+"px"),$(".home-page-video-container").css("height","calc( 100% - ("+t+"px )"),$(".header-full-page").css("height",$(window).outerHeight()-t-$(".type-pot-section").outerHeight()+"px"),null!==a?($(".menu-container").css("position","absolute"),$("#content").css("top","0")):($("#content").css("top","146px"),$(".menu-container").css("position","relative")),$(window).scroll(function(){f("hide-mobile-suggestion-banner")||73<$(window).scrollTop()?$("#dashboardMenuSelect").css("top","73px"):$("#dashboardMenuSelect").css("top",n+"px"),$("#content").css("width","100vw"),$(".mobile-banner-close-button").click&&0==$(window).scrollTop()&&$(".mobile-banner-close-button").on("touchstart click",function(){$("#dashboardMenuSelect").css("top","73px")}),$(window).scrollTop()>$(window).outerHeight()-t?$(".top-floating-elements-container").css("position","fixed"):($(".top-floating-elements-container").css("position","sticky"),$(".top-floating-elements-container").css("position","-webkit-sticky"))}),$(".mobile-banner-close-button").on("touchend click",function(e){$("#dashboardMenuSelect").css("top",o+"px"),$(".left-menu-container").css("height","100vh"),r.$apply()}))}),l.find(".mobile-banner-close").on("click",function(){c(s,"mobile-banner-close"),p.closeMobileAppSuggestionPopupForASession(),l.css("display","none"),r.$emit("top-floating-elements-container"),$("#content").css("padding-top","0"),$("#content").css("top","0"),$(".top-floating-elements-container").css("position","fixed"),$(".top-floating-elements-container").css("transform","translate3d(0,0,0)"),$("#content").css("margin-top","0"),$(".home-page-video-container").css("height","100%"),$("#dashboardMenuSelect").css("top","0 !important"),$(".pot-info-container-cell").css("top","-73px"),$(".tableau-de-bord-container").css("margin-top","130"),$(".dashboard-container").css("margin-top","0"),$("#dashboardMenuSelect").css("top","73px"),$(".header-full-page").css("height",$(window).outerHeight()-$(".type-pot-section").outerHeight()+"px"),$(".pot-board-page").css("margin-top","73px")}),l.find(".store-link").on("click",function(){c(s,"mobile-banner-store"),window.location=r[(u()+"StoreLink").toLowerCase()]});o=u();o&&(r[o]=!0)}}}]),angular.module("lpc").directive("checkboxLimiter",[function(){return{restrict:"A",scope:{checkboxLimiter:"=",checkboxLimitValue:"@",checkboxLimitValueReplacement:"@"},link:{pre:function(o,n,e){if(!o.checkboxLimitValue&&o.checkboxLimitValueReplacement||o.checkboxLimitValue&&!o.checkboxLimitValueReplacement)throw new Error("both values checkboxLimitValue and checkboxLimitValueReplacement has to be specified");n.find("input[type=checkbox]").on("click",function(e){var t=o.checkboxLimitValue&&o.checkboxLimitValueReplacement&&o.checkboxLimiter==o.checkboxLimitValue?o.checkboxLimitValueReplacement:o.checkboxLimiter;n.find("input:checked").length>t&&$(this).is(":checked")&&($(this).attr("checked",!1),o.$apply(),e.stopPropagation())})}}}}]),angular.module("lpc").directive("textLengthLimiter",[function(){return{restrict:"A",require:"?ngModel",scope:{textLengthLimiter:"@"},link:function(t,o,e,n){if(!t.textLengthLimiter)throw new Error("textLengthLimiter attr has to be defined");if(isNaN(t.textLengthLimiter))throw new Error("textLengthLimiter attr has to be a number");o.on("keypress",function(e){8!=e.which&&o.val().length>=t.textLengthLimiter-1&&e.preventDefault()}),o.on("keyup",function(e){o.val().length>t.textLengthLimiter&&(o.val(o.val().substring(0,t.textLengthLimiter-1)),n.$setViewValue(o.val().substring(0,t.textLengthLimiter-1)),e.preventDefault())})}}}]),angular.module("lpc").directive("autoResizableIframe",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){t.on("load",function(e){t.css("height",t[0].contentWindow.document.body.scrollHeight+"px")})}}}]),angular.module("lpc").directive("lpcIframe",["$compile",function(i){return{restrict:"AE",scope:!1,link:function(o,n,e){o.loadingMessage=e.loadingMessage||"Chargement de la page de paiement...",o.loadingContainerBgColor=e.loadingContainerBgColor||"transparent",o.iframeClass=e.iframeClass||"payment-iframe-prod",o.$on("lpc-payment-iframe-ready",function(e,t){t='<div class="payment-iframe-container"><div class="loader-container" style="background-color:'+o.loadingContainerBgColor+'"><div class="animated-loader"><svg class="circular" viewBox="25 25 50 50"><circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/></svg></div><br/><h4>'+o.loadingMessage+'</h3></div><iframe id="payment-iframe" class="'+o.iframeClass+'" scrolling="yes" src="'+t.href+'"></iframe></div>',t=i(t);n.html(t(o)),n.find("#payment-iframe").on("load",function(e){n.find(".loader-container").css("display","none")})}),setTimeout(function(){o.$emit("lpc-payment-iframe-directive-ready")},0)}}}]),angular.module("lpc").directive("lpcKycIframeLoader",["$rootScope",function(n){return{restrict:"AE",scope:!1,link:function(e,t,o){setTimeout(function(){t.find("iframe").on("load",function(){n.$broadcast("hide-lpc-material-progress-bar"),this.contentWindow.onbeforeunload=function(){n.$broadcast("show-lpc-material-progress-bar")}})},0)}}}]),angular.module("lpc").directive("lpcPageMaterialLoader",[function(){return{restrict:"AE",scope:!1,link:function(e,t,o){setTimeout(function(){angular.element(".menu-container").length&&(angular.element(".menu-container")[0].offsetTop,angular.element(".menu-container").outerHeight()),t.find(".lpc-material-progress-bar-container").css("top",void 0+"px")},0),e.$on("show-lpc-material-progress-bar",function(){console.log("event catched"),t.find(".lpc-material-progress-bar-container").show()}),e.$on("hide-lpc-material-progress-bar",function(){t.find(".lpc-material-progress-bar-container").hide()})}}}]),angular.module("lpc").directive("omToggleBlock",[function(){return{restrict:"A",scope:{toggled:"@"},link:function(e,t,o){e.toggled=!1,t.find(".om-toggle-block-title").on("click",function(){e.toggled?(t.find(".om-toggle-block-content").slideUp(),e.toggled=!1):(t.find(".om-toggle-block-content").slideDown(),e.toggled=!0)})}}}]),angular.module("lpc").directive("fbLike",["$window",function(r){return{restrict:"E",priority:1001,scope:{url:"=?",appId:"=",likeRefresh:"&"},link:function(t,e,n){r.FB?a():$.getScript("//connect.facebook.net/en_US/sdk.js",function(){r.FB.init({appId:t.appId,xfbml:!0,version:"v2.8"}),a()});var i=!1;function a(){var o;!n.url||t.url||i?(e.html('<div class="fb-like"'+(t.url?' data-href="'+t.url+'"':"")+' data-layout="button_count"data-size="large" data-size="large" data-action="like" data-show-faces="false" data-share="false"></div>'),r.FB.XFBML.parse(e.parent()[0]),r.FB.Event.subscribe("edge.create",function(e){e==t.url&&t.likeRefresh&&t.likeRefresh({url:e})}),r.FB.Event.subscribe("edge.remove",function(e){e==t.url&&t.likeRefresh&&t.likeRefresh({url:e})})):(i=!0,o=t.$watch("url",function(e,t){e&&(a(),o())}))}}}}]),angular.module("lpc").directive("lpcCounterChanger",[function(){function i(e,t){var o=isNaN(e.currentTotal())?0:Number(e.currentTotal());e.modelValue-e.counterMin==0?t.find(".minus-button").addClass("inactive"):t.find(".minus-button").removeClass("inactive"),e.counterMax-e.modelValue==0||Number(o)+Number(e.step)>e.totalLimit?t.find(".plus-button").addClass("inactive"):t.find(".plus-button").removeClass("inactive")}return{restrict:"AE",scope:{modelValue:"=ngModel",counterMax:"@",counterMin:"@",currentTotal:"&",totalLimit:"@",step:"@"},templateUrl:"/static/partial/lpc-counter-changer.html",link:function(o,n,e){if(o.currentTotal||(o.currentTotal=function(){return 0}),o.step||(o.step=0),isNaN(o.step))throw new Error("step attribute must be a number, the current value is : "+o.totalLimit);if(o.totalLimit||(o.totalLimit=9999999999),isNaN(o.totalLimit))throw new Error("total-limit attribute must be a number, the current value is : "+o.totalLimit);if(o.currentTotal||(o.currentTotal=0),o.counterMax||(o.counterMax=9999999999),o.counterMin||(o.counterMin=0),isNaN(o.counterMax))throw new Error("counter-max attribute must be a number, the current value is : "+o.counterMax);if(isNaN(o.counterMin))throw new Error("counter-min attribute must be a number, the current value is : "+o.counterMin);if(o.counterMax<=o.counterMin)throw new Error("counter-max attribute must be strictly grater than counter-min attribute values counter-min : "+o.counterMin+" counter-max : "+o.counterMax);o.modelValue||(o.modelValue=0),i(o,n),o.$on("lpc-counter-changer-refresh-directives",function(e,t){i(o,n)}),n.find(".minus-button").bind("click",function(e){0<o.modelValue-o.counterMin&&(o.modelValue--,o.$apply()),o.$emit("lpc-counter-changer-refresh-controller")}),n.find(".plus-button").bind("click",function(e){0<o.counterMax-o.modelValue&&!((isNaN(o.currentTotal())?0:Number(o.currentTotal())+Number(o.step))>o.totalLimit)&&(o.modelValue++,o.$apply()),o.$emit("lpc-counter-changer-refresh-controller")})}}}]),angular.module("lpc").directive("lpcCustomDateInput",["DateConverter","$timeout",function(l,s){return{restrict:"A",require:"ngModel",scope:{customPlaceHolder:"@"},link:function(n,i,e,a){function t(e){var t;return e&&(t=moment(e,r[n.lpcCustomDateInput].pattern).isValid(),a.$setValidity("lpcdate",t),a.$$setOptions(t?{updateOn:"blur"}:null)),e}r=n.$parent.person&&void 0!==n.$parent.person.birthdayPE?{fr:{template:(o=n.$parent.person.birthdayPE).day+" / "+o.month+" / "+o.year,pattern:"DD / MM / YYYY",mask:"99 / 99 / 9999"},en:{template:o.day+" / "+o.month+" / "+o.year,pattern:"DD / MM / YYYY",mask:"99 / 99 / 9999"},es:{template:o.day+" / "+o.month+" / "+o.year,pattern:"DD / MM / YYYY",mask:"99 / 99 / 9999"},it:{template:o.day+" / "+o.month+" / "+o.year,pattern:"DD / MM / YYYY",mask:"99 / 99 / 9999"},de:{template:o.day+" / "+o.month+" / "+o.year,pattern:"DD / MM / YYYY",mask:"99 / 99 / 9999"}}:{fr:{template:"JJ / MM / AAAA",pattern:"DD / MM / YYYY",mask:"99 / 99 / 9999"},en:{template:"DD / MM / YYYY",pattern:"DD / MM / YYYY",mask:"99 / 99 / 9999"},es:{template:"DD / MM / AAAA",pattern:"DD / MM / YYYY",mask:"99 / 99 / 9999"},it:{template:"GG / MM / AAAA",pattern:"DD / MM / YYYY",mask:"99 / 99 / 9999"},de:{template:"TT / MM / JJJJ",pattern:"DD / MM / YYYY",mask:"99 / 99 / 9999"}},!e.lpcCustomDateInput||e.lpcCustomDateInput.trim&&""==e.lpcCustomDateInput.trim()?(n.lpcCustomDateInput="fr",console.warn("lpcCustomDateInput doesn't have a locale using the default one : fr")):void 0===r[e.lpcCustomDateInput]?(n.lpcCustomDateInput="fr",console.warn("lpcCustomDateInput unknown locale "+n.lpcCustomDateInput+" using the default one : fr")):n.lpcCustomDateInput=e.lpcCustomDateInput,n.customPlaceHolder?i.attr("placeholder",n.customPlaceHolder):i.attr("placeholder",r[n.lpcCustomDateInput].template),i.attr("type","tel");var r,o=r[n.lpcCustomDateInput];$(i).mask(o.mask,{placeholder:o.template});a.$parsers.push(t),a.$formatters.push(t),a.$$setOptions({updateOn:"blur"}),n.$on("lpcCustomDateInput.refresh",function(){a.$render(!0)}),s(function(){a&&(a.$render=function(e){var t,o=a.$modelValue;angular.isDefined(o)&&null!==o&&angular.isDate(o)?(t=l.dateToString(r[n.lpcCustomDateInput].pattern,o),1==e&&i.val(t),a.$setViewValue(t)):angular.isDefined(o)&&null!==o&&!angular.isDate(o)&&(o=l.stringToDate(r[n.lpcCustomDateInput].pattern,o),t=l.dateToString(r[n.lpcCustomDateInput].pattern,o),1==e&&i.val(t),a.$setViewValue(t))},a.$render(!0),a.$$setOptions({updateOn:"blur"}))})}}}]),angular.module("lpc").directive("excludedOss",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){var n,o=o.excludedOss;o&&""!=o.trim()?(o=o.split(/[;,]/g),n=new MobileDetect(window.navigator.userAgent),angular.forEach(o,function(e){n.is(e)&&t.hide()})):console.warn("excluded operating system not specified")}}}]),angular.module("lpc").directive("lpcAnimatable",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){var n,i;(o.lpcAnimatableMobile&&angular.element(window).width()<768||768<angular.element(window).width())&&(n=o.lpcAnimatable,t.addClass(n+"-animatable"),t.addClass(n),i=o.lpcAnimatableDelay?Number(o.lpcAnimatableDelay):-100,$(window).on("scroll",function(){var e;e=$(window).scrollTop()+$(window).height(),t.offset().top+i<e&&(t.removeClass(n+"-animatable"),t.addClass(n+"-animated"))}),$(window).trigger("scroll"))}}}]),angular.module("lpc").directive("fileDropzone",[function(){return{restrict:"A",scope:{file:"=",fileName:"=",dragDropStyle:"=",dragStyle:"=",dragStyleOver:"=",imageUpload:"=",dropClass:"="},link:function(t,e,o){function n(e){return i(e),t.$apply(function(){t.dropClass=""}),!1}var i=function(e){null!=e&&e.preventDefault(),e.originalEvent.dataTransfer.effectAllowed="copy"};o.fileDropzone;return angular.element(document).bind("dragover",function(e){return t.$apply(function(){t.dropClass="overDropClass"}),!1}),angular.element(document).bind("dragenter",n),angular.element(document).bind("dragleave",n),angular.element(document).bind("drop",function(e){return t.imageUpload(e),t.$apply(function(){t.dropClass=""}),!1})}}}]),angular.module("lpc").directive("lpcParallax",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){setTimeout(function(){if(!o.lpcParallax)throw new Error("lpc-parallax attribute has to be defined");e.lpcParallaxSpeed=o.lpcParallaxSpeed||.9,e.lpcParallaxZIndex=o.lpcParallaxZIndex||0,$(t).parallax({imageSrc:o.lpcParallax,zIndex:e.lpcParallaxZIndex,speed:e.lpcParallaxSpeed})},0)}}}]),angular.module("lpc").directive("cookieAgreementBlock",["ipCookie",function(r){return{restrict:"E",scope:!1,link:function(e,t,o){function n(){r("hide-cookie-agreement-block",!0,{path:"/",expires:moment().add("1","years").toDate()}),angular.element(".cookies-manage-popin").css("display","none"),e.$emit("top-floating-elements-container")}function i(){angular.element(".cookies-manage-popin").css("display","none")}function a(){r("hide-cookie-agreement-block")||(angular.element(".cookies-manage-popin").css("display","block"),angular.element(".personalize").on("click",n),angular.element(".refuse-everything").on("click",i),angular.element(".accept_all").on("click",n),e.$emit("top-floating-elements-container"))}setTimeout(function(){a()},0),angular.element(window).on("resize",function(){a()})}}}]),angular.module("lpc").directive("topFloatingElementsContainer",[function(){function n(e){e=e.outerHeight(),angular.element(".menu-container,.sncf-header").outerHeight(),angular.element(".slidable").css("top",e+"px"),angular.element(".lpc-material-progress-bar-container").css("top",void 0+"px")}return{restrict:"A",scope:!1,link:function(e,t,o){e.$on("top-floating-elements-container",function(){n(t)}),setTimeout(function(){n(t)},0),angular.element(window).on("resize",function(){n(t)})}}}]),angular.module("lpc").directive("lpcFloatingBanner",[function(){var l=function(e,t,o,n,i,a){var r=o-t.elementFixedHeight,l=angular.element(t.contentElement),s=l.offset().top,c=angular.element(window).scrollTop(),d=angular.element("."+t.beginFromElementClass);r<c&&1e3<angular.element(window).width()&&i?(l.css("padding-top",o+"px"),e.addClass(t.classToApply),e.css("top",-r+s+"px"),!t.doNotPushBeginElement&&d&&d.length&&(d.css("position","relative"),d.css("top",t.elementFixedHeight/2+o/2+"px"))):(e.removeClass(t.classToApply),e.css("height",""),e.css("top","0px"),l.css("padding-top","0px"),!t.doNotPushBeginElement&&d&&d.length&&(1e3<angular.element(window).width()?n<c&&i?(d.css("position","relative"),d.css("top",c-n+"px")):(d.css("position","static"),d.css("top","")):(d.css("position",""),d.css("top","")))),t.elementToFly&&1e3<angular.element(window).width()&&angular.element("."+t.elementToFly).css("top",-c+a+"px")};return{restrict:"A",scope:{enabled:"="},link:function(e,t,o){var n,i,a=angular.element("."+o.beginFromElementClass).offset().top-100,r=t.height();o.elementToFly&&(n=angular.element("."+o.elementToFly),i=Number(n.css("top").replace(/px/g,"")));angular.element(window).on("resize",function(){a=angular.element("."+o.beginFromElementClass).offset().top-100,r=t.height()}),angular.element(window).on("scroll resize",function(){l(t,o,r,a,e.enabled,i)})}}}]),angular.module("lpc").directive("inputEnterKeyDetector",[function(){return{restrict:"A",scope:{inputEnterKeyDetector:"&"},link:function(t,e,o){e.bind("keydown",function(e){if(13==e.which)return t.inputEnterKeyDetector(),e.stopPropagation(),e.preventDefault(),!1})}}}]),angular.module("lpc").directive("lpcDivider",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){t.css("height",o.lpcDivider+"px")}}}]),angular.module("lpc").directive("focusElementOnClick",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){t.on("click touchstart",function(e){var t=angular.element("#"+o.focusElementOnClick);setTimeout(function(){t.focus(),document.execCommand("selectAll")},0)})}}}]),angular.module("lpc").directive("focusElementOnSubmit",function(n){return{scope:{trigger:"=focusElementOnSubmit",focusContainer:"@"},link:function(t,o){t.$watch("trigger",function(e){!0===e&&n(function(){o[0].focus(),t.trigger=!1})}),t.$watch(function(){return o.attr("class")},function(e){n(function(){null===e.match(/ng-hide/)&&(o[0].focus(),t.trigger=!1)})})}}}),angular.module("lpc").directive("kycTextObfuscator",[function(){function n(e,t){var o=angular.element("<div>").addClass("lpc-input-shorner-class").html(t.kycTextObfuscator),o=(angular.element("body").append(o),o.outerWidth()),n=e.parent().outerWidth();n<o?(o=Math.round((o-n)/6.5)+"[...]".length,n=Math.round((t.kycTextObfuscator.length-o)/2),n=t.kycTextObfuscator.substring(0,n)+"[...]"+t.kycTextObfuscator.substring(n+o,t.kycTextObfuscator.length),e.val(n)):e.val(t.kycTextObfuscator)}return{restrict:"A",scope:!1,link:function(t,o,e){setTimeout(function(){t.kycTextObfuscator=e.kycTextObfuscator,n(o,t),angular.element(window).on("resize",function(){n(o,e)}),t.$watch(e.kycTextObfuscatorModel,function(e){console.log("change"),t.kycTextObfuscator=e,n(o,t)})},0)}}}]),angular.module("lpc").directive("customInputText",[function(){return{restrict:"C",scope:!1,link:function(e,t,o){e.$watch(t.find("input[type=text]").attr("ng-model"),function(e){t.find("input[type=text]");e&&e.length?t.find("span").hide():t.find("span").show()})}}}]),angular.module("lpc").directive("scrollAnimateTo",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){var n=o.scrollAnimateTo,i=(o.scrollAnimationSpeed,o.worstCaseLink),a=o.takeHeaderIntoConcideration,r=angular.element(".menu-container,.sncf-header").outerHeight();t.on("click",function(){var e;angular.element("#"+n).length?(e=angular.element("#"+n),null!=a?$("html,body").animate({scrollTop:e.offset().top-r},"slow"):$("html,body").animate({scrollTop:e.offset().top},"slow")):window.location.href=i})}}}]),angular.module("lpc").directive("lpcCustomDatePicker",["$timeout","JQueryUiDateConverter",function(a,r){jQuery.datepicker.regional.fr={closeText:"Fermer",prevText:"Précédent",nextText:"Suivant",currentText:"Aujourd'hui",monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthNamesShort:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],dayNamesShort:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],dayNamesMin:["D","L","M","M","J","V","S"],weekHeader:"Sem.",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",changeYear:!0,changeMonth:!0},jQuery.datepicker.regional.en={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},jQuery.datepicker.regional.de={closeText:"Schliessen",prevText:"Voriger",nextText:"Nächster",currentText:"Heute",monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan.","Feb.","Mär.","Apr.","Mai","Juni","Jul.","Aug.","Sep.","Okt.","Nov.","Dez."],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],dayNamesMin:["S","M","D","M","D","F","S"],weekHeader:"Wo.",dateFormat:"tt/mm/jjjj",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",changeYear:!0,changeMonth:!0},jQuery.datepicker.regional.es={closeText:"Cerrar",prevText:"&#x3C;Ant",nextText:"Sig&#x3E;",currentText:"Hoy",monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],monthNamesShort:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],dayNamesShort:["dom","lun","mar","mié","jue","vie","sáb"],dayNamesMin:["D","L","M","X","J","V","S"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},jQuery.datepicker.regional.it={closeText:"Chiudi",prevText:"&#x3C;Prec",nextText:"Succ&#x3E;",currentText:"Oggi",monthNames:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthNamesShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],dayNames:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],dayNamesShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dayNamesMin:["Do","Lu","Ma","Me","Gi","Ve","Sa"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""};var l=[jQuery.datepicker.regional.fr,jQuery.datepicker.regional.en,jQuery.datepicker.regional.it,jQuery.datepicker.regional.es,jQuery.datepicker.regional.de];return{restrict:"E",templateUrl:"/static/partial/lpc-custom-date-picker.html",require:"ngModel",scope:{lpcCustomDatePickerPattern:"@",lpcCustomDatePickerMinDateNow:"@",lpcCustomDatePickerPlaceholder:"@",lpcCustomDatePickerLocale:"@",lpcCustomDatePickerSelect:"&"},link:function(o,n,e,i){if(o.lpcCustomDatePickerPattern||(console.warn("No date pattern specified using dd/mm/yy as default"),o.lpcCustomDatePickerPattern="dd/mm/yy"),!o.lpcCustomDatePickerPlaceholder)throw new Error("the calendar empty message has to be specified");o.lpcCustomDatePickerLocale||(console.warn("No locale specified using fr as default"),o.lpcCustomDatePickerLocale=jQuery.datepicker.regional.fr),-1==l.indexOf(o.lpcCustomDatePickerLocale.toLowerCase())&&(console.warn("Locale : '"+o.lpcCustomDatePickerLocale+"' is not supportedusing fr as default"),o.lpcCustomDatePickerLocale=jQuery.datepicker.regional.fr),jQuery.datepicker.setDefaults(jQuery.datepicker.regional[o.lpcCustomDatePickerLocale]);var t={dateFormat:o.lpcCustomDatePickerPattern};"true"==o.lpcCustomDatePickerMinDateNow&&(t.minDate=moment().toDate()),n.find(".lpc-custom-date-picker-calendar").datepicker(t),n.find(".lpc-custom-date-picker-calendar").on("change",function(){var e=angular.element(this);o.selectedDate=e.val(),i.$setViewValue(o.selectedDate),e.removeClass("lpc-custom-date-picker-calendar-shown"),o.calendarVisible=!1,o.lpcCustomDatePickerSelect&&o.$apply(function(){o.lpcCustomDatePickerSelect({value:o.selectedDate})})}),angular.element(document).on("click",function(e){e=angular.element(e.target);e.hasClass("ui-datepicker-next")||e.hasClass("ui-datepicker-prev")||e.closest("lpc-custom-date-picker").length||o.calendarVisible&&(n.find(".lpc-custom-date-picker-calendar").removeClass("lpc-custom-date-picker-calendar-shown"),o.calendarVisible=!1)}),n.find(".lpc-custom-date-picker").on("click",function(){o.calendarVisible?(n.find(".lpc-custom-date-picker-calendar").removeClass("lpc-custom-date-picker-calendar-shown"),o.calendarVisible=!1):(n.find(".lpc-custom-date-picker-calendar").addClass("lpc-custom-date-picker-calendar-shown"),o.calendarVisible=!0)}),a(function(){i&&(i.$render=function(){var e,t=i.$modelValue;angular.isDefined(t)&&null!==t&&angular.isDate(t)?(e=r.dateToString(o.lpcCustomDatePickerPattern,t),i.$setViewValue(e),o.selectedDate=e,n.find(".lpc-custom-date-picker-calendar").datepicker("setDate",t)):angular.isDefined(t)&&null!==t&&!angular.isDate(t)&&(t=r.stringToDate(o.lpcCustomDatePickerPattern,t),e=r.dateToString(o.lpcCustomDatePickerPattern,t),i.$setViewValue(e),o.selectedDate=e,n.find(".lpc-custom-date-picker-calendar").datepicker("setDate",e))},i.$render()),o.selectedDate||(o.selectedDate='<span class="calendar-placeholder">'+o.lpcCustomDatePickerPlaceholder+"</span>",o.$apply())}),o.hasValue=function(){return!!o.selectedDate&&o.selectedDate.indexOf&&-1==o.selectedDate.indexOf("calendar-placeholder")},o.clearModel=function(){delete o.selectedDate,i.$setViewValue(o.selectedDate),o.selectedDate='<span class="calendar-placeholder">'+o.lpcCustomDatePickerPlaceholder+"</span>"}}}}]),angular.module("lpc").directive("lpcTextTooltip",["LpcInfoTooltipsHandler","$rootScope","$LpcTemplateCache","$compile",function(a,r,e,t){return{restrict:"E",scope:{},replace:!0,transclude:!0,templateUrl:"/static/partial/lpc-text-tooltip.html",link:function(e,t,o){function n(){var e=t.find(".lpc-text-tooltip-text-container");t.offset().left+e.outerWidth()+70>angular.element(window).width()?e.addClass("lpc-text-tooltip-text-container-left"):e.removeClass("lpc-text-tooltip-text-container-left")}var i=a.add();e.popupName=i.name,t.find(".lpc-text-tooltip-button-mobile").on("click",function(){r.showPopup(e.popupName)});angular.element(window).on("resize",n),setTimeout(n,0)}}}]),angular.module("lpc").directive("lpcTogglable",[function(){return{restrict:"A",scope:!0,link:function(e,t,o){e.elementToggled=!1,e.lpcTogglableAnimating=!1;var n=t.find("[lpc-togglable-content]");t.addClass("togglable-hide-complete"),n.hide(),t.find("[lpc-togglable-button]").on("click",function(){console.log(n),n.is(":hidden")?(t.removeClass("togglable-hide-complete"),t.removeClass("international-togglable-hide-complete"),e.elementToggled=!0,e.$apply()):e.elementToggled=!1,e.lpcTogglableAnimating||(e.lpcTogglableAnimating=!0,n.slideToggle(200,function(){e.elementToggled||t.addClass("togglable-hide-complete"),e.lpcTogglableAnimating=!1,e.$apply()}))})}}}]),angular.module("lpc").directive("lpcToggle",["$rootScope",function(i){return{restrict:"A",scope:!0,link:function(e,t,o){function n(){angular.element(o.lpcToggle).slideToggle("fast",function(){angular.element(o.lpcToggle).is(":visible")?(t.addClass("fees-option-toggled"),e.toggled=!0):(t.removeClass("fees-option-toggled"),e.toggled=!1),e.$$phase||e.$apply()}),e.$$phase||e.$apply()}t.on("click",function(){angular.element(window).width()<768&&(angular.element(o.lpcToggle).is(":visible")||(t.addClass("fees-option-toggled"),e.toggled=!0,i.$broadcast("lpc-toggle-close-others-event",{currentToggle:o.lpcToggle})),n())}),e.$on("lpc-toggle-close-others-event",function(e,t){t.currentToggle!=o.lpcToggle&&angular.element(o.lpcToggle).is(":visible")&&n()})}}}]),angular.module("lpc").directive("lpcStepsIndicator",[function(){var s;return{restrict:"A",scope:!1,link:function(e,i,o){function n(e){var e=angular.element(i.find("[lpc-steps-indicator-step]")[e]),t=angular.element(e.find("[lpc-steps-indicator-step-progress]"));angular.element(e.find("[lpc-steps-indicator-step-bubble]")).removeClass("animate-bubble"),t.animate({width:"0%"},{duration:1e3}).promise().done(function(){})}function a(e){s&&s.finish()}var r,l=[];o.lpcStepsIndicatorRestrictedSteps&&(l=o.lpcStepsIndicatorRestrictedSteps.split(",")),e.$on("create-edit-pot-loading-event",function(e,t){var o,n;t=t.index,t=angular.element(i.find("[lpc-steps-indicator-step]")[t]),o=angular.element(t.find("[lpc-steps-indicator-step-progress]")),n=angular.element(t.find("[lpc-steps-indicator-step-bubble]")),o.animate({width:"100%"},{duration:7e3,easing:"swing"}).promise().done(function(){n.addClass("animate-bubble")}),s=o}),e.$on("create-edit-pot-done-event",a),e.$on("create-edit-pot-error-event",function(e,t){a(),n(t.index)}),e.$watch(o.lpcStepsIndicator,function(e,t){var o;e<t?-1==jQuery.inArray(""+t,l)&&n(t):-1==jQuery.inArray(""+e,l)&&(t=e,t=angular.element(i.find("[lpc-steps-indicator-step]")[t]),e=angular.element(t.find("[lpc-steps-indicator-step-progress]")),o=angular.element(t.find("[lpc-steps-indicator-step-bubble]")),e.animate({width:"100%"},{duration:1e3}).promise().done(function(){o.addClass("animate-bubble")}))}),o.lpcStepsIndicatorFloatingClassName&&(r=i.offset().top,angular.element(window).on("scroll resize",function(){var e,t;e=angular.element(window).scrollTop(),t=angular.element("#content").offset().top,r<e+t&&1e3<angular.element(window).width()?i.addClass(o.lpcStepsIndicatorFloatingClassName):i.removeClass(o.lpcStepsIndicatorFloatingClassName)}))}}}]),angular.module("lpc").directive("lpcImageDragAndDrop",["$rootScope",function(i){return{restrict:"E",replace:!0,scope:{},require:"?ngModel",templateUrl:"/static/partial/lpc-file-drag-and-drop.html",link:function(e,o,t,n){angular.element(document).on("dragover dragenter",function(e){e.preventDefault(),e.stopPropagation(),i.isNewPotBoard?(angular.element(".lpc-drag-n-drop-container").addClass("popup"),angular.element(".lpc-drag-n-drop-container").css("top",angular.element(".lpc-popup-v2-table-content").scrollTop()+"px")):o.css("display","table")}),angular.element(document).on("dragleave",function(e){e.preventDefault(),e.stopPropagation(),angular.element(e.target).hasClass("lpc-drag-n-drop-container")&&(i.isNewPotBoard?o.removeClass("popup"):o.css("display","none"))}),angular.element(document).on("drop",function(e){var t;return e.preventDefault(),e.stopPropagation(),i.isNewPotBoard?o.removeClass("popup"):o.css("display","none"),e.originalEvent.dataTransfer&&1==e.originalEvent.dataTransfer.files.length&&((t=new FileReader).onload=function(e){console.log("loaded"),n.$setViewValue(e.target.result),n.$render()},t.readAsDataURL(e.originalEvent.dataTransfer.files[0])),!1}),e.lpcImageDragAndDropText=t.lpcImageDragAndDropText}}}]),angular.module("lpc").directive("lpcInvisible",["$parse",function(e){return{restrict:"A",scope:!1,link:function(e,t,o){if(!o.lpcInvisible)throw new Error("lpc-invisible attribute must contain an expression");e.$watch(o.lpcInvisible,function(e){e?t.css("visibility","hidden"):t.css("visibility","visible")})}}}]),angular.module("lpc").directive("lpcVisible",["$parse",function(e){return{restrict:"A",scope:!1,link:function(e,t,o){if(!o.lpcVisible)throw new Error("lpc-visible attribute must contain an expression");e.$watch(o.lpcVisible,function(e){e?t.css("visibility","visible"):t.css("visibility","hidden")})}}}]),angular.module("lpc").directive("lpcFeesSimulator",[function(){return{restrict:"A",scope:!1,link:function(t,e,o){o.minCom?t.minCom=Number(o.minCom):(console.warn("minCom is not defined taking 0 default value"),t.minCom=0),o.maxCom?t.maxCom=Number(o.maxCom):(console.warn("maxCom is not defined taking 0 default value"),t.maxCom=0),o.comFloor?t.comFloor=Number(o.comFloor):(console.warn("comFloor is not defined taking 0 default value"),t.comFloor=0),t.$watch(o.lpcFeesSimulator,function(e){e>=t.comFloor?(t.resultAmount=e-e*t.minCom,t.usedCom=t.minCom):(t.resultAmount=e-e*t.maxCom,t.usedCom=t.maxCom)})}}}]),angular.module("lpc").directive("lpcPageError",["ErrorHandler",function(i){return{restrict:"E",scope:!1,link:function(e,t,o){var n=t.html();i.handle({data:{fieldErrors:[{page:"string:"+n}]}}),t.remove(),console.log(n)}}}]),angular.module("lpc").directive("lpcPesonalisePopupCookiesHandler",["$rootScope","ipCookie",function(a,r){return{restrict:"A",scope:!1,link:function(e,t,o){var n,i=r("personnalize-pot-popup-status");i?(n=i,(i=function(e,t){if(e&&e.length)for(var o=0;o<e.length;o++)if(e[o].uniq&&e[o].uniq==t)return e[o]}(n=angular.isObject(i)?n:JSON.parse(i),o.lpcPesonalisePopupCookiesHandler))?1==i.times&&((n=function(e,t){if(e&&e.length){for(var o=0;o<e.length;o++)if(e[o].uniq&&e[o].uniq==t)return e.splice(o,o+1),e;return e}}(n,i.uniq)).push({uniq:o.lpcPesonalisePopupCookiesHandler,times:2}),r("personnalize-pot-popup-status",JSON.stringify(n),{path:"/",expires:moment().add("1","years").toDate()}),a.showPopup(o.lpcPopup)):(n.push({uniq:o.lpcPesonalisePopupCookiesHandler,times:1}),r("personnalize-pot-popup-status",JSON.stringify(n),{path:"/",expires:moment().add("1","years").toDate()}),a.showPopup(o.lpcPopup))):((n=[]).push({uniq:o.lpcPesonalisePopupCookiesHandler,times:1}),r("personnalize-pot-popup-status",JSON.stringify(n),{path:"/",expires:moment().add("1","years").toDate()}),a.showPopup(o.lpcPopup))}}}]),angular.module("lpc").directive("lpcAjustable",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){var n=Number(t.css("height").replace("px",""));function i(){t[0].scrollHeight>n?(t.css("height","auto"),t.css("height",t[0].scrollHeight+"px")):t.css("height",n+"px")}t.on("keyup",function(e){13==e.which&&i()}),e.$watch(o.ngModel,i),e.$on("lpc-adjustable-refresh-event",i)}}}]),angular.module("lpc").directive("lpcHideIfCropped",["$timeout",function(t){return{restrict:"A",scope:{elementIndex:"=",pageAlreadyCreated:"="},priority:-1e3,link:function(o,n,i){function e(){var e=angular.element(i.lpcHideIfCropped),t=e.offset().top;e.outerHeight()+t<n.offset().top+n.height()-15?n.css("visibility","hidden"):(n.css("visibility","visible"),a||(o.$emit("visible-wish-event",o.elementIndex),a=!0))}var a=!1;t(e,0),o.$on("lpc-hide-if-cropped-event",function(){t(e,0)}),angular.element(window).on("resize",e).trigger("resize")}}}]),angular.module("lpc").directive("greetingCardFloatingPanel",[function(){return{restrict:"A",scope:!1,link:function(e,r,l){function t(){var e,t,o,n,i,a;angular.element(window).width()<1e3?r.setStatic():(e=angular.element("#content").offset().top,t=angular.element(window).scrollTop(),o=(n=angular.element(l.greetingCardFloatingPanel)).offset().top,n=n.height(),r.offset().top,a=o+n-(i=r.children().height())-e<t,o-e<t&&t<o+n-i-e?r.setFixed(e):r.setStatic(a))}r.offset().top,r.setFixed=function(e){this.css("position","fixed"),this.css("top",e+"px"),angular.element("#panel-replacement")&&angular.element("#panel-replacement").length||angular.element('<div id="panel-replacement" class="greeting-card-pannel-container"></div>').insertAfter(r)},r.setStatic=function(e){this.css("position","static"),e?this.css("vertical-align","bottom"):this.css("vertical-align","top"),angular.element("#panel-replacement").remove()};setTimeout(t,0),angular.element(window).on("resize scroll",t)}}}]),angular.module("lpc").directive("lpcHideOnFocus",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){new MobileDetect(window.navigator.userAgent).is("iOS")||(angular.element(o.lpcHideOnFocus).on("focus",function(e){t.hide()}),angular.element(o.lpcHideOnFocus).on("blur",function(e){t.show()}))}}}]),angular.module("lpc").directive("bindHtmlCompile",["$compile",function(i){return{restrict:"A",link:function(t,o,n){t.$watch(function(){return t.$eval(n.bindHtmlCompile)},function(e){o.html(e&&e.toString());e=t;n.bindHtmlScope&&(e=t.$eval(n.bindHtmlScope)),i(o.contents())(e)})}}}]),angular.module("lpc").directive("lpcLazyBackground",["$q","LpcImageCache","$http",function(e,t,o){return{restrict:"A",link:function(e,n,t){function o(e){var t,o;e&&(t=n.css("position"),n.css("position","relative"),n.append(a),n.css("background-image","none"),(o=new Image).crossOrigin="anonymous",o.src=e,o.onload=function(){var e=this.src;setTimeout(function(){a.remove(),n.css("position",t),n.animate({opacity:0},0).css("background-image","url('"+e+"')").animate({opacity:1},500)},700)})}var i=t.lpcLazyBackgroundSpinnerClass,a=angular.element('<div class="lpc-lazy-background-spinner-table"><div class="lpc-lazy-background-spinner-container"><div class="'+i+'"></div></div></div>');t.lpcLazyBackground&&e.$watch(t.lpcLazyBackground,function(e,t){o(e)}),t.lpcLazyBackgroundUrl&&o(t.lpcLazyBackgroundUrl)}}}]),angular.module("lpc").directive("lpcTogglableMenu",[function(){return{restrict:"A",link:function(e,t,o){angular.element(o.lpcTogglableMenu).on("click",function(){t.toggleClass(o.classToApply),t.hasClass(o.classToApply)?e.toggled=!0:e.toggled=!1,e.$apply()})}}}]),angular.module("lpc").directive("ngClickNoPropagation",[function(){return{restrict:"A",link:function(t,e,o){e.on("click",function(e){t.$apply(function(){t.$eval(o.ngClickNoPropagation)}),e.preventDefault(),e.stopPropagation()})}}}]),angular.module("lpc").directive("lpcSelectable",[function(){return{restrict:"A",link:function(e,o,t){var n=JSON.parse(t.lpcSelectableCss);e.$watch(t.lpcSelectable,function(e){e?angular.forEach(n,function(e,t){o.css(t,e)}):angular.forEach(n,function(e,t){o.css(t,"")})})}}}]),angular.module("lpc").directive("lpcCustomPlaceholder",[function(){return{restrict:"E",link:function(e,t,o){var n=t.find("lpc-custom-placeholder-content"),i=(n.remove(),t.children().wrap('<div class="lpc-custom-placeholder-wrapper"></div>').wrap('<div class="lpc-custom-placeholder-elements-container"></div>'),angular.element("<div></div>").addClass("lpc-custom-placeholder-content")),o=(o.lpcCustomPlaceholderLeft&&i.css("left",o.lpcCustomPlaceholderLeft),i.append(angular.element("<div></div>").addClass("lpc-custom-placeholder-content-table").append(angular.element("<div></div>").addClass("lpc-custom-placeholder-content-cell"))),i.find(".lpc-custom-placeholder-content-cell").append(n.children()),t.find(".lpc-custom-placeholder-wrapper").append(i),t.find("input,select,textarea")),n=o.attr("ng-model");(n=n||o.attr("data-ng-model"))&&e.$watch(n,function(e){e?i.hide():i.show()})}}}]),angular.module("lpc").directive("lpcSmartTextArea",[function(){return{restrict:"A",scope:{lpcSmartTextArea:"="},link:function(n,i,a){i.attr("contenteditable",!0);var r,l=a.lpcSmartTextAreaDelimiters;function s(){var e=i.find(".lpc-smart-textarea-element"),t=(e.remove(),i.text()),o=new RegExp(l,"g"),t=t.split(o);i.html(""),i.append(e),t&&t.length&&(angular.forEach(t,function(e){var t;e&&e.length&&((t=angular.element('<span class="lpc-smart-textarea-element">'+e+"</span>")).attr("contenteditable",!1),t.append('<a class="lpc-smart-textarea-delete-button"><img src="/static/img/svg/croix.svg?h=hash"/></a>'),a.lpcSmartTextAreaValidationRegex&&!new RegExp(a.lpcSmartTextAreaValidationRegex,"i").test(e.replace(/^\s+|\s+$/g,""))&&t.addClass("lpc-smart-textarea-element-invalid"),i.append(t))}),setTimeout(function(){var e,t,o;i.append('<span class="lpc-smart-textarea-current-content"></span>'),(e=i.find(".lpc-smart-textarea-current-content")[0]).focus(),void 0!==window.getSelection&&void 0!==document.createRange?((t=document.createRange()).selectNodeContents(e),t.collapse(!1),(o=window.getSelection()).removeAllRanges(),o.addRange(t)):void 0!==document.body.createTextRange&&((o=document.body.createTextRange()).moveToElementText(e),o.collapse(!1),o.select())},0)),n.lpcSmartTextArea=[],r=[],i.find(".lpc-smart-textarea-element").each(function(e){var t=angular.element(this);t.text().trim()&&t.text().trim().length&&-1==r.indexOf(t.text().trim())?(r.push(t.text().trim()),t.hasClass("lpc-smart-textarea-element-invalid")||n.lpcSmartTextArea.push(t.text().trim()),t.find(".lpc-smart-textarea-delete-button").on("click",function(){angular.element(this).parent().remove(),s()})):t.remove()}),n.$apply()}i.on("keyup change",function(e){i.text()||i.html(""),i.text()&&(i.text()[i.text().length-1]+"").match(l)&&s(),8!=e.which||i.find(".lpc-smart-textarea-current-content").length||s()}),i.on("blur paste",function(e){setTimeout(function(){i.text()&&i.text().length&&s(),i.text()||i.html("")},0)}),n.$on("lpc-smart-text-area-clear-event",function(e,t){t&&t.name&&t.name==a.lpcSmartTextAreaName&&(i.html(""),n.lpcSmartTextArea=[],r=[])})}}}]),angular.module("lpc").directive("lpcClickExclude",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){t.css("cursor","pointer"),t.find(o.lpcClickExcludeElements).css("cursor","text"),t.on("click",function(e){angular.element(e.target)[0]!=t.find(o.lpcClickExcludeElements)[0]&&(e=o.lpcClickExclude,window.open(e,"_blank").focus())})}}}]),angular.module("lpc").directive("lpcMenuDropdown",["$timeout",function(a){return{restrict:"A",scope:!1,link:function(e,t,o){var n=t.find("[lpc-menu-dropdown-content]"),i=!1;e.$watch(o.autoClose,function(e){e&&(i=e)}),t.find("[lpc-menu-dropdown-button]").on("click",function(){"hidden"==n.css("visibility")?(n.css("visibility","visible"),n.css("opacity","1"),e.$emit("lpc-menu-dropdown-hide-others-event",{name:o.lpcMenuDropdown}),i&&a(function(){e.$apply(function(){n.css("visibility","hidden"),n.css("opacity","0")})},1650)):(n.css("visibility","hidden"),n.css("opacity","0"))}),angular.element(window).on("click",function(e){e=angular.element(e.target);(e.is("[lpc-menu-dropdown-select]")||0<e.parents("[lpc-menu-dropdown-select]").length||!(e.is("[lpc-menu-dropdown-content]")||0<e.parents("[lpc-menu-dropdown-content]").length||e.is("[lpc-menu-dropdown-button]")||0<e.parents("[lpc-menu-dropdown-button]").length))&&(n.css("visibility","hidden"),n.css("opacity","0"))}),e.$on("lpc-menu-dropdown-hide-others-event",function(e,t){t&&t.name&&t.name!=o.lpcMenuDropdown&&(n.css("visibility","hidden"),n.css("opacity","0"))})}}}]),angular.module("lpc").directive("lpcDropzone",function(){return function(o,t,n){var e,i;o.lpcDropzoneUploading=!1,e=o[n.lpcDropzone],i=new Dropzone(t[0],e.options),Dropzone.autoDiscover=!1,angular.forEach(e.eventHandlers,function(e,t){i.on(t,e)}),angular.element(document).on("dragover dragenter",function(e){e.preventDefault(),e.stopPropagation(),o.lpcDropzoneUploading||t.css("display","table")}),angular.element(document).on("dragleave",function(e){!o.lpcDropzoneUploading&&(e.preventDefault(),e.stopPropagation(),angular.element(e.target).is("[lpc-dropzone]")||0<angular.element(e.target).parents("[lpc-dropzone]").length)&&t.css("display","none")}),t.on("drop",function(e){o.lpcDropzoneUploading||(e.preventDefault(),e.stopPropagation(),t.css("display","none"))}),o.$on("lpc-dropzone-start-upload-event",function(e,t){t&&t.name&&t.name==n.lpcDropzoneName&&!o.lpcDropzoneUploading&&(o.lpcDropzoneUploading=!0,i.options.autoProcessQueue=!0,i.processQueue())}),o.$on("lpc-dropzone-stop-auto-upload-event",function(e,t){o.lpcDropzoneUploading=!1,i.options.autoProcessQueue=!1,i.removeAllFiles()}),o.queuedFilesCount=function(){return i.files.length}}}),angular.module("lpc").directive("lpcLiveProgressBar",[function(){return{restrict:"E",scope:{progress:"="},templateUrl:"/static/partial/lpc-live-progress-bar.html",link:function(o,e,n){var i=0;o.$watch("progress",function(e,t){i<e&&t<e&&(i=e,o.currentProgress=o.progress)}),o.getWidthStyle=function(){return{width:o.currentProgress+"%"}},o.$on("lpc-live-progress-bar-restart-event",function(e,t){t&&t.name&&t.name==n.lpcLiveProgressBarName&&(i=0,o.currentProgress=0)})}}}]),angular.module("lpc").directive("lpcScrollbar",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){Ps.initialize(t[0]),e.$on("update-scrollbar-event",function(){Ps.update(t[0])})}}}]),angular.module("lpc").directive("lpcSwiper",[function(){return{restrict:"A",scope:{lpcSwiperConfig:"=",lpcSwiper:"@"},link:function(e,t,o){if(!e.lpcSwiperConfig)throw new Error("No config provided for the swiper");var n=e.lpcSwiperConfig;new Swiper(e.lpcSwiper,n)}}}]),angular.module("lpc").directive("customInputFormatOnlyCharacters",function(){return{restrict:"A",require:"?ngModel",scope:{customInputFormatOnlyCharacters:"="},link:function(e,t,o,n){e.$watch("customInputFormatOnlyCharacters",function(e,t){e&&e.length&&(38<(e=e.replace(/[^a-zA-Z àâäèéêëîïôœùûüÿçÀÂÄÈÉÊËÎÏÔŒÙÛÜŸÇ\s]*/g,"").toUpperCase()).length&&(e=e.substring(0,38)),n.$setViewValue(e),n.$render())})}}}),angular.module("lpc").directive("customInputFormat",function(){return{restrict:"A",require:"?ngModel",scope:{customInputFormat:"=",customInputFormatActive:"="},link:function(o,e,t,n){o.$watch("customInputFormat",function(e,t){o.customInputFormatActive&&e&&e.length&&(20<(e=e.replace(/[^a-zA-Z0-9\s]*/g,"").toUpperCase()).length&&(e=e.substring(0,20)),n.$setViewValue(e),n.$render())})}}}),angular.module("lpc").directive("lpcFloatingButton",["$rootScope",function(e){return{restrict:"A",scope:{elementToNotHide:"@"},link:function(t,o,e){setTimeout(function(){var e=$(t.elementToNotHide);$(window).on("scroll",function(){$(o).offset().top+$(o).outerHeight()>e.offset().top?angular.element($(o)).addClass("hide-element"):angular.element($(o)).removeClass("hide-element")})},0)}}}]),angular.module("lpc").directive("lpcToggleButton",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){t.on("click touchstart",function(e){angular.element(o.lpcToggleButton).toggleClass("hidden-plan"),event.preventDefault(),angular.element(o.lpcToggleButton).hasClass("hidden-plan")?t.removeClass(o.lpcToggleButtonClass):t.addClass(o.lpcToggleButtonClass)})}}}]),angular.module("lpc").directive("lpcImageTag",[function(){return{restrict:"E",scope:!1,link:function(e,t,o){console.log(o.src);var n=new Image;n.src=o.src,n.onload=function(){console.log("Image loaded")}}}}]),angular.module("lpc").directive("lpcShowOnHover",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){function n(){return i}var i;t.on("mouseenter",function(e){angular.element(o.lpcShowOnHover).fadeIn()});t.on("mouseleave",function(e){angular.element(o.lpcShowOnHover).on("mouseenter",function(e){i=!0}),angular.element(o.lpcShowOnHover).on("mouseleave",function(e){i=!1}),void 0!==n()&&0==n()?setTimeout(function(){angular.element(o.lpcShowOnHover).fadeOut()},4e3):setTimeout(function(){angular.element(o.lpcShowOnHover).fadeOut()},5e3)})}}}]),angular.module("lpc").directive("lpcShowOnHoverSpecial",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){t.on("mouseenter",function(e){angular.element(o.lpcShowOnHover).fadeIn()}),t.on("mouseleave",function(e){angular.element(o.lpcShowOnHover).mouseenter||setTimeout(function(){setTimeout(function(){angular.element(o.lpcShowOnHover).fadeOut()},4e3)},4e3)})}}}]),angular.module("lpc").directive("lpcDropDownFooter",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){t.on("touchstart click",function(e){angular.element(o.lpcDropDownFooter).hasClass("arrow-footer-langue-drop")?angular.element(o.lpcDropDownFooter).hasClass("open-drop")?(angular.element(o.lpcDropDownFooter).toggleClass("close-drop"),event.preventDefault()):$("#footerDropDownLangue").hasClass("open-drop2")?$("#footerDropDownLangue").toggleClass("close-drop2"):(angular.element(o.lpcDropDownFooter).addClass("open-drop"),event.preventDefault()):(angular.element(o.lpcDropDownFooter).hasClass("open-drop2")?angular.element(o.lpcDropDownFooter).toggleClass("close-drop2"):angular.element(o.lpcDropDownFooter).addClass("open-drop2"),event.preventDefault())})}}}]),angular.module("lpc").directive("lpcCustomSelect",[function(){return{restrict:"E",scope:{defaultOption:"@",onSelect:"&"},transclude:!0,replace:!0,templateUrl:"/static/partial/lpc-custom-select-dashboard.html",link:function(t,o,n,e,i){t.options=[],t.optionsDisplayed=[],i(function(e,t){angular.forEach(e,function(e){var e=angular.element(e);e.attr("value")&&(e={value:e.attr("value"),label:e.html()},t.$parent.options.push(e))})}),o.find(".lpc-custom-select-selected-item").on("touchstart click",function(e){(t.lpcCustomSelectOpened?r:l)()});function a(e,t){if(e&&e.length){for(var o=[],n=0;n<e.length;n++)e[n].value!=t.value&&o.push(e[n]);return o}}var r=function(){t.lpcCustomSelectOpened=!1,t.$$phase&&t.$apply(),o.find(".lpc-custom-select-options-container").slideUp(200,function(){o.removeClass("lpc-custom-select-opened")})},l=function(){t.$root.$broadcast("lpc-custom-select-close-event",{id:n.id}),t.lpcCustomSelectOpened=!0,t.$$phase&&t.$apply();var e=o.find(".lpc-custom-select-options-container");o.addClass("lpc-custom-select-opened"),e.slideDown(200,function(){})};t.selectedOption=function(e,t){if(e&&e.length)for(var o=0;o<e.length;o++)if(e[o].value==t)return e[o]}(t.options,t.defaultOption),t.optionsDisplayed=a(t.options,t.selectedOption),t.$on("lpc-custom-select-close-event",function(e,t){t.id!=n.id&&r()}),t.select=function(e){t.selectedOption=e,t.optionsDisplayed=a(t.options,t.selectedOption),t.onSelect&&t.onSelect({value:t.selectedOption.value}),r()},angular.element(window).on("touchstart click",function(e){e=angular.element(e.target);!t.lpcCustomSelectOpened||e.is(".lpc-custom-select-container")||e.parents(".lpc-custom-select-container").length||r()})}}}]),angular.module("lpc").directive("lpcArrowRotate",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){t.on("touchstart click",function(e){angular.element(o.lpcArrowRotate).hasClass("arrowLang")?$("#arrowDrop").hasClass("arrow-footer")?$("#arrowDrop").toggleClass("arrow-footer2"):$("#arrowDrop").toggleClass("arrow-footer"):angular.element(o.lpcArrowRotate).hasClass("arrow-footer")?angular.element(o.lpcArrowRotate).toggleClass("arrow-footer2"):angular.element(o.lpcArrowRotate).toggleClass("arrow-footer"),e.preventDefault()})}}}]),angular.module("lpc").directive("lpcNoteTooltip",[function(){return{restrict:"E",scope:{},templateUrl:"/static/partial/lpc-note-tooltip.html",transclude:!0,link:function(e,t,o,n,i){i(function(e,t){angular.forEach(e,function(e){e=angular.element(e);e.is("lpc-note-tooltip-text")&&(t.$parent.tooltipText=e.html())})}),t.find("lpc-note-tooltip-text").remove(),t.find(".lpc-note-tooltip-text").css("top",t.find(".lpc-note-tooltip-original-content").outerHeight()+5+"px")}}}]),angular.module("lpc").directive("lpcCharactersCount",[function(){return{restrict:"A",scope:{lpcCharactersCount:"="},link:function(t,e,o){var n=o.maxlength;t.lpcCharactersCount=n,t.$parent.$watch(o.ngModel,function(e){e&&e.length?t.lpcCharactersCount=n-e.length:t.lpcCharactersCount=n})}}}]),angular.module("lpc").directive("scrollUpDown",[function(){return{restrict:"A",scope:!1,link:function(o,e,t){o.lastScrollPosition=0,angular.element(window).scroll(function(e){var t=angular.element(window).scrollTop();t>o.lastScrollPosition?o.$apply(function(){o.scrollDown=!0}):o.$apply(function(){o.scrollDown=!1}),o.lastScrollPosition=t})}}}]),angular.module("lpc").directive("lpcSelect",[function(){return{restrict:"E",templateUrl:"/static/partial/lpc-select.html",transclude:!0,replace:!0,scope:{ngModel:"=",lpcSelectChange:"&"},link:function(o,e,t,n,i){i(function(e,n){n.$parent.options=[],angular.forEach(e,function(e){var t,e=angular.element(e),o=e.attr("value");e.is("lpc-select-option")&&((t=new Object).value=o,t.text=e.html(),n.$parent.options.push(t))})}),angular.element(window).on("click",function(e){e=angular.element(e.target);e.closest(".lpc-select-container")&&e.closest(".lpc-select-container").length||o.$apply(function(){o.shown=!1})}),o.ngModel||(o.ngModel=o.options[0].value),o.lpcSelectChange&&o.lpcSelectChange(),o.select=function(e){o.shown=!1,o.ngModel=e.value},o.$watch("ngModel",function(e){o.selected=function(e){for(var t=0;t<o.options.length;t++)if(o.options[t].value==e)return o.options[t]}(e),o.lpcSelectChange&&setTimeout(o.lpcSelectChange,0)})}}}]),angular.module("lpc").directive("lpcInfiniteScroll",function(){return{restrict:"E",scope:{loadFunc:"&"},link:function(e,t,o){angular.element(window).on("scroll",function(){Number(angular.element(document).outerHeight()-screen.height)<=angular.element(window).scrollTop()&&e.loadFunc()})}}}),angular.module("lpc").directive("lpcCopy",function(){return{restrict:"A",scope:{copySuccess:"&"},link:function(t,e,o){document.queryCommandSupported&&document.queryCommandSupported("copy")||e.parent().addClass(o.notSupportedClass),window.clipboard||(window.clipboard=new Clipboard(o.lpcCopy),clipboard.on("success",function(e){t.copySuccess&&t.copySuccess()}))}}}),angular.module("lpc").directive("lpcLogoSvg",["$compile","$templateRequest",function(i,a){return{restrict:"E",scope:{bgColor:"@",domain:"@"},link:function(o,t,e){var n;o.domain=o.domain||(o.domain="logo-fr"),o.domain=o.domain.toLowerCase(),n="fr"==o.domain?"/static/partial/logos/logo-fr.svg?h=2":"it"==o.domain?"/static/partial/logos/logo-it.svg?h=2":"/static/plateforms/"+o.domain+"/img/logos/logo.svg?h=2",a(n).then(function(e){e=angular.element(e);t.append(e),i(e)(o)},function(e){throw e}),o.$watch(e.bgColor,function(e){if(e){for(var t in o.backgroundColors=void 0,e)1==e[t]&&(o.backgroundColors=t.split(","));o.backgroundColor||(o.backgroundColor="#434A54")}else o.backgroundColor="#434A54"})}}}]),angular.module("lpc").directive("lpcPotMenu",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){angular.element(window).on("scroll",function(){e.lpcMenuZeroScroll=0==angular.element(window).scrollTop(),e.$$phase||e.$apply(),e.lpcMenuZeroScroll||t.removeClass(o.lpcPotMenu)}).trigger("scroll")}}}]),angular.module("lpc").directive("lpcVideoBackground",["$log","$timeout","$document",function(p,f,g){return{restrict:"E",scope:{source:"=",onFirstplay:"&",onFirstend:"&"},templateUrl:"/static/partial/lpc-video-background.html",link:function(e,t,o){if(e.source&&angular.isObject(e.source)&&Object.keys(e.source).length){var n,i,a,r=["mp4","webm","ogg","jpg"],l=t.children().eq(0),s=t.children().eq(1),c=l[0];for(i in c.firstPlay=!0,c.firstEnd=!0,c.autopause=void 0!==o.autopause&&"false"!==o.autopause,c.loop=void 0!==o.loop&&"false"!==o.loop,c.volume=o.volume&&0<=o.volume&&o.volume<=1?o.volume:1,c.defaultPlaybackRate=o.playbackRate||1,l.addClass("ng-hide"),s.addClass("ng-hide"),l.addClass("video-background"),e.source)e.source.hasOwnProperty(i)&&-1<r.indexOf(i)?((a=document.createElement("source")).src=e.source[i],a.type="video/"+i,c.appendChild(a)):p.warn("videoBg: You passed a type",i,"that is not valid, must be one of theese: [mp4,webm,ogg]");c.onended=function(){if(c.firstEnd)return c.firstEnd=!1,!angular.isFunction(e.onFirstend)||e.$apply(e.onFirstend())},c.onloadeddata=function(){if(c.currentTime=o.startTime||0,e.currentTime=c.currentTime,void 0!==o.keyControls&&"false"!==o.keyControls&&(g.on("keydown",u),g.on("keyup",d),e.$on("$destroy",function(){g.off("keydown",u),g.off("keyup",d)})),l.removeClass("ng-hide"),void 0!==o.autoplay&&"false"!==o.autoplay)return c.play()},c.ontimeupdate=function(){if(o.endTime&&o.endTime<=c.currentTime)return e.currentTime=o.endTime,c.currentTime=c.duration;e.$apply(function(){return e.currentTime=c.currentTime})},c.onplay=function(){if(c.firstPlay)return c.firstPlay=!1,!angular.isFunction(e.onFirstplay)||e.$apply(e.onFirstplay())},"false"!==o.controlBox&&(c.onseeking=function(){"false"!==o.showTime&&e.$apply(function(){return s.removeClass("ng-hide")})},c.onseeked=function(){f.cancel(n),n=f(function(){e.$apply(function(){s.addClass("ng-hide")})},2e3)},c.onpause=function(){f.cancel(n),"false"!==o.showTime&&(s.removeClass("ng-hide"),n=f(function(){e.$apply(function(){s.addClass("ng-hide")})},2e3))})}else p.warn("VideoBg: Expected a valid object, received:",e.source);function d(e){27===e.which&&(c.pause(),c.currentTime=0),32!==e.which||c.endend||(c.paused?c.play():c.pause())}function u(e){37===e.which&&(e.preventDefault(),!c.paused&&c.autopause&&c.pause(),0<c.currentTime&&2<=c.currentTime?c.currentTime-=2:c.currentTime=0),39===e.which&&(e.preventDefault(),!c.paused&&c.autopause&&c.pause(),c.currentTime<c.duration?c.currentTime+=2:c.currentTime=c.duration)}}}}]),angular.module("lpc").directive("lpcShowAfterScroll",function(){return{restrict:"A",scope:!1,link:function(e,t,o){var n=angular.element(o.lpcShowAfterScroll),i=o.lpcHideAfterScrollClass?angular.element(o.lpcHideAfterScrollClass):void 0;angular.element(window).on("scroll",function(){var e;e=null!=o.bottomOfBlock&&"true"==o.bottomOfBlock?angular.element(window).scrollTop()>n.offset().top+n[0].offsetHeight-parseInt(o.addOffset):angular.element(window).scrollTop()>n.offset().top,i&&(null!=o.bottomOfBlock&&"true"==o.bottomOfBlock?e&=angular.element(window).scrollTop()+$(window).height()<i.offset().top+n[0].offsetHeight:e&=angular.element(window).scrollTop()+$(window).height()<i.offset().top),e?t.addClass(o.lpcShowAfterScrollClass):t.removeClass(o.lpcShowAfterScrollClass)}).trigger("scroll")}}}),angular.module("lpc").directive("ccmTimelineStep",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){var n=angular.element(window),i=o.additionalSpace?Number(o.additionalSpace):0,a=!!o.excludeElementHeight&&"true"==o.excludeElementHeight;n.on("scroll",function(){n.width()<768||(n.scrollTop()+i>t.offset().top+(a?0:t.height())?t.addClass(o.ccmTimelineStep):t.removeClass(o.ccmTimelineStep))}).trigger("scroll")}}}]),angular.module("lpc").directive("ccmFaqQuestion",[function(){return{restrict:"A",scope:{selected:"="},link:function(e,t,o){function n(){angular.element("[ccm-faq-response]").slideUp(),angular.element("[ccm-faq-question]").find("span").removeClass("selected"),"none"==t.find("[ccm-faq-response]").css("display")&&(t.find("[ccm-faq-response]").slideDown(),t.find("span").addClass("selected"))}e.$watch("selected",function(e){e&&n()}),t.find("span").on("click",n)}}}]),angular.module("lpc").directive("potCreationHeader",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){var n=angular.element(o.contentElement),i=o.fixedSize,a=t.outerHeight();angular.element(window).on("scroll resize",function(){var e=angular.element(window);768<e.width()&&e.scrollTop()>a-i?(t.addClass(o.classToApply),t.css("top",-(a-i)+"px"),n.css("padding-top",Number(a)+"px")):(t.removeClass(o.classToApply),t.css("top",""),n.css("padding-top",""))})}}}]),angular.module("lpc").directive("lpcFloatingRedirect",[function(){return{restrict:"A",link:function(e,t,o){o.lpcClassToAdd&&angular.element(o.lpcClassToAdd);console.log(o.lpcClassToAdd),angular.element(window).on("scroll load",function(){100<angular.element(this).scrollTop()?t.addClass(o.lpcClassToAdd):t.removeClass(o.lpcClassToAdd)}),t.on("click",function(){return window.open(o.link,"_blank"),!1})}}}]),angular.module("lpc").directive("lpcHideAfter",[function(){return{restrict:"A",link:function(e,t,o){var n,i=angular.element(o.lpcHideAfter);i&&i.length&&(n=angular.element(window)).on("scroll",function(){var e=n.scrollTop();i.offset().top<e?t.css("visibility","hidden"):t.css("visibility","visible")}).trigger("scroll")}}}]),angular.module("lpc").directive("lpcHeaderTitle",["MenuHelper",function(i){return{restrict:"E",link:function(e,t,o){var n=angular.element(o.attachTo);i.add(o.attachTo,t.text().trim(),n.offset().top)}}}]),angular.module("lpc").directive("lpcOfferEnveloppeAnimator",[function(){var n={done:!1,handleElements:function(e){var t,o=angular.element(".enveloppe-left-cell"),n=angular.element(".enveloppe-right-cell"),i=angular.element(".enveloppe-letter-part-absolute-container");1e3<angular.element(window).width()&&!this.done?(o.css("right","-"+o.outerWidth()+"px"),n.css("left","-"+n.outerWidth()+"px"),t=this,setTimeout(function(){o.css("visibility","visible"),n.css("visibility","visible"),o.animate({right:"0"},{duration:500,easing:"swing"}),n.animate({left:"0"},{duration:500,easing:"swing"}),i.animate({bottom:"75px"},{duration:500,easing:"swing"}),t.done=!0},e.lpcOfferEnveloppeAnimator)):1e3<angular.element(window).width()?(o.css("visibility","visible"),n.css("visibility","visible"),o.css("right","0"),n.css("left","0"),i.css("bottom","75px")):angular.element(window).width()<=1e3&&i.css("bottom","50px")}};return{restrict:"A",scope:!1,link:function(e,t,o){angular.element(window).on("scroll resize",function(){n.handleElements(o)})}}}]),angular.module("lpc").directive("lpcOpenJobTile",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){t.on(" touchstart click",function(e){angular.element(o.lpcOpenJobTile).hasClass("openTile")?angular.element(o.lpcOpenJobTile).toggleClass("closedTile"):(angular.element(o.lpcOpenJobTile).toggleClass("openTile"),$(".leftemploititle").css("height:120px")),event.preventDefault()})}}}]),angular.module("lpc").directive("lpcPopupV2",["LpcPopupV2Helper","Helper","$rootScope","$timeout","ipCookie",function(n,o,i,e,a){function r(e){var t=o.queryString;"potCreationEdition"==e&&"create-pot"==t.action&&i.showPopupV2("potCreationEdition"),"personMissingInformations"==e&&i.showPopupV2("personMissingInformations"),"shareOfferLinkPopup"==e&&"share-popup"==t.action&&i.showPopupV2("shareOfferLinkPopup"),"kyc-remediation"===e&&"INDIVIDUAL_PERSON"===a("kyc-cookie")&&"/tableau-de-bord-mes-documents"!==window.location.pathname&&"/tableau-de-bord-kyc"!==window.location.pathname&&i.showPopupV2("kyc-remediation")}return{restrict:"E",scope:{lpcPopupV2Unclosable:"@",id:"@"},transclude:!0,templateUrl:"/static/angular-components-templates/static/lpc-popup-v2.html",link:function(e,t,o){if(!o.id)throw new Error("LpcPopupV2 has to have an ID");t.show(),e.lpcPopupV2Unclosable="true"==e.lpcPopupV2Unclosable,t.addClass("lpcPopupV2_"+e.id),n.register(e.id,t,e),r(e.id),e.hide=function(){e.lpcPopupV2Unclosable||n.hide(e.id)}}}}]),angular.module("lpc").directive("lpcAnimation",[function(){return{restrict:"E",scope:!1,link:function(e,t,o){o.$observe("lpcAnimationUrl",function(e){e&&bodymovin.loadAnimation({container:t[0],renderer:"svg",loop:"true"==o.lpcAnimationLoop,autoplay:!0,path:e})})}}}]),angular.module("lpc").directive("dashboardNotifications",["$http","$templateCache","$q","$compile",function(l,s,c,d){var u="/notifications/dashboard-notifications.html";return{restrict:"E",scope:!0,link:function(a,r,e){a.dashboardNotificationsCount=4,function t(){var o,n,i,e;o=u+"?dashboardNotificationsCount="+a.dashboardNotificationsCount,n=a,i=c.defer(),(e=s.get(o))?(e=d(e)(n),i.resolve(e)):l.get(o).then(function(e){s.put(o,e.data);e=d(e.data)(n);i.resolve(e)},function(e){i.reject(e)}),i.promise.then(function(e){r.empty(),r.append(e),a.lastScrollPosition&&r.find("ul").scrollTop(a.lastScrollPosition),r.find(".dashboard-notifications-button").on("click",function(){a.lastScrollPosition=r.find("ul").scrollTop(),a.dashboardNotificationsCount+=50,t()})},function(e){console.error(e),r.empty()})}()}}}]),angular.module("lpc").directive("lpcNotificationSource",[function(){return{restrict:"E",transclude:!0,scope:!0,link:function(e,t,o,n,i){i(function(e,t){t.$parent.content=e.html()}),e.$watch("content",function(e){t.parent().parent().find("h3").html(e)})}}}]),angular.module("lpc").directive("lpcDashboardMenu",[function(){return{restrict:"A",scope:!1,link:function(e,n,t){var i,a=angular.element("#footer");a&&a.length&&(i=angular.element(window)).on("scroll resize",function(){var e=i.scrollTop(),t=a.offset().top,o=i.height();t<e+o?(n.css("bottom",e+o-t+"px"),"1000px"<i.outerHeight()?(n.removeClass("dashboard-top-auto"),n.addClass("dashboard-top-0")):(n.removeClass("dashboard-top-0"),n.addClass("dashboard-top-auto"))):(n.removeClass("dashboard-top-auto"),n.css("bottom","0"),n.addClass("dashboard-top-0"))}).trigger("scroll")}}}]),angular.module("lpc").directive("dashboardContainer",[function(){return{restrict:"C",scope:!1,link:function(e,t,o){function n(){var e=angular.element(window).height();t.outerHeight()<e-173&&t.css("minHeight",e-173)}setTimeout(n,0),angular.element(window).on("resize",n)}}}]),angular.module("lpc").directive("dashboardNotificationImageSetter",["$timeout",function(o){return{restrict:"A",scope:!1,link:function(e,n,t){var i=t.dashboardNotificationImageSetterSitename,a=t.dashboardNotificationImageSetter;o(function(){var e=n.find(".notification-img"),t=n.find(".dashboard-home-notification-main-content").find("h3").text(),o="/static/img/dashboard/dashboard-temporary-user-pic.png?h=hash";void 0!==a&&a.trim().length&&(o=a),i.trim()==t.trim()&&(o="Le Pot Solidaire"===i.trim()?"/static/img/dashboard/logo-minimal-lps.png?h=hash":"/static/img/dashboard/logo-minimal.png?h=hash"),e.css({backgroundImage:"url('"+o+"')"})},500)}}}]),angular.module("lpc").directive("decimals",function(e){return{restrict:"A",require:"?ngModel",scope:{decimals:"@",decimalPoint:"@"},link:function(e,o,t,n){var i=parseInt(e.decimals)||2,a=e.decimalPoint||".";n.$render=function(){null!=n.$modelValue&&0<=n.$modelValue&&("number"==typeof i?o.val(n.$modelValue.toFixed(i).toString()):o.val(n.$modelValue.toString()))},n.$parsers.unshift(function(e){var t;return"number"==typeof i?(t=parseFloat(e.replace(",",".")),0===i?parseInt(t):parseFloat(t.toFixed(i))):parseFloat(e.replace(",","."))}),o.on("change",function(e){var t=parseFloat(o.val().replace(",","."));isNaN(t)||"number"!=typeof i||(0===i?o.val(parseInt(t)):(t=t.toFixed(i),o.val(t.replace(".",a))))})}}}),angular.module("lpc").directive("scrollWhen",["$timeout",function(t){return{restrict:"A",link:function(n,i,a){var e="true"===a.scrollWatchEnabled;function o(){var e,t,o;n.$eval(a.scrollWhen)&&(o=a.scrollContainer||"body",e=a.scrollSpeed||500,t=a.scrollOffset||600,$(o),o=$(i).offset().top-t,t=o,o=e,angular.element("html,body").animate({scrollTop:t},o))}t(function(){o()},0),e&&n.$watch(a.scrollWhen,function(e,t){e&&setTimeout(function(){o()},100)})}}}]),angular.module("lpc").directive("lpcCloseAdd",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){t.on("touchstart click",function(e){angular.element(o.lpcCloseAdd).hide()})}}}]),angular.module("lpc").directive("lpcShowGifOnHover",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){t.on("mouseenter",function(e){angular.element(o.lpcShowGifOnHover).fadeIn(),e.preventDefault()}),t.on("mouseleave",function(e){angular.element(o.lpcShowGifOnHover).fadeOut()})}}}]),angular.module("lpc").directive("lpcHideGifOnHover",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){t.on("mouseleave",function(e){angular.element(o.lpcHideGifOnHover).fadeIn("slow"),e.preventDefault()}),t.on("mouseenter",function(e){angular.element(o.lpcHideGifOnHover).fadeOut("slow"),angular.element(o.lpcHideGifOnHover).fadeOut("slow")})}}}]),angular.module("lpc").directive("lpcHomeIntBloc",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){t.on("mouseenter",function(e){angular.element(o.lpcHomeIntBloc).toggleClass("shadow-bloc"),e.preventDefault()}),t.on("mouseleave",function(e){angular.element(o.lpcHomeIntBloc).toggleClass("shadow-bloc")})}}}]),angular.module("lpc").directive("iframeOnload",[function(){return{scope:{callBack:"&iframeOnload"},link:function(e,t,o){t.on("load",function(){return e.callBack()})}}}]),angular.module("lpc").directive("lpcSvgCircularLoader",[function(){var a={strokeWidth:2,stroke:"#FFFFFF"};return{restrict:"E",templateUrl:"/static/partial/lpc-svg-circular-loader.html",scope:!1,link:function(e,t,o){var n,i=angular.copy(a);for(n in i)o[n]&&(i[n]=o[n]);t.find("circle").css(i)}}}]),angular.module("lpc").directive("gaLink",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){t.on("click",function(){ga("send","event",{eventCategory:o.eventCategory,eventAction:o.eventAction,eventLabel:o.eventLabel})})}}}]),angular.module("lpc").directive("categoryFilter",function(){return{restrict:"A",scope:{callback:"&updateFilterFunction",category:"="},link:function(e,t,o){t.bind("click",function(){t.hasClass("category")?(t.removeClass(),t.addClass("categorySelected")):(t.removeClass(),t.addClass("category")),e.callback(e.category)})}}}),angular.module("lpc").directive("selectAllCategories",function(){return{restrict:"A",scope:{callback:"&updateFilterFunction",category:"="},link:function(e,t,o){t.bind("click",function(){t.hasClass("category")&&(t.parent().children().removeClass(),t.parent().children().addClass("category"),t.removeClass("category"),t.addClass("categorySelected"),e.callback(e.category),e.$apply())})}}}),angular.module("lpc").directive("categoryFilterMobile",function(){return{restrict:"A",scope:{callback:"&updateFilterFunction",category:"="},link:function(t,o,e){o.bind("click",function(e){e.stopPropagation(),o.hasClass("category-checkbox")?(o.attr("class",""),o.addClass("category-selected-checkbox")):(o.attr("class",""),o.addClass("category-checkbox")),t.callback({categories:t.category})})}}}),angular.module("lpc").directive("selectAllCategoriesMobile",function(){return{restrict:"A",scope:{callback:"&updateFilterFunction",category:"="},link:function(e,t,o){t.bind("click",function(){var o;t.hasClass("category-checkbox")&&(o=angular.element(document.getElementsByClassName("category-selected-checkbox")),angular.forEach(o,function(e,t){$(o[t]).removeClass(),$(o[t]).addClass("category-checkbox")}),t.removeClass("category-checkbox"),t.addClass("category-selected-checkbox"),e.callback({categories:e.category}),e.$apply())})}}}),angular.module("lpc").directive("potDescriptionValidation",function(){return{restrict:"A",scope:{potDesc:"="},link:function(t,o,e){t.$on("forala-editor-on-blur",function(e){o.removeClass("editor-on-focus"),setTimeout(function(){""!=t.potDesc&&void 0!==t.potDesc||angular.element(".fr-placeholder").show()},100)}),t.$on("forala-editor-on-focus",function(e){o.addClass("editor-on-focus"),angular.element(".fr-placeholder").hide()})}}}),angular.module("lpc").directive("lpcShowToolTip",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){t.mouseenter(function(e){angular.element(o.lpcShowToolTip).toggleClass("hide-tooltip")}),angular.element(o.lpcShowToolTip).on("mouseleave",function(e){angular.element(o.lpcShowToolTip).toggleClass("hide-tooltip")})}}}]),angular.module("lpc").directive("ngclipboard",function(){return{restrict:"A",scope:{ngclipboardSuccess:"&",ngclipboardError:"&"},link:function(t,e){var o=new Clipboard(e[0]);o.on("success",function(e){t.$apply(function(){t.ngclipboardSuccess({e:e})})}),o.on("error",function(e){t.$apply(function(){t.ngclipboardError({e:e})})}),e.on("$destroy",function(){o.destroy()})}}}),angular.module("lpc").directive("lpcSelectUrl",function(){return{restrict:"E",link:function(e,t,o){o.copySuccessText;var n=o.copyButton,i=o.spanClass||"linkTextContainer",i='<span class="url-wrapper" ><span class="url-container"> <span class="url-cell" id=\''+o.id+"Span' class='"+i+"' contenteditable='true'>"+o.value+'</span><a class="url-cell copy-cell copy-button" >'+n+'</a></span><span class="copy-state-indicator"> + copySuccessText + </span></span>',a=(t.append(i),angular.element("#"+o.id+"Span")),r=!1,l=[17,224,17,91,93],s=o.showIndicator;$(".url-wrapper").on("click",function(){var e,t=a,o=s;if(t&&t.select)try{document.execCommand("selectAll"),document.execCommand("copy"),o&&((e=angular.element(".copy-state-indicator")).fadeIn(),setTimeout(function(){e.fadeOut()},1e3))}catch(e){throw e}}),$(".copy-button").on("click",function(){$(".url-wrapper").trigger("click")}),a.on("keydown",function(){$.inArray(event.keyCode,l)&&(r=!0)}).on("keyup",function(){$.inArray(event.keyCode,l)&&(r=!1)}).on("keydown",function(){return!(!r||67!=event.keyCode)})}}}),angular.module("lpc").directive("homeSecurityContentToggle",[function(){return{restrict:"A",scope:!0,controller:["$scope","$element","$attrs","$window",function(t,o,n,e){var i=$("#home-ccm-security"),a=$("#home-ccm-security-title"),r=$(".home-page-circular-main-span");$(document).ready(function(){i.empty().prepend(e.mainsecurity),a.empty().prepend(e.mainsecurity_title),t.isAnimationFinished=!0,r.addClass("bubble-active-one")}),o.on("mouseenter",function(e){$(".home-page-circular-options-container li").removeClass("bubble-active-one"),r.removeClass("bubble-active-one"),o.addClass("bubble-active-one"),o.css("overflow","visible"),t.isAnimationFinished&&t.isAnimationFinished&&(t.isAnimationFinished=!1,i.fadeOut(500),a.fadeOut(500),setTimeout(function(){i.empty().prepend(n.homeSecurityContentToggle).fadeIn(450),a.empty().prepend(n.homeSecurityContentToggleTitle).fadeIn(450),t.isAnimationFinished=!0},450))})}]}}]),angular.module("lpc").directive("addRemoveClassOnMouseOverLeave",[function(){return{restrict:"A",scope:{add:"=",remove:"=",update:"="},link:function(e,t,o){t.on("mouseover",function(){console.log(e.remove),console.log(e.add),console.log(e.update),angular.element(e.update).addClass(e.add)}),t.on("mouseleave",function(){angular.element(e.update).removeClass(e.remove)})}}}]),angular.module("lpc").directive("showOnNotZeroScroll",[function(){return{restrict:"A",scope:{},link:function(e,t,o){angular.element(window).on("scroll",function(){0<angular.element(window).scrollTop()?(t.removeClass("hide-element"),t.addClass("show-element")):(t.removeClass("show-element"),t.addClass("hide-element"))})}}}]),angular.module("lpc").directive("readMore",[function(){return{restrict:"A",link:function(e,t,o){var n=t[0].getElementsByClassName("text"),i=t[0].getElementsByClassName("filter"),a=t[0].getElementsByClassName("read-more"),r=t[0].getElementsByClassName("read-less"),l=t[0].getElementsByClassName("text-container");e.$watch(function(){return angular.element(n)[0].offsetHeight},function(){angular.element(n)[0].offsetHeight+1<angular.element(n)[0].scrollHeight?(angular.element(i).addClass("show-element"),angular.element(a).addClass("show-element"),angular.element(l).removeClass("remove-margin"),angular.element(l).addClass("add-margin")):(angular.element(l).removeClass("add-margin"),angular.element(l).addClass("remove-margin"))}),angular.element(a).on("click",function(){angular.element(n).addClass("no-max-height"),angular.element(n).removeClass("set-max-height"),angular.element(i).addClass("hide-element"),angular.element(a).addClass("hide-element"),angular.element(r).removeClass("hide-element"),angular.element(r).addClass("show-element")}),angular.element(r).on("click",function(){angular.element(n).removeClass("no-max-height"),angular.element(n).addClass("set-max-height"),angular.element(i).removeClass("hide-element"),angular.element(i).addClass("show-element"),angular.element(a).removeClass("hide-element"),angular.element(a).addClass("show-element"),angular.element(r).addClass("hide-element")})}}}]),angular.module("lpc").directive("validFile",function(){return{require:"ngModel",link:function(e,t,o,n){n.$setValidity("validFile",""!=t.val()),t.bind("change",function(){n.$setValidity("validFile",""!=t.val()),e.$apply(function(){n.$setViewValue(t.val()),n.$render()})})}}}),angular.module("lpc").directive("focusOnInvalidInput",function(){return{restrict:"A",link:function(e,t){t.on("submit",function(){var e=t[0].querySelector(".ng-invalid");e&&e.focus()})}}}),angular.module("lpc").directive("gifPlayer",[function(){function t(e,t){r=0,i(t);var o=t.find("[gif-player-image]");o.attr("src",e.gifPlayer[r].url),l.push(setTimeout(n(e,t,o),e.gifPlayer[r].duration))}function n(e,t,o){return function(){r<e.gifPlayer.length-1?r++:r=0,i(t),angular.element(o).attr("src",e.gifPlayer[r].url),l.push(setTimeout(n(e,t,o),e.gifPlayer[r].duration))}}var r,l=[],i=function(e){e=e.find("[gif-player-element]").children();e.removeClass("active"),angular.element(e[r]).addClass("active")};return{restrict:"A",scope:{gifPlayer:"="},link:function(i,a,e){if(!i.gifPlayer||!i.gifPlayer.length)throw new Error("The Gifs list is required to this directive");t(i,a),a.find("[gif-player-element]").children().on("mouseenter",function(e){if(angular.element(e.currentTarget).index()!=r){for(var t=a,o=0;o<l.length;o++)clearTimeout(l[o]);l=[],t.find("[gif-player-element]").children().removeClass("active"),t=i,n=a,e=angular.element(e.currentTarget).index(),n.find("[gif-player-image]").attr("src",t.gifPlayer[e].url)}var n}).on("mouseleave",function(e){angular.element(e.currentTarget).index()!=r&&l.push(setTimeout(function(){t(i,a)},200))})}}}]),angular.module("lpc").directive("maxValueInput",function(){return{restrict:"A",scope:{errorMaxParticipation:"@",maxValue:"@",displayErrorMessage:"=",displayTooltip:"="},link:function(t,o){1==t.displayErrorMessage&&(n=$("<p class='error-max-participation'></p>").text(t.errorMaxParticipation),i=$("<p class='error-min-participation'></p>").text(t.errorMinParticipation));var n,i,a=parseFloat(t.maxValue);o.on("keyup",function(e){e=e.target.value;1==t.displayErrorMessage&&(void 0!==$(".error-max-participation")&&$(".error-max-participation").remove(),void 0!==$(".error-min-participation"))&&$(".error-min-participation").remove(),a<e&&setTimeout(function(){o.val(a),1==t.displayErrorMessage&&(o.parent().append(n).fadeIn(),o.parent().append(i).fadeIn()),1==t.displayTooltip&&($(".max-participation__tooltip").fadeIn(),setTimeout(function(){$(".max-participation__tooltip").fadeOut()},8e3))},500),a<e&&(o.addClass("shake"),setTimeout(function(){o.removeClass("shake")},2e3))})}}}),angular.module("lpc").directive("greetingCardPhysicalFloatingPanel",[function(){return{restrict:"A",scope:!1,link:function(e,l,s){l.setFixed=function(e){this.css("position","fixed"),this.css("top",e+"px"),this.css("margin-top","30px"),this.css("vertical-align","")},l.setStatic=function(e,t){e&&this.css({position:"static","vertical-align":"bottom"}),t||this.css({position:"static","vertical-align":"top"})};function t(){var e,t,o,n,i,a,r;angular.element(window).width()<769?l.setStatic():(e=angular.element("#content").offset().top,t=angular.element(window).scrollTop(),void 0!==(n=angular.element(s.greetingCardPhysicalFloatingPanel)).offset()&&(r=(o=n.offset().top)+(n=n.height())-(i=l.children().first().height())-e<t,(a=o-e<t)&&t<o+n-i-e?l.setFixed(e):l.setStatic(r,a)))}setTimeout(t,0),angular.element(window).on("resize scroll",t)}}}]),angular.module("lpc").directive("lpcMoreReview",[function(){return{restrict:"A",scope:!1,link:function(e,t,o){t.click("seeMoreReview",function(e){angular.element(o.lpcMoreReview).hasClass("showReview")?angular.element(o.lpcMoreReview).toggleClass("hideReview"):angular.element(o.lpcSeeMoreReview).toggleClass("showReview"),e.preventDefault()})}}}]),angular.module("lpc").directive("showPreviewCardClick",function(n){return{restrict:"A",link:function(e,t,o){angular.element(window).width()<776&&angular.element(o.lpcShowPreviewCardClick).onclick()&&(angular.element(".greeting-card-physical-select-card-selection-mobile-preview-panel").hasClass("card-preview-button")?angular.element(".greeting-card-physical-select-card-selection-mobile-preview-panel").toggleClass("show-preview"):angular.element(".greeting-card-physical-select-card-selection-mobile-preview-panel").toggleClass("hide-preview"),n.preventDefault())}}}),angular.module("lpc").directive("scrollInvalidForm",function(){return{restrict:"A",link:function(e,t){t.on("submit",function(){setTimeout(function(){var e=t[0].querySelector(".ng-invalid");e&&(1==$("#"+e.id).parents(".lpc-popup-v2-wrapper").length?$(".lpc-popup-v2-wrapper").animate({scrollTop:function(e){for(var t=0,o=0;t+=e.offsetTop||0,o+=e.offsetLeft||0,e=e.offsetParent;);return{top:t,left:o}}(e).top-80},"slow"):$("html,body").animate({scrollTop:$("#"+e.id).offsetTop-80},"slow"))},300)})}}}),angular.module("lpc").directive("scrollToInvalidElementAfterSubmit",function(){return{restrict:"A",link:function(e,t){t.on("submit",function(){var e=angular.element(document.querySelector("input.ng-invalid"));e&&e.length&&jQuery("html,body").animate({scrollTop:e.offset().top-100},1e3,function(){e.focus()})})}}}),angular.module("lpc").directive("lpcSelectBox",["$rootScope","$timeout","$compile",function(r,l,s){return{restrict:"E",require:"ngModel",scope:{noSelectionText:"@"},transclude:!0,replace:!0,templateUrl:"/static/angular-components-templates/static/lpc-select-box.html",link:function(o,e,t,n,i){o.options=[],i(function(e,t){angular.forEach(e,function(e){var e=angular.element(e);e.attr("value")&&(e={value:e.attr("value"),label:e.html()},t.$parent.options.push(e))})});function a(e){for(var t=0;t<o.options.length;t++)if(o.options[t].value==e)return o.options[t]}i=angular.element("<select></select>");i.attr("ng-model","selectedValue"),i.attr("ng-class","{'lpc-select-box-mobile-select':isMobileLpcSelectBox}"),o.noSelectionText&&i.append('<option value="undefined" selected data-ng-bind-html="noSelectionText"></option>'),i.append('<option data-ng-repeat="option in options" value="{{option.value}}" data-ng-bind-html="option.label"></option>'),i.append('<optgroup label=""></optgroup>'),t.required&&i.attr("required",t.required),t.name&&i.attr("name",t.name),e.append(s(i)(o)),o.isMobileLpcSelectBox=r.isMobile(),e.find(".lpc-select-box-selected").on("click",function(e){o.$apply(function(){o.lpcSelectBoxOpened=!o.lpcSelectBoxOpened})}),angular.element(window).on("click",function(e){angular.element(e.target).parents(".lpc-select-box-wrapper").length||o.$apply(function(){o.lpcSelectBoxOpened=!1})}),o.$watch("selectedValue",function(e){e&&("undefined"==e&&(o.selectedValue=void 0,n.$setViewValue(o.selectedValue)),o.selectedOption=a(e),o.selectedOption&&n.$setViewValue(o.selectedOption.value),o.selectedOption&&(o.selectedValue=o.selectedOption.value),o.lpcSelectBoxOpened=!1)}),o.$watch(function(){return n.$modelValue},function(e){e&&a(e)&&(o.selectedOption=a(e),o.selectedOption&&n.$setViewValue(o.selectedOption.value),o.selectedOption)&&(o.selectedValue=o.selectedOption.value)}),l(function(){e.find(".lpc-select-box-choices-container .lpc-select-box-choice").on("click",function(e){var e=angular.element(e.target),t=e.data("value");void 0===t&&(t=e.parent().data("value")),o.$apply(function(){o.selectedOption=a(t),o.selectedOption&&n.$setViewValue(o.selectedOption.value),o.selectedOption&&(o.selectedValue=o.selectedOption.value),o.lpcSelectBoxOpened=!1})})})}}}]),angular.module("lpc").directive("fbqTrackEvent",function(){return{restrict:"A",link:function(e,t,o){e.fbqTrackEvent=o.fbqTrackEvent,t.on("submit",function(){if(void 0!==o.fbqTrackEvent)switch(o.fbqTrackEvent){case"potCreation":fbq("track","submitApplication",{content_category:e.pot.categoryPO.value});break;case"potParamsEdition":fbq("track","submitApplication");break;case"paymentStepOneForm":fbq("track","purchase",{value:e.caddie.payman.contributionMP,currency:"EUR"});break;default:fbq("track","submitApplication")}})}}}),angular.module("lpc").directive("nextButtonForm",function(){return{restrict:"A",link:function(e,t,o){e.nextButtonForm=o.nextButtonForm,e.button="",button.on("click",function(){void 0!==o.nextButtonForm&&o.nextButtonForm})}}}),angular.module("lpc").directive("codeBox",function(){return{restrict:"A",link:function(e,t,o){$(document).ready(function(){setBackgroundForAllRadio(o.name),$("input[name="+o.name+"]").on("change",function(){setBackgroundForAllRadio(o.name)})})}}});