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