@gomusdev/web-components 1.46.0 → 1.48.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.
@@ -4250,15 +4250,15 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
4250
4250
  if (!is_array(value)) {
4251
4251
  return select_multiple_invalid_value();
4252
4252
  }
4253
- for (var option of select.options) {
4254
- option.selected = value.includes(get_option_value(option));
4253
+ for (var option2 of select.options) {
4254
+ option2.selected = value.includes(get_option_value(option2));
4255
4255
  }
4256
4256
  return;
4257
4257
  }
4258
- for (option of select.options) {
4259
- var option_value = get_option_value(option);
4258
+ for (option2 of select.options) {
4259
+ var option_value = get_option_value(option2);
4260
4260
  if (is(option_value, value)) {
4261
- option.selected = true;
4261
+ option2.selected = true;
4262
4262
  return;
4263
4263
  }
4264
4264
  }
@@ -4327,11 +4327,11 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
4327
4327
  });
4328
4328
  init_select(select);
4329
4329
  }
4330
- function get_option_value(option) {
4331
- if ("__value" in option) {
4332
- return option.__value;
4330
+ function get_option_value(option2) {
4331
+ if ("__value" in option2) {
4332
+ return option2.__value;
4333
4333
  } else {
4334
- return option.value;
4334
+ return option2.value;
4335
4335
  }
4336
4336
  }
4337
4337
  const CLASS = /* @__PURE__ */ Symbol("class");
@@ -4359,6 +4359,16 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
4359
4359
  queue_micro_task(remove_defaults);
4360
4360
  add_form_reset_listener();
4361
4361
  }
4362
+ function set_value(element, value) {
4363
+ var attributes = get_attributes(element);
4364
+ if (attributes.value === (attributes.value = // treat null and undefined the same for the initial value
4365
+ value ?? void 0) || // @ts-expect-error
4366
+ // `progress` elements always need their value set when it's `0`
4367
+ element.value === value && (value !== 0 || element.nodeName !== "PROGRESS")) {
4368
+ return;
4369
+ }
4370
+ element.value = value ?? "";
4371
+ }
4362
4372
  function set_selected(element, selected) {
4363
4373
  if (selected) {
4364
4374
  if (!element.hasAttribute("selected")) {
@@ -6440,8 +6450,8 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
6440
6450
  promise() {
6441
6451
  return ZodPromise.create(this, this._def);
6442
6452
  }
6443
- or(option) {
6444
- return ZodUnion$1.create([this, option], this._def);
6453
+ or(option2) {
6454
+ return ZodUnion$1.create([this, option2], this._def);
6445
6455
  }
6446
6456
  and(incoming) {
6447
6457
  return ZodIntersection$1.create(this, incoming, this._def);
@@ -8203,7 +8213,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
8203
8213
  return INVALID;
8204
8214
  }
8205
8215
  if (ctx.common.async) {
8206
- return Promise.all(options.map(async (option) => {
8216
+ return Promise.all(options.map(async (option2) => {
8207
8217
  const childCtx = {
8208
8218
  ...ctx,
8209
8219
  common: {
@@ -8213,7 +8223,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
8213
8223
  parent: null
8214
8224
  };
8215
8225
  return {
8216
- result: await option._parseAsync({
8226
+ result: await option2._parseAsync({
8217
8227
  data: ctx.data,
8218
8228
  path: ctx.path,
8219
8229
  parent: childCtx
@@ -8224,7 +8234,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
8224
8234
  } else {
8225
8235
  let dirty = void 0;
8226
8236
  const issues = [];
8227
- for (const option of options) {
8237
+ for (const option2 of options) {
8228
8238
  const childCtx = {
8229
8239
  ...ctx,
8230
8240
  common: {
@@ -8233,7 +8243,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
8233
8243
  },
8234
8244
  parent: null
8235
8245
  };
8236
- const result = option._parseSync({
8246
+ const result = option2._parseSync({
8237
8247
  data: ctx.data,
8238
8248
  path: ctx.path,
8239
8249
  parent: childCtx
@@ -8314,8 +8324,8 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
8314
8324
  }
8315
8325
  const discriminator = this.discriminator;
8316
8326
  const discriminatorValue = ctx.data[discriminator];
8317
- const option = this.optionsMap.get(discriminatorValue);
8318
- if (!option) {
8327
+ const option2 = this.optionsMap.get(discriminatorValue);
8328
+ if (!option2) {
8319
8329
  addIssueToContext(ctx, {
8320
8330
  code: ZodIssueCode.invalid_union_discriminator,
8321
8331
  options: Array.from(this.optionsMap.keys()),
@@ -8324,13 +8334,13 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
8324
8334
  return INVALID;
8325
8335
  }
8326
8336
  if (ctx.common.async) {
8327
- return option._parseAsync({
8337
+ return option2._parseAsync({
8328
8338
  data: ctx.data,
8329
8339
  path: ctx.path,
8330
8340
  parent: ctx
8331
8341
  });
8332
8342
  } else {
8333
- return option._parseSync({
8343
+ return option2._parseSync({
8334
8344
  data: ctx.data,
8335
8345
  path: ctx.path,
8336
8346
  parent: ctx
@@ -12884,7 +12894,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
12884
12894
  const setPersonalizationDetails = createSetDetails(KEY$4);
12885
12895
  const getPersonalizationDetails = createGetDetails(KEY$4);
12886
12896
  var root_3$9 = /* @__PURE__ */ from_html(`<li><a> </a></li>`);
12887
- var root_2$q = /* @__PURE__ */ from_html(`<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>`);
12897
+ var root_2$r = /* @__PURE__ */ from_html(`<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>`);
12888
12898
  function AnnualTicketPersonalization($$anchor, $$props) {
12889
12899
  push($$props, true);
12890
12900
  let token = prop($$props, "token", 7);
@@ -12911,7 +12921,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
12911
12921
  var fragment_1 = comment();
12912
12922
  var node_1 = first_child(fragment_1);
12913
12923
  each(node_1, 17, () => get$2(order).ticket_sales, (ticketSale) => ticketSale.id, ($$anchor3, ticketSale) => {
12914
- var ul = root_2$q();
12924
+ var ul = root_2$r();
12915
12925
  var li = child(ul);
12916
12926
  var text2 = child(li, true);
12917
12927
  reset(li);
@@ -14071,7 +14081,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
14071
14081
  defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
14072
14082
  defineLazy(inst._zod, "values", () => {
14073
14083
  if (def.options.every((o) => o._zod.values)) {
14074
- return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
14084
+ return new Set(def.options.flatMap((option2) => Array.from(option2._zod.values)));
14075
14085
  }
14076
14086
  return void 0;
14077
14087
  });
@@ -14090,8 +14100,8 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
14090
14100
  }
14091
14101
  let async = false;
14092
14102
  const results = [];
14093
- for (const option of def.options) {
14094
- const result = option._zod.run({
14103
+ for (const option2 of def.options) {
14104
+ const result = option2._zod.run({
14095
14105
  value: payload.value,
14096
14106
  issues: []
14097
14107
  }, ctx);
@@ -15261,8 +15271,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15261
15271
  return false;
15262
15272
  }
15263
15273
  if (def.type === "union") {
15264
- for (const option of def.options) {
15265
- if (isTransforming(option, ctx))
15274
+ for (const option2 of def.options) {
15275
+ if (isTransforming(option2, ctx))
15266
15276
  return true;
15267
15277
  }
15268
15278
  return false;
@@ -16531,7 +16541,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16531
16541
  host.replaceChildren(element);
16532
16542
  return element;
16533
16543
  }
16534
- var root_1$j = /* @__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);
16544
+ var root_1$m = /* @__PURE__ */ from_html(`<go-all-fields></go-all-fields> <go-form-feedback><go-errors-feedback></go-errors-feedback> <go-success-feedback></go-success-feedback></go-form-feedback> <go-submit> </go-submit>`, 3);
16535
16545
  function Form($$anchor, $$props) {
16536
16546
  push($$props, true);
16537
16547
  let formId = prop($$props, "formId", 7), custom2 = prop($$props, "custom", 7);
@@ -16574,7 +16584,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16574
16584
  var node = first_child(fragment);
16575
16585
  {
16576
16586
  var consequent = ($$anchor2) => {
16577
- var fragment_1 = root_1$j();
16587
+ var fragment_1 = root_1$m();
16578
16588
  var go_all_fields = first_child(fragment_1);
16579
16589
  var go_form_feedback = sibling(go_all_fields, 2);
16580
16590
  var go_submit = sibling(go_form_feedback, 2);
@@ -16601,7 +16611,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16601
16611
  [],
16602
16612
  ["details"]
16603
16613
  ));
16604
- var root$a = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
16614
+ var root$c = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
16605
16615
  function PasswordReset($$anchor, $$props) {
16606
16616
  push($$props, true);
16607
16617
  let custom2 = prop($$props, "custom", 7, false);
@@ -16631,7 +16641,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16631
16641
  flushSync();
16632
16642
  }
16633
16643
  };
16634
- var go_form = root$a();
16644
+ var go_form = root$c();
16635
16645
  set_custom_element_data(go_form, "formId", "passwordReset");
16636
16646
  template_effect(() => set_custom_element_data(go_form, "custom", custom2()));
16637
16647
  event("submit", go_form, passwordReset);
@@ -16735,8 +16745,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16735
16745
  [],
16736
16746
  []
16737
16747
  ));
16738
- var root_1$i = /* @__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);
16739
- var root$9 = /* @__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);
16748
+ var root_1$l = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span><span class="go-cart-item-time" data-testid="cart-item-time"> </span>`, 1);
16749
+ var root$b = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"><span class="go-cart-item-title-event-title"> </span><span class="go-cart-item-title-ticket-title"> </span></span><!>`, 1);
16740
16750
  function Event$2($$anchor, $$props) {
16741
16751
  push($$props, true);
16742
16752
  let cartItem = prop($$props, "cartItem", 7);
@@ -16751,7 +16761,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16751
16761
  flushSync();
16752
16762
  }
16753
16763
  };
16754
- var fragment = root$9();
16764
+ var fragment = root$b();
16755
16765
  var span = first_child(fragment);
16756
16766
  var span_1 = child(span);
16757
16767
  var text2 = child(span_1, true);
@@ -16763,7 +16773,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16763
16773
  var node = sibling(span);
16764
16774
  {
16765
16775
  var consequent = ($$anchor2) => {
16766
- var fragment_1 = root_1$i();
16776
+ var fragment_1 = root_1$l();
16767
16777
  var span_3 = first_child(fragment_1);
16768
16778
  var text_2 = child(span_3, true);
16769
16779
  reset(span_3);
@@ -16794,9 +16804,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16794
16804
  return pop($$exports);
16795
16805
  }
16796
16806
  create_custom_element(Event$2, { cartItem: {} }, [], [], { mode: "open" });
16797
- var root_2$p = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
16798
- var root_1$h = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>`, 1);
16799
- var root$8 = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>`, 1);
16807
+ var root_2$q = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
16808
+ var root_1$k = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>`, 1);
16809
+ var root$a = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>`, 1);
16800
16810
  function Ticket($$anchor, $$props) {
16801
16811
  push($$props, true);
16802
16812
  let cartItem = prop($$props, "cartItem", 7);
@@ -16809,21 +16819,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16809
16819
  flushSync();
16810
16820
  }
16811
16821
  };
16812
- var fragment = root$8();
16822
+ var fragment = root$a();
16813
16823
  var span = first_child(fragment);
16814
16824
  var text2 = child(span, true);
16815
16825
  reset(span);
16816
16826
  var node = sibling(span, 2);
16817
16827
  {
16818
16828
  var consequent_1 = ($$anchor2) => {
16819
- var fragment_1 = root_1$h();
16829
+ var fragment_1 = root_1$k();
16820
16830
  var span_1 = first_child(fragment_1);
16821
16831
  var text_1 = child(span_1, true);
16822
16832
  reset(span_1);
16823
16833
  var node_1 = sibling(span_1, 2);
16824
16834
  {
16825
16835
  var consequent = ($$anchor3) => {
16826
- var span_2 = root_2$p();
16836
+ var span_2 = root_2$q();
16827
16837
  var text_2 = child(span_2, true);
16828
16838
  reset(span_2);
16829
16839
  template_effect(($0) => set_text(text_2, $0), [() => formatTime(cartItem().time)]);
@@ -16847,29 +16857,30 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16847
16857
  return pop($$exports);
16848
16858
  }
16849
16859
  create_custom_element(Ticket, { cartItem: {} }, [], [], { mode: "open" });
16850
- function generateQuantityOptions(min2, max2) {
16851
- let options = [{ value: 0, label: "0" }];
16852
- if (max2 === 0) {
16853
- return options;
16860
+ function generateQuantityOptions(from, to, options = { floor: 0 }) {
16861
+ const { floor: floor2 } = options;
16862
+ if (to === 0 || to === floor2) {
16863
+ return [option(floor2)];
16854
16864
  }
16855
- if (max2 < min2) {
16856
- max2 = min2;
16857
- options = [];
16865
+ if (to < from) {
16866
+ return from > floor2 ? [option(from)] : [];
16858
16867
  }
16859
- for (let quantity = min2; quantity <= max2; quantity++) {
16860
- if (quantity == 0) continue;
16861
- options.push({
16862
- value: quantity,
16863
- label: quantity.toString()
16864
- });
16868
+ const start = Math.max(from, floor2);
16869
+ const result = [option(floor2)];
16870
+ for (let q = start; q <= to; q++) {
16871
+ if (q === floor2) continue;
16872
+ result.push(option(q));
16865
16873
  }
16866
- return options;
16874
+ return result;
16875
+ }
16876
+ function option(value) {
16877
+ return { value, label: value.toString() };
16867
16878
  }
16868
16879
  var root_5$2 = /* @__PURE__ */ from_html(`<span> </span>`);
16869
16880
  var root_7$3 = /* @__PURE__ */ from_html(`<option> </option>`);
16870
16881
  var root_6$2 = /* @__PURE__ */ from_html(`<select></select>`);
16871
16882
  var root_8$2 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove" data-go-cart-item-remove=""><button>⨉</button></li>`);
16872
- var root_1$g = /* @__PURE__ */ from_html(`<article><ul><li data-go-cart-item-title=""><!></li> <li class="go-cart-item-price" data-go-cart-item-price=""> </li> <li class="go-cart-item-count" data-go-cart-item-count=""><!></li> <!> <li class="go-cart-item-sum" data-go-cart-item-sum=""> </li></ul></article>`);
16883
+ var root_1$j = /* @__PURE__ */ from_html(`<article><ul><li data-go-cart-item-title=""><!></li> <li class="go-cart-item-price" data-go-cart-item-price=""> </li> <li class="go-cart-item-count" data-go-cart-item-count=""><!></li> <!> <li class="go-cart-item-sum" data-go-cart-item-sum=""> </li></ul></article>`);
16873
16884
  function Item$1($$anchor, $$props) {
16874
16885
  push($$props, true);
16875
16886
  let cartItem = prop($$props, "cartItem", 7), cart = prop($$props, "cart", 7), preview = prop($$props, "preview", 7);
@@ -16912,7 +16923,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16912
16923
  var node = first_child(fragment);
16913
16924
  {
16914
16925
  var consequent_4 = ($$anchor2) => {
16915
- var article = root_1$g();
16926
+ var article = root_1$j();
16916
16927
  var ul = child(article);
16917
16928
  var li = child(ul);
16918
16929
  var node_1 = child(li);
@@ -16967,19 +16978,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16967
16978
  var alternate_1 = ($$anchor3) => {
16968
16979
  var select = root_6$2();
16969
16980
  select.__change = (e) => update(cartItem(), e.target);
16970
- each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max), (q) => q.value, ($$anchor4, q) => {
16971
- var option = root_7$3();
16972
- var text_2 = child(option, true);
16973
- reset(option);
16981
+ each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max, { floor: 1 }), (q) => q.value, ($$anchor4, q) => {
16982
+ var option2 = root_7$3();
16983
+ var text_2 = child(option2, true);
16984
+ reset(option2);
16974
16985
  var option_value = {};
16975
16986
  template_effect(() => {
16976
- set_selected(option, cartItem().quantity === get$2(q).value);
16987
+ set_selected(option2, cartItem().quantity === get$2(q).value);
16977
16988
  set_text(text_2, get$2(q).label);
16978
16989
  if (option_value !== (option_value = get$2(q).value)) {
16979
- option.value = (option.__value = get$2(q).value) ?? "";
16990
+ option2.value = (option2.__value = get$2(q).value) ?? "";
16980
16991
  }
16981
16992
  });
16982
- append($$anchor4, option);
16993
+ append($$anchor4, option2);
16983
16994
  });
16984
16995
  reset(select);
16985
16996
  append($$anchor3, select);
@@ -17024,10 +17035,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17024
17035
  }
17025
17036
  delegate(["change", "click"]);
17026
17037
  create_custom_element(Item$1, { cartItem: {}, cart: {}, preview: {} }, [], [], { mode: "open" });
17027
- var root_2$o = /* @__PURE__ */ from_html(`<li class="go-cart-header-remove" data-go-cart-header-remove=""></li>`);
17038
+ var root_2$p = /* @__PURE__ */ from_html(`<li class="go-cart-header-remove" data-go-cart-header-remove=""></li>`);
17028
17039
  var root_3$8 = /* @__PURE__ */ from_html(`<li class="go-cart-item" data-go-cart-item=""><!></li>`);
17029
17040
  var root_4$6 = /* @__PURE__ */ from_html(`<li class="go-cart-footer-remove" data-go-cart-footer-remove=""></li>`);
17030
- var root_1$f = /* @__PURE__ */ from_html(`<ol data-testid="cart"><li class="go-cart-header" data-go-cart-header="" data-testid="cart-header"><ul><li class="go-cart-header-title" data-go-cart-header-title=""> </li> <li class="go-cart-header-price" data-go-cart-header-price=""> </li> <li class="go-cart-header-count" data-go-cart-header-count=""> </li> <!> <li class="go-cart-header-sum" data-go-cart-header-sum=""> </li></ul></li> <!> <li class="go-cart-footer" data-go-cart-footer="" data-testid="cart-footer"><ul><li class="go-cart-footer-title" data-go-cart-footer-title=""></li> <li class="go-cart-footer-price" data-go-cart-footer-price=""></li> <li class="go-cart-footer-count" data-go-cart-footer-count=""></li> <!> <li class="go-cart-footer-sum" data-go-cart-footer-sum="" data-go-cart-sum=""> </li></ul></li></ol>`);
17041
+ var root_1$i = /* @__PURE__ */ from_html(`<ol data-testid="cart"><li class="go-cart-header" data-go-cart-header="" data-testid="cart-header"><ul><li class="go-cart-header-title" data-go-cart-header-title=""> </li> <li class="go-cart-header-price" data-go-cart-header-price=""> </li> <li class="go-cart-header-count" data-go-cart-header-count=""> </li> <!> <li class="go-cart-header-sum" data-go-cart-header-sum=""> </li></ul></li> <!> <li class="go-cart-footer" data-go-cart-footer="" data-testid="cart-footer"><ul><li class="go-cart-footer-title" data-go-cart-footer-title=""></li> <li class="go-cart-footer-price" data-go-cart-footer-price=""></li> <li class="go-cart-footer-count" data-go-cart-footer-count=""></li> <!> <li class="go-cart-footer-sum" data-go-cart-footer-sum="" data-go-cart-sum=""> </li></ul></li></ol>`);
17031
17042
  function Cart($$anchor, $$props) {
17032
17043
  push($$props, true);
17033
17044
  const preview = prop($$props, "preview", 7, false);
@@ -17045,7 +17056,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17045
17056
  var node = first_child(fragment);
17046
17057
  {
17047
17058
  var consequent_2 = ($$anchor2) => {
17048
- var ol = root_1$f();
17059
+ var ol = root_1$i();
17049
17060
  var li = child(ol);
17050
17061
  var ul = child(li);
17051
17062
  var li_1 = child(ul);
@@ -17060,7 +17071,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17060
17071
  var node_1 = sibling(li_3, 2);
17061
17072
  {
17062
17073
  var consequent = ($$anchor3) => {
17063
- var li_4 = root_2$o();
17074
+ var li_4 = root_2$p();
17064
17075
  append($$anchor3, li_4);
17065
17076
  };
17066
17077
  if_block(node_1, ($$render) => {
@@ -17232,7 +17243,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17232
17243
  form.details.apiErrors = [shop.t("cart.coupon.form.errors.notValid")];
17233
17244
  }
17234
17245
  }
17235
- var root$7 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
17246
+ var root$9 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
17236
17247
  function CouponRedemption($$anchor, $$props) {
17237
17248
  push($$props, false);
17238
17249
  Forms.defineForm({
@@ -17244,13 +17255,286 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17244
17255
  await redeem(e.target);
17245
17256
  }
17246
17257
  init();
17247
- var go_form = root$7();
17258
+ var go_form = root$9();
17248
17259
  set_custom_element_data(go_form, "formId", "couponRedemption");
17249
17260
  event("submit", go_form, redeem$1);
17250
17261
  append($$anchor, go_form);
17251
17262
  pop();
17252
17263
  }
17253
17264
  customElements.define("go-coupon-redemption", create_custom_element(CouponRedemption, {}, [], []));
17265
+ class GoDonation {
17266
+ #campaign = /* @__PURE__ */ state();
17267
+ get campaign() {
17268
+ return get$2(this.#campaign);
17269
+ }
17270
+ set campaign(value) {
17271
+ set(this.#campaign, value, true);
17272
+ }
17273
+ #amount = /* @__PURE__ */ state();
17274
+ get amount() {
17275
+ return get$2(this.#amount);
17276
+ }
17277
+ set amount(value) {
17278
+ set(this.#amount, value, true);
17279
+ }
17280
+ selectCampaign = (selectedCampaign) => {
17281
+ this.campaign = selectedCampaign;
17282
+ document.getElementsByClassName("donation-actions")[0]?.scrollIntoView();
17283
+ };
17284
+ addDonationToCart = () => {
17285
+ if (this.amount === void 0 || this.campaign === void 0) {
17286
+ return;
17287
+ }
17288
+ const donationObject = { value: this.amount, campaign_id: this.campaign.id };
17289
+ let currentDonationsLocalStorage = JSON.parse(localStorage.getItem("201600627v4donations") || "[]");
17290
+ let donationTotal = sum(currentDonationsLocalStorage.filter((d) => d.campaign_id = donationObject.campaign_id), (d) => d.value) + donationObject.value;
17291
+ if (donationTotal > this.campaign.guest_limit && this.campaign.guest_limit > 0 && (!shop.currentUser?.isAuthenticated || shop.currentUser.isGuest)) {
17292
+ this.skipDonation();
17293
+ } else {
17294
+ currentDonationsLocalStorage.push(donationObject);
17295
+ localStorage.setItem("201600627v4donations", JSON.stringify(currentDonationsLocalStorage));
17296
+ localStorage.setItem("skipDonation", "true");
17297
+ window.history.pushState(null, "", shop.urls.cart());
17298
+ window.location.replace(shop.urls.cart());
17299
+ }
17300
+ };
17301
+ skipDonation = () => {
17302
+ localStorage.setItem("skipDonation", "true");
17303
+ window.history.pushState(null, "", shop.urls.cart());
17304
+ window.location.replace(shop.urls.cart());
17305
+ };
17306
+ }
17307
+ const goDonation = new GoDonation();
17308
+ var root_1$h = /* @__PURE__ */ from_html(`<img alt="logo"/>`);
17309
+ var root$8 = /* @__PURE__ */ from_html(`<div role="button" tabindex="0"><div class="donation-image"><!></div> <div class="donation-info"><p class="donation-info-title"> </p> <p class="donation-info-description"> </p></div></div>`);
17310
+ function DonationCampaign($$anchor, $$props) {
17311
+ push($$props, true);
17312
+ let campaign = prop($$props, "campaign", 7);
17313
+ const translations = /* @__PURE__ */ user_derived(() => campaign().translations);
17314
+ var $$exports = {
17315
+ get campaign() {
17316
+ return campaign();
17317
+ },
17318
+ set campaign($$value) {
17319
+ campaign($$value);
17320
+ flushSync();
17321
+ }
17322
+ };
17323
+ var div = root$8();
17324
+ let classes;
17325
+ div.__click = () => goDonation.selectCampaign(campaign());
17326
+ div.__keydown = (e) => {
17327
+ if (e.key === "Enter") {
17328
+ goDonation.selectCampaign(campaign());
17329
+ }
17330
+ };
17331
+ var div_1 = child(div);
17332
+ var node = child(div_1);
17333
+ {
17334
+ var consequent = ($$anchor2) => {
17335
+ var img = root_1$h();
17336
+ template_effect(($0) => set_attribute(img, "src", $0), [
17337
+ () => campaign().picture.thumbnail.replace("thumbnail", "article_3x2")
17338
+ ]);
17339
+ append($$anchor2, img);
17340
+ };
17341
+ if_block(node, ($$render) => {
17342
+ if (campaign().picture.thumbnail) $$render(consequent);
17343
+ });
17344
+ }
17345
+ reset(div_1);
17346
+ var div_2 = sibling(div_1, 2);
17347
+ var p2 = child(div_2);
17348
+ var text2 = child(p2, true);
17349
+ reset(p2);
17350
+ var p_1 = sibling(p2, 2);
17351
+ var text_1 = child(p_1, true);
17352
+ reset(p_1);
17353
+ reset(div_2);
17354
+ reset(div);
17355
+ template_effect(() => {
17356
+ classes = set_class(div, 1, "go-donation-campaign", null, classes, { selected: goDonation.campaign?.id === campaign()?.id });
17357
+ set_text(text2, get$2(translations)["donations.headline"]);
17358
+ set_text(text_1, get$2(translations)["donations.shop.info"]);
17359
+ });
17360
+ append($$anchor, div);
17361
+ return pop($$exports);
17362
+ }
17363
+ delegate(["click", "keydown"]);
17364
+ create_custom_element(DonationCampaign, { campaign: {} }, [], [], { mode: "open" });
17365
+ function currency(value, currency2) {
17366
+ if (currency2 == "CHF") {
17367
+ return new Intl.NumberFormat("de-CH", { style: "currency", currency: currency2 }).format(value);
17368
+ } else {
17369
+ return new Intl.NumberFormat("de-DE", { style: "currency", currency: currency2 }).format(value);
17370
+ }
17371
+ }
17372
+ function parseIds(ids) {
17373
+ if (!ids) {
17374
+ return void 0;
17375
+ }
17376
+ const parsed = ids.split(",").map((id) => id.trim()).map(Number).filter((num) => !isNaN(num) && num > 0);
17377
+ return parsed.length > 0 ? parsed : void 0;
17378
+ }
17379
+ function parseTokens(tokens, possibleTokens) {
17380
+ if (!tokens) {
17381
+ return void 0;
17382
+ }
17383
+ const parsed = tokens.split(",").map((token) => token.trim()).map(String).filter((token) => token.length > 0);
17384
+ parsed.forEach((token) => {
17385
+ if (!possibleTokens.includes(token)) {
17386
+ throw new Error("(parseTokens) Invalid token: " + token);
17387
+ }
17388
+ });
17389
+ return parsed.length > 0 ? parsed : void 0;
17390
+ }
17391
+ var root_1$g = /* @__PURE__ */ from_html(`<button> </button>`);
17392
+ var root_2$o = /* @__PURE__ */ from_html(`<form id="donationForm" action="" novalidate=""><div class="donation-custom form-group"><label for="donation-custom-amount"> </label> <input class="form-control" id="donation-custom-amount" type="number" min="1"/></div></form>`);
17393
+ var root$7 = /* @__PURE__ */ from_html(`<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>`);
17394
+ function DonationSelector($$anchor, $$props) {
17395
+ push($$props, true);
17396
+ const guestMaxLimit = goDonation.campaign?.guest_limit / 100;
17397
+ let customAmount = /* @__PURE__ */ state(void 0);
17398
+ function selectAmount(amount) {
17399
+ goDonation.amount = amount;
17400
+ set(customAmount, null);
17401
+ }
17402
+ function handleCustomInput(e) {
17403
+ const form = document.getElementById("donationForm");
17404
+ if (form.checkValidity()) {
17405
+ goDonation.amount = e.target.valueAsNumber * 100;
17406
+ } else {
17407
+ goDonation.amount = void 0;
17408
+ form.reportValidity();
17409
+ }
17410
+ }
17411
+ var div = root$7();
17412
+ var h3 = child(div);
17413
+ var text2 = child(h3, true);
17414
+ reset(h3);
17415
+ var div_1 = sibling(h3, 2);
17416
+ each(div_1, 20, () => goDonation.campaign?.options, (option2) => option2, ($$anchor2, option2) => {
17417
+ var button = root_1$g();
17418
+ let classes;
17419
+ button.__click = () => selectAmount(option2);
17420
+ var text_1 = child(button, true);
17421
+ reset(button);
17422
+ template_effect(
17423
+ ($0) => {
17424
+ classes = set_class(button, 1, "btn btn-default", null, classes, { selected: goDonation.amount === option2 });
17425
+ set_text(text_1, $0);
17426
+ },
17427
+ [() => currency(option2 / 100, shop.currency)]
17428
+ );
17429
+ append($$anchor2, button);
17430
+ });
17431
+ reset(div_1);
17432
+ var node = sibling(div_1, 2);
17433
+ {
17434
+ var consequent = ($$anchor2) => {
17435
+ var form_1 = root_2$o();
17436
+ var div_2 = child(form_1);
17437
+ var label = child(div_2);
17438
+ var text_2 = child(label, true);
17439
+ reset(label);
17440
+ var input = sibling(label, 2);
17441
+ remove_input_defaults(input);
17442
+ input.__input = handleCustomInput;
17443
+ reset(div_2);
17444
+ reset(form_1);
17445
+ template_effect(
17446
+ ($0, $1) => {
17447
+ set_text(text_2, $0);
17448
+ set_attribute(input, "max", guestMaxLimit);
17449
+ set_attribute(input, "placeholder", $1);
17450
+ set_value(input, get$2(customAmount));
17451
+ },
17452
+ [
17453
+ () => shop.t("donations.selection.custom.label"),
17454
+ () => shop.t("donations.selection.custom.input.placeholder")
17455
+ ]
17456
+ );
17457
+ append($$anchor2, form_1);
17458
+ };
17459
+ if_block(node, ($$render) => {
17460
+ if (goDonation.campaign?.free_donations) $$render(consequent);
17461
+ });
17462
+ }
17463
+ reset(div);
17464
+ template_effect(($0) => set_text(text2, $0), [() => shop.t("donations.selection.title")]);
17465
+ append($$anchor, div);
17466
+ pop();
17467
+ }
17468
+ delegate(["click", "input"]);
17469
+ create_custom_element(DonationSelector, {}, [], [], { mode: "open" });
17470
+ var root_1$f = /* @__PURE__ */ from_html(`<div class="go-donations-list"><!> <!> <div class="donation-actions"><button class="btn btn-default"> </button> <button class="btn btn-primary"> </button></div></div>`);
17471
+ function Donations($$anchor, $$props) {
17472
+ push($$props, false);
17473
+ onMount(() => {
17474
+ if (shop.donations?.campaigns?.length == 1) {
17475
+ goDonation.selectCampaign(shop.donations?.campaigns[0]);
17476
+ }
17477
+ });
17478
+ init();
17479
+ var fragment = comment();
17480
+ var node = first_child(fragment);
17481
+ {
17482
+ var consequent_1 = ($$anchor2) => {
17483
+ var div = root_1$f();
17484
+ var node_1 = child(div);
17485
+ each(node_1, 1, () => shop?.donations?.campaigns, (campaign) => campaign.id, ($$anchor3, campaign) => {
17486
+ DonationCampaign($$anchor3, {
17487
+ get campaign() {
17488
+ return get$2(campaign);
17489
+ }
17490
+ });
17491
+ });
17492
+ var node_2 = sibling(node_1, 2);
17493
+ {
17494
+ var consequent = ($$anchor3) => {
17495
+ DonationSelector($$anchor3, {});
17496
+ };
17497
+ if_block(node_2, ($$render) => {
17498
+ if (goDonation.campaign) $$render(consequent);
17499
+ });
17500
+ }
17501
+ var div_1 = sibling(node_2, 2);
17502
+ var button = child(div_1);
17503
+ button.__click = function(...$$args) {
17504
+ goDonation.skipDonation?.apply(this, $$args);
17505
+ };
17506
+ var text2 = child(button, true);
17507
+ reset(button);
17508
+ var button_1 = sibling(button, 2);
17509
+ button_1.__click = function(...$$args) {
17510
+ goDonation.addDonationToCart?.apply(this, $$args);
17511
+ };
17512
+ var text_1 = child(button_1, true);
17513
+ reset(button_1);
17514
+ reset(div_1);
17515
+ reset(div);
17516
+ template_effect(
17517
+ ($0, $1) => {
17518
+ set_text(text2, $0);
17519
+ button_1.disabled = !goDonation.amount;
17520
+ set_text(text_1, $1);
17521
+ },
17522
+ [
17523
+ () => shop.t("donations.actions.continueWithoutDonation"),
17524
+ () => shop.t("donations.actions.addToCart")
17525
+ ]
17526
+ );
17527
+ append($$anchor2, div);
17528
+ };
17529
+ if_block(node, ($$render) => {
17530
+ if (shop.donations && shop.donations.campaigns) $$render(consequent_1);
17531
+ });
17532
+ }
17533
+ append($$anchor, fragment);
17534
+ pop();
17535
+ }
17536
+ delegate(["click"]);
17537
+ customElements.define("go-donations", create_custom_element(Donations, {}, [], []));
17254
17538
  function isFunction$1(value) {
17255
17539
  return typeof value === "function";
17256
17540
  }
@@ -18514,9 +18798,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18514
18798
  const propValue = getProp();
18515
18799
  if (propValue !== void 0)
18516
18800
  return propValue;
18517
- const option = configOption(config2).current;
18518
- if (option !== void 0)
18519
- return option;
18801
+ const option2 = configOption(config2).current;
18802
+ if (option2 !== void 0)
18803
+ return option2;
18520
18804
  return fallback;
18521
18805
  });
18522
18806
  };
@@ -30983,15 +31267,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
30983
31267
  reset(option_1);
30984
31268
  option_1.value = option_1.__value = "";
30985
31269
  var node_5 = sibling(option_1, 2);
30986
- each(node_5, 17, () => field().options(), index$1, ($$anchor4, option) => {
31270
+ each(node_5, 17, () => field().options(), index$1, ($$anchor4, option2) => {
30987
31271
  var option_2 = root_7$2();
30988
31272
  var text_2 = child(option_2, true);
30989
31273
  reset(option_2);
30990
31274
  var option_2_value = {};
30991
31275
  template_effect(() => {
30992
- set_text(text_2, get$2(option).label);
30993
- if (option_2_value !== (option_2_value = get$2(option).value)) {
30994
- option_2.value = (option_2.__value = get$2(option).value) ?? "";
31276
+ set_text(text_2, get$2(option2).label);
31277
+ if (option_2_value !== (option_2_value = get$2(option2).value)) {
31278
+ option_2.value = (option_2.__value = get$2(option2).value) ?? "";
30995
31279
  }
30996
31280
  });
30997
31281
  append($$anchor4, option_2);
@@ -31041,7 +31325,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
31041
31325
  var consequent_2 = ($$anchor3) => {
31042
31326
  var fragment_5 = comment();
31043
31327
  var node_8 = first_child(fragment_5);
31044
- each(node_8, 17, () => field().options, index$1, ($$anchor4, option) => {
31328
+ each(node_8, 17, () => field().options, index$1, ($$anchor4, option2) => {
31045
31329
  var label_4 = root_11$2();
31046
31330
  var text_3 = child(label_4);
31047
31331
  var input_3 = sibling(text_3);
@@ -31062,8 +31346,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
31062
31346
  reset(label_4);
31063
31347
  template_effect(() => {
31064
31348
  set_class(label_4, 1, clsx(labelClass()));
31065
- set_attribute(label_4, "for", get$2(inputId) + get$2(option));
31066
- set_text(text_3, `${get$2(option) ?? ""} `);
31349
+ set_attribute(label_4, "for", get$2(inputId) + get$2(option2));
31350
+ set_text(text_3, `${get$2(option2) ?? ""} `);
31067
31351
  });
31068
31352
  bind_value(input_3, () => field().value, ($$value) => field(field().value = $$value, true));
31069
31353
  append($$anchor4, label_4);
@@ -32406,25 +32690,107 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32406
32690
  pop();
32407
32691
  }
32408
32692
  customElements.define("go-order-invoice-id", create_custom_element(InvoiceId, {}, [], []));
32409
- function parseIds(ids) {
32410
- if (!ids) {
32411
- return void 0;
32693
+ var root$2 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
32694
+ function Password($$anchor, $$props) {
32695
+ push($$props, false);
32696
+ Forms.defineForm({
32697
+ id: "passwordResetForm",
32698
+ fields: [
32699
+ { key: "currentPassword", required: true },
32700
+ { key: "password", required: true },
32701
+ { key: "confirmPassword", required: true }
32702
+ ]
32703
+ });
32704
+ async function submit(event2) {
32705
+ const form = event2.target;
32706
+ const details = form.details;
32707
+ const result = await shop.updatePassword(details.formData);
32708
+ if (result.data) {
32709
+ details.successMessage = shop.t("user.passwordSuccess.desc.title");
32710
+ details.apiErrors = [];
32711
+ } else {
32712
+ details.apiErrors = result.error?.errors || result.error || result.errors;
32713
+ }
32412
32714
  }
32413
- const parsed = ids.split(",").map((id) => id.trim()).map(Number).filter((num) => !isNaN(num) && num > 0);
32414
- return parsed.length > 0 ? parsed : void 0;
32715
+ init();
32716
+ var go_form = root$2();
32717
+ set_custom_element_data(go_form, "formId", "passwordResetForm");
32718
+ event("submit", go_form, submit);
32719
+ append($$anchor, go_form);
32720
+ pop();
32415
32721
  }
32416
- function parseTokens(tokens, possibleTokens) {
32417
- if (!tokens) {
32418
- return void 0;
32419
- }
32420
- const parsed = tokens.split(",").map((token) => token.trim()).map(String).filter((token) => token.length > 0);
32421
- parsed.forEach((token) => {
32422
- if (!possibleTokens.includes(token)) {
32423
- throw new Error("(parseTokens) Invalid token: " + token);
32424
- }
32722
+ customElements.define("go-profile-password", create_custom_element(Password, {}, [], []));
32723
+ var root$1 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
32724
+ function Details$2($$anchor, $$props) {
32725
+ push($$props, true);
32726
+ Forms.defineForm({
32727
+ id: "accountDetailsForm",
32728
+ fields: [
32729
+ { key: "salutation", required: false },
32730
+ { key: "firstName", required: true },
32731
+ { key: "lastName", required: true },
32732
+ { key: "email", required: true },
32733
+ { key: "confirmEmail", required: true },
32734
+ // { key: 'addressee', required: true },
32735
+ // { key: 'street', required: true },
32736
+ // { key: 'postcode', required: true },
32737
+ // { key: 'city', required: true },
32738
+ // { key: 'country', required: true },
32739
+ { key: "language", required: true }
32740
+ ]
32425
32741
  });
32426
- return parsed.length > 0 ? parsed : void 0;
32742
+ let form = /* @__PURE__ */ state(void 0);
32743
+ const user = /* @__PURE__ */ user_derived(() => shop.validateToken());
32744
+ onMount(async () => {
32745
+ await shop.waitForAllFetches();
32746
+ await pollUntilTruthy(() => get$2(form).details);
32747
+ await pollUntilTruthy(() => get$2(user).data);
32748
+ get$2(form).details.fill(get$2(user).data);
32749
+ });
32750
+ var go_form = root$1();
32751
+ set_custom_element_data(go_form, "formId", "accountDetailsForm");
32752
+ bind_this(go_form, ($$value) => set(form, $$value), () => get$2(form));
32753
+ append($$anchor, go_form);
32754
+ pop();
32755
+ }
32756
+ customElements.define("go-profile-details", create_custom_element(Details$2, {}, [], []));
32757
+ var root_1$4 = /* @__PURE__ */ from_html(`<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>`, 1);
32758
+ function Overview($$anchor, $$props) {
32759
+ push($$props, true);
32760
+ const user = /* @__PURE__ */ user_derived(() => shop.validateToken());
32761
+ const data = /* @__PURE__ */ user_derived(() => get$2(user)?.data);
32762
+ var fragment = comment();
32763
+ var node = first_child(fragment);
32764
+ {
32765
+ var consequent = ($$anchor2) => {
32766
+ var fragment_1 = root_1$4();
32767
+ var div = first_child(fragment_1);
32768
+ var text2 = child(div);
32769
+ reset(div);
32770
+ var div_1 = sibling(div, 2);
32771
+ var text_1 = child(div_1, true);
32772
+ reset(div_1);
32773
+ template_effect(() => {
32774
+ set_text(text2, `${get$2(data).name ?? ""}
32775
+ ${get$2(data).surname ?? ""}`);
32776
+ set_text(text_1, get$2(data).email);
32777
+ });
32778
+ append($$anchor2, fragment_1);
32779
+ };
32780
+ var alternate = ($$anchor2) => {
32781
+ var text_2 = text();
32782
+ template_effect(($0) => set_text(text_2, $0), [() => shop.t("user.login.desc.text")]);
32783
+ append($$anchor2, text_2);
32784
+ };
32785
+ if_block(node, ($$render) => {
32786
+ if (get$2(data)) $$render(consequent);
32787
+ else $$render(alternate, false);
32788
+ });
32789
+ }
32790
+ append($$anchor, fragment);
32791
+ pop();
32427
32792
  }
32793
+ customElements.define("go-profile-overview", create_custom_element(Overview, {}, [], []));
32428
32794
  function TicketSelection($$anchor, $$props) {
32429
32795
  push($$props, true);
32430
32796
  let mode = prop($$props, "mode", 7), filters = prop($$props, "filters", 7), eventIds = prop($$props, "eventIds", 7), museumIds = prop($$props, "museumIds", 7), exhibitionIds = prop($$props, "exhibitionIds", 7), selectedDate = prop($$props, "selectedDate", 7), selectedTimeslot = prop($$props, "selectedTimeslot", 7), ticketIds = prop($$props, "ticketIds", 7), ticketGroupIds = prop($$props, "ticketGroupIds", 7);
@@ -33061,13 +33427,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33061
33427
  const d = /* @__PURE__ */ new Date();
33062
33428
  return d.toISOString();
33063
33429
  }
33064
- var root_1$4 = /* @__PURE__ */ from_html(`<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>`, 1);
33430
+ var root_1$3 = /* @__PURE__ */ from_html(`<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>`, 1);
33065
33431
  var root_4 = /* @__PURE__ */ from_html(`<option> </option>`);
33066
33432
  var root_3$1 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-tickets-item-title"><!></li> <li class="go-tickets-item-description" data-go-tickets-description=""><!></li> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><select></select></li></ul></article></li>`);
33067
33433
  function Item($$anchor, $$props) {
33068
33434
  push($$props, true);
33069
33435
  const scaled_title = ($$anchor2) => {
33070
- var fragment = root_1$4();
33436
+ var fragment = root_1$3();
33071
33437
  var span = first_child(fragment);
33072
33438
  var text2 = child(span);
33073
33439
  reset(span);
@@ -33142,18 +33508,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33142
33508
  var select = child(li_4);
33143
33509
  select.__change = (e) => update(item(), e.target, details()?.ticketSelectionDetails);
33144
33510
  each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max), (q) => q.value, ($$anchor3, q) => {
33145
- var option = root_4();
33146
- var text_4 = child(option, true);
33147
- reset(option);
33511
+ var option2 = root_4();
33512
+ var text_4 = child(option2, true);
33513
+ reset(option2);
33148
33514
  var option_value = {};
33149
33515
  template_effect(() => {
33150
- set_selected(option, item().quantity === get$2(q).value);
33516
+ set_selected(option2, item().quantity === get$2(q).value);
33151
33517
  set_text(text_4, get$2(q).label);
33152
33518
  if (option_value !== (option_value = get$2(q).value)) {
33153
- option.value = (option.__value = get$2(q).value) ?? "";
33519
+ option2.value = (option2.__value = get$2(q).value) ?? "";
33154
33520
  }
33155
33521
  });
33156
- append($$anchor3, option);
33522
+ append($$anchor3, option2);
33157
33523
  });
33158
33524
  reset(select);
33159
33525
  reset(li_4);
@@ -33179,7 +33545,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33179
33545
  }
33180
33546
  delegate(["change"]);
33181
33547
  create_custom_element(Item, { item: {}, details: {} }, [], [], { mode: "open" });
33182
- var root_1$3 = /* @__PURE__ */ from_html(`<ol class="go-tickets" data-testid="tickets"><li class="go-tickets-header" data-go-tickets-header="" data-testid="tickets-header"><ul><li class="go-tickets-header-title" data-go-tickets-title=""> </li> <li class="go-tickets-header-description" data-go-tickets-description=""> </li> <li class="go-tickets-header-price" data-go-tickets-price=""> </li> <li class="go-tickets-header-quality" data-go-tickets-quality=""> </li></ul></li> <!></ol>`);
33548
+ var root_1$2 = /* @__PURE__ */ from_html(`<ol class="go-tickets" data-testid="tickets"><li class="go-tickets-header" data-go-tickets-header="" data-testid="tickets-header"><ul><li class="go-tickets-header-title" data-go-tickets-title=""> </li> <li class="go-tickets-header-description" data-go-tickets-description=""> </li> <li class="go-tickets-header-price" data-go-tickets-price=""> </li> <li class="go-tickets-header-quality" data-go-tickets-quality=""> </li></ul></li> <!></ol>`);
33183
33549
  function Body($$anchor, $$props) {
33184
33550
  push($$props, true);
33185
33551
  const _details = getSegmentDetails($$props.$$host);
@@ -33189,7 +33555,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33189
33555
  var node = first_child(fragment);
33190
33556
  {
33191
33557
  var consequent = ($$anchor2) => {
33192
- var ol = root_1$3();
33558
+ var ol = root_1$2();
33193
33559
  var li = child(ol);
33194
33560
  var ul = child(li);
33195
33561
  var li_1 = child(ul);
@@ -33253,7 +33619,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33253
33619
  pop();
33254
33620
  }
33255
33621
  customElements.define("go-ticket-segment-sum", create_custom_element(Sum, {}, [], []));
33256
- let Details$2 = class Details {
33622
+ let Details$1 = class Details {
33257
33623
  #tsd;
33258
33624
  get tsd() {
33259
33625
  return get$2(this.#tsd);
@@ -33299,12 +33665,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33299
33665
  }
33300
33666
  };
33301
33667
  var root_2$1 = /* @__PURE__ */ from_html(`<li><label> <input type="radio" name="timeslot"/></label></li>`);
33302
- var root_1$2 = /* @__PURE__ */ from_html(`<ul data-testid="timeslots"></ul>`);
33668
+ var root_1$1 = /* @__PURE__ */ from_html(`<ul data-testid="timeslots"></ul>`);
33303
33669
  function Timeslots($$anchor, $$props) {
33304
33670
  push($$props, true);
33305
33671
  const binding_group = [];
33306
33672
  const _tsd = getTicketSelectionDetails($$props.$$host);
33307
- const details = new Details$2(_tsd);
33673
+ const details = new Details$1(_tsd);
33308
33674
  const change = (e) => {
33309
33675
  e.target.dispatchEvent(new CustomEvent("go-timeslot-select", {
33310
33676
  detail: { selected: details.tsd.selectedTimeslot },
@@ -33317,7 +33683,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33317
33683
  var node = first_child(fragment);
33318
33684
  {
33319
33685
  var consequent = ($$anchor2) => {
33320
- var ul = root_1$2();
33686
+ var ul = root_1$1();
33321
33687
  each(ul, 20, () => details.timeslots, (timeslot) => timeslot, ($$anchor3, timeslot) => {
33322
33688
  const selected = /* @__PURE__ */ user_derived(() => details.tsd?.selectedTimeslot === timeslot.startAt);
33323
33689
  var li = root_2$1();
@@ -33476,7 +33842,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33476
33842
  var root_11 = /* @__PURE__ */ from_html(`<div> </div>`);
33477
33843
  var root_7 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
33478
33844
  var root_2 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
33479
- var root_1$1 = /* @__PURE__ */ from_html(`<div data-calendar-wrapper=""><!></div>`);
33845
+ var root_1 = /* @__PURE__ */ from_html(`<div data-calendar-wrapper=""><!></div>`);
33480
33846
  function CalendarUI($$anchor, $$props) {
33481
33847
  push($$props, true);
33482
33848
  let calendarClass = prop($$props, "calendarClass", 7);
@@ -33498,7 +33864,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33498
33864
  flushSync();
33499
33865
  }
33500
33866
  };
33501
- var div = root_1$1();
33867
+ var div = root_1();
33502
33868
  var node = child(div);
33503
33869
  {
33504
33870
  const children = ($$anchor2, $$arg0) => {
@@ -33748,7 +34114,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33748
34114
  return pop($$exports);
33749
34115
  }
33750
34116
  customElements.define("go-calendar", create_custom_element(Calendar_1, {}, [], ["details"]));
33751
- let Details$1 = class Details {
34117
+ class Details {
33752
34118
  #ticketSelectionDetails;
33753
34119
  get ticketSelectionDetails() {
33754
34120
  return get$2(this.#ticketSelectionDetails);
@@ -33784,14 +34150,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33784
34150
  const ret = this.ticketSelectionDetails.preCarts.some((cart) => cart.items.some((item) => item.quantity > 0));
33785
34151
  return ret;
33786
34152
  }
33787
- };
33788
- var root$2 = /* @__PURE__ */ from_html(`<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>`);
34153
+ }
34154
+ var root = /* @__PURE__ */ from_html(`<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>`);
33789
34155
  function AddToCartButton($$anchor, $$props) {
33790
34156
  push($$props, true);
33791
34157
  const _tsd = getTicketSelectionDetails($$props.$$host);
33792
- const details = new Details$1(_tsd);
34158
+ const details = new Details(_tsd);
33793
34159
  var $$exports = { details };
33794
- var button = root$2();
34160
+ var button = root();
33795
34161
  button.__click = () => details.addToCart();
33796
34162
  var text2 = child(button, true);
33797
34163
  reset(button);
@@ -33812,107 +34178,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33812
34178
  }
33813
34179
  delegate(["click"]);
33814
34180
  customElements.define("go-add-to-cart-button", create_custom_element(AddToCartButton, {}, [], ["details"]));
33815
- var root$1 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
33816
- function Password($$anchor, $$props) {
33817
- push($$props, false);
33818
- Forms.defineForm({
33819
- id: "passwordResetForm",
33820
- fields: [
33821
- { key: "currentPassword", required: true },
33822
- { key: "password", required: true },
33823
- { key: "confirmPassword", required: true }
33824
- ]
33825
- });
33826
- async function submit(event2) {
33827
- const form = event2.target;
33828
- const details = form.details;
33829
- const result = await shop.updatePassword(details.formData);
33830
- if (result.data) {
33831
- details.successMessage = shop.t("user.passwordSuccess.desc.title");
33832
- details.apiErrors = [];
33833
- } else {
33834
- details.apiErrors = result.error?.errors || result.error || result.errors;
33835
- }
33836
- }
33837
- init();
33838
- var go_form = root$1();
33839
- set_custom_element_data(go_form, "formId", "passwordResetForm");
33840
- event("submit", go_form, submit);
33841
- append($$anchor, go_form);
33842
- pop();
33843
- }
33844
- customElements.define("go-profile-password", create_custom_element(Password, {}, [], []));
33845
- var root = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
33846
- function Details($$anchor, $$props) {
33847
- push($$props, true);
33848
- Forms.defineForm({
33849
- id: "accountDetailsForm",
33850
- fields: [
33851
- { key: "salutation", required: false },
33852
- { key: "firstName", required: true },
33853
- { key: "lastName", required: true },
33854
- { key: "email", required: true },
33855
- { key: "confirmEmail", required: true },
33856
- // { key: 'addressee', required: true },
33857
- // { key: 'street', required: true },
33858
- // { key: 'postcode', required: true },
33859
- // { key: 'city', required: true },
33860
- // { key: 'country', required: true },
33861
- { key: "language", required: true }
33862
- ]
33863
- });
33864
- let form = /* @__PURE__ */ state(void 0);
33865
- const user = /* @__PURE__ */ user_derived(() => shop.validateToken());
33866
- onMount(async () => {
33867
- await shop.waitForAllFetches();
33868
- await pollUntilTruthy(() => get$2(form).details);
33869
- await pollUntilTruthy(() => get$2(user).data);
33870
- get$2(form).details.fill(get$2(user).data);
33871
- });
33872
- var go_form = root();
33873
- set_custom_element_data(go_form, "formId", "accountDetailsForm");
33874
- bind_this(go_form, ($$value) => set(form, $$value), () => get$2(form));
33875
- append($$anchor, go_form);
33876
- pop();
33877
- }
33878
- customElements.define("go-profile-details", create_custom_element(Details, {}, [], []));
33879
- var root_1 = /* @__PURE__ */ from_html(`<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>`, 1);
33880
- function Overview($$anchor, $$props) {
33881
- push($$props, true);
33882
- const user = /* @__PURE__ */ user_derived(() => shop.validateToken());
33883
- const data = /* @__PURE__ */ user_derived(() => get$2(user)?.data);
33884
- var fragment = comment();
33885
- var node = first_child(fragment);
33886
- {
33887
- var consequent = ($$anchor2) => {
33888
- var fragment_1 = root_1();
33889
- var div = first_child(fragment_1);
33890
- var text2 = child(div);
33891
- reset(div);
33892
- var div_1 = sibling(div, 2);
33893
- var text_1 = child(div_1, true);
33894
- reset(div_1);
33895
- template_effect(() => {
33896
- set_text(text2, `${get$2(data).name ?? ""}
33897
- ${get$2(data).surname ?? ""}`);
33898
- set_text(text_1, get$2(data).email);
33899
- });
33900
- append($$anchor2, fragment_1);
33901
- };
33902
- var alternate = ($$anchor2) => {
33903
- var text_2 = text();
33904
- template_effect(($0) => set_text(text_2, $0), [() => shop.t("user.login.desc.text")]);
33905
- append($$anchor2, text_2);
33906
- };
33907
- if_block(node, ($$render) => {
33908
- if (get$2(data)) $$render(consequent);
33909
- else $$render(alternate, false);
33910
- });
33911
- }
33912
- append($$anchor, fragment);
33913
- pop();
33914
- }
33915
- customElements.define("go-profile-overview", create_custom_element(Overview, {}, [], []));
33916
34181
  async function initGo(window2) {
33917
34182
  const stub = window2.go;
33918
34183
  let q = stub && stub._queue || [];