   disableEventHandlersOnBubblePath: (event) ->
     bubblePathEventHandlers = []
     disabledHandler = ->
+    $ ?= require('./space-pen-extensions').$
     element = $(event.target)
     while element.length
       if eventHandlers = element.handlers()?[event.type]

{Emitter} = require 'emissary'
Q = require 'q'

{$} = require './space-pen-extensions'
ScopedProperties = require './scoped-properties'

# Loads and activates a package's main module and resources such as

  handleActivationEvent: (event) =>
    bubblePathEventHandlers = @disableEventHandlersOnBubblePath(event)
    @activateNow()
    $ ?= require('./space-pen-extensions').$
    $(event.target).trigger(event)
    @restoreEventHandlersOnBubblePath(bubblePathEventHandlers)
    @unsubscribeFromActivationEvents()
