Marinate only an instance of a view
@memberOf module:marinate
@param {Backbone.BaseView} viewInstance
@param {...object} mixins
8889
function (viewInstance) {
            console.assert(viewInstance instanceof Backbone.BaseView, 'viewInstance must be an instance of Backbone.BaseView');
            var mixins = slice.call(arguments, 1);
            _marinate(viewInstance, mixins);
        }
445327
function getSubviews(subviewFlapjacks) {
    var renderedSubviews = {};
    var jangularDeps = this.getJangularDeps();
    var me = this;

    _.each(subviewFlapjacks, function (subview, subviewName) {
        renderedSubviews[subviewName] = me.pancakes.cook(subview, { dependencies: jangularDeps });
    });

    return renderedSubviews;
}
1075781
function(src, noEscape) {
    var attrLen, newKey;
    if (helper.isArray(src)) {
      var attrLen = src.length;
      for (var i = 0; i < attrLen; i++) {
        src[i] = helper.pasteurize(src[i], noEscape);
      }
    } else if (this.isString(src)) {
      src = helper.scrub(src, noEscape);
    } else if (helper.isObject(src)) {
      var newSrc = {};
      for (key in src) {
        newKey = helper.scrub(key);
        newSrc[newKey] = helper.pasteurize(src[key], noEscape);
      }
      src = newSrc;
    }

    return src;
  }
610723
function (subview) {
            subview = (subview instanceof View === true) ? subview : this.get(subview);
            return subview._subviewtype;
        }
126564
function() {
		if(this.init) { this.init.apply(this, arguments) }
		for (var i=0, mixin; mixin = mixins[i]; i++) {
			if (mixin.init) { mixin.init.apply(this) }
		}
	}
1300605
function Context(view, parentContext) {
  this.view = view || {};
  this.cache = {
    '.': this.view
  };
  this.parent = parentContext;

  // If parent context isn't passed, but the model has parents, build the chain
  this.initialize(view, parentContext);
  if (this.isModel(view)) {
    this.lastModel = view;
  } else if (parentContext) {
    this.lastModel = parentContext.lastModel;
  }
}
260113
def as_view(self, view, cacheable=False, extra_permission=None):
        
        def inner(request, *args, **kwargs):
            if not self.has_permission(request, extra_permission):
                # show login pane
                return self.login(request)
            return view(request, *args, **kwargs)

        # Mark it as never_cache
        if not cacheable:
            inner = never_cache(inner)

        # We add csrf_protect here so this function can be used as a utility
        # function for any view, without having to repeat 'csrf_protect'.
        if not getattr(view, 'csrf_exempt', False):
            inner = csrf_protect(inner)

        inner = ensure_csrf_cookie(inner)

        return update_wrapper(inner, view)
95254
function makeViewFactoryForMatch(match) {
  var views = {};

  for (var i = match.activeTrace.length - 1; i >= 0; i--) {
    var step = match.activeTrace[i];
    var stepProps = getStepProps(step);

    views = merge(views, collectSubViews(stepProps, views));

    if (step.route.view !== undefined) {
      return makeViewFactory(step.route.view, merge(stepProps, views));
    }
  }
}
839486
function isComponentMixedIn (name, mixinEls) {
  var i;
  var inMixin = false;
  for (i = 0; i < mixinEls.length; ++i) {
    inMixin = mixinEls[i].hasAttribute(name);
    if (inMixin) { break; }
  }
  return inMixin;
}
604720
function(className, viewArgs) {
            var self = this,
                view = this.views[className],
                dfd = $.Deferred();

            if (view) {
                view.undelegateEvents();
            }

            this.loader.load(className)
                .then(function(Constructor) {
                    viewArgs.manager = self;
                    view = new Constructor(viewArgs);
                    self.views[className] = view;
                    dfd.resolve(view);
                });

            return dfd.promise();
        }
