eligius 2.2.1 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { t as __export } from "./chunk-C6wwvPpM.mjs";
1
+ import { t as __exportAll } from "./chunk-w6R9maHv.mjs";
2
2
  import { isDefined } from "ts-is-present";
3
- import hk from "hotkeys-js";
3
+ import hotkeys from "hotkeys-js";
4
4
  import $ from "jquery";
5
5
  import { v4 } from "uuid";
6
6
  import lt from "lottie-web";
@@ -95,15 +95,15 @@ function deepCopy(original) {
95
95
  //#endregion
96
96
  //#region src/operation/helper/globals.ts
97
97
  const cache$1 = {};
98
- function _getGlobals(cache$2, name) {
99
- const value = name ? cache$2[name] : cache$2;
100
- return value && value !== cache$2 ? deepCopy(value) : value;
98
+ function _getGlobals(cache, name) {
99
+ const value = name ? cache[name] : cache;
100
+ return value && value !== cache ? deepCopy(value) : value;
101
101
  }
102
- function _setGlobals(cache$2, newValues) {
103
- Object.entries(newValues).forEach(([name, value]) => cache$2[name] = value);
102
+ function _setGlobals(cache, newValues) {
103
+ Object.entries(newValues).forEach(([name, value]) => cache[name] = value);
104
104
  }
105
- function _clearGlobals(cache$2) {
106
- Object.keys(cache$2).forEach((key) => delete cache$2[key]);
105
+ function _clearGlobals(cache) {
106
+ Object.keys(cache).forEach((key) => delete cache[key]);
107
107
  }
108
108
  const getGlobals = _getGlobals.bind(null, cache$1);
109
109
  const setGlobals = _setGlobals.bind(null, cache$1);
@@ -126,11 +126,37 @@ function resolveExternalPropertyChain(sourceObject, operationScope, propertyChai
126
126
  switch (propNames.shift().toLowerCase()) {
127
127
  case "$operationdata": return getPropertyChainValue(propNames, sourceObject);
128
128
  case "$globaldata": return getPropertyChainValue(propNames, getGlobals());
129
- case "$scope": return getPropertyChainValue(propNames, operationScope);
129
+ case "$scope": return getScopeChainValue(propNames, operationScope);
130
130
  }
131
131
  }
132
132
  return propertyChainOrRegularObject;
133
133
  }
134
+ /**
135
+ * Resolves a `$scope` property chain, walking up the parent scope chain.
136
+ *
137
+ * `forEach` and `when` execute in a child scope created by `Action._pushScope`,
138
+ * which proxies only a few fields from its parent — notably **not** `variables`.
139
+ * So a variable set with `setVariable` before (or outside) a loop/conditional
140
+ * lives on an ancestor scope, not the child scope the operation runs in.
141
+ *
142
+ * To make those readable, we resolve the chain against the nearest scope (the
143
+ * current one or an ancestor) that actually declares the chain's head property.
144
+ * This gives natural lexical shadowing — an inner declaration of the same name
145
+ * wins over an outer one — and leaves write semantics untouched (`setVariable`
146
+ * still writes to whichever scope it runs in).
147
+ *
148
+ * If no scope in the chain declares the head property, resolution falls back to
149
+ * the original scope so the standard "cannot be resolved" error is produced.
150
+ */
151
+ function getScopeChainValue(propertyChain, operationScope) {
152
+ const head = propertyChain[0];
153
+ let scope = operationScope;
154
+ while (scope) {
155
+ if (head in scope) return getPropertyChainValue(propertyChain, scope);
156
+ scope = scope.parent;
157
+ }
158
+ return getPropertyChainValue(propertyChain, operationScope);
159
+ }
134
160
  function isExternalProperty(value) {
135
161
  return typeof value === "string" && (value.toLocaleLowerCase().startsWith("$operationdata.") || value.toLocaleLowerCase().startsWith("$globaldata.") || value.toLocaleLowerCase().startsWith("$scope."));
136
162
  }
@@ -306,12 +332,15 @@ function isPromise(obj) {
306
332
  //#endregion
307
333
  //#region src/action/action.ts
308
334
  var Action = class {
335
+ name;
336
+ startOperations;
337
+ eventbus;
309
338
  id = "";
310
339
  _scopeStack = [];
311
- constructor(name, startOperations, eventbus$1) {
340
+ constructor(name, startOperations, eventbus) {
312
341
  this.name = name;
313
342
  this.startOperations = startOperations;
314
- this.eventbus = eventbus$1;
343
+ this.eventbus = eventbus;
315
344
  }
316
345
  start(initOperationData) {
317
346
  this._initializeScopeStack();
@@ -352,28 +381,28 @@ var Action = class {
352
381
  _popScope() {
353
382
  this._scopeStack.pop();
354
383
  }
355
- executeOperation(operations$1, operationIndex, resolve, reject, previousOperationData = {}) {
384
+ executeOperation(operations, operationIndex, resolve, reject, previousOperationData = {}) {
356
385
  let scope = this._scopeStack[this._scopeStack.length - 1];
357
386
  if (scope.newIndex !== void 0) {
358
387
  operationIndex = scope.newIndex;
359
388
  delete scope.newIndex;
360
389
  }
361
390
  scope.currentIndex = operationIndex;
362
- if (operationIndex < operations$1.length) {
363
- const operationInfo = operations$1[operationIndex];
391
+ if (operationIndex < operations.length) {
392
+ const operationInfo = operations[operationIndex];
364
393
  const copy = deepCopy(operationInfo.operationData ?? {});
365
394
  const mergedOperationData = Object.assign(previousOperationData, copy);
366
- if (operationInfo.systemName === whenSystemName) scope = this._pushScope(scope);
367
- else if (operationInfo.systemName === forEachSystemName && scope.owner !== operationInfo) {
395
+ if (operationInfo.systemName === "when") scope = this._pushScope(scope);
396
+ else if (operationInfo.systemName === "forEach" && scope.owner !== operationInfo) {
368
397
  scope = this._pushScope(scope);
369
398
  scope.owner = operationInfo;
370
399
  }
371
400
  const operationResult = operationInfo.instance.call(scope, mergedOperationData);
372
- if (operationInfo.systemName === endWhenSystemName || operationInfo.systemName === endForEachSystemName && scope.newIndex === void 0) this._popScope();
373
- if (isPromise(operationResult)) operationResult.then((promisedOperationResult) => this.executeOperation(operations$1, ++operationIndex, resolve, reject, promisedOperationResult)).catch((error) => {
401
+ if (operationInfo.systemName === "endWhen" || operationInfo.systemName === "endForEach" && scope.newIndex === void 0) this._popScope();
402
+ if (isPromise(operationResult)) operationResult.then((promisedOperationResult) => this.executeOperation(operations, ++operationIndex, resolve, reject, promisedOperationResult)).catch((error) => {
374
403
  reject(error);
375
404
  });
376
- else this.executeOperation(operations$1, ++operationIndex, resolve, reject, operationResult);
405
+ else this.executeOperation(operations, ++operationIndex, resolve, reject, operationResult);
377
406
  } else resolve(previousOperationData);
378
407
  }
379
408
  };
@@ -381,6 +410,7 @@ var Action = class {
381
410
  //#endregion
382
411
  //#region src/action/endable-action.ts
383
412
  var EndableAction = class extends Action {
413
+ endOperations;
384
414
  constructor(name, startOperations, endOperations, eventBus) {
385
415
  super(name, startOperations, eventBus);
386
416
  this.endOperations = endOperations;
@@ -400,6 +430,7 @@ var EndableAction = class extends Action {
400
430
  //#endregion
401
431
  //#region src/action/timeline-action.ts
402
432
  var TimelineAction = class extends EndableAction {
433
+ duration;
403
434
  _active = false;
404
435
  get active() {
405
436
  return this._active;
@@ -434,6 +465,8 @@ var TimelineAction = class extends EndableAction {
434
465
  * - Handles eventbus state queries by reading engine properties
435
466
  */
436
467
  var EngineEventbusAdapter = class {
468
+ _engine;
469
+ _eventbus;
437
470
  _engineEventRemovers = [];
438
471
  _eventbusRemovers = [];
439
472
  constructor(_engine, _eventbus) {
@@ -547,7 +580,6 @@ var EngineEventbusAdapter = class {
547
580
 
548
581
  //#endregion
549
582
  //#region src/adapters/engine-input-adapter.ts
550
- const hotkeys$1 = hk.default || hk;
551
583
  /**
552
584
  * Handles external input sources (hotkeys, resize).
553
585
  *
@@ -556,6 +588,9 @@ const hotkeys$1 = hk.default || hk;
556
588
  * - Handles window resize events with debouncing
557
589
  */
558
590
  var EngineInputAdapter = class {
591
+ _engine;
592
+ _eventbus;
593
+ _windowRef;
559
594
  _removers = [];
560
595
  _resizeTimeout;
561
596
  _resizeHandler;
@@ -584,8 +619,8 @@ var EngineInputAdapter = class {
584
619
  }
585
620
  _registerHotkeys() {
586
621
  const handleSpaceBound = this._handleSpacePress.bind(this);
587
- hotkeys$1("space", handleSpaceBound);
588
- this._removers.push(() => hotkeys$1.unbind("space", handleSpaceBound));
622
+ hotkeys("space", handleSpaceBound);
623
+ this._removers.push(() => hotkeys.unbind("space", handleSpaceBound));
589
624
  }
590
625
  _handleSpacePress(keyboardEvent, _hotkeysEvent) {
591
626
  keyboardEvent.preventDefault();
@@ -619,6 +654,9 @@ var EngineInputAdapter = class {
619
654
  * Note: Requires engine reference to update DOM lang attribute on locale change.
620
655
  */
621
656
  var LocaleEventbusAdapter = class {
657
+ _localeManager;
658
+ _eventbus;
659
+ _engine;
622
660
  _localeEventRemovers = [];
623
661
  _eventbusRemovers = [];
624
662
  constructor(_localeManager, _eventbus, _engine) {
@@ -710,9 +748,9 @@ const getElementControllers = getElementData.bind(null, controllersDataName);
710
748
  //#endregion
711
749
  //#region src/operation/helper/attach-controller-to-element.ts
712
750
  function attachControllerToElement(element, controller) {
713
- if (!element.data(controllersDataName)) element.data(controllersDataName, []);
714
- const controllers$1 = getElementControllers(element);
715
- if (controllers$1) controllers$1.push(controller);
751
+ if (!element.data("eligiusEngineControllers")) element.data(controllersDataName, []);
752
+ const controllers = getElementControllers(element);
753
+ if (controllers) controllers.push(controller);
716
754
  }
717
755
 
718
756
  //#endregion
@@ -807,12 +845,12 @@ const animate = (operationData) => {
807
845
  * @category Animation
808
846
  */
809
847
  const animateWithClass = (operationData) => {
810
- let { selectedElement, className, removeClass: removeClass$2 } = operationData;
811
- removeClass$2 = removeClass$2 !== void 0 ? removeClass$2 : true;
848
+ let { selectedElement, className, removeClass } = operationData;
849
+ removeClass = removeClass !== void 0 ? removeClass : true;
812
850
  const promise = new Promise((resolve, reject) => {
813
851
  try {
814
852
  selectedElement.one("webkitAnimationEnd oanimationend oAnimationEnd msAnimationEnd animationEnd", () => {
815
- if (removeClass$2) selectedElement.removeClass(className);
853
+ if (removeClass) selectedElement.removeClass(className);
816
854
  internalResolve(resolve, {}, operationData);
817
855
  });
818
856
  } catch (e) {
@@ -914,18 +952,18 @@ function resolvePropertyValues(operationData, operationScope, newProperties) {
914
952
  resolveNewProperties(newProperties, copy, resolveExternalPropertyChain.bind(null, operationData, operationScope));
915
953
  return copy;
916
954
  }
917
- function resolveNewProperties(properties, copy, resolvePropertyChain$1) {
955
+ function resolveNewProperties(properties, copy, resolvePropertyChain) {
918
956
  if (cache.indexOf(properties) > -1) return;
919
957
  cache.push(properties);
920
958
  try {
921
959
  Object.entries(properties).forEach(([key, value]) => {
922
960
  if (value instanceof $) return;
923
- if (isExternalProperty(value)) copy[key] = resolvePropertyChain$1(value);
961
+ if (isExternalProperty(value)) copy[key] = resolvePropertyChain(value);
924
962
  else if (Array.isArray(value)) value.forEach((item, index, arr) => {
925
- if (isExternalProperty(item)) arr[index] = resolvePropertyChain$1(item);
926
- else if (isObject(item)) resolveNewProperties(item, item, resolvePropertyChain$1);
963
+ if (isExternalProperty(item)) arr[index] = resolvePropertyChain(item);
964
+ else if (isObject(item)) resolveNewProperties(item, item, resolvePropertyChain);
927
965
  });
928
- else if (isObject(value)) resolveNewProperties(value, value, resolvePropertyChain$1);
966
+ else if (isObject(value)) resolveNewProperties(value, value, resolvePropertyChain);
929
967
  else copy[key] = value;
930
968
  });
931
969
  } finally {
@@ -1497,7 +1535,7 @@ function _getModifierSuffix(modifier) {
1497
1535
  if (suffix !== "h" && suffix !== "w" && suffix !== "%") suffix = null;
1498
1536
  const isPercent = suffix === "%";
1499
1537
  if (isPercent) {
1500
- suffix = modifier.substring(modifier.length - endIdx, modifier.length - (endIdx + 1));
1538
+ suffix = modifier.substring(modifier.length - endIdx, modifier.length - 2);
1501
1539
  if (suffix !== "h" && suffix !== "w") suffix = null;
1502
1540
  }
1503
1541
  return [
@@ -1999,14 +2037,14 @@ const addToCache = (key, value) => {
1999
2037
  * @category Utility
2000
2038
  */
2001
2039
  const loadJson = async (operationData) => {
2002
- const { url, cache: cache$2 } = operationData;
2040
+ const { url, cache } = operationData;
2003
2041
  removeProperties(operationData, "url", "cache");
2004
- if (cache$2 && jsonCache[url]) {
2042
+ if (cache && jsonCache[url]) {
2005
2043
  operationData.json = jsonCache[url];
2006
2044
  return operationData;
2007
2045
  }
2008
2046
  const cacheValue = operationData.json = await (await fetch(url)).json();
2009
- if (cache$2) addToCache(url, cacheValue);
2047
+ if (cache) addToCache(url, cacheValue);
2010
2048
  return operationData;
2011
2049
  };
2012
2050
 
@@ -2171,11 +2209,11 @@ const removeClass = (operationData) => {
2171
2209
  const removeControllerFromElement = function(operationData) {
2172
2210
  const { selectedElement, controllerName } = operationData;
2173
2211
  delete operationData.controllerName;
2174
- const controllers$1 = getElementControllers(selectedElement);
2175
- const controller = controllers$1?.find((ctrl) => ctrl.name === controllerName);
2176
- if (controller && controllers$1) {
2177
- const idx = controllers$1.indexOf(controller);
2178
- controllers$1.splice(idx, 1);
2212
+ const controllers = getElementControllers(selectedElement);
2213
+ const controller = controllers?.find((ctrl) => ctrl.name === controllerName);
2214
+ if (controller && controllers) {
2215
+ const idx = controllers.indexOf(controller);
2216
+ controllers.splice(idx, 1);
2179
2217
  controller.detach(this.eventbus);
2180
2218
  } else console.warn(`controller for name '${controllerName}' was not found on the given element`);
2181
2219
  return operationData;
@@ -2858,7 +2896,7 @@ const toggleClass = (operationData) => {
2858
2896
  *
2859
2897
  * @category DOM
2860
2898
  */
2861
- const toggleElement = function toggleElement$2(operationData) {
2899
+ const toggleElement = function toggleElement(operationData) {
2862
2900
  operationData.selectedElement.toggle();
2863
2901
  return operationData;
2864
2902
  };
@@ -2993,7 +3031,7 @@ const wait = (operationData) => {
2993
3031
 
2994
3032
  //#endregion
2995
3033
  //#region src/operation/index.ts
2996
- var operation_exports = /* @__PURE__ */ __export({
3034
+ var operation_exports = /* @__PURE__ */ __exportAll({
2997
3035
  addClass: () => addClass,
2998
3036
  addControllerToElement: () => addControllerToElement,
2999
3037
  addGlobalsToOperation: () => addGlobalsToOperation,
@@ -3084,6 +3122,7 @@ var operation_exports = /* @__PURE__ */ __export({
3084
3122
  *
3085
3123
  */
3086
3124
  var ActionCreatorFactory = class {
3125
+ configurationfactory;
3087
3126
  constructor(configurationfactory) {
3088
3127
  this.configurationfactory = configurationfactory;
3089
3128
  }
@@ -3152,6 +3191,7 @@ var ActionCreatorFactory = class {
3152
3191
  *
3153
3192
  */
3154
3193
  var ActionCreator = class {
3194
+ factory;
3155
3195
  actionConfig;
3156
3196
  /**
3157
3197
  *
@@ -3319,6 +3359,8 @@ function array_move(arr, old_index, new_index) {
3319
3359
  *
3320
3360
  */
3321
3361
  var ActionEditor = class {
3362
+ actionConfig;
3363
+ configurationFactory;
3322
3364
  constructor(actionConfig, configurationFactory) {
3323
3365
  this.actionConfig = actionConfig;
3324
3366
  this.configurationFactory = configurationFactory;
@@ -3593,6 +3635,8 @@ var TimelineActionEditor = class extends EndableActionEditor {
3593
3635
  *
3594
3636
  */
3595
3637
  var OperationEditor = class {
3638
+ operationConfig;
3639
+ actionEditor;
3596
3640
  constructor(operationConfig, actionEditor) {
3597
3641
  this.operationConfig = operationConfig;
3598
3642
  this.actionEditor = actionEditor;
@@ -3709,6 +3753,8 @@ const DEFAULT_CONTAINER_PROVIDER = "DomContainerProvider";
3709
3753
  */
3710
3754
  const DEFAULT_PLAYLIST = "SimplePlaylist";
3711
3755
  var TimelineProvidersSettingsEditor = class {
3756
+ providersSettings;
3757
+ configurationFactory;
3712
3758
  constructor(providersSettings, configurationFactory) {
3713
3759
  this.providersSettings = providersSettings;
3714
3760
  this.configurationFactory = configurationFactory;
@@ -3735,6 +3781,9 @@ var TimelineProvidersSettingsEditor = class {
3735
3781
  }
3736
3782
  };
3737
3783
  var TimelineProviderSettingsEditor = class {
3784
+ providerSettings;
3785
+ providersSettingsEditor;
3786
+ configurationFactory;
3738
3787
  constructor(providerSettings, providersSettingsEditor, configurationFactory) {
3739
3788
  this.providerSettings = providerSettings;
3740
3789
  this.providersSettingsEditor = providersSettingsEditor;
@@ -3956,6 +4005,7 @@ const mergeIfMissing = (target, source) => Object.entries(source).reduce((acc, [
3956
4005
  * ```
3957
4006
  */
3958
4007
  var ConfigurationFactory = class ConfigurationFactory {
4008
+ configuration;
3959
4009
  actionCreatorFactory;
3960
4010
  /**
3961
4011
  * Constructs a new `ConfigurationFactory`
@@ -4076,7 +4126,10 @@ var ConfigurationFactory = class ConfigurationFactory {
4076
4126
  */
4077
4127
  getConfiguration(callBack) {
4078
4128
  const copy = deepCopy(this.configuration);
4079
- if (callBack) this.configuration = deepCopy(callBack.call(this, copy));
4129
+ if (callBack) {
4130
+ const newConfig = callBack.call(this, copy);
4131
+ this.configuration = deepCopy(newConfig);
4132
+ }
4080
4133
  return copy;
4081
4134
  }
4082
4135
  /**
@@ -4314,14 +4367,14 @@ var DOMEventListenerController = class {
4314
4367
  actionOperationData: deepCopy(operationData.actionOperationData)
4315
4368
  };
4316
4369
  }
4317
- attach(eventbus$1) {
4370
+ attach(eventbus) {
4318
4371
  if (!this.operationData) return;
4319
4372
  const { selectedElement, actions, eventName } = this.operationData;
4320
4373
  if (!this.actionInstanceInfos) {
4321
4374
  this.actionInstanceInfos = [];
4322
4375
  actions.forEach((actionName) => {
4323
4376
  const [isStart, name] = this._isStartAction(actionName);
4324
- const actionInstance = eventbus$1.request("request-action", name);
4377
+ const actionInstance = eventbus.request("request-action", name);
4325
4378
  if (actionInstance) this.actionInstanceInfos?.push({
4326
4379
  start: isStart,
4327
4380
  action: actionInstance
@@ -4394,9 +4447,9 @@ var BaseController = class {
4394
4447
  * @param eventName - Name of the event to listen for
4395
4448
  * @param handler - Event handler function (will be bound to this controller)
4396
4449
  */
4397
- addListener(eventbus$1, eventName, handler) {
4450
+ addListener(eventbus, eventName, handler) {
4398
4451
  const boundHandler = handler.bind(this);
4399
- const remover = eventbus$1.on(eventName, boundHandler);
4452
+ const remover = eventbus.on(eventName, boundHandler);
4400
4453
  this.eventListeners.push(remover);
4401
4454
  }
4402
4455
  /**
@@ -4405,9 +4458,9 @@ var BaseController = class {
4405
4458
  * @param eventbus - The eventbus to register with
4406
4459
  * @param listeners - Array of {eventName, handler} pairs
4407
4460
  */
4408
- attachMultiple(eventbus$1, listeners) {
4461
+ attachMultiple(eventbus, listeners) {
4409
4462
  listeners.forEach(({ eventName, handler }) => {
4410
- this.addListener(eventbus$1, eventName, handler);
4463
+ this.addListener(eventbus, eventName, handler);
4411
4464
  });
4412
4465
  }
4413
4466
  /**
@@ -4448,11 +4501,11 @@ var LabelController = class extends BaseController {
4448
4501
  this._setLabel();
4449
4502
  }
4450
4503
  }
4451
- attach(eventbus$1) {
4504
+ attach(eventbus) {
4452
4505
  if (!this.operationData) return;
4453
- this._eventbus = eventbus$1;
4506
+ this._eventbus = eventbus;
4454
4507
  this._setLabel();
4455
- this.addListener(eventbus$1, "language-change", this._handleLanguageChange);
4508
+ this.addListener(eventbus, "language-change", this._handleLanguageChange);
4456
4509
  }
4457
4510
  _setLabel() {
4458
4511
  if (!this._eventbus || !this.operationData?.translationKey) return;
@@ -4463,8 +4516,8 @@ var LabelController = class extends BaseController {
4463
4516
  if (!this.operationData?.attributeName) this.operationData?.selectedElement.html(text);
4464
4517
  else this.operationData?.selectedElement.attr(this.operationData?.attributeName, text);
4465
4518
  }
4466
- detach(eventbus$1) {
4467
- super.detach(eventbus$1);
4519
+ detach(eventbus) {
4520
+ super.detach(eventbus);
4468
4521
  this._eventbus = null;
4469
4522
  }
4470
4523
  _handleLanguageChange(_code) {
@@ -4505,20 +4558,20 @@ var LottieController = class extends BaseController {
4505
4558
  else if (values[0] === "end") this.endPosition = +values[1];
4506
4559
  });
4507
4560
  }
4508
- attach(eventbus$1) {
4561
+ attach(eventbus) {
4509
4562
  if (!this.operationData) return;
4510
4563
  const { labelIds } = this.operationData;
4511
4564
  if (labelIds?.length) {
4512
- this.currentLanguage = eventbus$1.request("request-current-language") ?? "en-US";
4513
- this.addListener(eventbus$1, "language-change", this._handleLanguageChange);
4514
- const labelCollections = eventbus$1.request("request-label-collections", this.operationData.labelIds) ?? [];
4565
+ this.currentLanguage = eventbus.request("request-current-language") ?? "en-US";
4566
+ this.addListener(eventbus, "language-change", this._handleLanguageChange);
4567
+ const labelCollections = eventbus.request("request-label-collections", this.operationData.labelIds) ?? [];
4515
4568
  this._createTextDataLookup(labelCollections);
4516
4569
  }
4517
4570
  this._createAnimation();
4518
4571
  this._createAnimation();
4519
4572
  }
4520
- detach(eventbus$1) {
4521
- super.detach(eventbus$1);
4573
+ detach(eventbus) {
4574
+ super.detach(eventbus);
4522
4575
  if (this.animationItem) if (this.endPosition > -1) {
4523
4576
  this.animationItem.addEventListener("complete", this._destroy.bind(this));
4524
4577
  this.animationItem.playSegments([this.freezePosition, this.endPosition], true);
@@ -4618,12 +4671,12 @@ var MutationObserverController = class extends BaseController {
4618
4671
  *
4619
4672
  * @param eventbus - Eligius eventbus for broadcasting mutation events
4620
4673
  */
4621
- attach(eventbus$1) {
4674
+ attach(eventbus) {
4622
4675
  if (!this.operationData) return;
4623
4676
  const nativeElement = this.operationData.selectedElement.get(0);
4624
4677
  if (!nativeElement) return;
4625
4678
  const options = this._buildObserverOptions();
4626
- this.observer = new MutationObserver(this._handleMutations.bind(this, eventbus$1, nativeElement));
4679
+ this.observer = new MutationObserver(this._handleMutations.bind(this, eventbus, nativeElement));
4627
4680
  this.observer.observe(nativeElement, options);
4628
4681
  }
4629
4682
  /**
@@ -4632,12 +4685,12 @@ var MutationObserverController = class extends BaseController {
4632
4685
  *
4633
4686
  * @param eventbus - Eligius eventbus (used by BaseController for cleanup)
4634
4687
  */
4635
- detach(eventbus$1) {
4688
+ detach(eventbus) {
4636
4689
  if (this.observer) {
4637
4690
  this.observer.disconnect();
4638
4691
  this.observer = null;
4639
4692
  }
4640
- super.detach(eventbus$1);
4693
+ super.detach(eventbus);
4641
4694
  }
4642
4695
  /**
4643
4696
  * Build MutationObserverInit options from controller metadata.
@@ -4668,13 +4721,13 @@ var MutationObserverController = class extends BaseController {
4668
4721
  * @param mutations - Array of mutation records from observer callback
4669
4722
  * @private
4670
4723
  */
4671
- _handleMutations(eventbus$1, target, mutations) {
4724
+ _handleMutations(eventbus, target, mutations) {
4672
4725
  const payload = {
4673
4726
  mutations,
4674
4727
  target,
4675
4728
  timestamp: Date.now()
4676
4729
  };
4677
- eventbus$1.broadcast("dom-mutation", [payload]);
4730
+ eventbus.broadcast("dom-mutation", [payload]);
4678
4731
  }
4679
4732
  };
4680
4733
 
@@ -4694,13 +4747,13 @@ var NavigationController = class extends BaseController {
4694
4747
  this.container = operationData.selectedElement;
4695
4748
  this.navigation = this._buildNavigationData(operationData.json);
4696
4749
  }
4697
- attach(eventbus$1) {
4750
+ attach(eventbus) {
4698
4751
  if (!this.container) return;
4699
- this.eventbus = eventbus$1;
4700
- this.addListener(eventbus$1, "navigate-to-video-url", this._handleNavigateVideoUrl);
4701
- this.addListener(eventbus$1, "highlight-navigation", this._highlightMenu);
4702
- this.addListener(eventbus$1, "request-current-navigation", this._handleRequestCurrentNavigation);
4703
- this.addListener(eventbus$1, "video-complete", this._handleVideoComplete);
4752
+ this.eventbus = eventbus;
4753
+ this.addListener(eventbus, "navigate-to-video-url", this._handleNavigateVideoUrl);
4754
+ this.addListener(eventbus, "highlight-navigation", this._highlightMenu);
4755
+ this.addListener(eventbus, "request-current-navigation", this._handleRequestCurrentNavigation);
4756
+ this.addListener(eventbus, "video-complete", this._handleVideoComplete);
4704
4757
  this._buildHtml(this.container, this.navigation);
4705
4758
  this._initHistory.bind(this);
4706
4759
  }
@@ -4729,10 +4782,10 @@ var NavigationController = class extends BaseController {
4729
4782
  });
4730
4783
  } else resultCallback(null);
4731
4784
  }
4732
- detach(eventbus$1) {
4733
- super.detach(eventbus$1);
4785
+ detach(eventbus) {
4786
+ super.detach(eventbus);
4734
4787
  this.labelControllers.forEach((ctrl) => {
4735
- ctrl.detach(eventbus$1);
4788
+ ctrl.detach(eventbus);
4736
4789
  });
4737
4790
  this.labelControllers.length = 0;
4738
4791
  this.eventbus = null;
@@ -4851,30 +4904,30 @@ var ProgressbarController = class extends BaseController {
4851
4904
  this.selectedElement = operationData.selectedElement;
4852
4905
  this.textElement = operationData.textElement;
4853
4906
  }
4854
- attach(eventbus$1) {
4855
- this.addListener(eventbus$1, "timeline-time", this._positionUpdateHandler);
4856
- this.duration = eventbus$1.request("timeline-duration-request") ?? 0;
4907
+ attach(eventbus) {
4908
+ this.addListener(eventbus, "timeline-time", this._positionUpdateHandler);
4909
+ this.duration = eventbus.request("timeline-duration-request") ?? 0;
4857
4910
  this.selectedElement?.css({ "pointer-events": "none" });
4858
4911
  const container = this.selectedElement?.parent();
4859
4912
  if (container) {
4860
- const clickHandler = this._clickHandler.bind(this, eventbus$1);
4913
+ const clickHandler = this._clickHandler.bind(this, eventbus);
4861
4914
  container.on("click", clickHandler);
4862
4915
  this.eventListeners.push(() => container.off("click", clickHandler));
4863
4916
  }
4864
4917
  }
4865
- detach(eventbus$1) {
4866
- super.detach(eventbus$1);
4918
+ detach(eventbus) {
4919
+ super.detach(eventbus);
4867
4920
  }
4868
4921
  _positionUpdateHandler(position) {
4869
4922
  const percentage = 100 / this.duration * position;
4870
4923
  this.selectedElement?.css("width", `${percentage}%`);
4871
4924
  this.textElement?.text(`${Math.floor(percentage)}%`);
4872
4925
  }
4873
- _clickHandler(eventbus$1, event) {
4926
+ _clickHandler(eventbus, event) {
4874
4927
  const rect = event.target.getBoundingClientRect();
4875
4928
  const x = event.clientX - rect.left;
4876
4929
  const percentage = 100 / rect.width * x;
4877
- eventbus$1.broadcast("timeline-seek-request", [Math.round(this.duration / 100 * percentage)]);
4930
+ eventbus.broadcast("timeline-seek-request", [Math.round(this.duration / 100 * percentage)]);
4878
4931
  }
4879
4932
  };
4880
4933
 
@@ -4892,10 +4945,10 @@ var RoutingController = class extends BaseController {
4892
4945
  init(operationData) {
4893
4946
  this.navigation = this._buildNavigationData(operationData.json);
4894
4947
  }
4895
- attach(eventbus$1) {
4896
- this.addListener(eventbus$1, "before-request-video-url", this._handleBeforeRequestVideoUrl);
4897
- this.addListener(eventbus$1, "push-history-state", this._handlePushHistoryState);
4898
- this.eventbus = eventbus$1;
4948
+ attach(eventbus) {
4949
+ this.addListener(eventbus, "before-request-video-url", this._handleBeforeRequestVideoUrl);
4950
+ this.addListener(eventbus, "push-history-state", this._handlePushHistoryState);
4951
+ this.eventbus = eventbus;
4899
4952
  window.onpopstate = this._handlePopstate.bind(this);
4900
4953
  const navId = this._getQueryVariable(0);
4901
4954
  if (navId) {
@@ -4919,8 +4972,8 @@ var RoutingController = class extends BaseController {
4919
4972
  true
4920
4973
  ]);
4921
4974
  }
4922
- detach(eventbus$1) {
4923
- super.detach(eventbus$1);
4975
+ detach(eventbus) {
4976
+ super.detach(eventbus);
4924
4977
  window.onpopstate = null;
4925
4978
  this.eventbus = null;
4926
4979
  }
@@ -5002,13 +5055,13 @@ var SubtitlesController = class extends BaseController {
5002
5055
  lastFunc = null;
5003
5056
  name = "SubtitlesController";
5004
5057
  subtitleDurations = null;
5005
- attach(eventbus$1) {
5006
- this.addListener(eventbus$1, "timeline-time", this.onTimeHandler);
5007
- this.addListener(eventbus$1, "timeline-seeked", this.onSeekedHandler);
5008
- this.addListener(eventbus$1, "language-change", this.languageChangeHandler);
5058
+ attach(eventbus) {
5059
+ this.addListener(eventbus, "timeline-time", this.onTimeHandler);
5060
+ this.addListener(eventbus, "timeline-seeked", this.onSeekedHandler);
5061
+ this.addListener(eventbus, "language-change", this.languageChangeHandler);
5009
5062
  }
5010
- detach(eventbus$1) {
5011
- super.detach(eventbus$1);
5063
+ detach(eventbus) {
5064
+ super.detach(eventbus);
5012
5065
  }
5013
5066
  languageChangeHandler(newLanguage) {
5014
5067
  this.currentLanguage = newLanguage;
@@ -5062,7 +5115,7 @@ var SubtitlesController = class extends BaseController {
5062
5115
 
5063
5116
  //#endregion
5064
5117
  //#region src/controllers/index.ts
5065
- var controllers_exports = /* @__PURE__ */ __export({
5118
+ var controllers_exports = /* @__PURE__ */ __exportAll({
5066
5119
  DOMEventListenerController: () => DOMEventListenerController,
5067
5120
  LabelController: () => LabelController,
5068
5121
  LottieController: () => LottieController,
@@ -6687,7 +6740,7 @@ $scope.loopIndex: for a scope value`,
6687
6740
 
6688
6741
  //#endregion
6689
6742
  //#region src/operation/metadata/index.ts
6690
- var metadata_exports$2 = /* @__PURE__ */ __export({
6743
+ var metadata_exports$2 = /* @__PURE__ */ __exportAll({
6691
6744
  addClass: () => addClass$1,
6692
6745
  addControllerToElement: () => addControllerToElement$1,
6693
6746
  addGlobalsToOperation: () => addGlobalsToOperation$1,
@@ -6857,6 +6910,7 @@ var SubtitleImporter = class {
6857
6910
  * Used to edit and add to an {@link ISubtitleCollection}.
6858
6911
  */
6859
6912
  var SubtitleEditor = class {
6913
+ collection;
6860
6914
  constructor(collection = []) {
6861
6915
  this.collection = collection;
6862
6916
  }
@@ -6962,9 +7016,11 @@ function resolvePropertyChain(propertyChain, sourceObject) {
6962
7016
  *
6963
7017
  */
6964
7018
  var ConfigurationResolver = class {
6965
- constructor(importer, eventbus$1) {
7019
+ importer;
7020
+ eventbus;
7021
+ constructor(importer, eventbus) {
6966
7022
  this.importer = importer;
6967
- this.eventbus = eventbus$1;
7023
+ this.eventbus = eventbus;
6968
7024
  }
6969
7025
  process(configuration, actionRegistryListener) {
6970
7026
  resolvePlaceholders(configuration, configuration, this.importer);
@@ -6991,16 +7047,16 @@ var ConfigurationResolver = class {
6991
7047
  }), {}), resolvedConfig];
6992
7048
  }
6993
7049
  };
6994
- function resolveEventActions(eventActionConfigurations, actionRegistryListener, importer, eventbus$1) {
7050
+ function resolveEventActions(eventActionConfigurations, actionRegistryListener, importer, eventbus) {
6995
7051
  return eventActionConfigurations.map((config) => resolveActionConfiguration(config, importer)).map((config, index) => {
6996
7052
  const { eventName, eventTopic } = eventActionConfigurations[index];
6997
- const eventAction = new Action(config.name, config.startOperations, eventbus$1);
7053
+ const eventAction = new Action(config.name, config.startOperations, eventbus);
6998
7054
  actionRegistryListener.registerAction(eventAction, eventName, eventTopic);
6999
7055
  return eventAction;
7000
7056
  });
7001
7057
  }
7002
- function resolveTimelines(timelines, importer, eventbus$1) {
7003
- const resolve = resolveTimelineAction.bind(null, importer, eventbus$1);
7058
+ function resolveTimelines(timelines, importer, eventbus) {
7059
+ const resolve = resolveTimelineAction.bind(null, importer, eventbus);
7004
7060
  return timelines.map((config) => ({
7005
7061
  ...config,
7006
7062
  timelineActions: config.timelineActions.map(resolve)
@@ -7029,23 +7085,23 @@ function resolveEndableActionConfiguration(config, importer) {
7029
7085
  endOperations: config.endOperations.map(resolve)
7030
7086
  };
7031
7087
  }
7032
- function resolveTimelineAction(importer, eventbus$1, actionConfiguration) {
7088
+ function resolveTimelineAction(importer, eventbus, actionConfiguration) {
7033
7089
  const resolvedConfig = resolveEndableActionConfiguration(actionConfiguration, importer);
7034
7090
  const duration = {
7035
7091
  end: actionConfiguration.duration.end ?? -1,
7036
7092
  start: actionConfiguration.duration.start
7037
7093
  };
7038
7094
  const { id, name, endOperations, startOperations } = resolvedConfig;
7039
- const action = new TimelineAction(name, startOperations, endOperations, duration, eventbus$1);
7095
+ const action = new TimelineAction(name, startOperations, endOperations, duration, eventbus);
7040
7096
  action.id = id;
7041
7097
  return action;
7042
7098
  }
7043
- function resolveActions(actionConfigurations, importer, eventbus$1) {
7099
+ function resolveActions(actionConfigurations, importer, eventbus) {
7044
7100
  return actionConfigurations.map((config) => {
7045
7101
  return resolveEndableActionConfiguration(config, importer);
7046
7102
  }).map((resolvedConfig) => {
7047
7103
  const { name, endOperations, startOperations } = resolvedConfig;
7048
- const action = new EndableAction(name, startOperations, endOperations, eventbus$1);
7104
+ const action = new EndableAction(name, startOperations, endOperations, eventbus);
7049
7105
  action.id = resolvedConfig.id;
7050
7106
  return action;
7051
7107
  });
@@ -7235,7 +7291,7 @@ function SubtitlesController$1() {
7235
7291
 
7236
7292
  //#endregion
7237
7293
  //#region src/controllers/metadata/index.ts
7238
- var metadata_exports = /* @__PURE__ */ __export({
7294
+ var metadata_exports = /* @__PURE__ */ __exportAll({
7239
7295
  DOMEventListenerController: () => DOMEventListenerController$1,
7240
7296
  LabelController: () => LabelController$1,
7241
7297
  LottieController: () => LottieController$1,
@@ -7816,7 +7872,7 @@ function videoComplete() {
7816
7872
 
7817
7873
  //#endregion
7818
7874
  //#region src/eventbus/events/metadata/index.ts
7819
- var metadata_exports$1 = /* @__PURE__ */ __export({
7875
+ var metadata_exports$1 = /* @__PURE__ */ __exportAll({
7820
7876
  beforeRequestTimelineUri: () => beforeRequestTimelineUri,
7821
7877
  beforeRequestVideoUrl: () => beforeRequestVideoUrl,
7822
7878
  domMutation: () => domMutation,
@@ -8024,8 +8080,9 @@ var Eventbus = class {
8024
8080
  //#endregion
8025
8081
  //#region src/eventbus/request-video-uri-interceptor.ts
8026
8082
  var RequestVideoUriInterceptor = class {
8027
- constructor(eventbus$1) {
8028
- this.eventbus = eventbus$1;
8083
+ eventbus;
8084
+ constructor(eventbus) {
8085
+ this.eventbus = eventbus;
8029
8086
  }
8030
8087
  intercept(args) {
8031
8088
  this.eventbus.broadcast("before-request-timeline-uri", args.slice());
@@ -8035,7 +8092,7 @@ var RequestVideoUriInterceptor = class {
8035
8092
 
8036
8093
  //#endregion
8037
8094
  //#region src/eventbus/index.ts
8038
- var eventbus_exports = /* @__PURE__ */ __export({
8095
+ var eventbus_exports = /* @__PURE__ */ __exportAll({
8039
8096
  ActionRegistryEventbusListener: () => ActionRegistryEventbusListener,
8040
8097
  Eventbus: () => Eventbus,
8041
8098
  RequestVideoUriInterceptor: () => RequestVideoUriInterceptor
@@ -8178,7 +8235,6 @@ var BasePositionSource = class {
8178
8235
 
8179
8236
  //#endregion
8180
8237
  //#region src/timelineproviders/position-sources/keyboard-step-source.ts
8181
- const hotkeys = hk.default || hk;
8182
8238
  /**
8183
8239
  * Key bindings used by KeyboardStepSource.
8184
8240
  */
@@ -9099,7 +9155,7 @@ var SimplePlaylist = class {
9099
9155
 
9100
9156
  //#endregion
9101
9157
  //#region src/timelineproviders/index.ts
9102
- var timelineproviders_exports = /* @__PURE__ */ __export({
9158
+ var timelineproviders_exports = /* @__PURE__ */ __exportAll({
9103
9159
  BasePositionSource: () => BasePositionSource,
9104
9160
  DomContainerProvider: () => DomContainerProvider,
9105
9161
  KeyboardStepSource: () => KeyboardStepSource,
@@ -9232,6 +9288,10 @@ function mapSourceStateToPlayState(sourceState) {
9232
9288
  * and triggering the actions associated with positions along the timeline.
9233
9289
  */
9234
9290
  var EligiusEngine = class EligiusEngine {
9291
+ configuration;
9292
+ eventbus;
9293
+ timelineProviders;
9294
+ localeManager;
9235
9295
  _timeLineActionsLookup = {};
9236
9296
  _timelineLookupCache = /* @__PURE__ */ new Map();
9237
9297
  _eventbusRemovers = [];
@@ -9266,9 +9326,9 @@ var EligiusEngine = class EligiusEngine {
9266
9326
  get engineRoot() {
9267
9327
  return $(this.configuration.containerSelector);
9268
9328
  }
9269
- constructor(configuration, eventbus$1, timelineProviders, localeManager) {
9329
+ constructor(configuration, eventbus, timelineProviders, localeManager) {
9270
9330
  this.configuration = configuration;
9271
- this.eventbus = eventbus$1;
9331
+ this.eventbus = eventbus;
9272
9332
  this.timelineProviders = timelineProviders;
9273
9333
  this.localeManager = localeManager;
9274
9334
  }