@alma/widgets 3.3.10 → 3.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/widgets.m.js CHANGED
@@ -1,2 +1,2 @@
1
- import e,{useState as t,useEffect as n}from"react";import{IntlProvider as a,useIntl as r,FormattedMessage as i,FormattedNumber as l,FormattedDate as o}from"react-intl";import{unmountComponentAtNode as s,render as u}from"react-dom";import c from"classnames";import m from"react-modal";import d from"no-scroll";import{useMediaQuery as f}from"react-responsive";import{secondsToMilliseconds as g,isToday as p}from"date-fns";var y=function(e){try{return!!e()}catch(e){return!0}},h=!y(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),v=Function.prototype,b=v.call,E=h&&v.bind.bind(b,b),A=h?function(e){return e&&E(e)}:function(e){return e&&function(){return b.apply(e,arguments)}},w=Math.ceil,C=Math.floor,P=Math.trunc||function(e){var t=+e;return(t>0?C:w)(t)},O=function(e){var t=+e;return t!=t||0===t?0:P(t)},_="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function x(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}var S,M,I=function(e){return e&&e.Math==Math&&e},j=I("object"==typeof globalThis&&globalThis)||I("object"==typeof window&&window)||I("object"==typeof self&&self)||I("object"==typeof _&&_)||function(){return this}()||Function("return this")(),N=Object.defineProperty,z=function(e,t){try{N(j,e,{value:t,configurable:!0,writable:!0})}catch(n){j[e]=t}return t},L=j["__core-js_shared__"]||z("__core-js_shared__",{}),D=x(function(e){(e.exports=function(e,t){return L[e]||(L[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.22.8",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.8/LICENSE",source:"https://github.com/zloirock/core-js"})}),k=TypeError,T=function(e){if(null==e)throw k("Can't call method on "+e);return e},R=Object,F=function(e){return R(T(e))},B=A({}.hasOwnProperty),H=Object.hasOwn||function(e,t){return B(F(e),t)},V=0,U=Math.random(),G=A(1..toString),q=function(e){return"Symbol("+(void 0===e?"":e)+")_"+G(++V+U,36)},Z=function(e){return"function"==typeof e},W=function(e){return Z(e)?e:void 0},J=function(e,t){return arguments.length<2?W(j[e]):j[e]&&j[e][t]},K=J("navigator","userAgent")||"",X=j.process,Y=j.Deno,$=X&&X.versions||Y&&Y.version,Q=$&&$.v8;Q&&(M=(S=Q.split("."))[0]>0&&S[0]<4?1:+(S[0]+S[1])),!M&&K&&(!(S=K.match(/Edge\/(\d+)/))||S[1]>=74)&&(S=K.match(/Chrome\/(\d+)/))&&(M=+S[1]);var ee=M,te=!!Object.getOwnPropertySymbols&&!y(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ee&&ee<41}),ne=te&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ae=D("wks"),re=j.Symbol,ie=re&&re.for,le=ne?re:re&&re.withoutSetter||q,oe=function(e){if(!H(ae,e)||!te&&"string"!=typeof ae[e]){var t="Symbol."+e;ae[e]=te&&H(re,e)?re[e]:ne&&ie?ie(t):le(t)}return ae[e]},se={};se[oe("toStringTag")]="z";var ue="[object z]"===String(se),ce=A({}.toString),me=A("".slice),de=function(e){return me(ce(e),8,-1)},fe=oe("toStringTag"),ge=Object,pe="Arguments"==de(function(){return arguments}()),ye=ue?de:function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=ge(e),fe))?n:pe?de(t):"Object"==(a=de(t))&&Z(t.callee)?"Arguments":a},he=String,ve=function(e){if("Symbol"===ye(e))throw TypeError("Cannot convert a Symbol value to a string");return he(e)},be=A("".charAt),Ee=A("".charCodeAt),Ae=A("".slice),we=function(e){return function(t,n){var a,r,i=ve(T(t)),l=O(n),o=i.length;return l<0||l>=o?e?"":void 0:(a=Ee(i,l))<55296||a>56319||l+1===o||(r=Ee(i,l+1))<56320||r>57343?e?be(i,l):a:e?Ae(i,l,l+2):r-56320+(a-55296<<10)+65536}},Ce={codeAt:we(!1),charAt:we(!0)},Pe=A(Function.toString);Z(L.inspectSource)||(L.inspectSource=function(e){return Pe(e)});var Oe,_e,xe,Se=L.inspectSource,Me=j.WeakMap,Ie=Z(Me)&&/native code/.test(Se(Me)),je=function(e){return"object"==typeof e?null!==e:Z(e)},Ne=!y(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),ze=j.document,Le=je(ze)&&je(ze.createElement),De=function(e){return Le?ze.createElement(e):{}},ke=!Ne&&!y(function(){return 7!=Object.defineProperty(De("div"),"a",{get:function(){return 7}}).a}),Te=Ne&&y(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Re=String,Fe=TypeError,Be=function(e){if(je(e))return e;throw Fe(Re(e)+" is not an object")},He=Function.prototype.call,Ve=h?He.bind(He):function(){return He.apply(He,arguments)},Ue=A({}.isPrototypeOf),Ge=Object,qe=ne?function(e){return"symbol"==typeof e}:function(e){var t=J("Symbol");return Z(t)&&Ue(t.prototype,Ge(e))},Ze=String,We=function(e){try{return Ze(e)}catch(e){return"Object"}},Je=TypeError,Ke=function(e){if(Z(e))return e;throw Je(We(e)+" is not a function")},Xe=function(e,t){var n=e[t];return null==n?void 0:Ke(n)},Ye=TypeError,$e=TypeError,Qe=oe("toPrimitive"),et=function(e){var t=function(e,t){if(!je(e)||qe(e))return e;var n,a=Xe(e,Qe);if(a){if(void 0===t&&(t="default"),n=Ve(a,e,t),!je(n)||qe(n))return n;throw $e("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var n,a;if("string"===t&&Z(n=e.toString)&&!je(a=Ve(n,e)))return a;if(Z(n=e.valueOf)&&!je(a=Ve(n,e)))return a;if("string"!==t&&Z(n=e.toString)&&!je(a=Ve(n,e)))return a;throw Ye("Can't convert object to primitive value")}(e,t)}(e,"string");return qe(t)?t:t+""},tt=TypeError,nt=Object.defineProperty,at=Object.getOwnPropertyDescriptor,rt={f:Ne?Te?function(e,t,n){if(Be(e),t=et(t),Be(n),"function"==typeof e&&"prototype"===t&&"value"in n&&"writable"in n&&!n.writable){var a=at(e,t);a&&a.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:a.configurable,enumerable:"enumerable"in n?n.enumerable:a.enumerable,writable:!1})}return nt(e,t,n)}:nt:function(e,t,n){if(Be(e),t=et(t),Be(n),ke)try{return nt(e,t,n)}catch(e){}if("get"in n||"set"in n)throw tt("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},it=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},lt=Ne?function(e,t,n){return rt.f(e,t,it(1,n))}:function(e,t,n){return e[t]=n,e},ot=D("keys"),st=function(e){return ot[e]||(ot[e]=q(e))},ut={},ct=j.TypeError;if(Ie||L.state){var mt=L.state||(L.state=new(0,j.WeakMap)),dt=A(mt.get),ft=A(mt.has),gt=A(mt.set);Oe=function(e,t){if(ft(mt,e))throw new ct("Object already initialized");return t.facade=e,gt(mt,e,t),t},_e=function(e){return dt(mt,e)||{}},xe=function(e){return ft(mt,e)}}else{var pt=st("state");ut[pt]=!0,Oe=function(e,t){if(H(e,pt))throw new ct("Object already initialized");return t.facade=e,lt(e,pt,t),t},_e=function(e){return H(e,pt)?e[pt]:{}},xe=function(e){return H(e,pt)}}var yt,ht={set:Oe,get:_e,has:xe,enforce:function(e){return xe(e)?_e(e):Oe(e,{})},getterFor:function(e){return function(t){var n;if(!je(t)||(n=_e(t)).type!==e)throw ct("Incompatible receiver, "+e+" required");return n}}},vt={}.propertyIsEnumerable,bt=Object.getOwnPropertyDescriptor,Et={f:bt&&!vt.call({1:2},1)?function(e){var t=bt(this,e);return!!t&&t.enumerable}:vt},At=Object,wt=A("".split),Ct=y(function(){return!At("z").propertyIsEnumerable(0)})?function(e){return"String"==de(e)?wt(e,""):At(e)}:At,Pt=function(e){return Ct(T(e))},Ot=Object.getOwnPropertyDescriptor,_t={f:Ne?Ot:function(e,t){if(e=Pt(e),t=et(t),ke)try{return Ot(e,t)}catch(e){}if(H(e,t))return it(!Ve(Et.f,e,t),e[t])}},xt=Function.prototype,St=Ne&&Object.getOwnPropertyDescriptor,Mt=H(xt,"name"),It={EXISTS:Mt,PROPER:Mt&&"something"===function(){}.name,CONFIGURABLE:Mt&&(!Ne||Ne&&St(xt,"name").configurable)},jt=x(function(e){var t=It.CONFIGURABLE,n=ht.enforce,a=ht.get,r=Object.defineProperty,i=Ne&&!y(function(){return 8!==r(function(){},"length",{value:8}).length}),l=String(String).split("String"),o=e.exports=function(e,a,o){"Symbol("===String(a).slice(0,7)&&(a="["+String(a).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),o&&o.getter&&(a="get "+a),o&&o.setter&&(a="set "+a),(!H(e,"name")||t&&e.name!==a)&&r(e,"name",{value:a,configurable:!0}),i&&o&&H(o,"arity")&&e.length!==o.arity&&r(e,"length",{value:o.arity});try{o&&H(o,"constructor")&&o.constructor?Ne&&r(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var s=n(e);return H(s,"source")||(s.source=l.join("string"==typeof a?a:"")),e};Function.prototype.toString=o(function(){return Z(this)&&a(this).source||Se(this)},"toString")}),Nt=function(e,t,n,a){a||(a={});var r=a.enumerable,i=void 0!==a.name?a.name:t;return Z(n)&&jt(n,i,a),a.global?r?e[t]=n:z(t,n):(a.unsafe?e[t]&&(r=!0):delete e[t],r?e[t]=n:lt(e,t,n)),e},zt=Math.max,Lt=Math.min,Dt=Math.min,kt=function(e){return(t=e.length)>0?Dt(O(t),9007199254740991):0;var t},Tt=function(e){return function(t,n,a){var r,i=Pt(t),l=kt(i),o=function(e,t){var n=O(e);return n<0?zt(n+t,0):Lt(n,t)}(a,l);if(e&&n!=n){for(;l>o;)if((r=i[o++])!=r)return!0}else for(;l>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},Rt=(Tt(!0),Tt(!1)),Ft=A([].push),Bt=function(e,t){var n,a=Pt(e),r=0,i=[];for(n in a)!H(ut,n)&&H(a,n)&&Ft(i,n);for(;t.length>r;)H(a,n=t[r++])&&(~Rt(i,n)||Ft(i,n));return i},Ht=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Vt=Ht.concat("length","prototype"),Ut={f:Object.getOwnPropertyNames||function(e){return Bt(e,Vt)}},Gt={f:Object.getOwnPropertySymbols},qt=A([].concat),Zt=J("Reflect","ownKeys")||function(e){var t=Ut.f(Be(e)),n=Gt.f;return n?qt(t,n(e)):t},Wt=function(e,t,n){for(var a=Zt(t),r=rt.f,i=_t.f,l=0;l<a.length;l++){var o=a[l];H(e,o)||n&&H(n,o)||r(e,o,i(t,o))}},Jt=/#|\.prototype\./,Kt=function(e,t){var n=Yt[Xt(e)];return n==Qt||n!=$t&&(Z(t)?y(t):!!t)},Xt=Kt.normalize=function(e){return String(e).replace(Jt,".").toLowerCase()},Yt=Kt.data={},$t=Kt.NATIVE="N",Qt=Kt.POLYFILL="P",en=Kt,tn=_t.f,nn=function(e,t){var n,a,r,i,l,o=e.target,s=e.global,u=e.stat;if(n=s?j:u?j[o]||z(o,{}):(j[o]||{}).prototype)for(a in t){if(i=t[a],r=e.dontCallGetSet?(l=tn(n,a))&&l.value:n[a],!en(s?a:o+(u?".":"#")+a,e.forced)&&void 0!==r){if(typeof i==typeof r)continue;Wt(i,r)}(e.sham||r&&r.sham)&&lt(i,"sham",!0),Nt(n,a,i,e)}},an=Object.keys||function(e){return Bt(e,Ht)},rn={f:Ne&&!Te?Object.defineProperties:function(e,t){Be(e);for(var n,a=Pt(t),r=an(t),i=r.length,l=0;i>l;)rt.f(e,n=r[l++],a[n]);return e}},ln=J("document","documentElement"),on=st("IE_PROTO"),sn=function(){},un=function(e){return"<script>"+e+"<\/script>"},cn=function(e){e.write(un("")),e.close();var t=e.parentWindow.Object;return e=null,t},mn=function(){try{yt=new ActiveXObject("htmlfile")}catch(e){}var e,t;mn="undefined"!=typeof document?document.domain&&yt?cn(yt):((t=De("iframe")).style.display="none",ln.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(un("document.F=Object")),e.close(),e.F):cn(yt);for(var n=Ht.length;n--;)delete mn.prototype[Ht[n]];return mn()};ut[on]=!0;var dn,fn,gn,pn=Object.create||function(e,t){var n;return null!==e?(sn.prototype=Be(e),n=new sn,sn.prototype=null,n[on]=e):n=mn(),void 0===t?n:rn.f(n,t)},yn=!y(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hn=st("IE_PROTO"),vn=Object,bn=vn.prototype,En=yn?vn.getPrototypeOf:function(e){var t=F(e);if(H(t,hn))return t[hn];var n=t.constructor;return Z(n)&&t instanceof n?n.prototype:t instanceof vn?bn:null},An=oe("iterator"),wn=!1;[].keys&&("next"in(gn=[].keys())?(fn=En(En(gn)))!==Object.prototype&&(dn=fn):wn=!0),(null==dn||y(function(){var e={};return dn[An].call(e)!==e}))&&(dn={}),Z(dn[An])||Nt(dn,An,function(){return this});var Cn={IteratorPrototype:dn,BUGGY_SAFARI_ITERATORS:wn},Pn=rt.f,On=oe("toStringTag"),_n=function(e,t,n){e&&!n&&(e=e.prototype),e&&!H(e,On)&&Pn(e,On,{configurable:!0,value:t})},xn={},Sn=Cn.IteratorPrototype,Mn=function(){return this},In=String,jn=TypeError,Nn=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=A(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,a){return Be(n),function(e){if("object"==typeof e||Z(e))return e;throw jn("Can't set "+In(e)+" as a prototype")}(a),t?e(n,a):n.__proto__=a,n}}():void 0),zn=Cn.IteratorPrototype,Ln=Cn.BUGGY_SAFARI_ITERATORS,Dn=oe("iterator"),kn=function(){return this},Tn=Ce.charAt,Rn=ht.set,Fn=ht.getterFor("String Iterator");!function(e,t,n,a,r,i,l){!function(e,t,n,a){e.prototype=pn(Sn,{next:it(1,function(){var e,t=Fn(this),n=t.string,a=t.index;return a>=n.length?{value:void 0,done:!0}:(e=Tn(n,a),t.index+=e.length,{value:e,done:!1})})}),_n(e,"String Iterator",!1),xn["String Iterator"]=Mn}(n);var o,s,u,c=function(e){if(void 0===e&&f)return f;if(!Ln&&e in m)return m[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},m=e.prototype,d=m[Dn]||m["@@iterator"]||void 0,f=!Ln&&d||c(void 0);if(void(d&&(o=En(d.call(new e)))!==Object.prototype&&o.next&&(En(o)!==zn&&(Nn?Nn(o,zn):Z(o[Dn])||Nt(o,Dn,kn)),_n(o,"String Iterator",!0))))if(void(s={values:c("values"),keys:c("keys"),entries:c("entries")}))for(u in s)(Ln||!(u in m))&&Nt(m,u,s[u]);else nn({target:"String",proto:!0,forced:Ln||!1},s);m[Dn]!==f&&Nt(m,Dn,f,{name:void 0}),xn.String=f}(String,0,function(e){Rn(this,{type:"String Iterator",string:ve(e),index:0})});var Bn=A(A.bind),Hn=function(e,t){return Ke(e),void 0===t?e:h?Bn(e,t):function(){return e.apply(t,arguments)}},Vn=function(e,t,n,a){try{return a?t(Be(n)[0],n[1]):t(n)}catch(t){!function(e,t,n){var a;Be(e);try{if(!(a=Xe(e,"return")))throw n;a=Ve(a,e)}catch(e){a=e}throw n}(e,0,t)}},Un=oe("iterator"),Gn=Array.prototype,qn=function(e){return void 0!==e&&(xn.Array===e||Gn[Un]===e)},Zn=function(){},Wn=[],Jn=J("Reflect","construct"),Kn=/^\s*(?:class|function)\b/,Xn=A(Kn.exec),Yn=!Kn.exec(Zn),$n=function(e){if(!Z(e))return!1;try{return Jn(Zn,Wn,e),!0}catch(e){return!1}},Qn=function(e){if(!Z(e))return!1;switch(ye(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Yn||!!Xn(Kn,Se(e))}catch(e){return!0}};Qn.sham=!0;var ea=!Jn||y(function(){var e;return $n($n.call)||!$n(Object)||!$n(function(){e=!0})||e})?Qn:$n,ta=function(e,t,n){var a=et(t);a in e?rt.f(e,a,it(0,n)):e[a]=n},na=oe("iterator"),aa=function(e){if(null!=e)return Xe(e,na)||Xe(e,"@@iterator")||xn[ye(e)]},ra=TypeError,ia=function(e,t){var n=arguments.length<2?aa(e):t;if(Ke(n))return Be(Ve(n,e));throw ra(We(e)+" is not iterable")},la=Array,oa=oe("iterator"),sa=!1;try{var ua=0,ca={next:function(){return{done:!!ua++}},return:function(){sa=!0}};ca[oa]=function(){return this},Array.from(ca,function(){throw 2})}catch(e){}var ma,da,fa,ga=!function(e,t){if(!sa)return!1;var n=!1;try{var a={};a[oa]=function(){return{next:function(){return{done:n=!0}}}},Array.from(a)}catch(e){}return n}();function pa(e){return Math.round(100*e)}function ya(e){return Number((e/100).toFixed(2))}function ha(e){return String(ya(e)).replace(".",",")}nn({target:"Array",stat:!0,forced:ga},{from:function(e){var t=F(e),n=ea(this),a=arguments.length,r=a>1?arguments[1]:void 0,i=void 0!==r;i&&(r=Hn(r,a>2?arguments[2]:void 0));var l,o,s,u,c,m,d=aa(t),f=0;if(!d||this===la&&qn(d))for(l=kt(t),o=n?new this(l):la(l);l>f;f++)m=i?r(t[f],f):t[f],ta(o,f,m);else for(c=(u=ia(t,d)).next,o=n?new this:[];!(s=Ve(c,u)).done;f++)m=i?Vn(u,r,[s.value,f],!0):s.value,ta(o,f,m);return o.length=f,o}}),function(e){e.PaymentPlans="PaymentPlans",e.Modal="Modal"}(ma||(ma={})),function(e){e.PENDING="pending",e.SUCCESS="success",e.FAILED="failed"}(da||(da={})),function(e){e.en="en",e["fr-FR"]="fr-FR",e.fr="fr",e["de-DE"]="de-DE",e.de="de",e.it="it",e["it-IT"]="it-IT",e.es="es",e["es-ES"]="es-ES",e.pt="pt",e["pt-PT"]="pt-PT",e.nl="nl",e["nl-NL"]="nl-NL",e["nl-BE"]="nl-BE"}(fa||(fa={}));var va,ba=function(e){return 1===(null==e?void 0:e.installments_count)&&0===(null==e?void 0:e.deferred_days)&&0===(null==e?void 0:e.deferred_months)};"function"!=typeof(va=window.Element.prototype).matches&&(va.matches=va.msMatchesSelector||va.mozMatchesSelector||va.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=0;t[n]&&t[n]!==this;)++n;return Boolean(t[n])}),"function"!=typeof va.closest&&(va.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null}),"".trim||(String.prototype.trim=function(){return this.replace(/^[\s]+|[\s]+$/g,"")}),function(e){e.DOMException||((DOMException=function(e){this.message=e}).prototype=new Error);var t,n,a=/[\11\12\14\15\40]/,r=0,i=function(e,t){if(""===t)throw new DOMException("Failed to execute '"+e+"' on 'DOMTokenList': The token provided must not be empty.");if(-1!==(r=t.search(a)))throw new DOMException("Failed to execute '"+e+"' on 'DOMTokenList': The token provided ('"+t[r]+"') contains HTML space characters, which are not valid in tokens.")};"function"!=typeof DOMTokenList&&function(e){var t=e.document,n=e.Object,r=n.prototype.hasOwnProperty,l=n.defineProperty,o=0,s=0,u=function(){if(!o)throw TypeError("Illegal constructor")};function c(){var t=e.event,n=t.propertyName;if(!s&&("className"===n||"classList"===n&&!l)){var r=t.srcElement,i=r[" uCLp"],o=""+r[n],u=o.trim().split(a),c=r["classList"===n?" uCL":"classList"],m=i.length;e:for(var d=0,f=i.length=u.length,g=0;d!==f;++d){for(var p=0;p!==d;++p)if(u[p]===u[d]){g++;continue e}c[d-g]=u[d]}for(var y=f-g;y<m;++y)delete c[y];if("classList"!==n)return;s=1,r.classList=c,r.className=o,s=0,c.length=u.length-g}}function m(e){if(!e||!("innerHTML"in e))throw TypeError("Illegal invocation");e.detachEvent("onpropertychange",c),o=1;try{var t=function(){};t.prototype=new u}finally{o=0}var n=t.prototype,r=new t;e:for(var i=e.className.trim().split(a),m=0,d=i.length,f=0;m!==d;++m){for(var g=0;g!==m;++g)if(i[g]===i[m]){f++;continue e}this[m-f]=i[m]}n.length=d-f,n.value=e.className,n[" uCL"]=e,l?(l(e,"classList",{enumerable:1,get:function(){return r},configurable:0,set:function(t){s=1,e.className=n.value=t+="",s=0;var i=t.trim().split(a),l=n.length;e:for(var o=0,u=n.length=i.length,c=0;o!==u;++o){for(var m=0;m!==o;++m)if(i[m]===i[o]){c++;continue e}r[o-c]=i[o]}for(var d=u-c;d<l;++d)delete r[d]}}),l(e," uCLp",{enumerable:0,configurable:0,writeable:0,value:t.prototype}),l(n," uCL",{enumerable:0,configurable:0,writeable:0,value:e})):(e.classList=r,e[" uCL"]=r,e[" uCLp"]=t.prototype),e.attachEvent("onpropertychange",c)}u.prototype.toString=u.prototype.toLocaleString=function(){return this.value},u.prototype.add=function(){e:for(var e=0,t=arguments.length,n="",a=this[" uCL"],r=a[" uCLp"];e!==t;++e){i("add",n=arguments[e]+"");for(var l=0,o=r.length,u=n;l!==o;++l){if(this[l]===n)continue e;u+=" "+this[l]}this[o]=n,r.length+=1,r.value=u}s=1,a.className=r.value,s=0},u.prototype.remove=function(){for(var e=0,t=arguments.length,n="",a=this[" uCL"],r=a[" uCLp"];e!==t;++e){i("remove",n=arguments[e]+"");for(var l=0,o=r.length,u="",c=0;l!==o;++l)c?this[l-1]=this[l]:this[l]!==n?u+=this[l]+" ":c=1;c&&(delete this[o],r.length-=1,r.value=u)}s=1,a.className=r.value,s=0},e.DOMTokenList=u;try{e.Object.defineProperty(e.Element.prototype,"classList",{enumerable:1,get:function(e){return r.call(this,"classList")||m(this),this.classList},configurable:0,set:function(e){this.className=e}})}catch(n){e[" uCL"]=m,t.documentElement.firstChild.appendChild(t.createElement("style")).styleSheet.cssText='_*{x-uCLp:expression(!this.hasOwnProperty("classList")&&window[" uCL"](this))}[class]{x-uCLp/**/:expression(!this.hasOwnProperty("classList")&&window[" uCL"](this))}'}}(e),t=e.DOMTokenList.prototype,n=e.document.createElement("div").classList,t.item||(t.item=function(e){return void 0===(t=this[e])?null:t;var t}),t.toggle&&!1===n.toggle("a",0)||(t.toggle=function(e){if(arguments.length>1)return this[arguments[1]?"add":"remove"](e),!!arguments[1];var t=this.value;return this.remove(t),t===this.value&&(this.add(e),!0)}),t.replace&&"boolean"==typeof n.replace("a","b")||(t.replace=function(e,t){i("replace",e),i("replace",t);var n=this.value;return this.remove(e),this.value!==n&&(this.add(t),!0)}),t.contains||(t.contains=function(e){for(var t=0,n=this.length;t!==n;++t)if(this[t]===e)return!0;return!1}),t.forEach||(t.forEach=function(e){if(1===arguments.length)for(var t=0,n=this.length;t!==n;++t)e(this[t],t,this);else{t=0,n=this.length;for(var a=arguments[1];t!==n;++t)e.call(a,this[t],t,this)}}),t.entries||(t.entries=function(){var e=this;return{next:function(){return 0<e.length?{value:[0,e[0]],done:!1}:{done:!0}}}}),t.values||(t.values=function(){var e=this;return{next:function(){return 0<e.length?{value:e[0],done:!1}:{done:!0}}}}),t.keys||(t.keys=function(){var e=this;return{next:function(){return 0<e.length?{value:0,done:!1}:{done:!0}}}})}(window);var Ea={"credit-features.credit-cost-display":"{creditCost} (APR {taegPercentage})","credit-features.information":"Ein Kredit verpflichtet Sie und muss zurückgezahlt werden. Prüfen Sie Ihre Rückzahlungsfähigkeit, bevor Sie sich verpflichten.","credit-features.total-credit-cost":"Davon Kreditkosten","eligibility-modal.bullet-1":"Wählen Sie <strong>Alma</strong> beim Check-out. ","eligibility-modal.bullet-2":"Lassen Sie sich führen und bestätigen Sie Ihre Zahlung in <strong>2 Minuten.</strong>","eligibility-modal.bullet-3":"<strong>Verlieren Sie nicht die Kontrolle,</strong> indem Sie Ihre Fälligkeitstermine nach Ihrem eigenen Tempo vor- oder zurückverlegen.","eligibility-modal.no-eligibility":"Ups, die Prüfung hat anscheinend nicht funktioniert.","eligibility-modal.p1x-bullet-1":"Wählen Sie <strong>Alma - Jetzt bezahlen</strong> zum Zeitpunkt der Zahlung.","eligibility-modal.p1x-bullet-2":"Tragen Sie Ihre <strong>Kreditkarteninformationen ein.</strong>","eligibility-modal.p1x-bullet-3":"<strong> Ihre Zahlung wird sofort bestätigt! </strong>","eligibility-modal.title-deferred-plan":"Zahlen Sie mit Alma in Raten oder später.","eligibility-modal.title-normal":"Zahlen Sie mit Alma in mehreren Raten.","eligibility-modal.title-pay-now":"Bezahlen Sie auf einmal mit Alma per Kreditkarte.","installments.today":"Heute","installments.total-amount":"Gesamtsumme","installments.total-fees":"Davon Kosten","payment-plan-strings.day-abbreviation":"T{deferredDays}","payment-plan-strings.default-message":"Bezahlen Sie zinsfrei in mehreren Raten mit Alma.","payment-plan-strings.deferred":"{totalAmount} zu zahlen am {dueDate}","payment-plan-strings.ineligible-greater-than-max":"Bis zu {maxAmount}","payment-plan-strings.ineligible-lower-than-min":"Ab {minAmount}","payment-plan-strings.month-abbreviation":"M{deferredMonths}","payment-plan-strings.multiple-installments":"{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}}}","payment-plan-strings.multiple-installments-same-amount":"{installmentsCount} x {totalAmount}","payment-plan-strings.no-fee":"(0% Finanzierung)","payment-plan-strings.pay-now":"Zahlen Sie jetzt {totalAmount}","payment-plan-strings.pay.now.button":"Jetzt bezahlen"},Aa={"credit-features.credit-cost-display":"{creditCost} (APR {taegPercentage})","credit-features.information":"A loan commits you and must be repaid. Check your ability to repay before committing yourself.","credit-features.total-credit-cost":"Of which cost of credit","eligibility-modal.bullet-1":"Choose <strong>Alma</strong> at checkout.","eligibility-modal.bullet-2":"Let us guide you and validate your payment in <strong>2 minutes.</strong>","eligibility-modal.bullet-3":"<strong>Stay in control</strong> by moving your deadlines forward or backward at your own pace.","eligibility-modal.no-eligibility":"Oops, looks like the simulation didn't work.","eligibility-modal.p1x-bullet-1":"Choose <strong>Alma - Pay now</strong> at checkout.","eligibility-modal.p1x-bullet-2":"Fill in your <strong>credit card information.</strong>","eligibility-modal.p1x-bullet-3":"<strong>The validation </strong> of your payment is instantaneous!","eligibility-modal.title-deferred-plan":"Pay in installments or later by credit card with Alma.","eligibility-modal.title-normal":"Pay in installments by credit card with Alma.","eligibility-modal.title-pay-now":"Pay cash by credit card with Alma.","installments.today":"Today","installments.total-amount":"Total","installments.total-fees":"Of which costs (incl. VAT)","payment-plan-strings.day-abbreviation":"D{deferredDays}","payment-plan-strings.default-message":"Pay in installments with Alma","payment-plan-strings.deferred":"{totalAmount} to pay the {dueDate}","payment-plan-strings.ineligible-greater-than-max":"Until {maxAmount}","payment-plan-strings.ineligible-lower-than-min":"From {minAmount}","payment-plan-strings.month-abbreviation":"M{deferredMonths}","payment-plan-strings.multiple-installments":"{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}}}","payment-plan-strings.multiple-installments-same-amount":"{installmentsCount} x {totalAmount}","payment-plan-strings.no-fee":"(free of charge)","payment-plan-strings.pay-now":"Pay now {totalAmount}","payment-plan-strings.pay.now.button":"Pay now"},wa={"credit-features.credit-cost-display":"{creditCost} (TAE {taegPercentage})","credit-features.information":"Un préstamo te compromete y debe ser devuelto. Comprueba tu capacidad financiera antes de comprometerte.","credit-features.total-credit-cost":"Coste de crédito (incl. en el total)","eligibility-modal.bullet-1":"Elige <strong>Alma</strong> como método de pago.","eligibility-modal.bullet-2":"Déjate guiar y válida tu pago en <strong>2 minutos.</strong>","eligibility-modal.bullet-3":"<strong>Mantén el control</strong> adelantando o retrasando los plazos a su propio ritmo.","eligibility-modal.no-eligibility":"Uy, parece que la simulación no ha funcionado.","eligibility-modal.p1x-bullet-1":"Elije <strong>Alma - Pagar ahora</strong> al momento de la compra.","eligibility-modal.p1x-bullet-2":"Introduzca los datos de tu tarjeta bancaria en <strong>.</strong>","eligibility-modal.p1x-bullet-3":"<strong>¡La validación </strong> de tu pago es instantánea!","eligibility-modal.title-deferred-plan":"Paga a plazos o posteriormente con tarjeta bancaria con Alma.","eligibility-modal.title-normal":"Pagar a plazos con tarjeta bancaria con Alma.","eligibility-modal.title-pay-now":"Paga de contado con tu tarjeta bancaria a través de alma.","installments.today":"Hoy","installments.total-amount":"Total","installments.total-fees":"De los cuales, costes (IVA incluido)","payment-plan-strings.day-abbreviation":"D{deferredDays}","payment-plan-strings.default-message":"Pagar a plazos con Alma","payment-plan-strings.deferred":"{totalAmount} a pagar el {dueDate}","payment-plan-strings.ineligible-greater-than-max":"Hasta {maxAmount}","payment-plan-strings.ineligible-lower-than-min":"Desde {minAmount}","payment-plan-strings.month-abbreviation":"M{deferredMonths}","payment-plan-strings.multiple-installments":"{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} mensualidad de {othersInstallmentAmount}} other {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} mensualidades de {othersInstallmentAmount}}}","payment-plan-strings.multiple-installments-same-amount":"{installmentsCount} plazos de {totalAmount}","payment-plan-strings.no-fee":"(sin intereses)","payment-plan-strings.pay-now":"Pague ahora {totalAmount}","payment-plan-strings.pay.now.button":"Pagar ahora"},Ca={"credit-features.credit-cost-display":"{creditCost} (TAEG {taegPercentage})","credit-features.information":"Un crédit vous engage et doit être remboursé. Vérifiez vos capacités de remboursement avant de vous engager.","credit-features.total-credit-cost":"Dont coût du crédit","eligibility-modal.bullet-1":"Choisissez <strong>Alma</strong> au moment du paiement.","eligibility-modal.bullet-2":"Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>","eligibility-modal.bullet-3":"<strong>Gardez le contrôle</strong> en avançant ou reculant vos échéances à votre rythme.","eligibility-modal.no-eligibility":"Oups, il semblerait que la simulation n'ait pas fonctionné.","eligibility-modal.p1x-bullet-1":"Choisissez <strong>Alma - Payer maintenant</strong> au moment du paiement.","eligibility-modal.p1x-bullet-2":"Renseignez les informations de votre <strong>carte bancaire.</strong>","eligibility-modal.p1x-bullet-3":"<strong>La validation </strong> de votre paiement est instantanée !","eligibility-modal.title-deferred-plan":"Payez en plusieurs fois ou plus tard par carte bancaire avec Alma.","eligibility-modal.title-normal":"Payez en plusieurs fois par carte bancaire avec Alma.","eligibility-modal.title-pay-now":"Payez comptant par carte bancaire avec Alma.","installments.today":"Aujourd'hui","installments.total-amount":"Total","installments.total-fees":"Dont frais (TTC)","payment-plan-strings.day-abbreviation":"J{deferredDays}","payment-plan-strings.default-message":"Payez en plusieurs fois avec Alma","payment-plan-strings.deferred":"{totalAmount} à payer le {dueDate}","payment-plan-strings.ineligible-greater-than-max":"Jusqu'à {maxAmount}","payment-plan-strings.ineligible-lower-than-min":"À partir de {minAmount}","payment-plan-strings.month-abbreviation":"M{deferredMonths}","payment-plan-strings.multiple-installments":"{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}}}","payment-plan-strings.multiple-installments-same-amount":"{installmentsCount} x {totalAmount}","payment-plan-strings.no-fee":"(sans frais)","payment-plan-strings.pay-now":"Payer maintenant {totalAmount}","payment-plan-strings.pay.now.button":"Payer maintenant"},Pa={"credit-features.credit-cost-display":"{creditCost} (TAEG {taegPercentage})","credit-features.information":"Un pagamento rateale ti impegna e deve essere ripagato. Verifica la tua disponibilità finanziaria prima di impegnarti.","credit-features.total-credit-cost":"Di cui commissioni","eligibility-modal.bullet-1":"Seleziona <strong>Alma</strong> come metodo di pagamento.","eligibility-modal.bullet-2":"Segui le istruzioni e completa l'acquisto <strong>in meno di 2 minuti.</strong>","eligibility-modal.bullet-3":"<strong>Gestisci il tuo piano di pagamento</strong> e modifica le scadenze secondo le tue esigenze.","eligibility-modal.no-eligibility":"Ops, sembra che qualcosa non abbia funzionato.","eligibility-modal.p1x-bullet-1":"Scegli <strong>Alma - Paga ora</strong> alla cassa.","eligibility-modal.p1x-bullet-2":"Inserisci i dati della tua <strong>carta bancaria.</strong>","eligibility-modal.p1x-bullet-3":"Ricevi la conferma di pagamento <strong>istantaneamente!</strong>","eligibility-modal.title-deferred-plan":"Paga a rate con Alma, senza registrazione.","eligibility-modal.title-normal":"Paga a rate con Alma, senza registrazione.","eligibility-modal.title-pay-now":"Paga ora con carta tramite Alma.","installments.today":"Oggi","installments.total-amount":"Totale","installments.total-fees":"Di cui commissioni","payment-plan-strings.day-abbreviation":"G{deferredDays}","payment-plan-strings.default-message":"Paga a rate con Alma, senza registrazione.","payment-plan-strings.deferred":"{totalAmount} da pagare il {dueDate}","payment-plan-strings.ineligible-greater-than-max":"Disponibile fino a {maxAmount}","payment-plan-strings.ineligible-lower-than-min":"Pagamento rateale disponibile a partire da {minAmount}","payment-plan-strings.month-abbreviation":"M{deferredMonths}","payment-plan-strings.multiple-installments":"{numberOfRemainingInstallments, plural, one {Oggi paghi {firstInstallmentAmount} poi tra {numberOfRemainingInstallments} mese {othersInstallmentAmount}} other {Oggi paghi {firstInstallmentAmount} poi {numberOfRemainingInstallments} rate mensili di {othersInstallmentAmount}}}","payment-plan-strings.multiple-installments-same-amount":"In {installmentsCount} rate mensili di {totalAmount}","payment-plan-strings.no-fee":"(senza interessi)","payment-plan-strings.pay-now":"Paga ora {totalAmount}","payment-plan-strings.pay.now.button":"Paga ora"},Oa={"credit-features.credit-cost-display":"{creditCost} (gemiddeld rente percentage {taegPercentage})","credit-features.information":"Een lening is bindend en moet worden terugbetaald. Ga na of je het kunt terugbetalen voordat je jezelf vastlegt.","credit-features.total-credit-cost":"Waarvan kredietkosten","eligibility-modal.bullet-1":"Kies <strong>Alma</strong> bij het afrekenen om de eerste termijnbetaling te voldoen. Dit kan gemakkelijk via jouw favoriete betaalmethode.","eligibility-modal.bullet-2":"Betaal gemakkelijk <strong>binnen 1 minuut </strong>. Je hebt hier geen account voor nodig.","eligibility-modal.bullet-3":"<strong>Behoudt de controle </strong> en bepaal je eigen tempo. Bij Alma schuif je de deadlines gemakkelijk vooruit of achteruit. Zonder bijkomende kosten.","eligibility-modal.no-eligibility":"Oeps, het lijkt erop dat de simulatie niet werkte.","eligibility-modal.p1x-bullet-1":"Kies <strong>Alma - Betaal nu</strong> bij het afrekenen om de eerste termijnbetaling te voldoen. Dit kan gemakkelijk via jouw favoriete betaalmethode.","eligibility-modal.p1x-bullet-2":"Vul jouw <strong>gegevens </strong> in","eligibility-modal.p1x-bullet-3":"<strong>De bevestiging </strong> van jouw betaling is onmiddellijk!","eligibility-modal.title-deferred-plan":"Betaal in termijnen bij Alma - helemaal rentevrij.","eligibility-modal.title-normal":"Betaal in termijnen bij Alma - helemaal rentevrij.","eligibility-modal.title-pay-now":"Betaal met iDEAL of per creditcard bij Alma.","installments.today":"Vandaag","installments.total-amount":"Totaal","installments.total-fees":"Waarvan kosten (incl. BTW)","payment-plan-strings.day-abbreviation":"D{deferredDays}","payment-plan-strings.default-message":"Betaal in termijnen bij Alma - helemaal rentevrij","payment-plan-strings.deferred":"{totalAmount} te betalen op {dueDate}","payment-plan-strings.ineligible-greater-than-max":"Tot {maxAmount}","payment-plan-strings.ineligible-lower-than-min":"Vanaf {minAmount}","payment-plan-strings.month-abbreviation":"M{deferredMonths}","payment-plan-strings.multiple-installments":"{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}}}","payment-plan-strings.multiple-installments-same-amount":"{installmentsCount} x {totalAmount}","payment-plan-strings.no-fee":"(zonder kosten)","payment-plan-strings.pay-now":"Betaal nu {totalAmount}","payment-plan-strings.pay.now.button":"Betaal nu"},_a={"credit-features.credit-cost-display":"{creditCost} (TAEG {taegPercentage})","credit-features.information":"Um crédito é um compromisso e deve ser reembolsado. Verifique a sua capacidade de pagar antes de se comprometer.","credit-features.total-credit-cost":"Incluindo comissões de crédito","eligibility-modal.bullet-1":"Seleccionar <strong>Alma - Pay Now</strong> no final da compra.","eligibility-modal.bullet-2":"Siga as instruções e valide o seu pagamento em <strong>2 minutos.</strong>","eligibility-modal.bullet-3":"<strong>Mantenha o controlo</strong> adiando as datas de pagamento ao seu próprio ritmo.","eligibility-modal.no-eligibility":"Ups, parece que a simulação não funcionou.","eligibility-modal.p1x-bullet-1":"Escolha <strong>Alma - Pague agora</strong> no checkout.","eligibility-modal.p1x-bullet-2":"Preencha os dados do seu <strong>cartão de bancário.</strong>","eligibility-modal.p1x-bullet-3":"<strong>A validação </strong> do seu pagamento é instantânea!","eligibility-modal.title-deferred-plan":"Pagar em prestações ou mais tarde por cartão de crédito com Alma.","eligibility-modal.title-normal":"Pagar em prestações por cartão bancário com a Alma.","eligibility-modal.title-pay-now":"Pague na integralidade com a Alma por cartão bancário.","installments.today":"Hoje","installments.total-amount":"Total","installments.total-fees":"Das quais comissões (incl. IVA)","payment-plan-strings.day-abbreviation":"D{deferredDays}","payment-plan-strings.default-message":"Pagamento em prestações com a Alma","payment-plan-strings.deferred":"{totalAmount} a pagar em {dueDate}","payment-plan-strings.ineligible-greater-than-max":"Até {maxAmount}","payment-plan-strings.ineligible-lower-than-min":"A partir de {minAmount}","payment-plan-strings.month-abbreviation":"M{deferredMonths}","payment-plan-strings.multiple-installments":"{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}}}","payment-plan-strings.multiple-installments-same-amount":"{installmentsCount} x {totalAmount}","payment-plan-strings.no-fee":"(sem encargos)","payment-plan-strings.pay-now":"Pagar agora {totalAmount}","payment-plan-strings.pay.now.button":"Pagar agora"},xa=function(e){switch(e.slice(0,2)){case fa.fr:return Ca;case fa.es:return wa;case fa.it:return Pa;case fa.de:return Ea;case fa.pt:return _a;case fa.nl:return Oa;case fa.en:default:return Aa}},Sa=function(t){var n=t.children,r=t.locale;return e.createElement(a,{messages:xa(r),locale:r,defaultLocale:"en"},n)};function Ma(){return(Ma=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function Ia(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)t.indexOf(n=i[a])>=0||(r[n]=e[n]);return r}var ja=function(e,t){return!!e.eligible&&!!t&&e.purchase_amount>=(null==t?void 0:t.minAmount)&&e.purchase_amount<=(null==t?void 0:t.maxAmount)},Na=function(e,a,r,i,l){var o,s,u=a.domain,c=a.merchantId,m=t([]),d=m[0],f=m[1],g=t(da.PENDING),p=g[0],y=g[1],h=null==r?void 0:r.map(function(e){return{installments_count:e.installmentsCount,deferred_days:null==e?void 0:e.deferredDays,deferred_months:null==e?void 0:e.deferredMonths}});return n(function(){if(p===da.PENDING){var t=null;i&&(t={country:i});var n=null;l&&(n={country:l}),function(e,t,n){void 0===e&&(e="");try{return Promise.resolve(fetch(e,{method:"POST",headers:Ma({"Content-Type":"application/json"},n),body:JSON.stringify(t)})).then(function(e){return e.json()})}catch(e){return Promise.reject(e)}}(u+"/v2/payments/eligibility",{purchase_amount:e,queries:h,billing_address:t,shipping_address:n},{Authorization:"Alma-Merchant-Auth "+c,"X-Alma-Agent":"Alma Widget/v3.3.10"}).then(function(e){f(e),y(da.SUCCESS)}).catch(function(){y(da.FAILED)})}},[p]),[(o=d,s=r,s?o.map(function(e){var t=30*(e.deferred_months?e.deferred_months:0)+(e.deferred_days?e.deferred_days:0),n=s.find(function(n){return e.installments_count===n.installmentsCount&&t===30*(n.deferredMonths?n.deferredMonths:0)+(n.deferredDays?n.deferredDays:0)});return Ma({},e,{eligible:ja(e,n)},function(e,t){var n,a=null==(n=e.constraints)?void 0:n.purchase_amount;return a&&t?{minAmount:Math.max(t.minAmount,null==a?void 0:a.minimum),maxAmount:Math.min(t.maxAmount,null==a?void 0:a.maximum)}:null!=t?t:{}}(e,n))}):o.filter(function(e){return!(1===e.installments_count&&0===e.deferred_days&&0===e.deferred_months)})),p]},za="alma-eligibility-modal",La={desktopModal:za+"-desktop-modal",mobileModal:za+"-mobile-modal",leftSide:za+"-left-side",bullet:za+"-bullet",rightSide:za+"-right-side",title:za+"-title",info:za+"-info",infoMessage:za+"-info-message",eligibilityOptions:za+"-eligibility-options",activeOption:za+"-active-option",closeButton:za+"-close-button",scheduleDetails:za+"-schedule-details",scheduleTotal:za+"-schedule-total",scheduleCredit:za+"-schedule-credit",cardContainer:za+"-card-logos",summary:za+"-summary"},Da=function(t){var n=t.currentPlan,a=r(),o=ya(n.purchase_amount+n.customer_total_cost_amount),s=ya(n.customer_total_cost_amount),u=(null==n?void 0:n.annual_interest_rate)&&n.annual_interest_rate/1e4||0,m=ya(n.customer_total_cost_amount),d=n.installments_count>4;return e.createElement("div",{className:c("_GTTk7",La.summary),"data-testid":"modal-summary"},e.createElement("div",{className:c("_34s2g",La.scheduleTotal)},e.createElement(i,{tagName:"div",id:"installments.total-amount",defaultMessage:"Total"}),e.createElement(l,{value:o||0,style:"currency",currency:"EUR"})),e.createElement("div",{className:c("_W7qIA",La.scheduleCredit)},d?e.createElement(e.Fragment,null,e.createElement(i,{id:"credit-features.total-credit-cost",defaultMessage:"Dont coût du crédit"}),e.createElement("span",{className:"_24KmE"},e.createElement(i,{id:"credit-features.credit-cost-display",defaultMessage:"{creditCost} (TAEG {taegPercentage})",values:{creditCost:a.formatNumber(s,{style:"currency",currency:"EUR"}),taegPercentage:a.formatNumber(u,{style:"percent",maximumFractionDigits:2})}}))):e.createElement(e.Fragment,null,e.createElement(i,{id:"installments.total-fees",defaultMessage:"Dont frais (TTC)",tagName:"div"}),e.createElement("div",null,e.createElement(l,{value:m,style:"currency",currency:"EUR"})))))},ka=function(t){return e.createElement("div",{className:c("_31lrj",t.className),"data-testid":"loader"},e.createElement("svg",{width:"120",height:"134",viewBox:"0 0 120 134",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M83.8164 41.0325C79.1708 22.8241 69.3458 17 59.9939 17C50.642 17 40.8171 22.8241 36.1715 41.0325L16 117H35.8804C39.119 104.311 49.1016 97.2436 59.9939 97.2436C70.8863 97.2436 80.8689 104.324 84.1075 117H104L83.8164 41.0325ZM59.9939 79.5428C53.6623 79.5428 47.925 82.0552 43.6918 86.1283L55.0936 41.9207C56.1853 37.6953 57.7985 36.3503 60.0061 36.3503C62.2136 36.3503 63.8269 37.6953 64.9185 41.9207L76.3082 86.1283C72.075 82.0552 66.3256 79.5428 59.9939 79.5428Z",fill:"#FA5022"})))};function Ta(t){var n=t.color;return e.createElement("svg",{className:t.className,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M12.5964 11.404L9.41445 8.22205L12.5964 5.04007C12.7732 4.86329 12.7732 4.50974 12.5964 4.33296L11.8893 3.62585C11.6904 3.42698 11.359 3.44908 11.1822 3.62585L8.00023 6.80783L4.81825 3.62585C4.61938 3.42698 4.28792 3.44908 4.11114 3.62585L3.40404 4.33296C3.20516 4.53183 3.20516 4.84119 3.40404 5.04007L6.58602 8.22205L3.40404 11.404C3.20516 11.6029 3.20517 11.9123 3.40404 12.1111L4.11115 12.8182C4.28792 12.995 4.61938 13.0171 4.81825 12.8182L8.00023 9.63626L11.1822 12.8182C11.359 12.995 11.6904 13.0171 11.8893 12.8182L12.5964 12.1111C12.7732 11.9344 12.7732 11.5808 12.5964 11.404Z",fill:void 0===n?"#fff":n}))}var Ra,Fa,Ba,Ha=["children","isOpen","onClose","className","contentClassName","scrollable"],Va=function(t){var n,a=t.children,r=t.isOpen,i=t.onClose,l=t.className,o=t.contentClassName,s=t.scrollable,u=void 0!==s&&s,f=Ia(t,Ha);return m.setAppElement("body"),e.createElement(m,Object.assign({className:c("_D8SjB",l),overlayClassName:"_1yxCb",onAfterOpen:function(){d.on()},onAfterClose:function(){d.off()},onRequestClose:i,isOpen:r,shouldCloseOnOverlayClick:!0,shouldCloseOnEsc:!0},f),e.createElement("div",{className:"_12LLh"},e.createElement("button",{onClick:i,className:c("_3YRro",La.closeButton),"data-testid":"modal-close-button"},e.createElement(Ta,null))),e.createElement("div",{className:c("_ocM9x",o,(n={},n._1GP2F=u,n))},a))},Ua=function(t){var n=t.deferred_days,a=t.deferred_months,r=t.installments_count;return 1!==r||n||a?1===r&&n?e.createElement(i,{id:"payment-plan-strings.day-abbreviation",defaultMessage:"J{deferredDays}",values:{deferredDays:"+"+n}}):1===r&&a?e.createElement(i,{id:"payment-plan-strings.month-abbreviation",defaultMessage:"M{deferredMonths}",values:{deferredMonths:"+"+a}}):r+"x":e.createElement(i,{id:"payment-plan-strings.pay.now.button",defaultMessage:"Payer maintenant"})},Ga=function(t){var n;if(null!=(n=t.payment_plan)&&n.every(function(e){return 0===e.customer_fee&&0===e.customer_interest}))return e.createElement(e.Fragment,null," ",e.createElement(i,{id:"payment-plan-strings.no-fee",defaultMessage:"(sans frais)"}))},qa=function(t){var n=t.eligibilityPlans,a=t.currentPlanIndex,r=t.setCurrentPlanIndex;return e.createElement("div",{className:c("_1l2Oa",La.eligibilityOptions)},n.map(function(t,n){var i;return e.createElement("button",{key:n,className:c((i={},i[c("_3rue7",La.activeOption)]=n===a,i)),onClick:function(){return r(n)}},e.createElement("span",{className:"_2T78a"},Ua(t)))}))},Za=function(t){var n,a,r=t.installment,s=t.index;return e.createElement("div",{className:"_z2Uiv","data-testid":"installment-"+s},e.createElement("div",{className:"_2lJQy"},e.createElement("div",{className:c("_1Z9wr",(n={},n._2Nmkl=0===s,n))}),p(1e3*r.due_date)?e.createElement(i,{id:"installments.today",defaultMessage:"Aujourd'hui",tagName:"strong"}):e.createElement(o,{value:1e3*r.due_date,day:"numeric",month:"long",year:"numeric"})),e.createElement("div",{className:c((a={},a["_ezY-3"]=0===s,a))},e.createElement(l,{value:r.total_amount/100,style:"currency",currency:"EUR"})))},Wa=function(t){var n=t.currentPlan,a=n.installments_count>4;return e.createElement(e.Fragment,null,e.createElement("div",{className:c("_MPKjS",La.scheduleDetails),"data-testid":"modal-installments-element"},((null==n?void 0:n.payment_plan)||[]).map(function(t,n){return e.createElement(Za,{key:1e3*t.due_date,installment:t,index:n})}),a&&e.createElement("div",{className:"_3a7er"},e.createElement(i,{id:"credit-features.information",defaultMessage:"Un crédit vous engage et doit être remboursé. Vérifiez vos capacités de remboursement avant de vous engager."}))))},Ja=["color"],Ka=function(t){var n=t.color,a=void 0===n?"#FA5022":n,r=Ia(t,Ja);return e.createElement("svg",Object.assign({width:"50",height:"25",viewBox:"0 0 360 109",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),e.createElement("path",{d:"M333.24 28.3462V38.4459C327.504 31.1018 319.176 26.5132 309.288 26.5132C290.208 26.5132 275.424 43.5497 275.424 64.5757C275.424 85.6018 290.208 102.638 309.288 102.638C319.872 102.638 328.668 97.3908 334.416 89.1241V100.817H352.668V28.3462H333.24ZM314.028 84.4876C303.42 84.4876 294.828 75.574 294.828 64.5757C294.828 53.5775 303.42 44.6639 314.028 44.6639C324.636 44.6639 333.228 53.5775 333.228 64.5757C333.228 75.574 324.636 84.4876 314.028 84.4876ZM109.5 8.23073H128.916V100.805H109.5V8.23073ZM151.248 59.7356C151.248 39.8117 163.5 26.5252 180.468 26.5252C191.004 26.5252 199.332 31.1976 204.348 39.1648C209.376 31.1976 217.692 26.5252 228.228 26.5252C245.196 26.5252 257.448 39.8117 257.448 59.7356V100.817H238.032V57.639C238.032 49.8635 232.872 44.7957 226.044 44.7957C219.216 44.7957 214.056 49.8755 214.056 57.639V100.817H194.64V57.639C194.64 49.8635 189.48 44.7957 182.652 44.7957C175.824 44.7957 170.664 49.8755 170.664 57.639V100.817H151.248V59.7356ZM74.34 29.101C69.744 11.9088 60.0241 6.40967 50.772 6.40967C41.5201 6.40967 31.8 11.9088 27.204 29.101L7.24805 100.829H26.916C30.12 88.8485 39.996 82.1753 50.772 82.1753C61.548 82.1753 71.424 88.8605 74.6281 100.829H94.3081L74.34 29.101ZM50.772 65.4623C44.508 65.4623 38.8321 67.8345 34.6441 71.6803L45.924 29.9397C47.0041 25.9501 48.6001 24.6802 50.784 24.6802C52.9681 24.6802 54.5641 25.9501 55.6441 29.9397L66.912 71.6803C62.724 67.8345 57.036 65.4623 50.772 65.4623Z",fill:a}))},Xa=function(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"16",viewBox:"0 0 24 16"},e.createElement("defs",null,e.createElement("linearGradient",{id:"cardamex",x1:"10.914%",x2:"87.432%",y1:"86.279%",y2:"15.035%"},e.createElement("stop",{offset:"0%",stopColor:"#3FA9F5"}),e.createElement("stop",{offset:"100%",stopColor:"#0071BC"}))),e.createElement("g",{fill:"none",fillRule:"evenodd"},e.createElement("path",{fill:"url(#cardamex)",fillRule:"nonzero",d:"M22.559 16H1.379C.627 16 0 15.392 0 14.662V1.338C0 .608.627 0 1.379 0H22.62C23.373 0 24 .608 24 1.338v13.324c-.063.73-.627 1.338-1.441 1.338z"}),e.createElement("g",{fill:"#FFF"},e.createElement("path",{d:"M10.115 8.711L8.889 6.044H7.295v3.852L5.517 6.044H4.17l-1.778 4.03h1.103l.368-.889h2.023l.368.89h2.084V7.11l1.349 2.963h.92l1.348-2.904v2.904h.98v-4.03H11.28l-1.165 2.667zm-5.272-.474H4.23l.613-1.422v.06l.613 1.362h-.613z"}),e.createElement("path",{fillRule:"nonzero",d:"M19.372 7.94l.735-.77 1.042-1.185h-1.287L18.697 7.23l-1.164-1.245h-3.985v3.97h3.923l1.226-1.303 1.165 1.304h1.287L20.107 8.71l-.735-.77zM16.92 9.186h-2.33v-.77h2.268v-.77H14.59v-.712h2.33L18.084 8 16.92 9.185z"}))))},Ya=function(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"16",viewBox:"0 0 24 16"},e.createElement("g",{fill:"none",fillRule:"nonzero"},e.createElement("path",{fill:"#FCFCFC",d:"M22.684 16H1.38C.627 16 0 15.39 0 14.656V1.344C0 .61.627 0 1.379 0H22.62C23.373 0 24 .61 24 1.344v13.374c0 .671-.564 1.282-1.316 1.282z"})," ",e.createElement("path",{fill:"#005098",d:"M8.889 10.726l.948-5.393h1.482l-.949 5.393zM15.704 5.452a3.658 3.658 0 0 0-1.304-.237c-1.481 0-2.489.71-2.489 1.778 0 .77.711 1.185 1.304 1.481.592.237.77.415.77.652 0 .355-.474.533-.889.533-.592 0-.889-.059-1.363-.296l-.177-.06-.178 1.186c.355.178 1.007.296 1.659.296 1.54 0 2.548-.71 2.548-1.837 0-.592-.415-1.067-1.244-1.481-.534-.237-.83-.415-.83-.652 0-.237.237-.474.83-.474.474 0 .83.118 1.126.178l.118.059.119-1.126M19.496 5.333H18.37c-.355 0-.592.119-.77.474l-2.193 4.919h1.541s.237-.652.296-.83h1.897c.059.178.178.83.178.83h1.362l-1.185-5.393zM17.66 8.77l.593-1.481s.118-.296.178-.533l.118.474s.296 1.303.356 1.54h-1.245zM7.644 5.333L6.222 9.007l-.178-.77C5.748 7.348 4.92 6.459 4.03 5.985l1.303 4.682h1.541l2.311-5.393h-1.54"}),e.createElement("path",{fill:"#F6A500",d:"M4.919 5.333h-2.37v.119c1.836.474 3.08 1.54 3.555 2.844L5.57 5.807c-.118-.414-.355-.474-.651-.474"}),e.createElement("path",{fill:"#0A5296",d:"M23.937 3.23H0V1.316C0 .598.627 0 1.379 0H22.62C23.373 0 24 .598 24 1.316V3.23h-.063z"}),e.createElement("path",{fill:"#F4A428",d:"M.063 13H24v1.8c0 .655-.625 1.2-1.375 1.2H1.375C.625 16 0 15.455 0 14.8V13h.063z"})))},$a=function(){return e.createElement("svg",{width:"24px",height:"16px",viewBox:"0 0 24 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},e.createElement("g",{id:"Parcours-1C-B",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},e.createElement("g",{id:"mobile-1C-Paiement-V1",transform:"translate(-269.000000, -313.000000)"},e.createElement("g",{id:"mastercard",transform:"translate(269.000000, 313.000000)"},e.createElement("rect",{id:"Rectangle",fill:"#FFFFFF",x:"0",y:"0",width:"24",height:"16",rx:"1"}),e.createElement("g",{id:"Group-6",transform:"translate(4.000000, 3.000000)"},e.createElement("circle",{id:"Oval-4-Copy",fill:"#EA001B",cx:"5.05263158",cy:"5.05263158",r:"5.05263158"}),e.createElement("circle",{id:"Oval-4",fillOpacity:"0.25",fill:"#F79F1A",cx:"10.9473684",cy:"5.05263158",r:"5.05263158"}),e.createElement("circle",{id:"Oval-4-Copy-2",fillOpacity:"0.9",fill:"#F79F1A",cx:"10.9473684",cy:"5.05263158",r:"5.05263158"}),e.createElement("circle",{id:"Oval-4-Copy-3",fillOpacity:"0.3",fill:"#EA001B",cx:"5.05263158",cy:"5.05263158",r:"5.05263158"}))))))},Qa=function(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"16",viewBox:"0 0 24 16"},e.createElement("defs",null,e.createElement("linearGradient",{id:"cardcb",x1:"5.842%",x2:"95.393%",y1:"81.753%",y2:"17.344%"},e.createElement("stop",{offset:"0%",stopColor:"#39B54A"})," ",e.createElement("stop",{offset:"100%",stopColor:"#0A5296"}))),e.createElement("g",{fill:"none",fillRule:"nonzero"},e.createElement("path",{fill:"url(#cardcb)",d:"M22.621 16H1.38C.627 16 0 15.392 0 14.662V1.338C0 .608.627 0 1.379 0H22.62C23.373 0 24 .608 24 1.338v13.324c-.063.73-.627 1.338-1.379 1.338z"}),e.createElement("g",{fill:"#FFF"},e.createElement("path",{d:"M19.094 4.03h-6.437V8h6.498c1.165 0 2.084-.889 2.084-2.015-.06-1.066-.98-1.955-2.145-1.955zM19.094 8.593h-6.437v3.97h6.498c1.165 0 2.084-.889 2.084-2.015-.06-1.067-.98-1.955-2.145-1.955zM7.017 8.06h4.966c-.245-2.371-2.391-4.267-4.966-4.267-2.758 0-5.027 2.074-5.027 4.681s2.269 4.682 5.027 4.682c2.698 0 4.904-2.015 5.027-4.563H7.017v-.534z"}))))},er={cardContainer:"_1N3yO"},tr=function(t){var n=Array.from(new Set(t.cards));return e.createElement("div",{"data-testid":"card-logos",className:c(er.cardContainer,La.cardContainer)},n.map(function(t){return e.createElement("div",{key:t,className:er.card,"data-testid":"card-logo-"+t},"cb"===t&&e.createElement(Qa,null),"amex"===t&&e.createElement(Xa,null),"mastercard"===t&&e.createElement($a,null),"visa"===t&&e.createElement(Ya,null))}))},nr=function(t){var n=t.isCurrentPlanP1X;return e.createElement("div",{className:c("_180ro",La.info),"data-testid":"modal-info-element"},e.createElement("div",{className:"_1HqCO"},e.createElement("div",{className:c("_3B8wx",La.bullet)},"1"),e.createElement("div",{className:La.infoMessage},e.createElement(i,n?{id:"eligibility-modal.p1x-bullet-1",defaultMessage:"Choisissez <strong>Alma - Payer maintenant</strong> au moment du paiement.",values:{strong:function(){return e.createElement("strong",null,[].slice.call(arguments))}}}:{id:"eligibility-modal.bullet-1",defaultMessage:"Choisissez <strong>Alma</strong> au moment du paiement.",values:{strong:function(){return e.createElement("strong",null,[].slice.call(arguments))}}}))),e.createElement("div",{className:"_1HqCO"},e.createElement("div",{className:c("_3B8wx",La.bullet)},"2"),e.createElement("div",{className:La.infoMessage},e.createElement(i,n?{id:"eligibility-modal.p1x-bullet-2",defaultMessage:"Renseignez les informations de votre <strong>carte bancaire.</strong>",values:{strong:function(){return e.createElement("strong",null,[].slice.call(arguments))}}}:{id:"eligibility-modal.bullet-2",defaultMessage:"Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",values:{strong:function(){return e.createElement("strong",null,[].slice.call(arguments))}}}))),e.createElement("div",{className:"_1HqCO"},e.createElement("div",{className:c("_3B8wx",La.bullet)},"3"),e.createElement("div",{className:La.infoMessage},e.createElement(i,n?{id:"eligibility-modal.p1x-bullet-3",defaultMessage:"<strong>La validation </strong> de votre paiement est instantanée !",values:{strong:function(){return e.createElement("strong",null,[].slice.call(arguments))}}}:{id:"eligibility-modal.bullet-3",defaultMessage:"<strong>Gardez le contrôle</strong> en avançant ou reculant vos échéances à votre rythme.",values:{strong:function(){return e.createElement("strong",null,[].slice.call(arguments))}}}))))},ar=function(t){var n=t.isSomePlanDeferred,a=t.isCurrentPlanP1X;return e.createElement("div",{className:c("_3ERx-",La.title),"data-testid":"modal-title-element"},e.createElement(i,n?{id:"eligibility-modal.title-deferred-plan",defaultMessage:"Payez en plusieurs fois ou plus tard par carte bancaire avec Alma."}:a?{id:"eligibility-modal.title-pay-now",defaultMessage:"Payez comptant par carte bancaire avec Alma."}:{id:"eligibility-modal.title-normal",defaultMessage:"Payez en plusieurs fois par carte bancaire avec Alma."}))},rr=function(t){var n=t.children,a=t.isSomePlanDeferred,r=t.cards,i=t.isCurrentPlanP1X;return e.createElement("div",{className:c("_21g6u",La.desktopModal),"data-testid":"modal-container"},e.createElement("aside",{className:c(["_3zaP5","_2SBRC",La.leftSide])},e.createElement(ar,{isSomePlanDeferred:a,isCurrentPlanP1X:i}),e.createElement(nr,{isCurrentPlanP1X:i}),r&&e.createElement(tr,{cards:r}),e.createElement(Ka,{className:"_xW3wt",width:"75"})),e.createElement("div",{className:c("_3zaP5",La.rightSide)},n))},ir=function(t){var n=t.children,a=t.isSomePlanDeferred,r=t.cards,i=t.isCurrentPlanP1X;return e.createElement("div",{className:c("_2G7Ch",La.mobileModal),"data-testid":"modal-container"},e.createElement(ar,{isSomePlanDeferred:a,isCurrentPlanP1X:i}),n,e.createElement(nr,{isCurrentPlanP1X:i}),r&&e.createElement(tr,{cards:r}),e.createElement(Ka,{className:"_2779r",width:"75"}))},lr=function(n){var a=n.onClose,r=n.eligibilityPlans,l=n.status,o=n.cards,s=t(n.initialPlanIndex||0),u=s[0],c=s[1],m=f({minWidth:800})?rr:ir,d=r.filter(function(e){return e.eligible}),g=d[u],p=r.some(function(e){return e.deferred_days>0||e.deferred_months>0});return e.createElement(Va,{onClose:a,ariaHideApp:!1,scrollable:!0,isOpen:!0},e.createElement(m,{isSomePlanDeferred:p,cards:o,isCurrentPlanP1X:ba(g)},l===da.PENDING&&e.createElement("div",{className:"_2oTJq"},e.createElement(ka,null)),l===da.SUCCESS&&0===d.length&&e.createElement("div",{className:"_17qNJ"},e.createElement(i,{id:"eligibility-modal.no-eligibility",defaultMessage:"Oups, il semblerait que la simulation n'ait pas fonctionné."})),l===da.SUCCESS&&d.length>=1&&e.createElement(e.Fragment,null,e.createElement(qa,{eligibilityPlans:d,currentPlanIndex:u,setCurrentPlanIndex:c}),e.createElement("div",{className:"_2u9rj"},e.createElement("div",{className:"_VRdAU"}),e.createElement(Wa,{currentPlan:g}),e.createElement(Da,{currentPlan:g})))))},or=function(t){var n=t.onClose,a=t.cards,r=Na(t.purchaseAmount,t.apiData,t.configPlans,t.customerBillingCountry,t.customerShippingCountry);return e.createElement(lr,{initialPlanIndex:0,onClose:n,eligibilityPlans:r[0],status:r[1],cards:a})},sr=function(t){return e.createElement("div",{className:c("_2SwwZ",t.className),"data-testid":"loader"},e.createElement("div",{className:"_2qODo"}),e.createElement("div",{className:"_2YO01"}))},ur="alma-payment-plans",cr={container:ur+"-container",eligibilityLine:ur+"-eligibility-line",eligibilityOptions:ur+"-eligibility-options",notEligibleOption:ur+"-not-eligible-option",paymentInfo:ur+"-payment-info",activeOption:ur+"-active-option"},mr=function(a){var r,s,u,m,d=a.hideIfNotEligible,f=a.monochrome,p=a.suggestedPaymentPlan,y=a.cards,h=a.transitionDelay,v=a.hideBorder,b=void 0!==v&&v,E=a.onModalClose,A=Na(a.purchaseAmount,a.apiData,a.configPlans,a.customerBillingCountry,a.customerShippingCountry),w=A[0],C=A[1],P=w.filter(function(e){return e.eligible}),O=function(e){var t=e.suggestedPaymentPlan,n=e.eligibilityPlans,a=Array.isArray(t)?t:[t],r=function(e){var t=a[e],r=n.findIndex(function(e){return e.installments_count===t&&e.eligible&&!e.deferred_days&&!e.deferred_months});if(-1!==r)return{v:r}};for(var i in a){var l=r(i);if("object"==typeof l)return l.v}return 0}({eligibilityPlans:w,suggestedPaymentPlan:null!=p?p:0}),_=void 0!==p,x=void 0!==h,S=t(!1),M=S[0],I=S[1],j=w.reduce(function(e,t,n){return t.eligible?[].concat(e,[n]):e},[]),N=function(e,a){var r=t(0),i=r[0],l=r[1],o=t(!0),s=o[0],u=o[1];return n(function(){var t,n=!0;if(-1!==a)return 0!==e.length&&(!e.includes(i)&&s&&l(e[0]),t=setTimeout(function(){s&&n&&l(e[e.includes(i)?(e.indexOf(i)+1)%e.length:0])},a)),function(){n=!1,clearTimeout(t)}},[e,i]),{current:i,onHover:function(e){l(e),u(!1)},onLeave:function(){u(!0)}}}(j,x?null!=h?h:5500:_?36e5:5500),z=N.current,L=N.onHover,D=N.onLeave;return n(function(){C===da.SUCCESS&&_&&(L(O),D())},[C]),C===da.PENDING?e.createElement("div",{className:c("_TSkFv","_1ZDMS")},e.createElement(sr,null)):d&&0===P.length||0===w.length||C===da.FAILED?null:e.createElement(e.Fragment,null,e.createElement("div",{onClick:function(e){e.preventDefault(),P.length>0&&I(!0)},className:c("_TSkFv",(r={},r._UksZa=P.length>0,r["_1lr-q"]=0===P.length,r._3_qcn=b,r),cr.container),"data-testid":"widget-button"},e.createElement("div",{className:c("_bMClc",cr.eligibilityLine)},e.createElement(Ka,{className:"_LJ4nZ",color:f?"var(--off-black)":void 0}),e.createElement("div",{className:c("_17c_S",cr.eligibilityOptions)},w.map(function(t,n){var a,r=n===z;return e.createElement("div",{key:n,onMouseEnter:function(){return L(n)},onTouchStart:function(){return L(n)},onMouseOut:D,onTouchEnd:D,className:c("_2Kqjn",(a={},a[c("_3dG_J",cr.activeOption)]=r,a._2hx83=f&&r,a[c("_3O1bg",cr.notEligibleOption)]=!t.eligible,a))},Ua(t))}))),e.createElement("div",{className:c("_25GrF",(s={},s[c("_3O1bg",cr.notEligibleOption)]=w[z]&&!w[z].eligible,s),cr.paymentInfo)},0!==w.length&&function(t){var n=t.installments_count,a=t.minAmount,r=void 0===a?0:a,s=t.maxAmount,u=void 0===s?0:s,c=t.payment_plan,m=t.deferred_days+30*t.deferred_months;if(!t.eligible)return e.createElement(i,t.purchase_amount>u?{id:"payment-plan-strings.ineligible-greater-than-max",defaultMessage:"Jusqu'à {maxAmount}",values:{maxAmount:e.createElement(l,{value:ya(u),style:"currency",currency:"EUR"})}}:{id:"payment-plan-strings.ineligible-lower-than-min",defaultMessage:"À partir de {minAmount}",values:{minAmount:e.createElement(l,{value:ya(r),style:"currency",currency:"EUR"})}});if(!c)throw Error("No payment plan provided for payment in "+n+" installments. Please contact us if you see this error.");if(0!==m&&1===n)return e.createElement(e.Fragment,null,e.createElement(i,{id:"payment-plan-strings.deferred",defaultMessage:"{totalAmount} à payer le {dueDate}",values:{totalAmount:e.createElement(l,{value:ya(c[0].total_amount),style:"currency",currency:"EUR"}),dueDate:e.createElement(o,{value:g(c[0].due_date),day:"numeric",month:"long",year:"numeric"})}}),Ga(t));if(n>0){var d=null==c?void 0:c.every(function(e,t){return 0===t||e.total_amount===c[0].total_amount});return ba(t)?e.createElement(e.Fragment,null,e.createElement(i,{id:"payment-plan-strings.pay-now",defaultMessage:"Payer maintenant {totalAmount}",values:{totalAmount:e.createElement(l,{value:ya(c[0].total_amount),style:"currency",currency:"EUR"}),installmentsCount:n}}),Ga(t)):e.createElement(e.Fragment,null,e.createElement(i,d?{id:"payment-plan-strings.multiple-installments-same-amount",defaultMessage:"{installmentsCount} x {totalAmount}",values:{totalAmount:e.createElement(l,{value:ya(c[0].total_amount),style:"currency",currency:"EUR"}),installmentsCount:n}}:{id:"payment-plan-strings.multiple-installments",defaultMessage:"{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",values:{firstInstallmentAmount:e.createElement(l,{value:ya(c[0].total_amount),style:"currency",currency:"EUR"}),numberOfRemainingInstallments:n-1,othersInstallmentAmount:e.createElement(l,{value:ya(c[1].total_amount),style:"currency",currency:"EUR"})}}),Ga(t))}return e.createElement(i,{id:"payment-plan-strings.default-message",defaultMessage:"Payez en plusieurs fois avec Alma"})}(w[z]))),M&&e.createElement(lr,{initialPlanIndex:(u=z,m=j.findIndex(function(e){return e===u}),-1===m?0:m),onClose:function(e){I(!1),E&&E(e)},eligibilityPlans:P,status:C,cards:y}))},dr=function(){function t(e){this.apiData=e}return t.prototype.add=function(t,n){var a=this,r=document.querySelector(n.container);if(r&&s(r),t===ma.PaymentPlans){var i=n.container,l=n.hideBorder,o=n.monochrome,c=n.locale;r&&u(e.createElement(Sa,{locale:void 0===c?fa.en:c},e.createElement(mr,{apiData:this.apiData,configPlans:n.plans,hideIfNotEligible:n.hideIfNotEligible,monochrome:void 0===o||o,purchaseAmount:n.purchaseAmount,suggestedPaymentPlan:n.suggestedPaymentPlan,cards:n.cards,customerBillingCountry:n.customerBillingCountry,customerShippingCountry:n.customerShippingCountry,transitionDelay:n.transitionDelay,hideBorder:void 0!==l&&l,onModalClose:n.onModalClose})),document.querySelector(i))}if(t===ma.Modal){var m,d=n.container,f=n.clickableSelector,g=n.purchaseAmount,p=n.plans,y=n.locale,h=void 0===y?fa.en:y,v=n.customerBillingCountry,b=n.customerShippingCountry,E=n.cards,A=n.onClose,w=function(e){r&&(s(r),A&&A(e))},C=function(){u(e.createElement(Sa,{locale:h},e.createElement(or,{purchaseAmount:g,apiData:a.apiData,configPlans:p,customerBillingCountry:v,customerShippingCountry:b,onClose:w,cards:E})),document.querySelector(d))};return f&&(null==(m=document.querySelector(f))||m.addEventListener("click",C,!1)),{open:C,close:w}}},t}();!function(e){e.LIVE="https://api.getalma.eu",e.TEST="https://api.sandbox.getalma.eu"}(Ra||(Ra={})),function(e){e.initialize=function(e,t){return new dr({domain:t,merchantId:e})},e.PaymentPlans=ma.PaymentPlans,e.Modal=ma.Modal}(Fa||(Fa={})),function(e){e.priceToCents=pa,e.priceFromCents=ya,e.formatCents=ha}(Ba||(Ba={}));export{Ra as ApiMode,Ba as Utils,Fa as Widgets};
1
+ import e,{useState as t,useEffect as n}from"react";import{IntlProvider as a,useIntl as r,FormattedMessage as i,FormattedNumber as l,FormattedDate as o}from"react-intl";import{unmountComponentAtNode as s,render as u}from"react-dom";import c from"classnames";import m from"react-modal";import d from"no-scroll";import{useMediaQuery as f}from"react-responsive";import{secondsToMilliseconds as g,isToday as p}from"date-fns";var y=function(e){try{return!!e()}catch(e){return!0}},h=!y(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),v=Function.prototype,b=v.call,E=h&&v.bind.bind(b,b),A=h?function(e){return e&&E(e)}:function(e){return e&&function(){return b.apply(e,arguments)}},C=Math.ceil,w=Math.floor,P=Math.trunc||function(e){var t=+e;return(t>0?w:C)(t)},O=function(e){var t=+e;return t!=t||0===t?0:P(t)},_="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function x(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}var S,M,I=function(e){return e&&e.Math==Math&&e},j=I("object"==typeof globalThis&&globalThis)||I("object"==typeof window&&window)||I("object"==typeof self&&self)||I("object"==typeof _&&_)||function(){return this}()||Function("return this")(),N=Object.defineProperty,z=function(e,t){try{N(j,e,{value:t,configurable:!0,writable:!0})}catch(n){j[e]=t}return t},L=j["__core-js_shared__"]||z("__core-js_shared__",{}),D=x(function(e){(e.exports=function(e,t){return L[e]||(L[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.22.8",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.8/LICENSE",source:"https://github.com/zloirock/core-js"})}),k=TypeError,T=function(e){if(null==e)throw k("Can't call method on "+e);return e},R=Object,F=function(e){return R(T(e))},B=A({}.hasOwnProperty),H=Object.hasOwn||function(e,t){return B(F(e),t)},U=0,V=Math.random(),G=A(1..toString),q=function(e){return"Symbol("+(void 0===e?"":e)+")_"+G(++U+V,36)},Z=function(e){return"function"==typeof e},W=function(e){return Z(e)?e:void 0},J=function(e,t){return arguments.length<2?W(j[e]):j[e]&&j[e][t]},K=J("navigator","userAgent")||"",X=j.process,Y=j.Deno,$=X&&X.versions||Y&&Y.version,Q=$&&$.v8;Q&&(M=(S=Q.split("."))[0]>0&&S[0]<4?1:+(S[0]+S[1])),!M&&K&&(!(S=K.match(/Edge\/(\d+)/))||S[1]>=74)&&(S=K.match(/Chrome\/(\d+)/))&&(M=+S[1]);var ee=M,te=!!Object.getOwnPropertySymbols&&!y(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ee&&ee<41}),ne=te&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ae=D("wks"),re=j.Symbol,ie=re&&re.for,le=ne?re:re&&re.withoutSetter||q,oe=function(e){if(!H(ae,e)||!te&&"string"!=typeof ae[e]){var t="Symbol."+e;ae[e]=te&&H(re,e)?re[e]:ne&&ie?ie(t):le(t)}return ae[e]},se={};se[oe("toStringTag")]="z";var ue="[object z]"===String(se),ce=A({}.toString),me=A("".slice),de=function(e){return me(ce(e),8,-1)},fe=oe("toStringTag"),ge=Object,pe="Arguments"==de(function(){return arguments}()),ye=ue?de:function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=ge(e),fe))?n:pe?de(t):"Object"==(a=de(t))&&Z(t.callee)?"Arguments":a},he=String,ve=function(e){if("Symbol"===ye(e))throw TypeError("Cannot convert a Symbol value to a string");return he(e)},be=A("".charAt),Ee=A("".charCodeAt),Ae=A("".slice),Ce=function(e){return function(t,n){var a,r,i=ve(T(t)),l=O(n),o=i.length;return l<0||l>=o?e?"":void 0:(a=Ee(i,l))<55296||a>56319||l+1===o||(r=Ee(i,l+1))<56320||r>57343?e?be(i,l):a:e?Ae(i,l,l+2):r-56320+(a-55296<<10)+65536}},we={codeAt:Ce(!1),charAt:Ce(!0)},Pe=A(Function.toString);Z(L.inspectSource)||(L.inspectSource=function(e){return Pe(e)});var Oe,_e,xe,Se=L.inspectSource,Me=j.WeakMap,Ie=Z(Me)&&/native code/.test(Se(Me)),je=function(e){return"object"==typeof e?null!==e:Z(e)},Ne=!y(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),ze=j.document,Le=je(ze)&&je(ze.createElement),De=function(e){return Le?ze.createElement(e):{}},ke=!Ne&&!y(function(){return 7!=Object.defineProperty(De("div"),"a",{get:function(){return 7}}).a}),Te=Ne&&y(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Re=String,Fe=TypeError,Be=function(e){if(je(e))return e;throw Fe(Re(e)+" is not an object")},He=Function.prototype.call,Ue=h?He.bind(He):function(){return He.apply(He,arguments)},Ve=A({}.isPrototypeOf),Ge=Object,qe=ne?function(e){return"symbol"==typeof e}:function(e){var t=J("Symbol");return Z(t)&&Ve(t.prototype,Ge(e))},Ze=String,We=function(e){try{return Ze(e)}catch(e){return"Object"}},Je=TypeError,Ke=function(e){if(Z(e))return e;throw Je(We(e)+" is not a function")},Xe=function(e,t){var n=e[t];return null==n?void 0:Ke(n)},Ye=TypeError,$e=TypeError,Qe=oe("toPrimitive"),et=function(e){var t=function(e,t){if(!je(e)||qe(e))return e;var n,a=Xe(e,Qe);if(a){if(void 0===t&&(t="default"),n=Ue(a,e,t),!je(n)||qe(n))return n;throw $e("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var n,a;if("string"===t&&Z(n=e.toString)&&!je(a=Ue(n,e)))return a;if(Z(n=e.valueOf)&&!je(a=Ue(n,e)))return a;if("string"!==t&&Z(n=e.toString)&&!je(a=Ue(n,e)))return a;throw Ye("Can't convert object to primitive value")}(e,t)}(e,"string");return qe(t)?t:t+""},tt=TypeError,nt=Object.defineProperty,at=Object.getOwnPropertyDescriptor,rt={f:Ne?Te?function(e,t,n){if(Be(e),t=et(t),Be(n),"function"==typeof e&&"prototype"===t&&"value"in n&&"writable"in n&&!n.writable){var a=at(e,t);a&&a.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:a.configurable,enumerable:"enumerable"in n?n.enumerable:a.enumerable,writable:!1})}return nt(e,t,n)}:nt:function(e,t,n){if(Be(e),t=et(t),Be(n),ke)try{return nt(e,t,n)}catch(e){}if("get"in n||"set"in n)throw tt("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},it=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},lt=Ne?function(e,t,n){return rt.f(e,t,it(1,n))}:function(e,t,n){return e[t]=n,e},ot=D("keys"),st=function(e){return ot[e]||(ot[e]=q(e))},ut={},ct=j.TypeError;if(Ie||L.state){var mt=L.state||(L.state=new(0,j.WeakMap)),dt=A(mt.get),ft=A(mt.has),gt=A(mt.set);Oe=function(e,t){if(ft(mt,e))throw new ct("Object already initialized");return t.facade=e,gt(mt,e,t),t},_e=function(e){return dt(mt,e)||{}},xe=function(e){return ft(mt,e)}}else{var pt=st("state");ut[pt]=!0,Oe=function(e,t){if(H(e,pt))throw new ct("Object already initialized");return t.facade=e,lt(e,pt,t),t},_e=function(e){return H(e,pt)?e[pt]:{}},xe=function(e){return H(e,pt)}}var yt,ht={set:Oe,get:_e,has:xe,enforce:function(e){return xe(e)?_e(e):Oe(e,{})},getterFor:function(e){return function(t){var n;if(!je(t)||(n=_e(t)).type!==e)throw ct("Incompatible receiver, "+e+" required");return n}}},vt={}.propertyIsEnumerable,bt=Object.getOwnPropertyDescriptor,Et={f:bt&&!vt.call({1:2},1)?function(e){var t=bt(this,e);return!!t&&t.enumerable}:vt},At=Object,Ct=A("".split),wt=y(function(){return!At("z").propertyIsEnumerable(0)})?function(e){return"String"==de(e)?Ct(e,""):At(e)}:At,Pt=function(e){return wt(T(e))},Ot=Object.getOwnPropertyDescriptor,_t={f:Ne?Ot:function(e,t){if(e=Pt(e),t=et(t),ke)try{return Ot(e,t)}catch(e){}if(H(e,t))return it(!Ue(Et.f,e,t),e[t])}},xt=Function.prototype,St=Ne&&Object.getOwnPropertyDescriptor,Mt=H(xt,"name"),It={EXISTS:Mt,PROPER:Mt&&"something"===function(){}.name,CONFIGURABLE:Mt&&(!Ne||Ne&&St(xt,"name").configurable)},jt=x(function(e){var t=It.CONFIGURABLE,n=ht.enforce,a=ht.get,r=Object.defineProperty,i=Ne&&!y(function(){return 8!==r(function(){},"length",{value:8}).length}),l=String(String).split("String"),o=e.exports=function(e,a,o){"Symbol("===String(a).slice(0,7)&&(a="["+String(a).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),o&&o.getter&&(a="get "+a),o&&o.setter&&(a="set "+a),(!H(e,"name")||t&&e.name!==a)&&r(e,"name",{value:a,configurable:!0}),i&&o&&H(o,"arity")&&e.length!==o.arity&&r(e,"length",{value:o.arity});try{o&&H(o,"constructor")&&o.constructor?Ne&&r(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var s=n(e);return H(s,"source")||(s.source=l.join("string"==typeof a?a:"")),e};Function.prototype.toString=o(function(){return Z(this)&&a(this).source||Se(this)},"toString")}),Nt=function(e,t,n,a){a||(a={});var r=a.enumerable,i=void 0!==a.name?a.name:t;return Z(n)&&jt(n,i,a),a.global?r?e[t]=n:z(t,n):(a.unsafe?e[t]&&(r=!0):delete e[t],r?e[t]=n:lt(e,t,n)),e},zt=Math.max,Lt=Math.min,Dt=Math.min,kt=function(e){return(t=e.length)>0?Dt(O(t),9007199254740991):0;var t},Tt=function(e){return function(t,n,a){var r,i=Pt(t),l=kt(i),o=function(e,t){var n=O(e);return n<0?zt(n+t,0):Lt(n,t)}(a,l);if(e&&n!=n){for(;l>o;)if((r=i[o++])!=r)return!0}else for(;l>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},Rt=(Tt(!0),Tt(!1)),Ft=A([].push),Bt=function(e,t){var n,a=Pt(e),r=0,i=[];for(n in a)!H(ut,n)&&H(a,n)&&Ft(i,n);for(;t.length>r;)H(a,n=t[r++])&&(~Rt(i,n)||Ft(i,n));return i},Ht=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ut=Ht.concat("length","prototype"),Vt={f:Object.getOwnPropertyNames||function(e){return Bt(e,Ut)}},Gt={f:Object.getOwnPropertySymbols},qt=A([].concat),Zt=J("Reflect","ownKeys")||function(e){var t=Vt.f(Be(e)),n=Gt.f;return n?qt(t,n(e)):t},Wt=function(e,t,n){for(var a=Zt(t),r=rt.f,i=_t.f,l=0;l<a.length;l++){var o=a[l];H(e,o)||n&&H(n,o)||r(e,o,i(t,o))}},Jt=/#|\.prototype\./,Kt=function(e,t){var n=Yt[Xt(e)];return n==Qt||n!=$t&&(Z(t)?y(t):!!t)},Xt=Kt.normalize=function(e){return String(e).replace(Jt,".").toLowerCase()},Yt=Kt.data={},$t=Kt.NATIVE="N",Qt=Kt.POLYFILL="P",en=Kt,tn=_t.f,nn=function(e,t){var n,a,r,i,l,o=e.target,s=e.global,u=e.stat;if(n=s?j:u?j[o]||z(o,{}):(j[o]||{}).prototype)for(a in t){if(i=t[a],r=e.dontCallGetSet?(l=tn(n,a))&&l.value:n[a],!en(s?a:o+(u?".":"#")+a,e.forced)&&void 0!==r){if(typeof i==typeof r)continue;Wt(i,r)}(e.sham||r&&r.sham)&&lt(i,"sham",!0),Nt(n,a,i,e)}},an=Object.keys||function(e){return Bt(e,Ht)},rn={f:Ne&&!Te?Object.defineProperties:function(e,t){Be(e);for(var n,a=Pt(t),r=an(t),i=r.length,l=0;i>l;)rt.f(e,n=r[l++],a[n]);return e}},ln=J("document","documentElement"),on=st("IE_PROTO"),sn=function(){},un=function(e){return"<script>"+e+"<\/script>"},cn=function(e){e.write(un("")),e.close();var t=e.parentWindow.Object;return e=null,t},mn=function(){try{yt=new ActiveXObject("htmlfile")}catch(e){}var e,t;mn="undefined"!=typeof document?document.domain&&yt?cn(yt):((t=De("iframe")).style.display="none",ln.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(un("document.F=Object")),e.close(),e.F):cn(yt);for(var n=Ht.length;n--;)delete mn.prototype[Ht[n]];return mn()};ut[on]=!0;var dn,fn,gn,pn=Object.create||function(e,t){var n;return null!==e?(sn.prototype=Be(e),n=new sn,sn.prototype=null,n[on]=e):n=mn(),void 0===t?n:rn.f(n,t)},yn=!y(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hn=st("IE_PROTO"),vn=Object,bn=vn.prototype,En=yn?vn.getPrototypeOf:function(e){var t=F(e);if(H(t,hn))return t[hn];var n=t.constructor;return Z(n)&&t instanceof n?n.prototype:t instanceof vn?bn:null},An=oe("iterator"),Cn=!1;[].keys&&("next"in(gn=[].keys())?(fn=En(En(gn)))!==Object.prototype&&(dn=fn):Cn=!0),(null==dn||y(function(){var e={};return dn[An].call(e)!==e}))&&(dn={}),Z(dn[An])||Nt(dn,An,function(){return this});var wn={IteratorPrototype:dn,BUGGY_SAFARI_ITERATORS:Cn},Pn=rt.f,On=oe("toStringTag"),_n=function(e,t,n){e&&!n&&(e=e.prototype),e&&!H(e,On)&&Pn(e,On,{configurable:!0,value:t})},xn={},Sn=wn.IteratorPrototype,Mn=function(){return this},In=String,jn=TypeError,Nn=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=A(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,a){return Be(n),function(e){if("object"==typeof e||Z(e))return e;throw jn("Can't set "+In(e)+" as a prototype")}(a),t?e(n,a):n.__proto__=a,n}}():void 0),zn=wn.IteratorPrototype,Ln=wn.BUGGY_SAFARI_ITERATORS,Dn=oe("iterator"),kn=function(){return this},Tn=we.charAt,Rn=ht.set,Fn=ht.getterFor("String Iterator");!function(e,t,n,a,r,i,l){!function(e,t,n,a){e.prototype=pn(Sn,{next:it(1,function(){var e,t=Fn(this),n=t.string,a=t.index;return a>=n.length?{value:void 0,done:!0}:(e=Tn(n,a),t.index+=e.length,{value:e,done:!1})})}),_n(e,"String Iterator",!1),xn["String Iterator"]=Mn}(n);var o,s,u,c=function(e){if(void 0===e&&f)return f;if(!Ln&&e in m)return m[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},m=e.prototype,d=m[Dn]||m["@@iterator"]||void 0,f=!Ln&&d||c(void 0);if(void(d&&(o=En(d.call(new e)))!==Object.prototype&&o.next&&(En(o)!==zn&&(Nn?Nn(o,zn):Z(o[Dn])||Nt(o,Dn,kn)),_n(o,"String Iterator",!0))))if(void(s={values:c("values"),keys:c("keys"),entries:c("entries")}))for(u in s)(Ln||!(u in m))&&Nt(m,u,s[u]);else nn({target:"String",proto:!0,forced:Ln||!1},s);m[Dn]!==f&&Nt(m,Dn,f,{name:void 0}),xn.String=f}(String,0,function(e){Rn(this,{type:"String Iterator",string:ve(e),index:0})});var Bn=A(A.bind),Hn=function(e,t){return Ke(e),void 0===t?e:h?Bn(e,t):function(){return e.apply(t,arguments)}},Un=function(e,t,n,a){try{return a?t(Be(n)[0],n[1]):t(n)}catch(t){!function(e,t,n){var a;Be(e);try{if(!(a=Xe(e,"return")))throw n;a=Ue(a,e)}catch(e){a=e}throw n}(e,0,t)}},Vn=oe("iterator"),Gn=Array.prototype,qn=function(e){return void 0!==e&&(xn.Array===e||Gn[Vn]===e)},Zn=function(){},Wn=[],Jn=J("Reflect","construct"),Kn=/^\s*(?:class|function)\b/,Xn=A(Kn.exec),Yn=!Kn.exec(Zn),$n=function(e){if(!Z(e))return!1;try{return Jn(Zn,Wn,e),!0}catch(e){return!1}},Qn=function(e){if(!Z(e))return!1;switch(ye(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Yn||!!Xn(Kn,Se(e))}catch(e){return!0}};Qn.sham=!0;var ea=!Jn||y(function(){var e;return $n($n.call)||!$n(Object)||!$n(function(){e=!0})||e})?Qn:$n,ta=function(e,t,n){var a=et(t);a in e?rt.f(e,a,it(0,n)):e[a]=n},na=oe("iterator"),aa=function(e){if(null!=e)return Xe(e,na)||Xe(e,"@@iterator")||xn[ye(e)]},ra=TypeError,ia=function(e,t){var n=arguments.length<2?aa(e):t;if(Ke(n))return Be(Ue(n,e));throw ra(We(e)+" is not iterable")},la=Array,oa=oe("iterator"),sa=!1;try{var ua=0,ca={next:function(){return{done:!!ua++}},return:function(){sa=!0}};ca[oa]=function(){return this},Array.from(ca,function(){throw 2})}catch(e){}var ma,da,fa,ga=!function(e,t){if(!sa)return!1;var n=!1;try{var a={};a[oa]=function(){return{next:function(){return{done:n=!0}}}},Array.from(a)}catch(e){}return n}();function pa(e){return Math.round(100*e)}function ya(e){return Number((e/100).toFixed(2))}function ha(e){return String(ya(e)).replace(".",",")}nn({target:"Array",stat:!0,forced:ga},{from:function(e){var t=F(e),n=ea(this),a=arguments.length,r=a>1?arguments[1]:void 0,i=void 0!==r;i&&(r=Hn(r,a>2?arguments[2]:void 0));var l,o,s,u,c,m,d=aa(t),f=0;if(!d||this===la&&qn(d))for(l=kt(t),o=n?new this(l):la(l);l>f;f++)m=i?r(t[f],f):t[f],ta(o,f,m);else for(c=(u=ia(t,d)).next,o=n?new this:[];!(s=Ue(c,u)).done;f++)m=i?Un(u,r,[s.value,f],!0):s.value,ta(o,f,m);return o.length=f,o}}),function(e){e.PaymentPlans="PaymentPlans",e.Modal="Modal"}(ma||(ma={})),function(e){e.PENDING="pending",e.SUCCESS="success",e.FAILED="failed"}(da||(da={})),function(e){e.en="en",e["fr-FR"]="fr-FR",e.fr="fr",e["de-DE"]="de-DE",e.de="de",e.it="it",e["it-IT"]="it-IT",e.es="es",e["es-ES"]="es-ES",e.pt="pt",e["pt-PT"]="pt-PT",e.nl="nl",e["nl-NL"]="nl-NL",e["nl-BE"]="nl-BE"}(fa||(fa={}));var va,ba=function(e){return 1===(null==e?void 0:e.installments_count)&&0===(null==e?void 0:e.deferred_days)&&0===(null==e?void 0:e.deferred_months)};"function"!=typeof(va=window.Element.prototype).matches&&(va.matches=va.msMatchesSelector||va.mozMatchesSelector||va.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=0;t[n]&&t[n]!==this;)++n;return Boolean(t[n])}),"function"!=typeof va.closest&&(va.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null}),"".trim||(String.prototype.trim=function(){return this.replace(/^[\s]+|[\s]+$/g,"")}),function(e){e.DOMException||((DOMException=function(e){this.message=e}).prototype=new Error);var t,n,a=/[\11\12\14\15\40]/,r=0,i=function(e,t){if(""===t)throw new DOMException("Failed to execute '"+e+"' on 'DOMTokenList': The token provided must not be empty.");if(-1!==(r=t.search(a)))throw new DOMException("Failed to execute '"+e+"' on 'DOMTokenList': The token provided ('"+t[r]+"') contains HTML space characters, which are not valid in tokens.")};"function"!=typeof DOMTokenList&&function(e){var t=e.document,n=e.Object,r=n.prototype.hasOwnProperty,l=n.defineProperty,o=0,s=0,u=function(){if(!o)throw TypeError("Illegal constructor")};function c(){var t=e.event,n=t.propertyName;if(!s&&("className"===n||"classList"===n&&!l)){var r=t.srcElement,i=r[" uCLp"],o=""+r[n],u=o.trim().split(a),c=r["classList"===n?" uCL":"classList"],m=i.length;e:for(var d=0,f=i.length=u.length,g=0;d!==f;++d){for(var p=0;p!==d;++p)if(u[p]===u[d]){g++;continue e}c[d-g]=u[d]}for(var y=f-g;y<m;++y)delete c[y];if("classList"!==n)return;s=1,r.classList=c,r.className=o,s=0,c.length=u.length-g}}function m(e){if(!e||!("innerHTML"in e))throw TypeError("Illegal invocation");e.detachEvent("onpropertychange",c),o=1;try{var t=function(){};t.prototype=new u}finally{o=0}var n=t.prototype,r=new t;e:for(var i=e.className.trim().split(a),m=0,d=i.length,f=0;m!==d;++m){for(var g=0;g!==m;++g)if(i[g]===i[m]){f++;continue e}this[m-f]=i[m]}n.length=d-f,n.value=e.className,n[" uCL"]=e,l?(l(e,"classList",{enumerable:1,get:function(){return r},configurable:0,set:function(t){s=1,e.className=n.value=t+="",s=0;var i=t.trim().split(a),l=n.length;e:for(var o=0,u=n.length=i.length,c=0;o!==u;++o){for(var m=0;m!==o;++m)if(i[m]===i[o]){c++;continue e}r[o-c]=i[o]}for(var d=u-c;d<l;++d)delete r[d]}}),l(e," uCLp",{enumerable:0,configurable:0,writeable:0,value:t.prototype}),l(n," uCL",{enumerable:0,configurable:0,writeable:0,value:e})):(e.classList=r,e[" uCL"]=r,e[" uCLp"]=t.prototype),e.attachEvent("onpropertychange",c)}u.prototype.toString=u.prototype.toLocaleString=function(){return this.value},u.prototype.add=function(){e:for(var e=0,t=arguments.length,n="",a=this[" uCL"],r=a[" uCLp"];e!==t;++e){i("add",n=arguments[e]+"");for(var l=0,o=r.length,u=n;l!==o;++l){if(this[l]===n)continue e;u+=" "+this[l]}this[o]=n,r.length+=1,r.value=u}s=1,a.className=r.value,s=0},u.prototype.remove=function(){for(var e=0,t=arguments.length,n="",a=this[" uCL"],r=a[" uCLp"];e!==t;++e){i("remove",n=arguments[e]+"");for(var l=0,o=r.length,u="",c=0;l!==o;++l)c?this[l-1]=this[l]:this[l]!==n?u+=this[l]+" ":c=1;c&&(delete this[o],r.length-=1,r.value=u)}s=1,a.className=r.value,s=0},e.DOMTokenList=u;try{e.Object.defineProperty(e.Element.prototype,"classList",{enumerable:1,get:function(e){return r.call(this,"classList")||m(this),this.classList},configurable:0,set:function(e){this.className=e}})}catch(n){e[" uCL"]=m,t.documentElement.firstChild.appendChild(t.createElement("style")).styleSheet.cssText='_*{x-uCLp:expression(!this.hasOwnProperty("classList")&&window[" uCL"](this))}[class]{x-uCLp/**/:expression(!this.hasOwnProperty("classList")&&window[" uCL"](this))}'}}(e),t=e.DOMTokenList.prototype,n=e.document.createElement("div").classList,t.item||(t.item=function(e){return void 0===(t=this[e])?null:t;var t}),t.toggle&&!1===n.toggle("a",0)||(t.toggle=function(e){if(arguments.length>1)return this[arguments[1]?"add":"remove"](e),!!arguments[1];var t=this.value;return this.remove(t),t===this.value&&(this.add(e),!0)}),t.replace&&"boolean"==typeof n.replace("a","b")||(t.replace=function(e,t){i("replace",e),i("replace",t);var n=this.value;return this.remove(e),this.value!==n&&(this.add(t),!0)}),t.contains||(t.contains=function(e){for(var t=0,n=this.length;t!==n;++t)if(this[t]===e)return!0;return!1}),t.forEach||(t.forEach=function(e){if(1===arguments.length)for(var t=0,n=this.length;t!==n;++t)e(this[t],t,this);else{t=0,n=this.length;for(var a=arguments[1];t!==n;++t)e.call(a,this[t],t,this)}}),t.entries||(t.entries=function(){var e=this;return{next:function(){return 0<e.length?{value:[0,e[0]],done:!1}:{done:!0}}}}),t.values||(t.values=function(){var e=this;return{next:function(){return 0<e.length?{value:e[0],done:!1}:{done:!0}}}}),t.keys||(t.keys=function(){var e=this;return{next:function(){return 0<e.length?{value:0,done:!1}:{done:!0}}}})}(window);var Ea={"credit-features.credit-cost-display":"{creditCost} (APR {taegPercentage})","credit-features.information":"Ein Kredit verpflichtet Sie und muss zurückgezahlt werden. Prüfen Sie Ihre Rückzahlungsfähigkeit, bevor Sie sich verpflichten.","credit-features.total-credit-cost":"Davon Kreditkosten","eligibility-modal.bullet-1":"Wählen Sie <strong>Alma</strong> beim Check-out. ","eligibility-modal.bullet-2":"Lassen Sie sich führen und bestätigen Sie Ihre Zahlung in <strong>2 Minuten.</strong>","eligibility-modal.bullet-3":"<strong>Behalten Sie die Kontrolle</strong> , indem Sie Ihre Fälligkeitstermine in Ihrem eigenen Tempo vor- oder zurückverlegen.","eligibility-modal.no-eligibility":"Ups, die Prüfung hat anscheinend nicht funktioniert.","eligibility-modal.p1x-bullet-1":"Wählen Sie <strong>Alma - Jetzt bezahlen</strong> zum Zeitpunkt der Zahlung.","eligibility-modal.p1x-bullet-2":"Tragen Sie Ihre <strong>Kreditkarteninformationen ein.</strong>","eligibility-modal.p1x-bullet-3":"<strong> Die Bestätigung </strong> Ihrer Zahlung erfolgt sofort !","eligibility-modal.title-deferred-plan":"Zahlen Sie mit Alma in Raten oder später.","eligibility-modal.title-normal":"Zahlen Sie mit Alma in mehreren Raten.","eligibility-modal.title-pay-now":"Bezahlen Sie auf einmal mit Alma per Kreditkarte.","installments.today":"Heute","installments.total-amount":"Gesamtsumme","installments.total-fees":"Davon Kosten","payment-plan-strings.day-abbreviation":"T{deferredDays}","payment-plan-strings.default-message":"Bezahlen Sie zinsfrei in mehreren Raten mit Alma.","payment-plan-strings.deferred":"{totalAmount} zu zahlen am {dueDate}","payment-plan-strings.ineligible-greater-than-max":"Bis zu {maxAmount}","payment-plan-strings.ineligible-lower-than-min":"Ab {minAmount}","payment-plan-strings.month-abbreviation":"M{deferredMonths}","payment-plan-strings.multiple-installments":"{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}}}","payment-plan-strings.multiple-installments-same-amount":"{installmentsCount} x {totalAmount}","payment-plan-strings.no-fee":"(0% Finanzierung)","payment-plan-strings.pay-now":"Zahlen Sie jetzt {totalAmount}","payment-plan-strings.pay.now.button":"Jetzt bezahlen"},Aa={"credit-features.credit-cost-display":"{creditCost} (APR {taegPercentage})","credit-features.information":"A loan commits you and must be repaid. Check your ability to repay before committing yourself.","credit-features.total-credit-cost":"Of which cost of credit","eligibility-modal.bullet-1":"Choose <strong>Alma</strong> at checkout.","eligibility-modal.bullet-2":"Let us guide you and validate your payment in <strong>2 minutes.</strong>","eligibility-modal.bullet-3":"<strong>Stay in control</strong> by advancing or postponing your deadlines at your own pace.","eligibility-modal.no-eligibility":"Oops, looks like the simulation didn't work.","eligibility-modal.p1x-bullet-1":"Choose <strong>Alma - Pay now</strong> at checkout.","eligibility-modal.p1x-bullet-2":"Enter your <strong>credit card details.</strong>","eligibility-modal.p1x-bullet-3":"<strong>Your payment is instantly validated at </strong> !","eligibility-modal.title-deferred-plan":"Pay in installments or later by credit card with Alma.","eligibility-modal.title-normal":"Pay in installments by credit card with Alma.","eligibility-modal.title-pay-now":"Pay cash by credit card with Alma.","installments.today":"Today","installments.total-amount":"Total","installments.total-fees":"Of which costs (incl. VAT)","payment-plan-strings.day-abbreviation":"D{deferredDays}","payment-plan-strings.default-message":"Pay in installments with Alma","payment-plan-strings.deferred":"{totalAmount} to pay the {dueDate}","payment-plan-strings.ineligible-greater-than-max":"Until {maxAmount}","payment-plan-strings.ineligible-lower-than-min":"From {minAmount}","payment-plan-strings.month-abbreviation":"M{deferredMonths}","payment-plan-strings.multiple-installments":"{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}}}","payment-plan-strings.multiple-installments-same-amount":"{installmentsCount} x {totalAmount}","payment-plan-strings.no-fee":"(free of charge)","payment-plan-strings.pay-now":"Pay now {totalAmount}","payment-plan-strings.pay.now.button":"Pay now"},Ca={"credit-features.credit-cost-display":"{creditCost} (TAE {taegPercentage})","credit-features.information":"Un préstamo te compromete y debe ser devuelto. Comprueba tu capacidad financiera antes de comprometerte.","credit-features.total-credit-cost":"Coste de crédito (incl. en el total)","eligibility-modal.bullet-1":"Elige <strong>Alma</strong> como método de pago.","eligibility-modal.bullet-2":"Déjate guiar y válida tu pago en <strong>2 minutos.</strong>","eligibility-modal.bullet-3":"<strong>Mantén el control</strong> adelantando o aplazando los plazos a su propio ritmo.","eligibility-modal.no-eligibility":"Uy, parece que la simulación no ha funcionado.","eligibility-modal.p1x-bullet-1":"Elije <strong>Alma - Pagar ahora</strong> al momento de la compra.","eligibility-modal.p1x-bullet-2":"Introduce los datos de tu tarjeta bancaria en <strong>.</strong>","eligibility-modal.p1x-bullet-3":"<strong>¡La validación </strong> de tu pago es instantánea!","eligibility-modal.title-deferred-plan":"Paga a plazos o posteriormente con tarjeta bancaria con Alma.","eligibility-modal.title-normal":"Pagar a plazos con tarjeta bancaria con Alma.","eligibility-modal.title-pay-now":"Paga de contado con tu tarjeta bancaria a través de alma.","installments.today":"Hoy","installments.total-amount":"Total","installments.total-fees":"De los cuales, costes (IVA incluido)","payment-plan-strings.day-abbreviation":"D{deferredDays}","payment-plan-strings.default-message":"Pagar a plazos con Alma","payment-plan-strings.deferred":"{totalAmount} a pagar el {dueDate}","payment-plan-strings.ineligible-greater-than-max":"Hasta {maxAmount}","payment-plan-strings.ineligible-lower-than-min":"Desde {minAmount}","payment-plan-strings.month-abbreviation":"M{deferredMonths}","payment-plan-strings.multiple-installments":"{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} mensualidad de {othersInstallmentAmount}} other {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} mensualidades de {othersInstallmentAmount}}}","payment-plan-strings.multiple-installments-same-amount":"{installmentsCount} plazos de {totalAmount}","payment-plan-strings.no-fee":"(sin intereses)","payment-plan-strings.pay-now":"Pague ahora {totalAmount}","payment-plan-strings.pay.now.button":"Pagar ahora"},wa={"credit-features.credit-cost-display":"{creditCost} (TAEG {taegPercentage})","credit-features.information":"Un crédit vous engage et doit être remboursé. Vérifiez vos capacités de remboursement avant de vous engager.","credit-features.total-credit-cost":"Dont coût du crédit","eligibility-modal.bullet-1":"Choisissez <strong>Alma</strong> au moment du paiement.","eligibility-modal.bullet-2":"Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>","eligibility-modal.bullet-3":"<strong>Gardez le contrôle</strong> en avançant ou reculant vos échéances à votre rythme.","eligibility-modal.no-eligibility":"Oups, il semblerait que la simulation n'ait pas fonctionné.","eligibility-modal.p1x-bullet-1":"Choisissez <strong>Alma - Payer maintenant</strong> au moment du paiement.","eligibility-modal.p1x-bullet-2":"Renseignez les informations de votre <strong>carte bancaire.</strong>","eligibility-modal.p1x-bullet-3":"<strong>La validation </strong> de votre paiement est instantanée !","eligibility-modal.title-deferred-plan":"Payez en plusieurs fois ou plus tard par carte bancaire avec Alma.","eligibility-modal.title-normal":"Payez en plusieurs fois par carte bancaire avec Alma.","eligibility-modal.title-pay-now":"Payez comptant par carte bancaire avec Alma.","installments.today":"Aujourd'hui","installments.total-amount":"Total","installments.total-fees":"Dont frais (TTC)","payment-plan-strings.day-abbreviation":"J{deferredDays}","payment-plan-strings.default-message":"Payez en plusieurs fois avec Alma","payment-plan-strings.deferred":"{totalAmount} à payer le {dueDate}","payment-plan-strings.ineligible-greater-than-max":"Jusqu'à {maxAmount}","payment-plan-strings.ineligible-lower-than-min":"À partir de {minAmount}","payment-plan-strings.month-abbreviation":"M{deferredMonths}","payment-plan-strings.multiple-installments":"{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}}}","payment-plan-strings.multiple-installments-same-amount":"{installmentsCount} x {totalAmount}","payment-plan-strings.no-fee":"(sans frais)","payment-plan-strings.pay-now":"Payer maintenant {totalAmount}","payment-plan-strings.pay.now.button":"Payer maintenant"},Pa={"credit-features.credit-cost-display":"{creditCost} (TAEG {taegPercentage})","credit-features.information":"Un pagamento rateale ti impegna e deve essere ripagato. Verifica la tua disponibilità finanziaria prima di impegnarti.","credit-features.total-credit-cost":"Di cui commissioni","eligibility-modal.bullet-1":"Seleziona <strong>Alma</strong> come metodo di pagamento.","eligibility-modal.bullet-2":"Segui le istruzioni e completa l'acquisto <strong>in meno di 2 minuti.</strong>","eligibility-modal.bullet-3":"<strong>Gestisci il tuo piano di pagamento</strong> e modifica le scadenze secondo le tue esigenze.","eligibility-modal.no-eligibility":"Ops, sembra che qualcosa non abbia funzionato.","eligibility-modal.p1x-bullet-1":"Scegli <strong>Alma - Paga ora</strong> alla cassa.","eligibility-modal.p1x-bullet-2":"Inserisci i dati della tua <strong>carta bancaria.</strong>","eligibility-modal.p1x-bullet-3":"Ricevi la <strong>conferma di pagamento</strong> istantaneamente!","eligibility-modal.title-deferred-plan":"Paga a rate con Alma, senza registrazione.","eligibility-modal.title-normal":"Paga a rate con Alma, senza registrazione.","eligibility-modal.title-pay-now":"Paga ora con carta tramite Alma.","installments.today":"Oggi","installments.total-amount":"Totale","installments.total-fees":"Di cui commissioni","payment-plan-strings.day-abbreviation":"G{deferredDays}","payment-plan-strings.default-message":"Paga a rate con Alma, senza registrazione.","payment-plan-strings.deferred":"{totalAmount} da pagare il {dueDate}","payment-plan-strings.ineligible-greater-than-max":"Disponibile fino a {maxAmount}","payment-plan-strings.ineligible-lower-than-min":"Pagamento rateale disponibile a partire da {minAmount}","payment-plan-strings.month-abbreviation":"M{deferredMonths}","payment-plan-strings.multiple-installments":"{numberOfRemainingInstallments, plural, one {Oggi paghi {firstInstallmentAmount} poi tra {numberOfRemainingInstallments} mese {othersInstallmentAmount}} other {Oggi paghi {firstInstallmentAmount} poi {numberOfRemainingInstallments} rate mensili di {othersInstallmentAmount}}}","payment-plan-strings.multiple-installments-same-amount":"In {installmentsCount} rate mensili di {totalAmount}","payment-plan-strings.no-fee":"(senza interessi)","payment-plan-strings.pay-now":"Paga ora {totalAmount}","payment-plan-strings.pay.now.button":"Paga ora"},Oa={"credit-features.credit-cost-display":"{creditCost} (gemiddeld rente percentage {taegPercentage})","credit-features.information":"Een lening is bindend en moet worden terugbetaald. Ga na of je het kunt terugbetalen voordat je jezelf vastlegt.","credit-features.total-credit-cost":"Waarvan kredietkosten","eligibility-modal.bullet-1":"Kies <strong>Alma</strong> bij het afrekenen om de eerste termijnbetaling te voldoen. Dit kan gemakkelijk via jouw favoriete betaalmethode.","eligibility-modal.bullet-2":"Betaal gemakkelijk <strong>binnen 1 minuut </strong>. Je hebt hier geen account voor nodig.","eligibility-modal.bullet-3":"<strong>Behoud de controle </strong> en bepaal je eigen tempo. Bij Alma schuif je de deadlines gemakkelijk vooruit of achteruit. Zonder bijkomende kosten.","eligibility-modal.no-eligibility":"Oeps, het lijkt erop dat de simulatie niet werkte.","eligibility-modal.p1x-bullet-1":"Kies <strong>Alma - Betaal nu</strong> bij het afrekenen om de eerste termijnbetaling te voldoen. Dit kan gemakkelijk via jouw favoriete betaalmethode.","eligibility-modal.p1x-bullet-2":"Vul je <strong>gegevens </strong> in","eligibility-modal.p1x-bullet-3":"<strong>De bevestiging </strong> van jouw betaling is direct!","eligibility-modal.title-deferred-plan":"Betaal in termijnen bij Alma - helemaal rentevrij.","eligibility-modal.title-normal":"Betaal in termijnen bij Alma - helemaal rentevrij.","eligibility-modal.title-pay-now":"Betaal met iDEAL of per creditcard bij Alma.","installments.today":"Vandaag","installments.total-amount":"Totaal","installments.total-fees":"Waarvan kosten (incl. BTW)","payment-plan-strings.day-abbreviation":"D{deferredDays}","payment-plan-strings.default-message":"Betaal in termijnen bij Alma - helemaal rentevrij","payment-plan-strings.deferred":"{totalAmount} te betalen op {dueDate}","payment-plan-strings.ineligible-greater-than-max":"Tot {maxAmount}","payment-plan-strings.ineligible-lower-than-min":"Vanaf {minAmount}","payment-plan-strings.month-abbreviation":"M{deferredMonths}","payment-plan-strings.multiple-installments":"{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}}}","payment-plan-strings.multiple-installments-same-amount":"{installmentsCount} x {totalAmount}","payment-plan-strings.no-fee":"(zonder kosten)","payment-plan-strings.pay-now":"Betaal nu {totalAmount}","payment-plan-strings.pay.now.button":"Betaal nu"},_a={"credit-features.credit-cost-display":"{creditCost} (TAEG {taegPercentage})","credit-features.information":"Um crédito é um compromisso e deve ser reembolsado. Verifique a sua capacidade de pagar antes de se comprometer.","credit-features.total-credit-cost":"Incluindo comissões de crédito","eligibility-modal.bullet-1":"Seleccionar <strong>Alma - Pay Now</strong> no final da compra.","eligibility-modal.bullet-2":"Siga as instruções e valide o seu pagamento em <strong>2 minutos.</strong>","eligibility-modal.bullet-3":"<strong>Mantenha o controlo</strong> adiando as datas de pagamento ao seu próprio ritmo.","eligibility-modal.no-eligibility":"Ups, parece que a simulação não funcionou.","eligibility-modal.p1x-bullet-1":"Escolha <strong>Alma - Pague agora</strong> no checkout.","eligibility-modal.p1x-bullet-2":"Preencha os dados do seu <strong>cartão de bancário.</strong>","eligibility-modal.p1x-bullet-3":"<strong>A validação </strong> do seu pagamento é instantânea!","eligibility-modal.title-deferred-plan":"Pagar em prestações ou mais tarde por cartão de crédito com Alma.","eligibility-modal.title-normal":"Pagar em prestações por cartão bancário com a Alma.","eligibility-modal.title-pay-now":"Pague na integralidade com a Alma por cartão bancário.","installments.today":"Hoje","installments.total-amount":"Total","installments.total-fees":"Das quais comissões (incl. IVA)","payment-plan-strings.day-abbreviation":"D{deferredDays}","payment-plan-strings.default-message":"Pagamento em prestações com a Alma","payment-plan-strings.deferred":"{totalAmount} a pagar em {dueDate}","payment-plan-strings.ineligible-greater-than-max":"Até {maxAmount}","payment-plan-strings.ineligible-lower-than-min":"A partir de {minAmount}","payment-plan-strings.month-abbreviation":"M{deferredMonths}","payment-plan-strings.multiple-installments":"{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}}}","payment-plan-strings.multiple-installments-same-amount":"{installmentsCount} x {totalAmount}","payment-plan-strings.no-fee":"(sem encargos)","payment-plan-strings.pay-now":"Pagar agora {totalAmount}","payment-plan-strings.pay.now.button":"Pagar agora"},xa=function(e){switch(e.slice(0,2)){case fa.fr:return wa;case fa.es:return Ca;case fa.it:return Pa;case fa.de:return Ea;case fa.pt:return _a;case fa.nl:return Oa;case fa.en:default:return Aa}},Sa=function(t){var n=t.children,r=t.locale;return e.createElement(a,{messages:xa(r),locale:r,defaultLocale:"en"},n)};function Ma(){return(Ma=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function Ia(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)t.indexOf(n=i[a])>=0||(r[n]=e[n]);return r}var ja=function(e,t){return!!e.eligible&&!!t&&e.purchase_amount>=(null==t?void 0:t.minAmount)&&e.purchase_amount<=(null==t?void 0:t.maxAmount)},Na=function(e,a,r,i,l){var o,s,u=a.domain,c=a.merchantId,m=t([]),d=m[0],f=m[1],g=t(da.PENDING),p=g[0],y=g[1],h=null==r?void 0:r.map(function(e){return{installments_count:e.installmentsCount,deferred_days:null==e?void 0:e.deferredDays,deferred_months:null==e?void 0:e.deferredMonths}});return n(function(){if(p===da.PENDING){var t=null;i&&(t={country:i});var n=null;l&&(n={country:l}),function(e,t,n){void 0===e&&(e="");try{return Promise.resolve(fetch(e,{method:"POST",headers:Ma({"Content-Type":"application/json"},n),body:JSON.stringify(t)})).then(function(e){return e.json()})}catch(e){return Promise.reject(e)}}(u+"/v2/payments/eligibility",{purchase_amount:e,queries:h,billing_address:t,shipping_address:n},{Authorization:"Alma-Merchant-Auth "+c,"X-Alma-Agent":"Alma Widget/v3.3.11"}).then(function(e){f(e),y(da.SUCCESS)}).catch(function(){y(da.FAILED)})}},[p]),[(o=d,s=r,s?o.map(function(e){var t=30*(e.deferred_months?e.deferred_months:0)+(e.deferred_days?e.deferred_days:0),n=s.find(function(n){return e.installments_count===n.installmentsCount&&t===30*(n.deferredMonths?n.deferredMonths:0)+(n.deferredDays?n.deferredDays:0)});return Ma({},e,{eligible:ja(e,n)},function(e,t){var n,a=null==(n=e.constraints)?void 0:n.purchase_amount;return a&&t?{minAmount:Math.max(t.minAmount,null==a?void 0:a.minimum),maxAmount:Math.min(t.maxAmount,null==a?void 0:a.maximum)}:null!=t?t:{}}(e,n))}):o.filter(function(e){return!(1===e.installments_count&&0===e.deferred_days&&0===e.deferred_months)})),p]},za="alma-eligibility-modal",La={desktopModal:za+"-desktop-modal",mobileModal:za+"-mobile-modal",leftSide:za+"-left-side",bullet:za+"-bullet",rightSide:za+"-right-side",title:za+"-title",info:za+"-info",infoMessage:za+"-info-message",eligibilityOptions:za+"-eligibility-options",activeOption:za+"-active-option",closeButton:za+"-close-button",scheduleDetails:za+"-schedule-details",scheduleTotal:za+"-schedule-total",scheduleCredit:za+"-schedule-credit",cardContainer:za+"-card-logos",summary:za+"-summary"},Da=function(t){var n=t.currentPlan,a=r(),o=ya(n.purchase_amount+n.customer_total_cost_amount),s=ya(n.customer_total_cost_amount),u=(null==n?void 0:n.annual_interest_rate)&&n.annual_interest_rate/1e4||0,m=ya(n.customer_total_cost_amount),d=n.installments_count>4;return e.createElement("div",{className:c("_GTTk7",La.summary),"data-testid":"modal-summary"},e.createElement("div",{className:c("_34s2g",La.scheduleTotal)},e.createElement(i,{tagName:"div",id:"installments.total-amount",defaultMessage:"Total"}),e.createElement(l,{value:o||0,style:"currency",currency:"EUR"})),e.createElement("div",{className:c("_W7qIA",La.scheduleCredit)},d?e.createElement(e.Fragment,null,e.createElement(i,{id:"credit-features.total-credit-cost",defaultMessage:"Dont coût du crédit"}),e.createElement("span",{className:"_24KmE"},e.createElement(i,{id:"credit-features.credit-cost-display",defaultMessage:"{creditCost} (TAEG {taegPercentage})",values:{creditCost:a.formatNumber(s,{style:"currency",currency:"EUR"}),taegPercentage:a.formatNumber(u,{style:"percent",maximumFractionDigits:2})}}))):e.createElement(e.Fragment,null,e.createElement(i,{id:"installments.total-fees",defaultMessage:"Dont frais (TTC)",tagName:"div"}),e.createElement("div",null,e.createElement(l,{value:m,style:"currency",currency:"EUR"})))))},ka=function(t){return e.createElement("div",{className:c("_31lrj",t.className),"data-testid":"loader"},e.createElement("svg",{width:"120",height:"134",viewBox:"0 0 120 134",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M83.8164 41.0325C79.1708 22.8241 69.3458 17 59.9939 17C50.642 17 40.8171 22.8241 36.1715 41.0325L16 117H35.8804C39.119 104.311 49.1016 97.2436 59.9939 97.2436C70.8863 97.2436 80.8689 104.324 84.1075 117H104L83.8164 41.0325ZM59.9939 79.5428C53.6623 79.5428 47.925 82.0552 43.6918 86.1283L55.0936 41.9207C56.1853 37.6953 57.7985 36.3503 60.0061 36.3503C62.2136 36.3503 63.8269 37.6953 64.9185 41.9207L76.3082 86.1283C72.075 82.0552 66.3256 79.5428 59.9939 79.5428Z",fill:"#FA5022"})))};function Ta(t){var n=t.color;return e.createElement("svg",{className:t.className,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M12.5964 11.404L9.41445 8.22205L12.5964 5.04007C12.7732 4.86329 12.7732 4.50974 12.5964 4.33296L11.8893 3.62585C11.6904 3.42698 11.359 3.44908 11.1822 3.62585L8.00023 6.80783L4.81825 3.62585C4.61938 3.42698 4.28792 3.44908 4.11114 3.62585L3.40404 4.33296C3.20516 4.53183 3.20516 4.84119 3.40404 5.04007L6.58602 8.22205L3.40404 11.404C3.20516 11.6029 3.20517 11.9123 3.40404 12.1111L4.11115 12.8182C4.28792 12.995 4.61938 13.0171 4.81825 12.8182L8.00023 9.63626L11.1822 12.8182C11.359 12.995 11.6904 13.0171 11.8893 12.8182L12.5964 12.1111C12.7732 11.9344 12.7732 11.5808 12.5964 11.404Z",fill:void 0===n?"#fff":n}))}var Ra,Fa,Ba,Ha=["children","isOpen","onClose","className","contentClassName","scrollable"],Ua=function(t){var n,a=t.children,r=t.isOpen,i=t.onClose,l=t.className,o=t.contentClassName,s=t.scrollable,u=void 0!==s&&s,f=Ia(t,Ha);return m.setAppElement("body"),e.createElement(m,Object.assign({className:c("_D8SjB",l),overlayClassName:"_1yxCb",onAfterOpen:function(){d.on()},onAfterClose:function(){d.off()},onRequestClose:i,isOpen:r,shouldCloseOnOverlayClick:!0,shouldCloseOnEsc:!0},f),e.createElement("div",{className:"_12LLh"},e.createElement("button",{onClick:i,className:c("_3YRro",La.closeButton),"data-testid":"modal-close-button"},e.createElement(Ta,null))),e.createElement("div",{className:c("_ocM9x",o,(n={},n._1GP2F=u,n))},a))},Va=function(t){var n=t.deferred_days,a=t.deferred_months,r=t.installments_count;return 1!==r||n||a?1===r&&n?e.createElement(i,{id:"payment-plan-strings.day-abbreviation",defaultMessage:"J{deferredDays}",values:{deferredDays:"+"+n}}):1===r&&a?e.createElement(i,{id:"payment-plan-strings.month-abbreviation",defaultMessage:"M{deferredMonths}",values:{deferredMonths:"+"+a}}):r+"x":e.createElement(i,{id:"payment-plan-strings.pay.now.button",defaultMessage:"Payer maintenant"})},Ga=function(t){var n;if(null!=(n=t.payment_plan)&&n.every(function(e){return 0===e.customer_fee&&0===e.customer_interest}))return e.createElement(e.Fragment,null," ",e.createElement(i,{id:"payment-plan-strings.no-fee",defaultMessage:"(sans frais)"}))},qa=function(t){var n=t.eligibilityPlans,a=t.currentPlanIndex,r=t.setCurrentPlanIndex;return e.createElement("div",{className:c("_1l2Oa",La.eligibilityOptions)},n.map(function(t,n){var i;return e.createElement("button",{key:n,className:c((i={},i[c("_3rue7",La.activeOption)]=n===a,i)),onClick:function(){return r(n)}},e.createElement("span",{className:"_2T78a"},Va(t)))}))},Za=function(t){var n,a,r=t.installment,s=t.index;return e.createElement("div",{className:"_z2Uiv","data-testid":"installment-"+s},e.createElement("div",{className:"_2lJQy"},e.createElement("div",{className:c("_1Z9wr",(n={},n._2Nmkl=0===s,n))}),p(1e3*r.due_date)?e.createElement(i,{id:"installments.today",defaultMessage:"Aujourd'hui",tagName:"strong"}):e.createElement(o,{value:1e3*r.due_date,day:"numeric",month:"long",year:"numeric"})),e.createElement("div",{className:c((a={},a["_ezY-3"]=0===s,a))},e.createElement(l,{value:r.total_amount/100,style:"currency",currency:"EUR"})))},Wa=function(t){var n=t.currentPlan,a=n.installments_count>4;return e.createElement(e.Fragment,null,e.createElement("div",{className:c("_MPKjS",La.scheduleDetails),"data-testid":"modal-installments-element"},((null==n?void 0:n.payment_plan)||[]).map(function(t,n){return e.createElement(Za,{key:1e3*t.due_date,installment:t,index:n})}),a&&e.createElement("div",{className:"_3a7er"},e.createElement(i,{id:"credit-features.information",defaultMessage:"Un crédit vous engage et doit être remboursé. Vérifiez vos capacités de remboursement avant de vous engager."}))))},Ja=["color"],Ka=function(t){var n=t.color,a=void 0===n?"#FA5022":n,r=Ia(t,Ja);return e.createElement("svg",Object.assign({width:"50",height:"25",viewBox:"0 0 360 109",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),e.createElement("path",{d:"M333.24 28.3462V38.4459C327.504 31.1018 319.176 26.5132 309.288 26.5132C290.208 26.5132 275.424 43.5497 275.424 64.5757C275.424 85.6018 290.208 102.638 309.288 102.638C319.872 102.638 328.668 97.3908 334.416 89.1241V100.817H352.668V28.3462H333.24ZM314.028 84.4876C303.42 84.4876 294.828 75.574 294.828 64.5757C294.828 53.5775 303.42 44.6639 314.028 44.6639C324.636 44.6639 333.228 53.5775 333.228 64.5757C333.228 75.574 324.636 84.4876 314.028 84.4876ZM109.5 8.23073H128.916V100.805H109.5V8.23073ZM151.248 59.7356C151.248 39.8117 163.5 26.5252 180.468 26.5252C191.004 26.5252 199.332 31.1976 204.348 39.1648C209.376 31.1976 217.692 26.5252 228.228 26.5252C245.196 26.5252 257.448 39.8117 257.448 59.7356V100.817H238.032V57.639C238.032 49.8635 232.872 44.7957 226.044 44.7957C219.216 44.7957 214.056 49.8755 214.056 57.639V100.817H194.64V57.639C194.64 49.8635 189.48 44.7957 182.652 44.7957C175.824 44.7957 170.664 49.8755 170.664 57.639V100.817H151.248V59.7356ZM74.34 29.101C69.744 11.9088 60.0241 6.40967 50.772 6.40967C41.5201 6.40967 31.8 11.9088 27.204 29.101L7.24805 100.829H26.916C30.12 88.8485 39.996 82.1753 50.772 82.1753C61.548 82.1753 71.424 88.8605 74.6281 100.829H94.3081L74.34 29.101ZM50.772 65.4623C44.508 65.4623 38.8321 67.8345 34.6441 71.6803L45.924 29.9397C47.0041 25.9501 48.6001 24.6802 50.784 24.6802C52.9681 24.6802 54.5641 25.9501 55.6441 29.9397L66.912 71.6803C62.724 67.8345 57.036 65.4623 50.772 65.4623Z",fill:a}))},Xa=function(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"16",viewBox:"0 0 24 16"},e.createElement("defs",null,e.createElement("linearGradient",{id:"cardamex",x1:"10.914%",x2:"87.432%",y1:"86.279%",y2:"15.035%"},e.createElement("stop",{offset:"0%",stopColor:"#3FA9F5"}),e.createElement("stop",{offset:"100%",stopColor:"#0071BC"}))),e.createElement("g",{fill:"none",fillRule:"evenodd"},e.createElement("path",{fill:"url(#cardamex)",fillRule:"nonzero",d:"M22.559 16H1.379C.627 16 0 15.392 0 14.662V1.338C0 .608.627 0 1.379 0H22.62C23.373 0 24 .608 24 1.338v13.324c-.063.73-.627 1.338-1.441 1.338z"}),e.createElement("g",{fill:"#FFF"},e.createElement("path",{d:"M10.115 8.711L8.889 6.044H7.295v3.852L5.517 6.044H4.17l-1.778 4.03h1.103l.368-.889h2.023l.368.89h2.084V7.11l1.349 2.963h.92l1.348-2.904v2.904h.98v-4.03H11.28l-1.165 2.667zm-5.272-.474H4.23l.613-1.422v.06l.613 1.362h-.613z"}),e.createElement("path",{fillRule:"nonzero",d:"M19.372 7.94l.735-.77 1.042-1.185h-1.287L18.697 7.23l-1.164-1.245h-3.985v3.97h3.923l1.226-1.303 1.165 1.304h1.287L20.107 8.71l-.735-.77zM16.92 9.186h-2.33v-.77h2.268v-.77H14.59v-.712h2.33L18.084 8 16.92 9.185z"}))))},Ya=function(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"16",viewBox:"0 0 24 16"},e.createElement("g",{fill:"none",fillRule:"nonzero"},e.createElement("path",{fill:"#FCFCFC",d:"M22.684 16H1.38C.627 16 0 15.39 0 14.656V1.344C0 .61.627 0 1.379 0H22.62C23.373 0 24 .61 24 1.344v13.374c0 .671-.564 1.282-1.316 1.282z"})," ",e.createElement("path",{fill:"#005098",d:"M8.889 10.726l.948-5.393h1.482l-.949 5.393zM15.704 5.452a3.658 3.658 0 0 0-1.304-.237c-1.481 0-2.489.71-2.489 1.778 0 .77.711 1.185 1.304 1.481.592.237.77.415.77.652 0 .355-.474.533-.889.533-.592 0-.889-.059-1.363-.296l-.177-.06-.178 1.186c.355.178 1.007.296 1.659.296 1.54 0 2.548-.71 2.548-1.837 0-.592-.415-1.067-1.244-1.481-.534-.237-.83-.415-.83-.652 0-.237.237-.474.83-.474.474 0 .83.118 1.126.178l.118.059.119-1.126M19.496 5.333H18.37c-.355 0-.592.119-.77.474l-2.193 4.919h1.541s.237-.652.296-.83h1.897c.059.178.178.83.178.83h1.362l-1.185-5.393zM17.66 8.77l.593-1.481s.118-.296.178-.533l.118.474s.296 1.303.356 1.54h-1.245zM7.644 5.333L6.222 9.007l-.178-.77C5.748 7.348 4.92 6.459 4.03 5.985l1.303 4.682h1.541l2.311-5.393h-1.54"}),e.createElement("path",{fill:"#F6A500",d:"M4.919 5.333h-2.37v.119c1.836.474 3.08 1.54 3.555 2.844L5.57 5.807c-.118-.414-.355-.474-.651-.474"}),e.createElement("path",{fill:"#0A5296",d:"M23.937 3.23H0V1.316C0 .598.627 0 1.379 0H22.62C23.373 0 24 .598 24 1.316V3.23h-.063z"}),e.createElement("path",{fill:"#F4A428",d:"M.063 13H24v1.8c0 .655-.625 1.2-1.375 1.2H1.375C.625 16 0 15.455 0 14.8V13h.063z"})))},$a=function(){return e.createElement("svg",{width:"24px",height:"16px",viewBox:"0 0 24 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},e.createElement("g",{id:"Parcours-1C-B",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},e.createElement("g",{id:"mobile-1C-Paiement-V1",transform:"translate(-269.000000, -313.000000)"},e.createElement("g",{id:"mastercard",transform:"translate(269.000000, 313.000000)"},e.createElement("rect",{id:"Rectangle",fill:"#FFFFFF",x:"0",y:"0",width:"24",height:"16",rx:"1"}),e.createElement("g",{id:"Group-6",transform:"translate(4.000000, 3.000000)"},e.createElement("circle",{id:"Oval-4-Copy",fill:"#EA001B",cx:"5.05263158",cy:"5.05263158",r:"5.05263158"}),e.createElement("circle",{id:"Oval-4",fillOpacity:"0.25",fill:"#F79F1A",cx:"10.9473684",cy:"5.05263158",r:"5.05263158"}),e.createElement("circle",{id:"Oval-4-Copy-2",fillOpacity:"0.9",fill:"#F79F1A",cx:"10.9473684",cy:"5.05263158",r:"5.05263158"}),e.createElement("circle",{id:"Oval-4-Copy-3",fillOpacity:"0.3",fill:"#EA001B",cx:"5.05263158",cy:"5.05263158",r:"5.05263158"}))))))},Qa=function(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"16",viewBox:"0 0 24 16"},e.createElement("defs",null,e.createElement("linearGradient",{id:"cardcb",x1:"5.842%",x2:"95.393%",y1:"81.753%",y2:"17.344%"},e.createElement("stop",{offset:"0%",stopColor:"#39B54A"})," ",e.createElement("stop",{offset:"100%",stopColor:"#0A5296"}))),e.createElement("g",{fill:"none",fillRule:"nonzero"},e.createElement("path",{fill:"url(#cardcb)",d:"M22.621 16H1.38C.627 16 0 15.392 0 14.662V1.338C0 .608.627 0 1.379 0H22.62C23.373 0 24 .608 24 1.338v13.324c-.063.73-.627 1.338-1.379 1.338z"}),e.createElement("g",{fill:"#FFF"},e.createElement("path",{d:"M19.094 4.03h-6.437V8h6.498c1.165 0 2.084-.889 2.084-2.015-.06-1.066-.98-1.955-2.145-1.955zM19.094 8.593h-6.437v3.97h6.498c1.165 0 2.084-.889 2.084-2.015-.06-1.067-.98-1.955-2.145-1.955zM7.017 8.06h4.966c-.245-2.371-2.391-4.267-4.966-4.267-2.758 0-5.027 2.074-5.027 4.681s2.269 4.682 5.027 4.682c2.698 0 4.904-2.015 5.027-4.563H7.017v-.534z"}))))},er={cardContainer:"_1N3yO"},tr=function(t){var n=Array.from(new Set(t.cards));return e.createElement("div",{"data-testid":"card-logos",className:c(er.cardContainer,La.cardContainer)},n.map(function(t){return e.createElement("div",{key:t,className:er.card,"data-testid":"card-logo-"+t},"cb"===t&&e.createElement(Qa,null),"amex"===t&&e.createElement(Xa,null),"mastercard"===t&&e.createElement($a,null),"visa"===t&&e.createElement(Ya,null))}))},nr=function(t){var n=t.isCurrentPlanP1X;return e.createElement("div",{className:c("_180ro",La.info),"data-testid":"modal-info-element"},e.createElement("div",{className:"_1HqCO"},e.createElement("div",{className:c("_3B8wx",La.bullet)},"1"),e.createElement("div",{className:La.infoMessage},e.createElement(i,n?{id:"eligibility-modal.p1x-bullet-1",defaultMessage:"Choisissez <strong>Alma - Payer maintenant</strong> au moment du paiement.",values:{strong:function(){return e.createElement("strong",null,[].slice.call(arguments))}}}:{id:"eligibility-modal.bullet-1",defaultMessage:"Choisissez <strong>Alma</strong> au moment du paiement.",values:{strong:function(){return e.createElement("strong",null,[].slice.call(arguments))}}}))),e.createElement("div",{className:"_1HqCO"},e.createElement("div",{className:c("_3B8wx",La.bullet)},"2"),e.createElement("div",{className:La.infoMessage},e.createElement(i,n?{id:"eligibility-modal.p1x-bullet-2",defaultMessage:"Renseignez les informations de votre <strong>carte bancaire.</strong>",values:{strong:function(){return e.createElement("strong",null,[].slice.call(arguments))}}}:{id:"eligibility-modal.bullet-2",defaultMessage:"Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",values:{strong:function(){return e.createElement("strong",null,[].slice.call(arguments))}}}))),e.createElement("div",{className:"_1HqCO"},e.createElement("div",{className:c("_3B8wx",La.bullet)},"3"),e.createElement("div",{className:La.infoMessage},e.createElement(i,n?{id:"eligibility-modal.p1x-bullet-3",defaultMessage:"<strong>La validation </strong> de votre paiement est instantanée !",values:{strong:function(){return e.createElement("strong",null,[].slice.call(arguments))}}}:{id:"eligibility-modal.bullet-3",defaultMessage:"<strong>Gardez le contrôle</strong> en avançant ou reculant vos échéances à votre rythme.",values:{strong:function(){return e.createElement("strong",null,[].slice.call(arguments))}}}))))},ar=function(t){var n=t.isSomePlanDeferred,a=t.isCurrentPlanP1X;return e.createElement("div",{className:c("_3ERx-",La.title),"data-testid":"modal-title-element"},e.createElement(i,n?{id:"eligibility-modal.title-deferred-plan",defaultMessage:"Payez en plusieurs fois ou plus tard par carte bancaire avec Alma."}:a?{id:"eligibility-modal.title-pay-now",defaultMessage:"Payez comptant par carte bancaire avec Alma."}:{id:"eligibility-modal.title-normal",defaultMessage:"Payez en plusieurs fois par carte bancaire avec Alma."}))},rr=function(t){var n=t.children,a=t.isSomePlanDeferred,r=t.cards,i=t.isCurrentPlanP1X;return e.createElement("div",{className:c("_21g6u",La.desktopModal),"data-testid":"modal-container"},e.createElement("aside",{className:c(["_3zaP5","_2SBRC",La.leftSide])},e.createElement(ar,{isSomePlanDeferred:a,isCurrentPlanP1X:i}),e.createElement(nr,{isCurrentPlanP1X:i}),r&&e.createElement(tr,{cards:r}),e.createElement(Ka,{className:"_xW3wt",width:"75"})),e.createElement("div",{className:c("_3zaP5",La.rightSide)},n))},ir=function(t){var n=t.children,a=t.isSomePlanDeferred,r=t.cards,i=t.isCurrentPlanP1X;return e.createElement("div",{className:c("_2G7Ch",La.mobileModal),"data-testid":"modal-container"},e.createElement(ar,{isSomePlanDeferred:a,isCurrentPlanP1X:i}),n,e.createElement(nr,{isCurrentPlanP1X:i}),r&&e.createElement(tr,{cards:r}),e.createElement(Ka,{className:"_2779r",width:"75"}))},lr=function(n){var a=n.onClose,r=n.eligibilityPlans,l=n.status,o=n.cards,s=t(n.initialPlanIndex||0),u=s[0],c=s[1],m=f({minWidth:800})?rr:ir,d=r.filter(function(e){return e.eligible}),g=d[u],p=r.some(function(e){return e.deferred_days>0||e.deferred_months>0});return e.createElement(Ua,{onClose:a,ariaHideApp:!1,scrollable:!0,isOpen:!0},e.createElement(m,{isSomePlanDeferred:p,cards:o,isCurrentPlanP1X:ba(g)},l===da.PENDING&&e.createElement("div",{className:"_2oTJq"},e.createElement(ka,null)),l===da.SUCCESS&&0===d.length&&e.createElement("div",{className:"_17qNJ"},e.createElement(i,{id:"eligibility-modal.no-eligibility",defaultMessage:"Oups, il semblerait que la simulation n'ait pas fonctionné."})),l===da.SUCCESS&&d.length>=1&&e.createElement(e.Fragment,null,e.createElement(qa,{eligibilityPlans:d,currentPlanIndex:u,setCurrentPlanIndex:c}),e.createElement("div",{className:"_2u9rj"},e.createElement("div",{className:"_VRdAU"}),e.createElement(Wa,{currentPlan:g}),e.createElement(Da,{currentPlan:g})))))},or=function(t){var n=t.onClose,a=t.cards,r=Na(t.purchaseAmount,t.apiData,t.configPlans,t.customerBillingCountry,t.customerShippingCountry);return e.createElement(lr,{initialPlanIndex:0,onClose:n,eligibilityPlans:r[0],status:r[1],cards:a})},sr=function(t){return e.createElement("div",{className:c("_2SwwZ",t.className),"data-testid":"loader"},e.createElement("div",{className:"_2qODo"}),e.createElement("div",{className:"_2YO01"}))},ur="alma-payment-plans",cr={container:ur+"-container",eligibilityLine:ur+"-eligibility-line",eligibilityOptions:ur+"-eligibility-options",notEligibleOption:ur+"-not-eligible-option",paymentInfo:ur+"-payment-info",activeOption:ur+"-active-option"},mr=function(a){var r,s,u,m,d=a.hideIfNotEligible,f=a.monochrome,p=a.suggestedPaymentPlan,y=a.cards,h=a.transitionDelay,v=a.hideBorder,b=void 0!==v&&v,E=a.onModalClose,A=Na(a.purchaseAmount,a.apiData,a.configPlans,a.customerBillingCountry,a.customerShippingCountry),C=A[0],w=A[1],P=C.filter(function(e){return e.eligible}),O=function(e){var t=e.suggestedPaymentPlan,n=e.eligibilityPlans,a=Array.isArray(t)?t:[t],r=function(e){var t=a[e],r=n.findIndex(function(e){return e.installments_count===t&&e.eligible&&!e.deferred_days&&!e.deferred_months});if(-1!==r)return{v:r}};for(var i in a){var l=r(i);if("object"==typeof l)return l.v}return 0}({eligibilityPlans:C,suggestedPaymentPlan:null!=p?p:0}),_=void 0!==p,x=void 0!==h,S=t(!1),M=S[0],I=S[1],j=C.reduce(function(e,t,n){return t.eligible?[].concat(e,[n]):e},[]),N=function(e,a){var r=t(0),i=r[0],l=r[1],o=t(!0),s=o[0],u=o[1];return n(function(){var t,n=!0;if(-1!==a)return 0!==e.length&&(!e.includes(i)&&s&&l(e[0]),t=setTimeout(function(){s&&n&&l(e[e.includes(i)?(e.indexOf(i)+1)%e.length:0])},a)),function(){n=!1,clearTimeout(t)}},[e,i]),{current:i,onHover:function(e){l(e),u(!1)},onLeave:function(){u(!0)}}}(j,x?null!=h?h:5500:_?36e5:5500),z=N.current,L=N.onHover,D=N.onLeave;return n(function(){w===da.SUCCESS&&_&&(L(O),D())},[w]),w===da.PENDING?e.createElement("div",{className:c("_TSkFv","_1ZDMS")},e.createElement(sr,null)):d&&0===P.length||0===C.length||w===da.FAILED?null:e.createElement(e.Fragment,null,e.createElement("div",{onClick:function(e){e.preventDefault(),P.length>0&&I(!0)},className:c("_TSkFv",(r={},r._UksZa=P.length>0,r["_1lr-q"]=0===P.length,r._3_qcn=b,r),cr.container),"data-testid":"widget-button"},e.createElement("div",{className:c("_bMClc",cr.eligibilityLine)},e.createElement(Ka,{className:"_LJ4nZ",color:f?"var(--off-black)":void 0}),e.createElement("div",{className:c("_17c_S",cr.eligibilityOptions)},C.map(function(t,n){var a,r=n===z;return e.createElement("div",{key:n,onMouseEnter:function(){return L(n)},onTouchStart:function(){return L(n)},onMouseOut:D,onTouchEnd:D,className:c("_2Kqjn",(a={},a[c("_3dG_J",cr.activeOption)]=r,a._2hx83=f&&r,a[c("_3O1bg",cr.notEligibleOption)]=!t.eligible,a))},Va(t))}))),e.createElement("div",{className:c("_25GrF",(s={},s[c("_3O1bg",cr.notEligibleOption)]=C[z]&&!C[z].eligible,s),cr.paymentInfo)},0!==C.length&&function(t){var n=t.installments_count,a=t.minAmount,r=void 0===a?0:a,s=t.maxAmount,u=void 0===s?0:s,c=t.payment_plan,m=t.deferred_days+30*t.deferred_months;if(!t.eligible)return e.createElement(i,t.purchase_amount>u?{id:"payment-plan-strings.ineligible-greater-than-max",defaultMessage:"Jusqu'à {maxAmount}",values:{maxAmount:e.createElement(l,{value:ya(u),style:"currency",currency:"EUR"})}}:{id:"payment-plan-strings.ineligible-lower-than-min",defaultMessage:"À partir de {minAmount}",values:{minAmount:e.createElement(l,{value:ya(r),style:"currency",currency:"EUR"})}});if(!c)throw Error("No payment plan provided for payment in "+n+" installments. Please contact us if you see this error.");if(0!==m&&1===n)return e.createElement(e.Fragment,null,e.createElement(i,{id:"payment-plan-strings.deferred",defaultMessage:"{totalAmount} à payer le {dueDate}",values:{totalAmount:e.createElement(l,{value:ya(c[0].total_amount),style:"currency",currency:"EUR"}),dueDate:e.createElement(o,{value:g(c[0].due_date),day:"numeric",month:"long",year:"numeric"})}}),Ga(t));if(n>0){var d=null==c?void 0:c.every(function(e,t){return 0===t||e.total_amount===c[0].total_amount});return ba(t)?e.createElement(e.Fragment,null,e.createElement(i,{id:"payment-plan-strings.pay-now",defaultMessage:"Payer maintenant {totalAmount}",values:{totalAmount:e.createElement(l,{value:ya(c[0].total_amount),style:"currency",currency:"EUR"}),installmentsCount:n}}),Ga(t)):e.createElement(e.Fragment,null,e.createElement(i,d?{id:"payment-plan-strings.multiple-installments-same-amount",defaultMessage:"{installmentsCount} x {totalAmount}",values:{totalAmount:e.createElement(l,{value:ya(c[0].total_amount),style:"currency",currency:"EUR"}),installmentsCount:n}}:{id:"payment-plan-strings.multiple-installments",defaultMessage:"{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",values:{firstInstallmentAmount:e.createElement(l,{value:ya(c[0].total_amount),style:"currency",currency:"EUR"}),numberOfRemainingInstallments:n-1,othersInstallmentAmount:e.createElement(l,{value:ya(c[1].total_amount),style:"currency",currency:"EUR"})}}),Ga(t))}return e.createElement(i,{id:"payment-plan-strings.default-message",defaultMessage:"Payez en plusieurs fois avec Alma"})}(C[z]))),M&&e.createElement(lr,{initialPlanIndex:(u=z,m=j.findIndex(function(e){return e===u}),-1===m?0:m),onClose:function(e){I(!1),E&&E(e)},eligibilityPlans:P,status:w,cards:y}))},dr=function(){function t(e){this.apiData=e}return t.prototype.add=function(t,n){var a=this,r=document.querySelector(n.container);if(r&&s(r),t===ma.PaymentPlans){var i=n.container,l=n.hideBorder,o=n.monochrome,c=n.locale;r&&u(e.createElement(Sa,{locale:void 0===c?fa.en:c},e.createElement(mr,{apiData:this.apiData,configPlans:n.plans,hideIfNotEligible:n.hideIfNotEligible,monochrome:void 0===o||o,purchaseAmount:n.purchaseAmount,suggestedPaymentPlan:n.suggestedPaymentPlan,cards:n.cards,customerBillingCountry:n.customerBillingCountry,customerShippingCountry:n.customerShippingCountry,transitionDelay:n.transitionDelay,hideBorder:void 0!==l&&l,onModalClose:n.onModalClose})),document.querySelector(i))}if(t===ma.Modal){var m,d=n.container,f=n.clickableSelector,g=n.purchaseAmount,p=n.plans,y=n.locale,h=void 0===y?fa.en:y,v=n.customerBillingCountry,b=n.customerShippingCountry,E=n.cards,A=n.onClose,C=function(e){r&&(s(r),A&&A(e))},w=function(){u(e.createElement(Sa,{locale:h},e.createElement(or,{purchaseAmount:g,apiData:a.apiData,configPlans:p,customerBillingCountry:v,customerShippingCountry:b,onClose:C,cards:E})),document.querySelector(d))};return f&&(null==(m=document.querySelector(f))||m.addEventListener("click",w,!1)),{open:w,close:C}}},t}();!function(e){e.LIVE="https://api.getalma.eu",e.TEST="https://api.sandbox.getalma.eu"}(Ra||(Ra={})),function(e){e.initialize=function(e,t){return new dr({domain:t,merchantId:e})},e.PaymentPlans=ma.PaymentPlans,e.Modal=ma.Modal}(Fa||(Fa={})),function(e){e.priceToCents=pa,e.priceFromCents=ya,e.formatCents=ha}(Ba||(Ba={}));export{Ra as ApiMode,Ba as Utils,Fa as Widgets};
2
2
  //# sourceMappingURL=widgets.m.js.map