text: // Hoodie Admin
  // -------------
  //
  // your friendly library for pocket,
  // the Hoodie Admin UI
  //
  var hoodieRequest = require('hoodie/src/hoodie/request');
  var hoodieOpen = require('hoodie/src/hoodie/open');
  
  var hoodieAdminAccount = require('./hoodie.admin/account');
  var hoodieAdminPlugin = require('./hoodie.admin/plugin');
  var hoodieAdminUser = require('./hoodie.admin/user');
  
  var hoodieEvents = require('hoodie/src/lib/events');
  
  // Constructor
  // -------------
  
  // When initializing a hoodie instance, an optional URL
  // can be passed. That's the URL of the hoodie backend.
  // If no URL passed it defaults to the current domain.
  //
  //     // init a new hoodie instance
  //     hoodie = new Hoodie
  //
  function HoodieAdmin(baseUrl) {
    var hoodieAdmin = this;
  
    // enforce initialization with `new`
    if (!(hoodieAdmin instanceof HoodieAdmin)) {
      throw new Error('usage: new HoodieAdmin(url);');
    }
  
    // remove trailing slashes
    hoodieAdmin.baseUrl = baseUrl ? baseUrl.replace(/\/+$/, '') : '';
  
  
    // hoodieAdmin.extend
    // ---------------
  
    // extend hoodieAdmin instance:
    //
    //     hoodieAdmin.extend(function(hoodieAdmin) {} )
    //
    hoodieAdmin.extend = function extend(extension) {
      extension(hoodieAdmin);
    };
  
    //
    // Extending hoodie admin core
    //
  
    // * hoodieAdmin.bind
    // * hoodieAdmin.on
    // * hoodieAdmin.one
    // * hoodieAdmin.trigger
    // * hoodieAdmin.unbind
    // * hoodieAdmin.off
    hoodieAdmin.extend(hoodieEvents);
  
    // * hoodieAdmin.request
    hoodieAdmin.extend(hoodieRequest);
  
    // * hoodieAdmin.open
    hoodieAdmin.extend(hoodieOpen);
  
    // * hoodieAdmin.account
    hoodieAdmin.extend(hoodieAdminAccount);
  
    // * hoodieAdmin.plugin
    hoodieAdmin.extend(hoodieAdminPlugin);
  
    // * hoodieAdmin.user
    hoodieAdmin.extend(hoodieAdminUser);
  
    //
    // loading user extensions
    //
    applyExtensions(HoodieAdmin);
  }
  
  // Extending HoodieAdmin
  // ----------------------
  
  // You can extend the Hoodie class like so:
  //
  // Hoodie.extend(funcion(HoodieAdmin) { HoodieAdmin.myMagic = function() {} })
  //
  
  var extensions = [];
  
  HoodieAdmin.extend = function(extension) {
    extensions.push(extension);
  };
  
  //
  // detect available extensions and attach to Hoodie Object.
  //
  function applyExtensions(hoodie) {
    for (var i = 0; i < extensions.length; i++) {
      extensions[i](hoodie);
    }
  }
  
  module.exports = HoodieAdmin;
  