@hide

@param format
@param view
@param data
@param helpers
@param callback
@param nodelist
@return {*}
331004
function (format, view, data, helpers, callback, nodelist) {
		// if callback has expression prop its actually the nodelist
		if (callback !== undefined && typeof callback.expression === 'string') {
			nodelist = callback;
			callback = undefined;
		}
		
		// If helpers is a `function`, it is actually a callback.
		if (isFunction(helpers)) {
			callback = helpers;
			helpers = undefined;
		}

		// give templates the can namespace:
		helpers = Object.assign({ can: can }, helpers);

		// See if we got passed any deferreds.
		var deferreds = getDeferreds(data);
		var deferred, dataCopy, async, response;
		if (deferreds.length) {
			// Does data contain any deferreds?
			// The deferred that resolves into the rendered content...
			deferred = new Deferred();
			dataCopy = Object.assign({}, data);

			// Add the view request to the list of deferreds.
			deferreds.push(getRenderer(view, true));
			// Wait for the view and all deferreds to finish...
			Deferred.when.apply(can, deferreds)
				.then(function (resolved) {
					// Get all the resolved deferreds.
					var objs = makeArray(arguments),
						// Renderer is the last index of the data.
						renderer = objs.pop(),
						// The result of the template rendering with data.
						result;

					// Make data look like the resolved deferreds.
					if (isDeferred(data)) {
						dataCopy = usefulPart(resolved);
					} else {
						// Go through each prop in data again and
						// replace the defferreds with what they resolved to.
						for (var prop in data) {
							if (isDeferred(data[prop])) {
								dataCopy[prop] = usefulPart(objs.shift());
							}
						}
					}

					// Get the rendered result.
					result = can.view.renderTo(format, renderer, dataCopy, helpers, nodelist);

					// Resolve with the rendered view.
					deferred.resolve(result, dataCopy);

					// If there's a `callback`, call it back with the result.
					if (callback) {
						callback(result, dataCopy);
					}
				}, function () {
					deferred.reject.apply(deferred, arguments);
				});
			// Return the deferred...
			return deferred;
		} else {

			// If there's a `callback` function
			async = isFunction(callback);
			
			// get is called async but in
			// ff will be async so we need to temporarily reset
			deferred = Observation.ignore(getRenderer)(view, async);

			// If we are `async`...
			if (async) {
				// Return the deferred
				response = deferred;
				// And fire callback with the rendered result.
				deferred.then(function (renderer) {
					callback(data ? $view.renderTo(format, renderer, data, helpers, nodelist) : renderer);
				});
			} else {
				// if the deferred is resolved, call the cached renderer instead
				// this is because it's possible, with recursive deferreds to
				// need to render a view while its deferred is _resolving_.  A _resolving_ deferred
				// is a deferred that was just resolved and is calling back it's success callbacks.
				// If a new success handler is called while resoliving, it does not get fired by
				// jQuery's deferred system.  So instead of adding a new callback
				// we use the cached renderer.
				// We also add __view_id on the deferred so we can look up it's cached renderer.
				// In the future, we might simply store either a deferred or the cached result.
				if (deferred.state() === 'resolved' && deferred.__view_id) {
					var currentRenderer = $view.cachedRenderers[deferred.__view_id];
					var result =  data ? $view.renderTo(format, currentRenderer, data, helpers, nodelist) : currentRenderer;
					return result;
				} else {
					// Otherwise, the deferred is complete, so
					// set response to the result of the rendering.
					deferred.then(function (renderer) {
						response = data ? $view.renderTo(format, renderer, data, helpers, nodelist) : renderer;
					});
				}
			}

			return response;
		}
	}
1130915
public void setHelpView(JBaseHtmlEditor helpEditor)
    {
    	if (m_helpEditor != null)
    		m_helpEditor.setCallingApplet(null);
    	m_helpEditor = helpEditor;
    	if (m_helpEditor != null)
    		m_helpEditor.setCallingApplet(this);
    }
837113
protected final void hideInternalView(final Wave wave) {

        // Call user code
        hideView();

        // Sometimes view can be null
        if (view() != null) {
            view().hide();
        }

        // Propagate the show view to all Inner Model
        if (getInnerComponentMap().isPresent()) {
            getInnerComponentMap().get().values().stream()
                                  .filter(s -> s instanceof Model)
                                  .forEach((model) -> ((Model) model).doHideView(wave));
        }
    }
