@gomusdev/web-components 3.8.3 → 3.10.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.
@@ -1459,7 +1459,7 @@
1459
1459
  if (effect_tracking()) {
1460
1460
  get$2(version);
1461
1461
  render_effect(() => {
1462
- if (subscribers === 0) stop = untrack(() => start(() => increment(version)));
1462
+ if (subscribers === 0) stop = untrack(() => start(() => increment$1(version)));
1463
1463
  subscribers += 1;
1464
1464
  return () => {
1465
1465
  queue_micro_task(() => {
@@ -1467,7 +1467,7 @@
1467
1467
  if (subscribers === 0) {
1468
1468
  stop?.();
1469
1469
  stop = void 0;
1470
- increment(version);
1470
+ increment$1(version);
1471
1471
  }
1472
1472
  });
1473
1473
  };
@@ -2206,7 +2206,7 @@
2206
2206
  * Silently (without using `get`) increment a source
2207
2207
  * @param {Source<number>} source
2208
2208
  */
2209
- function increment(source) {
2209
+ function increment$1(source) {
2210
2210
  set(source, source.v + 1);
2211
2211
  }
2212
2212
  /**
@@ -2296,11 +2296,11 @@
2296
2296
  if (prop in target) {
2297
2297
  const s = with_parent(() => /* @__PURE__ */ state(UNINITIALIZED, stack));
2298
2298
  sources.set(prop, s);
2299
- increment(version);
2299
+ increment$1(version);
2300
2300
  }
2301
2301
  } else {
2302
2302
  set(s, UNINITIALIZED);
2303
- increment(version);
2303
+ increment$1(version);
2304
2304
  }
2305
2305
  return true;
2306
2306
  },
@@ -2382,7 +2382,7 @@
2382
2382
  var n = Number(prop);
2383
2383
  if (Number.isInteger(n) && n >= ls.v) set(ls, n + 1);
2384
2384
  }
2385
- increment(version);
2385
+ increment$1(version);
2386
2386
  }
2387
2387
  return true;
2388
2388
  },
@@ -11804,7 +11804,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11804
11804
  normal: "day",
11805
11805
  annual: "annual"
11806
11806
  }[apiTicket.ticket_type],
11807
- shop_order: apiTicket.shop_order ?? 0
11807
+ shop_order: apiTicket.shop_order ?? 0,
11808
+ content: void 0
11808
11809
  };
11809
11810
  }
11810
11811
  function initUITimeslotTickets(tickets, selectedTime = "") {
@@ -13545,6 +13546,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13545
13546
  query: assign({ per_page: 100 }, params ?? {})
13546
13547
  });
13547
13548
  }
