@gomusdev/web-components 4.14.5 → 4.16.0

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.
Files changed (23) hide show
  1. package/README.md +30 -0
  2. package/dist-js/components/cart/components/DonationRow.svelte.d.ts +1 -0
  3. package/dist-js/components/donations/components/DonationCheckbox.svelte.d.ts +1 -0
  4. package/dist-js/components/order/components/subcomponents/breakdown/items/Coupon.svelte.d.ts +1 -0
  5. package/dist-js/components/order/components/subcomponents/breakdown/items/Donation.svelte.d.ts +1 -0
  6. package/dist-js/components/order/components/subcomponents/breakdown/items/Merchandise.svelte.d.ts +1 -0
  7. package/dist-js/gomus-webcomponents.iife.js +559 -155
  8. package/dist-js/gomus-webcomponents.js +559 -155
  9. package/dist-js/gomus-webcomponents.min.iife.js +23 -23
  10. package/dist-js/gomus-webcomponents.min.js +7976 -7709
  11. package/dist-js/src/components/donations/components/DonationCheckbox.spec.d.ts +1 -0
  12. package/dist-js/src/components/order/components/subcomponents/breakdown/items/Coupon.spec.d.ts +1 -0
  13. package/dist-js/src/components/order/components/subcomponents/breakdown/items/Donation.spec.d.ts +1 -0
  14. package/dist-js/src/components/order/components/subcomponents/breakdown/items/Merchandise.spec.d.ts +1 -0
  15. package/dist-js/src/components/order/lib/OrderDetails.spec.d.ts +1 -0
  16. package/dist-js/src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/SegmentDetails.svelte.d.ts +10 -1
  17. package/dist-js/src/factories/CouponFactories.d.ts +14 -1
  18. package/dist-js/src/factories/DonationFactories.d.ts +9 -0
  19. package/dist-js/src/factories/MerchandiseFactories.d.ts +11 -0
  20. package/dist-js/src/lib/models/cart/cart.svelte.d.ts +21 -3
  21. package/dist-js/src/lib/models/cart/types.d.ts +11 -0
  22. package/dist-js/src/lib/stores/shop.svelte.d.ts +10 -1
  23. package/package.json +1 -1
@@ -6381,12 +6381,18 @@ var defaultTranslations_default = {
6381
6381
  en: {
6382
6382
  "quantity.remove": "Remove item",
6383
6383
  "quantity.remove.label": "✕",
6384
- "cart.item.remove": "✕"
6384
+ "cart.item.remove": "✕",
6385
+ "common.table.donation": "Donation",
6386
+ "cart.donation.title": "Donation",
6387
+ "donations.checkbox.label": "Add a {{amount}} donation to {{campaign}}"
6385
6388
  },
6386
6389
  de: {
6387
6390
  "quantity.remove": "Artikel entfernen",
6388
6391
  "quantity.remove.label": "✕",
6389
- "cart.item.remove": "✕"
6392
+ "cart.item.remove": "✕",
6393
+ "common.table.donation": "Spende",
6394
+ "cart.donation.title": "Spende",
6395
+ "donations.checkbox.label": "{{amount}} für {{campaign}} spenden"
6390
6396
  }
6391
6397
  };
6392
6398
  //#endregion
