 ###
 
 # Deps
-defaults = require 'lodash/defaults'
 forEachRight = require 'lodash/forEachRight'
 throttle = require 'lodash/throttle'
 debounce = require 'lodash/debounce'
 remove = require 'lodash/remove'
+merge = require 'lodash/merge'
 
 # Class definition
 class WindowEventMediator

		throttle [100] - int - milliseconds to throttle
		debounce [100] - int - milliseconds to debounce
	###
	on: (event, callback, options = {}) =>
		options = defaults options, @defaults
		@set event, callback, options

	###

	callback - function
	options - target specific throttled/debounced refrences to remove.
	###
	off: (event, callback, options) =>
		return if not @handlers[event]?
		if options?
			options = merge {}, @defaults, options
			key = options.throttle+'-'+options.debounce
			if @handlers[event][key]?
				remove @handlers[event][key], (cbs) -> cbs.original == callback
