"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "mergeHandlers", {
    enumerable: true,
    get: function() {
        return mergeHandlers;
    }
});
const mergeHandlers = (userHandler, injectedHandler)=>{
    return (event)=>{
        try {
            if (userHandler) {
                userHandler(event);
            }
        } catch (e) {
            console.error(e);
            throw e;
        } finally{
            if (!event.defaultPrevented && injectedHandler) {
                injectedHandler(event);
            }
        }
    };
};
