eligius 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/README.md +2 -2
  2. package/dist/{index.d.ts → index.d.mts} +2518 -288
  3. package/dist/{index.js → index.mjs} +3164 -244
  4. package/dist/index.mjs.map +1 -0
  5. package/jsonschema/endable-action-template.json +186 -0
  6. package/jsonschema/endable-action.json +186 -0
  7. package/jsonschema/event-action.json +93 -0
  8. package/jsonschema/operation-templates/announce-to-screen-reader.json +43 -0
  9. package/jsonschema/operation-templates/clear-storage.json +43 -0
  10. package/jsonschema/operation-templates/compare-date.json +41 -0
  11. package/jsonschema/operation-templates/concatenate-strings.json +45 -0
  12. package/jsonschema/operation-templates/filter-array.json +51 -0
  13. package/jsonschema/operation-templates/find-in-array.json +51 -0
  14. package/jsonschema/operation-templates/format-date.json +39 -0
  15. package/jsonschema/operation-templates/format-text.json +37 -0
  16. package/jsonschema/operation-templates/get-controller-from-element.json +1 -0
  17. package/jsonschema/operation-templates/get-current-time.json +26 -0
  18. package/jsonschema/operation-templates/get-focused-element.json +26 -0
  19. package/jsonschema/operation-templates/get-form-data.json +26 -0
  20. package/jsonschema/operation-templates/get-scroll-position.json +26 -0
  21. package/jsonschema/operation-templates/get-text-content.json +26 -0
  22. package/jsonschema/operation-templates/http-delete.json +45 -0
  23. package/jsonschema/operation-templates/http-post.json +51 -0
  24. package/jsonschema/operation-templates/http-put.json +51 -0
  25. package/jsonschema/operation-templates/is-element-in-viewport.json +26 -0
  26. package/jsonschema/operation-templates/load-from-storage.json +43 -0
  27. package/jsonschema/operation-templates/map-array.json +39 -0
  28. package/jsonschema/operation-templates/remove-controller-from-element.json +1 -0
  29. package/jsonschema/operation-templates/replace-string.json +43 -0
  30. package/jsonschema/operation-templates/replace-text.json +43 -0
  31. package/jsonschema/operation-templates/save-to-storage.json +49 -0
  32. package/jsonschema/operation-templates/scroll-to-element.json +45 -0
  33. package/jsonschema/operation-templates/scroll-to-position.json +49 -0
  34. package/jsonschema/operation-templates/set-focus.json +26 -0
  35. package/jsonschema/operation-templates/set-form-value.json +37 -0
  36. package/jsonschema/operation-templates/sort-array.json +49 -0
  37. package/jsonschema/operation-templates/split-string.json +43 -0
  38. package/jsonschema/operation-templates/substring-text.json +45 -0
  39. package/jsonschema/operation-templates/toggle-form-element.json +39 -0
  40. package/jsonschema/operation-templates/validate-form.json +39 -0
  41. package/jsonschema/operations/announce-to-screen-reader.json +47 -0
  42. package/jsonschema/operations/clear-storage.json +47 -0
  43. package/jsonschema/operations/compare-date.json +46 -0
  44. package/jsonschema/operations/concatenate-strings.json +49 -0
  45. package/jsonschema/operations/filter-array.json +53 -0
  46. package/jsonschema/operations/find-in-array.json +53 -0
  47. package/jsonschema/operations/format-date.json +43 -0
  48. package/jsonschema/operations/format-text.json +41 -0
  49. package/jsonschema/operations/get-controller-from-element.json +1 -0
  50. package/jsonschema/operations/get-current-time.json +26 -0
  51. package/jsonschema/operations/get-focused-element.json +26 -0
  52. package/jsonschema/operations/get-form-data.json +26 -0
  53. package/jsonschema/operations/get-scroll-position.json +26 -0
  54. package/jsonschema/operations/get-text-content.json +26 -0
  55. package/jsonschema/operations/http-delete.json +49 -0
  56. package/jsonschema/operations/http-post.json +55 -0
  57. package/jsonschema/operations/http-put.json +55 -0
  58. package/jsonschema/operations/is-element-in-viewport.json +26 -0
  59. package/jsonschema/operations/load-from-storage.json +48 -0
  60. package/jsonschema/operations/map-array.json +43 -0
  61. package/jsonschema/operations/remove-controller-from-element.json +1 -0
  62. package/jsonschema/operations/replace-string.json +48 -0
  63. package/jsonschema/operations/replace-text.json +48 -0
  64. package/jsonschema/operations/save-to-storage.json +55 -0
  65. package/jsonschema/operations/scroll-to-element.json +47 -0
  66. package/jsonschema/operations/scroll-to-position.json +54 -0
  67. package/jsonschema/operations/set-focus.json +26 -0
  68. package/jsonschema/operations/set-form-value.json +41 -0
  69. package/jsonschema/operations/sort-array.json +51 -0
  70. package/jsonschema/operations/split-string.json +47 -0
  71. package/jsonschema/operations/substring-text.json +49 -0
  72. package/jsonschema/operations/toggle-form-element.json +43 -0
  73. package/jsonschema/operations/validate-form.json +41 -0
  74. package/jsonschema/timeline-action.json +186 -0
  75. package/package.json +15 -15
  76. package/dist/index.js.map +0 -1
  77. /package/dist/{chunk-Bp6m_JJh.js → chunk-z5eko27R.mjs} +0 -0
@@ -1,4 +1,4 @@
1
- import { t as __export } from "./chunk-Bp6m_JJh.js";
1
+ import { t as __export } from "./chunk-z5eko27R.mjs";
2
2
  import $ from "jquery";
3
3
  import { isDefined } from "ts-is-present";
4
4
  import fs from "node:fs";
