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