Finds a supported fullscreen API.

@param   {Array}    apiList      The list of possible fullscreen APIs.
@param   {Document} document     The source of the fullscreen interface.
@returns {Object}
509749
function findSupported(apiList, document) {

	let standardApi = apiList[0];
	let supportedApi = null;

	for (let i = 0, len = apiList.length; i < len; i++) {

		let api = apiList[ i ];

		if (api[1] in document) {
			supportedApi = api;
			break;
		}
	}

	if (Array.isArray(supportedApi)) {

		return supportedApi.reduce((result, funcName, i) => {
			result[ standardApi[ i ] ] = funcName;
			return result;
		}, {});

	} else {

		return null;
	}
}
450324
function (document) {
            if (document == null) {
                document = Aria.$window.document;
            }
            var result = document.scrollingElement;
            if (!result) {
                result = ((!(ariaCoreBrowser.isSafari || ariaCoreBrowser.isChrome || ariaCoreBrowser.isEdge || ariaCoreBrowser.isOpera) && (document.compatMode == "CSS1Compat"))
                        ? document.documentElement
                        : document.body);
            }
            return result;
        }
889812
function() {
		var t = this;
		// Native events
		if (zyMedia.features.nativeFullscreenPrefix != '-') {
			// Chrome doesn't alays fire this in an iframe
			var func = function(e) {
				if (t.isFullScreen) {
					if (!isInFullScreenMode()) {
						t.exitFullScreen()
					}
				}
			};

			document.addEventListener(zyMedia.features.nativeFullscreenPrefix + 'fullscreenchange', func)
		}

		t.fullscreenBtn = document.createElement('div');
		t.fullscreenBtn.className = 'zy_fullscreen_btn';
		t.controls.appendChild(t.fullscreenBtn);

		t.fullscreenBtn.addEventListener('click', function() {
			if ((zyMedia.features.nativeFullscreenPrefix != '-' && isInFullScreenMode()) || t.isFullScreen) {
				t.exitFullScreen()
			} else {
				t.enterFullScreen()
			}
		});
	}
629567
function() {
  var doc = document.documentElement;
  return {
    x: (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0),
    y: (window.pageYOffset || doc.scrollTop)  - (doc.clientTop || 0)
  };
}
34731
public static void addFilterMapping(Document doc, Element root) {
    Element filterMapping = doc.createElement("filter-mapping");
    Element filterName = doc.createElement("filter-name");
    filterName.appendChild(doc.createTextNode("ShiroFilter"));
    filterMapping.appendChild(filterName);
    Element urlPattern = doc.createElement("url-pattern");
    urlPattern.appendChild(doc.createTextNode("/*"));
    filterMapping.appendChild(urlPattern);

    addDispatchers(doc, filterMapping, "REQUEST", "FORWARD", "INCLUDE", "ERROR");

    addRelativeTo(root, filterMapping, "filter-mapping", true);
  }
675579
public Set<ApiDoc> getApiDocs(Set<Class<?>> classes, MethodDisplay displayMethodAs) {
		Set<ApiDoc> apiDocs = new TreeSet<ApiDoc>();
		for (Class<?> controller : classes) {
			ApiDoc apiDoc = getApiDoc(controller, displayMethodAs);
			apiDocs.add(apiDoc);
		}
		return apiDocs;
	}
768072
private List<Element> getNewChildren(final DitaClass cls, final Document doc) {
        final List<Element> res = new ArrayList<>();
        if (metaTable.containsKey(cls.matcher)) {
            metaTable.get(cls.matcher);
            final NodeList list = metaTable.get(cls.matcher).getChildNodes();
            for (int i = 0; i < list.getLength(); i++) {
                Node item = list.item(i);
                res.add((Element) doc.importNode(item, true));
            }
        }
        Collections.reverse(res);
        return res;
    }
