@alma/widgets 3.2.4 → 3.3.0

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.
Files changed (37) hide show
  1. package/dist/raw/widgets.css +14 -14
  2. package/dist/raw/widgets.js +25 -17
  3. package/dist/raw/widgets.js.map +1 -1
  4. package/dist/raw/widgets.m.js +25 -17
  5. package/dist/raw/widgets.m.js.map +1 -1
  6. package/dist/raw/widgets.modern.js +27 -15
  7. package/dist/raw/widgets.modern.js.map +1 -1
  8. package/dist/raw/widgets.umd.js +25 -17
  9. package/dist/raw/widgets.umd.js.map +1 -1
  10. package/dist/types/Widgets/EligibilityModal/ModalContainer.d.ts +1 -1
  11. package/dist/types/Widgets/EligibilityModal/index.d.ts +2 -2
  12. package/dist/types/Widgets/PaymentPlans/index.d.ts +2 -1
  13. package/dist/types/components/Modal/index.d.ts +2 -2
  14. package/dist/types/types.d.ts +3 -0
  15. package/dist/types/widgets_controller.d.ts +2 -1
  16. package/dist/widgets.css +5 -5
  17. package/dist/widgets.js +1 -1
  18. package/dist/widgets.js.map +1 -1
  19. package/dist/widgets.m.js +1 -1
  20. package/dist/widgets.m.js.map +1 -1
  21. package/dist/widgets.modern.js +1 -1
  22. package/dist/widgets.modern.js.map +1 -1
  23. package/dist/widgets.umd.js +1 -1
  24. package/dist/widgets.umd.js.map +1 -1
  25. package/package.json +1 -1
  26. package/dist/assets/fonts/ArgentCF-DemiBold.eot +0 -0
  27. package/dist/assets/fonts/ArgentCF-DemiBold.ttf +0 -0
  28. package/dist/assets/fonts/ArgentCF-DemiBold.woff +0 -0
  29. package/dist/assets/fonts/ArgentCF-DemiBold.woff2 +0 -0
  30. package/dist/assets/fonts/Venn-Bold.eot +0 -0
  31. package/dist/assets/fonts/Venn-Bold.ttf +0 -0
  32. package/dist/assets/fonts/Venn-Bold.woff +0 -0
  33. package/dist/assets/fonts/Venn-Bold.woff2 +0 -0
  34. package/dist/assets/fonts/Venn-Regular.eot +0 -0
  35. package/dist/assets/fonts/Venn-Regular.ttf +0 -0
  36. package/dist/assets/fonts/Venn-Regular.woff +0 -0
  37. package/dist/assets/fonts/Venn-Regular.woff2 +0 -0