955853
function viewBuilder(contexts, joins) {

  var merge = require('merge');
  var heirarchy = {};
  var graph = {
    nodes: [],
    links: []
  };
  var nodeMap = {};
  var depth;
  var fullContext;

  function createJoinNodes(joins, parent) {

    if(joins instanceof Array) {
      for (var i = 0; i < joins.length; i++) {
        createJoinNodes(joins[i], parent);
      }
    }
    if(joins instanceof Object && !(joins instanceof Array)) {

      for (var key in joins) {
        var parentIndex = getParentNode(key);
        if (typeof parent === 'number') {
          addLink(parent, parentIndex);
        }
        createJoinNodes(joins[key], parentIndex);
      }
    }
    if (typeof joins === 'string') {
      addJoinNode(parent, joins);
    }
  }

  function getParentNode(name) {
    for (var i = 0; i < graph.nodes.length; i++) {
      if (graph.nodes[i].key === name) {
        return i;
      }
    }
    graph.nodes.push({
      name: name,
      key: name
    });
    return i++;
  }


  function addJoinNode(parent, name) {
    var nodeIndex;
    for (var i = 0; i < graph.nodes.length; i++) {
      if (graph.nodes[i].key === name) {
        nodeIndex = i;
      }
    }
    addLink(parent, nodeIndex);
  }

  function createNode(name, specs) {
    return {
      name: name, 
      shoulds: specs, 
      depth: depth, 
      key: fullContext.match(new RegExp(name+'$')) ? fullContext : name
    };
  }

  function addNode(name, specs) {
    var index = graph.nodes.length;
    graph.nodes.push(createNode(name, specs));
    return index;
  }
  
  function mergeNode(index, name, specs) {
    graph.nodes[index] = merge.recursive(graph.nodes[index],createNode(name,specs));
  }

  function addLink(source, target) {
    var match;
    for (var i = 0; i < graph.links.length; i++) {
      if (graph.links[i].source == source && graph.links[i].target == target) {
        match = true;
      }
    }

    if (!match) {
      graph.links.push({ source: source, target: target });
    }
  }

  function traverseMap(map, parents, node) {
    depth++;
    var mapPointer = map[parents[0]];
    if ( mapPointer && parents.length > 1) {
      parents.splice(0, 1);
      return traverseMap(mapPointer, parents, node);
    } 
    var currentContext = parents[0];
    mapPointer = map;
    if( mapPointer.hasOwnProperty(currentContext)){
      mergeNode(mapPointer[currentContext]._index,currentContext, node.specs);
    } else {
      mapPointer[currentContext] = {
        '_index': addNode(currentContext, (parents.length > 1) ? [] : node.specs)
      };
      if(map._index !== undefined) {
        addLink(map._index, mapPointer[currentContext]._index);
      }
    }

    if (parents.length > 1) {
      parents.splice(0, 1);
      return traverseMap(mapPointer[currentContext], parents, node);
    }
  }

  function addContext(node) {
    for (var i = 0; i < node._parents.length; i++) {
      depth = -1;
      traverseMap(nodeMap, node._parents, node);
    }
  }

  for (var key in contexts) {
    fullContext = key;
    addContext(contexts[key], key);
  }
  createJoinNodes(joins);
  return graph;
}
1320126
function viewFactory(sId, vView, bAsync) {
		var mSettings = {}, oView;

		if (vView && typeof (vView) == "string") { // instantiation sap.ui.jsview("id","name", [async])
			mSettings.viewName = vView;
			if (typeof arguments[2] == "boolean") {
				mSettings.async = bAsync;
			} else if (typeof arguments[2] == "object") { // arguments[2] is somehow a controller
				mSettings.controller = arguments[2];
				mSettings.async = !!arguments[3]; // optional
			}
			oView = new JSView(sId, mSettings);
			return oView;

		} else if (vView && typeof (vView) == "object") { // definition sap.ui.jsview("name",definitionObject)
			// sId is not given, but contains the desired value of sViewName
			mRegistry[sId] = vView;
			sap.ui.loader._.declareModule(sId.replace(/\./g, "/") + ".view.js");
			Log.info("For defining views use JSView.extend instead.");
		} else if (arguments.length == 1 && typeof sId == "string" ||
			arguments.length == 2 && typeof arguments[0] == "string" && typeof arguments[1] == "boolean") { // instantiation sap.ui.jsview("name", [async])
			mSettings.viewName = arguments[0];
			mSettings.async = !!arguments[1]; // optional
			/*** STEP 1: create View ***/
			oView = mSettings.id ? new JSView(mSettings.id, mSettings) : new JSView(mSettings);
			/*** Step 3B and 4B (create and connect controller) happen in View ***/
			return oView;

		} else {
			throw new Error("Wrong arguments ('" + sId + "', '" + vView + "')! Either call sap.ui.jsview([sId,] sViewName) to instantiate a View or sap.ui.jsview(sViewName, oViewImpl) to define a View type.");
		}
	}
1189590
function (viewBaseName) {
            var res = this.views[viewBaseName];
            if (res == null) {
                res = {
                    baseName: viewBaseName
                };
                this.views[viewBaseName] = res;
            }
            return res;
        }
1085917
function mixin(dest, src) {
  if (type(src) == 'function') {
    extend(dest, src.prototype)
  }
  else {
    extend(dest, src)
  }
}
585624
function createInstanceContext (
  instanceId,
  runtimeContext,
  data
) {
  if ( data === void 0 ) data = {};

  var weex = runtimeContext.weex;
  var instance = instanceOptions[instanceId] = {
    instanceId: instanceId,
    config: weex.config,
    document: weex.document,
    data: data
  };

  // Each instance has a independent `Vue` module instance
  var Vue = instance.Vue = createVueModuleInstance(instanceId, weex);

  // DEPRECATED
  var timerAPIs = getInstanceTimer(instanceId, weex.requireModule);

  var instanceContext = Object.assign({ Vue: Vue }, timerAPIs);
  Object.freeze(instanceContext);
  return instanceContext
}
629191
function (args) {
            this.type = "mixin";
            this.fn = function (service) {
                service.create = service[this.create];
                service.read = service[this.read];
                service.update = service[this.update];
                service.remove = service[this.remove];
            };
        }
1020754
function Mixin_setInstanceKey(hostClass, method, instanceKey) {
    check(hostClass, Function);
    check(instanceKey, Match.IdentifierString);

    var prop = INSTANCE_PROPERTIES_MAP,
        instanceKeys = hostClass[prop] = hostClass[prop] || {};

    if (instanceKeys[method.name])
        throw new Error('Mixin: instance property for method with name '
            + method.name + ' is already set');

    instanceKeys[method.name] = instanceKey;
}