815865
function parse(doc) {
    var file = vfile(doc)
    var Parser

    freeze()
    Parser = processor.Parser
    assertParser('parse', Parser)

    if (newable(Parser)) {
      return new Parser(String(file), file).parse()
    }

    return Parser(String(file), file) // eslint-disable-line new-cap
  }
126081
function enterFullscreen(element) {
        var userAgent = navigator.userAgent.toLowerCase();
        if (element.requestFullscreen) {
            element.requestFullscreen();
        }
        else if (element.msRequestFullscreen) {
            element.msRequestFullscreen();
        }
        else if (element.mozRequestFullScreen) {
            element.parentElement.mozRequestFullScreen();
        }
        else if (userAgent.indexOf('edge') != -1) {
            element.parentElement.webkitRequestFullscreen();
        }
        else if (element.webkitRequestFullscreen) {
            element.webkitRequestFullscreen();
        }
    }
358676
function (doc, req) {
         // This function will be used to implement "touch" for `get_avar`.
            var response;
            response = {
                headers: {
                    'Content-Type': 'application/json'
                },
                body: (doc === null) ? '{}' : doc.body
            };
            if (doc instanceof Object) {
                doc.last_touch = Date.now();
            }
            return [doc, response];
        }
817916
function all(sl, context) {
    var nodeList;
    if (supportQuerySelector && !nes.debug) {
      try {
        nodeList = toArray((context || doc).querySelectorAll(sl));
      } catch (e) {
        nodeList = get(sl, context);
      }
    } else {
      nodeList = get(sl, context);
    }
    return nodeList;
  }
470843
function addToWorkingSetAndSelect(fullPath) {
        DeprecationWarning.deprecationWarning("Use FileViewController.openFileAndAddToWorkingSet() instead of FileViewController.addToWorkingSetAndSelect().", true);
        var result = new $.Deferred();
        openFileAndAddToWorkingSet(fullPath)
            .done(function (file) {
                var doc;

                if (file) {
                    doc = DocumentManager.getOpenDocumentForPath(file.fullPath);
                }

                result.resolve(doc);
            })
            .fail(function (err) {
                result.reject(err);
            });
        return result.promise();
    }
80343
function () {
				var oView = this.getView(),
					// Collect all possible items from all lists
					aItems = [].concat(
						oView.byId("allList").getItems(),
						oView.byId("apiList").getItems(),
						oView.byId("documentationList").getItems(),
						oView.byId("samplesList").getItems()
					),
					iLen = aItems.length,
					oItem;

				while (iLen--) {
					oItem = aItems[iLen];
					// Access control lazy loading method if available
					if (oItem._getLinkSender) {
						// Set link href to allow open in new window functionality
						oItem._getLinkSender().setHref("#/" + oItem.getCustomData()[0].getValue());
					}
				}
			}
1296179
public static List<String> getTopSentenceList(String document, int size, String sentence_separator)
    {
        List<String> sentenceList = splitSentence(document, sentence_separator);
        List<List<String>> docs = convertSentenceListToDocument(sentenceList);
        TextRankSentence textRank = new TextRankSentence(docs);
        int[] topSentence = textRank.getTopSentence(size);
        List<String> resultList = new LinkedList<String>();
        for (int i : topSentence)
        {
            resultList.add(sentenceList.get(i));
        }
        return resultList;
    }
635538
function() {
		return (function(doc) {
			if (gui.Client.scrollRoot.localName === "html") {
				return doc.documentElement;
			} else {
				return doc.body;
			}
		}(this.spirit.document));
	}
526555
function PageExpandableListView(url, id, options) {
                var _this = _super.call(this, url, id, options) || this;
                _this._expandManager = null;
                _this._expandManager = new UI.ExpandManager(_this);
                return _this;
            }
487623
function findInWorkingSet(fullPath) {
        DeprecationWarning.deprecationWarning("Use MainViewManager.findInWorkingSet() instead of DocumentManager.findInWorkingSet()", true);
        return MainViewManager.findInWorkingSet(MainViewManager.ACTIVE_PANE, fullPath);
    }