bindEventHandler(element2, eventName, handlerExpression) {
      Logger.debug(`EventManager: Binding event handler with expression ${handlerExpression} for ${eventName} on`, element2);
      const eventHandler = (event) => {
        try {
          const context = {
            $model: this.model,
            $event: event,
            $data: this.model.data,
            $dom: this.domManager
          };
          const methodMatch = handlerExpression.match(/(\w+)\((.*)\)/);
          if (methodMatch) {
            const methodName = methodMatch[1];
            const paramsString = methodMatch[2];
            const resolveMethod = (path, context2) => {
              return path.split(".").reduce((obj, key) => obj && obj[key] !== void 0 ? obj[key] : void 0, context2);
            };
            let method = resolveMethod(methodName, this.model);
            if (!method) {
              method = resolveMethod(methodName, window);
            }
            if (typeof method === "function") {
              let params = [];
              if (paramsString.trim()) {
                params = paramsString.split(",").map((param) => {
                  param = param.trim();
                  if (param.startsWith('"') && param.endsWith('"') || param.startsWith("'") && param.endsWith("'")) {
                    return param.slice(1, -1);
                  }
                  if (!isNaN(param)) {
                    return Number(param);
                  }
                  if (param === "$event") {
                    Logger.debug(`EventManager: Requested Event`, event);
                    return event;
                  }
                  if (param === "$model") {
                    Logger.debug(`EventManager: Requested Model`, this.model);
                    return this.model;
                  }
                  if (param === "$data") {
                    Logger.debug(`EventManager: Requested Model Context`, this.model.data);
                    return this.model.data;
                  }
                  if (param === "$dom") {
                    Logger.debug(`EventManager: Requested DOMManager`, this.domManager);
                    return this.domManager;
                  }
                  return this.model.store.get(param);
                });
              }
              method.apply(context, params);
            } else {
              console.warn(`EventManager: The method '${methodName}' not found in a model or global space!`);
            }
          } else {
            if (this.model.options.useSimpleExpressions) {
              const result = new Function(`return ${handlerExpression}`);
              result.apply(this.model.data);
            } else {
              console.warn(`EventManager: Unknown format of the event handler: '${handlerExpression}'`);
            }
          }
        } catch (error) {
          console.error(`EventManager: Error when performing an event processor '${eventName}': ${error.message}`);
        }
      };
      if (!this.eventHandlers.has(element2)) {
        this.eventHandlers.set(element2, /* @__PURE__ */ new Map());
      }
      const elementHandlers = this.eventHandlers.get(element2);
      if (elementHandlers.has(eventName)) {
        element2.removeEventListener(eventName, elementHandlers.get(eventName));
      }
      elementHandlers.set(eventName, eventHandler);
      element2.addEventListener(eventName, eventHandler);
    }
Binds the event handler to the DOM element
@param {HTMLElement} element - DOM element
@param {string} eventName - Event name (without @)
@param {string} handlerExpression - Line with an event processor