13549
+ ticketsContent(ticketIds) {
13550
+ return this.fetchAndCache("/api/v4/tickets/content", `ticketsContent-${JSON.stringify(ticketIds)}`, "data", {
13551
+ cache: 300,
13552
+ query: assign({ "ticket_ids[]": ticketIds }, { per_page: 100 })
13553
+ });
13554
+ }
13548
13555
  signIn(params) {
13549
13556
  return this.apiPost(SIGN_IN_ENDPOINT, {
13550
13557
  body: params,
@@ -13902,12 +13909,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13902
13909
  window.location.assign(url);
13903
13910
  },
13904
13911
  forms: {},
13905
- fields: {}
13912
+ fields: {},
13913
+ quantityStepper: true
13906
13914
  };
13907
13915
  var ConfigStoreSvelte = class {
13908
13916
  defaultConfig = assign(defaultConfig, window.customOptions);
13909
13917
  override = this.defaultConfig;
13910
- #options = /* @__PURE__ */ state(proxy({}));
13918
+ #options = /* @__PURE__ */ state(proxy(this.defaultConfig));
13911
13919
  get options() {
13912
13920
  return get$2(this.#options);
13913
13921
  }
@@ -13983,7 +13991,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13983
13991
  var getPersonalizationDetails = createGetDetails(KEY$5);
13984
13992
  //#endregion
13985
13993
  //#region src/components/annualTicketPersonalization/components/AnnualTicketPersonalization.svelte
13986
- var root$52 = /* @__PURE__ */ from_html(`<li><a> </a></li>`);
13994
+ var root$53 = /* @__PURE__ */ from_html(`<li><a> </a></li>`);
13987
13995
  var root_1$17 = /* @__PURE__ */ from_html(`<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>`);
13988
13996
  function AnnualTicketPersonalization($$anchor, $$props) {
13989
13997
  push($$props, true);
@@ -14018,7 +14026,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14018
14026
  reset(li_1);
14019
14027
  var node_2 = sibling(li_1, 2);
14020
14028
  var consequent = ($$anchor) => {
14021
- var li_2 = root$52();
14029
+ var li_2 = root$53();
14022
14030
  var a = child(li_2);
14023
14031
  var text_2 = child(a, true);
14024
14032
  reset(a);
@@ -14693,7 +14701,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14693
14701
  }
14694
14702
  //#endregion
14695
14703
  //#region src/components/forms/ui/generic/Form.svelte
14696
- var root$51 = /* @__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);
14704
+ var root$52 = /* @__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);
14697
14705
  function Form($$anchor, $$props) {
14698
14706
  push($$props, true);
14699
14707
  let formId = prop($$props, "formId", 7), custom = prop($$props, "custom", 7);
@@ -14738,7 +14746,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14738
14746
  var fragment = comment();
14739
14747
  var node = first_child(fragment);
14740
14748
  var consequent = ($$anchor) => {
14741
- var fragment_1 = root$51();
14749
+ var fragment_1 = root$52();
14742
14750
  var go_submit = sibling(sibling(first_child(fragment_1), 2), 2);
14743
14751
  var text = child(go_submit, true);
14744
14752
  reset(go_submit);
@@ -14765,7 +14773,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14765
14773
  }, [], ["details"]));
14766
14774
  //#endregion
14767
14775
  //#region src/components/auth/passwordReset/PasswordReset.svelte
14768
- var root$50 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
14776
+ var root$51 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
14769
14777
  function PasswordReset($$anchor, $$props) {
14770
14778
  push($$props, true);
14771
14779
  let custom = prop($$props, "custom", 7, false);
@@ -14798,7 +14806,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14798
14806
  flushSync();
14799
14807
  }
14800
14808
  };
14801
- var go_form = root$50();
14809
+ var go_form = root$51();
14802
14810
  set_custom_element_data(go_form, "formId", "passwordReset");
14803
14811
  template_effect(() => set_custom_element_data(go_form, "custom", custom()));
14804
14812
  event("submit", go_form, passwordReset);
@@ -15041,7 +15049,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15041
15049
  var getCartDetails = createGetDetails(KEY$3);
15042
15050
  //#endregion
15043
15051
  //#region src/components/cart/components/itemTitles/Coupon.svelte
15044
- var root$49 = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"> </span>`);
15052
+ var root$50 = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"> </span>`);
15045
15053
  function Coupon($$anchor, $$props) {
15046
15054
  push($$props, true);
15047
15055
  let cartItem = prop($$props, "cartItem", 7);
@@ -15054,7 +15062,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15054
15062
  flushSync();
15055
15063
  }
15056
15064
  };
15057
- var span = root$49();
15065
+ var span = root$50();
15058
15066
  var text = child(span, true);
15059
15067
  reset(span);
15060
15068
  template_effect(() => set_text(text, cartItem().product.title));
@@ -15064,7 +15072,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15064
15072
  create_custom_element(Coupon, { cartItem: {} }, [], [], { mode: "open" });
15065
15073
  //#endregion
15066
15074
  //#region src/components/cart/components/itemTitles/Event.svelte
15067
- var root$48 = /* @__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);
15075
+ var root$49 = /* @__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);
15068
15076
  var root_1$16 = /* @__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);
15069
15077
  function Event$2($$anchor, $$props) {
15070
15078
  push($$props, true);
@@ -15091,7 +15099,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15091
15099
  reset(span);
15092
15100
  var node = sibling(span);
15093
15101
  var consequent = ($$anchor) => {
15094
- var fragment_1 = root$48();
15102
+ var fragment_1 = root$49();
15095
15103
  var span_3 = first_child(fragment_1);
15096
15104
  var text_2 = child(span_3, true);
15097
15105
  reset(span_3);
@@ -15120,7 +15128,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15120
15128
  create_custom_element(Event$2, { cartItem: {} }, [], [], { mode: "open" });
15121
15129
  //#endregion
15122
15130
  //#region src/components/cart/components/itemTitles/Ticket.svelte
15123
- var root$47 = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
15131
+ var root$48 = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
15124
15132
  var root_1$15 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>`, 1);
15125
15133
  var root_2$11 = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>`, 1);
15126
15134
  function Ticket($$anchor, $$props) {
@@ -15147,7 +15155,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15147
15155
  reset(span_1);
15148
15156
  var node_1 = sibling(span_1, 2);
15149
15157
  var consequent = ($$anchor) => {
15150
- var span_2 = root$47();
15158
+ var span_2 = root$48();
15151
15159
  var text_2 = child(span_2, true);
15152
15160
  reset(span_2);
15153
15161
  template_effect(($0) => set_text(text_2, $0), [() => formatTime(cartItem().time)]);
@@ -15171,6 +15179,208 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15171
15179
  }
15172
15180
  create_custom_element(Ticket, { cartItem: {} }, [], [], { mode: "open" });
15173
15181
  //#endregion
15182
+ //#region src/lib/models/cart/quantityStepper.ts
15183
+ /** `+`: from `0` jump to the order minimum (at least `1`); otherwise step up by one. Capped at `max`. */
15184
+ function increment(value, { min, max }) {
15185
+ const target = value === 0 ? Math.max(min, 1) : value + 1;
15186
+ return target > max ? value : target;
15187
+ }
15188
+ /** `−`: from the order minimum drop straight to `0` (skipping the invalid `1..min-1` band); otherwise step down by one. */
15189
+ function decrement(value, { min }) {
15190
+ return value <= min ? 0 : value - 1;
15191
+ }
15192
+ /** Clamp a typed value into `{0} ∪ [min, max]`: `≤0` → `0`, `0<v<min` rounds up to `min`, `>max` → `max`. */
15193
+ function clampTyped(raw, { min, max }) {
15194
+ if (!Number.isFinite(raw) || raw <= 0) return 0;
15195
+ let v = Math.floor(raw);
15196
+ if (v < min) v = min;
15197
+ if (v > max) v = max;
15198
+ return v;
15199
+ }
15200
+ /** Whether `value` is a committable quantity for these bounds. */
15201
+ function isValid(value, { min, max }) {
15202
+ if (value < 0 || value > max) return false;
15203
+ return value === 0 || value >= min;
15204
+ }
15205
+ /** Whether `+` can change the value (false → the button is `aria-disabled`). */
15206
+ function canIncrement(value, bounds) {
15207
+ return increment(value, bounds) > value;
15208
+ }
15209
+ /** Whether `−` can change the value (false → the button is `aria-disabled`). */
15210
+ function canDecrement(value) {
15211
+ return value > 0;
15212
+ }
15213
+ //#endregion
15214
+ //#region src/components/shared/quantityStepper/QuantityStepper.svelte
15215
+ var root$47 = /* @__PURE__ */ from_html(`<div class="go-quantity-stepper" role="group"><button type="button" class="go-quantity-stepper-button go-quantity-stepper-decrement" 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>`);
15216
+ function QuantityStepper($$anchor, $$props) {
15217
+ const inputId = props_id();
15218
+ push($$props, true);
15219
+ let value = prop($$props, "value", 7), min = prop($$props, "min", 7), max = prop($$props, "max", 7), label = prop($$props, "label", 7), decreaseLabel = prop($$props, "decreaseLabel", 7), increaseLabel = prop($$props, "increaseLabel", 7), onChange = prop($$props, "onChange", 7);
15220
+ let inputEl;
15221
+ let invalid = /* @__PURE__ */ state(false);
15222
+ const decDisabled = /* @__PURE__ */ user_derived(() => !canDecrement(value()));
15223
+ const incDisabled = /* @__PURE__ */ user_derived(() => !canIncrement(value(), {
15224
+ min: min(),
15225
+ max: max()
15226
+ }));
15227
+ function emit(next) {
15228
+ if (next !== value()) onChange()(next);
15229
+ }
15230
+ function stepDown() {
15231
+ if (canDecrement(value())) emit(decrement(value(), {
15232
+ min: min(),
15233
+ max: max()
15234
+ }));
15235
+ }
15236
+ function stepUp() {
15237
+ if (canIncrement(value(), {
15238
+ min: min(),
15239
+ max: max()
15240
+ })) emit(increment(value(), {
15241
+ min: min(),
15242
+ max: max()
15243
+ }));
15244
+ }
15245
+ function commitTyped() {
15246
+ const next = clampTyped(parseInt(inputEl.value, 10), {
15247
+ min: min(),
15248
+ max: max()
15249
+ });
15250
+ set(invalid, false);
15251
+ inputEl.value = String(next);
15252
+ emit(next);
15253
+ }
15254
+ function onInput() {
15255
+ const raw = inputEl.value.trim();
15256
+ set(invalid, !(/^\d+$/.test(raw) && isValid(parseInt(raw, 10), {
15257
+ min: min(),
15258
+ max: max()
15259
+ })));
15260
+ }
15261
+ function onKeydown(e) {
15262
+ switch (e.key) {
15263
+ case "ArrowUp":
15264
+ e.preventDefault();
15265
+ stepUp();
15266
+ break;
15267
+ case "ArrowDown":
15268
+ e.preventDefault();
15269
+ stepDown();
15270
+ break;
15271
+ case "Home":
15272
+ e.preventDefault();
15273
+ emit(0);
15274
+ break;
15275
+ case "End":
15276
+ e.preventDefault();
15277
+ emit(max());
15278
+ break;
15279
+ case "Enter":
15280
+ e.preventDefault();
15281
+ commitTyped();
15282
+ break;
15283
+ }
15284
+ }
15285
+ var $$exports = {
15286
+ get value() {
15287
+ return value();
15288
+ },
15289
+ set value($$value) {
15290
+ value($$value);
15291
+ flushSync();
15292
+ },
15293
+ get min() {
15294
+ return min();
15295
+ },
15296
+ set min($$value) {
15297
+ min($$value);
15298
+ flushSync();
15299
+ },
15300
+ get max() {
15301
+ return max();
15302
+ },
15303
+ set max($$value) {
15304
+ max($$value);
15305
+ flushSync();
15306
+ },
15307
+ get label() {
15308
+ return label();
15309
+ },
15310
+ set label($$value) {
15311
+ label($$value);
15312
+ flushSync();
15313
+ },
15314
+ get decreaseLabel() {
15315
+ return decreaseLabel();
15316
+ },
15317
+ set decreaseLabel($$value) {
15318
+ decreaseLabel($$value);
15319
+ flushSync();
15320
+ },
15321
+ get increaseLabel() {
15322
+ return increaseLabel();
15323
+ },
15324
+ set increaseLabel($$value) {
15325
+ increaseLabel($$value);
15326
+ flushSync();
15327
+ },
15328
+ get onChange() {
15329
+ return onChange();
15330
+ },
15331
+ set onChange($$value) {
15332
+ onChange($$value);
15333
+ flushSync();
15334
+ }
15335
+ };
15336
+ var div = root$47();
15337
+ var button = child(div);
15338
+ var input = sibling(button, 2);
15339
+ remove_input_defaults(input);
15340
+ set_attribute(input, "aria-valuemin", 0);
15341
+ bind_this(input, ($$value) => inputEl = $$value, () => inputEl);
15342
+ var button_1 = sibling(input, 2);
15343
+ reset(div);
15344
+ template_effect(() => {
15345
+ set_attribute(div, "aria-label", label());
15346
+ set_attribute(button, "title", decreaseLabel());
15347
+ set_attribute(button, "aria-controls", inputId);
15348
+ set_attribute(button, "aria-disabled", get$2(decDisabled));
15349
+ set_attribute(input, "id", inputId);
15350
+ set_attribute(input, "aria-label", label());
15351
+ set_value(input, value());
15352
+ set_attribute(input, "aria-valuenow", value());
15353
+ set_attribute(input, "aria-valuemax", max());
15354
+ set_attribute(input, "aria-invalid", get$2(invalid) ? "true" : void 0);
15355
+ set_attribute(button_1, "title", increaseLabel());
15356
+ set_attribute(button_1, "aria-controls", inputId);
15357
+ set_attribute(button_1, "aria-disabled", get$2(incDisabled));
15358
+ });
15359
+ delegated("click", button, stepDown);
15360
+ delegated("input", input, onInput);
15361
+ delegated("change", input, commitTyped);
15362
+ event("blur", input, commitTyped);
15363
+ delegated("keydown", input, onKeydown);
15364
+ delegated("click", button_1, stepUp);
15365
+ append($$anchor, div);
15366
+ return pop($$exports);
15367
+ }
15368
+ delegate([
15369
+ "click",
15370
+ "input",
15371
+ "change",
15372
+ "keydown"
15373
+ ]);
15374
+ create_custom_element(QuantityStepper, {
15375
+ value: {},
15376
+ min: {},
15377
+ max: {},
15378
+ label: {},
15379
+ decreaseLabel: {},
15380
+ increaseLabel: {},
15381
+ onChange: {}
15382
+ }, [], [], { mode: "open" });
15383
+ //#endregion
15174
15384
  //#region src/lib/models/cart/selectOptions.ts
15175
15385
  function generateQuantityOptions(from, to, options = { floor: 0 }) {
15176
15386
  const { floor } = options;
@@ -15195,12 +15405,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15195
15405
  var root$46 = /* @__PURE__ */ from_html(`<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>`, 1);
15196
15406
  var root_1$14 = /* @__PURE__ */ from_html(`<span class="go-cart-item-price-discounted"> </span>`);
15197
15407
  var root_2$10 = /* @__PURE__ */ from_html(`<span> </span>`);
15198
- var root_3$6 = /* @__PURE__ */ from_html(`<option> </option>`);
15199
- var root_4$3 = /* @__PURE__ */ from_html(`<select class="go-cart-item-select"></select>`);
15200
- var root_5$2 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>`);
15408
+ var root_3$7 = /* @__PURE__ */ from_html(`<option> </option>`);
15409
+ var root_4$4 = /* @__PURE__ */ from_html(`<select class="go-cart-item-select"></select>`);
15410
+ var root_5$3 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>`);
15201
15411
  var root_6$2 = /* @__PURE__ */ from_html(`<article class="go-cart-item-content"><ul><li class="go-cart-item-title-container"><!></li> <li class="go-cart-item-price"><!></li> <li class="go-cart-item-count"><!></li> <!> <li class="go-cart-item-sum"> </li></ul></article>`);
15202
15412
  function Item$1($$anchor, $$props) {
15203
15413
  push($$props, true);
15414
+ const useStepper = /* @__PURE__ */ user_derived(() => configStore.config.quantityStepper);
15204
15415
  let displayItem = prop($$props, "displayItem", 7), displayCart = prop($$props, "displayCart", 7), preview = prop($$props, "preview", 7);
15205
15416
  let capacity = /* @__PURE__ */ state(void 0);
15206
15417
  const itemInMaincart = /* @__PURE__ */ user_derived(() => shop.cart?.items.find((item) => item.uuid === (displayItem().display?.reference_uuid ?? displayItem().uuid)));
@@ -15211,15 +15422,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15211
15422
  set(capacity, shop.capacityManager.capacity(displayCart(), displayItem(), emptyCart), true);
15212
15423
  });
15213
15424
  });
15214
- function update(target) {
15215
- const el = target;
15425
+ function updateQuantity(nextLineQuantity) {
15216
15426
  if (!get$2(itemInMaincart)) {
15217
15427
  console.error("(CartItem) Could not find main item for line", displayItem());
15218
15428
  return;
15219
15429
  }
15220
- const nextLineQuantity = parseInt(el.value, 10);
15221
15430
  get$2(itemInMaincart).quantity = Math.max(0, get$2(itemInMaincart).quantity - displayItem().quantity + nextLineQuantity);
15222
15431
  }
15432
+ function update(target) {
15433
+ updateQuantity(parseInt(target.value, 10));
15434
+ }
15223
15435
  function del() {
15224
15436
  if (!get$2(itemInMaincart)) {
15225
15437
  console.error("(CartItem) Could not find main item for line", displayItem());
@@ -15254,7 +15466,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15254
15466
  };
15255
15467
  var fragment = comment();
15256
15468
  var node = first_child(fragment);
15257
- var consequent_6 = ($$anchor) => {
15469
+ var consequent_7 = ($$anchor) => {
15258
15470
  var article = root_6$2();
15259
15471
  var ul = child(article);
15260
15472
  var li = child(ul);
@@ -15317,10 +15529,38 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15317
15529
  template_effect(() => set_text(text_3, displayItem().quantity));
15318
15530
  append($$anchor, span_2);
15319
15531
  };
15532
+ var consequent_5 = ($$anchor) => {
15533
+ {
15534
+ let $0 = /* @__PURE__ */ user_derived(() => displayItem().quantity ?? 0);
15535
+ let $1 = /* @__PURE__ */ user_derived(() => shop.t("quantity.decrease"));
15536
+ let $2 = /* @__PURE__ */ user_derived(() => shop.t("quantity.increase"));
15537
+ QuantityStepper($$anchor, {
15538
+ get value() {
15539
+ return get$2($0);
15540
+ },
15541
+ get min() {
15542
+ return get$2(capacity).min;
15543
+ },
15544
+ get max() {
15545
+ return get$2(capacity).max;
15546
+ },
15547
+ get label() {
15548
+ return displayItem().product.title;
15549
+ },
15550
+ get decreaseLabel() {
15551
+ return get$2($1);
15552
+ },
15553
+ get increaseLabel() {
15554
+ return get$2($2);
15555
+ },
15556
+ onChange: updateQuantity
15557
+ });
15558
+ }
15559
+ };
15320
15560
  var alternate_1 = ($$anchor) => {
15321
- var select = root_4$3();
15561
+ var select = root_4$4();
15322
15562
  each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max, { floor: 1 }), (q) => q.value, ($$anchor, q) => {
15323
- var option = root_3$6();
15563
+ var option = root_3$7();
15324
15564
  var text_4 = child(option, true);
15325
15565
  reset(option);
15326
15566
  var option_value = {};
@@ -15338,12 +15578,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15338
15578
  };
15339
15579
  if_block(node_3, ($$render) => {
15340
15580
  if (preview()) $$render(consequent_4);
15581
+ else if (get$2(useStepper)) $$render(consequent_5, 1);
15341
15582
  else $$render(alternate_1, -1);
15342
15583
  });
15343
15584
  reset(li_2);
15344
15585
  var node_4 = sibling(li_2, 2);
15345
- var consequent_5 = ($$anchor) => {
15346
- var li_3 = root_5$2();
15586
+ var consequent_6 = ($$anchor) => {
15587
+ var li_3 = root_5$3();
15347
15588
  var button = child(li_3);
15348
15589
  reset(li_3);
15349
15590
  template_effect(($0) => set_attribute(button, "aria-label", $0), [() => shop.t("cart.item.remove")]);
@@ -15351,7 +15592,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15351
15592
  append($$anchor, li_3);
15352
15593
  };
15353
15594
  if_block(node_4, ($$render) => {
15354
- if (!preview()) $$render(consequent_5);
15595
+ if (!preview()) $$render(consequent_6);
15355
15596
  });
15356
15597
  var li_4 = sibling(node_4, 2);
15357
15598
  var text_5 = child(li_4, true);
@@ -15362,7 +15603,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15362
15603
  append($$anchor, article);
15363
15604
  };
15364
15605
  if_block(node, ($$render) => {
15365
- if (get$2(capacity)) $$render(consequent_6);
15606
+ if (get$2(capacity)) $$render(consequent_7);
15366
15607
  });
15367
15608
  append($$anchor, fragment);
15368
15609
  return pop($$exports);
@@ -16858,11 +17099,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16858
17099
  s = this.#source(0);
16859
17100
  sources.set(key, s);
16860
17101
  set(this.#size, super.size);
16861
- increment(version);
17102
+ increment$1(version);
16862
17103
  } else if (prev_res !== value) {
16863
- increment(s);
17104
+ increment$1(s);
16864
17105
  var v_reactions = version.reactions === null ? null : new Set(version.reactions);
16865
- if (v_reactions === null || !s.reactions?.every((r) => v_reactions.has(r))) increment(version);
17106
+ if (v_reactions === null || !s.reactions?.every((r) => v_reactions.has(r))) increment$1(version);
16866
17107
  }
16867
17108
  return res;
16868
17109
  }
@@ -16877,7 +17118,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16877
17118
  }
16878
17119
  if (res) {
16879
17120
  set(this.#size, super.size);
16880
- increment(this.#version);
17121
+ increment$1(this.#version);
16881
17122
  }
16882
17123
  return res;
16883
17124
  }
@@ -16887,7 +17128,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16887
17128
  var sources = this.#sources;
16888
17129
  set(this.#size, 0);
16889
17130
  for (var s of sources.values()) set(s, -1);
16890
- increment(this.#version);
17131
+ increment$1(this.#version);
16891
17132
  sources.clear();
16892
17133
  }
16893
17134
  #read_all() {
@@ -30305,9 +30546,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
30305
30546
  var root$15 = /* @__PURE__ */ from_html(`<span class="go-field-star" aria-hidden="true">*</span>`);
30306
30547
  var root_1$7 = /* @__PURE__ */ from_html(` <!>`, 1);
30307
30548
  var root_2$6 = /* @__PURE__ */ from_html(`<label><!></label> <input/>`, 1);
30308
- var root_3$5 = /* @__PURE__ */ from_html(`<label><!></label> <textarea></textarea>`, 1);
30309
- var root_4$2 = /* @__PURE__ */ from_html(`<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>`);
30310
- var root_5$1 = /* @__PURE__ */ from_html(`<label><!></label> <input/> <!>`, 1);
30549
+ var root_3$6 = /* @__PURE__ */ from_html(`<label><!></label> <textarea></textarea>`, 1);
30550
+ var root_4$3 = /* @__PURE__ */ from_html(`<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>`);
30551
+ var root_5$2 = /* @__PURE__ */ from_html(`<label><!></label> <input/> <!>`, 1);
30311
30552
  var root_6$1 = /* @__PURE__ */ from_html(`<label><input/> <span class="go-checkbox-label"><!></span></label>`);
30312
30553
  var root_7$1 = /* @__PURE__ */ from_html(`<img src="" alt=""/> <option> </option>`, 1);
30313
30554
  var root_8$1 = /* @__PURE__ */ from_html(`<option disabled="" hidden="" selected=""> </option> <!>`, 1);
@@ -30357,7 +30598,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
30357
30598
  append($$anchor, fragment_1);
30358
30599
  };
30359
30600
  const textarea = ($$anchor) => {
30360
- var fragment_2 = root_3$5();
30601
+ var fragment_2 = root_3$6();
30361
30602
  var label_2 = first_child(fragment_2);
30362
30603
  labelText(child(label_2));
30363
30604
  reset(label_2);
@@ -30378,7 +30619,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
30378
30619
  append($$anchor, fragment_2);
30379
30620
  };
30380
30621
  const file = ($$anchor) => {
30381
- var fragment_3 = root_5$1();
30622
+ var fragment_3 = root_5$2();
30382
30623
  var label_3 = first_child(fragment_3);
30383
30624
  labelText(child(label_3));
30384
30625
  reset(label_3);
@@ -30400,7 +30641,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
30400
30641
  }), void 0, void 0, void 0, void 0, true);
30401
30642
  var node_4 = sibling(input_2, 2);
30402
30643
  var consequent_1 = ($$anchor) => {
30403
- var figure = root_4$2();
30644
+ var figure = root_4$3();
30404
30645
  var img = child(figure);
30405
30646
  var figcaption = sibling(img, 2);
30406
30647
  var text_1 = child(figcaption, true);
@@ -30717,7 +30958,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
30717
30958
  var root$14 = /* @__PURE__ */ from_html(`<span> </span>`);
30718
30959
  var root_1$6 = /* @__PURE__ */ from_html(`<li> </li>`);
30719
30960
  var root_2$5 = /* @__PURE__ */ from_html(`<ul class="go-field-errors"></ul>`);
30720
- var root_3$4 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
30961
+ var root_3$5 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
30721
30962
  function Field($$anchor, $$props) {
30722
30963
  push($$props, true);
30723
30964
  let key = prop($$props, "key", 7), required = prop($$props, "required", 7, false), labelClass = prop($$props, "labelClass", 7), inputClass = prop($$props, "inputClass", 7);
@@ -30775,7 +31016,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
30775
31016
  flushSync();
30776
31017
  }
30777
31018
  };
30778
- var fragment = root_3$4();
31019
+ var fragment = root_3$5();
30779
31020
  var node = first_child(fragment);
30780
31021
  InputAndLabel(node, {
30781
31022
  get describedByIds() {
@@ -30875,7 +31116,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
30875
31116
  var root$12 = /* @__PURE__ */ from_html(`<p aria-hidden="true"> </p>`);
30876
31117
  var root_1$5 = /* @__PURE__ */ from_html(`<li> </li>`);
30877
31118
  var root_2$4 = /* @__PURE__ */ from_html(`<ul class="go-error-feedback-api-errors"></ul>`);
30878
- var root_3$3 = /* @__PURE__ */ from_html(`<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>`);
31119
+ var root_3$4 = /* @__PURE__ */ from_html(`<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>`);
30879
31120
  function ErrorsFeedback($$anchor, $$props) {
30880
31121
  push($$props, true);
30881
31122
  const _details = getDetails$1($$props.$$host);
@@ -30896,7 +31137,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
30896
31137
  $$props.$$host.classList.toggle("go-feedback", true);
30897
31138
  $$props.$$host.setAttribute("data-num-errors", get$2(numErrors).toString());
30898
31139
  });
30899
- var div = root_3$3();
31140
+ var div = root_3$4();
30900
31141
  var p = child(div);
30901
31142
  var node = child(p);
30902
31143
  var consequent = ($$anchor) => {
@@ -32437,6 +32678,33 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32437
32678
  //#region src/components/ticketSelection/filters/_helpers.ts
32438
32679
  var TWO_HOURS_MS = 7200 * 1e3;
32439
32680
  /**
32681
+ * When a segment opts into content attributes (with-content), batch-fetch
32682
+ * tickets/content for the given tickets and merge each entry's `content` onto
32683
+ * the matching ticket by id (mirrors the legacy `ticket.content = item.content`).
32684
+ * Mutates the tickets in place; call before adding them to the preCart so the
32685
+ * content is present on first render. No-op — and no request — when the segment
32686
+ * hasn't enabled the feature or there are no tickets to enrich.
32687
+ *
32688
+ * Best-effort: the content is an optional, additive sidecar, so a failed or
32689
+ * absent fetch degrades to "no info buttons" and must never empty the ticket
32690
+ * list (see audit finding IB-01). Note this does NOT cover a hung request — a
32691
+ * never-settling fetch is a separate core-infra concern (IB-05).
32692
+ */
32693
+ async function enrichTicketsWithContent(segment, tickets) {
32694
+ if (!segment.withContent) return;
32695
+ const ids = tickets.map((t) => t.id).filter((id) => typeof id === "number");
32696
+ if (!ids.length) return;
32697
+ try {
32698
+ const entries = await shop.asyncFetch(() => shop.ticketsContent(ids)) ?? [];
32699
+ const byId = new Map(entries.map((e) => [e.id, e.content]));
32700
+ for (const ticket of tickets) {
32701
+ if (typeof ticket.id !== "number") continue;
32702
+ const content = byId.get(ticket.id);
32703
+ if (content) ticket.content = content;
32704
+ }
32705
+ } catch {}
32706
+ }
32707
+ /**
32440
32708
  * Load quotas fetched by a filter's loadTimeslots into the shared quota store and
32441
32709
  * record which ticket ids this selection loaded for its picker. timeslotsOn() reads
32442
32710
  * tsd.timeslotTicketIds, so only these tickets' slots render — a foreign
@@ -32512,6 +32780,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32512
32780
  }));
32513
32781
  shop.capacityManager.addQuotas(quotas);
32514
32782
  const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, tsd.selectedTime), tsd.selectedTime);
32783
+ await enrichTicketsWithContent(segment, uiTickets);
32515
32784
  for (const ticket of uiTickets) segment.preCart.addItem(createCartItem(ticket, { time: tsd.selectedTime }));
32516
32785
  }
32517
32786
  },
@@ -32543,6 +32812,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32543
32812
  const firstQuota = Object.values(quotas)[0];
32544
32813
  const timeslot = firstQuota ? Object.keys(firstQuota.capacities)[0] : void 0;
32545
32814
  const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, timeslot), timeslot);
32815
+ await enrichTicketsWithContent(segment, uiTickets);
32546
32816
  for (const ticket of uiTickets) segment.preCart.addItem(createCartItem(ticket, { time: timeslot }));
32547
32817
  }
32548
32818
  },
@@ -32564,7 +32834,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32564
32834
  "by_ticket_ids[]": tsd.ticketIds,
32565
32835
  "by_ticket_group_ids[]": segment.ticketGroupIds ?? tsd.ticketGroupIds
32566
32836
  }));
32567
- for (const t of Object.values(tickets)) segment.preCart.addItem(createCartItem(createUITicket(t)));
32837
+ const uiTickets = Object.values(tickets).map((t) => createUITicket(t));
32838
+ await enrichTicketsWithContent(segment, uiTickets);
32839
+ for (const ticket of uiTickets) segment.preCart.addItem(createCartItem(ticket));
32568
32840
  }
32569
32841
  },
32570
32842
  "event:admission": {
@@ -32603,6 +32875,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32603
32875
  }));
32604
32876
  shop.capacityManager.addQuotas(quotas);
32605
32877
  const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, tsd.selectedTime), tsd.selectedTime);
32878
+ await enrichTicketsWithContent(segment, uiTickets);
32606
32879
  for (const ticket of uiTickets) segment.preCart.addItem(createCartItem(ticket, { time: tsd.selectedTime }));
32607
32880
  }
32608
32881
  },
@@ -32635,6 +32908,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32635
32908
  const firstQuota = Object.values(quotas)[0];
32636
32909
  const time = firstQuota ? Object.keys(firstQuota.capacities)[0] : void 0;
32637
32910
  const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, time), time);
32911
+ await enrichTicketsWithContent(segment, uiTickets);
32638
32912
  for (const t of uiTickets) segment.preCart.addItem(createCartItem(t, { time }));
32639
32913
  }
32640
32914
  },
@@ -32683,6 +32957,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32683
32957
  }));
32684
32958
  shop.capacityManager.addQuotas(quotas);
32685
32959
  const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, tsd.selectedTime), tsd.selectedTime);
32960
+ await enrichTicketsWithContent(segment, uiTickets);
32686
32961
  for (const t of uiTickets) segment.preCart.addItem(createCartItem(t, { time: tsd.selectedTime }));
32687
32962
  }
32688
32963
  },
@@ -32750,6 +33025,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32750
33025
  }));
32751
33026
  shop.capacityManager.addQuotas(quotas);
32752
33027
  const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, date.start_time), date.start_time);
33028
+ await enrichTicketsWithContent(segment, uiTickets);
32753
33029
  for (const ticket of uiTickets) segment.preCart.addItem(createCartItem(ticket, { time: date.start_time }));
32754
33030
  }
32755
33031
  }
@@ -32795,6 +33071,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32795
33071
  const firstQuota = Object.values(quotas)[0];
32796
33072
  const time = firstQuota ? Object.keys(firstQuota.capacities)[0] : date.start_time;
32797
33073
  const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, time), time);
33074
+ await enrichTicketsWithContent(segment, uiTickets);
32798
33075
  for (const t of uiTickets) segment.preCart.addItem(createCartItem(t, { time }));
32799
33076
  }
32800
33077
  }
@@ -32838,6 +33115,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32838
33115
  }));
32839
33116
  shop.capacityManager.addQuotas(quotas);
32840
33117
  const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, date.start_time), date.start_time);
33118
+ await enrichTicketsWithContent(segment, uiTickets);
32841
33119
  for (const t of uiTickets) segment.preCart.addItem(createCartItem(t, { time: date.start_time }));
32842
33120
  }
32843
33121
  }
@@ -33287,7 +33565,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33287
33565
  var root$9 = /* @__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);
33288
33566
  var root_1$4 = /* @__PURE__ */ from_html(`<br/> <span class="go-order-item-quantities"> </span>`, 1);
33289
33567
  var root_2$3 = /* @__PURE__ */ from_html(`<a aria-label="iCal link"> </a>`);
33290
- var root_3$2 = /* @__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>`);
33568
+ var root_3$3 = /* @__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>`);
33291
33569
  function Event$1($$anchor, $$props) {
33292
33570
  push($$props, true);
33293
33571
  let item = prop($$props, "item", 7), orderDetails = prop($$props, "orderDetails", 7);
@@ -33307,7 +33585,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33307
33585
  flushSync();
33308
33586
  }
33309
33587
  };
33310
- var li = root_3$2();
33588
+ var li = root_3$3();
33311
33589
  var article = child(li);
33312
33590
  var ul = child(article);
33313
33591
  var li_1 = sibling(child(ul), 2);
@@ -33392,9 +33670,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33392
33670
  var root$8 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>`, 1);
33393
33671
  var root_1$3 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span>`);
33394
33672
  var root_2$2 = /* @__PURE__ */ from_html(`<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>`, 1);
33395
- var root_3$1 = /* @__PURE__ */ from_html(`<br/> <a class="go-ticket-personalization"> </a>`, 1);
33396
- var root_4$1 = /* @__PURE__ */ from_html(`<a aria-label="passbook link"><img alt="apple wallet icon"/></a>`);
33397
- var root_5 = /* @__PURE__ */ from_html(`<a aria-label="iCal link"> </a>`);
33673
+ var root_3$2 = /* @__PURE__ */ from_html(`<br/> <a class="go-ticket-personalization"> </a>`, 1);
33674
+ var root_4$2 = /* @__PURE__ */ from_html(`<a aria-label="passbook link"><img alt="apple wallet icon"/></a>`);
33675
+ var root_5$1 = /* @__PURE__ */ from_html(`<a aria-label="iCal link"> </a>`);
33398
33676
  var root_6 = /* @__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> <li class="go-order-breakdown-ical"><!></li></ul></article></li>`);
33399
33677
  var root_7 = /* @__PURE__ */ from_html(`<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>`);
33400
33678
  var root_8 = /* @__PURE__ */ from_html(`<a class="go-ticket-personalization"> </a>`);
@@ -33479,7 +33757,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33479
33757
  append($$anchor, fragment_2);
33480
33758
  };
33481
33759
  var alternate = ($$anchor) => {
33482
- var fragment_4 = root_3$1();
33760
+ var fragment_4 = root_3$2();
33483
33761
  var a_1 = sibling(first_child(fragment_4), 2);
33484
33762
  var text_5 = child(a_1, true);
33485
33763
  reset(a_1);
@@ -33500,7 +33778,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33500
33778
  var li_4 = sibling(li_3, 2);
33501
33779
  var node_4 = child(li_4);
33502
33780
  var consequent_3 = ($$anchor) => {
33503
- var a_2 = root_4$1();
33781
+ var a_2 = root_4$2();
33504
33782
  var img = child(a_2);
33505
33783
  reset(a_2);
33506
33784
  template_effect(() => {
@@ -33516,7 +33794,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33516
33794
  var li_5 = sibling(li_4, 2);
33517
33795
  var node_5 = child(li_5);
33518
33796
  var consequent_4 = ($$anchor) => {
33519
- var a_3 = root_5();
33797
+ var a_3 = root_5$1();
33520
33798
  var text_7 = child(a_3, true);
33521
33799
  reset(a_3);
33522
33800
  template_effect(($0) => {
@@ -34086,6 +34364,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
34086
34364
  set museumIds(value) {
34087
34365
  set(this.#museumIds, value, true);
34088
34366
  }
34367
+ #withContent = /* @__PURE__ */ state(false);
34368
+ get withContent() {
34369
+ return get$2(this.#withContent);
34370
+ }
34371
+ set withContent(value) {
34372
+ set(this.#withContent, value, true);
34373
+ }
34089
34374
  constructor(filters, tsdWrapper) {
34090
34375
  this.filters = filters === void 0 ? void 0 : Array.isArray(filters) ? filters : [filters];
34091
34376
  this.#ticketSelectionDetails = /* @__PURE__ */ user_derived(() => tsdWrapper.value);
@@ -34116,7 +34401,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
34116
34401
  //#region src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/TicketSegment.svelte
34117
34402
  function TicketSegment($$anchor, $$props) {
34118
34403
  push($$props, true);
34119
- const filters = prop($$props, "filters", 7), dateId = prop($$props, "dateId", 7), query = prop($$props, "query", 7), limit = prop($$props, "limit", 7), ticketGroupIds = prop($$props, "ticketGroupIds", 7), languageIds = prop($$props, "languageIds", 7), catchWordIds = prop($$props, "catchWordIds", 7), museumIds = prop($$props, "museumIds", 7);
34404
+ const filters = prop($$props, "filters", 7), dateId = prop($$props, "dateId", 7), query = prop($$props, "query", 7), limit = prop($$props, "limit", 7), ticketGroupIds = prop($$props, "ticketGroupIds", 7), languageIds = prop($$props, "languageIds", 7), catchWordIds = prop($$props, "catchWordIds", 7), museumIds = prop($$props, "museumIds", 7), withContent = prop($$props, "withContent", 7);
34120
34405
  function parseFilters(value) {
34121
34406
  if (!value) return void 0;
34122
34407
  const out = value.split(",").map((s) => s.trim()).filter(Boolean);
@@ -34135,6 +34420,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
34135
34420
  details.languageIds = parseIds(languageIds());
34136
34421
  details.catchWordIds = parseIds(catchWordIds());
34137
34422
  details.museumIds = parseIds(museumIds());
34423
+ details.withContent = Boolean(withContent());
34138
34424
  });
34139
34425
  user_effect(() => {
34140
34426
  details.dateId;
@@ -34145,6 +34431,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
34145
34431
  details.catchWordIds;
34146
34432
  details.query;
34147
34433
  details.limit;
34434
+ details.withContent;
34148
34435
  tsd?.filters;
34149
34436
  tsd?.selectedTimeslot;
34150
34437
  tsd?.selectedTime;
@@ -34219,6 +34506,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
34219
34506
  set museumIds($$value) {
34220
34507
  museumIds($$value);
34221
34508
  flushSync();
34509
+ },
34510
+ get withContent() {
34511
+ return withContent();
34512
+ },
34513
+ set withContent($$value) {
34514
+ withContent($$value);
34515
+ flushSync();
34222
34516
  }
34223
34517
  });
34224
34518
  }
@@ -34262,6 +34556,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
34262
34556
  attribute: "museum-ids",
34263
34557
  reflect: true,
34264
34558
  type: "String"
34559
+ },
34560
+ withContent: {
34561
+ attribute: "with-content",
34562
+ reflect: true,
34563
+ type: "Boolean"
34265
34564
  }
34266
34565
  }, [], ["details"]));
34267
34566
  //#endregion
@@ -36132,9 +36431,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
36132
36431
  //#endregion
36133
36432
  //#region src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/Item.svelte
36134
36433
  var root$3 = /* @__PURE__ */ from_html(`<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>`, 1);
36135
- var root_1$2 = /* @__PURE__ */ from_html(`<option> </option>`);
36136
- var root_2$1 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-tickets-item-title"><!></li> <li class="go-tickets-item-description" data-go-tickets-description=""></li> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><select class="go-tickets-item-select"></select></li></ul></article></li>`);
36434
+ var root_1$2 = /* @__PURE__ */ from_html(`<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>`);
36435
+ var root_2$1 = /* @__PURE__ */ from_html(`<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>`);
36436
+ var root_3$1 = /* @__PURE__ */ from_html(`<option> </option>`);
36437
+ var root_4$1 = /* @__PURE__ */ from_html(`<select class="go-tickets-item-select"></select>`);
36438
+ var root_5 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-tickets-item-title"><!></li> <!> <li class="go-tickets-item-description" data-go-tickets-description=""></li> <!> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><!></li></ul></article></li>`);
36137
36439
  function Item($$anchor, $$props) {
36440
+ const uid = props_id();
36138
36441
  push($$props, true);
36139
36442
  const scaled_title = ($$anchor) => {
36140
36443
  var fragment = root$3();
@@ -36157,7 +36460,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
36157
36460
  append($$anchor, text_2);
36158
36461
  };
36159
36462
  let item = prop($$props, "item", 7), details = prop($$props, "details", 7);
36463
+ const useStepper = /* @__PURE__ */ user_derived(() => configStore.config.quantityStepper);
36160
36464
  let capacity = /* @__PURE__ */ state(void 0);
36465
+ let infoExpanded = /* @__PURE__ */ state(false);
36466
+ const reductionReason = /* @__PURE__ */ user_derived(() => item().product?.content?.reduction_reason);
36467
+ const infoPanelId = `go-ticket-info-${uid}`;
36161
36468
  user_effect(() => {
36162
36469
  details().preCart.items.map((i) => i.quantity);
36163
36470
  untrack(() => {
@@ -36187,55 +36494,122 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
36187
36494
  };
36188
36495
  var fragment_2 = comment();
36189
36496
  var node = first_child(fragment_2);
36190
- var consequent = ($$anchor) => {
36191
- var li = root_2$1();
36497
+ var consequent_3 = ($$anchor) => {
36498
+ var li = root_5();
36192
36499
  var article = child(li);
36193
36500
  var ul = child(article);
36194
36501
  var li_1 = child(ul);
36195
36502
  var node_1 = child(li_1);
36196
36503
  titleSnippet(node_1);
36197
36504
  reset(li_1);
36198
- var li_2 = sibling(li_1, 2);
36199
- html$2(li_2, () => purify.sanitize(item().product.description), true);
36200
- reset(li_2);
36201
- var li_3 = sibling(li_2, 2);
36202
- var text_3 = child(li_3, true);
36505
+ var node_2 = sibling(li_1, 2);
36506
+ var consequent = ($$anchor) => {
36507
+ var li_2 = root_1$2();
36508
+ var button = child(li_2);
36509
+ reset(li_2);
36510
+ template_effect(($0) => {
36511
+ set_class(button, 1, clsx(["go-ticket-info-icon", get$2(infoExpanded) && "is-active"]));
36512
+ set_attribute(button, "aria-expanded", get$2(infoExpanded));
36513
+ set_attribute(button, "aria-controls", infoPanelId);
36514
+ set_attribute(button, "aria-label", $0);
36515
+ }, [() => shop.t("ticket.list.additionalInfo")]);
36516
+ delegated("click", button, () => set(infoExpanded, !get$2(infoExpanded)));
36517
+ append($$anchor, li_2);
36518
+ };
36519
+ if_block(node_2, ($$render) => {
36520
+ if (get$2(reductionReason)) $$render(consequent);
36521
+ });
36522
+ var li_3 = sibling(node_2, 2);
36523
+ html$2(li_3, () => purify.sanitize(item().product.description), true);
36203
36524
  reset(li_3);
36204
- var li_4 = sibling(li_3, 2);
36205
- var select = child(li_4);
36206
- each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max), (q) => q.value, ($$anchor, q) => {
36207
- var option = root_1$2();
36208
- var text_4 = child(option, true);
36209
- reset(option);
36210
- var option_value = {};
36211
- template_effect(() => {
36212
- set_selected(option, item().quantity === get$2(q).value);
36213
- set_text(text_4, get$2(q).label);
36214
- if (option_value !== (option_value = get$2(q).value)) option.value = (option.__value = get$2(q).value) ?? "";
36525
+ var node_3 = sibling(li_3, 2);
36526
+ var consequent_1 = ($$anchor) => {
36527
+ var li_4 = root_2$1();
36528
+ var text_3 = child(li_4, true);
36529
+ reset(li_4);
36530
+ template_effect(($0) => {
36531
+ set_attribute(li_4, "id", infoPanelId);
36532
+ set_attribute(li_4, "hidden", !get$2(infoExpanded));
36533
+ set_text(text_3, $0);
36534
+ }, [() => shop.t(get$2(reductionReason))]);
36535
+ append($$anchor, li_4);
36536
+ };
36537
+ if_block(node_3, ($$render) => {
36538
+ if (get$2(reductionReason)) $$render(consequent_1);
36539
+ });
36540
+ var li_5 = sibling(node_3, 2);
36541
+ var text_4 = child(li_5, true);
36542
+ reset(li_5);
36543
+ var li_6 = sibling(li_5, 2);
36544
+ var node_4 = child(li_6);
36545
+ var consequent_2 = ($$anchor) => {
36546
+ {
36547
+ let $0 = /* @__PURE__ */ user_derived(() => shop.t("quantity.decrease"));
36548
+ let $1 = /* @__PURE__ */ user_derived(() => shop.t("quantity.increase"));
36549
+ QuantityStepper($$anchor, {
36550
+ get value() {
36551
+ return item().quantity;
36552
+ },
36553
+ get min() {
36554
+ return get$2(capacity).min;
36555
+ },
36556
+ get max() {
36557
+ return get$2(capacity).max;
36558
+ },
36559
+ get label() {
36560
+ return item().product.title;
36561
+ },
36562
+ get decreaseLabel() {
36563
+ return get$2($0);
36564
+ },
36565
+ get increaseLabel() {
36566
+ return get$2($1);
36567
+ },
36568
+ onChange: (q) => item().quantity = q
36569
+ });
36570
+ }
36571
+ };
36572
+ var alternate = ($$anchor) => {
36573
+ var select = root_4$1();
36574
+ each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max), (q) => q.value, ($$anchor, q) => {
36575
+ var option = root_3$1();
36576
+ var text_5 = child(option, true);
36577
+ reset(option);
36578
+ var option_value = {};
36579
+ template_effect(() => {
36580
+ set_selected(option, item().quantity === get$2(q).value);
36581
+ set_text(text_5, get$2(q).label);
36582
+ if (option_value !== (option_value = get$2(q).value)) option.value = (option.__value = get$2(q).value) ?? "";
36583
+ });
36584
+ append($$anchor, option);
36215
36585
  });
36216
- append($$anchor, option);
36586
+ reset(select);
36587
+ template_effect(($0) => set_attribute(select, "aria-label", $0), [() => shop.t("cart.content.table.edit")]);
36588
+ delegated("change", select, (e) => update(item(), e.target, details()?.ticketSelectionDetails));
36589
+ append($$anchor, select);
36590
+ };
36591
+ if_block(node_4, ($$render) => {
36592
+ if (get$2(useStepper)) $$render(consequent_2);
36593
+ else $$render(alternate, -1);
36217
36594
  });
36218
- reset(select);
36219
- reset(li_4);
36595
+ reset(li_6);
36220
36596
  reset(ul);
36221
36597
  reset(article);
36222
36598
  reset(li);
36223
- template_effect(($0) => {
36599
+ template_effect(() => {
36224
36600
  set_class(article, 1, clsx(["go-tickets-item", get$2(capacity).bookedOut && "is-booked-out"]));
36225
36601
  set_attribute(article, "data-testid", item().uuid);
36226
- set_text(text_3, item().price_formatted);
36227
- set_attribute(select, "aria-label", $0);
36228
- }, [() => shop.t("cart.content.table.edit")]);
36229
- delegated("change", select, (e) => update(item(), e.target, details()?.ticketSelectionDetails));
36602
+ set_text(text_4, item().price_formatted);
36603
+ });
36230
36604
  append($$anchor, li);
36231
36605
  };
36232
36606
  if_block(node, ($$render) => {
36233
- if (get$2(capacity) && !get$2(capacity).unavailable) $$render(consequent);
36607
+ if (get$2(capacity) && !get$2(capacity).unavailable) $$render(consequent_3);
36234
36608
  });
36235
36609
  append($$anchor, fragment_2);
36236
36610
  return pop($$exports);
36237
36611
  }
36238
- delegate(["change"]);
36612
+ delegate(["click", "change"]);
36239
36613
  create_custom_element(Item, {
36240
36614
  item: {},
36241
36615
  details: {}