32563
function formatChange() {
  var mask = document.getElementById('blocklyMask');
  var languagePre = document.getElementById('languagePre');
  var languageTA = document.getElementById('languageTA');
  if (document.getElementById('format').value == 'Manual') {
    Blockly.hideChaff();
    mask.style.display = 'block';
    languagePre.style.display = 'none';
    languageTA.style.display = 'block';
    var code = languagePre.textContent.trim();
    languageTA.value = code;
    languageTA.focus();
    updatePreview();
  } else {
    mask.style.display = 'none';
    languageTA.style.display = 'none';
    languagePre.style.display = 'block';
    updateLanguage();
  }
  disableEnableLink();
}
178735
function delegateRenderBy(DecorateViewModel $parentView, $rootPassedToNext = null)
    {
        if ($rootPassedToNext === null)
            // first segment of list do not pass nextRoot
            $rootPassedToNext = $parentView;

        $this->myRoot   = $rootPassedToNext;
        $this->nextRoot = $parentView;


        if (null ===  $callback = $this->delegateRenderBy )
            return;

        // DO_LEAST_PHPVER_SUPPORT 5.4 closure bindto
        if ($callback instanceof \Closure && version_compare(phpversion(), '5.4.0') > 0) {
            $callback = \Closure::bind(
                $callback
                , $this->_view
                , get_class($this)
            );
        }

        call_user_func($callback, $parentView, $parentView->parent(), $this);
    }
1327656
function(data){
      $('#restoring_session').hide();
      $('#todo_header').show();

      if (!todo.is_empty_object(data)){
        $('#empty_list').hide();
      }

      $("#todo").html('');
      for (var key in data){
        var item = data[key];
        todo.draw_item(item);
      }
    }
785839
function dollarRaw(selector, context, childOnly) {
    function flatten(a) { // flatten list, keep non-lists, remove nulls
      return isList(a) ? collector(flexiEach, a, flatten) : a;
    }
    function filterElements(list) { // converts into array, makes sure context is respected
      return filter(collector(flexiEach, list, flatten), function(node) {
        var a = node;
        while (a = a['parentNode'])
          if (a == context[0] || childOnly)
            return a == context[0];
        // fall through to return undef
      });
    }

    if (context) {
      if ((context = dollarRaw(context)).length != 1)
        return collectUniqNodes(context, function(ci) { return dollarRaw(selector, ci, childOnly);});
      else if (isString(selector)) {
        if (isNode(context[0]) != 1)
          return [];
        else
          return childOnly ? filterElements(context[0].querySelectorAll(selector)) : context[0].querySelectorAll(selector);
      }
      else
        return filterElements(selector);

    }
    else if (isString(selector))
      return document.querySelectorAll(selector);
    else
      return collector(flexiEach, selector, flatten);
  }
720318
function(context) {
        var node = this.createElementDefaultNS("FormatList");
        for (var i=0, len=context.formats.length; i<len; i++) {
            var format = context.formats[i];
            node.appendChild(this.createElementDefaultNS(
                "Format",
                format.value,
                (format.current && format.current == true) ?
                    {current: "1"} : null
            ));
        }

        return node;
    }
10629
function(bindingString, data, children, callback, containerless) {
            container = document.createElement("div");
            if (!containerless) {
                container.setAttribute("data-bind", bindingString);
                container.innerHTML = children || "";
            }
            else {
                var opening = document.createComment("ko " + bindingString),
                   closing = document.createComment("/ko"),
                    dummy = document.createTextNode("   \n  ");

                container.appendChild(opening);
                container.appendChild(dummy);
                container.appendChild(closing);
            }

            sandbox.appendChild(container);

            ko.cleanNode(sandbox);

            ko.applyBindings(data, sandbox);

            setTimeout(callback, 50);
        }
928255
function applyBlockFormat() {
        var selection, dom, container, firstTextNode, node, format, textBlockElm, pattern, walker, rng, offset;

        selection = editor.selection;
        dom = editor.dom;

        if (!selection.isCollapsed()) {
          return;
        }

        textBlockElm = dom.getParent(selection.getStart(), 'p');
        if (textBlockElm) {
          walker = new TreeWalker(textBlockElm, textBlockElm);
          while ((node = walker.next())) {
            if (node.nodeType == 3) {
              firstTextNode = node;
              break;
            }
          }

          if (firstTextNode) {
            pattern = findPattern(firstTextNode.data);
            if (!pattern) {
              return;
            }

            rng = selection.getRng(true);
            container = rng.startContainer;
            offset = rng.startOffset;

            if (firstTextNode == container) {
              offset = Math.max(0, offset - pattern.start.length);
            }

            if (Tools.trim(firstTextNode.data).length == pattern.start.length) {
              return;
            }

            if (pattern.format) {
              format = editor.formatter.get(pattern.format);
              if (format && format[0].block) {
                firstTextNode.deleteData(0, pattern.start.length);
                editor.formatter.apply(pattern.format, {}, firstTextNode);

                rng.setStart(container, offset);
                rng.collapse(true);
                selection.setRng(rng);
              }
            }

            if (pattern.cmd) {
              editor.undoManager.transact(function () {
                firstTextNode.deleteData(0, pattern.start.length);
                editor.execCommand(pattern.cmd);
              });
            }
          }
        }
      }
