@everymatrix/player-lugas-limit 1.72.1 → 1.72.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-0a905cca.js → index-bf3197ee.js} +14 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/player-lugas-limit.cjs.entry.js +155 -154
- package/dist/cjs/player-lugas-limit.cjs.js +2 -2
- package/dist/collection/components/player-lugas-limit/player-lugas-limit.css +51 -28
- package/dist/collection/components/player-lugas-limit/player-lugas-limit.js +192 -176
- package/dist/collection/utils/locale.utils.js +21 -5
- package/dist/esm/{index-6920b292.js → index-c89cfec9.js} +14 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/player-lugas-limit.entry.js +155 -154
- package/dist/esm/player-lugas-limit.js +3 -3
- package/dist/player-lugas-limit/index-c89cfec9.js +2 -0
- package/dist/player-lugas-limit/player-lugas-limit.entry.js +1 -1
- package/dist/player-lugas-limit/player-lugas-limit.esm.js +1 -1
- package/dist/types/components/player-lugas-limit/player-lugas-limit.d.ts +15 -82
- package/dist/types/components.d.ts +6 -81
- package/package.json +1 -1
- package/dist/player-lugas-limit/index-6920b292.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const NAMESPACE = 'player-lugas-limit';
|
|
2
|
-
const BUILD = /* player-lugas-limit */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect:
|
|
2
|
+
const BUILD = /* player-lugas-limit */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -646,6 +646,12 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
646
646
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
647
647
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
648
648
|
hostTagName = hostElm.tagName;
|
|
649
|
+
if (cmpMeta.$attrsToReflect$) {
|
|
650
|
+
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
651
|
+
cmpMeta.$attrsToReflect$.map(
|
|
652
|
+
([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
|
|
653
|
+
);
|
|
654
|
+
}
|
|
649
655
|
if (isInitialLoad && rootVnode.$attrs$) {
|
|
650
656
|
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
651
657
|
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
@@ -905,8 +911,12 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
905
911
|
/* @__PURE__ */ new Set([
|
|
906
912
|
...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
|
|
907
913
|
...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
|
|
914
|
+
var _a2;
|
|
908
915
|
const attrName = m[1] || propName;
|
|
909
916
|
attrNameToPropName.set(attrName, propName);
|
|
917
|
+
if (m[0] & 512 /* ReflectAttr */) {
|
|
918
|
+
(_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
|
|
919
|
+
}
|
|
910
920
|
return attrName;
|
|
911
921
|
})
|
|
912
922
|
])
|
|
@@ -1070,6 +1080,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1070
1080
|
{
|
|
1071
1081
|
cmpMeta.$members$ = compactMeta[2];
|
|
1072
1082
|
}
|
|
1083
|
+
{
|
|
1084
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
1085
|
+
}
|
|
1073
1086
|
{
|
|
1074
1087
|
cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
|
|
1075
1088
|
}
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-c89cfec9.js';
|
|
2
|
+
export { s as setNonce } from './index-c89cfec9.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["player-lugas-limit",[[1,"player-lugas-limit",{"userId":[
|
|
8
|
+
return bootstrapLazy([["player-lugas-limit",[[1,"player-lugas-limit",{"userId":[513,"user-id"],"session":[513],"endpoint":[513],"currency":[513],"flow":[513],"amount":[513],"lang":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"translationUrl":[513,"translation-url"],"hasValidation":[32],"kycStep":[32],"isLoading":[32],"regularDepositLimitAmount":[32],"isSubmitted":[32],"isUseExistingLimitOptionActive":[32],"selectedPredefinedAmount":[32],"errorMessageOnInitialization":[32],"errorMessageOnSubmit":[32],"errorMessageOnInput":[32],"hasLugasError":[32],"showCustomAmount":[32],"newAmount":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-c89cfec9.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'de';
|
|
4
4
|
let TRANSLATIONS = {
|
|
@@ -21,12 +21,20 @@ let TRANSLATIONS = {
|
|
|
21
21
|
LugasNotSet: 'No deposit limit set. Please enter a new limit.',
|
|
22
22
|
loading: 'Loading, please wait ...',
|
|
23
23
|
error: 'It was an error while trying to fetch the data',
|
|
24
|
-
|
|
24
|
+
kyc1: 'All deposit limit changes must be reported to LUGAS in accordance with regulatory requirements. Please note that decreases in the limit will take effect immediately, while increases will only come into effect after 8 days at the latest.',
|
|
25
|
+
kyc2: 'We were able to set your monthly deposit limit to <b>{amount} {currency}</b>. For the selected limit, we require documents that show your economic capacity. Please upload your last payslip as well as a current bank statement, including the balance, that confirms that you received the payment.',
|
|
26
|
+
kyc3: 'We have transmitted your desired limit to Lugas Please be aware that the limit will only come into effect after 8 days at the latest.',
|
|
27
|
+
kycThanks: 'Thank you!',
|
|
28
|
+
kycSure: 'Are you sure?',
|
|
29
|
+
setNewLimit: 'SET NEW LIMIT',
|
|
30
|
+
keepExistingLimit: 'KEEP EXISTING LIMIT',
|
|
31
|
+
Close: 'CLOSE',
|
|
32
|
+
UploadDocuments: 'UPLOAD DOCUMENTS',
|
|
25
33
|
},
|
|
26
34
|
de: {
|
|
27
35
|
LugasSetLimitDialogTitle: 'Monatliches zentrales Einzahlungslimit',
|
|
28
36
|
LugasInfoBox: 'Das zentrale Limit ist Ihr monatliches Einzahlungslimit für alle lizenzierten Websites in Deutschland. Beachten Sie, dass sich Ihr Limit und der verbleibende Betrag ändern können, wenn Sie auf anderen Websites Einzahlungen vornehmen oder Ihr Limit anpassen.',
|
|
29
|
-
ChooseLimit: 'Limit
|
|
37
|
+
ChooseLimit: 'Choose Limit',
|
|
30
38
|
ButtonCustomValue: 'Eigener',
|
|
31
39
|
ButtonMax: 'Max',
|
|
32
40
|
LugasSetLimitDialogButtonSetLimit: 'LIMIT SETZEN {amount} {currency}',
|
|
@@ -40,9 +48,17 @@ let TRANSLATIONS = {
|
|
|
40
48
|
link: 'klicken Sie hier',
|
|
41
49
|
},
|
|
42
50
|
LugasNotSet: 'Kein Einzahlungslimit festgelegt. Bitte geben Sie ein neues Limit ein.',
|
|
43
|
-
loading:
|
|
44
|
-
error:
|
|
45
|
-
|
|
51
|
+
loading: "Lade, bitte warten ...",
|
|
52
|
+
error: "Beim Laden der Daten ist ein Fehler aufgetreten.",
|
|
53
|
+
kyc1: "Alle Änderungen des Einzahlungslimits müssen gemäß den gesetzlichen Anforderungen an LUGAS gemeldet werden. Bitte beachten Sie, dass eine Senkung des Limits sofort wirksam wird, während eine Erhöhung spätestens nach 8 Tagen in Kraft tritt.",
|
|
54
|
+
kyc2: "Wir konnten Ihr monatliches Einzahlungslimit auf <b>{amount} {currency}</b> festlegen. Für das gewählte Limit benötigen wir Nachweise über Ihre wirtschaftliche Leistungsfähigkeit. Bitte laden Sie Ihre letzte Gehaltsabrechnung sowie einen aktuellen Kontoauszug, einschließlich Kontostand, hoch, der den Zahlungseingang bestätigt.",
|
|
55
|
+
kyc3: "Wir haben Ihr gewünschtes Limit an LUGAS übermittelt. Bitte beachten Sie, dass das Limit spätestens nach 8 Tagen in Kraft tritt.",
|
|
56
|
+
kycThanks: "Vielen Dank!",
|
|
57
|
+
kycSure: "Sind Sie sicher?",
|
|
58
|
+
setNewLimit: "NEUES LIMIT FESTLEGEN",
|
|
59
|
+
keepExistingLimit: "AKTUELLES LIMIT BEIBEHALTEN",
|
|
60
|
+
Close: "SCHLIESSEN",
|
|
61
|
+
UploadDocuments: "DOKUMENTE HOCHLADEN"
|
|
46
62
|
},
|
|
47
63
|
};
|
|
48
64
|
const getTranslations = (url) => {
|
|
@@ -137,73 +153,44 @@ function setStreamStyling(stylingContainer, domain, subscription) {
|
|
|
137
153
|
}
|
|
138
154
|
}
|
|
139
155
|
|
|
140
|
-
const playerLugasLimitCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n font-family: \"Roboto\", sans-serif;\n}\n\n.ModalContainer {\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: var(--emw--font-size-small, 12px);\n container-type: inline-size;\n}\n.ModalContainer hr {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin: 10px 0px;\n}\n.ModalContainer p {\n margin: 0;\n}\n.ModalContainer button {\n width: 100%;\n border: 1px solid var(--emw--color-gray-100, #E8E9EB);\n padding: 10px 0;\n cursor: pointer;\n width: 100%;\n border-radius: var(--emw--border-radius-small, 4px);\n}\n.ModalContainer button.PrimaryButton {\n background: var(--emw--color-primary, #6BB816);\n border: none;\n font-weight: 500;\n}\n.ModalContainer button.PrimaryButton:not(:disabled) {\n color: var(--emw--color-white, #FFF);\n}\n.ModalContainer button.PrimaryButton:disabled {\n cursor: default;\n}\n.ModalContainer .Container {\n position: fixed;\n top: 30vh;\n width: 320px;\n background: var(--emw--color-white, #
|
|
156
|
+
const playerLugasLimitCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n font-family: \"Roboto\", sans-serif;\n}\n\n.ModalContainer {\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: var(--emw--color-black-transparency-50, rgba(0, 0, 0, 0.5));\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: var(--emw--font-size-small, 12px);\n container-type: inline-size;\n}\n.ModalContainer hr {\n border: 1px solid var(--emw--color-black-transparency-10, rgba(0, 0, 0, 0.1));\n margin: 10px 0px;\n}\n.ModalContainer p {\n margin: 0;\n}\n.ModalContainer button {\n width: 100%;\n border: 1px solid var(--emw--color-gray-100, #E8E9EB);\n padding: 10px 0;\n cursor: pointer;\n width: 100%;\n border-radius: var(--emw--border-radius-small, 4px);\n}\n.ModalContainer button.PrimaryButton {\n background: var(--emw--color-primary, #6BB816);\n border: none;\n font-weight: 500;\n}\n.ModalContainer button.PrimaryButton:not(:disabled) {\n color: var(--emw--color-white, #FFF);\n}\n.ModalContainer button.PrimaryButton:disabled {\n cursor: default;\n}\n.ModalContainer .Container {\n position: fixed;\n top: 30vh;\n width: 320px;\n background: var(--emw--color-white, #FFF);\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n border-radius: 4px;\n transform: scale(1.1);\n}\n.ModalContainer .ModalHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: var(--emw--color-gray-50, #F7F8FA);\n padding: 12px;\n}\n.ModalContainer .ModalHeader h2 {\n font-weight: bold;\n font-size: var(--emw--font-size-small, 12px);\n margin: 0;\n}\n.ModalContainer .ModalBody {\n background: var(--emw--color-white, #FFF);\n padding: 12px;\n container-type: inline-size;\n border-radius: 4px;\n}\n.ModalContainer .ModalBody .ErrorContainer {\n display: flex;\n align-items: center;\n color: var(--emw--color-red-100, #E10014);\n border-bottom: 1px solid var(--emw--color-gray-100, #E8E9EB);\n margin: -12px;\n padding: 12px;\n margin-bottom: 12px;\n font-weight: bold;\n position: relative;\n background: linear-gradient(180deg, var(--emw--color-gray-100, #E8E9EB) 0%, rgba(255, 255, 255, 0.47) 30%);\n}\n.ModalContainer .ModalBody .DismissError {\n position: absolute;\n right: 12px;\n cursor: pointer;\n}\n.ModalContainer .ModalBody .ErrorParagraph {\n display: flex;\n align-items: center;\n}\n.ModalContainer .ModalBody .ErrorIcon {\n background: linear-gradient(180deg, var(--emw--color-red-100, #E10014) 0%, var(--emw--color-red-150, #D60080) 100%);\n text-align: center;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n margin-right: 6px;\n flex-shrink: 0;\n}\n.ModalContainer .ModalBody .ErrorIcon svg {\n width: 6px;\n height: 6px;\n}\n.ModalContainer .ModalBody .ErrorIcon svg path {\n fill: var(--emw--color-white, #FFF);\n}\n.ModalContainer .ModalBody .ChooseLimitLabel {\n text-transform: uppercase;\n}\n.ModalContainer .ModalBody .PredefinedAmounts {\n display: flex;\n justify-content: space-between;\n}\n.ModalContainer .ModalBody .PredefinedAmounts button {\n background: none;\n margin: -1px 0 0 -1px;\n color: var(--emw--color-gray-150, #808080);\n}\n.ModalContainer .ModalBody .PredefinedAmounts button.Active {\n font-weight: bold;\n background: var(--emw--color-gray-50, #F7F8FA);\n color: var(--emw--color-gray-200, #323233);\n}\n.ModalContainer .ModalBody .PredefinedAmounts button:first-child {\n border-radius: 4px 0 0 4px;\n}\n.ModalContainer .ModalBody .PredefinedAmounts button:last-child {\n border-radius: 0 4px 4px 0;\n}\n.ModalContainer .ModalBody .CustomAmountInput {\n width: 100%;\n padding: 10px;\n border: 1px solid var(--emw--color-gray-100, #E8E9EB);\n border-radius: 4px;\n box-sizing: border-box;\n margin-bottom: 6px;\n color: var(--emw--color-gray-200, #323233);\n font-weight: bold;\n}\n.ModalContainer .ModalBody .CustomAmountInput.InvalidInput {\n border: 1px solid var(--emw--color-red, #FF0000);\n}\n.ModalContainer .ModalBody .InvalidParagraph {\n font-size: var(--emw--font-size-small, 12px);\n color: var(--emw--color-red, #FF0000);\n}\n.ModalContainer .ModalBody .SetLimitBtn {\n margin-top: 10px;\n}\n.ModalContainer .ValidatorContainer {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.ModalContainer .Paragraphs:not(:last-child) {\n margin-bottom: 20px;\n}\n.ModalContainer .LimitAmountWrapper {\n display: flex;\n flex-direction: column;\n gap: 10px;\n position: relative;\n}\n\n.ModalFooter {\n padding-top: 12px;\n margin: 5px 0px;\n}\n\n.Link {\n color: inherit;\n text-decoration: underline;\n cursor: pointer;\n}\n.Link.Inactive {\n cursor: default;\n color: var(--emw--color-gray-150, #808080);\n}\n\n.ContainerButtons {\n display: flex;\n justify-content: space-around;\n gap: 10px;\n padding-top: 5px;\n}\n.ContainerButtons .FirstButton {\n background-color: var(--emw--color-white, #FFF);\n font-weight: bold;\n color: var(--emw--button-color, #002554);\n font-size: var(--emw--font-size-small, 10px);\n border: 2.5px solid var(--emw--button-border-color, #DEE2E6);\n width: 100%;\n cursor: pointer;\n}\n.ContainerButtons .SecondButton {\n background-color: var(--emw--color-primary, #6BB816);\n border: none;\n cursor: pointer;\n font-weight: bold;\n font-size: var(--emw--font-size-small, 10px);\n color: var(--emw--color-white, #FFF);\n width: 100%;\n}\n.ContainerButtons button {\n width: 240px;\n height: 30px;\n}\n\ninput {\n /* Firefox */\n -moz-appearance: textfield;\n /* Chrome, Safari, Edge, Opera */\n}\ninput::-webkit-outer-spin-button, input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n@container (max-width: 1300px) {\n .ModalContainer .Container {\n width: 50%;\n }\n}\n@container (max-width: 800px) {\n .ModalContainer .Container {\n width: 70%;\n }\n}\n.LoadingWrapper {\n width: 100%;\n height: 100%;\n background: var(--emw--color-white-transparency-80, rgba(255, 255, 255, 0.8));\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n width: 30px;\n height: 30px;\n}\n.spinner .path {\n stroke: var(--emw--color-primary, #6BB816);\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}";
|
|
141
157
|
const PlayerLugasLimitStyle0 = playerLugasLimitCss;
|
|
142
158
|
|
|
143
159
|
const PlayerLugasLimit = class {
|
|
144
160
|
constructor(hostRef) {
|
|
145
161
|
registerInstance(this, hostRef);
|
|
146
|
-
this.
|
|
147
|
-
|
|
162
|
+
this.uploadDocuments = createEvent(this, "uploadDocuments", 7);
|
|
163
|
+
this.closePopup = createEvent(this, "closePopup", 7);
|
|
164
|
+
// Internal variables
|
|
148
165
|
this.predefinedAmounts = [];
|
|
149
|
-
/** Displayed currency */
|
|
150
166
|
this.displayedCurrency = '';
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
this.isSubmitted = true;
|
|
162
|
-
this.errorMessageOnSubmit = '';
|
|
163
|
-
const url = new URL(`${this.endpoint}v2/player/${this.userId}/limit/lugas`);
|
|
164
|
-
const roleLimitAmount = isInitialLimit ? this.newAmount : 0;
|
|
165
|
-
const requestBody = {
|
|
166
|
-
amount,
|
|
167
|
-
keepLimit,
|
|
168
|
-
roleLimitAmount
|
|
169
|
-
};
|
|
170
|
-
const requestOptions = {
|
|
171
|
-
method: 'POST',
|
|
172
|
-
headers: {
|
|
173
|
-
'X-SessionId': this.session,
|
|
174
|
-
'X-Session-Type': 'others',
|
|
175
|
-
'Content-Type': 'application/json',
|
|
176
|
-
'Authorization': `Bearer ${this.session}`
|
|
177
|
-
},
|
|
178
|
-
body: JSON.stringify(requestBody)
|
|
179
|
-
};
|
|
180
|
-
try {
|
|
181
|
-
const response = await fetch(url.href, requestOptions);
|
|
182
|
-
if (!response.ok) {
|
|
183
|
-
const error = await response.json();
|
|
184
|
-
throw error;
|
|
185
|
-
}
|
|
186
|
-
this.closeLugasModal.emit();
|
|
187
|
-
}
|
|
188
|
-
catch (error) {
|
|
189
|
-
this.handleSubmissionError(error, keepLimit);
|
|
190
|
-
}
|
|
191
|
-
finally {
|
|
192
|
-
this.isSubmitted = false;
|
|
167
|
+
this.handleClick = (input) => {
|
|
168
|
+
switch (input) {
|
|
169
|
+
case 'UploadDocuments':
|
|
170
|
+
this.uploadDocuments.emit();
|
|
171
|
+
window.postMessage({ type: 'uploadDocuments' }, window.location.href);
|
|
172
|
+
break;
|
|
173
|
+
case 'Close':
|
|
174
|
+
this.closePopup.emit();
|
|
175
|
+
window.postMessage({ type: 'closePopup' }, window.location.href);
|
|
176
|
+
break;
|
|
193
177
|
}
|
|
194
178
|
};
|
|
195
179
|
this.userId = '';
|
|
196
180
|
this.session = '';
|
|
197
181
|
this.endpoint = '';
|
|
198
182
|
this.currency = 'EUR';
|
|
183
|
+
this.flow = '';
|
|
199
184
|
this.amount = '';
|
|
200
185
|
this.lang = undefined;
|
|
201
186
|
this.clientStyling = '';
|
|
202
187
|
this.clientStylingUrl = '';
|
|
203
188
|
this.mbSource = undefined;
|
|
204
189
|
this.translationUrl = '';
|
|
190
|
+
this.hasValidation = true;
|
|
191
|
+
this.kycStep = undefined;
|
|
205
192
|
this.isLoading = false;
|
|
206
|
-
this.
|
|
193
|
+
this.regularDepositLimitAmount = '';
|
|
207
194
|
this.isSubmitted = false;
|
|
208
195
|
this.isUseExistingLimitOptionActive = true;
|
|
209
196
|
this.selectedPredefinedAmount = undefined;
|
|
@@ -211,13 +198,15 @@ const PlayerLugasLimit = class {
|
|
|
211
198
|
this.errorMessageOnSubmit = '';
|
|
212
199
|
this.errorMessageOnInput = '';
|
|
213
200
|
this.hasLugasError = false;
|
|
201
|
+
this.showCustomAmount = false;
|
|
214
202
|
this.newAmount = '';
|
|
215
203
|
}
|
|
216
|
-
|
|
217
|
-
* Watch for changes in the translation URL and fetch new translations
|
|
218
|
-
*/
|
|
204
|
+
// Watchers
|
|
219
205
|
handleNewTranslations() {
|
|
220
|
-
|
|
206
|
+
this.isLoading = true;
|
|
207
|
+
getTranslations(this.translationUrl).then(() => {
|
|
208
|
+
this.isLoading = false;
|
|
209
|
+
});
|
|
221
210
|
}
|
|
222
211
|
handleClientStylingChange(newValue, oldValue) {
|
|
223
212
|
if (newValue != oldValue) {
|
|
@@ -230,65 +219,84 @@ const PlayerLugasLimit = class {
|
|
|
230
219
|
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
231
220
|
}
|
|
232
221
|
}
|
|
233
|
-
|
|
234
|
-
* Lifecycle method that fetches translations when the component is loaded.
|
|
235
|
-
*/
|
|
222
|
+
// Lifecycle methods
|
|
236
223
|
async componentWillLoad() {
|
|
237
224
|
if (this.translationUrl.length > 2) {
|
|
238
225
|
await getTranslations(this.translationUrl);
|
|
239
226
|
}
|
|
240
|
-
await this.
|
|
227
|
+
await this.fetchDepositLimitConfig();
|
|
241
228
|
this.displayedCurrency = this.currency === 'EUR' ? '€' : this.currency;
|
|
242
229
|
}
|
|
243
230
|
componentDidLoad() {
|
|
244
|
-
if (this.stylingContainer)
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
231
|
+
if (!this.stylingContainer)
|
|
232
|
+
return;
|
|
233
|
+
if (window.emMessageBus != undefined) {
|
|
234
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
if (this.clientStyling)
|
|
238
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
239
|
+
if (this.clientStylingUrl)
|
|
240
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
254
241
|
}
|
|
255
242
|
}
|
|
256
243
|
disconnectedCallback() {
|
|
257
244
|
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
258
245
|
}
|
|
259
|
-
|
|
260
|
-
* Fetches the monthly deposit limit configuration from the API.
|
|
261
|
-
*
|
|
262
|
-
* @returns Promise - Promise that resolves when the configuration is fetched
|
|
263
|
-
*/
|
|
264
|
-
async getMonthlyDepositLimitConfig() {
|
|
265
|
-
const url = new URL(`${this.endpoint}api/v1/gm/legislation/config/month-deposit-limit`);
|
|
246
|
+
async fetchDepositLimitConfig() {
|
|
266
247
|
this.isLoading = true;
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
248
|
+
try {
|
|
249
|
+
const url = new URL('/api/v1/gm/legislation/config/month-deposit-limit/', this.endpoint);
|
|
250
|
+
const response = await fetch(url.href);
|
|
251
|
+
if (!response.ok)
|
|
252
|
+
throw new Error('Failed to load config');
|
|
253
|
+
const data = await response.json();
|
|
254
|
+
this.predefinedAmounts = data.preDefinedOptions;
|
|
255
|
+
this.minAmount = data.minAmount;
|
|
256
|
+
this.maxAmount = data.maxAmount;
|
|
257
|
+
}
|
|
258
|
+
catch (error) {
|
|
259
|
+
this.errorMessageOnInitialization = translate('error', this.lang);
|
|
260
|
+
console.error(error);
|
|
261
|
+
}
|
|
262
|
+
finally {
|
|
263
|
+
this.isLoading = false;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
async postPlayerSituation(userAmount, keepLimit = false, initialNewLimit = false) {
|
|
267
|
+
if (keepLimit && !this.isUseExistingLimitOptionActive)
|
|
268
|
+
return;
|
|
269
|
+
this.isSubmitted = true;
|
|
270
|
+
this.errorMessageOnSubmit = '';
|
|
271
|
+
const url = new URL(`v2/player/${this.userId}/limit/lugas/`, this.endpoint);
|
|
272
|
+
const roleLimitAmount = initialNewLimit ? this.amount : 0;
|
|
273
|
+
const body = Object.assign({ softMigration: this.flow === '1', keepLimit,
|
|
274
|
+
roleLimitAmount }, (userAmount && { amount: userAmount }));
|
|
275
|
+
const options = {
|
|
276
|
+
method: 'POST',
|
|
277
|
+
headers: {
|
|
278
|
+
'X-SessionId': this.session,
|
|
279
|
+
'Content-Type': 'application/json',
|
|
280
|
+
'Authorization': `Bearer ${this.session}`
|
|
281
|
+
},
|
|
282
|
+
body: JSON.stringify(body)
|
|
283
|
+
};
|
|
284
|
+
try {
|
|
285
|
+
const response = await fetch(url.href, options);
|
|
286
|
+
if (!response.ok)
|
|
287
|
+
throw new Error(`HTTP ${response.status}`);
|
|
288
|
+
const data = await response.json();
|
|
289
|
+
this.kycStep = data.popup;
|
|
290
|
+
this.hasValidation = false;
|
|
291
|
+
this.regularDepositLimitAmount = data.regulatorDepositLimitAmount || '';
|
|
292
|
+
}
|
|
293
|
+
catch (error) {
|
|
294
|
+
this.handleSubmissionError(error, keepLimit);
|
|
295
|
+
}
|
|
296
|
+
finally {
|
|
297
|
+
this.isSubmitted = false;
|
|
298
|
+
}
|
|
286
299
|
}
|
|
287
|
-
/**
|
|
288
|
-
* Handles errors during the submission of the monthly deposit limit.
|
|
289
|
-
* @param error - Error response from the server
|
|
290
|
-
* @param keepLimit - Whether the user opted to keep the current limit
|
|
291
|
-
*/
|
|
292
300
|
handleSubmissionError(error, keepLimit) {
|
|
293
301
|
var _a, _b;
|
|
294
302
|
this.errorMessageOnSubmit = translate('LugasNotSet', this.lang);
|
|
@@ -308,23 +316,34 @@ const PlayerLugasLimit = class {
|
|
|
308
316
|
console.error('Unexpected Error:', error);
|
|
309
317
|
}
|
|
310
318
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
319
|
+
handleAmountClick(amount) {
|
|
320
|
+
this.showCustomAmount = false;
|
|
321
|
+
this.errorMessageOnInput = '';
|
|
322
|
+
this.selectedPredefinedAmount = amount;
|
|
323
|
+
switch (amount) {
|
|
324
|
+
case 'Other':
|
|
325
|
+
this.newAmount = '';
|
|
326
|
+
this.showCustomAmount = true;
|
|
327
|
+
break;
|
|
328
|
+
case 'Max':
|
|
329
|
+
this.newAmount = this.maxAmount.toString();
|
|
330
|
+
this.showCustomAmount = true;
|
|
331
|
+
break;
|
|
332
|
+
default:
|
|
333
|
+
this.newAmount = amount;
|
|
334
|
+
this.postPlayerSituation(this.newAmount, false, true);
|
|
335
|
+
break;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
315
338
|
handleSubmit(event) {
|
|
316
339
|
event.preventDefault();
|
|
317
|
-
if (
|
|
318
|
-
|
|
340
|
+
if (this.errorMessageOnInput) {
|
|
341
|
+
return;
|
|
319
342
|
}
|
|
343
|
+
this.postPlayerSituation(this.newAmount, false, true);
|
|
320
344
|
}
|
|
321
|
-
|
|
322
|
-
* Handles input changes.
|
|
323
|
-
* @param event - The input change event
|
|
324
|
-
*/
|
|
325
|
-
handleInputChange(event) {
|
|
345
|
+
handleValidatorInputChange(event) {
|
|
326
346
|
this.newAmount = event.target.value;
|
|
327
|
-
// Perform validation checks
|
|
328
347
|
this.isValidNumber = !isNaN(Number(this.newAmount));
|
|
329
348
|
this.isWithinRange = (Number(this.newAmount) >= this.minAmount) && (Number(this.newAmount) <= this.maxAmount);
|
|
330
349
|
if (!this.isWithinRange || !this.isValidNumber) {
|
|
@@ -339,68 +358,50 @@ const PlayerLugasLimit = class {
|
|
|
339
358
|
event.target.value = this.newAmount;
|
|
340
359
|
}
|
|
341
360
|
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
case 'Other':
|
|
352
|
-
this.newAmount = '';
|
|
353
|
-
this.showCustomAmount = true;
|
|
354
|
-
break;
|
|
355
|
-
case 'Max':
|
|
356
|
-
this.newAmount = this.maxAmount.toString();
|
|
357
|
-
this.showCustomAmount = true;
|
|
358
|
-
break;
|
|
361
|
+
renderKYC(step) {
|
|
362
|
+
switch (step) {
|
|
363
|
+
case 0:
|
|
364
|
+
this.handleClick('Close');
|
|
365
|
+
return;
|
|
366
|
+
case 1:
|
|
367
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('kycSure', this.lang, { values: { currency: this.currency } })), h("p", null, translate('kyc1', this.lang, { values: { currency: this.currency } })), h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.postPlayerSituation(this.newAmount, false) }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.postPlayerSituation(this.amount, true) }, translate('keepExistingLimit', this.lang, { values: { currency: this.currency } }))))));
|
|
368
|
+
case 2:
|
|
369
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('kycThanks', this.lang, { values: { currency: this.currency } })), h("p", { innerHTML: translate('kyc2', this.lang, { values: { currency: this.currency, amount: this.regularDepositLimitAmount } }) }), h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.handleClick('Close') }, translate('Close', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('UploadDocuments') }, translate('UploadDocuments', this.lang, { values: { currency: this.currency } }))))));
|
|
359
370
|
default:
|
|
360
|
-
this.
|
|
361
|
-
this.submitMonthlyDepositLimit(this.newAmount, false, true);
|
|
362
|
-
break;
|
|
371
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('kycThanks', this.lang, { values: { currency: this.currency } })), h("p", null, translate('kyc3', this.lang, { values: { currency: this.currency } })), h("div", { class: "ContainerButtons" }, h("button", { class: "SecondButton", onClick: () => this.handleClick('Close') }, translate('Close', this.lang, { values: { currency: this.currency } }))))));
|
|
363
372
|
}
|
|
364
373
|
}
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
374
|
+
renderPredefinedButtons() {
|
|
375
|
+
return this.predefinedAmounts.map((currentAmount) => (h("button", { class: this.selectedPredefinedAmount === currentAmount ? 'Active' : '', onClick: () => this.handleAmountClick(currentAmount), disabled: this.hasLugasError }, currentAmount)));
|
|
376
|
+
}
|
|
377
|
+
;
|
|
368
378
|
goToPrivacyPolicy() {
|
|
369
379
|
window.postMessage({ type: 'GoToPrivacyPolicy' });
|
|
370
380
|
}
|
|
371
381
|
;
|
|
372
|
-
/**
|
|
373
|
-
* Renders the validator.
|
|
374
|
-
*/
|
|
375
382
|
renderValidator() {
|
|
376
|
-
const renderPredefinedButtons = () => {
|
|
377
|
-
return this.predefinedAmounts.map((currentAmount) => (h("button", { class: this.selectedPredefinedAmount === currentAmount ? 'Active' : '', onClick: () => this.handleAmountClick(currentAmount), disabled: this.hasLugasError }, currentAmount)));
|
|
378
|
-
};
|
|
379
383
|
return (h("div", { class: "ValidatorContainer" }, this.errorMessageOnSubmit && (h("div", { class: "ErrorContainer" }, !this.hasLugasError && (h("span", { class: "DismissError", onClick: () => this.errorMessageOnSubmit = '' }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "9", height: "9", viewBox: "0 0 9 9", fill: "none" }, h("path", { d: "M8.18659 0.14708C8.37063 0.33182 8.38174 0.62421 8.21888 0.821452L8.18659 0.857219L4.87619 4.16727L8.18659 7.47732C8.27743 7.56861 8.32973 7.69132 8.33266 7.82007C8.3356 7.94883 8.28895 8.0738 8.20235 8.16913C8.11576 8.26446 7.99584 8.32288 7.86739 8.3323C7.73895 8.34172 7.61179 8.30143 7.51221 8.21975L7.47645 8.18746L4.1664 4.87706L0.856348 8.18746C0.765058 8.27831 0.64235 8.3306 0.513592 8.33354C0.384834 8.33647 0.25987 8.28982 0.164536 8.20322C0.0692018 8.11663 0.0107856 7.99671 0.00136402 7.86827C-0.00805761 7.73982 0.0322357 7.61266 0.113914 7.51308L0.146209 7.47732L3.4566 4.16727L0.146209 0.857219C0.0553613 0.765928 0.00306475 0.64322 0.000130477 0.514462C-0.0028038 0.385704 0.0438486 0.260741 0.130443 0.165407C0.217038 0.0700723 0.336953 0.0116562 0.4654 0.00223455C0.593846 -0.00718708 0.721002 0.0331062 0.820581 0.114785L0.856348 0.14708L4.1664 3.45748L7.47645 0.14708C7.52307 0.10045 7.57843 0.0634608 7.63935 0.0382248C7.70027 0.0129888 7.76557 0 7.83152 0C7.89746 0 7.96276 0.0129888 8.02368 0.0382248C8.0846 0.0634608 8.13996 0.10045 8.18659 0.14708Z", fill: "#111111" })))), h("p", { class: "ErrorParagraph" }, h("span", { class: "ErrorIcon" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "9", height: "9", viewBox: "0 0 9 9" }, h("path", { d: "M8.18659 0.14708C8.37063 0.33182 8.38174 0.62421 8.21888 0.821452L8.18659 0.857219L4.87619 4.16727L8.18659 7.47732C8.27743 7.56861 8.32973 7.69132 8.33266 7.82007C8.3356 7.94883 8.28895 8.0738 8.20235 8.16913C8.11576 8.26446 7.99584 8.32288 7.86739 8.3323C7.73895 8.34172 7.61179 8.30143 7.51221 8.21975L7.47645 8.18746L4.1664 4.87706L0.856348 8.18746C0.765058 8.27831 0.64235 8.3306 0.513592 8.33354C0.384834 8.33647 0.25987 8.28982 0.164536 8.20322C0.0692018 8.11663 0.0107856 7.99671 0.00136402 7.86827C-0.00805761 7.73982 0.0322357 7.61266 0.113914 7.51308L0.146209 7.47732L3.4566 4.16727L0.146209 0.857219C0.0553613 0.765928 0.00306475 0.64322 0.000130477 0.514462C-0.0028038 0.385704 0.0438486 0.260741 0.130443 0.165407C0.217038 0.0700723 0.336953 0.0116562 0.4654 0.00223455C0.593846 -0.00718708 0.721002 0.0331062 0.820581 0.114785L0.856348 0.14708L4.1664 3.45748L7.47645 0.14708C7.52307 0.10045 7.57843 0.0634608 7.63935 0.0382248C7.70027 0.0129888 7.76557 0 7.83152 0C7.89746 0 7.96276 0.0129888 8.02368 0.0382248C8.0846 0.0634608 8.13996 0.10045 8.18659 0.14708Z" }))), h("div", { innerHTML: this.errorMessageOnSubmit })))), h("div", { class: "Paragraphs" }, h("p", null, translate('LugasInfoBox', this.lang))), h("div", { class: "LimitAmountWrapper" }, this.isSubmitted
|
|
380
384
|
&& h("slot", { name: 'spinner' })
|
|
381
|
-
&& h("div", { class: "LoadingWrapper" }, h("svg", { class: "spinner", viewBox: "0 0 50 50" }, h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))), h("p", { class: "ChooseLimitLabel" }, translate('ChooseLimit', this.lang)), h("div", { class: "PredefinedAmounts" }, h("button", { class: this.selectedPredefinedAmount === 'Other' ? 'Active' : '', onClick: () => this.handleAmountClick('Other') }, translate('ButtonCustomValue', this.lang)), renderPredefinedButtons(), h("button", { class: this.selectedPredefinedAmount === 'Max' ? 'Active' : '', onClick: () => this.handleAmountClick('Max') }, translate('ButtonMax', this.lang))), this.showCustomAmount && (h("form", { onSubmit: (event) => this.handleSubmit(event) }, this.showCustomAmount &&
|
|
382
|
-
h("div", null, h("input", { class: `CustomAmountInput ${this.errorMessageOnInput ? 'InvalidInput' : ''}`, type: "number", value: this.selectedPredefinedAmount === 'Max' ? this.maxAmount : null, step: 0.01, placeholder: "0.00", disabled: this.hasLugasError || this.selectedPredefinedAmount === 'Max', onInput: (event) => this.
|
|
385
|
+
&& h("div", { class: "LoadingWrapper" }, h("svg", { class: "spinner", viewBox: "0 0 50 50" }, h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))), h("p", { class: "ChooseLimitLabel" }, translate('ChooseLimit', this.lang)), h("div", { class: "PredefinedAmounts" }, h("button", { class: this.selectedPredefinedAmount === 'Other' ? 'Active' : '', onClick: () => this.handleAmountClick('Other') }, translate('ButtonCustomValue', this.lang)), this.renderPredefinedButtons(), h("button", { class: this.selectedPredefinedAmount === 'Max' ? 'Active' : '', onClick: () => this.handleAmountClick('Max') }, translate('ButtonMax', this.lang))), this.showCustomAmount && (h("form", { onSubmit: (event) => this.handleSubmit(event) }, this.showCustomAmount &&
|
|
386
|
+
h("div", null, h("input", { class: `CustomAmountInput ${this.errorMessageOnInput ? 'InvalidInput' : ''}`, type: "number", value: this.selectedPredefinedAmount === 'Max' ? this.maxAmount : null, step: 0.01, placeholder: "0.00", disabled: this.hasLugasError || this.selectedPredefinedAmount === 'Max', onInput: (event) => this.handleValidatorInputChange(event) }), this.errorMessageOnInput && h("p", { class: "InvalidParagraph" }, this.errorMessageOnInput)), this.selectedPredefinedAmount &&
|
|
383
387
|
h("button", { class: "PrimaryButton SetLimitBtn", type: "submit", disabled: this.hasLugasError || this.isSubmitted || !Boolean(this.newAmount) || Boolean(this.errorMessageOnInput) }, translate('LugasSetLimitDialogButtonSetLimit', this.lang, {
|
|
384
388
|
values: {
|
|
385
389
|
currency: this.displayedCurrency,
|
|
386
390
|
amount: Number.parseFloat(this.newAmount || '0').toFixed(2)
|
|
387
391
|
}
|
|
388
|
-
})))))
|
|
392
|
+
})))))));
|
|
389
393
|
}
|
|
390
|
-
/**
|
|
391
|
-
* Renders the component.
|
|
392
|
-
*/
|
|
393
394
|
render() {
|
|
395
|
+
const kycConfirmation = this.renderKYC(this.kycStep);
|
|
396
|
+
const validationContainer = this.renderValidator();
|
|
394
397
|
if (this.isLoading) {
|
|
395
398
|
return (h("div", null, h("p", null, translate('loading', this.lang, { values: { currency: this.currency } }))));
|
|
396
399
|
}
|
|
397
|
-
|
|
400
|
+
if (this.errorMessageOnInitialization) {
|
|
398
401
|
return (h("div", null, h("p", null, this.errorMessageOnInitialization)));
|
|
399
402
|
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
return (h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el }, h("div", { class: "Container" }, h("div", { class: "ModalHeader" }, h("h2", null, translate('LugasSetLimitDialogTitle', this.lang))), h("div", { class: "ModalBody" }, validationContainer))));
|
|
403
|
-
}
|
|
403
|
+
return (h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el }, h("div", { class: "Container" }, h("div", { class: "ModalHeader" }, h("h2", null, translate('LugasSetLimitDialogTitle', this.lang))), h("div", { class: "ModalBody" }, this.hasValidation ? validationContainer : kycConfirmation, this.hasValidation &&
|
|
404
|
+
h("div", { class: "ModalFooter" }, h("hr", null), h("div", { class: "Paragraphs" }, h("p", { class: "ExistingLimit" }, translate('LugasSetLimitDialogExistingLimit.text', this.lang), h("span", { class: this.isUseExistingLimitOptionActive ? 'Link' : 'Link Inactive', onClick: () => this.postPlayerSituation(this.amount, true) }, translate('LugasSetLimitDialogExistingLimit.link', this.lang))), h("p", { class: "PrivacyNote" }, translate('LugasSetLimitDialogPrivacyNote.text', this.lang), h("span", { class: "Link", onClick: this.goToPrivacyPolicy }, translate('LugasSetLimitDialogPrivacyNote.link', this.lang)))))))));
|
|
404
405
|
}
|
|
405
406
|
static get watchers() { return {
|
|
406
407
|
"translationUrl": ["handleNewTranslations"],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-c89cfec9.js';
|
|
2
|
+
export { s as setNonce } from './index-c89cfec9.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["player-lugas-limit",[[1,"player-lugas-limit",{"userId":[
|
|
19
|
+
return bootstrapLazy([["player-lugas-limit",[[1,"player-lugas-limit",{"userId":[513,"user-id"],"session":[513],"endpoint":[513],"currency":[513],"flow":[513],"amount":[513],"lang":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"translationUrl":[513,"translation-url"],"hasValidation":[32],"kycStep":[32],"isLoading":[32],"regularDepositLimitAmount":[32],"isSubmitted":[32],"isUseExistingLimitOptionActive":[32],"selectedPredefinedAmount":[32],"errorMessageOnInitialization":[32],"errorMessageOnSubmit":[32],"errorMessageOnInput":[32],"hasLugasError":[32],"showCustomAmount":[32],"newAmount":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
|
|
20
20
|
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),l=(t,n)=>e.set(n.t=t,n),o=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),m=!1,d=[],w=[],y=(t,e)=>n=>{t.push(n),m||(m=!0,e&&4&f.l?$(v):f.raf(v))},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},v=()=>{b(d),b(w),(m=d.length>0)&&f.raf(v)},$=t=>h().then(t),g=y(w,!0),S={},j=t=>"object"==(t=typeof t)||"function"===t;function O(t){var e,n,l;return null!=(l=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((e,n)=>{for(var l in n)t(e,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>k,unwrap:()=>P,unwrapErr:()=>L});var k=t=>({isOk:!0,isErr:!1,value:t}),E=t=>({isOk:!1,isErr:!0,value:t});function C(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>k(t))):k(n)}if(t.isErr)return E(t.value);throw"should never get here"}var M,x,P=t=>{if(t.isOk)return t.value;throw t.value},L=t=>{if(t.isErr)return t.value;throw t.value},R=(t,e,...n)=>{let l=null,o=!1,s=!1;const r=[],i=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof t&&!j(l))&&(l+=""),o&&s?r[r.length-1].i+=l:r.push(o?T(null,l):l),s=o)};if(i(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const c=T(t,null);return c.u=e,r.length>0&&(c.h=r),c},T=(t,e)=>({l:0,p:t,i:e,m:null,h:null,u:null}),A={},N=(t,e,l)=>{const o=(t=>n(t).$hostElement$)(t);return{emit:t=>U(o,e,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:t})}},U=(t,e,n)=>{const l=f.ce(e,n);return t.dispatchEvent(l),l},W=new WeakMap,D=t=>"sc-"+t.v,F=(t,e,n,l,s,r)=>{if(n!==l){let i=o(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,o=q(n),s=q(l);e.remove(...o.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!o.includes(t))))}else if("ref"===e)l&&l(t);else if(i||"o"!==e[0]||"n"!==e[1]){const o=j(l);if((i||o&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]=l;else{const o=null==l?"":l;"list"===e?i=!1:null!=n&&t[e]==o||(t[e]=o)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!i||4&r||s)&&!o&&t.setAttribute(e,l=!0===l?"":l)}else if(e="-"===e[2]?e.slice(3):o(u,c)?c.slice(2):c[2]+e.slice(3),n||l){const o=e.endsWith(G);e=e.replace(V,""),n&&f.rel(t,e,n,o),l&&f.ael(t,e,l,o)}}},H=/\s/,q=t=>t?t.split(H):[],G="Capture",V=RegExp(G+"$"),_=(t,e,n)=>{const l=11===e.m.nodeType&&e.m.host?e.m.host:e.m,o=t&&t.u||S,s=e.u||S;for(const t of z(Object.keys(o)))t in s||F(l,t,o[t],void 0,n,e.l);for(const t of z(Object.keys(s)))F(l,t,o[t],s[t],n,e.l)};function z(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var B=!1,I=!1,J=(t,e,n)=>{const l=e.h[n];let o,s,r=0;if(null!==l.i)o=l.m=a.createTextNode(l.i);else{if(I||(I="svg"===l.p),o=l.m=a.createElementNS(I?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",l.p),I&&"foreignObject"===l.p&&(I=!1),_(null,l,I),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=J(t,l,r),s&&o.appendChild(s);"svg"===l.p?I=!1:"foreignObject"===o.tagName&&(I=!0)}return o["s-hn"]=x,o},K=(t,e,n,l,o,s)=>{let r,i=t;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=J(null,n,o),r&&(l[o].m=r,tt(i,r,e)))},Q=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.m;Z(e),t&&t.remove()}}},X=(t,e)=>t.p===e.p,Y=(t,e,n=!1)=>{const l=e.m=t.m,o=t.h,s=e.h,r=e.p,i=e.i;null===i?(I="svg"===r||"foreignObject"!==r&&I,("slot"!==r||B)&&_(t,e,I),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,r=0,i=0,c=e.length-1,u=e[0],a=e[c],f=l.length-1,h=l[0],p=l[f];for(;r<=c&&i<=f;)null==u?u=e[++r]:null==a?a=e[--c]:null==h?h=l[++i]:null==p?p=l[--f]:X(u,h)?(Y(u,h,o),u=e[++r],h=l[++i]):X(a,p)?(Y(a,p,o),a=e[--c],p=l[--f]):X(u,p)?(Y(u,p,o),tt(t,u.m,a.m.nextSibling),u=e[++r],p=l[--f]):X(a,h)?(Y(a,h,o),tt(t,a.m,u.m),a=e[--c],h=l[++i]):(s=J(e&&e[i],n,i),h=l[++i],s&&tt(u.m.parentNode,s,u.m));r>c?K(t,null==l[f+1]?null:l[f+1].m,n,l,i,f):i>f&&Q(e,r,c)})(l,o,e,s,n):null!==s?(null!==t.i&&(l.textContent=""),K(l,null,e,s,0,s.length-1)):null!==o&&Q(o,0,o.length-1),I&&"svg"===r&&(I=!1)):t.i!==i&&(l.data=i)},Z=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(Z)},tt=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),et=(t,e)=>{e&&!t.$&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.$=e)))},nt=(t,e)=>{if(t.l|=16,!(4&t.l))return et(t,t.S),g((()=>lt(t,e)));t.l|=512},lt=(t,e)=>{const n=t.t;if(!n)throw Error(`Can't render component <${t.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e&&(l=at(n,"componentWillLoad")),ot(l,(()=>rt(t,n,e)))},ot=(t,e)=>st(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),st=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,rt=async(t,e,n)=>{var l;const o=t.$hostElement$,s=o["s-rc"];n&&(t=>{const e=t.j,n=t.$hostElement$,l=e.l,o=((t,e)=>{var n;const l=D(e),o=i.get(l);if(t=11===t.nodeType?t:a,o)if("string"==typeof o){let s,r=W.get(t=t.head||t);if(r||W.set(t,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const e=null!=(n=f.O)?n:O(a);null!=e&&s.setAttribute("nonce",e),t.insertBefore(s,t.querySelector("link"))}4&e.l&&(s.innerHTML+=c),r&&r.add(l)}}else t.adoptedStyleSheets.includes(o)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);it(t,e,o,n),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>ct(t);0===e.length?n():(Promise.all(e).then(n),t.l|=4,e.length=0)}},it=(t,e,n,l)=>{try{e=e.render(),t.l&=-17,t.l|=2,((t,e,n=!1)=>{const l=t.$hostElement$,o=t.j,s=t.k||T(null,null),r=(t=>t&&t.p===A)(e)?e:R(null,null,e);if(x=l.tagName,o.C&&(r.u=r.u||{},o.C.map((([t,e])=>r.u[e]=l[t]))),n&&r.u)for(const t of Object.keys(r.u))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(r.u[t]=l[t]);r.p=null,r.l|=4,t.k=r,r.m=s.m=l.shadowRoot||l,M=l["s-sc"],B=!!(1&o.l),Y(s,r,n)})(t,e,l)}catch(e){s(e,t.$hostElement$)}return null},ct=t=>{const e=t.$hostElement$,n=t.t,l=t.S;64&t.l||(t.l|=64,ft(e),at(n,"componentDidLoad"),t.M(e),l||ut()),t.$&&(t.$(),t.$=void 0),512&t.l&&$((()=>nt(t,!1))),t.l&=-517},ut=()=>{ft(a.documentElement),$((()=>U(u,"appload",{detail:{namespace:"player-lugas-limit"}})))},at=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t)}},ft=t=>t.classList.add("hydrated"),ht=(t,e,l)=>{var o,r;const i=t.prototype;if(e.P||e.L||t.watchers){t.watchers&&!e.L&&(e.L=t.watchers);const c=Object.entries(null!=(o=e.P)?o:{});if(c.map((([t,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,t,{get(){return((t,e)=>n(this).R.get(e))(0,t)},set(l){((t,e,l,o)=>{const r=n(t);if(!r)throw Error(`Couldn't find host element for "${o.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.R.get(e),u=r.l,a=r.t;if(l=((t,e)=>null==t||j(t)?t:1&e?t+"":t)(l,o.P[e][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.R.set(e,l),a)){if(o.L&&128&u){const t=o.L[e];t&&t.map((t=>{try{a[t](l,c,e)}catch(t){s(t,i)}}))}2==(18&u)&&nt(r,!1)}})(this,t,l,e)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(t,o,s){f.jmp((()=>{var r;const c=l.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=e.L)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,o,t)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=e.L)?r:{}),...c.filter((([t,e])=>15&e[0])).map((([t,n])=>{var o;const s=n[1]||t;return l.set(s,t),512&n[0]&&(null==(o=e.C)||o.push([t,s])),s}))]))}}return t},pt=t=>{at(t,"disconnectedCallback")},mt=(t,l={})=>{var o;const h=[],m=l.exclude||[],d=u.customElements,w=a.head,y=w.querySelector("meta[charset]"),b=a.createElement("style"),v=[];let $,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((l=>{var o;const c={l:l[0],v:l[1],P:l[2],T:l[3]};4&c.l&&(S=!0),c.P=l[2],c.C=[],c.L=null!=(o=l[4])?o:{};const u=c.v,a=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const l={l:0,$hostElement$:t,j:n,R:new Map};l.A=new Promise((t=>l.M=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,l)})(t=this,c),1&c.l)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),$&&(clearTimeout($),$=null),g?v.push(this):f.jmp((()=>(t=>{if(!(1&f.l)){const e=n(t),l=e.j,o=()=>{};if(1&e.l)(null==e?void 0:e.t)||(null==e?void 0:e.A)&&e.A.then((()=>{}));else{e.l|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){et(e,e.S=n);break}}l.P&&Object.entries(l.P).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let l;if(!(32&e.l)){if(e.l|=32,n.N){const t=(t=>{const e=t.v.replace(/-/g,"_"),n=t.N;if(!n)return;const l=r.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(r.set(n,t),t[e])),s)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(t&&"then"in t){const e=()=>{};l=await t,e()}else l=t;if(!l)throw Error(`Constructor for "${n.v}#${e.U}" was not found`);l.isProxied||(n.L=l.watchers,ht(l,n,2),l.isProxied=!0);const o=()=>{};e.l|=8;try{new l(e)}catch(t){s(t)}e.l&=-9,e.l|=128,o()}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.l|=128));if(l&&l.style){let t;"string"==typeof l.style&&(t=l.style);const e=D(n);if(!i.has(e)){const l=()=>{};((t,e,n)=>{let l=i.get(t);p&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,i.set(t,l)})(e,t,!!(1&n.l)),l()}}}const o=e.S,c=()=>nt(e,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(t,e,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const t=n(this);(null==t?void 0:t.t)?pt(t.t):(null==t?void 0:t.A)&&t.A.then((()=>pt(t.t)))}})()))}componentOnReady(){return n(this).A}};c.N=t[0],m.includes(u)||d.get(u)||(h.push(u),d.define(u,ht(a,c,1)))}))})),h.length>0&&(S&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const t=null!=(o=f.O)?o:O(a);null!=t&&b.setAttribute("nonce",t),w.insertBefore(b,y?y.nextSibling:w.firstChild)}g=!1,v.length?v.map((t=>t.connectedCallback())):f.jmp((()=>$=setTimeout(ut,30)))},dt=t=>f.O=t;export{mt as b,N as c,R as h,h as p,l as r,dt as s}
|