@alma/widgets 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/raw/widgets.js +3 -3
- package/dist/raw/widgets.m.js +3 -3
- package/dist/raw/widgets.modern.js +3 -3
- package/dist/raw/widgets.umd.js +3 -3
- package/dist/widgets.js +1 -1
- package/dist/widgets.js.map +1 -1
- package/dist/widgets.m.js +1 -1
- package/dist/widgets.m.js.map +1 -1
- package/dist/widgets.modern.js +1 -1
- package/dist/widgets.modern.js.map +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [2.3.1](https://github.com/alma/widgets/compare/v2.3.0...v2.3.1) (2022-05-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update wrong translation ([#33](https://github.com/alma/widgets/issues/33)) ([578e6cd](https://github.com/alma/widgets/commit/578e6cd7550df6cc01fd7ad9968a4e8c9bb745e8))
|
|
7
|
+
|
|
1
8
|
# [2.3.0](https://github.com/alma/widgets/compare/v2.2.10...v2.3.0) (2022-04-21)
|
|
2
9
|
|
|
3
10
|
|
package/dist/raw/widgets.js
CHANGED
|
@@ -1573,7 +1573,7 @@ var messagesES = {
|
|
|
1573
1573
|
"payment-plan-strings.deferred": "{totalAmount} a pagar el {dueDate}",
|
|
1574
1574
|
"payment-plan-strings.ineligible-greater-than-max": "Hasta {maxAmount}",
|
|
1575
1575
|
"payment-plan-strings.ineligible-lower-than-min": "Desde {minAmount}",
|
|
1576
|
-
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} mensualidad de {othersInstallmentAmount}} other {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} de {othersInstallmentAmount}
|
|
1576
|
+
"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}}}",
|
|
1577
1577
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} plazos de {totalAmount}",
|
|
1578
1578
|
"payment-plan-strings.no-fee": "(sin intereses)"
|
|
1579
1579
|
};
|
|
@@ -1617,7 +1617,7 @@ var messagesIT = {
|
|
|
1617
1617
|
"payment-plan-strings.deferred": "{totalAmount} da pagare il {dueDate}",
|
|
1618
1618
|
"payment-plan-strings.ineligible-greater-than-max": "Disponibile fino a {maxAmount}",
|
|
1619
1619
|
"payment-plan-strings.ineligible-lower-than-min": "Pagamento rateale disponibile a partire da {minAmount}",
|
|
1620
|
-
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {Oggi paghi {firstInstallmentAmount} poi {numberOfRemainingInstallments}
|
|
1620
|
+
"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}}}",
|
|
1621
1621
|
"payment-plan-strings.multiple-installments-same-amount": "In {installmentsCount} rate mensili di {totalAmount}",
|
|
1622
1622
|
"payment-plan-strings.no-fee": "(senza interessi)"
|
|
1623
1623
|
};
|
|
@@ -1625,7 +1625,7 @@ var messagesIT = {
|
|
|
1625
1625
|
var messagesNL = {
|
|
1626
1626
|
"eligibility-modal.bullet-1": "Kies <strong>Alma</strong> bij het afrekenen.",
|
|
1627
1627
|
"eligibility-modal.bullet-2": "Vul de <strong>gevraagde informatie</strong> in.",
|
|
1628
|
-
"eligibility-modal.bullet-3": "
|
|
1628
|
+
"eligibility-modal.bullet-3": "Onmiddelijke validatie van uw betaling ",
|
|
1629
1629
|
"eligibility-modal.cost": "Waarvan kosten",
|
|
1630
1630
|
"eligibility-modal.credit-commitment": "Een lening bindt je en moet worden terugbetaald. Ga na of u kunt terugbetalen voordat u zich vastlegt.",
|
|
1631
1631
|
"eligibility-modal.credit-cost": "Waarvan kosten van krediet",
|
package/dist/raw/widgets.m.js
CHANGED
|
@@ -1570,7 +1570,7 @@ var messagesES = {
|
|
|
1570
1570
|
"payment-plan-strings.deferred": "{totalAmount} a pagar el {dueDate}",
|
|
1571
1571
|
"payment-plan-strings.ineligible-greater-than-max": "Hasta {maxAmount}",
|
|
1572
1572
|
"payment-plan-strings.ineligible-lower-than-min": "Desde {minAmount}",
|
|
1573
|
-
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} mensualidad de {othersInstallmentAmount}} other {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} de {othersInstallmentAmount}
|
|
1573
|
+
"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}}}",
|
|
1574
1574
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} plazos de {totalAmount}",
|
|
1575
1575
|
"payment-plan-strings.no-fee": "(sin intereses)"
|
|
1576
1576
|
};
|
|
@@ -1614,7 +1614,7 @@ var messagesIT = {
|
|
|
1614
1614
|
"payment-plan-strings.deferred": "{totalAmount} da pagare il {dueDate}",
|
|
1615
1615
|
"payment-plan-strings.ineligible-greater-than-max": "Disponibile fino a {maxAmount}",
|
|
1616
1616
|
"payment-plan-strings.ineligible-lower-than-min": "Pagamento rateale disponibile a partire da {minAmount}",
|
|
1617
|
-
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {Oggi paghi {firstInstallmentAmount} poi {numberOfRemainingInstallments}
|
|
1617
|
+
"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}}}",
|
|
1618
1618
|
"payment-plan-strings.multiple-installments-same-amount": "In {installmentsCount} rate mensili di {totalAmount}",
|
|
1619
1619
|
"payment-plan-strings.no-fee": "(senza interessi)"
|
|
1620
1620
|
};
|
|
@@ -1622,7 +1622,7 @@ var messagesIT = {
|
|
|
1622
1622
|
var messagesNL = {
|
|
1623
1623
|
"eligibility-modal.bullet-1": "Kies <strong>Alma</strong> bij het afrekenen.",
|
|
1624
1624
|
"eligibility-modal.bullet-2": "Vul de <strong>gevraagde informatie</strong> in.",
|
|
1625
|
-
"eligibility-modal.bullet-3": "
|
|
1625
|
+
"eligibility-modal.bullet-3": "Onmiddelijke validatie van uw betaling ",
|
|
1626
1626
|
"eligibility-modal.cost": "Waarvan kosten",
|
|
1627
1627
|
"eligibility-modal.credit-commitment": "Een lening bindt je en moet worden terugbetaald. Ga na of u kunt terugbetalen voordat u zich vastlegt.",
|
|
1628
1628
|
"eligibility-modal.credit-cost": "Waarvan kosten van krediet",
|
|
@@ -1550,7 +1550,7 @@ var messagesES = {
|
|
|
1550
1550
|
"payment-plan-strings.deferred": "{totalAmount} a pagar el {dueDate}",
|
|
1551
1551
|
"payment-plan-strings.ineligible-greater-than-max": "Hasta {maxAmount}",
|
|
1552
1552
|
"payment-plan-strings.ineligible-lower-than-min": "Desde {minAmount}",
|
|
1553
|
-
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} mensualidad de {othersInstallmentAmount}} other {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} de {othersInstallmentAmount}
|
|
1553
|
+
"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}}}",
|
|
1554
1554
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} plazos de {totalAmount}",
|
|
1555
1555
|
"payment-plan-strings.no-fee": "(sin intereses)"
|
|
1556
1556
|
};
|
|
@@ -1594,7 +1594,7 @@ var messagesIT = {
|
|
|
1594
1594
|
"payment-plan-strings.deferred": "{totalAmount} da pagare il {dueDate}",
|
|
1595
1595
|
"payment-plan-strings.ineligible-greater-than-max": "Disponibile fino a {maxAmount}",
|
|
1596
1596
|
"payment-plan-strings.ineligible-lower-than-min": "Pagamento rateale disponibile a partire da {minAmount}",
|
|
1597
|
-
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {Oggi paghi {firstInstallmentAmount} poi {numberOfRemainingInstallments}
|
|
1597
|
+
"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}}}",
|
|
1598
1598
|
"payment-plan-strings.multiple-installments-same-amount": "In {installmentsCount} rate mensili di {totalAmount}",
|
|
1599
1599
|
"payment-plan-strings.no-fee": "(senza interessi)"
|
|
1600
1600
|
};
|
|
@@ -1602,7 +1602,7 @@ var messagesIT = {
|
|
|
1602
1602
|
var messagesNL = {
|
|
1603
1603
|
"eligibility-modal.bullet-1": "Kies <strong>Alma</strong> bij het afrekenen.",
|
|
1604
1604
|
"eligibility-modal.bullet-2": "Vul de <strong>gevraagde informatie</strong> in.",
|
|
1605
|
-
"eligibility-modal.bullet-3": "
|
|
1605
|
+
"eligibility-modal.bullet-3": "Onmiddelijke validatie van uw betaling ",
|
|
1606
1606
|
"eligibility-modal.cost": "Waarvan kosten",
|
|
1607
1607
|
"eligibility-modal.credit-commitment": "Een lening bindt je en moet worden terugbetaald. Ga na of u kunt terugbetalen voordat u zich vastlegt.",
|
|
1608
1608
|
"eligibility-modal.credit-cost": "Waarvan kosten van krediet",
|
package/dist/raw/widgets.umd.js
CHANGED
|
@@ -6178,7 +6178,7 @@
|
|
|
6178
6178
|
"payment-plan-strings.deferred": "{totalAmount} a pagar el {dueDate}",
|
|
6179
6179
|
"payment-plan-strings.ineligible-greater-than-max": "Hasta {maxAmount}",
|
|
6180
6180
|
"payment-plan-strings.ineligible-lower-than-min": "Desde {minAmount}",
|
|
6181
|
-
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} mensualidad de {othersInstallmentAmount}} other {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} de {othersInstallmentAmount}
|
|
6181
|
+
"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}}}",
|
|
6182
6182
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} plazos de {totalAmount}",
|
|
6183
6183
|
"payment-plan-strings.no-fee": "(sin intereses)"
|
|
6184
6184
|
};
|
|
@@ -6222,7 +6222,7 @@
|
|
|
6222
6222
|
"payment-plan-strings.deferred": "{totalAmount} da pagare il {dueDate}",
|
|
6223
6223
|
"payment-plan-strings.ineligible-greater-than-max": "Disponibile fino a {maxAmount}",
|
|
6224
6224
|
"payment-plan-strings.ineligible-lower-than-min": "Pagamento rateale disponibile a partire da {minAmount}",
|
|
6225
|
-
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {Oggi paghi {firstInstallmentAmount} poi {numberOfRemainingInstallments}
|
|
6225
|
+
"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}}}",
|
|
6226
6226
|
"payment-plan-strings.multiple-installments-same-amount": "In {installmentsCount} rate mensili di {totalAmount}",
|
|
6227
6227
|
"payment-plan-strings.no-fee": "(senza interessi)"
|
|
6228
6228
|
};
|
|
@@ -6230,7 +6230,7 @@
|
|
|
6230
6230
|
var messagesNL = {
|
|
6231
6231
|
"eligibility-modal.bullet-1": "Kies <strong>Alma</strong> bij het afrekenen.",
|
|
6232
6232
|
"eligibility-modal.bullet-2": "Vul de <strong>gevraagde informatie</strong> in.",
|
|
6233
|
-
"eligibility-modal.bullet-3": "
|
|
6233
|
+
"eligibility-modal.bullet-3": "Onmiddelijke validatie van uw betaling ",
|
|
6234
6234
|
"eligibility-modal.cost": "Waarvan kosten",
|
|
6235
6235
|
"eligibility-modal.credit-commitment": "Een lening bindt je en moet worden terugbetaald. Ga na of u kunt terugbetalen voordat u zich vastlegt.",
|
|
6236
6236
|
"eligibility-modal.credit-cost": "Waarvan kosten van krediet",
|
package/dist/widgets.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("react"),n=e(t),a=require("react-intl"),r=require("react-dom"),i=e(require("classnames")),l=e(require("react-modal")),o=e(require("no-scroll")),s=require("react-responsive"),u=require("date-fns"),c=Math.ceil,m=Math.floor,d=function(e){return isNaN(e=+e)?0:(e>0?m:c)(e)},f=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},g=function(e){return function(t,n){var a,r,i=String(f(t)),l=d(n),o=i.length;return l<0||l>=o?e?"":void 0:(a=i.charCodeAt(l))<55296||a>56319||l+1===o||(r=i.charCodeAt(l+1))<56320||r>57343?e?i.charAt(l):a:e?i.slice(l,l+2):r-56320+(a-55296<<10)+65536}},p={codeAt:g(!1),charAt:g(!0)},y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(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 v=function(e){return e&&e.Math==Math&&e},b=v("object"==typeof globalThis&&globalThis)||v("object"==typeof window&&window)||v("object"==typeof self&&self)||v("object"==typeof y&&y)||function(){return this}()||Function("return this")(),E=function(e){try{return!!e()}catch(e){return!0}},A=!E(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),C=function(e){return"object"==typeof e?null!==e:"function"==typeof e},_=b.document,O=C(_)&&C(_.createElement),w=function(e){return O?_.createElement(e):{}},I=!A&&!E(function(){return 7!=Object.defineProperty(w("div"),"a",{get:function(){return 7}}).a}),S=function(e){if(!C(e))throw TypeError(String(e)+" is not an object");return e},P=function(e,t){if(!C(e))return e;var n,a;if(t&&"function"==typeof(n=e.toString)&&!C(a=n.call(e)))return a;if("function"==typeof(n=e.valueOf)&&!C(a=n.call(e)))return a;if(!t&&"function"==typeof(n=e.toString)&&!C(a=n.call(e)))return a;throw TypeError("Can't convert object to primitive value")},N=Object.defineProperty,x={f:A?N:function(e,t,n){if(S(e),t=P(t,!0),S(n),I)try{return N(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},M=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},D=A?function(e,t,n){return x.f(e,t,M(1,n))}:function(e,t,n){return e[t]=n,e},L=function(e,t){try{D(b,e,t)}catch(n){b[e]=t}return t},T=b["__core-js_shared__"]||L("__core-js_shared__",{}),j=Function.toString;"function"!=typeof T.inspectSource&&(T.inspectSource=function(e){return j.call(e)});var F,k,R,z=T.inspectSource,q=b.WeakMap,G="function"==typeof q&&/native code/.test(z(q)),U={}.hasOwnProperty,V=function(e,t){return U.call(e,t)},H=h(function(e){(e.exports=function(e,t){return T[e]||(T[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.8.1",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),B=0,Z=Math.random(),J=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++B+Z).toString(36)},W=H("keys"),K=function(e){return W[e]||(W[e]=J(e))},Y={};if(G){var Q=T.state||(T.state=new(0,b.WeakMap)),X=Q.get,$=Q.has,ee=Q.set;F=function(e,t){return t.facade=e,ee.call(Q,e,t),t},k=function(e){return X.call(Q,e)||{}},R=function(e){return $.call(Q,e)}}else{var te=K("state");Y[te]=!0,F=function(e,t){return t.facade=e,D(e,te,t),t},k=function(e){return V(e,te)?e[te]:{}},R=function(e){return V(e,te)}}var ne,ae,re,ie={set:F,get:k,has:R,enforce:function(e){return R(e)?k(e):F(e,{})},getterFor:function(e){return function(t){var n;if(!C(t)||(n=k(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},le={}.propertyIsEnumerable,oe=Object.getOwnPropertyDescriptor,se={f:oe&&!le.call({1:2},1)?function(e){var t=oe(this,e);return!!t&&t.enumerable}:le},ue={}.toString,ce=function(e){return ue.call(e).slice(8,-1)},me="".split,de=E(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==ce(e)?me.call(e,""):Object(e)}:Object,fe=function(e){return de(f(e))},ge=Object.getOwnPropertyDescriptor,pe={f:A?ge:function(e,t){if(e=fe(e),t=P(t,!0),I)try{return ge(e,t)}catch(e){}if(V(e,t))return M(!se.f.call(e,t),e[t])}},ye=h(function(e){var t=ie.get,n=ie.enforce,a=String(String).split("String");(e.exports=function(e,t,r,i){var l,o=!!i&&!!i.unsafe,s=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof r&&("string"!=typeof t||V(r,"name")||D(r,"name",t),(l=n(r)).source||(l.source=a.join("string"==typeof t?t:""))),e!==b?(o?!u&&e[t]&&(s=!0):delete e[t],s?e[t]=r:D(e,t,r)):s?e[t]=r:L(t,r)})(Function.prototype,"toString",function(){return"function"==typeof this&&t(this).source||z(this)})}),he=b,ve=function(e){return"function"==typeof e?e:void 0},be=function(e,t){return arguments.length<2?ve(he[e])||ve(b[e]):he[e]&&he[e][t]||b[e]&&b[e][t]},Ee=Math.min,Ae=function(e){return e>0?Ee(d(e),9007199254740991):0},Ce=Math.max,_e=Math.min,Oe=function(e){return function(t,n,a){var r,i=fe(t),l=Ae(i.length),o=function(e,t){var n=d(e);return n<0?Ce(n+t,0):_e(n,t)}(a,l);if(e&&n!=n){for(;l>o;)if((r=i[o++])!=r)return!0}else for(;l>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},we=(Oe(!0),Oe(!1)),Ie=function(e,t){var n,a=fe(e),r=0,i=[];for(n in a)!V(Y,n)&&V(a,n)&&i.push(n);for(;t.length>r;)V(a,n=t[r++])&&(~we(i,n)||i.push(n));return i},Se=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Pe=Se.concat("length","prototype"),Ne={f:Object.getOwnPropertyNames||function(e){return Ie(e,Pe)}},xe={f:Object.getOwnPropertySymbols},Me=be("Reflect","ownKeys")||function(e){var t=Ne.f(S(e)),n=xe.f;return n?t.concat(n(e)):t},De=function(e,t){for(var n=Me(t),a=x.f,r=pe.f,i=0;i<n.length;i++){var l=n[i];V(e,l)||a(e,l,r(t,l))}},Le=/#|\.prototype\./,Te=function(e,t){var n=Fe[je(e)];return n==Re||n!=ke&&("function"==typeof t?E(t):!!t)},je=Te.normalize=function(e){return String(e).replace(Le,".").toLowerCase()},Fe=Te.data={},ke=Te.NATIVE="N",Re=Te.POLYFILL="P",ze=Te,qe=pe.f,Ge=function(e,t){var n,a,r,i,l,o=e.target,s=e.global,u=e.stat;if(n=s?b:u?b[o]||L(o,{}):(b[o]||{}).prototype)for(a in t){if(i=t[a],r=e.noTargetGet?(l=qe(n,a))&&l.value:n[a],!ze(s?a:o+(u?".":"#")+a,e.forced)&&void 0!==r){if(typeof i==typeof r)continue;De(i,r)}(e.sham||r&&r.sham)&&D(i,"sham",!0),ye(n,a,i,e)}},Ue=function(e){return Object(f(e))},Ve=!E(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),He=K("IE_PROTO"),Be=Object.prototype,Ze=Ve?Object.getPrototypeOf:function(e){return e=Ue(e),V(e,He)?e[He]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Be:null},Je=!!Object.getOwnPropertySymbols&&!E(function(){return!String(Symbol())}),We=Je&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ke=H("wks"),Ye=b.Symbol,Qe=We?Ye:Ye&&Ye.withoutSetter||J,Xe=function(e){return V(Ke,e)||(Ke[e]=Je&&V(Ye,e)?Ye[e]:Qe("Symbol."+e)),Ke[e]},$e=Xe("iterator"),et=!1;[].keys&&("next"in(re=[].keys())?(ae=Ze(Ze(re)))!==Object.prototype&&(ne=ae):et=!0),null==ne&&(ne={}),V(ne,$e)||D(ne,$e,function(){return this});var tt,nt={IteratorPrototype:ne,BUGGY_SAFARI_ITERATORS:et},at=Object.keys||function(e){return Ie(e,Se)},rt=A?Object.defineProperties:function(e,t){S(e);for(var n,a=at(t),r=a.length,i=0;r>i;)x.f(e,n=a[i++],t[n]);return e},it=be("document","documentElement"),lt=K("IE_PROTO"),ot=function(){},st=function(e){return"<script>"+e+"<\/script>"},ut=function(){try{tt=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;ut=tt?function(e){e.write(st("")),e.close();var t=e.parentWindow.Object;return e=null,t}(tt):((t=w("iframe")).style.display="none",it.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(st("document.F=Object")),e.close(),e.F);for(var n=Se.length;n--;)delete ut.prototype[Se[n]];return ut()};Y[lt]=!0;var ct=Object.create||function(e,t){var n;return null!==e?(ot.prototype=S(e),n=new ot,ot.prototype=null,n[lt]=e):n=ut(),void 0===t?n:rt(n,t)},mt=x.f,dt=Xe("toStringTag"),ft=function(e,t,n){e&&!V(e=n?e:e.prototype,dt)&&mt(e,dt,{configurable:!0,value:t})},gt={},pt=nt.IteratorPrototype,yt=function(){return this},ht=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,a){return S(n),function(e){if(!C(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(a),t?e.call(n,a):n.__proto__=a,n}}():void 0),vt=nt.IteratorPrototype,bt=nt.BUGGY_SAFARI_ITERATORS,Et=Xe("iterator"),At=function(){return this},Ct=p.charAt,_t=ie.set,Ot=ie.getterFor("String Iterator");!function(e,t,n,a,r,i,l){!function(e,t,n){e.prototype=ct(pt,{next:M(1,function(){var e,t=Ot(this),n=t.string,a=t.index;return a>=n.length?{value:void 0,done:!0}:(e=Ct(n,a),t.index+=e.length,{value:e,done:!1})})}),ft(e,"String Iterator",!1),gt["String Iterator"]=yt}(n);var o,s,u,c=function(e){if(void 0===e&&f)return f;if(!bt&&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[Et]||m["@@iterator"]||void 0,f=!bt&&d||c(void 0);if(d&&(o=Ze(d.call(new e)),vt!==Object.prototype&&o.next&&(Ze(o)!==vt&&(ht?ht(o,vt):"function"!=typeof o[Et]&&D(o,Et,At)),ft(o,"String Iterator",!0))),m[Et]!==f&&D(m,Et,f),void(gt.String=f))if(void(s={values:c("values"),keys:c("keys"),entries:c("entries")}))for(u in s)(bt||!(u in m))&&ye(m,u,s[u]);else Ge({target:"String",proto:!0,forced:bt||!1},s)}(String,0,function(e){_t(this,{type:"String Iterator",string:String(e),index:0})});var wt=function(e,t,n){if(function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function")}(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,a){return e.call(t,n,a)};case 3:return function(n,a,r){return e.call(t,n,a,r)}}return function(){return e.apply(t,arguments)}},It=function(e,t,n,a){try{return a?t(S(n)[0],n[1]):t(n)}catch(t){throw function(e){var t=e.return;void 0!==t&&S(t.call(e))}(e),t}},St=Xe("iterator"),Pt=Array.prototype,Nt=function(e){return void 0!==e&&(gt.Array===e||Pt[St]===e)},xt=function(e,t,n){var a=P(t);a in e?x.f(e,a,M(0,n)):e[a]=n},Mt={};Mt[Xe("toStringTag")]="z";var Dt="[object z]"===String(Mt),Lt=Xe("toStringTag"),Tt="Arguments"==ce(function(){return arguments}()),jt=Dt?ce:function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),Lt))?n:Tt?ce(t):"Object"==(a=ce(t))&&"function"==typeof t.callee?"Arguments":a},Ft=Xe("iterator"),kt=function(e){if(null!=e)return e[Ft]||e["@@iterator"]||gt[jt(e)]},Rt=Xe("iterator"),zt=!1;try{var qt=0,Gt={next:function(){return{done:!!qt++}},return:function(){zt=!0}};Gt[Rt]=function(){return this},Array.from(Gt,function(){throw 2})}catch(e){}var Ut,Vt,Ht,Bt,Zt=!function(e,t){if(!zt)return!1;var n=!1;try{var a={};a[Rt]=function(){return{next:function(){return{done:n=!0}}}},Array.from(a)}catch(e){}return n}();function Jt(e){return Number((e/100).toFixed(2))}Ge({target:"Array",stat:!0,forced:Zt},{from:function(e){var t,n,a,r,i,l,o=Ue(e),s="function"==typeof this?this:Array,u=arguments.length,c=u>1?arguments[1]:void 0,m=void 0!==c,d=kt(o),f=0;if(m&&(c=wt(c,u>2?arguments[2]:void 0,2)),null==d||s==Array&&Nt(d))for(n=new s(t=Ae(o.length));t>f;f++)l=m?c(o[f],f):o[f],xt(n,f,l);else for(i=(r=d.call(o)).next,n=new s;!(a=i.call(r)).done;f++)l=m?It(r,c,[a.value,f],!0):a.value,xt(n,f,l);return n.length=f,n}}),function(e){e.PaymentPlans="PaymentPlans",e.Modal="Modal"}(Ut||(Ut={})),function(e){e.PENDING="pending",e.SUCCESS="success",e.FAILED="failed"}(Vt||(Vt={})),function(e){e.en="en",e.fr="fr",e.de="de",e.it="it",e.es="es",e.nl="nl",e["nl-NL"]="nl-NL",e["nl-BE"]="nl-BE"}(Ht||(Ht={})),"function"!=typeof(Bt=window.Element.prototype).matches&&(Bt.matches=Bt.msMatchesSelector||Bt.mozMatchesSelector||Bt.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 Bt.closest&&(Bt.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null}),"".trim||(String.prototype.trim=function(){return this.replace(/^[\s]+|[\s]+$/g,"")}),function(e){e.DOMException||((DOMException=function(e){this.message=e}).prototype=new Error);var t,n,a=/[\11\12\14\15\40]/,r=0,i=function(e,t){if(""===t)throw new DOMException("Failed to execute '"+e+"' on 'DOMTokenList': The token provided must not be empty.");if(-1!==(r=t.search(a)))throw new DOMException("Failed to execute '"+e+"' on 'DOMTokenList': The token provided ('"+t[r]+"') contains HTML space characters, which are not valid in tokens.")};"function"!=typeof DOMTokenList&&function(e){var t=e.document,n=e.Object,r=n.prototype.hasOwnProperty,l=n.defineProperty,o=0,s=0,u=function(){if(!o)throw TypeError("Illegal constructor")};function c(){var t=e.event,n=t.propertyName;if(!s&&("className"===n||"classList"===n&&!l)){var r=t.srcElement,i=r[" uCLp"],o=""+r[n],u=o.trim().split(a),c=r["classList"===n?" uCL":"classList"],m=i.length;e:for(var d=0,f=i.length=u.length,g=0;d!==f;++d){for(var p=0;p!==d;++p)if(u[p]===u[d]){g++;continue e}c[d-g]=u[d]}for(var y=f-g;y<m;++y)delete c[y];if("classList"!==n)return;s=1,r.classList=c,r.className=o,s=0,c.length=u.length-g}}function m(e){if(!e||!("innerHTML"in e))throw TypeError("Illegal invocation");e.detachEvent("onpropertychange",c),o=1;try{var t=function(){};t.prototype=new u}finally{o=0}var n=t.prototype,r=new t;e:for(var i=e.className.trim().split(a),m=0,d=i.length,f=0;m!==d;++m){for(var g=0;g!==m;++g)if(i[g]===i[m]){f++;continue e}this[m-f]=i[m]}n.length=d-f,n.value=e.className,n[" uCL"]=e,l?(l(e,"classList",{enumerable:1,get:function(){return r},configurable:0,set:function(t){s=1,e.className=n.value=t+="",s=0;var i=t.trim().split(a),l=n.length;e:for(var o=0,u=n.length=i.length,c=0;o!==u;++o){for(var m=0;m!==o;++m)if(i[m]===i[o]){c++;continue e}r[o-c]=i[o]}for(var d=u-c;d<l;++d)delete r[d]}}),l(e," uCLp",{enumerable:0,configurable:0,writeable:0,value:t.prototype}),l(n," uCL",{enumerable:0,configurable:0,writeable:0,value:e})):(e.classList=r,e[" uCL"]=r,e[" uCLp"]=t.prototype),e.attachEvent("onpropertychange",c)}u.prototype.toString=u.prototype.toLocaleString=function(){return this.value},u.prototype.add=function(){e:for(var e=0,t=arguments.length,n="",a=this[" uCL"],r=a[" uCLp"];e!==t;++e){i("add",n=arguments[e]+"");for(var l=0,o=r.length,u=n;l!==o;++l){if(this[l]===n)continue e;u+=" "+this[l]}this[o]=n,r.length+=1,r.value=u}s=1,a.className=r.value,s=0},u.prototype.remove=function(){for(var e=0,t=arguments.length,n="",a=this[" uCL"],r=a[" uCLp"];e!==t;++e){i("remove",n=arguments[e]+"");for(var l=0,o=r.length,u="",c=0;l!==o;++l)c?this[l-1]=this[l]:this[l]!==n?u+=this[l]+" ":c=1;c&&(delete this[o],r.length-=1,r.value=u)}s=1,a.className=r.value,s=0},e.DOMTokenList=u;try{e.Object.defineProperty(e.Element.prototype,"classList",{enumerable:1,get:function(e){return r.call(this,"classList")||m(this),this.classList},configurable:0,set:function(e){this.className=e}})}catch(n){e[" uCL"]=m,t.documentElement.firstChild.appendChild(t.createElement("style")).styleSheet.cssText='_*{x-uCLp:expression(!this.hasOwnProperty("classList")&&window[" uCL"](this))}[class]{x-uCLp/**/:expression(!this.hasOwnProperty("classList")&&window[" uCL"](this))}'}}(e),t=e.DOMTokenList.prototype,n=e.document.createElement("div").classList,t.item||(t.item=function(e){return void 0===(t=this[e])?null:t;var t}),t.toggle&&!1===n.toggle("a",0)||(t.toggle=function(e){if(arguments.length>1)return this[arguments[1]?"add":"remove"](e),!!arguments[1];var t=this.value;return this.remove(t),t===this.value&&(this.add(e),!0)}),t.replace&&"boolean"==typeof n.replace("a","b")||(t.replace=function(e,t){i("replace",e),i("replace",t);var n=this.value;return this.remove(e),this.value!==n&&(this.add(t),!0)}),t.contains||(t.contains=function(e){for(var t=0,n=this.length;t!==n;++t)if(this[t]===e)return!0;return!1}),t.forEach||(t.forEach=function(e){if(1===arguments.length)for(var t=0,n=this.length;t!==n;++t)e(this[t],t,this);else{t=0,n=this.length;for(var a=arguments[1];t!==n;++t)e.call(a,this[t],t,this)}}),t.entries||(t.entries=function(){var e=this;return{next:function(){return 0<e.length?{value:[0,e[0]],done:!1}:{done:!0}}}}),t.values||(t.values=function(){var e=this;return{next:function(){return 0<e.length?{value:e[0],done:!1}:{done:!0}}}}),t.keys||(t.keys=function(){var e=this;return{next:function(){return 0<e.length?{value:0,done:!1}:{done:!0}}}})}(window);var Wt={"eligibility-modal.bullet-1":"Wählen Sie an der Kasse <strong>Alma</strong> .","eligibility-modal.bullet-2":"Füllen Sie die <strong>angeforderten</strong> Informationen aus.","eligibility-modal.bullet-3":"Die Bestätigung Ihrer Zahlung <strong>sofort</strong> !","eligibility-modal.cost":"Davon Kosten","eligibility-modal.credit-commitment":"Ein Kredit verpflichtet Sie und muss zurückgezahlt werden. Prüfen Sie Ihre Rückzahlungsfähigkeit, bevor Sie sich verpflichten.","eligibility-modal.credit-cost":"Davon Kreditkosten","eligibility-modal.credit-cost-amount":"{creditCost} (APR {TAEG})","eligibility-modal.no-eligibility":"Ups, die Simulation scheint nicht funktioniert zu haben.","eligibility-modal.title":"<highlighted>Bezahlen Sie in Raten</highlighted> oder später per Kreditkarte mit Alma.","eligibility-modal.total":"Insgesamt","installments.today":"Heutzutage","payment-plan-strings.day-abbreviation":"J{numberOfDeferredDays}","payment-plan-strings.default-message":"Bezahlen Sie in 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.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":"(gebührenfrei)"},Kt={"eligibility-modal.bullet-1":"Choose <strong>Alma</strong> at checkout.","eligibility-modal.bullet-2":"Fill in the <strong>information</strong> requested.","eligibility-modal.bullet-3":"Validation of your payment <strong>instantaneous</strong>!","eligibility-modal.cost":"Of which costs","eligibility-modal.credit-commitment":"A loan commits you and must be repaid. Check your ability to repay before committing yourself.","eligibility-modal.credit-cost":"Of which cost of credit","eligibility-modal.credit-cost-amount":"{creditCost} (APR {TAEG})","eligibility-modal.no-eligibility":"Oops, looks like the simulation didn't work.","eligibility-modal.title":"<highlighted>Pay in installments</highlighted> or later by credit card with Alma.","eligibility-modal.total":"Total","installments.today":"Today","payment-plan-strings.day-abbreviation":"T{numberOfDeferredDays}","payment-plan-strings.default-message":"Pay in installments with Alma","payment-plan-strings.deferred":"{totalAmount} to be paid on {dueDate}","payment-plan-strings.ineligible-greater-than-max":"Until {maxAmount}","payment-plan-strings.ineligible-lower-than-min":"From {minAmount}","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)"},Yt={"eligibility-modal.bullet-1":"Elige <strong>Alma</strong> como método de pago.","eligibility-modal.bullet-2":"Completa la <strong>información</strong> solicitada.","eligibility-modal.bullet-3":"¡Validación <strong>inmediata</strong> de tu pago!","eligibility-modal.cost":"Gastos (incl. en el total)","eligibility-modal.credit-commitment":"Un préstamo te compromete y debe ser devuelto. Comprueba tu capacidad financiera antes de comprometerte.","eligibility-modal.credit-cost":"Coste de crédito (incl. en el total)","eligibility-modal.credit-cost-amount":"{creditCost} (TAE {TAEG})","eligibility-modal.no-eligibility":"Uy, parece que la simulación no ha funcionado.","eligibility-modal.title":"<highlighted>Paga a plazos</highlighted> o más adelante con tu tarjeta, a través de Alma.","eligibility-modal.total":"Total","installments.today":"Hoy","payment-plan-strings.day-abbreviation":"D{numberOfDeferredDays}","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.multiple-installments":"{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} mensualidad de {othersInstallmentAmount}} other {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} de {othersInstallmentAmount} mensualidades }}","payment-plan-strings.multiple-installments-same-amount":"{installmentsCount} plazos de {totalAmount}","payment-plan-strings.no-fee":"(sin intereses)"},Qt={"eligibility-modal.bullet-1":"Choisissez <strong>Alma</strong> au moment du paiement.","eligibility-modal.bullet-2":"Renseignez les <strong>informations</strong> demandées.","eligibility-modal.bullet-3":"La validation de votre paiement <strong>instantanée</strong> !","eligibility-modal.cost":"Dont frais","eligibility-modal.credit-commitment":"Un crédit vous engage et doit être remboursé. Vérifiez vos capacités de remboursement avant de vous engager.","eligibility-modal.credit-cost":"Dont coût du crédit","eligibility-modal.credit-cost-amount":"{creditCost} (TAEG {TAEG})","eligibility-modal.no-eligibility":"Oups, il semblerait que la simulation n'aie pas fonctionné.","eligibility-modal.title":"<highlighted>Payez en plusieurs fois</highlighted> ou plus tard par carte bancaire avec Alma.","eligibility-modal.total":"Total","installments.today":"Aujourd'hui","payment-plan-strings.day-abbreviation":"J{numberOfDeferredDays}","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.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)"},Xt={"eligibility-modal.bullet-1":"Scegli <strong>Alma</strong> alla cassa.","eligibility-modal.bullet-2":"Compila le informazioni <strong></strong> richieste.","eligibility-modal.bullet-3":"Convalida del tuo pagamento <strong>istantanea</strong>!","eligibility-modal.cost":"Di cui commissioni","eligibility-modal.credit-commitment":"Un pagamento rateale ti impegna e deve essere ripagato. Verifica la tua capacità di rimborso prima di impegnarti.","eligibility-modal.credit-cost":"Di cui commissioni","eligibility-modal.credit-cost-amount":"{creditCost} (TAEG {TAEG})","eligibility-modal.no-eligibility":"Ops, sembra che la simulazione non abbia funzionato.","eligibility-modal.title":"<highlighted>Paga a rate</highlighted> e posticipa il pagamento con Alma, senza interessi.","eligibility-modal.total":"Totale","installments.today":"Oggi","payment-plan-strings.day-abbreviation":"G{numberOfDeferredDays}","payment-plan-strings.default-message":"Paga a rate con Alma","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.multiple-installments":"{numberOfRemainingInstallments, plural, one {Oggi paghi {firstInstallmentAmount} poi {numberOfRemainingInstallments} rata mensile di {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)"},$t={"eligibility-modal.bullet-1":"Kies <strong>Alma</strong> bij het afrekenen.","eligibility-modal.bullet-2":"Vul de <strong>gevraagde informatie</strong> in.","eligibility-modal.bullet-3":"Validatie van uw betaling <strong>onmiddellijk</strong>!","eligibility-modal.cost":"Waarvan kosten","eligibility-modal.credit-commitment":"Een lening bindt je en moet worden terugbetaald. Ga na of u kunt terugbetalen voordat u zich vastlegt.","eligibility-modal.credit-cost":"Waarvan kosten van krediet","eligibility-modal.credit-cost-amount":"{creditCost} (APR {TAEG})","eligibility-modal.no-eligibility":"Oeps, het lijkt erop dat de simulatie niet werkte.","eligibility-modal.title":"<highlighted>Betaal in termijnen</highlighted> of later per credit card met Alma.","eligibility-modal.total":"Totaal","installments.today":"Tegenwoordig","payment-plan-strings.day-abbreviation":"J{numberOfDeferredDays}","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.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":"(gratis)"},en=function(e){switch(e){case Ht.fr:return Qt;case Ht.en:return Kt;case Ht.es:return Yt;case Ht.it:return Xt;case Ht.de:return Wt;case Ht.nl:case Ht["nl-BE"]:case Ht["nl-NL"]:return $t;default:return Kt}},tn=function(e){var t=e.children,r=e.locale;return n.createElement(a.IntlProvider,{messages:en(r),locale:r,defaultLocale:"en"},t)};function nn(){return(nn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var an=function(e,n,a){var r,i,l,o=n.domain,s=n.merchantId,u=t.useState([]),c=u[0],m=u[1],d=t.useState(Vt.PENDING),f=d[0],g=d[1],p=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 t.useEffect(function(){f===Vt.PENDING&&function(e,t,n){void 0===e&&(e="");try{return Promise.resolve(fetch(e,{method:"POST",headers:nn({"Content-Type":"application/json"},n),body:JSON.stringify(t)})).then(function(e){return e.json()})}catch(e){return Promise.reject(e)}}(o+"/v2/payments/eligibility",{purchase_amount:e,queries:p},{Authorization:"Alma-Merchant-Auth "+s}).then(function(e){m(e),g(Vt.SUCCESS)}).catch(function(){g(Vt.FAILED)})},[f]),[(r=c,i=a,l=r.filter(function(e){return!(1===e.installments_count&&0===e.deferred_days&&0===e.deferred_months)}),i?l.map(function(e){var t=30*(e.deferred_months?e.deferred_months:0)+(e.deferred_days?e.deferred_days:0),n=i.find(function(n){return e.installments_count===n.installmentsCount&&t===30*(n.deferredMonths?n.deferredMonths:0)+(n.deferredDays?n.deferredDays:0)});return nn({},e,{eligible:!!n&&e.purchase_amount>=(null==n?void 0:n.minAmount)&&e.purchase_amount<=(null==n?void 0:n.maxAmount),minAmount:null==n?void 0:n.minAmount,maxAmount:null==n?void 0:n.maxAmount})}):l),f]},rn=function(e){return n.createElement("div",{className:i("_31lrj",e.className),"data-testid":"loader"},n.createElement("div",{className:"_2p94X"},"a"),n.createElement("div",{className:"_1k0PM"}))};function ln(e){var t=e.color;return n.createElement("svg",{className:e.className,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.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===t?"#fff":t}))}var on=function(e){var t,a=e.children,r=e.isOpen,s=e.onClose,u=e.className,c=e.contentClassName,m=e.scrollable,d=void 0!==m&&m,f=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)t.indexOf(n=i[a])>=0||(r[n]=e[n]);return r}(e,["children","isOpen","onClose","className","contentClassName","scrollable"]);return l.setAppElement("body"),n.createElement(l,Object.assign({className:i("_D8SjB",u),overlayClassName:"_1yxCb",onAfterOpen:function(){o.on()},onAfterClose:function(){o.off()},onRequestClose:s,isOpen:r,shouldCloseOnOverlayClick:!0,shouldCloseOnEsc:!0},f),n.createElement("div",{className:"_12LLh"},n.createElement("button",{onClick:s,className:"_3YRro","data-testid":"modal-close-button"},n.createElement(ln,null))),n.createElement("div",{className:i("_ocM9x",c,(t={},t._1GP2F=d,t))},a))},sn=function(e){var t=e.installments_count,r=e.deferred_days+30*e.deferred_months;return 1===t?n.createElement(a.FormattedMessage,{id:"payment-plan-strings.day-abbreviation",defaultMessage:"J{numberOfDeferredDays}",values:{numberOfDeferredDays:r>0?"+"+r:""}}):t+"x"},un=function(e){var t=e.currentPlanIndex,a=e.setCurrentPlanIndex;return n.createElement("div",{className:"_1l2Oa"},e.eligibilityPlans.map(function(e,r){var l;return n.createElement("button",{key:r,className:i((l={},l._3rue7=r===t,l)),onClick:function(){return a(r)}},sn(e))}))},cn=function(e){var t=e.currentPlan,r=t&&Jt(t.purchase_amount+t.customer_total_cost_amount),l=t?Jt(t.customer_total_cost_amount):0,o=(null==t?void 0:t.annual_interest_rate)&&t.annual_interest_rate/1e4,s=Jt(t?t.customer_total_cost_amount:0),c=t&&t.installments_count>4,m=a.useIntl();return n.createElement("div",{className:"_MPKjS","data-testid":"modal-installments-element"},n.createElement("div",{className:i("_1A7Qv","_14Ejo")},n.createElement("span",null,n.createElement(a.FormattedMessage,{id:"eligibility-modal.total",defaultMessage:"Total"})),n.createElement("span",null,n.createElement(a.FormattedNumber,{value:r,style:"currency",currency:"EUR"}))),n.createElement("div",{className:i("_1A7Qv","_1ZIgu")},n.createElement("span",null,n.createElement(a.FormattedMessage,c?{id:"eligibility-modal.credit-cost",defaultMessage:"Dont coût du crédit"}:{id:"eligibility-modal.cost",defaultMessage:"Dont frais"})),n.createElement("span",null,c?n.createElement(a.FormattedMessage,{id:"eligibility-modal.credit-cost-amount",defaultMessage:"{creditCost} (TAEG {TAEG})",values:{creditCost:m.formatNumber(l,{style:"currency",currency:"EUR"}),TAEG:m.formatNumber(null!=o?o:0,{style:"percent",maximumFractionDigits:2})}}):n.createElement(a.FormattedNumber,{value:s,style:"currency",currency:"EUR"}))),((null==t?void 0:t.payment_plan)||[]).map(function(e,t){return n.createElement("div",{className:"_1A7Qv",key:t},n.createElement("span",null,u.isToday(1e3*e.due_date)?n.createElement(a.FormattedMessage,{id:"installments.today",defaultMessage:"Aujourd'hui"}):n.createElement(a.FormattedDate,{value:1e3*e.due_date,day:"numeric",month:"long",year:"numeric"})),n.createElement("span",null,n.createElement(a.FormattedNumber,{value:Jt(e.total_amount),style:"currency",currency:"EUR"})))}),c&&n.createElement("p",{className:"_1BUr8"},n.createElement(a.FormattedMessage,{id:"eligibility-modal.credit-commitment",defaultMessage:"Un crédit vous engage et doit être remboursé. Vérifiez vos capacités de remboursement\n avant de vous engager."})))},mn=function(){return n.createElement("div",{className:"_180ro","data-testid":"modal-info-element"},n.createElement("div",{className:"_1HqCO"},n.createElement("div",{className:"_3B8wx"},"1"),n.createElement("div",null,n.createElement(a.FormattedMessage,{id:"eligibility-modal.bullet-1",defaultMessage:"Choisissez <strong>Alma</strong> au moment du paiement.",values:{strong:function(){return n.createElement("strong",null,[].slice.call(arguments))}}}))),n.createElement("div",{className:"_1HqCO"},n.createElement("div",{className:"_3B8wx"},"2"),n.createElement("div",null,n.createElement(a.FormattedMessage,{id:"eligibility-modal.bullet-2",defaultMessage:"Renseignez les <strong>informations</strong> demandées.",values:{strong:function(){return n.createElement("strong",null,[].slice.call(arguments))}}}))),n.createElement("div",{className:"_1HqCO"},n.createElement("div",{className:"_3B8wx"},"3"),n.createElement("div",null,n.createElement(a.FormattedMessage,{id:"eligibility-modal.bullet-3",defaultMessage:"La validation de votre paiement <strong>instantanée</strong> !",values:{strong:function(){return n.createElement("strong",null,[].slice.call(arguments))}}}))))};function dn(e){var t=e.color,a=void 0===t?"#00425D":t,r=e.underlineColor,i=void 0===r?"#00425D":r;return n.createElement("svg",{className:e.className,width:"35",height:"23",viewBox:"0 0 40 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M6.38546 10.1313V10.029H4.92542C4.23835 10.029 3.72877 10.0972 3.39668 10.2337C3.07605 10.3587 2.91573 10.6374 2.91573 11.0695C2.91573 11.7177 3.37378 12.0418 4.28988 12.0418C5.05711 12.0418 5.59532 11.8826 5.9045 11.5642C6.22514 11.2344 6.38546 10.7568 6.38546 10.1313ZM3.72304 13.9182C2.64663 13.9182 1.85076 13.6567 1.33546 13.1335C0.820153 12.599 0.5625 11.911 0.5625 11.0695C0.5625 10.0574 0.894586 9.32958 1.55876 8.88606C2.22293 8.43118 3.23636 8.20374 4.59906 8.20374H6.38546V7.82846C6.38546 6.98693 5.84725 6.56616 4.77083 6.56616C3.80893 6.56616 3.27644 6.93007 3.17338 7.65788H0.768622C0.848781 6.78223 1.21522 6.04873 1.86794 5.45738C2.52066 4.86603 3.50547 4.57036 4.82236 4.57036C6.1278 4.57036 7.11261 4.86035 7.77678 5.44032C8.44095 6.0203 8.77304 6.83909 8.77304 7.89669V13.7135H6.60875V12.7241C6.09345 13.5202 5.13155 13.9182 3.72304 13.9182Z",fill:a}),n.createElement("path",{d:"M14.2554 11.6324V13.6965C14.0149 13.7306 13.763 13.7476 13.4996 13.7476C12.5492 13.7476 11.8736 13.5486 11.4728 13.1506C11.072 12.7412 10.8716 12.0873 10.8716 11.1889V0.919922H13.3107V11.0183C13.3107 11.2344 13.3508 11.3936 13.4309 11.496C13.5111 11.5983 13.6771 11.6495 13.929 11.6495C13.9863 11.6495 14.0493 11.6495 14.118 11.6495C14.1982 11.6381 14.244 11.6324 14.2554 11.6324Z",fill:a}),n.createElement("path",{d:"M23.8943 8.63019V13.7135H21.4552V8.40844C21.4552 7.23711 20.9742 6.65145 20.0123 6.65145C19.4512 6.65145 19.0161 6.82203 18.7069 7.16319C18.4092 7.50436 18.2603 7.9763 18.2603 8.57902V13.7135H15.8212V4.77506H18.0714V5.86678C18.5409 5.0025 19.4054 4.57036 20.6651 4.57036C21.856 4.57036 22.7263 4.99113 23.2759 5.83266C24.0432 4.99113 25.0394 4.57036 26.2647 4.57036C27.3182 4.57036 28.1255 4.89446 28.6867 5.54267C29.2478 6.19088 29.5283 7.05516 29.5283 8.13551V13.7135H27.0892V8.40844C27.0892 7.23711 26.6083 6.65145 25.6464 6.65145C25.0738 6.65145 24.6386 6.82772 24.3409 7.18025C24.0432 7.52141 23.8943 8.00473 23.8943 8.63019Z",fill:a}),n.createElement("path",{d:"M37.0321 10.1313V10.029H35.572C34.885 10.029 34.3754 10.0972 34.0433 10.2337C33.7227 10.3587 33.5623 10.6374 33.5623 11.0695C33.5623 11.7177 34.0204 12.0418 34.9365 12.0418C35.7037 12.0418 36.2419 11.8826 36.5511 11.5642C36.8717 11.2344 37.0321 10.7568 37.0321 10.1313ZM34.3696 13.9182C33.2932 13.9182 32.4974 13.6567 31.9821 13.1335C31.4668 12.599 31.2091 11.911 31.2091 11.0695C31.2091 10.0574 31.5412 9.32958 32.2054 8.88606C32.8695 8.43118 33.883 8.20374 35.2457 8.20374H37.0321V7.82846C37.0321 6.98693 36.4939 6.56616 35.4174 6.56616C34.4555 6.56616 33.923 6.93007 33.82 7.65788H31.4152C31.4954 6.78223 31.8618 6.04873 32.5145 5.45738C33.1673 4.86603 34.1521 4.57036 35.469 4.57036C36.7744 4.57036 37.7592 4.86035 38.4234 5.44032C39.0876 6.0203 39.4196 6.83909 39.4196 7.89669V13.7135H37.2554V12.7241C36.7401 13.5202 35.7781 13.9182 34.3696 13.9182Z",fill:a}),n.createElement("rect",{y:"20",width:"40",height:"3",fill:i}))}var fn,gn,pn,yn=function(){return n.createElement("div",{className:"_3Oyv_"},n.createElement(dn,{underlineColor:"#FF414D"}))},hn=function(){return n.createElement("div",{className:"_3ERx-","data-testid":"modal-title-element"},n.createElement(a.FormattedMessage,{id:"eligibility-modal.title",defaultMessage:"<highlighted>Payez en plusieurs fois</highlighted> ou plus tard par carte bancaire avec Alma.",values:{highlighted:function(){return n.createElement("span",null,[].slice.call(arguments))}}}))},vn=function(e){var t=e.children;return n.createElement("div",{className:"_21g6u","data-testid":"modal-container"},n.createElement("div",{className:i(["_3zaP5","_2SBRC"])},n.createElement(hn,null),n.createElement(mn,null),n.createElement(yn,null)),n.createElement("div",{className:"_3zaP5"},t))},bn=function(e){var t=e.children;return n.createElement("div",{className:"_2G7Ch","data-testid":"modal-container"},n.createElement(hn,null),t,n.createElement(mn,null),n.createElement(yn,null))},En=function(e){var r=e.onClose,i=e.eligibilityPlans,l=e.status,o=t.useState(e.initialPlanIndex||0),u=o[0],c=o[1],m=s.useMediaQuery({minWidth:800})?vn:bn,d=i.filter(function(e){return e.eligible}),f=d[u];return n.createElement(on,{onClose:r,ariaHideApp:!1,scrollable:!0,isOpen:!0},n.createElement(m,Object.assign({},{eligibilityPlans:d,currentPlanIndex:u,setCurrentPlanIndex:c,currentPlan:f,status:l}),l===Vt.PENDING&&n.createElement("div",{className:"_2oTJq"},n.createElement(rn,null)),l===Vt.SUCCESS&&0===d.length&&n.createElement("div",{className:"_17qNJ"},n.createElement(a.FormattedMessage,{id:"eligibility-modal.no-eligibility",defaultMessage:"Oups, il semblerait que la simulation n'aie pas fonctionné."})),l===Vt.SUCCESS&&d.length>=1&&n.createElement(n.Fragment,null,n.createElement(un,{eligibilityPlans:d,currentPlanIndex:u,setCurrentPlanIndex:c}),n.createElement(cn,{currentPlan:f}))))},An=function(e){var t=e.onClose,a=an(e.purchaseAmount,e.apiData,e.configPlans);return n.createElement(En,{initialPlanIndex:0,onClose:t,eligibilityPlans:a[0],status:a[1]})},Cn=function(e){return n.createElement("div",{className:i("_2SwwZ",e.className),"data-testid":"loader"},n.createElement("div",{className:"_2qODo"}),n.createElement("div",{className:"_2YO01"}))},_n=function(e){var r,l,o,s,c=e.transitionDelay,m=e.hideIfNotEligible,d=e.suggestedPaymentPlan,f=an(e.purchaseAmount,e.apiData,e.configPlans),g=f[0],p=f[1],y=g.filter(function(e){return e.eligible}),h=function(e){var t=e.suggestedPaymentPlan,n=e.eligibilityPlans,a=Array.isArray(t)?t:[t],r=function(e){var t=a[e],r=n.findIndex(function(e){return e.installments_count===t&&e.eligible});if(-1!==r)return{v:r}};for(var i in a){var l=r(i);if("object"==typeof l)return l.v}return 0}({eligibilityPlans:g,suggestedPaymentPlan:null!=d?d:0}),v=void 0!==d,b=void 0!==c,E=t.useState(!1),A=E[0],C=E[1],_=g.reduce(function(e,t,n){return t.eligible?[].concat(e,[n]):e},[]),O=function(e,n){var a=t.useState(0),r=a[0],i=a[1],l=t.useState(!0),o=l[0],s=l[1];return t.useEffect(function(){var t=!0;return 0!==e.length&&(!e.includes(r)&&o&&i(e[0]),setTimeout(function(){o&&t&&i(e[e.includes(r)?(e.indexOf(r)+1)%e.length:0])},n)),function(){t=!1}},[e,r]),{current:r,onHover:function(e){i(e),s(!1)},onLeave:function(){s(!0)}}}(_,b?null!=c?c:5500:v?31536e6:5500),w=O.current,I=O.onHover,S=O.onLeave;return t.useEffect(function(){p===Vt.SUCCESS&&v&&(I(h),S())},[p]),p===Vt.PENDING?n.createElement("div",{className:i("_TSkFv","_1ZDMS")},n.createElement(Cn,null)):m&&0===y.length||0===g.length||p===Vt.FAILED?null:n.createElement(n.Fragment,null,n.createElement("div",{onClick:function(e){e.preventDefault(),y.length>0&&C(!0)},className:i("_TSkFv",(r={},r._UksZa=y.length>0,r["_1lr-q"]=0===y.length,r)),"data-testid":"widget-button"},n.createElement("div",{className:"_bMClc"},n.createElement(dn,{className:"_LJ4nZ"}),n.createElement("div",{className:"_17c_S"},g.map(function(e,t){var a;return n.createElement("div",{key:t,onMouseEnter:function(){return I(t)},onMouseOut:S,className:i("_2Kqjn",(a={},a._3dG_J=w===t,a._3O1bg=!e.eligible,a))},sn(e))}))),n.createElement("div",{className:i("_25GrF",(l={},l._3O1bg=g[w]&&!g[w].eligible,l))},0!==g.length&&function(e){var t=e.installments_count,r=e.minAmount,i=void 0===r?0:r,l=e.maxAmount,o=void 0===l?0:l,s=e.deferred_days+30*e.deferred_months,c=function(){if(e.payment_plan.every(function(e){return 0===e.customer_fee&&0===e.customer_interest}))return n.createElement(n.Fragment,null," ",n.createElement(a.FormattedMessage,{id:"payment-plan-strings.no-fee",defaultMessage:"(sans frais)"}))};if(!e.eligible)return n.createElement(a.FormattedMessage,e.purchase_amount>o?{id:"payment-plan-strings.ineligible-greater-than-max",defaultMessage:"Jusqu'à {maxAmount}",values:{maxAmount:n.createElement(a.FormattedNumber,{value:Jt(o),style:"currency",currency:"EUR"})}}:{id:"payment-plan-strings.ineligible-lower-than-min",defaultMessage:"À partir de {minAmount}",values:{minAmount:n.createElement(a.FormattedNumber,{value:Jt(i),style:"currency",currency:"EUR"})}});if(0!==s&&1===t)return n.createElement(n.Fragment,null,n.createElement(a.FormattedMessage,{id:"payment-plan-strings.deferred",defaultMessage:"{totalAmount} à payer le {dueDate}",values:{totalAmount:n.createElement(a.FormattedNumber,{value:Jt(e.payment_plan[0].total_amount),style:"currency",currency:"EUR"}),dueDate:n.createElement(a.FormattedDate,{value:u.secondsToMilliseconds(e.payment_plan[0].due_date),day:"numeric",month:"long",year:"numeric"})}}),c());if(t>0){var m=e.payment_plan.every(function(t,n){return 0===n||t.total_amount===e.payment_plan[0].total_amount});return n.createElement(n.Fragment,null,n.createElement(a.FormattedMessage,m?{id:"payment-plan-strings.multiple-installments-same-amount",defaultMessage:"{installmentsCount} x {totalAmount}",values:{totalAmount:n.createElement(a.FormattedNumber,{value:Jt(e.payment_plan[0].total_amount),style:"currency",currency:"EUR"}),installmentsCount:t}}:{id:"payment-plan-strings.multiple-installments",defaultMessage:"{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",values:{firstInstallmentAmount:n.createElement(a.FormattedNumber,{value:Jt(e.payment_plan[0].total_amount),style:"currency",currency:"EUR"}),numberOfRemainingInstallments:t-1,othersInstallmentAmount:n.createElement(a.FormattedNumber,{value:Jt(e.payment_plan[1].total_amount),style:"currency",currency:"EUR"})}}),c())}return n.createElement(a.FormattedMessage,{id:"payment-plan-strings.default-message",defaultMessage:"Payez en plusieurs fois avec Alma"})}(g[w]))),A&&n.createElement(En,{initialPlanIndex:(o=w,s=_.findIndex(function(e){return e===o}),-1===s?0:s),onClose:function(){return C(!1)},eligibilityPlans:y,status:p}))},On=function(){function e(e){this.apiData=e}return e.prototype.add=function(e,t){var a=this,i=document.querySelector(t.container);if(i&&r.unmountComponentAtNode(i),e===Ut.PaymentPlans){var l=t.container,o=t.locale;i&&r.render(n.createElement(tn,{locale:void 0===o?Ht.en:o},n.createElement(_n,{purchaseAmount:t.purchaseAmount,apiData:this.apiData,configPlans:t.plans,transitionDelay:t.transitionDelay,hideIfNotEligible:t.hideIfNotEligible,suggestedPaymentPlan:t.suggestedPaymentPlan})),document.querySelector(l))}if(e===Ut.Modal){var s,u=t.container,c=t.clickableSelector,m=t.purchaseAmount,d=t.plans,f=t.locale,g=void 0===f?Ht.en:f,p=function(){return i&&r.unmountComponentAtNode(i)},y=function(){r.render(n.createElement(tn,{locale:g},n.createElement(An,{purchaseAmount:m,apiData:a.apiData,configPlans:d,onClose:p})),document.querySelector(u))};return c&&(null==(s=document.querySelector(c))||s.addEventListener("click",y,!1)),{open:y,close:p}}},e}();(fn=exports.ApiMode||(exports.ApiMode={})).LIVE="https://api.getalma.eu",fn.TEST="https://api.sandbox.getalma.eu",(gn=exports.Widgets||(exports.Widgets={})).initialize=function(e,t){return new On({domain:t,merchantId:e})},gn.PaymentPlans=Ut.PaymentPlans,gn.Modal=Ut.Modal,(pn=exports.Utils||(exports.Utils={})).priceToCents=function(e){return Math.round(100*e)},pn.priceFromCents=Jt,pn.formatCents=function(e){return String(Jt(e)).replace(".",",")};
|
|
1
|
+
function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("react"),n=e(t),a=require("react-intl"),r=require("react-dom"),i=e(require("classnames")),l=e(require("react-modal")),o=e(require("no-scroll")),s=require("react-responsive"),u=require("date-fns"),c=Math.ceil,m=Math.floor,d=function(e){return isNaN(e=+e)?0:(e>0?m:c)(e)},f=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},g=function(e){return function(t,n){var a,r,i=String(f(t)),l=d(n),o=i.length;return l<0||l>=o?e?"":void 0:(a=i.charCodeAt(l))<55296||a>56319||l+1===o||(r=i.charCodeAt(l+1))<56320||r>57343?e?i.charAt(l):a:e?i.slice(l,l+2):r-56320+(a-55296<<10)+65536}},p={codeAt:g(!1),charAt:g(!0)},y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(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 v=function(e){return e&&e.Math==Math&&e},b=v("object"==typeof globalThis&&globalThis)||v("object"==typeof window&&window)||v("object"==typeof self&&self)||v("object"==typeof y&&y)||function(){return this}()||Function("return this")(),E=function(e){try{return!!e()}catch(e){return!0}},A=!E(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),C=function(e){return"object"==typeof e?null!==e:"function"==typeof e},_=b.document,O=C(_)&&C(_.createElement),w=function(e){return O?_.createElement(e):{}},I=!A&&!E(function(){return 7!=Object.defineProperty(w("div"),"a",{get:function(){return 7}}).a}),S=function(e){if(!C(e))throw TypeError(String(e)+" is not an object");return e},P=function(e,t){if(!C(e))return e;var n,a;if(t&&"function"==typeof(n=e.toString)&&!C(a=n.call(e)))return a;if("function"==typeof(n=e.valueOf)&&!C(a=n.call(e)))return a;if(!t&&"function"==typeof(n=e.toString)&&!C(a=n.call(e)))return a;throw TypeError("Can't convert object to primitive value")},N=Object.defineProperty,x={f:A?N:function(e,t,n){if(S(e),t=P(t,!0),S(n),I)try{return N(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},M=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},D=A?function(e,t,n){return x.f(e,t,M(1,n))}:function(e,t,n){return e[t]=n,e},L=function(e,t){try{D(b,e,t)}catch(n){b[e]=t}return t},T=b["__core-js_shared__"]||L("__core-js_shared__",{}),j=Function.toString;"function"!=typeof T.inspectSource&&(T.inspectSource=function(e){return j.call(e)});var F,k,R,z=T.inspectSource,q=b.WeakMap,G="function"==typeof q&&/native code/.test(z(q)),U={}.hasOwnProperty,V=function(e,t){return U.call(e,t)},H=h(function(e){(e.exports=function(e,t){return T[e]||(T[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.8.1",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),B=0,Z=Math.random(),J=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++B+Z).toString(36)},W=H("keys"),K=function(e){return W[e]||(W[e]=J(e))},Y={};if(G){var Q=T.state||(T.state=new(0,b.WeakMap)),X=Q.get,$=Q.has,ee=Q.set;F=function(e,t){return t.facade=e,ee.call(Q,e,t),t},k=function(e){return X.call(Q,e)||{}},R=function(e){return $.call(Q,e)}}else{var te=K("state");Y[te]=!0,F=function(e,t){return t.facade=e,D(e,te,t),t},k=function(e){return V(e,te)?e[te]:{}},R=function(e){return V(e,te)}}var ne,ae,re,ie={set:F,get:k,has:R,enforce:function(e){return R(e)?k(e):F(e,{})},getterFor:function(e){return function(t){var n;if(!C(t)||(n=k(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},le={}.propertyIsEnumerable,oe=Object.getOwnPropertyDescriptor,se={f:oe&&!le.call({1:2},1)?function(e){var t=oe(this,e);return!!t&&t.enumerable}:le},ue={}.toString,ce=function(e){return ue.call(e).slice(8,-1)},me="".split,de=E(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==ce(e)?me.call(e,""):Object(e)}:Object,fe=function(e){return de(f(e))},ge=Object.getOwnPropertyDescriptor,pe={f:A?ge:function(e,t){if(e=fe(e),t=P(t,!0),I)try{return ge(e,t)}catch(e){}if(V(e,t))return M(!se.f.call(e,t),e[t])}},ye=h(function(e){var t=ie.get,n=ie.enforce,a=String(String).split("String");(e.exports=function(e,t,r,i){var l,o=!!i&&!!i.unsafe,s=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof r&&("string"!=typeof t||V(r,"name")||D(r,"name",t),(l=n(r)).source||(l.source=a.join("string"==typeof t?t:""))),e!==b?(o?!u&&e[t]&&(s=!0):delete e[t],s?e[t]=r:D(e,t,r)):s?e[t]=r:L(t,r)})(Function.prototype,"toString",function(){return"function"==typeof this&&t(this).source||z(this)})}),he=b,ve=function(e){return"function"==typeof e?e:void 0},be=function(e,t){return arguments.length<2?ve(he[e])||ve(b[e]):he[e]&&he[e][t]||b[e]&&b[e][t]},Ee=Math.min,Ae=function(e){return e>0?Ee(d(e),9007199254740991):0},Ce=Math.max,_e=Math.min,Oe=function(e){return function(t,n,a){var r,i=fe(t),l=Ae(i.length),o=function(e,t){var n=d(e);return n<0?Ce(n+t,0):_e(n,t)}(a,l);if(e&&n!=n){for(;l>o;)if((r=i[o++])!=r)return!0}else for(;l>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},we=(Oe(!0),Oe(!1)),Ie=function(e,t){var n,a=fe(e),r=0,i=[];for(n in a)!V(Y,n)&&V(a,n)&&i.push(n);for(;t.length>r;)V(a,n=t[r++])&&(~we(i,n)||i.push(n));return i},Se=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Pe=Se.concat("length","prototype"),Ne={f:Object.getOwnPropertyNames||function(e){return Ie(e,Pe)}},xe={f:Object.getOwnPropertySymbols},Me=be("Reflect","ownKeys")||function(e){var t=Ne.f(S(e)),n=xe.f;return n?t.concat(n(e)):t},De=function(e,t){for(var n=Me(t),a=x.f,r=pe.f,i=0;i<n.length;i++){var l=n[i];V(e,l)||a(e,l,r(t,l))}},Le=/#|\.prototype\./,Te=function(e,t){var n=Fe[je(e)];return n==Re||n!=ke&&("function"==typeof t?E(t):!!t)},je=Te.normalize=function(e){return String(e).replace(Le,".").toLowerCase()},Fe=Te.data={},ke=Te.NATIVE="N",Re=Te.POLYFILL="P",ze=Te,qe=pe.f,Ge=function(e,t){var n,a,r,i,l,o=e.target,s=e.global,u=e.stat;if(n=s?b:u?b[o]||L(o,{}):(b[o]||{}).prototype)for(a in t){if(i=t[a],r=e.noTargetGet?(l=qe(n,a))&&l.value:n[a],!ze(s?a:o+(u?".":"#")+a,e.forced)&&void 0!==r){if(typeof i==typeof r)continue;De(i,r)}(e.sham||r&&r.sham)&&D(i,"sham",!0),ye(n,a,i,e)}},Ue=function(e){return Object(f(e))},Ve=!E(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),He=K("IE_PROTO"),Be=Object.prototype,Ze=Ve?Object.getPrototypeOf:function(e){return e=Ue(e),V(e,He)?e[He]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Be:null},Je=!!Object.getOwnPropertySymbols&&!E(function(){return!String(Symbol())}),We=Je&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ke=H("wks"),Ye=b.Symbol,Qe=We?Ye:Ye&&Ye.withoutSetter||J,Xe=function(e){return V(Ke,e)||(Ke[e]=Je&&V(Ye,e)?Ye[e]:Qe("Symbol."+e)),Ke[e]},$e=Xe("iterator"),et=!1;[].keys&&("next"in(re=[].keys())?(ae=Ze(Ze(re)))!==Object.prototype&&(ne=ae):et=!0),null==ne&&(ne={}),V(ne,$e)||D(ne,$e,function(){return this});var tt,nt={IteratorPrototype:ne,BUGGY_SAFARI_ITERATORS:et},at=Object.keys||function(e){return Ie(e,Se)},rt=A?Object.defineProperties:function(e,t){S(e);for(var n,a=at(t),r=a.length,i=0;r>i;)x.f(e,n=a[i++],t[n]);return e},it=be("document","documentElement"),lt=K("IE_PROTO"),ot=function(){},st=function(e){return"<script>"+e+"<\/script>"},ut=function(){try{tt=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;ut=tt?function(e){e.write(st("")),e.close();var t=e.parentWindow.Object;return e=null,t}(tt):((t=w("iframe")).style.display="none",it.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(st("document.F=Object")),e.close(),e.F);for(var n=Se.length;n--;)delete ut.prototype[Se[n]];return ut()};Y[lt]=!0;var ct=Object.create||function(e,t){var n;return null!==e?(ot.prototype=S(e),n=new ot,ot.prototype=null,n[lt]=e):n=ut(),void 0===t?n:rt(n,t)},mt=x.f,dt=Xe("toStringTag"),ft=function(e,t,n){e&&!V(e=n?e:e.prototype,dt)&&mt(e,dt,{configurable:!0,value:t})},gt={},pt=nt.IteratorPrototype,yt=function(){return this},ht=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,a){return S(n),function(e){if(!C(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(a),t?e.call(n,a):n.__proto__=a,n}}():void 0),vt=nt.IteratorPrototype,bt=nt.BUGGY_SAFARI_ITERATORS,Et=Xe("iterator"),At=function(){return this},Ct=p.charAt,_t=ie.set,Ot=ie.getterFor("String Iterator");!function(e,t,n,a,r,i,l){!function(e,t,n){e.prototype=ct(pt,{next:M(1,function(){var e,t=Ot(this),n=t.string,a=t.index;return a>=n.length?{value:void 0,done:!0}:(e=Ct(n,a),t.index+=e.length,{value:e,done:!1})})}),ft(e,"String Iterator",!1),gt["String Iterator"]=yt}(n);var o,s,u,c=function(e){if(void 0===e&&f)return f;if(!bt&&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[Et]||m["@@iterator"]||void 0,f=!bt&&d||c(void 0);if(d&&(o=Ze(d.call(new e)),vt!==Object.prototype&&o.next&&(Ze(o)!==vt&&(ht?ht(o,vt):"function"!=typeof o[Et]&&D(o,Et,At)),ft(o,"String Iterator",!0))),m[Et]!==f&&D(m,Et,f),void(gt.String=f))if(void(s={values:c("values"),keys:c("keys"),entries:c("entries")}))for(u in s)(bt||!(u in m))&&ye(m,u,s[u]);else Ge({target:"String",proto:!0,forced:bt||!1},s)}(String,0,function(e){_t(this,{type:"String Iterator",string:String(e),index:0})});var wt=function(e,t,n){if(function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function")}(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,a){return e.call(t,n,a)};case 3:return function(n,a,r){return e.call(t,n,a,r)}}return function(){return e.apply(t,arguments)}},It=function(e,t,n,a){try{return a?t(S(n)[0],n[1]):t(n)}catch(t){throw function(e){var t=e.return;void 0!==t&&S(t.call(e))}(e),t}},St=Xe("iterator"),Pt=Array.prototype,Nt=function(e){return void 0!==e&&(gt.Array===e||Pt[St]===e)},xt=function(e,t,n){var a=P(t);a in e?x.f(e,a,M(0,n)):e[a]=n},Mt={};Mt[Xe("toStringTag")]="z";var Dt="[object z]"===String(Mt),Lt=Xe("toStringTag"),Tt="Arguments"==ce(function(){return arguments}()),jt=Dt?ce:function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),Lt))?n:Tt?ce(t):"Object"==(a=ce(t))&&"function"==typeof t.callee?"Arguments":a},Ft=Xe("iterator"),kt=function(e){if(null!=e)return e[Ft]||e["@@iterator"]||gt[jt(e)]},Rt=Xe("iterator"),zt=!1;try{var qt=0,Gt={next:function(){return{done:!!qt++}},return:function(){zt=!0}};Gt[Rt]=function(){return this},Array.from(Gt,function(){throw 2})}catch(e){}var Ut,Vt,Ht,Bt,Zt=!function(e,t){if(!zt)return!1;var n=!1;try{var a={};a[Rt]=function(){return{next:function(){return{done:n=!0}}}},Array.from(a)}catch(e){}return n}();function Jt(e){return Number((e/100).toFixed(2))}Ge({target:"Array",stat:!0,forced:Zt},{from:function(e){var t,n,a,r,i,l,o=Ue(e),s="function"==typeof this?this:Array,u=arguments.length,c=u>1?arguments[1]:void 0,m=void 0!==c,d=kt(o),f=0;if(m&&(c=wt(c,u>2?arguments[2]:void 0,2)),null==d||s==Array&&Nt(d))for(n=new s(t=Ae(o.length));t>f;f++)l=m?c(o[f],f):o[f],xt(n,f,l);else for(i=(r=d.call(o)).next,n=new s;!(a=i.call(r)).done;f++)l=m?It(r,c,[a.value,f],!0):a.value,xt(n,f,l);return n.length=f,n}}),function(e){e.PaymentPlans="PaymentPlans",e.Modal="Modal"}(Ut||(Ut={})),function(e){e.PENDING="pending",e.SUCCESS="success",e.FAILED="failed"}(Vt||(Vt={})),function(e){e.en="en",e.fr="fr",e.de="de",e.it="it",e.es="es",e.nl="nl",e["nl-NL"]="nl-NL",e["nl-BE"]="nl-BE"}(Ht||(Ht={})),"function"!=typeof(Bt=window.Element.prototype).matches&&(Bt.matches=Bt.msMatchesSelector||Bt.mozMatchesSelector||Bt.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 Bt.closest&&(Bt.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null}),"".trim||(String.prototype.trim=function(){return this.replace(/^[\s]+|[\s]+$/g,"")}),function(e){e.DOMException||((DOMException=function(e){this.message=e}).prototype=new Error);var t,n,a=/[\11\12\14\15\40]/,r=0,i=function(e,t){if(""===t)throw new DOMException("Failed to execute '"+e+"' on 'DOMTokenList': The token provided must not be empty.");if(-1!==(r=t.search(a)))throw new DOMException("Failed to execute '"+e+"' on 'DOMTokenList': The token provided ('"+t[r]+"') contains HTML space characters, which are not valid in tokens.")};"function"!=typeof DOMTokenList&&function(e){var t=e.document,n=e.Object,r=n.prototype.hasOwnProperty,l=n.defineProperty,o=0,s=0,u=function(){if(!o)throw TypeError("Illegal constructor")};function c(){var t=e.event,n=t.propertyName;if(!s&&("className"===n||"classList"===n&&!l)){var r=t.srcElement,i=r[" uCLp"],o=""+r[n],u=o.trim().split(a),c=r["classList"===n?" uCL":"classList"],m=i.length;e:for(var d=0,f=i.length=u.length,g=0;d!==f;++d){for(var p=0;p!==d;++p)if(u[p]===u[d]){g++;continue e}c[d-g]=u[d]}for(var y=f-g;y<m;++y)delete c[y];if("classList"!==n)return;s=1,r.classList=c,r.className=o,s=0,c.length=u.length-g}}function m(e){if(!e||!("innerHTML"in e))throw TypeError("Illegal invocation");e.detachEvent("onpropertychange",c),o=1;try{var t=function(){};t.prototype=new u}finally{o=0}var n=t.prototype,r=new t;e:for(var i=e.className.trim().split(a),m=0,d=i.length,f=0;m!==d;++m){for(var g=0;g!==m;++g)if(i[g]===i[m]){f++;continue e}this[m-f]=i[m]}n.length=d-f,n.value=e.className,n[" uCL"]=e,l?(l(e,"classList",{enumerable:1,get:function(){return r},configurable:0,set:function(t){s=1,e.className=n.value=t+="",s=0;var i=t.trim().split(a),l=n.length;e:for(var o=0,u=n.length=i.length,c=0;o!==u;++o){for(var m=0;m!==o;++m)if(i[m]===i[o]){c++;continue e}r[o-c]=i[o]}for(var d=u-c;d<l;++d)delete r[d]}}),l(e," uCLp",{enumerable:0,configurable:0,writeable:0,value:t.prototype}),l(n," uCL",{enumerable:0,configurable:0,writeable:0,value:e})):(e.classList=r,e[" uCL"]=r,e[" uCLp"]=t.prototype),e.attachEvent("onpropertychange",c)}u.prototype.toString=u.prototype.toLocaleString=function(){return this.value},u.prototype.add=function(){e:for(var e=0,t=arguments.length,n="",a=this[" uCL"],r=a[" uCLp"];e!==t;++e){i("add",n=arguments[e]+"");for(var l=0,o=r.length,u=n;l!==o;++l){if(this[l]===n)continue e;u+=" "+this[l]}this[o]=n,r.length+=1,r.value=u}s=1,a.className=r.value,s=0},u.prototype.remove=function(){for(var e=0,t=arguments.length,n="",a=this[" uCL"],r=a[" uCLp"];e!==t;++e){i("remove",n=arguments[e]+"");for(var l=0,o=r.length,u="",c=0;l!==o;++l)c?this[l-1]=this[l]:this[l]!==n?u+=this[l]+" ":c=1;c&&(delete this[o],r.length-=1,r.value=u)}s=1,a.className=r.value,s=0},e.DOMTokenList=u;try{e.Object.defineProperty(e.Element.prototype,"classList",{enumerable:1,get:function(e){return r.call(this,"classList")||m(this),this.classList},configurable:0,set:function(e){this.className=e}})}catch(n){e[" uCL"]=m,t.documentElement.firstChild.appendChild(t.createElement("style")).styleSheet.cssText='_*{x-uCLp:expression(!this.hasOwnProperty("classList")&&window[" uCL"](this))}[class]{x-uCLp/**/:expression(!this.hasOwnProperty("classList")&&window[" uCL"](this))}'}}(e),t=e.DOMTokenList.prototype,n=e.document.createElement("div").classList,t.item||(t.item=function(e){return void 0===(t=this[e])?null:t;var t}),t.toggle&&!1===n.toggle("a",0)||(t.toggle=function(e){if(arguments.length>1)return this[arguments[1]?"add":"remove"](e),!!arguments[1];var t=this.value;return this.remove(t),t===this.value&&(this.add(e),!0)}),t.replace&&"boolean"==typeof n.replace("a","b")||(t.replace=function(e,t){i("replace",e),i("replace",t);var n=this.value;return this.remove(e),this.value!==n&&(this.add(t),!0)}),t.contains||(t.contains=function(e){for(var t=0,n=this.length;t!==n;++t)if(this[t]===e)return!0;return!1}),t.forEach||(t.forEach=function(e){if(1===arguments.length)for(var t=0,n=this.length;t!==n;++t)e(this[t],t,this);else{t=0,n=this.length;for(var a=arguments[1];t!==n;++t)e.call(a,this[t],t,this)}}),t.entries||(t.entries=function(){var e=this;return{next:function(){return 0<e.length?{value:[0,e[0]],done:!1}:{done:!0}}}}),t.values||(t.values=function(){var e=this;return{next:function(){return 0<e.length?{value:e[0],done:!1}:{done:!0}}}}),t.keys||(t.keys=function(){var e=this;return{next:function(){return 0<e.length?{value:0,done:!1}:{done:!0}}}})}(window);var Wt={"eligibility-modal.bullet-1":"Wählen Sie an der Kasse <strong>Alma</strong> .","eligibility-modal.bullet-2":"Füllen Sie die <strong>angeforderten</strong> Informationen aus.","eligibility-modal.bullet-3":"Die Bestätigung Ihrer Zahlung <strong>sofort</strong> !","eligibility-modal.cost":"Davon Kosten","eligibility-modal.credit-commitment":"Ein Kredit verpflichtet Sie und muss zurückgezahlt werden. Prüfen Sie Ihre Rückzahlungsfähigkeit, bevor Sie sich verpflichten.","eligibility-modal.credit-cost":"Davon Kreditkosten","eligibility-modal.credit-cost-amount":"{creditCost} (APR {TAEG})","eligibility-modal.no-eligibility":"Ups, die Simulation scheint nicht funktioniert zu haben.","eligibility-modal.title":"<highlighted>Bezahlen Sie in Raten</highlighted> oder später per Kreditkarte mit Alma.","eligibility-modal.total":"Insgesamt","installments.today":"Heutzutage","payment-plan-strings.day-abbreviation":"J{numberOfDeferredDays}","payment-plan-strings.default-message":"Bezahlen Sie in 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.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":"(gebührenfrei)"},Kt={"eligibility-modal.bullet-1":"Choose <strong>Alma</strong> at checkout.","eligibility-modal.bullet-2":"Fill in the <strong>information</strong> requested.","eligibility-modal.bullet-3":"Validation of your payment <strong>instantaneous</strong>!","eligibility-modal.cost":"Of which costs","eligibility-modal.credit-commitment":"A loan commits you and must be repaid. Check your ability to repay before committing yourself.","eligibility-modal.credit-cost":"Of which cost of credit","eligibility-modal.credit-cost-amount":"{creditCost} (APR {TAEG})","eligibility-modal.no-eligibility":"Oops, looks like the simulation didn't work.","eligibility-modal.title":"<highlighted>Pay in installments</highlighted> or later by credit card with Alma.","eligibility-modal.total":"Total","installments.today":"Today","payment-plan-strings.day-abbreviation":"T{numberOfDeferredDays}","payment-plan-strings.default-message":"Pay in installments with Alma","payment-plan-strings.deferred":"{totalAmount} to be paid on {dueDate}","payment-plan-strings.ineligible-greater-than-max":"Until {maxAmount}","payment-plan-strings.ineligible-lower-than-min":"From {minAmount}","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)"},Yt={"eligibility-modal.bullet-1":"Elige <strong>Alma</strong> como método de pago.","eligibility-modal.bullet-2":"Completa la <strong>información</strong> solicitada.","eligibility-modal.bullet-3":"¡Validación <strong>inmediata</strong> de tu pago!","eligibility-modal.cost":"Gastos (incl. en el total)","eligibility-modal.credit-commitment":"Un préstamo te compromete y debe ser devuelto. Comprueba tu capacidad financiera antes de comprometerte.","eligibility-modal.credit-cost":"Coste de crédito (incl. en el total)","eligibility-modal.credit-cost-amount":"{creditCost} (TAE {TAEG})","eligibility-modal.no-eligibility":"Uy, parece que la simulación no ha funcionado.","eligibility-modal.title":"<highlighted>Paga a plazos</highlighted> o más adelante con tu tarjeta, a través de Alma.","eligibility-modal.total":"Total","installments.today":"Hoy","payment-plan-strings.day-abbreviation":"D{numberOfDeferredDays}","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.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)"},Qt={"eligibility-modal.bullet-1":"Choisissez <strong>Alma</strong> au moment du paiement.","eligibility-modal.bullet-2":"Renseignez les <strong>informations</strong> demandées.","eligibility-modal.bullet-3":"La validation de votre paiement <strong>instantanée</strong> !","eligibility-modal.cost":"Dont frais","eligibility-modal.credit-commitment":"Un crédit vous engage et doit être remboursé. Vérifiez vos capacités de remboursement avant de vous engager.","eligibility-modal.credit-cost":"Dont coût du crédit","eligibility-modal.credit-cost-amount":"{creditCost} (TAEG {TAEG})","eligibility-modal.no-eligibility":"Oups, il semblerait que la simulation n'aie pas fonctionné.","eligibility-modal.title":"<highlighted>Payez en plusieurs fois</highlighted> ou plus tard par carte bancaire avec Alma.","eligibility-modal.total":"Total","installments.today":"Aujourd'hui","payment-plan-strings.day-abbreviation":"J{numberOfDeferredDays}","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.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)"},Xt={"eligibility-modal.bullet-1":"Scegli <strong>Alma</strong> alla cassa.","eligibility-modal.bullet-2":"Compila le informazioni <strong></strong> richieste.","eligibility-modal.bullet-3":"Convalida del tuo pagamento <strong>istantanea</strong>!","eligibility-modal.cost":"Di cui commissioni","eligibility-modal.credit-commitment":"Un pagamento rateale ti impegna e deve essere ripagato. Verifica la tua capacità di rimborso prima di impegnarti.","eligibility-modal.credit-cost":"Di cui commissioni","eligibility-modal.credit-cost-amount":"{creditCost} (TAEG {TAEG})","eligibility-modal.no-eligibility":"Ops, sembra che la simulazione non abbia funzionato.","eligibility-modal.title":"<highlighted>Paga a rate</highlighted> e posticipa il pagamento con Alma, senza interessi.","eligibility-modal.total":"Totale","installments.today":"Oggi","payment-plan-strings.day-abbreviation":"G{numberOfDeferredDays}","payment-plan-strings.default-message":"Paga a rate con Alma","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.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)"},$t={"eligibility-modal.bullet-1":"Kies <strong>Alma</strong> bij het afrekenen.","eligibility-modal.bullet-2":"Vul de <strong>gevraagde informatie</strong> in.","eligibility-modal.bullet-3":"Onmiddelijke validatie van uw betaling ","eligibility-modal.cost":"Waarvan kosten","eligibility-modal.credit-commitment":"Een lening bindt je en moet worden terugbetaald. Ga na of u kunt terugbetalen voordat u zich vastlegt.","eligibility-modal.credit-cost":"Waarvan kosten van krediet","eligibility-modal.credit-cost-amount":"{creditCost} (APR {TAEG})","eligibility-modal.no-eligibility":"Oeps, het lijkt erop dat de simulatie niet werkte.","eligibility-modal.title":"<highlighted>Betaal in termijnen</highlighted> of later per credit card met Alma.","eligibility-modal.total":"Totaal","installments.today":"Tegenwoordig","payment-plan-strings.day-abbreviation":"J{numberOfDeferredDays}","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.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":"(gratis)"},en=function(e){switch(e){case Ht.fr:return Qt;case Ht.en:return Kt;case Ht.es:return Yt;case Ht.it:return Xt;case Ht.de:return Wt;case Ht.nl:case Ht["nl-BE"]:case Ht["nl-NL"]:return $t;default:return Kt}},tn=function(e){var t=e.children,r=e.locale;return n.createElement(a.IntlProvider,{messages:en(r),locale:r,defaultLocale:"en"},t)};function nn(){return(nn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var an=function(e,n,a){var r,i,l,o=n.domain,s=n.merchantId,u=t.useState([]),c=u[0],m=u[1],d=t.useState(Vt.PENDING),f=d[0],g=d[1],p=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 t.useEffect(function(){f===Vt.PENDING&&function(e,t,n){void 0===e&&(e="");try{return Promise.resolve(fetch(e,{method:"POST",headers:nn({"Content-Type":"application/json"},n),body:JSON.stringify(t)})).then(function(e){return e.json()})}catch(e){return Promise.reject(e)}}(o+"/v2/payments/eligibility",{purchase_amount:e,queries:p},{Authorization:"Alma-Merchant-Auth "+s}).then(function(e){m(e),g(Vt.SUCCESS)}).catch(function(){g(Vt.FAILED)})},[f]),[(r=c,i=a,l=r.filter(function(e){return!(1===e.installments_count&&0===e.deferred_days&&0===e.deferred_months)}),i?l.map(function(e){var t=30*(e.deferred_months?e.deferred_months:0)+(e.deferred_days?e.deferred_days:0),n=i.find(function(n){return e.installments_count===n.installmentsCount&&t===30*(n.deferredMonths?n.deferredMonths:0)+(n.deferredDays?n.deferredDays:0)});return nn({},e,{eligible:!!n&&e.purchase_amount>=(null==n?void 0:n.minAmount)&&e.purchase_amount<=(null==n?void 0:n.maxAmount),minAmount:null==n?void 0:n.minAmount,maxAmount:null==n?void 0:n.maxAmount})}):l),f]},rn=function(e){return n.createElement("div",{className:i("_31lrj",e.className),"data-testid":"loader"},n.createElement("div",{className:"_2p94X"},"a"),n.createElement("div",{className:"_1k0PM"}))};function ln(e){var t=e.color;return n.createElement("svg",{className:e.className,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.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===t?"#fff":t}))}var on=function(e){var t,a=e.children,r=e.isOpen,s=e.onClose,u=e.className,c=e.contentClassName,m=e.scrollable,d=void 0!==m&&m,f=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)t.indexOf(n=i[a])>=0||(r[n]=e[n]);return r}(e,["children","isOpen","onClose","className","contentClassName","scrollable"]);return l.setAppElement("body"),n.createElement(l,Object.assign({className:i("_D8SjB",u),overlayClassName:"_1yxCb",onAfterOpen:function(){o.on()},onAfterClose:function(){o.off()},onRequestClose:s,isOpen:r,shouldCloseOnOverlayClick:!0,shouldCloseOnEsc:!0},f),n.createElement("div",{className:"_12LLh"},n.createElement("button",{onClick:s,className:"_3YRro","data-testid":"modal-close-button"},n.createElement(ln,null))),n.createElement("div",{className:i("_ocM9x",c,(t={},t._1GP2F=d,t))},a))},sn=function(e){var t=e.installments_count,r=e.deferred_days+30*e.deferred_months;return 1===t?n.createElement(a.FormattedMessage,{id:"payment-plan-strings.day-abbreviation",defaultMessage:"J{numberOfDeferredDays}",values:{numberOfDeferredDays:r>0?"+"+r:""}}):t+"x"},un=function(e){var t=e.currentPlanIndex,a=e.setCurrentPlanIndex;return n.createElement("div",{className:"_1l2Oa"},e.eligibilityPlans.map(function(e,r){var l;return n.createElement("button",{key:r,className:i((l={},l._3rue7=r===t,l)),onClick:function(){return a(r)}},sn(e))}))},cn=function(e){var t=e.currentPlan,r=t&&Jt(t.purchase_amount+t.customer_total_cost_amount),l=t?Jt(t.customer_total_cost_amount):0,o=(null==t?void 0:t.annual_interest_rate)&&t.annual_interest_rate/1e4,s=Jt(t?t.customer_total_cost_amount:0),c=t&&t.installments_count>4,m=a.useIntl();return n.createElement("div",{className:"_MPKjS","data-testid":"modal-installments-element"},n.createElement("div",{className:i("_1A7Qv","_14Ejo")},n.createElement("span",null,n.createElement(a.FormattedMessage,{id:"eligibility-modal.total",defaultMessage:"Total"})),n.createElement("span",null,n.createElement(a.FormattedNumber,{value:r,style:"currency",currency:"EUR"}))),n.createElement("div",{className:i("_1A7Qv","_1ZIgu")},n.createElement("span",null,n.createElement(a.FormattedMessage,c?{id:"eligibility-modal.credit-cost",defaultMessage:"Dont coût du crédit"}:{id:"eligibility-modal.cost",defaultMessage:"Dont frais"})),n.createElement("span",null,c?n.createElement(a.FormattedMessage,{id:"eligibility-modal.credit-cost-amount",defaultMessage:"{creditCost} (TAEG {TAEG})",values:{creditCost:m.formatNumber(l,{style:"currency",currency:"EUR"}),TAEG:m.formatNumber(null!=o?o:0,{style:"percent",maximumFractionDigits:2})}}):n.createElement(a.FormattedNumber,{value:s,style:"currency",currency:"EUR"}))),((null==t?void 0:t.payment_plan)||[]).map(function(e,t){return n.createElement("div",{className:"_1A7Qv",key:t},n.createElement("span",null,u.isToday(1e3*e.due_date)?n.createElement(a.FormattedMessage,{id:"installments.today",defaultMessage:"Aujourd'hui"}):n.createElement(a.FormattedDate,{value:1e3*e.due_date,day:"numeric",month:"long",year:"numeric"})),n.createElement("span",null,n.createElement(a.FormattedNumber,{value:Jt(e.total_amount),style:"currency",currency:"EUR"})))}),c&&n.createElement("p",{className:"_1BUr8"},n.createElement(a.FormattedMessage,{id:"eligibility-modal.credit-commitment",defaultMessage:"Un crédit vous engage et doit être remboursé. Vérifiez vos capacités de remboursement\n avant de vous engager."})))},mn=function(){return n.createElement("div",{className:"_180ro","data-testid":"modal-info-element"},n.createElement("div",{className:"_1HqCO"},n.createElement("div",{className:"_3B8wx"},"1"),n.createElement("div",null,n.createElement(a.FormattedMessage,{id:"eligibility-modal.bullet-1",defaultMessage:"Choisissez <strong>Alma</strong> au moment du paiement.",values:{strong:function(){return n.createElement("strong",null,[].slice.call(arguments))}}}))),n.createElement("div",{className:"_1HqCO"},n.createElement("div",{className:"_3B8wx"},"2"),n.createElement("div",null,n.createElement(a.FormattedMessage,{id:"eligibility-modal.bullet-2",defaultMessage:"Renseignez les <strong>informations</strong> demandées.",values:{strong:function(){return n.createElement("strong",null,[].slice.call(arguments))}}}))),n.createElement("div",{className:"_1HqCO"},n.createElement("div",{className:"_3B8wx"},"3"),n.createElement("div",null,n.createElement(a.FormattedMessage,{id:"eligibility-modal.bullet-3",defaultMessage:"La validation de votre paiement <strong>instantanée</strong> !",values:{strong:function(){return n.createElement("strong",null,[].slice.call(arguments))}}}))))};function dn(e){var t=e.color,a=void 0===t?"#00425D":t,r=e.underlineColor,i=void 0===r?"#00425D":r;return n.createElement("svg",{className:e.className,width:"35",height:"23",viewBox:"0 0 40 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M6.38546 10.1313V10.029H4.92542C4.23835 10.029 3.72877 10.0972 3.39668 10.2337C3.07605 10.3587 2.91573 10.6374 2.91573 11.0695C2.91573 11.7177 3.37378 12.0418 4.28988 12.0418C5.05711 12.0418 5.59532 11.8826 5.9045 11.5642C6.22514 11.2344 6.38546 10.7568 6.38546 10.1313ZM3.72304 13.9182C2.64663 13.9182 1.85076 13.6567 1.33546 13.1335C0.820153 12.599 0.5625 11.911 0.5625 11.0695C0.5625 10.0574 0.894586 9.32958 1.55876 8.88606C2.22293 8.43118 3.23636 8.20374 4.59906 8.20374H6.38546V7.82846C6.38546 6.98693 5.84725 6.56616 4.77083 6.56616C3.80893 6.56616 3.27644 6.93007 3.17338 7.65788H0.768622C0.848781 6.78223 1.21522 6.04873 1.86794 5.45738C2.52066 4.86603 3.50547 4.57036 4.82236 4.57036C6.1278 4.57036 7.11261 4.86035 7.77678 5.44032C8.44095 6.0203 8.77304 6.83909 8.77304 7.89669V13.7135H6.60875V12.7241C6.09345 13.5202 5.13155 13.9182 3.72304 13.9182Z",fill:a}),n.createElement("path",{d:"M14.2554 11.6324V13.6965C14.0149 13.7306 13.763 13.7476 13.4996 13.7476C12.5492 13.7476 11.8736 13.5486 11.4728 13.1506C11.072 12.7412 10.8716 12.0873 10.8716 11.1889V0.919922H13.3107V11.0183C13.3107 11.2344 13.3508 11.3936 13.4309 11.496C13.5111 11.5983 13.6771 11.6495 13.929 11.6495C13.9863 11.6495 14.0493 11.6495 14.118 11.6495C14.1982 11.6381 14.244 11.6324 14.2554 11.6324Z",fill:a}),n.createElement("path",{d:"M23.8943 8.63019V13.7135H21.4552V8.40844C21.4552 7.23711 20.9742 6.65145 20.0123 6.65145C19.4512 6.65145 19.0161 6.82203 18.7069 7.16319C18.4092 7.50436 18.2603 7.9763 18.2603 8.57902V13.7135H15.8212V4.77506H18.0714V5.86678C18.5409 5.0025 19.4054 4.57036 20.6651 4.57036C21.856 4.57036 22.7263 4.99113 23.2759 5.83266C24.0432 4.99113 25.0394 4.57036 26.2647 4.57036C27.3182 4.57036 28.1255 4.89446 28.6867 5.54267C29.2478 6.19088 29.5283 7.05516 29.5283 8.13551V13.7135H27.0892V8.40844C27.0892 7.23711 26.6083 6.65145 25.6464 6.65145C25.0738 6.65145 24.6386 6.82772 24.3409 7.18025C24.0432 7.52141 23.8943 8.00473 23.8943 8.63019Z",fill:a}),n.createElement("path",{d:"M37.0321 10.1313V10.029H35.572C34.885 10.029 34.3754 10.0972 34.0433 10.2337C33.7227 10.3587 33.5623 10.6374 33.5623 11.0695C33.5623 11.7177 34.0204 12.0418 34.9365 12.0418C35.7037 12.0418 36.2419 11.8826 36.5511 11.5642C36.8717 11.2344 37.0321 10.7568 37.0321 10.1313ZM34.3696 13.9182C33.2932 13.9182 32.4974 13.6567 31.9821 13.1335C31.4668 12.599 31.2091 11.911 31.2091 11.0695C31.2091 10.0574 31.5412 9.32958 32.2054 8.88606C32.8695 8.43118 33.883 8.20374 35.2457 8.20374H37.0321V7.82846C37.0321 6.98693 36.4939 6.56616 35.4174 6.56616C34.4555 6.56616 33.923 6.93007 33.82 7.65788H31.4152C31.4954 6.78223 31.8618 6.04873 32.5145 5.45738C33.1673 4.86603 34.1521 4.57036 35.469 4.57036C36.7744 4.57036 37.7592 4.86035 38.4234 5.44032C39.0876 6.0203 39.4196 6.83909 39.4196 7.89669V13.7135H37.2554V12.7241C36.7401 13.5202 35.7781 13.9182 34.3696 13.9182Z",fill:a}),n.createElement("rect",{y:"20",width:"40",height:"3",fill:i}))}var fn,gn,pn,yn=function(){return n.createElement("div",{className:"_3Oyv_"},n.createElement(dn,{underlineColor:"#FF414D"}))},hn=function(){return n.createElement("div",{className:"_3ERx-","data-testid":"modal-title-element"},n.createElement(a.FormattedMessage,{id:"eligibility-modal.title",defaultMessage:"<highlighted>Payez en plusieurs fois</highlighted> ou plus tard par carte bancaire avec Alma.",values:{highlighted:function(){return n.createElement("span",null,[].slice.call(arguments))}}}))},vn=function(e){var t=e.children;return n.createElement("div",{className:"_21g6u","data-testid":"modal-container"},n.createElement("div",{className:i(["_3zaP5","_2SBRC"])},n.createElement(hn,null),n.createElement(mn,null),n.createElement(yn,null)),n.createElement("div",{className:"_3zaP5"},t))},bn=function(e){var t=e.children;return n.createElement("div",{className:"_2G7Ch","data-testid":"modal-container"},n.createElement(hn,null),t,n.createElement(mn,null),n.createElement(yn,null))},En=function(e){var r=e.onClose,i=e.eligibilityPlans,l=e.status,o=t.useState(e.initialPlanIndex||0),u=o[0],c=o[1],m=s.useMediaQuery({minWidth:800})?vn:bn,d=i.filter(function(e){return e.eligible}),f=d[u];return n.createElement(on,{onClose:r,ariaHideApp:!1,scrollable:!0,isOpen:!0},n.createElement(m,Object.assign({},{eligibilityPlans:d,currentPlanIndex:u,setCurrentPlanIndex:c,currentPlan:f,status:l}),l===Vt.PENDING&&n.createElement("div",{className:"_2oTJq"},n.createElement(rn,null)),l===Vt.SUCCESS&&0===d.length&&n.createElement("div",{className:"_17qNJ"},n.createElement(a.FormattedMessage,{id:"eligibility-modal.no-eligibility",defaultMessage:"Oups, il semblerait que la simulation n'aie pas fonctionné."})),l===Vt.SUCCESS&&d.length>=1&&n.createElement(n.Fragment,null,n.createElement(un,{eligibilityPlans:d,currentPlanIndex:u,setCurrentPlanIndex:c}),n.createElement(cn,{currentPlan:f}))))},An=function(e){var t=e.onClose,a=an(e.purchaseAmount,e.apiData,e.configPlans);return n.createElement(En,{initialPlanIndex:0,onClose:t,eligibilityPlans:a[0],status:a[1]})},Cn=function(e){return n.createElement("div",{className:i("_2SwwZ",e.className),"data-testid":"loader"},n.createElement("div",{className:"_2qODo"}),n.createElement("div",{className:"_2YO01"}))},_n=function(e){var r,l,o,s,c=e.transitionDelay,m=e.hideIfNotEligible,d=e.suggestedPaymentPlan,f=an(e.purchaseAmount,e.apiData,e.configPlans),g=f[0],p=f[1],y=g.filter(function(e){return e.eligible}),h=function(e){var t=e.suggestedPaymentPlan,n=e.eligibilityPlans,a=Array.isArray(t)?t:[t],r=function(e){var t=a[e],r=n.findIndex(function(e){return e.installments_count===t&&e.eligible});if(-1!==r)return{v:r}};for(var i in a){var l=r(i);if("object"==typeof l)return l.v}return 0}({eligibilityPlans:g,suggestedPaymentPlan:null!=d?d:0}),v=void 0!==d,b=void 0!==c,E=t.useState(!1),A=E[0],C=E[1],_=g.reduce(function(e,t,n){return t.eligible?[].concat(e,[n]):e},[]),O=function(e,n){var a=t.useState(0),r=a[0],i=a[1],l=t.useState(!0),o=l[0],s=l[1];return t.useEffect(function(){var t=!0;return 0!==e.length&&(!e.includes(r)&&o&&i(e[0]),setTimeout(function(){o&&t&&i(e[e.includes(r)?(e.indexOf(r)+1)%e.length:0])},n)),function(){t=!1}},[e,r]),{current:r,onHover:function(e){i(e),s(!1)},onLeave:function(){s(!0)}}}(_,b?null!=c?c:5500:v?31536e6:5500),w=O.current,I=O.onHover,S=O.onLeave;return t.useEffect(function(){p===Vt.SUCCESS&&v&&(I(h),S())},[p]),p===Vt.PENDING?n.createElement("div",{className:i("_TSkFv","_1ZDMS")},n.createElement(Cn,null)):m&&0===y.length||0===g.length||p===Vt.FAILED?null:n.createElement(n.Fragment,null,n.createElement("div",{onClick:function(e){e.preventDefault(),y.length>0&&C(!0)},className:i("_TSkFv",(r={},r._UksZa=y.length>0,r["_1lr-q"]=0===y.length,r)),"data-testid":"widget-button"},n.createElement("div",{className:"_bMClc"},n.createElement(dn,{className:"_LJ4nZ"}),n.createElement("div",{className:"_17c_S"},g.map(function(e,t){var a;return n.createElement("div",{key:t,onMouseEnter:function(){return I(t)},onMouseOut:S,className:i("_2Kqjn",(a={},a._3dG_J=w===t,a._3O1bg=!e.eligible,a))},sn(e))}))),n.createElement("div",{className:i("_25GrF",(l={},l._3O1bg=g[w]&&!g[w].eligible,l))},0!==g.length&&function(e){var t=e.installments_count,r=e.minAmount,i=void 0===r?0:r,l=e.maxAmount,o=void 0===l?0:l,s=e.deferred_days+30*e.deferred_months,c=function(){if(e.payment_plan.every(function(e){return 0===e.customer_fee&&0===e.customer_interest}))return n.createElement(n.Fragment,null," ",n.createElement(a.FormattedMessage,{id:"payment-plan-strings.no-fee",defaultMessage:"(sans frais)"}))};if(!e.eligible)return n.createElement(a.FormattedMessage,e.purchase_amount>o?{id:"payment-plan-strings.ineligible-greater-than-max",defaultMessage:"Jusqu'à {maxAmount}",values:{maxAmount:n.createElement(a.FormattedNumber,{value:Jt(o),style:"currency",currency:"EUR"})}}:{id:"payment-plan-strings.ineligible-lower-than-min",defaultMessage:"À partir de {minAmount}",values:{minAmount:n.createElement(a.FormattedNumber,{value:Jt(i),style:"currency",currency:"EUR"})}});if(0!==s&&1===t)return n.createElement(n.Fragment,null,n.createElement(a.FormattedMessage,{id:"payment-plan-strings.deferred",defaultMessage:"{totalAmount} à payer le {dueDate}",values:{totalAmount:n.createElement(a.FormattedNumber,{value:Jt(e.payment_plan[0].total_amount),style:"currency",currency:"EUR"}),dueDate:n.createElement(a.FormattedDate,{value:u.secondsToMilliseconds(e.payment_plan[0].due_date),day:"numeric",month:"long",year:"numeric"})}}),c());if(t>0){var m=e.payment_plan.every(function(t,n){return 0===n||t.total_amount===e.payment_plan[0].total_amount});return n.createElement(n.Fragment,null,n.createElement(a.FormattedMessage,m?{id:"payment-plan-strings.multiple-installments-same-amount",defaultMessage:"{installmentsCount} x {totalAmount}",values:{totalAmount:n.createElement(a.FormattedNumber,{value:Jt(e.payment_plan[0].total_amount),style:"currency",currency:"EUR"}),installmentsCount:t}}:{id:"payment-plan-strings.multiple-installments",defaultMessage:"{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",values:{firstInstallmentAmount:n.createElement(a.FormattedNumber,{value:Jt(e.payment_plan[0].total_amount),style:"currency",currency:"EUR"}),numberOfRemainingInstallments:t-1,othersInstallmentAmount:n.createElement(a.FormattedNumber,{value:Jt(e.payment_plan[1].total_amount),style:"currency",currency:"EUR"})}}),c())}return n.createElement(a.FormattedMessage,{id:"payment-plan-strings.default-message",defaultMessage:"Payez en plusieurs fois avec Alma"})}(g[w]))),A&&n.createElement(En,{initialPlanIndex:(o=w,s=_.findIndex(function(e){return e===o}),-1===s?0:s),onClose:function(){return C(!1)},eligibilityPlans:y,status:p}))},On=function(){function e(e){this.apiData=e}return e.prototype.add=function(e,t){var a=this,i=document.querySelector(t.container);if(i&&r.unmountComponentAtNode(i),e===Ut.PaymentPlans){var l=t.container,o=t.locale;i&&r.render(n.createElement(tn,{locale:void 0===o?Ht.en:o},n.createElement(_n,{purchaseAmount:t.purchaseAmount,apiData:this.apiData,configPlans:t.plans,transitionDelay:t.transitionDelay,hideIfNotEligible:t.hideIfNotEligible,suggestedPaymentPlan:t.suggestedPaymentPlan})),document.querySelector(l))}if(e===Ut.Modal){var s,u=t.container,c=t.clickableSelector,m=t.purchaseAmount,d=t.plans,f=t.locale,g=void 0===f?Ht.en:f,p=function(){return i&&r.unmountComponentAtNode(i)},y=function(){r.render(n.createElement(tn,{locale:g},n.createElement(An,{purchaseAmount:m,apiData:a.apiData,configPlans:d,onClose:p})),document.querySelector(u))};return c&&(null==(s=document.querySelector(c))||s.addEventListener("click",y,!1)),{open:y,close:p}}},e}();(fn=exports.ApiMode||(exports.ApiMode={})).LIVE="https://api.getalma.eu",fn.TEST="https://api.sandbox.getalma.eu",(gn=exports.Widgets||(exports.Widgets={})).initialize=function(e,t){return new On({domain:t,merchantId:e})},gn.PaymentPlans=Ut.PaymentPlans,gn.Modal=Ut.Modal,(pn=exports.Utils||(exports.Utils={})).priceToCents=function(e){return Math.round(100*e)},pn.priceFromCents=Jt,pn.formatCents=function(e){return String(Jt(e)).replace(".",",")};
|
|
2
2
|
//# sourceMappingURL=widgets.js.map
|