@gomusdev/web-components 0.0.7 → 0.0.9

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.
@@ -11,7 +11,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
11
11
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
12
12
  (function() {
13
13
  "use strict";
14
- var _a, _previous, _callbacks, _pending, _deferred, _neutered, _async_effects, _boundary_async_effects, _render_effects, _effects, _block_effects, _dirty_effects, _maybe_dirty_effects, _Batch_instances, traverse_effect_tree_fn, defer_effects_fn, commit_fn, _events, _instance, _data, _fetchStatus, _Shop_instances, defaultApiParams_get, _canFetch, _ensureFetch, _mode, _filters, _eventId, _museumIds, _exhibitionIds, _ticketIds, _selectedDate, _selectedTimeslot, _selectedTickets, _ticketList, _document, _subscribe, _name, _key, _root, _variant, _prefix, _visibleMonths, _months, _weekdays, _initialPlaceholderYear, _defaultYears, _CalendarRootState_instances, setupInitialFocusEffect_fn, setupAccessibleHeadingEffect_fn, setupFormatterEffect_fn, _isNextButtonDisabled, _isPrevButtonDisabled, _isInvalid, _headingValue, _fullCalendarLabel, isMultipleSelectionValid_fn, _snippetProps, _props, _props2, _cellDate, _isUnavailable, _isDateToday, _isOutsideMonth, _isOutsideVisibleMonths, _isDisabled, _isFocusedDate, _isSelectedDate, _labelText, _snippetProps2, _ariaDisabled, _sharedDataAttrs, _props3, _tabindex, _snippetProps3, _props4, _isDisabled2, _props5, _isDisabled3, _props6, _props7, _props8, _props9, _props10, _props11, _props12, _startAt, _selected, _b, _details, _params, _ticketSelectionDetails, _c, _ticketSelectionDetails2;
14
+ var _a, _previous, _callbacks, _pending, _deferred, _neutered, _async_effects, _boundary_async_effects, _render_effects, _effects, _block_effects, _dirty_effects, _maybe_dirty_effects, _Batch_instances, traverse_effect_tree_fn, defer_effects_fn, commit_fn, _events, _instance, _data, _fetchStatus, _Shop_instances, defaultApiParams_get, _canFetch, _ensureFetch, _items, _total, _b, _mode, _filters, _eventId, _museumIds, _exhibitionIds, _ticketIds, _selectedDate, _selectedTimeslot, _selectedTickets, _ticketList, _total2, _document, _subscribe, _name, _key, _root, _variant, _prefix, _visibleMonths, _months, _weekdays, _initialPlaceholderYear, _defaultYears, _CalendarRootState_instances, setupInitialFocusEffect_fn, setupAccessibleHeadingEffect_fn, setupFormatterEffect_fn, _isNextButtonDisabled, _isPrevButtonDisabled, _isInvalid, _headingValue, _fullCalendarLabel, isMultipleSelectionValid_fn, _snippetProps, _props, _props2, _cellDate, _isUnavailable, _isDateToday, _isOutsideMonth, _isOutsideVisibleMonths, _isDisabled, _isFocusedDate, _isSelectedDate, _labelText, _snippetProps2, _ariaDisabled, _sharedDataAttrs, _props3, _tabindex, _snippetProps3, _props4, _isDisabled2, _props5, _isDisabled3, _props6, _props7, _props8, _props9, _props10, _props11, _props12, _startAt, _selected, _c, _details, _params, _ticketSelectionDetails, _d, _ticketSelectionDetails2, _e, _ticketSelectionDetails3;
15
15
  const PUBLIC_VERSION = "5";
16
16
  if (typeof window !== "undefined") {
17
17
  ((_a = window.__svelte ?? (window.__svelte = {})).v ?? (_a.v = /* @__PURE__ */ new Set())).add(PUBLIC_VERSION);
@@ -22,6 +22,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
22
22
  const EACH_IS_ANIMATED = 1 << 3;
23
23
  const EACH_ITEM_IMMUTABLE = 1 << 4;
24
24
  const PROPS_IS_IMMUTABLE = 1;
25
+ const PROPS_IS_RUNES = 1 << 1;
25
26
  const PROPS_IS_UPDATED = 1 << 2;
26
27
  const PROPS_IS_BINDABLE = 1 << 3;
27
28
  const PROPS_IS_LAZY_INITIAL = 1 << 4;
@@ -51,6 +52,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
51
52
  }
52
53
  const noop$1 = () => {
53
54
  };
55
+ function run(fn) {
56
+ return fn();
57
+ }
54
58
  function run_all(arr) {
55
59
  for (var i = 0; i < arr.length; i++) {
56
60
  arr[i]();
@@ -250,7 +254,11 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
250
254
  function safe_equals(value) {
251
255
  return !safe_not_equal(value, this.v);
252
256
  }
257
+ let legacy_mode_flag = false;
253
258
  let tracing_mode_flag = false;
259
+ function enable_legacy_mode_flag() {
260
+ legacy_mode_flag = true;
261
+ }
254
262
  const empty = [];
255
263
  function snapshot(value, skip_warning = false) {
256
264
  return clone(value, /* @__PURE__ */ new Map(), "", empty);
@@ -360,7 +368,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
360
368
  e: null,
361
369
  s: props,
362
370
  x: null,
363
- l: null
371
+ l: legacy_mode_flag && !runes ? { s: null, u: null, $: [] } : null
364
372
  };
365
373
  }
366
374
  function pop(component2) {
@@ -383,7 +391,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
383
391
  {};
384
392
  }
385
393
  function is_runes() {
386
- return true;
394
+ return !legacy_mode_flag || component_context !== null && component_context.l === null;
387
395
  }
388
396
  function get_or_init_context_map(name) {
389
397
  if (component_context === null) {
@@ -703,7 +711,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
703
711
  }
704
712
  }
705
713
  function flatten(sync, async, fn) {
706
- const d = derived;
714
+ const d = is_runes() ? derived : derived_safe_equal;
707
715
  if (async.length === 0) {
708
716
  fn(sync.map(d));
709
717
  return;
@@ -1199,10 +1207,14 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
1199
1207
  }
1200
1208
  // @__NO_SIDE_EFFECTS__
1201
1209
  function mutable_source(initial_value, immutable = false, trackable = true) {
1210
+ var _a2;
1202
1211
  const s = source(initial_value);
1203
1212
  if (!immutable) {
1204
1213
  s.equals = safe_equals;
1205
1214
  }
1215
+ if (legacy_mode_flag && trackable && component_context !== null && component_context.l !== null) {
1216
+ ((_a2 = component_context.l).s ?? (_a2.s = [])).push(s);
1217
+ }
1206
1218
  return s;
1207
1219
  }
1208
1220
  function set(source2, value, should_proxy = false) {
@@ -1236,7 +1248,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
1236
1248
  }
1237
1249
  source2.wv = increment_write_version();
1238
1250
  mark_reactions(source2, DIRTY$1);
1239
- if (active_effect !== null && (active_effect.f & CLEAN) !== 0 && (active_effect.f & (BRANCH_EFFECT | ROOT_EFFECT)) === 0) {
1251
+ if (is_runes() && active_effect !== null && (active_effect.f & CLEAN) !== 0 && (active_effect.f & (BRANCH_EFFECT | ROOT_EFFECT)) === 0) {
1240
1252
  if (untracked_writes === null) {
1241
1253
  set_untracked_writes([source2]);
1242
1254
  } else {
@@ -1252,10 +1264,12 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
1252
1264
  function mark_reactions(signal, status) {
1253
1265
  var reactions = signal.reactions;
1254
1266
  if (reactions === null) return;
1267
+ var runes = is_runes();
1255
1268
  var length = reactions.length;
1256
1269
  for (var i = 0; i < length; i++) {
1257
1270
  var reaction = reactions[i];
1258
1271
  var flags = reaction.f;
1272
+ if (!runes && reaction === active_effect) continue;
1259
1273
  var not_dirty = (flags & DIRTY$1) === 0;
1260
1274
  if (not_dirty) {
1261
1275
  set_signal_status(reaction, status);
@@ -2338,6 +2352,49 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
2338
2352
  function set_signal_status(signal, status) {
2339
2353
  signal.f = signal.f & STATUS_MASK | status;
2340
2354
  }
2355
+ function deep_read_state(value) {
2356
+ if (typeof value !== "object" || !value || value instanceof EventTarget) {
2357
+ return;
2358
+ }
2359
+ if (STATE_SYMBOL in value) {
2360
+ deep_read(value);
2361
+ } else if (!Array.isArray(value)) {
2362
+ for (let key in value) {
2363
+ const prop2 = value[key];
2364
+ if (typeof prop2 === "object" && prop2 && STATE_SYMBOL in prop2) {
2365
+ deep_read(prop2);
2366
+ }
2367
+ }
2368
+ }
2369
+ }
2370
+ function deep_read(value, visited = /* @__PURE__ */ new Set()) {
2371
+ if (typeof value === "object" && value !== null && // We don't want to traverse DOM elements
2372
+ !(value instanceof EventTarget) && !visited.has(value)) {
2373
+ visited.add(value);
2374
+ if (value instanceof Date) {
2375
+ value.getTime();
2376
+ }
2377
+ for (let key in value) {
2378
+ try {
2379
+ deep_read(value[key], visited);
2380
+ } catch (e) {
2381
+ }
2382
+ }
2383
+ const proto = get_prototype_of(value);
2384
+ if (proto !== Object.prototype && proto !== Array.prototype && proto !== Map.prototype && proto !== Set.prototype && proto !== Date.prototype) {
2385
+ const descriptors = get_descriptors(proto);
2386
+ for (let key in descriptors) {
2387
+ const get2 = descriptors[key].get;
2388
+ if (get2) {
2389
+ try {
2390
+ get2.call(value);
2391
+ } catch (e) {
2392
+ }
2393
+ }
2394
+ }
2395
+ }
2396
+ }
2397
+ }
2341
2398
  const all_registered_events = /* @__PURE__ */ new Set();
2342
2399
  const root_event_handles = /* @__PURE__ */ new Set();
2343
2400
  function create_event(event_name, dom, handler, options = {}) {
@@ -2793,7 +2850,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
2793
2850
  if (component_context === null) {
2794
2851
  lifecycle_outside_component();
2795
2852
  }
2796
- {
2853
+ if (legacy_mode_flag && component_context.l !== null) {
2854
+ init_update_callbacks(component_context).m.push(fn);
2855
+ } else {
2797
2856
  user_effect(() => {
2798
2857
  const cleanup = untrack(fn);
2799
2858
  if (typeof cleanup === "function") return (
@@ -2803,6 +2862,13 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
2803
2862
  });
2804
2863
  }
2805
2864
  }
2865
+ function init_update_callbacks(context) {
2866
+ var l = (
2867
+ /** @type {ComponentContextLegacy} */
2868
+ context.l
2869
+ );
2870
+ return l.u ?? (l.u = { a: [], b: [], m: [] });
2871
+ }
2806
2872
  function createAttachmentKey() {
2807
2873
  return Symbol(ATTACHMENT_KEY);
2808
2874
  }
@@ -3091,7 +3157,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
3091
3157
  }
3092
3158
  }
3093
3159
  function reconcile(each_effect, array, state2, offscreen_items, anchor, render_fn, flags, get_key, get_collection) {
3094
- var _a2, _b2, _c2, _d;
3160
+ var _a2, _b2, _c2, _d2;
3095
3161
  var is_animated = (flags & EACH_IS_ANIMATED) !== 0;
3096
3162
  var should_update = (flags & (EACH_ITEM_REACTIVE | EACH_INDEX_REACTIVE)) !== 0;
3097
3163
  var length = array.length;
@@ -3232,7 +3298,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
3232
3298
  (_c2 = to_destroy[i].a) == null ? void 0 : _c2.measure();
3233
3299
  }
3234
3300
  for (i = 0; i < destroy_length; i += 1) {
3235
- (_d = to_destroy[i].a) == null ? void 0 : _d.fix();
3301
+ (_d2 = to_destroy[i].a) == null ? void 0 : _d2.fix();
3236
3302
  }
3237
3303
  }
3238
3304
  pause_effects(state2, to_destroy, controlled_anchor);
@@ -3750,6 +3816,16 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
3750
3816
  queue_idle_task(remove_defaults);
3751
3817
  add_form_reset_listener();
3752
3818
  }
3819
+ function set_value(element, value) {
3820
+ var attributes = get_attributes(element);
3821
+ if (attributes.value === (attributes.value = // treat null and undefined the same for the initial value
3822
+ value ?? void 0) || // @ts-expect-error
3823
+ // `progress` elements always need their value set when it's `0`
3824
+ element.value === value && (value !== 0 || element.nodeName !== "PROGRESS")) {
3825
+ return;
3826
+ }
3827
+ element.value = value ?? "";
3828
+ }
3753
3829
  function set_selected(element, selected) {
3754
3830
  if (selected) {
3755
3831
  if (!element.hasAttribute("selected")) {
@@ -4094,6 +4170,63 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4094
4170
  });
4095
4171
  return element_or_component;
4096
4172
  }
4173
+ function init(immutable = false) {
4174
+ const context = (
4175
+ /** @type {ComponentContextLegacy} */
4176
+ component_context
4177
+ );
4178
+ const callbacks = context.l.u;
4179
+ if (!callbacks) return;
4180
+ let props = () => deep_read_state(context.s);
4181
+ if (immutable) {
4182
+ let version = 0;
4183
+ let prev = (
4184
+ /** @type {Record<string, any>} */
4185
+ {}
4186
+ );
4187
+ const d = /* @__PURE__ */ derived(() => {
4188
+ let changed = false;
4189
+ const props2 = context.s;
4190
+ for (const key in props2) {
4191
+ if (props2[key] !== prev[key]) {
4192
+ prev[key] = props2[key];
4193
+ changed = true;
4194
+ }
4195
+ }
4196
+ if (changed) version++;
4197
+ return version;
4198
+ });
4199
+ props = () => get(d);
4200
+ }
4201
+ if (callbacks.b.length) {
4202
+ user_pre_effect(() => {
4203
+ observe_all(context, props);
4204
+ run_all(callbacks.b);
4205
+ });
4206
+ }
4207
+ user_effect(() => {
4208
+ const fns = untrack(() => callbacks.m.map(run));
4209
+ return () => {
4210
+ for (const fn of fns) {
4211
+ if (typeof fn === "function") {
4212
+ fn();
4213
+ }
4214
+ }
4215
+ };
4216
+ });
4217
+ if (callbacks.a.length) {
4218
+ user_effect(() => {
4219
+ observe_all(context, props);
4220
+ run_all(callbacks.a);
4221
+ });
4222
+ }
4223
+ }
4224
+ function observe_all(context, props) {
4225
+ if (context.l.s) {
4226
+ for (const signal of context.l.s) get(signal);
4227
+ }
4228
+ props();
4229
+ }
4097
4230
  let is_store_binding = false;
4098
4231
  function capture_store_binding(fn) {
4099
4232
  var previous_is_store_binding = is_store_binding;
@@ -4201,6 +4334,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4201
4334
  }
4202
4335
  function prop(props, key, flags, fallback) {
4203
4336
  var _a2;
4337
+ var runes = !legacy_mode_flag || (flags & PROPS_IS_RUNES) !== 0;
4204
4338
  var bindable = (flags & PROPS_IS_BINDABLE) !== 0;
4205
4339
  var lazy = (flags & PROPS_IS_LAZY_INITIAL) !== 0;
4206
4340
  var fallback_value = (
@@ -4240,12 +4374,12 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4240
4374
  if (initial_value === void 0 && fallback !== void 0) {
4241
4375
  initial_value = get_fallback();
4242
4376
  if (setter) {
4243
- props_invalid_value();
4377
+ if (runes) props_invalid_value();
4244
4378
  setter(initial_value);
4245
4379
  }
4246
4380
  }
4247
4381
  var getter;
4248
- {
4382
+ if (runes) {
4249
4383
  getter = () => {
4250
4384
  var value = (
4251
4385
  /** @type {V} */
@@ -4255,8 +4389,20 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4255
4389
  fallback_dirty = true;
4256
4390
  return value;
4257
4391
  };
4392
+ } else {
4393
+ getter = () => {
4394
+ var value = (
4395
+ /** @type {V} */
4396
+ props[key]
4397
+ );
4398
+ if (value !== void 0) {
4399
+ fallback_value = /** @type {V} */
4400
+ void 0;
4401
+ }
4402
+ return value === void 0 ? fallback_value : value;
4403
+ };
4258
4404
  }
4259
- if ((flags & PROPS_IS_UPDATED) === 0) {
4405
+ if (runes && (flags & PROPS_IS_UPDATED) === 0) {
4260
4406
  return getter;
4261
4407
  }
4262
4408
  if (setter) {
@@ -4265,7 +4411,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4265
4411
  /** @type {() => V} */
4266
4412
  function(value, mutation) {
4267
4413
  if (arguments.length > 0) {
4268
- if (!mutation || legacy_parent || is_store_sub) {
4414
+ if (!runes || !mutation || legacy_parent || is_store_sub) {
4269
4415
  setter(mutation ? getter() : value);
4270
4416
  }
4271
4417
  return value;
@@ -4288,7 +4434,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4288
4434
  /** @type {() => V} */
4289
4435
  function(value, mutation) {
4290
4436
  if (arguments.length > 0) {
4291
- const new_value = mutation ? get(d) : bindable ? proxy(value) : value;
4437
+ const new_value = mutation ? get(d) : runes && bindable ? proxy(value) : value;
4292
4438
  set(d, new_value);
4293
4439
  overridden = true;
4294
4440
  if (fallback_value !== void 0) {
@@ -4789,10 +4935,10 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4789
4935
  function wait(ms) {
4790
4936
  return new Promise((resolve) => setTimeout(resolve, ms));
4791
4937
  }
4792
- const defaultErrorConfig = {
4938
+ const defaultErrorConfig$1 = {
4793
4939
  withStackTrace: false
4794
4940
  };
4795
- const createNeverThrowError = (message, result, config = defaultErrorConfig) => {
4941
+ const createNeverThrowError$1 = (message, result, config = defaultErrorConfig$1) => {
4796
4942
  const data = result.isOk() ? { type: "Ok", value: result.value } : { type: "Err", value: result.error };
4797
4943
  const maybeStack = config.withStackTrace ? new Error().stack : void 0;
4798
4944
  return {
@@ -4801,7 +4947,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4801
4947
  stack: maybeStack
4802
4948
  };
4803
4949
  };
4804
- function __awaiter(thisArg, _arguments, P, generator) {
4950
+ function __awaiter$1(thisArg, _arguments, P, generator) {
4805
4951
  function adopt(value) {
4806
4952
  return value instanceof P ? value : new P(function(resolve) {
4807
4953
  resolve(value);
@@ -4828,7 +4974,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4828
4974
  step((generator = generator.apply(thisArg, [])).next());
4829
4975
  });
4830
4976
  }
4831
- function __values(o) {
4977
+ function __values$1(o) {
4832
4978
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
4833
4979
  if (m) return m.call(o);
4834
4980
  if (o && typeof o.length === "number") return {
@@ -4839,10 +4985,10 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4839
4985
  };
4840
4986
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
4841
4987
  }
4842
- function __await(v) {
4843
- return this instanceof __await ? (this.v = v, this) : new __await(v);
4988
+ function __await$1(v) {
4989
+ return this instanceof __await$1 ? (this.v = v, this) : new __await$1(v);
4844
4990
  }
4845
- function __asyncGenerator(thisArg, _arguments, generator) {
4991
+ function __asyncGenerator$1(thisArg, _arguments, generator) {
4846
4992
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
4847
4993
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
4848
4994
  return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
@@ -4863,7 +5009,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4863
5009
  }
4864
5010
  }
4865
5011
  function step(r2) {
4866
- r2.value instanceof __await ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q[0][2], r2);
5012
+ r2.value instanceof __await$1 ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q[0][2], r2);
4867
5013
  }
4868
5014
  function fulfill(value) {
4869
5015
  resume("next", value);
@@ -4875,7 +5021,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4875
5021
  if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
4876
5022
  }
4877
5023
  }
4878
- function __asyncDelegator(o) {
5024
+ function __asyncDelegator$1(o) {
4879
5025
  var i, p;
4880
5026
  return i = {}, verb("next"), verb("throw", function(e) {
4881
5027
  throw e;
@@ -4884,14 +5030,14 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4884
5030
  }, i;
4885
5031
  function verb(n, f) {
4886
5032
  i[n] = o[n] ? function(v) {
4887
- return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v;
5033
+ return (p = !p) ? { value: __await$1(o[n](v)), done: n === "return" } : f ? f(v) : v;
4888
5034
  } : f;
4889
5035
  }
4890
5036
  }
4891
- function __asyncValues(o) {
5037
+ function __asyncValues$1(o) {
4892
5038
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
4893
5039
  var m = o[Symbol.asyncIterator], i;
4894
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
5040
+ return m ? m.call(o) : (o = typeof __values$1 === "function" ? __values$1(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
4895
5041
  return this;
4896
5042
  }, i);
4897
5043
  function verb(n) {
@@ -4907,93 +5053,93 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4907
5053
  }, reject);
4908
5054
  }
4909
5055
  }
4910
- class ResultAsync {
5056
+ let ResultAsync$1 = class ResultAsync2 {
4911
5057
  constructor(res) {
4912
5058
  this._promise = res;
4913
5059
  }
4914
5060
  static fromSafePromise(promise) {
4915
- const newPromise = promise.then((value) => new Ok(value));
4916
- return new ResultAsync(newPromise);
5061
+ const newPromise = promise.then((value) => new Ok$1(value));
5062
+ return new ResultAsync2(newPromise);
4917
5063
  }
4918
5064
  static fromPromise(promise, errorFn) {
4919
- const newPromise = promise.then((value) => new Ok(value)).catch((e) => new Err(errorFn(e)));
4920
- return new ResultAsync(newPromise);
5065
+ const newPromise = promise.then((value) => new Ok$1(value)).catch((e) => new Err$1(errorFn(e)));
5066
+ return new ResultAsync2(newPromise);
4921
5067
  }
4922
5068
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4923
5069
  static fromThrowable(fn, errorFn) {
4924
5070
  return (...args) => {
4925
- return new ResultAsync((() => __awaiter(this, void 0, void 0, function* () {
5071
+ return new ResultAsync2((() => __awaiter$1(this, void 0, void 0, function* () {
4926
5072
  try {
4927
- return new Ok(yield fn(...args));
5073
+ return new Ok$1(yield fn(...args));
4928
5074
  } catch (error) {
4929
- return new Err(errorFn ? errorFn(error) : error);
5075
+ return new Err$1(errorFn ? errorFn(error) : error);
4930
5076
  }
4931
5077
  }))());
4932
5078
  };
4933
5079
  }
4934
5080
  static combine(asyncResultList) {
4935
- return combineResultAsyncList(asyncResultList);
5081
+ return combineResultAsyncList$1(asyncResultList);
4936
5082
  }
4937
5083
  static combineWithAllErrors(asyncResultList) {
4938
- return combineResultAsyncListWithAllErrors(asyncResultList);
5084
+ return combineResultAsyncListWithAllErrors$1(asyncResultList);
4939
5085
  }
4940
5086
  map(f) {
4941
- return new ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
5087
+ return new ResultAsync2(this._promise.then((res) => __awaiter$1(this, void 0, void 0, function* () {
4942
5088
  if (res.isErr()) {
4943
- return new Err(res.error);
5089
+ return new Err$1(res.error);
4944
5090
  }
4945
- return new Ok(yield f(res.value));
5091
+ return new Ok$1(yield f(res.value));
4946
5092
  })));
4947
5093
  }
4948
5094
  andThrough(f) {
4949
- return new ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
5095
+ return new ResultAsync2(this._promise.then((res) => __awaiter$1(this, void 0, void 0, function* () {
4950
5096
  if (res.isErr()) {
4951
- return new Err(res.error);
5097
+ return new Err$1(res.error);
4952
5098
  }
4953
5099
  const newRes = yield f(res.value);
4954
5100
  if (newRes.isErr()) {
4955
- return new Err(newRes.error);
5101
+ return new Err$1(newRes.error);
4956
5102
  }
4957
- return new Ok(res.value);
5103
+ return new Ok$1(res.value);
4958
5104
  })));
4959
5105
  }
4960
5106
  andTee(f) {
4961
- return new ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
5107
+ return new ResultAsync2(this._promise.then((res) => __awaiter$1(this, void 0, void 0, function* () {
4962
5108
  if (res.isErr()) {
4963
- return new Err(res.error);
5109
+ return new Err$1(res.error);
4964
5110
  }
4965
5111
  try {
4966
5112
  yield f(res.value);
4967
5113
  } catch (e) {
4968
5114
  }
4969
- return new Ok(res.value);
5115
+ return new Ok$1(res.value);
4970
5116
  })));
4971
5117
  }
4972
5118
  mapErr(f) {
4973
- return new ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
5119
+ return new ResultAsync2(this._promise.then((res) => __awaiter$1(this, void 0, void 0, function* () {
4974
5120
  if (res.isOk()) {
4975
- return new Ok(res.value);
5121
+ return new Ok$1(res.value);
4976
5122
  }
4977
- return new Err(yield f(res.error));
5123
+ return new Err$1(yield f(res.error));
4978
5124
  })));
4979
5125
  }
4980
5126
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
4981
5127
  andThen(f) {
4982
- return new ResultAsync(this._promise.then((res) => {
5128
+ return new ResultAsync2(this._promise.then((res) => {
4983
5129
  if (res.isErr()) {
4984
- return new Err(res.error);
5130
+ return new Err$1(res.error);
4985
5131
  }
4986
5132
  const newValue = f(res.value);
4987
- return newValue instanceof ResultAsync ? newValue._promise : newValue;
5133
+ return newValue instanceof ResultAsync2 ? newValue._promise : newValue;
4988
5134
  }));
4989
5135
  }
4990
5136
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
4991
5137
  orElse(f) {
4992
- return new ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
5138
+ return new ResultAsync2(this._promise.then((res) => __awaiter$1(this, void 0, void 0, function* () {
4993
5139
  if (res.isErr()) {
4994
5140
  return f(res.error);
4995
5141
  }
4996
- return new Ok(res.value);
5142
+ return new Ok$1(res.value);
4997
5143
  })));
4998
5144
  }
4999
5145
  match(ok2, _err) {
@@ -5006,21 +5152,21 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
5006
5152
  * Emulates Rust's `?` operator in `safeTry`'s body. See also `safeTry`.
5007
5153
  */
5008
5154
  safeUnwrap() {
5009
- return __asyncGenerator(this, arguments, function* safeUnwrap_1() {
5010
- return yield __await(yield __await(yield* __asyncDelegator(__asyncValues(yield __await(this._promise.then((res) => res.safeUnwrap()))))));
5155
+ return __asyncGenerator$1(this, arguments, function* safeUnwrap_1() {
5156
+ return yield __await$1(yield __await$1(yield* __asyncDelegator$1(__asyncValues$1(yield __await$1(this._promise.then((res) => res.safeUnwrap()))))));
5011
5157
  });
5012
5158
  }
5013
5159
  // Makes ResultAsync implement PromiseLike<Result>
5014
5160
  then(successCallback, failureCallback) {
5015
5161
  return this._promise.then(successCallback, failureCallback);
5016
5162
  }
5017
- }
5018
- const errAsync = (err2) => new ResultAsync(Promise.resolve(new Err(err2)));
5019
- const combineResultList = (resultList) => {
5020
- let acc = ok([]);
5163
+ };
5164
+ const errAsync$1 = (err2) => new ResultAsync$1(Promise.resolve(new Err$1(err2)));
5165
+ const combineResultList$1 = (resultList) => {
5166
+ let acc = ok$1([]);
5021
5167
  for (const result of resultList) {
5022
5168
  if (result.isErr()) {
5023
- acc = err(result.error);
5169
+ acc = err$1(result.error);
5024
5170
  break;
5025
5171
  } else {
5026
5172
  acc.map((list) => list.push(result.value));
@@ -5028,48 +5174,48 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
5028
5174
  }
5029
5175
  return acc;
5030
5176
  };
5031
- const combineResultAsyncList = (asyncResultList) => ResultAsync.fromSafePromise(Promise.all(asyncResultList)).andThen(combineResultList);
5032
- const combineResultListWithAllErrors = (resultList) => {
5033
- let acc = ok([]);
5177
+ const combineResultAsyncList$1 = (asyncResultList) => ResultAsync$1.fromSafePromise(Promise.all(asyncResultList)).andThen(combineResultList$1);
5178
+ const combineResultListWithAllErrors$1 = (resultList) => {
5179
+ let acc = ok$1([]);
5034
5180
  for (const result of resultList) {
5035
5181
  if (result.isErr() && acc.isErr()) {
5036
5182
  acc.error.push(result.error);
5037
5183
  } else if (result.isErr() && acc.isOk()) {
5038
- acc = err([result.error]);
5184
+ acc = err$1([result.error]);
5039
5185
  } else if (result.isOk() && acc.isOk()) {
5040
5186
  acc.value.push(result.value);
5041
5187
  }
5042
5188
  }
5043
5189
  return acc;
5044
5190
  };
5045
- const combineResultAsyncListWithAllErrors = (asyncResultList) => ResultAsync.fromSafePromise(Promise.all(asyncResultList)).andThen(combineResultListWithAllErrors);
5046
- var Result;
5191
+ const combineResultAsyncListWithAllErrors$1 = (asyncResultList) => ResultAsync$1.fromSafePromise(Promise.all(asyncResultList)).andThen(combineResultListWithAllErrors$1);
5192
+ var Result$1;
5047
5193
  (function(Result2) {
5048
5194
  function fromThrowable(fn, errorFn) {
5049
5195
  return (...args) => {
5050
5196
  try {
5051
5197
  const result = fn(...args);
5052
- return ok(result);
5198
+ return ok$1(result);
5053
5199
  } catch (e) {
5054
- return err(errorFn ? errorFn(e) : e);
5200
+ return err$1(errorFn ? errorFn(e) : e);
5055
5201
  }
5056
5202
  };
5057
5203
  }
5058
5204
  Result2.fromThrowable = fromThrowable;
5059
5205
  function combine(resultList) {
5060
- return combineResultList(resultList);
5206
+ return combineResultList$1(resultList);
5061
5207
  }
5062
5208
  Result2.combine = combine;
5063
5209
  function combineWithAllErrors(resultList) {
5064
- return combineResultListWithAllErrors(resultList);
5210
+ return combineResultListWithAllErrors$1(resultList);
5065
5211
  }
5066
5212
  Result2.combineWithAllErrors = combineWithAllErrors;
5067
- })(Result || (Result = {}));
5068
- const ok = (value) => new Ok(value);
5069
- function err(err2) {
5070
- return new Err(err2);
5213
+ })(Result$1 || (Result$1 = {}));
5214
+ const ok$1 = (value) => new Ok$1(value);
5215
+ function err$1(err2) {
5216
+ return new Err$1(err2);
5071
5217
  }
5072
- class Ok {
5218
+ let Ok$1 = class Ok {
5073
5219
  constructor(value) {
5074
5220
  this.value = value;
5075
5221
  }
@@ -5080,11 +5226,11 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
5080
5226
  return !this.isOk();
5081
5227
  }
5082
5228
  map(f) {
5083
- return ok(f(this.value));
5229
+ return ok$1(f(this.value));
5084
5230
  }
5085
5231
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
5086
5232
  mapErr(_f) {
5087
- return ok(this.value);
5233
+ return ok$1(this.value);
5088
5234
  }
5089
5235
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
5090
5236
  andThen(f) {
@@ -5099,11 +5245,11 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
5099
5245
  f(this.value);
5100
5246
  } catch (e) {
5101
5247
  }
5102
- return ok(this.value);
5248
+ return ok$1(this.value);
5103
5249
  }
5104
5250
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
5105
5251
  orElse(_f) {
5106
- return ok(this.value);
5252
+ return ok$1(this.value);
5107
5253
  }
5108
5254
  asyncAndThen(f) {
5109
5255
  return f(this.value);
@@ -5113,7 +5259,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
5113
5259
  return f(this.value).map(() => this.value);
5114
5260
  }
5115
5261
  asyncMap(f) {
5116
- return ResultAsync.fromSafePromise(f(this.value));
5262
+ return ResultAsync$1.fromSafePromise(f(this.value));
5117
5263
  }
5118
5264
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
5119
5265
  unwrapOr(_v) {
@@ -5133,10 +5279,10 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
5133
5279
  return this.value;
5134
5280
  }
5135
5281
  _unsafeUnwrapErr(config) {
5136
- throw createNeverThrowError("Called `_unsafeUnwrapErr` on an Ok", this, config);
5282
+ throw createNeverThrowError$1("Called `_unsafeUnwrapErr` on an Ok", this, config);
5137
5283
  }
5138
- }
5139
- class Err {
5284
+ };
5285
+ let Err$1 = class Err {
5140
5286
  constructor(error) {
5141
5287
  this.error = error;
5142
5288
  }
@@ -5148,20 +5294,20 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
5148
5294
  }
5149
5295
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
5150
5296
  map(_f) {
5151
- return err(this.error);
5297
+ return err$1(this.error);
5152
5298
  }
5153
5299
  mapErr(f) {
5154
- return err(f(this.error));
5300
+ return err$1(f(this.error));
5155
5301
  }
5156
5302
  andThrough(_f) {
5157
- return err(this.error);
5303
+ return err$1(this.error);
5158
5304
  }
5159
5305
  andTee(_f) {
5160
- return err(this.error);
5306
+ return err$1(this.error);
5161
5307
  }
5162
5308
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
5163
5309
  andThen(_f) {
5164
- return err(this.error);
5310
+ return err$1(this.error);
5165
5311
  }
5166
5312
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
5167
5313
  orElse(f) {
@@ -5169,14 +5315,14 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
5169
5315
  }
5170
5316
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
5171
5317
  asyncAndThen(_f) {
5172
- return errAsync(this.error);
5318
+ return errAsync$1(this.error);
5173
5319
  }
5174
5320
  asyncAndThrough(_f) {
5175
- return errAsync(this.error);
5321
+ return errAsync$1(this.error);
5176
5322
  }
5177
5323
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
5178
5324
  asyncMap(_f) {
5179
- return errAsync(this.error);
5325
+ return errAsync$1(this.error);
5180
5326
  }
5181
5327
  unwrapOr(v) {
5182
5328
  return v;
@@ -5187,18 +5333,18 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
5187
5333
  safeUnwrap() {
5188
5334
  const error = this.error;
5189
5335
  return function* () {
5190
- yield err(error);
5336
+ yield err$1(error);
5191
5337
  throw new Error("Do not use this generator out of `safeTry`");
5192
5338
  }();
5193
5339
  }
5194
5340
  _unsafeUnwrap(config) {
5195
- throw createNeverThrowError("Called `_unsafeUnwrap` on an Err", this, config);
5341
+ throw createNeverThrowError$1("Called `_unsafeUnwrap` on an Err", this, config);
5196
5342
  }
5197
5343
  _unsafeUnwrapErr(_) {
5198
5344
  return this.error;
5199
5345
  }
5200
- }
5201
- Result.fromThrowable;
5346
+ };
5347
+ Result$1.fromThrowable;
5202
5348
  const PATH_PARAM_RE = /\{[^{}]+\}/g;
5203
5349
  function randomID() {
5204
5350
  return Math.random().toString(36).slice(2, 11);
@@ -5226,7 +5372,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
5226
5372
  querySerializer: requestQuerySerializer,
5227
5373
  bodySerializer = globalBodySerializer ?? defaultBodySerializer,
5228
5374
  body,
5229
- ...init
5375
+ ...init2
5230
5376
  } = fetchOptions || {};
5231
5377
  if (localBaseUrl) {
5232
5378
  baseUrl = removeTrailingSlash(localBaseUrl);
@@ -5249,16 +5395,16 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
5249
5395
  const requestInit = {
5250
5396
  redirect: "follow",
5251
5397
  ...baseOptions,
5252
- ...init,
5398
+ ...init2,
5253
5399
  body: serializedBody,
5254
5400
  headers: mergeHeaders(defaultHeaders, baseHeaders, headers, params.header)
5255
5401
  };
5256
5402
  let id;
5257
5403
  let options;
5258
5404
  let request = new CustomRequest(createFinalURL(schemaPath, { baseUrl, params, querySerializer }), requestInit);
5259
- for (const key in init) {
5405
+ for (const key in init2) {
5260
5406
  if (!(key in request)) {
5261
- request[key] = init[key];
5407
+ request[key] = init2[key];
5262
5408
  }
5263
5409
  }
5264
5410
  if (middlewares.length) {
@@ -5328,36 +5474,36 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
5328
5474
  }
5329
5475
  return {
5330
5476
  /** Call a GET endpoint */
5331
- GET(url, init) {
5332
- return coreFetch(url, { ...init, method: "GET" });
5477
+ GET(url, init2) {
5478
+ return coreFetch(url, { ...init2, method: "GET" });
5333
5479
  },
5334
5480
  /** Call a PUT endpoint */
5335
- PUT(url, init) {
5336
- return coreFetch(url, { ...init, method: "PUT" });
5481
+ PUT(url, init2) {
5482
+ return coreFetch(url, { ...init2, method: "PUT" });
5337
5483
  },
5338
5484
  /** Call a POST endpoint */
5339
- POST(url, init) {
5340
- return coreFetch(url, { ...init, method: "POST" });
5485
+ POST(url, init2) {
5486
+ return coreFetch(url, { ...init2, method: "POST" });
5341
5487
  },
5342
5488
  /** Call a DELETE endpoint */
5343
- DELETE(url, init) {
5344
- return coreFetch(url, { ...init, method: "DELETE" });
5489
+ DELETE(url, init2) {
5490
+ return coreFetch(url, { ...init2, method: "DELETE" });
5345
5491
  },
5346
5492
  /** Call a OPTIONS endpoint */
5347
- OPTIONS(url, init) {
5348
- return coreFetch(url, { ...init, method: "OPTIONS" });
5493
+ OPTIONS(url, init2) {
5494
+ return coreFetch(url, { ...init2, method: "OPTIONS" });
5349
5495
  },
5350
5496
  /** Call a HEAD endpoint */
5351
- HEAD(url, init) {
5352
- return coreFetch(url, { ...init, method: "HEAD" });
5497
+ HEAD(url, init2) {
5498
+ return coreFetch(url, { ...init2, method: "HEAD" });
5353
5499
  },
5354
5500
  /** Call a PATCH endpoint */
5355
- PATCH(url, init) {
5356
- return coreFetch(url, { ...init, method: "PATCH" });
5501
+ PATCH(url, init2) {
5502
+ return coreFetch(url, { ...init2, method: "PATCH" });
5357
5503
  },
5358
5504
  /** Call a TRACE endpoint */
5359
- TRACE(url, init) {
5360
- return coreFetch(url, { ...init, method: "TRACE" });
5505
+ TRACE(url, init2) {
5506
+ return coreFetch(url, { ...init2, method: "TRACE" });
5361
5507
  },
5362
5508
  /** Register middleware */
5363
5509
  use(...middleware) {
@@ -5592,6 +5738,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
5592
5738
  }
5593
5739
  const TICKETS_CALENDAR_ENDPOINT = "/api/v4/tickets/calendar";
5594
5740
  const TICKET_AND_QUOTAS_ENDPOINT = "/api/v4/tickets/list_and_quotas";
5741
+ const TICKETS_ENDPOINT = "/api/v4/tickets";
5595
5742
  var util;
5596
5743
  (function(util2) {
5597
5744
  util2.assertEqual = (val) => val;
@@ -7823,11 +7970,11 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
7823
7970
  unknownKeys: "strict",
7824
7971
  ...message !== void 0 ? {
7825
7972
  errorMap: (issue, ctx) => {
7826
- var _a2, _b2, _c2, _d;
7973
+ var _a2, _b2, _c2, _d2;
7827
7974
  const defaultError = (_c2 = (_b2 = (_a2 = this._def).errorMap) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, issue, ctx).message) !== null && _c2 !== void 0 ? _c2 : ctx.defaultError;
7828
7975
  if (issue.code === "unrecognized_keys")
7829
7976
  return {
7830
- message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError
7977
+ message: (_d2 = errorUtil.errToObj(message).message) !== null && _d2 !== void 0 ? _d2 : defaultError
7831
7978
  };
7832
7979
  return {
7833
7980
  message: defaultError
@@ -9525,40 +9672,6 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
9525
9672
  start_at: z.string().date(),
9526
9673
  personalizations: z.array(PersonalizationSchema)
9527
9674
  });
9528
- const isObject$1 = (value) => {
9529
- return !!value && value.constructor === Object;
9530
- };
9531
- const sort = (array, getter, desc = false) => {
9532
- if (!array)
9533
- return [];
9534
- const asc = (a, b) => getter(a) - getter(b);
9535
- const dsc = (a, b) => getter(b) - getter(a);
9536
- return array.slice().sort(desc === true ? dsc : asc);
9537
- };
9538
- const alphabetical = (array, getter, dir = "asc") => {
9539
- if (!array)
9540
- return [];
9541
- const asc = (a, b) => `${getter(a)}`.localeCompare(getter(b));
9542
- const dsc = (a, b) => `${getter(b)}`.localeCompare(getter(a));
9543
- return array.slice().sort(dir === "desc" ? dsc : asc);
9544
- };
9545
- const assign = (initial, override) => {
9546
- if (!initial || !override)
9547
- return initial ?? override ?? {};
9548
- return Object.entries({ ...initial, ...override }).reduce(
9549
- (acc, [key, value]) => {
9550
- return {
9551
- ...acc,
9552
- [key]: (() => {
9553
- if (isObject$1(initial[key]))
9554
- return assign(initial[key], value);
9555
- return value;
9556
- })()
9557
- };
9558
- },
9559
- {}
9560
- );
9561
- };
9562
9675
  function $2b4dce13dd5a17fa$export$842a2cf37af977e1(amount, numerator) {
9563
9676
  return amount - numerator * Math.floor(amount / numerator);
9564
9677
  }
@@ -10346,6 +10459,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
10346
10459
  if (m[8]) date.offset = $fae977aafc393c5c$var$parseNumber(m[8], -23, 23) * 36e5 + $fae977aafc393c5c$var$parseNumber((_m_ = m[9]) !== null && _m_ !== void 0 ? _m_ : "0", 0, 59) * 6e4;
10347
10460
  return $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone);
10348
10461
  }
10462
+ function $fae977aafc393c5c$export$8e384432362ed0f0(value) {
10463
+ return $fae977aafc393c5c$export$5adfdab05168c219(value, $14e0f24ef4ac5c92$export$aa8b41735afcabd2());
10464
+ }
10349
10465
  function $fae977aafc393c5c$var$parseNumber(value, min, max) {
10350
10466
  let val = Number(value);
10351
10467
  if (val < min || val > max) throw new RangeError(`Value out of range: ${min} <= ${val} <= ${max}`);
@@ -10744,7 +10860,18 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
10744
10860
  function formatTime(value) {
10745
10861
  return $11d87f3f76e88657$export$d33f79e3ffc3dc83($fae977aafc393c5c$export$5adfdab05168c219(value, "Europe/Berlin")).toString().slice(0, -3);
10746
10862
  }
10747
- function formatCurrency(priceCents) {
10863
+ function formatDate(isoDateString, options = {
10864
+ weekday: "long",
10865
+ year: "numeric",
10866
+ month: "long",
10867
+ day: "numeric"
10868
+ }, locale = "de") {
10869
+ options = {
10870
+ ...options
10871
+ };
10872
+ return new Date(isoDateString).toLocaleDateString(locale, options);
10873
+ }
10874
+ function formatCurrency$1(priceCents) {
10748
10875
  if (priceCents === void 0) {
10749
10876
  throw Error("priceCents is required");
10750
10877
  }
@@ -10763,6 +10890,40 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
10763
10890
  })
10764
10891
  ];
10765
10892
  }
10893
+ const isObject$1 = (value) => {
10894
+ return !!value && value.constructor === Object;
10895
+ };
10896
+ const sort = (array, getter, desc = false) => {
10897
+ if (!array)
10898
+ return [];
10899
+ const asc = (a, b) => getter(a) - getter(b);
10900
+ const dsc = (a, b) => getter(b) - getter(a);
10901
+ return array.slice().sort(desc === true ? dsc : asc);
10902
+ };
10903
+ const alphabetical = (array, getter, dir = "asc") => {
10904
+ if (!array)
10905
+ return [];
10906
+ const asc = (a, b) => `${getter(a)}`.localeCompare(getter(b));
10907
+ const dsc = (a, b) => `${getter(b)}`.localeCompare(getter(a));
10908
+ return array.slice().sort(dir === "desc" ? dsc : asc);
10909
+ };
10910
+ const assign = (initial, override) => {
10911
+ if (!initial || !override)
10912
+ return initial ?? override ?? {};
10913
+ return Object.entries({ ...initial, ...override }).reduce(
10914
+ (acc, [key, value]) => {
10915
+ return {
10916
+ ...acc,
10917
+ [key]: (() => {
10918
+ if (isObject$1(initial[key]))
10919
+ return assign(initial[key], value);
10920
+ return value;
10921
+ })()
10922
+ };
10923
+ },
10924
+ {}
10925
+ );
10926
+ };
10766
10927
  class GomusTicket {
10767
10928
  constructor(ticketObject, minAvailableCapacity = 0, selectedTime = "", quantity) {
10768
10929
  __publicField(this, "id");
@@ -10803,7 +10964,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
10803
10964
  } else {
10804
10965
  this.priceCents = ticketObject.price_cents * (1 + this.vatPct / 100);
10805
10966
  }
10806
- this.priceFormatted = formatCurrency(this.priceCents);
10967
+ this.priceFormatted = formatCurrency$1(this.priceCents);
10807
10968
  this.quantity = quantity || 0;
10808
10969
  this.minQuantity = ticketObject.min_persons;
10809
10970
  this.maxPersons = ticketObject.max_persons;
@@ -10856,7 +11017,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
10856
11017
  }
10857
11018
  updateTotalPrices() {
10858
11019
  this.totalPriceCents = this.quantity * this.priceCents;
10859
- this.totalPriceFormatted = formatCurrency(this.totalPriceCents);
11020
+ this.totalPriceFormatted = formatCurrency$1(this.totalPriceCents);
10860
11021
  }
10861
11022
  }
10862
11023
  function initGomusTickets(tickets) {
@@ -10866,46 +11027,106 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
10866
11027
  });
10867
11028
  return sort(Object.values(tmpTickets), (f) => f.shopOrder);
10868
11029
  }
10869
- class Shop {
10870
- constructor(apiUrl, shopDomain, locale, type = "angular") {
10871
- __privateAdd(this, _Shop_instances);
10872
- __privateAdd(this, _data, /* @__PURE__ */ state(proxy({})));
10873
- // Holds the fetch status and timestamp for data requests, tracking whether the request is ongoing or completed and when it was completed.
10874
- __privateAdd(this, _fetchStatus, {});
10875
- __privateAdd(this, _canFetch, () => {
10876
- return this.apiUrl !== void 0 && this.shopDomain !== void 0 && this.locale !== void 0 && this.client !== void 0;
10877
- });
10878
- __privateAdd(this, _ensureFetch, () => {
10879
- if (this.apiUrl === void 0) {
10880
- throw new Error("Public API URL is not set");
10881
- }
10882
- if (this.shopDomain === void 0) {
10883
- throw new Error("Shop Domain (X-Shop-Url) is not set");
10884
- }
10885
- if (this.locale === void 0) {
10886
- throw new Error("Locale is not set");
10887
- }
10888
- if (this.client === void 0) {
10889
- throw new Error("client is not set");
10890
- }
10891
- if (!__privateGet(this, _canFetch).call(this)) {
10892
- throw new Error("Fetch is not possible.");
10893
- }
10894
- });
10895
- this.type = type;
10896
- if (apiUrl && shopDomain && locale) {
10897
- this.load(apiUrl, shopDomain, locale, type);
10898
- }
10899
- }
10900
- async load(apiUrl, shopDomain, locale, type = "angular") {
10901
- if (apiUrl.includes("jmb-staging.gomus.de") || apiUrl.includes("jmb.gomus.de")) {
10902
- this.type = "jmb";
10903
- }
10904
- get(__privateGet(this, _data)).urls = shopUrlProvider(this.type);
10905
- get(__privateGet(this, _data)).currentUser = getUserProvider(this.type);
10906
- get(__privateGet(this, _data)).apiUrl = apiUrl;
10907
- get(__privateGet(this, _data)).shopDomain = shopDomain;
10908
- get(__privateGet(this, _data)).locale = locale || "de";
11030
+ class GomusAnnualTicket {
11031
+ constructor(ticketObject, minAvailableCapacity = 0, selectedTime = "", quantity) {
11032
+ __publicField(this, "id");
11033
+ __publicField(this, "title");
11034
+ __publicField(this, "description");
11035
+ __publicField(this, "type");
11036
+ __publicField(this, "selectedTime");
11037
+ __publicField(this, "_quantity", 0);
11038
+ __publicField(this, "quantityOptions");
11039
+ __publicField(this, "vatPct");
11040
+ __publicField(this, "priceCents");
11041
+ __publicField(this, "priceFormatted");
11042
+ __publicField(this, "totalPriceCents");
11043
+ __publicField(this, "totalPriceFormatted");
11044
+ __publicField(this, "minQuantity");
11045
+ __publicField(this, "maxQuantity");
11046
+ __publicField(this, "maxPersons");
11047
+ __publicField(this, "shopOrder");
11048
+ __publicField(this, "minAvailableCapacity");
11049
+ __publicField(this, "reductionReason");
11050
+ __publicField(this, "ticketObject");
11051
+ this.ticketObject = ticketObject;
11052
+ this.minAvailableCapacity = minAvailableCapacity;
11053
+ this.id = ticketObject.id;
11054
+ this.title = ticketObject.title;
11055
+ this.description = ticketObject.description;
11056
+ this.type = "annual";
11057
+ this.selectedTime = selectedTime;
11058
+ this.vatPct = ticketObject.vat_pct;
11059
+ if (ticketObject.tax_included) {
11060
+ this.priceCents = ticketObject.price_cents;
11061
+ } else {
11062
+ this.priceCents = ticketObject.price_cents * (1 + this.vatPct / 100);
11063
+ }
11064
+ this.priceFormatted = formatCurrency$1(this.priceCents);
11065
+ this.quantity = quantity || 0;
11066
+ this.minQuantity = ticketObject.min_persons;
11067
+ this.maxPersons = ticketObject.max_persons;
11068
+ this.quantityOptions = generateQuantityOptions(this.minQuantity, this.maxPersons);
11069
+ this.shopOrder = ticketObject.shop_order ? ticketObject.shop_order : 0;
11070
+ }
11071
+ set quantity(value) {
11072
+ this._quantity = value;
11073
+ this.updateTotalPrices();
11074
+ }
11075
+ get quantity() {
11076
+ return this._quantity;
11077
+ }
11078
+ updateTotalPrices() {
11079
+ this.totalPriceCents = this.quantity * this.priceCents;
11080
+ this.totalPriceFormatted = formatCurrency$1(this.totalPriceCents);
11081
+ }
11082
+ }
11083
+ function initAnnualTickets(tickets) {
11084
+ const tmpTickets = {};
11085
+ Object.keys(tickets).forEach((ticketId) => {
11086
+ if (tickets[ticketId]) tmpTickets[ticketId] = new GomusAnnualTicket(tickets[ticketId]);
11087
+ });
11088
+ return sort(Object.values(tmpTickets), (f) => f.shopOrder);
11089
+ }
11090
+ class Shop {
11091
+ constructor(apiUrl, shopDomain, locale, type = "angular") {
11092
+ __privateAdd(this, _Shop_instances);
11093
+ __privateAdd(this, _data, /* @__PURE__ */ state(proxy({})));
11094
+ // Holds the fetch status and timestamp for data requests, tracking whether the request is ongoing or completed and when it was completed.
11095
+ __privateAdd(this, _fetchStatus, {});
11096
+ __privateAdd(this, _canFetch, () => {
11097
+ return this.apiUrl !== void 0 && this.shopDomain !== void 0 && this.locale !== void 0 && this.client !== void 0;
11098
+ });
11099
+ __privateAdd(this, _ensureFetch, () => {
11100
+ if (this.apiUrl === void 0) {
11101
+ throw new Error("Public API URL is not set");
11102
+ }
11103
+ if (this.shopDomain === void 0) {
11104
+ throw new Error("Shop Domain (X-Shop-Url) is not set");
11105
+ }
11106
+ if (this.locale === void 0) {
11107
+ throw new Error("Locale is not set");
11108
+ }
11109
+ if (this.client === void 0) {
11110
+ throw new Error("client is not set");
11111
+ }
11112
+ if (!__privateGet(this, _canFetch).call(this)) {
11113
+ throw new Error("Fetch is not possible.");
11114
+ }
11115
+ });
11116
+ this.type = type;
11117
+ if (apiUrl && shopDomain && locale) {
11118
+ this.load(apiUrl, shopDomain, locale, type);
11119
+ }
11120
+ }
11121
+ async load(apiUrl, shopDomain, locale, type = "angular") {
11122
+ if (apiUrl.includes("jmb-staging.gomus.de") || apiUrl.includes("jmb.gomus.de")) {
11123
+ this.type = "jmb";
11124
+ }
11125
+ get(__privateGet(this, _data)).urls = shopUrlProvider(this.type);
11126
+ get(__privateGet(this, _data)).currentUser = getUserProvider(this.type);
11127
+ get(__privateGet(this, _data)).apiUrl = apiUrl;
11128
+ get(__privateGet(this, _data)).shopDomain = shopDomain;
11129
+ get(__privateGet(this, _data)).locale = locale || "de";
10909
11130
  __privateSet(this, _fetchStatus, {});
10910
11131
  get(__privateGet(this, _data)).client = client(apiUrl, shopDomain);
10911
11132
  await this.waitForAllFetches(this.shop);
@@ -10990,6 +11211,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
10990
11211
  ticketsAndQuotas(params) {
10991
11212
  return this.fetchAndCache(TICKET_AND_QUOTAS_ENDPOINT, `ticketsAndQuotas-${JSON.stringify(params)}`, "", { cache: 60, query: params });
10992
11213
  }
11214
+ tickets(params) {
11215
+ return this.fetchAndCache(TICKETS_ENDPOINT, `tickets-${JSON.stringify(params)}`, "", { cache: 60, query: params });
11216
+ }
10993
11217
  /**
10994
11218
  * Returns a reactive value that will contain the fetched data, no need to await.
10995
11219
  *
@@ -11113,38 +11337,661 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11113
11337
  }
11114
11338
  });
11115
11339
  }
11116
- customElements.define("gomus-init", create_custom_element(
11117
- GomusInit,
11118
- {
11119
- apiUrl: { attribute: "api-url", type: "String" },
11120
- shopDomain: { attribute: "shop-domain", type: "String" },
11121
- locale: { attribute: "locale", type: "String" }
11122
- },
11123
- [],
11124
- [],
11125
- false
11126
- ));
11127
- function createSetDetails(KEY2) {
11128
- return function(host, details) {
11129
- if (host) {
11130
- host.addEventListener(KEY2, (e) => {
11131
- e.detail.data = details;
11132
- });
11133
- }
11134
- setContext(KEY2, details);
11135
- };
11340
+ customElements.define("gomus-init", create_custom_element(
11341
+ GomusInit,
11342
+ {
11343
+ apiUrl: { attribute: "api-url", type: "String" },
11344
+ shopDomain: { attribute: "shop-domain", type: "String" },
11345
+ locale: { attribute: "locale", type: "String" }
11346
+ },
11347
+ [],
11348
+ [],
11349
+ false
11350
+ ));
11351
+ function createSetDetails(KEY2) {
11352
+ return function(host, details) {
11353
+ if (host) {
11354
+ host.addEventListener(KEY2, (e) => {
11355
+ e.detail.data = details;
11356
+ });
11357
+ }
11358
+ setContext(KEY2, details);
11359
+ };
11360
+ }
11361
+ function createGetDetails(KEY2) {
11362
+ return function(host) {
11363
+ if (host) {
11364
+ const container = proxy({ data: void 0 });
11365
+ host.dispatchEvent(new CustomEvent(KEY2, { detail: container, bubbles: true }));
11366
+ return container.data;
11367
+ } else {
11368
+ return getContext(KEY2);
11369
+ }
11370
+ };
11371
+ }
11372
+ const defaultErrorConfig = {
11373
+ withStackTrace: false
11374
+ };
11375
+ const createNeverThrowError = (message, result, config = defaultErrorConfig) => {
11376
+ const data = result.isOk() ? { type: "Ok", value: result.value } : { type: "Err", value: result.error };
11377
+ const maybeStack = config.withStackTrace ? new Error().stack : void 0;
11378
+ return {
11379
+ data,
11380
+ message,
11381
+ stack: maybeStack
11382
+ };
11383
+ };
11384
+ function __awaiter(thisArg, _arguments, P, generator) {
11385
+ function adopt(value) {
11386
+ return value instanceof P ? value : new P(function(resolve) {
11387
+ resolve(value);
11388
+ });
11389
+ }
11390
+ return new (P || (P = Promise))(function(resolve, reject) {
11391
+ function fulfilled(value) {
11392
+ try {
11393
+ step(generator.next(value));
11394
+ } catch (e) {
11395
+ reject(e);
11396
+ }
11397
+ }
11398
+ function rejected(value) {
11399
+ try {
11400
+ step(generator["throw"](value));
11401
+ } catch (e) {
11402
+ reject(e);
11403
+ }
11404
+ }
11405
+ function step(result) {
11406
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
11407
+ }
11408
+ step((generator = generator.apply(thisArg, [])).next());
11409
+ });
11410
+ }
11411
+ function __values(o) {
11412
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
11413
+ if (m) return m.call(o);
11414
+ if (o && typeof o.length === "number") return {
11415
+ next: function() {
11416
+ if (o && i >= o.length) o = void 0;
11417
+ return { value: o && o[i++], done: !o };
11418
+ }
11419
+ };
11420
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
11421
+ }
11422
+ function __await(v) {
11423
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
11424
+ }
11425
+ function __asyncGenerator(thisArg, _arguments, generator) {
11426
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
11427
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
11428
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() {
11429
+ return this;
11430
+ }, i;
11431
+ function awaitReturn(f) {
11432
+ return function(v) {
11433
+ return Promise.resolve(v).then(f, reject);
11434
+ };
11435
+ }
11436
+ function verb(n, f) {
11437
+ if (g[n]) {
11438
+ i[n] = function(v) {
11439
+ return new Promise(function(a, b) {
11440
+ q.push([n, v, a, b]) > 1 || resume(n, v);
11441
+ });
11442
+ };
11443
+ if (f) i[n] = f(i[n]);
11444
+ }
11445
+ }
11446
+ function resume(n, v) {
11447
+ try {
11448
+ step(g[n](v));
11449
+ } catch (e) {
11450
+ settle(q[0][3], e);
11451
+ }
11452
+ }
11453
+ function step(r2) {
11454
+ r2.value instanceof __await ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q[0][2], r2);
11455
+ }
11456
+ function fulfill(value) {
11457
+ resume("next", value);
11458
+ }
11459
+ function reject(value) {
11460
+ resume("throw", value);
11461
+ }
11462
+ function settle(f, v) {
11463
+ if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
11464
+ }
11465
+ }
11466
+ function __asyncDelegator(o) {
11467
+ var i, p;
11468
+ return i = {}, verb("next"), verb("throw", function(e) {
11469
+ throw e;
11470
+ }), verb("return"), i[Symbol.iterator] = function() {
11471
+ return this;
11472
+ }, i;
11473
+ function verb(n, f) {
11474
+ i[n] = o[n] ? function(v) {
11475
+ return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v;
11476
+ } : f;
11477
+ }
11478
+ }
11479
+ function __asyncValues(o) {
11480
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
11481
+ var m = o[Symbol.asyncIterator], i;
11482
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
11483
+ return this;
11484
+ }, i);
11485
+ function verb(n) {
11486
+ i[n] = o[n] && function(v) {
11487
+ return new Promise(function(resolve, reject) {
11488
+ v = o[n](v), settle(resolve, reject, v.done, v.value);
11489
+ });
11490
+ };
11491
+ }
11492
+ function settle(resolve, reject, d, v) {
11493
+ Promise.resolve(v).then(function(v2) {
11494
+ resolve({ value: v2, done: d });
11495
+ }, reject);
11496
+ }
11497
+ }
11498
+ typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
11499
+ var e = new Error(message);
11500
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
11501
+ };
11502
+ class ResultAsync {
11503
+ constructor(res) {
11504
+ this._promise = res;
11505
+ }
11506
+ static fromSafePromise(promise) {
11507
+ const newPromise = promise.then((value) => new Ok(value));
11508
+ return new ResultAsync(newPromise);
11509
+ }
11510
+ static fromPromise(promise, errorFn) {
11511
+ const newPromise = promise.then((value) => new Ok(value)).catch((e) => new Err(errorFn(e)));
11512
+ return new ResultAsync(newPromise);
11513
+ }
11514
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11515
+ static fromThrowable(fn, errorFn) {
11516
+ return (...args) => {
11517
+ return new ResultAsync((() => __awaiter(this, void 0, void 0, function* () {
11518
+ try {
11519
+ return new Ok(yield fn(...args));
11520
+ } catch (error) {
11521
+ return new Err(errorFn ? errorFn(error) : error);
11522
+ }
11523
+ }))());
11524
+ };
11525
+ }
11526
+ static combine(asyncResultList) {
11527
+ return combineResultAsyncList(asyncResultList);
11528
+ }
11529
+ static combineWithAllErrors(asyncResultList) {
11530
+ return combineResultAsyncListWithAllErrors(asyncResultList);
11531
+ }
11532
+ map(f) {
11533
+ return new ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
11534
+ if (res.isErr()) {
11535
+ return new Err(res.error);
11536
+ }
11537
+ return new Ok(yield f(res.value));
11538
+ })));
11539
+ }
11540
+ andThrough(f) {
11541
+ return new ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
11542
+ if (res.isErr()) {
11543
+ return new Err(res.error);
11544
+ }
11545
+ const newRes = yield f(res.value);
11546
+ if (newRes.isErr()) {
11547
+ return new Err(newRes.error);
11548
+ }
11549
+ return new Ok(res.value);
11550
+ })));
11551
+ }
11552
+ andTee(f) {
11553
+ return new ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
11554
+ if (res.isErr()) {
11555
+ return new Err(res.error);
11556
+ }
11557
+ try {
11558
+ yield f(res.value);
11559
+ } catch (e) {
11560
+ }
11561
+ return new Ok(res.value);
11562
+ })));
11563
+ }
11564
+ orTee(f) {
11565
+ return new ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
11566
+ if (res.isOk()) {
11567
+ return new Ok(res.value);
11568
+ }
11569
+ try {
11570
+ yield f(res.error);
11571
+ } catch (e) {
11572
+ }
11573
+ return new Err(res.error);
11574
+ })));
11575
+ }
11576
+ mapErr(f) {
11577
+ return new ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
11578
+ if (res.isOk()) {
11579
+ return new Ok(res.value);
11580
+ }
11581
+ return new Err(yield f(res.error));
11582
+ })));
11583
+ }
11584
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
11585
+ andThen(f) {
11586
+ return new ResultAsync(this._promise.then((res) => {
11587
+ if (res.isErr()) {
11588
+ return new Err(res.error);
11589
+ }
11590
+ const newValue = f(res.value);
11591
+ return newValue instanceof ResultAsync ? newValue._promise : newValue;
11592
+ }));
11593
+ }
11594
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
11595
+ orElse(f) {
11596
+ return new ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
11597
+ if (res.isErr()) {
11598
+ return f(res.error);
11599
+ }
11600
+ return new Ok(res.value);
11601
+ })));
11602
+ }
11603
+ match(ok2, _err) {
11604
+ return this._promise.then((res) => res.match(ok2, _err));
11605
+ }
11606
+ unwrapOr(t) {
11607
+ return this._promise.then((res) => res.unwrapOr(t));
11608
+ }
11609
+ /**
11610
+ * @deprecated will be removed in 9.0.0.
11611
+ *
11612
+ * You can use `safeTry` without this method.
11613
+ * @example
11614
+ * ```typescript
11615
+ * safeTry(async function* () {
11616
+ * const okValue = yield* yourResult
11617
+ * })
11618
+ * ```
11619
+ * Emulates Rust's `?` operator in `safeTry`'s body. See also `safeTry`.
11620
+ */
11621
+ safeUnwrap() {
11622
+ return __asyncGenerator(this, arguments, function* safeUnwrap_1() {
11623
+ return yield __await(yield __await(yield* __asyncDelegator(__asyncValues(yield __await(this._promise.then((res) => res.safeUnwrap()))))));
11624
+ });
11625
+ }
11626
+ // Makes ResultAsync implement PromiseLike<Result>
11627
+ then(successCallback, failureCallback) {
11628
+ return this._promise.then(successCallback, failureCallback);
11629
+ }
11630
+ [Symbol.asyncIterator]() {
11631
+ return __asyncGenerator(this, arguments, function* _a2() {
11632
+ const result = yield __await(this._promise);
11633
+ if (result.isErr()) {
11634
+ yield yield __await(errAsync(result.error));
11635
+ }
11636
+ return yield __await(result.value);
11637
+ });
11638
+ }
11639
+ }
11640
+ function errAsync(err2) {
11641
+ return new ResultAsync(Promise.resolve(new Err(err2)));
11642
+ }
11643
+ const combineResultList = (resultList) => {
11644
+ let acc = ok([]);
11645
+ for (const result of resultList) {
11646
+ if (result.isErr()) {
11647
+ acc = err(result.error);
11648
+ break;
11649
+ } else {
11650
+ acc.map((list) => list.push(result.value));
11651
+ }
11652
+ }
11653
+ return acc;
11654
+ };
11655
+ const combineResultAsyncList = (asyncResultList) => ResultAsync.fromSafePromise(Promise.all(asyncResultList)).andThen(combineResultList);
11656
+ const combineResultListWithAllErrors = (resultList) => {
11657
+ let acc = ok([]);
11658
+ for (const result of resultList) {
11659
+ if (result.isErr() && acc.isErr()) {
11660
+ acc.error.push(result.error);
11661
+ } else if (result.isErr() && acc.isOk()) {
11662
+ acc = err([result.error]);
11663
+ } else if (result.isOk() && acc.isOk()) {
11664
+ acc.value.push(result.value);
11665
+ }
11666
+ }
11667
+ return acc;
11668
+ };
11669
+ const combineResultAsyncListWithAllErrors = (asyncResultList) => ResultAsync.fromSafePromise(Promise.all(asyncResultList)).andThen(combineResultListWithAllErrors);
11670
+ var Result;
11671
+ (function(Result2) {
11672
+ function fromThrowable(fn, errorFn) {
11673
+ return (...args) => {
11674
+ try {
11675
+ const result = fn(...args);
11676
+ return ok(result);
11677
+ } catch (e) {
11678
+ return err(errorFn ? errorFn(e) : e);
11679
+ }
11680
+ };
11681
+ }
11682
+ Result2.fromThrowable = fromThrowable;
11683
+ function combine(resultList) {
11684
+ return combineResultList(resultList);
11685
+ }
11686
+ Result2.combine = combine;
11687
+ function combineWithAllErrors(resultList) {
11688
+ return combineResultListWithAllErrors(resultList);
11689
+ }
11690
+ Result2.combineWithAllErrors = combineWithAllErrors;
11691
+ })(Result || (Result = {}));
11692
+ function ok(value) {
11693
+ return new Ok(value);
11694
+ }
11695
+ function err(err2) {
11696
+ return new Err(err2);
11697
+ }
11698
+ class Ok {
11699
+ constructor(value) {
11700
+ this.value = value;
11701
+ }
11702
+ isOk() {
11703
+ return true;
11704
+ }
11705
+ isErr() {
11706
+ return !this.isOk();
11707
+ }
11708
+ map(f) {
11709
+ return ok(f(this.value));
11710
+ }
11711
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
11712
+ mapErr(_f) {
11713
+ return ok(this.value);
11714
+ }
11715
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
11716
+ andThen(f) {
11717
+ return f(this.value);
11718
+ }
11719
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
11720
+ andThrough(f) {
11721
+ return f(this.value).map((_value) => this.value);
11722
+ }
11723
+ andTee(f) {
11724
+ try {
11725
+ f(this.value);
11726
+ } catch (e) {
11727
+ }
11728
+ return ok(this.value);
11729
+ }
11730
+ orTee(_f) {
11731
+ return ok(this.value);
11732
+ }
11733
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
11734
+ orElse(_f) {
11735
+ return ok(this.value);
11736
+ }
11737
+ asyncAndThen(f) {
11738
+ return f(this.value);
11739
+ }
11740
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
11741
+ asyncAndThrough(f) {
11742
+ return f(this.value).map(() => this.value);
11743
+ }
11744
+ asyncMap(f) {
11745
+ return ResultAsync.fromSafePromise(f(this.value));
11746
+ }
11747
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
11748
+ unwrapOr(_v) {
11749
+ return this.value;
11750
+ }
11751
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
11752
+ match(ok2, _err) {
11753
+ return ok2(this.value);
11754
+ }
11755
+ safeUnwrap() {
11756
+ const value = this.value;
11757
+ return function* () {
11758
+ return value;
11759
+ }();
11760
+ }
11761
+ _unsafeUnwrap(_) {
11762
+ return this.value;
11763
+ }
11764
+ _unsafeUnwrapErr(config) {
11765
+ throw createNeverThrowError("Called `_unsafeUnwrapErr` on an Ok", this, config);
11766
+ }
11767
+ // eslint-disable-next-line @typescript-eslint/no-this-alias, require-yield
11768
+ *[Symbol.iterator]() {
11769
+ return this.value;
11770
+ }
11771
+ }
11772
+ class Err {
11773
+ constructor(error) {
11774
+ this.error = error;
11775
+ }
11776
+ isOk() {
11777
+ return false;
11778
+ }
11779
+ isErr() {
11780
+ return !this.isOk();
11781
+ }
11782
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
11783
+ map(_f) {
11784
+ return err(this.error);
11785
+ }
11786
+ mapErr(f) {
11787
+ return err(f(this.error));
11788
+ }
11789
+ andThrough(_f) {
11790
+ return err(this.error);
11791
+ }
11792
+ andTee(_f) {
11793
+ return err(this.error);
11794
+ }
11795
+ orTee(f) {
11796
+ try {
11797
+ f(this.error);
11798
+ } catch (e) {
11799
+ }
11800
+ return err(this.error);
11801
+ }
11802
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
11803
+ andThen(_f) {
11804
+ return err(this.error);
11805
+ }
11806
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
11807
+ orElse(f) {
11808
+ return f(this.error);
11809
+ }
11810
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
11811
+ asyncAndThen(_f) {
11812
+ return errAsync(this.error);
11813
+ }
11814
+ asyncAndThrough(_f) {
11815
+ return errAsync(this.error);
11816
+ }
11817
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
11818
+ asyncMap(_f) {
11819
+ return errAsync(this.error);
11820
+ }
11821
+ unwrapOr(v) {
11822
+ return v;
11823
+ }
11824
+ match(_ok, err2) {
11825
+ return err2(this.error);
11826
+ }
11827
+ safeUnwrap() {
11828
+ const error = this.error;
11829
+ return function* () {
11830
+ yield err(error);
11831
+ throw new Error("Do not use this generator out of `safeTry`");
11832
+ }();
11833
+ }
11834
+ _unsafeUnwrap(config) {
11835
+ throw createNeverThrowError("Called `_unsafeUnwrap` on an Err", this, config);
11836
+ }
11837
+ _unsafeUnwrapErr(_) {
11838
+ return this.error;
11839
+ }
11840
+ *[Symbol.iterator]() {
11841
+ const self = this;
11842
+ yield self;
11843
+ return self;
11844
+ }
11845
+ }
11846
+ Result.fromThrowable;
11847
+ function getCartItems() {
11848
+ const storedItemsJson = localStorage.getItem("go-cart");
11849
+ if (!storedItemsJson) return [];
11850
+ const nowDate = $14e0f24ef4ac5c92$export$461939dd4422153($14e0f24ef4ac5c92$export$aa8b41735afcabd2());
11851
+ const safeJsonParse = Result.fromThrowable(JSON.parse, () => []);
11852
+ const storedCartItems = safeJsonParse(storedItemsJson).unwrapOr([]);
11853
+ const items = [];
11854
+ storedCartItems.forEach((cartItem) => {
11855
+ switch (cartItem.type) {
11856
+ case "Ticket":
11857
+ if (!inTheFuture(cartItem.attributes.time, nowDate)) {
11858
+ return;
11859
+ }
11860
+ items.push(
11861
+ new CartItem(
11862
+ new GomusTicket(cartItem.item.ticketObject, 0, cartItem.item.selectedTime, cartItem.attributes.quantity),
11863
+ cartItem.type
11864
+ )
11865
+ );
11866
+ break;
11867
+ }
11868
+ });
11869
+ return items;
11870
+ }
11871
+ function inTheFuture(time, now2) {
11872
+ const parsed = $fae977aafc393c5c$export$8e384432362ed0f0(time);
11873
+ return now2.compare(parsed) <= 0;
11136
11874
  }
11137
- function createGetDetails(KEY2) {
11138
- return function(host) {
11139
- if (host) {
11140
- const container = proxy({ data: void 0 });
11141
- host.dispatchEvent(new CustomEvent(KEY2, { detail: container, bubbles: true }));
11142
- return container.data;
11143
- } else {
11144
- return getContext(KEY2);
11875
+ function formatCurrency(priceCents) {
11876
+ if (priceCents === void 0) {
11877
+ return 0;
11878
+ }
11879
+ return new Intl.NumberFormat("de-DE", {
11880
+ style: "currency",
11881
+ currency: "EUR"
11882
+ }).format(priceCents / 100);
11883
+ }
11884
+ const byteToHex = [];
11885
+ for (let i = 0; i < 256; ++i) {
11886
+ byteToHex.push((i + 256).toString(16).slice(1));
11887
+ }
11888
+ function unsafeStringify(arr, offset = 0) {
11889
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
11890
+ }
11891
+ let getRandomValues;
11892
+ const rnds8 = new Uint8Array(16);
11893
+ function rng() {
11894
+ if (!getRandomValues) {
11895
+ if (typeof crypto === "undefined" || !crypto.getRandomValues) {
11896
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
11145
11897
  }
11146
- };
11898
+ getRandomValues = crypto.getRandomValues.bind(crypto);
11899
+ }
11900
+ return getRandomValues(rnds8);
11901
+ }
11902
+ const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
11903
+ const native = { randomUUID };
11904
+ function _v4(options, buf, offset) {
11905
+ var _a2;
11906
+ options = options || {};
11907
+ const rnds = options.random ?? ((_a2 = options.rng) == null ? void 0 : _a2.call(options)) ?? rng();
11908
+ if (rnds.length < 16) {
11909
+ throw new Error("Random bytes length must be >= 16");
11910
+ }
11911
+ rnds[6] = rnds[6] & 15 | 64;
11912
+ rnds[8] = rnds[8] & 63 | 128;
11913
+ return unsafeStringify(rnds);
11914
+ }
11915
+ function v4(options, buf, offset) {
11916
+ if (native.randomUUID && true && !options) {
11917
+ return native.randomUUID();
11918
+ }
11919
+ return _v4(options);
11920
+ }
11921
+ class CartItem {
11922
+ constructor(ticket, type) {
11923
+ __publicField(this, "type");
11924
+ __publicField(this, "attributes");
11925
+ __publicField(this, "item");
11926
+ __publicField(this, "updatedAt");
11927
+ __publicField(this, "uuid");
11928
+ this.type = type;
11929
+ this.item = ticket;
11930
+ this.attributes = {
11931
+ id: ticket.id,
11932
+ quantity: ticket.quantity,
11933
+ time: ticket.selectedTime
11934
+ };
11935
+ this.updatedAt = $14e0f24ef4ac5c92$export$461939dd4422153($14e0f24ef4ac5c92$export$aa8b41735afcabd2());
11936
+ this.uuid = v4();
11937
+ }
11938
+ updateQuantity(quantity) {
11939
+ this.item.quantity = quantity;
11940
+ this.attributes.quantity = quantity;
11941
+ this.updatedAt = $14e0f24ef4ac5c92$export$461939dd4422153($14e0f24ef4ac5c92$export$aa8b41735afcabd2());
11942
+ }
11147
11943
  }
11944
+ let Cart$1 = (_b = class {
11945
+ constructor() {
11946
+ __privateAdd(this, _items, /* @__PURE__ */ state(proxy(getCartItems())));
11947
+ __privateAdd(this, _total, /* @__PURE__ */ user_derived(() => formatCurrency(Math.max(0, this.items.reduce((prev, cur) => prev + cur.item.totalPriceCents, 0)))));
11948
+ }
11949
+ get items() {
11950
+ return get(__privateGet(this, _items));
11951
+ }
11952
+ set items(value) {
11953
+ set(__privateGet(this, _items), value, true);
11954
+ }
11955
+ get total() {
11956
+ return get(__privateGet(this, _total));
11957
+ }
11958
+ set total(value) {
11959
+ set(__privateGet(this, _total), value);
11960
+ }
11961
+ deleteItem(item) {
11962
+ if (this.items.length == 0) {
11963
+ return;
11964
+ }
11965
+ const newItems = this.items.filter((i) => item != i);
11966
+ this.items = newItems;
11967
+ this.setLocalStorage();
11968
+ }
11969
+ updateCartItem(item, quantity) {
11970
+ const updated = this.items.map((i) => {
11971
+ debugger;
11972
+ if (i === item) {
11973
+ i.updateQuantity(quantity);
11974
+ return i;
11975
+ } else {
11976
+ return i;
11977
+ }
11978
+ });
11979
+ console.log("quantity: ", updated[0].attributes.quantity);
11980
+ this.items = updated;
11981
+ this.setLocalStorage();
11982
+ }
11983
+ addToCart(items, url) {
11984
+ this.items = this.items.concat(items);
11985
+ this.setLocalStorage();
11986
+ if (url) {
11987
+ window.location.href = url;
11988
+ }
11989
+ }
11990
+ setLocalStorage() {
11991
+ localStorage.setItem("go-cart", JSON.stringify(this.items));
11992
+ }
11993
+ }, _items = new WeakMap(), _total = new WeakMap(), _b);
11994
+ const cart = new Cart$1();
11148
11995
  class TicketSelectionDetails {
11149
11996
  constructor() {
11150
11997
  __privateAdd(this, _mode, /* @__PURE__ */ state());
@@ -11157,6 +12004,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11157
12004
  __privateAdd(this, _selectedTimeslot, /* @__PURE__ */ state());
11158
12005
  __privateAdd(this, _selectedTickets, /* @__PURE__ */ state(proxy([])));
11159
12006
  __privateAdd(this, _ticketList, /* @__PURE__ */ state(proxy([])));
12007
+ __privateAdd(this, _total2, /* @__PURE__ */ user_derived(() => formatCurrency(Math.max(0, this.ticketList.reduce((prev, cur) => prev + cur.totalPriceCents, 0)))));
11160
12008
  }
11161
12009
  get mode() {
11162
12010
  return get(__privateGet(this, _mode));
@@ -11218,6 +12066,12 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11218
12066
  set ticketList(value) {
11219
12067
  set(__privateGet(this, _ticketList), value, true);
11220
12068
  }
12069
+ get total() {
12070
+ return get(__privateGet(this, _total2));
12071
+ }
12072
+ set total(value) {
12073
+ set(__privateGet(this, _total2), value);
12074
+ }
11221
12075
  get selectedClasses() {
11222
12076
  return [
11223
12077
  this.selectedDate && "is-date-selected",
@@ -11236,6 +12090,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11236
12090
  _selectedTimeslot = new WeakMap();
11237
12091
  _selectedTickets = new WeakMap();
11238
12092
  _ticketList = new WeakMap();
12093
+ _total2 = new WeakMap();
11239
12094
  const KEY = "go-ticket-selection";
11240
12095
  const setTicketSelectionDetails = createSetDetails(KEY);
11241
12096
  const getTicketSelectionDetails = createGetDetails(KEY);
@@ -13211,8 +14066,8 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
13211
14066
  });
13212
14067
  }
13213
14068
  handleCellClick(_, date) {
13214
- var _a2, _b2, _c2, _d, _e, _f;
13215
- if (this.opts.readonly.current || ((_b2 = (_a2 = this.opts.isDateDisabled).current) == null ? void 0 : _b2.call(_a2, date)) || ((_d = (_c2 = this.opts.isDateUnavailable).current) == null ? void 0 : _d.call(_c2, date))) {
14069
+ var _a2, _b2, _c2, _d2, _e2, _f;
14070
+ if (this.opts.readonly.current || ((_b2 = (_a2 = this.opts.isDateDisabled).current) == null ? void 0 : _b2.call(_a2, date)) || ((_d2 = (_c2 = this.opts.isDateUnavailable).current) == null ? void 0 : _d2.call(_c2, date))) {
13216
14071
  return;
13217
14072
  }
13218
14073
  const prev = this.opts.value.current;
@@ -13230,7 +14085,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
13230
14085
  }
13231
14086
  this.opts.value.current = getDateWithPreviousTime(next2, prev);
13232
14087
  if (next2 !== void 0) {
13233
- (_f = (_e = this.opts.onDateSelect) == null ? void 0 : _e.current) == null ? void 0 : _f.call(_e);
14088
+ (_f = (_e2 = this.opts.onDateSelect) == null ? void 0 : _e2.current) == null ? void 0 : _f.call(_e2);
13234
14089
  }
13235
14090
  }
13236
14091
  }
@@ -13839,7 +14694,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
13839
14694
  };
13840
14695
  _props12 = new WeakMap();
13841
14696
  let CalendarHeaderState = _CalendarHeaderState;
13842
- var root_2$e = /* @__PURE__ */ from_html(`<div><!></div>`);
14697
+ var root_2$h = /* @__PURE__ */ from_html(`<div><!></div>`);
13843
14698
  function Calendar$2($$anchor, $$props) {
13844
14699
  push($$props, true);
13845
14700
  let child$1 = prop($$props, "child", 7), children = prop($$props, "children", 7), id = prop($$props, "id", 23, useId), ref = prop($$props, "ref", 15, null), value = prop($$props, "value", 15), onValueChange = prop($$props, "onValueChange", 7, noop), placeholder = prop($$props, "placeholder", 15), onPlaceholderChange = prop($$props, "onPlaceholderChange", 7, noop), weekdayFormat = prop($$props, "weekdayFormat", 7, "narrow"), weekStartsOn = prop($$props, "weekStartsOn", 7), pagedNavigation = prop($$props, "pagedNavigation", 7, false), isDateDisabled = prop($$props, "isDateDisabled", 7, () => false), isDateUnavailable = prop($$props, "isDateUnavailable", 7, () => false), fixedWeeks = prop($$props, "fixedWeeks", 7, false), numberOfMonths = prop($$props, "numberOfMonths", 7, 1), locale = prop($$props, "locale", 7), calendarLabel = prop($$props, "calendarLabel", 7, "Event"), disabled = prop($$props, "disabled", 7, false), readonly = prop($$props, "readonly", 7, false), minValue = prop($$props, "minValue", 7, void 0), maxValue = prop($$props, "maxValue", 7, void 0), preventDeselect = prop($$props, "preventDeselect", 7, false), type = prop($$props, "type", 7), disableDaysOutsideMonth = prop($$props, "disableDaysOutsideMonth", 7, true), initialFocus = prop($$props, "initialFocus", 7, false), maxDays = prop($$props, "maxDays", 7), monthFormat = prop($$props, "monthFormat", 7, "long"), yearFormat = prop($$props, "yearFormat", 7, "numeric"), restProps = /* @__PURE__ */ rest_props($$props, [
@@ -13940,7 +14795,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
13940
14795
  append($$anchor2, fragment_1);
13941
14796
  };
13942
14797
  var alternate = ($$anchor2) => {
13943
- var div = root_2$e();
14798
+ var div = root_2$h();
13944
14799
  attribute_effect(div, () => ({ ...get(mergedProps) }));
13945
14800
  var node_2 = child(div);
13946
14801
  snippet(node_2, () => children() ?? noop$1, () => rootState.snippetProps);
@@ -14188,7 +15043,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14188
15043
  [],
14189
15044
  true
14190
15045
  );
14191
- var root_2$d = /* @__PURE__ */ from_html(`<div><!></div>`);
15046
+ var root_2$g = /* @__PURE__ */ from_html(`<div><!></div>`);
14192
15047
  function Calendar_day($$anchor, $$props) {
14193
15048
  const uid = props_id();
14194
15049
  push($$props, true);
@@ -14220,7 +15075,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14220
15075
  append($$anchor2, fragment_1);
14221
15076
  };
14222
15077
  var alternate_1 = ($$anchor2) => {
14223
- var div = root_2$d();
15078
+ var div = root_2$g();
14224
15079
  attribute_effect(div, () => ({ ...get(mergedProps) }));
14225
15080
  var node_2 = child(div);
14226
15081
  {
@@ -14281,7 +15136,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14281
15136
  });
14282
15137
  }
14283
15138
  create_custom_element(Calendar_day, { children: {}, child: {}, ref: {}, id: {} }, [], [], true);
14284
- var root_2$c = /* @__PURE__ */ from_html(`<table><!></table>`);
15139
+ var root_2$f = /* @__PURE__ */ from_html(`<table><!></table>`);
14285
15140
  function Calendar_grid($$anchor, $$props) {
14286
15141
  const uid = props_id();
14287
15142
  push($$props, true);
@@ -14310,7 +15165,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14310
15165
  append($$anchor2, fragment_1);
14311
15166
  };
14312
15167
  var alternate = ($$anchor2) => {
14313
- var table = root_2$c();
15168
+ var table = root_2$f();
14314
15169
  attribute_effect(table, () => ({ ...get(mergedProps) }));
14315
15170
  var node_2 = child(table);
14316
15171
  snippet(node_2, () => children() ?? noop$1);
@@ -14355,7 +15210,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14355
15210
  });
14356
15211
  }
14357
15212
  create_custom_element(Calendar_grid, { children: {}, child: {}, ref: {}, id: {} }, [], [], true);
14358
- var root_2$b = /* @__PURE__ */ from_html(`<tbody><!></tbody>`);
15213
+ var root_2$e = /* @__PURE__ */ from_html(`<tbody><!></tbody>`);
14359
15214
  function Calendar_grid_body($$anchor, $$props) {
14360
15215
  const uid = props_id();
14361
15216
  push($$props, true);
@@ -14384,7 +15239,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14384
15239
  append($$anchor2, fragment_1);
14385
15240
  };
14386
15241
  var alternate = ($$anchor2) => {
14387
- var tbody = root_2$b();
15242
+ var tbody = root_2$e();
14388
15243
  attribute_effect(tbody, () => ({ ...get(mergedProps) }));
14389
15244
  var node_2 = child(tbody);
14390
15245
  snippet(node_2, () => children() ?? noop$1);
@@ -14429,7 +15284,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14429
15284
  });
14430
15285
  }
14431
15286
  create_custom_element(Calendar_grid_body, { children: {}, child: {}, ref: {}, id: {} }, [], [], true);
14432
- var root_2$a = /* @__PURE__ */ from_html(`<td><!></td>`);
15287
+ var root_2$d = /* @__PURE__ */ from_html(`<td><!></td>`);
14433
15288
  function Calendar_cell($$anchor, $$props) {
14434
15289
  const uid = props_id();
14435
15290
  push($$props, true);
@@ -14465,7 +15320,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14465
15320
  append($$anchor2, fragment_1);
14466
15321
  };
14467
15322
  var alternate = ($$anchor2) => {
14468
- var td = root_2$a();
15323
+ var td = root_2$d();
14469
15324
  attribute_effect(td, () => ({ ...get(mergedProps) }));
14470
15325
  var node_2 = child(td);
14471
15326
  snippet(node_2, () => children() ?? noop$1, () => cellState.snippetProps);
@@ -14537,7 +15392,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14537
15392
  [],
14538
15393
  true
14539
15394
  );
14540
- var root_2$9 = /* @__PURE__ */ from_html(`<thead><!></thead>`);
15395
+ var root_2$c = /* @__PURE__ */ from_html(`<thead><!></thead>`);
14541
15396
  function Calendar_grid_head($$anchor, $$props) {
14542
15397
  const uid = props_id();
14543
15398
  push($$props, true);
@@ -14566,7 +15421,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14566
15421
  append($$anchor2, fragment_1);
14567
15422
  };
14568
15423
  var alternate = ($$anchor2) => {
14569
- var thead = root_2$9();
15424
+ var thead = root_2$c();
14570
15425
  attribute_effect(thead, () => ({ ...get(mergedProps) }));
14571
15426
  var node_2 = child(thead);
14572
15427
  snippet(node_2, () => children() ?? noop$1);
@@ -14611,7 +15466,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14611
15466
  });
14612
15467
  }
14613
15468
  create_custom_element(Calendar_grid_head, { children: {}, child: {}, ref: {}, id: {} }, [], [], true);
14614
- var root_2$8 = /* @__PURE__ */ from_html(`<th><!></th>`);
15469
+ var root_2$b = /* @__PURE__ */ from_html(`<th><!></th>`);
14615
15470
  function Calendar_head_cell($$anchor, $$props) {
14616
15471
  const uid = props_id();
14617
15472
  push($$props, true);
@@ -14640,7 +15495,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14640
15495
  append($$anchor2, fragment_1);
14641
15496
  };
14642
15497
  var alternate = ($$anchor2) => {
14643
- var th = root_2$8();
15498
+ var th = root_2$b();
14644
15499
  attribute_effect(th, () => ({ ...get(mergedProps) }));
14645
15500
  var node_2 = child(th);
14646
15501
  snippet(node_2, () => children() ?? noop$1);
@@ -14685,7 +15540,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14685
15540
  });
14686
15541
  }
14687
15542
  create_custom_element(Calendar_head_cell, { children: {}, child: {}, ref: {}, id: {} }, [], [], true);
14688
- var root_2$7 = /* @__PURE__ */ from_html(`<tr><!></tr>`);
15543
+ var root_2$a = /* @__PURE__ */ from_html(`<tr><!></tr>`);
14689
15544
  function Calendar_grid_row($$anchor, $$props) {
14690
15545
  const uid = props_id();
14691
15546
  push($$props, true);
@@ -14714,7 +15569,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14714
15569
  append($$anchor2, fragment_1);
14715
15570
  };
14716
15571
  var alternate = ($$anchor2) => {
14717
- var tr = root_2$7();
15572
+ var tr = root_2$a();
14718
15573
  attribute_effect(tr, () => ({ ...get(mergedProps) }));
14719
15574
  var node_2 = child(tr);
14720
15575
  snippet(node_2, () => children() ?? noop$1);
@@ -14759,7 +15614,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14759
15614
  });
14760
15615
  }
14761
15616
  create_custom_element(Calendar_grid_row, { children: {}, child: {}, ref: {}, id: {} }, [], [], true);
14762
- var root_2$6 = /* @__PURE__ */ from_html(`<header><!></header>`);
15617
+ var root_2$9 = /* @__PURE__ */ from_html(`<header><!></header>`);
14763
15618
  function Calendar_header($$anchor, $$props) {
14764
15619
  const uid = props_id();
14765
15620
  push($$props, true);
@@ -14788,7 +15643,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14788
15643
  append($$anchor2, fragment_1);
14789
15644
  };
14790
15645
  var alternate = ($$anchor2) => {
14791
- var header = root_2$6();
15646
+ var header = root_2$9();
14792
15647
  attribute_effect(header, () => ({ ...get(mergedProps) }));
14793
15648
  var node_2 = child(header);
14794
15649
  snippet(node_2, () => children() ?? noop$1);
@@ -14833,7 +15688,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14833
15688
  });
14834
15689
  }
14835
15690
  create_custom_element(Calendar_header, { children: {}, child: {}, ref: {}, id: {} }, [], [], true);
14836
- var root_2$5 = /* @__PURE__ */ from_html(`<div><!></div>`);
15691
+ var root_2$8 = /* @__PURE__ */ from_html(`<div><!></div>`);
14837
15692
  function Calendar_heading($$anchor, $$props) {
14838
15693
  const uid = props_id();
14839
15694
  push($$props, true);
@@ -14865,7 +15720,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14865
15720
  append($$anchor2, fragment_1);
14866
15721
  };
14867
15722
  var alternate_1 = ($$anchor2) => {
14868
- var div = root_2$5();
15723
+ var div = root_2$8();
14869
15724
  attribute_effect(div, () => ({ ...get(mergedProps) }));
14870
15725
  var node_2 = child(div);
14871
15726
  {
@@ -14926,7 +15781,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14926
15781
  });
14927
15782
  }
14928
15783
  create_custom_element(Calendar_heading, { children: {}, child: {}, ref: {}, id: {} }, [], [], true);
14929
- var root_2$4 = /* @__PURE__ */ from_html(`<button><!></button>`);
15784
+ var root_2$7 = /* @__PURE__ */ from_html(`<button><!></button>`);
14930
15785
  function Calendar_next_button($$anchor, $$props) {
14931
15786
  const uid = props_id();
14932
15787
  push($$props, true);
@@ -14956,7 +15811,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
14956
15811
  append($$anchor2, fragment_1);
14957
15812
  };
14958
15813
  var alternate = ($$anchor2) => {
14959
- var button = root_2$4();
15814
+ var button = root_2$7();
14960
15815
  attribute_effect(button, () => ({ ...get(mergedProps) }));
14961
15816
  var node_2 = child(button);
14962
15817
  snippet(node_2, () => children() ?? noop$1);
@@ -15008,7 +15863,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15008
15863
  });
15009
15864
  }
15010
15865
  create_custom_element(Calendar_next_button, { children: {}, child: {}, id: {}, ref: {}, tabindex: {} }, [], [], true);
15011
- var root_2$3 = /* @__PURE__ */ from_html(`<button><!></button>`);
15866
+ var root_2$6 = /* @__PURE__ */ from_html(`<button><!></button>`);
15012
15867
  function Calendar_prev_button($$anchor, $$props) {
15013
15868
  const uid = props_id();
15014
15869
  push($$props, true);
@@ -15038,7 +15893,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15038
15893
  append($$anchor2, fragment_1);
15039
15894
  };
15040
15895
  var alternate = ($$anchor2) => {
15041
- var button = root_2$3();
15896
+ var button = root_2$6();
15042
15897
  attribute_effect(button, () => ({ ...get(mergedProps) }));
15043
15898
  var node_2 = child(button);
15044
15899
  snippet(node_2, () => children() ?? noop$1);
@@ -15090,7 +15945,8 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15090
15945
  });
15091
15946
  }
15092
15947
  create_custom_element(Calendar_prev_button, { children: {}, child: {}, id: {}, ref: {}, tabindex: {} }, [], [], true);
15093
- let Calendar$1 = (_b = class {
15948
+ enable_legacy_mode_flag();
15949
+ let Calendar$1 = (_c = class {
15094
15950
  constructor() {
15095
15951
  __privateAdd(this, _startAt, /* @__PURE__ */ state(proxy($14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2()))));
15096
15952
  __privateAdd(this, _selected, /* @__PURE__ */ state(void 0));
@@ -15116,19 +15972,19 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15116
15972
  }
15117
15973
  return false;
15118
15974
  }
15119
- }, _startAt = new WeakMap(), _selected = new WeakMap(), _b);
15975
+ }, _startAt = new WeakMap(), _selected = new WeakMap(), _c);
15120
15976
  class TicketsCalendar extends Calendar$1 {
15121
15977
  constructor() {
15122
15978
  super(...arguments);
15123
15979
  __privateAdd(this, _details, /* @__PURE__ */ state());
15124
15980
  __privateAdd(this, _params, /* @__PURE__ */ user_derived(() => {
15125
- var _a2, _b2, _c2, _d;
15981
+ var _a2, _b2, _c2, _d2;
15126
15982
  return {
15127
15983
  by_bookable: true,
15128
15984
  "by_ticket_types[]": (_a2 = this.details) == null ? void 0 : _a2.filters,
15129
15985
  "by_ticket_ids[]": (_b2 = this.details) == null ? void 0 : _b2.ticketIds,
15130
15986
  "by_museum_ids[]": (_c2 = this.details) == null ? void 0 : _c2.museumIds,
15131
- "by_exhibition_ids[]": (_d = this.details) == null ? void 0 : _d.exhibitionIds,
15987
+ "by_exhibition_ids[]": (_d2 = this.details) == null ? void 0 : _d2.exhibitionIds,
15132
15988
  start_at: this.startAt.set({ day: 1 }).toString(),
15133
15989
  end_at: this.startAt.add({ months: 1 }).set({ day: 7 }).toString()
15134
15990
  };
@@ -15154,12 +16010,12 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15154
16010
  _details = new WeakMap();
15155
16011
  _params = new WeakMap();
15156
16012
  const ticketsCalendar = new TicketsCalendar();
15157
- var root_3$1 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
16013
+ var root_3$2 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
15158
16014
  var root_11 = /* @__PURE__ */ from_html(`<div> </div>`);
15159
16015
  var root_17 = /* @__PURE__ */ from_html(`<div></div> `, 1);
15160
16016
  var root_7 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
15161
- var root_2$2 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
15162
- var root_1$2 = /* @__PURE__ */ from_html(`<div data-calendar-wrapper=""><!></div>`);
16017
+ var root_2$5 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
16018
+ var root_1$5 = /* @__PURE__ */ from_html(`<div data-calendar-wrapper=""><!></div>`);
15163
16019
  function CalendarUI($$anchor, $$props) {
15164
16020
  push($$props, true);
15165
16021
  let calendarClass = prop($$props, "calendarClass", 7);
@@ -15171,18 +16027,18 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15171
16027
  bubbles: true
15172
16028
  }));
15173
16029
  });
15174
- var div = root_1$2();
16030
+ var div = root_1$5();
15175
16031
  var node = child(div);
15176
16032
  {
15177
16033
  const children = ($$anchor2, $$arg0) => {
15178
16034
  let months = () => $$arg0 == null ? void 0 : $$arg0().months;
15179
16035
  let weekdays = () => $$arg0 == null ? void 0 : $$arg0().weekdays;
15180
- var fragment = root_2$2();
16036
+ var fragment = root_2$5();
15181
16037
  var node_1 = first_child(fragment);
15182
16038
  component(node_1, () => Calendar_header, ($$anchor3, Calendar_Header) => {
15183
16039
  Calendar_Header($$anchor3, {
15184
16040
  children: ($$anchor4, $$slotProps) => {
15185
- var fragment_1 = root_3$1();
16041
+ var fragment_1 = root_3$2();
15186
16042
  var node_2 = first_child(fragment_1);
15187
16043
  component(node_2, () => Calendar_prev_button, ($$anchor5, Calendar_PrevButton) => {
15188
16044
  Calendar_PrevButton($$anchor5, {
@@ -15371,7 +16227,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15371
16227
  });
15372
16228
  }
15373
16229
  create_custom_element(CalendarUI, { calendarClass: {} }, [], ["details"], true);
15374
- var root$1 = /* @__PURE__ */ from_html(`<div data-calendar-wrapper=""><!></div>`);
16230
+ var root$4 = /* @__PURE__ */ from_html(`<div data-calendar-wrapper=""><!></div>`);
15375
16231
  function Calendar($$anchor, $$props) {
15376
16232
  push($$props, true);
15377
16233
  let ticketSelectionDetails = /* @__PURE__ */ state(void 0);
@@ -15387,7 +16243,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15387
16243
  if (get(ticketSelectionDetails)) get(ticketSelectionDetails).selectedDate = e.detail.selected;
15388
16244
  });
15389
16245
  });
15390
- var div = root$1();
16246
+ var div = root$4();
15391
16247
  var node = child(div);
15392
16248
  {
15393
16249
  var consequent = ($$anchor2) => {
@@ -15398,8 +16254,8 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15398
16254
  });
15399
16255
  };
15400
16256
  if_block(node, ($$render) => {
15401
- var _a2;
15402
- if (((_a2 = get(ticketSelectionDetails)) == null ? void 0 : _a2.mode) === "ticket") $$render(consequent);
16257
+ var _a2, _b2;
16258
+ if (((_a2 = get(ticketSelectionDetails)) == null ? void 0 : _a2.mode) === "ticket" && !((_b2 = get(ticketSelectionDetails).filters) == null ? void 0 : _b2.includes("annual"))) $$render(consequent);
15403
16259
  });
15404
16260
  }
15405
16261
  reset(div);
@@ -15457,7 +16313,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15457
16313
  const quotaSlots = filterSlots(ticketSlots, quotas);
15458
16314
  return combineSlots(quotaSlots);
15459
16315
  }
15460
- let Details$1 = (_c = class {
16316
+ let Details$2 = (_d = class {
15461
16317
  constructor() {
15462
16318
  __privateAdd(this, _ticketSelectionDetails, /* @__PURE__ */ state());
15463
16319
  }
@@ -15468,12 +16324,12 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15468
16324
  set(__privateGet(this, _ticketSelectionDetails), value, true);
15469
16325
  }
15470
16326
  get timeslots() {
15471
- var _a2, _b2, _c2, _d, _e;
16327
+ var _a2, _b2, _c2, _d2, _e2;
15472
16328
  const date = (_a2 = this.ticketSelectionDetails) == null ? void 0 : _a2.selectedDate;
15473
16329
  const ticketTypes = (_b2 = this.ticketSelectionDetails) == null ? void 0 : _b2.filters;
15474
16330
  const museumIds = (_c2 = this.ticketSelectionDetails) == null ? void 0 : _c2.museumIds;
15475
- const exhibitionIds = (_d = this.ticketSelectionDetails) == null ? void 0 : _d.exhibitionIds;
15476
- const ticketIds = (_e = this.ticketSelectionDetails) == null ? void 0 : _e.ticketIds;
16331
+ const exhibitionIds = (_d2 = this.ticketSelectionDetails) == null ? void 0 : _d2.exhibitionIds;
16332
+ const ticketIds = (_e2 = this.ticketSelectionDetails) == null ? void 0 : _e2.ticketIds;
15477
16333
  if (!date) return [];
15478
16334
  const result = snapshot(shop.ticketsAndQuotas({
15479
16335
  by_bookable: true,
@@ -15482,19 +16338,18 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15482
16338
  "by_ticket_types[]": ticketTypes,
15483
16339
  "by_museum_ids[]": museumIds,
15484
16340
  "by_exhibition_ids[]": exhibitionIds,
15485
- "by_ticket_ids[]": ticketIds,
15486
- locale: shop.locale
16341
+ "by_ticket_ids[]": ticketIds
15487
16342
  }));
15488
16343
  if (!result) return [];
15489
16344
  return generateAvailableTimeSlots(result.tickets, result.quotas);
15490
16345
  }
15491
- }, _ticketSelectionDetails = new WeakMap(), _c);
15492
- var root_2$1 = /* @__PURE__ */ from_html(`<li><label> <input type="radio" name="timeslot"/></label></li>`);
15493
- var root_1$1 = /* @__PURE__ */ from_html(`<ul data-testid="timeslots" data-go-timeslots=""></ul>`);
16346
+ }, _ticketSelectionDetails = new WeakMap(), _d);
16347
+ var root_2$4 = /* @__PURE__ */ from_html(`<li><label> <input type="radio" name="timeslot"/></label></li>`);
16348
+ var root_1$4 = /* @__PURE__ */ from_html(`<ul data-testid="timeslots" data-go-timeslots=""></ul>`);
15494
16349
  function Timeslots($$anchor, $$props) {
15495
16350
  push($$props, true);
15496
16351
  const binding_group = [];
15497
- const details = new Details$1();
16352
+ const details = new Details$2();
15498
16353
  onMount(() => {
15499
16354
  details.ticketSelectionDetails = getTicketSelectionDetails($$props.$$host);
15500
16355
  });
@@ -15509,9 +16364,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15509
16364
  var node = first_child(fragment);
15510
16365
  {
15511
16366
  var consequent = ($$anchor2) => {
15512
- var ul = root_1$1();
16367
+ var ul = root_1$4();
15513
16368
  each(ul, 20, () => details.timeslots, (timeslot) => timeslot, ($$anchor3, timeslot) => {
15514
- var li = root_2$1();
16369
+ var li = root_2$4();
15515
16370
  var label = child(li);
15516
16371
  var text2 = child(label);
15517
16372
  var input = sibling(text2);
@@ -15543,7 +16398,8 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15543
16398
  append($$anchor2, ul);
15544
16399
  };
15545
16400
  if_block(node, ($$render) => {
15546
- if (details.ticketSelectionDetails) $$render(consequent);
16401
+ var _a2;
16402
+ if (details.ticketSelectionDetails && ((_a2 = details.ticketSelectionDetails.filters) == null ? void 0 : _a2.includes("time_slot"))) $$render(consequent);
15547
16403
  });
15548
16404
  }
15549
16405
  append($$anchor, fragment);
@@ -15551,8 +16407,8 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15551
16407
  }
15552
16408
  delegate(["change"]);
15553
16409
  customElements.define("go-timeslots", create_custom_element(Timeslots, {}, [], ["details"], false));
15554
- var root_2 = /* @__PURE__ */ from_html(`<div><!></div>`);
15555
- var root = /* @__PURE__ */ from_html(`<!> <!>`, 1);
16410
+ var root_2$3 = /* @__PURE__ */ from_html(`<div><!></div>`);
16411
+ var root$3 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
15556
16412
  function Wrapper($$anchor, $$props) {
15557
16413
  push($$props, true);
15558
16414
  let host = prop($$props, "host", 7), children = prop($$props, "children", 7), restProps = /* @__PURE__ */ rest_props($$props, [
@@ -15568,7 +16424,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15568
16424
  host().setAttribute(prop2, restProps[prop2]);
15569
16425
  }
15570
16426
  }
15571
- var fragment = root();
16427
+ var fragment = root$3();
15572
16428
  var node = first_child(fragment);
15573
16429
  {
15574
16430
  var consequent = ($$anchor2) => {
@@ -15584,7 +16440,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15584
16440
  var node_2 = sibling(node, 2);
15585
16441
  {
15586
16442
  var consequent_1 = ($$anchor2) => {
15587
- var div = root_2();
16443
+ var div = root_2$3();
15588
16444
  attribute_effect(div, () => ({ ...restProps }));
15589
16445
  var node_3 = child(div);
15590
16446
  snippet(node_3, children);
@@ -15712,17 +16568,17 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15712
16568
  {
15713
16569
  mode: { attribute: "mode", reflect: true, type: "String" },
15714
16570
  eventId: { attribute: "event-id", reflect: true, type: "Number" },
16571
+ ticketIds: { attribute: "ticket-ids", reflect: true, type: "String" },
15715
16572
  filter: {},
15716
16573
  children: {},
15717
16574
  museumIds: {},
15718
- exhibitionIds: {},
15719
- ticketIds: {}
16575
+ exhibitionIds: {}
15720
16576
  },
15721
16577
  [],
15722
16578
  ["details"],
15723
16579
  false
15724
16580
  ));
15725
- class Details {
16581
+ let Details$1 = (_e = class {
15726
16582
  constructor() {
15727
16583
  __privateAdd(this, _ticketSelectionDetails2, /* @__PURE__ */ state());
15728
16584
  }
@@ -15733,13 +16589,13 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15733
16589
  set(__privateGet(this, _ticketSelectionDetails2), value, true);
15734
16590
  }
15735
16591
  get tickets() {
15736
- var _a2, _b2, _c2, _d, _e, _f;
16592
+ var _a2, _b2, _c2, _d2, _e2, _f;
15737
16593
  const date = (_a2 = this.ticketSelectionDetails) == null ? void 0 : _a2.selectedDate;
15738
16594
  const ticketTypes = (_b2 = this.ticketSelectionDetails) == null ? void 0 : _b2.filters;
15739
16595
  const museumIds = (_c2 = this.ticketSelectionDetails) == null ? void 0 : _c2.museumIds;
15740
- const exhibitionIds = (_d = this.ticketSelectionDetails) == null ? void 0 : _d.exhibitionIds;
15741
- const ticketIds = (_e = this.ticketSelectionDetails) == null ? void 0 : _e.ticketIds;
15742
- if (!date && !((_f = this.ticketSelectionDetails) == null ? void 0 : _f.selectedTimeslot)) return [];
16596
+ const exhibitionIds = (_d2 = this.ticketSelectionDetails) == null ? void 0 : _d2.exhibitionIds;
16597
+ const ticketIds = (_e2 = this.ticketSelectionDetails) == null ? void 0 : _e2.ticketIds;
16598
+ if (!date && !((_f = this.ticketSelectionDetails) == null ? void 0 : _f.selectedTimeslot) && (ticketTypes == null ? void 0 : ticketTypes.includes("time_slot"))) return [];
15743
16599
  const result = snapshot(shop.ticketsAndQuotas({
15744
16600
  by_bookable: true,
15745
16601
  valid_at: date == null ? void 0 : date.toString(),
@@ -15747,121 +16603,443 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15747
16603
  "by_ticket_types[]": ticketTypes,
15748
16604
  "by_museum_ids[]": museumIds,
15749
16605
  "by_exhibition_ids[]": exhibitionIds,
15750
- "by_ticket_ids[]": ticketIds,
15751
- locale: shop.locale
16606
+ "by_ticket_ids[]": ticketIds
15752
16607
  }));
15753
16608
  if (!result) return [];
15754
16609
  return initGomusTickets(result.tickets);
15755
16610
  }
15756
- }
15757
- _ticketSelectionDetails2 = new WeakMap();
15758
- var root_4 = /* @__PURE__ */ from_html(`<option> </option>`);
15759
- var root_3 = /* @__PURE__ */ from_html(`<tr><td><select></select></td><td><p> </p> <!></td><td> </td><td> </td></tr>`);
15760
- var root_1 = /* @__PURE__ */ from_html(`<table><thead><tr><th>Quantity</th><th>Ticket</th><th>Price</th><th>Total</th></tr></thead><tbody></tbody></table>`);
15761
- function Tickets($$anchor, $$props) {
16611
+ get annualTickets() {
16612
+ var _a2, _b2;
16613
+ const ticketTypes = (_a2 = this.ticketSelectionDetails) == null ? void 0 : _a2.filters;
16614
+ const ticketIds = (_b2 = this.ticketSelectionDetails) == null ? void 0 : _b2.ticketIds;
16615
+ if (!(ticketTypes == null ? void 0 : ticketTypes.includes("annual"))) return [];
16616
+ const result = snapshot(shop.tickets({
16617
+ by_bookable: true,
16618
+ // @ts-ignore
16619
+ "by_ticket_types[]": ticketTypes,
16620
+ "by_ticket_ids[]": ticketIds
16621
+ }));
16622
+ if (!result) return [];
16623
+ return initAnnualTickets(result.tickets);
16624
+ }
16625
+ updateSelectedTickets(ticket, quantity) {
16626
+ var _a2, _b2, _c2;
16627
+ const index2 = this.tickets.findIndex((t) => t.id == ticket.id);
16628
+ const duplicate = this.tickets[index2];
16629
+ duplicate.quantity = quantity;
16630
+ if (ticket.type == "time_slot") {
16631
+ duplicate.selectedTime = ((_a2 = this.ticketSelectionDetails) == null ? void 0 : _a2.selectedTimeslot) || "";
16632
+ } else if (ticket.type == "normal") {
16633
+ duplicate.selectedTime = $11d87f3f76e88657$export$84c95a83c799e074((_b2 = this.ticketSelectionDetails) == null ? void 0 : _b2.selectedDate, "Europe/Berlin").toString().slice(0, -15);
16634
+ }
16635
+ this.ticketSelectionDetails.ticketList = (_c2 = this.ticketSelectionDetails) == null ? void 0 : _c2.ticketList.concat(duplicate);
16636
+ }
16637
+ }, _ticketSelectionDetails2 = new WeakMap(), _e);
16638
+ var root_2$2 = /* @__PURE__ */ from_html(`<option> </option>`);
16639
+ var root_1$3 = /* @__PURE__ */ from_html(`<tr><td><select></select></td><td><p> </p> <!></td><td> </td></tr>`);
16640
+ function Annual($$anchor, $$props) {
15762
16641
  push($$props, true);
15763
- const details = new Details();
15764
- onMount(() => {
15765
- details.ticketSelectionDetails = getTicketSelectionDetails($$props.$$host);
16642
+ let details = prop($$props, "details", 7);
16643
+ var fragment = comment();
16644
+ var node = first_child(fragment);
16645
+ each(node, 16, () => Object.values(details().annualTickets), (ticket) => ticket, ($$anchor2, ticket) => {
16646
+ var tr = root_1$3();
16647
+ var td = child(tr);
16648
+ var select = child(td);
16649
+ each(select, 21, () => ticket.quantityOptions, index, ($$anchor3, quantity) => {
16650
+ var option = root_2$2();
16651
+ var text2 = child(option, true);
16652
+ reset(option);
16653
+ var option_value = {};
16654
+ template_effect(() => {
16655
+ set_selected(option, get(quantity).selected);
16656
+ set_text(text2, get(quantity).label);
16657
+ if (option_value !== (option_value = get(quantity).value)) {
16658
+ option.value = (option.__value = get(quantity).value) ?? "";
16659
+ }
16660
+ });
16661
+ append($$anchor3, option);
16662
+ });
16663
+ reset(select);
16664
+ reset(td);
16665
+ var td_1 = sibling(td);
16666
+ var p = child(td_1);
16667
+ var text_1 = child(p, true);
16668
+ reset(p);
16669
+ var node_1 = sibling(p, 2);
16670
+ html(node_1, () => ticket.description);
16671
+ reset(td_1);
16672
+ var td_2 = sibling(td_1);
16673
+ var text_2 = child(td_2, true);
16674
+ reset(td_2);
16675
+ reset(tr);
16676
+ template_effect(
16677
+ ($0) => {
16678
+ set_attribute(select, "name", $0);
16679
+ set_text(text_1, ticket.title);
16680
+ set_text(text_2, ticket.priceFormatted);
16681
+ },
16682
+ [() => ticket.id.toString()]
16683
+ );
16684
+ append($$anchor2, tr);
16685
+ });
16686
+ append($$anchor, fragment);
16687
+ return pop({
16688
+ get details() {
16689
+ return details();
16690
+ },
16691
+ set details($$value) {
16692
+ details($$value);
16693
+ flushSync();
16694
+ }
15766
16695
  });
15767
- let selection = prop($$props, "selection", 7), timeslot = prop($$props, "timeslot", 7);
16696
+ }
16697
+ create_custom_element(Annual, { details: {} }, [], [], true);
16698
+ var on_change = (e, details, ticket) => {
16699
+ var _a2;
16700
+ return details().updateSelectedTickets(ticket, parseInt((_a2 = e == null ? void 0 : e.target) == null ? void 0 : _a2.value));
16701
+ };
16702
+ var root_3$1 = /* @__PURE__ */ from_html(`<option> </option>`);
16703
+ var root_2$1 = /* @__PURE__ */ from_html(`<tr><td><select></select></td><td><p> </p> <!></td><td> </td></tr>`);
16704
+ function Timeslot($$anchor, $$props) {
16705
+ push($$props, true);
16706
+ let details = prop($$props, "details", 7);
15768
16707
  function hasTimeSlotInCapacities(ticket) {
15769
16708
  var _a2;
15770
- if ((_a2 = details.ticketSelectionDetails) == null ? void 0 : _a2.selectedTimeslot) {
15771
- return Object.keys(ticket.capacities).includes(details.ticketSelectionDetails.selectedTimeslot);
16709
+ if ((_a2 = details().ticketSelectionDetails) == null ? void 0 : _a2.selectedTimeslot) {
16710
+ return Object.keys(ticket.capacities).includes(details().ticketSelectionDetails.selectedTimeslot);
15772
16711
  } else {
15773
16712
  return false;
15774
16713
  }
15775
16714
  }
15776
16715
  var fragment = comment();
15777
16716
  var node = first_child(fragment);
16717
+ each(node, 16, () => Object.values(details().tickets), (ticket) => ticket, ($$anchor2, ticket) => {
16718
+ var fragment_1 = comment();
16719
+ var node_1 = first_child(fragment_1);
16720
+ {
16721
+ var consequent = ($$anchor3) => {
16722
+ var tr = root_2$1();
16723
+ let classes;
16724
+ var td = child(tr);
16725
+ var select = child(td);
16726
+ select.__change = [on_change, details, ticket];
16727
+ each(select, 21, () => ticket.quantityOptions, index, ($$anchor4, quantity) => {
16728
+ var option = root_3$1();
16729
+ var text2 = child(option, true);
16730
+ reset(option);
16731
+ var option_value = {};
16732
+ template_effect(() => {
16733
+ set_selected(option, get(quantity).selected);
16734
+ set_text(text2, get(quantity).label);
16735
+ if (option_value !== (option_value = get(quantity).value)) {
16736
+ option.value = (option.__value = get(quantity).value) ?? "";
16737
+ }
16738
+ });
16739
+ append($$anchor4, option);
16740
+ });
16741
+ reset(select);
16742
+ reset(td);
16743
+ var td_1 = sibling(td);
16744
+ var p = child(td_1);
16745
+ var text_1 = child(p, true);
16746
+ reset(p);
16747
+ var node_2 = sibling(p, 2);
16748
+ html(node_2, () => ticket.description);
16749
+ reset(td_1);
16750
+ var td_2 = sibling(td_1);
16751
+ var text_2 = child(td_2, true);
16752
+ reset(td_2);
16753
+ reset(tr);
16754
+ template_effect(
16755
+ ($0, $1) => {
16756
+ classes = set_class(tr, 1, "", null, classes, $0);
16757
+ set_attribute(select, "name", $1);
16758
+ set_text(text_1, ticket.title);
16759
+ set_text(text_2, ticket.priceFormatted);
16760
+ },
16761
+ [
16762
+ () => ({ hidden: hasTimeSlotInCapacities(ticket) }),
16763
+ () => ticket.id.toString()
16764
+ ]
16765
+ );
16766
+ append($$anchor3, tr);
16767
+ };
16768
+ if_block(node_1, ($$render) => {
16769
+ if (hasTimeSlotInCapacities(ticket) || ticket.type == "normal") $$render(consequent);
16770
+ });
16771
+ }
16772
+ append($$anchor2, fragment_1);
16773
+ });
16774
+ append($$anchor, fragment);
16775
+ return pop({
16776
+ get details() {
16777
+ return details();
16778
+ },
16779
+ set details($$value) {
16780
+ details($$value);
16781
+ flushSync();
16782
+ }
16783
+ });
16784
+ }
16785
+ delegate(["change"]);
16786
+ create_custom_element(Timeslot, { details: {} }, [], [], true);
16787
+ var root_1$2 = /* @__PURE__ */ from_html(`<table><thead><tr><th scope="col">Quantity</th><th scope="col">Ticket</th><th scope="col">Price</th></tr></thead><tbody><!></tbody></table>`);
16788
+ function Tickets($$anchor, $$props) {
16789
+ push($$props, true);
16790
+ const details = new Details$1();
16791
+ onMount(() => {
16792
+ details.ticketSelectionDetails = getTicketSelectionDetails($$props.$$host);
16793
+ });
16794
+ var fragment = comment();
16795
+ var node = first_child(fragment);
16796
+ {
16797
+ var consequent_1 = ($$anchor2) => {
16798
+ var table = root_1$2();
16799
+ var tbody = sibling(child(table));
16800
+ var node_1 = child(tbody);
16801
+ {
16802
+ var consequent = ($$anchor3) => {
16803
+ Annual($$anchor3, {
16804
+ get details() {
16805
+ return details;
16806
+ }
16807
+ });
16808
+ };
16809
+ var alternate = ($$anchor3) => {
16810
+ Timeslot($$anchor3, {
16811
+ get details() {
16812
+ return details;
16813
+ }
16814
+ });
16815
+ };
16816
+ if_block(node_1, ($$render) => {
16817
+ var _a2, _b2;
16818
+ if ((_b2 = (_a2 = details.ticketSelectionDetails) == null ? void 0 : _a2.filters) == null ? void 0 : _b2.includes("annual")) $$render(consequent);
16819
+ else $$render(alternate, false);
16820
+ });
16821
+ }
16822
+ reset(tbody);
16823
+ reset(table);
16824
+ append($$anchor2, table);
16825
+ };
16826
+ if_block(node, ($$render) => {
16827
+ var _a2;
16828
+ if (details.ticketSelectionDetails && details.ticketSelectionDetails.selectedTimeslot || ((_a2 = details.ticketSelectionDetails) == null ? void 0 : _a2.selectedDate)) $$render(consequent_1);
16829
+ });
16830
+ }
16831
+ append($$anchor, fragment);
16832
+ return pop({ details });
16833
+ }
16834
+ customElements.define("go-tickets", create_custom_element(Tickets, {}, [], ["details"], false));
16835
+ var root_2 = /* @__PURE__ */ from_html(`<span> </span>`);
16836
+ var root_1$1 = /* @__PURE__ */ from_html(`<span> </span> <!>`, 1);
16837
+ var on_click = (_, cartItem) => cart.deleteItem(cartItem());
16838
+ var root_3 = /* @__PURE__ */ from_html(`<button>x</button>`);
16839
+ var root$2 = /* @__PURE__ */ from_html(`<tr><td><p> <!></p></td><td> </td><td><div><input readonly=""/></div></td><td><!></td><td> </td></tr>`);
16840
+ function Ticket($$anchor, $$props) {
16841
+ push($$props, true);
16842
+ let cartItem = prop($$props, "cartItem", 7), readonly = prop($$props, "readonly", 7, false);
16843
+ var tr = root$2();
16844
+ var td = child(tr);
16845
+ var p = child(td);
16846
+ var text2 = child(p);
16847
+ var node = sibling(text2);
16848
+ {
16849
+ var consequent_1 = ($$anchor2) => {
16850
+ var fragment = root_1$1();
16851
+ var span = first_child(fragment);
16852
+ var text_1 = child(span, true);
16853
+ reset(span);
16854
+ var node_1 = sibling(span, 2);
16855
+ {
16856
+ var consequent = ($$anchor3) => {
16857
+ var span_1 = root_2();
16858
+ var text_2 = child(span_1, true);
16859
+ reset(span_1);
16860
+ template_effect(($0) => set_text(text_2, $0), [() => formatTime(cartItem().attributes.time)]);
16861
+ append($$anchor3, span_1);
16862
+ };
16863
+ if_block(node_1, ($$render) => {
16864
+ if (cartItem().item.type == "time_slot") $$render(consequent);
16865
+ });
16866
+ }
16867
+ template_effect(($0) => set_text(text_1, $0), [
16868
+ () => formatDate(cartItem().attributes.time, { month: "numeric", day: "numeric" }, shop.locale)
16869
+ ]);
16870
+ append($$anchor2, fragment);
16871
+ };
16872
+ if_block(node, ($$render) => {
16873
+ if (cartItem().attributes.time) $$render(consequent_1);
16874
+ });
16875
+ }
16876
+ reset(p);
16877
+ reset(td);
16878
+ var td_1 = sibling(td);
16879
+ var text_3 = child(td_1, true);
16880
+ reset(td_1);
16881
+ var td_2 = sibling(td_1);
16882
+ var div = child(td_2);
16883
+ var input = child(div);
16884
+ remove_input_defaults(input);
16885
+ reset(div);
16886
+ reset(td_2);
16887
+ var td_3 = sibling(td_2);
16888
+ var node_2 = child(td_3);
16889
+ {
16890
+ var consequent_2 = ($$anchor2) => {
16891
+ var button = root_3();
16892
+ button.__click = [on_click, cartItem];
16893
+ append($$anchor2, button);
16894
+ };
16895
+ if_block(node_2, ($$render) => {
16896
+ if (!readonly()) $$render(consequent_2);
16897
+ });
16898
+ }
16899
+ reset(td_3);
16900
+ var td_4 = sibling(td_3);
16901
+ var text_4 = child(td_4, true);
16902
+ reset(td_4);
16903
+ reset(tr);
16904
+ template_effect(() => {
16905
+ set_text(text2, `${cartItem().item.title ?? ""} `);
16906
+ set_text(text_3, cartItem().item.priceFormatted);
16907
+ set_value(input, cartItem().attributes.quantity);
16908
+ set_text(text_4, cartItem().item.totalPriceFormatted);
16909
+ });
16910
+ append($$anchor, tr);
16911
+ return pop({
16912
+ get cartItem() {
16913
+ return cartItem();
16914
+ },
16915
+ set cartItem($$value) {
16916
+ cartItem($$value);
16917
+ flushSync();
16918
+ },
16919
+ get readonly() {
16920
+ return readonly();
16921
+ },
16922
+ set readonly($$value = false) {
16923
+ readonly($$value);
16924
+ flushSync();
16925
+ }
16926
+ });
16927
+ }
16928
+ delegate(["click"]);
16929
+ create_custom_element(Ticket, { cartItem: {}, readonly: {} }, [], [], true);
16930
+ var root_1 = /* @__PURE__ */ from_html(`<table><thead><tr><th>Artikel</th><th>Preis</th><th>Anzahl</th><th></th><th>Gesamt</th></tr></thead><tbody></tbody><tfoot><tr><td colspan="3"></td><td>Total</td><td> </td></tr></tfoot></table>`);
16931
+ var root_4 = /* @__PURE__ */ from_html(`<div></div>`);
16932
+ var root$1 = /* @__PURE__ */ from_html(`<div><!></div>`);
16933
+ function Cart($$anchor, $$props) {
16934
+ push($$props, false);
16935
+ init();
16936
+ var div = root$1();
16937
+ var node = child(div);
15778
16938
  {
15779
16939
  var consequent_1 = ($$anchor2) => {
15780
16940
  var table = root_1();
15781
16941
  var tbody = sibling(child(table));
15782
- each(tbody, 20, () => Object.values(details.tickets), (ticket) => ticket, ($$anchor3, ticket) => {
15783
- var fragment_1 = comment();
15784
- var node_1 = first_child(fragment_1);
16942
+ each(tbody, 5, () => cart.items, (cartItem) => cartItem.uuid, ($$anchor3, cartItem) => {
16943
+ var fragment = comment();
16944
+ var node_1 = first_child(fragment);
15785
16945
  {
15786
16946
  var consequent = ($$anchor4) => {
15787
- var tr = root_3();
15788
- let classes;
15789
- var td = child(tr);
15790
- var select = child(td);
15791
- each(select, 21, () => ticket.quantityOptions, index, ($$anchor5, quantity) => {
15792
- var option = root_4();
15793
- var text2 = child(option, true);
15794
- reset(option);
15795
- var option_value = {};
15796
- template_effect(() => {
15797
- set_selected(option, get(quantity).selected);
15798
- set_text(text2, get(quantity).label);
15799
- if (option_value !== (option_value = get(quantity).value)) {
15800
- option.value = (option.__value = get(quantity).value) ?? "";
15801
- }
15802
- });
15803
- append($$anchor5, option);
16947
+ Ticket($$anchor4, {
16948
+ get cartItem() {
16949
+ return get(cartItem);
16950
+ }
15804
16951
  });
15805
- reset(select);
15806
- reset(td);
15807
- var td_1 = sibling(td);
15808
- var p = child(td_1);
15809
- var text_1 = child(p, true);
15810
- reset(p);
15811
- var node_2 = sibling(p, 2);
15812
- html(node_2, () => ticket.description);
15813
- reset(td_1);
15814
- var td_2 = sibling(td_1);
15815
- var text_2 = child(td_2, true);
15816
- reset(td_2);
15817
- var td_3 = sibling(td_2);
15818
- var text_3 = child(td_3, true);
15819
- reset(td_3);
15820
- reset(tr);
15821
- template_effect(
15822
- ($0) => {
15823
- classes = set_class(tr, 1, "", null, classes, $0);
15824
- set_attribute(select, "name", ticket.id);
15825
- set_text(text_1, ticket.title);
15826
- set_text(text_2, ticket.priceFormatted);
15827
- set_text(text_3, ticket.totalPriceFormatted);
15828
- },
15829
- [() => ({ hidden: hasTimeSlotInCapacities(ticket) })]
15830
- );
15831
- append($$anchor4, tr);
15832
16952
  };
15833
16953
  if_block(node_1, ($$render) => {
15834
- if (hasTimeSlotInCapacities(ticket)) $$render(consequent);
16954
+ if (get(cartItem).type === "Ticket") $$render(consequent);
15835
16955
  });
15836
16956
  }
15837
- append($$anchor3, fragment_1);
16957
+ append($$anchor3, fragment);
15838
16958
  });
15839
16959
  reset(tbody);
16960
+ var tfoot = sibling(tbody);
16961
+ var tr = child(tfoot);
16962
+ var td = sibling(child(tr), 2);
16963
+ var text2 = child(td, true);
16964
+ reset(td);
16965
+ reset(tr);
16966
+ reset(tfoot);
15840
16967
  reset(table);
16968
+ template_effect(() => set_text(text2, cart.total));
15841
16969
  append($$anchor2, table);
15842
16970
  };
16971
+ var alternate = ($$anchor2) => {
16972
+ var div_1 = root_4();
16973
+ append($$anchor2, div_1);
16974
+ };
15843
16975
  if_block(node, ($$render) => {
15844
- if (details.ticketSelectionDetails && details.ticketSelectionDetails.selectedTimeslot) $$render(consequent_1);
16976
+ if (cart.items.length > 0) $$render(consequent_1);
16977
+ else $$render(alternate, false);
15845
16978
  });
15846
16979
  }
15847
- append($$anchor, fragment);
16980
+ reset(div);
16981
+ append($$anchor, div);
16982
+ pop();
16983
+ }
16984
+ customElements.define("go-cart", create_custom_element(Cart, {}, [], [], false));
16985
+ class Details {
16986
+ constructor() {
16987
+ __privateAdd(this, _ticketSelectionDetails3, /* @__PURE__ */ state());
16988
+ }
16989
+ get ticketSelectionDetails() {
16990
+ return get(__privateGet(this, _ticketSelectionDetails3));
16991
+ }
16992
+ set ticketSelectionDetails(value) {
16993
+ set(__privateGet(this, _ticketSelectionDetails3), value, true);
16994
+ }
16995
+ addToCart(cart2, url = void 0) {
16996
+ var _a2;
16997
+ if (!cart2) {
16998
+ console.error("cart not found");
16999
+ return;
17000
+ }
17001
+ const items = ((_a2 = this.ticketSelectionDetails) == null ? void 0 : _a2.ticketList.map((t) => new CartItem(t, "Ticket"))) || [];
17002
+ cart2.addToCart(items, url);
17003
+ this.ticketSelectionDetails.ticketList = [];
17004
+ }
17005
+ }
17006
+ _ticketSelectionDetails3 = new WeakMap();
17007
+ var root = /* @__PURE__ */ from_html(`<div><button> </button></div>`);
17008
+ function CheckoutButton($$anchor, $$props) {
17009
+ push($$props, true);
17010
+ let url = prop($$props, "url", 7), text2 = prop($$props, "text", 7, "");
17011
+ const details = new Details();
17012
+ details.ticketSelectionDetails = getTicketSelectionDetails($$props.$$host);
17013
+ var div = root();
17014
+ var button = child(div);
17015
+ button.__click = () => details.addToCart(cart, url());
17016
+ var text_1 = child(button, true);
17017
+ reset(button);
17018
+ reset(div);
17019
+ template_effect(() => {
17020
+ var _a2;
17021
+ button.disabled = ((_a2 = details.ticketSelectionDetails) == null ? void 0 : _a2.ticketList) && details.ticketSelectionDetails.ticketList.length == 0;
17022
+ set_text(text_1, text2());
17023
+ });
17024
+ append($$anchor, div);
15848
17025
  return pop({
15849
17026
  details,
15850
- get selection() {
15851
- return selection();
17027
+ get url() {
17028
+ return url();
15852
17029
  },
15853
- set selection($$value) {
15854
- selection($$value);
17030
+ set url($$value) {
17031
+ url($$value);
15855
17032
  flushSync();
15856
17033
  },
15857
- get timeslot() {
15858
- return timeslot();
17034
+ get text() {
17035
+ return text2();
15859
17036
  },
15860
- set timeslot($$value) {
15861
- timeslot($$value);
17037
+ set text($$value = "") {
17038
+ text2($$value);
15862
17039
  flushSync();
15863
17040
  }
15864
17041
  });
15865
17042
  }
15866
- customElements.define("go-tickets", create_custom_element(Tickets, { selection: {}, timeslot: {} }, [], ["details"], false));
17043
+ delegate(["click"]);
17044
+ customElements.define("go-checkout-button", create_custom_element(CheckoutButton, { url: {}, text: {} }, [], ["details"], false));
15867
17045
  })();