package/dist/widgets.m.js CHANGED
@@ -1,2 +1,2 @@
1
- import e,{useState as t,useEffect as n}from"react";import{IntlProvider as r,useIntl as a,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,O=Math.trunc||function(e){var t=+e;return(t>0?w:C)(t)},P=function(e){var t=+e;return t!=t||0===t?0:O(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,I,M=function(e){return e&&e.Math==Math&&e},N=M("object"==typeof globalThis&&globalThis)||M("object"==typeof window&&window)||M("object"==typeof self&&self)||M("object"==typeof _&&_)||function(){return this}()||Function("return this")(),L=Object.defineProperty,D=function(e,t){try{L(N,e,{value:t,configurable:!0,writable:!0})}catch(n){N[e]=t}return t},j=N["__core-js_shared__"]||D("__core-js_shared__",{}),z=x(function(e){(e.exports=function(e,t){return j[e]||(j[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"})}),T=TypeError,k=function(e){if(null==e)throw T("Can't call method on "+e);return e},R=Object,F=function(e){return R(k(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},X=function(e){return Z(e)?e:void 0},W=function(e,t){return arguments.length<2?X(N[e]):N[e]&&N[e][t]},K=W("navigator","userAgent")||"",J=N.process,Y=N.Deno,$=J&&J.versions||Y&&Y.version,Q=$&&$.v8;Q&&(I=(S=Q.split("."))[0]>0&&S[0]<4?1:+(S[0]+S[1])),!I&&K&&(!(S=K.match(/Edge\/(\d+)/))||S[1]>=74)&&(S=K.match(/Chrome\/(\d+)/))&&(I=+S[1]);var ee=I,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,re=z("wks"),ae=N.Symbol,ie=ae&&ae.for,le=ne?ae:ae&&ae.withoutSetter||q,oe=function(e){if(!H(re,e)||!te&&"string"!=typeof re[e]){var t="Symbol."+e;re[e]=te&&H(ae,e)?ae[e]:ne&&ie?ie(t):le(t)}return re[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,r;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"==(r=de(t))&&Z(t.callee)?"Arguments":r},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 r,a,i=ve(k(t)),l=P(n),o=i.length;return l<0||l>=o?e?"":void 0:(r=Ee(i,l))<55296||r>56319||l+1===o||(a=Ee(i,l+1))<56320||a>57343?e?be(i,l):r:e?Ae(i,l,l+2):a-56320+(r-55296<<10)+65536}},we={codeAt:Ce(!1),charAt:Ce(!0)},Oe=A(Function.toString);Z(j.inspectSource)||(j.inspectSource=function(e){return Oe(e)});var Pe,_e,xe,Se=j.inspectSource,Ie=N.WeakMap,Me=Z(Ie)&&/native code/.test(Se(Ie)),Ne=function(e){return"object"==typeof e?null!==e:Z(e)},Le=!y(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),De=N.document,je=Ne(De)&&Ne(De.createElement),ze=function(e){return je?De.createElement(e):{}},Te=!Le&&!y(function(){return 7!=Object.defineProperty(ze("div"),"a",{get:function(){return 7}}).a}),ke=Le&&y(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Re=String,Fe=TypeError,Be=function(e){if(Ne(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=W("Symbol");return Z(t)&&Ve(t.prototype,Ge(e))},Ze=String,Xe=function(e){try{return Ze(e)}catch(e){return"Object"}},We=TypeError,Ke=function(e){if(Z(e))return e;throw We(Xe(e)+" is not a function")},Je=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(!Ne(e)||qe(e))return e;var n,r=Je(e,Qe);if(r){if(void 0===t&&(t="default"),n=Ue(r,e,t),!Ne(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,r;if("string"===t&&Z(n=e.toString)&&!Ne(r=Ue(n,e)))return r;if(Z(n=e.valueOf)&&!Ne(r=Ue(n,e)))return r;if("string"!==t&&Z(n=e.toString)&&!Ne(r=Ue(n,e)))return r;throw Ye("Can't convert object to primitive value")}(e,t)}(e,"string");return qe(t)?t:t+""},tt=TypeError,nt=Object.defineProperty,rt=Object.getOwnPropertyDescriptor,at={f:Le?ke?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 r=rt(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return nt(e,t,n)}:nt:function(e,t,n){if(Be(e),t=et(t),Be(n),Te)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=Le?function(e,t,n){return at.f(e,t,it(1,n))}:function(e,t,n){return e[t]=n,e},ot=z("keys"),st=function(e){return ot[e]||(ot[e]=q(e))},ut={},ct=N.TypeError;if(Me||j.state){var mt=j.state||(j.state=new(0,N.WeakMap)),dt=A(mt.get),ft=A(mt.has),gt=A(mt.set);Pe=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,Pe=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:Pe,get:_e,has:xe,enforce:function(e){return xe(e)?_e(e):Pe(e,{})},getterFor:function(e){return function(t){var n;if(!Ne(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,Ot=function(e){return wt(k(e))},Pt=Object.getOwnPropertyDescriptor,_t={f:Le?Pt:function(e,t){if(e=Ot(e),t=et(t),Te)try{return Pt(e,t)}catch(e){}if(H(e,t))return it(!Ue(Et.f,e,t),e[t])}},xt=Function.prototype,St=Le&&Object.getOwnPropertyDescriptor,It=H(xt,"name"),Mt={EXISTS:It,PROPER:It&&"something"===function(){}.name,CONFIGURABLE:It&&(!Le||Le&&St(xt,"name").configurable)},Nt=x(function(e){var t=Mt.CONFIGURABLE,n=ht.enforce,r=ht.get,a=Object.defineProperty,i=Le&&!y(function(){return 8!==a(function(){},"length",{value:8}).length}),l=String(String).split("String"),o=e.exports=function(e,r,o){"Symbol("===String(r).slice(0,7)&&(r="["+String(r).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),o&&o.getter&&(r="get "+r),o&&o.setter&&(r="set "+r),(!H(e,"name")||t&&e.name!==r)&&a(e,"name",{value:r,configurable:!0}),i&&o&&H(o,"arity")&&e.length!==o.arity&&a(e,"length",{value:o.arity});try{o&&H(o,"constructor")&&o.constructor?Le&&a(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 r?r:"")),e};Function.prototype.toString=o(function(){return Z(this)&&r(this).source||Se(this)},"toString")}),Lt=function(e,t,n,r){r||(r={});var a=r.enumerable,i=void 0!==r.name?r.name:t;return Z(n)&&Nt(n,i,r),r.global?a?e[t]=n:D(t,n):(r.unsafe?e[t]&&(a=!0):delete e[t],a?e[t]=n:lt(e,t,n)),e},Dt=Math.max,jt=Math.min,zt=Math.min,Tt=function(e){return(t=e.length)>0?zt(P(t),9007199254740991):0;var t},kt=function(e){return function(t,n,r){var a,i=Ot(t),l=Tt(i),o=function(e,t){var n=P(e);return n<0?Dt(n+t,0):jt(n,t)}(r,l);if(e&&n!=n){for(;l>o;)if((a=i[o++])!=a)return!0}else for(;l>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},Rt=(kt(!0),kt(!1)),Ft=A([].push),Bt=function(e,t){var n,r=Ot(e),a=0,i=[];for(n in r)!H(ut,n)&&H(r,n)&&Ft(i,n);for(;t.length>a;)H(r,n=t[a++])&&(~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=W("Reflect","ownKeys")||function(e){var t=Vt.f(Be(e)),n=Gt.f;return n?qt(t,n(e)):t},Xt=function(e,t,n){for(var r=Zt(t),a=at.f,i=_t.f,l=0;l<r.length;l++){var o=r[l];H(e,o)||n&&H(n,o)||a(e,o,i(t,o))}},Wt=/#|\.prototype\./,Kt=function(e,t){var n=Yt[Jt(e)];return n==Qt||n!=$t&&(Z(t)?y(t):!!t)},Jt=Kt.normalize=function(e){return String(e).replace(Wt,".").toLowerCase()},Yt=Kt.data={},$t=Kt.NATIVE="N",Qt=Kt.POLYFILL="P",en=Kt,tn=_t.f,nn=function(e,t){var n,r,a,i,l,o=e.target,s=e.global,u=e.stat;if(n=s?N:u?N[o]||D(o,{}):(N[o]||{}).prototype)for(r in t){if(i=t[r],a=e.dontCallGetSet?(l=tn(n,r))&&l.value:n[r],!en(s?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Xt(i,a)}(e.sham||a&&a.sham)&&lt(i,"sham",!0),Lt(n,r,i,e)}},rn=Object.keys||function(e){return Bt(e,Ht)},an={f:Le&&!ke?Object.defineProperties:function(e,t){Be(e);for(var n,r=Ot(t),a=rn(t),i=a.length,l=0;i>l;)at.f(e,n=a[l++],r[n]);return e}},ln=W("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=ze("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:an.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])||Lt(dn,An,function(){return this});var wn={IteratorPrototype:dn,BUGGY_SAFARI_ITERATORS:Cn},On=at.f,Pn=oe("toStringTag"),_n=function(e,t,n){e&&!n&&(e=e.prototype),e&&!H(e,Pn)&&On(e,Pn,{configurable:!0,value:t})},xn={},Sn=wn.IteratorPrototype,In=function(){return this},Mn=String,Nn=TypeError,Ln=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,r){return Be(n),function(e){if("object"==typeof e||Z(e))return e;throw Nn("Can't set "+Mn(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),Dn=wn.IteratorPrototype,jn=wn.BUGGY_SAFARI_ITERATORS,zn=oe("iterator"),Tn=function(){return this},kn=we.charAt,Rn=ht.set,Fn=ht.getterFor("String Iterator");!function(e,t,n,r,a,i,l){!function(e,t,n,r){e.prototype=pn(Sn,{next:it(1,function(){var e,t=Fn(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=kn(n,r),t.index+=e.length,{value:e,done:!1})})}),_n(e,"String Iterator",!1),xn["String Iterator"]=In}(n);var o,s,u,c=function(e){if(void 0===e&&f)return f;if(!jn&&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[zn]||m["@@iterator"]||void 0,f=!jn&&d||c(void 0);if(void(d&&(o=En(d.call(new e)))!==Object.prototype&&o.next&&(En(o)!==Dn&&(Ln?Ln(o,Dn):Z(o[zn])||Lt(o,zn,Tn)),_n(o,"String Iterator",!0))))if(void(s={values:c("values"),keys:c("keys"),entries:c("entries")}))for(u in s)(jn||!(u in m))&&Lt(m,u,s[u]);else nn({target:"String",proto:!0,forced:jn||!1},s);m[zn]!==f&&Lt(m,zn,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,r){try{return r?t(Be(n)[0],n[1]):t(n)}catch(t){!function(e,t,n){var r;Be(e);try{if(!(r=Je(e,"return")))throw n;r=Ue(r,e)}catch(e){r=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(){},Xn=[],Wn=W("Reflect","construct"),Kn=/^\s*(?:class|function)\b/,Jn=A(Kn.exec),Yn=!Kn.exec(Zn),$n=function(e){if(!Z(e))return!1;try{return Wn(Zn,Xn,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||!!Jn(Kn,Se(e))}catch(e){return!0}};Qn.sham=!0;var er=!Wn||y(function(){var e;return $n($n.call)||!$n(Object)||!$n(function(){e=!0})||e})?Qn:$n,tr=function(e,t,n){var r=et(t);r in e?at.f(e,r,it(0,n)):e[r]=n},nr=oe("iterator"),rr=function(e){if(null!=e)return Je(e,nr)||Je(e,"@@iterator")||xn[ye(e)]},ar=TypeError,ir=function(e,t){var n=arguments.length<2?rr(e):t;if(Ke(n))return Be(Ue(n,e));throw ar(Xe(e)+" is not iterable")},lr=Array,or=oe("iterator"),sr=!1;try{var ur=0,cr={next:function(){return{done:!!ur++}},return:function(){sr=!0}};cr[or]=function(){return this},Array.from(cr,function(){throw 2})}catch(e){}var mr,dr,fr,gr=!function(e,t){if(!sr)return!1;var n=!1;try{var r={};r[or]=function(){return{next:function(){return{done:n=!0}}}},Array.from(r)}catch(e){}return n}();function pr(e){return Math.round(100*e)}function yr(e){return Number((e/100).toFixed(2))}function hr(e){return String(yr(e)).replace(".",",")}nn({target:"Array",stat:!0,forced:gr},{from:function(e){var t=F(e),n=er(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=Hn(a,r>2?arguments[2]:void 0));var l,o,s,u,c,m,d=rr(t),f=0;if(!d||this===lr&&qn(d))for(l=Tt(t),o=n?new this(l):lr(l);l>f;f++)m=i?a(t[f],f):t[f],tr(o,f,m);else for(c=(u=ir(t,d)).next,o=n?new this:[];!(s=Ue(c,u)).done;f++)m=i?Un(u,a,[s.value,f],!0):s.value,tr(o,f,m);return o.length=f,o}}),function(e){e.PaymentPlans="PaymentPlans",e.Modal="Modal"}(mr||(mr={})),function(e){e.PENDING="pending",e.SUCCESS="success",e.FAILED="failed"}(dr||(dr={})),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"}(fr||(fr={}));var vr,br=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(vr=window.Element.prototype).matches&&(vr.matches=vr.msMatchesSelector||vr.mozMatchesSelector||vr.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 vr.closest&&(vr.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,r=/[\11\12\14\15\40]/,a=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!==(a=t.search(r)))throw new DOMException("Failed to execute '"+e+"' on 'DOMTokenList': The token provided ('"+t[a]+"') contains HTML space characters, which are not valid in tokens.")};"function"!=typeof DOMTokenList&&function(e){var t=e.document,n=e.Object,a=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 a=t.srcElement,i=a[" uCLp"],o=""+a[n],u=o.trim().split(r),c=a["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,a.classList=c,a.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,a=new t;e:for(var i=e.className.trim().split(r),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 a},configurable:0,set:function(t){s=1,e.className=n.value=t+="",s=0;var i=t.trim().split(r),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}a[o-c]=i[o]}for(var d=u-c;d<l;++d)delete a[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=a,e[" uCL"]=a,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="",r=this[" uCL"],a=r[" uCLp"];e!==t;++e){i("add",n=arguments[e]+"");for(var l=0,o=a.length,u=n;l!==o;++l){if(this[l]===n)continue e;u+=" "+this[l]}this[o]=n,a.length+=1,a.value=u}s=1,r.className=a.value,s=0},u.prototype.remove=function(){for(var e=0,t=arguments.length,n="",r=this[" uCL"],a=r[" uCLp"];e!==t;++e){i("remove",n=arguments[e]+"");for(var l=0,o=a.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],a.length-=1,a.value=u)}s=1,r.className=a.value,s=0},e.DOMTokenList=u;try{e.Object.defineProperty(e.Element.prototype,"classList",{enumerable:1,get:function(e){return a.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 r=arguments[1];t!==n;++t)e.call(r,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 Er={"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 - 1X</strong> beim Check-out.","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.","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}"},Ar={"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 - 1X</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.","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}"},Cr={"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éjese guiar y valide su pago en <strong>2 minutos.</strong>","eligibility-modal.bullet-3":"<strong>Mantenga 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":"Elija <strong>Alma - 1X</strong> en la caja.","eligibility-modal.p1x-bullet-2":"Introduzca los datos de su tarjeta de crédito en <strong>.</strong>","eligibility-modal.p1x-bullet-3":"<strong>¡La validación </strong> de su 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.","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}"},wr={"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 - 1X</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.","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":"Payez maintenant {totalAmount}"},Or={"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 - 1X</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.","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}"},Pr={"credit-features.credit-cost-display":"{creditCost} (gemiddeld rente percentage {taegPercentage})","credit-features.information":"Een lening bindt je en moet worden terugbetaald. Ga na of u kunt terugbetalen voordat u zich vastlegt.","credit-features.total-credit-cost":"Waarvan kosten van krediet","eligibility-modal.bullet-1":"Kies <strong>Alma</strong> bij het afrekenen.","eligibility-modal.bullet-2":"Laat ons u begeleiden en uw betaling valideren in <strong>2 minuten.</strong>","eligibility-modal.bullet-3":"<strong>Houd de controle op</strong> door uw deadlines in uw eigen tempo vooruit of achteruit te schuiven.","eligibility-modal.no-eligibility":"Oeps, het lijkt erop dat de simulatie niet werkte.","eligibility-modal.p1x-bullet-1":"Kies <strong>Alma - 1X</strong> bij het afrekenen.","eligibility-modal.p1x-bullet-2":"Vul uw <strong>creditcardgegevens in.</strong>","eligibility-modal.p1x-bullet-3":"<strong>De validatie </strong> van uw betaling is onmiddellijk!","eligibility-modal.title-deferred-plan":"Betaal in termijnen of later per creditcard met Alma.","eligibility-modal.title-normal":"Betaal in termijnen met een creditcard bij Alma.","installments.today":"Tegenwoordig","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 met Alma","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":"Van {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}"},_r={"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 custo do crédito","eligibility-modal.bullet-1":"Escolha a <strong>Alma</strong> no checkout.","eligibility-modal.bullet-2":"Deixe-nos guiá-lo e validar o seu pagamento em <strong>2 minutos.</strong>","eligibility-modal.bullet-3":"<strong>Mantenha-se em controlo</strong> avançando ou recuando os seus prazos ao seu próprio ritmo.","eligibility-modal.no-eligibility":"Ups, parece que a simulação não funcionou.","eligibility-modal.p1x-bullet-1":"Escolher <strong>Alma - 1X</strong> no checkout.","eligibility-modal.p1x-bullet-2":"Preencha as informações do seu <strong>cartão de crédito.</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 de crédito com Alma.","installments.today":"Hoje","installments.total-amount":"Total","installments.total-fees":"Dos quais custos (incl. IVA)","payment-plan-strings.day-abbreviation":"D{deferredDays}","payment-plan-strings.default-message":"Pague em prestações através da 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":"Pague agora {totalAmount}"},xr=function(e){switch(e.slice(0,2)){case fr.fr:return wr;case fr.es:return Cr;case fr.it:return Or;case fr.de:return Er;case fr.pt:return _r;case fr.nl:return Pr;case fr.en:default:return Ar}},Sr=function(t){var n=t.children,a=t.locale;return e.createElement(r,{messages:xr(a),locale:a,defaultLocale:"en"},n)};function Ir(){return(Ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Mr(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(a[n]=e[n]);return a}var Nr=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)},Lr=function(e,r,a,i,l){var o,s,u=r.domain,c=r.merchantId,m=t([]),d=m[0],f=m[1],g=t(dr.PENDING),p=g[0],y=g[1],h=null==a?void 0:a.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===dr.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:Ir({"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}).then(function(e){f(e),y(dr.SUCCESS)}).catch(function(){y(dr.FAILED)})}},[p]),[(o=d,s=a,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 Ir({},e,{eligible:Nr(e,n)},function(e,t){var n,r=null==(n=e.constraints)?void 0:n.purchase_amount;return r&&t?{minAmount:Math.max(t.minAmount,null==r?void 0:r.minimum),maxAmount:Math.min(t.maxAmount,null==r?void 0:r.maximum)}:null!=t?t:{}}(e,n))}):o.filter(function(e){return!(1===e.installments_count&&0===e.deferred_days&&0===e.deferred_months)})),p]},Dr="alma-eligibility-modal",jr={desktopModal:Dr+"-desktop-modal",mobileModal:Dr+"-mobile-modal",leftSide:Dr+"-left-side",bullet:Dr+"-bullet",rightSide:Dr+"-right-side",title:Dr+"-title",info:Dr+"-info",infoMessage:Dr+"-info-message",eligibilityOptions:Dr+"-eligibility-options",activeOption:Dr+"-active-option",closeButton:Dr+"-close-button",scheduleDetails:Dr+"-schedule-details",scheduleTotal:Dr+"-schedule-total",scheduleCredit:Dr+"-schedule-credit",cardContainer:Dr+"-card-logos",summary:Dr+"-summary"},zr=function(t){var n=t.currentPlan,r=a(),o=yr(n.purchase_amount+n.customer_total_cost_amount),s=yr(n.customer_total_cost_amount),u=(null==n?void 0:n.annual_interest_rate)&&n.annual_interest_rate/1e4||0,m=yr(n.customer_total_cost_amount),d=n.installments_count>4;return e.createElement("div",{className:c("_GTTk7",jr.summary),"data-testid":"modal-summary"},e.createElement("div",{className:c("_34s2g",jr.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",jr.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:r.formatNumber(s,{style:"currency",currency:"EUR"}),taegPercentage:r.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"})))))},Tr=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 kr(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 Rr,Fr,Br,Hr=["children","isOpen","onClose","className","contentClassName","scrollable"],Ur=function(t){var n,r=t.children,a=t.isOpen,i=t.onClose,l=t.className,o=t.contentClassName,s=t.scrollable,u=void 0!==s&&s,f=Mr(t,Hr);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:a,shouldCloseOnOverlayClick:!0,shouldCloseOnEsc:!0},f),e.createElement("div",{className:"_12LLh"},e.createElement("button",{onClick:i,className:c("_3YRro",jr.closeButton),"data-testid":"modal-close-button"},e.createElement(kr,null))),e.createElement("div",{className:c("_ocM9x",o,(n={},n._1GP2F=u,n))},r))},Vr=function(t){var n=t.deferred_days,r=t.deferred_months,a=t.installments_count;return 1===a&&n?e.createElement(i,{id:"payment-plan-strings.day-abbreviation",defaultMessage:"J{deferredDays}",values:{deferredDays:"+"+n}}):1===a&&r?e.createElement(i,{id:"payment-plan-strings.month-abbreviation",defaultMessage:"M{deferredMonths}",values:{deferredMonths:"+"+r}}):a+"x"},Gr=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)"}))},qr=function(t){var n=t.eligibilityPlans,r=t.currentPlanIndex,a=t.setCurrentPlanIndex;return e.createElement("div",{className:c("_1l2Oa",jr.eligibilityOptions)},n.map(function(t,n){var i;return e.createElement("button",{key:n,className:c((i={},i[c("_3rue7",jr.activeOption)]=n===r,i)),onClick:function(){return a(n)}},Vr(t))}))},Zr=function(t){var n,r,a=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*a.due_date)?e.createElement(i,{id:"installments.today",defaultMessage:"Aujourd'hui",tagName:"strong"}):e.createElement(o,{value:1e3*a.due_date,day:"numeric",month:"long",year:"numeric"})),e.createElement("div",{className:c((r={},r["_ezY-3"]=0===s,r))},e.createElement(l,{value:a.total_amount/100,style:"currency",currency:"EUR"})))},Xr=function(t){var n=t.currentPlan,r=n.installments_count>4;return e.createElement(e.Fragment,null,e.createElement("div",{className:c("_MPKjS",jr.scheduleDetails),"data-testid":"modal-installments-element"},((null==n?void 0:n.payment_plan)||[]).map(function(t,n){return e.createElement(Zr,{key:1e3*t.due_date,installment:t,index:n})}),r&&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."}))))},Wr=["color"],Kr=function(t){var n=t.color,r=void 0===n?"#FA5022":n,a=Mr(t,Wr);return e.createElement("svg",Object.assign({width:"50",height:"25",viewBox:"0 0 360 109",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),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:r}))},Jr=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"}))))},Yr=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"})))},$r=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"}))))))},Qr=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"}))))},ea={cardContainer:"_1N3yO"},ta=function(t){var n=Array.from(new Set(t.cards));return e.createElement("div",{"data-testid":"card-logos",className:c(ea.cardContainer,jr.cardContainer)},n.map(function(t){return e.createElement("div",{key:t,className:ea.card,"data-testid":"card-logo-"+t},"cb"===t&&e.createElement(Qr,null),"amex"===t&&e.createElement(Jr,null),"mastercard"===t&&e.createElement($r,null),"visa"===t&&e.createElement(Yr,null))}))},na=function(t){var n=t.isCurrentPlanP1X;return e.createElement("div",{className:c("_180ro",jr.info),"data-testid":"modal-info-element"},e.createElement("div",{className:"_1HqCO"},e.createElement("div",{className:c("_3B8wx",jr.bullet)},"1"),e.createElement("div",{className:jr.infoMessage},e.createElement(i,n?{id:"eligibility-modal.p1x-bullet-1",defaultMessage:"Choisissez <strong>Alma - 1X</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",jr.bullet)},"2"),e.createElement("div",{className:jr.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",jr.bullet)},"3"),e.createElement("div",{className:jr.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))}}}))))},ra=function(t){var n=t.isSomePlanDeferred;return e.createElement("div",{className:c("_3ERx-",jr.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."}:{id:"eligibility-modal.title-normal",defaultMessage:"Payez en plusieurs fois par carte bancaire avec Alma."}))},aa=function(t){var n=t.children,r=t.isSomePlanDeferred,a=t.cards,i=t.isCurrentPlanP1X;return e.createElement("div",{className:c("_21g6u",jr.desktopModal),"data-testid":"modal-container"},e.createElement("aside",{className:c(["_3zaP5","_2SBRC",jr.leftSide])},e.createElement(ra,{isSomePlanDeferred:r}),e.createElement(na,{isCurrentPlanP1X:i}),a&&e.createElement(ta,{cards:a}),e.createElement(Kr,{className:"_xW3wt",width:"75"})),e.createElement("div",{className:c("_3zaP5",jr.rightSide)},n))},ia=function(t){var n=t.children,r=t.isSomePlanDeferred,a=t.cards,i=t.isCurrentPlanP1X;return e.createElement("div",{className:c("_2G7Ch",jr.mobileModal),"data-testid":"modal-container"},e.createElement(ra,{isSomePlanDeferred:r}),n,e.createElement(na,{isCurrentPlanP1X:i}),a&&e.createElement(ta,{cards:a}),e.createElement(Kr,{className:"_2779r",width:"75"}))},la=function(n){var r=n.onClose,a=n.eligibilityPlans,l=n.status,o=n.cards,s=t(n.initialPlanIndex||0),u=s[0],c=s[1],m=f({minWidth:800})?aa:ia,d=a.filter(function(e){return e.eligible}),g=d[u],p=a.some(function(e){return e.deferred_days>0||e.deferred_months>0});return e.createElement(Ur,{onClose:r,ariaHideApp:!1,scrollable:!0,isOpen:!0},e.createElement(m,{isSomePlanDeferred:p,cards:o,isCurrentPlanP1X:br(g)},l===dr.PENDING&&e.createElement("div",{className:"_2oTJq"},e.createElement(Tr,null)),l===dr.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===dr.SUCCESS&&d.length>=1&&e.createElement(e.Fragment,null,e.createElement(qr,{eligibilityPlans:d,currentPlanIndex:u,setCurrentPlanIndex:c}),e.createElement("div",{className:"_2u9rj"},e.createElement("div",{className:"_VRdAU"}),e.createElement(Xr,{currentPlan:g}),e.createElement(zr,{currentPlan:g})))))},oa=function(t){var n=t.onClose,r=t.cards,a=Lr(t.purchaseAmount,t.apiData,t.configPlans,t.customerBillingCountry,t.customerShippingCountry);return e.createElement(la,{initialPlanIndex:0,onClose:n,eligibilityPlans:a[0],status:a[1],cards:r})},sa=function(t){return e.createElement("div",{className:c("_2SwwZ",t.className),"data-testid":"loader"},e.createElement("div",{className:"_2qODo"}),e.createElement("div",{className:"_2YO01"}))},ua="alma-payment-plans",ca={container:ua+"-container",eligibilityLine:ua+"-eligibility-line",eligibilityOptions:ua+"-eligibility-options",notEligibleOption:ua+"-not-eligible-option",paymentInfo:ua+"-payment-info",activeOption:ua+"-active-option"},ma=function(r){var a,s,u,m,d=r.hideIfNotEligible,f=r.monochrome,p=r.suggestedPaymentPlan,y=r.cards,h=r.transitionDelay,v=r.hideBorder,b=void 0!==v&&v,E=Lr(r.purchaseAmount,r.apiData,r.configPlans,r.customerBillingCountry,r.customerShippingCountry),A=E[0],C=E[1],w=A.filter(function(e){return e.eligible}),O=function(e){var t=e.suggestedPaymentPlan,n=e.eligibilityPlans,r=Array.isArray(t)?t:[t],a=function(e){var t=r[e],a=n.findIndex(function(e){return e.installments_count===t&&e.eligible&&!e.deferred_days&&!e.deferred_months});if(-1!==a)return{v:a}};for(var i in r){var l=a(i);if("object"==typeof l)return l.v}return 0}({eligibilityPlans:A,suggestedPaymentPlan:null!=p?p:0}),P=void 0!==p,_=void 0!==h,x=t(!1),S=x[0],I=x[1],M=A.reduce(function(e,t,n){return t.eligible?[].concat(e,[n]):e},[]),N=function(e,r){var a=t(0),i=a[0],l=a[1],o=t(!0),s=o[0],u=o[1];return n(function(){var t,n=!0;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])},r)),function(){n=!1,clearTimeout(t)}},[e,i]),{current:i,onHover:function(e){l(e),u(!1)},onLeave:function(){u(!0)}}}(M,_?null!=h?h:5500:P?36e5:5500),L=N.current,D=N.onHover,j=N.onLeave;return n(function(){C===dr.SUCCESS&&P&&(D(O),j())},[C]),C===dr.PENDING?e.createElement("div",{className:c("_TSkFv","_1ZDMS")},e.createElement(sa,null)):d&&0===w.length||0===A.length||C===dr.FAILED?null:e.createElement(e.Fragment,null,e.createElement("div",{onClick:function(e){e.preventDefault(),w.length>0&&I(!0)},className:c("_TSkFv",(a={},a._UksZa=w.length>0,a["_1lr-q"]=0===w.length,a._3_qcn=b,a),ca.container),"data-testid":"widget-button"},e.createElement("div",{className:c("_bMClc",ca.eligibilityLine)},e.createElement(Kr,{className:"_LJ4nZ",color:f?"var(--off-black)":void 0}),e.createElement("div",{className:c("_17c_S",ca.eligibilityOptions)},A.map(function(t,n){var r,a=n===L;return e.createElement("div",{key:n,onMouseEnter:function(){return D(n)},onTouchStart:function(){return D(n)},onMouseOut:j,onTouchEnd:j,className:c("_2Kqjn",(r={},r[c("_3dG_J",ca.activeOption)]=a,r._2hx83=f&&a,r[c("_3O1bg",ca.notEligibleOption)]=!t.eligible,r))},Vr(t))}))),e.createElement("div",{className:c("_25GrF",(s={},s[c("_3O1bg",ca.notEligibleOption)]=A[L]&&!A[L].eligible,s),ca.paymentInfo)},0!==A.length&&function(t){var n=t.installments_count,r=t.minAmount,a=void 0===r?0:r,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:yr(u),style:"currency",currency:"EUR"})}}:{id:"payment-plan-strings.ineligible-lower-than-min",defaultMessage:"À partir de {minAmount}",values:{minAmount:e.createElement(l,{value:yr(a),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:yr(c[0].total_amount),style:"currency",currency:"EUR"}),dueDate:e.createElement(o,{value:g(c[0].due_date),day:"numeric",month:"long",year:"numeric"})}}),Gr(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 br(t)?e.createElement(e.Fragment,null,e.createElement(i,{id:"payment-plan-strings.pay-now",defaultMessage:"Payez maintenant {totalAmount}",values:{totalAmount:e.createElement(l,{value:yr(c[0].total_amount),style:"currency",currency:"EUR"}),installmentsCount:n}}),Gr(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:yr(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:yr(c[0].total_amount),style:"currency",currency:"EUR"}),numberOfRemainingInstallments:n-1,othersInstallmentAmount:e.createElement(l,{value:yr(c[1].total_amount),style:"currency",currency:"EUR"})}}),Gr(t))}return e.createElement(i,{id:"payment-plan-strings.default-message",defaultMessage:"Payez en plusieurs fois avec Alma"})}(A[L]))),S&&e.createElement(la,{initialPlanIndex:(u=L,m=M.findIndex(function(e){return e===u}),-1===m?0:m),onClose:function(){return I(!1)},eligibilityPlans:w,status:C,cards:y}))},da=function(){function t(e){this.apiData=e}return t.prototype.add=function(t,n){var r=this,a=document.querySelector(n.container);if(a&&s(a),t===mr.PaymentPlans){var i=n.container,l=n.hideBorder,o=n.monochrome,c=n.locale;a&&u(e.createElement(Sr,{locale:void 0===c?fr.en:c},e.createElement(ma,{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})),document.querySelector(i))}if(t===mr.Modal){var m,d=n.container,f=n.clickableSelector,g=n.purchaseAmount,p=n.plans,y=n.locale,h=void 0===y?fr.en:y,v=n.customerBillingCountry,b=n.customerShippingCountry,E=n.cards,A=function(){return a&&s(a)},C=function(){u(e.createElement(Sr,{locale:h},e.createElement(oa,{purchaseAmount:g,apiData:r.apiData,configPlans:p,customerBillingCountry:v,customerShippingCountry:b,onClose:A,cards:E})),document.querySelector(d))};return f&&(null==(m=document.querySelector(f))||m.addEventListener("click",C,!1)),{open:C,close:A}}},t}();!function(e){e.LIVE="https://api.getalma.eu",e.TEST="https://api.sandbox.getalma.eu"}(Rr||(Rr={})),function(e){e.initialize=function(e,t){return new da({domain:t,merchantId:e})},e.PaymentPlans=mr.PaymentPlans,e.Modal=mr.Modal}(Fr||(Fr={})),function(e){e.priceToCents=pr,e.priceFromCents=yr,e.formatCents=hr}(Br||(Br={}));export{Rr as ApiMode,Br as Utils,Fr as Widgets};
1
+ import e,{useState as t,useEffect as n}from"react";import{IntlProvider as r,useIntl as a,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,O=Math.trunc||function(e){var t=+e;return(t>0?w:C)(t)},P=function(e){var t=+e;return t!=t||0===t?0:O(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,I,M=function(e){return e&&e.Math==Math&&e},N=M("object"==typeof globalThis&&globalThis)||M("object"==typeof window&&window)||M("object"==typeof self&&self)||M("object"==typeof _&&_)||function(){return this}()||Function("return this")(),j=Object.defineProperty,L=function(e,t){try{j(N,e,{value:t,configurable:!0,writable:!0})}catch(n){N[e]=t}return t},D=N["__core-js_shared__"]||L("__core-js_shared__",{}),z=x(function(e){(e.exports=function(e,t){return D[e]||(D[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"})}),T=TypeError,k=function(e){if(null==e)throw T("Can't call method on "+e);return e},R=Object,F=function(e){return R(k(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},X=function(e){return Z(e)?e:void 0},W=function(e,t){return arguments.length<2?X(N[e]):N[e]&&N[e][t]},K=W("navigator","userAgent")||"",J=N.process,Y=N.Deno,$=J&&J.versions||Y&&Y.version,Q=$&&$.v8;Q&&(I=(S=Q.split("."))[0]>0&&S[0]<4?1:+(S[0]+S[1])),!I&&K&&(!(S=K.match(/Edge\/(\d+)/))||S[1]>=74)&&(S=K.match(/Chrome\/(\d+)/))&&(I=+S[1]);var ee=I,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,re=z("wks"),ae=N.Symbol,ie=ae&&ae.for,le=ne?ae:ae&&ae.withoutSetter||q,oe=function(e){if(!H(re,e)||!te&&"string"!=typeof re[e]){var t="Symbol."+e;re[e]=te&&H(ae,e)?ae[e]:ne&&ie?ie(t):le(t)}return re[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,r;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"==(r=de(t))&&Z(t.callee)?"Arguments":r},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 r,a,i=ve(k(t)),l=P(n),o=i.length;return l<0||l>=o?e?"":void 0:(r=Ee(i,l))<55296||r>56319||l+1===o||(a=Ee(i,l+1))<56320||a>57343?e?be(i,l):r:e?Ae(i,l,l+2):a-56320+(r-55296<<10)+65536}},we={codeAt:Ce(!1),charAt:Ce(!0)},Oe=A(Function.toString);Z(D.inspectSource)||(D.inspectSource=function(e){return Oe(e)});var Pe,_e,xe,Se=D.inspectSource,Ie=N.WeakMap,Me=Z(Ie)&&/native code/.test(Se(Ie)),Ne=function(e){return"object"==typeof e?null!==e:Z(e)},je=!y(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),Le=N.document,De=Ne(Le)&&Ne(Le.createElement),ze=function(e){return De?Le.createElement(e):{}},Te=!je&&!y(function(){return 7!=Object.defineProperty(ze("div"),"a",{get:function(){return 7}}).a}),ke=je&&y(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Re=String,Fe=TypeError,Be=function(e){if(Ne(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=W("Symbol");return Z(t)&&Ve(t.prototype,Ge(e))},Ze=String,Xe=function(e){try{return Ze(e)}catch(e){return"Object"}},We=TypeError,Ke=function(e){if(Z(e))return e;throw We(Xe(e)+" is not a function")},Je=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(!Ne(e)||qe(e))return e;var n,r=Je(e,Qe);if(r){if(void 0===t&&(t="default"),n=Ue(r,e,t),!Ne(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,r;if("string"===t&&Z(n=e.toString)&&!Ne(r=Ue(n,e)))return r;if(Z(n=e.valueOf)&&!Ne(r=Ue(n,e)))return r;if("string"!==t&&Z(n=e.toString)&&!Ne(r=Ue(n,e)))return r;throw Ye("Can't convert object to primitive value")}(e,t)}(e,"string");return qe(t)?t:t+""},tt=TypeError,nt=Object.defineProperty,rt=Object.getOwnPropertyDescriptor,at={f:je?ke?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 r=rt(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return nt(e,t,n)}:nt:function(e,t,n){if(Be(e),t=et(t),Be(n),Te)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=je?function(e,t,n){return at.f(e,t,it(1,n))}:function(e,t,n){return e[t]=n,e},ot=z("keys"),st=function(e){return ot[e]||(ot[e]=q(e))},ut={},ct=N.TypeError;if(Me||D.state){var mt=D.state||(D.state=new(0,N.WeakMap)),dt=A(mt.get),ft=A(mt.has),gt=A(mt.set);Pe=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,Pe=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:Pe,get:_e,has:xe,enforce:function(e){return xe(e)?_e(e):Pe(e,{})},getterFor:function(e){return function(t){var n;if(!Ne(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,Ot=function(e){return wt(k(e))},Pt=Object.getOwnPropertyDescriptor,_t={f:je?Pt:function(e,t){if(e=Ot(e),t=et(t),Te)try{return Pt(e,t)}catch(e){}if(H(e,t))return it(!Ue(Et.f,e,t),e[t])}},xt=Function.prototype,St=je&&Object.getOwnPropertyDescriptor,It=H(xt,"name"),Mt={EXISTS:It,PROPER:It&&"something"===function(){}.name,CONFIGURABLE:It&&(!je||je&&St(xt,"name").configurable)},Nt=x(function(e){var t=Mt.CONFIGURABLE,n=ht.enforce,r=ht.get,a=Object.defineProperty,i=je&&!y(function(){return 8!==a(function(){},"length",{value:8}).length}),l=String(String).split("String"),o=e.exports=function(e,r,o){"Symbol("===String(r).slice(0,7)&&(r="["+String(r).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),o&&o.getter&&(r="get "+r),o&&o.setter&&(r="set "+r),(!H(e,"name")||t&&e.name!==r)&&a(e,"name",{value:r,configurable:!0}),i&&o&&H(o,"arity")&&e.length!==o.arity&&a(e,"length",{value:o.arity});try{o&&H(o,"constructor")&&o.constructor?je&&a(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 r?r:"")),e};Function.prototype.toString=o(function(){return Z(this)&&r(this).source||Se(this)},"toString")}),jt=function(e,t,n,r){r||(r={});var a=r.enumerable,i=void 0!==r.name?r.name:t;return Z(n)&&Nt(n,i,r),r.global?a?e[t]=n:L(t,n):(r.unsafe?e[t]&&(a=!0):delete e[t],a?e[t]=n:lt(e,t,n)),e},Lt=Math.max,Dt=Math.min,zt=Math.min,Tt=function(e){return(t=e.length)>0?zt(P(t),9007199254740991):0;var t},kt=function(e){return function(t,n,r){var a,i=Ot(t),l=Tt(i),o=function(e,t){var n=P(e);return n<0?Lt(n+t,0):Dt(n,t)}(r,l);if(e&&n!=n){for(;l>o;)if((a=i[o++])!=a)return!0}else for(;l>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},Rt=(kt(!0),kt(!1)),Ft=A([].push),Bt=function(e,t){var n,r=Ot(e),a=0,i=[];for(n in r)!H(ut,n)&&H(r,n)&&Ft(i,n);for(;t.length>a;)H(r,n=t[a++])&&(~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=W("Reflect","ownKeys")||function(e){var t=Vt.f(Be(e)),n=Gt.f;return n?qt(t,n(e)):t},Xt=function(e,t,n){for(var r=Zt(t),a=at.f,i=_t.f,l=0;l<r.length;l++){var o=r[l];H(e,o)||n&&H(n,o)||a(e,o,i(t,o))}},Wt=/#|\.prototype\./,Kt=function(e,t){var n=Yt[Jt(e)];return n==Qt||n!=$t&&(Z(t)?y(t):!!t)},Jt=Kt.normalize=function(e){return String(e).replace(Wt,".").toLowerCase()},Yt=Kt.data={},$t=Kt.NATIVE="N",Qt=Kt.POLYFILL="P",en=Kt,tn=_t.f,nn=function(e,t){var n,r,a,i,l,o=e.target,s=e.global,u=e.stat;if(n=s?N:u?N[o]||L(o,{}):(N[o]||{}).prototype)for(r in t){if(i=t[r],a=e.dontCallGetSet?(l=tn(n,r))&&l.value:n[r],!en(s?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Xt(i,a)}(e.sham||a&&a.sham)&&lt(i,"sham",!0),jt(n,r,i,e)}},rn=Object.keys||function(e){return Bt(e,Ht)},an={f:je&&!ke?Object.defineProperties:function(e,t){Be(e);for(var n,r=Ot(t),a=rn(t),i=a.length,l=0;i>l;)at.f(e,n=a[l++],r[n]);return e}},ln=W("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=ze("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:an.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])||jt(dn,An,function(){return this});var wn={IteratorPrototype:dn,BUGGY_SAFARI_ITERATORS:Cn},On=at.f,Pn=oe("toStringTag"),_n=function(e,t,n){e&&!n&&(e=e.prototype),e&&!H(e,Pn)&&On(e,Pn,{configurable:!0,value:t})},xn={},Sn=wn.IteratorPrototype,In=function(){return this},Mn=String,Nn=TypeError,jn=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,r){return Be(n),function(e){if("object"==typeof e||Z(e))return e;throw Nn("Can't set "+Mn(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),Ln=wn.IteratorPrototype,Dn=wn.BUGGY_SAFARI_ITERATORS,zn=oe("iterator"),Tn=function(){return this},kn=we.charAt,Rn=ht.set,Fn=ht.getterFor("String Iterator");!function(e,t,n,r,a,i,l){!function(e,t,n,r){e.prototype=pn(Sn,{next:it(1,function(){var e,t=Fn(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=kn(n,r),t.index+=e.length,{value:e,done:!1})})}),_n(e,"String Iterator",!1),xn["String Iterator"]=In}(n);var o,s,u,c=function(e){if(void 0===e&&f)return f;if(!Dn&&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[zn]||m["@@iterator"]||void 0,f=!Dn&&d||c(void 0);if(void(d&&(o=En(d.call(new e)))!==Object.prototype&&o.next&&(En(o)!==Ln&&(jn?jn(o,Ln):Z(o[zn])||jt(o,zn,Tn)),_n(o,"String Iterator",!0))))if(void(s={values:c("values"),keys:c("keys"),entries:c("entries")}))for(u in s)(Dn||!(u in m))&&jt(m,u,s[u]);else nn({target:"String",proto:!0,forced:Dn||!1},s);m[zn]!==f&&jt(m,zn,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,r){try{return r?t(Be(n)[0],n[1]):t(n)}catch(t){!function(e,t,n){var r;Be(e);try{if(!(r=Je(e,"return")))throw n;r=Ue(r,e)}catch(e){r=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(){},Xn=[],Wn=W("Reflect","construct"),Kn=/^\s*(?:class|function)\b/,Jn=A(Kn.exec),Yn=!Kn.exec(Zn),$n=function(e){if(!Z(e))return!1;try{return Wn(Zn,Xn,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||!!Jn(Kn,Se(e))}catch(e){return!0}};Qn.sham=!0;var er=!Wn||y(function(){var e;return $n($n.call)||!$n(Object)||!$n(function(){e=!0})||e})?Qn:$n,tr=function(e,t,n){var r=et(t);r in e?at.f(e,r,it(0,n)):e[r]=n},nr=oe("iterator"),rr=function(e){if(null!=e)return Je(e,nr)||Je(e,"@@iterator")||xn[ye(e)]},ar=TypeError,ir=function(e,t){var n=arguments.length<2?rr(e):t;if(Ke(n))return Be(Ue(n,e));throw ar(Xe(e)+" is not iterable")},lr=Array,or=oe("iterator"),sr=!1;try{var ur=0,cr={next:function(){return{done:!!ur++}},return:function(){sr=!0}};cr[or]=function(){return this},Array.from(cr,function(){throw 2})}catch(e){}var mr,dr,fr,gr=!function(e,t){if(!sr)return!1;var n=!1;try{var r={};r[or]=function(){return{next:function(){return{done:n=!0}}}},Array.from(r)}catch(e){}return n}();function pr(e){return Math.round(100*e)}function yr(e){return Number((e/100).toFixed(2))}function hr(e){return String(yr(e)).replace(".",",")}nn({target:"Array",stat:!0,forced:gr},{from:function(e){var t=F(e),n=er(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=Hn(a,r>2?arguments[2]:void 0));var l,o,s,u,c,m,d=rr(t),f=0;if(!d||this===lr&&qn(d))for(l=Tt(t),o=n?new this(l):lr(l);l>f;f++)m=i?a(t[f],f):t[f],tr(o,f,m);else for(c=(u=ir(t,d)).next,o=n?new this:[];!(s=Ue(c,u)).done;f++)m=i?Un(u,a,[s.value,f],!0):s.value,tr(o,f,m);return o.length=f,o}}),function(e){e.PaymentPlans="PaymentPlans",e.Modal="Modal"}(mr||(mr={})),function(e){e.PENDING="pending",e.SUCCESS="success",e.FAILED="failed"}(dr||(dr={})),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"}(fr||(fr={}));var vr,br=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(vr=window.Element.prototype).matches&&(vr.matches=vr.msMatchesSelector||vr.mozMatchesSelector||vr.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 vr.closest&&(vr.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,r=/[\11\12\14\15\40]/,a=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!==(a=t.search(r)))throw new DOMException("Failed to execute '"+e+"' on 'DOMTokenList': The token provided ('"+t[a]+"') contains HTML space characters, which are not valid in tokens.")};"function"!=typeof DOMTokenList&&function(e){var t=e.document,n=e.Object,a=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 a=t.srcElement,i=a[" uCLp"],o=""+a[n],u=o.trim().split(r),c=a["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,a.classList=c,a.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,a=new t;e:for(var i=e.className.trim().split(r),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 a},configurable:0,set:function(t){s=1,e.className=n.value=t+="",s=0;var i=t.trim().split(r),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}a[o-c]=i[o]}for(var d=u-c;d<l;++d)delete a[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=a,e[" uCL"]=a,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="",r=this[" uCL"],a=r[" uCLp"];e!==t;++e){i("add",n=arguments[e]+"");for(var l=0,o=a.length,u=n;l!==o;++l){if(this[l]===n)continue e;u+=" "+this[l]}this[o]=n,a.length+=1,a.value=u}s=1,r.className=a.value,s=0},u.prototype.remove=function(){for(var e=0,t=arguments.length,n="",r=this[" uCL"],a=r[" uCLp"];e!==t;++e){i("remove",n=arguments[e]+"");for(var l=0,o=a.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],a.length-=1,a.value=u)}s=1,r.className=a.value,s=0},e.DOMTokenList=u;try{e.Object.defineProperty(e.Element.prototype,"classList",{enumerable:1,get:function(e){return a.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 r=arguments[1];t!==n;++t)e.call(r,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 Er={"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 - 1X</strong> beim Check-out.","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.","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}"},Ar={"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 - 1X</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.","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}"},Cr={"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éjese guiar y valide su pago en <strong>2 minutos.</strong>","eligibility-modal.bullet-3":"<strong>Mantenga 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":"Elija <strong>Alma - 1X</strong> en la caja.","eligibility-modal.p1x-bullet-2":"Introduzca los datos de su tarjeta de crédito en <strong>.</strong>","eligibility-modal.p1x-bullet-3":"<strong>¡La validación </strong> de su 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.","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}"},wr={"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 - 1X</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.","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":"Payez maintenant {totalAmount}"},Or={"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 - 1X</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.","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}"},Pr={"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.","eligibility-modal.bullet-2":"Laat ons je begeleiden en jouw betaling valideren in <strong>2 minuten.</strong>","eligibility-modal.bullet-3":"<strong>Behoudt de controle</strong> door jouw deadlines op je eigen tempo vooruit of achteruit te schuiven.","eligibility-modal.no-eligibility":"Oeps, het lijkt erop dat de simulatie niet werkte.","eligibility-modal.p1x-bullet-1":"Kies <strong>Alma - 1X</strong> bij het afrekenen.","eligibility-modal.p1x-bullet-2":"Vul jouw <strong>creditcardgegevens </strong> in.","eligibility-modal.p1x-bullet-3":"<strong>De bevestiging </strong> van jouw betaling is onmiddellijk!","eligibility-modal.title-deferred-plan":"Betaal in termijnen of later via iDEAL of per creditcard met Alma.","eligibility-modal.title-normal":"Betaal in termijnen met iDEAL of creditcard bij Alma.","installments.today":"Tegenwoordig","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 met Alma","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":"Van {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}"},_r={"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 custo do crédito","eligibility-modal.bullet-1":"Escolha a <strong>Alma</strong> no checkout.","eligibility-modal.bullet-2":"Deixe-nos guiá-lo e validar o seu pagamento em <strong>2 minutos.</strong>","eligibility-modal.bullet-3":"<strong>Mantenha-se em controlo</strong> avançando ou recuando os seus prazos ao seu próprio ritmo.","eligibility-modal.no-eligibility":"Ups, parece que a simulação não funcionou.","eligibility-modal.p1x-bullet-1":"Escolher <strong>Alma - 1X</strong> no checkout.","eligibility-modal.p1x-bullet-2":"Preencha as informações do seu <strong>cartão de crédito.</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 de crédito com Alma.","installments.today":"Hoje","installments.total-amount":"Total","installments.total-fees":"Dos quais custos (incl. IVA)","payment-plan-strings.day-abbreviation":"D{deferredDays}","payment-plan-strings.default-message":"Pague em prestações através da 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":"Pague agora {totalAmount}"},xr=function(e){switch(e.slice(0,2)){case fr.fr:return wr;case fr.es:return Cr;case fr.it:return Or;case fr.de:return Er;case fr.pt:return _r;case fr.nl:return Pr;case fr.en:default:return Ar}},Sr=function(t){var n=t.children,a=t.locale;return e.createElement(r,{messages:xr(a),locale:a,defaultLocale:"en"},n)};function Ir(){return(Ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Mr(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(a[n]=e[n]);return a}var Nr=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)},jr=function(e,r,a,i,l){var o,s,u=r.domain,c=r.merchantId,m=t([]),d=m[0],f=m[1],g=t(dr.PENDING),p=g[0],y=g[1],h=null==a?void 0:a.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===dr.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:Ir({"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"}).then(function(e){f(e),y(dr.SUCCESS)}).catch(function(){y(dr.FAILED)})}},[p]),[(o=d,s=a,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 Ir({},e,{eligible:Nr(e,n)},function(e,t){var n,r=null==(n=e.constraints)?void 0:n.purchase_amount;return r&&t?{minAmount:Math.max(t.minAmount,null==r?void 0:r.minimum),maxAmount:Math.min(t.maxAmount,null==r?void 0:r.maximum)}:null!=t?t:{}}(e,n))}):o.filter(function(e){return!(1===e.installments_count&&0===e.deferred_days&&0===e.deferred_months)})),p]},Lr="alma-eligibility-modal",Dr={desktopModal:Lr+"-desktop-modal",mobileModal:Lr+"-mobile-modal",leftSide:Lr+"-left-side",bullet:Lr+"-bullet",rightSide:Lr+"-right-side",title:Lr+"-title",info:Lr+"-info",infoMessage:Lr+"-info-message",eligibilityOptions:Lr+"-eligibility-options",activeOption:Lr+"-active-option",closeButton:Lr+"-close-button",scheduleDetails:Lr+"-schedule-details",scheduleTotal:Lr+"-schedule-total",scheduleCredit:Lr+"-schedule-credit",cardContainer:Lr+"-card-logos",summary:Lr+"-summary"},zr=function(t){var n=t.currentPlan,r=a(),o=yr(n.purchase_amount+n.customer_total_cost_amount),s=yr(n.customer_total_cost_amount),u=(null==n?void 0:n.annual_interest_rate)&&n.annual_interest_rate/1e4||0,m=yr(n.customer_total_cost_amount),d=n.installments_count>4;return e.createElement("div",{className:c("_GTTk7",Dr.summary),"data-testid":"modal-summary"},e.createElement("div",{className:c("_34s2g",Dr.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",Dr.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:r.formatNumber(s,{style:"currency",currency:"EUR"}),taegPercentage:r.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"})))))},Tr=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 kr(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 Rr,Fr,Br,Hr=["children","isOpen","onClose","className","contentClassName","scrollable"],Ur=function(t){var n,r=t.children,a=t.isOpen,i=t.onClose,l=t.className,o=t.contentClassName,s=t.scrollable,u=void 0!==s&&s,f=Mr(t,Hr);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:a,shouldCloseOnOverlayClick:!0,shouldCloseOnEsc:!0},f),e.createElement("div",{className:"_12LLh"},e.createElement("button",{onClick:i,className:c("_3YRro",Dr.closeButton),"data-testid":"modal-close-button"},e.createElement(kr,null))),e.createElement("div",{className:c("_ocM9x",o,(n={},n._1GP2F=u,n))},r))},Vr=function(t){var n=t.deferred_days,r=t.deferred_months,a=t.installments_count;return 1===a&&n?e.createElement(i,{id:"payment-plan-strings.day-abbreviation",defaultMessage:"J{deferredDays}",values:{deferredDays:"+"+n}}):1===a&&r?e.createElement(i,{id:"payment-plan-strings.month-abbreviation",defaultMessage:"M{deferredMonths}",values:{deferredMonths:"+"+r}}):a+"x"},Gr=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)"}))},qr=function(t){var n=t.eligibilityPlans,r=t.currentPlanIndex,a=t.setCurrentPlanIndex;return e.createElement("div",{className:c("_1l2Oa",Dr.eligibilityOptions)},n.map(function(t,n){var i;return e.createElement("button",{key:n,className:c((i={},i[c("_3rue7",Dr.activeOption)]=n===r,i)),onClick:function(){return a(n)}},Vr(t))}))},Zr=function(t){var n,r,a=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*a.due_date)?e.createElement(i,{id:"installments.today",defaultMessage:"Aujourd'hui",tagName:"strong"}):e.createElement(o,{value:1e3*a.due_date,day:"numeric",month:"long",year:"numeric"})),e.createElement("div",{className:c((r={},r["_ezY-3"]=0===s,r))},e.createElement(l,{value:a.total_amount/100,style:"currency",currency:"EUR"})))},Xr=function(t){var n=t.currentPlan,r=n.installments_count>4;return e.createElement(e.Fragment,null,e.createElement("div",{className:c("_MPKjS",Dr.scheduleDetails),"data-testid":"modal-installments-element"},((null==n?void 0:n.payment_plan)||[]).map(function(t,n){return e.createElement(Zr,{key:1e3*t.due_date,installment:t,index:n})}),r&&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."}))))},Wr=["color"],Kr=function(t){var n=t.color,r=void 0===n?"#FA5022":n,a=Mr(t,Wr);return e.createElement("svg",Object.assign({width:"50",height:"25",viewBox:"0 0 360 109",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),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:r}))},Jr=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"}))))},Yr=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"})))},$r=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"}))))))},Qr=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"}))))},ea={cardContainer:"_1N3yO"},ta=function(t){var n=Array.from(new Set(t.cards));return e.createElement("div",{"data-testid":"card-logos",className:c(ea.cardContainer,Dr.cardContainer)},n.map(function(t){return e.createElement("div",{key:t,className:ea.card,"data-testid":"card-logo-"+t},"cb"===t&&e.createElement(Qr,null),"amex"===t&&e.createElement(Jr,null),"mastercard"===t&&e.createElement($r,null),"visa"===t&&e.createElement(Yr,null))}))},na=function(t){var n=t.isCurrentPlanP1X;return e.createElement("div",{className:c("_180ro",Dr.info),"data-testid":"modal-info-element"},e.createElement("div",{className:"_1HqCO"},e.createElement("div",{className:c("_3B8wx",Dr.bullet)},"1"),e.createElement("div",{className:Dr.infoMessage},e.createElement(i,n?{id:"eligibility-modal.p1x-bullet-1",defaultMessage:"Choisissez <strong>Alma - 1X</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",Dr.bullet)},"2"),e.createElement("div",{className:Dr.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",Dr.bullet)},"3"),e.createElement("div",{className:Dr.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))}}}))))},ra=function(t){var n=t.isSomePlanDeferred;return e.createElement("div",{className:c("_3ERx-",Dr.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."}:{id:"eligibility-modal.title-normal",defaultMessage:"Payez en plusieurs fois par carte bancaire avec Alma."}))},aa=function(t){var n=t.children,r=t.isSomePlanDeferred,a=t.cards,i=t.isCurrentPlanP1X;return e.createElement("div",{className:c("_21g6u",Dr.desktopModal),"data-testid":"modal-container"},e.createElement("aside",{className:c(["_3zaP5","_2SBRC",Dr.leftSide])},e.createElement(ra,{isSomePlanDeferred:r}),e.createElement(na,{isCurrentPlanP1X:i}),a&&e.createElement(ta,{cards:a}),e.createElement(Kr,{className:"_xW3wt",width:"75"})),e.createElement("div",{className:c("_3zaP5",Dr.rightSide)},n))},ia=function(t){var n=t.children,r=t.isSomePlanDeferred,a=t.cards,i=t.isCurrentPlanP1X;return e.createElement("div",{className:c("_2G7Ch",Dr.mobileModal),"data-testid":"modal-container"},e.createElement(ra,{isSomePlanDeferred:r}),n,e.createElement(na,{isCurrentPlanP1X:i}),a&&e.createElement(ta,{cards:a}),e.createElement(Kr,{className:"_2779r",width:"75"}))},la=function(n){var r=n.onClose,a=n.eligibilityPlans,l=n.status,o=n.cards,s=t(n.initialPlanIndex||0),u=s[0],c=s[1],m=f({minWidth:800})?aa:ia,d=a.filter(function(e){return e.eligible}),g=d[u],p=a.some(function(e){return e.deferred_days>0||e.deferred_months>0});return e.createElement(Ur,{onClose:r,ariaHideApp:!1,scrollable:!0,isOpen:!0},e.createElement(m,{isSomePlanDeferred:p,cards:o,isCurrentPlanP1X:br(g)},l===dr.PENDING&&e.createElement("div",{className:"_2oTJq"},e.createElement(Tr,null)),l===dr.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===dr.SUCCESS&&d.length>=1&&e.createElement(e.Fragment,null,e.createElement(qr,{eligibilityPlans:d,currentPlanIndex:u,setCurrentPlanIndex:c}),e.createElement("div",{className:"_2u9rj"},e.createElement("div",{className:"_VRdAU"}),e.createElement(Xr,{currentPlan:g}),e.createElement(zr,{currentPlan:g})))))},oa=function(t){var n=t.onClose,r=t.cards,a=jr(t.purchaseAmount,t.apiData,t.configPlans,t.customerBillingCountry,t.customerShippingCountry);return e.createElement(la,{initialPlanIndex:0,onClose:n,eligibilityPlans:a[0],status:a[1],cards:r})},sa=function(t){return e.createElement("div",{className:c("_2SwwZ",t.className),"data-testid":"loader"},e.createElement("div",{className:"_2qODo"}),e.createElement("div",{className:"_2YO01"}))},ua="alma-payment-plans",ca={container:ua+"-container",eligibilityLine:ua+"-eligibility-line",eligibilityOptions:ua+"-eligibility-options",notEligibleOption:ua+"-not-eligible-option",paymentInfo:ua+"-payment-info",activeOption:ua+"-active-option"},ma=function(r){var a,s,u,m,d=r.hideIfNotEligible,f=r.monochrome,p=r.suggestedPaymentPlan,y=r.cards,h=r.transitionDelay,v=r.hideBorder,b=void 0!==v&&v,E=r.onModalClose,A=jr(r.purchaseAmount,r.apiData,r.configPlans,r.customerBillingCountry,r.customerShippingCountry),C=A[0],w=A[1],O=C.filter(function(e){return e.eligible}),P=function(e){var t=e.suggestedPaymentPlan,n=e.eligibilityPlans,r=Array.isArray(t)?t:[t],a=function(e){var t=r[e],a=n.findIndex(function(e){return e.installments_count===t&&e.eligible&&!e.deferred_days&&!e.deferred_months});if(-1!==a)return{v:a}};for(var i in r){var l=a(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),I=S[0],M=S[1],N=C.reduce(function(e,t,n){return t.eligible?[].concat(e,[n]):e},[]),j=function(e,r){var a=t(0),i=a[0],l=a[1],o=t(!0),s=o[0],u=o[1];return n(function(){var t,n=!0;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])},r)),function(){n=!1,clearTimeout(t)}},[e,i]),{current:i,onHover:function(e){l(e),u(!1)},onLeave:function(){u(!0)}}}(N,x?null!=h?h:5500:_?36e5:5500),L=j.current,D=j.onHover,z=j.onLeave;return n(function(){w===dr.SUCCESS&&_&&(D(P),z())},[w]),w===dr.PENDING?e.createElement("div",{className:c("_TSkFv","_1ZDMS")},e.createElement(sa,null)):d&&0===O.length||0===C.length||w===dr.FAILED?null:e.createElement(e.Fragment,null,e.createElement("div",{onClick:function(e){e.preventDefault(),O.length>0&&M(!0)},className:c("_TSkFv",(a={},a._UksZa=O.length>0,a["_1lr-q"]=0===O.length,a._3_qcn=b,a),ca.container),"data-testid":"widget-button"},e.createElement("div",{className:c("_bMClc",ca.eligibilityLine)},e.createElement(Kr,{className:"_LJ4nZ",color:f?"var(--off-black)":void 0}),e.createElement("div",{className:c("_17c_S",ca.eligibilityOptions)},C.map(function(t,n){var r,a=n===L;return e.createElement("div",{key:n,onMouseEnter:function(){return D(n)},onTouchStart:function(){return D(n)},onMouseOut:z,onTouchEnd:z,className:c("_2Kqjn",(r={},r[c("_3dG_J",ca.activeOption)]=a,r._2hx83=f&&a,r[c("_3O1bg",ca.notEligibleOption)]=!t.eligible,r))},Vr(t))}))),e.createElement("div",{className:c("_25GrF",(s={},s[c("_3O1bg",ca.notEligibleOption)]=C[L]&&!C[L].eligible,s),ca.paymentInfo)},0!==C.length&&function(t){var n=t.installments_count,r=t.minAmount,a=void 0===r?0:r,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:yr(u),style:"currency",currency:"EUR"})}}:{id:"payment-plan-strings.ineligible-lower-than-min",defaultMessage:"À partir de {minAmount}",values:{minAmount:e.createElement(l,{value:yr(a),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:yr(c[0].total_amount),style:"currency",currency:"EUR"}),dueDate:e.createElement(o,{value:g(c[0].due_date),day:"numeric",month:"long",year:"numeric"})}}),Gr(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 br(t)?e.createElement(e.Fragment,null,e.createElement(i,{id:"payment-plan-strings.pay-now",defaultMessage:"Payez maintenant {totalAmount}",values:{totalAmount:e.createElement(l,{value:yr(c[0].total_amount),style:"currency",currency:"EUR"}),installmentsCount:n}}),Gr(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:yr(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:yr(c[0].total_amount),style:"currency",currency:"EUR"}),numberOfRemainingInstallments:n-1,othersInstallmentAmount:e.createElement(l,{value:yr(c[1].total_amount),style:"currency",currency:"EUR"})}}),Gr(t))}return e.createElement(i,{id:"payment-plan-strings.default-message",defaultMessage:"Payez en plusieurs fois avec Alma"})}(C[L]))),I&&e.createElement(la,{initialPlanIndex:(u=L,m=N.findIndex(function(e){return e===u}),-1===m?0:m),onClose:function(e){M(!1),E&&E(e)},eligibilityPlans:O,status:w,cards:y}))},da=function(){function t(e){this.apiData=e}return t.prototype.add=function(t,n){var r=this,a=document.querySelector(n.container);if(a&&s(a),t===mr.PaymentPlans){var i=n.container,l=n.hideBorder,o=n.monochrome,c=n.locale;a&&u(e.createElement(Sr,{locale:void 0===c?fr.en:c},e.createElement(ma,{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===mr.Modal){var m,d=n.container,f=n.clickableSelector,g=n.purchaseAmount,p=n.plans,y=n.locale,h=void 0===y?fr.en:y,v=n.customerBillingCountry,b=n.customerShippingCountry,E=n.cards,A=n.onClose,C=function(e){a&&(s(a),A&&A(e))},w=function(){u(e.createElement(Sr,{locale:h},e.createElement(oa,{purchaseAmount:g,apiData:r.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"}(Rr||(Rr={})),function(e){e.initialize=function(e,t){return new da({domain:t,merchantId:e})},e.PaymentPlans=mr.PaymentPlans,e.Modal=mr.Modal}(Fr||(Fr={})),function(e){e.priceToCents=pr,e.priceFromCents=yr,e.formatCents=hr}(Br||(Br={}));export{Rr as ApiMode,Br as Utils,Fr as Widgets};
2
2
  //# sourceMappingURL=widgets.m.js.map