@revolugo/elements 5.24.3 → 5.25.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/fonts.css +1 -1
- package/dist/css/{revolugo.vuetify.BXxLxsZV.css → revolugo.vuetify.H0ChTiub.css} +1 -1
- package/dist/index.es.min.js +1896 -1870
- package/dist/index.es.min.js.map +1 -1
- package/dist/index.min.js +18 -18
- package/dist/index.min.js.map +1 -1
- package/dist/{revolugo.banktransferdetails.abCtPgHD.min.js → revolugo.banktransferdetails.DTe97FsE.min.js} +12 -12
- package/dist/{revolugo.bdaterangepicker.B7dkBByh.min.js → revolugo.bdaterangepicker.eOTZEArY.min.js} +18 -18
- package/dist/{revolugo.bformattedamount.Bu4V-Ui5.min.js → revolugo.bformattedamount.rFm3ydQU.min.js} +3 -3
- package/dist/{revolugo.bhotelroomsdetails.b1pvaSpB.min.js → revolugo.bhotelroomsdetails.CxRhfDXT.min.js} +10 -11
- package/dist/{revolugo.bhotelsearchbar.xOnEInc-.min.js → revolugo.bhotelsearchbar.DNNDndSu.min.js} +17 -17
- package/dist/{revolugo.bookingdetailssidebar.DNtdVV_p.min.js → revolugo.bookingdetailssidebar.Cl6V0PUP.min.js} +13 -13
- package/dist/{revolugo.bookingdetailssidebar.COAANpPA.min.js → revolugo.bookingdetailssidebar.DpD__85w.min.js} +4 -4
- package/dist/{revolugo.bookingmanager.BtkAOGoG.min.js → revolugo.bookingmanager.CcWOHtR2.min.js} +32 -33
- package/dist/revolugo.bphoneinput.BN_07lY5.min.js +1825 -0
- package/dist/{revolugo.bpricesummaryskeleton.Dn4RFqEr.min.js → revolugo.bpricesummaryskeleton.2DLIq1mV.min.js} +4 -4
- package/dist/{revolugo.breakpoint-service.CYufk1eo.min.js → revolugo.breakpoint-service.DQr9EmZR.min.js} +3 -3
- package/dist/{revolugo.bstarrating.Bvgl8dLm.min.js → revolugo.bstarrating.BFXu4Vyd.min.js} +6 -6
- package/dist/{revolugo.btag.BvOz4Gun.min.js → revolugo.btag.CYeoDvr9.min.js} +7 -7
- package/dist/{revolugo.cancellationpoliciesbadge.BT58DhH8.min.js → revolugo.cancellationpoliciesbadge.DPjxNZvG.min.js} +4 -4
- package/dist/{revolugo.cancellationpoliciesbadge.C2fdUJMx.min.js → revolugo.cancellationpoliciesbadge.DjJ9fYvS.min.js} +7 -7
- package/dist/{revolugo.cancellationpolicieslist.D3iB523D.min.js → revolugo.cancellationpolicieslist.D-P1Wams.min.js} +4 -4
- package/dist/{revolugo.cancellationpolicieslist.D7-_qpRx.min.js → revolugo.cancellationpolicieslist.Dqh08Vbh.min.js} +3 -3
- package/dist/{revolugo.common.Ds2kJJjk.min.js → revolugo.common.CD8_AGmS.min.js} +2 -2
- package/dist/revolugo.creditcardform.Bnp2cggf.min.js +2003 -0
- package/dist/{revolugo.creditcardform.BUS8RitX.min.js → revolugo.creditcardform.BxpEFQnk.min.js} +4 -4
- package/dist/{revolugo.creditcardpayment.u33P8_zp.min.js → revolugo.creditcardpayment.DodbQqXe.min.js} +4 -4
- package/dist/{revolugo.creditcardpayment.RryGMo6F.min.js → revolugo.creditcardpayment.s0xyMWG5.min.js} +26 -27
- package/dist/{revolugo.currencypicker.pgTJ4rt4.min.js → revolugo.currencypicker.1Hi9dVyq.min.js} +9 -9
- package/dist/{revolugo.currencypickerbtn.D0e0gPz7.min.js → revolugo.currencypickerbtn.CcyLweDl.min.js} +4 -4
- package/dist/{revolugo.currencypickerbtn.QvHF15D0.min.js → revolugo.currencypickerbtn.Dh54QKCr.min.js} +9 -9
- package/dist/{revolugo.dialog-attach.MZOEqNEV.min.js → revolugo.dialog-attach.DCu6y0mp.min.js} +2 -2
- package/dist/{revolugo.fastbookingflow.tLTnI0rU.min.js → revolugo.fastbookingflow.BDhYwidi.min.js} +4 -4
- package/dist/{revolugo.fullbookingflow.CwMQovLH.min.js → revolugo.fullbookingflow.njOLlOVX.min.js} +51 -51
- package/dist/{revolugo.hotel-offer.BI38d5Tm.min.js → revolugo.hotel-offer.B0ThxF7d.min.js} +13 -13
- package/dist/{revolugo.hoteldescriptionview.CLucJ1gS.min.js → revolugo.hoteldescriptionview.BBOiUDlK.min.js} +4 -4
- package/dist/{revolugo.hoteldescriptionview.D5n4WBqc.min.js → revolugo.hoteldescriptionview.CIQcRleF.min.js} +24 -24
- package/dist/{revolugo.hotelofferitemlayout.YB8WDf9L.min.js → revolugo.hotelofferitemlayout.C2qT6Tdd.min.js} +8 -8
- package/dist/{revolugo.hotelofferlist.DTu7ZopK.min.js → revolugo.hotelofferlist.Cx16qxbk.min.js} +1298 -1299
- package/dist/{revolugo.hotelofferlist.B-rtidyw.min.js → revolugo.hotelofferlist.Da8UqbLK.min.js} +4 -4
- package/dist/{revolugo.hotelofferrequestcreator.BQsTvD8F.min.js → revolugo.hotelofferrequestcreator.BYI0GO-4.min.js} +14 -14
- package/dist/{revolugo.hoteloffersearchmenu.BPHAQoVZ.min.js → revolugo.hoteloffersearchmenu.5hMVWsgb.min.js} +6 -6
- package/dist/{revolugo.hoteloffersmap.fhoY4i49.min.js → revolugo.hoteloffersmap.Bnd5znB3.min.js} +4 -4
- package/dist/{revolugo.hoteloffersmap.Dc3Djbce.min.js → revolugo.hoteloffersmap.C9eYR1P6.min.js} +18 -18
- package/dist/{revolugo.hoteloffersview.CN3aDzKp.min.js → revolugo.hoteloffersview.CPLiq5Ij.min.js} +4 -4
- package/dist/{revolugo.hoteloffersview.u9eJgSdG.min.js → revolugo.hoteloffersview.DgXLn59q.min.js} +17 -17
- package/dist/{revolugo.hotelroomofferlist.DWaAwePZ.min.js → revolugo.hotelroomofferlist.BQbBhPLN.min.js} +4 -4
- package/dist/{revolugo.hotelroomofferlist.BrpTGPm2.min.js → revolugo.hotelroomofferlist.rLLEnHxv.min.js} +46 -47
- package/dist/{revolugo.hotelroomofferrequestcreator.CM4cg4DS.min.js → revolugo.hotelroomofferrequestcreator.zHBuxqNE.min.js} +10 -10
- package/dist/{revolugo.hotelroomoffersbookingflow.RH7qyqPm.min.js → revolugo.hotelroomoffersbookingflow.BroWkYCC.min.js} +19 -19
- package/dist/{revolugo.hotelroomoffersearchmenu.OVFJ9LCC.min.js → revolugo.hotelroomoffersearchmenu.BwYRtN5e.min.js} +5 -5
- package/dist/{revolugo.hotelroomoffersearchmenu.55HHjwST.min.js → revolugo.hotelroomoffersearchmenu.DYDhnNU1.min.js} +4 -4
- package/dist/{revolugo.hotelroomoffersview.C9W3t6oM.min.js → revolugo.hotelroomoffersview.CAS3AD5f.min.js} +16 -16
- package/dist/{revolugo.hotelroomoffersview.BvpNR588.min.js → revolugo.hotelroomoffersview.hYNQozMH.min.js} +4 -4
- package/dist/{revolugo.i18n.CuDReacQ.min.js → revolugo.i18n.qxNwIBzD.min.js} +1789 -1761
- package/dist/{revolugo.index.SpWD4hl3.min.js → revolugo.index.AsnH-FuH.min.js} +5 -5
- package/dist/{revolugo.index.wKEERS5G.min.js → revolugo.index.B4A68M5t.min.js} +5 -5
- package/dist/{revolugo.index.BfaIoxFY.min.js → revolugo.index.BEHsb08j.min.js} +2 -2
- package/dist/{revolugo.index.nG_rdN5i.min.js → revolugo.index.BaIijK3F.min.js} +10 -10
- package/dist/{revolugo.index.C1PRuwys.min.js → revolugo.index.BvGEYMD1.min.js} +9 -9
- package/dist/{revolugo.index._koCafXL.min.js → revolugo.index.C-EgBtuD.min.js} +2 -2
- package/dist/revolugo.index.CB3P2Zlq.min.js +15 -0
- package/dist/{revolugo.index.CKgve2FN.min.js → revolugo.index.CHWu5X5E.min.js} +3 -3
- package/dist/{revolugo.index.BjMVo6uv.min.js → revolugo.index.CHom4BIU.min.js} +6 -6
- package/dist/{revolugo.index.CnetTZdK.min.js → revolugo.index.D49U-I6Y.min.js} +3 -3
- package/dist/{revolugo.index.y2z5jkKQ.min.js → revolugo.index.Dkr0oa4k.min.js} +4 -4
- package/dist/{revolugo.index.BG5xy16p.min.js → revolugo.index.Ii4kfDF9.min.js} +2 -2
- package/dist/{revolugo.index.CFSkbmtc.min.js → revolugo.index.kC1bvuBl.min.js} +7 -7
- package/dist/{revolugo.index.DtnM8mh_.min.js → revolugo.index.uJFrICC7.min.js} +5 -5
- package/dist/{revolugo.langpicker.BzFnLUm9.min.js → revolugo.langpicker.DwAtgVGN.min.js} +7 -7
- package/dist/{revolugo.langpickerbtn.EMYV4hoY.min.js → revolugo.langpickerbtn.Bith7Aep.min.js} +10 -10
- package/dist/{revolugo.langpickerbtn.Cn-p3RAu.min.js → revolugo.langpickerbtn.CtxPiTZb.min.js} +4 -4
- package/dist/revolugo.min.js +26 -26
- package/dist/{revolugo.parsed-height.D3VO935x.min.js → revolugo.parsed-height.BfaP0GLv.min.js} +108 -109
- package/dist/{revolugo.parsed-props.C2NezSgu.min.js → revolugo.parsed-props.CS4UjtN_.min.js} +3 -3
- package/dist/{revolugo.prebookform.y6Le8jqk.min.js → revolugo.prebookform.Cl1XflB5.min.js} +24 -25
- package/dist/{revolugo.prebookform.z40QeX8Y.min.js → revolugo.prebookform.ClgRx5Uf.min.js} +4 -4
- package/dist/{revolugo.booking-api-client.BOzfwVYX.min.js → revolugo.revolugo-config.CXM6Omah.min.js} +3670 -1964
- package/dist/{revolugo.roominglisteditor.CGGfrU9y.min.js → revolugo.roominglisteditor.BzeXJB70.min.js} +4 -4
- package/dist/{revolugo.roominglisteditor.ltVJG2yb.min.js → revolugo.roominglisteditor.CfHcAAT8.min.js} +10 -10
- package/dist/{revolugo.sentry.fRRV-E4u.min.js → revolugo.sentry.BVrKAYI8.min.js} +31 -11
- package/dist/{revolugo.store.BlcQQ-4u.min.js → revolugo.store.DWQvkpHn.min.js} +409 -410
- package/dist/{revolugo.storybooktoolbar.PNDGMI0x.min.js → revolugo.storybooktoolbar.CXymV_hK.min.js} +19 -19
- package/dist/{revolugo.termsandconditions.BcLdmO9u.min.js → revolugo.termsandconditions.C88a7LCH.min.js} +4 -4
- package/dist/{revolugo.termsandconditions.BpNUnlCe.min.js → revolugo.termsandconditions.CarLtEho.min.js} +6 -6
- package/dist/revolugo.typed-mixins.Dz5yLoi0.min.js +8 -0
- package/dist/{revolugo.valert.BaEBE0P-.min.js → revolugo.valert.CM6jgpNa.min.js} +7 -7
- package/dist/{revolugo.vautocomplete.DYSxxpv7.min.js → revolugo.vautocomplete.BtXeyAKq.min.js} +5 -5
- package/dist/{revolugo.vbadge.DgrYAEFj.min.js → revolugo.vbadge.CW7q4exY.min.js} +6 -6
- package/dist/{revolugo.vbtn.C9YDeyc-.min.js → revolugo.vbtn.D3lH5UVr.min.js} +7 -7
- package/dist/{revolugo.vcard.DX8p2-Xj.min.js → revolugo.vcard.Bd9-Lhjs.min.js} +6 -6
- package/dist/{revolugo.vdialog.Cd0XOERM.min.js → revolugo.vdialog.CRQbscoB.min.js} +10 -10
- package/dist/{revolugo.vexpansionpanelheader.D0qJ_bqC.min.js → revolugo.vexpansionpanelheader.CxVWFZa5.min.js} +8 -8
- package/dist/{revolugo.vform.DYPyEXKA.min.js → revolugo.vform.BXQKejHZ.min.js} +5 -5
- package/dist/{revolugo.vinput.CBbRCC9E.min.js → revolugo.vinput.Cg25P65-.min.js} +5 -5
- package/dist/{revolugo.vitemgroup.BWlTh2TE.min.js → revolugo.vitemgroup.P6dZ2dAp.min.js} +5 -5
- package/dist/{revolugo.vlistitem.It57-y90.min.js → revolugo.vlistitem.G-Y9-r4l.min.js} +8 -8
- package/dist/{revolugo.vmenu.CXLFtdm8.min.js → revolugo.vmenu.LvjfQmP_.min.js} +8 -8
- package/dist/{revolugo.vselect.5aTjQlRS.min.js → revolugo.vselect.DmnMA0NH.min.js} +17 -17
- package/dist/{revolugo.vsheet.Crxfmq3Y.min.js → revolugo.vsheet.BURnAoIb.min.js} +5 -5
- package/dist/{revolugo.vskeletonloader.Dety0a9H.min.js → revolugo.vskeletonloader.B0qz73wS.min.js} +4 -4
- package/dist/{revolugo.vslidegroup.3piQiZq8.min.js → revolugo.vslidegroup.B2fV8aGy.min.js} +10 -10
- package/dist/{revolugo.vsnackbar.L36Qpan4.min.js → revolugo.vsnackbar.BWWXV2-b.min.js} +5 -5
- package/dist/{revolugo.vtextfield.CPbhfKsq.min.js → revolugo.vtextfield.sGu01yqR.min.js} +7 -7
- package/dist/{revolugo.vtoolbar.BnwpZJCn.min.js → revolugo.vtoolbar.C5u-U0vB.min.js} +5 -5
- package/dist/{revolugo.vtooltip.BtiNycgC.min.js → revolugo.vtooltip.CZyNa8f9.min.js} +7 -7
- package/dist/{revolugo.vuetify.CewyUEmk.min.js → revolugo.vuetify.Cbh6S4U-.min.js} +262 -259
- package/dist/{revolugo.watch-list.DLmiG3rJ.min.js → revolugo.watch-list.IHSNnMf3.min.js} +3 -3
- package/dist/{revolugo.webcomponentwrapper.Od8ojyDM.min.js → revolugo.webcomponentwrapper.CJmmFgVo.min.js} +12 -12
- package/package.json +5 -5
- package/dist/revolugo.bphoneinput.DmGBPbRi.min.js +0 -1832
- package/dist/revolugo.creditcardform.azL7EOJI.min.js +0 -2003
- package/dist/revolugo.index.Dj2qcRAu.min.js +0 -15
- package/dist/revolugo.revolugo-config.Dlt8EylH.min.js +0 -1682
- package/dist/revolugo.typed-mixins.CTkQuxKC.min.js +0 -8
@@ -0,0 +1,2003 @@
|
|
1
|
+
import { E as xt } from "./revolugo.revolugo-config.CXM6Omah.min.js";
|
2
|
+
import { E as X, V as Pt } from "./revolugo.i18n.qxNwIBzD.min.js";
|
3
|
+
import { B as Tt } from "./revolugo.bformattedamount.rFm3ydQU.min.js";
|
4
|
+
import { l as Rt, n as Mt, _ as D, a as k } from "./revolugo.webcomponentwrapper.CJmmFgVo.min.js";
|
5
|
+
import { _ as kt } from "./revolugo.valert.CM6jgpNa.min.js";
|
6
|
+
import { S as Ot } from "./revolugo.index.CHom4BIU.min.js";
|
7
|
+
import { _ as ee } from "./revolugo.index.BaIijK3F.min.js";
|
8
|
+
import { _ as Nt } from "./revolugo.vinput.Cg25P65-.min.js";
|
9
|
+
import { _ as Te } from "./revolugo.vcard.Bd9-Lhjs.min.js";
|
10
|
+
import { _ as It } from "./revolugo.vtoolbar.C5u-U0vB.min.js";
|
11
|
+
import { a as Ht, _ as Lt } from "./revolugo.vbtn.D3lH5UVr.min.js";
|
12
|
+
import { V as Ut } from "./revolugo.index.C-EgBtuD.min.js";
|
13
|
+
import { _ as qt } from "./revolugo.vskeletonloader.B0qz73wS.min.js";
|
14
|
+
function Ct(n) {
|
15
|
+
try {
|
16
|
+
if (typeof document < "u") {
|
17
|
+
window.REVOLUGO_ELEMENTS_STYLES = window.REVOLUGO_ELEMENTS_STYLES || {
|
18
|
+
sheets: [],
|
19
|
+
components: []
|
20
|
+
};
|
21
|
+
const e = import.meta.url, t = e.slice(0, e.lastIndexOf("/") + 1) + n;
|
22
|
+
window.REVOLUGO_ELEMENTS_STYLES.sheets.push(t);
|
23
|
+
for (const s of REVOLUGO_ELEMENTS_STYLES.components)
|
24
|
+
s(t);
|
25
|
+
if (n.indexOf("fonts") >= 0) {
|
26
|
+
const s = document.createElement("link");
|
27
|
+
s.rel = "stylesheet", linK.href = t, document.head.appendChild(s);
|
28
|
+
}
|
29
|
+
}
|
30
|
+
} catch (e) {
|
31
|
+
console.error("[revolugo-elements] ", e);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
const Bt = Ot.extend({
|
35
|
+
name: "v-checkbox",
|
36
|
+
props: {
|
37
|
+
indeterminate: Boolean,
|
38
|
+
indeterminateIcon: {
|
39
|
+
type: String,
|
40
|
+
default: "$checkboxIndeterminate"
|
41
|
+
},
|
42
|
+
offIcon: {
|
43
|
+
type: String,
|
44
|
+
default: "$checkboxOff"
|
45
|
+
},
|
46
|
+
onIcon: {
|
47
|
+
type: String,
|
48
|
+
default: "$checkboxOn"
|
49
|
+
}
|
50
|
+
},
|
51
|
+
data() {
|
52
|
+
return {
|
53
|
+
inputIndeterminate: this.indeterminate
|
54
|
+
};
|
55
|
+
},
|
56
|
+
computed: {
|
57
|
+
classes() {
|
58
|
+
return {
|
59
|
+
...Nt.options.computed.classes.call(this),
|
60
|
+
"v-input--selection-controls": !0,
|
61
|
+
"v-input--checkbox": !0,
|
62
|
+
"v-input--indeterminate": this.inputIndeterminate
|
63
|
+
};
|
64
|
+
},
|
65
|
+
computedIcon() {
|
66
|
+
return this.inputIndeterminate ? this.indeterminateIcon : this.isActive ? this.onIcon : this.offIcon;
|
67
|
+
},
|
68
|
+
// Do not return undefined if disabled,
|
69
|
+
// according to spec, should still show
|
70
|
+
// a color when disabled and active
|
71
|
+
validationState() {
|
72
|
+
if (!(this.isDisabled && !this.inputIndeterminate)) {
|
73
|
+
if (this.hasError && this.shouldValidate) return "error";
|
74
|
+
if (this.hasSuccess) return "success";
|
75
|
+
if (this.hasColor !== null) return this.computedColor;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
},
|
79
|
+
watch: {
|
80
|
+
indeterminate(n) {
|
81
|
+
this.$nextTick(() => this.inputIndeterminate = n);
|
82
|
+
},
|
83
|
+
inputIndeterminate(n) {
|
84
|
+
this.$emit("update:indeterminate", n);
|
85
|
+
},
|
86
|
+
isActive() {
|
87
|
+
this.indeterminate && (this.inputIndeterminate = !1);
|
88
|
+
}
|
89
|
+
},
|
90
|
+
methods: {
|
91
|
+
genCheckbox() {
|
92
|
+
const {
|
93
|
+
title: n,
|
94
|
+
...e
|
95
|
+
} = this.attrs$;
|
96
|
+
return this.$createElement("div", {
|
97
|
+
staticClass: "v-input--selection-controls__input"
|
98
|
+
}, [this.$createElement(ee, this.setTextColor(this.validationState, {
|
99
|
+
props: {
|
100
|
+
dense: this.dense,
|
101
|
+
dark: this.dark,
|
102
|
+
light: this.light
|
103
|
+
}
|
104
|
+
}), this.computedIcon), this.genInput("checkbox", {
|
105
|
+
...e,
|
106
|
+
"aria-checked": this.inputIndeterminate ? "mixed" : this.isActive.toString()
|
107
|
+
}), this.genRipple(this.setTextColor(this.rippleState))]);
|
108
|
+
},
|
109
|
+
genDefaultSlot() {
|
110
|
+
return [this.genCheckbox(), this.genLabel()];
|
111
|
+
}
|
112
|
+
}
|
113
|
+
}), Dt = {
|
114
|
+
amount: { type: Number },
|
115
|
+
currency: { type: String },
|
116
|
+
disabled: {
|
117
|
+
type: Boolean,
|
118
|
+
default: !1
|
119
|
+
},
|
120
|
+
loading: {
|
121
|
+
type: Boolean,
|
122
|
+
default: !1
|
123
|
+
},
|
124
|
+
token: { type: String },
|
125
|
+
withAction: {
|
126
|
+
type: Boolean,
|
127
|
+
default: !1
|
128
|
+
},
|
129
|
+
withTerms: {
|
130
|
+
type: Boolean,
|
131
|
+
default: !1
|
132
|
+
}
|
133
|
+
};
|
134
|
+
/**
|
135
|
+
* @license
|
136
|
+
* Copyright 2017 Google LLC
|
137
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
138
|
+
*/
|
139
|
+
const st = (n) => (e) => typeof e == "function" ? ((t, s) => (customElements.define(t, s), s))(n, e) : ((t, s) => {
|
140
|
+
const { kind: i, elements: r } = s;
|
141
|
+
return { kind: i, elements: r, finisher(o) {
|
142
|
+
customElements.define(t, o);
|
143
|
+
} };
|
144
|
+
})(n, e);
|
145
|
+
/**
|
146
|
+
* @license
|
147
|
+
* Copyright 2017 Google LLC
|
148
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
149
|
+
*/
|
150
|
+
const jt = (n, e) => e.kind === "method" && e.descriptor && !("value" in e.descriptor) ? { ...e, finisher(t) {
|
151
|
+
t.createProperty(e.key, n);
|
152
|
+
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e.key, initializer() {
|
153
|
+
typeof e.initializer == "function" && (this[e.key] = e.initializer.call(this));
|
154
|
+
}, finisher(t) {
|
155
|
+
t.createProperty(e.key, n);
|
156
|
+
} }, Vt = (n, e, t) => {
|
157
|
+
e.constructor.createProperty(t, n);
|
158
|
+
};
|
159
|
+
function d(n) {
|
160
|
+
return (e, t) => t !== void 0 ? Vt(n, e, t) : jt(n, e);
|
161
|
+
}
|
162
|
+
/**
|
163
|
+
* @license
|
164
|
+
* Copyright 2021 Google LLC
|
165
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
166
|
+
*/
|
167
|
+
var ce;
|
168
|
+
((ce = window.HTMLSlotElement) === null || ce === void 0 ? void 0 : ce.prototype.assignedElements) != null;
|
169
|
+
var Re = !0;
|
170
|
+
function S(n, e, t) {
|
171
|
+
if (typeof (t == null ? void 0 : t.value) != "function")
|
172
|
+
throw new TypeError(`Only methods can be decorated with @bound. <${e ?? n.name}> is not a method!`);
|
173
|
+
return {
|
174
|
+
configurable: Re,
|
175
|
+
get() {
|
176
|
+
const s = t.value.bind(this);
|
177
|
+
return Object.defineProperty(this, e, { value: s, configurable: Re, writable: !0 }), s;
|
178
|
+
}
|
179
|
+
};
|
180
|
+
}
|
181
|
+
/**
|
182
|
+
* @license
|
183
|
+
* Copyright 2019 Google LLC
|
184
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
185
|
+
*/
|
186
|
+
const te = window, we = te.ShadowRoot && (te.ShadyCSS === void 0 || te.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ee = Symbol(), Me = /* @__PURE__ */ new WeakMap();
|
187
|
+
let it = class {
|
188
|
+
constructor(e, t, s) {
|
189
|
+
if (this._$cssResult$ = !0, s !== Ee) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
190
|
+
this.cssText = e, this.t = t;
|
191
|
+
}
|
192
|
+
get styleSheet() {
|
193
|
+
let e = this.o;
|
194
|
+
const t = this.t;
|
195
|
+
if (we && e === void 0) {
|
196
|
+
const s = t !== void 0 && t.length === 1;
|
197
|
+
s && (e = Me.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && Me.set(t, e));
|
198
|
+
}
|
199
|
+
return e;
|
200
|
+
}
|
201
|
+
toString() {
|
202
|
+
return this.cssText;
|
203
|
+
}
|
204
|
+
};
|
205
|
+
const zt = (n) => new it(typeof n == "string" ? n : n + "", void 0, Ee), Ce = (n, ...e) => {
|
206
|
+
const t = n.length === 1 ? n[0] : e.reduce((s, i, r) => s + ((o) => {
|
207
|
+
if (o._$cssResult$ === !0) return o.cssText;
|
208
|
+
if (typeof o == "number") return o;
|
209
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
210
|
+
})(i) + n[r + 1], n[0]);
|
211
|
+
return new it(t, n, Ee);
|
212
|
+
}, Ft = (n, e) => {
|
213
|
+
we ? n.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet) : e.forEach((t) => {
|
214
|
+
const s = document.createElement("style"), i = te.litNonce;
|
215
|
+
i !== void 0 && s.setAttribute("nonce", i), s.textContent = t.cssText, n.appendChild(s);
|
216
|
+
});
|
217
|
+
}, ke = we ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((e) => {
|
218
|
+
let t = "";
|
219
|
+
for (const s of e.cssRules) t += s.cssText;
|
220
|
+
return zt(t);
|
221
|
+
})(n) : n;
|
222
|
+
/**
|
223
|
+
* @license
|
224
|
+
* Copyright 2017 Google LLC
|
225
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
226
|
+
*/
|
227
|
+
var pe;
|
228
|
+
const oe = window, Oe = oe.trustedTypes, Wt = Oe ? Oe.emptyScript : "", Ne = oe.reactiveElementPolyfillSupport, Ae = { toAttribute(n, e) {
|
229
|
+
switch (e) {
|
230
|
+
case Boolean:
|
231
|
+
n = n ? Wt : null;
|
232
|
+
break;
|
233
|
+
case Object:
|
234
|
+
case Array:
|
235
|
+
n = n == null ? n : JSON.stringify(n);
|
236
|
+
}
|
237
|
+
return n;
|
238
|
+
}, fromAttribute(n, e) {
|
239
|
+
let t = n;
|
240
|
+
switch (e) {
|
241
|
+
case Boolean:
|
242
|
+
t = n !== null;
|
243
|
+
break;
|
244
|
+
case Number:
|
245
|
+
t = n === null ? null : Number(n);
|
246
|
+
break;
|
247
|
+
case Object:
|
248
|
+
case Array:
|
249
|
+
try {
|
250
|
+
t = JSON.parse(n);
|
251
|
+
} catch {
|
252
|
+
t = null;
|
253
|
+
}
|
254
|
+
}
|
255
|
+
return t;
|
256
|
+
} }, rt = (n, e) => e !== n && (e == e || n == n), me = { attribute: !0, type: String, converter: Ae, reflect: !1, hasChanged: rt }, ve = "finalized";
|
257
|
+
let O = class extends HTMLElement {
|
258
|
+
constructor() {
|
259
|
+
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
|
260
|
+
}
|
261
|
+
static addInitializer(e) {
|
262
|
+
var t;
|
263
|
+
this.finalize(), ((t = this.h) !== null && t !== void 0 ? t : this.h = []).push(e);
|
264
|
+
}
|
265
|
+
static get observedAttributes() {
|
266
|
+
this.finalize();
|
267
|
+
const e = [];
|
268
|
+
return this.elementProperties.forEach((t, s) => {
|
269
|
+
const i = this._$Ep(s, t);
|
270
|
+
i !== void 0 && (this._$Ev.set(i, s), e.push(i));
|
271
|
+
}), e;
|
272
|
+
}
|
273
|
+
static createProperty(e, t = me) {
|
274
|
+
if (t.state && (t.attribute = !1), this.finalize(), this.elementProperties.set(e, t), !t.noAccessor && !this.prototype.hasOwnProperty(e)) {
|
275
|
+
const s = typeof e == "symbol" ? Symbol() : "__" + e, i = this.getPropertyDescriptor(e, s, t);
|
276
|
+
i !== void 0 && Object.defineProperty(this.prototype, e, i);
|
277
|
+
}
|
278
|
+
}
|
279
|
+
static getPropertyDescriptor(e, t, s) {
|
280
|
+
return { get() {
|
281
|
+
return this[t];
|
282
|
+
}, set(i) {
|
283
|
+
const r = this[e];
|
284
|
+
this[t] = i, this.requestUpdate(e, r, s);
|
285
|
+
}, configurable: !0, enumerable: !0 };
|
286
|
+
}
|
287
|
+
static getPropertyOptions(e) {
|
288
|
+
return this.elementProperties.get(e) || me;
|
289
|
+
}
|
290
|
+
static finalize() {
|
291
|
+
if (this.hasOwnProperty(ve)) return !1;
|
292
|
+
this[ve] = !0;
|
293
|
+
const e = Object.getPrototypeOf(this);
|
294
|
+
if (e.finalize(), e.h !== void 0 && (this.h = [...e.h]), this.elementProperties = new Map(e.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
295
|
+
const t = this.properties, s = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
|
296
|
+
for (const i of s) this.createProperty(i, t[i]);
|
297
|
+
}
|
298
|
+
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
299
|
+
}
|
300
|
+
static finalizeStyles(e) {
|
301
|
+
const t = [];
|
302
|
+
if (Array.isArray(e)) {
|
303
|
+
const s = new Set(e.flat(1 / 0).reverse());
|
304
|
+
for (const i of s) t.unshift(ke(i));
|
305
|
+
} else e !== void 0 && t.push(ke(e));
|
306
|
+
return t;
|
307
|
+
}
|
308
|
+
static _$Ep(e, t) {
|
309
|
+
const s = t.attribute;
|
310
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : typeof e == "string" ? e.toLowerCase() : void 0;
|
311
|
+
}
|
312
|
+
_$Eu() {
|
313
|
+
var e;
|
314
|
+
this._$E_ = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (e = this.constructor.h) === null || e === void 0 || e.forEach((t) => t(this));
|
315
|
+
}
|
316
|
+
addController(e) {
|
317
|
+
var t, s;
|
318
|
+
((t = this._$ES) !== null && t !== void 0 ? t : this._$ES = []).push(e), this.renderRoot !== void 0 && this.isConnected && ((s = e.hostConnected) === null || s === void 0 || s.call(e));
|
319
|
+
}
|
320
|
+
removeController(e) {
|
321
|
+
var t;
|
322
|
+
(t = this._$ES) === null || t === void 0 || t.splice(this._$ES.indexOf(e) >>> 0, 1);
|
323
|
+
}
|
324
|
+
_$Eg() {
|
325
|
+
this.constructor.elementProperties.forEach((e, t) => {
|
326
|
+
this.hasOwnProperty(t) && (this._$Ei.set(t, this[t]), delete this[t]);
|
327
|
+
});
|
328
|
+
}
|
329
|
+
createRenderRoot() {
|
330
|
+
var e;
|
331
|
+
const t = (e = this.shadowRoot) !== null && e !== void 0 ? e : this.attachShadow(this.constructor.shadowRootOptions);
|
332
|
+
return Ft(t, this.constructor.elementStyles), t;
|
333
|
+
}
|
334
|
+
connectedCallback() {
|
335
|
+
var e;
|
336
|
+
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$ES) === null || e === void 0 || e.forEach((t) => {
|
337
|
+
var s;
|
338
|
+
return (s = t.hostConnected) === null || s === void 0 ? void 0 : s.call(t);
|
339
|
+
});
|
340
|
+
}
|
341
|
+
enableUpdating(e) {
|
342
|
+
}
|
343
|
+
disconnectedCallback() {
|
344
|
+
var e;
|
345
|
+
(e = this._$ES) === null || e === void 0 || e.forEach((t) => {
|
346
|
+
var s;
|
347
|
+
return (s = t.hostDisconnected) === null || s === void 0 ? void 0 : s.call(t);
|
348
|
+
});
|
349
|
+
}
|
350
|
+
attributeChangedCallback(e, t, s) {
|
351
|
+
this._$AK(e, s);
|
352
|
+
}
|
353
|
+
_$EO(e, t, s = me) {
|
354
|
+
var i;
|
355
|
+
const r = this.constructor._$Ep(e, s);
|
356
|
+
if (r !== void 0 && s.reflect === !0) {
|
357
|
+
const o = (((i = s.converter) === null || i === void 0 ? void 0 : i.toAttribute) !== void 0 ? s.converter : Ae).toAttribute(t, s.type);
|
358
|
+
this._$El = e, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$El = null;
|
359
|
+
}
|
360
|
+
}
|
361
|
+
_$AK(e, t) {
|
362
|
+
var s;
|
363
|
+
const i = this.constructor, r = i._$Ev.get(e);
|
364
|
+
if (r !== void 0 && this._$El !== r) {
|
365
|
+
const o = i.getPropertyOptions(r), c = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) === null || s === void 0 ? void 0 : s.fromAttribute) !== void 0 ? o.converter : Ae;
|
366
|
+
this._$El = r, this[r] = c.fromAttribute(t, o.type), this._$El = null;
|
367
|
+
}
|
368
|
+
}
|
369
|
+
requestUpdate(e, t, s) {
|
370
|
+
let i = !0;
|
371
|
+
e !== void 0 && (((s = s || this.constructor.getPropertyOptions(e)).hasChanged || rt)(this[e], t) ? (this._$AL.has(e) || this._$AL.set(e, t), s.reflect === !0 && this._$El !== e && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(e, s))) : i = !1), !this.isUpdatePending && i && (this._$E_ = this._$Ej());
|
372
|
+
}
|
373
|
+
async _$Ej() {
|
374
|
+
this.isUpdatePending = !0;
|
375
|
+
try {
|
376
|
+
await this._$E_;
|
377
|
+
} catch (t) {
|
378
|
+
Promise.reject(t);
|
379
|
+
}
|
380
|
+
const e = this.scheduleUpdate();
|
381
|
+
return e != null && await e, !this.isUpdatePending;
|
382
|
+
}
|
383
|
+
scheduleUpdate() {
|
384
|
+
return this.performUpdate();
|
385
|
+
}
|
386
|
+
performUpdate() {
|
387
|
+
var e;
|
388
|
+
if (!this.isUpdatePending) return;
|
389
|
+
this.hasUpdated, this._$Ei && (this._$Ei.forEach((i, r) => this[r] = i), this._$Ei = void 0);
|
390
|
+
let t = !1;
|
391
|
+
const s = this._$AL;
|
392
|
+
try {
|
393
|
+
t = this.shouldUpdate(s), t ? (this.willUpdate(s), (e = this._$ES) === null || e === void 0 || e.forEach((i) => {
|
394
|
+
var r;
|
395
|
+
return (r = i.hostUpdate) === null || r === void 0 ? void 0 : r.call(i);
|
396
|
+
}), this.update(s)) : this._$Ek();
|
397
|
+
} catch (i) {
|
398
|
+
throw t = !1, this._$Ek(), i;
|
399
|
+
}
|
400
|
+
t && this._$AE(s);
|
401
|
+
}
|
402
|
+
willUpdate(e) {
|
403
|
+
}
|
404
|
+
_$AE(e) {
|
405
|
+
var t;
|
406
|
+
(t = this._$ES) === null || t === void 0 || t.forEach((s) => {
|
407
|
+
var i;
|
408
|
+
return (i = s.hostUpdated) === null || i === void 0 ? void 0 : i.call(s);
|
409
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
410
|
+
}
|
411
|
+
_$Ek() {
|
412
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
413
|
+
}
|
414
|
+
get updateComplete() {
|
415
|
+
return this.getUpdateComplete();
|
416
|
+
}
|
417
|
+
getUpdateComplete() {
|
418
|
+
return this._$E_;
|
419
|
+
}
|
420
|
+
shouldUpdate(e) {
|
421
|
+
return !0;
|
422
|
+
}
|
423
|
+
update(e) {
|
424
|
+
this._$EC !== void 0 && (this._$EC.forEach((t, s) => this._$EO(s, this[s], t)), this._$EC = void 0), this._$Ek();
|
425
|
+
}
|
426
|
+
updated(e) {
|
427
|
+
}
|
428
|
+
firstUpdated(e) {
|
429
|
+
}
|
430
|
+
};
|
431
|
+
O[ve] = !0, O.elementProperties = /* @__PURE__ */ new Map(), O.elementStyles = [], O.shadowRootOptions = { mode: "open" }, Ne == null || Ne({ ReactiveElement: O }), ((pe = oe.reactiveElementVersions) !== null && pe !== void 0 ? pe : oe.reactiveElementVersions = []).push("1.6.3");
|
432
|
+
/**
|
433
|
+
* @license
|
434
|
+
* Copyright 2017 Google LLC
|
435
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
436
|
+
*/
|
437
|
+
var fe;
|
438
|
+
const ae = window, I = ae.trustedTypes, Ie = I ? I.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, E = `lit$${(Math.random() + "").slice(9)}$`, ot = "?" + E, Gt = `<${ot}>`, H = document, le = (n = "") => H.createComment(n), W = (n) => n === null || typeof n != "object" && typeof n != "function", at = Array.isArray, Kt = (n) => at(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", j = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, He = /-->/g, Le = />/g, x = RegExp(`>|[
|
439
|
+
\f\r](?:([^\\s"'>=/]+)([
|
440
|
+
\f\r]*=[
|
441
|
+
\f\r]*(?:[^
|
442
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ue = /'/g, qe = /"/g, lt = /^(?:script|style|textarea|title)$/i, G = Symbol.for("lit-noChange"), g = Symbol.for("lit-nothing"), Be = /* @__PURE__ */ new WeakMap(), N = H.createTreeWalker(H, 129, null, !1), Yt = (n, e) => {
|
443
|
+
const t = n.length - 1, s = [];
|
444
|
+
let i, r = e === 2 ? "<svg>" : "", o = j;
|
445
|
+
for (let a = 0; a < t; a++) {
|
446
|
+
const l = n[a];
|
447
|
+
let f, h, p = -1, _ = 0;
|
448
|
+
for (; _ < l.length && (o.lastIndex = _, h = o.exec(l), h !== null); ) _ = o.lastIndex, o === j ? h[1] === "!--" ? o = He : h[1] !== void 0 ? o = Le : h[2] !== void 0 ? (lt.test(h[2]) && (i = RegExp("</" + h[2], "g")), o = x) : h[3] !== void 0 && (o = x) : o === x ? h[0] === ">" ? (o = i ?? j, p = -1) : h[1] === void 0 ? p = -2 : (p = o.lastIndex - h[2].length, f = h[1], o = h[3] === void 0 ? x : h[3] === '"' ? qe : Ue) : o === qe || o === Ue ? o = x : o === He || o === Le ? o = j : (o = x, i = void 0);
|
449
|
+
const M = o === x && n[a + 1].startsWith("/>") ? " " : "";
|
450
|
+
r += o === j ? l + Gt : p >= 0 ? (s.push(f), l.slice(0, p) + "$lit$" + l.slice(p) + E + M) : l + E + (p === -2 ? (s.push(void 0), a) : M);
|
451
|
+
}
|
452
|
+
const c = r + (n[t] || "<?>") + (e === 2 ? "</svg>" : "");
|
453
|
+
if (!Array.isArray(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
454
|
+
return [Ie !== void 0 ? Ie.createHTML(c) : c, s];
|
455
|
+
};
|
456
|
+
let be = class ut {
|
457
|
+
constructor({ strings: e, _$litType$: t }, s) {
|
458
|
+
let i;
|
459
|
+
this.parts = [];
|
460
|
+
let r = 0, o = 0;
|
461
|
+
const c = e.length - 1, a = this.parts, [l, f] = Yt(e, t);
|
462
|
+
if (this.el = ut.createElement(l, s), N.currentNode = this.el.content, t === 2) {
|
463
|
+
const h = this.el.content, p = h.firstChild;
|
464
|
+
p.remove(), h.append(...p.childNodes);
|
465
|
+
}
|
466
|
+
for (; (i = N.nextNode()) !== null && a.length < c; ) {
|
467
|
+
if (i.nodeType === 1) {
|
468
|
+
if (i.hasAttributes()) {
|
469
|
+
const h = [];
|
470
|
+
for (const p of i.getAttributeNames()) if (p.endsWith("$lit$") || p.startsWith(E)) {
|
471
|
+
const _ = f[o++];
|
472
|
+
if (h.push(p), _ !== void 0) {
|
473
|
+
const M = i.getAttribute(_.toLowerCase() + "$lit$").split(E), w = /([.?@])?(.*)/.exec(_);
|
474
|
+
a.push({ type: 1, index: r, name: w[2], strings: M, ctor: w[1] === "." ? Jt : w[1] === "?" ? Qt : w[1] === "@" ? en : he });
|
475
|
+
} else a.push({ type: 6, index: r });
|
476
|
+
}
|
477
|
+
for (const p of h) i.removeAttribute(p);
|
478
|
+
}
|
479
|
+
if (lt.test(i.tagName)) {
|
480
|
+
const h = i.textContent.split(E), p = h.length - 1;
|
481
|
+
if (p > 0) {
|
482
|
+
i.textContent = I ? I.emptyScript : "";
|
483
|
+
for (let _ = 0; _ < p; _++) i.append(h[_], le()), N.nextNode(), a.push({ type: 2, index: ++r });
|
484
|
+
i.append(h[p], le());
|
485
|
+
}
|
486
|
+
}
|
487
|
+
} else if (i.nodeType === 8) if (i.data === ot) a.push({ type: 2, index: r });
|
488
|
+
else {
|
489
|
+
let h = -1;
|
490
|
+
for (; (h = i.data.indexOf(E, h + 1)) !== -1; ) a.push({ type: 7, index: r }), h += E.length - 1;
|
491
|
+
}
|
492
|
+
r++;
|
493
|
+
}
|
494
|
+
}
|
495
|
+
static createElement(e, t) {
|
496
|
+
const s = H.createElement("template");
|
497
|
+
return s.innerHTML = e, s;
|
498
|
+
}
|
499
|
+
};
|
500
|
+
function L(n, e, t = n, s) {
|
501
|
+
var i, r, o, c;
|
502
|
+
if (e === G) return e;
|
503
|
+
let a = s !== void 0 ? (i = t._$Co) === null || i === void 0 ? void 0 : i[s] : t._$Cl;
|
504
|
+
const l = W(e) ? void 0 : e._$litDirective$;
|
505
|
+
return (a == null ? void 0 : a.constructor) !== l && ((r = a == null ? void 0 : a._$AO) === null || r === void 0 || r.call(a, !1), l === void 0 ? a = void 0 : (a = new l(n), a._$AT(n, t, s)), s !== void 0 ? ((o = (c = t)._$Co) !== null && o !== void 0 ? o : c._$Co = [])[s] = a : t._$Cl = a), a !== void 0 && (e = L(n, a._$AS(n, e.values), a, s)), e;
|
506
|
+
}
|
507
|
+
let Zt = class {
|
508
|
+
constructor(e, t) {
|
509
|
+
this.u = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
510
|
+
}
|
511
|
+
get parentNode() {
|
512
|
+
return this._$AM.parentNode;
|
513
|
+
}
|
514
|
+
get _$AU() {
|
515
|
+
return this._$AM._$AU;
|
516
|
+
}
|
517
|
+
v(e) {
|
518
|
+
var t;
|
519
|
+
const { el: { content: s }, parts: i } = this._$AD, r = ((t = e == null ? void 0 : e.creationScope) !== null && t !== void 0 ? t : H).importNode(s, !0);
|
520
|
+
N.currentNode = r;
|
521
|
+
let o = N.nextNode(), c = 0, a = 0, l = i[0];
|
522
|
+
for (; l !== void 0; ) {
|
523
|
+
if (c === l.index) {
|
524
|
+
let f;
|
525
|
+
l.type === 2 ? f = new ht(o, o.nextSibling, this, e) : l.type === 1 ? f = new l.ctor(o, l.name, l.strings, this, e) : l.type === 6 && (f = new tn(o, this, e)), this.u.push(f), l = i[++a];
|
526
|
+
}
|
527
|
+
c !== (l == null ? void 0 : l.index) && (o = N.nextNode(), c++);
|
528
|
+
}
|
529
|
+
return r;
|
530
|
+
}
|
531
|
+
p(e) {
|
532
|
+
let t = 0;
|
533
|
+
for (const s of this.u) s !== void 0 && (s.strings !== void 0 ? (s._$AI(e, s, t), t += s.strings.length - 2) : s._$AI(e[t])), t++;
|
534
|
+
}
|
535
|
+
}, ht = class dt {
|
536
|
+
constructor(e, t, s, i) {
|
537
|
+
var r;
|
538
|
+
this.type = 2, this._$AH = g, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = s, this.options = i, this._$Cm = (r = i == null ? void 0 : i.isConnected) === null || r === void 0 || r;
|
539
|
+
}
|
540
|
+
get _$AU() {
|
541
|
+
var e, t;
|
542
|
+
return (t = (e = this._$AM) === null || e === void 0 ? void 0 : e._$AU) !== null && t !== void 0 ? t : this._$Cm;
|
543
|
+
}
|
544
|
+
get parentNode() {
|
545
|
+
let e = this._$AA.parentNode;
|
546
|
+
const t = this._$AM;
|
547
|
+
return t !== void 0 && e.nodeType === 11 && (e = t.parentNode), e;
|
548
|
+
}
|
549
|
+
get startNode() {
|
550
|
+
return this._$AA;
|
551
|
+
}
|
552
|
+
get endNode() {
|
553
|
+
return this._$AB;
|
554
|
+
}
|
555
|
+
_$AI(e, t = this) {
|
556
|
+
e = L(this, e, t), W(e) ? e === g || e == null || e === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : e !== this._$AH && e !== G && this.g(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Kt(e) ? this.k(e) : this.g(e);
|
557
|
+
}
|
558
|
+
O(e, t = this._$AB) {
|
559
|
+
return this._$AA.parentNode.insertBefore(e, t);
|
560
|
+
}
|
561
|
+
T(e) {
|
562
|
+
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
563
|
+
}
|
564
|
+
g(e) {
|
565
|
+
this._$AH !== g && W(this._$AH) ? this._$AA.nextSibling.data = e : this.T(H.createTextNode(e)), this._$AH = e;
|
566
|
+
}
|
567
|
+
$(e) {
|
568
|
+
var t;
|
569
|
+
const { values: s, _$litType$: i } = e, r = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = be.createElement(i.h, this.options)), i);
|
570
|
+
if (((t = this._$AH) === null || t === void 0 ? void 0 : t._$AD) === r) this._$AH.p(s);
|
571
|
+
else {
|
572
|
+
const o = new Zt(r, this), c = o.v(this.options);
|
573
|
+
o.p(s), this.T(c), this._$AH = o;
|
574
|
+
}
|
575
|
+
}
|
576
|
+
_$AC(e) {
|
577
|
+
let t = Be.get(e.strings);
|
578
|
+
return t === void 0 && Be.set(e.strings, t = new be(e)), t;
|
579
|
+
}
|
580
|
+
k(e) {
|
581
|
+
at(this._$AH) || (this._$AH = [], this._$AR());
|
582
|
+
const t = this._$AH;
|
583
|
+
let s, i = 0;
|
584
|
+
for (const r of e) i === t.length ? t.push(s = new dt(this.O(le()), this.O(le()), this, this.options)) : s = t[i], s._$AI(r), i++;
|
585
|
+
i < t.length && (this._$AR(s && s._$AB.nextSibling, i), t.length = i);
|
586
|
+
}
|
587
|
+
_$AR(e = this._$AA.nextSibling, t) {
|
588
|
+
var s;
|
589
|
+
for ((s = this._$AP) === null || s === void 0 || s.call(this, !1, !0, t); e && e !== this._$AB; ) {
|
590
|
+
const i = e.nextSibling;
|
591
|
+
e.remove(), e = i;
|
592
|
+
}
|
593
|
+
}
|
594
|
+
setConnected(e) {
|
595
|
+
var t;
|
596
|
+
this._$AM === void 0 && (this._$Cm = e, (t = this._$AP) === null || t === void 0 || t.call(this, e));
|
597
|
+
}
|
598
|
+
}, he = class {
|
599
|
+
constructor(e, t, s, i, r) {
|
600
|
+
this.type = 1, this._$AH = g, this._$AN = void 0, this.element = e, this.name = t, this._$AM = i, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = g;
|
601
|
+
}
|
602
|
+
get tagName() {
|
603
|
+
return this.element.tagName;
|
604
|
+
}
|
605
|
+
get _$AU() {
|
606
|
+
return this._$AM._$AU;
|
607
|
+
}
|
608
|
+
_$AI(e, t = this, s, i) {
|
609
|
+
const r = this.strings;
|
610
|
+
let o = !1;
|
611
|
+
if (r === void 0) e = L(this, e, t, 0), o = !W(e) || e !== this._$AH && e !== G, o && (this._$AH = e);
|
612
|
+
else {
|
613
|
+
const c = e;
|
614
|
+
let a, l;
|
615
|
+
for (e = r[0], a = 0; a < r.length - 1; a++) l = L(this, c[s + a], t, a), l === G && (l = this._$AH[a]), o || (o = !W(l) || l !== this._$AH[a]), l === g ? e = g : e !== g && (e += (l ?? "") + r[a + 1]), this._$AH[a] = l;
|
616
|
+
}
|
617
|
+
o && !i && this.j(e);
|
618
|
+
}
|
619
|
+
j(e) {
|
620
|
+
e === g ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
621
|
+
}
|
622
|
+
}, Jt = class extends he {
|
623
|
+
constructor() {
|
624
|
+
super(...arguments), this.type = 3;
|
625
|
+
}
|
626
|
+
j(e) {
|
627
|
+
this.element[this.name] = e === g ? void 0 : e;
|
628
|
+
}
|
629
|
+
};
|
630
|
+
const Xt = I ? I.emptyScript : "";
|
631
|
+
let Qt = class extends he {
|
632
|
+
constructor() {
|
633
|
+
super(...arguments), this.type = 4;
|
634
|
+
}
|
635
|
+
j(e) {
|
636
|
+
e && e !== g ? this.element.setAttribute(this.name, Xt) : this.element.removeAttribute(this.name);
|
637
|
+
}
|
638
|
+
}, en = class extends he {
|
639
|
+
constructor(e, t, s, i, r) {
|
640
|
+
super(e, t, s, i, r), this.type = 5;
|
641
|
+
}
|
642
|
+
_$AI(e, t = this) {
|
643
|
+
var s;
|
644
|
+
if ((e = (s = L(this, e, t, 0)) !== null && s !== void 0 ? s : g) === G) return;
|
645
|
+
const i = this._$AH, r = e === g && i !== g || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, o = e !== g && (i === g || r);
|
646
|
+
r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
647
|
+
}
|
648
|
+
handleEvent(e) {
|
649
|
+
var t, s;
|
650
|
+
typeof this._$AH == "function" ? this._$AH.call((s = (t = this.options) === null || t === void 0 ? void 0 : t.host) !== null && s !== void 0 ? s : this.element, e) : this._$AH.handleEvent(e);
|
651
|
+
}
|
652
|
+
}, tn = class {
|
653
|
+
constructor(e, t, s) {
|
654
|
+
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = s;
|
655
|
+
}
|
656
|
+
get _$AU() {
|
657
|
+
return this._$AM._$AU;
|
658
|
+
}
|
659
|
+
_$AI(e) {
|
660
|
+
L(this, e);
|
661
|
+
}
|
662
|
+
};
|
663
|
+
const De = ae.litHtmlPolyfillSupport;
|
664
|
+
De == null || De(be, ht), ((fe = ae.litHtmlVersions) !== null && fe !== void 0 ? fe : ae.litHtmlVersions = []).push("2.6.1");
|
665
|
+
/**
|
666
|
+
* @license
|
667
|
+
* Copyright 2017 Google LLC
|
668
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
669
|
+
*/
|
670
|
+
var ye;
|
671
|
+
const ue = window, U = ue.trustedTypes, je = U ? U.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Se = "$lit$", C = `lit$${(Math.random() + "").slice(9)}$`, ct = "?" + C, nn = `<${ct}>`, R = document, K = () => R.createComment(""), Y = (n) => n === null || typeof n != "object" && typeof n != "function", pt = Array.isArray, sn = (n) => pt(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", $e = `[
|
672
|
+
\f\r]`, V = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ve = /-->/g, ze = />/g, P = RegExp(`>|${$e}(?:([^\\s"'>=/]+)(${$e}*=${$e}*(?:[^
|
673
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Fe = /'/g, We = /"/g, mt = /^(?:script|style|textarea|title)$/i, rn = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), on = rn(1), q = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), Ge = /* @__PURE__ */ new WeakMap(), T = R.createTreeWalker(R, 129, null, !1);
|
674
|
+
function ft(n, e) {
|
675
|
+
if (!Array.isArray(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
676
|
+
return je !== void 0 ? je.createHTML(e) : e;
|
677
|
+
}
|
678
|
+
const an = (n, e) => {
|
679
|
+
const t = n.length - 1, s = [];
|
680
|
+
let i, r = e === 2 ? "<svg>" : "", o = V;
|
681
|
+
for (let c = 0; c < t; c++) {
|
682
|
+
const a = n[c];
|
683
|
+
let l, f, h = -1, p = 0;
|
684
|
+
for (; p < a.length && (o.lastIndex = p, f = o.exec(a), f !== null); ) p = o.lastIndex, o === V ? f[1] === "!--" ? o = Ve : f[1] !== void 0 ? o = ze : f[2] !== void 0 ? (mt.test(f[2]) && (i = RegExp("</" + f[2], "g")), o = P) : f[3] !== void 0 && (o = P) : o === P ? f[0] === ">" ? (o = i ?? V, h = -1) : f[1] === void 0 ? h = -2 : (h = o.lastIndex - f[2].length, l = f[1], o = f[3] === void 0 ? P : f[3] === '"' ? We : Fe) : o === We || o === Fe ? o = P : o === Ve || o === ze ? o = V : (o = P, i = void 0);
|
685
|
+
const _ = o === P && n[c + 1].startsWith("/>") ? " " : "";
|
686
|
+
r += o === V ? a + nn : h >= 0 ? (s.push(l), a.slice(0, h) + Se + a.slice(h) + C + _) : a + C + (h === -2 ? (s.push(void 0), c) : _);
|
687
|
+
}
|
688
|
+
return [ft(n, r + (n[t] || "<?>") + (e === 2 ? "</svg>" : "")), s];
|
689
|
+
};
|
690
|
+
class Z {
|
691
|
+
constructor({ strings: e, _$litType$: t }, s) {
|
692
|
+
let i;
|
693
|
+
this.parts = [];
|
694
|
+
let r = 0, o = 0;
|
695
|
+
const c = e.length - 1, a = this.parts, [l, f] = an(e, t);
|
696
|
+
if (this.el = Z.createElement(l, s), T.currentNode = this.el.content, t === 2) {
|
697
|
+
const h = this.el.content, p = h.firstChild;
|
698
|
+
p.remove(), h.append(...p.childNodes);
|
699
|
+
}
|
700
|
+
for (; (i = T.nextNode()) !== null && a.length < c; ) {
|
701
|
+
if (i.nodeType === 1) {
|
702
|
+
if (i.hasAttributes()) {
|
703
|
+
const h = [];
|
704
|
+
for (const p of i.getAttributeNames()) if (p.endsWith(Se) || p.startsWith(C)) {
|
705
|
+
const _ = f[o++];
|
706
|
+
if (h.push(p), _ !== void 0) {
|
707
|
+
const M = i.getAttribute(_.toLowerCase() + Se).split(C), w = /([.?@])?(.*)/.exec(_);
|
708
|
+
a.push({ type: 1, index: r, name: w[2], strings: M, ctor: w[1] === "." ? un : w[1] === "?" ? dn : w[1] === "@" ? cn : de });
|
709
|
+
} else a.push({ type: 6, index: r });
|
710
|
+
}
|
711
|
+
for (const p of h) i.removeAttribute(p);
|
712
|
+
}
|
713
|
+
if (mt.test(i.tagName)) {
|
714
|
+
const h = i.textContent.split(C), p = h.length - 1;
|
715
|
+
if (p > 0) {
|
716
|
+
i.textContent = U ? U.emptyScript : "";
|
717
|
+
for (let _ = 0; _ < p; _++) i.append(h[_], K()), T.nextNode(), a.push({ type: 2, index: ++r });
|
718
|
+
i.append(h[p], K());
|
719
|
+
}
|
720
|
+
}
|
721
|
+
} else if (i.nodeType === 8) if (i.data === ct) a.push({ type: 2, index: r });
|
722
|
+
else {
|
723
|
+
let h = -1;
|
724
|
+
for (; (h = i.data.indexOf(C, h + 1)) !== -1; ) a.push({ type: 7, index: r }), h += C.length - 1;
|
725
|
+
}
|
726
|
+
r++;
|
727
|
+
}
|
728
|
+
}
|
729
|
+
static createElement(e, t) {
|
730
|
+
const s = R.createElement("template");
|
731
|
+
return s.innerHTML = e, s;
|
732
|
+
}
|
733
|
+
}
|
734
|
+
function B(n, e, t = n, s) {
|
735
|
+
var i, r, o, c;
|
736
|
+
if (e === q) return e;
|
737
|
+
let a = s !== void 0 ? (i = t._$Co) === null || i === void 0 ? void 0 : i[s] : t._$Cl;
|
738
|
+
const l = Y(e) ? void 0 : e._$litDirective$;
|
739
|
+
return (a == null ? void 0 : a.constructor) !== l && ((r = a == null ? void 0 : a._$AO) === null || r === void 0 || r.call(a, !1), l === void 0 ? a = void 0 : (a = new l(n), a._$AT(n, t, s)), s !== void 0 ? ((o = (c = t)._$Co) !== null && o !== void 0 ? o : c._$Co = [])[s] = a : t._$Cl = a), a !== void 0 && (e = B(n, a._$AS(n, e.values), a, s)), e;
|
740
|
+
}
|
741
|
+
class ln {
|
742
|
+
constructor(e, t) {
|
743
|
+
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
744
|
+
}
|
745
|
+
get parentNode() {
|
746
|
+
return this._$AM.parentNode;
|
747
|
+
}
|
748
|
+
get _$AU() {
|
749
|
+
return this._$AM._$AU;
|
750
|
+
}
|
751
|
+
u(e) {
|
752
|
+
var t;
|
753
|
+
const { el: { content: s }, parts: i } = this._$AD, r = ((t = e == null ? void 0 : e.creationScope) !== null && t !== void 0 ? t : R).importNode(s, !0);
|
754
|
+
T.currentNode = r;
|
755
|
+
let o = T.nextNode(), c = 0, a = 0, l = i[0];
|
756
|
+
for (; l !== void 0; ) {
|
757
|
+
if (c === l.index) {
|
758
|
+
let f;
|
759
|
+
l.type === 2 ? f = new J(o, o.nextSibling, this, e) : l.type === 1 ? f = new l.ctor(o, l.name, l.strings, this, e) : l.type === 6 && (f = new pn(o, this, e)), this._$AV.push(f), l = i[++a];
|
760
|
+
}
|
761
|
+
c !== (l == null ? void 0 : l.index) && (o = T.nextNode(), c++);
|
762
|
+
}
|
763
|
+
return T.currentNode = R, r;
|
764
|
+
}
|
765
|
+
v(e) {
|
766
|
+
let t = 0;
|
767
|
+
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(e, s, t), t += s.strings.length - 2) : s._$AI(e[t])), t++;
|
768
|
+
}
|
769
|
+
}
|
770
|
+
class J {
|
771
|
+
constructor(e, t, s, i) {
|
772
|
+
var r;
|
773
|
+
this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = s, this.options = i, this._$Cp = (r = i == null ? void 0 : i.isConnected) === null || r === void 0 || r;
|
774
|
+
}
|
775
|
+
get _$AU() {
|
776
|
+
var e, t;
|
777
|
+
return (t = (e = this._$AM) === null || e === void 0 ? void 0 : e._$AU) !== null && t !== void 0 ? t : this._$Cp;
|
778
|
+
}
|
779
|
+
get parentNode() {
|
780
|
+
let e = this._$AA.parentNode;
|
781
|
+
const t = this._$AM;
|
782
|
+
return t !== void 0 && (e == null ? void 0 : e.nodeType) === 11 && (e = t.parentNode), e;
|
783
|
+
}
|
784
|
+
get startNode() {
|
785
|
+
return this._$AA;
|
786
|
+
}
|
787
|
+
get endNode() {
|
788
|
+
return this._$AB;
|
789
|
+
}
|
790
|
+
_$AI(e, t = this) {
|
791
|
+
e = B(this, e, t), Y(e) ? e === A || e == null || e === "" ? (this._$AH !== A && this._$AR(), this._$AH = A) : e !== this._$AH && e !== q && this._(e) : e._$litType$ !== void 0 ? this.g(e) : e.nodeType !== void 0 ? this.$(e) : sn(e) ? this.T(e) : this._(e);
|
792
|
+
}
|
793
|
+
k(e) {
|
794
|
+
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
795
|
+
}
|
796
|
+
$(e) {
|
797
|
+
this._$AH !== e && (this._$AR(), this._$AH = this.k(e));
|
798
|
+
}
|
799
|
+
_(e) {
|
800
|
+
this._$AH !== A && Y(this._$AH) ? this._$AA.nextSibling.data = e : this.$(R.createTextNode(e)), this._$AH = e;
|
801
|
+
}
|
802
|
+
g(e) {
|
803
|
+
var t;
|
804
|
+
const { values: s, _$litType$: i } = e, r = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = Z.createElement(ft(i.h, i.h[0]), this.options)), i);
|
805
|
+
if (((t = this._$AH) === null || t === void 0 ? void 0 : t._$AD) === r) this._$AH.v(s);
|
806
|
+
else {
|
807
|
+
const o = new ln(r, this), c = o.u(this.options);
|
808
|
+
o.v(s), this.$(c), this._$AH = o;
|
809
|
+
}
|
810
|
+
}
|
811
|
+
_$AC(e) {
|
812
|
+
let t = Ge.get(e.strings);
|
813
|
+
return t === void 0 && Ge.set(e.strings, t = new Z(e)), t;
|
814
|
+
}
|
815
|
+
T(e) {
|
816
|
+
pt(this._$AH) || (this._$AH = [], this._$AR());
|
817
|
+
const t = this._$AH;
|
818
|
+
let s, i = 0;
|
819
|
+
for (const r of e) i === t.length ? t.push(s = new J(this.k(K()), this.k(K()), this, this.options)) : s = t[i], s._$AI(r), i++;
|
820
|
+
i < t.length && (this._$AR(s && s._$AB.nextSibling, i), t.length = i);
|
821
|
+
}
|
822
|
+
_$AR(e = this._$AA.nextSibling, t) {
|
823
|
+
var s;
|
824
|
+
for ((s = this._$AP) === null || s === void 0 || s.call(this, !1, !0, t); e && e !== this._$AB; ) {
|
825
|
+
const i = e.nextSibling;
|
826
|
+
e.remove(), e = i;
|
827
|
+
}
|
828
|
+
}
|
829
|
+
setConnected(e) {
|
830
|
+
var t;
|
831
|
+
this._$AM === void 0 && (this._$Cp = e, (t = this._$AP) === null || t === void 0 || t.call(this, e));
|
832
|
+
}
|
833
|
+
}
|
834
|
+
class de {
|
835
|
+
constructor(e, t, s, i, r) {
|
836
|
+
this.type = 1, this._$AH = A, this._$AN = void 0, this.element = e, this.name = t, this._$AM = i, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = A;
|
837
|
+
}
|
838
|
+
get tagName() {
|
839
|
+
return this.element.tagName;
|
840
|
+
}
|
841
|
+
get _$AU() {
|
842
|
+
return this._$AM._$AU;
|
843
|
+
}
|
844
|
+
_$AI(e, t = this, s, i) {
|
845
|
+
const r = this.strings;
|
846
|
+
let o = !1;
|
847
|
+
if (r === void 0) e = B(this, e, t, 0), o = !Y(e) || e !== this._$AH && e !== q, o && (this._$AH = e);
|
848
|
+
else {
|
849
|
+
const c = e;
|
850
|
+
let a, l;
|
851
|
+
for (e = r[0], a = 0; a < r.length - 1; a++) l = B(this, c[s + a], t, a), l === q && (l = this._$AH[a]), o || (o = !Y(l) || l !== this._$AH[a]), l === A ? e = A : e !== A && (e += (l ?? "") + r[a + 1]), this._$AH[a] = l;
|
852
|
+
}
|
853
|
+
o && !i && this.j(e);
|
854
|
+
}
|
855
|
+
j(e) {
|
856
|
+
e === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
857
|
+
}
|
858
|
+
}
|
859
|
+
class un extends de {
|
860
|
+
constructor() {
|
861
|
+
super(...arguments), this.type = 3;
|
862
|
+
}
|
863
|
+
j(e) {
|
864
|
+
this.element[this.name] = e === A ? void 0 : e;
|
865
|
+
}
|
866
|
+
}
|
867
|
+
const hn = U ? U.emptyScript : "";
|
868
|
+
class dn extends de {
|
869
|
+
constructor() {
|
870
|
+
super(...arguments), this.type = 4;
|
871
|
+
}
|
872
|
+
j(e) {
|
873
|
+
e && e !== A ? this.element.setAttribute(this.name, hn) : this.element.removeAttribute(this.name);
|
874
|
+
}
|
875
|
+
}
|
876
|
+
class cn extends de {
|
877
|
+
constructor(e, t, s, i, r) {
|
878
|
+
super(e, t, s, i, r), this.type = 5;
|
879
|
+
}
|
880
|
+
_$AI(e, t = this) {
|
881
|
+
var s;
|
882
|
+
if ((e = (s = B(this, e, t, 0)) !== null && s !== void 0 ? s : A) === q) return;
|
883
|
+
const i = this._$AH, r = e === A && i !== A || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, o = e !== A && (i === A || r);
|
884
|
+
r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
885
|
+
}
|
886
|
+
handleEvent(e) {
|
887
|
+
var t, s;
|
888
|
+
typeof this._$AH == "function" ? this._$AH.call((s = (t = this.options) === null || t === void 0 ? void 0 : t.host) !== null && s !== void 0 ? s : this.element, e) : this._$AH.handleEvent(e);
|
889
|
+
}
|
890
|
+
}
|
891
|
+
class pn {
|
892
|
+
constructor(e, t, s) {
|
893
|
+
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = s;
|
894
|
+
}
|
895
|
+
get _$AU() {
|
896
|
+
return this._$AM._$AU;
|
897
|
+
}
|
898
|
+
_$AI(e) {
|
899
|
+
B(this, e);
|
900
|
+
}
|
901
|
+
}
|
902
|
+
const Ke = ue.litHtmlPolyfillSupport;
|
903
|
+
Ke == null || Ke(Z, J), ((ye = ue.litHtmlVersions) !== null && ye !== void 0 ? ye : ue.litHtmlVersions = []).push("2.8.0");
|
904
|
+
const mn = (n, e, t) => {
|
905
|
+
var s, i;
|
906
|
+
const r = (s = t == null ? void 0 : t.renderBefore) !== null && s !== void 0 ? s : e;
|
907
|
+
let o = r._$litPart$;
|
908
|
+
if (o === void 0) {
|
909
|
+
const c = (i = t == null ? void 0 : t.renderBefore) !== null && i !== void 0 ? i : null;
|
910
|
+
r._$litPart$ = o = new J(e.insertBefore(K(), c), c, void 0, t ?? {});
|
911
|
+
}
|
912
|
+
return o._$AI(n), o;
|
913
|
+
};
|
914
|
+
/**
|
915
|
+
* @license
|
916
|
+
* Copyright 2017 Google LLC
|
917
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
918
|
+
*/
|
919
|
+
var _e, ge;
|
920
|
+
class F extends O {
|
921
|
+
constructor() {
|
922
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
923
|
+
}
|
924
|
+
createRenderRoot() {
|
925
|
+
var e, t;
|
926
|
+
const s = super.createRenderRoot();
|
927
|
+
return (e = (t = this.renderOptions).renderBefore) !== null && e !== void 0 || (t.renderBefore = s.firstChild), s;
|
928
|
+
}
|
929
|
+
update(e) {
|
930
|
+
const t = this.render();
|
931
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = mn(t, this.renderRoot, this.renderOptions);
|
932
|
+
}
|
933
|
+
connectedCallback() {
|
934
|
+
var e;
|
935
|
+
super.connectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!0);
|
936
|
+
}
|
937
|
+
disconnectedCallback() {
|
938
|
+
var e;
|
939
|
+
super.disconnectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!1);
|
940
|
+
}
|
941
|
+
render() {
|
942
|
+
return q;
|
943
|
+
}
|
944
|
+
}
|
945
|
+
F.finalized = !0, F._$litElement$ = !0, (_e = globalThis.litElementHydrateSupport) === null || _e === void 0 || _e.call(globalThis, { LitElement: F });
|
946
|
+
const Ye = globalThis.litElementPolyfillSupport;
|
947
|
+
Ye == null || Ye({ LitElement: F });
|
948
|
+
((ge = globalThis.litElementVersions) !== null && ge !== void 0 ? ge : globalThis.litElementVersions = []).push("3.3.3");
|
949
|
+
/**
|
950
|
+
* @license
|
951
|
+
* Copyright 2018 Google LLC
|
952
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
953
|
+
*/
|
954
|
+
const fn = (n) => n ?? g, yn = /[A-ZÀ-ÖÙ-Ý]+/g, $n = /[a-zà-öù-ý]+/g;
|
955
|
+
function _n(n) {
|
956
|
+
const e = n.replace(yn, t).match($n);
|
957
|
+
return e ? e.join("-") : "";
|
958
|
+
function t(s) {
|
959
|
+
return " " + (s.length > 2 ? s.slice(0, -1) + " " + s.slice(-1) : s).toLowerCase();
|
960
|
+
}
|
961
|
+
}
|
962
|
+
function gn() {
|
963
|
+
const n = {};
|
964
|
+
return {
|
965
|
+
has: (e) => Object.hasOwnProperty.call(n, e),
|
966
|
+
get: (e) => n[e],
|
967
|
+
set: (e, t) => {
|
968
|
+
n[e] = t;
|
969
|
+
}
|
970
|
+
};
|
971
|
+
}
|
972
|
+
function An(n, e) {
|
973
|
+
const t = gn();
|
974
|
+
return (...s) => {
|
975
|
+
const i = n(...s);
|
976
|
+
return t.has(i) || t.set(i, e(...s)), t.get(i);
|
977
|
+
};
|
978
|
+
}
|
979
|
+
var vn = (n) => n, yt = An(vn, _n), bn = (n) => (e) => n.includes(e), Sn = bn(["paymentMethod", "source", "token"]);
|
980
|
+
async function wn(n) {
|
981
|
+
const { ok: e, statusText: t } = n;
|
982
|
+
if (!e)
|
983
|
+
throw new Error(t);
|
984
|
+
return n;
|
985
|
+
}
|
986
|
+
function En(n) {
|
987
|
+
return "addInitializer" in n.constructor;
|
988
|
+
}
|
989
|
+
var z = class {
|
990
|
+
constructor(n) {
|
991
|
+
if (this.host = n, this.values = /* @__PURE__ */ new Map(), z.instances.has(n))
|
992
|
+
return z.instances.get(n);
|
993
|
+
n.addController(this), z.instances.set(n, this);
|
994
|
+
}
|
995
|
+
static for(n) {
|
996
|
+
return new z(n);
|
997
|
+
}
|
998
|
+
hostConnected() {
|
999
|
+
}
|
1000
|
+
set(n, e) {
|
1001
|
+
const t = this.values.get(n);
|
1002
|
+
this.values.set(n, e), En(this.host) ? this.host.requestUpdate(n, t) : this.host.requestUpdate();
|
1003
|
+
}
|
1004
|
+
}, xe = z;
|
1005
|
+
xe.instances = /* @__PURE__ */ new Map();
|
1006
|
+
function m(n, e) {
|
1007
|
+
const t = n.constructor;
|
1008
|
+
t.addInitializer((s) => {
|
1009
|
+
const i = xe.for(s);
|
1010
|
+
Object.defineProperty(s.constructor.prototype, e, {
|
1011
|
+
enumerable: !0,
|
1012
|
+
configurable: !0,
|
1013
|
+
get() {
|
1014
|
+
return i.values.get(e);
|
1015
|
+
},
|
1016
|
+
set(r) {
|
1017
|
+
i.values.has(e) || i.values.set(e, r);
|
1018
|
+
}
|
1019
|
+
}), t.createProperty(e, {
|
1020
|
+
...t.getPropertyOptions(e),
|
1021
|
+
noAccessor: !0
|
1022
|
+
});
|
1023
|
+
});
|
1024
|
+
}
|
1025
|
+
m.set = function(n, e) {
|
1026
|
+
const t = xe.for(n);
|
1027
|
+
for (const [s, i] of Object.entries(e))
|
1028
|
+
t.set(s, i);
|
1029
|
+
};
|
1030
|
+
var Cn = class extends Event {
|
1031
|
+
constructor(n, e, t, s) {
|
1032
|
+
super(`${s ?? n.toLowerCase()}-changed`), this.key = n, this.oldValue = e, this.value = t, this.detail = { value: t };
|
1033
|
+
}
|
1034
|
+
}, ne = class {
|
1035
|
+
constructor(n) {
|
1036
|
+
if (this.host = n, this.cache = /* @__PURE__ */ new Map(), ne.instances.has(n))
|
1037
|
+
return ne.instances.get(n);
|
1038
|
+
n.addController(this), ne.instances.set(n, this);
|
1039
|
+
}
|
1040
|
+
hostUpdated() {
|
1041
|
+
for (const [n, e] of this.cache) {
|
1042
|
+
const t = this.host[n], { attribute: s } = this.host.constructor.getPropertyOptions(n) ?? {}, i = typeof s == "string" ? s : null;
|
1043
|
+
this.cache.set(n, t), this.host.dispatchEvent(new Cn(n, e, t, i));
|
1044
|
+
}
|
1045
|
+
}
|
1046
|
+
}, $t = ne;
|
1047
|
+
$t.instances = /* @__PURE__ */ new Map();
|
1048
|
+
function b(n, e) {
|
1049
|
+
n.constructor.addInitializer((t) => {
|
1050
|
+
new $t(t).cache.set(e, t[e]);
|
1051
|
+
});
|
1052
|
+
}
|
1053
|
+
function xn(n) {
|
1054
|
+
return (e, t, s) => {
|
1055
|
+
const i = s.value;
|
1056
|
+
return s.value = n(i), s;
|
1057
|
+
};
|
1058
|
+
}
|
1059
|
+
var Pe = xn(function(n) {
|
1060
|
+
const { name: e } = n;
|
1061
|
+
return async function(...t) {
|
1062
|
+
if (!this.stripe)
|
1063
|
+
throw new Error(`<${this.constructor.is}>: Stripe must be initialized before calling ${e}.`);
|
1064
|
+
return n.call(this, ...t).then(this.handleResponse);
|
1065
|
+
};
|
1066
|
+
});
|
1067
|
+
function Ze(n) {
|
1068
|
+
if (n.error)
|
1069
|
+
throw n.error;
|
1070
|
+
return n;
|
1071
|
+
}
|
1072
|
+
var Pn = Object.defineProperty, Tn = Object.getOwnPropertyDescriptor, u = (n, e, t, s) => {
|
1073
|
+
for (var i = s > 1 ? void 0 : s ? Tn(e, t) : e, r = n.length - 1, o; r >= 0; r--)
|
1074
|
+
(o = n[r]) && (i = (s ? o(e, t, i) : o(i)) || i);
|
1075
|
+
return s && i && Pn(e, t, i), i;
|
1076
|
+
}, _t = (n, e, t) => {
|
1077
|
+
if (!e.has(n))
|
1078
|
+
throw TypeError("Cannot " + t);
|
1079
|
+
}, Je = (n, e, t) => (_t(n, e, "read from private field"), t ? t.call(n) : e.get(n)), Xe = (n, e, t) => {
|
1080
|
+
if (e.has(n))
|
1081
|
+
throw TypeError("Cannot add the same private member more than once");
|
1082
|
+
e instanceof WeakSet ? e.add(n) : e.set(n, t);
|
1083
|
+
}, Qe = (n, e, t, s) => (_t(n, e, "write to private field"), e.set(n, t), t);
|
1084
|
+
function et() {
|
1085
|
+
return (Date.now() + Math.random() * 1e3).toString(36).substr(0, 8);
|
1086
|
+
}
|
1087
|
+
var Rn = class {
|
1088
|
+
constructor(n, e) {
|
1089
|
+
var t;
|
1090
|
+
this.host = n, this.options = e, this.initialized = !1, this.shadowHosts = [], this.host.addController(this), this.mountId = this.resetMountId(), this.slotName = ((t = this.options) == null ? void 0 : t.slotName) ?? `breadcrumb-${et()}`;
|
1091
|
+
}
|
1092
|
+
get mount() {
|
1093
|
+
return document.getElementById(this.mountId);
|
1094
|
+
}
|
1095
|
+
hostUpdated() {
|
1096
|
+
var n;
|
1097
|
+
!this.initialized && ((n = this.options) == null ? void 0 : n.autoInitialize) !== !1 && this.init();
|
1098
|
+
}
|
1099
|
+
hostDisconnected() {
|
1100
|
+
this.destroyMountPoints();
|
1101
|
+
}
|
1102
|
+
resetMountId() {
|
1103
|
+
var e;
|
1104
|
+
return `${((e = this.options) == null ? void 0 : e.mountPrefix) ?? this.host.localName}-mount-point-${et()}`;
|
1105
|
+
}
|
1106
|
+
createMountPoint() {
|
1107
|
+
const n = document.createElement("div");
|
1108
|
+
return n.id = this.mountId, n.classList.add(`${this.host.tagName.toLowerCase()}-mount`), n;
|
1109
|
+
}
|
1110
|
+
createSlot(n) {
|
1111
|
+
const e = document.createElement("slot");
|
1112
|
+
return e.slot = n, e.name = n, e;
|
1113
|
+
}
|
1114
|
+
appendTemplate(n, e = this.createMountPoint()) {
|
1115
|
+
return n.appendChild(e), e;
|
1116
|
+
}
|
1117
|
+
initMountPoints() {
|
1118
|
+
this.initShadowMountPoints();
|
1119
|
+
}
|
1120
|
+
destroyMountPoints() {
|
1121
|
+
for (const n of this.shadowHosts)
|
1122
|
+
for (const e of n.querySelectorAll(`[slot="${this.slotName}"][name="${this.slotName}"]`))
|
1123
|
+
e.remove();
|
1124
|
+
this.mount && this.mount.remove(), this.mountId = this.resetMountId();
|
1125
|
+
}
|
1126
|
+
initShadowMountPoints() {
|
1127
|
+
let n = this.host;
|
1128
|
+
for (this.shadowHosts = [this.host]; n = n.getRootNode().host; )
|
1129
|
+
this.shadowHosts.push(n);
|
1130
|
+
const { shadowHosts: e, slotName: t } = this, s = [...e], i = s.pop();
|
1131
|
+
if (!i.querySelector(`[slot="${t}"]`)) {
|
1132
|
+
const o = document.createElement("div");
|
1133
|
+
o.slot = t, i.appendChild(o);
|
1134
|
+
}
|
1135
|
+
const r = i.querySelector(`[slot="${t}"]`);
|
1136
|
+
this.appendTemplate(r), s.forEach((o) => this.appendTemplate(o, this.createSlot(t)));
|
1137
|
+
}
|
1138
|
+
init() {
|
1139
|
+
this.destroyMountPoints(), this.initMountPoints(), this.initialized = !0;
|
1140
|
+
}
|
1141
|
+
};
|
1142
|
+
function se(n) {
|
1143
|
+
"@babel/helpers - typeof";
|
1144
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? se = function(e) {
|
1145
|
+
return typeof e;
|
1146
|
+
} : se = function(e) {
|
1147
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
1148
|
+
}, se(n);
|
1149
|
+
}
|
1150
|
+
var gt = "https://js.stripe.com/v3", Mn = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, tt = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", kn = function() {
|
1151
|
+
for (var e = document.querySelectorAll('script[src^="'.concat(gt, '"]')), t = 0; t < e.length; t++) {
|
1152
|
+
var s = e[t];
|
1153
|
+
if (Mn.test(s.src))
|
1154
|
+
return s;
|
1155
|
+
}
|
1156
|
+
return null;
|
1157
|
+
}, On = function(e) {
|
1158
|
+
var t = e && !e.advancedFraudSignals ? "?advancedFraudSignals=false" : "", s = document.createElement("script");
|
1159
|
+
s.src = "".concat(gt).concat(t);
|
1160
|
+
var i = document.head || document.body;
|
1161
|
+
if (!i)
|
1162
|
+
throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
|
1163
|
+
return i.appendChild(s), s;
|
1164
|
+
}, Nn = function(e, t) {
|
1165
|
+
!e || !e._registerWrapper || e._registerWrapper({
|
1166
|
+
name: "stripe-js",
|
1167
|
+
version: "1.32.0",
|
1168
|
+
startTime: t
|
1169
|
+
});
|
1170
|
+
}, Q = null, In = function(e) {
|
1171
|
+
return Q !== null || (Q = new Promise(function(t, s) {
|
1172
|
+
if (typeof window > "u") {
|
1173
|
+
t(null);
|
1174
|
+
return;
|
1175
|
+
}
|
1176
|
+
if (window.Stripe && e && console.warn(tt), window.Stripe) {
|
1177
|
+
t(window.Stripe);
|
1178
|
+
return;
|
1179
|
+
}
|
1180
|
+
try {
|
1181
|
+
var i = kn();
|
1182
|
+
i && e ? console.warn(tt) : i || (i = On(e)), i.addEventListener("load", function() {
|
1183
|
+
window.Stripe ? t(window.Stripe) : s(new Error("Stripe.js not available"));
|
1184
|
+
}), i.addEventListener("error", function() {
|
1185
|
+
s(new Error("Failed to load Stripe.js"));
|
1186
|
+
});
|
1187
|
+
} catch (r) {
|
1188
|
+
s(r);
|
1189
|
+
return;
|
1190
|
+
}
|
1191
|
+
})), Q;
|
1192
|
+
}, Hn = function(e, t, s) {
|
1193
|
+
if (e === null)
|
1194
|
+
return null;
|
1195
|
+
var i = e.apply(void 0, t);
|
1196
|
+
return Nn(i, s), i;
|
1197
|
+
}, Ln = function(e) {
|
1198
|
+
var t = `invalid load parameters; expected object of shape
|
1199
|
+
|
1200
|
+
{advancedFraudSignals: boolean}
|
1201
|
+
|
1202
|
+
but received
|
1203
|
+
|
1204
|
+
`.concat(JSON.stringify(e), `
|
1205
|
+
`);
|
1206
|
+
if (e === null || se(e) !== "object")
|
1207
|
+
throw new Error(t);
|
1208
|
+
if (Object.keys(e).length === 1 && typeof e.advancedFraudSignals == "boolean")
|
1209
|
+
return e;
|
1210
|
+
throw new Error(t);
|
1211
|
+
}, At, vt = !1, bt = function() {
|
1212
|
+
for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++)
|
1213
|
+
t[s] = arguments[s];
|
1214
|
+
vt = !0;
|
1215
|
+
var i = Date.now();
|
1216
|
+
return In(At).then(function(r) {
|
1217
|
+
return Hn(r, t, i);
|
1218
|
+
});
|
1219
|
+
};
|
1220
|
+
bt.setLoadParameters = function(n) {
|
1221
|
+
if (vt)
|
1222
|
+
throw new Error("You cannot change load parameters after calling loadStripe");
|
1223
|
+
At = Ln(n);
|
1224
|
+
};
|
1225
|
+
var St = class extends Error {
|
1226
|
+
constructor(n, e) {
|
1227
|
+
super(`<${n}>: ${e}`), this.originalMessage = e;
|
1228
|
+
}
|
1229
|
+
};
|
1230
|
+
function wt(n) {
|
1231
|
+
return !!n && n instanceof St;
|
1232
|
+
}
|
1233
|
+
var Un = {
|
1234
|
+
toAttribute: (n) => n ? wt(n) ? n.originalMessage : n.message || "" : null
|
1235
|
+
}, y = class extends F {
|
1236
|
+
constructor() {
|
1237
|
+
super(...arguments), this.generate = "source", this.showError = !1, this.locale = "auto", this.paymentMethod = null, this.source = null, this.token = null, this.element = null, this.elements = null, this.error = null, this.focused = !1, this.ready = !1, this.stripe = null, this.theme = "none", this.precomputedStyle = getComputedStyle(this), this.breadcrumb = new Rn(this, {
|
1238
|
+
slotName: `${this.constructor.is}-slot`
|
1239
|
+
});
|
1240
|
+
}
|
1241
|
+
get stripeMountId() {
|
1242
|
+
return this.breadcrumb.mountId;
|
1243
|
+
}
|
1244
|
+
get stripeMount() {
|
1245
|
+
return this.breadcrumb.mount;
|
1246
|
+
}
|
1247
|
+
render() {
|
1248
|
+
const { error: n, showError: e } = this, { slotName: t } = this.breadcrumb, s = wt(n) ? n.originalMessage : n == null ? void 0 : n.message;
|
1249
|
+
return on`
|
1250
|
+
<div id="stripe" part="stripe">
|
1251
|
+
<slot id="stripe-slot" name="${t}"></slot>
|
1252
|
+
</div>
|
1253
|
+
|
1254
|
+
<output id="error"
|
1255
|
+
for="stripe"
|
1256
|
+
part="error"
|
1257
|
+
?hidden="${!e}">
|
1258
|
+
${fn(s)}
|
1259
|
+
</output>
|
1260
|
+
`;
|
1261
|
+
}
|
1262
|
+
updated(n) {
|
1263
|
+
var e;
|
1264
|
+
(e = super.updated) == null || e.call(this, n), n.has("error") && this.errorChanged(), n.has("publishableKey") && this.init(), [...n.keys()].forEach((t) => this.representationChanged(t));
|
1265
|
+
}
|
1266
|
+
async disconnectedCallback() {
|
1267
|
+
var n;
|
1268
|
+
super.disconnectedCallback(), await ((n = this.unmount) == null ? void 0 : n.call(this));
|
1269
|
+
}
|
1270
|
+
reset() {
|
1271
|
+
var n, e;
|
1272
|
+
(e = (n = this.element) == null ? void 0 : n.clear) == null || e.call(n), this.resetRepresentations(), m.set(this, { error: null });
|
1273
|
+
}
|
1274
|
+
blur() {
|
1275
|
+
var n;
|
1276
|
+
(n = this.element) == null || n.blur();
|
1277
|
+
}
|
1278
|
+
focus() {
|
1279
|
+
var n;
|
1280
|
+
(n = this.element) == null || n.focus();
|
1281
|
+
}
|
1282
|
+
createError(n) {
|
1283
|
+
return new St(this.constructor.is, n);
|
1284
|
+
}
|
1285
|
+
errorChanged() {
|
1286
|
+
this.resetRepresentations(), this.fireError(this.error);
|
1287
|
+
}
|
1288
|
+
fire(n, e, t) {
|
1289
|
+
this.dispatchEvent(new CustomEvent(n, { detail: e, ...t }));
|
1290
|
+
}
|
1291
|
+
fireError(n) {
|
1292
|
+
this.dispatchEvent(new ErrorEvent("error", { error: n }));
|
1293
|
+
}
|
1294
|
+
getCSSCustomPropertyValue(n) {
|
1295
|
+
return this.precomputedStyle.getPropertyValue(n);
|
1296
|
+
}
|
1297
|
+
async handleResponse(n) {
|
1298
|
+
const { error: e = null, paymentMethod: t = null, source: s = null, token: i = null } = { ...n };
|
1299
|
+
if (m.set(this, { error: e, paymentMethod: t, source: s, token: i }), await this.updateComplete, e)
|
1300
|
+
throw e;
|
1301
|
+
return n;
|
1302
|
+
}
|
1303
|
+
initElement() {
|
1304
|
+
"abstract";
|
1305
|
+
}
|
1306
|
+
async init() {
|
1307
|
+
await this.unmount(), await this.initStripe(), await this.initElement(), this.initElementListeners(), this.breadcrumb.init(), this.mount();
|
1308
|
+
}
|
1309
|
+
initElementListeners() {
|
1310
|
+
this.element && (this.element.on("ready", this.onReady), this.element.on("focus", this.onFocus), this.element.on("blur", this.onBlur));
|
1311
|
+
}
|
1312
|
+
async initStripe() {
|
1313
|
+
const { publishableKey: n, stripeAccount: e, locale: t } = this;
|
1314
|
+
if (!n)
|
1315
|
+
m.set(this, { elements: null, element: null, stripe: null });
|
1316
|
+
else
|
1317
|
+
try {
|
1318
|
+
const s = { stripeAccount: e, locale: t }, i = window.Stripe ? window.Stripe(n, s) : await bt(n, s), r = i == null ? void 0 : i.elements();
|
1319
|
+
m.set(this, { elements: r, error: null, stripe: i });
|
1320
|
+
} catch (s) {
|
1321
|
+
console.warn(s);
|
1322
|
+
const i = this.createError("Stripe.js must be loaded first.");
|
1323
|
+
m.set(this, { elements: null, error: i, stripe: null });
|
1324
|
+
} finally {
|
1325
|
+
await this.updateComplete;
|
1326
|
+
}
|
1327
|
+
}
|
1328
|
+
mount() {
|
1329
|
+
var n;
|
1330
|
+
if (!this.breadcrumb.mount)
|
1331
|
+
throw this.createError("Stripe Mount missing");
|
1332
|
+
(n = this.element) == null || n.mount(this.breadcrumb.mount);
|
1333
|
+
}
|
1334
|
+
async unmount() {
|
1335
|
+
var n, e;
|
1336
|
+
(e = (n = this.element) == null ? void 0 : n.unmount) == null || e.call(n), m.set(this, { element: null }), await this.updateComplete;
|
1337
|
+
}
|
1338
|
+
async onBlur() {
|
1339
|
+
m.set(this, { focused: !1 }), await this.updateComplete;
|
1340
|
+
}
|
1341
|
+
async onFocus() {
|
1342
|
+
m.set(this, { focused: !0 }), await this.updateComplete;
|
1343
|
+
}
|
1344
|
+
async onReady(n) {
|
1345
|
+
m.set(this, { ready: !0 }), await this.updateComplete, this.fire("ready", n);
|
1346
|
+
}
|
1347
|
+
async postRepresentation() {
|
1348
|
+
const n = (a) => m.set(this, { error: a }), e = (a) => this.fire("success", a), t = this.token || void 0, s = this.source || void 0, i = this.paymentMethod || void 0, r = JSON.stringify({ token: t, source: s, paymentMethod: i }), o = { "Content-Type": "application/json" };
|
1349
|
+
return fetch(this.action, { body: r, headers: o, method: "POST" }).then(wn).then(e).catch(n);
|
1350
|
+
}
|
1351
|
+
representationChanged(n) {
|
1352
|
+
if (!Sn(n))
|
1353
|
+
return;
|
1354
|
+
const e = this[n];
|
1355
|
+
e && (this.fire(`${yt(n)}`, e), this.action && this.postRepresentation());
|
1356
|
+
}
|
1357
|
+
resetRepresentations() {
|
1358
|
+
m.set(this, {
|
1359
|
+
paymentMethod: null,
|
1360
|
+
token: null,
|
1361
|
+
source: null
|
1362
|
+
});
|
1363
|
+
}
|
1364
|
+
};
|
1365
|
+
u([
|
1366
|
+
d({ type: String })
|
1367
|
+
], y.prototype, "action", 2);
|
1368
|
+
u([
|
1369
|
+
d({ type: String, attribute: "client-secret" })
|
1370
|
+
], y.prototype, "clientSecret", 2);
|
1371
|
+
u([
|
1372
|
+
d({ type: String })
|
1373
|
+
], y.prototype, "generate", 2);
|
1374
|
+
u([
|
1375
|
+
b,
|
1376
|
+
d({ type: String, attribute: "publishable-key", reflect: !0 })
|
1377
|
+
], y.prototype, "publishableKey", 2);
|
1378
|
+
u([
|
1379
|
+
d({ type: Boolean, attribute: "show-error", reflect: !0 })
|
1380
|
+
], y.prototype, "showError", 2);
|
1381
|
+
u([
|
1382
|
+
d({ type: String, attribute: "stripe-account" })
|
1383
|
+
], y.prototype, "stripeAccount", 2);
|
1384
|
+
u([
|
1385
|
+
d({ type: String, attribute: "locale" })
|
1386
|
+
], y.prototype, "locale", 2);
|
1387
|
+
u([
|
1388
|
+
m,
|
1389
|
+
b,
|
1390
|
+
d({ type: Object, attribute: "payment-method" })
|
1391
|
+
], y.prototype, "paymentMethod", 2);
|
1392
|
+
u([
|
1393
|
+
m,
|
1394
|
+
b,
|
1395
|
+
d({ type: Object })
|
1396
|
+
], y.prototype, "source", 2);
|
1397
|
+
u([
|
1398
|
+
m,
|
1399
|
+
b,
|
1400
|
+
d({ type: Object })
|
1401
|
+
], y.prototype, "token", 2);
|
1402
|
+
u([
|
1403
|
+
m,
|
1404
|
+
d({ type: Object })
|
1405
|
+
], y.prototype, "element", 2);
|
1406
|
+
u([
|
1407
|
+
m,
|
1408
|
+
d({ type: Object })
|
1409
|
+
], y.prototype, "elements", 2);
|
1410
|
+
u([
|
1411
|
+
m,
|
1412
|
+
b,
|
1413
|
+
d({ type: Object, reflect: !0, converter: Un })
|
1414
|
+
], y.prototype, "error", 2);
|
1415
|
+
u([
|
1416
|
+
m,
|
1417
|
+
b,
|
1418
|
+
d({ type: Boolean, reflect: !0 })
|
1419
|
+
], y.prototype, "focused", 2);
|
1420
|
+
u([
|
1421
|
+
m,
|
1422
|
+
b,
|
1423
|
+
d({ type: Boolean, reflect: !0 })
|
1424
|
+
], y.prototype, "ready", 2);
|
1425
|
+
u([
|
1426
|
+
m,
|
1427
|
+
d({ type: Object })
|
1428
|
+
], y.prototype, "stripe", 2);
|
1429
|
+
u([
|
1430
|
+
d()
|
1431
|
+
], y.prototype, "theme", 2);
|
1432
|
+
u([
|
1433
|
+
d({ attribute: "border-radius" })
|
1434
|
+
], y.prototype, "borderRadius", 2);
|
1435
|
+
u([
|
1436
|
+
d({ attribute: "color-background" })
|
1437
|
+
], y.prototype, "colorBackground", 2);
|
1438
|
+
u([
|
1439
|
+
d({ attribute: "color-danger" })
|
1440
|
+
], y.prototype, "colorDanger", 2);
|
1441
|
+
u([
|
1442
|
+
d({ attribute: "color-primary" })
|
1443
|
+
], y.prototype, "colorPrimary", 2);
|
1444
|
+
u([
|
1445
|
+
d({ attribute: "color-text" })
|
1446
|
+
], y.prototype, "colorText", 2);
|
1447
|
+
u([
|
1448
|
+
d({ attribute: "font-family" })
|
1449
|
+
], y.prototype, "fontFamily", 2);
|
1450
|
+
u([
|
1451
|
+
d({ attribute: "spacing-unit" })
|
1452
|
+
], y.prototype, "spacingUnit", 2);
|
1453
|
+
u([
|
1454
|
+
S
|
1455
|
+
], y.prototype, "handleResponse", 1);
|
1456
|
+
u([
|
1457
|
+
S
|
1458
|
+
], y.prototype, "onBlur", 1);
|
1459
|
+
u([
|
1460
|
+
S
|
1461
|
+
], y.prototype, "onFocus", 1);
|
1462
|
+
u([
|
1463
|
+
S
|
1464
|
+
], y.prototype, "onReady", 1);
|
1465
|
+
var qn = Ce`[hidden] {
|
1466
|
+
display: none !important;
|
1467
|
+
}
|
1468
|
+
|
1469
|
+
:host:not([hidden]) {
|
1470
|
+
display: block;
|
1471
|
+
box-sizing: border-box;
|
1472
|
+
}
|
1473
|
+
|
1474
|
+
#error {
|
1475
|
+
font-family: sans-serif;
|
1476
|
+
font-size: 14px;
|
1477
|
+
padding-left: 42px;
|
1478
|
+
padding-bottom: 10px;
|
1479
|
+
}
|
1480
|
+
`, Et = qn, Bn = Ce`:host {
|
1481
|
+
min-width: var(--stripe-elements-width, 300px);
|
1482
|
+
min-height: var(--stripe-elements-height, 50px);
|
1483
|
+
}
|
1484
|
+
|
1485
|
+
#stripe {
|
1486
|
+
box-sizing: border-box;
|
1487
|
+
border-radius: var(--stripe-elements-border-radius, 4px);
|
1488
|
+
border: var(--stripe-elements-border, 1px solid transparent);
|
1489
|
+
box-shadow: var(--stripe-elements-box-shadow, 0 1px 3px 0 #e6ebf1);
|
1490
|
+
transition: var(--stripe-elements-transition, box-shadow 150ms ease);
|
1491
|
+
min-width: var(--stripe-elements-width, 300px);
|
1492
|
+
padding: var(--stripe-elements-element-padding, 8px 12px);
|
1493
|
+
background: var(--stripe-elements-element-background, white);
|
1494
|
+
}
|
1495
|
+
|
1496
|
+
:host([focused]) #stripe {
|
1497
|
+
box-shadow: 0 1px 3px 0 #cfd7df;
|
1498
|
+
}
|
1499
|
+
|
1500
|
+
:host([error]) #stripe {
|
1501
|
+
border-color: #fa755a;
|
1502
|
+
}
|
1503
|
+
`, Dn = Bn, nt = [
|
1504
|
+
"color",
|
1505
|
+
"fontFamily",
|
1506
|
+
"fontSize",
|
1507
|
+
"fontStyle",
|
1508
|
+
"fontSmoothing",
|
1509
|
+
"fontVariant",
|
1510
|
+
"iconColor",
|
1511
|
+
"lineHeight",
|
1512
|
+
"letterSpacing",
|
1513
|
+
"textDecoration",
|
1514
|
+
"textShadow",
|
1515
|
+
"textTransform"
|
1516
|
+
], jn = [
|
1517
|
+
":hover",
|
1518
|
+
":focus",
|
1519
|
+
"::placeholder",
|
1520
|
+
"::selection",
|
1521
|
+
":-webkit-autofill",
|
1522
|
+
":disabled"
|
1523
|
+
], v = class extends y {
|
1524
|
+
constructor() {
|
1525
|
+
super(...arguments), this.hideIcon = !1, this.hidePostalCode = !1, this.iconStyle = "default", this.value = {}, this.brand = null, this.complete = !1, this.empty = !0, this.invalid = !1;
|
1526
|
+
}
|
1527
|
+
async createPaymentMethod(n = this.getPaymentMethodData()) {
|
1528
|
+
return this.stripe.createPaymentMethod(n);
|
1529
|
+
}
|
1530
|
+
async createSource(n = this.sourceData) {
|
1531
|
+
return this.stripe.createSource(this.element, n);
|
1532
|
+
}
|
1533
|
+
async createToken(n = this.tokenData) {
|
1534
|
+
return this.stripe.createToken(this.element, n);
|
1535
|
+
}
|
1536
|
+
isPotentiallyValid() {
|
1537
|
+
return !this.complete && !this.empty && !this.error || this.validate();
|
1538
|
+
}
|
1539
|
+
reset() {
|
1540
|
+
var n;
|
1541
|
+
super.reset(), (n = this.element) == null || n.clear();
|
1542
|
+
}
|
1543
|
+
async submit() {
|
1544
|
+
switch (this.generate) {
|
1545
|
+
case "payment-method":
|
1546
|
+
return this.createPaymentMethod();
|
1547
|
+
case "source":
|
1548
|
+
return this.createSource();
|
1549
|
+
case "token":
|
1550
|
+
return this.createToken();
|
1551
|
+
default: {
|
1552
|
+
const n = this.createError(`cannot generate ${this.generate}`);
|
1553
|
+
throw m.set(this, { error: n }), await this.updateComplete, n;
|
1554
|
+
}
|
1555
|
+
}
|
1556
|
+
}
|
1557
|
+
validate() {
|
1558
|
+
const { complete: n, empty: e, error: t } = this, s = !t && n && !e;
|
1559
|
+
return e && !t && m.set(this, { error: this.createError("Your card number is empty.") }), s;
|
1560
|
+
}
|
1561
|
+
updateStyle() {
|
1562
|
+
var n;
|
1563
|
+
(n = this.element) == null || n.update({
|
1564
|
+
style: this.getStripeElementsStyles()
|
1565
|
+
});
|
1566
|
+
}
|
1567
|
+
getPaymentMethodData() {
|
1568
|
+
const n = "card", { billingDetails: e, paymentMethodData: t } = this;
|
1569
|
+
return {
|
1570
|
+
billing_details: e,
|
1571
|
+
...t,
|
1572
|
+
type: n,
|
1573
|
+
card: this.element
|
1574
|
+
};
|
1575
|
+
}
|
1576
|
+
getStripeElementsStyles() {
|
1577
|
+
const n = (i) => this.getCSSCustomPropertyValue(i) || void 0, e = ["base", "complete", "empty", "invalid"], t = (i) => (r, o) => {
|
1578
|
+
if (i.includes("-"))
|
1579
|
+
return r;
|
1580
|
+
const c = o.split(":").pop();
|
1581
|
+
return {
|
1582
|
+
...r,
|
1583
|
+
[o]: nt.reduce(s(`${i}-${c}`), {})
|
1584
|
+
};
|
1585
|
+
}, s = (i) => (r, o) => {
|
1586
|
+
const c = `--stripe-elements-${i}-${yt(o)}`;
|
1587
|
+
return {
|
1588
|
+
...r,
|
1589
|
+
[o]: n(c),
|
1590
|
+
...jn.reduce(t(i), {})
|
1591
|
+
};
|
1592
|
+
};
|
1593
|
+
return e.reduce((i, r) => ({
|
1594
|
+
...i,
|
1595
|
+
[r]: nt.reduce(s(r), {})
|
1596
|
+
}), {});
|
1597
|
+
}
|
1598
|
+
async initElement() {
|
1599
|
+
if (!this.stripe)
|
1600
|
+
return;
|
1601
|
+
const { hidePostalCode: n, hideIcon: e, iconStyle: t, value: s } = this, i = this.getStripeElementsStyles();
|
1602
|
+
await this.updateComplete;
|
1603
|
+
const r = this.createElement({
|
1604
|
+
hideIcon: e,
|
1605
|
+
hidePostalCode: n,
|
1606
|
+
iconStyle: t,
|
1607
|
+
style: i,
|
1608
|
+
value: s
|
1609
|
+
});
|
1610
|
+
r.on("change", this.onChange), m.set(this, { element: r }), await this.updateComplete;
|
1611
|
+
}
|
1612
|
+
createElement(n) {
|
1613
|
+
return this.elements.create("card", n);
|
1614
|
+
}
|
1615
|
+
async onChange(n) {
|
1616
|
+
const { brand: e, complete: t, empty: s, error: i = null } = n, r = !(i || !s && !t);
|
1617
|
+
m.set(this, { brand: e, complete: t, empty: s, error: i, invalid: r }), await this.updateComplete, this.fire("change", n);
|
1618
|
+
}
|
1619
|
+
};
|
1620
|
+
v.is = "stripe-elements";
|
1621
|
+
v.elementType = "card";
|
1622
|
+
v.styles = [
|
1623
|
+
Et,
|
1624
|
+
Dn
|
1625
|
+
];
|
1626
|
+
u([
|
1627
|
+
d({ type: Boolean, attribute: "hide-icon" })
|
1628
|
+
], v.prototype, "hideIcon", 2);
|
1629
|
+
u([
|
1630
|
+
d({ type: Boolean, attribute: "hide-postal-code" })
|
1631
|
+
], v.prototype, "hidePostalCode", 2);
|
1632
|
+
u([
|
1633
|
+
d({ type: String, attribute: "icon-style" })
|
1634
|
+
], v.prototype, "iconStyle", 2);
|
1635
|
+
u([
|
1636
|
+
d({ type: Object })
|
1637
|
+
], v.prototype, "value", 2);
|
1638
|
+
u([
|
1639
|
+
b,
|
1640
|
+
m,
|
1641
|
+
d({ type: String })
|
1642
|
+
], v.prototype, "brand", 2);
|
1643
|
+
u([
|
1644
|
+
b,
|
1645
|
+
m,
|
1646
|
+
d({ type: Boolean, reflect: !0 })
|
1647
|
+
], v.prototype, "complete", 2);
|
1648
|
+
u([
|
1649
|
+
b,
|
1650
|
+
m,
|
1651
|
+
d({ type: Boolean, reflect: !0 })
|
1652
|
+
], v.prototype, "empty", 2);
|
1653
|
+
u([
|
1654
|
+
b,
|
1655
|
+
m,
|
1656
|
+
d({ type: Boolean, reflect: !0 })
|
1657
|
+
], v.prototype, "invalid", 2);
|
1658
|
+
u([
|
1659
|
+
Pe
|
1660
|
+
], v.prototype, "createPaymentMethod", 1);
|
1661
|
+
u([
|
1662
|
+
Pe
|
1663
|
+
], v.prototype, "createSource", 1);
|
1664
|
+
u([
|
1665
|
+
Pe
|
1666
|
+
], v.prototype, "createToken", 1);
|
1667
|
+
u([
|
1668
|
+
S
|
1669
|
+
], v.prototype, "onChange", 1);
|
1670
|
+
v = u([
|
1671
|
+
st("stripe-elements")
|
1672
|
+
], v);
|
1673
|
+
var Vn = Ce`#stripe {
|
1674
|
+
box-sizing: border-box;
|
1675
|
+
min-width: var(--stripe-payment-request-element-min-width, 300px);
|
1676
|
+
padding: var(--stripe-payment-request-element-padding, 8px 12px);
|
1677
|
+
background: var(--stripe-payment-request-element-background, white);
|
1678
|
+
}
|
1679
|
+
`, zn = Vn;
|
1680
|
+
function Fn(n) {
|
1681
|
+
return n.tagName.toLowerCase() === "stripe-display-item";
|
1682
|
+
}
|
1683
|
+
function Wn({ dataset: { amount: n, label: e, pending: t } }) {
|
1684
|
+
return {
|
1685
|
+
label: e,
|
1686
|
+
amount: parseInt(n),
|
1687
|
+
...t !== void 0 && { pending: t === "true" }
|
1688
|
+
};
|
1689
|
+
}
|
1690
|
+
function Gn({ dataset: { amount: n, detail: e, ...t } }) {
|
1691
|
+
return {
|
1692
|
+
amount: parseInt(n),
|
1693
|
+
detail: e,
|
1694
|
+
...t
|
1695
|
+
};
|
1696
|
+
}
|
1697
|
+
function Kn(n) {
|
1698
|
+
return Fn(n) ? Wn(n) : Gn(n);
|
1699
|
+
}
|
1700
|
+
var ie, re, $ = class extends y {
|
1701
|
+
constructor() {
|
1702
|
+
super(...arguments), this.canMakePayment = null, Xe(this, ie, void 0), this.paymentIntent = null, this.paymentRequest = null, this.pending = !1, Xe(this, re, void 0), this.buttonType = "default", this.buttonTheme = "dark", this.complete = async (n, e) => {
|
1703
|
+
const { error: t = null } = { ...n }, s = t || e ? "fail" : "success";
|
1704
|
+
return n.complete(s), this.fire(s, n), e ? { error: e } : n;
|
1705
|
+
};
|
1706
|
+
}
|
1707
|
+
get displayItems() {
|
1708
|
+
const n = Je(this, ie);
|
1709
|
+
return Array.isArray(n) ? n : this.parseDatasets("stripe-display-item");
|
1710
|
+
}
|
1711
|
+
set displayItems(n) {
|
1712
|
+
const e = this.displayItems;
|
1713
|
+
Qe(this, ie, n), this.requestUpdate("displayItems", e);
|
1714
|
+
}
|
1715
|
+
get shippingOptions() {
|
1716
|
+
const n = Je(this, re);
|
1717
|
+
return Array.isArray(n) ? n : this.parseDatasets("stripe-shipping-option");
|
1718
|
+
}
|
1719
|
+
set shippingOptions(n) {
|
1720
|
+
const e = this.shippingOptions;
|
1721
|
+
Qe(this, re, n), this.requestUpdate("shippingOptions", e);
|
1722
|
+
}
|
1723
|
+
reset() {
|
1724
|
+
super.reset(), m.set(this, { paymentIntent: null });
|
1725
|
+
}
|
1726
|
+
updated(n) {
|
1727
|
+
super.updated(n), n.has("generate") && this.initPaymentRequestListeners(), n.has("amount") && this.updatePaymentRequest();
|
1728
|
+
}
|
1729
|
+
getStripePaymentRequestOptions() {
|
1730
|
+
const {
|
1731
|
+
country: n,
|
1732
|
+
currency: e,
|
1733
|
+
displayItems: t,
|
1734
|
+
shippingOptions: s,
|
1735
|
+
requestShipping: i,
|
1736
|
+
requestPayerEmail: r,
|
1737
|
+
requestPayerName: o,
|
1738
|
+
requestPayerPhone: c,
|
1739
|
+
label: a = "",
|
1740
|
+
amount: l = 0
|
1741
|
+
} = this;
|
1742
|
+
return {
|
1743
|
+
country: n,
|
1744
|
+
currency: e,
|
1745
|
+
displayItems: t,
|
1746
|
+
requestPayerEmail: r,
|
1747
|
+
requestPayerName: o,
|
1748
|
+
requestPayerPhone: c,
|
1749
|
+
requestShipping: i,
|
1750
|
+
shippingOptions: s,
|
1751
|
+
total: { label: a, amount: l }
|
1752
|
+
};
|
1753
|
+
}
|
1754
|
+
async initElement() {
|
1755
|
+
await this.initPaymentRequest(), await this.initPaymentRequestListeners(), await this.initPaymentRequestButton();
|
1756
|
+
}
|
1757
|
+
async initPaymentRequest() {
|
1758
|
+
if (!this.stripe)
|
1759
|
+
return;
|
1760
|
+
const n = this.getStripePaymentRequestOptions(), e = this.stripe.paymentRequest(n), t = await e.canMakePayment();
|
1761
|
+
m.set(this, { paymentRequest: e, canMakePayment: t }), await this.updateComplete, this.canMakePayment || this.fire("unsupported");
|
1762
|
+
}
|
1763
|
+
async initPaymentRequestButton() {
|
1764
|
+
const { buttonTheme: n, buttonType: e, canMakePayment: t } = this;
|
1765
|
+
if (!t || !this.elements)
|
1766
|
+
return;
|
1767
|
+
const r = { paymentRequestButton: { height: this.getCSSCustomPropertyValue("--stripe-payment-request-button-height") || "40px", theme: n, type: e } }, o = this.elements.create("paymentRequestButton", {
|
1768
|
+
paymentRequest: this.paymentRequest,
|
1769
|
+
style: r
|
1770
|
+
});
|
1771
|
+
m.set(this, { element: o }), await this.updateComplete;
|
1772
|
+
}
|
1773
|
+
async initPaymentRequestListeners() {
|
1774
|
+
if (this.canMakePayment)
|
1775
|
+
switch (this.paymentRequest.on("click", this.updatePaymentRequest), this.paymentRequest.on("cancel", this.onCancel), this.paymentRequest.on("shippingaddresschange", this.onShippingaddresschange), this.paymentRequest.on("shippingoptionchange", this.onShippingoptionchange), this.generate) {
|
1776
|
+
case "payment-method":
|
1777
|
+
this.paymentRequest.on("paymentmethod", this.onPaymentResponse);
|
1778
|
+
break;
|
1779
|
+
case "source":
|
1780
|
+
this.paymentRequest.on("source", this.onPaymentResponse);
|
1781
|
+
break;
|
1782
|
+
case "token":
|
1783
|
+
this.paymentRequest.on("token", this.onPaymentResponse);
|
1784
|
+
break;
|
1785
|
+
}
|
1786
|
+
}
|
1787
|
+
async updatePaymentRequest() {
|
1788
|
+
if (!this.paymentRequest)
|
1789
|
+
return;
|
1790
|
+
const { currency: n, total: e, displayItems: t, shippingOptions: s } = this.getStripePaymentRequestOptions();
|
1791
|
+
this.paymentRequest.update({ currency: n, total: e, displayItems: t, shippingOptions: s });
|
1792
|
+
}
|
1793
|
+
onCancel() {
|
1794
|
+
this.fire(
|
1795
|
+
"cancel"
|
1796
|
+
/* cancel */
|
1797
|
+
);
|
1798
|
+
}
|
1799
|
+
async onPaymentResponse(n) {
|
1800
|
+
const {
|
1801
|
+
error: e = null,
|
1802
|
+
paymentMethod: t = null,
|
1803
|
+
source: s = null,
|
1804
|
+
token: i = null
|
1805
|
+
} = { ...n };
|
1806
|
+
m.set(this, { error: e, paymentMethod: t, source: s, token: i }), this.clientSecret && !e ? this.confirmPaymentIntent(n) : this.complete(n);
|
1807
|
+
}
|
1808
|
+
async confirmPaymentIntent(n) {
|
1809
|
+
const e = { payment_method: this.paymentMethod.id }, t = await this.confirmCardPayment(e, { handleActions: !1 }).then(({ error: r }) => this.complete(n, r)).then(Ze).then(() => this.confirmCardPayment()).then(Ze).catch((r) => ({ error: r })), { error: s = null } = t, i = t.paymentIntent ?? null;
|
1810
|
+
m.set(this, { error: s, paymentIntent: i }), await this.updateComplete;
|
1811
|
+
}
|
1812
|
+
async confirmCardPayment(n, e) {
|
1813
|
+
return this.stripe.confirmCardPayment(this.clientSecret, n, e);
|
1814
|
+
}
|
1815
|
+
onShippingaddresschange(n) {
|
1816
|
+
this.fire("shippingaddresschange", n);
|
1817
|
+
}
|
1818
|
+
onShippingoptionchange(n) {
|
1819
|
+
this.fire("shippingoptionchange", n);
|
1820
|
+
}
|
1821
|
+
parseDatasets(n) {
|
1822
|
+
const e = [...this.querySelectorAll(n)];
|
1823
|
+
return e.length ? e.map(Kn) : [];
|
1824
|
+
}
|
1825
|
+
};
|
1826
|
+
ie = /* @__PURE__ */ new WeakMap();
|
1827
|
+
re = /* @__PURE__ */ new WeakMap();
|
1828
|
+
$.is = "stripe-payment-request";
|
1829
|
+
$.styles = [
|
1830
|
+
Et,
|
1831
|
+
zn
|
1832
|
+
];
|
1833
|
+
u([
|
1834
|
+
d({ type: Number, reflect: !0 })
|
1835
|
+
], $.prototype, "amount", 2);
|
1836
|
+
u([
|
1837
|
+
b,
|
1838
|
+
m,
|
1839
|
+
d({ type: Boolean, attribute: "can-make-payment", reflect: !0 })
|
1840
|
+
], $.prototype, "canMakePayment", 2);
|
1841
|
+
u([
|
1842
|
+
d({ type: String })
|
1843
|
+
], $.prototype, "country", 2);
|
1844
|
+
u([
|
1845
|
+
d({ type: String })
|
1846
|
+
], $.prototype, "currency", 2);
|
1847
|
+
u([
|
1848
|
+
d({ type: Array })
|
1849
|
+
], $.prototype, "displayItems", 1);
|
1850
|
+
u([
|
1851
|
+
d({ type: String, reflect: !0 })
|
1852
|
+
], $.prototype, "label", 2);
|
1853
|
+
u([
|
1854
|
+
b,
|
1855
|
+
m,
|
1856
|
+
d({ type: Object, attribute: "payment-intent" })
|
1857
|
+
], $.prototype, "paymentIntent", 2);
|
1858
|
+
u([
|
1859
|
+
m,
|
1860
|
+
d({ type: Object, attribute: "payment-request" })
|
1861
|
+
], $.prototype, "paymentRequest", 2);
|
1862
|
+
u([
|
1863
|
+
d({ type: Boolean, reflect: !0 })
|
1864
|
+
], $.prototype, "pending", 2);
|
1865
|
+
u([
|
1866
|
+
d({ type: Boolean, attribute: "request-payer-email" })
|
1867
|
+
], $.prototype, "requestPayerEmail", 2);
|
1868
|
+
u([
|
1869
|
+
d({ type: Boolean, attribute: "request-payer-name" })
|
1870
|
+
], $.prototype, "requestPayerName", 2);
|
1871
|
+
u([
|
1872
|
+
d({ type: Boolean, attribute: "request-payer-phone" })
|
1873
|
+
], $.prototype, "requestPayerPhone", 2);
|
1874
|
+
u([
|
1875
|
+
d({ type: Boolean, attribute: "request-shipping" })
|
1876
|
+
], $.prototype, "requestShipping", 2);
|
1877
|
+
u([
|
1878
|
+
d({ type: Array })
|
1879
|
+
], $.prototype, "shippingOptions", 1);
|
1880
|
+
u([
|
1881
|
+
d({ type: String, attribute: "button-type" })
|
1882
|
+
], $.prototype, "buttonType", 2);
|
1883
|
+
u([
|
1884
|
+
d({ type: String, attribute: "button-theme" })
|
1885
|
+
], $.prototype, "buttonTheme", 2);
|
1886
|
+
u([
|
1887
|
+
S
|
1888
|
+
], $.prototype, "onCancel", 1);
|
1889
|
+
u([
|
1890
|
+
S
|
1891
|
+
], $.prototype, "onPaymentResponse", 1);
|
1892
|
+
u([
|
1893
|
+
S
|
1894
|
+
], $.prototype, "confirmPaymentIntent", 1);
|
1895
|
+
u([
|
1896
|
+
S
|
1897
|
+
], $.prototype, "confirmCardPayment", 1);
|
1898
|
+
u([
|
1899
|
+
S
|
1900
|
+
], $.prototype, "onShippingaddresschange", 1);
|
1901
|
+
u([
|
1902
|
+
S
|
1903
|
+
], $.prototype, "onShippingoptionchange", 1);
|
1904
|
+
$ = u([
|
1905
|
+
st("stripe-payment-request")
|
1906
|
+
], $);
|
1907
|
+
const Yn = (n) => {
|
1908
|
+
switch (n) {
|
1909
|
+
case X.LIVE:
|
1910
|
+
return "pk_live_x99EPirYIsCyUsRvPAfyhnRp";
|
1911
|
+
case X.LOCAL:
|
1912
|
+
case X.SANDBOX:
|
1913
|
+
case X.STAGING:
|
1914
|
+
default:
|
1915
|
+
return "pk_test_wXnn2RrefTiOHB0zzxqJr0s8";
|
1916
|
+
}
|
1917
|
+
}, Zn = Pt.extend({
|
1918
|
+
name: "CreditCardForm",
|
1919
|
+
components: {
|
1920
|
+
BFormattedAmount: Tt
|
1921
|
+
},
|
1922
|
+
mixins: [Rt("components/RevolugoElements/CreditCardForm")],
|
1923
|
+
props: Dt,
|
1924
|
+
data: () => ({
|
1925
|
+
error: "",
|
1926
|
+
isTermsAccepted: !1,
|
1927
|
+
termsError: !1
|
1928
|
+
}),
|
1929
|
+
computed: {
|
1930
|
+
termsAndConditionsUrl() {
|
1931
|
+
return this.$t("CreditCardForm.termsURL");
|
1932
|
+
},
|
1933
|
+
pk() {
|
1934
|
+
return Yn(this.config.apiEnvironment);
|
1935
|
+
}
|
1936
|
+
},
|
1937
|
+
methods: {
|
1938
|
+
onCreditCardFormChange(n) {
|
1939
|
+
this.error = "", this.$emit("change", !!n.detail.complete);
|
1940
|
+
},
|
1941
|
+
async onStripePayment(n) {
|
1942
|
+
try {
|
1943
|
+
if (!window.Stripe || this.disabled)
|
1944
|
+
return;
|
1945
|
+
const t = await window.Stripe(this.pk, {
|
1946
|
+
locale: this.$i18n.locale
|
1947
|
+
}).confirmCardPayment(this.token, {
|
1948
|
+
// eslint-disable-next-line camelcase
|
1949
|
+
payment_method: n.detail.id
|
1950
|
+
});
|
1951
|
+
t.error && t.error ? this.onPaymentError(t) : this.withAction ? this.$eventBus.$emit(xt.PaymentSuccess) : this.$emit("success");
|
1952
|
+
} catch (e) {
|
1953
|
+
this.onPaymentError(e);
|
1954
|
+
}
|
1955
|
+
},
|
1956
|
+
onPaymentError(n) {
|
1957
|
+
var e;
|
1958
|
+
this.error = `${(e = n == null ? void 0 : n.error) == null ? void 0 : e.message} ${this.$t("CreditCardForm.error")}`, this.$emit("error", this.error);
|
1959
|
+
},
|
1960
|
+
pay() {
|
1961
|
+
try {
|
1962
|
+
if (!this.$refs.payment || this.withTerms && !this.isTermsAccepted)
|
1963
|
+
return;
|
1964
|
+
this.$refs.payment.submit();
|
1965
|
+
} catch (n) {
|
1966
|
+
this.onPaymentError(n);
|
1967
|
+
}
|
1968
|
+
}
|
1969
|
+
}
|
1970
|
+
});
|
1971
|
+
var Jn = function() {
|
1972
|
+
var e = this, t = e._self._c;
|
1973
|
+
return e._self._setupProxy, t(Te, { style: {
|
1974
|
+
borderColor: e.disabled ? null : "var(--v-primary-base)"
|
1975
|
+
}, attrs: { disabled: e.disabled, elevation: "0", outlined: "" } }, [t(It, { staticClass: "white--text", attrs: { color: "primary", dense: "", elevation: "0" } }, [t("div", { staticClass: "w-100 d-flex justify-space-between items-center" }, [t("h4", [t(ee, { attrs: { color: "white", left: "" } }, [e._v(" fa-credit-card ")]), e._v(" " + e._s(e.$t("CreditCardForm.title")) + ": "), e.loading ? t(Ht, { staticClass: "ml-2", attrs: { color: "primary", indeterminate: "", size: "20", width: "1" } }) : t("BFormattedAmount", { staticClass: "font-weight-bold", attrs: { amount: e.amount, currency: e.currency } })], 1), t(ee, { attrs: { color: "white", right: "" } }, [e._v(" fa-lock ")])], 1)]), t(Ut, [t(D, [t(k, [e.error ? t(kt, { attrs: { color: "red", dense: "", outlined: "" } }, [t("p", { staticClass: "caption font-weight-bold text-center my-0 red--text rounded" }, [e._v(" " + e._s(e.$t("CreditCardForm.paymentDeclined")) + ": " + e._s(e.error) + " ")])]) : e._e()], 1)], 1), t(D, { staticClass: "d-none d-sm-flex", attrs: { "no-gutters": "" } }, [t(k, { attrs: { cols: "8" } }, [t("small", [e._v(e._s(e.$t("CreditCardForm.cardNumber")))])]), t(k, { staticClass: "text-right pr-6", attrs: { cols: "4" } }, [t("small", { staticClass: "pr-3" }, [e._v(e._s(e.$t("CreditCardForm.expDate")))]), t("small", [e._v(e._s(e.$t("CreditCardForm.cvc")))])])], 1), t(D, { attrs: { "no-gutters": "" } }, [t(k, [t(Te, { attrs: { elevation: "0", outlined: "" } }, [t("stripe-elements", { ref: "payment", class: {
|
1976
|
+
"d-none": e.loading
|
1977
|
+
}, attrs: { generate: "payment-method", "hide-postal-code": "", locale: e.$i18n.locale, "publishable-key": e.pk }, on: { change: e.onCreditCardFormChange, error: e.onPaymentError, "payment-method": e.onStripePayment } }), e.loading ? t(qt, { staticClass: "mx-auto", attrs: { height: "36.8px", type: "image", width: "100%" } }) : e._e()], 1)], 1)], 1), e.withTerms ? t(D, { staticClass: "mt-2" }, [t(k, [t(Bt, { ref: "testing", staticClass: "mt-0", attrs: { error: e.termsError && !e.isTermsAccepted }, scopedSlots: e._u([{ key: "label", fn: function() {
|
1978
|
+
return [t("span", { domProps: { innerHTML: e._s(
|
1979
|
+
e.$t("CreditCardForm.termsAndConditions", {
|
1980
|
+
url: e.termsAndConditionsUrl
|
1981
|
+
})
|
1982
|
+
) }, on: { click: function(s) {
|
1983
|
+
s.stopPropagation();
|
1984
|
+
} } })];
|
1985
|
+
}, proxy: !0 }], null, !1, 1757272622), model: { value: e.isTermsAccepted, callback: function(s) {
|
1986
|
+
e.isTermsAccepted = s;
|
1987
|
+
}, expression: "isTermsAccepted" } })], 1)], 1) : e._e(), e.withAction ? t(D, [t(k, { staticClass: "d-flex justify-end flex-column flex-sm-row mb-1 align-center mt-4 mt-sm-0" }, [t(Lt, { staticClass: "w-100 w-sm-auto", attrs: { color: "primary", depressed: "", disabled: e.disabled || e.withTerms && !e.isTermsAccepted, loading: e.loading }, on: { click: e.pay } }, [t(ee, { attrs: { left: "" } }, [e._v(" fa-lock ")]), t("span", { staticClass: "mr-1" }, [e._v(e._s(e.$t("CreditCardForm.payNow")))]), t("BFormattedAmount", { staticClass: "font-weight-bold", attrs: { amount: e.amount, currency: e.currency } })], 1)], 1)], 1) : e._e()], 1)], 1);
|
1988
|
+
}, Xn = [], Qn = /* @__PURE__ */ Mt(
|
1989
|
+
Zn,
|
1990
|
+
Jn,
|
1991
|
+
Xn,
|
1992
|
+
!1,
|
1993
|
+
null,
|
1994
|
+
null
|
1995
|
+
);
|
1996
|
+
const vs = Qn.exports;
|
1997
|
+
Ct("css/revolugo.creditcardform.DGy-kOaO.css");
|
1998
|
+
export {
|
1999
|
+
vs as C,
|
2000
|
+
Bt as _,
|
2001
|
+
Dt as c
|
2002
|
+
};
|
2003
|
+
//# sourceMappingURL=revolugo.creditcardform.Bnp2cggf.min.js.map
|