@revolugo/elements 5.26.2 → 6.0.0-beta.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. package/dist/index.es.min.js +2060 -2592
  2. package/dist/index.es.min.js.map +1 -1
  3. package/dist/index.min.js +10 -40
  4. package/dist/index.min.js.map +1 -1
  5. package/dist/{revolugo.banktransferdetails.DxzWSquz.min.js → revolugo.banktransferdetails.D0SlOsTI.min.js} +33 -37
  6. package/dist/{revolugo.bdaterangepicker.DAOZptUO.min.js → revolugo.bdaterangepicker.BIehsbY2.min.js} +20 -20
  7. package/dist/{revolugo.bformattedamount.C0KLwzwl.min.js → revolugo.bformattedamount.CEmw-f2u.min.js} +3 -3
  8. package/dist/{revolugo.bhotelroomsdetails.Z7i3IAGg.min.js → revolugo.bhotelroomsdetails.DSO88F2i.min.js} +13 -13
  9. package/dist/{revolugo.bhotelsearchbar.yigA_cAU.min.js → revolugo.bhotelsearchbar.DdZV94FM.min.js} +19 -19
  10. package/dist/{revolugo.bookingdetailssidebar.DnzGhpqw.min.js → revolugo.bookingdetailssidebar.BH_hcOXv.min.js} +6 -6
  11. package/dist/{revolugo.bookingdetailssidebar.BVkbxa9s.min.js → revolugo.bookingdetailssidebar.CJVvasR8.min.js} +17 -17
  12. package/dist/{revolugo.bookingmanager.DwuWRxAd.min.js → revolugo.bookingmanager.B1W9Srwo.min.js} +38 -38
  13. package/dist/{revolugo.bphoneinput.H3ff5kTX.min.js → revolugo.bphoneinput.7ehda58T.min.js} +33 -37
  14. package/dist/{revolugo.bpricesummaryskeleton.hwCth_b2.min.js → revolugo.bpricesummaryskeleton.CW9ghK0H.min.js} +6 -6
  15. package/dist/{revolugo.breakpoint-service.BlEWjg4g.min.js → revolugo.breakpoint-service.Cu-mwTuh.min.js} +3 -3
  16. package/dist/{revolugo.bstarrating.Bz8C7CvH.min.js → revolugo.bstarrating.ErgsKLSE.min.js} +8 -8
  17. package/dist/{revolugo.btag.DZN4j_hX.min.js → revolugo.btag.3FcEfaJ1.min.js} +9 -9
  18. package/dist/{revolugo.cancellationpoliciesbadge.DD3sOfkX.min.js → revolugo.cancellationpoliciesbadge.BTRNjxDU.min.js} +9 -9
  19. package/dist/{revolugo.cancellationpoliciesbadge.DIm9l5NJ.min.js → revolugo.cancellationpoliciesbadge.Cai7MdmA.min.js} +6 -6
  20. package/dist/{revolugo.cancellationpolicieslist.DdvjNdDB.min.js → revolugo.cancellationpolicieslist.DNVE52l9.min.js} +3 -3
  21. package/dist/{revolugo.cancellationpolicieslist.Yt8G1Lb0.min.js → revolugo.cancellationpolicieslist.fIHYU01N.min.js} +6 -6
  22. package/dist/{revolugo.common.BZH_Op12.min.js → revolugo.common.BMERDAjG.min.js} +2 -2
  23. package/dist/revolugo.creditcardform.B_uqS9k4.min.js +2003 -0
  24. package/dist/{revolugo.creditcardform.BI_FpSmL.min.js → revolugo.creditcardform.DPxI16M2.min.js} +6 -6
  25. package/dist/{revolugo.creditcardpayment.DnTKJs-I.min.js → revolugo.creditcardpayment.B5ZJI0w6.min.js} +34 -34
  26. package/dist/{revolugo.creditcardpayment.02PN4MWk.min.js → revolugo.creditcardpayment.D9TTH4NJ.min.js} +6 -6
  27. package/dist/{revolugo.currencypicker.rla5Gh6r.min.js → revolugo.currencypicker.D2kBqRQY.min.js} +9 -9
  28. package/dist/{revolugo.currencypickerbtn.BTEEO9t4.min.js → revolugo.currencypickerbtn.8QocBBvi.min.js} +11 -11
  29. package/dist/{revolugo.currencypickerbtn.DVaUT3Sv.min.js → revolugo.currencypickerbtn.C_Mpqa0P.min.js} +6 -6
  30. package/dist/{revolugo.dialog-attach.DCu6y0mp.min.js → revolugo.dialog-attach.c30M_gWU.min.js} +2 -2
  31. package/dist/{revolugo.fastbookingflow.DRTH66_Y.min.js → revolugo.fastbookingflow.M2qd2tsV.min.js} +6 -6
  32. package/dist/{revolugo.fullbookingflow.DZeA_09f.min.js → revolugo.fullbookingflow.BTn49b-c.min.js} +51 -51
  33. package/dist/{revolugo.hotel-offer.BMV5LoO-.min.js → revolugo.hotel-offer.wIngFNZX.min.js} +17 -17
  34. package/dist/{revolugo.hoteldescriptionview.iGRk1gJK.min.js → revolugo.hoteldescriptionview.Bq9LguL5.min.js} +6 -6
  35. package/dist/{revolugo.hoteldescriptionview.CFVTwBfb.min.js → revolugo.hoteldescriptionview.DLwdlhnb.min.js} +284 -267
  36. package/dist/{revolugo.hotelofferitemlayout.B47vwC31.min.js → revolugo.hotelofferitemlayout.FfUroZrA.min.js} +10 -10
  37. package/dist/{revolugo.hotelofferlist.CH8RSatG.min.js → revolugo.hotelofferlist.BTHg4q-w.min.js} +6 -6
  38. package/dist/revolugo.hotelofferlist.lqI-6UwY.min.js +4191 -0
  39. package/dist/{revolugo.hotelofferrequestcreator.DRaWs0Tl.min.js → revolugo.hotelofferrequestcreator.C2mvwbtG.min.js} +14 -14
  40. package/dist/{revolugo.hoteloffersearchmenu.BIC_Zl37.min.js → revolugo.hoteloffersearchmenu.DwK1lL0-.min.js} +6 -6
  41. package/dist/{revolugo.hoteloffersmap.BNeU4Ckq.min.js → revolugo.hoteloffersmap.CvFhDHYT.min.js} +33 -33
  42. package/dist/{revolugo.hoteloffersmap.kwmpn7NH.min.js → revolugo.hoteloffersmap.lfIuMPim.min.js} +6 -6
  43. package/dist/{revolugo.hoteloffersview.DCWgpMu6.min.js → revolugo.hoteloffersview.DWoFZ5Xe.min.js} +6 -6
  44. package/dist/{revolugo.hoteloffersview.Dv_Q1e1i.min.js → revolugo.hoteloffersview.Wxy0j12k.min.js} +19 -19
  45. package/dist/{revolugo.hotelroomofferlist.jL0zho9e.min.js → revolugo.hotelroomofferlist.BXeeR-lU.min.js} +53 -53
  46. package/dist/{revolugo.hotelroomofferlist.CRfe1uw4.min.js → revolugo.hotelroomofferlist.IYfAtMjj.min.js} +6 -6
  47. package/dist/{revolugo.hotelroomofferrequestcreator.CJQ2CdNw.min.js → revolugo.hotelroomofferrequestcreator.CypFSZQP.min.js} +12 -12
  48. package/dist/{revolugo.hotelroomoffersbookingflow.BQQoJFTW.min.js → revolugo.hotelroomoffersbookingflow.Ckujgcsl.min.js} +19 -19
  49. package/dist/{revolugo.hotelroomoffersearchmenu.pEi8lzHy.min.js → revolugo.hotelroomoffersearchmenu.Brh4l-bH.min.js} +5 -5
  50. package/dist/{revolugo.hotelroomoffersearchmenu.DCPFjC0g.min.js → revolugo.hotelroomoffersearchmenu.KIJcPK62.min.js} +4 -4
  51. package/dist/{revolugo.hotelroomoffersview.CwvF2Lg9.min.js → revolugo.hotelroomoffersview.BEaf8k08.min.js} +6 -6
  52. package/dist/{revolugo.hotelroomoffersview.mQwWZld8.min.js → revolugo.hotelroomoffersview.ClBpoIvY.min.js} +16 -16
  53. package/dist/{revolugo.i18n.qxNwIBzD.min.js → revolugo.i18n.B6flGapj.min.js} +2177 -2192
  54. package/dist/{revolugo.index.BzQBfwkV.min.js → revolugo.index.2xO6EI0w.min.js} +3 -3
  55. package/dist/{revolugo.index.utQE_7Cl.min.js → revolugo.index.5hyF7mph.min.js} +3 -3
  56. package/dist/{revolugo.index.CfNhkdgc.min.js → revolugo.index.BMUUUQ6e.min.js} +7 -7
  57. package/dist/{revolugo.index.DD9JrpcI.min.js → revolugo.index.BRF8X3n9.min.js} +5 -5
  58. package/dist/{revolugo.index.DqTSC2TR.min.js → revolugo.index.Btv6NrdZ.min.js} +3 -3
  59. package/dist/{revolugo.index.O87Oqb47.min.js → revolugo.index.C8XuamX-.min.js} +2 -2
  60. package/dist/{revolugo.index.BPSLxDUk.min.js → revolugo.index.CKodHqzD.min.js} +2 -2
  61. package/dist/{revolugo.index.CYG3UDgo.min.js → revolugo.index.CSQyjabN.min.js} +6 -6
  62. package/dist/{revolugo.index.CNxUzw3a.min.js → revolugo.index.DOhpwGoe.min.js} +9 -9
  63. package/dist/{revolugo.index.RS6IMZca.min.js → revolugo.index.DzWGRnmT.min.js} +4 -4
  64. package/dist/{revolugo.index.Ii4kfDF9.min.js → revolugo.index.O0gXxz8L.min.js} +2 -2
  65. package/dist/revolugo.index.VdjsHoHa.min.js +15 -0
  66. package/dist/{revolugo.index.DP6aBKb1.min.js → revolugo.index.Y8477YKy.min.js} +7 -7
  67. package/dist/{revolugo.index.D6ZUh3QP.min.js → revolugo.index.iku7fbFQ.min.js} +10 -10
  68. package/dist/{revolugo.langpicker.uc5GlZAU.min.js → revolugo.langpicker.DurEp5JD.min.js} +7 -7
  69. package/dist/{revolugo.langpickerbtn.BhRQdJ_p.min.js → revolugo.langpickerbtn.IJanaPAN.min.js} +6 -6
  70. package/dist/{revolugo.langpickerbtn.YGHO28He.min.js → revolugo.langpickerbtn.nJ-15Yck.min.js} +10 -10
  71. package/dist/revolugo.min.js +26 -26
  72. package/dist/{revolugo.parsed-height.B59lLeec.min.js → revolugo.parsed-height.Ck4tuzMA.min.js} +129 -129
  73. package/dist/{revolugo.parsed-props.n7LUhO7L.min.js → revolugo.parsed-props.Cv4vlK2H.min.js} +5 -5
  74. package/dist/{revolugo.prebookform.B3J48Pkc.min.js → revolugo.prebookform.BJvJf-GF.min.js} +29 -29
  75. package/dist/{revolugo.prebookform.CVh5dThF.min.js → revolugo.prebookform.DC6NaQhz.min.js} +6 -6
  76. package/dist/{revolugo.revolugo-config.BDiLSGvv.min.js → revolugo.revolugo-config.eJ199U_F.min.js} +1238 -1484
  77. package/dist/{revolugo.roominglisteditor.Chkqhc2Y.min.js → revolugo.roominglisteditor.BLvr-Fkl.min.js} +6 -6
  78. package/dist/{revolugo.roominglisteditor.Dkwuendx.min.js → revolugo.roominglisteditor.CK07dsA2.min.js} +20 -20
  79. package/dist/{revolugo.sentry.BVrKAYI8.min.js → revolugo.sentry.BJarOkzg.min.js} +498 -499
  80. package/dist/{revolugo.store.CLXQpFB9.min.js → revolugo.store.DiPfvwgS.min.js} +627 -659
  81. package/dist/{revolugo.storybooktoolbar.ZyQvkGCl.min.js → revolugo.storybooktoolbar.by8U1xIL.min.js} +20 -20
  82. package/dist/{revolugo.termsandconditions.DMPOujnj.min.js → revolugo.termsandconditions.Bj0hUrri.min.js} +6 -6
  83. package/dist/{revolugo.termsandconditions.ClSGaGKj.min.js → revolugo.termsandconditions.CaQXjD29.min.js} +4 -4
  84. package/dist/revolugo.typed-mixins.BJMIjm4p.min.js +8 -0
  85. package/dist/{revolugo.valert.Dy_fVPQq.min.js → revolugo.valert.CG2oNawN.min.js} +7 -7
  86. package/dist/{revolugo.vautocomplete.DfAUnP4D.min.js → revolugo.vautocomplete.BVFgoUPc.min.js} +5 -5
  87. package/dist/{revolugo.vbadge.D61vYgWe.min.js → revolugo.vbadge.DUDFOX6v.min.js} +6 -6
  88. package/dist/{revolugo.vbtn.Co1ZNQI6.min.js → revolugo.vbtn.CgpjK-rC.min.js} +7 -7
  89. package/dist/{revolugo.vcard.gY3nOWdt.min.js → revolugo.vcard.EZjjn7hB.min.js} +6 -6
  90. package/dist/{revolugo.vdialog.BS-urZDH.min.js → revolugo.vdialog.BnvOBOZv.min.js} +12 -12
  91. package/dist/{revolugo.vexpansionpanelheader.DEWs0GBp.min.js → revolugo.vexpansionpanelheader.DZ2ch7iL.min.js} +8 -8
  92. package/dist/{revolugo.vform.BDMYpFXp.min.js → revolugo.vform.D4KiqXsg.min.js} +5 -5
  93. package/dist/{revolugo.vinput.Cm7jTICX.min.js → revolugo.vinput.9l5CzrYJ.min.js} +9 -9
  94. package/dist/{revolugo.vitemgroup.Cx2l6nP2.min.js → revolugo.vitemgroup.CIcxzzC6.min.js} +7 -7
  95. package/dist/{revolugo.vlistitem.CFUhBC05.min.js → revolugo.vlistitem.DLjOsb8o.min.js} +8 -8
  96. package/dist/{revolugo.vmenu.BklgEHiC.min.js → revolugo.vmenu.CeS2GyXZ.min.js} +10 -10
  97. package/dist/{revolugo.vselect.IUnGF2CT.min.js → revolugo.vselect.Bp6HU30r.min.js} +15 -15
  98. package/dist/{revolugo.vsheet.CeC7JEVb.min.js → revolugo.vsheet.DlCCd6PI.min.js} +6 -6
  99. package/dist/{revolugo.vskeletonloader.T0Sj67u2.min.js → revolugo.vskeletonloader.C1ZuTHjb.min.js} +4 -4
  100. package/dist/{revolugo.vslidegroup.Dt4KvG1W.min.js → revolugo.vslidegroup.C40JffMI.min.js} +10 -10
  101. package/dist/{revolugo.vsnackbar.2IsRhccK.min.js → revolugo.vsnackbar.DQ_WLXS-.min.js} +5 -5
  102. package/dist/{revolugo.vtextfield.ndSvyN0P.min.js → revolugo.vtextfield.D0SzvDXM.min.js} +12 -12
  103. package/dist/{revolugo.vtoolbar.hGub5RDG.min.js → revolugo.vtoolbar.DPznK_s3.min.js} +5 -5
  104. package/dist/{revolugo.vtooltip.yWMo-A7h.min.js → revolugo.vtooltip.BRUkBK8U.min.js} +7 -7
  105. package/dist/{revolugo.vuetify.CCSPNwIH.min.js → revolugo.vuetify.WDp56OG9.min.js} +228 -228
  106. package/dist/{revolugo.watch-list.Bi8SNUJ6.min.js → revolugo.watch-list.DfnUSWxR.min.js} +3 -3
  107. package/dist/{revolugo.webcomponentwrapper.Ct1w2wDx.min.js → revolugo.webcomponentwrapper.Bxp0INRR.min.js} +7 -7
  108. package/package.json +4 -5
  109. package/dist/revolugo.creditcardform.BayaCj7N.min.js +0 -2003
  110. package/dist/revolugo.hotelofferlist.BVA1qSK4.min.js +0 -3618
  111. package/dist/revolugo.index.BOaxC3qr.min.js +0 -15
  112. package/dist/revolugo.typed-mixins.Dz5yLoi0.min.js +0 -8
