@everymatrix/pam-account-balance-modal 0.6.5 → 0.6.7
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.cjs.js +1 -1
- package/dist/cjs/{pam-account-balance-modal-555f5757.js → pam-account-balance-modal-7bad259c.js} +3 -3
- package/dist/cjs/pam-account-balance-modal_2.cjs.entry.js +1 -1
- package/dist/collection/components/pam-account-balance-modal/pam-account-balance-modal.css +0 -4
- package/dist/collection/components/pam-account-balance-modal/pam-account-balance-modal.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/{pam-account-balance-modal-2ac4c5b6.js → pam-account-balance-modal-0aed492c.js} +3 -3
- package/dist/esm/pam-account-balance-modal_2.entry.js +1 -1
- package/dist/pam-account-balance-modal/index.esm.js +1 -1
- package/dist/pam-account-balance-modal/{p-1a2655f7.entry.js → p-249613d1.entry.js} +1 -1
- package/dist/pam-account-balance-modal/{p-855ce847.js → p-6fd788e4.js} +1 -1
- package/dist/pam-account-balance-modal/pam-account-balance-modal.esm.js +1 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const pamAccountBalanceModal = require('./pam-account-balance-modal-
|
5
|
+
const pamAccountBalanceModal = require('./pam-account-balance-modal-7bad259c.js');
|
6
6
|
require('./index-f01eba32.js');
|
7
7
|
|
8
8
|
|
package/dist/cjs/{pam-account-balance-modal-555f5757.js → pam-account-balance-modal-7bad259c.js}
RENAMED
@@ -1302,7 +1302,7 @@ const translate = (key, customLang, values) => {
|
|
1302
1302
|
return translation;
|
1303
1303
|
};
|
1304
1304
|
|
1305
|
-
const pamAccountBalanceModalCss = "*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.PamAccountBalanceModal{position:relative}.PamAccountBalanceModal .LoadingSkeleton{border-radius:10px;overflow:hidden;width:60px}.PamAccountBalanceModal .BalanceValue{font-size:14px;cursor:pointer;background:transparent;border:none;font:inherit;color:inherit;display:flex;flex-wrap:nowrap;white-space:nowrap}.PamAccountBalanceModal .BalanceValue svg{width:16px;fill:var(--emw--color-black, #000000)}.PamAccountBalanceModal .BalanceValue span{padding-left:5px}.PamAccountBalanceModal .BalanceValue .TriangleActive,.PamAccountBalanceModal .BalanceValue .TriangleInactive{display:block;margin:0 3px;transition:all 0.2s}.PamAccountBalanceModal .BalanceValue .TriangleActive:hover,.PamAccountBalanceModal .BalanceValue .TriangleInactive:hover{transform:scale(1.2)}.PamAccountBalanceModal .BalanceValue .TriangleActive svg,.PamAccountBalanceModal .BalanceValue .TriangleInactive svg{margin:2px 0px}.PamAccountBalanceModal .BalanceValue .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px)}.PamAccountBalanceModal .BalanceValue .TriangleActive:hover{transform:scale(1.1) rotateX(180deg) translateY(3px)}@media only screen and (max-width: 360px){.PamAccountBalanceModal .BalanceValue{font-size:12px}.PamAccountBalanceModal .BalanceValue svg{width:12px}}.PamAccountBalanceModal .BalanceModalWrapper{background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);position:absolute;top:40px;padding:10px;transform:translateX(-45%);box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919;transition:all 0.2s ease-in
|
1305
|
+
const pamAccountBalanceModalCss = "*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.PamAccountBalanceModal{position:relative}.PamAccountBalanceModal .LoadingSkeleton{border-radius:10px;overflow:hidden;width:60px}.PamAccountBalanceModal .BalanceValue{font-size:14px;cursor:pointer;background:transparent;border:none;font:inherit;color:inherit;display:flex;flex-wrap:nowrap;white-space:nowrap}.PamAccountBalanceModal .BalanceValue svg{width:16px;fill:var(--emw--color-black, #000000)}.PamAccountBalanceModal .BalanceValue span{padding-left:5px}.PamAccountBalanceModal .BalanceValue .TriangleActive,.PamAccountBalanceModal .BalanceValue .TriangleInactive{display:block;margin:0 3px;transition:all 0.2s}.PamAccountBalanceModal .BalanceValue .TriangleActive:hover,.PamAccountBalanceModal .BalanceValue .TriangleInactive:hover{transform:scale(1.2)}.PamAccountBalanceModal .BalanceValue .TriangleActive svg,.PamAccountBalanceModal .BalanceValue .TriangleInactive svg{margin:2px 0px}.PamAccountBalanceModal .BalanceValue .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px)}.PamAccountBalanceModal .BalanceValue .TriangleActive:hover{transform:scale(1.1) rotateX(180deg) translateY(3px)}@media only screen and (max-width: 360px){.PamAccountBalanceModal .BalanceValue{font-size:12px}.PamAccountBalanceModal .BalanceValue svg{width:12px}}.PamAccountBalanceModal .BalanceModalWrapper{background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);position:absolute;top:40px;padding:10px;transform:translateX(-45%);box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919;transition:all 0.2s ease-in}.PamAccountBalanceModal .BalanceModalWrapper:before{content:\"\";background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:50%;width:25px;height:10px;z-index:1}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;transition:all 0.3s ease;background:transparent;border:none;font:inherit}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModalClose:before{content:\"\";background:var(--emw--color-secondary, #FFFFFF);position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModalClose:after{content:\"\";background:var(--emw--color-secondary, #FFFFFF);position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModalClose:hover{transform:scale(1.1)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal{transition:all 0.2s ease-in;width:270px}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #FFFFFF))}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth:last-child{border-bottom:none}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, #FFFFFF));font-size:14px;text-transform:capitalize}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #FFFFFF))}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalFooter .BalanceModalAction{background:var(--emw--color-primary, #22B04E);font-size:12px;color:var(--emw--color-white, #FFFFFF);text-transform:uppercase;width:100%;border-radius:30px;border:none;padding:10px 0;cursor:pointer;transition:all 0.2s ease-in;box-shadow:0px 3px 7px 0px rgba(0, 0, 0, 0.2)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalFooter .BalanceModalAction:hover{background:rgba(255, 255, 255, 0.1);color:var(--emw--color-primary, #22B04E);box-shadow:0px 0px 0px 2px inset var(--emw--color-primary, #22B04E);font-size:14px}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalFooter .BalanceModalAction:active{background:rgba(255, 255, 255, 0.5)}.PamAccountBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16;opacity:0;transition:all 0.2s linear}.PamAccountBalanceModalOverlay.Open{opacity:1}";
|
1306
1306
|
const PamAccountBalanceModalStyle0 = pamAccountBalanceModalCss;
|
1307
1307
|
|
1308
1308
|
const PamAccountBalanceModal = class {
|
@@ -1708,7 +1708,7 @@ const PamAccountBalanceModal = class {
|
|
1708
1708
|
}
|
1709
1709
|
render() {
|
1710
1710
|
const balanceButton = (index.h("button", { class: "BalanceValue", onClick: () => this.toggleModal('open') }, index.h("p", null, this.balances['Total'].length > 0 ? this.formatBalance(this.balances['Total'][0].amount) : '0'), index.h("span", { class: " {isModalDisplayed ? 'TriangleActive' : 'TriangleInactive'}" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, index.h("path", { id: "arrow", d: "M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z", transform: "translate(-274.511 -441.088)", fill: "#d1d1d1" })))));
|
1711
|
-
const balanceModal = (index.h("div", { class:
|
1711
|
+
const balanceModal = (index.h("div", { class: "BalanceModalWrapper" }, index.h("button", { class: "BalanceModalClose", onClick: () => this.toggleModal('close') }), index.h("div", { class: "BalanceModal" }, index.h("div", { class: "ModalContent" }, index.h("div", { class: "BalanceModalHeader" }, index.h("p", { class: "BalanceModalTitle" }, translate('Title', this.language))), index.h("div", { class: "BalanceModalBody" }, Object.keys(this.balances).map((key) => {
|
1712
1712
|
return (index.h("div", { class: "BalanceModalRowBoth" }, this.balances[key].map((balance) => {
|
1713
1713
|
return (index.h("div", { class: "BalanceModalRowLine" }, index.h("p", { class: "BalanceModalText" }, translate(key, this.language), " ", balance.productType ? translate(balance.productType, this.language) : ''), index.h("p", { class: "BalanceModalValue" }, index.h("span", { class: "BalanceModalAmount" }, this.formatBalance(balance.amount)))));
|
1714
1714
|
})));
|
@@ -1716,7 +1716,7 @@ const PamAccountBalanceModal = class {
|
|
1716
1716
|
const skeleton = (index.h("div", { class: "LoadingSkeleton" }, index.h("ui-skeleton", { structure: "title", height: "20px", width: "auto" })));
|
1717
1717
|
return (index.h("div", { ref: (el) => (this.stylingContainer = el) }, index.h("div", { class: "PamAccountBalanceModal" }, this.isLoading
|
1718
1718
|
? skeleton
|
1719
|
-
: index.h("div", null, balanceButton, balanceModal)), this.isModalDisplayed && (index.h("button", { class: "PamAccountBalanceModalOverlay", onClick: () => this.toggleModal('close') }))));
|
1719
|
+
: index.h("div", null, balanceButton, this.isModalDisplayed ? balanceModal : null)), this.isModalDisplayed && (index.h("button", { class: "PamAccountBalanceModalOverlay", onClick: () => this.toggleModal('close') }))));
|
1720
1720
|
}
|
1721
1721
|
static get watchers() { return {
|
1722
1722
|
"clientStyling": ["handleClientStylingChange"],
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const pamAccountBalanceModal = require('./pam-account-balance-modal-
|
5
|
+
const pamAccountBalanceModal = require('./pam-account-balance-modal-7bad259c.js');
|
6
6
|
const index = require('./index-f01eba32.js');
|
7
7
|
|
8
8
|
const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";
|
@@ -81,7 +81,6 @@ p {
|
|
81
81
|
z-index: 17;
|
82
82
|
box-shadow: 0px 5px 20px 0px #191919;
|
83
83
|
transition: all 0.2s ease-in;
|
84
|
-
opacity: 0;
|
85
84
|
}
|
86
85
|
.PamAccountBalanceModal .BalanceModalWrapper:before {
|
87
86
|
content: "";
|
@@ -197,9 +196,6 @@ p {
|
|
197
196
|
.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalFooter .BalanceModalAction:active {
|
198
197
|
background: rgba(255, 255, 255, 0.5);
|
199
198
|
}
|
200
|
-
.PamAccountBalanceModal .BalanceModalWrapper.Open {
|
201
|
-
opacity: 1;
|
202
|
-
}
|
203
199
|
|
204
200
|
.PamAccountBalanceModalOverlay {
|
205
201
|
background-color: rgba(0, 0, 0, 0.7);
|
@@ -406,7 +406,7 @@ export class PamAccountBalanceModal {
|
|
406
406
|
}
|
407
407
|
render() {
|
408
408
|
const balanceButton = (h("button", { class: "BalanceValue", onClick: () => this.toggleModal('open') }, h("p", null, this.balances['Total'].length > 0 ? this.formatBalance(this.balances['Total'][0].amount) : '0'), h("span", { class: " {isModalDisplayed ? 'TriangleActive' : 'TriangleInactive'}" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, h("path", { id: "arrow", d: "M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z", transform: "translate(-274.511 -441.088)", fill: "#d1d1d1" })))));
|
409
|
-
const balanceModal = (h("div", { class:
|
409
|
+
const balanceModal = (h("div", { class: "BalanceModalWrapper" }, h("button", { class: "BalanceModalClose", onClick: () => this.toggleModal('close') }), h("div", { class: "BalanceModal" }, h("div", { class: "ModalContent" }, h("div", { class: "BalanceModalHeader" }, h("p", { class: "BalanceModalTitle" }, translate('Title', this.language))), h("div", { class: "BalanceModalBody" }, Object.keys(this.balances).map((key) => {
|
410
410
|
return (h("div", { class: "BalanceModalRowBoth" }, this.balances[key].map((balance) => {
|
411
411
|
return (h("div", { class: "BalanceModalRowLine" }, h("p", { class: "BalanceModalText" }, translate(key, this.language), " ", balance.productType ? translate(balance.productType, this.language) : ''), h("p", { class: "BalanceModalValue" }, h("span", { class: "BalanceModalAmount" }, this.formatBalance(balance.amount)))));
|
412
412
|
})));
|
@@ -414,7 +414,7 @@ export class PamAccountBalanceModal {
|
|
414
414
|
const skeleton = (h("div", { class: "LoadingSkeleton" }, h("ui-skeleton", { structure: "title", height: "20px", width: "auto" })));
|
415
415
|
return (h("div", { ref: (el) => (this.stylingContainer = el) }, h("div", { class: "PamAccountBalanceModal" }, this.isLoading
|
416
416
|
? skeleton
|
417
|
-
: h("div", null, balanceButton, balanceModal)), this.isModalDisplayed && (h("button", { class: "PamAccountBalanceModalOverlay", onClick: () => this.toggleModal('close') }))));
|
417
|
+
: h("div", null, balanceButton, this.isModalDisplayed ? balanceModal : null)), this.isModalDisplayed && (h("button", { class: "PamAccountBalanceModalOverlay", onClick: () => this.toggleModal('close') }))));
|
418
418
|
}
|
419
419
|
static get is() { return "pam-account-balance-modal"; }
|
420
420
|
static get encapsulation() { return "shadow"; }
|
package/dist/esm/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export { P as PamAccountBalanceModal } from './pam-account-balance-modal-
|
1
|
+
export { P as PamAccountBalanceModal } from './pam-account-balance-modal-0aed492c.js';
|
2
2
|
import './index-ee727666.js';
|
package/dist/esm/{pam-account-balance-modal-2ac4c5b6.js → pam-account-balance-modal-0aed492c.js}
RENAMED
@@ -1300,7 +1300,7 @@ const translate = (key, customLang, values) => {
|
|
1300
1300
|
return translation;
|
1301
1301
|
};
|
1302
1302
|
|
1303
|
-
const pamAccountBalanceModalCss = "*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.PamAccountBalanceModal{position:relative}.PamAccountBalanceModal .LoadingSkeleton{border-radius:10px;overflow:hidden;width:60px}.PamAccountBalanceModal .BalanceValue{font-size:14px;cursor:pointer;background:transparent;border:none;font:inherit;color:inherit;display:flex;flex-wrap:nowrap;white-space:nowrap}.PamAccountBalanceModal .BalanceValue svg{width:16px;fill:var(--emw--color-black, #000000)}.PamAccountBalanceModal .BalanceValue span{padding-left:5px}.PamAccountBalanceModal .BalanceValue .TriangleActive,.PamAccountBalanceModal .BalanceValue .TriangleInactive{display:block;margin:0 3px;transition:all 0.2s}.PamAccountBalanceModal .BalanceValue .TriangleActive:hover,.PamAccountBalanceModal .BalanceValue .TriangleInactive:hover{transform:scale(1.2)}.PamAccountBalanceModal .BalanceValue .TriangleActive svg,.PamAccountBalanceModal .BalanceValue .TriangleInactive svg{margin:2px 0px}.PamAccountBalanceModal .BalanceValue .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px)}.PamAccountBalanceModal .BalanceValue .TriangleActive:hover{transform:scale(1.1) rotateX(180deg) translateY(3px)}@media only screen and (max-width: 360px){.PamAccountBalanceModal .BalanceValue{font-size:12px}.PamAccountBalanceModal .BalanceValue svg{width:12px}}.PamAccountBalanceModal .BalanceModalWrapper{background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);position:absolute;top:40px;padding:10px;transform:translateX(-45%);box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919;transition:all 0.2s ease-in
|
1303
|
+
const pamAccountBalanceModalCss = "*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.PamAccountBalanceModal{position:relative}.PamAccountBalanceModal .LoadingSkeleton{border-radius:10px;overflow:hidden;width:60px}.PamAccountBalanceModal .BalanceValue{font-size:14px;cursor:pointer;background:transparent;border:none;font:inherit;color:inherit;display:flex;flex-wrap:nowrap;white-space:nowrap}.PamAccountBalanceModal .BalanceValue svg{width:16px;fill:var(--emw--color-black, #000000)}.PamAccountBalanceModal .BalanceValue span{padding-left:5px}.PamAccountBalanceModal .BalanceValue .TriangleActive,.PamAccountBalanceModal .BalanceValue .TriangleInactive{display:block;margin:0 3px;transition:all 0.2s}.PamAccountBalanceModal .BalanceValue .TriangleActive:hover,.PamAccountBalanceModal .BalanceValue .TriangleInactive:hover{transform:scale(1.2)}.PamAccountBalanceModal .BalanceValue .TriangleActive svg,.PamAccountBalanceModal .BalanceValue .TriangleInactive svg{margin:2px 0px}.PamAccountBalanceModal .BalanceValue .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px)}.PamAccountBalanceModal .BalanceValue .TriangleActive:hover{transform:scale(1.1) rotateX(180deg) translateY(3px)}@media only screen and (max-width: 360px){.PamAccountBalanceModal .BalanceValue{font-size:12px}.PamAccountBalanceModal .BalanceValue svg{width:12px}}.PamAccountBalanceModal .BalanceModalWrapper{background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);position:absolute;top:40px;padding:10px;transform:translateX(-45%);box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919;transition:all 0.2s ease-in}.PamAccountBalanceModal .BalanceModalWrapper:before{content:\"\";background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:50%;width:25px;height:10px;z-index:1}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;transition:all 0.3s ease;background:transparent;border:none;font:inherit}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModalClose:before{content:\"\";background:var(--emw--color-secondary, #FFFFFF);position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModalClose:after{content:\"\";background:var(--emw--color-secondary, #FFFFFF);position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModalClose:hover{transform:scale(1.1)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal{transition:all 0.2s ease-in;width:270px}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #FFFFFF))}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth:last-child{border-bottom:none}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, #FFFFFF));font-size:14px;text-transform:capitalize}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #FFFFFF))}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalFooter .BalanceModalAction{background:var(--emw--color-primary, #22B04E);font-size:12px;color:var(--emw--color-white, #FFFFFF);text-transform:uppercase;width:100%;border-radius:30px;border:none;padding:10px 0;cursor:pointer;transition:all 0.2s ease-in;box-shadow:0px 3px 7px 0px rgba(0, 0, 0, 0.2)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalFooter .BalanceModalAction:hover{background:rgba(255, 255, 255, 0.1);color:var(--emw--color-primary, #22B04E);box-shadow:0px 0px 0px 2px inset var(--emw--color-primary, #22B04E);font-size:14px}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalFooter .BalanceModalAction:active{background:rgba(255, 255, 255, 0.5)}.PamAccountBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16;opacity:0;transition:all 0.2s linear}.PamAccountBalanceModalOverlay.Open{opacity:1}";
|
1304
1304
|
const PamAccountBalanceModalStyle0 = pamAccountBalanceModalCss;
|
1305
1305
|
|
1306
1306
|
const PamAccountBalanceModal = class {
|
@@ -1706,7 +1706,7 @@ const PamAccountBalanceModal = class {
|
|
1706
1706
|
}
|
1707
1707
|
render() {
|
1708
1708
|
const balanceButton = (h("button", { class: "BalanceValue", onClick: () => this.toggleModal('open') }, h("p", null, this.balances['Total'].length > 0 ? this.formatBalance(this.balances['Total'][0].amount) : '0'), h("span", { class: " {isModalDisplayed ? 'TriangleActive' : 'TriangleInactive'}" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, h("path", { id: "arrow", d: "M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z", transform: "translate(-274.511 -441.088)", fill: "#d1d1d1" })))));
|
1709
|
-
const balanceModal = (h("div", { class:
|
1709
|
+
const balanceModal = (h("div", { class: "BalanceModalWrapper" }, h("button", { class: "BalanceModalClose", onClick: () => this.toggleModal('close') }), h("div", { class: "BalanceModal" }, h("div", { class: "ModalContent" }, h("div", { class: "BalanceModalHeader" }, h("p", { class: "BalanceModalTitle" }, translate('Title', this.language))), h("div", { class: "BalanceModalBody" }, Object.keys(this.balances).map((key) => {
|
1710
1710
|
return (h("div", { class: "BalanceModalRowBoth" }, this.balances[key].map((balance) => {
|
1711
1711
|
return (h("div", { class: "BalanceModalRowLine" }, h("p", { class: "BalanceModalText" }, translate(key, this.language), " ", balance.productType ? translate(balance.productType, this.language) : ''), h("p", { class: "BalanceModalValue" }, h("span", { class: "BalanceModalAmount" }, this.formatBalance(balance.amount)))));
|
1712
1712
|
})));
|
@@ -1714,7 +1714,7 @@ const PamAccountBalanceModal = class {
|
|
1714
1714
|
const skeleton = (h("div", { class: "LoadingSkeleton" }, h("ui-skeleton", { structure: "title", height: "20px", width: "auto" })));
|
1715
1715
|
return (h("div", { ref: (el) => (this.stylingContainer = el) }, h("div", { class: "PamAccountBalanceModal" }, this.isLoading
|
1716
1716
|
? skeleton
|
1717
|
-
: h("div", null, balanceButton, balanceModal)), this.isModalDisplayed && (h("button", { class: "PamAccountBalanceModalOverlay", onClick: () => this.toggleModal('close') }))));
|
1717
|
+
: h("div", null, balanceButton, this.isModalDisplayed ? balanceModal : null)), this.isModalDisplayed && (h("button", { class: "PamAccountBalanceModalOverlay", onClick: () => this.toggleModal('close') }))));
|
1718
1718
|
}
|
1719
1719
|
static get watchers() { return {
|
1720
1720
|
"clientStyling": ["handleClientStylingChange"],
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { P as pam_account_balance_modal } from './pam-account-balance-modal-
|
1
|
+
export { P as pam_account_balance_modal } from './pam-account-balance-modal-0aed492c.js';
|
2
2
|
import { r as registerInstance, h, H as Host } from './index-ee727666.js';
|
3
3
|
|
4
4
|
const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";
|
@@ -1 +1 @@
|
|
1
|
-
export{P as PamAccountBalanceModal}from"./p-
|
1
|
+
export{P as PamAccountBalanceModal}from"./p-6fd788e4.js";import"./p-86b371f2.js";
|
@@ -1 +1 @@
|
|
1
|
-
export{P as pam_account_balance_modal}from"./p-
|
1
|
+
export{P as pam_account_balance_modal}from"./p-6fd788e4.js";import{r as e,h as t,H as n}from"./p-86b371f2.js";const i=class{constructor(t){e(this,t),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Logo "+(this.animation?"Skeleton":"")}))}renderImage(){return t("div",{class:"Image "+(this.animation?"Skeleton":"")})}renderTitle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Title "+(this.animation?"Skeleton":"")}))}renderText(){return t("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,n)=>t("div",{key:n,class:"Text "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Rectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Circle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return t(n,{key:"e6b885bfd985ce7663d990756fe9101e25eb97f0"},t("style",{key:"06ae24c7bb74f4dacfc12ae58085333f9dc89da5"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};i.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{i as ui_skeleton}
|
@@ -4,4 +4,4 @@ import{r as t,h as a}from"./p-86b371f2.js";function e(t,a){if(t){const e=documen
|
|
4
4
|
* Available under MIT License (MIT)
|
5
5
|
* https://github.com/Yaffle/EventSource/
|
6
6
|
*/
|
7
|
-
i=r,l=r.exports,function(t){var a=t.setTimeout,e=t.clearTimeout,o=t.XMLHttpRequest,n=t.XDomainRequest,s=t.ActiveXObject,r=t.EventSource,c=t.document,d=t.Promise,u=t.fetch,h=t.Response,p=t.TextDecoder,f=t.TextEncoder,B=t.AbortController;if("undefined"==typeof window||void 0===c||"readyState"in c||null!=c.body||(c.readyState="loading",window.addEventListener("load",(function(){c.readyState="complete"}),!1)),null==o&&null!=s&&(o=function(){return new s("Microsoft.XMLHTTP")}),null==Object.create&&(Object.create=function(t){function a(){}return a.prototype=t,new a}),Date.now||(Date.now=function(){return(new Date).getTime()}),null==B){var m=u;u=function(t,a){var e=a.signal;return m(t,{headers:a.headers,credentials:a.credentials,cache:a.cache}).then((function(t){var a=t.body.getReader();return e._reader=a,e._aborted&&e._reader.cancel(),{status:t.status,statusText:t.statusText,headers:t.headers,body:{getReader:function(){return a}}}}))},B=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){null!=this.signal._reader&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function v(){this.bitsNeeded=0,this.codePoint=0}v.prototype.decode=function(t){function a(t,a,e){if(1===e)return t>=128>>a&&t<<a<=2047;if(2===e)return t>=2048>>a&&t<<a<=55295||t>=57344>>a&&t<<a<=65535;if(3===e)return t>=65536>>a&&t<<a<=1114111;throw new Error}function e(t,a){if(6===t)return a>>6>15?3:a>31?2:1;if(12===t)return a>15?3:2;if(18===t)return 3;throw new Error}for(var o=65533,n="",i=this.bitsNeeded,l=this.codePoint,s=0;s<t.length;s+=1){var r=t[s];0!==i&&(r<128||r>191||!a(l<<6|63&r,i-6,e(i,l)))&&(i=0,l=o,n+=String.fromCharCode(l)),0===i?(r>=0&&r<=127?(i=0,l=r):r>=192&&r<=223?(i=6,l=31&r):r>=224&&r<=239?(i=12,l=15&r):r>=240&&r<=247?(i=18,l=7&r):(i=0,l=o),0===i||a(l,i,e(i,l))||(i=0,l=o)):(i-=6,l=l<<6|63&r),0===i&&(l<=65535?n+=String.fromCharCode(l):(n+=String.fromCharCode(55296+(l-65535-1>>10)),n+=String.fromCharCode(56320+(l-65535-1&1023))))}return this.bitsNeeded=i,this.codePoint=l,n},null!=p&&null!=f&&function(){try{return"test"===(new p).decode((new f).encode("test"),{stream:!0})}catch(t){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+t)}return!1}()||(p=v);var w=function(){};function g(t){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=w,this.onload=w,this.onerror=w,this.onreadystatechange=w,this._contentType="",this._xhr=t,this._sendTimeout=0,this._abort=w}function M(t){return t.replace(/[A-Z]/g,(function(t){return String.fromCharCode(t.charCodeAt(0)+32)}))}function y(t){for(var a=Object.create(null),e=t.split("\r\n"),o=0;o<e.length;o+=1){var n=e[o].split(": "),i=n.shift(),l=n.join(": ");a[M(i)]=l}this._map=a}function b(){}function S(t){this._headers=t}function x(){}function C(){this._listeners=Object.create(null)}function T(t){a((function(){throw t}),0)}function A(t){this.type=t,this.target=void 0}function D(t,a){A.call(this,t),this.data=a.data,this.lastEventId=a.lastEventId}function R(t,a){A.call(this,t),this.status=a.status,this.statusText=a.statusText,this.headers=a.headers}function k(t,a){A.call(this,t),this.error=a.error}g.prototype.open=function(t,n){this._abort(!0);var i=this,l=this._xhr,s=1,r=0;this._abort=function(t){0!==i._sendTimeout&&(e(i._sendTimeout),i._sendTimeout=0),1!==s&&2!==s&&3!==s||(s=4,l.onload=w,l.onerror=w,l.onabort=w,l.onprogress=w,l.onreadystatechange=w,l.abort(),0!==r&&(e(r),r=0),t||(i.readyState=4,i.onabort(null),i.onreadystatechange())),s=0};var c=function(){if(1===s){var t=0,a="",e=void 0;if("contentType"in l)t=200,a="OK",e=l.contentType;else try{t=l.status,a=l.statusText,e=l.getResponseHeader("Content-Type")}catch(o){t=0,a="",e=void 0}0!==t&&(s=2,i.readyState=2,i.status=t,i.statusText=a,i._contentType=e,i.onreadystatechange())}},d=function(){if(c(),2===s||3===s){s=3;var t="";try{t=l.responseText}catch(t){}i.readyState=3,i.responseText=t,i.onprogress()}},u=function(t,a){if(null!=a&&null!=a.preventDefault||(a={preventDefault:w}),d(),1===s||2===s||3===s){if(s=4,0!==r&&(e(r),r=0),i.readyState=4,"load"===t)i.onload(a);else if("error"===t)i.onerror(a);else{if("abort"!==t)throw new TypeError;i.onabort(a)}i.onreadystatechange()}},h=function(){r=a((function(){h()}),500),3===l.readyState&&d()};"onload"in l&&(l.onload=function(t){u("load",t)}),"onerror"in l&&(l.onerror=function(t){u("error",t)}),"onabort"in l&&(l.onabort=function(t){u("abort",t)}),"onprogress"in l&&(l.onprogress=d),"onreadystatechange"in l&&(l.onreadystatechange=function(t){!function(t){null!=l&&(4===l.readyState?"onload"in l&&"onerror"in l&&"onabort"in l||u(""===l.responseText?"error":"load",t):3===l.readyState?"onprogress"in l||d():2===l.readyState&&c())}(t)}),!("contentType"in l)&&"ontimeout"in o.prototype||(n+=(-1===n.indexOf("?")?"?":"&")+"padding=true"),l.open(t,n,!0),"readyState"in l&&(r=a((function(){h()}),0))},g.prototype.abort=function(){this._abort(!1)},g.prototype.getResponseHeader=function(){return this._contentType},g.prototype.setRequestHeader=function(t,a){var e=this._xhr;"setRequestHeader"in e&&e.setRequestHeader(t,a)},g.prototype.getAllResponseHeaders=function(){return null!=this._xhr.getAllResponseHeaders&&this._xhr.getAllResponseHeaders()||""},g.prototype.send=function(){if("ontimeout"in o.prototype&&("sendAsBinary"in o.prototype||"mozAnon"in o.prototype)||null==c||null==c.readyState||"complete"===c.readyState){var t=this._xhr;"withCredentials"in t&&(t.withCredentials=this.withCredentials);try{t.send(void 0)}catch(t){throw t}}else{var e=this;e._sendTimeout=a((function(){e._sendTimeout=0,e.send()}),4)}},y.prototype.get=function(t){return this._map[M(t)]},null!=o&&null==o.HEADERS_RECEIVED&&(o.HEADERS_RECEIVED=2),b.prototype.open=function(t,a,e,n,i,l,s){t.open("GET",i);var r=0;for(var c in t.onprogress=function(){var a=t.responseText.slice(r);r+=a.length,e(a)},t.onerror=function(t){t.preventDefault(),n(new Error("NetworkError"))},t.onload=function(){n(null)},t.onabort=function(){n(null)},t.onreadystatechange=function(){if(t.readyState===o.HEADERS_RECEIVED){var e=t.status,n=t.statusText,i=t.getResponseHeader("Content-Type"),l=t.getAllResponseHeaders();a(e,n,i,new y(l))}},t.withCredentials=l,s)Object.prototype.hasOwnProperty.call(s,c)&&t.setRequestHeader(c,s[c]);return t.send(),t},S.prototype.get=function(t){return this._headers.get(t)},x.prototype.open=function(t,a,e,o,n,i,l){var s=null,r=new B,c=r.signal,h=new p;return u(n,{headers:l,credentials:i?"include":"same-origin",signal:c,cache:"no-store"}).then((function(t){return s=t.body.getReader(),a(t.status,t.statusText,t.headers.get("Content-Type"),new S(t.headers)),new d((function(t,a){var o=function(){s.read().then((function(a){if(a.done)t(void 0);else{var n=h.decode(a.value,{stream:!0});e(n),o()}})).catch((function(t){a(t)}))};o()}))})).catch((function(t){return"AbortError"===t.name?void 0:t})).then((function(t){o(t)})),{abort:function(){null!=s&&s.cancel(),r.abort()}}},C.prototype.dispatchEvent=function(t){t.target=this;var a=this._listeners[t.type];if(null!=a)for(var e=a.length,o=0;o<e;o+=1){var n=a[o];try{"function"==typeof n.handleEvent?n.handleEvent(t):n.call(this,t)}catch(t){T(t)}}},C.prototype.addEventListener=function(t,a){t=String(t);var e=this._listeners,o=e[t];null==o&&(e[t]=o=[]);for(var n=!1,i=0;i<o.length;i+=1)o[i]===a&&(n=!0);n||o.push(a)},C.prototype.removeEventListener=function(t,a){t=String(t);var e=this._listeners,o=e[t];if(null!=o){for(var n=[],i=0;i<o.length;i+=1)o[i]!==a&&n.push(o[i]);0===n.length?delete e[t]:e[t]=n}},D.prototype=Object.create(A.prototype),R.prototype=Object.create(A.prototype),k.prototype=Object.create(A.prototype);var F=/^text\/event\-stream(;.*)?$/i,P=function(t,a){var e=null==t?a:parseInt(t,10);return e!=e&&(e=a),O(e)},O=function(t){return Math.min(Math.max(t,1e3),18e6)},z=function(t,a,e){try{"function"==typeof a&&a.call(t,e)}catch(t){T(t)}};function E(t,i){C.call(this),i=i||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,function(t,i,l){i=String(i);var s=Boolean(l.withCredentials),r=l.lastEventIdQueryParameterName||"lastEventId",c=O(1e3),d=P(l.heartbeatTimeout,45e3),u="",h=c,p=!1,f=0,B=l.headers||{},m=l.Transport,v=W&&null==m?void 0:new g(null!=m?new m:null!=o&&"withCredentials"in o.prototype||null==n?new o:new n),w=null!=m&&"string"!=typeof m?new m:null==v?new x:new b,M=void 0,y=0,S=-1,C="",T="",A="",E="",j=0,V=0,N=0,L=function(a,e,o,n){if(0===S)if(200===a&&null!=o&&F.test(o)){S=1,p=Date.now(),h=c,t.readyState=1;var i=new R("open",{status:a,statusText:e,headers:n});t.dispatchEvent(i),z(t,t.onopen,i)}else{var l="";200!==a?(e&&(e=e.replace(/\s+/g," ")),l="EventSource's response has a status "+a+" "+e+" that is not 200. Aborting the connection."):l="EventSource's response has a Content-Type specifying an unsupported type: "+(null==o?"-":o.replace(/\s+/g," "))+". Aborting the connection.",K(),i=new R("error",{status:a,statusText:e,headers:n}),t.dispatchEvent(i),z(t,t.onerror,i),console.error(l)}},U=function(o){if(1===S){for(var n=-1,i=0;i<o.length;i+=1)(r=o.charCodeAt(i))!=="\n".charCodeAt(0)&&r!=="\r".charCodeAt(0)||(n=i);var l=(-1!==n?E:"")+o.slice(0,n+1);E=(-1===n?E:"")+o.slice(n+1),""!==o&&(p=Date.now(),f+=o.length);for(var s=0;s<l.length;s+=1){var r=l.charCodeAt(s);if(-1===j&&r==="\n".charCodeAt(0))j=0;else if(-1===j&&(j=0),r==="\r".charCodeAt(0)||r==="\n".charCodeAt(0)){if(0!==j){1===j&&(N=s+1);var B=l.slice(V,N-1),m=l.slice(N+(N<s&&l.charCodeAt(N)===" ".charCodeAt(0)?1:0),s);"data"===B?(C+="\n",C+=m):"id"===B?T=m:"event"===B?A=m:"retry"===B?(c=P(m,c),h=c):"heartbeatTimeout"===B&&(d=P(m,d),0!==y&&(e(y),y=a((function(){G()}),d)))}if(0===j){if(""!==C){u=T,""===A&&(A="message");var v=new D(A,{data:C.slice(1),lastEventId:T});if(t.dispatchEvent(v),"open"===A?z(t,t.onopen,v):"message"===A?z(t,t.onmessage,v):"error"===A&&z(t,t.onerror,v),2===S)return}C="",A=""}j=r==="\r".charCodeAt(0)?-1:0}else 0===j&&(V=s,j=1),1===j?r===":".charCodeAt(0)&&(N=s+1,j=2):2===j&&(j=3)}}},I=function(o){if(1===S||0===S){S=-1,0!==y&&(e(y),y=0),y=a((function(){G()}),h),h=O(Math.min(16*c,2*h)),t.readyState=0;var n=new k("error",{error:o});t.dispatchEvent(n),z(t,t.onerror,n),null!=o&&console.error(o)}},K=function(){S=2,null!=M&&(M.abort(),M=void 0),0!==y&&(e(y),y=0),t.readyState=2},G=function(){if(y=0,-1===S){p=!1,f=0,y=a((function(){G()}),d),S=0,C="",A="",T=u,E="",V=0,N=0,j=0;var e=i;if("data:"!==i.slice(0,5)&&"blob:"!==i.slice(0,5)&&""!==u){var o=i.indexOf("?");e=-1===o?i:i.slice(0,o+1)+i.slice(o+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,(function(t,a){return a===r?"":t})),e+=(-1===i.indexOf("?")?"?":"&")+r+"="+encodeURIComponent(u)}var n=t.withCredentials,l={Accept:"text/event-stream"},s=t.headers;if(null!=s)for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(l[c]=s[c]);try{M=w.open(v,L,U,I,e,n,l)}catch(t){throw K(),t}}else if(p||null==M){var h=Math.max((p||Date.now())+d-Date.now(),1);p=!1,y=a((function(){G()}),h)}else I(new Error("No activity within "+d+" milliseconds. "+(0===S?"No response received.":f+" chars received.")+" Reconnecting.")),null!=M&&(M.abort(),M=void 0)};t.url=i,t.readyState=0,t.withCredentials=s,t.headers=B,t._close=K,G()}(this,t,i)}var W=null!=u&&null!=h&&"body"in h.prototype;(E.prototype=Object.create(C.prototype)).CONNECTING=0,E.prototype.OPEN=1,E.prototype.CLOSED=2,E.prototype.close=function(){this._close()},E.CONNECTING=0,E.OPEN=1,E.CLOSED=2,E.prototype.withCredentials=void 0;var j,V=r;null==o||null!=r&&"withCredentials"in r.prototype||(V=E),j=function(t){t.EventSourcePolyfill=E,t.NativeEventSource=r,t.EventSource=V}(l),void 0!==j&&(i.exports=j)}("undefined"==typeof globalThis?"undefined"!=typeof window?window:"undefined"!=typeof self?self:s:globalThis);const c={en:{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit"},"zh-hk":{Title:"您的結餘",Total:"總結餘",Real:"現金結餘",Bonus:"紅利結餘",Credit:"信用結餘",Casino:"賭場",Sports:"體育",DepositButton:"存款"},de:{Title:"Ihr Guthaben",Total:"Gesamtguthaben",Real:"Barguthaben",Bonus:"Bonusguthaben",Credit:"Kreditguthaben",Casino:"Casino",Sports:"Sport",DepositButton:"Einzahlen"},it:{Title:"Il tuo saldo",Total:"Saldo totale",Real:"Saldo in contanti",Bonus:"Saldo bonus",Credit:"Saldo di credito",Casino:"Casinò",Sports:"Sport",DepositButton:"Deposita"},fr:{Title:"Votre solde",Total:"Solde total",Real:"Solde en espèces",Bonus:"Solde bonus",Credit:"Solde de crédit",Casino:"Casino",Sports:"Sports",DepositButton:"Dépôt"},es:{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito"},tr:{Title:"Bakiyeniz",Total:"Toplam Bakiye",Real:"Nakit Bakiye",Bonus:"Bonus Bakiyesi",Credit:"Kredi Bakiyesi",Casino:"Kumarhane",Sports:"Spor",DepositButton:"Yatır"},ru:{Title:"Ваш баланс",Total:"Общий баланс",Real:"Денежный баланс",Bonus:"Бонусный баланс",Credit:"Кредитный баланс",Casino:"Казино",Sports:"Спорт",DepositButton:"Депозит"},ro:{Title:"Soldul tău",Total:"Sold total",Real:"Sold în numerar",Bonus:"Sold bonus",Credit:"Sold credit",Casino:"Cazinou",Sports:"Sporturi",DepositButton:"Depozit"},hr:{Title:"Vaš saldo",Total:"Ukupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Casino",Sports:"Sportovi",DepositButton:"Depozit"},hu:{Title:"Az egyenleged",Total:"Teljes egyenleg",Real:"Készpénz egyenleg",Bonus:"Bónusz egyenleg",Credit:"Hitel egyenleg",Casino:"Kaszinó",Sports:"Sport",DepositButton:"Befizetés"},pl:{Title:"Twoje saldo",Total:"Całkowite saldo",Real:"Saldo gotówkowe",Bonus:"Saldo bonusowe",Credit:"Saldo kredytowe",Casino:"Kasyno",Sports:"Sport",DepositButton:"Wpłać"},pt:{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar"},sl:{Title:"Vaš saldo",Total:"Skupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Šport",DepositButton:"Depozit"},sr:{Title:"Vaš saldo",Total:"Ukupan saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Sport",DepositButton:"Depozit"},"pt-br":{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar"},"es-mx":{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito"},"en-us":{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit"}},d=(t,a,e)=>{let o=c[c[a]?a:"en"][t];if(void 0!==e)for(const[t,a]of Object.entries(e.values)){const e=new RegExp(`{${t}}`,"g");o=o.replace(e,a)}return o},u=class{constructor(a){t(this,a),this.totalCalculationModes=["totalCashAmount","totalRealAmount"],this.formatBalance=t=>{if(this.customDisplayFormat)return this.formatFromCustom(t);const a=this.currencyLocale||this.language,e={style:"currency",currency:this.currency,useGrouping:!0,currencyDisplay:this.currencyDisplay||"code",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(a,e).format(t)},this.formatFromCustom=t=>{const a=[];let e="";for(const o of this.customDisplayFormat)switch(o){default:e+=o;break;case"{":e&&a.push(e),e="";break;case"}":const[n,i]=e.split("|");if(e="","currency"===n.toLowerCase())e=this.currency;else if("amount"===n.toLowerCase()){let a=",",o=".",n=2;i&&(" "!==i[0]&&(a=i[0])," "!==i[1]&&(o=i[1])," "!==i[2]&&!isNaN(Number(i[2]))&&(n=Number(i[2])));let[l,s]=String(Math.floor(t*10**n)/10**n).split(".");e+=l[0];for(let t=1;t<l.length;++t)e+=(l.length-t)%3==0?a+l[t]:l[t];s&&(e+=o+s)}e&&a.push(e),e=""}return a.push(e),a.join("")},this.getBalances=()=>{this.isLoading=!0;const t=new URL(`/v2/player/${this.userId}/balance/`,this.endpoint),a=new Headers;a.append("X-SessionID",this.session);const e={method:"GET",headers:a};return new Promise((a=>fetch(t,e).then((t=>t.json())).then((t=>a(t))).catch((t=>{throw console.log("Balance fetch error",t),new Error("Failed to fetch balance data!")})).finally((()=>this.isLoading=!1))))},this.subscribeToBalanceUpdates=()=>{if(this.currentStream&&this.currentStream.close(),this.session.length<1)return;const t=new URL(`/v2/player/${this.userId}/information/updates/`,this.endpoint),a=new r.exports.EventSourcePolyfill(t,{headers:{accept:"text/event-stream","X-SessionId":this.session}});this.currentStream=a,a.addEventListener("message",this.updateBalances)},this.parseData=t=>{let a;try{a=JSON.parse(t)}catch(t){return void console.log("Balance stream failed: ",t)}return a},this.updateRealAmount=(t,a,e)=>{let o=null;switch(e.walletAccountType){case"Ordinary":e.afterAmount===e.affectedAmount&&0!==a.lastOrdinaryAfterAmount||(a.lastOrdinaryAfterAmount=e.afterAmount,a.showCreditLineAfterAmount||(o=e.afterAmount));break;case"CreditLine":0!==e.afterAmount?(o=e.afterAmount,a.showCreditLineAfterAmount=!0):(o=a.lastOrdinaryAfterAmount,a.showCreditLineAfterAmount=!1);break;default:o=e.afterAmount}return null===o?t:o},this.updateTotalAmount=()=>{switch(this.totalCalculationMode){case"totalCashAmount":let t=0;for(const a of["Real","Bonus"])for(const e of this.balances[a])t+=Math.max(e.amount,0);this.balances.Total[0].amount=t;break;case"totalRealAmount":if(!this.isSplitWallet)return;let a=0;for(const t of this.balances.Real)a+=t.amount;this.balances.Total[0].amount=a}},this.updateBalances=t=>{const a=this.parseData(t.data);if(!a)return void this.subscribeToBalanceUpdates();if("BALANCE_UPDATE_V2"!==a.type)return;const e=a.body.balanceChange;for(const[t,a]of Object.entries(e))if("totalRealAmount"!==this.totalCalculationMode||"Real"!==t||this.isSplitWallet||(this.balances.Total[0].amount=this.updateRealAmount(this.balances.Total[0].amount,this.updateRealAmountState,a)),this.balances[t])for(const e of this.balances[t])this.isSplitWallet?a.productType===e.productType&&(e.amount="Real"===t?this.updateRealAmount(e.amount,this.updateRealAmountState[e.productType],a):a.afterAmount):e.amount="Real"===t?this.updateRealAmount(e.amount,this.updateRealAmountState,a):a.afterAmount;this.updateTotalAmount(),this.balances=Object.assign({},this.balances)},this.balanceModalOpenDeposit=()=>{this.toggleModal("close"),window.postMessage({type:"GoToDeposit"},window.location.href),"function"==typeof gtag&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},this.validateTotalCalculationMode=()=>{this.totalCalculationModes.includes(this.totalCalculationMode)||(console.error(`Unsupported value ('${this.totalCalculationMode}') for totalcalculationmode parameter. Only the following values are supported ${this.totalCalculationModes}. Using default value ('${this.totalCalculationModes[0]}').`),this.totalCalculationMode=this.totalCalculationModes[0])},this.messageHandler=t=>t.data&&"LogoutSuccessfull"===t.data.type&&this.currentStream.close(),this.updateBalanceStyling=()=>{window.postMessage({type:"UpdateBalanceBackground"},window.location.href)},this.toggleModal=t=>{switch(t){case"open":window.postMessage({type:"BalanceModalStatus",status:"open"},window.location.href),this.isModalDisplayed=!0;break;case"close":window.postMessage({type:"BalanceModalStatus",status:"close"},window.location.href),this.isModalDisplayed=!1}},this.userId="",this.session="",this.endpoint="",this.mbSource="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.language="en",this.displayBalanceOption="All",this.totalCalculationMode="totalCashAmount",this.currencyLocale="en",this.currencyDisplay="code",this.maximumFractionDigits="2",this.minimumFractionDigits="0",this.customDisplayFormat="",this.isLoading=!0,this.isModalDisplayed=!1,this.isSplitWallet=!1,this.currentStream=void 0,this.currency=void 0,this.updateRealAmountState=void 0,this.balances={Total:[],Real:[],Bonus:[],Credit:[]}}handleClientStylingChange(t,a){t!=a&&e(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,a){t!=a&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,a){t!=a&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this.validateTotalCalculationMode(),this.getBalances().then((t=>this.setBalances(t))),this.subscribeToBalanceUpdates()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&e(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}setBalances(t){t[this.totalCalculationMode]||(this.totalCalculationMode=this.totalCalculationModes[0]),this.balances.Total.push({amount:0,productType:""});const a=t.items.find((t=>"Real"===t.type&&"Ordinary"===t.walletAccountType));this.currency=a.currency,this.isSplitWallet=Boolean(a.productType),this.isSplitWallet?this.setBalancesWhenSplitWallet(t):this.setBalancesWhenSingleWallet(t)}setBalancesWhenSingleWallet(t){this.updateRealAmountState={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},this.balances.Total[0].amount=t[this.totalCalculationMode][this.currency];for(const a of t.items)switch(a.type){case"Bonus":0===this.balances.Bonus.length?this.balances.Bonus.push({amount:a.amount,productType:""}):this.balances.Bonus[0].amount+=a.amount;break;case"Real":if(a.creditLine&&0===this.balances.Credit.length&&this.balances.Credit.push({amount:a.creditLine,productType:""}),"totalRealAmount"===this.totalCalculationMode)continue;0===this.balances.Real.length?this.balances.Real.push({amount:a.amount,productType:""}):this.balances.Real[0].amount+=a.amount}for(const[t,a]of Object.entries(this.balances))a.length<1&&delete this.balances[t]}setBalancesWhenSplitWallet(t){this.updateRealAmountState={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let a=t.items;this.displayBalanceOption&&"All"!==this.displayBalanceOption&&(a=t.items.filter((t=>t.productType===this.displayBalanceOption)));for(const t of a){let a;switch(t.type){case"Bonus":a=this.balances.Bonus.findIndex((a=>a.productType===t.productType)),a>0?this.balances.Bonus[a].amount+=t.amount:this.balances.Bonus.push({amount:t.amount,productType:t.productType});break;case"Real":t.creditLine&&this.balances.Credit.push({amount:t.creditLine,productType:t.productType}),a=this.balances.Real.findIndex((a=>a.productType===t.productType)),a>0?this.balances.Real[a].amount+=t.amount:this.balances.Real.push({amount:t.amount,productType:t.productType})}}this.updateTotalAmount();for(const[t,a]of Object.entries(this.balances))a.length<1&&delete this.balances[t]}render(){const t=a("button",{class:"BalanceValue",onClick:()=>this.toggleModal("open")},a("p",null,this.balances.Total.length>0?this.formatBalance(this.balances.Total[0].amount):"0"),a("span",{class:" {isModalDisplayed ? 'TriangleActive' : 'TriangleInactive'}"},a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"6.835",viewBox:"0 0 14 6.835"},a("path",{id:"arrow",d:"M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z",transform:"translate(-274.511 -441.088)",fill:"#d1d1d1"})))),e=a("div",{class:this.isModalDisplayed?"BalanceModalWrapper Open":"BalanceModalWrapper"},a("button",{class:"BalanceModalClose",onClick:()=>this.toggleModal("close")}),a("div",{class:"BalanceModal"},a("div",{class:"ModalContent"},a("div",{class:"BalanceModalHeader"},a("p",{class:"BalanceModalTitle"},d("Title",this.language))),a("div",{class:"BalanceModalBody"},Object.keys(this.balances).map((t=>a("div",{class:"BalanceModalRowBoth"},this.balances[t].map((e=>a("div",{class:"BalanceModalRowLine"},a("p",{class:"BalanceModalText"},d(t,this.language)," ",e.productType?d(e.productType,this.language):""),a("p",{class:"BalanceModalValue"},a("span",{class:"BalanceModalAmount"},this.formatBalance(e.amount)))))))))),a("div",{class:"BalanceModalFooter"},a("button",{class:"BalanceModalAction",onClick:()=>this.balanceModalOpenDeposit()},d("DepositButton",this.language)))))),o=a("div",{class:"LoadingSkeleton"},a("ui-skeleton",{structure:"title",height:"20px",width:"auto"}));return a("div",{ref:t=>this.stylingContainer=t},a("div",{class:"PamAccountBalanceModal"},this.isLoading?o:a("div",null,t,e)),this.isModalDisplayed&&a("button",{class:"PamAccountBalanceModalOverlay",onClick:()=>this.toggleModal("close")}))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};u.style='*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.PamAccountBalanceModal{position:relative}.PamAccountBalanceModal .LoadingSkeleton{border-radius:10px;overflow:hidden;width:60px}.PamAccountBalanceModal .BalanceValue{font-size:14px;cursor:pointer;background:transparent;border:none;font:inherit;color:inherit;display:flex;flex-wrap:nowrap;white-space:nowrap}.PamAccountBalanceModal .BalanceValue svg{width:16px;fill:var(--emw--color-black, #000000)}.PamAccountBalanceModal .BalanceValue span{padding-left:5px}.PamAccountBalanceModal .BalanceValue .TriangleActive,.PamAccountBalanceModal .BalanceValue .TriangleInactive{display:block;margin:0 3px;transition:all 0.2s}.PamAccountBalanceModal .BalanceValue .TriangleActive:hover,.PamAccountBalanceModal .BalanceValue .TriangleInactive:hover{transform:scale(1.2)}.PamAccountBalanceModal .BalanceValue .TriangleActive svg,.PamAccountBalanceModal .BalanceValue .TriangleInactive svg{margin:2px 0px}.PamAccountBalanceModal .BalanceValue .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px)}.PamAccountBalanceModal .BalanceValue .TriangleActive:hover{transform:scale(1.1) rotateX(180deg) translateY(3px)}@media only screen and (max-width: 360px){.PamAccountBalanceModal .BalanceValue{font-size:12px}.PamAccountBalanceModal .BalanceValue svg{width:12px}}.PamAccountBalanceModal .BalanceModalWrapper{background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);position:absolute;top:40px;padding:10px;transform:translateX(-45%);box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919;transition:all 0.2s ease-in;opacity:0}.PamAccountBalanceModal .BalanceModalWrapper:before{content:"";background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:50%;width:25px;height:10px;z-index:1}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;transition:all 0.3s ease;background:transparent;border:none;font:inherit}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModalClose:before{content:"";background:var(--emw--color-secondary, #FFFFFF);position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModalClose:after{content:"";background:var(--emw--color-secondary, #FFFFFF);position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModalClose:hover{transform:scale(1.1)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal{transition:all 0.2s ease-in;width:270px}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #FFFFFF))}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth:last-child{border-bottom:none}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, #FFFFFF));font-size:14px;text-transform:capitalize}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #FFFFFF))}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalFooter .BalanceModalAction{background:var(--emw--color-primary, #22B04E);font-size:12px;color:var(--emw--color-white, #FFFFFF);text-transform:uppercase;width:100%;border-radius:30px;border:none;padding:10px 0;cursor:pointer;transition:all 0.2s ease-in;box-shadow:0px 3px 7px 0px rgba(0, 0, 0, 0.2)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalFooter .BalanceModalAction:hover{background:rgba(255, 255, 255, 0.1);color:var(--emw--color-primary, #22B04E);box-shadow:0px 0px 0px 2px inset var(--emw--color-primary, #22B04E);font-size:14px}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalFooter .BalanceModalAction:active{background:rgba(255, 255, 255, 0.5)}.PamAccountBalanceModal .BalanceModalWrapper.Open{opacity:1}.PamAccountBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16;opacity:0;transition:all 0.2s linear}.PamAccountBalanceModalOverlay.Open{opacity:1}';export{u as P}
|
7
|
+
i=r,l=r.exports,function(t){var a=t.setTimeout,e=t.clearTimeout,o=t.XMLHttpRequest,n=t.XDomainRequest,s=t.ActiveXObject,r=t.EventSource,c=t.document,d=t.Promise,u=t.fetch,h=t.Response,p=t.TextDecoder,f=t.TextEncoder,B=t.AbortController;if("undefined"==typeof window||void 0===c||"readyState"in c||null!=c.body||(c.readyState="loading",window.addEventListener("load",(function(){c.readyState="complete"}),!1)),null==o&&null!=s&&(o=function(){return new s("Microsoft.XMLHTTP")}),null==Object.create&&(Object.create=function(t){function a(){}return a.prototype=t,new a}),Date.now||(Date.now=function(){return(new Date).getTime()}),null==B){var m=u;u=function(t,a){var e=a.signal;return m(t,{headers:a.headers,credentials:a.credentials,cache:a.cache}).then((function(t){var a=t.body.getReader();return e._reader=a,e._aborted&&e._reader.cancel(),{status:t.status,statusText:t.statusText,headers:t.headers,body:{getReader:function(){return a}}}}))},B=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){null!=this.signal._reader&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function v(){this.bitsNeeded=0,this.codePoint=0}v.prototype.decode=function(t){function a(t,a,e){if(1===e)return t>=128>>a&&t<<a<=2047;if(2===e)return t>=2048>>a&&t<<a<=55295||t>=57344>>a&&t<<a<=65535;if(3===e)return t>=65536>>a&&t<<a<=1114111;throw new Error}function e(t,a){if(6===t)return a>>6>15?3:a>31?2:1;if(12===t)return a>15?3:2;if(18===t)return 3;throw new Error}for(var o=65533,n="",i=this.bitsNeeded,l=this.codePoint,s=0;s<t.length;s+=1){var r=t[s];0!==i&&(r<128||r>191||!a(l<<6|63&r,i-6,e(i,l)))&&(i=0,l=o,n+=String.fromCharCode(l)),0===i?(r>=0&&r<=127?(i=0,l=r):r>=192&&r<=223?(i=6,l=31&r):r>=224&&r<=239?(i=12,l=15&r):r>=240&&r<=247?(i=18,l=7&r):(i=0,l=o),0===i||a(l,i,e(i,l))||(i=0,l=o)):(i-=6,l=l<<6|63&r),0===i&&(l<=65535?n+=String.fromCharCode(l):(n+=String.fromCharCode(55296+(l-65535-1>>10)),n+=String.fromCharCode(56320+(l-65535-1&1023))))}return this.bitsNeeded=i,this.codePoint=l,n},null!=p&&null!=f&&function(){try{return"test"===(new p).decode((new f).encode("test"),{stream:!0})}catch(t){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+t)}return!1}()||(p=v);var w=function(){};function g(t){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=w,this.onload=w,this.onerror=w,this.onreadystatechange=w,this._contentType="",this._xhr=t,this._sendTimeout=0,this._abort=w}function M(t){return t.replace(/[A-Z]/g,(function(t){return String.fromCharCode(t.charCodeAt(0)+32)}))}function y(t){for(var a=Object.create(null),e=t.split("\r\n"),o=0;o<e.length;o+=1){var n=e[o].split(": "),i=n.shift(),l=n.join(": ");a[M(i)]=l}this._map=a}function b(){}function S(t){this._headers=t}function x(){}function C(){this._listeners=Object.create(null)}function T(t){a((function(){throw t}),0)}function A(t){this.type=t,this.target=void 0}function D(t,a){A.call(this,t),this.data=a.data,this.lastEventId=a.lastEventId}function R(t,a){A.call(this,t),this.status=a.status,this.statusText=a.statusText,this.headers=a.headers}function k(t,a){A.call(this,t),this.error=a.error}g.prototype.open=function(t,n){this._abort(!0);var i=this,l=this._xhr,s=1,r=0;this._abort=function(t){0!==i._sendTimeout&&(e(i._sendTimeout),i._sendTimeout=0),1!==s&&2!==s&&3!==s||(s=4,l.onload=w,l.onerror=w,l.onabort=w,l.onprogress=w,l.onreadystatechange=w,l.abort(),0!==r&&(e(r),r=0),t||(i.readyState=4,i.onabort(null),i.onreadystatechange())),s=0};var c=function(){if(1===s){var t=0,a="",e=void 0;if("contentType"in l)t=200,a="OK",e=l.contentType;else try{t=l.status,a=l.statusText,e=l.getResponseHeader("Content-Type")}catch(o){t=0,a="",e=void 0}0!==t&&(s=2,i.readyState=2,i.status=t,i.statusText=a,i._contentType=e,i.onreadystatechange())}},d=function(){if(c(),2===s||3===s){s=3;var t="";try{t=l.responseText}catch(t){}i.readyState=3,i.responseText=t,i.onprogress()}},u=function(t,a){if(null!=a&&null!=a.preventDefault||(a={preventDefault:w}),d(),1===s||2===s||3===s){if(s=4,0!==r&&(e(r),r=0),i.readyState=4,"load"===t)i.onload(a);else if("error"===t)i.onerror(a);else{if("abort"!==t)throw new TypeError;i.onabort(a)}i.onreadystatechange()}},h=function(){r=a((function(){h()}),500),3===l.readyState&&d()};"onload"in l&&(l.onload=function(t){u("load",t)}),"onerror"in l&&(l.onerror=function(t){u("error",t)}),"onabort"in l&&(l.onabort=function(t){u("abort",t)}),"onprogress"in l&&(l.onprogress=d),"onreadystatechange"in l&&(l.onreadystatechange=function(t){!function(t){null!=l&&(4===l.readyState?"onload"in l&&"onerror"in l&&"onabort"in l||u(""===l.responseText?"error":"load",t):3===l.readyState?"onprogress"in l||d():2===l.readyState&&c())}(t)}),!("contentType"in l)&&"ontimeout"in o.prototype||(n+=(-1===n.indexOf("?")?"?":"&")+"padding=true"),l.open(t,n,!0),"readyState"in l&&(r=a((function(){h()}),0))},g.prototype.abort=function(){this._abort(!1)},g.prototype.getResponseHeader=function(){return this._contentType},g.prototype.setRequestHeader=function(t,a){var e=this._xhr;"setRequestHeader"in e&&e.setRequestHeader(t,a)},g.prototype.getAllResponseHeaders=function(){return null!=this._xhr.getAllResponseHeaders&&this._xhr.getAllResponseHeaders()||""},g.prototype.send=function(){if("ontimeout"in o.prototype&&("sendAsBinary"in o.prototype||"mozAnon"in o.prototype)||null==c||null==c.readyState||"complete"===c.readyState){var t=this._xhr;"withCredentials"in t&&(t.withCredentials=this.withCredentials);try{t.send(void 0)}catch(t){throw t}}else{var e=this;e._sendTimeout=a((function(){e._sendTimeout=0,e.send()}),4)}},y.prototype.get=function(t){return this._map[M(t)]},null!=o&&null==o.HEADERS_RECEIVED&&(o.HEADERS_RECEIVED=2),b.prototype.open=function(t,a,e,n,i,l,s){t.open("GET",i);var r=0;for(var c in t.onprogress=function(){var a=t.responseText.slice(r);r+=a.length,e(a)},t.onerror=function(t){t.preventDefault(),n(new Error("NetworkError"))},t.onload=function(){n(null)},t.onabort=function(){n(null)},t.onreadystatechange=function(){if(t.readyState===o.HEADERS_RECEIVED){var e=t.status,n=t.statusText,i=t.getResponseHeader("Content-Type"),l=t.getAllResponseHeaders();a(e,n,i,new y(l))}},t.withCredentials=l,s)Object.prototype.hasOwnProperty.call(s,c)&&t.setRequestHeader(c,s[c]);return t.send(),t},S.prototype.get=function(t){return this._headers.get(t)},x.prototype.open=function(t,a,e,o,n,i,l){var s=null,r=new B,c=r.signal,h=new p;return u(n,{headers:l,credentials:i?"include":"same-origin",signal:c,cache:"no-store"}).then((function(t){return s=t.body.getReader(),a(t.status,t.statusText,t.headers.get("Content-Type"),new S(t.headers)),new d((function(t,a){var o=function(){s.read().then((function(a){if(a.done)t(void 0);else{var n=h.decode(a.value,{stream:!0});e(n),o()}})).catch((function(t){a(t)}))};o()}))})).catch((function(t){return"AbortError"===t.name?void 0:t})).then((function(t){o(t)})),{abort:function(){null!=s&&s.cancel(),r.abort()}}},C.prototype.dispatchEvent=function(t){t.target=this;var a=this._listeners[t.type];if(null!=a)for(var e=a.length,o=0;o<e;o+=1){var n=a[o];try{"function"==typeof n.handleEvent?n.handleEvent(t):n.call(this,t)}catch(t){T(t)}}},C.prototype.addEventListener=function(t,a){t=String(t);var e=this._listeners,o=e[t];null==o&&(e[t]=o=[]);for(var n=!1,i=0;i<o.length;i+=1)o[i]===a&&(n=!0);n||o.push(a)},C.prototype.removeEventListener=function(t,a){t=String(t);var e=this._listeners,o=e[t];if(null!=o){for(var n=[],i=0;i<o.length;i+=1)o[i]!==a&&n.push(o[i]);0===n.length?delete e[t]:e[t]=n}},D.prototype=Object.create(A.prototype),R.prototype=Object.create(A.prototype),k.prototype=Object.create(A.prototype);var F=/^text\/event\-stream(;.*)?$/i,P=function(t,a){var e=null==t?a:parseInt(t,10);return e!=e&&(e=a),O(e)},O=function(t){return Math.min(Math.max(t,1e3),18e6)},z=function(t,a,e){try{"function"==typeof a&&a.call(t,e)}catch(t){T(t)}};function E(t,i){C.call(this),i=i||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,function(t,i,l){i=String(i);var s=Boolean(l.withCredentials),r=l.lastEventIdQueryParameterName||"lastEventId",c=O(1e3),d=P(l.heartbeatTimeout,45e3),u="",h=c,p=!1,f=0,B=l.headers||{},m=l.Transport,v=W&&null==m?void 0:new g(null!=m?new m:null!=o&&"withCredentials"in o.prototype||null==n?new o:new n),w=null!=m&&"string"!=typeof m?new m:null==v?new x:new b,M=void 0,y=0,S=-1,C="",T="",A="",E="",j=0,V=0,N=0,L=function(a,e,o,n){if(0===S)if(200===a&&null!=o&&F.test(o)){S=1,p=Date.now(),h=c,t.readyState=1;var i=new R("open",{status:a,statusText:e,headers:n});t.dispatchEvent(i),z(t,t.onopen,i)}else{var l="";200!==a?(e&&(e=e.replace(/\s+/g," ")),l="EventSource's response has a status "+a+" "+e+" that is not 200. Aborting the connection."):l="EventSource's response has a Content-Type specifying an unsupported type: "+(null==o?"-":o.replace(/\s+/g," "))+". Aborting the connection.",K(),i=new R("error",{status:a,statusText:e,headers:n}),t.dispatchEvent(i),z(t,t.onerror,i),console.error(l)}},U=function(o){if(1===S){for(var n=-1,i=0;i<o.length;i+=1)(r=o.charCodeAt(i))!=="\n".charCodeAt(0)&&r!=="\r".charCodeAt(0)||(n=i);var l=(-1!==n?E:"")+o.slice(0,n+1);E=(-1===n?E:"")+o.slice(n+1),""!==o&&(p=Date.now(),f+=o.length);for(var s=0;s<l.length;s+=1){var r=l.charCodeAt(s);if(-1===j&&r==="\n".charCodeAt(0))j=0;else if(-1===j&&(j=0),r==="\r".charCodeAt(0)||r==="\n".charCodeAt(0)){if(0!==j){1===j&&(N=s+1);var B=l.slice(V,N-1),m=l.slice(N+(N<s&&l.charCodeAt(N)===" ".charCodeAt(0)?1:0),s);"data"===B?(C+="\n",C+=m):"id"===B?T=m:"event"===B?A=m:"retry"===B?(c=P(m,c),h=c):"heartbeatTimeout"===B&&(d=P(m,d),0!==y&&(e(y),y=a((function(){G()}),d)))}if(0===j){if(""!==C){u=T,""===A&&(A="message");var v=new D(A,{data:C.slice(1),lastEventId:T});if(t.dispatchEvent(v),"open"===A?z(t,t.onopen,v):"message"===A?z(t,t.onmessage,v):"error"===A&&z(t,t.onerror,v),2===S)return}C="",A=""}j=r==="\r".charCodeAt(0)?-1:0}else 0===j&&(V=s,j=1),1===j?r===":".charCodeAt(0)&&(N=s+1,j=2):2===j&&(j=3)}}},I=function(o){if(1===S||0===S){S=-1,0!==y&&(e(y),y=0),y=a((function(){G()}),h),h=O(Math.min(16*c,2*h)),t.readyState=0;var n=new k("error",{error:o});t.dispatchEvent(n),z(t,t.onerror,n),null!=o&&console.error(o)}},K=function(){S=2,null!=M&&(M.abort(),M=void 0),0!==y&&(e(y),y=0),t.readyState=2},G=function(){if(y=0,-1===S){p=!1,f=0,y=a((function(){G()}),d),S=0,C="",A="",T=u,E="",V=0,N=0,j=0;var e=i;if("data:"!==i.slice(0,5)&&"blob:"!==i.slice(0,5)&&""!==u){var o=i.indexOf("?");e=-1===o?i:i.slice(0,o+1)+i.slice(o+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,(function(t,a){return a===r?"":t})),e+=(-1===i.indexOf("?")?"?":"&")+r+"="+encodeURIComponent(u)}var n=t.withCredentials,l={Accept:"text/event-stream"},s=t.headers;if(null!=s)for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(l[c]=s[c]);try{M=w.open(v,L,U,I,e,n,l)}catch(t){throw K(),t}}else if(p||null==M){var h=Math.max((p||Date.now())+d-Date.now(),1);p=!1,y=a((function(){G()}),h)}else I(new Error("No activity within "+d+" milliseconds. "+(0===S?"No response received.":f+" chars received.")+" Reconnecting.")),null!=M&&(M.abort(),M=void 0)};t.url=i,t.readyState=0,t.withCredentials=s,t.headers=B,t._close=K,G()}(this,t,i)}var W=null!=u&&null!=h&&"body"in h.prototype;(E.prototype=Object.create(C.prototype)).CONNECTING=0,E.prototype.OPEN=1,E.prototype.CLOSED=2,E.prototype.close=function(){this._close()},E.CONNECTING=0,E.OPEN=1,E.CLOSED=2,E.prototype.withCredentials=void 0;var j,V=r;null==o||null!=r&&"withCredentials"in r.prototype||(V=E),j=function(t){t.EventSourcePolyfill=E,t.NativeEventSource=r,t.EventSource=V}(l),void 0!==j&&(i.exports=j)}("undefined"==typeof globalThis?"undefined"!=typeof window?window:"undefined"!=typeof self?self:s:globalThis);const c={en:{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit"},"zh-hk":{Title:"您的結餘",Total:"總結餘",Real:"現金結餘",Bonus:"紅利結餘",Credit:"信用結餘",Casino:"賭場",Sports:"體育",DepositButton:"存款"},de:{Title:"Ihr Guthaben",Total:"Gesamtguthaben",Real:"Barguthaben",Bonus:"Bonusguthaben",Credit:"Kreditguthaben",Casino:"Casino",Sports:"Sport",DepositButton:"Einzahlen"},it:{Title:"Il tuo saldo",Total:"Saldo totale",Real:"Saldo in contanti",Bonus:"Saldo bonus",Credit:"Saldo di credito",Casino:"Casinò",Sports:"Sport",DepositButton:"Deposita"},fr:{Title:"Votre solde",Total:"Solde total",Real:"Solde en espèces",Bonus:"Solde bonus",Credit:"Solde de crédit",Casino:"Casino",Sports:"Sports",DepositButton:"Dépôt"},es:{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito"},tr:{Title:"Bakiyeniz",Total:"Toplam Bakiye",Real:"Nakit Bakiye",Bonus:"Bonus Bakiyesi",Credit:"Kredi Bakiyesi",Casino:"Kumarhane",Sports:"Spor",DepositButton:"Yatır"},ru:{Title:"Ваш баланс",Total:"Общий баланс",Real:"Денежный баланс",Bonus:"Бонусный баланс",Credit:"Кредитный баланс",Casino:"Казино",Sports:"Спорт",DepositButton:"Депозит"},ro:{Title:"Soldul tău",Total:"Sold total",Real:"Sold în numerar",Bonus:"Sold bonus",Credit:"Sold credit",Casino:"Cazinou",Sports:"Sporturi",DepositButton:"Depozit"},hr:{Title:"Vaš saldo",Total:"Ukupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Casino",Sports:"Sportovi",DepositButton:"Depozit"},hu:{Title:"Az egyenleged",Total:"Teljes egyenleg",Real:"Készpénz egyenleg",Bonus:"Bónusz egyenleg",Credit:"Hitel egyenleg",Casino:"Kaszinó",Sports:"Sport",DepositButton:"Befizetés"},pl:{Title:"Twoje saldo",Total:"Całkowite saldo",Real:"Saldo gotówkowe",Bonus:"Saldo bonusowe",Credit:"Saldo kredytowe",Casino:"Kasyno",Sports:"Sport",DepositButton:"Wpłać"},pt:{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar"},sl:{Title:"Vaš saldo",Total:"Skupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Šport",DepositButton:"Depozit"},sr:{Title:"Vaš saldo",Total:"Ukupan saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Sport",DepositButton:"Depozit"},"pt-br":{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar"},"es-mx":{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito"},"en-us":{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit"}},d=(t,a,e)=>{let o=c[c[a]?a:"en"][t];if(void 0!==e)for(const[t,a]of Object.entries(e.values)){const e=new RegExp(`{${t}}`,"g");o=o.replace(e,a)}return o},u=class{constructor(a){t(this,a),this.totalCalculationModes=["totalCashAmount","totalRealAmount"],this.formatBalance=t=>{if(this.customDisplayFormat)return this.formatFromCustom(t);const a=this.currencyLocale||this.language,e={style:"currency",currency:this.currency,useGrouping:!0,currencyDisplay:this.currencyDisplay||"code",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(a,e).format(t)},this.formatFromCustom=t=>{const a=[];let e="";for(const o of this.customDisplayFormat)switch(o){default:e+=o;break;case"{":e&&a.push(e),e="";break;case"}":const[n,i]=e.split("|");if(e="","currency"===n.toLowerCase())e=this.currency;else if("amount"===n.toLowerCase()){let a=",",o=".",n=2;i&&(" "!==i[0]&&(a=i[0])," "!==i[1]&&(o=i[1])," "!==i[2]&&!isNaN(Number(i[2]))&&(n=Number(i[2])));let[l,s]=String(Math.floor(t*10**n)/10**n).split(".");e+=l[0];for(let t=1;t<l.length;++t)e+=(l.length-t)%3==0?a+l[t]:l[t];s&&(e+=o+s)}e&&a.push(e),e=""}return a.push(e),a.join("")},this.getBalances=()=>{this.isLoading=!0;const t=new URL(`/v2/player/${this.userId}/balance/`,this.endpoint),a=new Headers;a.append("X-SessionID",this.session);const e={method:"GET",headers:a};return new Promise((a=>fetch(t,e).then((t=>t.json())).then((t=>a(t))).catch((t=>{throw console.log("Balance fetch error",t),new Error("Failed to fetch balance data!")})).finally((()=>this.isLoading=!1))))},this.subscribeToBalanceUpdates=()=>{if(this.currentStream&&this.currentStream.close(),this.session.length<1)return;const t=new URL(`/v2/player/${this.userId}/information/updates/`,this.endpoint),a=new r.exports.EventSourcePolyfill(t,{headers:{accept:"text/event-stream","X-SessionId":this.session}});this.currentStream=a,a.addEventListener("message",this.updateBalances)},this.parseData=t=>{let a;try{a=JSON.parse(t)}catch(t){return void console.log("Balance stream failed: ",t)}return a},this.updateRealAmount=(t,a,e)=>{let o=null;switch(e.walletAccountType){case"Ordinary":e.afterAmount===e.affectedAmount&&0!==a.lastOrdinaryAfterAmount||(a.lastOrdinaryAfterAmount=e.afterAmount,a.showCreditLineAfterAmount||(o=e.afterAmount));break;case"CreditLine":0!==e.afterAmount?(o=e.afterAmount,a.showCreditLineAfterAmount=!0):(o=a.lastOrdinaryAfterAmount,a.showCreditLineAfterAmount=!1);break;default:o=e.afterAmount}return null===o?t:o},this.updateTotalAmount=()=>{switch(this.totalCalculationMode){case"totalCashAmount":let t=0;for(const a of["Real","Bonus"])for(const e of this.balances[a])t+=Math.max(e.amount,0);this.balances.Total[0].amount=t;break;case"totalRealAmount":if(!this.isSplitWallet)return;let a=0;for(const t of this.balances.Real)a+=t.amount;this.balances.Total[0].amount=a}},this.updateBalances=t=>{const a=this.parseData(t.data);if(!a)return void this.subscribeToBalanceUpdates();if("BALANCE_UPDATE_V2"!==a.type)return;const e=a.body.balanceChange;for(const[t,a]of Object.entries(e))if("totalRealAmount"!==this.totalCalculationMode||"Real"!==t||this.isSplitWallet||(this.balances.Total[0].amount=this.updateRealAmount(this.balances.Total[0].amount,this.updateRealAmountState,a)),this.balances[t])for(const e of this.balances[t])this.isSplitWallet?a.productType===e.productType&&(e.amount="Real"===t?this.updateRealAmount(e.amount,this.updateRealAmountState[e.productType],a):a.afterAmount):e.amount="Real"===t?this.updateRealAmount(e.amount,this.updateRealAmountState,a):a.afterAmount;this.updateTotalAmount(),this.balances=Object.assign({},this.balances)},this.balanceModalOpenDeposit=()=>{this.toggleModal("close"),window.postMessage({type:"GoToDeposit"},window.location.href),"function"==typeof gtag&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},this.validateTotalCalculationMode=()=>{this.totalCalculationModes.includes(this.totalCalculationMode)||(console.error(`Unsupported value ('${this.totalCalculationMode}') for totalcalculationmode parameter. Only the following values are supported ${this.totalCalculationModes}. Using default value ('${this.totalCalculationModes[0]}').`),this.totalCalculationMode=this.totalCalculationModes[0])},this.messageHandler=t=>t.data&&"LogoutSuccessfull"===t.data.type&&this.currentStream.close(),this.updateBalanceStyling=()=>{window.postMessage({type:"UpdateBalanceBackground"},window.location.href)},this.toggleModal=t=>{switch(t){case"open":window.postMessage({type:"BalanceModalStatus",status:"open"},window.location.href),this.isModalDisplayed=!0;break;case"close":window.postMessage({type:"BalanceModalStatus",status:"close"},window.location.href),this.isModalDisplayed=!1}},this.userId="",this.session="",this.endpoint="",this.mbSource="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.language="en",this.displayBalanceOption="All",this.totalCalculationMode="totalCashAmount",this.currencyLocale="en",this.currencyDisplay="code",this.maximumFractionDigits="2",this.minimumFractionDigits="0",this.customDisplayFormat="",this.isLoading=!0,this.isModalDisplayed=!1,this.isSplitWallet=!1,this.currentStream=void 0,this.currency=void 0,this.updateRealAmountState=void 0,this.balances={Total:[],Real:[],Bonus:[],Credit:[]}}handleClientStylingChange(t,a){t!=a&&e(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,a){t!=a&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,a){t!=a&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this.validateTotalCalculationMode(),this.getBalances().then((t=>this.setBalances(t))),this.subscribeToBalanceUpdates()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&e(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}setBalances(t){t[this.totalCalculationMode]||(this.totalCalculationMode=this.totalCalculationModes[0]),this.balances.Total.push({amount:0,productType:""});const a=t.items.find((t=>"Real"===t.type&&"Ordinary"===t.walletAccountType));this.currency=a.currency,this.isSplitWallet=Boolean(a.productType),this.isSplitWallet?this.setBalancesWhenSplitWallet(t):this.setBalancesWhenSingleWallet(t)}setBalancesWhenSingleWallet(t){this.updateRealAmountState={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},this.balances.Total[0].amount=t[this.totalCalculationMode][this.currency];for(const a of t.items)switch(a.type){case"Bonus":0===this.balances.Bonus.length?this.balances.Bonus.push({amount:a.amount,productType:""}):this.balances.Bonus[0].amount+=a.amount;break;case"Real":if(a.creditLine&&0===this.balances.Credit.length&&this.balances.Credit.push({amount:a.creditLine,productType:""}),"totalRealAmount"===this.totalCalculationMode)continue;0===this.balances.Real.length?this.balances.Real.push({amount:a.amount,productType:""}):this.balances.Real[0].amount+=a.amount}for(const[t,a]of Object.entries(this.balances))a.length<1&&delete this.balances[t]}setBalancesWhenSplitWallet(t){this.updateRealAmountState={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let a=t.items;this.displayBalanceOption&&"All"!==this.displayBalanceOption&&(a=t.items.filter((t=>t.productType===this.displayBalanceOption)));for(const t of a){let a;switch(t.type){case"Bonus":a=this.balances.Bonus.findIndex((a=>a.productType===t.productType)),a>0?this.balances.Bonus[a].amount+=t.amount:this.balances.Bonus.push({amount:t.amount,productType:t.productType});break;case"Real":t.creditLine&&this.balances.Credit.push({amount:t.creditLine,productType:t.productType}),a=this.balances.Real.findIndex((a=>a.productType===t.productType)),a>0?this.balances.Real[a].amount+=t.amount:this.balances.Real.push({amount:t.amount,productType:t.productType})}}this.updateTotalAmount();for(const[t,a]of Object.entries(this.balances))a.length<1&&delete this.balances[t]}render(){const t=a("button",{class:"BalanceValue",onClick:()=>this.toggleModal("open")},a("p",null,this.balances.Total.length>0?this.formatBalance(this.balances.Total[0].amount):"0"),a("span",{class:" {isModalDisplayed ? 'TriangleActive' : 'TriangleInactive'}"},a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"6.835",viewBox:"0 0 14 6.835"},a("path",{id:"arrow",d:"M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z",transform:"translate(-274.511 -441.088)",fill:"#d1d1d1"})))),e=a("div",{class:"BalanceModalWrapper"},a("button",{class:"BalanceModalClose",onClick:()=>this.toggleModal("close")}),a("div",{class:"BalanceModal"},a("div",{class:"ModalContent"},a("div",{class:"BalanceModalHeader"},a("p",{class:"BalanceModalTitle"},d("Title",this.language))),a("div",{class:"BalanceModalBody"},Object.keys(this.balances).map((t=>a("div",{class:"BalanceModalRowBoth"},this.balances[t].map((e=>a("div",{class:"BalanceModalRowLine"},a("p",{class:"BalanceModalText"},d(t,this.language)," ",e.productType?d(e.productType,this.language):""),a("p",{class:"BalanceModalValue"},a("span",{class:"BalanceModalAmount"},this.formatBalance(e.amount)))))))))),a("div",{class:"BalanceModalFooter"},a("button",{class:"BalanceModalAction",onClick:()=>this.balanceModalOpenDeposit()},d("DepositButton",this.language)))))),o=a("div",{class:"LoadingSkeleton"},a("ui-skeleton",{structure:"title",height:"20px",width:"auto"}));return a("div",{ref:t=>this.stylingContainer=t},a("div",{class:"PamAccountBalanceModal"},this.isLoading?o:a("div",null,t,this.isModalDisplayed?e:null)),this.isModalDisplayed&&a("button",{class:"PamAccountBalanceModalOverlay",onClick:()=>this.toggleModal("close")}))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};u.style='*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.PamAccountBalanceModal{position:relative}.PamAccountBalanceModal .LoadingSkeleton{border-radius:10px;overflow:hidden;width:60px}.PamAccountBalanceModal .BalanceValue{font-size:14px;cursor:pointer;background:transparent;border:none;font:inherit;color:inherit;display:flex;flex-wrap:nowrap;white-space:nowrap}.PamAccountBalanceModal .BalanceValue svg{width:16px;fill:var(--emw--color-black, #000000)}.PamAccountBalanceModal .BalanceValue span{padding-left:5px}.PamAccountBalanceModal .BalanceValue .TriangleActive,.PamAccountBalanceModal .BalanceValue .TriangleInactive{display:block;margin:0 3px;transition:all 0.2s}.PamAccountBalanceModal .BalanceValue .TriangleActive:hover,.PamAccountBalanceModal .BalanceValue .TriangleInactive:hover{transform:scale(1.2)}.PamAccountBalanceModal .BalanceValue .TriangleActive svg,.PamAccountBalanceModal .BalanceValue .TriangleInactive svg{margin:2px 0px}.PamAccountBalanceModal .BalanceValue .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px)}.PamAccountBalanceModal .BalanceValue .TriangleActive:hover{transform:scale(1.1) rotateX(180deg) translateY(3px)}@media only screen and (max-width: 360px){.PamAccountBalanceModal .BalanceValue{font-size:12px}.PamAccountBalanceModal .BalanceValue svg{width:12px}}.PamAccountBalanceModal .BalanceModalWrapper{background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);position:absolute;top:40px;padding:10px;transform:translateX(-45%);box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919;transition:all 0.2s ease-in}.PamAccountBalanceModal .BalanceModalWrapper:before{content:"";background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:50%;width:25px;height:10px;z-index:1}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;transition:all 0.3s ease;background:transparent;border:none;font:inherit}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModalClose:before{content:"";background:var(--emw--color-secondary, #FFFFFF);position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModalClose:after{content:"";background:var(--emw--color-secondary, #FFFFFF);position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModalClose:hover{transform:scale(1.1)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal{transition:all 0.2s ease-in;width:270px}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #FFFFFF))}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth:last-child{border-bottom:none}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, #FFFFFF));font-size:14px;text-transform:capitalize}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalBody .BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #FFFFFF))}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalFooter .BalanceModalAction{background:var(--emw--color-primary, #22B04E);font-size:12px;color:var(--emw--color-white, #FFFFFF);text-transform:uppercase;width:100%;border-radius:30px;border:none;padding:10px 0;cursor:pointer;transition:all 0.2s ease-in;box-shadow:0px 3px 7px 0px rgba(0, 0, 0, 0.2)}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalFooter .BalanceModalAction:hover{background:rgba(255, 255, 255, 0.1);color:var(--emw--color-primary, #22B04E);box-shadow:0px 0px 0px 2px inset var(--emw--color-primary, #22B04E);font-size:14px}.PamAccountBalanceModal .BalanceModalWrapper .BalanceModal .BalanceModalFooter .BalanceModalAction:active{background:rgba(255, 255, 255, 0.5)}.PamAccountBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16;opacity:0;transition:all 0.2s linear}.PamAccountBalanceModalOverlay.Open{opacity:1}';export{u as P}
|
@@ -1 +1 @@
|
|
1
|
-
import{p as t,b as i}from"./p-86b371f2.js";export{s as setNonce}from"./p-86b371f2.js";import{g as a}from"./p-e1255160.js";(()=>{const i=import.meta.url,a={};return""!==i&&(a.resourcesUrl=new URL(".",i).href),t(a)})().then((async t=>(await a(),i([["p-
|
1
|
+
import{p as t,b as i}from"./p-86b371f2.js";export{s as setNonce}from"./p-86b371f2.js";import{g as a}from"./p-e1255160.js";(()=>{const i=import.meta.url,a={};return""!==i&&(a.resourcesUrl=new URL(".",i).href),t(a)})().then((async t=>(await a(),i([["p-249613d1",[[1,"pam-account-balance-modal",{userId:[513,"user-id"],session:[513],endpoint:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],language:[513],displayBalanceOption:[513,"display-balance-option"],totalCalculationMode:[513,"total-calculation-mode"],currencyLocale:[513,"currency-locale"],currencyDisplay:[513,"currency-display"],maximumFractionDigits:[513,"maximum-fraction-digits"],minimumFractionDigits:[513,"minimum-fraction-digits"],customDisplayFormat:[513,"custom-display-format"],isLoading:[32],isModalDisplayed:[32],isSplitWallet:[32],currentStream:[32],currency:[32],updateRealAmountState:[32],balances:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[8,"border-radius"],marginBottom:[8,"margin-bottom"],marginTop:[8,"margin-top"],marginLeft:[8,"margin-left"],marginRight:[8,"margin-right"],animation:[4],rows:[2],size:[1]},null,{structure:["handleStructureChange"]}]]]],t))));
|