@@ -62,11 +62,24 @@ var DevToolEventListener = class {
62
62
 
63
63
  //#endregion
64
64
  //#region src/diagnostics/diagnostics.ts
65
- var Diagnostics = class {
66
- static send(_name, _data) {
67
- console.log(_name, _data);
65
+ let active;
66
+ function send(_name, _data) {
67
+ console.log(_name, _data);
68
+ }
69
+ function setActive(value) {
70
+ active = value;
71
+ }
72
+ function isActive() {
73
+ return active;
74
+ }
75
+ const Diagnostics = {
76
+ send,
77
+ get active() {
78
+ return active;
79
+ },
80
+ set active(value) {
81
+ active = value;
68
82
  }
69
- static active;
70
83
  };
71
84
 
72
85
  //#endregion
@@ -216,6 +229,7 @@ function isExternalProperty(value) {
216
229
  * The {@link continueForEach|continue} and {@link breakForEach|break} operations can be used to control the
217
230
  * loop iterations.
218
231
  *
232
+ * @category Control Flow
219
233
  */
220
234
  const forEach = function(operationData) {
221
235
  const { collection } = operationData;
@@ -314,6 +328,8 @@ function removeProperties(operationData, ...keys) {
314
328
  *
315
329
  * @param operationData
316
330
  * @returns
331
+ *
332
+ * @category Control Flow
317
333
  */
318
334
  const when = function(operationData) {
319
335
  const [left, operator, right] = parseExpression(operationData.expression, operationData, this);
@@ -544,7 +560,7 @@ function _generateSourceCode(importPaths) {
544
560
  result.push("class EligiusResourceImporter implements ISimpleResourceImporter {");
545
561
  result.push("import(name: string): Record<string, any> {");
546
562
  result.push("if (imports.hasOwnProperty(name)) { return imports[name]; }");
547
- result.push("throw Error(`Unknown systemName: ${name}`);");
563
+ result.push("throw Error(\"Unknown systemName: \" + name);");
548
564
  result.push("}}");
549
565
  result.push("");
550
566
  result.push("export default EligiusResourceImporter;");
@@ -609,7 +625,7 @@ function _gatherOperationImportPathsFromActions(actionsConfig) {
609
625
  function _gatherControllerImportPaths(operationConfigs) {
610
626
  if (!operationConfigs) return [];
611
627
  return operationConfigs.filter((operationConfig) => {
612
- if (operationConfig.operationData?.hasOwnProperty("systemName")) return operationConfig.operationData.systemName.endsWith("Controller");
628
+ if (Object.hasOwn(operationConfig.operationData ?? {}, "systemName")) return operationConfig.operationData.systemName.endsWith("Controller");
613
629
  return false;
614
630
  }).map((operationConfig) => {
615
631
  const { systemName } = operationConfig.operationData ?? {};
@@ -636,6 +652,7 @@ function _deduplicate(importPaths) {
636
652
  /**
637
653
  * This operation adds the specified class name to the specified selected element.
638
654
  *
655
+ * @category DOM
639
656
  */
640
657
  const addClass = (operationData) => {
641
658
  const { selectedElement, className } = operationData;
@@ -681,6 +698,7 @@ function internalResolve(resolve, operationData, newOperationData) {
681
698
  /**
682
699
  * This operation adds the specified controller instance to the given selected element.
683
700
  *
701
+ * @category Controller
684
702
  */
685
703
  const addControllerToElement = function(operationData) {
686
704
  const { selectedElement, controllerInstance } = operationData;
@@ -700,6 +718,8 @@ const addControllerToElement = function(operationData) {
700
718
  /**
701
719
  * This operation adds the specified global property names to the current operation data.
702
720
  * It finally removes the `globalProperties` property from the current operation data.
721
+ *
722
+ * @category Data
703
723
  */
704
724
  const addGlobalsToOperation = (operationData) => {
705
725
  const { globalProperties } = operationData;
@@ -719,6 +739,8 @@ const addGlobalsToOperation = (operationData) => {
719
739
  *
720
740
  * @param operationData
721
741
  * @returns
742
+ *
743
+ * @category Animation
722
744
  */
723
745
  const animate = (operationData) => {
724
746
  const { selectedElement, animationEasing, animationProperties, animationDuration } = operationData;
@@ -743,6 +765,8 @@ const animate = (operationData) => {
743
765
  * This operation adds the specified class name to the specified selected element and assumes that this
744
766
  * class triggers and animation on the selected element. It then waits for this animation to complete
745
767
  * before it resolves.
768
+ *
769
+ * @category Animation
746
770
  */
747
771
  const animateWithClass = (operationData) => {
748
772
  let { selectedElement, className, removeClass: removeClass$2 } = operationData;
@@ -761,6 +785,33 @@ const animateWithClass = (operationData) => {
761
785
  return promise;
762
786
  };
763
787
 
788
+ //#endregion
789
+ //#region src/operation/announce-to-screen-reader.ts
790
+ /**
791
+ * Announces a message to screen readers using an ARIA live region.
792
+ *
793
+ * @category Accessibility
794
+ */
795
+ const announceToScreenReader = (operationData) => {
796
+ const { message, priority = "polite" } = operationData;
797
+ if (!message || message.trim() === "") throw new Error("announceToScreenReader: message is required");
798
+ let liveRegion = document.getElementById("aria-live-region");
799
+ if (!liveRegion) {
800
+ liveRegion = document.createElement("div");
801
+ liveRegion.id = "aria-live-region";
802
+ liveRegion.setAttribute("aria-live", priority);
803
+ liveRegion.style.position = "absolute";
804
+ liveRegion.style.left = "-10000px";
805
+ liveRegion.style.width = "1px";
806
+ liveRegion.style.height = "1px";
807
+ liveRegion.style.overflow = "hidden";
808
+ document.body.appendChild(liveRegion);
809
+ } else liveRegion.setAttribute("aria-live", priority);
810
+ liveRegion.textContent = message;
811
+ removeProperties(operationData, "message", "priority");
812
+ return operationData;
813
+ };
814
+
764
815
  //#endregion
765
816
  //#region src/operation/break-for-each.ts
766
817
  /**
@@ -768,6 +819,7 @@ const animateWithClass = (operationData) => {
768
819
  * This operation should only be used within a loop, so between a {@link forEach} and {@link endForEach}
769
820
  * operation. This operation immediately moves to the loop end index, effectively stopping the loop.
770
821
  *
822
+ * @category Control Flow
771
823
  */
772
824
  const breakForEach = function(operationData) {
773
825
  if (this.loopIndex !== void 0 && this.loopLength !== void 0) {
@@ -794,6 +846,8 @@ function resolveEventArguments(operationData, operationScope, eventArgs) {
794
846
  /**
795
847
  * This operation broadcasts the given event through the eventbus, along with the
796
848
  * event arguments and optional event topic.
849
+ *
850
+ * @category Utility
797
851
  */
798
852
  const broadcastEvent = function(operationData) {
799
853
  const { eventArgs, eventTopic, eventName } = operationData;
@@ -850,6 +904,8 @@ const calcFunctions = {
850
904
  * This operation calculates the given left and right hand operands using the specified operator.
851
905
  *
852
906
  * @param operationData
907
+ *
908
+ * @category Utility
853
909
  */
854
910
  const calc = function(operationData) {
855
911
  operationData = resolvePropertyValues(operationData, this, operationData);
@@ -864,6 +920,7 @@ const calc = function(operationData) {
864
920
  /**
865
921
  * This operation removes all of the children from the given selected element.
866
922
  *
923
+ * @category DOM
867
924
  */
868
925
  const clearElement = (operationData) => {
869
926
  const { selectedElement } = operationData;
@@ -877,6 +934,7 @@ const clearElement = (operationData) => {
877
934
  * This operation removes all of the properties on the current operation date.
878
935
  * Or, if the `properties` property is set only removes the properties defined by that list.
879
936
  *
937
+ * @category Data
880
938
  */
881
939
  const clearOperationData = (operationData) => {
882
940
  const { properties } = operationData;
@@ -890,6 +948,93 @@ const clearOperationData = (operationData) => {
890
948
  return {};
891
949
  };
892
950
 
951
+ //#endregion
952
+ //#region src/operation/clear-storage.ts
953
+ /**
954
+ * Clears data from browser storage (localStorage or sessionStorage).
955
+ *
956
+ * If `key` is provided, removes only that key. If `key` is omitted, clears all storage.
957
+ *
958
+ * @returns Operation data with storage properties erased
959
+ *
960
+ * @example
961
+ * ```typescript
962
+ * // Clear specific key
963
+ * const result = clearStorage({
964
+ * key: 'user-settings',
965
+ * storageType: 'local'
966
+ * });
967
+ * ```
968
+ *
969
+ * @example
970
+ * ```typescript
971
+ * // Clear all localStorage
972
+ * const result = clearStorage({
973
+ * storageType: 'local'
974
+ * });
975
+ * ```
976
+ *
977
+ * @category Data
978
+ */
979
+ const clearStorage = (operationData) => {
980
+ const { key, storageType } = operationData;
981
+ const storage = storageType === "session" ? sessionStorage : localStorage;
982
+ if (key && key.trim() !== "") storage.removeItem(key);
983
+ else storage.clear();
984
+ removeProperties(operationData, "key", "storageType");
985
+ return operationData;
986
+ };
987
+
988
+ //#endregion
989
+ //#region src/operation/compare-date.ts
990
+ /**
991
+ * Compares two dates.
992
+ * comparison: -1 (before), 0 (equal), 1 (after)
993
+ *
994
+ * @category Date
995
+ */
996
+ const compareDate = (operationData) => {
997
+ const { date1, date2 } = operationData;
998
+ if (!date1 || !date2) throw new Error("compareDate: both dates are required");
999
+ const dateObj1 = date1 instanceof Date ? date1 : new Date(date1);
1000
+ const dateObj2 = date2 instanceof Date ? date2 : new Date(date2);
1001
+ if (Number.isNaN(dateObj1.getTime()) || Number.isNaN(dateObj2.getTime())) throw new Error("compareDate: invalid date");
1002
+ const time1 = dateObj1.getTime();
1003
+ const time2 = dateObj2.getTime();
1004
+ operationData.comparison = time1 < time2 ? -1 : time1 > time2 ? 1 : 0;
1005
+ operationData.isEqual = time1 === time2;
1006
+ operationData.isBefore = time1 < time2;
1007
+ operationData.isAfter = time1 > time2;
1008
+ removeProperties(operationData, "date1", "date2");
1009
+ return operationData;
1010
+ };
1011
+
1012
+ //#endregion
1013
+ //#region src/operation/concatenate-strings.ts
1014
+ /**
1015
+ * Concatenates multiple strings with an optional separator.
1016
+ *
1017
+ * @returns Operation data with `result` containing the concatenated string
1018
+ *
1019
+ * @example
1020
+ * ```typescript
1021
+ * const result = concatenateStrings({
1022
+ * strings: ['Hello', 'World'],
1023
+ * separator: ' '
1024
+ * });
1025
+ * // result.result = "Hello World"
1026
+ * ```
1027
+ *
1028
+ * @category String
1029
+ */
1030
+ const concatenateStrings = (operationData) => {
1031
+ const { strings, separator = "" } = operationData;
1032
+ if (!Array.isArray(strings)) throw new Error("concatenateStrings: strings must be an array");
1033
+ operationData.result = strings.join(separator);
1034
+ removeProperties(operationData, "strings", "separator");
1035
+ return operationData;
1036
+ };
1037
+
893
1038
  //#endregion
894
1039
  //#region src/operation/continue-for-each.ts
895
1040
  /**
@@ -898,6 +1043,7 @@ const clearOperationData = (operationData) => {
898
1043
  * operation. This operation immediately moves to the next loop index, effectively canceling the rest
899
1044
  * of the operations in the current iteration.
900
1045
  *
1046
+ * @category Control Flow
901
1047
  */
902
1048
  const continueForEach = function(operationData) {
903
1049
  if (this.loopIndex !== void 0 && this.loopLength !== void 0) {
@@ -915,6 +1061,7 @@ const continueForEach = function(operationData) {
915
1061
  *
916
1062
  * @param operationData
917
1063
  * @returns
1064
+ * @category DOM
918
1065
  */
919
1066
  const createElement = function(operationData) {
920
1067
  operationData = resolvePropertyValues(operationData, this, operationData);
@@ -925,90 +1072,6 @@ const createElement = function(operationData) {
925
1072
  return operationData;
926
1073
  };
927
1074
 
928
- //#endregion
929
- //#region src/timeline-event-names.ts
930
- /**
931
- * These are the event names that are being broadcast and/or handled by Eligius.
932
- */
933
- var TimelineEventNames = class {
934
- /**
935
- * Broadcasting this event will start the current timeline when it is currently paused, or pauses when it is playing.
936
- */
937
- static PLAY_TOGGLE_REQUEST = "timeline-play-toggle-request";
938
- /**
939
- * Broadcasting this event will start the current timeline.
940
- */
941
- static PLAY_REQUEST = "timeline-play-request";
942
- /**
943
- * Broadcasting this event will stop the current timeline.
944
- */
945
- static STOP_REQUEST = "timeline-stop-request";
946
- /**
947
- * Broadcasting this event will pause the current timeline.
948
- */
949
- static PAUSE_REQUEST = "timeline-pause-request";
950
- /**
951
- * Broadcasting this event will seek the specified position in the current timeline.
952
- * This event takes one argument: A numeric value that represents the new position.
953
- */
954
- static SEEK_REQUEST = "timeline-seek-request";
955
- /**
956
- * Broadcasting this event will tell the current {@link ITimelineProvider} to resize.
957
- */
958
- static RESIZE_REQUEST = "timeline-resize-request";
959
- /**
960
- * Broadcasting this event will return the element in which the current timeline is being rendered.
961
- * This event takes one argument: The callback function that will return the specified element.
962
- */
963
- static CONTAINER_REQUEST = "timeline-container-request";
964
- /**
965
- * Broadcasting this event will return the duration of the current timeline.
966
- * This event takes one argument: The callback function that will return the duration.
967
- */
968
- static DURATION_REQUEST = "timeline-duration-request";
969
- /**
970
- * Broadcasting this event will return the uri of the current timeline.
971
- * This event takes one argument: The callback function that will return the uri.
972
- */
973
- static REQUEST_CURRENT_TIMELINE = "timeline-request-current-timeline";
974
- /**
975
- * This event is broadcast by {@link ITimelineProvider} instances to announce their duration.
976
- */
977
- static DURATION = "timeline-duration";
978
- /**
979
- * This event is broadcast by {@link ITimelineProvider} instances to announce the current play position whenever it changes.
980
- */
981
- static TIME = "timeline-time";
982
- /**
983
- * This event is broadcast by {@link ITimelineProvider} instances to announce the new play position and duration after a seek was executed.
984
- */
985
- static SEEKED = "timeline-seeked";
986
- /**
987
- *
988
- */
989
- static COMPLETE = "timeline-complete";
990
- static RESTART = "timeline-restart";
991
- static PLAY = "timeline-play";
992
- static STOP = "timeline-stop";
993
- static PAUSE = "timeline-pause";
994
- static SEEK = "timeline-seek";
995
- static RESIZE = "timeline-resize";
996
- static CURRENT_TIMELINE_CHANGE = "timeline-current-timeline-change";
997
- static FIRST_FRAME = "timeline-firstframe";
998
- static REQUEST_INSTANCE = "request-instance";
999
- static REQUEST_ACTION = "request-action";
1000
- static REQUEST_FUNCTION = "request-function";
1001
- static REQUEST_TIMELINE_URI = "request-timeline-uri";
1002
- static BEFORE_REQUEST_TIMELINE_URI = "before-request-timeline-uri";
1003
- static REQUEST_ENGINE_ROOT = "request-engine-root";
1004
- static REQUEST_CURRENT_TIMELINE_POSITION = "request-current-timeline-position";
1005
- static REQUEST_TIMELINE_CLEANUP = "request-timeline-cleanup";
1006
- static REQUEST_LABEL_COLLECTION = "request-label-collection";
1007
- static REQUEST_LABEL_COLLECTIONS = "request-label-collections";
1008
- static REQUEST_CURRENT_LANGUAGE = "request-current-language";
1009
- static LANGUAGE_CHANGE = "language-change";
1010
- };
1011
-
1012
1075
  //#endregion
1013
1076
  //#region src/operation/custom-function.ts
1014
1077
  /**
@@ -1016,7 +1079,8 @@ var TimelineEventNames = class {
1016
1079
  * and invokes it with the current operation data and eventbus.
1017
1080
  *
1018
1081
  * @param operationData
1019
- * @returns
1082
+ *
1083
+ * @category Utility
1020
1084
  */
1021
1085
  const customFunction = function(operationData) {
1022
1086
  const { systemName } = operationData;
@@ -1029,7 +1093,7 @@ const customFunction = function(operationData) {
1029
1093
  }, reject);
1030
1094
  else internalResolve(resolve, {}, operationData);
1031
1095
  };
1032
- this.eventbus.broadcast(TimelineEventNames.REQUEST_FUNCTION, [systemName, resultCallback]);
1096
+ this.eventbus.broadcast("request-function", [systemName, resultCallback]);
1033
1097
  });
1034
1098
  };
1035
1099
 
@@ -1041,6 +1105,8 @@ const customFunction = function(operationData) {
1041
1105
  * The action operation data is first merged with the current operation data before it is
1042
1106
  * passed on to the action. After the action has completed the action operation data properties
1043
1107
  * are removed from the current operation data.
1108
+ *
1109
+ * @category Action
1044
1110
  */
1045
1111
  const endAction = (operationData) => {
1046
1112
  let { actionOperationData,...newOperationData } = operationData;
@@ -1059,6 +1125,8 @@ const endAction = (operationData) => {
1059
1125
  //#region src/operation/end-for-each.ts
1060
1126
  /**
1061
1127
  * This operation checks if the current loop should end or start the next iteration.
1128
+ *
1129
+ * @category Control Flow
1062
1130
  */
1063
1131
  const endForEach = function(operationData) {
1064
1132
  if (this.loopIndex !== void 0 && this.loopLength !== void 0 && this.loopIndex < this.loopLength) {
@@ -1073,6 +1141,8 @@ const endForEach = function(operationData) {
1073
1141
  //#region src/operation/end-when.ts
1074
1142
  /**
1075
1143
  * This operation cleans up after the {@link when}/{@link otherwise}/{@link endWhen} control flow ends.
1144
+ *
1145
+ * @category Control Flow
1076
1146
  */
1077
1147
  const endWhen = function(operationData) {
1078
1148
  delete this.whenEvaluation;
@@ -1083,6 +1153,8 @@ const endWhen = function(operationData) {
1083
1153
  //#region src/operation/extend-controller.ts
1084
1154
  /**
1085
1155
  * Extends the current controller with given extension.
1156
+ *
1157
+ * @category Controller
1086
1158
  */
1087
1159
  const extendController = (operationData) => {
1088
1160
  const { controllerInstance, controllerExtension } = operationData;
@@ -1091,10 +1163,218 @@ const extendController = (operationData) => {
1091
1163
  return operationData;
1092
1164
  };
1093
1165
 
1166
+ //#endregion
1167
+ //#region src/operation/filter-array.ts
1168
+ /**
1169
+ * Filters an array based on property equality or custom predicate function.
1170
+ *
1171
+ * Operates on arrayData passed from previous operations.
1172
+ * Supports two filtering modes:
1173
+ * 1. Property equality: `filterProperty` and `filterValue` to filter by property match
1174
+ * 2. Custom predicate: `filterPredicate` function for complex filtering logic
1175
+ *
1176
+ * @returns Operation data with `filteredArray` containing filtered results
1177
+ *
1178
+ * @example
1179
+ * ```typescript
1180
+ * // Filter by property equality
1181
+ * const result = filterArray({
1182
+ * arrayData: [{name: 'Alice', age: 25}, {name: 'Bob', age: 30}],
1183
+ * filterProperty: 'age',
1184
+ * filterValue: 25
1185
+ * });
1186
+ * // result.filteredArray = [{name: 'Alice', age: 25}]
1187
+ * ```
1188
+ *
1189
+ * @example
1190
+ * ```typescript
1191
+ * // Filter with custom predicate
1192
+ * const result = filterArray({
1193
+ * arrayData: [1, 2, 3, 4, 5],
1194
+ * filterPredicate: (item) => item % 2 === 0
1195
+ * });
1196
+ * // result.filteredArray = [2, 4]
1197
+ * ```
1198
+ *
1199
+ * @category Array
1200
+ */
1201
+ const filterArray = (operationData) => {
1202
+ const { arrayData, filterProperty, filterValue, filterPredicate } = operationData;
1203
+ if (!Array.isArray(arrayData)) throw new Error("filterArray: arrayData is required and must be an array");
1204
+ if (!filterPredicate && (!filterProperty || filterValue === void 0)) throw new Error("filterArray: filterProperty/filterValue or filterPredicate is required");
1205
+ let filtered;
1206
+ if (filterPredicate) filtered = arrayData.filter(filterPredicate);
1207
+ else filtered = arrayData.filter((item) => {
1208
+ if (typeof item === "object" && item !== null) return item[filterProperty] === filterValue;
1209
+ return false;
1210
+ });
1211
+ operationData.filteredArray = filtered;
1212
+ removeProperties(operationData, "filterProperty", "filterValue", "filterPredicate");
1213
+ return operationData;
1214
+ };
1215
+
1216
+ //#endregion
1217
+ //#region src/operation/find-in-array.ts
1218
+ /**
1219
+ * Finds the first element in an array matching criteria.
1220
+ *
1221
+ * Operates on arrayData passed from previous operations.
1222
+ * Supports two search modes:
1223
+ * 1. Property equality: `findProperty` and `findValue` to find by property match
1224
+ * 2. Custom predicate: `findPredicate` function for complex search logic
1225
+ *
1226
+ * Returns `undefined` for `foundItem` and `-1` for `foundIndex` if no match found.
1227
+ *
1228
+ * @returns Operation data with `foundItem` (the matching element) and `foundIndex` (its position)
1229
+ *
1230
+ * @example
1231
+ * ```typescript
1232
+ * // Find by property equality
1233
+ * const result = findInArray({
1234
+ * arrayData: [{id: 1, name: 'Alice'}, {id: 2, name: 'Bob'}],
1235
+ * findProperty: 'id',
1236
+ * findValue: 2
1237
+ * });
1238
+ * // result.foundItem = {id: 2, name: 'Bob'}
1239
+ * // result.foundIndex = 1
1240
+ * ```
1241
+ *
1242
+ * @example
1243
+ * ```typescript
1244
+ * // Find with custom predicate
1245
+ * const result = findInArray({
1246
+ * arrayData: [10, 25, 30, 45],
1247
+ * findPredicate: (item) => item > 30
1248
+ * });
1249
+ * // result.foundItem = 45
1250
+ * // result.foundIndex = 3
1251
+ * ```
1252
+ *
1253
+ * @category Array
1254
+ */
1255
+ const findInArray = (operationData) => {
1256
+ const { arrayData, findProperty, findValue, findPredicate } = operationData;
1257
+ if (!Array.isArray(arrayData)) throw new Error("findInArray: arrayData is required and must be an array");
1258
+ if (!findPredicate && (!findProperty || findValue === void 0)) throw new Error("findInArray: findProperty/findValue or findPredicate is required");
1259
+ let foundItem;
1260
+ let foundIndex = -1;
1261
+ if (findPredicate) {
1262
+ foundIndex = arrayData.findIndex(findPredicate);
1263
+ foundItem = foundIndex !== -1 ? arrayData[foundIndex] : void 0;
1264
+ } else {
1265
+ foundIndex = arrayData.findIndex((item) => {
1266
+ if (typeof item === "object" && item !== null) return item[findProperty] === findValue;
1267
+ return item === findValue;
1268
+ });
1269
+ foundItem = foundIndex !== -1 ? arrayData[foundIndex] : void 0;
1270
+ }
1271
+ operationData.foundItem = foundItem;
1272
+ operationData.foundIndex = foundIndex;
1273
+ removeProperties(operationData, "findProperty", "findValue", "findPredicate");
1274
+ return operationData;
1275
+ };
1276
+
1277
+ //#endregion
1278
+ //#region src/operation/format-date.ts
1279
+ /**
1280
+ * Formats a date using Intl.DateTimeFormat or simple patterns.
1281
+ *
1282
+ * @category Date
1283
+ */
1284
+ const formatDate = (operationData) => {
1285
+ const { date, format } = operationData;
1286
+ if (!date) throw new Error("formatDate: date is required");
1287
+ const dateObj = date instanceof Date ? date : new Date(date);
1288
+ if (Number.isNaN(dateObj.getTime())) throw new Error("formatDate: invalid date");
1289
+ const year = dateObj.getFullYear();
1290
+ const month = String(dateObj.getMonth() + 1).padStart(2, "0");
1291
+ const day = String(dateObj.getDate()).padStart(2, "0");
1292
+ const hours = String(dateObj.getHours()).padStart(2, "0");
1293
+ const minutes = String(dateObj.getMinutes()).padStart(2, "0");
1294
+ const seconds = String(dateObj.getSeconds()).padStart(2, "0");
1295
+ let formatted = format;
1296
+ formatted = formatted.replace("YYYY", String(year));
1297
+ formatted = formatted.replace("MM", month);
1298
+ formatted = formatted.replace("DD", day);
1299
+ formatted = formatted.replace("HH", hours);
1300
+ formatted = formatted.replace("mm", minutes);
1301
+ formatted = formatted.replace("ss", seconds);
1302
+ operationData.formattedDate = formatted;
1303
+ removeProperties(operationData, "format");
1304
+ return operationData;
1305
+ };
1306
+
1307
+ //#endregion
1308
+ //#region src/operation/format-text.ts
1309
+ /**
1310
+ * Transforms text using format operations: uppercase, lowercase, capitalize, titlecase, or trim.
1311
+ *
1312
+ * Operates on textContent passed from previous operations (e.g., getTextContent).
1313
+ *
1314
+ * Transformations:
1315
+ * - `uppercase`: Convert all characters to uppercase
1316
+ * - `lowercase`: Convert all characters to lowercase
1317
+ * - `capitalize`: Capitalize only the first letter
1318
+ * - `titlecase`: Capitalize first letter of each word
1319
+ * - `trim`: Remove leading and trailing whitespace
1320
+ *
1321
+ * @returns Operation data with `formattedText` containing the transformed text
1322
+ *
1323
+ * @example
1324
+ * ```typescript
1325
+ * // Convert to uppercase
1326
+ * const result = formatText({
1327
+ * textContent: 'hello',
1328
+ * transformation: 'uppercase'
1329
+ * });
1330
+ * // result.formattedText = "HELLO"
1331
+ * ```
1332
+ *
1333
+ * @example
1334
+ * ```typescript
1335
+ * // Title case
1336
+ * const result = formatText({
1337
+ * textContent: 'hello world',
1338
+ * transformation: 'titlecase'
1339
+ * });
1340
+ * // result.formattedText = "Hello World"
1341
+ * ```
1342
+ *
1343
+ * @category Text
1344
+ */
1345
+ const formatText = (operationData) => {
1346
+ const { textContent, transformation } = operationData;
1347
+ if (textContent === void 0 || textContent === null) throw new Error("formatText: textContent is required");
1348
+ let text = textContent;
1349
+ switch (transformation) {
1350
+ case "uppercase":
1351
+ text = text.toUpperCase();
1352
+ break;
1353
+ case "lowercase":
1354
+ text = text.toLowerCase();
1355
+ break;
1356
+ case "capitalize":
1357
+ text = text.charAt(0).toUpperCase() + text.slice(1);
1358
+ break;
1359
+ case "titlecase":
1360
+ text = text.replace(/\b\w/g, (char) => char.toUpperCase());
1361
+ break;
1362
+ case "trim":
1363
+ text = text.trim();
1364
+ break;
1365
+ default: throw new Error(`formatText: unknown transformation type "${transformation}"`);
1366
+ }
1367
+ operationData.formattedText = text;
1368
+ removeProperties(operationData, "transformation");
1369
+ return operationData;
1370
+ };
1371
+
1094
1372
  //#endregion
1095
1373
  //#region src/operation/get-attributes-from-element.ts
1096
1374
  /**
1097
1375
  * This operation retrieves the values for the specified attribute names from the given selected element.
1376
+ *
1377
+ * @category DOM
1098
1378
  */
1099
1379
  const getAttributesFromElement = (operationData) => {
1100
1380
  const { selectedElement, attributeNames } = operationData;
@@ -1114,6 +1394,8 @@ const getAttributesFromElement = (operationData) => {
1114
1394
  *
1115
1395
  * @param operationData
1116
1396
  * @returns
1397
+ *
1398
+ * @category Controller
1117
1399
  */
1118
1400
  const getControllerFromElement = (operationData) => {
1119
1401
  const { selectedElement, controllerName } = operationData;
@@ -1129,6 +1411,8 @@ const getControllerFromElement = (operationData) => {
1129
1411
  /**
1130
1412
  * This operation retrieves an instance of the given controller name.
1131
1413
  * It assigns this instance to the `controllerInstance` property on the current operation data
1414
+ *
1415
+ * @category Controller
1132
1416
  */
1133
1417
  const getControllerInstance = function(operationData) {
1134
1418
  const { systemName } = operationData;
@@ -1137,7 +1421,21 @@ const getControllerInstance = function(operationData) {
1137
1421
  const resultCallback = (instance) => {
1138
1422
  operationData.controllerInstance = instance;
1139
1423
  };
1140
- this.eventbus.broadcast(TimelineEventNames.REQUEST_INSTANCE, [systemName, resultCallback]);
1424
+ this.eventbus.broadcast("request-instance", [systemName, resultCallback]);
1425
+ return operationData;
1426
+ };
1427
+
1428
+ //#endregion
1429
+ //#region src/operation/get-current-time.ts
1430
+ /**
1431
+ * Gets the current time as timestamp and Date object.
1432
+ *
1433
+ * @category Date
1434
+ */
1435
+ const getCurrentTime = (operationData) => {
1436
+ const now = /* @__PURE__ */ new Date();
1437
+ operationData.timestamp = now.getTime();
1438
+ operationData.date = now;
1141
1439
  return operationData;
1142
1440
  };
1143
1441
 
@@ -1276,6 +1574,8 @@ function modifyDimensions(dimensions, modifier) {
1276
1574
  *
1277
1575
  * For example, this modifier '+100h|w[ar=8-1]' will modifiy the dimensions like this:
1278
1576
  * it will add a value of 100 to the height and modify the width by a ratio of 8 to 1 relative to the height.
1577
+ *
1578
+ * @category DOM
1279
1579
  */
1280
1580
  const getElementDimensions = (operationData) => {
1281
1581
  const { selectedElement, modifier } = operationData;
@@ -1290,6 +1590,52 @@ const getElementDimensions = (operationData) => {
1290
1590
  return operationData;
1291
1591
  };
1292
1592
 
1593
+ //#endregion
1594
+ //#region src/operation/get-focused-element.ts
1595
+ /**
1596
+ * Gets the currently focused element.
1597
+ *
1598
+ * @category Focus
1599
+ */
1600
+ const getFocusedElement = (operationData) => {
1601
+ operationData.focusedElement = document.activeElement ? $(document.activeElement) : $();
1602
+ return operationData;
1603
+ };
1604
+
1605
+ //#endregion
1606
+ //#region src/operation/get-form-data.ts
1607
+ /**
1608
+ * Extracts all input, select, and textarea values from form element into operation data.
1609
+ *
1610
+ * This operation reads form field values and returns them as an object with field names as keys.
1611
+ * Only processes form elements that are enabled and not hidden. Handles checkboxes, radio buttons,
1612
+ * select elements, textareas, and text inputs.
1613
+ *
1614
+ * @returns Operation data with `formData` object containing field values
1615
+ *
1616
+ * @example
1617
+ * ```typescript
1618
+ * // Given a form with fields: name="John", email="john@example.com"
1619
+ * const result = getFormData({selectedElement: $form});
1620
+ * // Returns: {selectedElement: $form, formData: {name: "John", email: "john@example.com"}}
1621
+ * ```
1622
+ *
1623
+ * @category Form
1624
+ */
1625
+ const getFormData = (operationData) => {
1626
+ const { selectedElement } = operationData;
1627
+ if (!selectedElement || selectedElement.length === 0) throw new Error("getFormData: selectedElement is required");
1628
+ if (!selectedElement.is("form")) throw new Error("getFormData: selectedElement must be a form element");
1629
+ const formArray = selectedElement.serializeArray();
1630
+ const formData = {};
1631
+ for (const field of formArray) if (formData[field.name] !== void 0) {
1632
+ if (!Array.isArray(formData[field.name])) formData[field.name] = [formData[field.name]];
1633
+ formData[field.name].push(field.value);
1634
+ } else formData[field.name] = field.value;
1635
+ operationData.formData = formData;
1636
+ return operationData;
1637
+ };
1638
+
1293
1639
  //#endregion
1294
1640
  //#region src/operation/get-import.ts
1295
1641
  /**
@@ -1297,7 +1643,8 @@ const getElementDimensions = (operationData) => {
1297
1643
  * assigns it to the `importedInstance` property on the current operaton date.
1298
1644
  *
1299
1645
  * @param operationData
1300
- * @returns
1646
+ *
1647
+ * @category Utility
1301
1648
  */
1302
1649
  const getImport = function(operationData) {
1303
1650
  const { systemName } = operationData;
@@ -1305,7 +1652,7 @@ const getImport = function(operationData) {
1305
1652
  const callBack = (instance) => {
1306
1653
  operationData.importedInstance = instance;
1307
1654
  };
1308
- this.eventbus.broadcast(TimelineEventNames.REQUEST_FUNCTION, [systemName, callBack]);
1655
+ this.eventbus.broadcast("request-function", [systemName, callBack]);
1309
1656
  delete operationData.systemName;
1310
1657
  return operationData;
1311
1658
  };
@@ -1315,6 +1662,8 @@ const getImport = function(operationData) {
1315
1662
  /**
1316
1663
  * This operation retrieves the current query parameters from the browser's address bar and places
1317
1664
  * them on the returned operation data.
1665
+ *
1666
+ * @category Utility
1318
1667
  */
1319
1668
  const getQueryParams = (operationData) => {
1320
1669
  const searchParams = new URLSearchParams(window.location.search);
@@ -1329,54 +1678,309 @@ const getQueryParams = (operationData) => {
1329
1678
  };
1330
1679
 
1331
1680
  //#endregion
1332
- //#region src/operation/invoke-object-method.ts
1681
+ //#region src/operation/get-scroll-position.ts
1333
1682
  /**
1334
- * This operation invokes the specified method on the given object with the given optional arguments
1335
- * and assigns the result to the `methodResult` operationdata property.
1683
+ * Gets the current scroll position of the viewport.
1336
1684
  *
1337
- * @param operationData
1338
- * @returns
1685
+ * Returns x (horizontal) and y (vertical) scroll positions in pixels.
1686
+ * Uses cross-browser compatible methods to retrieve scroll position.
1687
+ *
1688
+ * @returns Operation data with `scrollX` and `scrollY` values
1689
+ *
1690
+ * @example
1691
+ * ```typescript
1692
+ * // Get current scroll position
1693
+ * const result = getScrollPosition({});
1694
+ * // result.scrollX = 150
1695
+ * // result.scrollY = 400
1696
+ * ```
1697
+ *
1698
+ * @category Scroll
1339
1699
  */
1340
- const invokeObjectMethod = (operationData) => {
1341
- const { methodName, methodArguments,...newOperationData } = operationData;
1342
- delete operationData.methodName;
1343
- delete operationData.methodArguments;
1344
- const func = operationData.instance[methodName];
1345
- if (typeof func === "function") newOperationData.methodResult = func.apply(operationData.instance, methodArguments ?? []);
1346
- else console.error(`The given member name ${methodName} is not a function`);
1347
- return newOperationData;
1700
+ const getScrollPosition = (operationData) => {
1701
+ const scrollX = window.pageXOffset !== void 0 ? window.pageXOffset : window.scrollX !== void 0 ? window.scrollX : document.documentElement?.scrollLeft || 0;
1702
+ const scrollY = window.pageYOffset !== void 0 ? window.pageYOffset : window.scrollY !== void 0 ? window.scrollY : document.documentElement?.scrollTop || 0;
1703
+ operationData.scrollX = scrollX;
1704
+ operationData.scrollY = scrollY;
1705
+ return operationData;
1348
1706
  };
1349
1707
 
1350
1708
  //#endregion
1351
- //#region src/operation/load-json.ts
1352
- const jsonCache = {};
1353
- const addToCache = (key, value) => {
1354
- jsonCache[key] = value;
1709
+ //#region src/operation/get-text-content.ts
1710
+ /**
1711
+ * Extracts text content from element, stripping all HTML markup.
1712
+ *
1713
+ * Uses jQuery's `.text()` method which is XSS-safe and returns only the text content
1714
+ * without any HTML tags. Preserves whitespace and text from nested elements.
1715
+ *
1716
+ * @returns Operation data with `textContent` containing the extracted plain text
1717
+ *
1718
+ * @example
1719
+ * ```typescript
1720
+ * // Extract text from element with HTML
1721
+ * const result = getTextContent({selectedElement: $div});
1722
+ * // Given: <div>Hello <strong>World</strong>!</div>
1723
+ * // Returns: {textContent: "Hello World!"}
1724
+ * ```
1725
+ *
1726
+ * @category Text
1727
+ */
1728
+ const getTextContent = (operationData) => {
1729
+ const { selectedElement } = operationData;
1730
+ if (!selectedElement || selectedElement.length === 0) throw new Error("getTextContent: selectedElement is required");
1731
+ operationData.textContent = selectedElement.text();
1732
+ return operationData;
1355
1733
  };
1734
+
1735
+ //#endregion
1736
+ //#region src/operation/http-delete.ts
1356
1737
  /**
1357
- * This operation loads a JSON file from the specified url and assigns it to the json
1358
- * property on the current operation data.
1738
+ * Performs an HTTP DELETE request to the specified URL.
1359
1739
  *
1360
- * If the cache property is set to true and a cached value already exists, this is assigned
1361
- * instead of re-retrieving it from the url.
1740
+ * @returns Operation data with `response` (parsed JSON or empty) and `status` (HTTP status code)
1741
+ *
1742
+ * @example
1743
+ * ```typescript
1744
+ * const result = await httpDelete({
1745
+ * url: 'https://api.example.com/users/123',
1746
+ * headers: { 'Authorization': 'Bearer token' }
1747
+ * });
1748
+ * // result.response = {} or null
1749
+ * // result.status = 204
1750
+ * ```
1751
+ *
1752
+ * @category HTTP
1362
1753
  */
1363
- const loadJson = async (operationData) => {
1364
- const { url, cache: cache$2 } = operationData;
1365
- removeProperties(operationData, "url", "cache");
1366
- if (cache$2 && jsonCache[url]) {
1367
- operationData.json = jsonCache[url];
1754
+ const httpDelete = async (operationData) => {
1755
+ const { url, headers = {} } = operationData;
1756
+ if (!url || url.trim() === "") throw new Error("httpDelete: url is required");
1757
+ try {
1758
+ const response = await fetch(url, {
1759
+ method: "DELETE",
1760
+ headers
1761
+ });
1762
+ operationData.status = response.status;
1763
+ if (!response.ok) throw new Error(`httpDelete: HTTP error ${response.status} ${response.statusText}`);
1764
+ if (response.headers.get("content-type")?.includes("application/json")) operationData.response = await response.json();
1765
+ else operationData.response = null;
1766
+ removeProperties(operationData, "url", "headers");
1368
1767
  return operationData;
1768
+ } catch (error) {
1769
+ throw new Error(`httpDelete: ${error.message}`);
1369
1770
  }
1370
- const cacheValue = operationData.json = await (await fetch(url)).json();
1371
- if (cache$2) addToCache(url, cacheValue);
1372
- return operationData;
1373
1771
  };
1374
1772
 
1375
1773
  //#endregion
1376
- //#region src/operation/log.ts
1774
+ //#region src/operation/http-post.ts
1377
1775
  /**
1378
- * This operation logs the specified value, or, when no logValue property has been assigned
1379
- * it will log the current operation data, global data and scope to the console
1776
+ * Performs an HTTP POST request to the specified URL.
1777
+ *
1778
+ * @returns Operation data with `response` (parsed JSON) and `status` (HTTP status code)
1779
+ *
1780
+ * @example
1781
+ * ```typescript
1782
+ * const result = await httpPost({
1783
+ * url: 'https://api.example.com/users',
1784
+ * body: { name: 'John', email: 'john@example.com' },
1785
+ * headers: { 'Content-Type': 'application/json' }
1786
+ * });
1787
+ * // result.response = { id: 123, name: 'John', ... }
1788
+ * // result.status = 201
1789
+ * ```
1790
+ *
1791
+ * @category HTTP
1792
+ */
1793
+ const httpPost = async (operationData) => {
1794
+ const { url, body, headers = {} } = operationData;
1795
+ if (!url || url.trim() === "") throw new Error("httpPost: url is required");
1796
+ try {
1797
+ const response = await fetch(url, {
1798
+ method: "POST",
1799
+ headers: {
1800
+ "Content-Type": "application/json",
1801
+ ...headers
1802
+ },
1803
+ body: JSON.stringify(body)
1804
+ });
1805
+ operationData.status = response.status;
1806
+ if (!response.ok) throw new Error(`httpPost: HTTP error ${response.status} ${response.statusText}`);
1807
+ operationData.response = await response.json();
1808
+ removeProperties(operationData, "url", "body", "headers");
1809
+ return operationData;
1810
+ } catch (error) {
1811
+ throw new Error(`httpPost: ${error.message}`);
1812
+ }
1813
+ };
1814
+
1815
+ //#endregion
1816
+ //#region src/operation/http-put.ts
1817
+ /**
1818
+ * Performs an HTTP PUT request to the specified URL.
1819
+ *
1820
+ * @returns Operation data with `response` (parsed JSON) and `status` (HTTP status code)
1821
+ *
1822
+ * @example
1823
+ * ```typescript
1824
+ * const result = await httpPut({
1825
+ * url: 'https://api.example.com/users/123',
1826
+ * body: { name: 'John Updated', email: 'john.new@example.com' },
1827
+ * headers: { 'Content-Type': 'application/json' }
1828
+ * });
1829
+ * // result.response = { id: 123, name: 'John Updated', ... }
1830
+ * // result.status = 200
1831
+ * ```
1832
+ *
1833
+ * @category HTTP
1834
+ */
1835
+ const httpPut = async (operationData) => {
1836
+ const { url, body, headers = {} } = operationData;
1837
+ if (!url || url.trim() === "") throw new Error("httpPut: url is required");
1838
+ try {
1839
+ const response = await fetch(url, {
1840
+ method: "PUT",
1841
+ headers: {
1842
+ "Content-Type": "application/json",
1843
+ ...headers
1844
+ },
1845
+ body: JSON.stringify(body)
1846
+ });
1847
+ operationData.status = response.status;
1848
+ if (!response.ok) throw new Error(`httpPut: HTTP error ${response.status} ${response.statusText}`);
1849
+ operationData.response = await response.json();
1850
+ removeProperties(operationData, "url", "body", "headers");
1851
+ return operationData;
1852
+ } catch (error) {
1853
+ throw new Error(`httpPut: ${error.message}`);
1854
+ }
1855
+ };
1856
+
1857
+ //#endregion
1858
+ //#region src/operation/invoke-object-method.ts
1859
+ /**
1860
+ * This operation invokes the specified method on the given object with the given optional arguments
1861
+ * and assigns the result to the `methodResult` operationdata property.
1862
+ *
1863
+ * @param operationData
1864
+ *
1865
+ * @category Utility
1866
+ */
1867
+ const invokeObjectMethod = (operationData) => {
1868
+ const { methodName, methodArguments,...newOperationData } = operationData;
1869
+ delete operationData.methodName;
1870
+ delete operationData.methodArguments;
1871
+ const func = operationData.instance[methodName];
1872
+ if (typeof func === "function") newOperationData.methodResult = func.apply(operationData.instance, methodArguments ?? []);
1873
+ else console.error(`The given member name ${methodName} is not a function`);
1874
+ return newOperationData;
1875
+ };
1876
+
1877
+ //#endregion
1878
+ //#region src/operation/is-element-in-viewport.ts
1879
+ /**
1880
+ * Checks if an element is currently visible within the viewport.
1881
+ *
1882
+ * Uses `getBoundingClientRect()` to determine if the element is within the viewport boundaries.
1883
+ *
1884
+ * @returns Operation data with `isInViewport` boolean indicating visibility
1885
+ *
1886
+ * @example
1887
+ * ```typescript
1888
+ * // Check if element is in view
1889
+ * const result = isElementInViewport({
1890
+ * selectedElement: $targetElement
1891
+ * });
1892
+ * // result.isInViewport = true or false
1893
+ * ```
1894
+ *
1895
+ * @category DOM
1896
+ */
1897
+ const isElementInViewport = (operationData) => {
1898
+ const { selectedElement } = operationData;
1899
+ if (!selectedElement || selectedElement.length === 0) throw new Error("isElementInViewport: selectedElement is required");
1900
+ const rect = selectedElement[0].getBoundingClientRect();
1901
+ operationData.isInViewport = rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth);
1902
+ return operationData;
1903
+ };
1904
+
1905
+ //#endregion
1906
+ //#region src/operation/load-from-storage.ts
1907
+ /**
1908
+ * Loads data from browser storage (localStorage or sessionStorage).
1909
+ *
1910
+ * Deserializes the stored JSON value. Returns `null` if key doesn't exist.
1911
+ *
1912
+ * @returns Operation data with `loadedValue` containing the deserialized data
1913
+ *
1914
+ * @example
1915
+ * ```typescript
1916
+ * // Load user settings from localStorage
1917
+ * const result = loadFromStorage({
1918
+ * key: 'user-settings',
1919
+ * storageType: 'local'
1920
+ * });
1921
+ * // result.loadedValue = { theme: 'dark', language: 'en' }
1922
+ * ```
1923
+ *
1924
+ * @example
1925
+ * ```typescript
1926
+ * // Load session data
1927
+ * const result = loadFromStorage({
1928
+ * key: 'session-id',
1929
+ * storageType: 'session'
1930
+ * });
1931
+ * // result.loadedValue = 'abc123' or null if not found
1932
+ * ```
1933
+ *
1934
+ * @category Data
1935
+ */
1936
+ const loadFromStorage = (operationData) => {
1937
+ const { key, storageType } = operationData;
1938
+ if (!key || key.trim() === "") throw new Error("loadFromStorage: key is required");
1939
+ const stored = (storageType === "session" ? sessionStorage : localStorage).getItem(key);
1940
+ if (stored === null) operationData.loadedValue = null;
1941
+ else try {
1942
+ operationData.loadedValue = JSON.parse(stored);
1943
+ } catch {
1944
+ throw new Error(`loadFromStorage: failed to parse stored value for key "${key}"`);
1945
+ }
1946
+ removeProperties(operationData, "storageType");
1947
+ return operationData;
1948
+ };
1949
+
1950
+ //#endregion
1951
+ //#region src/operation/load-json.ts
1952
+ const jsonCache = {};
1953
+ const addToCache = (key, value) => {
1954
+ jsonCache[key] = value;
1955
+ };
1956
+ /**
1957
+ * This operation loads a JSON file from the specified url and assigns it to the json
1958
+ * property on the current operation data.
1959
+ *
1960
+ * If the cache property is set to true and a cached value already exists, this is assigned
1961
+ * instead of re-retrieving it from the url.
1962
+ *
1963
+ * @category Utility
1964
+ */
1965
+ const loadJson = async (operationData) => {
1966
+ const { url, cache: cache$2 } = operationData;
1967
+ removeProperties(operationData, "url", "cache");
1968
+ if (cache$2 && jsonCache[url]) {
1969
+ operationData.json = jsonCache[url];
1970
+ return operationData;
1971
+ }
1972
+ const cacheValue = operationData.json = await (await fetch(url)).json();
1973
+ if (cache$2) addToCache(url, cacheValue);
1974
+ return operationData;
1975
+ };
1976
+
1977
+ //#endregion
1978
+ //#region src/operation/log.ts
1979
+ /**
1980
+ * This operation logs the specified value, or, when no logValue property has been assigned
1981
+ * it will log the current operation data, global data and scope to the console
1982
+ *
1983
+ * @category Utility
1380
1984
  */
1381
1985
  const log = function(operationData) {
1382
1986
  if ("logValue" in operationData) {
@@ -1393,6 +1997,57 @@ const log = function(operationData) {
1393
1997
  return operationData;
1394
1998
  };
1395
1999
 
2000
+ //#endregion
2001
+ //#region src/operation/map-array.ts
2002
+ /**
2003
+ * Transforms each element of an array using a mapping function.
2004
+ *
2005
+ * Operates on arrayData passed from previous operations.
2006
+ * The mapFunction receives each item and optionally its index.
2007
+ *
2008
+ * @returns Operation data with `mappedArray` containing transformed elements
2009
+ *
2010
+ * @example
2011
+ * ```typescript
2012
+ * // Double each number
2013
+ * const result = mapArray({
2014
+ * arrayData: [1, 2, 3, 4],
2015
+ * mapFunction: (item) => item * 2
2016
+ * });
2017
+ * // result.mappedArray = [2, 4, 6, 8]
2018
+ * ```
2019
+ *
2020
+ * @example
2021
+ * ```typescript
2022
+ * // Extract property from objects
2023
+ * const result = mapArray({
2024
+ * arrayData: [{name: 'Alice', age: 25}, {name: 'Bob', age: 30}],
2025
+ * mapFunction: (item) => item.name
2026
+ * });
2027
+ * // result.mappedArray = ['Alice', 'Bob']
2028
+ * ```
2029
+ *
2030
+ * @example
2031
+ * ```typescript
2032
+ * // Use index in transformation
2033
+ * const result = mapArray({
2034
+ * arrayData: ['a', 'b', 'c'],
2035
+ * mapFunction: (item, index) => `${index}-${item}`
2036
+ * });
2037
+ * // result.mappedArray = ['0-a', '1-b', '2-c']
2038
+ * ```
2039
+ *
2040
+ * @category Array
2041
+ */
2042
+ const mapArray = (operationData) => {
2043
+ const { arrayData, mapFunction } = operationData;
2044
+ if (!Array.isArray(arrayData)) throw new Error("mapArray: arrayData is required and must be an array");
2045
+ if (typeof mapFunction !== "function") throw new Error("mapArray: mapFunction is required and must be a function");
2046
+ operationData.mappedArray = arrayData.map(mapFunction);
2047
+ removeProperties(operationData, "mapFunction");
2048
+ return operationData;
2049
+ };
2050
+
1396
2051
  //#endregion
1397
2052
  //#region src/util/guards/is-string.ts
1398
2053
  function isString(value) {
@@ -1403,6 +2058,8 @@ function isString(value) {
1403
2058
  //#region src/operation/math.ts
1404
2059
  /**
1405
2060
  * This operation performs the given math function with the specified arguments.
2061
+ *
2062
+ * @category Utility
1406
2063
  */
1407
2064
  const math = function(operationData) {
1408
2065
  operationData = resolvePropertyValues(operationData, this, operationData);
@@ -1426,6 +2083,8 @@ function isMathProperty(value) {
1426
2083
  /**
1427
2084
  * If the preceeding {@link when} operation evaluates to `true` subsequent operations will
1428
2085
  * be skipped until an {@link endWhen} operation is encountered.
2086
+ *
2087
+ * @category Control Flow
1429
2088
  */
1430
2089
  const otherwise = function(operationData) {
1431
2090
  if (this.whenEvaluation) this.newIndex = findEndWhenIndex(this);
@@ -1448,6 +2107,7 @@ function findEndWhenIndex(scope) {
1448
2107
  *
1449
2108
  * @param operationData
1450
2109
  * @returns
2110
+ * @category DOM
1451
2111
  */
1452
2112
  const removeClass = (operationData) => {
1453
2113
  const { selectedElement, className } = operationData;
@@ -1463,6 +2123,8 @@ const removeClass = (operationData) => {
1463
2123
  *
1464
2124
  * @param operationData
1465
2125
  * @returns
2126
+ *
2127
+ * @category Controller
1466
2128
  */
1467
2129
  const removeControllerFromElement = function(operationData) {
1468
2130
  const { selectedElement, controllerName } = operationData;
@@ -1481,6 +2143,8 @@ const removeControllerFromElement = function(operationData) {
1481
2143
  //#region src/operation/remove-element.ts
1482
2144
  /**
1483
2145
  * This operation removes the given selected element from the DOM.
2146
+ *
2147
+ * @category DOM
1484
2148
  */
1485
2149
  const removeElement = (operationData) => {
1486
2150
  const { selectedElement } = operationData;
@@ -1493,6 +2157,8 @@ const removeElement = (operationData) => {
1493
2157
  /**
1494
2158
  * This operation removes the given list of properties from the current operation data.
1495
2159
  * It will also remove the property `propertyNames` from the result.
2160
+ *
2161
+ * @category Data
1496
2162
  */
1497
2163
  const removePropertiesFromOperationData = (operationData) => {
1498
2164
  const { propertyNames } = operationData;
@@ -1508,6 +2174,8 @@ const removePropertiesFromOperationData = (operationData) => {
1508
2174
  *
1509
2175
  * @param operationData
1510
2176
  * @returns
2177
+ *
2178
+ * @category DOM
1511
2179
  */
1512
2180
  const reparentElement = (operationData) => {
1513
2181
  const { selectedElement, newParentSelector } = operationData;
@@ -1516,11 +2184,97 @@ const reparentElement = (operationData) => {
1516
2184
  return operationData;
1517
2185
  };
1518
2186
 
2187
+ //#endregion
2188
+ //#region src/operation/replace-string.ts
2189
+ /**
2190
+ * Replaces occurrences of a pattern in a string (alias for replaceText for string context).
2191
+ *
2192
+ * @returns Operation data with `result` containing the replaced string
2193
+ *
2194
+ * @example
2195
+ * ```typescript
2196
+ * const result = replaceString({
2197
+ * textContent: 'Hello World',
2198
+ * pattern: 'World',
2199
+ * replacement: 'Universe'
2200
+ * });
2201
+ * // result.result = "Hello Universe"
2202
+ * ```
2203
+ *
2204
+ * @category String
2205
+ */
2206
+ const replaceString = (operationData) => {
2207
+ const { textContent, pattern, replacement } = operationData;
2208
+ if (textContent === void 0 || textContent === null) throw new Error("replaceString: textContent is required");
2209
+ operationData.result = textContent.replace(pattern, replacement);
2210
+ removeProperties(operationData, "pattern", "replacement");
2211
+ return operationData;
2212
+ };
2213
+
2214
+ //#endregion
2215
+ //#region src/operation/replace-text.ts
2216
+ /**
2217
+ * Finds and replaces text using literal string or regex pattern.
2218
+ *
2219
+ * Operates on textContent passed from previous operations (e.g., getTextContent).
2220
+ * Supports regex patterns with global flag for multiple replacements.
2221
+ * Updates textContent with replaced text and sets replacementCount.
2222
+ *
2223
+ * @returns Operation data with updated `textContent` and `replacementCount` indicating number of replacements made
2224
+ *
2225
+ * @example
2226
+ * ```typescript
2227
+ * // Replace placeholder with value
2228
+ * const result = replaceText({
2229
+ * textContent: 'Hello {{name}}',
2230
+ * searchPattern: '{{name}}',
2231
+ * replacement: 'John'
2232
+ * });
2233
+ * // result.textContent = "Hello John"
2234
+ * // result.replacementCount = 1
2235
+ * ```
2236
+ *
2237
+ * @example
2238
+ * ```typescript
2239
+ * // Replace with regex pattern
2240
+ * const result = replaceText({
2241
+ * textContent: 'Test 123 and 456',
2242
+ * searchPattern: /\d+/g,
2243
+ * replacement: 'NUM'
2244
+ * });
2245
+ * // result.textContent = "Test NUM and NUM"
2246
+ * // result.replacementCount = 2
2247
+ * ```
2248
+ *
2249
+ * @category Text
2250
+ */
2251
+ const replaceText = (operationData) => {
2252
+ const { textContent, searchPattern, replacement } = operationData;
2253
+ if (textContent === void 0 || textContent === null) throw new Error("replaceText: textContent is required");
2254
+ let newText;
2255
+ let count = 0;
2256
+ if (searchPattern instanceof RegExp) {
2257
+ const matches = textContent.match(searchPattern);
2258
+ count = matches ? matches.length : 0;
2259
+ newText = textContent.replace(searchPattern, replacement);
2260
+ } else {
2261
+ const parts = textContent.split(searchPattern);
2262
+ count = parts.length - 1;
2263
+ newText = parts.join(replacement);
2264
+ }
2265
+ operationData.textContent = newText;
2266
+ operationData.replacementCount = count;
2267
+ removeProperties(operationData, "searchPattern", "replacement");
2268
+ return operationData;
2269
+ };
2270
+
1519
2271
  //#endregion
1520
2272
  //#region src/operation/request-action.ts
1521
2273
  /**
1522
2274
  * This operation requests an action instance with the specified name and assigns it
1523
2275
  * to the `actionInstance` property on the current operation data.
2276
+ *
2277
+ * @category Action
1524
2278
  */
1525
2279
  const requestAction = function(operationData) {
1526
2280
  const { systemName } = operationData;
@@ -1528,7 +2282,133 @@ const requestAction = function(operationData) {
1528
2282
  const resultCallback = (action) => {
1529
2283
  operationData.actionInstance = action;
1530
2284
  };
1531
- this.eventbus.broadcast(TimelineEventNames.REQUEST_ACTION, [systemName, resultCallback]);
2285
+ this.eventbus.broadcast("request-action", [systemName, resultCallback]);
2286
+ return operationData;
2287
+ };
2288
+
2289
+ //#endregion
2290
+ //#region src/operation/save-to-storage.ts
2291
+ /**
2292
+ * Saves data to browser storage (localStorage or sessionStorage).
2293
+ *
2294
+ * Serializes the value as JSON before storing. Supports any JSON-serializable data type.
2295
+ *
2296
+ * @returns Operation data with storage properties erased
2297
+ *
2298
+ * @example
2299
+ * ```typescript
2300
+ * // Save user settings to localStorage
2301
+ * const result = saveToStorage({
2302
+ * key: 'user-settings',
2303
+ * value: { theme: 'dark', language: 'en' },
2304
+ * storageType: 'local'
2305
+ * });
2306
+ * ```
2307
+ *
2308
+ * @example
2309
+ * ```typescript
2310
+ * // Save session data
2311
+ * const result = saveToStorage({
2312
+ * key: 'session-id',
2313
+ * value: 'abc123',
2314
+ * storageType: 'session'
2315
+ * });
2316
+ * ```
2317
+ *
2318
+ * @category Data
2319
+ */
2320
+ const saveToStorage = (operationData) => {
2321
+ const { key, value, storageType } = operationData;
2322
+ if (!key || key.trim() === "") throw new Error("saveToStorage: key is required");
2323
+ const storage = storageType === "session" ? sessionStorage : localStorage;
2324
+ const serialized = JSON.stringify(value);
2325
+ storage.setItem(key, serialized);
2326
+ removeProperties(operationData, "value", "storageType");
2327
+ return operationData;
2328
+ };
2329
+
2330
+ //#endregion
2331
+ //#region src/operation/scroll-to-element.ts
2332
+ /**
2333
+ * Scrolls the viewport to bring the selected element into view.
2334
+ *
2335
+ * Uses the browser's `scrollIntoView` API with configurable behavior.
2336
+ *
2337
+ * @returns Operation data with scroll properties erased
2338
+ *
2339
+ * @example
2340
+ * ```typescript
2341
+ * // Smooth scroll to element at top of viewport
2342
+ * const result = scrollToElement({
2343
+ * selectedElement: $targetElement,
2344
+ * behavior: 'smooth',
2345
+ * block: 'start'
2346
+ * });
2347
+ * ```
2348
+ *
2349
+ * @example
2350
+ * ```typescript
2351
+ * // Center element in viewport
2352
+ * const result = scrollToElement({
2353
+ * selectedElement: $targetElement,
2354
+ * behavior: 'smooth',
2355
+ * block: 'center'
2356
+ * });
2357
+ * ```
2358
+ *
2359
+ * @category Scroll
2360
+ */
2361
+ const scrollToElement = (operationData) => {
2362
+ const { selectedElement, behavior = "auto", block = "start", inline = "nearest" } = operationData;
2363
+ if (!selectedElement || selectedElement.length === 0) throw new Error("scrollToElement: selectedElement is required");
2364
+ selectedElement[0].scrollIntoView({
2365
+ behavior,
2366
+ block,
2367
+ inline
2368
+ });
2369
+ removeProperties(operationData, "behavior", "block", "inline");
2370
+ return operationData;
2371
+ };
2372
+
2373
+ //#endregion
2374
+ //#region src/operation/scroll-to-position.ts
2375
+ /**
2376
+ * Scrolls the viewport to a specific x,y coordinate position.
2377
+ *
2378
+ * Uses the browser's `window.scrollTo` API with configurable behavior.
2379
+ *
2380
+ * @returns Operation data with scroll properties erased
2381
+ *
2382
+ * @example
2383
+ * ```typescript
2384
+ * // Smooth scroll to position
2385
+ * const result = scrollToPosition({
2386
+ * x: 0,
2387
+ * y: 500,
2388
+ * behavior: 'smooth'
2389
+ * });
2390
+ * ```
2391
+ *
2392
+ * @example
2393
+ * ```typescript
2394
+ * // Instant scroll to top
2395
+ * const result = scrollToPosition({
2396
+ * x: 0,
2397
+ * y: 0
2398
+ * });
2399
+ * ```
2400
+ *
2401
+ * @category Scroll
2402
+ */
2403
+ const scrollToPosition = (operationData) => {
2404
+ const { x, y, behavior = "auto" } = operationData;
2405
+ if (typeof x !== "number" || typeof y !== "number") throw new Error("scrollToPosition: x and y coordinates are required");
2406
+ window.scrollTo({
2407
+ left: x,
2408
+ top: y,
2409
+ behavior
2410
+ });
2411
+ removeProperties(operationData, "x", "y", "behavior");
1532
2412
  return operationData;
1533
2413
  };
1534
2414
 
@@ -1545,6 +2425,8 @@ function findElementBySelector(root, selector) {
1545
2425
  * If `useSelectedElementAsRoot` is set to true and a valid DOM element is assigned
1546
2426
  * to the current operation data's `selectedElement` property
1547
2427
  * then the element will be looked for only in the descendant elements of this DOM element.
2428
+ *
2429
+ * @category DOM
1548
2430
  */
1549
2431
  const selectElement = function(operationData) {
1550
2432
  operationData.selector = resolveExternalPropertyChain(operationData, this, operationData.selector);
@@ -1559,7 +2441,7 @@ const selectElement = function(operationData) {
1559
2441
  const rootCallback = (root) => {
1560
2442
  operationData.selectedElement = findElementBySelector(root, selector);
1561
2443
  };
1562
- this.eventbus.broadcast(TimelineEventNames.REQUEST_ENGINE_ROOT, [rootCallback]);
2444
+ this.eventbus.broadcast("request-engine-root", [rootCallback]);
1563
2445
  return operationData;
1564
2446
  };
1565
2447
 
@@ -1576,6 +2458,8 @@ const selectElement = function(operationData) {
1576
2458
  * '$scope.newIndex': 100, // The constant 100 will be assigned to $scope.newIndex
1577
2459
  * })
1578
2460
  * ```
2461
+ *
2462
+ * @category Data
1579
2463
  */
1580
2464
  const setData = function(operationData) {
1581
2465
  const { properties } = operationData;
@@ -1611,6 +2495,8 @@ function isDataTarget(value) {
1611
2495
  //#region src/operation/set-element-attributes.ts
1612
2496
  /**
1613
2497
  * This operation sets the specified set of attributes on the given selected element.
2498
+ *
2499
+ * @category DOM
1614
2500
  */
1615
2501
  const setElementAttributes = (operationData) => {
1616
2502
  const { attributes, selectedElement } = operationData;
@@ -1629,6 +2515,8 @@ const setElementAttributes = (operationData) => {
1629
2515
  * by the given template.
1630
2516
  * When set to `append` the new content will be inserted after the current content.
1631
2517
  * When set to `prepend` the new content will be inserted before the current content.
2518
+ *
2519
+ * @category DOM
1632
2520
  */
1633
2521
  const setElementContent = (operationData) => {
1634
2522
  const { insertionType = "overwrite", selectedElement, template } = operationData;
@@ -1647,10 +2535,62 @@ const setElementContent = (operationData) => {
1647
2535
  return operationData;
1648
2536
  };
1649
2537
 
2538
+ //#endregion
2539
+ //#region src/operation/set-focus.ts
2540
+ /**
2541
+ * Sets focus to the selected element.
2542
+ *
2543
+ * @category Focus
2544
+ */
2545
+ const setFocus = (operationData) => {
2546
+ const { selectedElement } = operationData;
2547
+ if (!selectedElement || selectedElement.length === 0) throw new Error("setFocus: selectedElement is required");
2548
+ selectedElement[0].focus();
2549
+ return operationData;
2550
+ };
2551
+
2552
+ //#endregion
2553
+ //#region src/operation/set-form-value.ts
2554
+ /**
2555
+ * Sets the value of an input, select, or textarea element.
2556
+ *
2557
+ * Handles different input types appropriately:
2558
+ * - Text inputs, textareas, selects: sets value directly
2559
+ * - Checkboxes: sets checked property for boolean values
2560
+ * - Radio buttons: sets checked property for boolean values
2561
+ * - Number inputs: converts to string
2562
+ *
2563
+ * @example
2564
+ * ```typescript
2565
+ * // Set text input value
2566
+ * const result = setFormValue({selectedElement: $input, value: 'test@example.com'});
2567
+ * // Element value is now 'test@example.com'
2568
+ * ```
2569
+ *
2570
+ * @example
2571
+ * ```typescript
2572
+ * // Set checkbox checked state
2573
+ * const result = setFormValue({selectedElement: $checkbox, value: true});
2574
+ * // Checkbox is now checked
2575
+ * ```
2576
+ *
2577
+ * @category Form
2578
+ */
2579
+ const setFormValue = (operationData) => {
2580
+ const { selectedElement, value } = operationData;
2581
+ if (!selectedElement || selectedElement.length === 0) throw new Error("setFormValue: selectedElement is required");
2582
+ if (typeof value === "boolean" && (selectedElement.is(":checkbox") || selectedElement.is(":radio"))) selectedElement.prop("checked", value);
2583
+ else selectedElement.val(value);
2584
+ removeProperties(operationData, "value");
2585
+ return operationData;
2586
+ };
2587
+
1650
2588
  //#endregion
1651
2589
  //#region src/operation/set-global-data.ts
1652
2590
  /**
1653
2591
  * This operation copies the specified properties from the operationData to the global data.
2592
+ *
2593
+ * @category Data
1654
2594
  */
1655
2595
  const setGlobalData = (operationData) => {
1656
2596
  const { propertyNames,...newOperationData } = operationData;
@@ -1663,6 +2603,8 @@ const setGlobalData = (operationData) => {
1663
2603
  /**
1664
2604
  * This operation assigns the specified properties to the current operation data.
1665
2605
  * When override is set to true the properties replace the current operation data entirely.
2606
+ *
2607
+ * @category Data
1666
2608
  */
1667
2609
  const setOperationData = function(operationData) {
1668
2610
  const { override = false, properties,...newOperationData } = operationData;
@@ -1679,6 +2621,8 @@ const setOperationData = function(operationData) {
1679
2621
  /**
1680
2622
  * This operation assigns the specified CSS style properties to the
1681
2623
  * given selected element.
2624
+ *
2625
+ * @category DOM
1682
2626
  */
1683
2627
  const setStyle = function(operationData) {
1684
2628
  const properties = resolvePropertyValues(operationData, this, operationData.properties);
@@ -1691,6 +2635,8 @@ const setStyle = function(operationData) {
1691
2635
  //#region src/operation/set-variable.ts
1692
2636
  /**
1693
2637
  * This operation sets a variable with the specified name on the scope with the specified value.
2638
+ *
2639
+ * @category Data
1694
2640
  */
1695
2641
  const setVariable = function(operationData) {
1696
2642
  const { name, value } = operationData;
@@ -1700,6 +2646,99 @@ const setVariable = function(operationData) {
1700
2646
  return operationData;
1701
2647
  };
1702
2648
 
2649
+ //#endregion
2650
+ //#region src/operation/sort-array.ts
2651
+ /**
2652
+ * Sorts an array by property, natural order, or custom comparator function.
2653
+ *
2654
+ * Operates on arrayData passed from previous operations.
2655
+ * Supports three sorting modes:
2656
+ * 1. Property sort: `sortProperty` and `sortOrder` to sort objects by property
2657
+ * 2. Natural sort: `sortOrder` alone for primitive arrays
2658
+ * 3. Custom comparator: `sortComparator` function for complex sorting logic
2659
+ *
2660
+ * @returns Operation data with `sortedArray` containing sorted results
2661
+ *
2662
+ * @example
2663
+ * ```typescript
2664
+ * // Sort objects by property
2665
+ * const result = sortArray({
2666
+ * arrayData: [{name: 'Bob', age: 30}, {name: 'Alice', age: 25}],
2667
+ * sortProperty: 'age',
2668
+ * sortOrder: 'asc'
2669
+ * });
2670
+ * // result.sortedArray = [{name: 'Alice', age: 25}, {name: 'Bob', age: 30}]
2671
+ * ```
2672
+ *
2673
+ * @example
2674
+ * ```typescript
2675
+ * // Sort primitives
2676
+ * const result = sortArray({
2677
+ * arrayData: [5, 2, 8, 1],
2678
+ * sortOrder: 'desc'
2679
+ * });
2680
+ * // result.sortedArray = [8, 5, 2, 1]
2681
+ * ```
2682
+ *
2683
+ * @example
2684
+ * ```typescript
2685
+ * // Custom comparator
2686
+ * const result = sortArray({
2687
+ * arrayData: ['apple', 'Banana', 'cherry'],
2688
+ * sortComparator: (a, b) => a.toLowerCase().localeCompare(b.toLowerCase())
2689
+ * });
2690
+ * ```
2691
+ *
2692
+ * @category Array
2693
+ */
2694
+ const sortArray = (operationData) => {
2695
+ const { arrayData, sortProperty, sortOrder, sortComparator } = operationData;
2696
+ if (!Array.isArray(arrayData)) throw new Error("sortArray: arrayData is required and must be an array");
2697
+ const sorted = [...arrayData];
2698
+ if (sortComparator) sorted.sort(sortComparator);
2699
+ else if (sortProperty) sorted.sort((a, b) => {
2700
+ const aVal = a[sortProperty];
2701
+ const bVal = b[sortProperty];
2702
+ if (aVal < bVal) return sortOrder === "desc" ? 1 : -1;
2703
+ if (aVal > bVal) return sortOrder === "desc" ? -1 : 1;
2704
+ return 0;
2705
+ });
2706
+ else sorted.sort((a, b) => {
2707
+ if (a < b) return sortOrder === "desc" ? 1 : -1;
2708
+ if (a > b) return sortOrder === "desc" ? -1 : 1;
2709
+ return 0;
2710
+ });
2711
+ operationData.sortedArray = sorted;
2712
+ removeProperties(operationData, "sortProperty", "sortOrder", "sortComparator");
2713
+ return operationData;
2714
+ };
2715
+
2716
+ //#endregion
2717
+ //#region src/operation/split-string.ts
2718
+ /**
2719
+ * Splits a string into an array by delimiter (string or regex).
2720
+ *
2721
+ * @returns Operation data with `resultArray` containing the split strings
2722
+ *
2723
+ * @example
2724
+ * ```typescript
2725
+ * const result = splitString({
2726
+ * textContent: 'apple,banana,cherry',
2727
+ * delimiter: ','
2728
+ * });
2729
+ * // result.resultArray = ['apple', 'banana', 'cherry']
2730
+ * ```
2731
+ *
2732
+ * @category String
2733
+ */
2734
+ const splitString = (operationData) => {
2735
+ const { textContent, delimiter, limit } = operationData;
2736
+ if (textContent === void 0 || textContent === null) throw new Error("splitString: textContent is required");
2737
+ operationData.resultArray = textContent.split(delimiter, limit);
2738
+ removeProperties(operationData, "delimiter", "limit");
2739
+ return operationData;
2740
+ };
2741
+
1703
2742
  //#endregion
1704
2743
  //#region src/operation/start-action.ts
1705
2744
  /**
@@ -1708,6 +2747,8 @@ const setVariable = function(operationData) {
1708
2747
  * The action operation data is first merged with the current operation data before it is
1709
2748
  * passed on to the action. After the action has completed the action operation data properties
1710
2749
  * are removed from the current operation data.
2750
+ *
2751
+ * @category Action
1711
2752
  */
1712
2753
  const startAction = (operationData) => {
1713
2754
  let { actionInstance, actionOperationData,...newOperationData } = operationData;
@@ -1725,6 +2766,34 @@ const startAction = (operationData) => {
1725
2766
  });
1726
2767
  };
1727
2768
 
2769
+ //#endregion
2770
+ //#region src/operation/substring-text.ts
2771
+ /**
2772
+ * Extracts a substring from text between start and end indices.
2773
+ *
2774
+ * @returns Operation data with `substring` containing the extracted text
2775
+ *
2776
+ * @example
2777
+ * ```typescript
2778
+ * const result = substringText({
2779
+ * textContent: 'Hello World',
2780
+ * start: 0,
2781
+ * end: 5
2782
+ * });
2783
+ * // result.substring = "Hello"
2784
+ * ```
2785
+ *
2786
+ * @category Text
2787
+ */
2788
+ const substringText = (operationData) => {
2789
+ const { textContent, start, end } = operationData;
2790
+ if (textContent === void 0 || textContent === null) throw new Error("substringText: textContent is required");
2791
+ if (typeof start !== "number") throw new Error("substringText: start must be a number");
2792
+ operationData.substring = textContent.substring(start, end);
2793
+ removeProperties(operationData, "start", "end");
2794
+ return operationData;
2795
+ };
2796
+
1728
2797
  //#endregion
1729
2798
  //#region src/operation/toggle-class.ts
1730
2799
  /**
@@ -1732,6 +2801,8 @@ const startAction = (operationData) => {
1732
2801
  *
1733
2802
  * Meaning, if the specified class name exists on the given element it will be removed,
1734
2803
  * otherwise it will be added.
2804
+ *
2805
+ * @category DOM
1735
2806
  */
1736
2807
  const toggleClass = (operationData) => {
1737
2808
  const { selectedElement, className } = operationData;
@@ -1747,16 +2818,132 @@ const toggleClass = (operationData) => {
1747
2818
  *
1748
2819
  * Meaning, if the element is hidden, it will be made visible, otherwise
1749
2820
  * it will be hidden.
2821
+ *
2822
+ * @category DOM
1750
2823
  */
1751
2824
  const toggleElement = function toggleElement$2(operationData) {
1752
2825
  operationData.selectedElement.toggle();
1753
2826
  return operationData;
1754
2827
  };
1755
2828
 
2829
+ //#endregion
2830
+ //#region src/operation/toggle-form-element.ts
2831
+ /**
2832
+ * Enables or disables form input elements (inputs, selects, textareas, buttons).
2833
+ *
2834
+ * Sets the `disabled` property on the element. When `enabled` is true, removes the disabled
2835
+ * attribute; when false, adds the disabled attribute.
2836
+ *
2837
+ * @example
2838
+ * ```typescript
2839
+ * // Disable an input field
2840
+ * toggleFormElement({selectedElement: $input, enabled: false});
2841
+ * // Input is now disabled
2842
+ * ```
2843
+ *
2844
+ * @example
2845
+ * ```typescript
2846
+ * // Enable a previously disabled button
2847
+ * toggleFormElement({selectedElement: $button, enabled: true});
2848
+ * // Button is now enabled
2849
+ * ```
2850
+ *
2851
+ * @category Form
2852
+ */
2853
+ const toggleFormElement = (operationData) => {
2854
+ const { selectedElement, enabled } = operationData;
2855
+ if (!selectedElement || selectedElement.length === 0) throw new Error("toggleFormElement: selectedElement is required");
2856
+ selectedElement.prop("disabled", !enabled);
2857
+ removeProperties(operationData, "enabled");
2858
+ return operationData;
2859
+ };
2860
+
2861
+ //#endregion
2862
+ //#region src/operation/validate-form.ts
2863
+ /**
2864
+ * Validates form fields against HTML5 validation and custom rules.
2865
+ *
2866
+ * Uses HTML5 validation API (checkValidity()) for native validation, and supports
2867
+ * custom validation rules for: required, minLength, maxLength, pattern (regex), and email format.
2868
+ *
2869
+ * @returns Operation data with `validationErrors` object (field names → error messages) and `isValid` boolean
2870
+ *
2871
+ * @example
2872
+ * ```typescript
2873
+ * // Validate with HTML5 validation
2874
+ * const result = validateForm({selectedElement: $form});
2875
+ * // Returns: {isValid: true, validationErrors: {}}
2876
+ * ```
2877
+ *
2878
+ * @example
2879
+ * ```typescript
2880
+ * // Validate with custom rules
2881
+ * const result = validateForm({
2882
+ * selectedElement: $form,
2883
+ * validationRules: {
2884
+ * password: { required: true, minLength: 8 },
2885
+ * email: { email: true }
2886
+ * }
2887
+ * });
2888
+ * // Returns: {isValid: false, validationErrors: {password: "Must be at least 8 characters"}}
2889
+ * ```
2890
+ *
2891
+ * @category Form
2892
+ */
2893
+ const validateForm = (operationData) => {
2894
+ const { selectedElement, validationRules } = operationData;
2895
+ if (!selectedElement || selectedElement.length === 0) throw new Error("validateForm: selectedElement is required");
2896
+ if (!selectedElement.is("form")) throw new Error("validateForm: selectedElement must be a form element");
2897
+ const validationErrors = {};
2898
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
2899
+ selectedElement.find("input, select, textarea").each((_, element) => {
2900
+ const $input = $(element);
2901
+ const name = $input.attr("name");
2902
+ if (!name) return;
2903
+ const value = $input.val();
2904
+ const rules = validationRules?.[name];
2905
+ const inputElement = element;
2906
+ if (inputElement.checkValidity && !inputElement.checkValidity()) {
2907
+ validationErrors[name] = inputElement.validationMessage || "Invalid value";
2908
+ return;
2909
+ }
2910
+ if (rules) {
2911
+ if (rules.required && (!value || value.trim() === "")) {
2912
+ validationErrors[name] = "This field is required";
2913
+ return;
2914
+ }
2915
+ if (rules.minLength && value.length < rules.minLength) {
2916
+ validationErrors[name] = `Must be at least ${rules.minLength} characters`;
2917
+ return;
2918
+ }
2919
+ if (rules.maxLength && value.length > rules.maxLength) {
2920
+ validationErrors[name] = `Must be no more than ${rules.maxLength} characters`;
2921
+ return;
2922
+ }
2923
+ if (rules.pattern) {
2924
+ if (!(typeof rules.pattern === "string" ? new RegExp(rules.pattern) : rules.pattern).test(value)) {
2925
+ validationErrors[name] = "Invalid format";
2926
+ return;
2927
+ }
2928
+ }
2929
+ if (rules.email && !emailRegex.test(value)) {
2930
+ validationErrors[name] = "Must be a valid email address";
2931
+ return;
2932
+ }
2933
+ }
2934
+ });
2935
+ operationData.validationErrors = validationErrors;
2936
+ operationData.isValid = Object.keys(validationErrors).length === 0;
2937
+ removeProperties(operationData, "validationRules");
2938
+ return operationData;
2939
+ };
2940
+
1756
2941
  //#endregion
1757
2942
  //#region src/operation/wait.ts
1758
2943
  /**
1759
2944
  * This operation waits for the specified amount of milliseconds.
2945
+ *
2946
+ * @category Utility
1760
2947
  */
1761
2948
  const wait = (operationData) => {
1762
2949
  const { milliseconds,...newOperationData } = operationData;
@@ -1775,11 +2962,15 @@ var operation_exports = /* @__PURE__ */ __export({
1775
2962
  addGlobalsToOperation: () => addGlobalsToOperation,
1776
2963
  animate: () => animate,
1777
2964
  animateWithClass: () => animateWithClass,
2965
+ announceToScreenReader: () => announceToScreenReader,
1778
2966
  breakForEach: () => breakForEach,
1779
2967
  broadcastEvent: () => broadcastEvent,
1780
2968
  calc: () => calc,
1781
2969
  clearElement: () => clearElement,
1782
2970
  clearOperationData: () => clearOperationData,
2971
+ clearStorage: () => clearStorage,
2972
+ compareDate: () => compareDate,
2973
+ concatenateStrings: () => concatenateStrings,
1783
2974
  continueForEach: () => continueForEach,
1784
2975
  createElement: () => createElement,
1785
2976
  customFunction: () => customFunction,
@@ -1787,16 +2978,31 @@ var operation_exports = /* @__PURE__ */ __export({
1787
2978
  endForEach: () => endForEach,
1788
2979
  endWhen: () => endWhen,
1789
2980
  extendController: () => extendController,
2981
+ filterArray: () => filterArray,
2982
+ findInArray: () => findInArray,
1790
2983
  forEach: () => forEach,
2984
+ formatDate: () => formatDate,
2985
+ formatText: () => formatText,
1791
2986
  getAttributesFromElement: () => getAttributesFromElement,
1792
2987
  getControllerFromElement: () => getControllerFromElement,
1793
2988
  getControllerInstance: () => getControllerInstance,
2989
+ getCurrentTime: () => getCurrentTime,
1794
2990
  getElementDimensions: () => getElementDimensions,
2991
+ getFocusedElement: () => getFocusedElement,
2992
+ getFormData: () => getFormData,
1795
2993
  getImport: () => getImport,
1796
2994
  getQueryParams: () => getQueryParams,
2995
+ getScrollPosition: () => getScrollPosition,
2996
+ getTextContent: () => getTextContent,
2997
+ httpDelete: () => httpDelete,
2998
+ httpPost: () => httpPost,
2999
+ httpPut: () => httpPut,
1797
3000
  invokeObjectMethod: () => invokeObjectMethod,
3001
+ isElementInViewport: () => isElementInViewport,
3002
+ loadFromStorage: () => loadFromStorage,
1798
3003
  loadJson: () => loadJson,
1799
3004
  log: () => log,
3005
+ mapArray: () => mapArray,
1800
3006
  math: () => math,
1801
3007
  otherwise: () => otherwise,
1802
3008
  removeClass: () => removeClass,
@@ -1804,18 +3010,30 @@ var operation_exports = /* @__PURE__ */ __export({
1804
3010
  removeElement: () => removeElement,
1805
3011
  removePropertiesFromOperationData: () => removePropertiesFromOperationData,
1806
3012
  reparentElement: () => reparentElement,
3013
+ replaceString: () => replaceString,
3014
+ replaceText: () => replaceText,
1807
3015
  requestAction: () => requestAction,
3016
+ saveToStorage: () => saveToStorage,
3017
+ scrollToElement: () => scrollToElement,
3018
+ scrollToPosition: () => scrollToPosition,
1808
3019
  selectElement: () => selectElement,
1809
3020
  setData: () => setData,
1810
3021
  setElementAttributes: () => setElementAttributes,
1811
3022
  setElementContent: () => setElementContent,
3023
+ setFocus: () => setFocus,
3024
+ setFormValue: () => setFormValue,
1812
3025
  setGlobalData: () => setGlobalData,
1813
3026
  setOperationData: () => setOperationData,
1814
3027
  setStyle: () => setStyle,
1815
3028
  setVariable: () => setVariable,
3029
+ sortArray: () => sortArray,
3030
+ splitString: () => splitString,
1816
3031
  startAction: () => startAction,
3032
+ substringText: () => substringText,
1817
3033
  toggleClass: () => toggleClass,
1818
3034
  toggleElement: () => toggleElement,
3035
+ toggleFormElement: () => toggleFormElement,
3036
+ validateForm: () => validateForm,
1819
3037
  wait: () => wait,
1820
3038
  when: () => when
1821
3039
  });
@@ -2322,7 +3540,7 @@ var TimelineActionEditor = class extends EndableActionEditor {
2322
3540
  * @returns
2323
3541
  */
2324
3542
  setDuration(start, end) {
2325
- if (end != void 0 && start > end) throw Error("start position cannot be higher than end position");
3543
+ if (end !== void 0 && start > end) throw Error("start position cannot be higher than end position");
2326
3544
  const duration = { start };
2327
3545
  if (end) duration.end = end;
2328
3546
  this.actionConfig = {
@@ -2589,7 +3807,7 @@ var RequestAnimationFrameTimelineProvider = class {
2589
3807
  }
2590
3808
  start() {
2591
3809
  if (this.playState === "running") {
2592
- if (this._currentPosition == 0) this._callbackPosition();
3810
+ if (this._currentPosition === 0) this._callbackPosition();
2593
3811
  return;
2594
3812
  }
2595
3813
  this._playState = "running";
@@ -2599,7 +3817,7 @@ var RequestAnimationFrameTimelineProvider = class {
2599
3817
  this._firstFramePending = false;
2600
3818
  this._onFirstFrame?.();
2601
3819
  }
2602
- if (this._currentPosition == 0) this._callbackPosition();
3820
+ if (this._currentPosition === 0) this._callbackPosition();
2603
3821
  animationInterval(this._tickInterval, this._abortController.signal, this._updateBound);
2604
3822
  }
2605
3823
  _resetToStartPosition() {
@@ -3343,7 +4561,6 @@ var DOMEventListenerController = class {
3343
4561
  operationData;
3344
4562
  actionInstanceInfos;
3345
4563
  name = "DOMEventListenerController";
3346
- constructor() {}
3347
4564
  init(operationData) {
3348
4565
  this.operationData = {
3349
4566
  selectedElement: operationData.selectedElement,
@@ -3365,7 +4582,7 @@ var DOMEventListenerController = class {
3365
4582
  };
3366
4583
  actions.forEach((actionName) => {
3367
4584
  const [isStart, name] = this._isStartAction(actionName);
3368
- eventbus$1.broadcast(TimelineEventNames.REQUEST_ACTION, [name, resultCallback(isStart)]);
4585
+ eventbus$1.broadcast("request-action", [name, resultCallback(isStart)]);
3369
4586
  });
3370
4587
  selectedElement.on(eventName, this._eventHandler.bind(this));
3371
4588
  }
@@ -3486,16 +4703,16 @@ var LabelController = class extends BaseController {
3486
4703
  }
3487
4704
  attach(eventbus$1) {
3488
4705
  if (!this.operationData) return;
3489
- eventbus$1.broadcast(TimelineEventNames.REQUEST_CURRENT_LANGUAGE, [(language) => {
4706
+ eventbus$1.broadcast("request-current-language", [(language) => {
3490
4707
  this.currentLanguage = language;
3491
4708
  }]);
3492
4709
  this.requestLabelDataBound = this._requestLabelData.bind(this, eventbus$1);
3493
4710
  this.requestLabelDataBound(this.operationData.labelId);
3494
4711
  this._setLabel();
3495
- this.addListener(eventbus$1, TimelineEventNames.LANGUAGE_CHANGE, this._handleLanguageChange);
4712
+ this.addListener(eventbus$1, "language-change", this._handleLanguageChange);
3496
4713
  }
3497
4714
  _requestLabelData(eventbus$1, labelId) {
3498
- eventbus$1.broadcast(TimelineEventNames.REQUEST_LABEL_COLLECTION, [labelId, (labelCollection) => {
4715
+ eventbus$1.broadcast("request-label-collection", [labelId, (labelCollection) => {
3499
4716
  if (labelCollection) this._createTextDataLookup(labelCollection);
3500
4717
  else throw new Error(`Label id '${labelId}' does not exist!`);
3501
4718
  }]);
@@ -3558,15 +4775,21 @@ var LottieController = class extends BaseController {
3558
4775
  attach(eventbus$1) {
3559
4776
  if (!this.operationData) return;
3560
4777
  const { labelIds } = this.operationData;
3561
- if (labelIds && labelIds.length) {
3562
- const resultHolder = {};
3563
- eventbus$1.broadcast(TimelineEventNames.REQUEST_CURRENT_LANGUAGE, [resultHolder]);
3564
- this.currentLanguage = resultHolder.language;
3565
- this.addListener(eventbus$1, TimelineEventNames.LANGUAGE_CHANGE, this._handleLanguageChange);
3566
- eventbus$1.broadcast(TimelineEventNames.REQUEST_LABEL_COLLECTIONS, [this.operationData.labelIds, resultHolder]);
3567
- this._createTextDataLookup(resultHolder.labelCollections);
4778
+ if (labelIds?.length) {
4779
+ let currentLanguage = "en-US";
4780
+ let labelCollections = [];
4781
+ eventbus$1.broadcast("request-current-language", [(language) => {
4782
+ currentLanguage = language;
4783
+ }]);
4784
+ this.currentLanguage = currentLanguage;
4785
+ this.addListener(eventbus$1, "language-change", this._handleLanguageChange);
4786
+ eventbus$1.broadcast("request-label-collections", [this.operationData.labelIds, (collections) => {
4787
+ labelCollections = collections;
4788
+ }]);
4789
+ this._createTextDataLookup(labelCollections);
3568
4790
  }
3569
4791
  this._createAnimation();
4792
+ this._createAnimation();
3570
4793
  }
3571
4794
  detach(eventbus$1) {
3572
4795
  super.detach(eventbus$1);
@@ -3586,7 +4809,7 @@ var LottieController = class extends BaseController {
3586
4809
  this.animationItem?.destroy();
3587
4810
  let serialized = this._isIE() && this.serializedIEData ? this.serializedIEData : this.serializedData;
3588
4811
  const { labelIds } = this.operationData;
3589
- if (labelIds && labelIds.length) serialized = serialized.replace(/!!([^!]+)!!/g, (match, labelId) => {
4812
+ if (labelIds?.length) serialized = serialized.replace(/!!([^!]+)!!/g, (match, labelId) => {
3590
4813
  return this.labelData[labelId]?.[this.currentLanguage] ?? match;
3591
4814
  });
3592
4815
  const animationData = JSON.parse(serialized);
@@ -3602,20 +4825,130 @@ var LottieController = class extends BaseController {
3602
4825
  if (this.freezePosition > -1) this.animationItem.playSegments([0, this.freezePosition], true);
3603
4826
  if (this.operationData.viewBox) this.operationData.selectedElement.find("svg").attr("viewBox", this.operationData.viewBox);
3604
4827
  }
3605
- _createTextDataLookup(data) {
3606
- data.forEach((infos, index) => {
3607
- infos.forEach((d) => {
3608
- if (this.operationData) this.labelData[this.operationData.labelIds[index]][d.code] = d.label;
3609
- });
3610
- });
4828
+ _createTextDataLookup(data) {
4829
+ data.forEach((infos, index) => {
4830
+ infos.forEach((d) => {
4831
+ if (this.operationData) this.labelData[this.operationData.labelIds[index]][d.code] = d.label;
4832
+ });
4833
+ });
4834
+ }
4835
+ _handleLanguageChange(code) {
4836
+ this.currentLanguage = code;
4837
+ this._createAnimation();
4838
+ }
4839
+ _isIE() {
4840
+ const isIE = !!window.document.documentMode;
4841
+ return !isIE && !!window.StyleMedia || isIE;
4842
+ }
4843
+ };
4844
+
4845
+ //#endregion
4846
+ //#region src/controllers/mutation-observer-controller.ts
4847
+ /**
4848
+ * Controller that observes DOM mutations on a selected element and broadcasts events.
4849
+ *
4850
+ * This controller creates a MutationObserver to monitor DOM changes (attributes, child nodes,
4851
+ * text content) on a specified element. All detected mutations are broadcasted through the
4852
+ * Eligius eventbus, enabling reactive behavior in response to DOM changes.
4853
+ *
4854
+ * The controller follows the standard Eligius lifecycle:
4855
+ * - init(): Store configuration metadata
4856
+ * - attach(): Create and start the MutationObserver
4857
+ * - detach(): Disconnect the observer and clean up resources
4858
+ *
4859
+ * @example
4860
+ * ```typescript
4861
+ * // JSON configuration
4862
+ * {
4863
+ * "systemName": "addControllerToElement",
4864
+ * "operationData": {
4865
+ * "controllerName": "MutationObserverController",
4866
+ * "observeAttributes": true,
4867
+ * "observeChildList": true,
4868
+ * "observeCharacterData": false
4869
+ * }
4870
+ * }
4871
+ *
4872
+ * // Listen for mutations
4873
+ * eventbus.on('dom-mutation', (payload: IMutationEventPayload) => {
4874
+ * console.log('Mutations detected:', payload.mutations);
4875
+ * });
4876
+ * ```
4877
+ */
4878
+ var MutationObserverController = class extends BaseController {
4879
+ name = "MutationObserverController";
4880
+ observer = null;
4881
+ /**
4882
+ * Initialize the controller with configuration metadata.
4883
+ *
4884
+ * @param operationData - Configuration for observation behavior
4885
+ */
4886
+ init(operationData) {
4887
+ this.operationData = Object.assign({}, operationData);
4888
+ }
4889
+ /**
4890
+ * Attach the controller and start observing mutations.
4891
+ * Creates MutationObserver instance and begins monitoring the target element.
4892
+ *
4893
+ * @param eventbus - Eligius eventbus for broadcasting mutation events
4894
+ */
4895
+ attach(eventbus$1) {
4896
+ if (!this.operationData) return;
4897
+ const nativeElement = this.operationData.selectedElement.get(0);
4898
+ if (!nativeElement) return;
4899
+ const options = this._buildObserverOptions();
4900
+ this.observer = new MutationObserver(this._handleMutations.bind(this, eventbus$1, nativeElement));
4901
+ this.observer.observe(nativeElement, options);
4902
+ }
4903
+ /**
4904
+ * Detach the controller and stop observing mutations.
4905
+ * Disconnects MutationObserver and cleans up resources.
4906
+ *
4907
+ * @param eventbus - Eligius eventbus (used by BaseController for cleanup)
4908
+ */
4909
+ detach(eventbus$1) {
4910
+ if (this.observer) {
4911
+ this.observer.disconnect();
4912
+ this.observer = null;
4913
+ }
4914
+ super.detach(eventbus$1);
3611
4915
  }
3612
- _handleLanguageChange(code) {
3613
- this.currentLanguage = code;
3614
- this._createAnimation();
4916
+ /**
4917
+ * Build MutationObserverInit options from controller metadata.
4918
+ * Applies default values for optional configuration properties.
4919
+ *
4920
+ * @returns MutationObserverInit options object
4921
+ * @private
4922
+ */
4923
+ _buildObserverOptions() {
4924
+ if (!this.operationData) return {};
4925
+ const { observeAttributes = true, observeChildList = true, observeCharacterData = true, observeSubtree = false, attributeOldValue = false, characterDataOldValue = false, attributeFilter } = this.operationData;
4926
+ return {
4927
+ attributes: observeAttributes,
4928
+ childList: observeChildList,
4929
+ characterData: observeCharacterData,
4930
+ subtree: observeSubtree,
4931
+ attributeOldValue,
4932
+ characterDataOldValue,
4933
+ attributeFilter
4934
+ };
3615
4935
  }
3616
- _isIE() {
3617
- const isIE = !!window.document["documentMode"];
3618
- return !isIE && !!window["StyleMedia"] || isIE;
4936
+ /**
4937
+ * Handle mutations detected by the MutationObserver.
4938
+ * Broadcasts mutation events through the eventbus with mutation details.
4939
+ *
4940
+ * @param eventbus - Eligius eventbus for broadcasting
4941
+ * @param target - The observed element
4942
+ * @param mutations - Array of mutation records from observer callback
4943
+ * @private
4944
+ */
4945
+ _handleMutations(eventbus$1, target, mutations) {
4946
+ const payload = {
4947
+ mutations,
4948
+ target,
4949
+ timestamp: Date.now()
4950
+ };
4951
+ eventbus$1.broadcast("dom-mutation", [payload]);
3619
4952
  }
3620
4953
  };
3621
4954
 
@@ -3738,7 +5071,7 @@ var NavigationController = class extends BaseController {
3738
5071
  _handleVideoComplete(index) {
3739
5072
  const navData = this.navVidIdLookup[index];
3740
5073
  if (navData.autoNext) this.eventbus?.broadcast("request-video-url", [navData.next.videoUrlIndex]);
3741
- else this.eventbus?.broadcast("request-video-cleanup");
5074
+ else this.eventbus?.broadcast("request-video-cleanup", []);
3742
5075
  }
3743
5076
  _addLabel(parentElm, labelId) {
3744
5077
  const data = {
@@ -3794,8 +5127,8 @@ var ProgressbarController = class extends BaseController {
3794
5127
  this.textElement = operationData.textElement;
3795
5128
  }
3796
5129
  attach(eventbus$1) {
3797
- this.addListener(eventbus$1, TimelineEventNames.TIME, this._positionUpdateHandler);
3798
- eventbus$1.broadcast(TimelineEventNames.DURATION_REQUEST, [(duration) => this.duration = duration]);
5130
+ this.addListener(eventbus$1, "timeline-time", this._positionUpdateHandler);
5131
+ eventbus$1.broadcast("timeline-duration-request", [(duration) => this.duration = duration]);
3799
5132
  this.selectedElement?.css({ "pointer-events": "none" });
3800
5133
  const container = this.selectedElement?.parent();
3801
5134
  if (container) {
@@ -3816,7 +5149,7 @@ var ProgressbarController = class extends BaseController {
3816
5149
  const rect = event.target.getBoundingClientRect();
3817
5150
  const x = event.clientX - rect.left;
3818
5151
  const percentage = 100 / rect.width * x;
3819
- eventbus$1.broadcast(TimelineEventNames.SEEK_REQUEST, [Math.round(this.duration / 100 * percentage)]);
5152
+ eventbus$1.broadcast("timeline-seek-request", [Math.round(this.duration / 100 * percentage)]);
3820
5153
  }
3821
5154
  };
3822
5155
 
@@ -3888,7 +5221,7 @@ var RoutingController = class extends BaseController {
3888
5221
  this._pushState(state);
3889
5222
  }
3890
5223
  _pushState(state) {
3891
- if (state && state.navigationData && state.navigationData.visible) {
5224
+ if (state?.navigationData?.visible) {
3892
5225
  let currentPosition = state.position !== void 0 ? state.position : -1;
3893
5226
  if (currentPosition < 0) {
3894
5227
  const resultCallback = (position) => {
@@ -3945,9 +5278,9 @@ var SubtitlesController = class extends BaseController {
3945
5278
  name = "SubtitlesController";
3946
5279
  subtitleDurations = null;
3947
5280
  attach(eventbus$1) {
3948
- this.addListener(eventbus$1, TimelineEventNames.TIME, this.onTimeHandler);
3949
- this.addListener(eventbus$1, TimelineEventNames.SEEKED, this.onSeekedHandler);
3950
- this.addListener(eventbus$1, TimelineEventNames.LANGUAGE_CHANGE, this.languageChangeHandler);
5281
+ this.addListener(eventbus$1, "timeline-time", this.onTimeHandler);
5282
+ this.addListener(eventbus$1, "timeline-seeked", this.onSeekedHandler);
5283
+ this.addListener(eventbus$1, "language-change", this.languageChangeHandler);
3951
5284
  }
3952
5285
  detach(eventbus$1) {
3953
5286
  super.detach(eventbus$1);
@@ -3967,10 +5300,9 @@ var SubtitlesController = class extends BaseController {
3967
5300
  func();
3968
5301
  }
3969
5302
  }
3970
- onSeekedHandler(args) {
3971
- const position = args[0];
3972
- const duration = this.subtitleDurations?.find((x) => x.start <= position && x.end >= position);
3973
- const func = duration ? this.actionLookup[duration.start ?? -1] : void 0;
5303
+ onSeekedHandler(position, _duration) {
5304
+ const subtitleDuration = this.subtitleDurations?.find((x) => x.start <= position && x.end >= position);
5305
+ const func = subtitleDuration ? this.actionLookup[subtitleDuration.start ?? -1] : void 0;
3974
5306
  if (func && this.lastFunc !== func) {
3975
5307
  this.lastFunc = func;
3976
5308
  func();
@@ -4009,6 +5341,7 @@ var controllers_exports = /* @__PURE__ */ __export({
4009
5341
  DOMEventListenerController: () => DOMEventListenerController,
4010
5342
  LabelController: () => LabelController,
4011
5343
  LottieController: () => LottieController,
5344
+ MutationObserverController: () => MutationObserverController,
4012
5345
  NavigationController: () => NavigationController,
4013
5346
  ProgressbarController: () => ProgressbarController,
4014
5347
  RoutingController: () => RoutingController,
@@ -4020,6 +5353,7 @@ var controllers_exports = /* @__PURE__ */ __export({
4020
5353
  function addClass$1() {
4021
5354
  return {
4022
5355
  description: `This operation adds the specified class name to the specified selected element.`,
5356
+ category: `DOM`,
4023
5357
  dependentProperties: ["selectedElement"],
4024
5358
  properties: { className: {
4025
5359
  type: "ParameterType:className",
@@ -4034,6 +5368,7 @@ function addClass$1() {
4034
5368
  function addControllerToElement$1() {
4035
5369
  return {
4036
5370
  description: `This operation adds the specified controller instance to the given selected element.`,
5371
+ category: `Controller`,
4037
5372
  dependentProperties: ["selectedElement", "controllerInstance"]
4038
5373
  };
4039
5374
  }
@@ -4044,6 +5379,7 @@ function addGlobalsToOperation$1() {
4044
5379
  return {
4045
5380
  description: `This operation adds the specified global property names to the current operation data.
4046
5381
  It finally removes the \`globalProperties\` property from the current operation data.`,
5382
+ category: `Data`,
4047
5383
  properties: { globalProperties: {
4048
5384
  type: "ParameterType:array",
4049
5385
  itemType: "ParameterType:string",
@@ -4060,6 +5396,7 @@ function animateWithClass$1() {
4060
5396
  description: `This operation adds the specified class name to the specified selected element and assumes that this
4061
5397
  class triggers and animation on the selected element. It then waits for this animation to complete
4062
5398
  before it resolves.`,
5399
+ category: `Animation`,
4063
5400
  dependentProperties: ["selectedElement"],
4064
5401
  properties: {
4065
5402
  className: {
@@ -4077,6 +5414,7 @@ function animate$1() {
4077
5414
  return {
4078
5415
  description: `This operation animates the specified selected element with the given [jQuery animation](https://api.jquery.com/animate/) properties, duration and easing.
4079
5416
  It resolves after the animation completes.`,
5417
+ category: `Animation`,
4080
5418
  dependentProperties: ["selectedElement"],
4081
5419
  properties: {
4082
5420
  animationEasing: {
@@ -4097,12 +5435,35 @@ It resolves after the animation completes.`,
4097
5435
  };
4098
5436
  }
4099
5437
 
5438
+ //#endregion
5439
+ //#region src/operation/metadata/announce-to-screen-reader.ts
5440
+ function announceToScreenReader$1() {
5441
+ return {
5442
+ description: `Announces a message to screen readers using an ARIA live region.`,
5443
+ category: `Accessibility`,
5444
+ properties: {
5445
+ message: {
5446
+ type: "ParameterType:string",
5447
+ required: true,
5448
+ erased: true
5449
+ },
5450
+ priority: {
5451
+ type: [{ value: "polite" }, { value: "assertive" }],
5452
+ erased: true
5453
+ }
5454
+ }
5455
+ };
5456
+ }
5457
+
4100
5458
  //#endregion
4101
5459
  //#region src/operation/metadata/break-for-each.ts
4102
5460
  function breakForEach$1() {
4103
- return { description: `
5461
+ return {
5462
+ description: `
4104
5463
  This operation should only be used within a loop, so between a {@link forEach} and {@link endForEach}
4105
- operation. This operation immediately moves to the loop end index, effectively stopping the loop.` };
5464
+ operation. This operation immediately moves to the loop end index, effectively stopping the loop.`,
5465
+ category: `Control Flow`
5466
+ };
4106
5467
  }
4107
5468
 
4108
5469
  //#endregion
@@ -4111,6 +5472,7 @@ function broadcastEvent$1() {
4111
5472
  return {
4112
5473
  description: `This operation broadcasts the given event through the eventbus, along with the
4113
5474
  event arguments and optional event topic.`,
5475
+ category: `Utility`,
4114
5476
  properties: {
4115
5477
  eventArgs: {
4116
5478
  type: "ParameterType:array",
@@ -4135,6 +5497,7 @@ event arguments and optional event topic.`,
4135
5497
  function calc$1() {
4136
5498
  return {
4137
5499
  description: `This operation calculates the given left and right hand operands using the specified operator.`,
5500
+ category: `Utility`,
4138
5501
  properties: {
4139
5502
  left: {
4140
5503
  type: "ParameterType:number",
@@ -4168,6 +5531,7 @@ function calc$1() {
4168
5531
  function clearElement$1() {
4169
5532
  return {
4170
5533
  description: `This operation removes all of the children from the given selected element.`,
5534
+ category: `DOM`,
4171
5535
  dependentProperties: ["selectedElement"]
4172
5536
  };
4173
5537
  }
@@ -4178,6 +5542,7 @@ function clearOperationData$1() {
4178
5542
  return {
4179
5543
  description: `This operation removes all of the properties on the current operation date.
4180
5544
  Or, if the \`properties\` property is set only removes the properties defined by that list.`,
5545
+ category: `Data`,
4181
5546
  properties: { properties: {
4182
5547
  type: "ParameterType:array",
4183
5548
  itemType: "ParameterType:string",
@@ -4186,13 +5551,96 @@ Or, if the \`properties\` property is set only removes the properties defined by
4186
5551
  };
4187
5552
  }
4188
5553
 
5554
+ //#endregion
5555
+ //#region src/operation/metadata/clear-storage.ts
5556
+ function clearStorage$1() {
5557
+ return {
5558
+ description: `Clears data from browser storage (localStorage or sessionStorage).
5559
+
5560
+ If \`key\` is provided, removes only that key. If \`key\` is omitted, clears all storage.`,
5561
+ category: `Data`,
5562
+ properties: {
5563
+ key: {
5564
+ type: "ParameterType:string",
5565
+ erased: true
5566
+ },
5567
+ storageType: {
5568
+ type: [{ value: "local" }, { value: "session" }],
5569
+ required: true,
5570
+ erased: true
5571
+ }
5572
+ }
5573
+ };
5574
+ }
5575
+
5576
+ //#endregion
5577
+ //#region src/operation/metadata/compare-date.ts
5578
+ function compareDate$1() {
5579
+ return {
5580
+ description: `Compares two dates.
5581
+ comparison: -1 (before), 0 (equal), 1 (after)`,
5582
+ category: `Date`,
5583
+ properties: {
5584
+ date1: {
5585
+ type: [
5586
+ { value: "string" },
5587
+ { value: "number" },
5588
+ { value: "Date" }
5589
+ ],
5590
+ required: true,
5591
+ erased: true
5592
+ },
5593
+ date2: {
5594
+ type: [
5595
+ { value: "string" },
5596
+ { value: "number" },
5597
+ { value: "Date" }
5598
+ ],
5599
+ required: true,
5600
+ erased: true
5601
+ }
5602
+ },
5603
+ outputProperties: {
5604
+ comparison: { type: "ParameterType:number" },
5605
+ isEqual: { type: "ParameterType:boolean" },
5606
+ isBefore: { type: "ParameterType:boolean" },
5607
+ isAfter: { type: "ParameterType:boolean" }
5608
+ }
5609
+ };
5610
+ }
5611
+
5612
+ //#endregion
5613
+ //#region src/operation/metadata/concatenate-strings.ts
5614
+ function concatenateStrings$1() {
5615
+ return {
5616
+ description: `Concatenates multiple strings with an optional separator.`,
5617
+ category: `String`,
5618
+ properties: {
5619
+ strings: {
5620
+ type: "ParameterType:array",
5621
+ itemType: "ParameterType:string",
5622
+ required: true,
5623
+ erased: true
5624
+ },
5625
+ separator: {
5626
+ type: "ParameterType:string",
5627
+ erased: true
5628
+ }
5629
+ },
5630
+ outputProperties: { result: { type: "ParameterType:string" } }
5631
+ };
5632
+ }
5633
+
4189
5634
  //#endregion
4190
5635
  //#region src/operation/metadata/continue-for-each.ts
4191
5636
  function continueForEach$1() {
4192
- return { description: `
5637
+ return {
5638
+ description: `
4193
5639
  This operation should only be used within a loop, so between a {@link forEach} and {@link endForEach}
4194
5640
  operation. This operation immediately moves to the next loop index, effectively canceling the rest
4195
- of the operations in the current iteration.` };
5641
+ of the operations in the current iteration.`,
5642
+ category: `Control Flow`
5643
+ };
4196
5644
  }
4197
5645
 
4198
5646
  //#endregion
@@ -4201,6 +5649,7 @@ function createElement$1() {
4201
5649
  return {
4202
5650
  description: `This operation creates the DOM element described by the given elementName and attributes and assigns
4203
5651
  the instance to the \`template\` property on the current operation data.`,
5652
+ category: `DOM`,
4204
5653
  properties: {
4205
5654
  elementName: {
4206
5655
  type: "ParameterType:htmlElementName",
@@ -4226,6 +5675,7 @@ function customFunction$1() {
4226
5675
  return {
4227
5676
  description: `This operation retrieves a custom function defined by the given system name
4228
5677
  and invokes it with the current operation data and eventbus.`,
5678
+ category: `Utility`,
4229
5679
  properties: { systemName: {
4230
5680
  type: "ParameterType:systemName",
4231
5681
  required: true,
@@ -4243,6 +5693,7 @@ function endAction$1() {
4243
5693
  The action operation data is first merged with the current operation data before it is
4244
5694
  passed on to the action. After the action has completed the action operation data properties
4245
5695
  are removed from the current operation data.`,
5696
+ category: `Action`,
4246
5697
  dependentProperties: ["actionInstance"],
4247
5698
  properties: { actionOperationData: {
4248
5699
  type: "ParameterType:object",
@@ -4255,13 +5706,19 @@ are removed from the current operation data.`,
4255
5706
  //#endregion
4256
5707
  //#region src/operation/metadata/end-for-each.ts
4257
5708
  function endForEach$1() {
4258
- return { description: `This operation checks if the current loop should end or start the next iteration.` };
5709
+ return {
5710
+ description: `This operation checks if the current loop should end or start the next iteration.`,
5711
+ category: `Control Flow`
5712
+ };
4259
5713
  }
4260
5714
 
4261
5715
  //#endregion
4262
5716
  //#region src/operation/metadata/end-when.ts
4263
5717
  function endWhen$1() {
4264
- return { description: `This operation cleans up after the {@link when}/{@link otherwise}/{@link endWhen} control flow ends.` };
5718
+ return {
5719
+ description: `This operation cleans up after the {@link when}/{@link otherwise}/{@link endWhen} control flow ends.`,
5720
+ category: `Control Flow`
5721
+ };
4265
5722
  }
4266
5723
 
4267
5724
  //#endregion
@@ -4269,6 +5726,7 @@ function endWhen$1() {
4269
5726
  function extendController$1() {
4270
5727
  return {
4271
5728
  description: `Extends the current controller with given extension.`,
5729
+ category: `Controller`,
4272
5730
  dependentProperties: ["controllerInstance"],
4273
5731
  properties: { controllerExtension: {
4274
5732
  type: "ParameterType:object",
@@ -4278,6 +5736,71 @@ function extendController$1() {
4278
5736
  };
4279
5737
  }
4280
5738
 
5739
+ //#endregion
5740
+ //#region src/operation/metadata/filter-array.ts
5741
+ function filterArray$1() {
5742
+ return {
5743
+ description: `Filters an array based on property equality or custom predicate function.
5744
+
5745
+ Operates on arrayData passed from previous operations.
5746
+ Supports two filtering modes:
5747
+ 1. Property equality: \`filterProperty\` and \`filterValue\` to filter by property match
5748
+ 2. Custom predicate: \`filterPredicate\` function for complex filtering logic`,
5749
+ category: `Array`,
5750
+ dependentProperties: ["arrayData"],
5751
+ properties: {
5752
+ filterProperty: {
5753
+ type: "ParameterType:string",
5754
+ erased: true
5755
+ },
5756
+ filterValue: {
5757
+ type: "ParameterType:object",
5758
+ erased: true
5759
+ },
5760
+ filterPredicate: {
5761
+ type: "ParameterType:function",
5762
+ erased: true
5763
+ }
5764
+ },
5765
+ outputProperties: { filteredArray: { type: "ParameterType:array" } }
5766
+ };
5767
+ }
5768
+
5769
+ //#endregion
5770
+ //#region src/operation/metadata/find-in-array.ts
5771
+ function findInArray$1() {
5772
+ return {
5773
+ description: `Finds the first element in an array matching criteria.
5774
+
5775
+ Operates on arrayData passed from previous operations.
5776
+ Supports two search modes:
5777
+ 1. Property equality: \`findProperty\` and \`findValue\` to find by property match
5778
+ 2. Custom predicate: \`findPredicate\` function for complex search logic
5779
+
5780
+ Returns \`undefined\` for \`foundItem\` and \`-1\` for \`foundIndex\` if no match found.`,
5781
+ category: `Array`,
5782
+ dependentProperties: ["arrayData"],
5783
+ properties: {
5784
+ findProperty: {
5785
+ type: "ParameterType:string",
5786
+ erased: true
5787
+ },
5788
+ findValue: {
5789
+ type: "ParameterType:object",
5790
+ erased: true
5791
+ },
5792
+ findPredicate: {
5793
+ type: "ParameterType:function",
5794
+ erased: true
5795
+ }
5796
+ },
5797
+ outputProperties: {
5798
+ foundItem: { type: "ParameterType:object" },
5799
+ foundIndex: { type: "ParameterType:number" }
5800
+ }
5801
+ };
5802
+ }
5803
+
4281
5804
  //#endregion
4282
5805
  //#region src/operation/metadata/for-each.ts
4283
5806
  function forEach$1() {
@@ -4292,6 +5815,7 @@ the last iteration is completed the flow control is set to the index of that ope
4292
5815
 
4293
5816
  The {@link continueForEach |continue} and {@link breakForEach |break} operations can be used to control the
4294
5817
  loop iterations.`,
5818
+ category: `Control Flow`,
4295
5819
  properties: { collection: {
4296
5820
  type: "ParameterType:array|ParameterType:string",
4297
5821
  required: true
@@ -4299,11 +5823,59 @@ loop iterations.`,
4299
5823
  };
4300
5824
  }
4301
5825
 
5826
+ //#endregion
5827
+ //#region src/operation/metadata/format-date.ts
5828
+ function formatDate$1() {
5829
+ return {
5830
+ description: `Formats a date using Intl.DateTimeFormat or simple patterns.`,
5831
+ category: `Date`,
5832
+ dependentProperties: ["date"],
5833
+ properties: { format: {
5834
+ type: "ParameterType:string",
5835
+ required: true,
5836
+ erased: true
5837
+ } },
5838
+ outputProperties: { formattedDate: { type: "ParameterType:string" } }
5839
+ };
5840
+ }
5841
+
5842
+ //#endregion
5843
+ //#region src/operation/metadata/format-text.ts
5844
+ function formatText$1() {
5845
+ return {
5846
+ description: `Transforms text using format operations: uppercase, lowercase, capitalize, titlecase, or trim.
5847
+
5848
+ Operates on textContent passed from previous operations (e.g., getTextContent).
5849
+
5850
+ Transformations:
5851
+ - \`uppercase\`: Convert all characters to uppercase
5852
+ - \`lowercase\`: Convert all characters to lowercase
5853
+ - \`capitalize\`: Capitalize only the first letter
5854
+ - \`titlecase\`: Capitalize first letter of each word
5855
+ - \`trim\`: Remove leading and trailing whitespace`,
5856
+ category: `Text`,
5857
+ dependentProperties: ["textContent"],
5858
+ properties: { transformation: {
5859
+ type: [
5860
+ { value: "uppercase" },
5861
+ { value: "lowercase" },
5862
+ { value: "capitalize" },
5863
+ { value: "titlecase" },
5864
+ { value: "trim" }
5865
+ ],
5866
+ required: true,
5867
+ erased: true
5868
+ } },
5869
+ outputProperties: { formattedText: { type: "ParameterType:string" } }
5870
+ };
5871
+ }
5872
+
4302
5873
  //#endregion
4303
5874
  //#region src/operation/metadata/get-attributes-from-element.ts
4304
5875
  function getAttributesFromElement$1() {
4305
5876
  return {
4306
5877
  description: `This operation retrieves the values for the specified attribute names from the given selected element.`,
5878
+ category: `DOM`,
4307
5879
  dependentProperties: ["selectedElement"],
4308
5880
  properties: { attributeNames: {
4309
5881
  type: "ParameterType:array",
@@ -4320,6 +5892,7 @@ function getAttributesFromElement$1() {
4320
5892
  function getControllerFromElement$1() {
4321
5893
  return {
4322
5894
  description: `This operation retrieves the controller instance with the specified name that is assigned to the given selected element.`,
5895
+ category: `Controller`,
4323
5896
  dependentProperties: ["selectedElement"],
4324
5897
  properties: { controllerName: {
4325
5898
  type: "ParameterType:controllerName",
@@ -4336,11 +5909,13 @@ function getControllerInstance$1() {
4336
5909
  return {
4337
5910
  description: `This operation retrieves an instance of the given controller name.
4338
5911
  It assigns this instance to the \`controllerInstance\` property on the current operation data`,
5912
+ category: `Controller`,
4339
5913
  properties: { systemName: {
4340
5914
  type: [
4341
5915
  { value: "DOMEventListenerController" },
4342
5916
  { value: "LabelController" },
4343
5917
  { value: "LottieController" },
5918
+ { value: "MutationObserverController" },
4344
5919
  { value: "NavigationController" },
4345
5920
  { value: "ProgressbarController" },
4346
5921
  { value: "RoutingController" },
@@ -4353,6 +5928,19 @@ It assigns this instance to the \`controllerInstance\` property on the current o
4353
5928
  };
4354
5929
  }
4355
5930
 
5931
+ //#endregion
5932
+ //#region src/operation/metadata/get-current-time.ts
5933
+ function getCurrentTime$1() {
5934
+ return {
5935
+ description: `Gets the current time as timestamp and Date object.`,
5936
+ category: `Date`,
5937
+ outputProperties: {
5938
+ timestamp: { type: "ParameterType:number" },
5939
+ date: { type: "ParameterType:Date" }
5940
+ }
5941
+ };
5942
+ }
5943
+
4356
5944
  //#endregion
4357
5945
  //#region src/operation/metadata/get-element-dimensions.ts
4358
5946
  function getElementDimensions$1() {
@@ -4370,6 +5958,7 @@ Where the ratio modifier is formatted in the following way:
4370
5958
 
4371
5959
  For example, this modifier '+100h|w[ar=8-1]' will modifiy the dimensions like this:
4372
5960
  it will add a value of 100 to the height and modify the width by a ratio of 8 to 1 relative to the height.`,
5961
+ category: `DOM`,
4373
5962
  dependentProperties: ["selectedElement"],
4374
5963
  properties: { modifier: {
4375
5964
  type: "ParameterType:dimensionsModifier",
@@ -4379,12 +5968,38 @@ it will add a value of 100 to the height and modify the width by a ratio of 8 to
4379
5968
  };
4380
5969
  }
4381
5970
 
5971
+ //#endregion
5972
+ //#region src/operation/metadata/get-focused-element.ts
5973
+ function getFocusedElement$1() {
5974
+ return {
5975
+ description: `Gets the currently focused element.`,
5976
+ category: `Focus`,
5977
+ outputProperties: { focusedElement: { type: "ParameterType:jQuery" } }
5978
+ };
5979
+ }
5980
+
5981
+ //#endregion
5982
+ //#region src/operation/metadata/get-form-data.ts
5983
+ function getFormData$1() {
5984
+ return {
5985
+ description: `Extracts all input, select, and textarea values from form element into operation data.
5986
+
5987
+ This operation reads form field values and returns them as an object with field names as keys.
5988
+ Only processes form elements that are enabled and not hidden. Handles checkboxes, radio buttons,
5989
+ select elements, textareas, and text inputs.`,
5990
+ category: `Form`,
5991
+ dependentProperties: ["selectedElement"],
5992
+ outputProperties: { formData: { type: "ParameterType:object" } }
5993
+ };
5994
+ }
5995
+
4382
5996
  //#endregion
4383
5997
  //#region src/operation/metadata/get-import.ts
4384
5998
  function getImport$1() {
4385
5999
  return {
4386
6000
  description: `This operation retrieves the import specified by the given \`systemName\` and
4387
6001
  assigns it to the \`importedInstance\` property on the current operaton date.`,
6002
+ category: `Utility`,
4388
6003
  properties: { systemName: {
4389
6004
  type: "ParameterType:systemName",
4390
6005
  required: true,
@@ -4400,6 +6015,7 @@ function getQueryParams$1() {
4400
6015
  return {
4401
6016
  description: `This operation retrieves the current query parameters from the browser's address bar and places
4402
6017
  them on the returned operation data.`,
6018
+ category: `Utility`,
4403
6019
  properties: { defaultValues: {
4404
6020
  type: "ParameterType:object",
4405
6021
  erased: true
@@ -4408,12 +6024,123 @@ them on the returned operation data.`,
4408
6024
  };
4409
6025
  }
4410
6026
 
6027
+ //#endregion
6028
+ //#region src/operation/metadata/get-scroll-position.ts
6029
+ function getScrollPosition$1() {
6030
+ return {
6031
+ description: `Gets the current scroll position of the viewport.
6032
+
6033
+ Returns x (horizontal) and y (vertical) scroll positions in pixels.
6034
+ Uses cross-browser compatible methods to retrieve scroll position.`,
6035
+ category: `Scroll`,
6036
+ outputProperties: {
6037
+ scrollX: { type: "ParameterType:number" },
6038
+ scrollY: { type: "ParameterType:number" }
6039
+ }
6040
+ };
6041
+ }
6042
+
6043
+ //#endregion
6044
+ //#region src/operation/metadata/get-text-content.ts
6045
+ function getTextContent$1() {
6046
+ return {
6047
+ description: `Extracts text content from element, stripping all HTML markup.
6048
+
6049
+ Uses jQuery's \`.text()\` method which is XSS-safe and returns only the text content
6050
+ without any HTML tags. Preserves whitespace and text from nested elements.`,
6051
+ category: `Text`,
6052
+ dependentProperties: ["selectedElement"],
6053
+ outputProperties: { textContent: { type: "ParameterType:string" } }
6054
+ };
6055
+ }
6056
+
6057
+ //#endregion
6058
+ //#region src/operation/metadata/http-delete.ts
6059
+ function httpDelete$1() {
6060
+ return {
6061
+ description: `Performs an HTTP DELETE request to the specified URL.`,
6062
+ category: `HTTP`,
6063
+ properties: {
6064
+ url: {
6065
+ type: "ParameterType:string",
6066
+ required: true,
6067
+ erased: true
6068
+ },
6069
+ headers: {
6070
+ type: "ParameterType:object",
6071
+ erased: true
6072
+ }
6073
+ },
6074
+ outputProperties: {
6075
+ response: { type: "ParameterType:object" },
6076
+ status: { type: "ParameterType:number" }
6077
+ }
6078
+ };
6079
+ }
6080
+
6081
+ //#endregion
6082
+ //#region src/operation/metadata/http-post.ts
6083
+ function httpPost$1() {
6084
+ return {
6085
+ description: `Performs an HTTP POST request to the specified URL.`,
6086
+ category: `HTTP`,
6087
+ properties: {
6088
+ url: {
6089
+ type: "ParameterType:string",
6090
+ required: true,
6091
+ erased: true
6092
+ },
6093
+ body: {
6094
+ type: "ParameterType:object",
6095
+ erased: true
6096
+ },
6097
+ headers: {
6098
+ type: "ParameterType:object",
6099
+ erased: true
6100
+ }
6101
+ },
6102
+ outputProperties: {
6103
+ response: { type: "ParameterType:object" },
6104
+ status: { type: "ParameterType:number" }
6105
+ }
6106
+ };
6107
+ }
6108
+
6109
+ //#endregion
6110
+ //#region src/operation/metadata/http-put.ts
6111
+ function httpPut$1() {
6112
+ return {
6113
+ description: `Performs an HTTP PUT request to the specified URL.`,
6114
+ category: `HTTP`,
6115
+ properties: {
6116
+ url: {
6117
+ type: "ParameterType:string",
6118
+ required: true,
6119
+ erased: true
6120
+ },
6121
+ body: {
6122
+ type: "ParameterType:object",
6123
+ erased: true
6124
+ },
6125
+ headers: {
6126
+ type: "ParameterType:object",
6127
+ erased: true
6128
+ }
6129
+ },
6130
+ outputProperties: {
6131
+ response: { type: "ParameterType:object" },
6132
+ status: { type: "ParameterType:number" }
6133
+ }
6134
+ };
6135
+ }
6136
+
4411
6137
  //#endregion
4412
6138
  //#region src/operation/metadata/invoke-object-method.ts
4413
6139
  function invokeObjectMethod$1() {
4414
6140
  return {
4415
6141
  description: `This operation invokes the specified method on the given object with the given optional arguments
4416
6142
  and assigns the result to the \`methodResult\` operationdata property.`,
6143
+ category: `Utility`,
4417
6144
  dependentProperties: ["instance"],
4418
6145
  properties: {
4419
6146
  methodName: {
@@ -4430,6 +6157,43 @@ and assigns the result to the \`methodResult\` operationdata property.`,
4430
6157
  };
4431
6158
  }
4432
6159
 
6160
+ //#endregion
6161
+ //#region src/operation/metadata/is-element-in-viewport.ts
6162
+ function isElementInViewport$1() {
6163
+ return {
6164
+ description: `Checks if an element is currently visible within the viewport.
6165
+
6166
+ Uses \`getBoundingClientRect()\` to determine if the element is within the viewport boundaries.`,
6167
+ category: `DOM`,
6168
+ dependentProperties: ["selectedElement"],
6169
+ outputProperties: { isInViewport: { type: "ParameterType:boolean" } }
6170
+ };
6171
+ }
6172
+
6173
+ //#endregion
6174
+ //#region src/operation/metadata/load-from-storage.ts
6175
+ function loadFromStorage$1() {
6176
+ return {
6177
+ description: `Loads data from browser storage (localStorage or sessionStorage).
6178
+
6179
+ Deserializes the stored JSON value. Returns \`null\` if key doesn't exist.`,
6180
+ category: `Data`,
6181
+ properties: {
6182
+ key: {
6183
+ type: "ParameterType:string",
6184
+ required: true,
6185
+ erased: true
6186
+ },
6187
+ storageType: {
6188
+ type: [{ value: "local" }, { value: "session" }],
6189
+ required: true,
6190
+ erased: true
6191
+ }
6192
+ },
6193
+ outputProperties: { loadedValue: { type: "ParameterType:object" } }
6194
+ };
6195
+ }
6196
+
4433
6197
  //#endregion
4434
6198
  //#region src/operation/metadata/load-json.ts
4435
6199
  function loadJson$1() {
@@ -4439,6 +6203,7 @@ property on the current operation data.
4439
6203
 
4440
6204
  If the cache property is set to true and a cached value already exists, this is assigned
4441
6205
  instead of re-retrieving it from the url.`,
6206
+ category: `Utility`,
4442
6207
  properties: {
4443
6208
  url: {
4444
6209
  type: "ParameterType:string",
@@ -4460,6 +6225,7 @@ function log$1() {
4460
6225
  return {
4461
6226
  description: `This operation logs the specified value, or, when no logValue property has been assigned
4462
6227
  it will log the current operation data, global data and scope to the console`,
6228
+ category: `Utility`,
4463
6229
  properties: {
4464
6230
  logValue: {
4465
6231
  type: "ParameterType:object|ParameterType:string|ParameterType:number|ParameterType:boolean|ParameterType:array",
@@ -4473,11 +6239,31 @@ it will log the current operation data, global data and scope to the console`,
4473
6239
  };
4474
6240
  }
4475
6241
 
6242
+ //#endregion
6243
+ //#region src/operation/metadata/map-array.ts
6244
+ function mapArray$1() {
6245
+ return {
6246
+ description: `Transforms each element of an array using a mapping function.
6247
+
6248
+ Operates on arrayData passed from previous operations.
6249
+ The mapFunction receives each item and optionally its index.`,
6250
+ category: `Array`,
6251
+ dependentProperties: ["arrayData"],
6252
+ properties: { mapFunction: {
6253
+ type: "ParameterType:function",
6254
+ required: true,
6255
+ erased: true
6256
+ } },
6257
+ outputProperties: { mappedArray: { type: "ParameterType:array" } }
6258
+ };
6259
+ }
6260
+
4476
6261
  //#endregion
4477
6262
  //#region src/operation/metadata/math.ts
4478
6263
  function math$1() {
4479
6264
  return {
4480
6265
  description: `This operation performs the given math function with the specified arguments.`,
6266
+ category: `Utility`,
4481
6267
  properties: {
4482
6268
  args: {
4483
6269
  type: "ParameterType:array",
@@ -4497,8 +6283,11 @@ function math$1() {
4497
6283
  //#endregion
4498
6284
  //#region src/operation/metadata/otherwise.ts
4499
6285
  function otherwise$1() {
4500
- return { description: `If the preceeding {@link when} operation evaluates to \`true\` subsequent operations will
4501
- be skipped until an {@link endWhen} operation is encountered.` };
6286
+ return {
6287
+ description: `If the preceeding {@link when} operation evaluates to \`true\` subsequent operations will
6288
+ be skipped until an {@link endWhen} operation is encountered.`,
6289
+ category: `Control Flow`
6290
+ };
4502
6291
  }
4503
6292
 
4504
6293
  //#endregion
@@ -4506,6 +6295,7 @@ be skipped until an {@link endWhen} operation is encountered.` };
4506
6295
  function removeClass$1() {
4507
6296
  return {
4508
6297
  description: `This operation removes the spcified class name from the given selected element.`,
6298
+ category: `DOM`,
4509
6299
  dependentProperties: ["selectedElement"],
4510
6300
  properties: { className: {
4511
6301
  type: "ParameterType:className",
@@ -4520,6 +6310,7 @@ function removeClass$1() {
4520
6310
  function removeControllerFromElement$1() {
4521
6311
  return {
4522
6312
  description: `This operation removes the controller with the specified name from the given selected element.`,
6313
+ category: `Controller`,
4523
6314
  dependentProperties: ["selectedElement"],
4524
6315
  properties: { controllerName: {
4525
6316
  type: "ParameterType:controllerName",
@@ -4534,6 +6325,7 @@ function removeControllerFromElement$1() {
4534
6325
  function removeElement$1() {
4535
6326
  return {
4536
6327
  description: `This operation removes the given selected element from the DOM.`,
6328
+ category: `DOM`,
4537
6329
  dependentProperties: ["selectedElement"]
4538
6330
  };
4539
6331
  }
@@ -4544,6 +6336,7 @@ function removePropertiesFromOperationData$1() {
4544
6336
  return {
4545
6337
  description: `This operation removes the given list of properties from the current operation data.
4546
6338
  It will also remove the property \`propertyNames\` from the result.`,
6339
+ category: `Data`,
4547
6340
  properties: { propertyNames: {
4548
6341
  type: "ParameterType:array",
4549
6342
  itemType: "ParameterType:string",
@@ -4559,6 +6352,7 @@ function reparentElement$1() {
4559
6352
  return {
4560
6353
  description: `This operation moves the given selected element to the new parent that is defined
4561
6354
  by the specified \`newParentSelector\`.`,
6355
+ category: `DOM`,
4562
6356
  dependentProperties: ["selectedElement"],
4563
6357
  properties: { newParentSelector: {
4564
6358
  type: "ParameterType:selector",
@@ -4568,12 +6362,63 @@ by the specified \`newParentSelector\`.`,
4568
6362
  };
4569
6363
  }
4570
6364
 
6365
+ //#endregion
6366
+ //#region src/operation/metadata/replace-string.ts
6367
+ function replaceString$1() {
6368
+ return {
6369
+ description: `Replaces occurrences of a pattern in a string (alias for replaceText for string context).`,
6370
+ category: `String`,
6371
+ dependentProperties: ["textContent"],
6372
+ properties: {
6373
+ pattern: {
6374
+ type: [{ value: "string" }, { value: "RegExp" }],
6375
+ required: true,
6376
+ erased: true
6377
+ },
6378
+ replacement: {
6379
+ type: "ParameterType:string",
6380
+ required: true,
6381
+ erased: true
6382
+ }
6383
+ },
6384
+ outputProperties: { result: { type: "ParameterType:string" } }
6385
+ };
6386
+ }
6387
+
6388
+ //#endregion
6389
+ //#region src/operation/metadata/replace-text.ts
6390
+ function replaceText$1() {
6391
+ return {
6392
+ description: `Finds and replaces text using literal string or regex pattern.
6393
+
6394
+ Operates on textContent passed from previous operations (e.g., getTextContent).
6395
+ Supports regex patterns with global flag for multiple replacements.
6396
+ Updates textContent with replaced text and sets replacementCount.`,
6397
+ category: `Text`,
6398
+ dependentProperties: ["textContent"],
6399
+ properties: {
6400
+ searchPattern: {
6401
+ type: [{ value: "string" }, { value: "RegExp" }],
6402
+ required: true,
6403
+ erased: true
6404
+ },
6405
+ replacement: {
6406
+ type: "ParameterType:string",
6407
+ required: true,
6408
+ erased: true
6409
+ }
6410
+ },
6411
+ outputProperties: { replacementCount: { type: "ParameterType:number" } }
6412
+ };
6413
+ }
6414
+
4571
6415
  //#endregion
4572
6416
  //#region src/operation/metadata/request-action.ts
4573
- function requestAction$1() {
6417
+ function requestAction$2() {
4574
6418
  return {
4575
6419
  description: `This operation requests an action instance with the specified name and assigns it
4576
6420
  to the \`actionInstance\` property on the current operation data.`,
6421
+ category: `Action`,
4577
6422
  properties: { systemName: {
4578
6423
  type: "ParameterType:actionName",
4579
6424
  required: true,
@@ -4583,6 +6428,97 @@ to the \`actionInstance\` property on the current operation data.`,
4583
6428
  };
4584
6429
  }
4585
6430
 
6431
+ //#endregion
6432
+ //#region src/operation/metadata/save-to-storage.ts
6433
+ function saveToStorage$1() {
6434
+ return {
6435
+ description: `Saves data to browser storage (localStorage or sessionStorage).
6436
+
6437
+ Serializes the value as JSON before storing. Supports any JSON-serializable data type.`,
6438
+ category: `Data`,
6439
+ properties: {
6440
+ key: {
6441
+ type: "ParameterType:string",
6442
+ required: true,
6443
+ erased: true
6444
+ },
6445
+ value: {
6446
+ type: "ParameterType:object",
6447
+ required: true,
6448
+ erased: true
6449
+ },
6450
+ storageType: {
6451
+ type: [{ value: "local" }, { value: "session" }],
6452
+ required: true,
6453
+ erased: true
6454
+ }
6455
+ }
6456
+ };
6457
+ }
6458
+
6459
+ //#endregion
6460
+ //#region src/operation/metadata/scroll-to-element.ts
6461
+ function scrollToElement$1() {
6462
+ return {
6463
+ description: `Scrolls the viewport to bring the selected element into view.
6464
+
6465
+ Uses the browser's \`scrollIntoView\` API with configurable behavior.`,
6466
+ category: `Scroll`,
6467
+ dependentProperties: ["selectedElement"],
6468
+ properties: {
6469
+ behavior: {
6470
+ type: [{ value: "auto" }, { value: "smooth" }],
6471
+ erased: true
6472
+ },
6473
+ block: {
6474
+ type: [
6475
+ { value: "start" },
6476
+ { value: "center" },
6477
+ { value: "end" },
6478
+ { value: "nearest" }
6479
+ ],
6480
+ erased: true
6481
+ },
6482
+ inline: {
6483
+ type: [
6484
+ { value: "start" },
6485
+ { value: "center" },
6486
+ { value: "end" },
6487
+ { value: "nearest" }
6488
+ ],
6489
+ erased: true
6490
+ }
6491
+ }
6492
+ };
6493
+ }
6494
+
6495
+ //#endregion
6496
+ //#region src/operation/metadata/scroll-to-position.ts
6497
+ function scrollToPosition$1() {
6498
+ return {
6499
+ description: `Scrolls the viewport to a specific x,y coordinate position.
6500
+
6501
+ Uses the browser's \`window.scrollTo\` API with configurable behavior.`,
6502
+ category: `Scroll`,
6503
+ properties: {
6504
+ x: {
6505
+ type: "ParameterType:number",
6506
+ required: true,
6507
+ erased: true
6508
+ },
6509
+ y: {
6510
+ type: "ParameterType:number",
6511
+ required: true,
6512
+ erased: true
6513
+ },
6514
+ behavior: {
6515
+ type: [{ value: "auto" }, { value: "smooth" }],
6516
+ erased: true
6517
+ }
6518
+ }
6519
+ };
6520
+ }
6521
+
4586
6522
  //#endregion
4587
6523
  //#region src/operation/metadata/select-element.ts
4588
6524
  function selectElement$1() {
@@ -4592,6 +6528,7 @@ function selectElement$1() {
4592
6528
  If \`useSelectedElementAsRoot\` is set to true and a valid DOM element is assigned
4593
6529
  to the current operation data's \`selectedElement\` property
4594
6530
  then the element will be looked for only in the descendant elements of this DOM element.`,
6531
+ category: `DOM`,
4595
6532
  properties: {
4596
6533
  selector: {
4597
6534
  type: "ParameterType:selector",
@@ -4612,6 +6549,7 @@ then the element will be looked for only in the descendant elements of this DOM
4612
6549
  function setData$1() {
4613
6550
  return {
4614
6551
  description: `This operation assigns the specified properties to the specified data targets.`,
6552
+ category: `Data`,
4615
6553
  properties: { properties: {
4616
6554
  type: "ParameterType:object",
4617
6555
  required: true,
@@ -4625,6 +6563,7 @@ function setData$1() {
4625
6563
  function setElementAttributes$1() {
4626
6564
  return {
4627
6565
  description: `This operation sets the specified set of attributes on the given selected element.`,
6566
+ category: `DOM`,
4628
6567
  dependentProperties: ["selectedElement"],
4629
6568
  properties: { attributes: {
4630
6569
  type: "ParameterType:object",
@@ -4645,6 +6584,7 @@ When the \`insertionType\` is set to \`overwrite\` the contents of the selected
4645
6584
  by the given template.
4646
6585
  When set to \`append\` the new content will be inserted after the current content.
4647
6586
  When set to \`prepend\` the new content will be inserted before the current content.`,
6587
+ category: `DOM`,
4648
6588
  dependentProperties: ["selectedElement"],
4649
6589
  properties: {
4650
6590
  template: {
@@ -4670,11 +6610,48 @@ When set to \`prepend\` the new content will be inserted before the current cont
4670
6610
  };
4671
6611
  }
4672
6612
 
6613
+ //#endregion
6614
+ //#region src/operation/metadata/set-focus.ts
6615
+ function setFocus$1() {
6616
+ return {
6617
+ description: `Sets focus to the selected element.`,
6618
+ category: `Focus`,
6619
+ dependentProperties: ["selectedElement"]
6620
+ };
6621
+ }
6622
+
6623
+ //#endregion
6624
+ //#region src/operation/metadata/set-form-value.ts
6625
+ function setFormValue$1() {
6626
+ return {
6627
+ description: `Sets the value of an input, select, or textarea element.
6628
+
6629
+ Handles different input types appropriately:
6630
+ - Text inputs, textareas, selects: sets value directly
6631
+ - Checkboxes: sets checked property for boolean values
6632
+ - Radio buttons: sets checked property for boolean values
6633
+ - Number inputs: converts to string`,
6634
+ category: `Form`,
6635
+ dependentProperties: ["selectedElement"],
6636
+ properties: { value: {
6637
+ type: [
6638
+ { value: "string" },
6639
+ { value: "number" },
6640
+ { value: "false" },
6641
+ { value: "true" }
6642
+ ],
6643
+ required: true,
6644
+ erased: true
6645
+ } }
6646
+ };
6647
+ }
6648
+
4673
6649
  //#endregion
4674
6650
  //#region src/operation/metadata/set-global-data.ts
4675
6651
  function setGlobalData$1() {
4676
6652
  return {
4677
6653
  description: `This operation copies the specified properties from the operationData to the global data.`,
6654
+ category: `Data`,
4678
6655
  properties: { propertyNames: {
4679
6656
  type: "ParameterType:array",
4680
6657
  itemType: "ParameterType:string",
@@ -4690,6 +6667,7 @@ function setOperationData$1() {
4690
6667
  return {
4691
6668
  description: `This operation assigns the specified properties to the current operation data.
4692
6669
  When override is set to true the properties replace the current operation data entirely.`,
6670
+ category: `Data`,
4693
6671
  properties: {
4694
6672
  override: {
4695
6673
  type: "ParameterType:boolean",
@@ -4710,6 +6688,7 @@ function setStyle$1() {
4710
6688
  return {
4711
6689
  description: `This operation assigns the specified CSS style properties to the
4712
6690
  given selected element.`,
6691
+ category: `DOM`,
4713
6692
  dependentProperties: ["selectedElement"],
4714
6693
  properties: { properties: {
4715
6694
  type: "ParameterType:cssProperties",
@@ -4724,6 +6703,7 @@ given selected element.`,
4724
6703
  function setVariable$1() {
4725
6704
  return {
4726
6705
  description: `This operation sets a variable with the specified name on the scope with the specified value.`,
6706
+ category: `Data`,
4727
6707
  properties: {
4728
6708
  name: {
4729
6709
  type: "ParameterType:string",
@@ -4739,6 +6719,62 @@ function setVariable$1() {
4739
6719
  };
4740
6720
  }
4741
6721
 
6722
+ //#endregion
6723
+ //#region src/operation/metadata/sort-array.ts
6724
+ function sortArray$1() {
6725
+ return {
6726
+ description: `Sorts an array by property, natural order, or custom comparator function.
6727
+
6728
+ Operates on arrayData passed from previous operations.
6729
+ Supports three sorting modes:
6730
+ 1. Property sort: \`sortProperty\` and \`sortOrder\` to sort objects by property
6731
+ 2. Natural sort: \`sortOrder\` alone for primitive arrays
6732
+ 3. Custom comparator: \`sortComparator\` function for complex sorting logic`,
6733
+ category: `Array`,
6734
+ dependentProperties: ["arrayData"],
6735
+ properties: {
6736
+ sortProperty: {
6737
+ type: "ParameterType:string",
6738
+ erased: true
6739
+ },
6740
+ sortOrder: {
6741
+ type: [{ value: "asc" }, { value: "desc" }],
6742
+ erased: true
6743
+ },
6744
+ sortComparator: {
6745
+ type: "ParameterType:function",
6746
+ erased: true
6747
+ }
6748
+ },
6749
+ outputProperties: { sortedArray: { type: "ParameterType:array" } }
6750
+ };
6751
+ }
6752
+
6753
+ //#endregion
6754
+ //#region src/operation/metadata/split-string.ts
6755
+ function splitString$1() {
6756
+ return {
6757
+ description: `Splits a string into an array by delimiter (string or regex).`,
6758
+ category: `String`,
6759
+ dependentProperties: ["textContent"],
6760
+ properties: {
6761
+ delimiter: {
6762
+ type: [{ value: "string" }, { value: "RegExp" }],
6763
+ required: true,
6764
+ erased: true
6765
+ },
6766
+ limit: {
6767
+ type: "ParameterType:number",
6768
+ erased: true
6769
+ }
6770
+ },
6771
+ outputProperties: { resultArray: {
6772
+ type: "ParameterType:array",
6773
+ itemType: "ParameterType:string"
6774
+ } }
6775
+ };
6776
+ }
6777
+
4742
6778
  //#endregion
4743
6779
  //#region src/operation/metadata/start-action.ts
4744
6780
  function startAction$1() {
@@ -4748,6 +6784,7 @@ function startAction$1() {
4748
6784
  The action operation data is first merged with the current operation data before it is
4749
6785
  passed on to the action. After the action has completed the action operation data properties
4750
6786
  are removed from the current operation data.`,
6787
+ category: `Action`,
4751
6788
  dependentProperties: ["actionInstance"],
4752
6789
  properties: { actionOperationData: {
4753
6790
  type: "ParameterType:object",
@@ -4756,6 +6793,28 @@ are removed from the current operation data.`,
4756
6793
  };
4757
6794
  }
4758
6795
 
6796
+ //#endregion
6797
+ //#region src/operation/metadata/substring-text.ts
6798
+ function substringText$1() {
6799
+ return {
6800
+ description: `Extracts a substring from text between start and end indices.`,
6801
+ category: `Text`,
6802
+ dependentProperties: ["textContent"],
6803
+ properties: {
6804
+ start: {
6805
+ type: "ParameterType:number",
6806
+ required: true,
6807
+ erased: true
6808
+ },
6809
+ end: {
6810
+ type: "ParameterType:number",
6811
+ erased: true
6812
+ }
6813
+ },
6814
+ outputProperties: { substring: { type: "ParameterType:string" } }
6815
+ };
6816
+ }
6817
+
4759
6818
  //#endregion
4760
6819
  //#region src/operation/metadata/toggle-class.ts
4761
6820
  function toggleClass$1() {
@@ -4764,6 +6823,7 @@ function toggleClass$1() {
4764
6823
 
4765
6824
  Meaning, if the specified class name exists on the given element it will be removed,
4766
6825
  otherwise it will be added.`,
6826
+ category: `DOM`,
4767
6827
  dependentProperties: ["selectedElement"],
4768
6828
  properties: { className: {
4769
6829
  type: "ParameterType:className",
@@ -4781,15 +6841,56 @@ function toggleElement$1() {
4781
6841
 
4782
6842
  Meaning, if the element is hidden, it will be made visible, otherwise
4783
6843
  it will be hidden.`,
6844
+ category: `DOM`,
4784
6845
  dependentProperties: ["selectedElement"]
4785
6846
  };
4786
6847
  }
4787
6848
 
6849
+ //#endregion
6850
+ //#region src/operation/metadata/toggle-form-element.ts
6851
+ function toggleFormElement$1() {
6852
+ return {
6853
+ description: `Enables or disables form input elements (inputs, selects, textareas, buttons).
6854
+
6855
+ Sets the \`disabled\` property on the element. When \`enabled\` is true, removes the disabled
6856
+ attribute; when false, adds the disabled attribute.`,
6857
+ category: `Form`,
6858
+ dependentProperties: ["selectedElement"],
6859
+ properties: { enabled: {
6860
+ type: "ParameterType:boolean",
6861
+ required: true,
6862
+ erased: true
6863
+ } }
6864
+ };
6865
+ }
6866
+
6867
+ //#endregion
6868
+ //#region src/operation/metadata/validate-form.ts
6869
+ function validateForm$1() {
6870
+ return {
6871
+ description: `Validates form fields against HTML5 validation and custom rules.
6872
+
6873
+ Uses HTML5 validation API (checkValidity()) for native validation, and supports
6874
+ custom validation rules for: required, minLength, maxLength, pattern (regex), and email format.`,
6875
+ category: `Form`,
6876
+ dependentProperties: ["selectedElement"],
6877
+ properties: { validationRules: {
6878
+ type: "ParameterType:object",
6879
+ erased: true
6880
+ } },
6881
+ outputProperties: {
6882
+ validationErrors: { type: "ParameterType:object" },
6883
+ isValid: { type: "ParameterType:boolean" }
6884
+ }
6885
+ };
6886
+ }
6887
+
4788
6888
  //#endregion
4789
6889
  //#region src/operation/metadata/wait.ts
4790
6890
  function wait$1() {
4791
6891
  return {
4792
6892
  description: `This operation waits for the specified amount of milliseconds.`,
6893
+ category: `Utility`,
4793
6894
  properties: { milliseconds: {
4794
6895
  type: "ParameterType:number",
4795
6896
  required: true,
@@ -4815,6 +6916,7 @@ The left and right values of the expression can be defined like this:
4815
6916
  $operationData.foo: for an operation data value
4816
6917
  $globaldata.foo: for a global data value
4817
6918
  $scope.loopIndex: for a scope value`,
6919
+ category: `Control Flow`,
4818
6920
  properties: { expression: {
4819
6921
  type: "ParameterType:expression",
4820
6922
  required: true,
@@ -4825,17 +6927,21 @@ $scope.loopIndex: for a scope value`,
4825
6927
 
4826
6928
  //#endregion
4827
6929
  //#region src/operation/metadata/index.ts
4828
- var metadata_exports = /* @__PURE__ */ __export({
6930
+ var metadata_exports$2 = /* @__PURE__ */ __export({
4829
6931
  addClass: () => addClass$1,
4830
6932
  addControllerToElement: () => addControllerToElement$1,
4831
6933
  addGlobalsToOperation: () => addGlobalsToOperation$1,
4832
6934
  animate: () => animate$1,
4833
6935
  animateWithClass: () => animateWithClass$1,
6936
+ announceToScreenReader: () => announceToScreenReader$1,
4834
6937
  breakForEach: () => breakForEach$1,
4835
6938
  broadcastEvent: () => broadcastEvent$1,
4836
6939
  calc: () => calc$1,
4837
6940
  clearElement: () => clearElement$1,
4838
6941
  clearOperationData: () => clearOperationData$1,
6942
+ clearStorage: () => clearStorage$1,
6943
+ compareDate: () => compareDate$1,
6944
+ concatenateStrings: () => concatenateStrings$1,
4839
6945
  continueForEach: () => continueForEach$1,
4840
6946
  createElement: () => createElement$1,
4841
6947
  customFunction: () => customFunction$1,
@@ -4843,16 +6949,31 @@ var metadata_exports = /* @__PURE__ */ __export({
4843
6949
  endForEach: () => endForEach$1,
4844
6950
  endWhen: () => endWhen$1,
4845
6951
  extendController: () => extendController$1,
6952
+ filterArray: () => filterArray$1,
6953
+ findInArray: () => findInArray$1,
4846
6954
  forEach: () => forEach$1,
6955
+ formatDate: () => formatDate$1,
6956
+ formatText: () => formatText$1,
4847
6957
  getAttributesFromElement: () => getAttributesFromElement$1,
4848
6958
  getControllerFromElement: () => getControllerFromElement$1,
4849
6959
  getControllerInstance: () => getControllerInstance$1,
6960
+ getCurrentTime: () => getCurrentTime$1,
4850
6961
  getElementDimensions: () => getElementDimensions$1,
6962
+ getFocusedElement: () => getFocusedElement$1,
6963
+ getFormData: () => getFormData$1,
4851
6964
  getImport: () => getImport$1,
4852
6965
  getQueryParams: () => getQueryParams$1,
6966
+ getScrollPosition: () => getScrollPosition$1,
6967
+ getTextContent: () => getTextContent$1,
6968
+ httpDelete: () => httpDelete$1,
6969
+ httpPost: () => httpPost$1,
6970
+ httpPut: () => httpPut$1,
4853
6971
  invokeObjectMethod: () => invokeObjectMethod$1,
6972
+ isElementInViewport: () => isElementInViewport$1,
6973
+ loadFromStorage: () => loadFromStorage$1,
4854
6974
  loadJson: () => loadJson$1,
4855
6975
  log: () => log$1,
6976
+ mapArray: () => mapArray$1,
4856
6977
  math: () => math$1,
4857
6978
  otherwise: () => otherwise$1,
4858
6979
  removeClass: () => removeClass$1,
@@ -4860,18 +6981,30 @@ var metadata_exports = /* @__PURE__ */ __export({
4860
6981
  removeElement: () => removeElement$1,
4861
6982
  removePropertiesFromOperationData: () => removePropertiesFromOperationData$1,
4862
6983
  reparentElement: () => reparentElement$1,
4863
- requestAction: () => requestAction$1,
6984
+ replaceString: () => replaceString$1,
6985
+ replaceText: () => replaceText$1,
6986
+ requestAction: () => requestAction$2,
6987
+ saveToStorage: () => saveToStorage$1,
6988
+ scrollToElement: () => scrollToElement$1,
6989
+ scrollToPosition: () => scrollToPosition$1,
4864
6990
  selectElement: () => selectElement$1,
4865
6991
  setData: () => setData$1,
4866
6992
  setElementAttributes: () => setElementAttributes$1,
4867
6993
  setElementContent: () => setElementContent$1,
6994
+ setFocus: () => setFocus$1,
6995
+ setFormValue: () => setFormValue$1,
4868
6996
  setGlobalData: () => setGlobalData$1,
4869
6997
  setOperationData: () => setOperationData$1,
4870
6998
  setStyle: () => setStyle$1,
4871
6999
  setVariable: () => setVariable$1,
7000
+ sortArray: () => sortArray$1,
7001
+ splitString: () => splitString$1,
4872
7002
  startAction: () => startAction$1,
7003
+ substringText: () => substringText$1,
4873
7004
  toggleClass: () => toggleClass$1,
4874
7005
  toggleElement: () => toggleElement$1,
7006
+ toggleFormElement: () => toggleFormElement$1,
7007
+ validateForm: () => validateForm$1,
4875
7008
  wait: () => wait$1,
4876
7009
  when: () => when$1
4877
7010
  });
@@ -4905,7 +7038,7 @@ var ControllerNamesProvider = class {
4905
7038
  */
4906
7039
  var OperationMetadataProvider = class {
4907
7040
  getOperationMetadata(operationName) {
4908
- const getMetadata = metadata_exports[operationName];
7041
+ const getMetadata = metadata_exports$2[operationName];
4909
7042
  if (!getMetadata) throw new Error(`Could not find metadata for operation called ${operationName}`);
4910
7043
  return getMetadata();
4911
7044
  }
@@ -4917,7 +7050,42 @@ var OperationMetadataProvider = class {
4917
7050
  */
4918
7051
  var TimeLineEventNamesProvider = class {
4919
7052
  getEventNames() {
4920
- return Object.values(TimelineEventNames);
7053
+ return [
7054
+ "timeline-play-toggle-request",
7055
+ "timeline-play-request",
7056
+ "timeline-stop-request",
7057
+ "timeline-pause-request",
7058
+ "timeline-seek-request",
7059
+ "timeline-resize-request",
7060
+ "timeline-container-request",
7061
+ "timeline-duration-request",
7062
+ "timeline-request-current-timeline",
7063
+ "timeline-duration",
7064
+ "timeline-time",
7065
+ "timeline-seeked",
7066
+ "timeline-complete",
7067
+ "timeline-restart",
7068
+ "timeline-play",
7069
+ "timeline-stop",
7070
+ "timeline-pause",
7071
+ "timeline-seek",
7072
+ "timeline-resize",
7073
+ "timeline-current-timeline-change",
7074
+ "timeline-firstframe",
7075
+ "request-instance",
7076
+ "request-action",
7077
+ "request-function",
7078
+ "request-timeline-uri",
7079
+ "before-request-timeline-uri",
7080
+ "request-engine-root",
7081
+ "request-current-timeline-position",
7082
+ "request-timeline-cleanup",
7083
+ "request-label-collection",
7084
+ "request-label-collections",
7085
+ "request-current-language",
7086
+ "language-change",
7087
+ "dom-mutation"
7088
+ ];
4921
7089
  }
4922
7090
  };
4923
7091
 
@@ -5170,27 +7338,175 @@ function resolveActions(actionConfigurations, importer, eventbus$1) {
5170
7338
  }
5171
7339
  function resolvePlaceholders(configFragment, rootConfig, importer) {
5172
7340
  if (!isDefined(configFragment)) return;
5173
- if (Array.isArray(configFragment)) configFragment.forEach((item, index) => {
7341
+ if (Array.isArray(configFragment)) configFragment.forEach((item) => {
5174
7342
  resolvePlaceholders(item, rootConfig, importer);
5175
7343
  });
5176
7344
  else if (isObject(configFragment)) Object.keys(configFragment).forEach((key) => {
5177
7345
  resolvePlaceholder(key, configFragment, rootConfig, importer);
5178
7346
  });
5179
7347
  }
5180
- function resolvePlaceholder(key, configFragment, rootConfig, importer) {
5181
- const configValue = configFragment[key];
5182
- if (isString(configValue)) {
5183
- if (configValue.startsWith("config:")) configFragment[key] = resolvePropertyChain(configValue.substring(7, configValue.length), rootConfig);
5184
- else if (configValue.startsWith("template:")) {
5185
- const templateKey = configValue.substring(9, configValue.length);
5186
- configFragment[key] = importer.import(templateKey)[templateKey];
5187
- } else if (configValue.startsWith("json:")) {
5188
- const jsonKey = configValue.substring(5, configValue.length);
5189
- configFragment[key] = importer.import(jsonKey)[jsonKey];
7348
+ function resolvePlaceholder(key, configFragment, rootConfig, importer) {
7349
+ const configValue = configFragment[key];
7350
+ if (isString(configValue)) {
7351
+ if (configValue.startsWith("config:")) configFragment[key] = resolvePropertyChain(configValue.substring(7, configValue.length), rootConfig);
7352
+ else if (configValue.startsWith("template:")) {
7353
+ const templateKey = configValue.substring(9, configValue.length);
7354
+ configFragment[key] = importer.import(templateKey)[templateKey];
7355
+ } else if (configValue.startsWith("json:")) {
7356
+ const jsonKey = configValue.substring(5, configValue.length);
7357
+ configFragment[key] = importer.import(jsonKey)[jsonKey];
7358
+ }
7359
+ } else if (isObject(configValue) || Array.isArray(configValue)) resolvePlaceholders(configValue, rootConfig, importer);
7360
+ }
7361
+
7362
+ //#endregion
7363
+ //#region src/controllers/metadata/dom-event-listener-controller.ts
7364
+ function DOMEventListenerController$1() {
7365
+ return {
7366
+ description: `This controller attaches to the given selected element and adds a DOM event listener for the specified event name that
7367
+ executes the given actions with the given operation data.
7368
+
7369
+ By default the \`start\` operations of the specified actions are executed. To execute the \`end\` operations instead,
7370
+ prefix the action name with \`end:\`.`,
7371
+ dependentProperties: ["selectedElement"],
7372
+ properties: {
7373
+ eventName: {
7374
+ type: "ParameterType:eventName",
7375
+ required: true
7376
+ },
7377
+ actions: {
7378
+ type: "ParameterType:array",
7379
+ itemType: "ParameterType:string"
7380
+ },
7381
+ actionOperationData: { type: "ParameterType:object" }
7382
+ }
7383
+ };
7384
+ }
7385
+
7386
+ //#endregion
7387
+ //#region src/controllers/metadata/label-controller.ts
7388
+ function LabelController$1() {
7389
+ return {
7390
+ description: `This controller attaches to the given selected element and renders the text associated with the given label id in it.
7391
+
7392
+ The controller also listen for the \`LANGUAGE_CHANGE\` event and re-renders the text with the new language after such an event.`,
7393
+ dependentProperties: ["selectedElement"],
7394
+ properties: {
7395
+ labelId: {
7396
+ type: "ParameterType:labelId",
7397
+ required: true
7398
+ },
7399
+ attributeName: { type: "ParameterType:string" }
7400
+ }
7401
+ };
7402
+ }
7403
+
7404
+ //#endregion
7405
+ //#region src/controllers/metadata/lottie-controller.ts
7406
+ function LottieController$1() {
7407
+ return {
7408
+ description: `This controller renders a [lottie-web](https://github.com/airbnb/lottie-web) animation inside the given selected element.
7409
+
7410
+ The url may encode freeze and end positions like this: my-url/filename[freeze=10,end=21].json`,
7411
+ properties: { url: {
7412
+ type: "ParameterType:url",
7413
+ required: true
7414
+ } }
7415
+ };
7416
+ }
7417
+
7418
+ //#endregion
7419
+ //#region src/controllers/metadata/mutation-observer-controller.ts
7420
+ function MutationObserverController$1() {
7421
+ return {
7422
+ description: `Controller that observes DOM mutations on a selected element and broadcasts events.
7423
+
7424
+ This controller creates a MutationObserver to monitor DOM changes (attributes, child nodes,
7425
+ text content) on a specified element. All detected mutations are broadcasted through the
7426
+ Eligius eventbus, enabling reactive behavior in response to DOM changes.
7427
+
7428
+ The controller follows the standard Eligius lifecycle:
7429
+ - init(): Store configuration metadata
7430
+ - attach(): Create and start the MutationObserver
7431
+ - detach(): Disconnect the observer and clean up resources`,
7432
+ dependentProperties: ["selectedElement"],
7433
+ properties: {
7434
+ observeAttributes: { type: "ParameterType:boolean" },
7435
+ observeChildList: { type: "ParameterType:boolean" },
7436
+ observeCharacterData: { type: "ParameterType:boolean" },
7437
+ observeSubtree: { type: "ParameterType:boolean" },
7438
+ attributeOldValue: { type: "ParameterType:boolean" },
7439
+ characterDataOldValue: { type: "ParameterType:boolean" },
7440
+ attributeFilter: {
7441
+ type: "ParameterType:array",
7442
+ itemType: "ParameterType:string"
7443
+ }
7444
+ }
7445
+ };
7446
+ }
7447
+
7448
+ //#endregion
7449
+ //#region src/controllers/metadata/navigation-controller.ts
7450
+ function NavigationController$1() {
7451
+ return {
7452
+ description: ``,
7453
+ dependentProperties: ["selectedElement"],
7454
+ properties: { json: {
7455
+ type: "ParameterType:object",
7456
+ required: true
7457
+ } }
7458
+ };
7459
+ }
7460
+
7461
+ //#endregion
7462
+ //#region src/controllers/metadata/progressbar-controller.ts
7463
+ function ProgressbarController$1() {
7464
+ return {
7465
+ description: `This controller renders a progressbar that displays the progress of the current timeline in the given selected element.
7466
+
7467
+ The current progress as a percentage is rendered in the given text element.`,
7468
+ dependentProperties: ["selectedElement", "textElement"]
7469
+ };
7470
+ }
7471
+
7472
+ //#endregion
7473
+ //#region src/controllers/metadata/routing-controller.ts
7474
+ function RoutingController$1() {
7475
+ return {
7476
+ description: `This is a work in progress, do not use this yet please....`,
7477
+ properties: { json: {
7478
+ type: "ParameterType:object",
7479
+ required: true
7480
+ } }
7481
+ };
7482
+ }
7483
+
7484
+ //#endregion
7485
+ //#region src/controllers/metadata/subtitles-controller.ts
7486
+ function SubtitlesController$1() {
7487
+ return {
7488
+ description: ``,
7489
+ dependentProperties: ["selectedElement"],
7490
+ properties: {
7491
+ language: { type: "ParameterType:`${Lowercase<string>}-${Uppercase<string>}`" },
7492
+ subtitleData: { type: "ParameterType:array" }
5190
7493
  }
5191
- } else if (isObject(configValue) || Array.isArray(configValue)) resolvePlaceholders(configValue, rootConfig, importer);
7494
+ };
5192
7495
  }
5193
7496
 
7497
+ //#endregion
7498
+ //#region src/controllers/metadata/index.ts
7499
+ var metadata_exports = /* @__PURE__ */ __export({
7500
+ DOMEventListenerController: () => DOMEventListenerController$1,
7501
+ LabelController: () => LabelController$1,
7502
+ LottieController: () => LottieController$1,
7503
+ MutationObserverController: () => MutationObserverController$1,
7504
+ NavigationController: () => NavigationController$1,
7505
+ ProgressbarController: () => ProgressbarController$1,
7506
+ RoutingController: () => RoutingController$1,
7507
+ SubtitlesController: () => SubtitlesController$1
7508
+ });
7509
+
5194
7510
  //#endregion
5195
7511
  //#region src/eligius-engine.ts
5196
7512
  /**
@@ -5227,7 +7543,7 @@ var EligiusEngine = class EligiusEngine {
5227
7543
  const container = $(containerSelector);
5228
7544
  if (!container || !container.length) throw new Error(`Container selector not found: ${containerSelector}`);
5229
7545
  const { layoutTemplate } = this.configuration;
5230
- if (layoutTemplate && layoutTemplate.length) container.html(layoutTemplate);
7546
+ if (layoutTemplate?.length) container.html(layoutTemplate);
5231
7547
  else console.warn("layoutTemplate is empty, unable to create layout");
5232
7548
  }
5233
7549
  async _initializeTimelineProvider() {
@@ -5247,14 +7563,14 @@ var EligiusEngine = class EligiusEngine {
5247
7563
  return this._activeTimelineProvider;
5248
7564
  }
5249
7565
  _onCompleteCallback() {
5250
- this.eventbus.broadcast(TimelineEventNames.COMPLETE);
7566
+ this.eventbus.broadcast("timeline-complete", []);
5251
7567
  }
5252
7568
  _onFirstFrameCallback() {
5253
- this.eventbus.broadcast(TimelineEventNames.FIRST_FRAME);
5254
- this.eventbus.broadcast(TimelineEventNames.DURATION, [this._activeTimelineProvider?.getDuration]);
7569
+ this.eventbus.broadcast("timeline-firstframe", []);
7570
+ this.eventbus.broadcast("timeline-duration", [this._activeTimelineProvider?.getDuration]);
5255
7571
  }
5256
7572
  _onRestartCallback() {
5257
- this.eventbus.broadcast(TimelineEventNames.RESTART);
7573
+ this.eventbus.broadcast("timeline-restart", []);
5258
7574
  }
5259
7575
  async _cleanUp() {
5260
7576
  await this._cleanUpTimeline();
@@ -5281,18 +7597,18 @@ var EligiusEngine = class EligiusEngine {
5281
7597
  this._eventbusRemovers.push(this.eventbus.on(eventName, eventHandler, eventTopic));
5282
7598
  }
5283
7599
  _addEventbusListeners() {
5284
- this._addEventListener(TimelineEventNames.REQUEST_ENGINE_ROOT, this._handleRequestEngineRoot.bind(this, this.configuration.containerSelector));
5285
- this._addEventListener(TimelineEventNames.REQUEST_TIMELINE_URI, this._handleRequestTimelineUri.bind(this));
5286
- this._addEventListener(TimelineEventNames.REQUEST_CURRENT_TIMELINE_POSITION, this._handleRequestTimelinePosition.bind(this, Math.floor));
5287
- this._addEventListener(TimelineEventNames.REQUEST_TIMELINE_CLEANUP, this._handleTimelineComplete.bind(this));
5288
- this._addEventListener(TimelineEventNames.REQUEST_CURRENT_TIMELINE, this._requestCurrentTimeline.bind(this));
5289
- this._addEventListener(TimelineEventNames.PLAY_TOGGLE_REQUEST, this._toggleplay.bind(this));
5290
- this._addEventListener(TimelineEventNames.PLAY_REQUEST, this._playRequest.bind(this));
5291
- this._addEventListener(TimelineEventNames.STOP_REQUEST, this._stopRequest.bind(this));
5292
- this._addEventListener(TimelineEventNames.PAUSE_REQUEST, this._pauseRequest.bind(this));
5293
- this._addEventListener(TimelineEventNames.CONTAINER_REQUEST, this.containerRequest.bind(this));
5294
- this._addEventListener(TimelineEventNames.DURATION_REQUEST, this.durationRequest.bind(this));
5295
- this._addEventListener(TimelineEventNames.SEEK_REQUEST, this.seekRequest.bind(this));
7600
+ this._addEventListener("request-engine-root", this._handleRequestEngineRoot.bind(this, this.configuration.containerSelector));
7601
+ this._addEventListener("request-timeline-uri", this._handleRequestTimelineUri.bind(this));
7602
+ this._addEventListener("request-current-timeline-position", this._handleRequestTimelinePosition.bind(this, Math.floor));
7603
+ this._addEventListener("request-timeline-cleanup", this._handleTimelineComplete.bind(this));
7604
+ this._addEventListener("timeline-request-current-timeline", this._requestCurrentTimeline.bind(this));
7605
+ this._addEventListener("timeline-play-toggle-request", this._toggleplay.bind(this));
7606
+ this._addEventListener("timeline-play-request", this._playRequest.bind(this));
7607
+ this._addEventListener("timeline-stop-request", this._stopRequest.bind(this));
7608
+ this._addEventListener("timeline-pause-request", this._pauseRequest.bind(this));
7609
+ this._addEventListener("timeline-container-request", this.containerRequest.bind(this));
7610
+ this._addEventListener("timeline-duration-request", this.durationRequest.bind(this));
7611
+ this._addEventListener("timeline-seek-request", this.seekRequest.bind(this));
5296
7612
  }
5297
7613
  async seekRequest(position) {
5298
7614
  if (!this._activeTimelineProvider) return;
@@ -5300,15 +7616,15 @@ var EligiusEngine = class EligiusEngine {
5300
7616
  const duration = this._activeTimelineProvider.getDuration();
5301
7617
  const currentPosition = this._activeTimelineProvider.getPosition();
5302
7618
  if (seekPosition < 0 || seekPosition > duration) return;
5303
- this.eventbus.broadcast(TimelineEventNames.SEEK, [
7619
+ this.eventbus.broadcast("timeline-seek", [
5304
7620
  seekPosition,
5305
7621
  currentPosition,
5306
7622
  duration
5307
7623
  ]);
5308
7624
  await this._activeTimelineProvider.seek(seekPosition);
5309
7625
  await this._executeSeekActions(seekPosition);
5310
- this.eventbus.broadcast(TimelineEventNames.SEEKED, [this._activeTimelineProvider.getPosition(), duration]);
5311
- this.eventbus.broadcast(TimelineEventNames.TIME, [this._activeTimelineProvider.getPosition()]);
7626
+ this.eventbus.broadcast("timeline-seeked", [this._activeTimelineProvider.getPosition(), duration]);
7627
+ this.eventbus.broadcast("timeline-time", [this._activeTimelineProvider.getPosition()]);
5312
7628
  if (this._activeTimelineProvider?.playState === "running") this._activeTimelineProvider?.start();
5313
7629
  }
5314
7630
  durationRequest(callBack) {
@@ -5320,17 +7636,17 @@ var EligiusEngine = class EligiusEngine {
5320
7636
  _pauseRequest() {
5321
7637
  if (!this._activeTimelineProvider) return;
5322
7638
  this._activeTimelineProvider.pause();
5323
- this.eventbus.broadcast(TimelineEventNames.PAUSE);
7639
+ this.eventbus.broadcast("timeline-pause", []);
5324
7640
  }
5325
7641
  _stopRequest() {
5326
7642
  if (!this._activeTimelineProvider) return;
5327
7643
  this._activeTimelineProvider.stop();
5328
- this.eventbus.broadcast(TimelineEventNames.STOP);
7644
+ this.eventbus.broadcast("timeline-stop", []);
5329
7645
  }
5330
7646
  _playRequest() {
5331
7647
  if (!this._activeTimelineProvider) return;
5332
7648
  this._activeTimelineProvider.start();
5333
- this.eventbus.broadcast(TimelineEventNames.PLAY);
7649
+ this.eventbus.broadcast("timeline-play", []);
5334
7650
  }
5335
7651
  _toggleplay() {
5336
7652
  if (!this._activeTimelineProvider) return;
@@ -5375,7 +7691,7 @@ var EligiusEngine = class EligiusEngine {
5375
7691
  _addTimelineActionEnd(uri, timeLineAction) {
5376
7692
  let end = timeLineAction.duration.end;
5377
7693
  if (end < 0) end = timeLineAction.duration.end = Infinity;
5378
- if (isFinite(end)) {
7694
+ if (Number.isFinite(end)) {
5379
7695
  const timelineEndPositions = this._initializeTimelinePosition(this._timeLineActionsLookup[uri], end);
5380
7696
  const endMethod = timeLineAction.end.bind(timeLineAction);
5381
7697
  if (timeLineAction.id?.length) {
@@ -5408,17 +7724,17 @@ var EligiusEngine = class EligiusEngine {
5408
7724
  const timelineConfig = this._timelineLookupCache.get(uri);
5409
7725
  if (!timelineConfig || !this._activeTimelineProvider || this._currentTimelineUri === timelineConfig.uri) return;
5410
7726
  this._currentTimelineUri = timelineConfig.uri;
5411
- this.eventbus.broadcast(TimelineEventNames.CURRENT_TIMELINE_CHANGE, [this._currentTimelineUri]);
7727
+ this.eventbus.broadcast("timeline-current-timeline-change", [this._currentTimelineUri]);
5412
7728
  const newProviderSettings = this.timelineProviders[timelineConfig.type];
5413
7729
  if (this._activeTimelineProvider !== newProviderSettings.provider) {
5414
7730
  this._activeTimelineProvider.destroy();
5415
7731
  this._activeTimelineProvider = newProviderSettings.provider;
5416
7732
  }
5417
7733
  this._activeTimelineProvider.loop = timelineConfig.loop;
5418
- if (!this._activeTimelineProvider.loop && position > 0) this.eventbus.once(TimelineEventNames.FIRST_FRAME, async () => {
7734
+ if (!this._activeTimelineProvider.loop && position > 0) this.eventbus.once("timeline-firstframe", async () => {
5419
7735
  if (!this._activeTimelineProvider) return;
5420
7736
  this._activeTimelineProvider.pause();
5421
- this.eventbus.broadcast(TimelineEventNames.DURATION, [this._activeTimelineProvider.getDuration()]);
7737
+ this.eventbus.broadcast("timeline-duration", [this._activeTimelineProvider.getDuration]);
5422
7738
  await this._executeStartActions();
5423
7739
  const seekPosition = await this._activeTimelineProvider.seek(position);
5424
7740
  this.seekRequest(seekPosition);
@@ -5465,11 +7781,11 @@ var EligiusEngine = class EligiusEngine {
5465
7781
  return this._timelineLookupCache.get(uri)?.timelineActions ?? [];
5466
7782
  }
5467
7783
  _onTimeHandler(floor, position) {
5468
- if (!isNaN(position)) {
7784
+ if (!Number.isNaN(position)) {
5469
7785
  const pos = floor(position);
5470
7786
  if (this._lastPosition !== pos) {
5471
7787
  this._executeActionsForPosition(pos);
5472
- this.eventbus.broadcast(TimelineEventNames.TIME, [pos]);
7788
+ this.eventbus.broadcast("timeline-time", [pos]);
5473
7789
  }
5474
7790
  }
5475
7791
  }
@@ -5508,7 +7824,7 @@ const sortActionMethodsHighestStartPositionFirst = (a, b) => {
5508
7824
  var ActionRegistryEventbusListener = class {
5509
7825
  _actionRegistry = /* @__PURE__ */ new Map();
5510
7826
  registerAction(action, eventName, eventTopic) {
5511
- if (eventTopic && eventTopic.length) eventName = `${eventName}:${eventTopic}`;
7827
+ if (eventTopic?.length) eventName = `${eventName}:${eventTopic}`;
5512
7828
  if (!this._actionRegistry.has(eventName)) this._actionRegistry.set(eventName, []);
5513
7829
  this._actionRegistry.get(eventName)?.push(action);
5514
7830
  }
@@ -5614,7 +7930,7 @@ var RequestVideoUriInterceptor = class {
5614
7930
  this.eventbus = eventbus$1;
5615
7931
  }
5616
7932
  intercept(args) {
5617
- this.eventbus.broadcast(TimelineEventNames.BEFORE_REQUEST_TIMELINE_URI, args.slice());
7933
+ this.eventbus.broadcast("before-request-timeline-uri", args.slice());
5618
7934
  return args;
5619
7935
  }
5620
7936
  };
@@ -5639,7 +7955,7 @@ function setGlobal(name, value) {
5639
7955
  /**
5640
7956
  * This class manages the labels for an {@link IEligiusEngine} instance.
5641
7957
  *
5642
- * It handles the {@link TimelineEventNames.REQUEST_LABEL_COLLECTION}, {@link TimelineEventNames.REQUEST_LABEL_COLLECTIONS}, {@link TimelineEventNames.REQUEST_CURRENT_LANGUAGE} and {@link TimelineEventNames.LANGUAGE_CHANGE} events.
7958
+ * It handles the request-label-collection, request-label-collections, request-current-language and language-change events.
5643
7959
  *
5644
7960
  */
5645
7961
  var LanguageManager = class {
@@ -5658,10 +7974,10 @@ var LanguageManager = class {
5658
7974
  this._eventbusRemovers.forEach((x) => x());
5659
7975
  }
5660
7976
  _addEventbusListeners(eventbus$1) {
5661
- this._eventbusRemovers.push(eventbus$1.on(TimelineEventNames.REQUEST_LABEL_COLLECTION, this._handleRequestLabelCollection.bind(this)));
5662
- this._eventbusRemovers.push(eventbus$1.on(TimelineEventNames.REQUEST_LABEL_COLLECTIONS, this._handleRequestLabelCollections.bind(this)));
5663
- this._eventbusRemovers.push(eventbus$1.on(TimelineEventNames.REQUEST_CURRENT_LANGUAGE, this._handleRequestCurrentLanguage.bind(this)));
5664
- this._eventbusRemovers.push(eventbus$1.on(TimelineEventNames.LANGUAGE_CHANGE, this._handleLanguageChange.bind(this)));
7977
+ this._eventbusRemovers.push(eventbus$1.on("request-label-collection", this._handleRequestLabelCollection.bind(this)));
7978
+ this._eventbusRemovers.push(eventbus$1.on("request-label-collections", this._handleRequestLabelCollections.bind(this)));
7979
+ this._eventbusRemovers.push(eventbus$1.on("request-current-language", this._handleRequestCurrentLanguage.bind(this)));
7980
+ this._eventbusRemovers.push(eventbus$1.on("language-change", this._handleLanguageChange.bind(this)));
5665
7981
  }
5666
7982
  _handleRequestCurrentLanguage(resultCallback) {
5667
7983
  resultCallback(this._currentLanguage);
@@ -5683,7 +7999,7 @@ var LanguageManager = class {
5683
7999
  const lang = this._extractPrimaryLanguage(language);
5684
8000
  $(rootSelector).attr("lang", lang);
5685
8001
  };
5686
- this._eventbus.broadcast(TimelineEventNames.REQUEST_ENGINE_ROOT, [callBack]);
8002
+ this._eventbus.broadcast("request-engine-root", [callBack]);
5687
8003
  }
5688
8004
  _extractPrimaryLanguage(culture) {
5689
8005
  return culture.split("-").shift();
@@ -5727,9 +8043,9 @@ var EngineFactory = class {
5727
8043
  this._eventbus = options?.eventbus ?? new Eventbus();
5728
8044
  Diagnostics.active = options?.devtools ?? false;
5729
8045
  if (Diagnostics.active) this._initializeDevtools(this._eventbus);
5730
- this._eventRemovers.push(this._eventbus.on(TimelineEventNames.REQUEST_INSTANCE, this._requestInstanceHandler.bind(this)));
5731
- this._eventRemovers.push(this._eventbus.on(TimelineEventNames.REQUEST_ACTION, this._requestActionHandler.bind(this)));
5732
- this._eventRemovers.push(this._eventbus.on(TimelineEventNames.REQUEST_FUNCTION, this._requestFunctionHandler.bind(this)));
8046
+ this._eventRemovers.push(this._eventbus.on("request-instance", this._requestInstanceHandler.bind(this)));
8047
+ this._eventRemovers.push(this._eventbus.on("request-action", this._requestActionHandler.bind(this)));
8048
+ this._eventRemovers.push(this._eventbus.on("request-function", this._requestFunctionHandler.bind(this)));
5733
8049
  const handleSpaceBound = this._handleSpacePress.bind(this);
5734
8050
  hotkeys("space", handleSpaceBound);
5735
8051
  this._eventRemovers.push(() => hotkeys.unbind("space", handleSpaceBound));
@@ -5740,7 +8056,7 @@ var EngineFactory = class {
5740
8056
  }
5741
8057
  _handleSpacePress(keyboardEvent, _hotkeysEvent) {
5742
8058
  keyboardEvent.preventDefault();
5743
- this._eventbus.broadcast(TimelineEventNames.PLAY_TOGGLE_REQUEST);
8059
+ this._eventbus.broadcast("timeline-play-toggle-request", []);
5744
8060
  return false;
5745
8061
  }
5746
8062
  _initializeDevtools(eventbus$1) {
@@ -5751,16 +8067,16 @@ var EngineFactory = class {
5751
8067
  this._eventRemovers.push(agent.subscribe((message) => {
5752
8068
  if (message.type === "playcontrol") switch (message.data.kind) {
5753
8069
  case "play":
5754
- this._eventbus.broadcast(TimelineEventNames.PLAY_REQUEST);
8070
+ this._eventbus.broadcast("timeline-play-request", []);
5755
8071
  break;
5756
8072
  case "stop":
5757
- this._eventbus.broadcast(TimelineEventNames.STOP_REQUEST);
8073
+ this._eventbus.broadcast("timeline-stop-request", []);
5758
8074
  break;
5759
8075
  case "pause":
5760
- this._eventbus.broadcast(TimelineEventNames.PAUSE_REQUEST);
8076
+ this._eventbus.broadcast("timeline-pause-request", []);
5761
8077
  break;
5762
8078
  case "seek":
5763
- this._eventbus.broadcast(TimelineEventNames.SEEK_REQUEST, [message.data.args]);
8079
+ this._eventbus.broadcast("timeline-seek-request", [message.data.args ?? 0]);
5764
8080
  break;
5765
8081
  }
5766
8082
  }));
@@ -5786,7 +8102,7 @@ var EngineFactory = class {
5786
8102
  this._resizeTimeout = -1;
5787
8103
  }
5788
8104
  this._resizeTimeout = setTimeout(() => {
5789
- this._eventbus.broadcast(TimelineEventNames.RESIZE);
8105
+ this._eventbus.broadcast("timeline-resize", []);
5790
8106
  }, 200);
5791
8107
  }
5792
8108
  _importSystemEntryWithEventbusDependency(systemName) {
@@ -5817,7 +8133,7 @@ var EngineFactory = class {
5817
8133
  actionRegistryListener = new ActionRegistryEventbusListener();
5818
8134
  this._eventRemovers.push(this._eventbus.registerEventlistener(actionRegistryListener));
5819
8135
  }
5820
- this._eventRemovers.push(this._eventbus.registerInterceptor(TimelineEventNames.REQUEST_TIMELINE_URI, new RequestVideoUriInterceptor(this._eventbus)));
8136
+ this._eventRemovers.push(this._eventbus.registerInterceptor("request-timeline-uri", new RequestVideoUriInterceptor(this._eventbus)));
5821
8137
  resolver = resolver || new ConfigurationResolver(this._importer, this._eventbus);
5822
8138
  const [actionLookup, resolvedConfiguration] = resolver.process(configuration, actionRegistryListener);
5823
8139
  this._actionsLookup = actionLookup;
@@ -5841,6 +8157,610 @@ var EngineFactory = class {
5841
8157
  }
5842
8158
  };
5843
8159
 
8160
+ //#endregion
8161
+ //#region src/eventbus/events/metadata/before-request-timeline-uri.ts
8162
+ function beforeRequestTimelineUri() {
8163
+ return {
8164
+ description: `Event: before-request-timeline-uri`,
8165
+ category: `Timeline`,
8166
+ args: []
8167
+ };
8168
+ }
8169
+
8170
+ //#endregion
8171
+ //#region src/eventbus/events/metadata/before-request-video-url.ts
8172
+ function beforeRequestVideoUrl() {
8173
+ return {
8174
+ description: `Event: before-request-video-url`,
8175
+ category: `Navigation`,
8176
+ args: [
8177
+ {
8178
+ name: "index",
8179
+ type: "number"
8180
+ },
8181
+ {
8182
+ name: "requestedVideoPosition",
8183
+ type: "number"
8184
+ },
8185
+ {
8186
+ name: "isHistoryRequest",
8187
+ type: "boolean"
8188
+ }
8189
+ ]
8190
+ };
8191
+ }
8192
+
8193
+ //#endregion
8194
+ //#region src/eventbus/events/metadata/dom-mutation.ts
8195
+ function domMutation() {
8196
+ return {
8197
+ description: `Event: dom-mutation`,
8198
+ category: `Controller`,
8199
+ args: [{
8200
+ name: "payload",
8201
+ type: "any"
8202
+ }]
8203
+ };
8204
+ }
8205
+
8206
+ //#endregion
8207
+ //#region src/eventbus/events/metadata/highlight-navigation.ts
8208
+ function highlightNavigation() {
8209
+ return {
8210
+ description: `Event: highlight-navigation`,
8211
+ category: `Navigation`,
8212
+ args: [{
8213
+ name: "videoUrlIndex",
8214
+ type: "number"
8215
+ }]
8216
+ };
8217
+ }
8218
+
8219
+ //#endregion
8220
+ //#region src/eventbus/events/metadata/language-change.ts
8221
+ function languageChange() {
8222
+ return {
8223
+ description: `Event: language-change`,
8224
+ category: `Language Manager`,
8225
+ args: [{
8226
+ name: "language",
8227
+ type: "TLanguageCode"
8228
+ }]
8229
+ };
8230
+ }
8231
+
8232
+ //#endregion
8233
+ //#region src/eventbus/events/metadata/navigate-to-video-url.ts
8234
+ function navigateToVideoUrl() {
8235
+ return {
8236
+ description: `Event: navigate-to-video-url`,
8237
+ category: `Navigation`,
8238
+ args: [{
8239
+ name: "index",
8240
+ type: "number"
8241
+ }, {
8242
+ name: "requestedVideoPosition",
8243
+ type: "number"
8244
+ }]
8245
+ };
8246
+ }
8247
+
8248
+ //#endregion
8249
+ //#region src/eventbus/events/metadata/push-history-state.ts
8250
+ function pushHistoryState() {
8251
+ return {
8252
+ description: `Event: push-history-state`,
8253
+ category: `Navigation`,
8254
+ args: [{
8255
+ name: "state",
8256
+ type: "any"
8257
+ }]
8258
+ };
8259
+ }
8260
+
8261
+ //#endregion
8262
+ //#region src/eventbus/events/metadata/request-action.ts
8263
+ function requestAction$1() {
8264
+ return {
8265
+ description: `Event: request-action`,
8266
+ category: `Engine Request`,
8267
+ args: [{
8268
+ name: "actionName",
8269
+ type: "string"
8270
+ }, {
8271
+ name: "callback",
8272
+ type: "(actionInstance: any) => void"
8273
+ }]
8274
+ };
8275
+ }
8276
+
8277
+ //#endregion
8278
+ //#region src/eventbus/events/metadata/request-current-language.ts
8279
+ function requestCurrentLanguage() {
8280
+ return {
8281
+ description: `Event: request-current-language`,
8282
+ category: `Engine Request`,
8283
+ args: [{
8284
+ name: "callback",
8285
+ type: "(language: TLanguageCode) => void"
8286
+ }]
8287
+ };
8288
+ }
8289
+
8290
+ //#endregion
8291
+ //#region src/eventbus/events/metadata/request-current-navigation.ts
8292
+ function requestCurrentNavigation() {
8293
+ return {
8294
+ description: `Event: request-current-navigation`,
8295
+ category: `Navigation`,
8296
+ args: [{
8297
+ name: "callback",
8298
+ type: "(navigation: any) => void"
8299
+ }]
8300
+ };
8301
+ }
8302
+
8303
+ //#endregion
8304
+ //#region src/eventbus/events/metadata/request-current-timeline-position.ts
8305
+ function requestCurrentTimelinePosition() {
8306
+ return {
8307
+ description: `Event: request-current-timeline-position`,
8308
+ category: `Engine Request`,
8309
+ args: []
8310
+ };
8311
+ }
8312
+
8313
+ //#endregion
8314
+ //#region src/eventbus/events/metadata/request-current-video-position.ts
8315
+ function requestCurrentVideoPosition() {
8316
+ return {
8317
+ description: `Event: request-current-video-position`,
8318
+ category: `Navigation`,
8319
+ args: [{
8320
+ name: "callback",
8321
+ type: "(position: number) => void"
8322
+ }]
8323
+ };
8324
+ }
8325
+
8326
+ //#endregion
8327
+ //#region src/eventbus/events/metadata/request-engine-root.ts
8328
+ function requestEngineRoot() {
8329
+ return {
8330
+ description: `Event: request-engine-root`,
8331
+ category: `Engine Request`,
8332
+ args: [{
8333
+ name: "callback",
8334
+ type: "(root: any) => void"
8335
+ }]
8336
+ };
8337
+ }
8338
+
8339
+ //#endregion
8340
+ //#region src/eventbus/events/metadata/request-function.ts
8341
+ function requestFunction() {
8342
+ return {
8343
+ description: `Event: request-function`,
8344
+ category: `Engine Request`,
8345
+ args: [{
8346
+ name: "systemName",
8347
+ type: "string"
8348
+ }, {
8349
+ name: "callback",
8350
+ type: "(fn: any) => void"
8351
+ }]
8352
+ };
8353
+ }
8354
+
8355
+ //#endregion
8356
+ //#region src/eventbus/events/metadata/request-instance.ts
8357
+ function requestInstance() {
8358
+ return {
8359
+ description: `Event: request-instance`,
8360
+ category: `Engine Request`,
8361
+ args: [{
8362
+ name: "instanceName",
8363
+ type: "string"
8364
+ }, {
8365
+ name: "callback",
8366
+ type: "(instance: any) => void"
8367
+ }]
8368
+ };
8369
+ }
8370
+
8371
+ //#endregion
8372
+ //#region src/eventbus/events/metadata/request-label-collection.ts
8373
+ function requestLabelCollection() {
8374
+ return {
8375
+ description: `Event: request-label-collection`,
8376
+ category: `Engine Request`,
8377
+ args: [{
8378
+ name: "language",
8379
+ type: "string"
8380
+ }, {
8381
+ name: "callback",
8382
+ type: "(collection: any) => void"
8383
+ }]
8384
+ };
8385
+ }
8386
+
8387
+ //#endregion
8388
+ //#region src/eventbus/events/metadata/request-label-collections.ts
8389
+ function requestLabelCollections() {
8390
+ return {
8391
+ description: `Event: request-label-collections`,
8392
+ category: `Engine Request`,
8393
+ args: [{
8394
+ name: "labelIds",
8395
+ type: "string[]"
8396
+ }, {
8397
+ name: "callback",
8398
+ type: "(collections: any) => void"
8399
+ }]
8400
+ };
8401
+ }
8402
+
8403
+ //#endregion
8404
+ //#region src/eventbus/events/metadata/request-timeline-cleanup.ts
8405
+ function requestTimelineCleanup() {
8406
+ return {
8407
+ description: `Event: request-timeline-cleanup`,
8408
+ category: `Engine Request`,
8409
+ args: []
8410
+ };
8411
+ }
8412
+
8413
+ //#endregion
8414
+ //#region src/eventbus/events/metadata/request-timeline-uri.ts
8415
+ function requestTimelineUri() {
8416
+ return {
8417
+ description: `Event: request-timeline-uri`,
8418
+ category: `Engine Request`,
8419
+ args: []
8420
+ };
8421
+ }
8422
+
8423
+ //#endregion
8424
+ //#region src/eventbus/events/metadata/request-video-cleanup.ts
8425
+ function requestVideoCleanup() {
8426
+ return {
8427
+ description: `Event: request-video-cleanup`,
8428
+ category: `Navigation`,
8429
+ args: []
8430
+ };
8431
+ }
8432
+
8433
+ //#endregion
8434
+ //#region src/eventbus/events/metadata/request-video-url.ts
8435
+ function requestVideoUrl() {
8436
+ return {
8437
+ description: `Event: request-video-url`,
8438
+ category: `Navigation`,
8439
+ args: [
8440
+ {
8441
+ name: "videoUrlIndex",
8442
+ type: "number"
8443
+ },
8444
+ {
8445
+ name: "requestedVideoPosition",
8446
+ type: "number"
8447
+ },
8448
+ {
8449
+ name: "fromRouting",
8450
+ type: "boolean"
8451
+ }
8452
+ ]
8453
+ };
8454
+ }
8455
+
8456
+ //#endregion
8457
+ //#region src/eventbus/events/metadata/timeline-complete.ts
8458
+ function timelineComplete() {
8459
+ return {
8460
+ description: `Event: timeline-complete`,
8461
+ category: `Timeline`,
8462
+ args: []
8463
+ };
8464
+ }
8465
+
8466
+ //#endregion
8467
+ //#region src/eventbus/events/metadata/timeline-container-request.ts
8468
+ function timelineContainerRequest() {
8469
+ return {
8470
+ description: `Event: timeline-container-request`,
8471
+ category: `Timeline`,
8472
+ args: [{
8473
+ name: "callback",
8474
+ type: "(element: HTMLElement) => void"
8475
+ }]
8476
+ };
8477
+ }
8478
+
8479
+ //#endregion
8480
+ //#region src/eventbus/events/metadata/timeline-current-timeline-change.ts
8481
+ function timelineCurrentTimelineChange() {
8482
+ return {
8483
+ description: `Event: timeline-current-timeline-change`,
8484
+ category: `Timeline`,
8485
+ args: [{
8486
+ name: "timelineUri",
8487
+ type: "string"
8488
+ }]
8489
+ };
8490
+ }
8491
+
8492
+ //#endregion
8493
+ //#region src/eventbus/events/metadata/timeline-duration-request.ts
8494
+ function timelineDurationRequest() {
8495
+ return {
8496
+ description: `Event: timeline-duration-request`,
8497
+ category: `Timeline`,
8498
+ args: [{
8499
+ name: "callback",
8500
+ type: "(duration: number) => void"
8501
+ }]
8502
+ };
8503
+ }
8504
+
8505
+ //#endregion
8506
+ //#region src/eventbus/events/metadata/timeline-duration.ts
8507
+ function timelineDuration() {
8508
+ return {
8509
+ description: `Event: timeline-duration`,
8510
+ category: `Timeline`,
8511
+ args: [{
8512
+ name: "getDuration",
8513
+ type: "(() => number) | undefined"
8514
+ }]
8515
+ };
8516
+ }
8517
+
8518
+ //#endregion
8519
+ //#region src/eventbus/events/metadata/timeline-firstframe.ts
8520
+ function timelineFirstframe() {
8521
+ return {
8522
+ description: `Event: timeline-firstframe`,
8523
+ category: `Timeline`,
8524
+ args: []
8525
+ };
8526
+ }
8527
+
8528
+ //#endregion
8529
+ //#region src/eventbus/events/metadata/timeline-pause-request.ts
8530
+ function timelinePauseRequest() {
8531
+ return {
8532
+ description: `Event: timeline-pause-request`,
8533
+ category: `Timeline`,
8534
+ args: []
8535
+ };
8536
+ }
8537
+
8538
+ //#endregion
8539
+ //#region src/eventbus/events/metadata/timeline-pause.ts
8540
+ function timelinePause() {
8541
+ return {
8542
+ description: `Event: timeline-pause`,
8543
+ category: `Timeline`,
8544
+ args: []
8545
+ };
8546
+ }
8547
+
8548
+ //#endregion
8549
+ //#region src/eventbus/events/metadata/timeline-play-request.ts
8550
+ function timelinePlayRequest() {
8551
+ return {
8552
+ description: `Event: timeline-play-request`,
8553
+ category: `Timeline`,
8554
+ args: []
8555
+ };
8556
+ }
8557
+
8558
+ //#endregion
8559
+ //#region src/eventbus/events/metadata/timeline-play-toggle-request.ts
8560
+ function timelinePlayToggleRequest() {
8561
+ return {
8562
+ description: `Event: timeline-play-toggle-request`,
8563
+ category: `Timeline`,
8564
+ args: []
8565
+ };
8566
+ }
8567
+
8568
+ //#endregion
8569
+ //#region src/eventbus/events/metadata/timeline-play.ts
8570
+ function timelinePlay() {
8571
+ return {
8572
+ description: `Event: timeline-play`,
8573
+ category: `Timeline`,
8574
+ args: []
8575
+ };
8576
+ }
8577
+
8578
+ //#endregion
8579
+ //#region src/eventbus/events/metadata/timeline-request-current-timeline.ts
8580
+ function timelineRequestCurrentTimeline() {
8581
+ return {
8582
+ description: `Event: timeline-request-current-timeline`,
8583
+ category: `Engine Request`,
8584
+ args: []
8585
+ };
8586
+ }
8587
+
8588
+ //#endregion
8589
+ //#region src/eventbus/events/metadata/timeline-resize-request.ts
8590
+ function timelineResizeRequest() {
8591
+ return {
8592
+ description: `Event: timeline-resize-request`,
8593
+ category: `Timeline`,
8594
+ args: []
8595
+ };
8596
+ }
8597
+
8598
+ //#endregion
8599
+ //#region src/eventbus/events/metadata/timeline-resize.ts
8600
+ function timelineResize() {
8601
+ return {
8602
+ description: `Event: timeline-resize`,
8603
+ category: `Timeline`,
8604
+ args: []
8605
+ };
8606
+ }
8607
+
8608
+ //#endregion
8609
+ //#region src/eventbus/events/metadata/timeline-restart.ts
8610
+ function timelineRestart() {
8611
+ return {
8612
+ description: `Event: timeline-restart`,
8613
+ category: `Timeline`,
8614
+ args: []
8615
+ };
8616
+ }
8617
+
8618
+ //#endregion
8619
+ //#region src/eventbus/events/metadata/timeline-seek-request.ts
8620
+ function timelineSeekRequest() {
8621
+ return {
8622
+ description: `Event: timeline-seek-request`,
8623
+ category: `Timeline`,
8624
+ args: [{
8625
+ name: "position",
8626
+ type: "number"
8627
+ }]
8628
+ };
8629
+ }
8630
+
8631
+ //#endregion
8632
+ //#region src/eventbus/events/metadata/timeline-seek.ts
8633
+ function timelineSeek() {
8634
+ return {
8635
+ description: `Event: timeline-seek`,
8636
+ category: `Timeline`,
8637
+ args: [
8638
+ {
8639
+ name: "seekPosition",
8640
+ type: "number"
8641
+ },
8642
+ {
8643
+ name: "currentPosition",
8644
+ type: "number"
8645
+ },
8646
+ {
8647
+ name: "duration",
8648
+ type: "number"
8649
+ }
8650
+ ]
8651
+ };
8652
+ }
8653
+
8654
+ //#endregion
8655
+ //#region src/eventbus/events/metadata/timeline-seeked.ts
8656
+ function timelineSeeked() {
8657
+ return {
8658
+ description: `Event: timeline-seeked`,
8659
+ category: `Timeline`,
8660
+ args: [{
8661
+ name: "position",
8662
+ type: "number"
8663
+ }, {
8664
+ name: "duration",
8665
+ type: "number"
8666
+ }]
8667
+ };
8668
+ }
8669
+
8670
+ //#endregion
8671
+ //#region src/eventbus/events/metadata/timeline-stop-request.ts
8672
+ function timelineStopRequest() {
8673
+ return {
8674
+ description: `Event: timeline-stop-request`,
8675
+ category: `Timeline`,
8676
+ args: []
8677
+ };
8678
+ }
8679
+
8680
+ //#endregion
8681
+ //#region src/eventbus/events/metadata/timeline-stop.ts
8682
+ function timelineStop() {
8683
+ return {
8684
+ description: `Event: timeline-stop`,
8685
+ category: `Timeline`,
8686
+ args: []
8687
+ };
8688
+ }
8689
+
8690
+ //#endregion
8691
+ //#region src/eventbus/events/metadata/timeline-time.ts
8692
+ function timelineTime() {
8693
+ return {
8694
+ description: `Event: timeline-time`,
8695
+ category: `Timeline`,
8696
+ args: [{
8697
+ name: "position",
8698
+ type: "number"
8699
+ }]
8700
+ };
8701
+ }
8702
+
8703
+ //#endregion
8704
+ //#region src/eventbus/events/metadata/video-complete.ts
8705
+ function videoComplete() {
8706
+ return {
8707
+ description: `Event: video-complete`,
8708
+ category: `Navigation`,
8709
+ args: [{
8710
+ name: "index",
8711
+ type: "number"
8712
+ }]
8713
+ };
8714
+ }
8715
+
8716
+ //#endregion
8717
+ //#region src/eventbus/events/metadata/index.ts
8718
+ var metadata_exports$1 = /* @__PURE__ */ __export({
8719
+ beforeRequestTimelineUri: () => beforeRequestTimelineUri,
8720
+ beforeRequestVideoUrl: () => beforeRequestVideoUrl,
8721
+ domMutation: () => domMutation,
8722
+ highlightNavigation: () => highlightNavigation,
8723
+ languageChange: () => languageChange,
8724
+ navigateToVideoUrl: () => navigateToVideoUrl,
8725
+ pushHistoryState: () => pushHistoryState,
8726
+ requestAction: () => requestAction$1,
8727
+ requestCurrentLanguage: () => requestCurrentLanguage,
8728
+ requestCurrentNavigation: () => requestCurrentNavigation,
8729
+ requestCurrentTimelinePosition: () => requestCurrentTimelinePosition,
8730
+ requestCurrentVideoPosition: () => requestCurrentVideoPosition,
8731
+ requestEngineRoot: () => requestEngineRoot,
8732
+ requestFunction: () => requestFunction,
8733
+ requestInstance: () => requestInstance,
8734
+ requestLabelCollection: () => requestLabelCollection,
8735
+ requestLabelCollections: () => requestLabelCollections,
8736
+ requestTimelineCleanup: () => requestTimelineCleanup,
8737
+ requestTimelineUri: () => requestTimelineUri,
8738
+ requestVideoCleanup: () => requestVideoCleanup,
8739
+ requestVideoUrl: () => requestVideoUrl,
8740
+ timelineComplete: () => timelineComplete,
8741
+ timelineContainerRequest: () => timelineContainerRequest,
8742
+ timelineCurrentTimelineChange: () => timelineCurrentTimelineChange,
8743
+ timelineDuration: () => timelineDuration,
8744
+ timelineDurationRequest: () => timelineDurationRequest,
8745
+ timelineFirstframe: () => timelineFirstframe,
8746
+ timelinePause: () => timelinePause,
8747
+ timelinePauseRequest: () => timelinePauseRequest,
8748
+ timelinePlay: () => timelinePlay,
8749
+ timelinePlayRequest: () => timelinePlayRequest,
8750
+ timelinePlayToggleRequest: () => timelinePlayToggleRequest,
8751
+ timelineRequestCurrentTimeline: () => timelineRequestCurrentTimeline,
8752
+ timelineResize: () => timelineResize,
8753
+ timelineResizeRequest: () => timelineResizeRequest,
8754
+ timelineRestart: () => timelineRestart,
8755
+ timelineSeek: () => timelineSeek,
8756
+ timelineSeekRequest: () => timelineSeekRequest,
8757
+ timelineSeeked: () => timelineSeeked,
8758
+ timelineStop: () => timelineStop,
8759
+ timelineStopRequest: () => timelineStopRequest,
8760
+ timelineTime: () => timelineTime,
8761
+ videoComplete: () => videoComplete
8762
+ });
8763
+
5844
8764
  //#endregion
5845
8765
  //#region src/importer/eligius-resource-importer.ts
5846
8766
  const operations = operation_exports;
@@ -5868,5 +8788,5 @@ var EligiusResourceImporter = class {
5868
8788
  };
5869
8789
 
5870
8790
  //#endregion
5871
- export { Action, ActionCreator, ActionCreatorFactory, ActionEditor, ActionRegistryEventbusListener, ConfigurationFactory, ConfigurationResolver, ControllerNamesProvider, DEV_TOOLS_KEY, DOMEventListenerController, DevToolEventListener, Diagnostics, EligiusEngine, EligiusResourceImporter, EndableAction, EndableActionCreator, EndableActionEditor, EngineFactory, Eventbus, LabelController, LanguageManager, LottieController, NavigationController, OperationEditor, OperationMetadataProvider, OperationNamesProvider, ProgressbarController, RequestAnimationFrameTimelineProvider, RequestVideoUriInterceptor, RoutingController, SubtitleEditor, SubtitleImporter, SubtitlesController, TimeLineEventNamesProvider, TimelineAction, TimelineActionCreator, TimelineActionEditor, TimelineEventNames, TimelineProviderSettingsEditor, TimelineProvidersSettingsEditor, VideoJsTimelineProvider, addClass, addControllerToElement, addGlobalsToOperation, animate, animateWithClass, breakForEach, broadcastEvent, calc, clearElement, clearOperationData, continueForEach, createElement, customFunction, endAction, endForEach, endWhen, extendController, forEach, generateImporterSourceCode, getAttributesFromElement, getControllerFromElement, getControllerInstance, getElementDimensions, getImport, getQueryParams, invokeObjectMethod, loadJson, log, math, metadata_exports as metadata, otherwise, removeClass, removeControllerFromElement, removeElement, removePropertiesFromOperationData, reparentElement, requestAction, selectElement, setData, setElementAttributes, setElementContent, setGlobalData, setOperationData, setStyle, setVariable, startAction, toggleClass, toggleElement, wait, when };
5872
- //# sourceMappingURL=index.js.map
8791
+ export { Action, ActionCreator, ActionCreatorFactory, ActionEditor, ActionRegistryEventbusListener, ConfigurationFactory, ConfigurationResolver, ControllerNamesProvider, DEV_TOOLS_KEY, DOMEventListenerController, DevToolEventListener, Diagnostics, EligiusEngine, EligiusResourceImporter, EndableAction, EndableActionCreator, EndableActionEditor, EngineFactory, Eventbus, LabelController, LanguageManager, LottieController, MutationObserverController, NavigationController, OperationEditor, OperationMetadataProvider, OperationNamesProvider, ProgressbarController, RequestAnimationFrameTimelineProvider, RequestVideoUriInterceptor, RoutingController, SubtitleEditor, SubtitleImporter, SubtitlesController, TimeLineEventNamesProvider, TimelineAction, TimelineActionCreator, TimelineActionEditor, TimelineProviderSettingsEditor, TimelineProvidersSettingsEditor, VideoJsTimelineProvider, addClass, addControllerToElement, addGlobalsToOperation, animate, animateWithClass, announceToScreenReader, breakForEach, broadcastEvent, calc, clearElement, clearOperationData, clearStorage, compareDate, concatenateStrings, continueForEach, createElement, metadata_exports as ctrlmetadata, customFunction, endAction, endForEach, endWhen, metadata_exports$1 as eventmetadata, extendController, filterArray, findInArray, forEach, formatDate, formatText, generateImporterSourceCode, getAttributesFromElement, getControllerFromElement, getControllerInstance, getCurrentTime, getElementDimensions, getFocusedElement, getFormData, getImport, getQueryParams, getScrollPosition, getTextContent, httpDelete, httpPost, httpPut, invokeObjectMethod, isActive, isElementInViewport, loadFromStorage, loadJson, log, mapArray, math, metadata_exports$2 as metadata, otherwise, removeClass, removeControllerFromElement, removeElement, removePropertiesFromOperationData, reparentElement, replaceString, replaceText, requestAction, saveToStorage, scrollToElement, scrollToPosition, selectElement, send, setActive, setData, setElementAttributes, setElementContent, setFocus, setFormValue, setGlobalData, setOperationData, setStyle, setVariable, sortArray, splitString, startAction, substringText, toggleClass, toggleElement, toggleFormElement, validateForm, wait, when };
8792
+ //# sourceMappingURL=index.mjs.map