@@ -0,0 +1,2003 @@
1
+ import { E as xe } from "./revolugo.revolugo-config.eJ199U_F.min.js";
2
+ import { E as X, V as Pe } from "./revolugo.i18n.B6flGapj.min.js";
3
+ import { B as Te } from "./revolugo.bformattedamount.CEmw-f2u.min.js";
4
+ import { l as Re, n as Me, _ as D, a as k } from "./revolugo.webcomponentwrapper.Bxp0INRR.min.js";
5
+ import { _ as ke } from "./revolugo.valert.CG2oNawN.min.js";
6
+ import { S as Oe } from "./revolugo.index.CSQyjabN.min.js";
7
+ import { _ as tt } from "./revolugo.index.iku7fbFQ.min.js";
8
+ import { _ as Ne } from "./revolugo.vinput.9l5CzrYJ.min.js";
9
+ import { _ as Tt } from "./revolugo.vcard.EZjjn7hB.min.js";
10
+ import { _ as Ie } from "./revolugo.vtoolbar.DPznK_s3.min.js";
11
+ import { a as He, _ as Le } from "./revolugo.vbtn.CgpjK-rC.min.js";
12
+ import { V as Ue } from "./revolugo.index.CKodHqzD.min.js";
13
+ import { _ as qe } from "./revolugo.vskeletonloader.C1ZuTHjb.min.js";
14
+ function Ce(s) {
15
+ try {
16
+ if (typeof document < "u") {
17
+ window.REVOLUGO_ELEMENTS_STYLES = window.REVOLUGO_ELEMENTS_STYLES || {
18
+ sheets: [],
19
+ components: []
20
+ };
21
+ const t = import.meta.url, e = t.slice(0, t.lastIndexOf("/") + 1) + s;
22
+ window.REVOLUGO_ELEMENTS_STYLES.sheets.push(e);
23
+ for (const i of REVOLUGO_ELEMENTS_STYLES.components)
24
+ i(e);
25
+ if (s.indexOf("fonts") >= 0) {
26
+ const i = document.createElement("link");
27
+ i.rel = "stylesheet", linK.href = e, document.head.appendChild(i);
28
+ }
29
+ }
30
+ } catch (t) {
31
+ console.error("[revolugo-elements] ", t);
32
+ }
33
+ }
34
+ const Be = Oe.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
+ ...Ne.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(s) {
81
+ this.$nextTick(() => this.inputIndeterminate = s);
82
+ },
83
+ inputIndeterminate(s) {
84
+ this.$emit("update:indeterminate", s);
85
+ },
86
+ isActive() {
87
+ this.indeterminate && (this.inputIndeterminate = !1);
88
+ }
89
+ },
90
+ methods: {
91
+ genCheckbox() {
92
+ const {
93
+ title: s,
94
+ ...t
95
+ } = this.attrs$;
96
+ return this.$createElement("div", {
97
+ staticClass: "v-input--selection-controls__input"
98
+ }, [this.$createElement(tt, 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
+ ...t,
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
+ }), De = {
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 ie = (s) => (t) => typeof t == "function" ? ((e, i) => (customElements.define(e, i), i))(s, t) : ((e, i) => {
140
+ const { kind: n, elements: r } = i;
141
+ return { kind: n, elements: r, finisher(o) {
142
+ customElements.define(e, o);
143
+ } };
144
+ })(s, t);
145
+ /**
146
+ * @license
147
+ * Copyright 2017 Google LLC
148
+ * SPDX-License-Identifier: BSD-3-Clause
149
+ */
150
+ const je = (s, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
151
+ e.createProperty(t.key, s);
152
+ } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
153
+ typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
154
+ }, finisher(e) {
155
+ e.createProperty(t.key, s);
156
+ } }, Ve = (s, t, e) => {
157
+ t.constructor.createProperty(e, s);
158
+ };
159
+ function p(s) {
160
+ return (t, e) => e !== void 0 ? Ve(s, t, e) : je(s, t);
161
+ }
162
+ /**
163
+ * @license
164
+ * Copyright 2021 Google LLC
165
+ * SPDX-License-Identifier: BSD-3-Clause
166
+ */
167
+ var ut;
168
+ ((ut = window.HTMLSlotElement) === null || ut === void 0 ? void 0 : ut.prototype.assignedElements) != null;
169
+ var Rt = !0;
170
+ function S(s, t, e) {
171
+ if (typeof (e == null ? void 0 : e.value) != "function")
172
+ throw new TypeError(`Only methods can be decorated with @bound. <${t ?? s.name}> is not a method!`);
173
+ return {
174
+ configurable: Rt,
175
+ get() {
176
+ const i = e.value.bind(this);
177
+ return Object.defineProperty(this, t, { value: i, configurable: Rt, writable: !0 }), i;
178
+ }
179
+ };
180
+ }
181
+ /**
182
+ * @license
183
+ * Copyright 2019 Google LLC
184
+ * SPDX-License-Identifier: BSD-3-Clause
185
+ */
186
+ const et = window, wt = et.ShadowRoot && (et.ShadyCSS === void 0 || et.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Et = Symbol(), Mt = /* @__PURE__ */ new WeakMap();
187
+ let ne = class {
188
+ constructor(t, e, i) {
189
+ if (this._$cssResult$ = !0, i !== Et) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
190
+ this.cssText = t, this.t = e;
191
+ }
192
+ get styleSheet() {
193
+ let t = this.o;
194
+ const e = this.t;
195
+ if (wt && t === void 0) {
196
+ const i = e !== void 0 && e.length === 1;
197
+ i && (t = Mt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Mt.set(e, t));
198
+ }
199
+ return t;
200
+ }
201
+ toString() {
202
+ return this.cssText;
203
+ }
204
+ };
205
+ const ze = (s) => new ne(typeof s == "string" ? s : s + "", void 0, Et), Ct = (s, ...t) => {
206
+ const e = s.length === 1 ? s[0] : t.reduce((i, n, r) => i + ((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
+ })(n) + s[r + 1], s[0]);
211
+ return new ne(e, s, Et);
212
+ }, Fe = (s, t) => {
213
+ wt ? s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
214
+ const i = document.createElement("style"), n = et.litNonce;
215
+ n !== void 0 && i.setAttribute("nonce", n), i.textContent = e.cssText, s.appendChild(i);
216
+ });
217
+ }, kt = wt ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
218
+ let e = "";
219
+ for (const i of t.cssRules) e += i.cssText;
220
+ return ze(e);
221
+ })(s) : s;
222
+ /**
223
+ * @license
224
+ * Copyright 2017 Google LLC
225
+ * SPDX-License-Identifier: BSD-3-Clause
226
+ */
227
+ var dt;
228
+ const ot = window, Ot = ot.trustedTypes, We = Ot ? Ot.emptyScript : "", Nt = ot.reactiveElementPolyfillSupport, gt = { toAttribute(s, t) {
229
+ switch (t) {
230
+ case Boolean:
231
+ s = s ? We : null;
232
+ break;
233
+ case Object:
234
+ case Array:
235
+ s = s == null ? s : JSON.stringify(s);
236
+ }
237
+ return s;
238
+ }, fromAttribute(s, t) {
239
+ let e = s;
240
+ switch (t) {
241
+ case Boolean:
242
+ e = s !== null;
243
+ break;
244
+ case Number:
245
+ e = s === null ? null : Number(s);
246
+ break;
247
+ case Object:
248
+ case Array:
249
+ try {
250
+ e = JSON.parse(s);
251
+ } catch {
252
+ e = null;
253
+ }
254
+ }
255
+ return e;
256
+ } }, re = (s, t) => t !== s && (t == t || s == s), mt = { attribute: !0, type: String, converter: gt, reflect: !1, hasChanged: re }, At = "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(t) {
262
+ var e;
263
+ this.finalize(), ((e = this.h) !== null && e !== void 0 ? e : this.h = []).push(t);
264
+ }
265
+ static get observedAttributes() {
266
+ this.finalize();
267
+ const t = [];
268
+ return this.elementProperties.forEach((e, i) => {
269
+ const n = this._$Ep(i, e);
270
+ n !== void 0 && (this._$Ev.set(n, i), t.push(n));
271
+ }), t;
272
+ }
273
+ static createProperty(t, e = mt) {
274
+ if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
275
+ const i = typeof t == "symbol" ? Symbol() : "__" + t, n = this.getPropertyDescriptor(t, i, e);
276
+ n !== void 0 && Object.defineProperty(this.prototype, t, n);
277
+ }
278
+ }
279
+ static getPropertyDescriptor(t, e, i) {
280
+ return { get() {
281
+ return this[e];
282
+ }, set(n) {
283
+ const r = this[t];
284
+ this[e] = n, this.requestUpdate(t, r, i);
285
+ }, configurable: !0, enumerable: !0 };
286
+ }
287
+ static getPropertyOptions(t) {
288
+ return this.elementProperties.get(t) || mt;
289
+ }
290
+ static finalize() {
291
+ if (this.hasOwnProperty(At)) return !1;
292
+ this[At] = !0;
293
+ const t = Object.getPrototypeOf(this);
294
+ if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
295
+ const e = this.properties, i = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
296
+ for (const n of i) this.createProperty(n, e[n]);
297
+ }
298
+ return this.elementStyles = this.finalizeStyles(this.styles), !0;
299
+ }
300
+ static finalizeStyles(t) {
301
+ const e = [];
302
+ if (Array.isArray(t)) {
303
+ const i = new Set(t.flat(1 / 0).reverse());
304
+ for (const n of i) e.unshift(kt(n));
305
+ } else t !== void 0 && e.push(kt(t));
306
+ return e;
307
+ }
308
+ static _$Ep(t, e) {
309
+ const i = e.attribute;
310
+ return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
311
+ }
312
+ _$Eu() {
313
+ var t;
314
+ this._$E_ = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach((e) => e(this));
315
+ }
316
+ addController(t) {
317
+ var e, i;
318
+ ((e = this._$ES) !== null && e !== void 0 ? e : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((i = t.hostConnected) === null || i === void 0 || i.call(t));
319
+ }
320
+ removeController(t) {
321
+ var e;
322
+ (e = this._$ES) === null || e === void 0 || e.splice(this._$ES.indexOf(t) >>> 0, 1);
323
+ }
324
+ _$Eg() {
325
+ this.constructor.elementProperties.forEach((t, e) => {
326
+ this.hasOwnProperty(e) && (this._$Ei.set(e, this[e]), delete this[e]);
327
+ });
328
+ }
329
+ createRenderRoot() {
330
+ var t;
331
+ const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
332
+ return Fe(e, this.constructor.elementStyles), e;
333
+ }
334
+ connectedCallback() {
335
+ var t;
336
+ this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach((e) => {
337
+ var i;
338
+ return (i = e.hostConnected) === null || i === void 0 ? void 0 : i.call(e);
339
+ });
340
+ }
341
+ enableUpdating(t) {
342
+ }
343
+ disconnectedCallback() {
344
+ var t;
345
+ (t = this._$ES) === null || t === void 0 || t.forEach((e) => {
346
+ var i;
347
+ return (i = e.hostDisconnected) === null || i === void 0 ? void 0 : i.call(e);
348
+ });
349
+ }
350
+ attributeChangedCallback(t, e, i) {
351
+ this._$AK(t, i);
352
+ }
353
+ _$EO(t, e, i = mt) {
354
+ var n;
355
+ const r = this.constructor._$Ep(t, i);
356
+ if (r !== void 0 && i.reflect === !0) {
357
+ const o = (((n = i.converter) === null || n === void 0 ? void 0 : n.toAttribute) !== void 0 ? i.converter : gt).toAttribute(e, i.type);
358
+ this._$El = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$El = null;
359
+ }
360
+ }
361
+ _$AK(t, e) {
362
+ var i;
363
+ const n = this.constructor, r = n._$Ev.get(t);
364
+ if (r !== void 0 && this._$El !== r) {
365
+ const o = n.getPropertyOptions(r), u = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((i = o.converter) === null || i === void 0 ? void 0 : i.fromAttribute) !== void 0 ? o.converter : gt;
366
+ this._$El = r, this[r] = u.fromAttribute(e, o.type), this._$El = null;
367
+ }
368
+ }
369
+ requestUpdate(t, e, i) {
370
+ let n = !0;
371
+ t !== void 0 && (((i = i || this.constructor.getPropertyOptions(t)).hasChanged || re)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, i))) : n = !1), !this.isUpdatePending && n && (this._$E_ = this._$Ej());
372
+ }
373
+ async _$Ej() {
374
+ this.isUpdatePending = !0;
375
+ try {
376
+ await this._$E_;
377
+ } catch (e) {
378
+ Promise.reject(e);
379
+ }
380
+ const t = this.scheduleUpdate();
381
+ return t != null && await t, !this.isUpdatePending;
382
+ }
383
+ scheduleUpdate() {
384
+ return this.performUpdate();
385
+ }
386
+ performUpdate() {
387
+ var t;
388
+ if (!this.isUpdatePending) return;
389
+ this.hasUpdated, this._$Ei && (this._$Ei.forEach((n, r) => this[r] = n), this._$Ei = void 0);
390
+ let e = !1;
391
+ const i = this._$AL;
392
+ try {
393
+ e = this.shouldUpdate(i), e ? (this.willUpdate(i), (t = this._$ES) === null || t === void 0 || t.forEach((n) => {
394
+ var r;
395
+ return (r = n.hostUpdate) === null || r === void 0 ? void 0 : r.call(n);
396
+ }), this.update(i)) : this._$Ek();
397
+ } catch (n) {
398
+ throw e = !1, this._$Ek(), n;
399
+ }
400
+ e && this._$AE(i);
401
+ }
402
+ willUpdate(t) {
403
+ }
404
+ _$AE(t) {
405
+ var e;
406
+ (e = this._$ES) === null || e === void 0 || e.forEach((i) => {
407
+ var n;
408
+ return (n = i.hostUpdated) === null || n === void 0 ? void 0 : n.call(i);
409
+ }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
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(t) {
421
+ return !0;
422
+ }
423
+ update(t) {
424
+ this._$EC !== void 0 && (this._$EC.forEach((e, i) => this._$EO(i, this[i], e)), this._$EC = void 0), this._$Ek();
425
+ }
426
+ updated(t) {
427
+ }
428
+ firstUpdated(t) {
429
+ }
430
+ };
431
+ O[At] = !0, O.elementProperties = /* @__PURE__ */ new Map(), O.elementStyles = [], O.shadowRootOptions = { mode: "open" }, Nt == null || Nt({ ReactiveElement: O }), ((dt = ot.reactiveElementVersions) !== null && dt !== void 0 ? dt : ot.reactiveElementVersions = []).push("1.6.3");
432
+ /**
433
+ * @license
434
+ * Copyright 2017 Google LLC
435
+ * SPDX-License-Identifier: BSD-3-Clause
436
+ */
437
+ var yt;
438
+ const at = window, I = at.trustedTypes, It = I ? I.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, E = `lit$${(Math.random() + "").slice(9)}$`, oe = "?" + E, Ge = `<${oe}>`, H = document, lt = (s = "") => H.createComment(s), W = (s) => s === null || typeof s != "object" && typeof s != "function", ae = Array.isArray, Ke = (s) => ae(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", j = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ht = /-->/g, Lt = />/g, x = RegExp(`>|[
439
+ \f\r](?:([^\\s"'>=/]+)([
440
+ \f\r]*=[
441
+ \f\r]*(?:[^
442
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Ut = /'/g, qt = /"/g, le = /^(?:script|style|textarea|title)$/i, G = Symbol.for("lit-noChange"), _ = Symbol.for("lit-nothing"), Bt = /* @__PURE__ */ new WeakMap(), N = H.createTreeWalker(H, 129, null, !1), Ye = (s, t) => {
443
+ const e = s.length - 1, i = [];
444
+ let n, r = t === 2 ? "<svg>" : "", o = j;
445
+ for (let a = 0; a < e; a++) {
446
+ const l = s[a];
447
+ let y, c, d = -1, $ = 0;
448
+ for (; $ < l.length && (o.lastIndex = $, c = o.exec(l), c !== null); ) $ = o.lastIndex, o === j ? c[1] === "!--" ? o = Ht : c[1] !== void 0 ? o = Lt : c[2] !== void 0 ? (le.test(c[2]) && (n = RegExp("</" + c[2], "g")), o = x) : c[3] !== void 0 && (o = x) : o === x ? c[0] === ">" ? (o = n ?? j, d = -1) : c[1] === void 0 ? d = -2 : (d = o.lastIndex - c[2].length, y = c[1], o = c[3] === void 0 ? x : c[3] === '"' ? qt : Ut) : o === qt || o === Ut ? o = x : o === Ht || o === Lt ? o = j : (o = x, n = void 0);
449
+ const M = o === x && s[a + 1].startsWith("/>") ? " " : "";
450
+ r += o === j ? l + Ge : d >= 0 ? (i.push(y), l.slice(0, d) + "$lit$" + l.slice(d) + E + M) : l + E + (d === -2 ? (i.push(void 0), a) : M);
451
+ }
452
+ const u = r + (s[e] || "<?>") + (t === 2 ? "</svg>" : "");
453
+ if (!Array.isArray(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
454
+ return [It !== void 0 ? It.createHTML(u) : u, i];
455
+ };
456
+ let bt = class he {
457
+ constructor({ strings: t, _$litType$: e }, i) {
458
+ let n;
459
+ this.parts = [];
460
+ let r = 0, o = 0;
461
+ const u = t.length - 1, a = this.parts, [l, y] = Ye(t, e);
462
+ if (this.el = he.createElement(l, i), N.currentNode = this.el.content, e === 2) {
463
+ const c = this.el.content, d = c.firstChild;
464
+ d.remove(), c.append(...d.childNodes);
465
+ }
466
+ for (; (n = N.nextNode()) !== null && a.length < u; ) {
467
+ if (n.nodeType === 1) {
468
+ if (n.hasAttributes()) {
469
+ const c = [];
470
+ for (const d of n.getAttributeNames()) if (d.endsWith("$lit$") || d.startsWith(E)) {
471
+ const $ = y[o++];
472
+ if (c.push(d), $ !== void 0) {
473
+ const M = n.getAttribute($.toLowerCase() + "$lit$").split(E), w = /([.?@])?(.*)/.exec($);
474
+ a.push({ type: 1, index: r, name: w[2], strings: M, ctor: w[1] === "." ? Je : w[1] === "?" ? Qe : w[1] === "@" ? ts : ct });
475
+ } else a.push({ type: 6, index: r });
476
+ }
477
+ for (const d of c) n.removeAttribute(d);
478
+ }
479
+ if (le.test(n.tagName)) {
480
+ const c = n.textContent.split(E), d = c.length - 1;
481
+ if (d > 0) {
482
+ n.textContent = I ? I.emptyScript : "";
483
+ for (let $ = 0; $ < d; $++) n.append(c[$], lt()), N.nextNode(), a.push({ type: 2, index: ++r });
484
+ n.append(c[d], lt());
485
+ }
486
+ }
487
+ } else if (n.nodeType === 8) if (n.data === oe) a.push({ type: 2, index: r });
488
+ else {
489
+ let c = -1;
490
+ for (; (c = n.data.indexOf(E, c + 1)) !== -1; ) a.push({ type: 7, index: r }), c += E.length - 1;
491
+ }
492
+ r++;
493
+ }
494
+ }
495
+ static createElement(t, e) {
496
+ const i = H.createElement("template");
497
+ return i.innerHTML = t, i;
498
+ }
499
+ };
500
+ function L(s, t, e = s, i) {
501
+ var n, r, o, u;
502
+ if (t === G) return t;
503
+ let a = i !== void 0 ? (n = e._$Co) === null || n === void 0 ? void 0 : n[i] : e._$Cl;
504
+ const l = W(t) ? void 0 : t._$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(s), a._$AT(s, e, i)), i !== void 0 ? ((o = (u = e)._$Co) !== null && o !== void 0 ? o : u._$Co = [])[i] = a : e._$Cl = a), a !== void 0 && (t = L(s, a._$AS(s, t.values), a, i)), t;
506
+ }
507
+ let Ze = class {
508
+ constructor(t, e) {
509
+ this.u = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
510
+ }
511
+ get parentNode() {
512
+ return this._$AM.parentNode;
513
+ }
514
+ get _$AU() {
515
+ return this._$AM._$AU;
516
+ }
517
+ v(t) {
518
+ var e;
519
+ const { el: { content: i }, parts: n } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : H).importNode(i, !0);
520
+ N.currentNode = r;
521
+ let o = N.nextNode(), u = 0, a = 0, l = n[0];
522
+ for (; l !== void 0; ) {
523
+ if (u === l.index) {
524
+ let y;
525
+ l.type === 2 ? y = new ce(o, o.nextSibling, this, t) : l.type === 1 ? y = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (y = new es(o, this, t)), this.u.push(y), l = n[++a];
526
+ }
527
+ u !== (l == null ? void 0 : l.index) && (o = N.nextNode(), u++);
528
+ }
529
+ return r;
530
+ }
531
+ p(t) {
532
+ let e = 0;
533
+ for (const i of this.u) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
534
+ }
535
+ }, ce = class pe {
536
+ constructor(t, e, i, n) {
537
+ var r;
538
+ this.type = 2, this._$AH = _, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = n, this._$Cm = (r = n == null ? void 0 : n.isConnected) === null || r === void 0 || r;
539
+ }
540
+ get _$AU() {
541
+ var t, e;
542
+ return (e = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && e !== void 0 ? e : this._$Cm;
543
+ }
544
+ get parentNode() {
545
+ let t = this._$AA.parentNode;
546
+ const e = this._$AM;
547
+ return e !== void 0 && t.nodeType === 11 && (t = e.parentNode), t;
548
+ }
549
+ get startNode() {
550
+ return this._$AA;
551
+ }
552
+ get endNode() {
553
+ return this._$AB;
554
+ }
555
+ _$AI(t, e = this) {
556
+ t = L(this, t, e), W(t) ? t === _ || t == null || t === "" ? (this._$AH !== _ && this._$AR(), this._$AH = _) : t !== this._$AH && t !== G && this.g(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ke(t) ? this.k(t) : this.g(t);
557
+ }
558
+ O(t, e = this._$AB) {
559
+ return this._$AA.parentNode.insertBefore(t, e);
560
+ }
561
+ T(t) {
562
+ this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
563
+ }
564
+ g(t) {
565
+ this._$AH !== _ && W(this._$AH) ? this._$AA.nextSibling.data = t : this.T(H.createTextNode(t)), this._$AH = t;
566
+ }
567
+ $(t) {
568
+ var e;
569
+ const { values: i, _$litType$: n } = t, r = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = bt.createElement(n.h, this.options)), n);
570
+ if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === r) this._$AH.p(i);
571
+ else {
572
+ const o = new Ze(r, this), u = o.v(this.options);
573
+ o.p(i), this.T(u), this._$AH = o;
574
+ }
575
+ }
576
+ _$AC(t) {
577
+ let e = Bt.get(t.strings);
578
+ return e === void 0 && Bt.set(t.strings, e = new bt(t)), e;
579
+ }
580
+ k(t) {
581
+ ae(this._$AH) || (this._$AH = [], this._$AR());
582
+ const e = this._$AH;
583
+ let i, n = 0;
584
+ for (const r of t) n === e.length ? e.push(i = new pe(this.O(lt()), this.O(lt()), this, this.options)) : i = e[n], i._$AI(r), n++;
585
+ n < e.length && (this._$AR(i && i._$AB.nextSibling, n), e.length = n);
586
+ }
587
+ _$AR(t = this._$AA.nextSibling, e) {
588
+ var i;
589
+ for ((i = this._$AP) === null || i === void 0 || i.call(this, !1, !0, e); t && t !== this._$AB; ) {
590
+ const n = t.nextSibling;
591
+ t.remove(), t = n;
592
+ }
593
+ }
594
+ setConnected(t) {
595
+ var e;
596
+ this._$AM === void 0 && (this._$Cm = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
597
+ }
598
+ }, ct = class {
599
+ constructor(t, e, i, n, r) {
600
+ this.type = 1, this._$AH = _, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = _;
601
+ }
602
+ get tagName() {
603
+ return this.element.tagName;
604
+ }
605
+ get _$AU() {
606
+ return this._$AM._$AU;
607
+ }
608
+ _$AI(t, e = this, i, n) {
609
+ const r = this.strings;
610
+ let o = !1;
611
+ if (r === void 0) t = L(this, t, e, 0), o = !W(t) || t !== this._$AH && t !== G, o && (this._$AH = t);
612
+ else {
613
+ const u = t;
614
+ let a, l;
615
+ for (t = r[0], a = 0; a < r.length - 1; a++) l = L(this, u[i + a], e, a), l === G && (l = this._$AH[a]), o || (o = !W(l) || l !== this._$AH[a]), l === _ ? t = _ : t !== _ && (t += (l ?? "") + r[a + 1]), this._$AH[a] = l;
616
+ }
617
+ o && !n && this.j(t);
618
+ }
619
+ j(t) {
620
+ t === _ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
621
+ }
622
+ }, Je = class extends ct {
623
+ constructor() {
624
+ super(...arguments), this.type = 3;
625
+ }
626
+ j(t) {
627
+ this.element[this.name] = t === _ ? void 0 : t;
628
+ }
629
+ };
630
+ const Xe = I ? I.emptyScript : "";
631
+ let Qe = class extends ct {
632
+ constructor() {
633
+ super(...arguments), this.type = 4;
634
+ }
635
+ j(t) {
636
+ t && t !== _ ? this.element.setAttribute(this.name, Xe) : this.element.removeAttribute(this.name);
637
+ }
638
+ }, ts = class extends ct {
639
+ constructor(t, e, i, n, r) {
640
+ super(t, e, i, n, r), this.type = 5;
641
+ }
642
+ _$AI(t, e = this) {
643
+ var i;
644
+ if ((t = (i = L(this, t, e, 0)) !== null && i !== void 0 ? i : _) === G) return;
645
+ const n = this._$AH, r = t === _ && n !== _ || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, o = t !== _ && (n === _ || r);
646
+ r && this.element.removeEventListener(this.name, this, n), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
647
+ }
648
+ handleEvent(t) {
649
+ var e, i;
650
+ typeof this._$AH == "function" ? this._$AH.call((i = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && i !== void 0 ? i : this.element, t) : this._$AH.handleEvent(t);
651
+ }
652
+ }, es = class {
653
+ constructor(t, e, i) {
654
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
655
+ }
656
+ get _$AU() {
657
+ return this._$AM._$AU;
658
+ }
659
+ _$AI(t) {
660
+ L(this, t);
661
+ }
662
+ };
663
+ const Dt = at.litHtmlPolyfillSupport;
664
+ Dt == null || Dt(bt, ce), ((yt = at.litHtmlVersions) !== null && yt !== void 0 ? yt : at.litHtmlVersions = []).push("2.6.1");
665
+ /**
666
+ * @license
667
+ * Copyright 2017 Google LLC
668
+ * SPDX-License-Identifier: BSD-3-Clause
669
+ */
670
+ var ft;
671
+ const ht = window, U = ht.trustedTypes, jt = U ? U.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, St = "$lit$", C = `lit$${(Math.random() + "").slice(9)}$`, ue = "?" + C, ss = `<${ue}>`, R = document, K = () => R.createComment(""), Y = (s) => s === null || typeof s != "object" && typeof s != "function", de = Array.isArray, is = (s) => de(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", vt = `[
672
+ \f\r]`, V = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Vt = /-->/g, zt = />/g, P = RegExp(`>|${vt}(?:([^\\s"'>=/]+)(${vt}*=${vt}*(?:[^
673
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Ft = /'/g, Wt = /"/g, me = /^(?:script|style|textarea|title)$/i, ns = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), rs = ns(1), q = Symbol.for("lit-noChange"), g = Symbol.for("lit-nothing"), Gt = /* @__PURE__ */ new WeakMap(), T = R.createTreeWalker(R, 129, null, !1);
674
+ function ye(s, t) {
675
+ if (!Array.isArray(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
676
+ return jt !== void 0 ? jt.createHTML(t) : t;
677
+ }
678
+ const os = (s, t) => {
679
+ const e = s.length - 1, i = [];
680
+ let n, r = t === 2 ? "<svg>" : "", o = V;
681
+ for (let u = 0; u < e; u++) {
682
+ const a = s[u];
683
+ let l, y, c = -1, d = 0;
684
+ for (; d < a.length && (o.lastIndex = d, y = o.exec(a), y !== null); ) d = o.lastIndex, o === V ? y[1] === "!--" ? o = Vt : y[1] !== void 0 ? o = zt : y[2] !== void 0 ? (me.test(y[2]) && (n = RegExp("</" + y[2], "g")), o = P) : y[3] !== void 0 && (o = P) : o === P ? y[0] === ">" ? (o = n ?? V, c = -1) : y[1] === void 0 ? c = -2 : (c = o.lastIndex - y[2].length, l = y[1], o = y[3] === void 0 ? P : y[3] === '"' ? Wt : Ft) : o === Wt || o === Ft ? o = P : o === Vt || o === zt ? o = V : (o = P, n = void 0);
685
+ const $ = o === P && s[u + 1].startsWith("/>") ? " " : "";
686
+ r += o === V ? a + ss : c >= 0 ? (i.push(l), a.slice(0, c) + St + a.slice(c) + C + $) : a + C + (c === -2 ? (i.push(void 0), u) : $);
687
+ }
688
+ return [ye(s, r + (s[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
689
+ };
690
+ class Z {
691
+ constructor({ strings: t, _$litType$: e }, i) {
692
+ let n;
693
+ this.parts = [];
694
+ let r = 0, o = 0;
695
+ const u = t.length - 1, a = this.parts, [l, y] = os(t, e);
696
+ if (this.el = Z.createElement(l, i), T.currentNode = this.el.content, e === 2) {
697
+ const c = this.el.content, d = c.firstChild;
698
+ d.remove(), c.append(...d.childNodes);
699
+ }
700
+ for (; (n = T.nextNode()) !== null && a.length < u; ) {
701
+ if (n.nodeType === 1) {
702
+ if (n.hasAttributes()) {
703
+ const c = [];
704
+ for (const d of n.getAttributeNames()) if (d.endsWith(St) || d.startsWith(C)) {
705
+ const $ = y[o++];
706
+ if (c.push(d), $ !== void 0) {
707
+ const M = n.getAttribute($.toLowerCase() + St).split(C), w = /([.?@])?(.*)/.exec($);
708
+ a.push({ type: 1, index: r, name: w[2], strings: M, ctor: w[1] === "." ? ls : w[1] === "?" ? cs : w[1] === "@" ? ps : pt });
709
+ } else a.push({ type: 6, index: r });
710
+ }
711
+ for (const d of c) n.removeAttribute(d);
712
+ }
713
+ if (me.test(n.tagName)) {
714
+ const c = n.textContent.split(C), d = c.length - 1;
715
+ if (d > 0) {
716
+ n.textContent = U ? U.emptyScript : "";
717
+ for (let $ = 0; $ < d; $++) n.append(c[$], K()), T.nextNode(), a.push({ type: 2, index: ++r });
718
+ n.append(c[d], K());
719
+ }
720
+ }
721
+ } else if (n.nodeType === 8) if (n.data === ue) a.push({ type: 2, index: r });
722
+ else {
723
+ let c = -1;
724
+ for (; (c = n.data.indexOf(C, c + 1)) !== -1; ) a.push({ type: 7, index: r }), c += C.length - 1;
725
+ }
726
+ r++;
727
+ }
728
+ }
729
+ static createElement(t, e) {
730
+ const i = R.createElement("template");
731
+ return i.innerHTML = t, i;
732
+ }
733
+ }
734
+ function B(s, t, e = s, i) {
735
+ var n, r, o, u;
736
+ if (t === q) return t;
737
+ let a = i !== void 0 ? (n = e._$Co) === null || n === void 0 ? void 0 : n[i] : e._$Cl;
738
+ const l = Y(t) ? void 0 : t._$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(s), a._$AT(s, e, i)), i !== void 0 ? ((o = (u = e)._$Co) !== null && o !== void 0 ? o : u._$Co = [])[i] = a : e._$Cl = a), a !== void 0 && (t = B(s, a._$AS(s, t.values), a, i)), t;
740
+ }
741
+ class as {
742
+ constructor(t, e) {
743
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
744
+ }
745
+ get parentNode() {
746
+ return this._$AM.parentNode;
747
+ }
748
+ get _$AU() {
749
+ return this._$AM._$AU;
750
+ }
751
+ u(t) {
752
+ var e;
753
+ const { el: { content: i }, parts: n } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : R).importNode(i, !0);
754
+ T.currentNode = r;
755
+ let o = T.nextNode(), u = 0, a = 0, l = n[0];
756
+ for (; l !== void 0; ) {
757
+ if (u === l.index) {
758
+ let y;
759
+ l.type === 2 ? y = new J(o, o.nextSibling, this, t) : l.type === 1 ? y = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (y = new us(o, this, t)), this._$AV.push(y), l = n[++a];
760
+ }
761
+ u !== (l == null ? void 0 : l.index) && (o = T.nextNode(), u++);
762
+ }
763
+ return T.currentNode = R, r;
764
+ }
765
+ v(t) {
766
+ let e = 0;
767
+ for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
768
+ }
769
+ }
770
+ class J {
771
+ constructor(t, e, i, n) {
772
+ var r;
773
+ this.type = 2, this._$AH = g, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = n, this._$Cp = (r = n == null ? void 0 : n.isConnected) === null || r === void 0 || r;
774
+ }
775
+ get _$AU() {
776
+ var t, e;
777
+ return (e = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && e !== void 0 ? e : this._$Cp;
778
+ }
779
+ get parentNode() {
780
+ let t = this._$AA.parentNode;
781
+ const e = this._$AM;
782
+ return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
783
+ }
784
+ get startNode() {
785
+ return this._$AA;
786
+ }
787
+ get endNode() {
788
+ return this._$AB;
789
+ }
790
+ _$AI(t, e = this) {
791
+ t = B(this, t, e), Y(t) ? t === g || t == null || t === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : t !== this._$AH && t !== q && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : is(t) ? this.T(t) : this._(t);
792
+ }
793
+ k(t) {
794
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
795
+ }
796
+ $(t) {
797
+ this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
798
+ }
799
+ _(t) {
800
+ this._$AH !== g && Y(this._$AH) ? this._$AA.nextSibling.data = t : this.$(R.createTextNode(t)), this._$AH = t;
801
+ }
802
+ g(t) {
803
+ var e;
804
+ const { values: i, _$litType$: n } = t, r = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = Z.createElement(ye(n.h, n.h[0]), this.options)), n);
805
+ if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === r) this._$AH.v(i);
806
+ else {
807
+ const o = new as(r, this), u = o.u(this.options);
808
+ o.v(i), this.$(u), this._$AH = o;
809
+ }
810
+ }
811
+ _$AC(t) {
812
+ let e = Gt.get(t.strings);
813
+ return e === void 0 && Gt.set(t.strings, e = new Z(t)), e;
814
+ }
815
+ T(t) {
816
+ de(this._$AH) || (this._$AH = [], this._$AR());
817
+ const e = this._$AH;
818
+ let i, n = 0;
819
+ for (const r of t) n === e.length ? e.push(i = new J(this.k(K()), this.k(K()), this, this.options)) : i = e[n], i._$AI(r), n++;
820
+ n < e.length && (this._$AR(i && i._$AB.nextSibling, n), e.length = n);
821
+ }
822
+ _$AR(t = this._$AA.nextSibling, e) {
823
+ var i;
824
+ for ((i = this._$AP) === null || i === void 0 || i.call(this, !1, !0, e); t && t !== this._$AB; ) {
825
+ const n = t.nextSibling;
826
+ t.remove(), t = n;
827
+ }
828
+ }
829
+ setConnected(t) {
830
+ var e;
831
+ this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
832
+ }
833
+ }
834
+ class pt {
835
+ constructor(t, e, i, n, r) {
836
+ this.type = 1, this._$AH = g, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = g;
837
+ }
838
+ get tagName() {
839
+ return this.element.tagName;
840
+ }
841
+ get _$AU() {
842
+ return this._$AM._$AU;
843
+ }
844
+ _$AI(t, e = this, i, n) {
845
+ const r = this.strings;
846
+ let o = !1;
847
+ if (r === void 0) t = B(this, t, e, 0), o = !Y(t) || t !== this._$AH && t !== q, o && (this._$AH = t);
848
+ else {
849
+ const u = t;
850
+ let a, l;
851
+ for (t = r[0], a = 0; a < r.length - 1; a++) l = B(this, u[i + a], e, a), l === q && (l = this._$AH[a]), o || (o = !Y(l) || l !== this._$AH[a]), l === g ? t = g : t !== g && (t += (l ?? "") + r[a + 1]), this._$AH[a] = l;
852
+ }
853
+ o && !n && this.j(t);
854
+ }
855
+ j(t) {
856
+ t === g ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
857
+ }
858
+ }
859
+ class ls extends pt {
860
+ constructor() {
861
+ super(...arguments), this.type = 3;
862
+ }
863
+ j(t) {
864
+ this.element[this.name] = t === g ? void 0 : t;
865
+ }
866
+ }
867
+ const hs = U ? U.emptyScript : "";
868
+ class cs extends pt {
869
+ constructor() {
870
+ super(...arguments), this.type = 4;
871
+ }
872
+ j(t) {
873
+ t && t !== g ? this.element.setAttribute(this.name, hs) : this.element.removeAttribute(this.name);
874
+ }
875
+ }
876
+ class ps extends pt {
877
+ constructor(t, e, i, n, r) {
878
+ super(t, e, i, n, r), this.type = 5;
879
+ }
880
+ _$AI(t, e = this) {
881
+ var i;
882
+ if ((t = (i = B(this, t, e, 0)) !== null && i !== void 0 ? i : g) === q) return;
883
+ const n = this._$AH, r = t === g && n !== g || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, o = t !== g && (n === g || r);
884
+ r && this.element.removeEventListener(this.name, this, n), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
885
+ }
886
+ handleEvent(t) {
887
+ var e, i;
888
+ typeof this._$AH == "function" ? this._$AH.call((i = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && i !== void 0 ? i : this.element, t) : this._$AH.handleEvent(t);
889
+ }
890
+ }
891
+ class us {
892
+ constructor(t, e, i) {
893
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
894
+ }
895
+ get _$AU() {
896
+ return this._$AM._$AU;
897
+ }
898
+ _$AI(t) {
899
+ B(this, t);
900
+ }
901
+ }
902
+ const Kt = ht.litHtmlPolyfillSupport;
903
+ Kt == null || Kt(Z, J), ((ft = ht.litHtmlVersions) !== null && ft !== void 0 ? ft : ht.litHtmlVersions = []).push("2.8.0");
904
+ const ds = (s, t, e) => {
905
+ var i, n;
906
+ const r = (i = e == null ? void 0 : e.renderBefore) !== null && i !== void 0 ? i : t;
907
+ let o = r._$litPart$;
908
+ if (o === void 0) {
909
+ const u = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : null;
910
+ r._$litPart$ = o = new J(t.insertBefore(K(), u), u, void 0, e ?? {});
911
+ }
912
+ return o._$AI(s), o;
913
+ };
914
+ /**
915
+ * @license
916
+ * Copyright 2017 Google LLC
917
+ * SPDX-License-Identifier: BSD-3-Clause
918
+ */
919
+ var $t, _t;
920
+ class F extends O {
921
+ constructor() {
922
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
923
+ }
924
+ createRenderRoot() {
925
+ var t, e;
926
+ const i = super.createRenderRoot();
927
+ return (t = (e = this.renderOptions).renderBefore) !== null && t !== void 0 || (e.renderBefore = i.firstChild), i;
928
+ }
929
+ update(t) {
930
+ const e = this.render();
931
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = ds(e, this.renderRoot, this.renderOptions);
932
+ }
933
+ connectedCallback() {
934
+ var t;
935
+ super.connectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!0);
936
+ }
937
+ disconnectedCallback() {
938
+ var t;
939
+ super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
940
+ }
941
+ render() {
942
+ return q;
943
+ }
944
+ }
945
+ F.finalized = !0, F._$litElement$ = !0, ($t = globalThis.litElementHydrateSupport) === null || $t === void 0 || $t.call(globalThis, { LitElement: F });
946
+ const Yt = globalThis.litElementPolyfillSupport;
947
+ Yt == null || Yt({ LitElement: F });
948
+ ((_t = globalThis.litElementVersions) !== null && _t !== void 0 ? _t : globalThis.litElementVersions = []).push("3.3.3");
949
+ /**
950
+ * @license
951
+ * Copyright 2018 Google LLC
952
+ * SPDX-License-Identifier: BSD-3-Clause
953
+ */
954
+ const ms = (s) => s ?? _, ys = /[A-ZÀ-ÖÙ-Ý]+/g, fs = /[a-zà-öù-ý]+/g;
955
+ function vs(s) {
956
+ const t = s.replace(ys, e).match(fs);
957
+ return t ? t.join("-") : "";
958
+ function e(i) {
959
+ return " " + (i.length > 2 ? i.slice(0, -1) + " " + i.slice(-1) : i).toLowerCase();
960
+ }
961
+ }
962
+ function $s() {
963
+ const s = {};
964
+ return {
965
+ has: (t) => Object.hasOwnProperty.call(s, t),
966
+ get: (t) => s[t],
967
+ set: (t, e) => {
968
+ s[t] = e;
969
+ }
970
+ };
971
+ }
972
+ function _s(s, t) {
973
+ const e = $s();
974
+ return (...i) => {
975
+ const n = s(...i);
976
+ return e.has(n) || e.set(n, t(...i)), e.get(n);
977
+ };
978
+ }
979
+ var gs = (s) => s, fe = _s(gs, vs), As = (s) => (t) => s.includes(t), bs = As(["paymentMethod", "source", "token"]);
980
+ async function Ss(s) {
981
+ const { ok: t, statusText: e } = s;
982
+ if (!t)
983
+ throw new Error(e);
984
+ return s;
985
+ }
986
+ function ws(s) {
987
+ return "addInitializer" in s.constructor;
988
+ }
989
+ var z = class {
990
+ constructor(s) {
991
+ if (this.host = s, this.values = /* @__PURE__ */ new Map(), z.instances.has(s))
992
+ return z.instances.get(s);
993
+ s.addController(this), z.instances.set(s, this);
994
+ }
995
+ static for(s) {
996
+ return new z(s);
997
+ }
998
+ hostConnected() {
999
+ }
1000
+ set(s, t) {
1001
+ const e = this.values.get(s);
1002
+ this.values.set(s, t), ws(this.host) ? this.host.requestUpdate(s, e) : this.host.requestUpdate();
1003
+ }
1004
+ }, xt = z;
1005
+ xt.instances = /* @__PURE__ */ new Map();
1006
+ function m(s, t) {
1007
+ const e = s.constructor;
1008
+ e.addInitializer((i) => {
1009
+ const n = xt.for(i);
1010
+ Object.defineProperty(i.constructor.prototype, t, {
1011
+ enumerable: !0,
1012
+ configurable: !0,
1013
+ get() {
1014
+ return n.values.get(t);
1015
+ },
1016
+ set(r) {
1017
+ n.values.has(t) || n.values.set(t, r);
1018
+ }
1019
+ }), e.createProperty(t, {
1020
+ ...e.getPropertyOptions(t),
1021
+ noAccessor: !0
1022
+ });
1023
+ });
1024
+ }
1025
+ m.set = function(s, t) {
1026
+ const e = xt.for(s);
1027
+ for (const [i, n] of Object.entries(t))
1028
+ e.set(i, n);
1029
+ };
1030
+ var Es = class extends Event {
1031
+ constructor(s, t, e, i) {
1032
+ super(`${i ?? s.toLowerCase()}-changed`), this.key = s, this.oldValue = t, this.value = e, this.detail = { value: e };
1033
+ }
1034
+ }, st = class {
1035
+ constructor(s) {
1036
+ if (this.host = s, this.cache = /* @__PURE__ */ new Map(), st.instances.has(s))
1037
+ return st.instances.get(s);
1038
+ s.addController(this), st.instances.set(s, this);
1039
+ }
1040
+ hostUpdated() {
1041
+ for (const [s, t] of this.cache) {
1042
+ const e = this.host[s], { attribute: i } = this.host.constructor.getPropertyOptions(s) ?? {}, n = typeof i == "string" ? i : null;
1043
+ this.cache.set(s, e), this.host.dispatchEvent(new Es(s, t, e, n));
1044
+ }
1045
+ }
1046
+ }, ve = st;
1047
+ ve.instances = /* @__PURE__ */ new Map();
1048
+ function b(s, t) {
1049
+ s.constructor.addInitializer((e) => {
1050
+ new ve(e).cache.set(t, e[t]);
1051
+ });
1052
+ }
1053
+ function Cs(s) {
1054
+ return (t, e, i) => {
1055
+ const n = i.value;
1056
+ return i.value = s(n), i;
1057
+ };
1058
+ }
1059
+ var Pt = Cs(function(s) {
1060
+ const { name: t } = s;
1061
+ return async function(...e) {
1062
+ if (!this.stripe)
1063
+ throw new Error(`<${this.constructor.is}>: Stripe must be initialized before calling ${t}.`);
1064
+ return s.call(this, ...e).then(this.handleResponse);
1065
+ };
1066
+ });
1067
+ function Zt(s) {
1068
+ if (s.error)
1069
+ throw s.error;
1070
+ return s;
1071
+ }
1072
+ var xs = Object.defineProperty, Ps = Object.getOwnPropertyDescriptor, h = (s, t, e, i) => {
1073
+ for (var n = i > 1 ? void 0 : i ? Ps(t, e) : t, r = s.length - 1, o; r >= 0; r--)
1074
+ (o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
1075
+ return i && n && xs(t, e, n), n;
1076
+ }, $e = (s, t, e) => {
1077
+ if (!t.has(s))
1078
+ throw TypeError("Cannot " + e);
1079
+ }, Jt = (s, t, e) => ($e(s, t, "read from private field"), e ? e.call(s) : t.get(s)), Xt = (s, t, e) => {
1080
+ if (t.has(s))
1081
+ throw TypeError("Cannot add the same private member more than once");
1082
+ t instanceof WeakSet ? t.add(s) : t.set(s, e);
1083
+ }, Qt = (s, t, e, i) => ($e(s, t, "write to private field"), t.set(s, e), e);
1084
+ function te() {
1085
+ return (Date.now() + Math.random() * 1e3).toString(36).substr(0, 8);
1086
+ }
1087
+ var Ts = class {
1088
+ constructor(s, t) {
1089
+ var e;
1090
+ this.host = s, this.options = t, this.initialized = !1, this.shadowHosts = [], this.host.addController(this), this.mountId = this.resetMountId(), this.slotName = ((e = this.options) == null ? void 0 : e.slotName) ?? `breadcrumb-${te()}`;
1091
+ }
1092
+ get mount() {
1093
+ return document.getElementById(this.mountId);
1094
+ }
1095
+ hostUpdated() {
1096
+ var s;
1097
+ !this.initialized && ((s = this.options) == null ? void 0 : s.autoInitialize) !== !1 && this.init();
1098
+ }
1099
+ hostDisconnected() {
1100
+ this.destroyMountPoints();
1101
+ }
1102
+ resetMountId() {
1103
+ var t;
1104
+ return `${((t = this.options) == null ? void 0 : t.mountPrefix) ?? this.host.localName}-mount-point-${te()}`;
1105
+ }
1106
+ createMountPoint() {
1107
+ const s = document.createElement("div");
1108
+ return s.id = this.mountId, s.classList.add(`${this.host.tagName.toLowerCase()}-mount`), s;
1109
+ }
1110
+ createSlot(s) {
1111
+ const t = document.createElement("slot");
1112
+ return t.slot = s, t.name = s, t;
1113
+ }
1114
+ appendTemplate(s, t = this.createMountPoint()) {
1115
+ return s.appendChild(t), t;
1116
+ }
1117
+ initMountPoints() {
1118
+ this.initShadowMountPoints();
1119
+ }
1120
+ destroyMountPoints() {
1121
+ for (const s of this.shadowHosts)
1122
+ for (const t of s.querySelectorAll(`[slot="${this.slotName}"][name="${this.slotName}"]`))
1123
+ t.remove();
1124
+ this.mount && this.mount.remove(), this.mountId = this.resetMountId();
1125
+ }
1126
+ initShadowMountPoints() {
1127
+ let s = this.host;
1128
+ for (this.shadowHosts = [this.host]; s = s.getRootNode().host; )
1129
+ this.shadowHosts.push(s);
1130
+ const { shadowHosts: t, slotName: e } = this, i = [...t], n = i.pop();
1131
+ if (!n.querySelector(`[slot="${e}"]`)) {
1132
+ const o = document.createElement("div");
1133
+ o.slot = e, n.appendChild(o);
1134
+ }
1135
+ const r = n.querySelector(`[slot="${e}"]`);
1136
+ this.appendTemplate(r), i.forEach((o) => this.appendTemplate(o, this.createSlot(e)));
1137
+ }
1138
+ init() {
1139
+ this.destroyMountPoints(), this.initMountPoints(), this.initialized = !0;
1140
+ }
1141
+ };
1142
+ function it(s) {
1143
+ "@babel/helpers - typeof";
1144
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? it = function(t) {
1145
+ return typeof t;
1146
+ } : it = function(t) {
1147
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1148
+ }, it(s);
1149
+ }
1150
+ var _e = "https://js.stripe.com/v3", Rs = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, ee = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", Ms = function() {
1151
+ for (var t = document.querySelectorAll('script[src^="'.concat(_e, '"]')), e = 0; e < t.length; e++) {
1152
+ var i = t[e];
1153
+ if (Rs.test(i.src))
1154
+ return i;
1155
+ }
1156
+ return null;
1157
+ }, ks = function(t) {
1158
+ var e = t && !t.advancedFraudSignals ? "?advancedFraudSignals=false" : "", i = document.createElement("script");
1159
+ i.src = "".concat(_e).concat(e);
1160
+ var n = document.head || document.body;
1161
+ if (!n)
1162
+ throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
1163
+ return n.appendChild(i), i;
1164
+ }, Os = function(t, e) {
1165
+ !t || !t._registerWrapper || t._registerWrapper({
1166
+ name: "stripe-js",
1167
+ version: "1.32.0",
1168
+ startTime: e
1169
+ });
1170
+ }, Q = null, Ns = function(t) {
1171
+ return Q !== null || (Q = new Promise(function(e, i) {
1172
+ if (typeof window > "u") {
1173
+ e(null);
1174
+ return;
1175
+ }
1176
+ if (window.Stripe && t && console.warn(ee), window.Stripe) {
1177
+ e(window.Stripe);
1178
+ return;
1179
+ }
1180
+ try {
1181
+ var n = Ms();
1182
+ n && t ? console.warn(ee) : n || (n = ks(t)), n.addEventListener("load", function() {
1183
+ window.Stripe ? e(window.Stripe) : i(new Error("Stripe.js not available"));
1184
+ }), n.addEventListener("error", function() {
1185
+ i(new Error("Failed to load Stripe.js"));
1186
+ });
1187
+ } catch (r) {
1188
+ i(r);
1189
+ return;
1190
+ }
1191
+ })), Q;
1192
+ }, Is = function(t, e, i) {
1193
+ if (t === null)
1194
+ return null;
1195
+ var n = t.apply(void 0, e);
1196
+ return Os(n, i), n;
1197
+ }, Hs = function(t) {
1198
+ var e = `invalid load parameters; expected object of shape
1199
+
1200
+ {advancedFraudSignals: boolean}
1201
+
1202
+ but received
1203
+
1204
+ `.concat(JSON.stringify(t), `
1205
+ `);
1206
+ if (t === null || it(t) !== "object")
1207
+ throw new Error(e);
1208
+ if (Object.keys(t).length === 1 && typeof t.advancedFraudSignals == "boolean")
1209
+ return t;
1210
+ throw new Error(e);
1211
+ }, ge, Ae = !1, be = function() {
1212
+ for (var t = arguments.length, e = new Array(t), i = 0; i < t; i++)
1213
+ e[i] = arguments[i];
1214
+ Ae = !0;
1215
+ var n = Date.now();
1216
+ return Ns(ge).then(function(r) {
1217
+ return Is(r, e, n);
1218
+ });
1219
+ };
1220
+ be.setLoadParameters = function(s) {
1221
+ if (Ae)
1222
+ throw new Error("You cannot change load parameters after calling loadStripe");
1223
+ ge = Hs(s);
1224
+ };
1225
+ var Se = class extends Error {
1226
+ constructor(s, t) {
1227
+ super(`<${s}>: ${t}`), this.originalMessage = t;
1228
+ }
1229
+ };
1230
+ function we(s) {
1231
+ return !!s && s instanceof Se;
1232
+ }
1233
+ var Ls = {
1234
+ toAttribute: (s) => s ? we(s) ? s.originalMessage : s.message || "" : null
1235
+ }, f = 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 Ts(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: s, showError: t } = this, { slotName: e } = this.breadcrumb, i = we(s) ? s.originalMessage : s == null ? void 0 : s.message;
1249
+ return rs`
1250
+ <div id="stripe" part="stripe">
1251
+ <slot id="stripe-slot" name="${e}"></slot>
1252
+ </div>
1253
+
1254
+ <output id="error"
1255
+ for="stripe"
1256
+ part="error"
1257
+ ?hidden="${!t}">
1258
+ ${ms(i)}
1259
+ </output>
1260
+ `;
1261
+ }
1262
+ updated(s) {
1263
+ var t;
1264
+ (t = super.updated) == null || t.call(this, s), s.has("error") && this.errorChanged(), s.has("publishableKey") && this.init(), [...s.keys()].forEach((e) => this.representationChanged(e));
1265
+ }
1266
+ async disconnectedCallback() {
1267
+ var s;
1268
+ super.disconnectedCallback(), await ((s = this.unmount) == null ? void 0 : s.call(this));
1269
+ }
1270
+ reset() {
1271
+ var s, t;
1272
+ (t = (s = this.element) == null ? void 0 : s.clear) == null || t.call(s), this.resetRepresentations(), m.set(this, { error: null });
1273
+ }
1274
+ blur() {
1275
+ var s;
1276
+ (s = this.element) == null || s.blur();
1277
+ }
1278
+ focus() {
1279
+ var s;
1280
+ (s = this.element) == null || s.focus();
1281
+ }
1282
+ createError(s) {
1283
+ return new Se(this.constructor.is, s);
1284
+ }
1285
+ errorChanged() {
1286
+ this.resetRepresentations(), this.fireError(this.error);
1287
+ }
1288
+ fire(s, t, e) {
1289
+ this.dispatchEvent(new CustomEvent(s, { detail: t, ...e }));
1290
+ }
1291
+ fireError(s) {
1292
+ this.dispatchEvent(new ErrorEvent("error", { error: s }));
1293
+ }
1294
+ getCSSCustomPropertyValue(s) {
1295
+ return this.precomputedStyle.getPropertyValue(s);
1296
+ }
1297
+ async handleResponse(s) {
1298
+ const { error: t = null, paymentMethod: e = null, source: i = null, token: n = null } = { ...s };
1299
+ if (m.set(this, { error: t, paymentMethod: e, source: i, token: n }), await this.updateComplete, t)
1300
+ throw t;
1301
+ return s;
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: s, stripeAccount: t, locale: e } = this;
1314
+ if (!s)
1315
+ m.set(this, { elements: null, element: null, stripe: null });
1316
+ else
1317
+ try {
1318
+ const i = { stripeAccount: t, locale: e }, n = window.Stripe ? window.Stripe(s, i) : await be(s, i), r = n == null ? void 0 : n.elements();
1319
+ m.set(this, { elements: r, error: null, stripe: n });
1320
+ } catch (i) {
1321
+ console.warn(i);
1322
+ const n = this.createError("Stripe.js must be loaded first.");
1323
+ m.set(this, { elements: null, error: n, stripe: null });
1324
+ } finally {
1325
+ await this.updateComplete;
1326
+ }
1327
+ }
1328
+ mount() {
1329
+ var s;
1330
+ if (!this.breadcrumb.mount)
1331
+ throw this.createError("Stripe Mount missing");
1332
+ (s = this.element) == null || s.mount(this.breadcrumb.mount);
1333
+ }
1334
+ async unmount() {
1335
+ var s, t;
1336
+ (t = (s = this.element) == null ? void 0 : s.unmount) == null || t.call(s), 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(s) {
1345
+ m.set(this, { ready: !0 }), await this.updateComplete, this.fire("ready", s);
1346
+ }
1347
+ async postRepresentation() {
1348
+ const s = (a) => m.set(this, { error: a }), t = (a) => this.fire("success", a), e = this.token || void 0, i = this.source || void 0, n = this.paymentMethod || void 0, r = JSON.stringify({ token: e, source: i, paymentMethod: n }), o = { "Content-Type": "application/json" };
1349
+ return fetch(this.action, { body: r, headers: o, method: "POST" }).then(Ss).then(t).catch(s);
1350
+ }
1351
+ representationChanged(s) {
1352
+ if (!bs(s))
1353
+ return;
1354
+ const t = this[s];
1355
+ t && (this.fire(`${fe(s)}`, t), this.action && this.postRepresentation());
1356
+ }
1357
+ resetRepresentations() {
1358
+ m.set(this, {
1359
+ paymentMethod: null,
1360
+ token: null,
1361
+ source: null
1362
+ });
1363
+ }
1364
+ };
1365
+ h([
1366
+ p({ type: String })
1367
+ ], f.prototype, "action", 2);
1368
+ h([
1369
+ p({ type: String, attribute: "client-secret" })
1370
+ ], f.prototype, "clientSecret", 2);
1371
+ h([
1372
+ p({ type: String })
1373
+ ], f.prototype, "generate", 2);
1374
+ h([
1375
+ b,
1376
+ p({ type: String, attribute: "publishable-key", reflect: !0 })
1377
+ ], f.prototype, "publishableKey", 2);
1378
+ h([
1379
+ p({ type: Boolean, attribute: "show-error", reflect: !0 })
1380
+ ], f.prototype, "showError", 2);
1381
+ h([
1382
+ p({ type: String, attribute: "stripe-account" })
1383
+ ], f.prototype, "stripeAccount", 2);
1384
+ h([
1385
+ p({ type: String, attribute: "locale" })
1386
+ ], f.prototype, "locale", 2);
1387
+ h([
1388
+ m,
1389
+ b,
1390
+ p({ type: Object, attribute: "payment-method" })
1391
+ ], f.prototype, "paymentMethod", 2);
1392
+ h([
1393
+ m,
1394
+ b,
1395
+ p({ type: Object })
1396
+ ], f.prototype, "source", 2);
1397
+ h([
1398
+ m,
1399
+ b,
1400
+ p({ type: Object })
1401
+ ], f.prototype, "token", 2);
1402
+ h([
1403
+ m,
1404
+ p({ type: Object })
1405
+ ], f.prototype, "element", 2);
1406
+ h([
1407
+ m,
1408
+ p({ type: Object })
1409
+ ], f.prototype, "elements", 2);
1410
+ h([
1411
+ m,
1412
+ b,
1413
+ p({ type: Object, reflect: !0, converter: Ls })
1414
+ ], f.prototype, "error", 2);
1415
+ h([
1416
+ m,
1417
+ b,
1418
+ p({ type: Boolean, reflect: !0 })
1419
+ ], f.prototype, "focused", 2);
1420
+ h([
1421
+ m,
1422
+ b,
1423
+ p({ type: Boolean, reflect: !0 })
1424
+ ], f.prototype, "ready", 2);
1425
+ h([
1426
+ m,
1427
+ p({ type: Object })
1428
+ ], f.prototype, "stripe", 2);
1429
+ h([
1430
+ p()
1431
+ ], f.prototype, "theme", 2);
1432
+ h([
1433
+ p({ attribute: "border-radius" })
1434
+ ], f.prototype, "borderRadius", 2);
1435
+ h([
1436
+ p({ attribute: "color-background" })
1437
+ ], f.prototype, "colorBackground", 2);
1438
+ h([
1439
+ p({ attribute: "color-danger" })
1440
+ ], f.prototype, "colorDanger", 2);
1441
+ h([
1442
+ p({ attribute: "color-primary" })
1443
+ ], f.prototype, "colorPrimary", 2);
1444
+ h([
1445
+ p({ attribute: "color-text" })
1446
+ ], f.prototype, "colorText", 2);
1447
+ h([
1448
+ p({ attribute: "font-family" })
1449
+ ], f.prototype, "fontFamily", 2);
1450
+ h([
1451
+ p({ attribute: "spacing-unit" })
1452
+ ], f.prototype, "spacingUnit", 2);
1453
+ h([
1454
+ S
1455
+ ], f.prototype, "handleResponse", 1);
1456
+ h([
1457
+ S
1458
+ ], f.prototype, "onBlur", 1);
1459
+ h([
1460
+ S
1461
+ ], f.prototype, "onFocus", 1);
1462
+ h([
1463
+ S
1464
+ ], f.prototype, "onReady", 1);
1465
+ var Us = Ct`[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
+ `, Ee = Us, qs = Ct`: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
+ `, Bs = qs, se = [
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
+ ], Ds = [
1517
+ ":hover",
1518
+ ":focus",
1519
+ "::placeholder",
1520
+ "::selection",
1521
+ ":-webkit-autofill",
1522
+ ":disabled"
1523
+ ], A = class extends f {
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(s = this.getPaymentMethodData()) {
1528
+ return this.stripe.createPaymentMethod(s);
1529
+ }
1530
+ async createSource(s = this.sourceData) {
1531
+ return this.stripe.createSource(this.element, s);
1532
+ }
1533
+ async createToken(s = this.tokenData) {
1534
+ return this.stripe.createToken(this.element, s);
1535
+ }
1536
+ isPotentiallyValid() {
1537
+ return !this.complete && !this.empty && !this.error || this.validate();
1538
+ }
1539
+ reset() {
1540
+ var s;
1541
+ super.reset(), (s = this.element) == null || s.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 s = this.createError(`cannot generate ${this.generate}`);
1553
+ throw m.set(this, { error: s }), await this.updateComplete, s;
1554
+ }
1555
+ }
1556
+ }
1557
+ validate() {
1558
+ const { complete: s, empty: t, error: e } = this, i = !e && s && !t;
1559
+ return t && !e && m.set(this, { error: this.createError("Your card number is empty.") }), i;
1560
+ }
1561
+ updateStyle() {
1562
+ var s;
1563
+ (s = this.element) == null || s.update({
1564
+ style: this.getStripeElementsStyles()
1565
+ });
1566
+ }
1567
+ getPaymentMethodData() {
1568
+ const s = "card", { billingDetails: t, paymentMethodData: e } = this;
1569
+ return {
1570
+ billing_details: t,
1571
+ ...e,
1572
+ type: s,
1573
+ card: this.element
1574
+ };
1575
+ }
1576
+ getStripeElementsStyles() {
1577
+ const s = (n) => this.getCSSCustomPropertyValue(n) || void 0, t = ["base", "complete", "empty", "invalid"], e = (n) => (r, o) => {
1578
+ if (n.includes("-"))
1579
+ return r;
1580
+ const u = o.split(":").pop();
1581
+ return {
1582
+ ...r,
1583
+ [o]: se.reduce(i(`${n}-${u}`), {})
1584
+ };
1585
+ }, i = (n) => (r, o) => {
1586
+ const u = `--stripe-elements-${n}-${fe(o)}`;
1587
+ return {
1588
+ ...r,
1589
+ [o]: s(u),
1590
+ ...Ds.reduce(e(n), {})
1591
+ };
1592
+ };
1593
+ return t.reduce((n, r) => ({
1594
+ ...n,
1595
+ [r]: se.reduce(i(r), {})
1596
+ }), {});
1597
+ }
1598
+ async initElement() {
1599
+ if (!this.stripe)
1600
+ return;
1601
+ const { hidePostalCode: s, hideIcon: t, iconStyle: e, value: i } = this, n = this.getStripeElementsStyles();
1602
+ await this.updateComplete;
1603
+ const r = this.createElement({
1604
+ hideIcon: t,
1605
+ hidePostalCode: s,
1606
+ iconStyle: e,
1607
+ style: n,
1608
+ value: i
1609
+ });
1610
+ r.on("change", this.onChange), m.set(this, { element: r }), await this.updateComplete;
1611
+ }
1612
+ createElement(s) {
1613
+ return this.elements.create("card", s);
1614
+ }
1615
+ async onChange(s) {
1616
+ const { brand: t, complete: e, empty: i, error: n = null } = s, r = !(n || !i && !e);
1617
+ m.set(this, { brand: t, complete: e, empty: i, error: n, invalid: r }), await this.updateComplete, this.fire("change", s);
1618
+ }
1619
+ };
1620
+ A.is = "stripe-elements";
1621
+ A.elementType = "card";
1622
+ A.styles = [
1623
+ Ee,
1624
+ Bs
1625
+ ];
1626
+ h([
1627
+ p({ type: Boolean, attribute: "hide-icon" })
1628
+ ], A.prototype, "hideIcon", 2);
1629
+ h([
1630
+ p({ type: Boolean, attribute: "hide-postal-code" })
1631
+ ], A.prototype, "hidePostalCode", 2);
1632
+ h([
1633
+ p({ type: String, attribute: "icon-style" })
1634
+ ], A.prototype, "iconStyle", 2);
1635
+ h([
1636
+ p({ type: Object })
1637
+ ], A.prototype, "value", 2);
1638
+ h([
1639
+ b,
1640
+ m,
1641
+ p({ type: String })
1642
+ ], A.prototype, "brand", 2);
1643
+ h([
1644
+ b,
1645
+ m,
1646
+ p({ type: Boolean, reflect: !0 })
1647
+ ], A.prototype, "complete", 2);
1648
+ h([
1649
+ b,
1650
+ m,
1651
+ p({ type: Boolean, reflect: !0 })
1652
+ ], A.prototype, "empty", 2);
1653
+ h([
1654
+ b,
1655
+ m,
1656
+ p({ type: Boolean, reflect: !0 })
1657
+ ], A.prototype, "invalid", 2);
1658
+ h([
1659
+ Pt
1660
+ ], A.prototype, "createPaymentMethod", 1);
1661
+ h([
1662
+ Pt
1663
+ ], A.prototype, "createSource", 1);
1664
+ h([
1665
+ Pt
1666
+ ], A.prototype, "createToken", 1);
1667
+ h([
1668
+ S
1669
+ ], A.prototype, "onChange", 1);
1670
+ A = h([
1671
+ ie("stripe-elements")
1672
+ ], A);
1673
+ var js = Ct`#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
+ `, Vs = js;
1680
+ function zs(s) {
1681
+ return s.tagName.toLowerCase() === "stripe-display-item";
1682
+ }
1683
+ function Fs({ dataset: { amount: s, label: t, pending: e } }) {
1684
+ return {
1685
+ label: t,
1686
+ amount: parseInt(s),
1687
+ ...e !== void 0 && { pending: e === "true" }
1688
+ };
1689
+ }
1690
+ function Ws({ dataset: { amount: s, detail: t, ...e } }) {
1691
+ return {
1692
+ amount: parseInt(s),
1693
+ detail: t,
1694
+ ...e
1695
+ };
1696
+ }
1697
+ function Gs(s) {
1698
+ return zs(s) ? Fs(s) : Ws(s);
1699
+ }
1700
+ var nt, rt, v = class extends f {
1701
+ constructor() {
1702
+ super(...arguments), this.canMakePayment = null, Xt(this, nt, void 0), this.paymentIntent = null, this.paymentRequest = null, this.pending = !1, Xt(this, rt, void 0), this.buttonType = "default", this.buttonTheme = "dark", this.complete = async (s, t) => {
1703
+ const { error: e = null } = { ...s }, i = e || t ? "fail" : "success";
1704
+ return s.complete(i), this.fire(i, s), t ? { error: t } : s;
1705
+ };
1706
+ }
1707
+ get displayItems() {
1708
+ const s = Jt(this, nt);
1709
+ return Array.isArray(s) ? s : this.parseDatasets("stripe-display-item");
1710
+ }
1711
+ set displayItems(s) {
1712
+ const t = this.displayItems;
1713
+ Qt(this, nt, s), this.requestUpdate("displayItems", t);
1714
+ }
1715
+ get shippingOptions() {
1716
+ const s = Jt(this, rt);
1717
+ return Array.isArray(s) ? s : this.parseDatasets("stripe-shipping-option");
1718
+ }
1719
+ set shippingOptions(s) {
1720
+ const t = this.shippingOptions;
1721
+ Qt(this, rt, s), this.requestUpdate("shippingOptions", t);
1722
+ }
1723
+ reset() {
1724
+ super.reset(), m.set(this, { paymentIntent: null });
1725
+ }
1726
+ updated(s) {
1727
+ super.updated(s), s.has("generate") && this.initPaymentRequestListeners(), s.has("amount") && this.updatePaymentRequest();
1728
+ }
1729
+ getStripePaymentRequestOptions() {
1730
+ const {
1731
+ country: s,
1732
+ currency: t,
1733
+ displayItems: e,
1734
+ shippingOptions: i,
1735
+ requestShipping: n,
1736
+ requestPayerEmail: r,
1737
+ requestPayerName: o,
1738
+ requestPayerPhone: u,
1739
+ label: a = "",
1740
+ amount: l = 0
1741
+ } = this;
1742
+ return {
1743
+ country: s,
1744
+ currency: t,
1745
+ displayItems: e,
1746
+ requestPayerEmail: r,
1747
+ requestPayerName: o,
1748
+ requestPayerPhone: u,
1749
+ requestShipping: n,
1750
+ shippingOptions: i,
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 s = this.getStripePaymentRequestOptions(), t = this.stripe.paymentRequest(s), e = await t.canMakePayment();
1761
+ m.set(this, { paymentRequest: t, canMakePayment: e }), await this.updateComplete, this.canMakePayment || this.fire("unsupported");
1762
+ }
1763
+ async initPaymentRequestButton() {
1764
+ const { buttonTheme: s, buttonType: t, canMakePayment: e } = this;
1765
+ if (!e || !this.elements)
1766
+ return;
1767
+ const r = { paymentRequestButton: { height: this.getCSSCustomPropertyValue("--stripe-payment-request-button-height") || "40px", theme: s, type: t } }, 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: s, total: t, displayItems: e, shippingOptions: i } = this.getStripePaymentRequestOptions();
1791
+ this.paymentRequest.update({ currency: s, total: t, displayItems: e, shippingOptions: i });
1792
+ }
1793
+ onCancel() {
1794
+ this.fire(
1795
+ "cancel"
1796
+ /* cancel */
1797
+ );
1798
+ }
1799
+ async onPaymentResponse(s) {
1800
+ const {
1801
+ error: t = null,
1802
+ paymentMethod: e = null,
1803
+ source: i = null,
1804
+ token: n = null
1805
+ } = { ...s };
1806
+ m.set(this, { error: t, paymentMethod: e, source: i, token: n }), this.clientSecret && !t ? this.confirmPaymentIntent(s) : this.complete(s);
1807
+ }
1808
+ async confirmPaymentIntent(s) {
1809
+ const t = { payment_method: this.paymentMethod.id }, e = await this.confirmCardPayment(t, { handleActions: !1 }).then(({ error: r }) => this.complete(s, r)).then(Zt).then(() => this.confirmCardPayment()).then(Zt).catch((r) => ({ error: r })), { error: i = null } = e, n = e.paymentIntent ?? null;
1810
+ m.set(this, { error: i, paymentIntent: n }), await this.updateComplete;
1811
+ }
1812
+ async confirmCardPayment(s, t) {
1813
+ return this.stripe.confirmCardPayment(this.clientSecret, s, t);
1814
+ }
1815
+ onShippingaddresschange(s) {
1816
+ this.fire("shippingaddresschange", s);
1817
+ }
1818
+ onShippingoptionchange(s) {
1819
+ this.fire("shippingoptionchange", s);
1820
+ }
1821
+ parseDatasets(s) {
1822
+ const t = [...this.querySelectorAll(s)];
1823
+ return t.length ? t.map(Gs) : [];
1824
+ }
1825
+ };
1826
+ nt = /* @__PURE__ */ new WeakMap();
1827
+ rt = /* @__PURE__ */ new WeakMap();
1828
+ v.is = "stripe-payment-request";
1829
+ v.styles = [
1830
+ Ee,
1831
+ Vs
1832
+ ];
1833
+ h([
1834
+ p({ type: Number, reflect: !0 })
1835
+ ], v.prototype, "amount", 2);
1836
+ h([
1837
+ b,
1838
+ m,
1839
+ p({ type: Boolean, attribute: "can-make-payment", reflect: !0 })
1840
+ ], v.prototype, "canMakePayment", 2);
1841
+ h([
1842
+ p({ type: String })
1843
+ ], v.prototype, "country", 2);
1844
+ h([
1845
+ p({ type: String })
1846
+ ], v.prototype, "currency", 2);
1847
+ h([
1848
+ p({ type: Array })
1849
+ ], v.prototype, "displayItems", 1);
1850
+ h([
1851
+ p({ type: String, reflect: !0 })
1852
+ ], v.prototype, "label", 2);
1853
+ h([
1854
+ b,
1855
+ m,
1856
+ p({ type: Object, attribute: "payment-intent" })
1857
+ ], v.prototype, "paymentIntent", 2);
1858
+ h([
1859
+ m,
1860
+ p({ type: Object, attribute: "payment-request" })
1861
+ ], v.prototype, "paymentRequest", 2);
1862
+ h([
1863
+ p({ type: Boolean, reflect: !0 })
1864
+ ], v.prototype, "pending", 2);
1865
+ h([
1866
+ p({ type: Boolean, attribute: "request-payer-email" })
1867
+ ], v.prototype, "requestPayerEmail", 2);
1868
+ h([
1869
+ p({ type: Boolean, attribute: "request-payer-name" })
1870
+ ], v.prototype, "requestPayerName", 2);
1871
+ h([
1872
+ p({ type: Boolean, attribute: "request-payer-phone" })
1873
+ ], v.prototype, "requestPayerPhone", 2);
1874
+ h([
1875
+ p({ type: Boolean, attribute: "request-shipping" })
1876
+ ], v.prototype, "requestShipping", 2);
1877
+ h([
1878
+ p({ type: Array })
1879
+ ], v.prototype, "shippingOptions", 1);
1880
+ h([
1881
+ p({ type: String, attribute: "button-type" })
1882
+ ], v.prototype, "buttonType", 2);
1883
+ h([
1884
+ p({ type: String, attribute: "button-theme" })
1885
+ ], v.prototype, "buttonTheme", 2);
1886
+ h([
1887
+ S
1888
+ ], v.prototype, "onCancel", 1);
1889
+ h([
1890
+ S
1891
+ ], v.prototype, "onPaymentResponse", 1);
1892
+ h([
1893
+ S
1894
+ ], v.prototype, "confirmPaymentIntent", 1);
1895
+ h([
1896
+ S
1897
+ ], v.prototype, "confirmCardPayment", 1);
1898
+ h([
1899
+ S
1900
+ ], v.prototype, "onShippingaddresschange", 1);
1901
+ h([
1902
+ S
1903
+ ], v.prototype, "onShippingoptionchange", 1);
1904
+ v = h([
1905
+ ie("stripe-payment-request")
1906
+ ], v);
1907
+ const Ks = (s) => {
1908
+ switch (s) {
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
+ }, Ys = Pe.extend({
1918
+ name: "CreditCardForm",
1919
+ components: {
1920
+ BFormattedAmount: Te
1921
+ },
1922
+ mixins: [Re("components/RevolugoElements/CreditCardForm")],
1923
+ props: De,
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 Ks(this.config.apiEnvironment);
1935
+ }
1936
+ },
1937
+ methods: {
1938
+ onCreditCardFormChange(s) {
1939
+ this.error = "", this.$emit("change", !!s.detail.complete);
1940
+ },
1941
+ async onStripePayment(s) {
1942
+ try {
1943
+ if (!window.Stripe || this.disabled)
1944
+ return;
1945
+ const e = await window.Stripe(this.pk, {
1946
+ locale: this.$i18n.locale
1947
+ }).confirmCardPayment(this.token, {
1948
+ // eslint-disable-next-line camelcase
1949
+ payment_method: s.detail.id
1950
+ });
1951
+ e.error && e.error ? this.onPaymentError(e) : this.withAction ? this.$eventBus.$emit(xe.PaymentSuccess) : this.$emit("success");
1952
+ } catch (t) {
1953
+ this.onPaymentError(t);
1954
+ }
1955
+ },
1956
+ onPaymentError(s) {
1957
+ var t;
1958
+ this.error = `${(t = s == null ? void 0 : s.error) == null ? void 0 : t.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 (s) {
1966
+ this.onPaymentError(s);
1967
+ }
1968
+ }
1969
+ }
1970
+ });
1971
+ var Zs = function() {
1972
+ var t = this, e = t._self._c;
1973
+ return t._self._setupProxy, e(Tt, { style: {
1974
+ borderColor: t.disabled ? null : "var(--v-primary-base)"
1975
+ }, attrs: { disabled: t.disabled, elevation: "0", outlined: "" } }, [e(Ie, { staticClass: "white--text", attrs: { color: "primary", dense: "", elevation: "0" } }, [e("div", { staticClass: "w-100 d-flex justify-space-between items-center" }, [e("h4", [e(tt, { attrs: { color: "white", left: "" } }, [t._v(" fa-credit-card ")]), t._v(" " + t._s(t.$t("CreditCardForm.title")) + ": "), t.loading ? e(He, { staticClass: "ml-2", attrs: { color: "primary", indeterminate: "", size: "20", width: "1" } }) : e("BFormattedAmount", { staticClass: "font-weight-bold", attrs: { amount: t.amount, currency: t.currency } })], 1), e(tt, { attrs: { color: "white", right: "" } }, [t._v(" fa-lock ")])], 1)]), e(Ue, [e(D, [e(k, [t.error ? e(ke, { attrs: { color: "red", dense: "", outlined: "" } }, [e("p", { staticClass: "caption font-weight-bold text-center my-0 red--text rounded" }, [t._v(" " + t._s(t.$t("CreditCardForm.paymentDeclined")) + ": " + t._s(t.error) + " ")])]) : t._e()], 1)], 1), e(D, { staticClass: "d-none d-sm-flex", attrs: { "no-gutters": "" } }, [e(k, { attrs: { cols: "8" } }, [e("small", [t._v(t._s(t.$t("CreditCardForm.cardNumber")))])]), e(k, { staticClass: "text-right pr-6", attrs: { cols: "4" } }, [e("small", { staticClass: "pr-3" }, [t._v(t._s(t.$t("CreditCardForm.expDate")))]), e("small", [t._v(t._s(t.$t("CreditCardForm.cvc")))])])], 1), e(D, { attrs: { "no-gutters": "" } }, [e(k, [e(Tt, { attrs: { elevation: "0", outlined: "" } }, [e("stripe-elements", { ref: "payment", class: {
1976
+ "d-none": t.loading
1977
+ }, attrs: { generate: "payment-method", "hide-postal-code": "", locale: t.$i18n.locale, "publishable-key": t.pk }, on: { change: t.onCreditCardFormChange, error: t.onPaymentError, "payment-method": t.onStripePayment } }), t.loading ? e(qe, { staticClass: "mx-auto", attrs: { height: "36.8px", type: "image", width: "100%" } }) : t._e()], 1)], 1)], 1), t.withTerms ? e(D, { staticClass: "mt-2" }, [e(k, [e(Be, { ref: "testing", staticClass: "mt-0", attrs: { error: t.termsError && !t.isTermsAccepted }, scopedSlots: t._u([{ key: "label", fn: function() {
1978
+ return [e("span", { domProps: { innerHTML: t._s(
1979
+ t.$t("CreditCardForm.termsAndConditions", {
1980
+ url: t.termsAndConditionsUrl
1981
+ })
1982
+ ) }, on: { click: function(i) {
1983
+ i.stopPropagation();
1984
+ } } })];
1985
+ }, proxy: !0 }], null, !1, 1757272622), model: { value: t.isTermsAccepted, callback: function(i) {
1986
+ t.isTermsAccepted = i;
1987
+ }, expression: "isTermsAccepted" } })], 1)], 1) : t._e(), t.withAction ? e(D, [e(k, { staticClass: "d-flex justify-end flex-column flex-sm-row mb-1 align-center mt-4 mt-sm-0" }, [e(Le, { staticClass: "w-100 w-sm-auto", attrs: { color: "primary", depressed: "", disabled: t.disabled || t.withTerms && !t.isTermsAccepted, loading: t.loading }, on: { click: t.pay } }, [e(tt, { attrs: { left: "" } }, [t._v(" fa-lock ")]), e("span", { staticClass: "mr-1" }, [t._v(t._s(t.$t("CreditCardForm.payNow")))]), e("BFormattedAmount", { staticClass: "font-weight-bold", attrs: { amount: t.amount, currency: t.currency } })], 1)], 1)], 1) : t._e()], 1)], 1);
1988
+ }, Js = [], Xs = /* @__PURE__ */ Me(
1989
+ Ys,
1990
+ Zs,
1991
+ Js,
1992
+ !1,
1993
+ null,
1994
+ null
1995
+ );
1996
+ const gi = Xs.exports;
1997
+ Ce("css/revolugo.creditcardform.DGy-kOaO.css");
1998
+ export {
1999
+ gi as C,
2000
+ Be as _,
2001
+ De as c
2002
+ };
2003
+ //# sourceMappingURL=revolugo.creditcardform.B_uqS9k4.min.js.map