@everymatrix/user-funds-acknowledgment 0.2.3 → 0.2.4

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const userFundsAcknowledgment = require('./user-funds-acknowledgment-45da5541.js');
5
+ const userFundsAcknowledgment = require('./user-funds-acknowledgment-f6bff2d2.js');
6
6
  require('./index-e7d6647a.js');
7
7
 
8
8
 
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["user-funds-acknowledgment.cjs",[[1,"user-funds-acknowledgment",{"session":[513],"operatorid":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"language":[1537],"translationUrl":[513,"translation-url"],"currencylocale":[513],"currencydisplay":[513],"maximumfractiondigits":[513],"minimumfractiondigits":[513],"customdisplayformat":[513],"alwaysshowdecimals":[513],"playercurrency":[513],"userid":[1],"gmversion":[513],"totalcalculationmode":[513],"isLoading":[32],"isConsentChecked":[32],"totalCashAmount":[32],"errorMessage":[32],"errorAmountMessage":[32],"consentsSubmitted":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
11
+ return index.bootstrapLazy([["user-funds-acknowledgment.cjs",[[1,"user-funds-acknowledgment",{"session":[513],"operatorid":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"language":[1537],"translationUrl":[513,"translation-url"],"operator":[1],"currencylocale":[513],"currencydisplay":[513],"maximumfractiondigits":[513],"minimumfractiondigits":[513],"customdisplayformat":[513],"alwaysshowdecimals":[513],"playercurrency":[513],"userid":[1],"gmversion":[513],"totalcalculationmode":[513],"isLoading":[32],"isConsentChecked":[32],"totalCashAmount":[32],"errorMessage":[32],"errorAmountMessage":[32],"consentsSubmitted":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -124,9 +124,9 @@ const DEFAULT_LANGUAGE = 'en';
124
124
  const TRANSLATIONS = {
125
125
  en: {
126
126
  protectionTitle: 'Protection of Customer Funds',
127
- protectionContent: '<p>We hold customer funds separate from company funds.<sup class="note"><a href="https://www.gamblingcommission.gov.uk/guidance/customer-funds-segregation-disclosure-to-customers-and-reporting/example-statements-that-might-be-used-in-terms-and-conditions-for-each-of#ref-2" target="_blank">12</a></sup> These funds ar <b>not protected</b> in the event of insolvency: <b>not protected segregation.</b></p><p>For more information, please see the <a href="https://www.gamblingcommission.gov.uk/guidance/customer-funds-segregation-disclosure-to-customers-and-reporting/the-customer-funds-insolvency-ratings-system" target="_blank">customer funds insolvency ratings system</a>.</p>',
127
+ protectionContent: '<p>We hold customer funds separate from <a href="https://www.gamblingcommission.gov.uk/guidance/customer-funds-segregation-disclosure-to-customers-and-reporting/example-statements-that-might-be-used-in-terms-and-conditions-for-each-of#ref-2" target="_blank">company funds</a>. These funds are <b>not protected</b> in the event of insolvency: <b>not protected segregation.</b></p><p>For more information, please see the <a href="https://www.gamblingcommission.gov.uk/guidance/customer-funds-segregation-disclosure-to-customers-and-reporting/the-customer-funds-insolvency-ratings-system" target="_blank">customer funds insolvency ratings system</a>.</p>',
128
128
  balanceArea: 'Your current balance:',
129
- protectionCheckboxLabel: 'I understand that my funds are <b>not protected</b> if the operator becomes insolvent.',
129
+ protectionCheckboxLabel: 'I understand that my funds are <b>not protected</b> if ${operatorName} becomes insolvent.',
130
130
  userNoticeText: 'Before you can proceed you must consent to the following',
131
131
  submitButtonText: 'Confirm',
132
132
  serverNotResponding: 'Server might not be responding',
@@ -524,6 +524,7 @@ const UserFundsAcknowledgment = class {
524
524
  this.endpoint = undefined;
525
525
  this.language = 'en';
526
526
  this.translationUrl = '';
527
+ this.operator = '';
527
528
  this.currencylocale = 'en';
528
529
  this.currencydisplay = 'symbol';
529
530
  this.maximumfractiondigits = '2';
@@ -590,10 +591,11 @@ const UserFundsAcknowledgment = class {
590
591
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
591
592
  }
592
593
  consentsArea() {
593
- return (index.h("div", { class: "UserProtectionFundsCheckboxArea" }, index.h("label", { class: "UserProtectionFundsCheckboxContent", htmlFor: "userProtectionFunds" }, index.h("input", { ref: el => this.checkboxInput = el, id: "userProtectionFunds", type: "checkbox", onInput: this.userLegislationConsentHandler }), index.h("span", { innerHTML: `${translate('protectionCheckboxLabel', this.language)}` }))));
594
+ const protectionCheckboxLabel = translate('protectionCheckboxLabel', this.language).replace('${operatorName}', this.operator);
595
+ return (index.h("div", { class: "UserProtectionFundsCheckboxArea" }, index.h("label", { class: "UserProtectionFundsCheckboxContent", htmlFor: "userProtectionFunds" }, index.h("input", { ref: el => this.checkboxInput = el, id: "userProtectionFunds", type: "checkbox", onInput: this.userLegislationConsentHandler }), index.h("span", { innerHTML: protectionCheckboxLabel }))));
594
596
  }
595
597
  render() {
596
- return (index.h("div", { key: '4b83615d1b42c72de845e1ca293a162bd9e958ce', class: "QueryReferenceContainer", ref: el => this.stylingContainer = el }, this.isLoading ? (index.h("div", null, index.h("slot", { name: 'spinner' }), index.h("svg", { class: "spinner", viewBox: "0 0 50 50" }, index.h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" })))) : (index.h("div", { class: "UserProtectionFundsContainer" }, index.h("div", { class: "UserProtectionFundsTitle" }, index.h("h2", null, translate('protectionTitle', this.language))), index.h("div", { class: "UserProtectionFundsWrapper" }, index.h("p", { innerHTML: `${translate('protectionContent', this.language)}` })), index.h("div", { class: "UserProtectionFundsBalance" }, index.h("p", null, translate('balanceArea', this.language), " ", index.h("span", null, this.formatBalance(this.totalCashAmount)))), index.h("div", { class: "UserProtectionFundsButtonsWrapper" }, index.h("div", null, this.consentsArea()), index.h("div", null, index.h("button", { class: "UserProtectionFundsSubmitButton", disabled: !this.isConsentChecked || this.errorMessage != '' || this.consentsSubmitted, onClick: this.handleSubmit }, translate('submitButtonText', this.language))), index.h("div", { class: "UserProtectionError" }, index.h("p", null, this.errorMessage != '' && this.errorMessage), index.h("p", null, this.errorAmountMessage != '' && this.errorAmountMessage)))))));
598
+ return (index.h("div", { key: 'cc73425a68ccc58ea4c19f7cd057e27ecaca7b7b', class: "QueryReferenceContainer", ref: el => this.stylingContainer = el }, this.isLoading ? (index.h("div", null, index.h("slot", { name: 'spinner' }), index.h("svg", { class: "spinner", viewBox: "0 0 50 50" }, index.h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" })))) : (index.h("div", { class: "UserProtectionFundsContainer" }, index.h("div", { class: "UserProtectionFundsTitle" }, index.h("h2", null, translate('protectionTitle', this.language))), index.h("div", { class: "UserProtectionFundsWrapper" }, index.h("p", { innerHTML: `${translate('protectionContent', this.language)}` })), index.h("div", { class: "UserProtectionFundsBalance" }, index.h("p", null, translate('balanceArea', this.language), " ", index.h("span", null, this.formatBalance(this.totalCashAmount)))), index.h("div", { class: "UserProtectionFundsButtonsWrapper" }, index.h("div", null, this.consentsArea()), index.h("div", null, index.h("button", { class: "UserProtectionFundsSubmitButton", disabled: !this.isConsentChecked || this.errorMessage != '' || this.consentsSubmitted, onClick: this.handleSubmit }, translate('submitButtonText', this.language))), (this.errorMessage || this.errorAmountMessage) && (index.h("div", { class: "UserProtectionError" }, index.h("p", null, this.errorMessage != '' && this.errorMessage), index.h("p", null, this.errorAmountMessage != '' && this.errorAmountMessage))))))));
597
599
  }
598
600
  static get watchers() { return {
599
601
  "translationUrl": ["handleNewTranslations"],
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const userFundsAcknowledgment = require('./user-funds-acknowledgment-45da5541.js');
5
+ const userFundsAcknowledgment = require('./user-funds-acknowledgment-f6bff2d2.js');
6
6
  require('./index-e7d6647a.js');
7
7
 
8
8
 
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["user-funds-acknowledgment.cjs",[[1,"user-funds-acknowledgment",{"session":[513],"operatorid":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"language":[1537],"translationUrl":[513,"translation-url"],"currencylocale":[513],"currencydisplay":[513],"maximumfractiondigits":[513],"minimumfractiondigits":[513],"customdisplayformat":[513],"alwaysshowdecimals":[513],"playercurrency":[513],"userid":[1],"gmversion":[513],"totalcalculationmode":[513],"isLoading":[32],"isConsentChecked":[32],"totalCashAmount":[32],"errorMessage":[32],"errorAmountMessage":[32],"consentsSubmitted":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
22
+ return index.bootstrapLazy([["user-funds-acknowledgment.cjs",[[1,"user-funds-acknowledgment",{"session":[513],"operatorid":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"language":[1537],"translationUrl":[513,"translation-url"],"operator":[1],"currencylocale":[513],"currencydisplay":[513],"maximumfractiondigits":[513],"minimumfractiondigits":[513],"customdisplayformat":[513],"alwaysshowdecimals":[513],"playercurrency":[513],"userid":[1],"gmversion":[513],"totalcalculationmode":[513],"isLoading":[32],"isConsentChecked":[32],"totalCashAmount":[32],"errorMessage":[32],"errorAmountMessage":[32],"consentsSubmitted":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -239,6 +239,7 @@ export class UserFundsAcknowledgment {
239
239
  this.endpoint = undefined;
240
240
  this.language = 'en';
241
241
  this.translationUrl = '';
242
+ this.operator = '';
242
243
  this.currencylocale = 'en';
243
244
  this.currencydisplay = 'symbol';
244
245
  this.maximumfractiondigits = '2';
@@ -305,10 +306,11 @@ export class UserFundsAcknowledgment {
305
306
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
306
307
  }
307
308
  consentsArea() {
308
- return (h("div", { class: "UserProtectionFundsCheckboxArea" }, h("label", { class: "UserProtectionFundsCheckboxContent", htmlFor: "userProtectionFunds" }, h("input", { ref: el => this.checkboxInput = el, id: "userProtectionFunds", type: "checkbox", onInput: this.userLegislationConsentHandler }), h("span", { innerHTML: `${translate('protectionCheckboxLabel', this.language)}` }))));
309
+ const protectionCheckboxLabel = translate('protectionCheckboxLabel', this.language).replace('${operatorName}', this.operator);
310
+ return (h("div", { class: "UserProtectionFundsCheckboxArea" }, h("label", { class: "UserProtectionFundsCheckboxContent", htmlFor: "userProtectionFunds" }, h("input", { ref: el => this.checkboxInput = el, id: "userProtectionFunds", type: "checkbox", onInput: this.userLegislationConsentHandler }), h("span", { innerHTML: protectionCheckboxLabel }))));
309
311
  }
310
312
  render() {
311
- return (h("div", { key: '4b83615d1b42c72de845e1ca293a162bd9e958ce', class: "QueryReferenceContainer", ref: el => this.stylingContainer = el }, this.isLoading ? (h("div", null, h("slot", { name: 'spinner' }), 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("div", { class: "UserProtectionFundsContainer" }, h("div", { class: "UserProtectionFundsTitle" }, h("h2", null, translate('protectionTitle', this.language))), h("div", { class: "UserProtectionFundsWrapper" }, h("p", { innerHTML: `${translate('protectionContent', this.language)}` })), h("div", { class: "UserProtectionFundsBalance" }, h("p", null, translate('balanceArea', this.language), " ", h("span", null, this.formatBalance(this.totalCashAmount)))), h("div", { class: "UserProtectionFundsButtonsWrapper" }, h("div", null, this.consentsArea()), h("div", null, h("button", { class: "UserProtectionFundsSubmitButton", disabled: !this.isConsentChecked || this.errorMessage != '' || this.consentsSubmitted, onClick: this.handleSubmit }, translate('submitButtonText', this.language))), h("div", { class: "UserProtectionError" }, h("p", null, this.errorMessage != '' && this.errorMessage), h("p", null, this.errorAmountMessage != '' && this.errorAmountMessage)))))));
313
+ return (h("div", { key: 'cc73425a68ccc58ea4c19f7cd057e27ecaca7b7b', class: "QueryReferenceContainer", ref: el => this.stylingContainer = el }, this.isLoading ? (h("div", null, h("slot", { name: 'spinner' }), 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("div", { class: "UserProtectionFundsContainer" }, h("div", { class: "UserProtectionFundsTitle" }, h("h2", null, translate('protectionTitle', this.language))), h("div", { class: "UserProtectionFundsWrapper" }, h("p", { innerHTML: `${translate('protectionContent', this.language)}` })), h("div", { class: "UserProtectionFundsBalance" }, h("p", null, translate('balanceArea', this.language), " ", h("span", null, this.formatBalance(this.totalCashAmount)))), h("div", { class: "UserProtectionFundsButtonsWrapper" }, h("div", null, this.consentsArea()), h("div", null, h("button", { class: "UserProtectionFundsSubmitButton", disabled: !this.isConsentChecked || this.errorMessage != '' || this.consentsSubmitted, onClick: this.handleSubmit }, translate('submitButtonText', this.language))), (this.errorMessage || this.errorAmountMessage) && (h("div", { class: "UserProtectionError" }, h("p", null, this.errorMessage != '' && this.errorMessage), h("p", null, this.errorAmountMessage != '' && this.errorAmountMessage))))))));
312
314
  }
313
315
  static get is() { return "user-funds-acknowledgment"; }
314
316
  static get encapsulation() { return "shadow"; }
@@ -462,6 +464,24 @@ export class UserFundsAcknowledgment {
462
464
  "reflect": true,
463
465
  "defaultValue": "''"
464
466
  },
467
+ "operator": {
468
+ "type": "string",
469
+ "mutable": false,
470
+ "complexType": {
471
+ "original": "string",
472
+ "resolved": "string",
473
+ "references": {}
474
+ },
475
+ "required": false,
476
+ "optional": false,
477
+ "docs": {
478
+ "tags": [],
479
+ "text": "Operator name"
480
+ },
481
+ "attribute": "operator",
482
+ "reflect": false,
483
+ "defaultValue": "''"
484
+ },
465
485
  "currencylocale": {
466
486
  "type": "string",
467
487
  "mutable": false,
@@ -2,9 +2,9 @@ const DEFAULT_LANGUAGE = 'en';
2
2
  const TRANSLATIONS = {
3
3
  en: {
4
4
  protectionTitle: 'Protection of Customer Funds',
5
- protectionContent: '<p>We hold customer funds separate from company funds.<sup class="note"><a href="https://www.gamblingcommission.gov.uk/guidance/customer-funds-segregation-disclosure-to-customers-and-reporting/example-statements-that-might-be-used-in-terms-and-conditions-for-each-of#ref-2" target="_blank">12</a></sup> These funds ar <b>not protected</b> in the event of insolvency: <b>not protected segregation.</b></p><p>For more information, please see the <a href="https://www.gamblingcommission.gov.uk/guidance/customer-funds-segregation-disclosure-to-customers-and-reporting/the-customer-funds-insolvency-ratings-system" target="_blank">customer funds insolvency ratings system</a>.</p>',
5
+ protectionContent: '<p>We hold customer funds separate from <a href="https://www.gamblingcommission.gov.uk/guidance/customer-funds-segregation-disclosure-to-customers-and-reporting/example-statements-that-might-be-used-in-terms-and-conditions-for-each-of#ref-2" target="_blank">company funds</a>. These funds are <b>not protected</b> in the event of insolvency: <b>not protected segregation.</b></p><p>For more information, please see the <a href="https://www.gamblingcommission.gov.uk/guidance/customer-funds-segregation-disclosure-to-customers-and-reporting/the-customer-funds-insolvency-ratings-system" target="_blank">customer funds insolvency ratings system</a>.</p>',
6
6
  balanceArea: 'Your current balance:',
7
- protectionCheckboxLabel: 'I understand that my funds are <b>not protected</b> if the operator becomes insolvent.',
7
+ protectionCheckboxLabel: 'I understand that my funds are <b>not protected</b> if ${operatorName} becomes insolvent.',
8
8
  userNoticeText: 'Before you can proceed you must consent to the following',
9
9
  submitButtonText: 'Confirm',
10
10
  serverNotResponding: 'Server might not be responding',
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { U as UserFundsAcknowledgment } from './user-funds-acknowledgment-c9676919.js';
1
+ export { U as UserFundsAcknowledgment } from './user-funds-acknowledgment-3bf8deec.js';
2
2
  import './index-eb00caf2.js';
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["user-funds-acknowledgment",[[1,"user-funds-acknowledgment",{"session":[513],"operatorid":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"language":[1537],"translationUrl":[513,"translation-url"],"currencylocale":[513],"currencydisplay":[513],"maximumfractiondigits":[513],"minimumfractiondigits":[513],"customdisplayformat":[513],"alwaysshowdecimals":[513],"playercurrency":[513],"userid":[1],"gmversion":[513],"totalcalculationmode":[513],"isLoading":[32],"isConsentChecked":[32],"totalCashAmount":[32],"errorMessage":[32],"errorAmountMessage":[32],"consentsSubmitted":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
8
+ return bootstrapLazy([["user-funds-acknowledgment",[[1,"user-funds-acknowledgment",{"session":[513],"operatorid":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"language":[1537],"translationUrl":[513,"translation-url"],"operator":[1],"currencylocale":[513],"currencydisplay":[513],"maximumfractiondigits":[513],"minimumfractiondigits":[513],"customdisplayformat":[513],"alwaysshowdecimals":[513],"playercurrency":[513],"userid":[1],"gmversion":[513],"totalcalculationmode":[513],"isLoading":[32],"isConsentChecked":[32],"totalCashAmount":[32],"errorMessage":[32],"errorAmountMessage":[32],"consentsSubmitted":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -122,9 +122,9 @@ const DEFAULT_LANGUAGE = 'en';
122
122
  const TRANSLATIONS = {
123
123
  en: {
124
124
  protectionTitle: 'Protection of Customer Funds',
125
- protectionContent: '<p>We hold customer funds separate from company funds.<sup class="note"><a href="https://www.gamblingcommission.gov.uk/guidance/customer-funds-segregation-disclosure-to-customers-and-reporting/example-statements-that-might-be-used-in-terms-and-conditions-for-each-of#ref-2" target="_blank">12</a></sup> These funds ar <b>not protected</b> in the event of insolvency: <b>not protected segregation.</b></p><p>For more information, please see the <a href="https://www.gamblingcommission.gov.uk/guidance/customer-funds-segregation-disclosure-to-customers-and-reporting/the-customer-funds-insolvency-ratings-system" target="_blank">customer funds insolvency ratings system</a>.</p>',
125
+ protectionContent: '<p>We hold customer funds separate from <a href="https://www.gamblingcommission.gov.uk/guidance/customer-funds-segregation-disclosure-to-customers-and-reporting/example-statements-that-might-be-used-in-terms-and-conditions-for-each-of#ref-2" target="_blank">company funds</a>. These funds are <b>not protected</b> in the event of insolvency: <b>not protected segregation.</b></p><p>For more information, please see the <a href="https://www.gamblingcommission.gov.uk/guidance/customer-funds-segregation-disclosure-to-customers-and-reporting/the-customer-funds-insolvency-ratings-system" target="_blank">customer funds insolvency ratings system</a>.</p>',
126
126
  balanceArea: 'Your current balance:',
127
- protectionCheckboxLabel: 'I understand that my funds are <b>not protected</b> if the operator becomes insolvent.',
127
+ protectionCheckboxLabel: 'I understand that my funds are <b>not protected</b> if ${operatorName} becomes insolvent.',
128
128
  userNoticeText: 'Before you can proceed you must consent to the following',
129
129
  submitButtonText: 'Confirm',
130
130
  serverNotResponding: 'Server might not be responding',
@@ -522,6 +522,7 @@ const UserFundsAcknowledgment = class {
522
522
  this.endpoint = undefined;
523
523
  this.language = 'en';
524
524
  this.translationUrl = '';
525
+ this.operator = '';
525
526
  this.currencylocale = 'en';
526
527
  this.currencydisplay = 'symbol';
527
528
  this.maximumfractiondigits = '2';
@@ -588,10 +589,11 @@ const UserFundsAcknowledgment = class {
588
589
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
589
590
  }
590
591
  consentsArea() {
591
- return (h("div", { class: "UserProtectionFundsCheckboxArea" }, h("label", { class: "UserProtectionFundsCheckboxContent", htmlFor: "userProtectionFunds" }, h("input", { ref: el => this.checkboxInput = el, id: "userProtectionFunds", type: "checkbox", onInput: this.userLegislationConsentHandler }), h("span", { innerHTML: `${translate('protectionCheckboxLabel', this.language)}` }))));
592
+ const protectionCheckboxLabel = translate('protectionCheckboxLabel', this.language).replace('${operatorName}', this.operator);
593
+ return (h("div", { class: "UserProtectionFundsCheckboxArea" }, h("label", { class: "UserProtectionFundsCheckboxContent", htmlFor: "userProtectionFunds" }, h("input", { ref: el => this.checkboxInput = el, id: "userProtectionFunds", type: "checkbox", onInput: this.userLegislationConsentHandler }), h("span", { innerHTML: protectionCheckboxLabel }))));
592
594
  }
593
595
  render() {
594
- return (h("div", { key: '4b83615d1b42c72de845e1ca293a162bd9e958ce', class: "QueryReferenceContainer", ref: el => this.stylingContainer = el }, this.isLoading ? (h("div", null, h("slot", { name: 'spinner' }), 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("div", { class: "UserProtectionFundsContainer" }, h("div", { class: "UserProtectionFundsTitle" }, h("h2", null, translate('protectionTitle', this.language))), h("div", { class: "UserProtectionFundsWrapper" }, h("p", { innerHTML: `${translate('protectionContent', this.language)}` })), h("div", { class: "UserProtectionFundsBalance" }, h("p", null, translate('balanceArea', this.language), " ", h("span", null, this.formatBalance(this.totalCashAmount)))), h("div", { class: "UserProtectionFundsButtonsWrapper" }, h("div", null, this.consentsArea()), h("div", null, h("button", { class: "UserProtectionFundsSubmitButton", disabled: !this.isConsentChecked || this.errorMessage != '' || this.consentsSubmitted, onClick: this.handleSubmit }, translate('submitButtonText', this.language))), h("div", { class: "UserProtectionError" }, h("p", null, this.errorMessage != '' && this.errorMessage), h("p", null, this.errorAmountMessage != '' && this.errorAmountMessage)))))));
596
+ return (h("div", { key: 'cc73425a68ccc58ea4c19f7cd057e27ecaca7b7b', class: "QueryReferenceContainer", ref: el => this.stylingContainer = el }, this.isLoading ? (h("div", null, h("slot", { name: 'spinner' }), 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("div", { class: "UserProtectionFundsContainer" }, h("div", { class: "UserProtectionFundsTitle" }, h("h2", null, translate('protectionTitle', this.language))), h("div", { class: "UserProtectionFundsWrapper" }, h("p", { innerHTML: `${translate('protectionContent', this.language)}` })), h("div", { class: "UserProtectionFundsBalance" }, h("p", null, translate('balanceArea', this.language), " ", h("span", null, this.formatBalance(this.totalCashAmount)))), h("div", { class: "UserProtectionFundsButtonsWrapper" }, h("div", null, this.consentsArea()), h("div", null, h("button", { class: "UserProtectionFundsSubmitButton", disabled: !this.isConsentChecked || this.errorMessage != '' || this.consentsSubmitted, onClick: this.handleSubmit }, translate('submitButtonText', this.language))), (this.errorMessage || this.errorAmountMessage) && (h("div", { class: "UserProtectionError" }, h("p", null, this.errorMessage != '' && this.errorMessage), h("p", null, this.errorAmountMessage != '' && this.errorAmountMessage))))))));
595
597
  }
596
598
  static get watchers() { return {
597
599
  "translationUrl": ["handleNewTranslations"],
@@ -1,2 +1,2 @@
1
- export { U as user_funds_acknowledgment } from './user-funds-acknowledgment-c9676919.js';
1
+ export { U as user_funds_acknowledgment } from './user-funds-acknowledgment-3bf8deec.js';
2
2
  import './index-eb00caf2.js';
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["user-funds-acknowledgment",[[1,"user-funds-acknowledgment",{"session":[513],"operatorid":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"language":[1537],"translationUrl":[513,"translation-url"],"currencylocale":[513],"currencydisplay":[513],"maximumfractiondigits":[513],"minimumfractiondigits":[513],"customdisplayformat":[513],"alwaysshowdecimals":[513],"playercurrency":[513],"userid":[1],"gmversion":[513],"totalcalculationmode":[513],"isLoading":[32],"isConsentChecked":[32],"totalCashAmount":[32],"errorMessage":[32],"errorAmountMessage":[32],"consentsSubmitted":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
19
+ return bootstrapLazy([["user-funds-acknowledgment",[[1,"user-funds-acknowledgment",{"session":[513],"operatorid":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"language":[1537],"translationUrl":[513,"translation-url"],"operator":[1],"currencylocale":[513],"currencydisplay":[513],"maximumfractiondigits":[513],"minimumfractiondigits":[513],"customdisplayformat":[513],"alwaysshowdecimals":[513],"playercurrency":[513],"userid":[1],"gmversion":[513],"totalcalculationmode":[513],"isLoading":[32],"isConsentChecked":[32],"totalCashAmount":[32],"errorMessage":[32],"errorAmountMessage":[32],"consentsSubmitted":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
20
20
  });
@@ -25,6 +25,10 @@ export declare class UserFundsAcknowledgment {
25
25
  * Translation url
26
26
  */
27
27
  translationUrl: string;
28
+ /**
29
+ * Operator name
30
+ */
31
+ operator: string;
28
32
  /**
29
33
  * These props are used only by Intl.NumberFormat and have no effect if customdisplayformat is passed, as it will be used instead
30
34
  */
@@ -37,6 +37,10 @@ export namespace Components {
37
37
  "maximumfractiondigits": string;
38
38
  "mbSource": string;
39
39
  "minimumfractiondigits": string;
40
+ /**
41
+ * Operator name
42
+ */
43
+ "operator": string;
40
44
  "operatorid": string;
41
45
  "playercurrency": string;
42
46
  /**
@@ -94,6 +98,10 @@ declare namespace LocalJSX {
94
98
  "maximumfractiondigits"?: string;
95
99
  "mbSource"?: string;
96
100
  "minimumfractiondigits"?: string;
101
+ /**
102
+ * Operator name
103
+ */
104
+ "operator"?: string;
97
105
  "operatorid"?: string;
98
106
  "playercurrency"?: string;
99
107
  /**
@@ -1 +1 @@
1
- export{U as UserFundsAcknowledgment}from"./user-funds-acknowledgment-c9676919.js";import"./index-eb00caf2.js";
1
+ export{U as UserFundsAcknowledgment}from"./user-funds-acknowledgment-3bf8deec.js";import"./index-eb00caf2.js";
@@ -0,0 +1 @@
1
+ import{r as e,h as t}from"./index-eb00caf2.js";const n="__WIDGET_GLOBAL_STYLE_CACHE__";function i(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function o(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then((e=>e.text())).then((t=>{const n=document.createElement("style");n.innerHTML=t,e&&e.appendChild(n)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}function s(e,t,i,o=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!o)return i=function(e,t){const n=document.createElement("style");return window.emMessageBus.subscribe(t,(t=>{e&&(n.innerHTML=t,e.appendChild(n))}))}(e,t),i;window[n]||(window[n]={}),i=function(e,t){return window.emMessageBus.subscribe(t,(i=>{if(!e)return;const o=e.getRootNode(),s=window[n];let r=s[t]&&s[t].sheet;r?s[t].refCount=s[t].refCount+1:(r=new CSSStyleSheet,r.replaceSync(i),s[t]={sheet:r,refCount:1});const a=o.adoptedStyleSheets||[];a.includes(r)||(o.adoptedStyleSheets=[...a,r])}))}(e,t);const s=i.unsubscribe.bind(i);return i.unsubscribe=()=>{if(window[n][t]){const e=window[n][t];e.refCount>1?e.refCount=e.refCount-1:delete window[n][t]}s()},i}const r={en:{protectionTitle:"Protection of Customer Funds",protectionContent:'<p>We hold customer funds separate from <a href="https://www.gamblingcommission.gov.uk/guidance/customer-funds-segregation-disclosure-to-customers-and-reporting/example-statements-that-might-be-used-in-terms-and-conditions-for-each-of#ref-2" target="_blank">company funds</a>. These funds are <b>not protected</b> in the event of insolvency: <b>not protected segregation.</b></p><p>For more information, please see the <a href="https://www.gamblingcommission.gov.uk/guidance/customer-funds-segregation-disclosure-to-customers-and-reporting/the-customer-funds-insolvency-ratings-system" target="_blank">customer funds insolvency ratings system</a>.</p>',balanceArea:"Your current balance:",protectionCheckboxLabel:"I understand that my funds are <b>not protected</b> if ${operatorName} becomes insolvent.",userNoticeText:"Before you can proceed you must consent to the following",submitButtonText:"Confirm",serverNotResponding:"Server might not be responding",apiCallError:"Request failed with status "},"en-us":{protectionTitle:"Terms and Conditions",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"Email marketing",privacyPolicyTitle:"Privacy Policy",userNoticeText:"Before you can proceed you must consent to the following",submitButtonText:"Submit",rejectButtonText:"Reject",rejectText:"Rejecting new consents will result in the inability to continue the login process and you will be logged out.",consentUpdateSuccess:"Consent update successful!",serverNotResponding:"Server might not be responding"},ro:{protectionTitle:"Termeni și Condiții",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"Marketing prin Email",privacyPolicyTitle:"Politica de Confidențialitate",userNoticeText:"Înainte de a continua, trebuie să vă dați consimțământul pentru următoarele",submitButtonText:"Trimite",rejectButtonText:"Respinge",rejectText:"Respingerea noilor consimțăminte va duce la imposibilitatea de a continua procesul de autentificare și veți fi deconectat.",consentUpdateSuccess:"Actualizare consimțământ reușită!",serverNotResponding:"Serverul s-ar putea să nu răspundă"},hr:{protectionTitle:"Opći uvjeti i odredbe",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"E-mail makretinški sadržaj",privacyPolicyTitle:"Politika Privatnosti",userNoticeText:"Prije nego što možete nastaviti, morate pristati na sljedeće",submitButtonText:"Pošalji",rejectButtonText:"Odbij",rejectText:"Odbijanje novih pristanka rezultirat će nemogućnošću nastavka procesa prijave i bit ćete odjavljeni.",consentUpdateSuccess:"Ažuriranje pristanka uspješno!",serverNotResponding:"Poslužitelj možda ne odgovara"},fr:{protectionTitle:"Termes et Conditions",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"Marketing par Email",privacyPolicyTitle:"Politique de Confidentialité",userNoticeText:"Avant de continuer, vous devez consentir aux éléments suivants",submitButtonText:"Soumettre",rejectButtonText:"Rejeter",rejectText:"Le rejet des nouveaux consentements entraînera l'impossibilité de continuer le processus de connexion et vous serez déconnecté.",consentUpdateSuccess:"Mise à jour du consentement réussie!",serverNotResponding:"Le serveur ne répond peut-être pas"},cs:{protectionTitle:"Podmínky a ujednání",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"Emailový marketing",privacyPolicyTitle:"Zásady ochrany osobních údajů",userNoticeText:"Než budete moci pokračovat, musíte souhlasit s následujícím",submitButtonText:"Odeslat",rejectButtonText:"Odmítnout",rejectText:"Odmítnutí nových souhlasů povede k nemožnosti pokračovat v procesu přihlášení a budete odhlášeni.",consentUpdateSuccess:"Aktualizace souhlasu proběhla úspěšně!",serverNotResponding:"Server možná neodpovídá"},de:{protectionTitle:"Allgemeine Geschäftsbedingungen",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"E-Mail-Marketing",privacyPolicyTitle:"Datenschutzrichtlinie",userNoticeText:"Bevor Sie fortfahren können, müssen Sie den folgenden Punkten zustimmen",submitButtonText:"Absenden",rejectButtonText:"Ablehnen",rejectText:"Das Ablehnen neuer Zustimmungen führt dazu, dass der Anmeldevorgang nicht fortgesetzt werden kann und Sie abgemeldet werden.",consentUpdateSuccess:"Zustimmung erfolgreich aktualisiert!",serverNotResponding:"Der Server antwortet möglicherweise nicht"},es:{protectionTitle:"Términos y Condiciones",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"Marketing por Email",privacyPolicyTitle:"Política de Privacidad",userNoticeText:"Antes de continuar, debe dar su consentimiento a lo siguiente",submitButtonText:"Enviar",rejectButtonText:"Rechazar",rejectText:"Rechazar nuevos consentimientos resultará en la imposibilidad de continuar el proceso de inicio de sesión y se cerrará la sesión.",consentUpdateSuccess:"¡Actualización del consentimiento exitosa!",serverNotResponding:"El servidor podría no estar respondiendo"},pt:{protectionTitle:"Termos e Condições",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"Marketing por Email",privacyPolicyTitle:"Política de Privacidade",userNoticeText:"Antes de continuar, você deve consentir com o seguinte",submitButtonText:"Enviar",rejectButtonText:"Rejeitar",rejectText:"Rejeitar novos consentimentos resultará na impossibilidade de continuar o processo de login e você será desconectado.",consentUpdateSuccess:"Atualização de consentimento bem-sucedida!",serverNotResponding:"O servidor pode não estar respondendo"},"es-mx":{protectionTitle:"Términos y Condiciones",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"Marketing por Email",privacyPolicyTitle:"Política de Privacidad",userNoticeText:"Antes de continuar, debe dar su consentimiento a lo siguiente",submitButtonText:"Enviar",rejectButtonText:"Rechazar",rejectText:"Rechazar nuevos consentimientos resultará en la imposibilidad de continuar el proceso de inicio de sesión y se cerrará la sesión.",consentUpdateSuccess:"¡Actualización del consentimiento exitosa!",serverNotResponding:"El servidor podría no estar respondiendo"},"pt-br":{protectionTitle:"Termos e Condições",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"Marketing por Email",privacyPolicyTitle:"Política de Privacidade",userNoticeText:"Antes de continuar, você deve consentir com o seguinte",submitButtonText:"Enviar",rejectButtonText:"Rejeitar",rejectText:"Rejeitar novos consentimentos resultará na impossibilidade de continuar o processo de login e você será desconectado.",consentUpdateSuccess:"Atualização de consentimento bem-sucedida!",serverNotResponding:"O servidor pode não estar respondendo"}},a=e=>new Promise((t=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{r[t]||(r[t]={});for(let n in e[t])r[t][n]=e[t][n]})),t(!0)}))})),c=(e,t,n)=>{let i=r[void 0!==t&&t in r?t:"en"][e];if(void 0!==n)for(const[e,t]of Object.entries(n.values)){const n=new RegExp(`{${e}}`,"g");i=i.replace(n,t)}return i},d=class{constructor(t){e(this,t),this.abortController=null,this.TIMEOUT_MS=1e4,this.currency="",this.getPlayerAccountBalanceDataCore=()=>{const e=new URL(`${this.endpoint}/v1/player/${this.userid}/account`);fetch(e,{method:"GET",headers:{"X-SessionID":this.session}}).then((e=>{if(!e.ok)throw this.errorAmountMessage=`${c("apiCallError",this.language)} ${e.status}`,new Error(`Failed to fetch balance data: ${e.status}`);return e.json()})).then((e=>{var t,n;if(!e.items||!Array.isArray(e.items))throw this.errorAmountMessage=`${c("apiCallError",this.language)} ${e.status}`,new Error("Unexpected data format: items array missing");const i=e.items.find((e=>"Casino"===e.displayName));if(!(null==i?void 0:i.currency))throw new Error("No Casino item found in balance items");this.currency=i.currency,this.totalCashAmount=null!==(n=null===(t=e.totalAmount)||void 0===t?void 0:t[this.currency])&&void 0!==n?n:0})).catch((e=>{this.errorAmountMessage||(this.errorAmountMessage=c("serverNotResponding",this.language)),console.error("Balance error:",e)})).finally((()=>{this.isLoading=!1}))},this.getPlayerAccountBalanceData16=()=>{const e=new URL(`${this.endpoint}/v2/player/${this.userid}/balance`),t=new Headers;t.append("X-SessionID",this.session),fetch(e,{method:"GET",headers:t}).then((e=>{if(!e.ok)throw this.errorAmountMessage=`${c("apiCallError",this.language)} ${e.status}`,new Error(`Failed to fetch balance data: ${e.status}`);return e.json()})).then((e=>{var t,n;if(!e.items||!Array.isArray(e.items))throw this.errorAmountMessage=`${c("apiCallError",this.language)} ${e.status}`,new Error("Unexpected data format: items array missing");const i=e.items.find((e=>"Real"===e.type&&"Ordinary"===e.walletAccountType));if(!(null==i?void 0:i.currency))throw new Error("No Real/Ordinary wallet found in balance items");this.currency=i.currency,e[this.totalcalculationmode]||(this.totalcalculationmode="totalCashAmount"),this.totalCashAmount=null!==(n=null===(t=e[this.totalcalculationmode])||void 0===t?void 0:t[this.currency])&&void 0!==n?n:0})).catch((e=>{this.errorAmountMessage||(this.errorAmountMessage=c("serverNotResponding",this.language)),console.error("Balance fetch error",e)})).finally((()=>{this.isLoading=!1}))},this.userLegislationConsentHandler=()=>{this.checkboxInput&&(this.isConsentChecked=this.checkboxInput.checked),this.isConsentChecked&&(this.consentsSubmitted=!1,this.errorMessage="")},this.formatBalance=e=>{if(this.customdisplayformat)return this.formatFromCustom(e);const t=this.currencylocale||this.language,n={style:"currency",currency:this.playercurrency,useGrouping:!0,currencyDisplay:this.currencydisplay,maximumFractionDigits:""===this.maximumfractiondigits||isNaN(Number(this.maximumfractiondigits))?2:Number(this.maximumfractiondigits),minimumFractionDigits:""===this.minimumfractiondigits||isNaN(Number(this.minimumfractiondigits))?0:Number(this.minimumfractiondigits)};return new Intl.NumberFormat(t,n).format(e)},this.formatFromCustom=e=>{const t=[];let n="";for(const i of this.customdisplayformat)switch(i){default:n+=i;break;case"{":n&&t.push(n),n="";break;case"}":const[o,s]=n.split("|");if(n="","currency"===o.toLowerCase())n=this.playercurrency;else if("amount"===o.toLowerCase()){let t=",",i=".",o=2;s&&(" "!==s[0]&&(t=s[0])," "!==s[1]&&(i=s[1])," "!==s[2]&&!isNaN(Number(s[2]))&&(o=Number(s[2])));let[r,a]=String(Math.floor(e*10**o)/10**o).split(".");n+=r[0];for(let e=1;e<r.length;++e)n+=(r.length-e)%3==0?t+r[e]:r[e];let c=a||"";const d="true"===this.alwaysshowdecimals,l=Number(this.maximumfractiondigits);if(d)c=c.padEnd(l||2,"0").substring(0,l);else if(!c)break;n+=i+c}n&&t.push(n),n=""}return t.push(n),t.join("")},this.handleSubmit=()=>{var e;this.consentsSubmitted=!0,null===(e=this.abortController)||void 0===e||e.abort(),this.abortController=new AbortController;const t=setTimeout((()=>{var e;null===(e=this.abortController)||void 0===e||e.abort("Request timed out")}),this.TIMEOUT_MS),n=`${this.endpoint}/api/pam/v1/actions/customer-funds-protection`,i=new Headers;return i.append("Content-Type","application/json"),i.append("X-SessionId",`${this.session}`),i.append("X-Tenant-ID",`${this.operatorid}`),fetch(n,{method:"POST",headers:i,body:JSON.stringify({accepted:!0}),signal:this.abortController.signal}).then((e=>{if(!e.ok)throw this.errorMessage=`${c("apiCallError",this.language)} ${e.status}`,new Error(`Request failed with status ${e.status}`);return 202===e.status?(this.errorMessage="",void window.postMessage({type:"ProtectionFundsAccepted"},window.location.href)):e.json()})).catch((e=>{var t;"AbortError"!==e.name?(console.error("Customer funds protection request failed:",e.message),this.errorMessage=c("serverNotResponding",this.language)):"Request timed out"===(null===(t=this.abortController)||void 0===t?void 0:t.signal.reason)&&(this.errorMessage=c("serverNotResponding",this.language))})).finally((()=>{clearTimeout(t),this.abortController=null}))},this.session=void 0,this.operatorid=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.endpoint=void 0,this.language="en",this.translationUrl="",this.operator="",this.currencylocale="en",this.currencydisplay="symbol",this.maximumfractiondigits="2",this.minimumfractiondigits="0",this.customdisplayformat="",this.alwaysshowdecimals="true",this.playercurrency="EUR",this.userid=void 0,this.gmversion="gm16",this.totalcalculationmode="totalCashAmount",this.isLoading=!0,this.isConsentChecked=!1,this.totalCashAmount=0,this.errorMessage="",this.errorAmountMessage="",this.consentsSubmitted=!1}handleNewTranslations(){a(this.translationUrl)}handleClientStylingChange(e,t){e!=t&&i(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(e,t){e!=t&&s(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}async componentWillLoad(){this.translationUrl.length>2&&await a(this.translationUrl)}componentDidLoad(){switch(this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&i(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl)),this.gmversion){case"gmcore":this.getPlayerAccountBalanceDataCore();break;case"gm16":this.getPlayerAccountBalanceData16();break;default:throw Error(`Invalid apiversion attribute: ${this.gmversion}`)}}disconnectedCallback(){var e;null===(e=this.abortController)||void 0===e||e.abort("Component unmounted"),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}consentsArea(){const e=c("protectionCheckboxLabel",this.language).replace("${operatorName}",this.operator);return t("div",{class:"UserProtectionFundsCheckboxArea"},t("label",{class:"UserProtectionFundsCheckboxContent",htmlFor:"userProtectionFunds"},t("input",{ref:e=>this.checkboxInput=e,id:"userProtectionFunds",type:"checkbox",onInput:this.userLegislationConsentHandler}),t("span",{innerHTML:e})))}render(){return t("div",{key:"cc73425a68ccc58ea4c19f7cd057e27ecaca7b7b",class:"QueryReferenceContainer",ref:e=>this.stylingContainer=e},this.isLoading?t("div",null,t("slot",{name:"spinner"}),t("svg",{class:"spinner",viewBox:"0 0 50 50"},t("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"5"}))):t("div",{class:"UserProtectionFundsContainer"},t("div",{class:"UserProtectionFundsTitle"},t("h2",null,c("protectionTitle",this.language))),t("div",{class:"UserProtectionFundsWrapper"},t("p",{innerHTML:`${c("protectionContent",this.language)}`})),t("div",{class:"UserProtectionFundsBalance"},t("p",null,c("balanceArea",this.language)," ",t("span",null,this.formatBalance(this.totalCashAmount)))),t("div",{class:"UserProtectionFundsButtonsWrapper"},t("div",null,this.consentsArea()),t("div",null,t("button",{class:"UserProtectionFundsSubmitButton",disabled:!this.isConsentChecked||""!=this.errorMessage||this.consentsSubmitted,onClick:this.handleSubmit},c("submitButtonText",this.language))),(this.errorMessage||this.errorAmountMessage)&&t("div",{class:"UserProtectionError"},t("p",null,""!=this.errorMessage&&this.errorMessage),t("p",null,""!=this.errorAmountMessage&&this.errorAmountMessage)))))}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};d.style=":host{display:block}.QueryReferenceContainer{height:100%;width:100%}.UserProtectionFundsTitle{font-size:1.2rem;font-weight:200;text-align:center}.CloseButton{width:25px;height:25px;align-self:flex-end}.UserProtectionFundsContainer{font-family:inherit;font-weight:100;height:100%;padding:1rem 1.5rem;background-color:var(--emw--color-white, #FFFFFF);display:flex;flex-direction:column;justify-content:space-between;border-radius:var(--emw--border-radius-large, 20px);max-width:fit-content}.ConsentSubmitButton{font-size:1rem;font-family:var(--emw--button-typography);padding:0.4rem 1.4rem;background:var(--emw--button-background-color, #FFFFFF);border:var(--emw--button-border, 2px solid #000000);color:var(--emw--button-text-color, #000000);border-radius:var(--emw--button-border-radius, 10px);align-self:center;cursor:pointer}.ConsentSubmitButton:disabled{border:2px solid var(--emw--color-disabled, #58586B);color:var(--emw--color-disabled, #58586B);cursor:unset}.ButtonsWrapper{display:flex;flex-direction:column;margin-top:10px;gap:40px}.ButtonsWrapper button:only-child{margin-left:auto}.UserProtectionError{color:var(--emw--color-error, #FD2839);text-align:center;height:22px}@media screen and (max-width: 320px){.QueryReferenceContainer{font-size:0.8rem;color:var(--emw--button-text-color, #000000)}}.spinner{animation:rotate 2s linear infinite;z-index:2;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;width:50px;height:50px}.spinner .path{stroke:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}";export{d as U}
@@ -1 +1 @@
1
- export{U as user_funds_acknowledgment}from"./user-funds-acknowledgment-c9676919.js";import"./index-eb00caf2.js";
1
+ export{U as user_funds_acknowledgment}from"./user-funds-acknowledgment-3bf8deec.js";import"./index-eb00caf2.js";
@@ -1 +1 @@
1
- import{p as n,b as e}from"./index-eb00caf2.js";export{s as setNonce}from"./index-eb00caf2.js";import{g as t}from"./app-globals-0f993ce5.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),n(t)})().then((async n=>(await t(),e([["user-funds-acknowledgment",[[1,"user-funds-acknowledgment",{session:[513],operatorid:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],endpoint:[513],language:[1537],translationUrl:[513,"translation-url"],currencylocale:[513],currencydisplay:[513],maximumfractiondigits:[513],minimumfractiondigits:[513],customdisplayformat:[513],alwaysshowdecimals:[513],playercurrency:[513],userid:[1],gmversion:[513],totalcalculationmode:[513],isLoading:[32],isConsentChecked:[32],totalCashAmount:[32],errorMessage:[32],errorAmountMessage:[32],consentsSubmitted:[32]},null,{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}]]]],n))));
1
+ import{p as n,b as e}from"./index-eb00caf2.js";export{s as setNonce}from"./index-eb00caf2.js";import{g as t}from"./app-globals-0f993ce5.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),n(t)})().then((async n=>(await t(),e([["user-funds-acknowledgment",[[1,"user-funds-acknowledgment",{session:[513],operatorid:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],endpoint:[513],language:[1537],translationUrl:[513,"translation-url"],operator:[1],currencylocale:[513],currencydisplay:[513],maximumfractiondigits:[513],minimumfractiondigits:[513],customdisplayformat:[513],alwaysshowdecimals:[513],playercurrency:[513],userid:[1],gmversion:[513],totalcalculationmode:[513],isLoading:[32],isConsentChecked:[32],totalCashAmount:[32],errorMessage:[32],errorAmountMessage:[32],consentsSubmitted:[32]},null,{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}]]]],n))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/user-funds-acknowledgment",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as e,h as t}from"./index-eb00caf2.js";const n="__WIDGET_GLOBAL_STYLE_CACHE__";function i(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function o(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then((e=>e.text())).then((t=>{const n=document.createElement("style");n.innerHTML=t,e&&e.appendChild(n)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}function s(e,t,i,o=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!o)return i=function(e,t){const n=document.createElement("style");return window.emMessageBus.subscribe(t,(t=>{e&&(n.innerHTML=t,e.appendChild(n))}))}(e,t),i;window[n]||(window[n]={}),i=function(e,t){return window.emMessageBus.subscribe(t,(i=>{if(!e)return;const o=e.getRootNode(),s=window[n];let r=s[t]&&s[t].sheet;r?s[t].refCount=s[t].refCount+1:(r=new CSSStyleSheet,r.replaceSync(i),s[t]={sheet:r,refCount:1});const a=o.adoptedStyleSheets||[];a.includes(r)||(o.adoptedStyleSheets=[...a,r])}))}(e,t);const s=i.unsubscribe.bind(i);return i.unsubscribe=()=>{if(window[n][t]){const e=window[n][t];e.refCount>1?e.refCount=e.refCount-1:delete window[n][t]}s()},i}const r={en:{protectionTitle:"Protection of Customer Funds",protectionContent:'<p>We hold customer funds separate from company funds.<sup class="note"><a href="https://www.gamblingcommission.gov.uk/guidance/customer-funds-segregation-disclosure-to-customers-and-reporting/example-statements-that-might-be-used-in-terms-and-conditions-for-each-of#ref-2" target="_blank">12</a></sup> These funds ar <b>not protected</b> in the event of insolvency: <b>not protected segregation.</b></p><p>For more information, please see the <a href="https://www.gamblingcommission.gov.uk/guidance/customer-funds-segregation-disclosure-to-customers-and-reporting/the-customer-funds-insolvency-ratings-system" target="_blank">customer funds insolvency ratings system</a>.</p>',balanceArea:"Your current balance:",protectionCheckboxLabel:"I understand that my funds are <b>not protected</b> if the operator becomes insolvent.",userNoticeText:"Before you can proceed you must consent to the following",submitButtonText:"Confirm",serverNotResponding:"Server might not be responding",apiCallError:"Request failed with status "},"en-us":{protectionTitle:"Terms and Conditions",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"Email marketing",privacyPolicyTitle:"Privacy Policy",userNoticeText:"Before you can proceed you must consent to the following",submitButtonText:"Submit",rejectButtonText:"Reject",rejectText:"Rejecting new consents will result in the inability to continue the login process and you will be logged out.",consentUpdateSuccess:"Consent update successful!",serverNotResponding:"Server might not be responding"},ro:{protectionTitle:"Termeni și Condiții",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"Marketing prin Email",privacyPolicyTitle:"Politica de Confidențialitate",userNoticeText:"Înainte de a continua, trebuie să vă dați consimțământul pentru următoarele",submitButtonText:"Trimite",rejectButtonText:"Respinge",rejectText:"Respingerea noilor consimțăminte va duce la imposibilitatea de a continua procesul de autentificare și veți fi deconectat.",consentUpdateSuccess:"Actualizare consimțământ reușită!",serverNotResponding:"Serverul s-ar putea să nu răspundă"},hr:{protectionTitle:"Opći uvjeti i odredbe",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"E-mail makretinški sadržaj",privacyPolicyTitle:"Politika Privatnosti",userNoticeText:"Prije nego što možete nastaviti, morate pristati na sljedeće",submitButtonText:"Pošalji",rejectButtonText:"Odbij",rejectText:"Odbijanje novih pristanka rezultirat će nemogućnošću nastavka procesa prijave i bit ćete odjavljeni.",consentUpdateSuccess:"Ažuriranje pristanka uspješno!",serverNotResponding:"Poslužitelj možda ne odgovara"},fr:{protectionTitle:"Termes et Conditions",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"Marketing par Email",privacyPolicyTitle:"Politique de Confidentialité",userNoticeText:"Avant de continuer, vous devez consentir aux éléments suivants",submitButtonText:"Soumettre",rejectButtonText:"Rejeter",rejectText:"Le rejet des nouveaux consentements entraînera l'impossibilité de continuer le processus de connexion et vous serez déconnecté.",consentUpdateSuccess:"Mise à jour du consentement réussie!",serverNotResponding:"Le serveur ne répond peut-être pas"},cs:{protectionTitle:"Podmínky a ujednání",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"Emailový marketing",privacyPolicyTitle:"Zásady ochrany osobních údajů",userNoticeText:"Než budete moci pokračovat, musíte souhlasit s následujícím",submitButtonText:"Odeslat",rejectButtonText:"Odmítnout",rejectText:"Odmítnutí nových souhlasů povede k nemožnosti pokračovat v procesu přihlášení a budete odhlášeni.",consentUpdateSuccess:"Aktualizace souhlasu proběhla úspěšně!",serverNotResponding:"Server možná neodpovídá"},de:{protectionTitle:"Allgemeine Geschäftsbedingungen",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"E-Mail-Marketing",privacyPolicyTitle:"Datenschutzrichtlinie",userNoticeText:"Bevor Sie fortfahren können, müssen Sie den folgenden Punkten zustimmen",submitButtonText:"Absenden",rejectButtonText:"Ablehnen",rejectText:"Das Ablehnen neuer Zustimmungen führt dazu, dass der Anmeldevorgang nicht fortgesetzt werden kann und Sie abgemeldet werden.",consentUpdateSuccess:"Zustimmung erfolgreich aktualisiert!",serverNotResponding:"Der Server antwortet möglicherweise nicht"},es:{protectionTitle:"Términos y Condiciones",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"Marketing por Email",privacyPolicyTitle:"Política de Privacidad",userNoticeText:"Antes de continuar, debe dar su consentimiento a lo siguiente",submitButtonText:"Enviar",rejectButtonText:"Rechazar",rejectText:"Rechazar nuevos consentimientos resultará en la imposibilidad de continuar el proceso de inicio de sesión y se cerrará la sesión.",consentUpdateSuccess:"¡Actualización del consentimiento exitosa!",serverNotResponding:"El servidor podría no estar respondiendo"},pt:{protectionTitle:"Termos e Condições",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"Marketing por Email",privacyPolicyTitle:"Política de Privacidade",userNoticeText:"Antes de continuar, você deve consentir com o seguinte",submitButtonText:"Enviar",rejectButtonText:"Rejeitar",rejectText:"Rejeitar novos consentimentos resultará na impossibilidade de continuar o processo de login e você será desconectado.",consentUpdateSuccess:"Atualização de consentimento bem-sucedida!",serverNotResponding:"O servidor pode não estar respondendo"},"es-mx":{protectionTitle:"Términos y Condiciones",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"Marketing por Email",privacyPolicyTitle:"Política de Privacidad",userNoticeText:"Antes de continuar, debe dar su consentimiento a lo siguiente",submitButtonText:"Enviar",rejectButtonText:"Rechazar",rejectText:"Rechazar nuevos consentimientos resultará en la imposibilidad de continuar el proceso de inicio de sesión y se cerrará la sesión.",consentUpdateSuccess:"¡Actualización del consentimiento exitosa!",serverNotResponding:"El servidor podría no estar respondiendo"},"pt-br":{protectionTitle:"Termos e Condições",protectionContent:"We hold customer funds separate from company funds.",balanceArea:"Marketing por Email",privacyPolicyTitle:"Política de Privacidade",userNoticeText:"Antes de continuar, você deve consentir com o seguinte",submitButtonText:"Enviar",rejectButtonText:"Rejeitar",rejectText:"Rejeitar novos consentimentos resultará na impossibilidade de continuar o processo de login e você será desconectado.",consentUpdateSuccess:"Atualização de consentimento bem-sucedida!",serverNotResponding:"O servidor pode não estar respondendo"}},a=e=>new Promise((t=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{r[t]||(r[t]={});for(let n in e[t])r[t][n]=e[t][n]})),t(!0)}))})),c=(e,t,n)=>{let i=r[void 0!==t&&t in r?t:"en"][e];if(void 0!==n)for(const[e,t]of Object.entries(n.values)){const n=new RegExp(`{${e}}`,"g");i=i.replace(n,t)}return i},d=class{constructor(t){e(this,t),this.abortController=null,this.TIMEOUT_MS=1e4,this.currency="",this.getPlayerAccountBalanceDataCore=()=>{const e=new URL(`${this.endpoint}/v1/player/${this.userid}/account`);fetch(e,{method:"GET",headers:{"X-SessionID":this.session}}).then((e=>{if(!e.ok)throw this.errorAmountMessage=`${c("apiCallError",this.language)} ${e.status}`,new Error(`Failed to fetch balance data: ${e.status}`);return e.json()})).then((e=>{var t,n;if(!e.items||!Array.isArray(e.items))throw this.errorAmountMessage=`${c("apiCallError",this.language)} ${e.status}`,new Error("Unexpected data format: items array missing");const i=e.items.find((e=>"Casino"===e.displayName));if(!(null==i?void 0:i.currency))throw new Error("No Casino item found in balance items");this.currency=i.currency,this.totalCashAmount=null!==(n=null===(t=e.totalAmount)||void 0===t?void 0:t[this.currency])&&void 0!==n?n:0})).catch((e=>{this.errorAmountMessage||(this.errorAmountMessage=c("serverNotResponding",this.language)),console.error("Balance error:",e)})).finally((()=>{this.isLoading=!1}))},this.getPlayerAccountBalanceData16=()=>{const e=new URL(`${this.endpoint}/v2/player/${this.userid}/balance`),t=new Headers;t.append("X-SessionID",this.session),fetch(e,{method:"GET",headers:t}).then((e=>{if(!e.ok)throw this.errorAmountMessage=`${c("apiCallError",this.language)} ${e.status}`,new Error(`Failed to fetch balance data: ${e.status}`);return e.json()})).then((e=>{var t,n;if(!e.items||!Array.isArray(e.items))throw this.errorAmountMessage=`${c("apiCallError",this.language)} ${e.status}`,new Error("Unexpected data format: items array missing");const i=e.items.find((e=>"Real"===e.type&&"Ordinary"===e.walletAccountType));if(!(null==i?void 0:i.currency))throw new Error("No Real/Ordinary wallet found in balance items");this.currency=i.currency,e[this.totalcalculationmode]||(this.totalcalculationmode="totalCashAmount"),this.totalCashAmount=null!==(n=null===(t=e[this.totalcalculationmode])||void 0===t?void 0:t[this.currency])&&void 0!==n?n:0})).catch((e=>{this.errorAmountMessage||(this.errorAmountMessage=c("serverNotResponding",this.language)),console.error("Balance fetch error",e)})).finally((()=>{this.isLoading=!1}))},this.userLegislationConsentHandler=()=>{this.checkboxInput&&(this.isConsentChecked=this.checkboxInput.checked),this.isConsentChecked&&(this.consentsSubmitted=!1,this.errorMessage="")},this.formatBalance=e=>{if(this.customdisplayformat)return this.formatFromCustom(e);const t=this.currencylocale||this.language,n={style:"currency",currency:this.playercurrency,useGrouping:!0,currencyDisplay:this.currencydisplay,maximumFractionDigits:""===this.maximumfractiondigits||isNaN(Number(this.maximumfractiondigits))?2:Number(this.maximumfractiondigits),minimumFractionDigits:""===this.minimumfractiondigits||isNaN(Number(this.minimumfractiondigits))?0:Number(this.minimumfractiondigits)};return new Intl.NumberFormat(t,n).format(e)},this.formatFromCustom=e=>{const t=[];let n="";for(const i of this.customdisplayformat)switch(i){default:n+=i;break;case"{":n&&t.push(n),n="";break;case"}":const[o,s]=n.split("|");if(n="","currency"===o.toLowerCase())n=this.playercurrency;else if("amount"===o.toLowerCase()){let t=",",i=".",o=2;s&&(" "!==s[0]&&(t=s[0])," "!==s[1]&&(i=s[1])," "!==s[2]&&!isNaN(Number(s[2]))&&(o=Number(s[2])));let[r,a]=String(Math.floor(e*10**o)/10**o).split(".");n+=r[0];for(let e=1;e<r.length;++e)n+=(r.length-e)%3==0?t+r[e]:r[e];let c=a||"";const d="true"===this.alwaysshowdecimals,l=Number(this.maximumfractiondigits);if(d)c=c.padEnd(l||2,"0").substring(0,l);else if(!c)break;n+=i+c}n&&t.push(n),n=""}return t.push(n),t.join("")},this.handleSubmit=()=>{var e;this.consentsSubmitted=!0,null===(e=this.abortController)||void 0===e||e.abort(),this.abortController=new AbortController;const t=setTimeout((()=>{var e;null===(e=this.abortController)||void 0===e||e.abort("Request timed out")}),this.TIMEOUT_MS),n=`${this.endpoint}/api/pam/v1/actions/customer-funds-protection`,i=new Headers;return i.append("Content-Type","application/json"),i.append("X-SessionId",`${this.session}`),i.append("X-Tenant-ID",`${this.operatorid}`),fetch(n,{method:"POST",headers:i,body:JSON.stringify({accepted:!0}),signal:this.abortController.signal}).then((e=>{if(!e.ok)throw this.errorMessage=`${c("apiCallError",this.language)} ${e.status}`,new Error(`Request failed with status ${e.status}`);return 202===e.status?(this.errorMessage="",void window.postMessage({type:"ProtectionFundsAccepted"},window.location.href)):e.json()})).catch((e=>{var t;"AbortError"!==e.name?(console.error("Customer funds protection request failed:",e.message),this.errorMessage=c("serverNotResponding",this.language)):"Request timed out"===(null===(t=this.abortController)||void 0===t?void 0:t.signal.reason)&&(this.errorMessage=c("serverNotResponding",this.language))})).finally((()=>{clearTimeout(t),this.abortController=null}))},this.session=void 0,this.operatorid=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.endpoint=void 0,this.language="en",this.translationUrl="",this.currencylocale="en",this.currencydisplay="symbol",this.maximumfractiondigits="2",this.minimumfractiondigits="0",this.customdisplayformat="",this.alwaysshowdecimals="true",this.playercurrency="EUR",this.userid=void 0,this.gmversion="gm16",this.totalcalculationmode="totalCashAmount",this.isLoading=!0,this.isConsentChecked=!1,this.totalCashAmount=0,this.errorMessage="",this.errorAmountMessage="",this.consentsSubmitted=!1}handleNewTranslations(){a(this.translationUrl)}handleClientStylingChange(e,t){e!=t&&i(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(e,t){e!=t&&s(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}async componentWillLoad(){this.translationUrl.length>2&&await a(this.translationUrl)}componentDidLoad(){switch(this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&i(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl)),this.gmversion){case"gmcore":this.getPlayerAccountBalanceDataCore();break;case"gm16":this.getPlayerAccountBalanceData16();break;default:throw Error(`Invalid apiversion attribute: ${this.gmversion}`)}}disconnectedCallback(){var e;null===(e=this.abortController)||void 0===e||e.abort("Component unmounted"),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}consentsArea(){return t("div",{class:"UserProtectionFundsCheckboxArea"},t("label",{class:"UserProtectionFundsCheckboxContent",htmlFor:"userProtectionFunds"},t("input",{ref:e=>this.checkboxInput=e,id:"userProtectionFunds",type:"checkbox",onInput:this.userLegislationConsentHandler}),t("span",{innerHTML:`${c("protectionCheckboxLabel",this.language)}`})))}render(){return t("div",{key:"4b83615d1b42c72de845e1ca293a162bd9e958ce",class:"QueryReferenceContainer",ref:e=>this.stylingContainer=e},this.isLoading?t("div",null,t("slot",{name:"spinner"}),t("svg",{class:"spinner",viewBox:"0 0 50 50"},t("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"5"}))):t("div",{class:"UserProtectionFundsContainer"},t("div",{class:"UserProtectionFundsTitle"},t("h2",null,c("protectionTitle",this.language))),t("div",{class:"UserProtectionFundsWrapper"},t("p",{innerHTML:`${c("protectionContent",this.language)}`})),t("div",{class:"UserProtectionFundsBalance"},t("p",null,c("balanceArea",this.language)," ",t("span",null,this.formatBalance(this.totalCashAmount)))),t("div",{class:"UserProtectionFundsButtonsWrapper"},t("div",null,this.consentsArea()),t("div",null,t("button",{class:"UserProtectionFundsSubmitButton",disabled:!this.isConsentChecked||""!=this.errorMessage||this.consentsSubmitted,onClick:this.handleSubmit},c("submitButtonText",this.language))),t("div",{class:"UserProtectionError"},t("p",null,""!=this.errorMessage&&this.errorMessage),t("p",null,""!=this.errorAmountMessage&&this.errorAmountMessage)))))}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};d.style=":host{display:block}.QueryReferenceContainer{height:100%;width:100%}.UserProtectionFundsTitle{font-size:1.2rem;font-weight:200;text-align:center}.CloseButton{width:25px;height:25px;align-self:flex-end}.UserProtectionFundsContainer{font-family:inherit;font-weight:100;height:100%;padding:1rem 1.5rem;background-color:var(--emw--color-white, #FFFFFF);display:flex;flex-direction:column;justify-content:space-between;border-radius:var(--emw--border-radius-large, 20px);max-width:fit-content}.ConsentSubmitButton{font-size:1rem;font-family:var(--emw--button-typography);padding:0.4rem 1.4rem;background:var(--emw--button-background-color, #FFFFFF);border:var(--emw--button-border, 2px solid #000000);color:var(--emw--button-text-color, #000000);border-radius:var(--emw--button-border-radius, 10px);align-self:center;cursor:pointer}.ConsentSubmitButton:disabled{border:2px solid var(--emw--color-disabled, #58586B);color:var(--emw--color-disabled, #58586B);cursor:unset}.ButtonsWrapper{display:flex;flex-direction:column;margin-top:10px;gap:40px}.ButtonsWrapper button:only-child{margin-left:auto}.UserProtectionError{color:var(--emw--color-error, #FD2839);text-align:center;height:22px}@media screen and (max-width: 320px){.QueryReferenceContainer{font-size:0.8rem;color:var(--emw--button-text-color, #000000)}}.spinner{animation:rotate 2s linear infinite;z-index:2;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;width:50px;height:50px}.spinner .path{stroke:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}";export{d as U}