@@ -12397,9 +12403,10 @@ function createUICoupon(apiCoupon) {
12397
12403
  //#endregion
12398
12404
  //#region src/lib/models/cart/localStorage.svelte.ts
12399
12405
  var KEY$7 = "go-cart";
12400
- var persistCart = (items, coupons) => localStorage.setItem(KEY$7, JSON.stringify({
12406
+ var persistCart = (items, coupons, donations) => localStorage.setItem(KEY$7, JSON.stringify({
12401
12407
  items,
12402
12408
  coupons,
12409
+ donations,
12403
12410
  savedAt: Date.now()
12404
12411
  }));
12405
12412
  function generateCartItem(cartItem) {
@@ -12432,6 +12439,7 @@ function generateCartItem(cartItem) {
12432
12439
  function loadFromLocalStorage(cart) {
12433
12440
  let lsItems = [];
12434
12441
  let lsCoupons = [];
12442
+ let lsDonations = [];
12435
12443
  let savedAt;
12436
12444
  try {
12437
12445
  const content = localStorage.getItem(KEY$7);
@@ -12440,9 +12448,11 @@ function loadFromLocalStorage(cart) {
12440
12448
  if (Array.isArray(parsed)) {
12441
12449
  lsItems = parsed;
12442
12450
  lsCoupons = [];
12451
+ lsDonations = [];
12443
12452
  } else if (typeof parsed === "object" && parsed !== null) {
12444
12453
  lsItems = parsed.items || [];
12445
12454
  lsCoupons = parsed.coupons || [];
12455
+ lsDonations = parsed.donations || [];
12446
12456
  savedAt = parsed.savedAt;
12447
12457
  } else {
12448
12458
  console.dir({
@@ -12451,10 +12461,11 @@ function loadFromLocalStorage(cart) {
12451
12461
  });
12452
12462
  throw new Error("go-cart has invalid format");
12453
12463
  }
12454
- if (!!savedAt && Date.now() - savedAt > 9e5) {
12464
+ if (typeof savedAt === "number" && Date.now() - savedAt > 9e5) {
12455
12465
  cart.clearItems();
12456
12466
  cart.clearCoupons();
12457
- persistCart([], []);
12467
+ cart.clearDonations();
12468
+ persistCart([], [], []);
12458
12469
  return [];
12459
12470
  }
12460
12471
  if (lsItems.length === 0) cart.clearItems();
@@ -12464,10 +12475,17 @@ function loadFromLocalStorage(cart) {
12464
12475
  code: coupon,
12465
12476
  kind: "actionToken"
12466
12477
  } : coupon));
12478
+ cart.clearDonations();
12479
+ lsDonations.forEach((d) => {
12480
+ if (typeof d?.value === "number" && typeof d?.campaign_id === "number") cart.addDonation({
12481
+ value: d.value,
12482
+ campaign_id: d.campaign_id
12483
+ });
12484
+ });
12467
12485
  return cart.items;
12468
12486
  } catch (e) {
12469
12487
  console.error(e);
12470
- persistCart([], []);
12488
+ persistCart([], [], []);
12471
12489
  return [];
12472
12490
  }
12473
12491
  }
@@ -12481,18 +12499,20 @@ function syncCartToLocalStorage(cart) {
12481
12499
  loadFromLocalStorage(cart);
12482
12500
  let lastWritten = JSON.stringify({
12483
12501
  items: cart.items || [],
12484
- coupons: cart.coupons || []
12502
+ coupons: cart.coupons || [],
12503
+ donations: cart.donations || []
12485
12504
  });
12486
- persistCart(cart.items || [], cart.coupons || []);
12505
+ persistCart(cart.items || [], cart.coupons || [], cart.donations || []);
12487
12506
  effect_root(() => {
12488
12507
  user_effect(() => {
12489
12508
  const content = JSON.stringify({
12490
12509
  items: cart.items || [],
12491
- coupons: cart.coupons || []
12510
+ coupons: cart.coupons || [],
12511
+ donations: cart.donations || []
12492
12512
  });
12493
12513
  if (content === lastWritten) return;
12494
12514
  lastWritten = content;
12495
- persistCart(cart.items || [], cart.coupons || []);
12515
+ persistCart(cart.items || [], cart.coupons || [], cart.donations || []);
12496
12516
  });
12497
12517
  });
12498
12518
  }
@@ -12511,10 +12531,12 @@ var lastUuid = 0;
12511
12531
  function createCart(products, contingent = 20) {
12512
12532
  const items = proxy([]);
12513
12533
  const coupons = proxy([]);
12534
+ const donations = proxy([]);
12514
12535
  let paymentModeId = /* @__PURE__ */ state(void 0);
12515
12536
  const cart = {
12516
12537
  items,
12517
12538
  coupons,
12539
+ donations,
12518
12540
  get paymentModeId() {
12519
12541
  return get$2(paymentModeId);
12520
12542
  },
@@ -12526,7 +12548,10 @@ function createCart(products, contingent = 20) {
12526
12548
  return this.items.filter((i) => i.quantity > 0);
12527
12549
  },
12528
12550
  get totalPriceCents() {
12529
- return Math.max(0, sum(this.items, (item) => item.total_price_cents));
12551
+ return Math.max(0, sum(this.items, (item) => item.total_price_cents) + this.donationCents);
12552
+ },
12553
+ get donationCents() {
12554
+ return sum(this.donations, (d) => d.value);
12530
12555
  },
12531
12556
  get totalQuantity() {
12532
12557
  return sum(this.items, (item) => item.quantity);
@@ -12535,7 +12560,8 @@ function createCart(products, contingent = 20) {
12535
12560
  return sum(this.coupons.filter((c) => c.kind === "valueVoucher"), (c) => c.valueCents ?? 0);
12536
12561
  },
12537
12562
  get amountToPayCents() {
12538
- return Math.max(0, this.totalPriceCents - this.valueVoucherCents);
12563
+ const itemsTotal = sum(this.items, (item) => item.total_price_cents);
12564
+ return Math.max(0, itemsTotal - this.valueVoucherCents) + this.donationCents;
12539
12565
  },
12540
12566
  /**
12541
12567
  * Generates a formatted string representation of the current object.
@@ -12554,7 +12580,10 @@ function createCart(products, contingent = 20) {
12554
12580
  reference: null,
12555
12581
  payment_mode_id: this.paymentModeId ?? shop.settings?.defaultPaymentModeId,
12556
12582
  coupons: this.coupons.map((c) => c.code),
12557
- donations: [],
12583
+ donations: this.donations.map((d) => ({
12584
+ value: d.value,
12585
+ campaign_id: d.campaign_id
12586
+ })),
12558
12587
  affiliate: {},
12559
12588
  total: this.amountToPayCents
12560
12589
  };
@@ -12595,6 +12624,19 @@ function createCart(products, contingent = 20) {
12595
12624
  },
12596
12625
  clearCoupons() {
12597
12626
  while (this.coupons.length > 0) this.coupons.pop();
12627
+ },
12628
+ hasDonation(campaignId, value) {
12629
+ return this.donations.some((d) => d.campaign_id === campaignId && d.value === value);
12630
+ },
12631
+ addDonation(donation) {
12632
+ if (!this.hasDonation(donation.campaign_id, donation.value)) this.donations.push(donation);
12633
+ },
12634
+ removeDonation(campaignId, value) {
12635
+ const index = this.donations.findIndex((d) => d.campaign_id === campaignId && d.value === value);
12636
+ if (index > -1) this.donations.splice(index, 1);
12637
+ },
12638
+ clearDonations() {
12639
+ while (this.donations.length > 0) this.donations.pop();
12598
12640
  }
12599
12641
  };
12600
12642
  if (products) products.forEach((p) => cart.addItem(createCartItem(p)));
@@ -14316,8 +14358,8 @@ var setPersonalizationDetails = createSetDetails(KEY$5);
14316
14358
  var getPersonalizationDetails = createGetDetails(KEY$5);
14317
14359
  //#endregion
14318
14360
  //#region src/components/annualTicketPersonalization/components/AnnualTicketPersonalization.svelte
14319
- var root$58 = /* @__PURE__ */ from_html(`<li><a> </a></li>`);
14320
- var root_1$21 = /* @__PURE__ */ from_html(`<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>`);
14361
+ var root$63 = /* @__PURE__ */ from_html(`<li><a> </a></li>`);
14362
+ var root_1$23 = /* @__PURE__ */ from_html(`<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>`);
14321
14363
  function AnnualTicketPersonalization($$anchor, $$props) {
14322
14364
  push($$props, true);
14323
14365
  let token = prop($$props, "token", 7);
@@ -14342,7 +14384,7 @@ function AnnualTicketPersonalization($$anchor, $$props) {
14342
14384
  var consequent_1 = ($$anchor) => {
14343
14385
  var fragment_1 = comment();
14344
14386
  each(first_child(fragment_1), 17, () => get$2(order).ticket_sales, (ticketSale) => ticketSale.id, ($$anchor, ticketSale) => {
14345
- var ul = root_1$21();
14387
+ var ul = root_1$23();
14346
14388
  var li = child(ul);
14347
14389
  var text = child(li, true);
14348
14390
  reset(li);
@@ -14351,7 +14393,7 @@ function AnnualTicketPersonalization($$anchor, $$props) {
14351
14393
  reset(li_1);
14352
14394
  var node_2 = sibling(li_1, 2);
14353
14395
  var consequent = ($$anchor) => {
14354
- var li_2 = root$58();
14396
+ var li_2 = root$63();
14355
14397
  var a = child(li_2);
14356
14398
  var text_2 = child(a, true);
14357
14399
  reset(a);
@@ -15038,7 +15080,7 @@ function wrapInElement(host, tag, props) {
15038
15080
  }
15039
15081
  //#endregion
15040
15082
  //#region src/components/forms/ui/generic/Form.svelte
15041
- var root$57 = /* @__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);
15083
+ var root$62 = /* @__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);
15042
15084
  function Form($$anchor, $$props) {
15043
15085
  push($$props, true);
15044
15086
  let formId = prop($$props, "formId", 7), custom = prop($$props, "custom", 7);
@@ -15084,7 +15126,7 @@ function Form($$anchor, $$props) {
15084
15126
  var fragment = comment();
15085
15127
  var node = first_child(fragment);
15086
15128
  var consequent = ($$anchor) => {
15087
- var fragment_1 = root$57();
15129
+ var fragment_1 = root$62();
15088
15130
  var go_submit = sibling(sibling(first_child(fragment_1), 2), 2);
15089
15131
  var text = child(go_submit, true);
15090
15132
  reset(go_submit);
@@ -15111,7 +15153,7 @@ customElements.define("go-form", create_custom_element(Form, {
15111
15153
  }, [], ["details"]));
15112
15154
  //#endregion
15113
15155
  //#region src/components/auth/passwordReset/PasswordReset.svelte
15114
- var root$56 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
15156
+ var root$61 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
15115
15157
  function PasswordReset($$anchor, $$props) {
15116
15158
  push($$props, true);
15117
15159
  let custom = prop($$props, "custom", 7, false), redirectUrl = prop($$props, "redirectUrl", 7, "");
@@ -15155,7 +15197,7 @@ function PasswordReset($$anchor, $$props) {
15155
15197
  flushSync();
15156
15198
  }
15157
15199
  };
15158
- var go_form = root$56();
15200
+ var go_form = root$61();
15159
15201
  set_custom_element_data(go_form, "formId", "passwordReset");
15160
15202
  template_effect(() => set_custom_element_data(go_form, "custom", custom()));
15161
15203
  event("submit", go_form, passwordReset);
@@ -15171,7 +15213,7 @@ customElements.define("go-password-reset", create_custom_element(PasswordReset,
15171
15213
  }, [], []));
15172
15214
  //#endregion
15173
15215
  //#region src/components/auth/setPassword/SetPassword.svelte
15174
- var root$55 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
15216
+ var root$60 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
15175
15217
  function SetPassword($$anchor, $$props) {
15176
15218
  push($$props, true);
15177
15219
  let accessToken = prop($$props, "accessToken", 7, ""), client = prop($$props, "client", 7, ""), uid = prop($$props, "uid", 7, "");
@@ -15225,7 +15267,7 @@ function SetPassword($$anchor, $$props) {
15225
15267
  flushSync();
15226
15268
  }
15227
15269
  };
15228
- var go_form = root$55();
15270
+ var go_form = root$60();
15229
15271
  set_custom_element_data(go_form, "formId", "setPassword");
15230
15272
  event("submit", go_form, setNewPassword);
15231
15273
  append($$anchor, go_form);
@@ -15385,6 +15427,7 @@ function createDisplayCart(baseCart, apiItems) {
15385
15427
  ...coupon,
15386
15428
  applied: coupon.kind !== "actionToken" || echoed.has(coupon.code)
15387
15429
  }));
15430
+ baseCart.donations.forEach((donation) => displayCart.addDonation(donation));
15388
15431
  apiItems.forEach((apiItem) => {
15389
15432
  const attrs = apiItem.attributes;
15390
15433
  const ref = attrs.uuid;
@@ -15477,8 +15520,8 @@ var setCartDetails = createSetDetails(KEY$3);
15477
15520
  var getCartDetails = createGetDetails(KEY$3);
15478
15521
  //#endregion
15479
15522
  //#region src/components/cart/components/itemTitles/Coupon.svelte
15480
- var root$54 = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"> </span>`);
15481
- function Coupon($$anchor, $$props) {
15523
+ var root$59 = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"> </span>`);
15524
+ function Coupon$1($$anchor, $$props) {
15482
15525
  push($$props, true);
15483
15526
  let cartItem = prop($$props, "cartItem", 7);
15484
15527
  var $$exports = {
@@ -15490,18 +15533,18 @@ function Coupon($$anchor, $$props) {
15490
15533
  flushSync();
15491
15534
  }
15492
15535
  };
15493
- var span = root$54();
15536
+ var span = root$59();
15494
15537
  var text = child(span, true);
15495
15538
  reset(span);
15496
15539
  template_effect(() => set_text(text, cartItem().product.title));
15497
15540
  append($$anchor, span);
15498
15541
  return pop($$exports);
15499
15542
  }
15500
- create_custom_element(Coupon, { cartItem: {} }, [], [], { mode: "open" });
15543
+ create_custom_element(Coupon$1, { cartItem: {} }, [], [], { mode: "open" });
15501
15544
  //#endregion
15502
15545
  //#region src/components/cart/components/itemTitles/Event.svelte
15503
- var root$53 = /* @__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);
15504
- var root_1$20 = /* @__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);
15546
+ var root$58 = /* @__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);
15547
+ var root_1$22 = /* @__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);
15505
15548
  function Event$2($$anchor, $$props) {
15506
15549
  push($$props, true);
15507
15550
  let cartItem = prop($$props, "cartItem", 7);
@@ -15516,7 +15559,7 @@ function Event$2($$anchor, $$props) {
15516
15559
  flushSync();
15517
15560
  }
15518
15561
  };
15519
- var fragment = root_1$20();
15562
+ var fragment = root_1$22();
15520
15563
  var span = first_child(fragment);
15521
15564
  var span_1 = child(span);
15522
15565
  var text = child(span_1, true);
@@ -15527,7 +15570,7 @@ function Event$2($$anchor, $$props) {
15527
15570
  reset(span);
15528
15571
  var node = sibling(span);
15529
15572
  var consequent = ($$anchor) => {
15530
- var fragment_1 = root$53();
15573
+ var fragment_1 = root$58();
15531
15574
  var span_3 = first_child(fragment_1);
15532
15575
  var text_2 = child(span_3, true);
15533
15576
  reset(span_3);
@@ -15553,9 +15596,9 @@ function Event$2($$anchor, $$props) {
15553
15596
  create_custom_element(Event$2, { cartItem: {} }, [], [], { mode: "open" });
15554
15597
  //#endregion
15555
15598
  //#region src/components/cart/components/itemTitles/Ticket.svelte
15556
- var root$52 = /* @__PURE__ */ from_html(`<span class="go-cart-item-subtitle" data-testid="cart-item-subtitle"> </span>`);
15557
- var root_1$19 = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
15558
- var root_2$14 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>`, 1);
15599
+ var root$57 = /* @__PURE__ */ from_html(`<span class="go-cart-item-subtitle" data-testid="cart-item-subtitle"> </span>`);
15600
+ var root_1$21 = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
15601
+ var root_2$15 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>`, 1);
15559
15602
  var root_3$10 = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!> <!>`, 1);
15560
15603
  function Ticket($$anchor, $$props) {
15561
15604
  push($$props, true);
@@ -15575,7 +15618,7 @@ function Ticket($$anchor, $$props) {
15575
15618
  reset(span);
15576
15619
  var node = sibling(span, 2);
15577
15620
  var consequent = ($$anchor) => {
15578
- var span_1 = root$52();
15621
+ var span_1 = root$57();
15579
15622
  var text_1 = child(span_1, true);
15580
15623
  reset(span_1);
15581
15624
  template_effect(() => set_text(text_1, cartItem().product.sub_title));
@@ -15587,13 +15630,13 @@ function Ticket($$anchor, $$props) {
15587
15630
  });
15588
15631
  var node_1 = sibling(node, 2);
15589
15632
  var consequent_2 = ($$anchor) => {
15590
- var fragment_1 = root_2$14();
15633
+ var fragment_1 = root_2$15();
15591
15634
  var span_2 = first_child(fragment_1);
15592
15635
  var text_2 = child(span_2, true);
15593
15636
  reset(span_2);
15594
15637
  var node_2 = sibling(span_2, 2);
15595
15638
  var consequent_1 = ($$anchor) => {
15596
- var span_3 = root_1$19();
15639
+ var span_3 = root_1$21();
15597
15640
  var text_3 = child(span_3, true);
15598
15641
  reset(span_3);
15599
15642
  template_effect(($0) => set_text(text_3, $0), [() => shop.formatTime(cartItem().time)]);
@@ -15615,9 +15658,9 @@ function Ticket($$anchor, $$props) {
15615
15658
  create_custom_element(Ticket, { cartItem: {} }, [], [], { mode: "open" });
15616
15659
  //#endregion
15617
15660
  //#region src/components/cart/components/itemTitles/Tour.svelte
15618
- var root$51 = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
15619
- var root_1$18 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>`, 1);
15620
- var root_2$13 = /* @__PURE__ */ from_html(`<span class="go-cart-item-custom" data-testid="cart-item-custom"> </span>`);
15661
+ var root$56 = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
15662
+ var root_1$20 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>`, 1);
15663
+ var root_2$14 = /* @__PURE__ */ from_html(`<span class="go-cart-item-custom" data-testid="cart-item-custom"> </span>`);
15621
15664
  var root_3$9 = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <span class="go-cart-item-participants" data-testid="cart-item-participants"> </span> <!> <!>`, 1);
15622
15665
  function Tour$1($$anchor, $$props) {
15623
15666
  push($$props, true);
@@ -15657,13 +15700,13 @@ function Tour$1($$anchor, $$props) {
15657
15700
  reset(span_1);
15658
15701
  var node = sibling(span_1, 2);
15659
15702
  var consequent_1 = ($$anchor) => {
15660
- var fragment_1 = root_1$18();
15703
+ var fragment_1 = root_1$20();
15661
15704
  var span_2 = first_child(fragment_1);
15662
15705
  var text_2 = child(span_2, true);
15663
15706
  reset(span_2);
15664
15707
  var node_1 = sibling(span_2, 2);
15665
15708
  var consequent = ($$anchor) => {
15666
- var span_3 = root$51();
15709
+ var span_3 = root$56();
15667
15710
  var text_3 = child(span_3, true);
15668
15711
  reset(span_3);
15669
15712
  template_effect(() => set_text(text_3, get$2(slot).time));
@@ -15682,7 +15725,7 @@ function Tour$1($$anchor, $$props) {
15682
15725
  var $$array = /* @__PURE__ */ user_derived(() => to_array(get$2($$item), 2));
15683
15726
  let key = () => get$2($$array)[0];
15684
15727
  let value = () => get$2($$array)[1];
15685
- var span_4 = root_2$13();
15728
+ var span_4 = root_2$14();
15686
15729
  var text_4 = child(span_4);
15687
15730
  reset(span_4);
15688
15731
  template_effect(($0) => set_text(text_4, `${key() ?? ""}: ${$0 ?? ""}`), [() => displayCustom(value())]);
@@ -15730,7 +15773,7 @@ function canDecrement(value, { floor = 0 }) {
15730
15773
  }
15731
15774
  //#endregion
15732
15775
  //#region src/components/shared/quantityStepper/QuantityStepper.svelte
15733
- var root$50 = /* @__PURE__ */ from_html(`<div class="go-quantity-stepper" role="group"><button type="button" tabindex="-1"><span aria-hidden="true"> </span></button> <input class="go-quantity-stepper-value" type="text" role="spinbutton" inputmode="numeric" autocomplete="off"/> <button type="button" class="go-quantity-stepper-button go-quantity-stepper-increment" tabindex="-1"><span aria-hidden="true">+</span></button></div>`);
15776
+ var root$55 = /* @__PURE__ */ from_html(`<div class="go-quantity-stepper" role="group"><button type="button" tabindex="-1"><span aria-hidden="true"> </span></button> <input class="go-quantity-stepper-value" type="text" role="spinbutton" inputmode="numeric" autocomplete="off"/> <button type="button" class="go-quantity-stepper-button go-quantity-stepper-increment" tabindex="-1"><span aria-hidden="true">+</span></button></div>`);
15734
15777
  function QuantityStepper($$anchor, $$props) {
15735
15778
  const inputId = props_id();
15736
15779
  push($$props, true);
@@ -15884,7 +15927,7 @@ function QuantityStepper($$anchor, $$props) {
15884
15927
  flushSync();
15885
15928
  }
15886
15929
  };
15887
- var div = root$50();
15930
+ var div = root$55();
15888
15931
  var button = child(div);
15889
15932
  let classes;
15890
15933
  var span = child(button);
@@ -15964,8 +16007,8 @@ function option(value) {
15964
16007
  }
15965
16008
  //#endregion
15966
16009
  //#region src/components/shared/quantityStepper/QuantityControl.svelte
15967
- var root$49 = /* @__PURE__ */ from_html(`<option> </option>`);
15968
- var root_1$17 = /* @__PURE__ */ from_html(`<select class="go-quantity-select"></select>`);
16010
+ var root$54 = /* @__PURE__ */ from_html(`<option> </option>`);
16011
+ var root_1$19 = /* @__PURE__ */ from_html(`<select class="go-quantity-select"></select>`);
15969
16012
  function QuantityControl($$anchor, $$props) {
15970
16013
  push($$props, true);
15971
16014
  /** Current committed quantity. */
@@ -16092,9 +16135,9 @@ function QuantityControl($$anchor, $$props) {
16092
16135
  }
16093
16136
  };
16094
16137
  var alternate = ($$anchor) => {
16095
- var select = root_1$17();
16138
+ var select = root_1$19();
16096
16139
  each(select, 21, () => generateQuantityOptions(min(), max(), { floor: deselectable() ? floor() : min() }), (q) => q.value, ($$anchor, q) => {
16097
- var option = root$49();
16140
+ var option = root$54();
16098
16141
  var text = child(option, true);
16099
16142
  reset(option);
16100
16143
  var option_value = {};
@@ -17979,9 +18022,9 @@ function createDOMPurify() {
17979
18022
  var purify = createDOMPurify();
17980
18023
  //#endregion
17981
18024
  //#region src/components/cart/components/SubRow.svelte
17982
- var root$48 = /* @__PURE__ */ from_html(`<span class="go-sub-ticket-description"></span>`);
17983
- var root_1$16 = /* @__PURE__ */ from_html(`<span class="go-sub-ticket-quantity"> </span>`);
17984
- var root_2$12 = /* @__PURE__ */ from_html(`<li><span class="go-sub-ticket-title"> </span> <!> <!></li>`);
18025
+ var root$53 = /* @__PURE__ */ from_html(`<span class="go-sub-ticket-description"></span>`);
18026
+ var root_1$18 = /* @__PURE__ */ from_html(`<span class="go-sub-ticket-quantity"> </span>`);
18027
+ var root_2$13 = /* @__PURE__ */ from_html(`<li><span class="go-sub-ticket-title"> </span> <!> <!></li>`);
17985
18028
  function SubRow($$anchor, $$props) {
17986
18029
  push($$props, true);
17987
18030
  /** Capacity-aware ceiling from CapacityManager.subTicketMaxes; the combination max when absent. */
@@ -18024,13 +18067,13 @@ function SubRow($$anchor, $$props) {
18024
18067
  flushSync();
18025
18068
  }
18026
18069
  };
18027
- var li = root_2$12();
18070
+ var li = root_2$13();
18028
18071
  var span = child(li);
18029
18072
  var text = child(span, true);
18030
18073
  reset(span);
18031
18074
  var node = sibling(span, 2);
18032
18075
  var consequent = ($$anchor) => {
18033
- var span_1 = root$48();
18076
+ var span_1 = root$53();
18034
18077
  html$2(span_1, () => purify.sanitize(sub().description), true);
18035
18078
  reset(span_1);
18036
18079
  append($$anchor, span_1);
@@ -18040,7 +18083,7 @@ function SubRow($$anchor, $$props) {
18040
18083
  });
18041
18084
  var node_1 = sibling(node, 2);
18042
18085
  var consequent_1 = ($$anchor) => {
18043
- var span_2 = root_1$16();
18086
+ var span_2 = root_1$18();
18044
18087
  var text_1 = child(span_2, true);
18045
18088
  reset(span_2);
18046
18089
  template_effect(() => {
@@ -18117,9 +18160,9 @@ function quantityLabel(item, locale) {
18117
18160
  }
18118
18161
  //#endregion
18119
18162
  //#region src/components/cart/components/Item.svelte
18120
- var root$47 = /* @__PURE__ */ from_html(`<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>`, 1);
18121
- var root_1$15 = /* @__PURE__ */ from_html(`<span class="go-cart-item-price-discounted"> </span>`);
18122
- var root_2$11 = /* @__PURE__ */ from_html(`<span data-testid="cart-item-participant-count"> </span>`);
18163
+ var root$52 = /* @__PURE__ */ from_html(`<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>`, 1);
18164
+ var root_1$17 = /* @__PURE__ */ from_html(`<span class="go-cart-item-price-discounted"> </span>`);
18165
+ var root_2$12 = /* @__PURE__ */ from_html(`<span data-testid="cart-item-participant-count"> </span>`);
18123
18166
  var root_3$8 = /* @__PURE__ */ from_html(`<span data-testid="cart-item-voucher-quantity"> </span>`);
18124
18167
  var root_4$4 = /* @__PURE__ */ from_html(`<span> </span>`);
18125
18168
  var root_5$3 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove"><button class="go-cart-remove"> </button></li>`);
@@ -18206,7 +18249,7 @@ function Item$1($$anchor, $$props) {
18206
18249
  } });
18207
18250
  };
18208
18251
  var consequent_2 = ($$anchor) => {
18209
- Coupon($$anchor, { get cartItem() {
18252
+ Coupon$1($$anchor, { get cartItem() {
18210
18253
  return displayItem();
18211
18254
  } });
18212
18255
  };
@@ -18225,7 +18268,7 @@ function Item$1($$anchor, $$props) {
18225
18268
  var li_1 = sibling(li, 2);
18226
18269
  var node_2 = child(li_1);
18227
18270
  var consequent_4 = ($$anchor) => {
18228
- var fragment_6 = root$47();
18271
+ var fragment_6 = root$52();
18229
18272
  var s = first_child(fragment_6);
18230
18273
  var text = child(s, true);
18231
18274
  reset(s);
@@ -18239,7 +18282,7 @@ function Item$1($$anchor, $$props) {
18239
18282
  append($$anchor, fragment_6);
18240
18283
  };
18241
18284
  var alternate = ($$anchor) => {
18242
- var span_1 = root_1$15();
18285
+ var span_1 = root_1$17();
18243
18286
  var text_2 = child(span_1, true);
18244
18287
  reset(span_1);
18245
18288
  template_effect(($0) => set_text(text_2, $0), [() => formatCurrency(displayItem().final_price_cents)]);
@@ -18253,7 +18296,7 @@ function Item$1($$anchor, $$props) {
18253
18296
  var li_2 = sibling(li_1, 2);
18254
18297
  var node_3 = child(li_2);
18255
18298
  var consequent_5 = ($$anchor) => {
18256
- var span_2 = root_2$11();
18299
+ var span_2 = root_2$12();
18257
18300
  var text_3 = child(span_2, true);
18258
18301
  reset(span_2);
18259
18302
  template_effect(() => set_text(text_3, displayItem().product.participants));
@@ -18371,10 +18414,78 @@ create_custom_element(Item$1, {
18371
18414
  preview: {}
18372
18415
  }, [], [], { mode: "open" });
18373
18416
  //#endregion
18417
+ //#region src/components/cart/components/DonationRow.svelte
18418
+ var root$51 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove"><button class="go-cart-remove"> </button></li>`);
18419
+ var root_1$16 = /* @__PURE__ */ from_html(`<article class="go-cart-donation" data-testid="cart-donation"><ul><li class="go-cart-item-title-container"><span class="go-cart-donation-title"> </span></li> <li class="go-cart-item-price"></li> <li class="go-cart-item-count"></li> <!> <li class="go-cart-item-sum"> </li></ul></article>`);
18420
+ function DonationRow($$anchor, $$props) {
18421
+ push($$props, true);
18422
+ let donation = prop($$props, "donation", 7), preview = prop($$props, "preview", 7);
18423
+ const campaign = /* @__PURE__ */ user_derived(() => shop.donations?.campaigns?.find((c) => c.id === donation().campaign_id));
18424
+ function remove() {
18425
+ shop.cart?.removeDonation(donation().campaign_id, donation().value);
18426
+ }
18427
+ var $$exports = {
18428
+ get donation() {
18429
+ return donation();
18430
+ },
18431
+ set donation($$value) {
18432
+ donation($$value);
18433
+ flushSync();
18434
+ },
18435
+ get preview() {
18436
+ return preview();
18437
+ },
18438
+ set preview($$value) {
18439
+ preview($$value);
18440
+ flushSync();
18441
+ }
18442
+ };
18443
+ var article = root_1$16();
18444
+ var ul = child(article);
18445
+ var li = child(ul);
18446
+ var span = child(li);
18447
+ var text = child(span, true);
18448
+ reset(span);
18449
+ reset(li);
18450
+ var node = sibling(li, 6);
18451
+ var consequent = ($$anchor) => {
18452
+ var li_1 = root$51();
18453
+ var button = child(li_1);
18454
+ var text_1 = child(button, true);
18455
+ reset(button);
18456
+ reset(li_1);
18457
+ template_effect(($0, $1) => {
18458
+ set_attribute(button, "aria-label", $0);
18459
+ set_text(text_1, $1);
18460
+ }, [() => shop.t("cart.item.aria.removeItem"), () => shop.t("cart.item.remove")]);
18461
+ delegated("click", button, remove);
18462
+ append($$anchor, li_1);
18463
+ };
18464
+ if_block(node, ($$render) => {
18465
+ if (!preview()) $$render(consequent);
18466
+ });
18467
+ var li_2 = sibling(node, 2);
18468
+ var text_2 = child(li_2, true);
18469
+ reset(li_2);
18470
+ reset(ul);
18471
+ reset(article);
18472
+ template_effect(($0, $1) => {
18473
+ set_text(text, $0);
18474
+ set_text(text_2, $1);
18475
+ }, [() => get$2(campaign)?.name ?? shop.t("cart.donation.title"), () => formatCurrency(donation().value)]);
18476
+ append($$anchor, article);
18477
+ return pop($$exports);
18478
+ }
18479
+ delegate(["click"]);
18480
+ create_custom_element(DonationRow, {
18481
+ donation: {},
18482
+ preview: {}
18483
+ }, [], [], { mode: "open" });
18484
+ //#endregion
18374
18485
  //#region src/components/cart/components/CartItems.svelte
18375
- var root$46 = /* @__PURE__ */ from_html(`<li class="go-cart-header-remove"></li>`);
18376
- var root_1$14 = /* @__PURE__ */ from_html(`<li class="go-cart-item"><!></li>`);
18377
- var root_2$10 = /* @__PURE__ */ from_html(`<ol data-testid="cart-items"><li class="go-cart-header"><ul><li class="go-cart-header-title"> </li> <li class="go-cart-header-price"> </li> <li class="go-cart-header-count"> </li> <!> <li class="go-cart-header-sum"> </li></ul></li> <!></ol>`);
18486
+ var root$50 = /* @__PURE__ */ from_html(`<li class="go-cart-header-remove"></li>`);
18487
+ var root_1$15 = /* @__PURE__ */ from_html(`<li class="go-cart-item"><!></li>`);
18488
+ var root_2$11 = /* @__PURE__ */ from_html(`<ol data-testid="cart-items"><li class="go-cart-header"><ul><li class="go-cart-header-title"> </li> <li class="go-cart-header-price"> </li> <li class="go-cart-header-count"> </li> <!> <li class="go-cart-header-sum"> </li></ul></li> <!> <!></ol>`);
18378
18489
  function CartItems($$anchor, $$props) {
18379
18490
  push($$props, true);
18380
18491
  const _details = getCartDetails($$props.$$host);
@@ -18382,7 +18493,7 @@ function CartItems($$anchor, $$props) {
18382
18493
  var fragment = comment();
18383
18494
  var node = first_child(fragment);
18384
18495
  var consequent_1 = ($$anchor) => {
18385
- var ol = root_2$10();
18496
+ var ol = root_2$11();
18386
18497
  var li = child(ol);
18387
18498
  var ul = child(li);
18388
18499
  var li_1 = child(ul);
@@ -18396,7 +18507,7 @@ function CartItems($$anchor, $$props) {
18396
18507
  reset(li_3);
18397
18508
  var node_1 = sibling(li_3, 2);
18398
18509
  var consequent = ($$anchor) => {
18399
- append($$anchor, root$46());
18510
+ append($$anchor, root$50());
18400
18511
  };
18401
18512
  if_block(node_1, ($$render) => {
18402
18513
  if (!get$2(details).preview) $$render(consequent);
@@ -18406,8 +18517,9 @@ function CartItems($$anchor, $$props) {
18406
18517
  reset(li_5);
18407
18518
  reset(ul);
18408
18519
  reset(li);
18409
- each(sibling(li, 2), 17, () => get$2(details).displayCart.items, (item) => item.uuid, ($$anchor, item) => {
18410
- var li_6 = root_1$14();
18520
+ var node_2 = sibling(li, 2);
18521
+ each(node_2, 17, () => get$2(details).displayCart.items, (item) => item.uuid, ($$anchor, item) => {
18522
+ var li_6 = root_1$15();
18411
18523
  Item$1(child(li_6), {
18412
18524
  get displayItem() {
18413
18525
  return get$2(item);
@@ -18422,6 +18534,19 @@ function CartItems($$anchor, $$props) {
18422
18534
  reset(li_6);
18423
18535
  append($$anchor, li_6);
18424
18536
  });
18537
+ each(sibling(node_2, 2), 17, () => get$2(details).displayCart.donations, (donation) => donation.campaign_id + "-" + donation.value, ($$anchor, donation) => {
18538
+ var li_7 = root_1$15();
18539
+ DonationRow(child(li_7), {
18540
+ get donation() {
18541
+ return get$2(donation);
18542
+ },
18543
+ get preview() {
18544
+ return get$2(details).preview;
18545
+ }
18546
+ });
18547
+ reset(li_7);
18548
+ append($$anchor, li_7);
18549
+ });
18425
18550
  reset(ol);
18426
18551
  template_effect(($0, $1, $2, $3) => {
18427
18552
  set_text(text, $0);
@@ -18437,7 +18562,7 @@ function CartItems($$anchor, $$props) {
18437
18562
  append($$anchor, ol);
18438
18563
  };
18439
18564
  if_block(node, ($$render) => {
18440
- if (get$2(details) && get$2(details).displayCart && get$2(details).displayCart.items.length) $$render(consequent_1);
18565
+ if (get$2(details) && get$2(details).displayCart && (get$2(details).displayCart.items.length || get$2(details).displayCart.donations.length)) $$render(consequent_1);
18441
18566
  });
18442
18567
  append($$anchor, fragment);
18443
18568
  pop();
@@ -18445,9 +18570,9 @@ function CartItems($$anchor, $$props) {
18445
18570
  customElements.define("go-cart-items", create_custom_element(CartItems, {}, [], []));
18446
18571
  //#endregion
18447
18572
  //#region src/components/cart/components/CartCoupons.svelte
18448
- var root$45 = /* @__PURE__ */ from_html(`<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>`);
18449
- var root_1$13 = /* @__PURE__ */ from_html(`<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>`);
18450
- var root_2$9 = /* @__PURE__ */ from_html(`<ol data-testid="cart-coupons"></ol>`);
18573
+ var root$49 = /* @__PURE__ */ from_html(`<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>`);
18574
+ var root_1$14 = /* @__PURE__ */ from_html(`<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>`);
18575
+ var root_2$10 = /* @__PURE__ */ from_html(`<ol data-testid="cart-coupons"></ol>`);
18451
18576
  function CartCoupons($$anchor, $$props) {
18452
18577
  push($$props, true);
18453
18578
  const _details = getCartDetails($$props.$$host);
@@ -18455,9 +18580,9 @@ function CartCoupons($$anchor, $$props) {
18455
18580
  var fragment = comment();
18456
18581
  var node = first_child(fragment);
18457
18582
  var consequent_1 = ($$anchor) => {
18458
- var ol = root_2$9();
18583
+ var ol = root_2$10();
18459
18584
  each(ol, 21, () => get$2(details).displayCart.coupons, (coupon) => coupon.code, ($$anchor, coupon) => {
18460
- var li = root_1$13();
18585
+ var li = root_1$14();
18461
18586
  let classes;
18462
18587
  var article = child(li);
18463
18588
  var ul = child(article);
@@ -18466,7 +18591,7 @@ function CartCoupons($$anchor, $$props) {
18466
18591
  reset(li_1);
18467
18592
  var node_1 = sibling(li_1, 2);
18468
18593
  var consequent = ($$anchor) => {
18469
- var li_2 = root$45();
18594
+ var li_2 = root$49();
18470
18595
  var button = child(li_2);
18471
18596
  reset(li_2);
18472
18597
  template_effect(($0) => set_attribute(button, "aria-label", $0), [() => shop.t("cart.coupons.remove")]);
@@ -18498,7 +18623,7 @@ delegate(["click"]);
18498
18623
  customElements.define("go-cart-coupons", create_custom_element(CartCoupons, {}, [], []));
18499
18624
  //#endregion
18500
18625
  //#region src/components/cart/components/CartTotalAmount.svelte
18501
- var root$44 = /* @__PURE__ */ from_html(`<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>`);
18626
+ var root$48 = /* @__PURE__ */ from_html(`<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>`);
18502
18627
  function CartTotalAmount($$anchor, $$props) {
18503
18628
  push($$props, true);
18504
18629
  const _details = getCartDetails($$props.$$host);
@@ -18506,7 +18631,7 @@ function CartTotalAmount($$anchor, $$props) {
18506
18631
  var fragment = comment();
18507
18632
  var node = first_child(fragment);
18508
18633
  var consequent = ($$anchor) => {
18509
- var span = root$44();
18634
+ var span = root$48();
18510
18635
  var text = child(span, true);
18511
18636
  reset(span);
18512
18637
  template_effect(($0) => set_text(text, $0), [() => formatCurrency(get$2(details).totalPriceCents)]);
@@ -18534,6 +18659,7 @@ function Cart($$anchor, $$props) {
18534
18659
  shop.cart.items.map((i) => i.uuid + ":" + i.quantity + ":" + i.time);
18535
18660
  shop.cart.coupons.map((c) => c.code).join("|");
18536
18661
  shop.cart.items.forEach((i) => i.mantle && Object.values(i.mantle.composition));
18662
+ shop.cart.donations.map((d) => d.campaign_id + ":" + d.value).join("|");
18537
18663
  untrack(() => details.calculateDisplayCart());
18538
18664
  });
18539
18665
  async function flushCoupons() {
@@ -18575,7 +18701,7 @@ customElements.define("go-cart", create_custom_element(Cart, { preview: {
18575
18701
  } }, [], []));
18576
18702
  //#endregion
18577
18703
  //#region src/components/cart/components/CartSubtotalAmount.svelte
18578
- var root$43 = /* @__PURE__ */ from_html(`<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>`);
18704
+ var root$47 = /* @__PURE__ */ from_html(`<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>`);
18579
18705
  function CartSubtotalAmount($$anchor, $$props) {
18580
18706
  push($$props, true);
18581
18707
  const _details = getCartDetails($$props.$$host);
@@ -18583,7 +18709,7 @@ function CartSubtotalAmount($$anchor, $$props) {
18583
18709
  var fragment = comment();
18584
18710
  var node = first_child(fragment);
18585
18711
  var consequent = ($$anchor) => {
18586
- var span = root$43();
18712
+ var span = root$47();
18587
18713
  var text = child(span, true);
18588
18714
  reset(span);
18589
18715
  template_effect(($0) => set_text(text, $0), [() => formatCurrency(get$2(details).subtotalPriceCents)]);
@@ -18598,7 +18724,7 @@ function CartSubtotalAmount($$anchor, $$props) {
18598
18724
  customElements.define("go-cart-subtotal-amount", create_custom_element(CartSubtotalAmount, {}, [], []));
18599
18725
  //#endregion
18600
18726
  //#region src/components/cart/components/CartDiscountedAmount.svelte
18601
- var root$42 = /* @__PURE__ */ from_html(`<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>`);
18727
+ var root$46 = /* @__PURE__ */ from_html(`<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>`);
18602
18728
  function CartDiscountedAmount($$anchor, $$props) {
18603
18729
  push($$props, true);
18604
18730
  const _details = getCartDetails($$props.$$host);
@@ -18606,7 +18732,7 @@ function CartDiscountedAmount($$anchor, $$props) {
18606
18732
  var fragment = comment();
18607
18733
  var node = first_child(fragment);
18608
18734
  var consequent = ($$anchor) => {
18609
- var span = root$42();
18735
+ var span = root$46();
18610
18736
  var text = sibling(child(span), 1, true);
18611
18737
  reset(span);
18612
18738
  template_effect(($0) => set_text(text, $0), [() => formatCurrency(get$2(details).discountedAmountCents)]);
@@ -18850,7 +18976,7 @@ function fail(errors) {
18850
18976
  }
18851
18977
  //#endregion
18852
18978
  //#region src/components/couponRedemption/CouponRedemption.svelte
18853
- var root$41 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
18979
+ var root$45 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
18854
18980
  function CouponRedemption($$anchor, $$props) {
18855
18981
  push($$props, true);
18856
18982
  Forms.defineForm({
@@ -18887,7 +19013,7 @@ function CouponRedemption($$anchor, $$props) {
18887
19013
  return runRedeem(form);
18888
19014
  }
18889
19015
  var $$exports = { flush };
18890
- var go_form = root$41();
19016
+ var go_form = root$45();
18891
19017
  set_custom_element_data(go_form, "formId", "couponRedemption");
18892
19018
  event("submit", go_form, redeem$1);
18893
19019
  append($$anchor, go_form);
@@ -18895,6 +19021,116 @@ function CouponRedemption($$anchor, $$props) {
18895
19021
  }
18896
19022
  customElements.define("go-coupon-redemption", create_custom_element(CouponRedemption, {}, [], ["flush"]));
18897
19023
  //#endregion
19024
+ //#region src/components/donations/components/DonationCheckbox.svelte
19025
+ var root$44 = /* @__PURE__ */ from_html(`<span class="go-donation-checkbox-label"></span>`);
19026
+ var root_1$13 = /* @__PURE__ */ from_html(`<span class="go-donation-checkbox-label"> </span>`);
19027
+ var root_2$9 = /* @__PURE__ */ from_html(`<label class="go-donation-checkbox"><input type="checkbox" data-testid="donation-checkbox"/> <!></label>`);
19028
+ function DonationCheckbox($$anchor, $$props) {
19029
+ push($$props, true);
19030
+ let campaignId = prop($$props, "campaignId", 7), amountCents = prop($$props, "amountCents", 7), describedby = prop($$props, "describedby", 7);
19031
+ const adopted = document.createDocumentFragment();
19032
+ for (const node of Array.from($$props.$$host.childNodes)) if (!(node.nodeType === Node.TEXT_NODE && node.textContent === "") && node.nodeType !== Node.COMMENT_NODE) adopted.appendChild(node);
19033
+ const hasCustomLabel = Array.from(adopted.childNodes).some((n) => n.nodeType === Node.ELEMENT_NODE || !!n.textContent?.trim());
19034
+ let customLabelSpan = /* @__PURE__ */ state(void 0);
19035
+ user_effect(() => {
19036
+ if (!hasCustomLabel || !get$2(customLabelSpan)) return;
19037
+ const span = get$2(customLabelSpan);
19038
+ span.appendChild(adopted);
19039
+ return () => {
19040
+ while (span.firstChild) adopted.appendChild(span.firstChild);
19041
+ };
19042
+ });
19043
+ const campaign = /* @__PURE__ */ user_derived(() => shop.donations?.campaigns?.find((c) => c.id === campaignId()));
19044
+ const guest = /* @__PURE__ */ user_derived(() => !shop.currentUser?.isAuthenticated || shop.currentUser?.isGuest);
19045
+ const overGuestLimit = /* @__PURE__ */ user_derived(() => !!get$2(campaign) && get$2(campaign).guest_limit > 0 && (amountCents() ?? 0) > get$2(campaign).guest_limit && get$2(guest));
19046
+ const checked = /* @__PURE__ */ user_derived(() => !!get$2(campaign) && !!amountCents() && !!shop.cart?.hasDonation(get$2(campaign).id, amountCents()));
19047
+ function toggle(event) {
19048
+ if (!get$2(campaign) || !amountCents() || !shop.cart) return;
19049
+ if (event.currentTarget.checked) shop.cart.addDonation({
19050
+ value: amountCents(),
19051
+ campaign_id: get$2(campaign).id
19052
+ });
19053
+ else shop.cart.removeDonation(get$2(campaign).id, amountCents());
19054
+ }
19055
+ var $$exports = {
19056
+ get campaignId() {
19057
+ return campaignId();
19058
+ },
19059
+ set campaignId($$value) {
19060
+ campaignId($$value);
19061
+ flushSync();
19062
+ },
19063
+ get amountCents() {
19064
+ return amountCents();
19065
+ },
19066
+ set amountCents($$value) {
19067
+ amountCents($$value);
19068
+ flushSync();
19069
+ },
19070
+ get describedby() {
19071
+ return describedby();
19072
+ },
19073
+ set describedby($$value) {
19074
+ describedby($$value);
19075
+ flushSync();
19076
+ }
19077
+ };
19078
+ var fragment = comment();
19079
+ var node_1 = first_child(fragment);
19080
+ var consequent_1 = ($$anchor) => {
19081
+ var label = root_2$9();
19082
+ var input = child(label);
19083
+ remove_input_defaults(input);
19084
+ var node_2 = sibling(input, 2);
19085
+ var consequent = ($$anchor) => {
19086
+ var span_1 = root$44();
19087
+ bind_this(span_1, ($$value) => set(customLabelSpan, $$value), () => get$2(customLabelSpan));
19088
+ append($$anchor, span_1);
19089
+ };
19090
+ var alternate = ($$anchor) => {
19091
+ var span_2 = root_1$13();
19092
+ var text = child(span_2, true);
19093
+ reset(span_2);
19094
+ template_effect(($0) => set_text(text, $0), [() => shop.t("donations.checkbox.label", {
19095
+ campaign: get$2(campaign).name,
19096
+ amount: formatCurrency(amountCents())
19097
+ })]);
19098
+ append($$anchor, span_2);
19099
+ };
19100
+ if_block(node_2, ($$render) => {
19101
+ if (hasCustomLabel) $$render(consequent);
19102
+ else $$render(alternate, -1);
19103
+ });
19104
+ reset(label);
19105
+ template_effect(() => {
19106
+ set_checked(input, get$2(checked));
19107
+ set_attribute(input, "aria-describedby", describedby() || void 0);
19108
+ });
19109
+ delegated("change", input, toggle);
19110
+ append($$anchor, label);
19111
+ };
19112
+ if_block(node_1, ($$render) => {
19113
+ if (get$2(campaign) && amountCents() && amountCents() > 0 && !get$2(overGuestLimit)) $$render(consequent_1);
19114
+ });
19115
+ append($$anchor, fragment);
19116
+ return pop($$exports);
19117
+ }
19118
+ delegate(["change"]);
19119
+ customElements.define("go-donation-checkbox", create_custom_element(DonationCheckbox, {
19120
+ campaignId: {
19121
+ attribute: "campaign-id",
19122
+ type: "Number"
19123
+ },
19124
+ amountCents: {
19125
+ attribute: "amount-cents",
19126
+ type: "Number"
19127
+ },
19128
+ describedby: {
19129
+ attribute: "describedby",
19130
+ type: "String"
19131
+ }
19132
+ }, [], []));
19133
+ //#endregion
18898
19134
  //#region ../../node_modules/.pnpm/svelte@5.56.1_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/flags/legacy.js
18899
19135
  enable_legacy_mode_flag();
18900
19136
  //#endregion
@@ -18943,7 +19179,7 @@ var GoDonation = class {
18943
19179
  var goDonation = new GoDonation();
18944
19180
  //#endregion
18945
19181
  //#region src/components/donations/components/DonationCampaign.svelte
18946
- var root$40 = /* @__PURE__ */ from_html(`<img alt="logo"/>`);
19182
+ var root$43 = /* @__PURE__ */ from_html(`<img alt="logo"/>`);
18947
19183
  var root_1$12 = /* @__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>`);
18948
19184
  function DonationCampaign($$anchor, $$props) {
18949
19185
  push($$props, true);
@@ -18963,7 +19199,7 @@ function DonationCampaign($$anchor, $$props) {
18963
19199
  var div_1 = child(div);
18964
19200
  var node = child(div_1);
18965
19201
  var consequent = ($$anchor) => {
18966
- var img = root$40();
19202
+ var img = root$43();
18967
19203
  template_effect(($0) => set_attribute(img, "src", $0), [() => campaign().picture.thumbnail.replace("thumbnail", "article_3x2")]);
18968
19204
  append($$anchor, img);
18969
19205
  };
@@ -18996,7 +19232,7 @@ delegate(["click", "keydown"]);
18996
19232
  create_custom_element(DonationCampaign, { campaign: {} }, [], [], { mode: "open" });
18997
19233
  //#endregion
18998
19234
  //#region src/components/donations/components/DonationSelector.svelte
18999
- var root$39 = /* @__PURE__ */ from_html(`<button> </button>`);
19235
+ var root$42 = /* @__PURE__ */ from_html(`<button> </button>`);
19000
19236
  var root_1$11 = /* @__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>`);
19001
19237
  var root_2$8 = /* @__PURE__ */ from_html(`<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>`);
19002
19238
  function DonationSelector($$anchor, $$props) {
@@ -19021,7 +19257,7 @@ function DonationSelector($$anchor, $$props) {
19021
19257
  reset(h3);
19022
19258
  var div_1 = sibling(h3, 2);
19023
19259
  each(div_1, 20, () => goDonation.campaign?.options, (option) => option, ($$anchor, option) => {
19024
- var button = root$39();
19260
+ var button = root$42();
19025
19261
  let classes;
19026
19262
  var text_1 = child(button, true);
19027
19263
  reset(button);
@@ -19065,7 +19301,7 @@ delegate(["click", "input"]);
19065
19301
  create_custom_element(DonationSelector, {}, [], [], { mode: "open" });
19066
19302
  //#endregion
19067
19303
  //#region src/components/donations/components/Donations.svelte
19068
- var root$38 = /* @__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>`);
19304
+ var root$41 = /* @__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>`);
19069
19305
  function Donations($$anchor, $$props) {
19070
19306
  push($$props, false);
19071
19307
  onMount(() => {
@@ -19075,7 +19311,7 @@ function Donations($$anchor, $$props) {
19075
19311
  var fragment = comment();
19076
19312
  var node = first_child(fragment);
19077
19313
  var consequent_1 = ($$anchor) => {
19078
- var div = root$38();
19314
+ var div = root$41();
19079
19315
  var node_1 = child(div);
19080
19316
  each(node_1, 1, () => shop?.donations?.campaigns, (campaign) => campaign.id, ($$anchor, campaign) => {
19081
19317
  DonationCampaign($$anchor, { get campaign() {
@@ -24914,7 +25150,7 @@ var rest_excludes$25 = new Set([
24914
25150
  "monthFormat",
24915
25151
  "yearFormat"
24916
25152
  ]);
24917
- var root$37 = /* @__PURE__ */ from_html(`<div><!></div>`);
25153
+ var root$40 = /* @__PURE__ */ from_html(`<div><!></div>`);
24918
25154
  function Calendar$1($$anchor, $$props) {
24919
25155
  push($$props, true);
24920
25156
  let child$18 = prop($$props, "child", 7), children = prop($$props, "children", 7), id = prop($$props, "id", 23, useId), ref = prop($$props, "ref", 15, null), value = prop($$props, "value", 15), onValueChange = prop($$props, "onValueChange", 7, noop), placeholder = prop($$props, "placeholder", 15), onPlaceholderChange = prop($$props, "onPlaceholderChange", 7, noop), weekdayFormat = prop($$props, "weekdayFormat", 7, "narrow"), weekStartsOn = prop($$props, "weekStartsOn", 7), pagedNavigation = prop($$props, "pagedNavigation", 7, false), isDateDisabled = prop($$props, "isDateDisabled", 7, () => false), isDateUnavailable = prop($$props, "isDateUnavailable", 7, () => false), fixedWeeks = prop($$props, "fixedWeeks", 7, false), numberOfMonths = prop($$props, "numberOfMonths", 7, 1), locale = prop($$props, "locale", 7), calendarLabel = prop($$props, "calendarLabel", 7, "Event"), disabled = prop($$props, "disabled", 7, false), readonly = prop($$props, "readonly", 7, false), minValue = prop($$props, "minValue", 7, void 0), maxValue = prop($$props, "maxValue", 7, void 0), preventDeselect = prop($$props, "preventDeselect", 7, false), type = prop($$props, "type", 7), disableDaysOutsideMonth = prop($$props, "disableDaysOutsideMonth", 7, true), initialFocus = prop($$props, "initialFocus", 7, false), maxDays = prop($$props, "maxDays", 7), monthFormat = prop($$props, "monthFormat", 7, "long"), yearFormat = prop($$props, "yearFormat", 7, "numeric"), restProps = /* @__PURE__ */ rest_props($$props, rest_excludes$25);
@@ -25186,7 +25422,7 @@ function Calendar$1($$anchor, $$props) {
25186
25422
  append($$anchor, fragment_1);
25187
25423
  };
25188
25424
  var alternate = ($$anchor) => {
25189
- var div = root$37();
25425
+ var div = root$40();
25190
25426
  attribute_effect(div, () => ({ ...get$2(mergedProps) }));
25191
25427
  snippet(child(div), () => children() ?? noop$1, () => rootState.snippetProps);
25192
25428
  reset(div);
@@ -25241,7 +25477,7 @@ var rest_excludes$24 = new Set([
25241
25477
  "ref",
25242
25478
  "id"
25243
25479
  ]);
25244
- var root$36 = /* @__PURE__ */ from_html(`<div><!></div>`);
25480
+ var root$39 = /* @__PURE__ */ from_html(`<div><!></div>`);
25245
25481
  function Calendar_day($$anchor, $$props) {
25246
25482
  const uid = props_id();
25247
25483
  push($$props, true);
@@ -25296,7 +25532,7 @@ function Calendar_day($$anchor, $$props) {
25296
25532
  append($$anchor, fragment_1);
25297
25533
  };
25298
25534
  var alternate_1 = ($$anchor) => {
25299
- var div = root$36();
25535
+ var div = root$39();
25300
25536
  attribute_effect(div, () => ({ ...get$2(mergedProps) }));
25301
25537
  var node_2 = child(div);
25302
25538
  var consequent_1 = ($$anchor) => {
@@ -25341,7 +25577,7 @@ var rest_excludes$23 = new Set([
25341
25577
  "ref",
25342
25578
  "id"
25343
25579
  ]);
25344
- var root$35 = /* @__PURE__ */ from_html(`<table><!></table>`);
25580
+ var root$38 = /* @__PURE__ */ from_html(`<table><!></table>`);
25345
25581
  function Calendar_grid($$anchor, $$props) {
25346
25582
  const uid = props_id();
25347
25583
  push($$props, true);
@@ -25389,7 +25625,7 @@ function Calendar_grid($$anchor, $$props) {
25389
25625
  append($$anchor, fragment_1);
25390
25626
  };
25391
25627
  var alternate = ($$anchor) => {
25392
- var table = root$35();
25628
+ var table = root$38();
25393
25629
  attribute_effect(table, () => ({ ...get$2(mergedProps) }));
25394
25630
  snippet(child(table), () => children() ?? noop$1);
25395
25631
  reset(table);
@@ -25420,7 +25656,7 @@ var rest_excludes$22 = new Set([
25420
25656
  "ref",
25421
25657
  "id"
25422
25658
  ]);
25423
- var root$34 = /* @__PURE__ */ from_html(`<tbody><!></tbody>`);
25659
+ var root$37 = /* @__PURE__ */ from_html(`<tbody><!></tbody>`);
25424
25660
  function Calendar_grid_body($$anchor, $$props) {
25425
25661
  const uid = props_id();
25426
25662
  push($$props, true);
@@ -25468,7 +25704,7 @@ function Calendar_grid_body($$anchor, $$props) {
25468
25704
  append($$anchor, fragment_1);
25469
25705
  };
25470
25706
  var alternate = ($$anchor) => {
25471
- var tbody = root$34();
25707
+ var tbody = root$37();
25472
25708
  attribute_effect(tbody, () => ({ ...get$2(mergedProps) }));
25473
25709
  snippet(child(tbody), () => children() ?? noop$1);
25474
25710
  reset(tbody);
@@ -25501,7 +25737,7 @@ var rest_excludes$21 = new Set([
25501
25737
  "date",
25502
25738
  "month"
25503
25739
  ]);
25504
- var root$33 = /* @__PURE__ */ from_html(`<td><!></td>`);
25740
+ var root$36 = /* @__PURE__ */ from_html(`<td><!></td>`);
25505
25741
  function Calendar_cell($$anchor, $$props) {
25506
25742
  const uid = props_id();
25507
25743
  push($$props, true);
@@ -25572,7 +25808,7 @@ function Calendar_cell($$anchor, $$props) {
25572
25808
  append($$anchor, fragment_1);
25573
25809
  };
25574
25810
  var alternate = ($$anchor) => {
25575
- var td = root$33();
25811
+ var td = root$36();
25576
25812
  attribute_effect(td, () => ({ ...get$2(mergedProps) }));
25577
25813
  snippet(child(td), () => children() ?? noop$1, () => cellState.snippetProps);
25578
25814
  reset(td);
@@ -25605,7 +25841,7 @@ var rest_excludes$20 = new Set([
25605
25841
  "ref",
25606
25842
  "id"
25607
25843
  ]);
25608
- var root$32 = /* @__PURE__ */ from_html(`<thead><!></thead>`);
25844
+ var root$35 = /* @__PURE__ */ from_html(`<thead><!></thead>`);
25609
25845
  function Calendar_grid_head($$anchor, $$props) {
25610
25846
  const uid = props_id();
25611
25847
  push($$props, true);
@@ -25653,7 +25889,7 @@ function Calendar_grid_head($$anchor, $$props) {
25653
25889
  append($$anchor, fragment_1);
25654
25890
  };
25655
25891
  var alternate = ($$anchor) => {
25656
- var thead = root$32();
25892
+ var thead = root$35();
25657
25893
  attribute_effect(thead, () => ({ ...get$2(mergedProps) }));
25658
25894
  snippet(child(thead), () => children() ?? noop$1);
25659
25895
  reset(thead);
@@ -25684,7 +25920,7 @@ var rest_excludes$19 = new Set([
25684
25920
  "ref",
25685
25921
  "id"
25686
25922
  ]);
25687
- var root$31 = /* @__PURE__ */ from_html(`<th><!></th>`);
25923
+ var root$34 = /* @__PURE__ */ from_html(`<th><!></th>`);
25688
25924
  function Calendar_head_cell($$anchor, $$props) {
25689
25925
  const uid = props_id();
25690
25926
  push($$props, true);
@@ -25732,7 +25968,7 @@ function Calendar_head_cell($$anchor, $$props) {
25732
25968
  append($$anchor, fragment_1);
25733
25969
  };
25734
25970
  var alternate = ($$anchor) => {
25735
- var th = root$31();
25971
+ var th = root$34();
25736
25972
  attribute_effect(th, () => ({ ...get$2(mergedProps) }));
25737
25973
  snippet(child(th), () => children() ?? noop$1);
25738
25974
  reset(th);
@@ -25763,7 +25999,7 @@ var rest_excludes$18 = new Set([
25763
25999
  "ref",
25764
26000
  "id"
25765
26001
  ]);
25766
- var root$30 = /* @__PURE__ */ from_html(`<tr><!></tr>`);
26002
+ var root$33 = /* @__PURE__ */ from_html(`<tr><!></tr>`);
25767
26003
  function Calendar_grid_row($$anchor, $$props) {
25768
26004
  const uid = props_id();
25769
26005
  push($$props, true);
@@ -25811,7 +26047,7 @@ function Calendar_grid_row($$anchor, $$props) {
25811
26047
  append($$anchor, fragment_1);
25812
26048
  };
25813
26049
  var alternate = ($$anchor) => {
25814
- var tr = root$30();
26050
+ var tr = root$33();
25815
26051
  attribute_effect(tr, () => ({ ...get$2(mergedProps) }));
25816
26052
  snippet(child(tr), () => children() ?? noop$1);
25817
26053
  reset(tr);
@@ -25842,7 +26078,7 @@ var rest_excludes$17 = new Set([
25842
26078
  "ref",
25843
26079
  "id"
25844
26080
  ]);
25845
- var root$29 = /* @__PURE__ */ from_html(`<header><!></header>`);
26081
+ var root$32 = /* @__PURE__ */ from_html(`<header><!></header>`);
25846
26082
  function Calendar_header($$anchor, $$props) {
25847
26083
  const uid = props_id();
25848
26084
  push($$props, true);
@@ -25890,7 +26126,7 @@ function Calendar_header($$anchor, $$props) {
25890
26126
  append($$anchor, fragment_1);
25891
26127
  };
25892
26128
  var alternate = ($$anchor) => {
25893
- var header = root$29();
26129
+ var header = root$32();
25894
26130
  attribute_effect(header, () => ({ ...get$2(mergedProps) }));
25895
26131
  snippet(child(header), () => children() ?? noop$1);
25896
26132
  reset(header);
@@ -25921,7 +26157,7 @@ var rest_excludes$16 = new Set([
25921
26157
  "ref",
25922
26158
  "id"
25923
26159
  ]);
25924
- var root$28 = /* @__PURE__ */ from_html(`<div><!></div>`);
26160
+ var root$31 = /* @__PURE__ */ from_html(`<div><!></div>`);
25925
26161
  function Calendar_heading($$anchor, $$props) {
25926
26162
  const uid = props_id();
25927
26163
  push($$props, true);
@@ -25972,7 +26208,7 @@ function Calendar_heading($$anchor, $$props) {
25972
26208
  append($$anchor, fragment_1);
25973
26209
  };
25974
26210
  var alternate_1 = ($$anchor) => {
25975
- var div = root$28();
26211
+ var div = root$31();
25976
26212
  attribute_effect(div, () => ({ ...get$2(mergedProps) }));
25977
26213
  var node_2 = child(div);
25978
26214
  var consequent_1 = ($$anchor) => {
@@ -26018,7 +26254,7 @@ var rest_excludes$15 = new Set([
26018
26254
  "ref",
26019
26255
  "tabindex"
26020
26256
  ]);
26021
- var root$27 = /* @__PURE__ */ from_html(`<button><!></button>`);
26257
+ var root$30 = /* @__PURE__ */ from_html(`<button><!></button>`);
26022
26258
  function Calendar_next_button($$anchor, $$props) {
26023
26259
  const uid = props_id();
26024
26260
  push($$props, true);
@@ -26073,7 +26309,7 @@ function Calendar_next_button($$anchor, $$props) {
26073
26309
  append($$anchor, fragment_1);
26074
26310
  };
26075
26311
  var alternate = ($$anchor) => {
26076
- var button = root$27();
26312
+ var button = root$30();
26077
26313
  attribute_effect(button, () => ({ ...get$2(mergedProps) }));
26078
26314
  snippet(child(button), () => children() ?? noop$1);
26079
26315
  reset(button);
@@ -26106,7 +26342,7 @@ var rest_excludes$14 = new Set([
26106
26342
  "ref",
26107
26343
  "tabindex"
26108
26344
  ]);
26109
- var root$26 = /* @__PURE__ */ from_html(`<button><!></button>`);
26345
+ var root$29 = /* @__PURE__ */ from_html(`<button><!></button>`);
26110
26346
  function Calendar_prev_button($$anchor, $$props) {
26111
26347
  const uid = props_id();
26112
26348
  push($$props, true);
@@ -26161,7 +26397,7 @@ function Calendar_prev_button($$anchor, $$props) {
26161
26397
  append($$anchor, fragment_1);
26162
26398
  };
26163
26399
  var alternate = ($$anchor) => {
26164
- var button = root$26();
26400
+ var button = root$29();
26165
26401
  attribute_effect(button, () => ({ ...get$2(mergedProps) }));
26166
26402
  snippet(child(button), () => children() ?? noop$1);
26167
26403
  reset(button);
@@ -26190,7 +26426,7 @@ var rest_excludes$13 = new Set([
26190
26426
  "$$host",
26191
26427
  "value"
26192
26428
  ]);
26193
- var root$25 = /* @__PURE__ */ from_html(`<input/>`);
26429
+ var root$28 = /* @__PURE__ */ from_html(`<input/>`);
26194
26430
  function Hidden_input($$anchor, $$props) {
26195
26431
  push($$props, true);
26196
26432
  let value = prop($$props, "value", 15), restProps = /* @__PURE__ */ rest_props($$props, rest_excludes$13);
@@ -26216,7 +26452,7 @@ function Hidden_input($$anchor, $$props) {
26216
26452
  var fragment = comment();
26217
26453
  var node = first_child(fragment);
26218
26454
  var consequent = ($$anchor) => {
26219
- var input = root$25();
26455
+ var input = root$28();
26220
26456
  attribute_effect(input, () => ({
26221
26457
  ...get$2(mergedProps),
26222
26458
  value: value()
@@ -26224,7 +26460,7 @@ function Hidden_input($$anchor, $$props) {
26224
26460
  append($$anchor, input);
26225
26461
  };
26226
26462
  var alternate = ($$anchor) => {
26227
- var input_1 = root$25();
26463
+ var input_1 = root$28();
26228
26464
  attribute_effect(input_1, () => ({ ...get$2(mergedProps) }), void 0, void 0, void 0, void 0, true);
26229
26465
  bind_value(input_1, value);
26230
26466
  append($$anchor, input_1);
@@ -28537,7 +28773,7 @@ var rest_excludes$11 = new Set([
28537
28773
  "tooltip",
28538
28774
  "contentPointerEvents"
28539
28775
  ]);
28540
- var root$24 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
28776
+ var root$27 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
28541
28777
  function Popper_layer_inner($$anchor, $$props) {
28542
28778
  push($$props, true);
28543
28779
  let popper = prop($$props, "popper", 7), onEscapeKeydown = prop($$props, "onEscapeKeydown", 7), escapeKeydownBehavior = prop($$props, "escapeKeydownBehavior", 7), preventOverflowTextSelection = prop($$props, "preventOverflowTextSelection", 7), id = prop($$props, "id", 7), onPointerDown = prop($$props, "onPointerDown", 7), onPointerUp = prop($$props, "onPointerUp", 7), side = prop($$props, "side", 7), sideOffset = prop($$props, "sideOffset", 7), align = prop($$props, "align", 7), alignOffset = prop($$props, "alignOffset", 7), arrowPadding = prop($$props, "arrowPadding", 7), avoidCollisions = prop($$props, "avoidCollisions", 7), collisionBoundary = prop($$props, "collisionBoundary", 7), collisionPadding = prop($$props, "collisionPadding", 7), sticky = prop($$props, "sticky", 7), hideWhenDetached = prop($$props, "hideWhenDetached", 7), updatePositionStrategy = prop($$props, "updatePositionStrategy", 7), strategy = prop($$props, "strategy", 7), dir = prop($$props, "dir", 7), preventScroll = prop($$props, "preventScroll", 7), wrapperId = prop($$props, "wrapperId", 7), style = prop($$props, "style", 7), onPlaced = prop($$props, "onPlaced", 7), onInteractOutside = prop($$props, "onInteractOutside", 7), onCloseAutoFocus = prop($$props, "onCloseAutoFocus", 7), onOpenAutoFocus = prop($$props, "onOpenAutoFocus", 7), onFocusOutside = prop($$props, "onFocusOutside", 7), interactOutsideBehavior = prop($$props, "interactOutsideBehavior", 7, "close"), loop = prop($$props, "loop", 7), trapFocus = prop($$props, "trapFocus", 7, true), isValidEvent = prop($$props, "isValidEvent", 7, () => false), customAnchor = prop($$props, "customAnchor", 7, null), isStatic = prop($$props, "isStatic", 7, false), enabled = prop($$props, "enabled", 7), ref = prop($$props, "ref", 7), tooltip = prop($$props, "tooltip", 7, false), contentPointerEvents = prop($$props, "contentPointerEvents", 7, "auto"), restProps = /* @__PURE__ */ rest_props($$props, rest_excludes$11);
@@ -28815,7 +29051,7 @@ function Popper_layer_inner($$anchor, $$props) {
28815
29051
  const content = ($$anchor, $$arg0) => {
28816
29052
  let floatingProps = () => $$arg0?.().props;
28817
29053
  let wrapperProps = () => $$arg0?.().wrapperProps;
28818
- var fragment_1 = root$24();
29054
+ var fragment_1 = root$27();
28819
29055
  var node = first_child(fragment_1);
28820
29056
  var consequent = ($$anchor) => {
28821
29057
  Scroll_lock($$anchor, { get preventScroll() {
@@ -31179,7 +31415,7 @@ var rest_excludes$8 = new Set([
31179
31415
  "children",
31180
31416
  "child"
31181
31417
  ]);
31182
- var root$23 = /* @__PURE__ */ from_html(`<div><!></div>`);
31418
+ var root$26 = /* @__PURE__ */ from_html(`<div><!></div>`);
31183
31419
  var root_1$10 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
31184
31420
  function Date_field_input($$anchor, $$props) {
31185
31421
  const uid = props_id();
@@ -31239,7 +31475,7 @@ function Date_field_input($$anchor, $$props) {
31239
31475
  append($$anchor, fragment_1);
31240
31476
  };
31241
31477
  var alternate = ($$anchor) => {
31242
- var div = root$23();
31478
+ var div = root$26();
31243
31479
  attribute_effect(div, () => ({ ...get$2(mergedProps) }));
31244
31480
  snippet(child(div), () => children() ?? noop$1, () => ({ segments: inputState.root.segmentContents }));
31245
31481
  reset(div);
@@ -31272,7 +31508,7 @@ var rest_excludes$7 = new Set([
31272
31508
  "children",
31273
31509
  "child"
31274
31510
  ]);
31275
- var root$22 = /* @__PURE__ */ from_html(`<div><!></div>`);
31511
+ var root$25 = /* @__PURE__ */ from_html(`<div><!></div>`);
31276
31512
  function Date_field_label($$anchor, $$props) {
31277
31513
  const uid = props_id();
31278
31514
  push($$props, true);
@@ -31320,7 +31556,7 @@ function Date_field_label($$anchor, $$props) {
31320
31556
  append($$anchor, fragment_1);
31321
31557
  };
31322
31558
  var alternate = ($$anchor) => {
31323
- var div = root$22();
31559
+ var div = root$25();
31324
31560
  attribute_effect(div, () => ({ ...get$2(mergedProps) }));
31325
31561
  snippet(child(div), () => children() ?? noop$1);
31326
31562
  reset(div);
@@ -31352,7 +31588,7 @@ var rest_excludes$6 = new Set([
31352
31588
  "child",
31353
31589
  "part"
31354
31590
  ]);
31355
- var root$21 = /* @__PURE__ */ from_html(`<span><!></span>`);
31591
+ var root$24 = /* @__PURE__ */ from_html(`<span><!></span>`);
31356
31592
  function Date_field_segment($$anchor, $$props) {
31357
31593
  const uid = props_id();
31358
31594
  push($$props, true);
@@ -31407,7 +31643,7 @@ function Date_field_segment($$anchor, $$props) {
31407
31643
  append($$anchor, fragment_1);
31408
31644
  };
31409
31645
  var alternate = ($$anchor) => {
31410
- var span = root$21();
31646
+ var span = root$24();
31411
31647
  attribute_effect(span, () => ({ ...get$2(mergedProps) }));
31412
31648
  snippet(child(span), () => children() ?? noop$1);
31413
31649
  reset(span);
@@ -32429,7 +32665,7 @@ var rest_excludes$5 = new Set([
32429
32665
  "id",
32430
32666
  "ref"
32431
32667
  ]);
32432
- var root$20 = /* @__PURE__ */ from_html(`<div><!></div>`);
32668
+ var root$23 = /* @__PURE__ */ from_html(`<div><!></div>`);
32433
32669
  function Date_picker_calendar($$anchor, $$props) {
32434
32670
  const uid = props_id();
32435
32671
  push($$props, true);
@@ -32509,7 +32745,7 @@ function Date_picker_calendar($$anchor, $$props) {
32509
32745
  append($$anchor, fragment_1);
32510
32746
  };
32511
32747
  var alternate = ($$anchor) => {
32512
- var div = root$20();
32748
+ var div = root$23();
32513
32749
  attribute_effect(div, () => ({ ...get$2(mergedProps) }));
32514
32750
  snippet(child(div), () => children() ?? noop$1, () => calendarState.snippetProps);
32515
32751
  reset(div);
@@ -32549,7 +32785,7 @@ var rest_excludes$4 = new Set([
32549
32785
  "customAnchor",
32550
32786
  "style"
32551
32787
  ]);
32552
- var root$19 = /* @__PURE__ */ from_html(`<div><div><!></div></div>`);
32788
+ var root$22 = /* @__PURE__ */ from_html(`<div><div><!></div></div>`);
32553
32789
  function Popover_content($$anchor, $$props) {
32554
32790
  const uid = props_id();
32555
32791
  push($$props, true);
@@ -32684,7 +32920,7 @@ function Popover_content($$anchor, $$props) {
32684
32920
  append($$anchor, fragment_3);
32685
32921
  };
32686
32922
  var alternate = ($$anchor) => {
32687
- var div = root$19();
32923
+ var div = root$22();
32688
32924
  attribute_effect(div, () => ({ ...wrapperProps() }));
32689
32925
  var div_1 = child(div);
32690
32926
  attribute_effect(div_1, () => ({ ...get$2(finalProps) }));
@@ -32754,7 +32990,7 @@ function Popover_content($$anchor, $$props) {
32754
32990
  append($$anchor, fragment_6);
32755
32991
  };
32756
32992
  var alternate_1 = ($$anchor) => {
32757
- var div_2 = root$19();
32993
+ var div_2 = root$22();
32758
32994
  attribute_effect(div_2, () => ({ ...wrapperProps() }));
32759
32995
  var div_3 = child(div_2);
32760
32996
  attribute_effect(div_3, () => ({ ...get$2(finalProps) }));
@@ -32885,7 +33121,7 @@ var rest_excludes$2 = new Set([
32885
33121
  "openDelay",
32886
33122
  "closeDelay"
32887
33123
  ]);
32888
- var root$18 = /* @__PURE__ */ from_html(`<button><!></button>`);
33124
+ var root$21 = /* @__PURE__ */ from_html(`<button><!></button>`);
32889
33125
  function Popover_trigger($$anchor, $$props) {
32890
33126
  const uid = props_id();
32891
33127
  push($$props, true);
@@ -32980,7 +33216,7 @@ function Popover_trigger($$anchor, $$props) {
32980
33216
  append($$anchor, fragment_2);
32981
33217
  };
32982
33218
  var alternate = ($$anchor) => {
32983
- var button = root$18();
33219
+ var button = root$21();
32984
33220
  attribute_effect(button, () => ({ ...get$2(mergedProps) }));
32985
33221
  snippet(child(button), () => children() ?? noop$1);
32986
33222
  reset(button);
@@ -33060,7 +33296,7 @@ create_custom_element(Date_picker_trigger, {
33060
33296
  }, [], [], { mode: "open" });
33061
33297
  //#endregion
33062
33298
  //#region src/components/forms/ui/generic/DatePicker.svelte
33063
- var root$17 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
33299
+ var root$20 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
33064
33300
  var root_1$9 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
33065
33301
  function DatePicker_1($$anchor, $$props) {
33066
33302
  push($$props, true);
@@ -33148,7 +33384,7 @@ function DatePicker_1($$anchor, $$props) {
33148
33384
  {
33149
33385
  const children = ($$anchor, $$arg0) => {
33150
33386
  let segments = () => $$arg0?.().segments;
33151
- var fragment_4 = root$17();
33387
+ var fragment_4 = root$20();
33152
33388
  var node_5 = first_child(fragment_4);
33153
33389
  each(node_5, 17, segments, index$1, ($$anchor, $$item) => {
33154
33390
  let part = () => get$2($$item).part;
@@ -33199,7 +33435,7 @@ function DatePicker_1($$anchor, $$props) {
33199
33435
  const children = ($$anchor, $$arg0) => {
33200
33436
  let months = () => $$arg0?.().months;
33201
33437
  let weekdays = () => $$arg0?.().weekdays;
33202
- var fragment_8 = root$17();
33438
+ var fragment_8 = root$20();
33203
33439
  var node_10 = first_child(fragment_8);
33204
33440
  component(node_10, () => Calendar_header, ($$anchor, DatePicker_Header) => {
33205
33441
  DatePicker_Header($$anchor, {
@@ -33226,7 +33462,7 @@ function DatePicker_1($$anchor, $$props) {
33226
33462
  component(first_child(fragment_10), () => Calendar_grid, ($$anchor, DatePicker_Grid) => {
33227
33463
  DatePicker_Grid($$anchor, {
33228
33464
  children: ($$anchor, $$slotProps) => {
33229
- var fragment_11 = root$17();
33465
+ var fragment_11 = root$20();
33230
33466
  var node_16 = first_child(fragment_11);
33231
33467
  component(node_16, () => Calendar_grid_head, ($$anchor, DatePicker_GridHead) => {
33232
33468
  DatePicker_GridHead($$anchor, {
@@ -33354,7 +33590,7 @@ var rest_excludes = new Set([
33354
33590
  "inputClass",
33355
33591
  "host"
33356
33592
  ]);
33357
- var root$16 = /* @__PURE__ */ from_html(`<span class="go-field-star" aria-hidden="true">*</span>`);
33593
+ var root$19 = /* @__PURE__ */ from_html(`<span class="go-field-star" aria-hidden="true">*</span>`);
33358
33594
  var root_1$8 = /* @__PURE__ */ from_html(` <!>`, 1);
33359
33595
  var root_2$7 = /* @__PURE__ */ from_html(`<label><!></label> <input/>`, 1);
33360
33596
  var root_3$7 = /* @__PURE__ */ from_html(`<label><!></label> <textarea></textarea>`, 1);
@@ -33380,7 +33616,7 @@ function InputAndLabel($$anchor, $$props) {
33380
33616
  var text = first_child(fragment);
33381
33617
  var node = sibling(text);
33382
33618
  var consequent = ($$anchor) => {
33383
- append($$anchor, root$16());
33619
+ append($$anchor, root$19());
33384
33620
  };
33385
33621
  if_block(node, ($$render) => {
33386
33622
  if (field().required) $$render(consequent);
@@ -33780,7 +34016,7 @@ create_custom_element(InputAndLabel, {
33780
34016
  }, [], [], { mode: "open" });
33781
34017
  //#endregion
33782
34018
  //#region src/components/forms/ui/generic/Field.svelte
33783
- var root$15 = /* @__PURE__ */ from_html(`<span> </span>`);
34019
+ var root$18 = /* @__PURE__ */ from_html(`<span> </span>`);
33784
34020
  var root_1$7 = /* @__PURE__ */ from_html(`<li> </li>`);
33785
34021
  var root_2$6 = /* @__PURE__ */ from_html(`<ul class="go-field-errors"></ul>`);
33786
34022
  var root_3$6 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
@@ -33863,7 +34099,7 @@ function Field($$anchor, $$props) {
33863
34099
  });
33864
34100
  var node_1 = sibling(node, 2);
33865
34101
  var consequent = ($$anchor) => {
33866
- var span = root$15();
34102
+ var span = root$18();
33867
34103
  var text = child(span, true);
33868
34104
  reset(span);
33869
34105
  template_effect(() => {
@@ -33919,7 +34155,7 @@ customElements.define("go-field", create_custom_element(Field, {
33919
34155
  }, [], ["getField"]));
33920
34156
  //#endregion
33921
34157
  //#region src/components/forms/ui/generic/AllFields.svelte
33922
- var root$14 = /* @__PURE__ */ from_html(`<go-field></go-field>`, 2);
34158
+ var root$17 = /* @__PURE__ */ from_html(`<go-field></go-field>`, 2);
33923
34159
  function AllFields($$anchor, $$props) {
33924
34160
  push($$props, true);
33925
34161
  let _details = getDetails$1($$props.$$host);
@@ -33927,7 +34163,7 @@ function AllFields($$anchor, $$props) {
33927
34163
  let allFields = /* @__PURE__ */ user_derived(() => get$2(details) ? Forms.getFormFields(get$2(details)?.formId) : []);
33928
34164
  var fragment = comment();
33929
34165
  each(first_child(fragment), 17, () => get$2(allFields), (field) => field.key, ($$anchor, field) => {
33930
- var go_field = root$14();
34166
+ var go_field = root$17();
33931
34167
  template_effect(() => set_custom_element_data(go_field, "key", get$2(field).key));
33932
34168
  template_effect(() => set_custom_element_data(go_field, "required", get$2(field).required));
33933
34169
  append($$anchor, go_field);
@@ -33938,7 +34174,7 @@ function AllFields($$anchor, $$props) {
33938
34174
  customElements.define("go-all-fields", create_custom_element(AllFields, {}, [], []));
33939
34175
  //#endregion
33940
34176
  //#region src/components/forms/ui/generic/ErrorsFeedback.svelte
33941
- var root$13 = /* @__PURE__ */ from_html(`<p aria-hidden="true"> </p>`);
34177
+ var root$16 = /* @__PURE__ */ from_html(`<p aria-hidden="true"> </p>`);
33942
34178
  var root_1$6 = /* @__PURE__ */ from_html(`<li> </li>`);
33943
34179
  var root_2$5 = /* @__PURE__ */ from_html(`<ul class="go-error-feedback-api-errors"></ul>`);
33944
34180
  var root_3$5 = /* @__PURE__ */ from_html(`<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>`);
@@ -33976,7 +34212,7 @@ function ErrorsFeedback($$anchor, $$props) {
33976
34212
  reset(p);
33977
34213
  var node_1 = sibling(p, 2);
33978
34214
  var consequent_1 = ($$anchor) => {
33979
- var p_1 = root$13();
34215
+ var p_1 = root$16();
33980
34216
  var text_1 = child(p_1, true);
33981
34217
  reset(p_1);
33982
34218
  template_effect(($0) => set_text(text_1, $0), [() => shop.t("forms.errorSummary", { count: get$2(errorsRealtime) })]);
@@ -34009,9 +34245,9 @@ function ErrorsFeedback($$anchor, $$props) {
34009
34245
  customElements.define("go-errors-feedback", create_custom_element(ErrorsFeedback, {}, [], []));
34010
34246
  //#endregion
34011
34247
  //#region src/components/forms/ui/generic/FormFeedback.svelte
34012
- var root$12 = /* @__PURE__ */ from_html(`<div class="go-form-feedback"><!></div>`);
34248
+ var root$15 = /* @__PURE__ */ from_html(`<div class="go-form-feedback"><!></div>`);
34013
34249
  function FormFeedback($$anchor, $$props) {
34014
- var div = root$12();
34250
+ var div = root$15();
34015
34251
  slot(child(div), $$props, "default", {}, null);
34016
34252
  reset(div);
34017
34253
  append($$anchor, div);
@@ -34045,7 +34281,7 @@ customElements.define("go-submit", create_custom_element(Submit, { buttonClass:
34045
34281
  } }, [], []));
34046
34282
  //#endregion
34047
34283
  //#region src/components/forms/ui/generic/SuccessFeedback.svelte
34048
- var root$11 = /* @__PURE__ */ from_html(`<div aria-live="assertive"> </div>`);
34284
+ var root$14 = /* @__PURE__ */ from_html(`<div aria-live="assertive"> </div>`);
34049
34285
  function SuccessFeedback($$anchor, $$props) {
34050
34286
  push($$props, true);
34051
34287
  const _details = getDetails$1($$props.$$host);
@@ -34053,7 +34289,7 @@ function SuccessFeedback($$anchor, $$props) {
34053
34289
  var fragment = comment();
34054
34290
  var node = first_child(fragment);
34055
34291
  var consequent = ($$anchor) => {
34056
- var div = root$11();
34292
+ var div = root$14();
34057
34293
  let classes;
34058
34294
  var text = child(div, true);
34059
34295
  reset(div);
@@ -36540,8 +36776,9 @@ var OrderDetails = class {
36540
36776
  if (!this.order?.is_valid) return;
36541
36777
  switch (item.type) {
36542
36778
  case "Event": return `${shop.apiUrl}/api/v4/orders/${this.order.id}/events/${item.attributes.id}.pdf?locale=${shop.locale}&token=${this.token}`;
36779
+ case "Coupon": return `${shop.apiUrl}/api/v4/orders/${this.order.id}/coupons/${item.attributes.id}.pdf?locale=${shop.locale}&token=${this.token}`;
36543
36780
  case "Ticket":
36544
- if (item.attributes.ticket_type === "annual" && !item.attributes.is_voucher) if (configStore.config.urls.annualTicketPersonalizationList?.()) return configStore.config.urls.annualTicketPersonalizationList(this.token);
36781
+ if (item.attributes.ticket_type === "annual" && !item.attributes.is_voucher) if (configStore.config.urls.annualTicketPersonalizationList) return configStore.config.urls.annualTicketPersonalizationList(this.token);
36545
36782
  else return shop.urls?.annualTicketPersonalizationList(this.token);
36546
36783
  else return `${shop.apiUrl}/api/v4/orders/${this.order.id}/tickets/${item.attributes.id}.pdf?locale=${shop.locale}&token=${this.token}&barcode_id=${barcodeId}`;
36547
36784
  break;
@@ -36568,6 +36805,7 @@ function Order($$anchor, $$props) {
36568
36805
  untrack(() => {
36569
36806
  cart.clearItems();
36570
36807
  cart.clearCoupons();
36808
+ cart.clearDonations();
36571
36809
  if (shop.auth.isGuest()) shop.auth.signOut();
36572
36810
  });
36573
36811
  });
@@ -36588,8 +36826,109 @@ customElements.define("go-order", create_custom_element(Order, { token: {
36588
36826
  type: "String"
36589
36827
  } }, [], ["orderDetails"]));
36590
36828
  //#endregion
36829
+ //#region src/components/order/components/subcomponents/breakdown/items/Coupon.svelte
36830
+ var root$13 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>`);
36831
+ function Coupon($$anchor, $$props) {
36832
+ push($$props, true);
36833
+ let item = prop($$props, "item", 7), orderDetails = prop($$props, "orderDetails", 7);
36834
+ const valueCents = /* @__PURE__ */ user_derived(() => item().attributes.value_cents > 0 ? item().attributes.value_cents : item().price_cents);
36835
+ var $$exports = {
36836
+ get item() {
36837
+ return item();
36838
+ },
36839
+ set item($$value) {
36840
+ item($$value);
36841
+ flushSync();
36842
+ },
36843
+ get orderDetails() {
36844
+ return orderDetails();
36845
+ },
36846
+ set orderDetails($$value) {
36847
+ orderDetails($$value);
36848
+ flushSync();
36849
+ }
36850
+ };
36851
+ var li = root$13();
36852
+ var article = child(li);
36853
+ var ul = child(article);
36854
+ var li_1 = child(ul);
36855
+ var text = child(li_1, true);
36856
+ reset(li_1);
36857
+ var li_2 = sibling(li_1, 2);
36858
+ var span = child(li_2);
36859
+ var text_1 = child(span, true);
36860
+ reset(span);
36861
+ var a = sibling(span, 4);
36862
+ var text_2 = child(a, true);
36863
+ reset(a);
36864
+ reset(li_2);
36865
+ var li_3 = sibling(li_2, 2);
36866
+ var text_3 = child(li_3, true);
36867
+ reset(li_3);
36868
+ next(2);
36869
+ reset(ul);
36870
+ reset(article);
36871
+ reset(li);
36872
+ template_effect(($0, $1, $2) => {
36873
+ set_text(text, item().attributes.quantity);
36874
+ set_text(text_1, item().attributes.title);
36875
+ set_attribute(a, "href", $0);
36876
+ set_text(text_2, $1);
36877
+ set_text(text_3, $2);
36878
+ }, [
36879
+ () => orderDetails().downloadLink(item()),
36880
+ () => shop.t("common.download"),
36881
+ () => formatCurrency(get$2(valueCents))
36882
+ ]);
36883
+ append($$anchor, li);
36884
+ return pop($$exports);
36885
+ }
36886
+ create_custom_element(Coupon, {
36887
+ item: {},
36888
+ orderDetails: {}
36889
+ }, [], [], { mode: "open" });
36890
+ //#endregion
36891
+ //#region src/components/order/components/subcomponents/breakdown/items/Donation.svelte
36892
+ var root$12 = /* @__PURE__ */ from_html(`<li class="go-order-breakdown-donation"><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>`);
36893
+ function Donation($$anchor, $$props) {
36894
+ push($$props, true);
36895
+ let donation = prop($$props, "donation", 7);
36896
+ const campaign = /* @__PURE__ */ user_derived(() => shop.donations?.campaigns?.find((c) => c.id === donation().donation_campaign_id));
36897
+ var $$exports = {
36898
+ get donation() {
36899
+ return donation();
36900
+ },
36901
+ set donation($$value) {
36902
+ donation($$value);
36903
+ flushSync();
36904
+ }
36905
+ };
36906
+ var li = root$12();
36907
+ var article = child(li);
36908
+ var ul = child(article);
36909
+ var li_1 = sibling(child(ul), 2);
36910
+ var span = child(li_1);
36911
+ var text = child(span, true);
36912
+ reset(span);
36913
+ reset(li_1);
36914
+ var li_2 = sibling(li_1, 2);
36915
+ var text_1 = child(li_2, true);
36916
+ reset(li_2);
36917
+ next(2);
36918
+ reset(ul);
36919
+ reset(article);
36920
+ reset(li);
36921
+ template_effect(($0, $1) => {
36922
+ set_text(text, $0);
36923
+ set_text(text_1, $1);
36924
+ }, [() => get$2(campaign)?.name ?? shop.t("common.table.donation"), () => formatCurrency(donation().donation_cents)]);
36925
+ append($$anchor, li);
36926
+ return pop($$exports);
36927
+ }
36928
+ create_custom_element(Donation, { donation: {} }, [], [], { mode: "open" });
36929
+ //#endregion
36591
36930
  //#region src/components/order/components/subcomponents/breakdown/items/Event.svelte
36592
- var root$10 = /* @__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);
36931
+ var root$11 = /* @__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);
36593
36932
  var root_1$5 = /* @__PURE__ */ from_html(`<br/> <span class="go-order-item-quantities"> </span>`, 1);
36594
36933
  var root_2$4 = /* @__PURE__ */ from_html(`<a aria-label="iCal link"> </a>`);
36595
36934
  var root_3$4 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>`);
@@ -36621,7 +36960,7 @@ function Event$1($$anchor, $$props) {
36621
36960
  reset(span);
36622
36961
  var node = sibling(span, 2);
36623
36962
  var consequent = ($$anchor) => {
36624
- var fragment = root$10();
36963
+ var fragment = root$11();
36625
36964
  var span_1 = first_child(fragment);
36626
36965
  var text_1 = child(span_1, true);
36627
36966
  reset(span_1);
@@ -36690,6 +37029,48 @@ create_custom_element(Event$1, {
36690
37029
  orderDetails: {}
36691
37030
  }, [], [], { mode: "open" });
36692
37031
  //#endregion
37032
+ //#region src/components/order/components/subcomponents/breakdown/items/Merchandise.svelte
37033
+ var root$10 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>`);
37034
+ function Merchandise($$anchor, $$props) {
37035
+ push($$props, true);
37036
+ let item = prop($$props, "item", 7);
37037
+ var $$exports = {
37038
+ get item() {
37039
+ return item();
37040
+ },
37041
+ set item($$value) {
37042
+ item($$value);
37043
+ flushSync();
37044
+ }
37045
+ };
37046
+ var li = root$10();
37047
+ var article = child(li);
37048
+ var ul = child(article);
37049
+ var li_1 = child(ul);
37050
+ var text = child(li_1, true);
37051
+ reset(li_1);
37052
+ var li_2 = sibling(li_1, 2);
37053
+ var span = child(li_2);
37054
+ var text_1 = child(span, true);
37055
+ reset(span);
37056
+ reset(li_2);
37057
+ var li_3 = sibling(li_2, 2);
37058
+ var text_2 = child(li_3, true);
37059
+ reset(li_3);
37060
+ next(2);
37061
+ reset(ul);
37062
+ reset(article);
37063
+ reset(li);
37064
+ template_effect(($0) => {
37065
+ set_text(text, item().attributes.quantity);
37066
+ set_text(text_1, item().attributes.title);
37067
+ set_text(text_2, $0);
37068
+ }, [() => formatCurrency(item().price_cents)]);
37069
+ append($$anchor, li);
37070
+ return pop($$exports);
37071
+ }
37072
+ create_custom_element(Merchandise, { item: {} }, [], [], { mode: "open" });
37073
+ //#endregion
36693
37074
  //#region src/components/order/components/subcomponents/breakdown/items/TicketSale.svelte
36694
37075
  var root$9 = /* @__PURE__ */ from_html(`<span class="go-order-item-subtitle" data-testid="order-item-subtitle"> </span>`);
36695
37076
  var root_1$4 = /* @__PURE__ */ from_html(`<br/> <span class="go-order-item-quantities" data-testid="order-sub-ticket"> </span>`, 1);
@@ -37021,7 +37402,7 @@ function Tour($$anchor, $$props) {
37021
37402
  create_custom_element(Tour, { item: {} }, [], [], { mode: "open" });
37022
37403
  //#endregion
37023
37404
  //#region src/components/order/components/subcomponents/breakdown/Breakdown.svelte
37024
- var root$7 = /* @__PURE__ */ from_html(`<ol><li class="data-go-order-breakdown-header"><ul><li class="go-order-breakdown-header-count"> </li> <li class="go-order-breakdown-header-product"> </li> <li class="go-order-breakdown-header-price"> </li> <li class="go-order-breakdown-header-passbook"></li></ul></li> <!> <li class="go-order-breakdown-footer"><ul><li class="go-cart-footer-title"></li> <li class="go-cart-footer-count"></li> <li class="go-cart-footer-price"> </li> <li class="go-cart-footer-passbook"></li></ul></li></ol>`);
37405
+ var root$7 = /* @__PURE__ */ from_html(`<ol><li class="data-go-order-breakdown-header"><ul><li class="go-order-breakdown-header-count"> </li> <li class="go-order-breakdown-header-product"> </li> <li class="go-order-breakdown-header-price"> </li> <li class="go-order-breakdown-header-passbook"></li></ul></li> <!> <!> <li class="go-order-breakdown-footer"><ul><li class="go-cart-footer-title"></li> <li class="go-cart-footer-count"></li> <li class="go-cart-footer-price"> </li> <li class="go-cart-footer-passbook"></li></ul></li></ol>`);
37025
37406
  function Breakdown($$anchor, $$props) {
37026
37407
  push($$props, true);
37027
37408
  const _orderDetails = getDetails($$props.$$host);
@@ -37029,7 +37410,7 @@ function Breakdown($$anchor, $$props) {
37029
37410
  let order = /* @__PURE__ */ user_derived(() => get$2(orderDetails)?.order);
37030
37411
  var fragment = comment();
37031
37412
  var node = first_child(fragment);
37032
- var consequent_3 = ($$anchor) => {
37413
+ var consequent_5 = ($$anchor) => {
37033
37414
  var ol = root$7();
37034
37415
  var li = child(ol);
37035
37416
  var ul = child(li);
@@ -37074,14 +37455,37 @@ function Breakdown($$anchor, $$props) {
37074
37455
  return get$2(item);
37075
37456
  } });
37076
37457
  };
37458
+ var consequent_3 = ($$anchor) => {
37459
+ Coupon($$anchor, {
37460
+ get item() {
37461
+ return get$2(item);
37462
+ },
37463
+ get orderDetails() {
37464
+ return get$2(orderDetails);
37465
+ }
37466
+ });
37467
+ };
37468
+ var consequent_4 = ($$anchor) => {
37469
+ Merchandise($$anchor, { get item() {
37470
+ return get$2(item);
37471
+ } });
37472
+ };
37077
37473
  if_block(node_2, ($$render) => {
37078
37474
  if (get$2(item).type === "Ticket") $$render(consequent);
37079
37475
  else if (get$2(item).type === "Event") $$render(consequent_1, 1);
37080
37476
  else if (get$2(item).type === "Tour") $$render(consequent_2, 2);
37477
+ else if (get$2(item).type === "Coupon") $$render(consequent_3, 3);
37478
+ else if (get$2(item).type === "Merchandise") $$render(consequent_4, 4);
37081
37479
  });
37082
37480
  append($$anchor, fragment_1);
37083
37481
  });
37084
- var li_4 = sibling(node_1, 2);
37482
+ var node_3 = sibling(node_1, 2);
37483
+ each(node_3, 17, () => get$2(order).donations ?? [], (donation) => donation.id, ($$anchor, donation) => {
37484
+ Donation($$anchor, { get donation() {
37485
+ return get$2(donation);
37486
+ } });
37487
+ });
37488
+ var li_4 = sibling(node_3, 2);
37085
37489
  var ul_1 = child(li_4);
37086
37490
  var li_5 = sibling(child(ul_1), 4);
37087
37491
  var text_3 = child(li_5, true);
@@ -37104,7 +37508,7 @@ function Breakdown($$anchor, $$props) {
37104
37508
  append($$anchor, ol);
37105
37509
  };
37106
37510
  if_block(node, ($$render) => {
37107
- if (get$2(order) && get$2(orderDetails)) $$render(consequent_3);
37511
+ if (get$2(order) && get$2(orderDetails)) $$render(consequent_5);
37108
37512
  });
37109
37513
  append($$anchor, fragment);
37110
37514
  pop();