1136395
function grid (data, callback) {

    linz.app.render(linz.api.views.viewPath('modelIndex/grid.jade'), data, (err, html) => {

        if (err) {
            return callback(err);
        }

        return callback(null, html);

    });

}
593014
function DataList ( element, store, template ) {
	this.callback    = null;
	this.element     = element;
	this.emptyMsg    = "Nothing to display";
	this.filter      = null;
	this.filtered    = [];
	this.id          = utility.genId();
	this.pageIndex   = 1;
	this.pageSize    = null;
	this.pageRange   = 5;
	this.pagination  = "bottom"; // "top" or "bottom|top" are also valid
	this.placeholder = "";
	this.order       = "";
	this.records     = [];
	this.current     = [];
	this.template    = template;
	this.total       = 0;
	this.store       = store;
	this.where       = null;
}
98087
public static <T extends View> ArrayList<T> removeInvisibleViews(Iterable<T> viewList) {
		ArrayList<T> tmpViewList = new ArrayList<T>();
		for (T view : viewList) {
			if (view != null && view.isShown()) {
				tmpViewList.add(view);
			}
		}
		return tmpViewList;
	}
772402
function renderView(vm) {
		var viewElms = vm.$el.querySelectorAll(".dev-menu-view");
		for (var i = 0; i < viewElms.length; i++) {
			var el = viewElms[i];
			el.style.display = data.views[el.id].show ? "block" : "none";
		}
	}
1344723
function createEmbeddedViewNode(tView, context, renderer, queries) {
    var _isParent = isParent;
    var _previousOrParentNode = previousOrParentNode;
    isParent = true;
    previousOrParentNode = null;
    var lView = createLViewData(renderer, tView, context, 2 /* CheckAlways */, getCurrentSanitizer());
    if (queries) {
        lView[QUERIES] = queries.createView();
    }
    var viewNode = createLNode(-1, 2 /* View */, null, null, null, lView);
    isParent = _isParent;
    previousOrParentNode = _previousOrParentNode;
    return viewNode;
}
8911
function (xData) {
                    $(xData.responseXML).find("List").each(function () {
                        listXml = $(this);

                        // If listName has been specified, then only return results for that list
                        if ((opt.listName.length === 0) || (listXml.attr("Title") === opt.listName)) {
                            // Don't work with hidden lists unless we're asked to
                            if ((opt.showHiddenLists && listXml.attr("Hidden") === "False") || !opt.showHiddenLists) {

                                // Audit the list's forms
                                if (opt.auditForms) {
                                    // Get the list's Content Types, therefore the form pages
                                    $().SPServices({
                                        operation: "GetListContentTypes",
                                        webURL: opt.webURL,
                                        listName: listXml.attr("ID"),
                                        async: false, // 
                                        completefunc: function (xData) {
                                            $(xData.responseXML).find("ContentType").each(function () {
                                                // Don't deal with folders
                                                if ($(this).attr("ID").substring(0, 6) !== "0x0120") {
                                                    var formUrls = $(this).find("FormUrls");
                                                    for (i = 0; i < formTypes.length; i++) {
                                                        // Look for a customized form...
                                                        $(formUrls).find(formTypes[i][0]).each(function () {
                                                            SPScriptAuditPage(opt, listXml, "Form", this.nodeName, ((opt.webURL.length > 0) ? opt.webURL : $().SPServices.SPGetCurrentSite()) + SLASH + $(this).text());
                                                            formTypes[i][2] = true;
                                                        });
                                                        // ...else the uncustomized form
                                                        if (!formTypes[i][2]) {
                                                            var defaultViewUrl = listXml.attr("DefaultViewUrl");
                                                            SPScriptAuditPage(opt, listXml, "Form", formTypes[i][0],
                                                                defaultViewUrl.substring(0, defaultViewUrl.lastIndexOf(SLASH) + 1) + formTypes[i][1]);
                                                        }
                                                    }
                                                    // Reset the form types
                                                    for (i = 0; i < formTypes.length; i++) {
                                                        formTypes[i][2] = false;
                                                    }
                                                }
                                            });
                                        }
                                    });
                                }

                                // Audit the list's views
                                if (opt.auditViews) {
                                    // Get the list's Views
                                    $().SPServices({
                                        operation: "GetViewCollection",
                                        webURL: opt.webURL,
                                        listName: listXml.attr("ID"),
                                        async: false, // 
                                        completefunc: function (xData) {
                                            $(xData.responseXML).find("View").each(function () {
                                                SPScriptAuditPage(opt, listXml, "View", $(this).attr("DisplayName"), $(this).attr("Url"));
                                            });
                                        }
                                    });
                                }

                            }
                        }
                    });
                }
822217
function( selector, keepData ) {
		if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
			if ( !keepData && this.nodeType === 1 ) {
				jQuery.cleanData( this.getElementsByTagName("*") );
				jQuery.cleanData( [ this ] );
			}

			if ( this.parentNode ) {
				 this.parentNode.removeChild( this );
			}
		}
	}