@gomusdev/web-components 1.45.0 → 1.47.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-js/axe-a11y/test-runner.d.ts +7 -0
- package/dist-js/components/annualTicketPersonalization/lib/PersonalizationDetails.svelte.d.ts +3 -0
- package/dist-js/components/donations/components/DonationCampaign.svelte.d.ts +1 -0
- package/dist-js/components/donations/components/DonationSelector.svelte.d.ts +1 -0
- package/dist-js/components/donations/components/Donations.svelte.d.ts +1 -0
- package/dist-js/components/donations/entry.d.ts +0 -0
- package/dist-js/components/order/lib/OrderDetails.svelte.d.ts +1 -0
- package/dist-js/gomus-webcomponents.css +65 -0
- package/dist-js/gomus-webcomponents.iife.js +426 -155
- package/dist-js/gomus-webcomponents.js +426 -155
- package/dist-js/lib/stores/shop.svelte.d.ts +1 -0
- package/package.json +8 -2
|
@@ -4359,6 +4359,16 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
4359
4359
|
queue_micro_task(remove_defaults);
|
|
4360
4360
|
add_form_reset_listener();
|
|
4361
4361
|
}
|
|
4362
|
+
function set_value(element, value) {
|
|
4363
|
+
var attributes = get_attributes(element);
|
|
4364
|
+
if (attributes.value === (attributes.value = // treat null and undefined the same for the initial value
|
|
4365
|
+
value ?? void 0) || // @ts-expect-error
|
|
4366
|
+
// `progress` elements always need their value set when it's `0`
|
|
4367
|
+
element.value === value && (value !== 0 || element.nodeName !== "PROGRESS")) {
|
|
4368
|
+
return;
|
|
4369
|
+
}
|
|
4370
|
+
element.value = value ?? "";
|
|
4371
|
+
}
|
|
4362
4372
|
function set_selected(element, selected) {
|
|
4363
4373
|
if (selected) {
|
|
4364
4374
|
if (!element.hasAttribute("selected")) {
|
|
@@ -12869,6 +12879,9 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
12869
12879
|
get ticketSale() {
|
|
12870
12880
|
if (this.ticketSaleId) return snapshot(this.order?.ticket_sales.find((ts) => ts.id == this.ticketSaleId));
|
|
12871
12881
|
}
|
|
12882
|
+
get isBmcTicket() {
|
|
12883
|
+
return this.ticketSale?.is_bmc_ticket || false;
|
|
12884
|
+
}
|
|
12872
12885
|
goToPersonalization(ticketSale) {
|
|
12873
12886
|
if (configStore.config.urls.annualTicketPersonalizationForm) {
|
|
12874
12887
|
return configStore.config.urls.annualTicketPersonalizationForm(this.token, ticketSale.id);
|
|
@@ -12879,8 +12892,9 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
12879
12892
|
}
|
|
12880
12893
|
const KEY$4 = "go-annual-ticket-personalization";
|
|
12881
12894
|
const setPersonalizationDetails = createSetDetails(KEY$4);
|
|
12895
|
+
const getPersonalizationDetails = createGetDetails(KEY$4);
|
|
12882
12896
|
var root_3$9 = /* @__PURE__ */ from_html(`<li><a> </a></li>`);
|
|
12883
|
-
var root_2$
|
|
12897
|
+
var root_2$r = /* @__PURE__ */ from_html(`<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>`);
|
|
12884
12898
|
function AnnualTicketPersonalization($$anchor, $$props) {
|
|
12885
12899
|
push($$props, true);
|
|
12886
12900
|
let token = prop($$props, "token", 7);
|
|
@@ -12907,7 +12921,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
12907
12921
|
var fragment_1 = comment();
|
|
12908
12922
|
var node_1 = first_child(fragment_1);
|
|
12909
12923
|
each(node_1, 17, () => get$2(order).ticket_sales, (ticketSale) => ticketSale.id, ($$anchor3, ticketSale) => {
|
|
12910
|
-
var ul = root_2$
|
|
12924
|
+
var ul = root_2$r();
|
|
12911
12925
|
var li = child(ul);
|
|
12912
12926
|
var text2 = child(li, true);
|
|
12913
12927
|
reset(li);
|
|
@@ -16527,7 +16541,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16527
16541
|
host.replaceChildren(element);
|
|
16528
16542
|
return element;
|
|
16529
16543
|
}
|
|
16530
|
-
var root_1$
|
|
16544
|
+
var root_1$m = /* @__PURE__ */ from_html(`<go-all-fields></go-all-fields> <go-form-feedback><go-errors-feedback></go-errors-feedback> <go-success-feedback></go-success-feedback></go-form-feedback> <go-submit> </go-submit>`, 3);
|
|
16531
16545
|
function Form($$anchor, $$props) {
|
|
16532
16546
|
push($$props, true);
|
|
16533
16547
|
let formId = prop($$props, "formId", 7), custom2 = prop($$props, "custom", 7);
|
|
@@ -16570,7 +16584,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16570
16584
|
var node = first_child(fragment);
|
|
16571
16585
|
{
|
|
16572
16586
|
var consequent = ($$anchor2) => {
|
|
16573
|
-
var fragment_1 = root_1$
|
|
16587
|
+
var fragment_1 = root_1$m();
|
|
16574
16588
|
var go_all_fields = first_child(fragment_1);
|
|
16575
16589
|
var go_form_feedback = sibling(go_all_fields, 2);
|
|
16576
16590
|
var go_submit = sibling(go_form_feedback, 2);
|
|
@@ -16597,7 +16611,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16597
16611
|
[],
|
|
16598
16612
|
["details"]
|
|
16599
16613
|
));
|
|
16600
|
-
var root$
|
|
16614
|
+
var root$c = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
|
|
16601
16615
|
function PasswordReset($$anchor, $$props) {
|
|
16602
16616
|
push($$props, true);
|
|
16603
16617
|
let custom2 = prop($$props, "custom", 7, false);
|
|
@@ -16627,7 +16641,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16627
16641
|
flushSync();
|
|
16628
16642
|
}
|
|
16629
16643
|
};
|
|
16630
|
-
var go_form = root$
|
|
16644
|
+
var go_form = root$c();
|
|
16631
16645
|
set_custom_element_data(go_form, "formId", "passwordReset");
|
|
16632
16646
|
template_effect(() => set_custom_element_data(go_form, "custom", custom2()));
|
|
16633
16647
|
event("submit", go_form, passwordReset);
|
|
@@ -16731,8 +16745,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16731
16745
|
[],
|
|
16732
16746
|
[]
|
|
16733
16747
|
));
|
|
16734
|
-
var root_1$
|
|
16735
|
-
var root$
|
|
16748
|
+
var root_1$l = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span><span class="go-cart-item-time" data-testid="cart-item-time"> </span>`, 1);
|
|
16749
|
+
var root$b = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"><span class="go-cart-item-title-event-title"> </span><span class="go-cart-item-title-ticket-title"> </span></span><!>`, 1);
|
|
16736
16750
|
function Event$2($$anchor, $$props) {
|
|
16737
16751
|
push($$props, true);
|
|
16738
16752
|
let cartItem = prop($$props, "cartItem", 7);
|
|
@@ -16747,7 +16761,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16747
16761
|
flushSync();
|
|
16748
16762
|
}
|
|
16749
16763
|
};
|
|
16750
|
-
var fragment = root$
|
|
16764
|
+
var fragment = root$b();
|
|
16751
16765
|
var span = first_child(fragment);
|
|
16752
16766
|
var span_1 = child(span);
|
|
16753
16767
|
var text2 = child(span_1, true);
|
|
@@ -16759,7 +16773,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16759
16773
|
var node = sibling(span);
|
|
16760
16774
|
{
|
|
16761
16775
|
var consequent = ($$anchor2) => {
|
|
16762
|
-
var fragment_1 = root_1$
|
|
16776
|
+
var fragment_1 = root_1$l();
|
|
16763
16777
|
var span_3 = first_child(fragment_1);
|
|
16764
16778
|
var text_2 = child(span_3, true);
|
|
16765
16779
|
reset(span_3);
|
|
@@ -16790,9 +16804,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16790
16804
|
return pop($$exports);
|
|
16791
16805
|
}
|
|
16792
16806
|
create_custom_element(Event$2, { cartItem: {} }, [], [], { mode: "open" });
|
|
16793
|
-
var root_2$
|
|
16794
|
-
var root_1$
|
|
16795
|
-
var root$
|
|
16807
|
+
var root_2$q = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
|
|
16808
|
+
var root_1$k = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>`, 1);
|
|
16809
|
+
var root$a = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>`, 1);
|
|
16796
16810
|
function Ticket($$anchor, $$props) {
|
|
16797
16811
|
push($$props, true);
|
|
16798
16812
|
let cartItem = prop($$props, "cartItem", 7);
|
|
@@ -16805,21 +16819,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16805
16819
|
flushSync();
|
|
16806
16820
|
}
|
|
16807
16821
|
};
|
|
16808
|
-
var fragment = root$
|
|
16822
|
+
var fragment = root$a();
|
|
16809
16823
|
var span = first_child(fragment);
|
|
16810
16824
|
var text2 = child(span, true);
|
|
16811
16825
|
reset(span);
|
|
16812
16826
|
var node = sibling(span, 2);
|
|
16813
16827
|
{
|
|
16814
16828
|
var consequent_1 = ($$anchor2) => {
|
|
16815
|
-
var fragment_1 = root_1$
|
|
16829
|
+
var fragment_1 = root_1$k();
|
|
16816
16830
|
var span_1 = first_child(fragment_1);
|
|
16817
16831
|
var text_1 = child(span_1, true);
|
|
16818
16832
|
reset(span_1);
|
|
16819
16833
|
var node_1 = sibling(span_1, 2);
|
|
16820
16834
|
{
|
|
16821
16835
|
var consequent = ($$anchor3) => {
|
|
16822
|
-
var span_2 = root_2$
|
|
16836
|
+
var span_2 = root_2$q();
|
|
16823
16837
|
var text_2 = child(span_2, true);
|
|
16824
16838
|
reset(span_2);
|
|
16825
16839
|
template_effect(($0) => set_text(text_2, $0), [() => formatTime(cartItem().time)]);
|
|
@@ -16865,7 +16879,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16865
16879
|
var root_7$3 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
16866
16880
|
var root_6$2 = /* @__PURE__ */ from_html(`<select></select>`);
|
|
16867
16881
|
var root_8$2 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove" data-go-cart-item-remove=""><button>⨉</button></li>`);
|
|
16868
|
-
var root_1$
|
|
16882
|
+
var root_1$j = /* @__PURE__ */ from_html(`<article><ul><li data-go-cart-item-title=""><!></li> <li class="go-cart-item-price" data-go-cart-item-price=""> </li> <li class="go-cart-item-count" data-go-cart-item-count=""><!></li> <!> <li class="go-cart-item-sum" data-go-cart-item-sum=""> </li></ul></article>`);
|
|
16869
16883
|
function Item$1($$anchor, $$props) {
|
|
16870
16884
|
push($$props, true);
|
|
16871
16885
|
let cartItem = prop($$props, "cartItem", 7), cart = prop($$props, "cart", 7), preview = prop($$props, "preview", 7);
|
|
@@ -16908,7 +16922,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16908
16922
|
var node = first_child(fragment);
|
|
16909
16923
|
{
|
|
16910
16924
|
var consequent_4 = ($$anchor2) => {
|
|
16911
|
-
var article = root_1$
|
|
16925
|
+
var article = root_1$j();
|
|
16912
16926
|
var ul = child(article);
|
|
16913
16927
|
var li = child(ul);
|
|
16914
16928
|
var node_1 = child(li);
|
|
@@ -17020,10 +17034,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17020
17034
|
}
|
|
17021
17035
|
delegate(["change", "click"]);
|
|
17022
17036
|
create_custom_element(Item$1, { cartItem: {}, cart: {}, preview: {} }, [], [], { mode: "open" });
|
|
17023
|
-
var root_2$
|
|
17037
|
+
var root_2$p = /* @__PURE__ */ from_html(`<li class="go-cart-header-remove" data-go-cart-header-remove=""></li>`);
|
|
17024
17038
|
var root_3$8 = /* @__PURE__ */ from_html(`<li class="go-cart-item" data-go-cart-item=""><!></li>`);
|
|
17025
17039
|
var root_4$6 = /* @__PURE__ */ from_html(`<li class="go-cart-footer-remove" data-go-cart-footer-remove=""></li>`);
|
|
17026
|
-
var root_1$
|
|
17040
|
+
var root_1$i = /* @__PURE__ */ from_html(`<ol data-testid="cart"><li class="go-cart-header" data-go-cart-header="" data-testid="cart-header"><ul><li class="go-cart-header-title" data-go-cart-header-title=""> </li> <li class="go-cart-header-price" data-go-cart-header-price=""> </li> <li class="go-cart-header-count" data-go-cart-header-count=""> </li> <!> <li class="go-cart-header-sum" data-go-cart-header-sum=""> </li></ul></li> <!> <li class="go-cart-footer" data-go-cart-footer="" data-testid="cart-footer"><ul><li class="go-cart-footer-title" data-go-cart-footer-title=""></li> <li class="go-cart-footer-price" data-go-cart-footer-price=""></li> <li class="go-cart-footer-count" data-go-cart-footer-count=""></li> <!> <li class="go-cart-footer-sum" data-go-cart-footer-sum="" data-go-cart-sum=""> </li></ul></li></ol>`);
|
|
17027
17041
|
function Cart($$anchor, $$props) {
|
|
17028
17042
|
push($$props, true);
|
|
17029
17043
|
const preview = prop($$props, "preview", 7, false);
|
|
@@ -17041,7 +17055,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17041
17055
|
var node = first_child(fragment);
|
|
17042
17056
|
{
|
|
17043
17057
|
var consequent_2 = ($$anchor2) => {
|
|
17044
|
-
var ol = root_1$
|
|
17058
|
+
var ol = root_1$i();
|
|
17045
17059
|
var li = child(ol);
|
|
17046
17060
|
var ul = child(li);
|
|
17047
17061
|
var li_1 = child(ul);
|
|
@@ -17056,7 +17070,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17056
17070
|
var node_1 = sibling(li_3, 2);
|
|
17057
17071
|
{
|
|
17058
17072
|
var consequent = ($$anchor3) => {
|
|
17059
|
-
var li_4 = root_2$
|
|
17073
|
+
var li_4 = root_2$p();
|
|
17060
17074
|
append($$anchor3, li_4);
|
|
17061
17075
|
};
|
|
17062
17076
|
if_block(node_1, ($$render) => {
|
|
@@ -17228,7 +17242,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17228
17242
|
form.details.apiErrors = [shop.t("cart.coupon.form.errors.notValid")];
|
|
17229
17243
|
}
|
|
17230
17244
|
}
|
|
17231
|
-
var root$
|
|
17245
|
+
var root$9 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
|
|
17232
17246
|
function CouponRedemption($$anchor, $$props) {
|
|
17233
17247
|
push($$props, false);
|
|
17234
17248
|
Forms.defineForm({
|
|
@@ -17240,13 +17254,286 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17240
17254
|
await redeem(e.target);
|
|
17241
17255
|
}
|
|
17242
17256
|
init();
|
|
17243
|
-
var go_form = root$
|
|
17257
|
+
var go_form = root$9();
|
|
17244
17258
|
set_custom_element_data(go_form, "formId", "couponRedemption");
|
|
17245
17259
|
event("submit", go_form, redeem$1);
|
|
17246
17260
|
append($$anchor, go_form);
|
|
17247
17261
|
pop();
|
|
17248
17262
|
}
|
|
17249
17263
|
customElements.define("go-coupon-redemption", create_custom_element(CouponRedemption, {}, [], []));
|
|
17264
|
+
class GoDonation {
|
|
17265
|
+
#campaign = /* @__PURE__ */ state();
|
|
17266
|
+
get campaign() {
|
|
17267
|
+
return get$2(this.#campaign);
|
|
17268
|
+
}
|
|
17269
|
+
set campaign(value) {
|
|
17270
|
+
set(this.#campaign, value, true);
|
|
17271
|
+
}
|
|
17272
|
+
#amount = /* @__PURE__ */ state();
|
|
17273
|
+
get amount() {
|
|
17274
|
+
return get$2(this.#amount);
|
|
17275
|
+
}
|
|
17276
|
+
set amount(value) {
|
|
17277
|
+
set(this.#amount, value, true);
|
|
17278
|
+
}
|
|
17279
|
+
selectCampaign = (selectedCampaign) => {
|
|
17280
|
+
this.campaign = selectedCampaign;
|
|
17281
|
+
document.getElementsByClassName("donation-actions")[0]?.scrollIntoView();
|
|
17282
|
+
};
|
|
17283
|
+
addDonationToCart = () => {
|
|
17284
|
+
if (this.amount === void 0 || this.campaign === void 0) {
|
|
17285
|
+
return;
|
|
17286
|
+
}
|
|
17287
|
+
const donationObject = { value: this.amount, campaign_id: this.campaign.id };
|
|
17288
|
+
let currentDonationsLocalStorage = JSON.parse(localStorage.getItem("201600627v4donations") || "[]");
|
|
17289
|
+
let donationTotal = sum(currentDonationsLocalStorage.filter((d) => d.campaign_id = donationObject.campaign_id), (d) => d.value) + donationObject.value;
|
|
17290
|
+
if (donationTotal > this.campaign.guest_limit && this.campaign.guest_limit > 0 && (!shop.currentUser?.isAuthenticated || shop.currentUser.isGuest)) {
|
|
17291
|
+
this.skipDonation();
|
|
17292
|
+
} else {
|
|
17293
|
+
currentDonationsLocalStorage.push(donationObject);
|
|
17294
|
+
localStorage.setItem("201600627v4donations", JSON.stringify(currentDonationsLocalStorage));
|
|
17295
|
+
localStorage.setItem("skipDonation", "true");
|
|
17296
|
+
window.history.pushState(null, "", shop.urls.cart());
|
|
17297
|
+
window.location.replace(shop.urls.cart());
|
|
17298
|
+
}
|
|
17299
|
+
};
|
|
17300
|
+
skipDonation = () => {
|
|
17301
|
+
localStorage.setItem("skipDonation", "true");
|
|
17302
|
+
window.history.pushState(null, "", shop.urls.cart());
|
|
17303
|
+
window.location.replace(shop.urls.cart());
|
|
17304
|
+
};
|
|
17305
|
+
}
|
|
17306
|
+
const goDonation = new GoDonation();
|
|
17307
|
+
var root_1$h = /* @__PURE__ */ from_html(`<img alt="logo"/>`);
|
|
17308
|
+
var root$8 = /* @__PURE__ */ from_html(`<div role="button" tabindex="0"><div class="donation-image"><!></div> <div class="donation-info"><p class="donation-info-title"> </p> <p class="donation-info-description"> </p></div></div>`);
|
|
17309
|
+
function DonationCampaign($$anchor, $$props) {
|
|
17310
|
+
push($$props, true);
|
|
17311
|
+
let campaign = prop($$props, "campaign", 7);
|
|
17312
|
+
const translations = /* @__PURE__ */ user_derived(() => campaign().translations);
|
|
17313
|
+
var $$exports = {
|
|
17314
|
+
get campaign() {
|
|
17315
|
+
return campaign();
|
|
17316
|
+
},
|
|
17317
|
+
set campaign($$value) {
|
|
17318
|
+
campaign($$value);
|
|
17319
|
+
flushSync();
|
|
17320
|
+
}
|
|
17321
|
+
};
|
|
17322
|
+
var div = root$8();
|
|
17323
|
+
let classes;
|
|
17324
|
+
div.__click = () => goDonation.selectCampaign(campaign());
|
|
17325
|
+
div.__keydown = (e) => {
|
|
17326
|
+
if (e.key === "Enter") {
|
|
17327
|
+
goDonation.selectCampaign(campaign());
|
|
17328
|
+
}
|
|
17329
|
+
};
|
|
17330
|
+
var div_1 = child(div);
|
|
17331
|
+
var node = child(div_1);
|
|
17332
|
+
{
|
|
17333
|
+
var consequent = ($$anchor2) => {
|
|
17334
|
+
var img = root_1$h();
|
|
17335
|
+
template_effect(($0) => set_attribute(img, "src", $0), [
|
|
17336
|
+
() => campaign().picture.thumbnail.replace("thumbnail", "article_3x2")
|
|
17337
|
+
]);
|
|
17338
|
+
append($$anchor2, img);
|
|
17339
|
+
};
|
|
17340
|
+
if_block(node, ($$render) => {
|
|
17341
|
+
if (campaign().picture.thumbnail) $$render(consequent);
|
|
17342
|
+
});
|
|
17343
|
+
}
|
|
17344
|
+
reset(div_1);
|
|
17345
|
+
var div_2 = sibling(div_1, 2);
|
|
17346
|
+
var p2 = child(div_2);
|
|
17347
|
+
var text2 = child(p2, true);
|
|
17348
|
+
reset(p2);
|
|
17349
|
+
var p_1 = sibling(p2, 2);
|
|
17350
|
+
var text_1 = child(p_1, true);
|
|
17351
|
+
reset(p_1);
|
|
17352
|
+
reset(div_2);
|
|
17353
|
+
reset(div);
|
|
17354
|
+
template_effect(() => {
|
|
17355
|
+
classes = set_class(div, 1, "go-donation-campaign", null, classes, { selected: goDonation.campaign?.id === campaign()?.id });
|
|
17356
|
+
set_text(text2, get$2(translations)["donations.headline"]);
|
|
17357
|
+
set_text(text_1, get$2(translations)["donations.shop.info"]);
|
|
17358
|
+
});
|
|
17359
|
+
append($$anchor, div);
|
|
17360
|
+
return pop($$exports);
|
|
17361
|
+
}
|
|
17362
|
+
delegate(["click", "keydown"]);
|
|
17363
|
+
create_custom_element(DonationCampaign, { campaign: {} }, [], [], { mode: "open" });
|
|
17364
|
+
function currency(value, currency2) {
|
|
17365
|
+
if (currency2 == "CHF") {
|
|
17366
|
+
return new Intl.NumberFormat("de-CH", { style: "currency", currency: currency2 }).format(value);
|
|
17367
|
+
} else {
|
|
17368
|
+
return new Intl.NumberFormat("de-DE", { style: "currency", currency: currency2 }).format(value);
|
|
17369
|
+
}
|
|
17370
|
+
}
|
|
17371
|
+
function parseIds(ids) {
|
|
17372
|
+
if (!ids) {
|
|
17373
|
+
return void 0;
|
|
17374
|
+
}
|
|
17375
|
+
const parsed = ids.split(",").map((id) => id.trim()).map(Number).filter((num) => !isNaN(num) && num > 0);
|
|
17376
|
+
return parsed.length > 0 ? parsed : void 0;
|
|
17377
|
+
}
|
|
17378
|
+
function parseTokens(tokens, possibleTokens) {
|
|
17379
|
+
if (!tokens) {
|
|
17380
|
+
return void 0;
|
|
17381
|
+
}
|
|
17382
|
+
const parsed = tokens.split(",").map((token) => token.trim()).map(String).filter((token) => token.length > 0);
|
|
17383
|
+
parsed.forEach((token) => {
|
|
17384
|
+
if (!possibleTokens.includes(token)) {
|
|
17385
|
+
throw new Error("(parseTokens) Invalid token: " + token);
|
|
17386
|
+
}
|
|
17387
|
+
});
|
|
17388
|
+
return parsed.length > 0 ? parsed : void 0;
|
|
17389
|
+
}
|
|
17390
|
+
var root_1$g = /* @__PURE__ */ from_html(`<button> </button>`);
|
|
17391
|
+
var root_2$o = /* @__PURE__ */ from_html(`<form id="donationForm" action="" novalidate=""><div class="donation-custom form-group"><label for="donation-custom-amount"> </label> <input class="form-control" id="donation-custom-amount" type="number" min="1"/></div></form>`);
|
|
17392
|
+
var root$7 = /* @__PURE__ */ from_html(`<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>`);
|
|
17393
|
+
function DonationSelector($$anchor, $$props) {
|
|
17394
|
+
push($$props, true);
|
|
17395
|
+
const guestMaxLimit = goDonation.campaign?.guest_limit / 100;
|
|
17396
|
+
let customAmount = /* @__PURE__ */ state(void 0);
|
|
17397
|
+
function selectAmount(amount) {
|
|
17398
|
+
goDonation.amount = amount;
|
|
17399
|
+
set(customAmount, null);
|
|
17400
|
+
}
|
|
17401
|
+
function handleCustomInput(e) {
|
|
17402
|
+
const form = document.getElementById("donationForm");
|
|
17403
|
+
if (form.checkValidity()) {
|
|
17404
|
+
goDonation.amount = e.target.valueAsNumber * 100;
|
|
17405
|
+
} else {
|
|
17406
|
+
goDonation.amount = void 0;
|
|
17407
|
+
form.reportValidity();
|
|
17408
|
+
}
|
|
17409
|
+
}
|
|
17410
|
+
var div = root$7();
|
|
17411
|
+
var h3 = child(div);
|
|
17412
|
+
var text2 = child(h3, true);
|
|
17413
|
+
reset(h3);
|
|
17414
|
+
var div_1 = sibling(h3, 2);
|
|
17415
|
+
each(div_1, 20, () => goDonation.campaign?.options, (option) => option, ($$anchor2, option) => {
|
|
17416
|
+
var button = root_1$g();
|
|
17417
|
+
let classes;
|
|
17418
|
+
button.__click = () => selectAmount(option);
|
|
17419
|
+
var text_1 = child(button, true);
|
|
17420
|
+
reset(button);
|
|
17421
|
+
template_effect(
|
|
17422
|
+
($0) => {
|
|
17423
|
+
classes = set_class(button, 1, "btn btn-default", null, classes, { selected: goDonation.amount === option });
|
|
17424
|
+
set_text(text_1, $0);
|
|
17425
|
+
},
|
|
17426
|
+
[() => currency(option / 100, shop.currency)]
|
|
17427
|
+
);
|
|
17428
|
+
append($$anchor2, button);
|
|
17429
|
+
});
|
|
17430
|
+
reset(div_1);
|
|
17431
|
+
var node = sibling(div_1, 2);
|
|
17432
|
+
{
|
|
17433
|
+
var consequent = ($$anchor2) => {
|
|
17434
|
+
var form_1 = root_2$o();
|
|
17435
|
+
var div_2 = child(form_1);
|
|
17436
|
+
var label = child(div_2);
|
|
17437
|
+
var text_2 = child(label, true);
|
|
17438
|
+
reset(label);
|
|
17439
|
+
var input = sibling(label, 2);
|
|
17440
|
+
remove_input_defaults(input);
|
|
17441
|
+
input.__input = handleCustomInput;
|
|
17442
|
+
reset(div_2);
|
|
17443
|
+
reset(form_1);
|
|
17444
|
+
template_effect(
|
|
17445
|
+
($0, $1) => {
|
|
17446
|
+
set_text(text_2, $0);
|
|
17447
|
+
set_attribute(input, "max", guestMaxLimit);
|
|
17448
|
+
set_attribute(input, "placeholder", $1);
|
|
17449
|
+
set_value(input, get$2(customAmount));
|
|
17450
|
+
},
|
|
17451
|
+
[
|
|
17452
|
+
() => shop.t("donations.selection.custom.label"),
|
|
17453
|
+
() => shop.t("donations.selection.custom.input.placeholder")
|
|
17454
|
+
]
|
|
17455
|
+
);
|
|
17456
|
+
append($$anchor2, form_1);
|
|
17457
|
+
};
|
|
17458
|
+
if_block(node, ($$render) => {
|
|
17459
|
+
if (goDonation.campaign?.free_donations) $$render(consequent);
|
|
17460
|
+
});
|
|
17461
|
+
}
|
|
17462
|
+
reset(div);
|
|
17463
|
+
template_effect(($0) => set_text(text2, $0), [() => shop.t("donations.selection.title")]);
|
|
17464
|
+
append($$anchor, div);
|
|
17465
|
+
pop();
|
|
17466
|
+
}
|
|
17467
|
+
delegate(["click", "input"]);
|
|
17468
|
+
create_custom_element(DonationSelector, {}, [], [], { mode: "open" });
|
|
17469
|
+
var root_1$f = /* @__PURE__ */ from_html(`<div class="go-donations-list"><!> <!> <div class="donation-actions"><button class="btn btn-default"> </button> <button class="btn btn-primary"> </button></div></div>`);
|
|
17470
|
+
function Donations($$anchor, $$props) {
|
|
17471
|
+
push($$props, false);
|
|
17472
|
+
onMount(() => {
|
|
17473
|
+
if (shop.donations?.campaigns?.length == 1) {
|
|
17474
|
+
goDonation.selectCampaign(shop.donations?.campaigns[0]);
|
|
17475
|
+
}
|
|
17476
|
+
});
|
|
17477
|
+
init();
|
|
17478
|
+
var fragment = comment();
|
|
17479
|
+
var node = first_child(fragment);
|
|
17480
|
+
{
|
|
17481
|
+
var consequent_1 = ($$anchor2) => {
|
|
17482
|
+
var div = root_1$f();
|
|
17483
|
+
var node_1 = child(div);
|
|
17484
|
+
each(node_1, 1, () => shop?.donations?.campaigns, (campaign) => campaign.id, ($$anchor3, campaign) => {
|
|
17485
|
+
DonationCampaign($$anchor3, {
|
|
17486
|
+
get campaign() {
|
|
17487
|
+
return get$2(campaign);
|
|
17488
|
+
}
|
|
17489
|
+
});
|
|
17490
|
+
});
|
|
17491
|
+
var node_2 = sibling(node_1, 2);
|
|
17492
|
+
{
|
|
17493
|
+
var consequent = ($$anchor3) => {
|
|
17494
|
+
DonationSelector($$anchor3, {});
|
|
17495
|
+
};
|
|
17496
|
+
if_block(node_2, ($$render) => {
|
|
17497
|
+
if (goDonation.campaign) $$render(consequent);
|
|
17498
|
+
});
|
|
17499
|
+
}
|
|
17500
|
+
var div_1 = sibling(node_2, 2);
|
|
17501
|
+
var button = child(div_1);
|
|
17502
|
+
button.__click = function(...$$args) {
|
|
17503
|
+
goDonation.skipDonation?.apply(this, $$args);
|
|
17504
|
+
};
|
|
17505
|
+
var text2 = child(button, true);
|
|
17506
|
+
reset(button);
|
|
17507
|
+
var button_1 = sibling(button, 2);
|
|
17508
|
+
button_1.__click = function(...$$args) {
|
|
17509
|
+
goDonation.addDonationToCart?.apply(this, $$args);
|
|
17510
|
+
};
|
|
17511
|
+
var text_1 = child(button_1, true);
|
|
17512
|
+
reset(button_1);
|
|
17513
|
+
reset(div_1);
|
|
17514
|
+
reset(div);
|
|
17515
|
+
template_effect(
|
|
17516
|
+
($0, $1) => {
|
|
17517
|
+
set_text(text2, $0);
|
|
17518
|
+
button_1.disabled = !goDonation.amount;
|
|
17519
|
+
set_text(text_1, $1);
|
|
17520
|
+
},
|
|
17521
|
+
[
|
|
17522
|
+
() => shop.t("donations.actions.continueWithoutDonation"),
|
|
17523
|
+
() => shop.t("donations.actions.addToCart")
|
|
17524
|
+
]
|
|
17525
|
+
);
|
|
17526
|
+
append($$anchor2, div);
|
|
17527
|
+
};
|
|
17528
|
+
if_block(node, ($$render) => {
|
|
17529
|
+
if (shop.donations && shop.donations.campaigns) $$render(consequent_1);
|
|
17530
|
+
});
|
|
17531
|
+
}
|
|
17532
|
+
append($$anchor, fragment);
|
|
17533
|
+
pop();
|
|
17534
|
+
}
|
|
17535
|
+
delegate(["click"]);
|
|
17536
|
+
customElements.define("go-donations", create_custom_element(Donations, {}, [], []));
|
|
17250
17537
|
function isFunction$1(value) {
|
|
17251
17538
|
return typeof value === "function";
|
|
17252
17539
|
}
|
|
@@ -31650,10 +31937,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31650
31937
|
let when = prop($$props, "when", 7), then = prop($$props, "then", 7, "show");
|
|
31651
31938
|
const _ticketSelectionDetails = getTicketSelectionDetails($$props.$$host);
|
|
31652
31939
|
const ticketSelectionDetails = /* @__PURE__ */ user_derived(() => _ticketSelectionDetails.value);
|
|
31940
|
+
const _personalizationDetails = getPersonalizationDetails($$props.$$host);
|
|
31941
|
+
const personalizationDetails = /* @__PURE__ */ user_derived(() => _personalizationDetails.value);
|
|
31653
31942
|
const _formDetails = getDetails$1($$props.$$host);
|
|
31654
31943
|
const formDetails = /* @__PURE__ */ user_derived(() => _formDetails.value);
|
|
31655
31944
|
let data = /* @__PURE__ */ user_derived(() => ({
|
|
31656
31945
|
ticketSelection: get$2(ticketSelectionDetails),
|
|
31946
|
+
personalizationDetails: get$2(personalizationDetails),
|
|
31657
31947
|
formData: get$2(formDetails)?.formData,
|
|
31658
31948
|
cart: shop.cart
|
|
31659
31949
|
}));
|
|
@@ -32399,25 +32689,107 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32399
32689
|
pop();
|
|
32400
32690
|
}
|
|
32401
32691
|
customElements.define("go-order-invoice-id", create_custom_element(InvoiceId, {}, [], []));
|
|
32402
|
-
|
|
32403
|
-
|
|
32404
|
-
|
|
32692
|
+
var root$2 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
|
|
32693
|
+
function Password($$anchor, $$props) {
|
|
32694
|
+
push($$props, false);
|
|
32695
|
+
Forms.defineForm({
|
|
32696
|
+
id: "passwordResetForm",
|
|
32697
|
+
fields: [
|
|
32698
|
+
{ key: "currentPassword", required: true },
|
|
32699
|
+
{ key: "password", required: true },
|
|
32700
|
+
{ key: "confirmPassword", required: true }
|
|
32701
|
+
]
|
|
32702
|
+
});
|
|
32703
|
+
async function submit(event2) {
|
|
32704
|
+
const form = event2.target;
|
|
32705
|
+
const details = form.details;
|
|
32706
|
+
const result = await shop.updatePassword(details.formData);
|
|
32707
|
+
if (result.data) {
|
|
32708
|
+
details.successMessage = shop.t("user.passwordSuccess.desc.title");
|
|
32709
|
+
details.apiErrors = [];
|
|
32710
|
+
} else {
|
|
32711
|
+
details.apiErrors = result.error?.errors || result.error || result.errors;
|
|
32712
|
+
}
|
|
32405
32713
|
}
|
|
32406
|
-
|
|
32407
|
-
|
|
32714
|
+
init();
|
|
32715
|
+
var go_form = root$2();
|
|
32716
|
+
set_custom_element_data(go_form, "formId", "passwordResetForm");
|
|
32717
|
+
event("submit", go_form, submit);
|
|
32718
|
+
append($$anchor, go_form);
|
|
32719
|
+
pop();
|
|
32408
32720
|
}
|
|
32409
|
-
|
|
32410
|
-
|
|
32411
|
-
|
|
32412
|
-
|
|
32413
|
-
|
|
32414
|
-
|
|
32415
|
-
|
|
32416
|
-
|
|
32417
|
-
|
|
32721
|
+
customElements.define("go-profile-password", create_custom_element(Password, {}, [], []));
|
|
32722
|
+
var root$1 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
|
|
32723
|
+
function Details$2($$anchor, $$props) {
|
|
32724
|
+
push($$props, true);
|
|
32725
|
+
Forms.defineForm({
|
|
32726
|
+
id: "accountDetailsForm",
|
|
32727
|
+
fields: [
|
|
32728
|
+
{ key: "salutation", required: false },
|
|
32729
|
+
{ key: "firstName", required: true },
|
|
32730
|
+
{ key: "lastName", required: true },
|
|
32731
|
+
{ key: "email", required: true },
|
|
32732
|
+
{ key: "confirmEmail", required: true },
|
|
32733
|
+
// { key: 'addressee', required: true },
|
|
32734
|
+
// { key: 'street', required: true },
|
|
32735
|
+
// { key: 'postcode', required: true },
|
|
32736
|
+
// { key: 'city', required: true },
|
|
32737
|
+
// { key: 'country', required: true },
|
|
32738
|
+
{ key: "language", required: true }
|
|
32739
|
+
]
|
|
32418
32740
|
});
|
|
32419
|
-
|
|
32741
|
+
let form = /* @__PURE__ */ state(void 0);
|
|
32742
|
+
const user = /* @__PURE__ */ user_derived(() => shop.validateToken());
|
|
32743
|
+
onMount(async () => {
|
|
32744
|
+
await shop.waitForAllFetches();
|
|
32745
|
+
await pollUntilTruthy(() => get$2(form).details);
|
|
32746
|
+
await pollUntilTruthy(() => get$2(user).data);
|
|
32747
|
+
get$2(form).details.fill(get$2(user).data);
|
|
32748
|
+
});
|
|
32749
|
+
var go_form = root$1();
|
|
32750
|
+
set_custom_element_data(go_form, "formId", "accountDetailsForm");
|
|
32751
|
+
bind_this(go_form, ($$value) => set(form, $$value), () => get$2(form));
|
|
32752
|
+
append($$anchor, go_form);
|
|
32753
|
+
pop();
|
|
32420
32754
|
}
|
|
32755
|
+
customElements.define("go-profile-details", create_custom_element(Details$2, {}, [], []));
|
|
32756
|
+
var root_1$4 = /* @__PURE__ */ from_html(`<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>`, 1);
|
|
32757
|
+
function Overview($$anchor, $$props) {
|
|
32758
|
+
push($$props, true);
|
|
32759
|
+
const user = /* @__PURE__ */ user_derived(() => shop.validateToken());
|
|
32760
|
+
const data = /* @__PURE__ */ user_derived(() => get$2(user)?.data);
|
|
32761
|
+
var fragment = comment();
|
|
32762
|
+
var node = first_child(fragment);
|
|
32763
|
+
{
|
|
32764
|
+
var consequent = ($$anchor2) => {
|
|
32765
|
+
var fragment_1 = root_1$4();
|
|
32766
|
+
var div = first_child(fragment_1);
|
|
32767
|
+
var text2 = child(div);
|
|
32768
|
+
reset(div);
|
|
32769
|
+
var div_1 = sibling(div, 2);
|
|
32770
|
+
var text_1 = child(div_1, true);
|
|
32771
|
+
reset(div_1);
|
|
32772
|
+
template_effect(() => {
|
|
32773
|
+
set_text(text2, `${get$2(data).name ?? ""}
|
|
32774
|
+
${get$2(data).surname ?? ""}`);
|
|
32775
|
+
set_text(text_1, get$2(data).email);
|
|
32776
|
+
});
|
|
32777
|
+
append($$anchor2, fragment_1);
|
|
32778
|
+
};
|
|
32779
|
+
var alternate = ($$anchor2) => {
|
|
32780
|
+
var text_2 = text();
|
|
32781
|
+
template_effect(($0) => set_text(text_2, $0), [() => shop.t("user.login.desc.text")]);
|
|
32782
|
+
append($$anchor2, text_2);
|
|
32783
|
+
};
|
|
32784
|
+
if_block(node, ($$render) => {
|
|
32785
|
+
if (get$2(data)) $$render(consequent);
|
|
32786
|
+
else $$render(alternate, false);
|
|
32787
|
+
});
|
|
32788
|
+
}
|
|
32789
|
+
append($$anchor, fragment);
|
|
32790
|
+
pop();
|
|
32791
|
+
}
|
|
32792
|
+
customElements.define("go-profile-overview", create_custom_element(Overview, {}, [], []));
|
|
32421
32793
|
function TicketSelection($$anchor, $$props) {
|
|
32422
32794
|
push($$props, true);
|
|
32423
32795
|
let mode = prop($$props, "mode", 7), filters = prop($$props, "filters", 7), eventIds = prop($$props, "eventIds", 7), museumIds = prop($$props, "museumIds", 7), exhibitionIds = prop($$props, "exhibitionIds", 7), selectedDate = prop($$props, "selectedDate", 7), selectedTimeslot = prop($$props, "selectedTimeslot", 7), ticketIds = prop($$props, "ticketIds", 7), ticketGroupIds = prop($$props, "ticketGroupIds", 7);
|
|
@@ -33054,13 +33426,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33054
33426
|
const d = /* @__PURE__ */ new Date();
|
|
33055
33427
|
return d.toISOString();
|
|
33056
33428
|
}
|
|
33057
|
-
var root_1$
|
|
33429
|
+
var root_1$3 = /* @__PURE__ */ from_html(`<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>`, 1);
|
|
33058
33430
|
var root_4 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
33059
33431
|
var root_3$1 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-tickets-item-title"><!></li> <li class="go-tickets-item-description" data-go-tickets-description=""><!></li> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><select></select></li></ul></article></li>`);
|
|
33060
33432
|
function Item($$anchor, $$props) {
|
|
33061
33433
|
push($$props, true);
|
|
33062
33434
|
const scaled_title = ($$anchor2) => {
|
|
33063
|
-
var fragment = root_1$
|
|
33435
|
+
var fragment = root_1$3();
|
|
33064
33436
|
var span = first_child(fragment);
|
|
33065
33437
|
var text2 = child(span);
|
|
33066
33438
|
reset(span);
|
|
@@ -33172,7 +33544,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33172
33544
|
}
|
|
33173
33545
|
delegate(["change"]);
|
|
33174
33546
|
create_custom_element(Item, { item: {}, details: {} }, [], [], { mode: "open" });
|
|
33175
|
-
var root_1$
|
|
33547
|
+
var root_1$2 = /* @__PURE__ */ from_html(`<ol class="go-tickets" data-testid="tickets"><li class="go-tickets-header" data-go-tickets-header="" data-testid="tickets-header"><ul><li class="go-tickets-header-title" data-go-tickets-title=""> </li> <li class="go-tickets-header-description" data-go-tickets-description=""> </li> <li class="go-tickets-header-price" data-go-tickets-price=""> </li> <li class="go-tickets-header-quality" data-go-tickets-quality=""> </li></ul></li> <!></ol>`);
|
|
33176
33548
|
function Body($$anchor, $$props) {
|
|
33177
33549
|
push($$props, true);
|
|
33178
33550
|
const _details = getSegmentDetails($$props.$$host);
|
|
@@ -33182,7 +33554,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33182
33554
|
var node = first_child(fragment);
|
|
33183
33555
|
{
|
|
33184
33556
|
var consequent = ($$anchor2) => {
|
|
33185
|
-
var ol = root_1$
|
|
33557
|
+
var ol = root_1$2();
|
|
33186
33558
|
var li = child(ol);
|
|
33187
33559
|
var ul = child(li);
|
|
33188
33560
|
var li_1 = child(ul);
|
|
@@ -33246,7 +33618,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33246
33618
|
pop();
|
|
33247
33619
|
}
|
|
33248
33620
|
customElements.define("go-ticket-segment-sum", create_custom_element(Sum, {}, [], []));
|
|
33249
|
-
let Details$
|
|
33621
|
+
let Details$1 = class Details {
|
|
33250
33622
|
#tsd;
|
|
33251
33623
|
get tsd() {
|
|
33252
33624
|
return get$2(this.#tsd);
|
|
@@ -33292,12 +33664,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33292
33664
|
}
|
|
33293
33665
|
};
|
|
33294
33666
|
var root_2$1 = /* @__PURE__ */ from_html(`<li><label> <input type="radio" name="timeslot"/></label></li>`);
|
|
33295
|
-
var root_1$
|
|
33667
|
+
var root_1$1 = /* @__PURE__ */ from_html(`<ul data-testid="timeslots"></ul>`);
|
|
33296
33668
|
function Timeslots($$anchor, $$props) {
|
|
33297
33669
|
push($$props, true);
|
|
33298
33670
|
const binding_group = [];
|
|
33299
33671
|
const _tsd = getTicketSelectionDetails($$props.$$host);
|
|
33300
|
-
const details = new Details$
|
|
33672
|
+
const details = new Details$1(_tsd);
|
|
33301
33673
|
const change = (e) => {
|
|
33302
33674
|
e.target.dispatchEvent(new CustomEvent("go-timeslot-select", {
|
|
33303
33675
|
detail: { selected: details.tsd.selectedTimeslot },
|
|
@@ -33310,7 +33682,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33310
33682
|
var node = first_child(fragment);
|
|
33311
33683
|
{
|
|
33312
33684
|
var consequent = ($$anchor2) => {
|
|
33313
|
-
var ul = root_1$
|
|
33685
|
+
var ul = root_1$1();
|
|
33314
33686
|
each(ul, 20, () => details.timeslots, (timeslot) => timeslot, ($$anchor3, timeslot) => {
|
|
33315
33687
|
const selected = /* @__PURE__ */ user_derived(() => details.tsd?.selectedTimeslot === timeslot.startAt);
|
|
33316
33688
|
var li = root_2$1();
|
|
@@ -33469,7 +33841,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33469
33841
|
var root_11 = /* @__PURE__ */ from_html(`<div> </div>`);
|
|
33470
33842
|
var root_7 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
|
|
33471
33843
|
var root_2 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
|
|
33472
|
-
var root_1
|
|
33844
|
+
var root_1 = /* @__PURE__ */ from_html(`<div data-calendar-wrapper=""><!></div>`);
|
|
33473
33845
|
function CalendarUI($$anchor, $$props) {
|
|
33474
33846
|
push($$props, true);
|
|
33475
33847
|
let calendarClass = prop($$props, "calendarClass", 7);
|
|
@@ -33491,7 +33863,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33491
33863
|
flushSync();
|
|
33492
33864
|
}
|
|
33493
33865
|
};
|
|
33494
|
-
var div = root_1
|
|
33866
|
+
var div = root_1();
|
|
33495
33867
|
var node = child(div);
|
|
33496
33868
|
{
|
|
33497
33869
|
const children = ($$anchor2, $$arg0) => {
|
|
@@ -33741,7 +34113,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33741
34113
|
return pop($$exports);
|
|
33742
34114
|
}
|
|
33743
34115
|
customElements.define("go-calendar", create_custom_element(Calendar_1, {}, [], ["details"]));
|
|
33744
|
-
|
|
34116
|
+
class Details {
|
|
33745
34117
|
#ticketSelectionDetails;
|
|
33746
34118
|
get ticketSelectionDetails() {
|
|
33747
34119
|
return get$2(this.#ticketSelectionDetails);
|
|
@@ -33777,14 +34149,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33777
34149
|
const ret = this.ticketSelectionDetails.preCarts.some((cart) => cart.items.some((item) => item.quantity > 0));
|
|
33778
34150
|
return ret;
|
|
33779
34151
|
}
|
|
33780
|
-
}
|
|
33781
|
-
var root
|
|
34152
|
+
}
|
|
34153
|
+
var root = /* @__PURE__ */ from_html(`<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>`);
|
|
33782
34154
|
function AddToCartButton($$anchor, $$props) {
|
|
33783
34155
|
push($$props, true);
|
|
33784
34156
|
const _tsd = getTicketSelectionDetails($$props.$$host);
|
|
33785
|
-
const details = new Details
|
|
34157
|
+
const details = new Details(_tsd);
|
|
33786
34158
|
var $$exports = { details };
|
|
33787
|
-
var button = root
|
|
34159
|
+
var button = root();
|
|
33788
34160
|
button.__click = () => details.addToCart();
|
|
33789
34161
|
var text2 = child(button, true);
|
|
33790
34162
|
reset(button);
|
|
@@ -33805,107 +34177,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33805
34177
|
}
|
|
33806
34178
|
delegate(["click"]);
|
|
33807
34179
|
customElements.define("go-add-to-cart-button", create_custom_element(AddToCartButton, {}, [], ["details"]));
|
|
33808
|
-
var root$1 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
|
|
33809
|
-
function Password($$anchor, $$props) {
|
|
33810
|
-
push($$props, false);
|
|
33811
|
-
Forms.defineForm({
|
|
33812
|
-
id: "passwordResetForm",
|
|
33813
|
-
fields: [
|
|
33814
|
-
{ key: "currentPassword", required: true },
|
|
33815
|
-
{ key: "password", required: true },
|
|
33816
|
-
{ key: "confirmPassword", required: true }
|
|
33817
|
-
]
|
|
33818
|
-
});
|
|
33819
|
-
async function submit(event2) {
|
|
33820
|
-
const form = event2.target;
|
|
33821
|
-
const details = form.details;
|
|
33822
|
-
const result = await shop.updatePassword(details.formData);
|
|
33823
|
-
if (result.data) {
|
|
33824
|
-
details.successMessage = shop.t("user.passwordSuccess.desc.title");
|
|
33825
|
-
details.apiErrors = [];
|
|
33826
|
-
} else {
|
|
33827
|
-
details.apiErrors = result.error?.errors || result.error || result.errors;
|
|
33828
|
-
}
|
|
33829
|
-
}
|
|
33830
|
-
init();
|
|
33831
|
-
var go_form = root$1();
|
|
33832
|
-
set_custom_element_data(go_form, "formId", "passwordResetForm");
|
|
33833
|
-
event("submit", go_form, submit);
|
|
33834
|
-
append($$anchor, go_form);
|
|
33835
|
-
pop();
|
|
33836
|
-
}
|
|
33837
|
-
customElements.define("go-profile-password", create_custom_element(Password, {}, [], []));
|
|
33838
|
-
var root = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
|
|
33839
|
-
function Details($$anchor, $$props) {
|
|
33840
|
-
push($$props, true);
|
|
33841
|
-
Forms.defineForm({
|
|
33842
|
-
id: "accountDetailsForm",
|
|
33843
|
-
fields: [
|
|
33844
|
-
{ key: "salutation", required: false },
|
|
33845
|
-
{ key: "firstName", required: true },
|
|
33846
|
-
{ key: "lastName", required: true },
|
|
33847
|
-
{ key: "email", required: true },
|
|
33848
|
-
{ key: "confirmEmail", required: true },
|
|
33849
|
-
// { key: 'addressee', required: true },
|
|
33850
|
-
// { key: 'street', required: true },
|
|
33851
|
-
// { key: 'postcode', required: true },
|
|
33852
|
-
// { key: 'city', required: true },
|
|
33853
|
-
// { key: 'country', required: true },
|
|
33854
|
-
{ key: "language", required: true }
|
|
33855
|
-
]
|
|
33856
|
-
});
|
|
33857
|
-
let form = /* @__PURE__ */ state(void 0);
|
|
33858
|
-
const user = /* @__PURE__ */ user_derived(() => shop.validateToken());
|
|
33859
|
-
onMount(async () => {
|
|
33860
|
-
await shop.waitForAllFetches();
|
|
33861
|
-
await pollUntilTruthy(() => get$2(form).details);
|
|
33862
|
-
await pollUntilTruthy(() => get$2(user).data);
|
|
33863
|
-
get$2(form).details.fill(get$2(user).data);
|
|
33864
|
-
});
|
|
33865
|
-
var go_form = root();
|
|
33866
|
-
set_custom_element_data(go_form, "formId", "accountDetailsForm");
|
|
33867
|
-
bind_this(go_form, ($$value) => set(form, $$value), () => get$2(form));
|
|
33868
|
-
append($$anchor, go_form);
|
|
33869
|
-
pop();
|
|
33870
|
-
}
|
|
33871
|
-
customElements.define("go-profile-details", create_custom_element(Details, {}, [], []));
|
|
33872
|
-
var root_1 = /* @__PURE__ */ from_html(`<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>`, 1);
|
|
33873
|
-
function Overview($$anchor, $$props) {
|
|
33874
|
-
push($$props, true);
|
|
33875
|
-
const user = /* @__PURE__ */ user_derived(() => shop.validateToken());
|
|
33876
|
-
const data = /* @__PURE__ */ user_derived(() => get$2(user)?.data);
|
|
33877
|
-
var fragment = comment();
|
|
33878
|
-
var node = first_child(fragment);
|
|
33879
|
-
{
|
|
33880
|
-
var consequent = ($$anchor2) => {
|
|
33881
|
-
var fragment_1 = root_1();
|
|
33882
|
-
var div = first_child(fragment_1);
|
|
33883
|
-
var text2 = child(div);
|
|
33884
|
-
reset(div);
|
|
33885
|
-
var div_1 = sibling(div, 2);
|
|
33886
|
-
var text_1 = child(div_1, true);
|
|
33887
|
-
reset(div_1);
|
|
33888
|
-
template_effect(() => {
|
|
33889
|
-
set_text(text2, `${get$2(data).name ?? ""}
|
|
33890
|
-
${get$2(data).surname ?? ""}`);
|
|
33891
|
-
set_text(text_1, get$2(data).email);
|
|
33892
|
-
});
|
|
33893
|
-
append($$anchor2, fragment_1);
|
|
33894
|
-
};
|
|
33895
|
-
var alternate = ($$anchor2) => {
|
|
33896
|
-
var text_2 = text();
|
|
33897
|
-
template_effect(($0) => set_text(text_2, $0), [() => shop.t("user.login.desc.text")]);
|
|
33898
|
-
append($$anchor2, text_2);
|
|
33899
|
-
};
|
|
33900
|
-
if_block(node, ($$render) => {
|
|
33901
|
-
if (get$2(data)) $$render(consequent);
|
|
33902
|
-
else $$render(alternate, false);
|
|
33903
|
-
});
|
|
33904
|
-
}
|
|
33905
|
-
append($$anchor, fragment);
|
|
33906
|
-
pop();
|
|
33907
|
-
}
|
|
33908
|
-
customElements.define("go-profile-overview", create_custom_element(Overview, {}, [], []));
|
|
33909
34180
|
async function initGo(window2) {
|
|
33910
34181
|
const stub = window2.go;
|
|
33911
34182
|
let q = stub && stub._queue || [];
|